summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-05-29CODING_STYLE: document order in which to #include headersLennart Poettering
2015-05-29udevd: hook up watchdog supportTom Gundersen
We are already sending watchdog notification, this tells PID1 to actually listen for them and restart udevd in case it gets stuck.
2015-05-29udevd: notify - expose a bit more of the internal stateTom Gundersen
This notifies PID1 about config being flushed, about shutdown starting and shutdown finalizing.
2015-05-29udevd: notify - keep NOTIFY_SOCKET aroundTom Gundersen
Only unset the env var in the workers, but otherwise keep it around in the main daemon.
2015-05-29udevd: modernize status notificationTom Gundersen
Only log about starting in daemon mode, rely on PID1 to log this in notify mode. Also explicitly set the STATUS variable, as is done in notify mode as is done for other serivecs.
2015-05-29udevd: event - port spawn_wait() to sd-eventTom Gundersen
This allows us to drop the special sigterm handling in spawn_wait() as this will now be passed directly to the worker event loop. We now log failing spawend processes at 'warning' level, and timeouts are in terms of CLOCK_BOOTTIME when available, otherwise the behavior is unchanged.
2015-05-29udevd: move main-loop to sd-eventTom Gundersen
2015-05-29udevd: explicitly try to start event queue when it may be possibleTom Gundersen
Rather than trying to schedule new events on every main-loop iteration, do it explicitly when processing an event finishes, a worker is killed, a new uevent is received, or the event queue is explicitly restarted.
2015-05-29udevd: only check for changed config before scheduling new eventsTom Gundersen
Also move builtin and rules initialization from main loop to event_queue_start(). No functional change.
2015-05-29udevd: introduce manager_exit() and manager_reload()Tom Gundersen
The behavior is mostly unchanged, but rather than only ever calling these functions at fixed points in the event loop, they are called directly whenever they are invoked.
2015-05-29path-util: Change path_is_mount_point() symlink arg from bool to flagsMartin Pitt
This makes path_is_mount_point() consistent with fd_is_mount_point() wrt. flags.
2015-05-29path-util: Fix path_is_mount_point for filesMartin Pitt
Commits 27cc6f166 and f25afeb broke path_is_mount_point() for files (such as /etc/machine-id → /run/machine-id bind mounts) as with the factorization of fd_is_mount_point() we lost the parent directory. We cannot determine that from an fd only as openat(fd, "..") only works for directory fds. Change fd_is_mount_point() to behave like openat(): It now takes a file descriptor of the containing directory, a file name in it, and flags (which can be 0 or AT_SYMLINK_FOLLOW). Unlike name_to_handle_at() or openat(), fstatat() only accepts the inverse flag AT_SYMLINK_NOFOLLOW and complains with EINVAL about AT_SYMLINK_FOLLOW; so we need to transform the flags for that fallback. Adjust rm_rf_children() accordingly (only other caller of fd_is_mount_point() aside from path_is_mount_point()). Add test cases for files, links, and file bind mounts (the latter will only work when running as root). Split out a new test_path_is_mount_point() test case function as it got significantly larger now.
2015-05-29build-sys: pass originally configured --enable-split-usr to distcheckMartin Pitt
Previously we always ran distcheck with --disable-split-usr. This caused test-path-util to fail with Assertion 'fsck_exists("minix") == 0' failed at ../src/test/test-path-util.c:224, function test_fsck_exists(). Aborting. as looking up fsck.minix would only look into DEFAULT_PATH_NORMAL, but on these systems fsck is in /sbin/.
2015-05-29build-sys: fix typoKarel Zak
There is nothing like systemd_verify_* in Makefile.am. The bug has been invisible because automake uses the default CFLAGS when component CFLAGS are undefined.
2015-05-29build-sys: Stop depending on current configure options for EXTRA_DISTMartin Pitt
Consistently move EXTRA_DIST out of conditional blocks. This would have produced incomplete dist tarballs when being run in a built tree with not every feature enabled, which can cause broken dist tarballs.
2015-05-29Makefile: make custom-entities.ent depend on Makefile.amDaniel Mack
When Makefile.am is modified, make sure custom-entities.ent is rebuilt. After all, $(substitutions) is defined there, so changes of that variable must be reflected in the resulting file.
2015-05-28systemctl: Don't skip SysV init.d scripts when enabling/disabling unitsMartin Pitt
If there is both a SysV init.d script and a systemd unit for a given name, we want to do the same enable/disable operation for both, instead of just on the systemd unit. This keeps the enablement status in sync so that switching init systems behaves as expected.
2015-05-28systemctl: drop hardcoded chkconfig invocationMartin Pitt
Introduce /usr/lib/systemd/systemd-sysv-install [--root=] <action> <name> abstraction, replacing the direct calling of chkconfig. This allows distributions to call their specific tools like update-rc.d without patching systemd. Ship systemd-sysv-install.SKELETON as an example for packagers how to implement this. Drop the --enable-chkconfig configure option. Document this in README and point to it in NEWS.
2015-05-28man: use configured path for mount and umount binaries in manpagesFilipe Brandenburger
Export the MOUNT_PATH and UMOUNT_PATH variables as XML entities and use them in the systemctl.1 manpage instead of hardcoding the path in /usr/bin. Tested: - Ran ./configure ac_cv_path_MOUNT_PATH=/bin/mount (same for umount) and rebuilt the manpages, confirmed that the correct path was in man/systemctl.1 - Rebuilt man/systemd.directives.xml and the man pages derived from it, confirmed that the correct paths were there as well.
2015-05-28man: generate configured paths in manpagesFilipe Brandenburger
In particular, use /lib/systemd instead of /usr/lib/systemd in distributions like Debian which still have not adopted a /usr merge setup. Use XML entities from man/custom-entities.ent to replace configured paths while doing XSLT processing of the original XML files. There was precedent of some files (such as systemd.generator.xml) which were already using this approach. This addresses most of the (manual) fixes from this patch: http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/tree/debian/patches/Fix-paths-in-man-pages.patch?h=experimental-220 The idea of using generic XML entities was presented here: http://lists.freedesktop.org/archives/systemd-devel/2015-May/032240.html This patch solves almost all the issues, with the exception of: - Path to /bin/mount and /bin/umount. - Generic statements about preference of /lib over /etc. These will be handled separately by follow up patches. Tested: - With default configure settings, ran "make install" to two separate directories and compared the output to confirm they matched exactly. - Used a set of configure flags including $CONFFLAGS from Debian: http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/tree/debian/rules Installed the tree and confirmed the paths use /lib/systemd instead of /usr/lib/systemd and that no other unexpected differences exist. - Confirmed that `make distcheck` still passes.
2015-05-28sd-device: enumerator - fix matching on properties and sysattrsTom Gundersen
This was a regression that broke $ udevadm trigger -nv --property-match=DEVNAME=/dev/sda1 --attr-match=size=409600 Reported by David Reisner.
2015-05-27man: fix systemd.resource-control(5) volume numberPatrick Donnelly
2015-05-27fix extraneous space in equality checkJonathan Boulle
2015-05-27sd-device: fix device_get_properties_strv()Tom Gundersen
A NULL pointer was inserted as the first element of the strv. This had the effect of always passing the empty environment to processes spawned by udev. Reported by Michał Bartoszkiewicz.
2015-05-27udevd: fix SIGCHLD handling in --daemon modeTom Gundersen
We were listening for SIGCHLD in the wrong process.
2015-05-27missing: add more IFLA_VXLAN_* definesMichael Olbrich
Otherwise building faild with kernel headers < v3.16
2015-05-27logind: prefix some calls to unlink with (void)Daniel Mack
Make Coverity happy and tell it we're not interested in the return value of these two calls.
2015-05-27logind: unlink /run/nologin when shutdown is cancelledDaniel Mack
When a scheduled is cancelled, make sure to remove /run/nologin. This is a regression from the recent shutdownd removal and logind rework.
2015-05-26treewide: fix typosTorstein Husebø
2015-05-26udev: fix inotify handlingDavid Herrmann
This partly reverts: commit 6d1b1e0bc6bd020218afc5f05286bf372be283d5 Author: Tom Gundersen <teg@jklm.no> Date: Sun May 24 15:10:04 2015 +0200 udevd: worker - fully clean up unnecessary fds The inotify-fd _is_ used in the workers, so don't close it! Have a look at udev-watch.c, which keeps track of the inotify-fd as a global variable (ugh!).
2015-05-26build-sys: ship fsck mock in tarballMartin Pitt
Useful for downstream integration test cases.
2015-05-25test: hostname - test that hostname is truly initializedTom Gundersen
Fixes CID CID 1299638 (use after free).
2015-05-25nspawn: fix memleakTom Gundersen
This was a typo, swapping prefix_root() in place of prefix_roota(). Fixes CID 1299640.
2015-05-25nspawn: avoid memleakTom Gundersen
Simplify the code a bit, at the cost of potentially duplicating some memory unneccessarily. Fixes CID 1299641.
2015-05-25nspawn: drop some debugging codeTom Gundersen
These have no effect. Fixes CID 1299643.
2015-05-25import: dkr - avoid NULL-pointer dereferenceTom Gundersen
A malformed manifest could in principle cause a NULL pointer dereference of. Check for this and fail early. Fixes CID 1299642.
2015-05-25nspawn: make coverity happyTom Gundersen
Rather than checking the return of asprintf() we are checking if buf gets allocated, make it clear that it is ok to ignore the return value. Fixes CID 1299644.
2015-05-25networkd: fix IFF_UP when ipv6 support is disabledTom Gundersen
Passing ipv6 options (even when they should be noops) caused IFF_UP to fail when ipv6 was supported. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=90103
2015-05-25swap: use swapon -oKarel Zak
This patch simplify swapon usage in systemd. The command swapon(8) since util-linux v2.26 supports "-o <list>". The idea is exactly the same like for mount(8). The -o specifies options in fstab-compatible way. For systemd it means that it does not have to care about things like "discard" or another swapon specific options. swapon -o <options-from-fstab> For backward compatibility the code cares about "Priority:" swap unit field (for a case when Priority: is set, but pri= in the Options: is missing). References: http://lists.freedesktop.org/archives/systemd-devel/2014-October/023576.html
2015-05-25build-sys: fix headers installationMarc-Antoine Perennou
2015-05-25build-sys: don't dist generated filesMarc-Antoine Perennou
[tomegun: fix Makefile.am:5675: warning: nodist_systemd_resolved_SOURCES multiply defined in condition ENABLE_RESOLVED]
2015-05-25build-sys: always include src/boot/efi in tarballsMarc-Antoine Perennou
currently it would only be included if configure was ran with --enable-gnuefi
2015-05-24shared: generator - correct path to systemd-fsckMike Gilbert
In generated systemd-fsck-root.service. This would break if rootprefix is not /usr/lib/systemd. [tomegun: flesh out commit message]
2015-05-24nspawn: be verbose about interface namesUmut Tezduyar Lindskog
Allowed interface name is relatively small. Lets not make users go in to the source code to figure out what happened. --machine=debian-tree conflicts with --machine=debian-tree2 ex: Failed to add new veth \ interfaces (host0, vb-debian-tree): File exists
2015-05-24udevd: event - fix event queue in daemenozied modeTom Gundersen
We would enforce that events could only be added to the queue from the main process, but that brake in daemonized mode. Relax the restriction to only allow one process to add events to the queue. Reported by Mantas Mikulėnas.
2015-05-24udevd: worker - modernize a bitTom Gundersen
Initialize structs when declaring rather than using memzero().
2015-05-24udevd: worker - fully clean up unnecessary fdsTom Gundersen
These are only ever used in the parent process, so close them early in the worker.
2015-05-23bootctl: fix an error checkThomas Hindoe Paaboel Andersen
2015-05-23fix typos in systemd-nspawn man pageJonathan Boulle
2015-05-22bootctl: ferror must be called before FILE is closedThomas Hindoe Paaboel Andersen
Otherwise it will not show any error stored