1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-22 13:33:56 +03:00
Backports of patch from systemd git to stable distributions
Go to file
Colin Walters f38951a628 systemctl,verbs: Introduce SYSTEMD_OFFLINE environment variable
A lot of code references the `running_in_chroot()` function; while
I didn't dig I'm pretty certain this arose to deal with situations
like RPM package builds in `mock` - there we don't want the `%post`s
to `systemctl start` for example.

And actually this exact same use case arises for
[rpm-ostree](https://github.com/projectatomic/rpm-ostree/)
where we implement offline upgrades by default; the `%post`s are
always run in a new chroot using [bwrap](https://github.com/projectatomic/bubblewrap).

And here's the problem: bwrap creates proper mount roots, so it
passes `running_in_chroot()`, and then if a script tries to do
`systemctl start` we get:
`System has not been booted with systemd as init system (PID 1)`
but that's an *error*, unlike the `running_in_chroot()` case where we ignore.

Further complicating things is there are real world RPM packages
like `glusterfs` which end up invoking `systemctl start`.

A while ago, the `SYSTEMD_IGNORE_CHROOT` environment variable was
added for the inverse case of running in a chroot, but still wanting
to use systemd as PID 1 (presumably some broken initramfs setups?).

Let's introduce a `SYSTEMD_OFFLINE` environment variable for cases like
mock/rpm-ostree so we can force on the "ignore everything except preset" logic.
This way we'll still not start services even if mock switches to use nspawn or
bwrap or something else that isn't a chroot.

We also cleanly supercede the `SYSTEMD_IGNORE_CHROOT=1` which is now spelled
`SYSTEMD_OFFLINE=0`.  (Suggested by @poettering)

Also I made things slightly nicer here and we now print the ignored operation.
2017-12-14 16:00:16 -05:00
.github Docs: Fix spelling and capitalization (#7408) 2017-11-21 14:37:16 +01:00
.mkosi Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
catalog Add license headers and SPDX identifiers to meson.build files 2017-11-19 19:08:15 +01:00
coccinelle tree-wide: drop a few == NULL and != NULL comparison 2017-12-11 16:05:40 +01:00
docs Add license headers and SPDX identifiers to meson.build files 2017-11-19 19:08:15 +01:00
factory/etc factory: remove broken pam_limits 2014-07-30 15:21:54 +02:00
hwdb Added Logitech MX Master 2s (#7487) 2017-11-28 12:30:31 +10:00
man Merge pull request #7569 from keszybz/doc-reverse-settings 2017-12-13 13:42:19 +09:00
modprobe.d Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
network Add license headers and SPDX identifiers to meson.build files 2017-11-19 19:08:15 +01:00
po Added some missing Swedish Strings (#7552) 2017-12-06 13:52:25 +01:00
presets Hook up systemd-tmpfiles as user units 2017-12-06 10:19:35 +01:00
rules meson: re-attach rule-syntax-check.py test 2017-11-22 12:46:08 +01:00
shell-completion Add license headers and SPDX identifiers to meson.build files 2017-11-19 19:08:15 +01:00
src systemctl,verbs: Introduce SYSTEMD_OFFLINE environment variable 2017-12-14 16:00:16 -05:00
sysctl.d Do not set net.ipv4.conf.default.* 2017-12-05 16:34:59 +02:00
sysusers.d sysusers: use NOBODY_USER_NAME 2017-12-07 17:12:13 +09:00
test Merge pull request #7554 from keszybz/autodetect-build 2017-12-07 09:07:40 +01:00
tmpfiles.d Add license headers and SPDX identifiers to meson.build files 2017-11-19 19:08:15 +01:00
tools tests: try to autodetect directory better 2017-12-06 15:16:35 +01:00
units nspawn: turn on watchdog logic for nspawn too 2017-12-07 12:34:46 +01:00
xorg login: support user-bus on dbus1 2015-08-31 18:12:37 +02:00
.dir-locals.el meson: also indent scripts with 8 spaces 2017-04-25 08:49:16 -04:00
.editorconfig editorconfig: add rule for meson.build files (#6671) 2017-08-28 16:37:23 +02:00
.gitattributes git: indicate that tabs are never OK in the systemd tree 2013-10-30 02:25:38 +01:00
.gitignore Add mkosi.output/ to .gitignore 2017-11-29 14:33:56 +01:00
.mailmap mailmap: add more names from the v236 cycle 2017-12-11 16:05:40 +01:00
.travis.yml remove gudev and gtk-doc 2015-06-03 00:22:53 +02:00
.vimrc vimrc: fix indentation logic for our docbook xml files 2016-04-29 12:23:34 +02:00
.ycm_extra_conf.py ycm: add doc string for all the functions in configuration file 2017-11-29 13:21:49 -07:00
CODING_STYLE CODING_STYLE: document the order in which unescaping + specifier expansion should be done 2017-11-29 12:32:56 +01:00
configure build-sys: add basic support for ./configure && make && make install 2017-07-18 10:05:06 -04:00
DISTRO_PORTING DISTRO_PORTING: document that distros may/should change fallback DNS as well as fallback NTP if they wish 2017-07-24 11:49:16 +02:00
ENVIRONMENT.md systemctl,verbs: Introduce SYSTEMD_OFFLINE environment variable 2017-12-14 16:00:16 -05:00
HACKING HACKING: add a short description of new unit tests 2017-11-04 21:15:57 +01:00
LICENSE.GPL2 relicense to LGPLv2.1 (with exceptions) 2012-04-12 00:24:39 +02:00
LICENSE.LGPL2.1 licence: remove references to old FSF address 2012-12-17 11:41:31 +01:00
Makefile build-sys: Fix Makefile wrapper for install target (#6548) 2017-08-07 11:29:20 +02:00
meson_options.txt build-sys: make the dynamic UID range, and the container UID range configurable 2017-12-06 12:55:37 +01:00
meson.build meson: link NSS modules with -z nodelete (#7607) 2017-12-12 20:13:16 +01:00
mkosi.build mkosi.build: add code to determine the right nobody user/group name 2017-12-06 13:53:39 +01:00
mkosi.default mkosi: create .mkosi directory 2016-10-06 11:53:58 -04:00
NEWS NEWS: more updates for v236 2017-12-11 16:05:41 +01:00
README README: add requirements for IPAddress{Allow,Deny} (#7414) 2017-11-21 23:54:20 +01:00
README.md README.md: add CII Best Practices badge 2017-11-04 21:15:57 +01:00
TODO update TODO 2017-12-07 12:34:46 +01:00
TRANSIENT-SETTINGS.md documentation: add document listing all unit file settings also supported for transient units 2017-11-29 12:34:12 +01:00
UIDS-GIDS.md doc: add a document briefly explaining UID/GID range assumptions we make 2017-12-06 13:40:50 +01:00

systemd - System and Service Manager

Count of open issues over time Count of open pull requests over time Build Status
Coverity Scan Status
CII Best Practices

Details

General information about systemd can be found in the systemd Wiki.

Information about build requirements are provided in the README file.

Consult our NEWS file for information about what's new in the most recent systemd versions.

Please see the HACKING file for information how to hack on systemd and test your modifications.

Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.

When preparing patches for systemd, please follow our Coding Style Guidelines.

If you are looking for support, please contact our mailing list or join our IRC channel.