chiark / gitweb /
5 years agonetworkd: netdev - inform when we take over an existing netdev
Tom Gundersen [Wed, 4 Mar 2015 09:33:50 +0000 (10:33 +0100)]
networkd: netdev - inform when we take over an existing netdev

The crucial point here is that we will not change the settings of a netdev created by someone else
we simply use it as is and trust it was set up as intended.

This is confusing in the case of the pre-created netdev's (bond0 etc.), the solution should probably
be to simply make the kernel stop creating these devices as they are pretty useless.

5 years agohwdb: add pnpid for the T450s touchpad
Peter Hutterer [Wed, 4 Mar 2015 03:24:45 +0000 (13:24 +1000)]
hwdb: add pnpid for the T450s touchpad

5 years agoshared/util: assume ac when /sys/class/power_supply is missing
Zbigniew Jędrzejewski-Szmek [Wed, 4 Mar 2015 00:07:28 +0000 (19:07 -0500)]
shared/util: assume ac when /sys/class/power_supply is missing

On s390 (at least) /sys/class/power_supply is not present. We should
treat this like if this directory was empty, and not an error.

5 years agoDo not advertise .d snippets over main config file
Zbigniew Jędrzejewski-Szmek [Wed, 4 Mar 2015 00:10:21 +0000 (19:10 -0500)]
Do not advertise .d snippets over main config file

For daemons which have a main configuration file, there's
little reason for the administrator to use configuration snippets.
They are useful for packagers which need to override settings, but
we shouldn't advertise that as the main way of configuring those

5 years agotmpfiles.d: only copy /etc/pam.d if PAM is present
Ross Burton [Tue, 3 Mar 2015 11:37:52 +0000 (11:37 +0000)]
tmpfiles.d: only copy /etc/pam.d if PAM is present

If HAVE_PAM isn't set then don't attempt to copy /etc/pam.d from the
factory, as it doesn't get installed.

5 years agoREADME: mention ACLs more
Zbigniew Jędrzejewski-Szmek [Tue, 3 Mar 2015 14:00:39 +0000 (09:00 -0500)]
README: mention ACLs more

They are now useful for any fs used for journal storage.

5 years agoDo not run sysv-generator-test when sysv compat is disabled
Zbigniew Jędrzejewski-Szmek [Tue, 3 Mar 2015 15:36:47 +0000 (10:36 -0500)]
Do not run sysv-generator-test when sysv compat is disabled

5 years agobuild-sys: add fsckd.h to sources
Zbigniew Jędrzejewski-Szmek [Tue, 3 Mar 2015 02:39:55 +0000 (21:39 -0500)]
build-sys: add fsckd.h to sources

Otherwise distribution tarfiles are not generated properly.

5 years agobuild-sys: systemd.conf is generated, do not distribute
Zbigniew Jędrzejewski-Szmek [Tue, 3 Mar 2015 05:21:10 +0000 (00:21 -0500)]
build-sys: systemd.conf is generated, do not distribute

5 years agobus-proxyd: avoid logging oom twice
Zbigniew Jędrzejewski-Szmek [Tue, 3 Mar 2015 05:05:14 +0000 (00:05 -0500)]
bus-proxyd: avoid logging oom twice

5 years agofsck: remove unnecessary check
Zbigniew Jędrzejewski-Szmek [Tue, 3 Mar 2015 05:02:31 +0000 (00:02 -0500)]
fsck: remove unnecessary check

gcc was complaining that progress_rc might be used uninitalized.
But it was actually always set, because the condition was always
satisfied. Remove the condition.

5 years agotmpfiles: quietly ignore ACLs on unsupported filesystems
Hans-Peter Deifel [Mon, 2 Mar 2015 23:35:08 +0000 (00:35 +0100)]
tmpfiles: quietly ignore ACLs on unsupported filesystems

A warning is printed if ACLs cannot be retrieved for any reason other
than -ENOSYS. For -ENOSYS, debug log is printed.

5 years agopo: update Russian translation
Sergey Ptashnick [Sun, 1 Mar 2015 21:37:45 +0000 (00:37 +0300)]
po: update Russian translation

Add some forgotten strings for systemd, logind and machined.

5 years agoupdate TODO
Lennart Poettering [Mon, 2 Mar 2015 23:20:23 +0000 (00:20 +0100)]
update TODO

5 years agoimportd: automatically grow /var/lib/machines/ loopback filesystem during downloads
Lennart Poettering [Mon, 2 Mar 2015 23:13:12 +0000 (00:13 +0100)]
importd: automatically grow /var/lib/machines/ loopback filesystem during downloads

If /var/lib/machines is mounted as btrfs loopback file system in
/var/lib/machines.raw with this change we automatically grow the file
system as it fills up. After each 10M we write to it during imports, we
check the free disk space, and if the fill level grows beyond 66% we
increase the size of the file system to 3x the fill level (thus lowering
it to 33%).

5 years agoman: fix typo
Lennart Poettering [Mon, 2 Mar 2015 23:11:51 +0000 (00:11 +0100)]
man: fix typo

5 years agosd-daemon: replace VLA with alloca(), to make llvm happy
Lennart Poettering [Mon, 2 Mar 2015 19:55:38 +0000 (20:55 +0100)]
sd-daemon: replace VLA with alloca(), to make llvm happy

5 years agoupdate TODO
Lennart Poettering [Mon, 2 Mar 2015 19:25:32 +0000 (20:25 +0100)]
update TODO

5 years agoimport: add support for gpg2 for verifying imported images
Lennart Poettering [Mon, 2 Mar 2015 19:24:11 +0000 (20:24 +0100)]
import: add support for gpg2 for verifying imported images

gpg2 insists on created a trust db even if we tun off all trust db
support. Hence create a temporary home where the trust db is placed, and
remove it after use.

5 years agoman: document that machinectl set-limit creates a btrfs loopback too
Lennart Poettering [Mon, 2 Mar 2015 18:35:50 +0000 (19:35 +0100)]
man: document that machinectl set-limit creates a btrfs loopback too

5 years agomachined: also set up /var/lib/machines as btrfs, if "machinectl set-limit" is called
Lennart Poettering [Mon, 2 Mar 2015 18:21:04 +0000 (19:21 +0100)]
machined: also set up /var/lib/machines as btrfs, if "machinectl set-limit" is called

5 years agojournal: fix Inappropriate ioctl for device on ext4
Cristian Rodríguez [Mon, 2 Mar 2015 00:13:10 +0000 (21:13 -0300)]
journal: fix Inappropriate ioctl for device on ext4

Logs constantly show

systemd-journald[395]: Failed to set file attributes: Inappropriate ioctl for device

This is because ext4 does not support FS_NOCOW_FL.

[zj: fold into one conditional as suggested on the ML and
     fix (preexisting) r/errno confusion in error message.]

5 years agojournal-remote: fix saving of binary fields
Zbigniew Jędrzejewski-Szmek [Mon, 2 Mar 2015 15:34:51 +0000 (10:34 -0500)]
journal-remote: fix saving of binary fields

Binary fields were not processed properly, and resulting journal files
were non-conforming, resulting in an error ("Invalid field.") when reading.

5 years agobuild-sys: allow lto and FORTIFY_SOURCE with -O[sz]
Zbigniew Jędrzejewski-Szmek [Mon, 2 Mar 2015 03:46:43 +0000 (22:46 -0500)]
build-sys: allow lto and FORTIFY_SOURCE with -O[sz]

5 years agoupdate TODO
Lennart Poettering [Mon, 2 Mar 2015 11:15:11 +0000 (12:15 +0100)]
update TODO

5 years agomachinectl: update --help text to clarify that set-limit can also change pool size
Lennart Poettering [Mon, 2 Mar 2015 11:15:01 +0000 (12:15 +0100)]
machinectl: update --help text to clarify that set-limit can also change pool size

5 years agoimportd: take a lock while we set up /var/lib/machines/
Lennart Poettering [Sun, 1 Mar 2015 15:46:50 +0000 (16:46 +0100)]
importd: take a lock while we set up /var/lib/machines/

This way, we can safely set up the directories from two processes at the
same time, including machined and importd simultaneously.

5 years agoimportd: split out setup logic for /var/lib/machines into its own API file
Lennart Poettering [Sun, 1 Mar 2015 15:39:31 +0000 (16:39 +0100)]
importd: split out setup logic for /var/lib/machines into its own API file

5 years agocore: expose consumed CPU time per unit
Lennart Poettering [Sun, 1 Mar 2015 15:24:19 +0000 (16:24 +0100)]
core: expose consumed CPU time per unit

This adds support for showing the accumulated consumed CPU time per-unit
in the "systemctl status" output. The property is also readable via the

5 years agosd-bus: sync kdbus.h (ABI break)
Daniel Mack [Mon, 2 Mar 2015 10:36:35 +0000 (11:36 +0100)]
sd-bus: sync kdbus.h (ABI break)

After some reconsideration, we decided to move the binary protocol
back to 64-bit wide UIDs and GIDs. After all, it should be possible
to redefine [gu]id_t to uint64_t and things should continue to
work. As we want to avoid such data types in kdbus.h, let's move
back to 64-bit values and be safe.

In sd-bus, we have to do a translation between uint64_t and gid_t
now for supplementary gids.

Some inline comments have also been updated in kdbus upstream.

5 years agoboot: efi - ignore .conf snippets starting with "auto-"
Kay Sievers [Sat, 28 Feb 2015 11:21:25 +0000 (12:21 +0100)]
boot: efi - ignore .conf snippets starting with "auto-"

5 years agoboot: efi - remove a couple of Loader* variables
Kay Sievers [Sat, 28 Feb 2015 11:15:48 +0000 (12:15 +0100)]
boot: efi - remove a couple of Loader* variables

5 years agocore: downgrade unit type not supported message
Umut Tezduyar Lindskog [Fri, 20 Feb 2015 09:53:28 +0000 (10:53 +0100)]
core: downgrade unit type not supported message

Otherwise every daemon reload prints out warnings like:

systemd[1]: Unit type .busname is not supported on this system.
systemd[1]: Unit type .swap is not supported on this system.

5 years agoshared: AFS is also a network filesystem
Cristian Rodríguez [Fri, 20 Feb 2015 18:35:11 +0000 (15:35 -0300)]
shared: AFS is also a network filesystem

5 years agomachined: use x-machine-unix prefix for the container bus on dbus1
Benjamin Franzke [Thu, 19 Feb 2015 19:47:28 +0000 (20:47 +0100)]
machined: use x-machine-unix prefix for the container bus on dbus1

This fixes "machinectl login" on systems configured with --disable-kdbus.

The error was:
machinectl login foo
Failed to get machine PTY: Input/output error

5 years agocore: fix return value on OOM
Thomas Hindoe Paaboel Andersen [Sat, 28 Feb 2015 22:39:55 +0000 (23:39 +0100)]
core: fix return value on OOM

5 years agoupdate TODO
Lennart Poettering [Sat, 28 Feb 2015 16:38:23 +0000 (17:38 +0100)]
update TODO

5 years agocore: rework device state logic
Lennart Poettering [Fri, 27 Feb 2015 20:55:08 +0000 (21:55 +0100)]
core: rework device state logic

This change introduces a new state "tentative" for device units. Device
units are considered "plugged" when udev announced them, "dead" when
they are not available in the kernel, and "tentative" when they are
referenced in /proc/self/mountinfo or /proc/swaps but not (yet)
announced via udev.

This should fix a race when device nodes (like loop devices) are created
and immediately mounted. Previously, systemd might end up seeing the
mount unit before the device, and would thus pull down the mount because
its BindTo dependency on the device would not be fulfilled.

5 years agobootctl: avoid NULL pointer dereference
Zbigniew Jędrzejewski-Szmek [Fri, 27 Feb 2015 22:31:43 +0000 (17:31 -0500)]
bootctl: avoid NULL pointer dereference

5 years agobuild-sys: use -Wno-missing-field-initializers for efi stuff
Zbigniew Jędrzejewski-Szmek [Fri, 27 Feb 2015 22:26:48 +0000 (17:26 -0500)]
build-sys: use -Wno-missing-field-initializers for efi stuff

5 years agoman: correct description of systemd-user-sessions
Zbigniew Jędrzejewski-Szmek [Fri, 27 Feb 2015 22:26:42 +0000 (17:26 -0500)]
man: correct description of systemd-user-sessions

That part of functionality was removed in 7fb3ee51c1b377.

5 years agobuild-sys: make systemd-user-sessions conditional on PAM again
Zbigniew Jędrzejewski-Szmek [Fri, 27 Feb 2015 22:26:26 +0000 (17:26 -0500)]
build-sys: make systemd-user-sessions conditional on PAM again

This undoes a part of previous commit: s-u-s is dependent on HAVE_PAM
again, but not on HAVE_LOGIND.

5 years agouser-sessions: move into own subdir and build independently of logind
Ivan Shapovalov [Wed, 25 Feb 2015 18:47:26 +0000 (21:47 +0300)]
user-sessions: move into own subdir and build independently of logind

Suggested by Zbyszek on IRC.

[zj: /run/nologin is used with PAM. systemd-user-session is independent
     of logind.]

5 years agoshared/condition: fix gcc5 warning
Daniel Mack [Fri, 27 Feb 2015 19:05:26 +0000 (20:05 +0100)]
shared/condition: fix gcc5 warning

Fixes the warning below.

src/shared/condition.c: In function ‘condition_new’:
src/shared/condition.c:47:27: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
         assert(!parameter == (type == CONDITION_NULL));
src/shared/macro.h:42:44: note: in definition of macro ‘_unlikely_’
 #define _unlikely_(x) (__builtin_expect(!!(x),0))
src/shared/macro.h:226:22: note: in expansion of macro ‘assert_se’
 #define assert(expr) assert_se(expr)
src/shared/condition.c:47:9: note: in expansion of macro ‘assert’
         assert(!parameter == (type == CONDITION_NULL));

5 years agonetworkd: add support for Uplink Failure Detection
Alin Rauta [Tue, 17 Feb 2015 12:06:57 +0000 (04:06 -0800)]
networkd: add support for Uplink Failure Detection

Introduce BindCarrier= to indicate the set of links that determine if
the current link should be brought UP or DOWN.

[tomegun: add a bit to commit message]

5 years agoboot: efi - fix missing include
Marcel Holtmann [Fri, 27 Feb 2015 00:19:33 +0000 (01:19 +0100)]
boot: efi - fix missing include

src/boot/efi/splash.c:312:9: warning: implicit declaration of function ‘graphics_mode’ [-Wimplicit-function-declaration]
         err = graphics_mode(TRUE);

5 years agohwdb: add sdio identifiers for Broadcom WLAN cards
Arend van Spriel [Wed, 25 Feb 2015 10:02:39 +0000 (11:02 +0100)]
hwdb: add sdio identifiers for Broadcom WLAN cards

This patch adds the sdio identifiers known to be supported by
the brcmfmac open-source driver.

5 years agosysctl: add some hints how to override settings
Zbigniew Jędrzejewski-Szmek [Fri, 27 Feb 2015 00:05:51 +0000 (19:05 -0500)]
sysctl: add some hints how to override settings

Also a link to decent documentation for sysrq keys. It is surprising
hard to find.

5 years agosysctl: downgrade message about sysctl overrides to debug
Zbigniew Jędrzejewski-Szmek [Fri, 27 Feb 2015 00:00:11 +0000 (19:00 -0500)]
sysctl: downgrade message about sysctl overrides to debug

Printing it at info level was tedious. We don't do that for any other

5 years agosd-rtnl: types - fix check for unsupported type
Tom Gundersen [Wed, 25 Feb 2015 20:29:37 +0000 (15:29 -0500)]
sd-rtnl: types - fix check for unsupported type

Spotted by Thomas H.P. Andersen <>

5 years agosd-rtnl: types - don't assert_return in private API
Tom Gundersen [Wed, 25 Feb 2015 20:28:48 +0000 (15:28 -0500)]
sd-rtnl: types - don't assert_return in private API

5 years agoboot: efi - remove custom splash support
Kay Sievers [Thu, 26 Feb 2015 18:51:08 +0000 (19:51 +0100)]
boot: efi - remove custom splash support

5 years agoboot: efi - split graphics and splash handling
Kay Sievers [Thu, 26 Feb 2015 18:45:08 +0000 (19:45 +0100)]
boot: efi - split graphics and splash handling

5 years agoboot: efi - support embedded splash image
Kay Sievers [Thu, 26 Feb 2015 17:33:37 +0000 (18:33 +0100)]
boot: efi - support embedded splash image

5 years agocore: emit changes for NFailedUnits property
Lucas De Marchi [Wed, 18 Feb 2015 16:22:37 +0000 (14:22 -0200)]
core: emit changes for NFailedUnits property

By notifying the clients when this property is changed it's possible to
allow "system health monitor" tools to get transitions like
running<->degraded. This is an alternative to send changes on the
SystemState property since the latter is more difficult to derive.

5 years agoUpdate TODO
Zbigniew Jędrzejewski-Szmek [Thu, 26 Feb 2015 14:27:12 +0000 (09:27 -0500)]
Update TODO

5 years agounit: When stopping due to BindsTo=, log which unit caused it
Colin Walters [Tue, 17 Feb 2015 18:47:34 +0000 (13:47 -0500)]
unit: When stopping due to BindsTo=, log which unit caused it

I'm trying to track down a relatively recent change in systemd
which broke OSTree; see

Systemd started to stop sysroot.mount, and this patch should help
me debug why at least.

While we're here, "break" on the first unit we find that will
deactivate, as there's no point in further iteration.

5 years agotimedated: when performing "SetTime" compensate for program lag
Shawn Landden [Mon, 16 Feb 2015 19:47:08 +0000 (11:47 -0800)]
timedated: when performing "SetTime" compensate for program lag

(David: fix up compile-failure and simplify code a bit)

5 years agobuild-sys: efi - move cflag from x86_64 to common section
Kay Sievers [Thu, 26 Feb 2015 00:55:32 +0000 (01:55 +0100)]
build-sys: efi - move cflag from x86_64 to common section

5 years agoboot: efi - print generic error message if we fail to execute an image
Kay Sievers [Thu, 26 Feb 2015 00:15:18 +0000 (01:15 +0100)]
boot: efi - print generic error message if we fail to execute an image

5 years agoboot: efi - remove default boot splash handling
Kay Sievers [Wed, 25 Feb 2015 14:56:54 +0000 (15:56 +0100)]
boot: efi - remove default boot splash handling

5 years agoupdate TODO
Lennart Poettering [Wed, 25 Feb 2015 23:43:08 +0000 (00:43 +0100)]
update TODO

5 years agomachined: if /var/lib/machines is backed by a loop file, resize it on "machinectl...
Lennart Poettering [Wed, 25 Feb 2015 23:40:43 +0000 (00:40 +0100)]
machined: if /var/lib/machines is backed by a loop file, resize it on "machinectl set-limit"

When the pool size limit is altered with "machinectl set-limit", then
not only set the subvolume quota of the /var/lib/machine subvolume, but
also resize the backing loop file and the btrfs file system on it

5 years agobootctl: check that partition uuid is valid
Thomas Hindoe Paaboel Andersen [Wed, 25 Feb 2015 22:10:35 +0000 (23:10 +0100)]
bootctl: check that partition uuid is valid

It probably is but check anyway to make coverity happy.


5 years agounit: use weaker dependencies between mount and device units in --user mode
Lennart Poettering [Wed, 25 Feb 2015 21:05:14 +0000 (22:05 +0100)]
unit: use weaker dependencies between mount and device units in --user mode

When running in user mode unmounting of mount units when a device
vanishes is unlikely to work, and even if it would work is already done
by PID 1 anyway. HEnce, when creating implicit dependencies between
mount units and their backing devices, created a Wants= type dependency
in --user mode, but leave a BindsTo= dependency in --system mode.

5 years agonspawn: make kill signal to use for PID 1 configurable
Lennart Poettering [Wed, 25 Feb 2015 21:04:48 +0000 (22:04 +0100)]
nspawn: make kill signal to use for PID 1 configurable

5 years agomachined,machinectl: add calls for changing container/VM quotas
Lennart Poettering [Tue, 24 Feb 2015 22:50:37 +0000 (23:50 +0100)]
machined,machinectl: add calls for changing container/VM quotas

5 years agojournal: make skipping of exhausted journal files effective again
Michal Schmidt [Tue, 24 Feb 2015 18:45:17 +0000 (19:45 +0100)]
journal: make skipping of exhausted journal files effective again

Commit 668c965af "journal: skipping of exhausted journal files is bad if
direction changed" fixed a correctness issue, but it also significantly
limited the cases where the optimization that skips exhausted journal
files could apply.
As a result, some journalctl queries are much slower in v219 than in v218.
(e.g. queries where a "--since" cutoff should have quickly eliminated
older journal files from consideration, but didn't.)

If already in the initial iteration find_location_with_matches() finds
no entry, the journal file's location is not updated. This is fine,
except that:
 - We must update at least f->last_direction. The optimization relies on
   it. Let's separate that from journal_file_save_location() and update
   it immediately after the direction checks.
 - The optimization was conditional on "f->current_offset > 0", but it
   would always be 0 in this scenario. This check is unnecessary for the

5 years agohwdb: Update database of Bluetooth company identifiers
Marcel Holtmann [Wed, 25 Feb 2015 06:27:49 +0000 (07:27 +0100)]
hwdb: Update database of Bluetooth company identifiers

5 years agopo: update Polish translation
Piotr Drąg [Thu, 19 Feb 2015 15:18:10 +0000 (16:18 +0100)]
po: update Polish translation

5 years agopo: update Italian translation
Daniele Medri [Thu, 19 Feb 2015 16:03:51 +0000 (17:03 +0100)]
po: update Italian translation

5 years agopo: simplify one sentence
Zbigniew Jędrzejewski-Szmek [Wed, 25 Feb 2015 04:55:35 +0000 (23:55 -0500)]
po: simplify one sentence

5 years agopo: fix typo in French translation
Zbigniew Jędrzejewski-Szmek [Wed, 25 Feb 2015 04:53:59 +0000 (23:53 -0500)]
po: fix typo in French translation

Was already fixed elsewhere in 6be9b3606872037d1d48a81fbe045af8b64cea85.

5 years agosystemd: add getrandom syscall numbers for MIPS
Aaro Koskinen [Mon, 23 Feb 2015 14:01:31 +0000 (16:01 +0200)]
systemd: add getrandom syscall numbers for MIPS

Add getrandom syscall numbers for MIPS. Based on Linux 3.17 kernel
(commit 42944521af97a3b25516f15f3149aec3779656dc, "MIPS: Wire up new
syscalls getrandom and memfd_create").

5 years agobootchart: svg: fix checking of list end
Aaro Koskinen [Tue, 24 Feb 2015 16:32:31 +0000 (18:32 +0200)]
bootchart: svg: fix checking of list end

If we have less samples than expected, systemd-bootchart will crash.

5 years agobuild-sys: fail if gnuefi files are not found
Zbigniew Jędrzejewski-Szmek [Tue, 24 Feb 2015 22:35:49 +0000 (17:35 -0500)]
build-sys: fail if gnuefi files are not found

The build would fail later anyway, so it is better to bail
out early.

Also check for the second bios file only if the first one was not
found. I'm not sure which one is preferred. If the other one, the
order should be flipped.

5 years agobootctl: fix mem leaks
Thomas Hindoe Paaboel Andersen [Tue, 24 Feb 2015 22:57:47 +0000 (23:57 +0100)]
bootctl: fix mem leaks


5 years agomachined: fix check if host directory could be opened
Thomas Hindoe Paaboel Andersen [Tue, 24 Feb 2015 19:47:53 +0000 (20:47 +0100)]
machined: fix check if host directory could be opened


5 years agoacl-util: avoid freeing uninitialized pointer
Thomas Hindoe Paaboel Andersen [Tue, 24 Feb 2015 19:40:07 +0000 (20:40 +0100)]
acl-util: avoid freeing uninitialized pointer


5 years agounits: add missing unit file
Lennart Poettering [Tue, 24 Feb 2015 17:46:33 +0000 (18:46 +0100)]
units: add missing unit file

5 years agoimportd: enable btrfs quota in /var/lib/machines, if necessary
Lennart Poettering [Tue, 24 Feb 2015 17:43:37 +0000 (18:43 +0100)]
importd: enable btrfs quota in /var/lib/machines, if necessary

5 years agomachined/machinectl: when "machinectl image-status" is used without arguments show...
Lennart Poettering [Tue, 24 Feb 2015 17:23:40 +0000 (18:23 +0100)]
machined/machinectl: when "machinectl image-status" is used without arguments show statistics about pool

5 years agoshared: fix wrong assertion in barrier_set_role()
Cristian Rodríguez [Fri, 20 Feb 2015 18:14:56 +0000 (15:14 -0300)]
shared: fix wrong assertion in barrier_set_role()

 assert(b->pipe[0] >= 0 && b->pipe[0] >= 0);

Test the same condition twice, pretty sure we mean

 assert(b->pipe[0] >= 0 && b->pipe[1] >= 0);

5 years agobuild: make sure to test for -Wflag instead of -Wno-flag
David Herrmann [Tue, 24 Feb 2015 16:49:48 +0000 (17:49 +0100)]
build: make sure to test for -Wflag instead of -Wno-flag

gcc does not support testing for negated warnings. See here for details:

This patch changes CC_CHECK_FLAG_APPEND to always test for the non-negated

5 years agomachined: actually open up methods to unprivileged clients on dbus1
Lennart Poettering [Tue, 24 Feb 2015 16:26:40 +0000 (17:26 +0100)]
machined: actually open up methods to unprivileged clients on dbus1

Many of machined's operations are now opened up to unprivileged clients
via PolicyKit. Open up the dbus policy so that we can actually make
these calls.

kdbus doesn't reuqire this, hence this wasn't noticed before.

5 years agoimportd: create a loopback btrfs file system for /var/lib/machines, if necessary
Lennart Poettering [Tue, 24 Feb 2015 16:23:53 +0000 (17:23 +0100)]
importd: create a loopback btrfs file system for /var/lib/machines, if necessary

When manipulating container and VM images we need efficient and atomic
directory snapshots and file copies, as well as disk quota. btrfs
provides this, legacy file systems do not. Hence, implicitly create a
loopback file system in /var/lib/machines.raw and mount it to
/var/lib/machines, if that directory is not on btrfs anyway.

This is done implicitly and transparently the first time the user
invokes "machinectl import-xyz".

This allows us to take benefit of btrfs features for container
management without actually having the rest of the system use btrfs.

The loopback is sized 500M initially. Patches to grow it dynamically are
to follow.

5 years agoid128: add new sd_id128_is_null() call
Lennart Poettering [Mon, 23 Feb 2015 23:10:35 +0000 (00:10 +0100)]
id128: add new sd_id128_is_null() call

5 years agoimport: print nice warning if we need btrfs but /var/lib/machines is not btrfs
Lennart Poettering [Thu, 19 Feb 2015 15:19:15 +0000 (16:19 +0100)]
import: print nice warning if we need btrfs but /var/lib/machines is not btrfs

5 years agotest-hashmap: fix gcc5 warning
Daniel Mack [Tue, 24 Feb 2015 15:24:14 +0000 (16:24 +0100)]
test-hashmap: fix gcc5 warning

gcc5 spits out a warning about test-hashmap.c:

  CC       src/test/test-hashmap.o
src/test/test-hashmap.c: In function ‘test_string_compare_func’:
src/test/test-hashmap.c:76:79: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]

5 years agoshared/unit-name: fix gcc5 warning
Daniel Mack [Tue, 24 Feb 2015 15:18:43 +0000 (16:18 +0100)]
shared/unit-name: fix gcc5 warning

Fix the following gcc5 warning:

  CC       src/shared/libsystemd_shared_la-unit-name.lo
src/shared/unit-name.c: In function 'unit_name_is_valid':
src/shared/unit-name.c:102:34: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
                 if (!template_ok == TEMPLATE_VALID && at+1 == e)

5 years agosystemctl: bump NOFILE only for systemctl_main
Zbigniew Jędrzejewski-Szmek [Tue, 24 Feb 2015 15:10:04 +0000 (10:10 -0500)]
systemctl: bump NOFILE only for systemctl_main

It is not necessary when running as telinit, etc.

5 years agobuild: add -Wno-format-signedness
David Herrmann [Tue, 24 Feb 2015 14:59:06 +0000 (15:59 +0100)]
build: add -Wno-format-signedness

gcc5 introduced this option (gcc4 silently ignores it, which is fine).
Given that gcc5 thinks 'unsigned char'/'unsigned short' is promoted to
'int' for var-args, stuff like this spits out warnings:
    uint8_t x;
    printf("%" PRIu8", x);

gcc5 promots 'x' to 'int', instead of 'unsigned int' and thus gets a
signedness-warnings as it expects an 'unsigned int'.

glibc states otherwise: unsigneds are always promoted to 'unsigned int'.
Until gcc and glibc figure this out, lets just ignore that warning (which
is totally useless in its current form).

5 years agobootchart: fix default init path
Martin Pitt [Tue, 24 Feb 2015 13:30:10 +0000 (14:30 +0100)]
bootchart: fix default init path

Commit 6e1bf7ab99 used the wrong directory; we need rootlibexecdir, not
rootlibdir, as the latter is something like /lib/x86_64-linux-gnu/ on
multi-arch systems.

5 years agosd-bus: test-bus-kernel-benchmark: don't rely on fixed unique names
Daniel Mack [Tue, 24 Feb 2015 13:01:36 +0000 (14:01 +0100)]
sd-bus: test-bus-kernel-benchmark: don't rely on fixed unique names

The kernel part of kdbus does not allow userspace to make any assumption on
which unique address the first user on the bus will get.

Instead, use sd_bus_get_unique_name() to get the server's address.

5 years agotest-time: test "infinity" parsing in nanoseconds
Daniel Mack [Tue, 24 Feb 2015 12:27:10 +0000 (13:27 +0100)]
test-time: test "infinity" parsing in nanoseconds

5 years agoshared/time-util: fix gcc5 warning
Daniel Mack [Tue, 24 Feb 2015 12:26:09 +0000 (13:26 +0100)]
shared/time-util: fix gcc5 warning

  CC       src/shared/libsystemd_shared_la-time-util.lo
src/shared/time-util.c: In function 'parse_nsec':
src/shared/time-util.c:789:25: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
                 if (!*s != 0)

5 years agosd-bus: sync kdbus.h
Daniel Mack [Tue, 24 Feb 2015 11:10:13 +0000 (12:10 +0100)]
sd-bus: sync kdbus.h

Follow two small changes in the kdbus API:

 * Flags are now returned in cmd->return_flags by KDBUS_CMD_NAME_ACQUIRE

 * struct kdbus_item_list has been dropped. The information stored in
   this struct was redundant since awhile already, as all commands
   report their returned slice size anyway.

5 years agosystemctl: support auditd.service better
Zbigniew Jędrzejewski-Szmek [Sat, 7 Feb 2015 16:35:37 +0000 (11:35 -0500)]
systemctl: support auditd.service better

We would print the filename header before trying to open the file. But since
the header was printed to stdout, and the error to stderr, the error would appear
on the terminal before the header. It is cleaner to open the file first, then
and only then print the header.

Also exit on first error. We shouldn't report success if we were unable to open
a file.

5 years agosystemctl: check validity of PID we received
Zbigniew Jędrzejewski-Szmek [Sat, 7 Feb 2015 16:16:04 +0000 (11:16 -0500)]
systemctl: check validity of PID we received

5 years agoresolved: use == for comparing unsigned against zero
Zbigniew Jędrzejewski-Szmek [Fri, 6 Feb 2015 16:30:19 +0000 (11:30 -0500)]
resolved: use == for comparing unsigned against zero