]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
10 years agolibudev: enumerate - accept NULL parameters in add_match() 65/head
Tom Gundersen [Wed, 3 Jun 2015 20:08:46 +0000 (22:08 +0200)] 
libudev: enumerate - accept NULL parameters in add_match()

This was a regression introduced when moving to sd-device.

10 years agotest-util: fix a memleak
Thomas Hindoe Paaboel Andersen [Wed, 3 Jun 2015 17:49:04 +0000 (19:49 +0200)] 
test-util: fix a memleak

10 years agoMerge pull request #60 from Keruspe/master
Daniel Mack [Wed, 3 Jun 2015 16:02:18 +0000 (18:02 +0200)] 
Merge pull request #60 from Keruspe/master

build-sys: drop references to gobject-introspection

10 years agoMerge pull request #55 from filbranden/rootprefix_empty1
Daniel Mack [Wed, 3 Jun 2015 16:01:21 +0000 (18:01 +0200)] 
Merge pull request #55 from filbranden/rootprefix_empty1

Fix --with-rootprefix= (empty) with a workaround for now.

10 years agobuild-sys: disable gc-sections if optimization is disabled
Kay Sievers [Wed, 3 Jun 2015 15:17:08 +0000 (17:17 +0200)] 
build-sys: disable gc-sections if optimization is disabled

This way, development builds will not rely on gc-sections to
paper over cyclic link dependencies. Newly introduced broken
link requirements will immediatley fail.

10 years agobuild-sys: drop references to gobject-introspection 60/head
Marc-Antoine Perennou [Wed, 3 Jun 2015 15:24:23 +0000 (17:24 +0200)] 
build-sys: drop references to gobject-introspection

It has been removed alongside gudev

10 years agotest-unit-file.c: fixup the test for commit 3b51f8ddd5
Harald Hoyer [Wed, 3 Jun 2015 14:36:20 +0000 (16:36 +0200)] 
test-unit-file.c: fixup the test for commit 3b51f8ddd5

10 years agobuild-sys: Work around --with-rootprefix= (empty) not producing / 55/head
Filipe Brandenburger [Wed, 3 Jun 2015 14:31:12 +0000 (07:31 -0700)] 
build-sys: Work around --with-rootprefix= (empty) not producing /

Since we introduced AX_NORMALIZE_PATH, using --with-rootprefix=/ does
produce an empty string, but using --with-rootprefix= (empty) now
produces "." instead which is wrong.

Work around it until we can find a better solution for AX_NORMALIZE_PATH
upstream at autoconf-archive.

Bug: https://github.com/systemd/systemd/issues/54

10 years agobuild-sys: Recommend --with-rootprefix=/ for split-usr
Filipe Brandenburger [Wed, 3 Jun 2015 14:33:06 +0000 (07:33 -0700)] 
build-sys: Recommend --with-rootprefix=/ for split-usr

Since we started using AX_NORMALIZE_PATH, that is a valid supported
setup and is more explicit than --with-rootprefix= (empty) which is
actually currently broken.

Let's advocate for it in the ./configure suggestion from autogen.sh.

10 years agoMerge pull request #51 from zonque/unquote
Harald Hoyer [Wed, 3 Jun 2015 13:55:28 +0000 (15:55 +0200)] 
Merge pull request #51 from zonque/unquote

util: fix another cunescape() regression

compiled and test-util exited with 0

10 years agoconfigure.ac: add missing komma
Kay Sievers [Wed, 3 Jun 2015 12:50:58 +0000 (14:50 +0200)] 
configure.ac: add missing komma

10 years agopoint to github issues instead of freedesktop bugzilla
Kay Sievers [Wed, 3 Jun 2015 12:48:55 +0000 (14:48 +0200)] 
point to github issues instead of freedesktop bugzilla

10 years agobuild-sys: split off libsystemd-machine convenience lib
Kay Sievers [Wed, 3 Jun 2015 12:46:11 +0000 (14:46 +0200)] 
build-sys: split off libsystemd-machine convenience lib

Break the link order cycle by splitting off the machine parts which
use sd-bus but live in shared/.

10 years agobuild-sys: merge libsystemd-label convenience lib
Kay Sievers [Wed, 3 Jun 2015 12:16:36 +0000 (14:16 +0200)] 
build-sys: merge libsystemd-label convenience lib

Stop to pretend that we can split selinux related code from other.
We have too many cross-references and it breaks all the time and
I am no longer willing to maintain that mess for no real benefit.

We currently have cyclic dependencies which are only resolved on
machines with gc-sections toolchains. We need a simpler and at the
same time more strict model to manage our convenienc libraries and
linking.

The first thing to give up is the "optimization" of not linking
libselinux for a very few tools. If that is an issue, please fix
the mess that libselinux creates in selinux itself, and do not ask
consumers to work around it.

10 years agoutil: fix another cunescape() regression 51/head
Daniel Mack [Wed, 3 Jun 2015 11:33:26 +0000 (13:33 +0200)] 
util: fix another cunescape() regression

Fix a regression caused by 4034a06d ("util: rework word parsing and c
unescaping code") which broke octal escape sequences.

The reason for this breakage is that cunescape_one() expects 4 characters
in an octal encoding, which is a stray left-over from the old code which
operated on different variables to make the length check.

While at it, add a test case to prevent the same thing from happening
again.

10 years agobuild-sys: disable gc-sections for distcheck
Kay Sievers [Wed, 3 Jun 2015 01:14:21 +0000 (03:14 +0200)] 
build-sys: disable gc-sections for distcheck

We cannot rely on gc-sections to fix dependency cycles in our linking
setup. Disable it for distcheck to let it fail and find these bugs
earlier.

10 years agoMerge pull request #43 from teg/udev-forking-rework
Kay Sievers [Wed, 3 Jun 2015 00:39:07 +0000 (02:39 +0200)] 
Merge pull request #43 from teg/udev-forking-rework

udev forking/socket-passing rework

10 years agobuild-sys: remove left-over gtk-doc
Kay Sievers [Wed, 3 Jun 2015 00:35:53 +0000 (02:35 +0200)] 
build-sys: remove left-over gtk-doc

10 years agoudevd: merge manager_new() and manager_listen() again 43/head
Tom Gundersen [Tue, 2 Jun 2015 21:14:34 +0000 (23:14 +0200)] 
udevd: merge manager_new() and manager_listen() again

Now that listen_fds() have been split out, we can safely move the allocation
of the manager object after doing the forking (the fork is done to notify legcay
init-systems that the fds are ready).

Subsequently, we can merge manager_listen() back into managre_new().

This entails a minor behaviour change: the application of permissions to
static device nodes now happens after the fork (but still before notifying
systemd about being ready).

10 years agoudevd: make sd_notify independent of forknig/notify mode
Tom Gundersen [Tue, 2 Jun 2015 21:08:11 +0000 (23:08 +0200)] 
udevd: make sd_notify independent of forknig/notify mode

This will simply silently fail on non-systemd systems, so there is no reason
to make it conditional.

Also make it clear that we notify systemd about being ready as the last step
before starting the event loop, whereas the forking might need to happen
earlier.

10 years agoudevd: manager - split listen_fds() out of manager_new()
Tom Gundersen [Tue, 2 Jun 2015 21:05:40 +0000 (23:05 +0200)] 
udevd: manager - split listen_fds() out of manager_new()

This will allow us in a follow-up commit to listen to fds before forking and
still allocate the manager only after the fork.

10 years agoudevd: unify fd handling in forking/notify modes
Tom Gundersen [Tue, 2 Jun 2015 19:03:36 +0000 (21:03 +0200)] 
udevd: unify fd handling in forking/notify modes

Hide the differenec in listen_fds, by simply opening the fds
here in case they are not passed in.

10 years agolibudev: monitor - set nl_pid when reusing fd in udev_monitor_new_from_netlink_fd
Tom Gundersen [Tue, 2 Jun 2015 18:57:52 +0000 (20:57 +0200)] 
libudev: monitor - set nl_pid when reusing fd in udev_monitor_new_from_netlink_fd

This allows a fd to be created and configured as part of one monitor, to be passed in
to create a second monitor without having to redo any of the configuration.

10 years agoudevd: make cgroup logic independent of socket passing
Tom Gundersen [Tue, 2 Jun 2015 23:53:20 +0000 (01:53 +0200)] 
udevd: make cgroup logic independent of socket passing

This should have no behavioural change, but it is odd to tie the cgroup cleaning to
whether or not we are passed sockets.

The point really is if we are guaranteed to be in a dedicated cgroup, so instead
check for our parent being PID1 (we already implicitly only do this on systemd
systems).

10 years agoudevd: only bind ctrl and netlink sockets when we open them
Tom Gundersen [Tue, 2 Jun 2015 17:18:53 +0000 (19:18 +0200)] 
udevd: only bind ctrl and netlink sockets when we open them

If they are passed from PID1 this is not necessary.

10 years agoudevd: rename systemd_fds to listen_fds
Tom Gundersen [Tue, 2 Jun 2015 17:04:38 +0000 (19:04 +0200)] 
udevd: rename systemd_fds to listen_fds

10 years agoudevd: simplify signal mask handling
Tom Gundersen [Tue, 2 Jun 2015 15:07:21 +0000 (17:07 +0200)] 
udevd: simplify signal mask handling

We used to block all signals, and restore the original signal mask before exec'ing
external processes.

Now we just block the signals we care about and unconditionally unblock all signals
before exec'ing.

10 years agoMerge pull request #42 from jonboulle/master
Tom Gundersen [Tue, 2 Jun 2015 23:03:54 +0000 (01:03 +0200)] 
Merge pull request #42 from jonboulle/master

README: update links to reference new home (GitHub)

10 years agoMerge pull request #41 from mischief/ipforwarding
Tom Gundersen [Tue, 2 Jun 2015 23:02:51 +0000 (01:02 +0200)] 
Merge pull request #41 from mischief/ipforwarding

networkd: create "kernel" setting for IPForwarding

10 years agoREADME: update links to reference new home (GitHub) 42/head
Jonathan Boulle [Tue, 2 Jun 2015 22:57:50 +0000 (15:57 -0700)] 
README: update links to reference new home (GitHub)

10 years agoman: document IPForward=kernel option 41/head
Nick Owens [Tue, 2 Jun 2015 22:42:21 +0000 (15:42 -0700)] 
man: document IPForward=kernel option

10 years agonetworkd: create "kernel" setting for IPForwarding
Nick Owens [Fri, 1 May 2015 18:48:08 +0000 (11:48 -0700)] 
networkd: create "kernel" setting for IPForwarding

In 5a8bcb674f71a20e95df55319b34c556638378ce, IPForwarding was introduced
to set forwarding flags on interfaces in .network files. networkd sets
forwarding options regardless of the previous setting, even if it was
set by e.g. sysctl. This commit creates a new option for IPForwarding,
"kernel", that preserves the sysctl settings rather than always setting
them.

See https://bugs.freedesktop.org/show_bug.cgi?id=89509 for the initial
bug report.

10 years agoudev: input_id - use ABS_MT_SLOT{-1} to exclude non touch screen devices
Andreas Pokorny [Mon, 1 Jun 2015 20:43:39 +0000 (22:43 +0200)] 
udev: input_id - use ABS_MT_SLOT{-1} to exclude non touch screen devices

Peek at the ABS_MT_SLOT-1 axis. Expect that touch screens only
have axes inside the MT range.

10 years agoudev: input_id - use direct property and mt axis for touch screen detection
Andreas Pokorny [Fri, 29 May 2015 12:54:53 +0000 (14:54 +0200)] 
udev: input_id - use direct property and mt axis for touch screen detection

A lot of touch screens use INPUT_PROP_DIRECT to indicate that touch input
maps directly to the underlying screen, while the BTN_TOUCH bit might not be
set.

10 years agoudev: input_id - refactor device detection
Andreas Pokorny [Fri, 29 May 2015 12:54:52 +0000 (14:54 +0200)] 
udev: input_id - refactor device detection

This change switches to bools and separates bit flag evaluation from
decision making and application of udev properties, while hopefully
keeping the same semantics. Apart from using BTN_LEFT instead of BTN_MOUSE
for mouse detection.

10 years agoremove gudev and gtk-doc
Kay Sievers [Tue, 2 Jun 2015 22:09:23 +0000 (00:09 +0200)] 
remove gudev and gtk-doc

The library moved to:
  https://git.gnome.org/browse/libgudev/

10 years agofix double semicolon typo
Thomas Hindoe Paaboel Andersen [Tue, 2 Jun 2015 21:20:15 +0000 (23:20 +0200)] 
fix double semicolon typo

10 years agohwdb: update
Kay Sievers [Tue, 2 Jun 2015 18:19:31 +0000 (20:19 +0200)] 
hwdb: update

10 years agohwdb: Update database of Bluetooth company identifiers
Marcel Holtmann [Mon, 1 Jun 2015 19:11:40 +0000 (21:11 +0200)] 
hwdb: Update database of Bluetooth company identifiers

10 years agoMerge pull request #12 from systemd-mailing-devs/1433236104-9967-1-git-send-email...
Tom Gundersen [Tue, 2 Jun 2015 16:45:16 +0000 (18:45 +0200)] 
Merge pull request #12 from systemd-mailing-devs/1433236104-9967-1-git-send-email-m.olbrich@pengutronix.de

missing: add more btrfs defines

10 years agoudev-builtin: path_id - don't pass NULL to udev_device_get_parent()
Tom Gundersen [Tue, 2 Jun 2015 14:53:36 +0000 (16:53 +0200)] 
udev-builtin: path_id - don't pass NULL to udev_device_get_parent()

Being explicit about this makes the code easier to follow IMHO.

10 years agoudev: add some asserts
Tom Gundersen [Tue, 2 Jun 2015 14:52:07 +0000 (16:52 +0200)] 
udev: add some asserts

Mostly for documentation purposes.

10 years agosd-device: get_driver - remember if a device does not have a driver
Tom Gundersen [Mon, 1 Jun 2015 21:53:37 +0000 (23:53 +0200)] 
sd-device: get_driver - remember if a device does not have a driver

Don't try to read it again.

10 years agosd-device: get_subsystem - don't complain if a device does not have a subsystem
Tom Gundersen [Mon, 1 Jun 2015 21:51:37 +0000 (23:51 +0200)] 
sd-device: get_subsystem - don't complain if a device does not have a subsystem

10 years agoMerge pull request #5 from systemd-mailing-devs/1432910411-14517-1-git-send-email...
Daniel Mack [Tue, 2 Jun 2015 15:57:43 +0000 (17:57 +0200)] 
Merge pull request #5 from systemd-mailing-devs/1432910411-14517-1-git-send-email-llua@gmx.com

zsh-completion: a more style/tag aware _systemctl

10 years agoMerge pull request #4 from systemd-mailing-devs/1431989131-25145-1-git-send-email...
Daniel Mack [Tue, 2 Jun 2015 15:43:29 +0000 (17:43 +0200)] 
Merge pull request #4 from systemd-mailing-devs/1431989131-25145-1-git-send-email-llua@gmx.com

zsh-completion: fix completion of --user services

10 years agoMerge pull request #34 from systemd-mailing-devs/1432619328-32030-1-git-send-email...
Tom Gundersen [Tue, 2 Jun 2015 15:29:52 +0000 (17:29 +0200)] 
Merge pull request #34 from systemd-mailing-devs/1432619328-32030-1-git-send-email-m.olbrich@pengutronix.de

missing: add more IFLA_VXLAN_* defines

10 years agoMerge pull request #8 from systemd-mailing-devs/1433236059-9824-1-git-send-email...
Martin Pitt [Tue, 2 Jun 2015 15:24:34 +0000 (17:24 +0200)] 
Merge pull request #8 from systemd-mailing-devs/1433236059-9824-1-git-send-email-m.olbrich@pengutronix.de

random-util: guard including sys/auxv.h with the corresponding ifdef …

10 years agoMerge pull request #39 from filbranden/manpages_rootprefix
Daniel Mack [Tue, 2 Jun 2015 15:22:06 +0000 (17:22 +0200)] 
Merge pull request #39 from filbranden/manpages_rootprefix

Manpages rootprefix

10 years agobuild-sys: Normalize paths of configure options 39/head
Michael Biebl [Sat, 30 May 2015 01:04:55 +0000 (03:04 +0200)] 
build-sys: Normalize paths of configure options

Strip trailing slashes from options such as --with-rootprefix, so that building
with rootprefix="/" results in paths like "/lib" instead of "//lib".

Also handle paths such as "/usr/" gracefully.

Use m4/ax_normalize_path.m4 from the autoconf-archive project, which is now
included in our tree as per usual practices in using autoconf-archive macros.

Tested with the following configure options:
  ./configure \
        --with-rootprefix=/ \
        --with-rootlibdir=/lib64/ \
        --prefix=/usr/ \
        --libdir=/lib/ \
        --with-bashcompletiondir=/bash-completion/completions/

(The "prefix" and "libdir" are already automatically normalized by Autoconf,
this command is testing the others.)

Compared the config.log and resulting trees (in particular man pages) to
confirm double slashes were not present in the latter.

Also tested that a configuration using default options is not affected and that
`make distcheck` still works as expected.

10 years agoman: replace hard-coded /usr/lib
Daniel Mack [Sat, 30 May 2015 00:05:33 +0000 (02:05 +0200)] 
man: replace hard-coded /usr/lib

Replace some /usr/lib occurences in man/ with &rootprefix;/lib.

10 years agoMerge pull request #37 from haraldh/boot-options
Kay Sievers [Tue, 2 Jun 2015 14:28:28 +0000 (16:28 +0200)] 
Merge pull request #37 from haraldh/boot-options

90-loaderentry.install: fixup BOOT_OPTIONS

10 years ago90-loaderentry.install: fixup BOOT_OPTIONS 37/head
Harald Hoyer [Mon, 1 Jun 2015 09:28:03 +0000 (11:28 +0200)] 
90-loaderentry.install: fixup BOOT_OPTIONS

better use "read -r -d '' -a" to read in the array. It handles multiple
lines and missing newline at the EOF.

10 years agoSeparate the % sign from the number
Pablo Lezaeta Reyes [pˈaβ̞lo lˌe̞θaˈeta rˈejɛ] [Tue, 31 Mar 2015 05:47:39 +0000 (02:47 -0300)] 
Separate the % sign from the number

In spanish the % sign is supposed to be separated from the number [1 and 2 both in spanish] so I separated the %% that draw the percentage sign from the number.

[1] http://www.fundeu.es/recomendacion/el-se-escribe-separado-de-la-cifra-a-la-que-acompana-802/
[2] http://aplica.rae.es/orweb/cgi-bin/v.cgi?i=QGkHLBzKcEgZrQyD

PD: I know that probably this is not the propper place but I don't know where submit the fix or if I do it right

10 years agorandom-util: guard including sys/auxv.h with the corresponding ifdef check 8/head
Michael Olbrich [Tue, 2 Jun 2015 09:07:39 +0000 (11:07 +0200)] 
random-util: guard including sys/auxv.h with the corresponding ifdef check

10 years agomissing: add more btrfs defines 12/head
Michael Olbrich [Tue, 2 Jun 2015 09:08:24 +0000 (11:08 +0200)] 
missing: add more btrfs defines

10 years agotest-unit-file: add test for improperly escaped exec string
Daniel Mack [Mon, 1 Jun 2015 16:05:02 +0000 (18:05 +0200)] 
test-unit-file: add test for improperly escaped exec string

Add a regression test for the recent breakage of handling improperly
escaped exec strings in unit files.

Code contributed by Martin Pitt:

  https://bugs.freedesktop.org/show_bug.cgi?id=90794

10 years agoload-fragment: use UNESCAPE_RELAX flag to parse exec directives
Daniel Mack [Mon, 1 Jun 2015 15:49:04 +0000 (17:49 +0200)] 
load-fragment: use UNESCAPE_RELAX flag to parse exec directives

The cunescape() helper function used to handle unknown escaping sequences
gracefully by copying them over verbatim.

Commit 527b7a42 ("util: rework cunescape(), improve error handling") added
a flag to make that behavior optional, and changed to default to error out
with -EINVAL otherwise.

However, config_parse_exec(), which is used to parse the
Exec{Start,Stop}{Post,Pre,} directives of unit files, was not changed along
with that commit, which means that directives with improperly escaped
command line strings are no longer parsed.

Relevant bugreports include:

  https://bugs.freedesktop.org/show_bug.cgi?id=90794
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=787256

Fix this by passing UNESCAPE_RELAX to config_parse_exec() in order to
restore the original behavior.

10 years agosd-device: ensure update_properties_buf() is a noop on failure
Tom Gundersen [Mon, 1 Jun 2015 14:28:58 +0000 (16:28 +0200)] 
sd-device: ensure update_properties_buf() is a noop on failure

Don't clobber the sd_device struct, and don't leak memory when memory allocation fails.

10 years agozsh-completion: fix typo in _bootctl
Daniel Mack [Mon, 1 Jun 2015 10:06:07 +0000 (12:06 +0200)] 
zsh-completion: fix typo in _bootctl

The command is 'install', not 'instal'. Fix that typo.

10 years agosd-device: fix invalid property strv pointers
Martin Pitt [Mon, 1 Jun 2015 09:32:39 +0000 (11:32 +0200)] 
sd-device: fix invalid property strv pointers

In device_update_properties_bufs(), the strv is built from pointers into the
single nul-terminated buf_nulstr string, to avoid allocating the key=value
strings twice. However, we must not do that while building and
GREEDY_REALLOC0()'ing buf_nulstr, as each time when this actually reallocates
memory the pointers we wrote into buf_strv so far become invalid.

So change the logic to first completely build the new buf_nulstr, and then
iterate over it to pick out the pointers to the individual key=value strings
for properties_strv.

This fixes invalid environment for udev callouts.

10 years agoudev: Bring back persistant storage symlinks for bcache
David Mohr [Mon, 1 Jun 2015 06:10:28 +0000 (08:10 +0200)] 
udev: Bring back persistant storage symlinks for bcache

https://bugs.debian.org/787367

10 years agotmpfiles: Fix comment typo
Colin Guthrie [Mon, 1 Jun 2015 08:27:40 +0000 (09:27 +0100)] 
tmpfiles: Fix comment typo

10 years agoudevd: open sockets before forking
Tom Gundersen [Sun, 31 May 2015 21:58:39 +0000 (23:58 +0200)] 
udevd: open sockets before forking

The communication channels must all be opened before forknig in daemon mode,
or we cannot guarantee that udevadm will work correctly as soon as udevd is
started.

10 years agoudevd: don't allocate sd_event object before fork
Tom Gundersen [Sun, 31 May 2015 21:52:53 +0000 (23:52 +0200)] 
udevd: don't allocate sd_event object before fork

In daemon mode we would break sd-event as it cannot work accross different processes.
Simply delay the allocation to after the fork.

10 years agoudevd: don't sanitize fd 0,1,2
Tom Gundersen [Sun, 31 May 2015 20:38:30 +0000 (22:38 +0200)] 
udevd: don't sanitize fd 0,1,2

Kay said: 'it is from ancient times, when we started udevd from the
kernel's usermodhelper which had no fd 0,1,2'.

10 years agocore/namespace: Protect /usr instead of /home with ProtectSystem=yes
Jason Pleau [Sun, 31 May 2015 16:51:17 +0000 (12:51 -0400)] 
core/namespace: Protect /usr instead of /home with ProtectSystem=yes

A small typo in ee818b8 caused /home to be put in read-only instead of
/usr when ProtectSystem was enabled (ie: not set to "no").

10 years agoconf-parser: parsing error logs should show a type not a vartype
Ronny Chevalier [Sat, 30 May 2015 10:21:26 +0000 (12:21 +0200)] 
conf-parser: parsing error logs should show a type not a vartype

Instead of this:
[filename:1] Failed to parse nsec_t value, ignoring: garbage

we show this:
[filename:1] Failed to parse nsec value, ignoring: garbage

10 years agonetworkctl: fix uninitialized variable
Ronny Chevalier [Sat, 30 May 2015 08:51:41 +0000 (10:51 +0200)] 
networkctl: fix uninitialized variable

We ignore the return value of sd_device_get_devtype, then devtype could
be uninitialized when used with streq_ptr. So we need to initialize it
first.

10 years agoREADME: fix typo
Ronny Chevalier [Sat, 30 May 2015 08:31:41 +0000 (10:31 +0200)] 
README: fix typo

10 years agozsh-completion: update bootctl
Ronny Chevalier [Sun, 24 May 2015 11:25:52 +0000 (13:25 +0200)] 
zsh-completion: update bootctl

10 years agotest-fdset: add more tests
Ronny Chevalier [Sat, 23 May 2015 16:51:38 +0000 (18:51 +0200)] 
test-fdset: add more tests

add tests for the following functions:
- fdset_new_array
- fdset_steal_first
- fdset_isempty

10 years agotests: add test-conf-parser
Ronny Chevalier [Sat, 23 May 2015 16:32:57 +0000 (18:32 +0200)] 
tests: add test-conf-parser

10 years agorules: restore block watch after CHANGE events
Tom Gundersen [Fri, 29 May 2015 18:55:39 +0000 (20:55 +0200)] 
rules: restore block watch after CHANGE events

When processing an event, the watch is disabled, make sure it is restorted after
a CHANGE event has been processed.

10 years agorules: fix typo in block watch rule
Tom Gundersen [Fri, 29 May 2015 17:59:24 +0000 (19:59 +0200)] 
rules: fix typo in block watch rule

The intention was to turn this rule from using a blacklist to a whitelist, but
there was a stray '!'.

10 years agoRevert "Makefile: make custom-entities.ent depend on Makefile.am"
Daniel Mack [Fri, 29 May 2015 22:59:22 +0000 (00:59 +0200)] 
Revert "Makefile: make custom-entities.ent depend on Makefile.am"

This reverts commit 6096d9cc. As discussed on the mailing list, we
should accept some formal incorrectness in the dependency here, and
not rebuild the man pages every time Makefile.am changes - xsltproc
is simply too expensive.

Instead, let's move man/custom-entities.ent from DISTCLEANFILES to
CLEANFILES, so a 'make clean' is sufficient to actually make changes
in Makefile.am efficient for the contents of the man pages.

10 years agoterminal: fix include ordering
Thomas Hindoe Paaboel Andersen [Fri, 29 May 2015 22:01:18 +0000 (00:01 +0200)] 
terminal: fix include ordering

10 years agoconsole: use signal-util.h and reorder includes
Thomas Hindoe Paaboel Andersen [Fri, 29 May 2015 19:11:30 +0000 (21:11 +0200)] 
console: use signal-util.h and reorder includes

Missed this one from the previous commit

10 years agoterminal: use signal-util.h and reorder includes
Thomas Hindoe Paaboel Andersen [Fri, 29 May 2015 18:50:37 +0000 (20:50 +0200)] 
terminal: use signal-util.h and reorder includes

10 years agoutil: split out signal-util.[ch] from util.[ch]
Lennart Poettering [Fri, 29 May 2015 18:14:11 +0000 (20:14 +0200)] 
util: split out signal-util.[ch] from util.[ch]

No functional changes.

10 years agoCODING_STYLE: document order in which to #include headers
Lennart Poettering [Fri, 29 May 2015 18:12:17 +0000 (20:12 +0200)] 
CODING_STYLE: document order in which to #include headers

10 years agoudevd: hook up watchdog support
Tom Gundersen [Fri, 29 May 2015 16:41:26 +0000 (18:41 +0200)] 
udevd: hook up watchdog support

We are already sending watchdog notification, this tells PID1 to actually listen for
them and restart udevd in case it gets stuck.

10 years agoudevd: notify - expose a bit more of the internal state
Tom Gundersen [Fri, 29 May 2015 16:38:44 +0000 (18:38 +0200)] 
udevd: notify - expose a bit more of the internal state

This notifies PID1 about config being flushed, about shutdown starting and shutdown finalizing.

10 years agoudevd: notify - keep NOTIFY_SOCKET around
Tom Gundersen [Fri, 29 May 2015 16:32:15 +0000 (18:32 +0200)] 
udevd: notify - keep NOTIFY_SOCKET around

Only unset the env var in the workers, but otherwise keep it around in the main daemon.

10 years agoudevd: modernize status notification
Tom Gundersen [Fri, 29 May 2015 16:31:01 +0000 (18:31 +0200)] 
udevd: modernize status notification

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.

10 years agoudevd: event - port spawn_wait() to sd-event
Tom Gundersen [Fri, 15 May 2015 09:35:15 +0000 (11:35 +0200)] 
udevd: event - port spawn_wait() to sd-event

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.

10 years agoudevd: move main-loop to sd-event
Tom Gundersen [Mon, 18 May 2015 15:22:36 +0000 (17:22 +0200)] 
udevd: move main-loop to sd-event

10 years agoudevd: explicitly try to start event queue when it may be possible
Tom Gundersen [Mon, 18 May 2015 15:06:00 +0000 (17:06 +0200)] 
udevd: explicitly try to start event queue when it may be possible

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.

10 years agoudevd: only check for changed config before scheduling new events
Tom Gundersen [Mon, 18 May 2015 14:25:22 +0000 (16:25 +0200)] 
udevd: only check for changed config before scheduling new events

Also move builtin and rules initialization from main loop to
event_queue_start().

No functional change.

10 years agoudevd: introduce manager_exit() and manager_reload()
Tom Gundersen [Wed, 13 May 2015 09:26:32 +0000 (11:26 +0200)] 
udevd: introduce manager_exit() and manager_reload()

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.

10 years agopath-util: Change path_is_mount_point() symlink arg from bool to flags
Martin Pitt [Fri, 29 May 2015 15:13:12 +0000 (17:13 +0200)] 
path-util: Change path_is_mount_point() symlink arg from bool to flags

This makes path_is_mount_point() consistent with fd_is_mount_point() wrt.
flags.

10 years agopath-util: Fix path_is_mount_point for files
Martin Pitt [Wed, 27 May 2015 07:56:03 +0000 (09:56 +0200)] 
path-util: Fix path_is_mount_point for files

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.

10 years agozsh-completion: a more style/tag aware _systemctl 5/head
Eric Cook [Fri, 29 May 2015 14:40:11 +0000 (10:40 -0400)] 
zsh-completion: a more style/tag aware _systemctl

using _wanted instead of calling compadd directly. this allows the user to customize
possible matches.

An example being, grouping units by type:
autoload -Uz compinit; compinit
zstyle ':completion:*' menu select
zstyle ':completion:*' group-name ''
zstyle ':completion:*' format 'Completing %d'
zstyle -e ':completion:*:*:systemctl-(((re|)en|dis)able|(*re|)start|reload*):*' \
tag-order 'local type; for type in service template target socket;
    reply+=( systemd-units:-${type}:${type} ); reply=( "$reply systemd-units:-misc:misc" )'
zstyle ':completion:*:systemd-units-template' ignored-patterns '^*@'
zstyle ':completion:*:systemd-units-target' ignored-patterns '^*.target'
zstyle ':completion:*:systemd-units-socket' ignored-patterns '^*.socket'
zstyle ':completion:*:systemd-units-service' ignored-patterns '^*.service'
zstyle ':completion:*:systemd-units-misc' ignored-patterns '*(@|.(service|socket|target))'

also, <poke> http://lists.freedesktop.org/archives/systemd-devel/2015-May/032012.html

10 years agobuild-sys: pass originally configured --enable-split-usr to distcheck
Martin Pitt [Fri, 29 May 2015 05:39:53 +0000 (07:39 +0200)] 
build-sys: pass originally configured --enable-split-usr to distcheck

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/.

10 years agobuild-sys: fix typo
Karel Zak [Fri, 29 May 2015 11:42:35 +0000 (13:42 +0200)] 
build-sys: fix typo

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.

10 years agobuild-sys: Stop depending on current configure options for EXTRA_DIST
Martin Pitt [Thu, 28 May 2015 10:03:17 +0000 (12:03 +0200)] 
build-sys: Stop depending on current configure options for EXTRA_DIST

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.

10 years agoMakefile: make custom-entities.ent depend on Makefile.am
Daniel Mack [Fri, 29 May 2015 10:00:58 +0000 (12:00 +0200)] 
Makefile: make custom-entities.ent depend on Makefile.am

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.

10 years agosystemctl: Don't skip SysV init.d scripts when enabling/disabling units
Martin Pitt [Wed, 27 May 2015 12:52:17 +0000 (14:52 +0200)] 
systemctl: Don't skip SysV init.d scripts when enabling/disabling units

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.

10 years agosystemctl: drop hardcoded chkconfig invocation
Martin Pitt [Wed, 27 May 2015 15:04:49 +0000 (17:04 +0200)] 
systemctl: drop hardcoded chkconfig invocation

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.

10 years agoman: use configured path for mount and umount binaries in manpages
Filipe Brandenburger [Wed, 27 May 2015 09:38:20 +0000 (02:38 -0700)] 
man: use configured path for mount and umount binaries in manpages

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.