]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
6 years ago50-udev-default.rules.in: set correct group for mediaX/cecX (#5921)
Lennart Poettering [Tue, 9 May 2017 19:10:55 +0000 (21:10 +0200)] 
50-udev-default.rules.in: set correct group for mediaX/cecX (#5921)

The /dev/mediaX and /dev/cecX devices belong to the video group.
Add two default rules for that.

The /dev/cecX devices were introduced in kernel 4.8 in staging and moved
out of staging in 4.10. These devices support the HDMI CEC bus.

The /dev/mediaX devices are much older, but because they are not used very
frequently nobody got around to adding this rule to systemd. They let the
user control complex media pipelines.

6 years agosd-boot: added shim signature/MOK validation (#5702)
Max Resch [Tue, 9 May 2017 18:57:40 +0000 (20:57 +0200)] 
sd-boot: added shim signature/MOK validation (#5702)

Adds support for booting in a SecureBoot environment with shim as a
preloader. Install an appropriate UEFI security policy to check PE
signature of a chained kernel or UEFI application (using LoadImage())
against the MOK database maintained by shim, using shim's installed
BootServices.

Implementation details for installing the security policy are based on
code from the LinuxFoundation's SecureBoot PreLoader, part of efitools
licensed under LGPL 2.1

Current signed (by Microsoft) versions of shim (Versions 0.8 & 0.9)
so not install a security policy by themselves, future Versions of
shim might (a compile time switch exists in rectent git versions),
so in the future this PR might become unnecessary.

6 years agoMerge pull request #5619 from fbuihuu/fully-restore-unit-cgroup-state
Lennart Poettering [Tue, 9 May 2017 18:49:17 +0000 (20:49 +0200)] 
Merge pull request #5619 from fbuihuu/fully-restore-unit-cgroup-state

core: when deserializing a unit, fully restore its cgroup state

6 years agoMerge pull request #5420 from OpenDZ/tixxdz/namespace-fixes-v2
Lennart Poettering [Tue, 9 May 2017 18:42:32 +0000 (20:42 +0200)] 
Merge pull request #5420 from OpenDZ/tixxdz/namespace-fixes-v2

Namespace: RootImage= RootDirectory= and MountAPIVFS fixes

6 years agonetwork: add support for vlan confs(MVRP, reorder header, loose binding) (#5834)
Susant Sahani [Tue, 9 May 2017 18:25:11 +0000 (18:25 +0000)] 
network: add support for vlan confs(MVRP, reorder header, loose binding) (#5834)

6 years agoman: Clarify Restart= exception for systemctl stop (#5891)
Ted W [Tue, 9 May 2017 18:22:04 +0000 (13:22 -0500)] 
man: Clarify Restart= exception for systemctl stop (#5891)

6 years agoMerge pull request #5906 from keszybz/man-links
Lennart Poettering [Tue, 9 May 2017 18:12:52 +0000 (20:12 +0200)] 
Merge pull request #5906 from keszybz/man-links

man page link fixes

6 years agonetworkd: add IPv6ProxyNDP (#5913)
Hristo Venev [Tue, 9 May 2017 18:04:55 +0000 (19:04 +0100)] 
networkd: add IPv6ProxyNDP (#5913)

This allows enabling proxy_ndp even if no addresses are configured in
networkd, as well as disabling proxy_ndp from a drop-in.

6 years agonetworkd: add support to configure route protocol. (#5890)
Susant Sahani [Tue, 9 May 2017 18:01:25 +0000 (18:01 +0000)] 
networkd: add support to configure route protocol. (#5890)

Closes: #5889
6 years agoMerge pull request #5919 from glaubitz/suse
Lennart Poettering [Tue, 9 May 2017 17:32:25 +0000 (19:32 +0200)] 
Merge pull request #5919 from glaubitz/suse

Fix meson build on openSUSE Tumbleweed

6 years agobuild: Add missing SECCOMP_CFLAGS to test-seccomp and test-execute targets (#5924)
John Paul Adrian Glaubitz [Tue, 9 May 2017 17:31:38 +0000 (19:31 +0200)] 
build: Add missing SECCOMP_CFLAGS to test-seccomp and test-execute targets (#5924)

6 years agomeson: Add missing dependency on libkmod for libudev_core 5919/head
John Paul Adrian Glaubitz [Tue, 9 May 2017 11:00:26 +0000 (13:00 +0200)] 
meson: Add missing dependency on libkmod for libudev_core

6 years agomeson: Add missing dependency on libseccomp for libcore
John Paul Adrian Glaubitz [Tue, 9 May 2017 10:58:32 +0000 (12:58 +0200)] 
meson: Add missing dependency on libseccomp for libcore

6 years agoexecute: Properly log errors considering socket fds (#5910)
Aggelos Avgerinos [Mon, 8 May 2017 23:09:22 +0000 (02:09 +0300)] 
execute: Properly log errors considering socket fds (#5910)

Till now if the params->n_fds was 0, systemd was logging that there were
more than one sockets.

Thanks @gregoryp and @VFXcode who did the most work debugging this.

6 years agoman: improve readability of time shorthands and their normalized forms. (#5912)
Mark Stosberg [Mon, 8 May 2017 23:05:34 +0000 (19:05 -0400)] 
man: improve readability of time shorthands and their normalized forms. (#5912)

6 years agohwdb: add axis range for Panasonic Toughbook CF-19, CF-30 and CF31 (#5908)
Pascal S. de Kloe [Mon, 8 May 2017 01:46:31 +0000 (03:46 +0200)] 
hwdb: add axis range for Panasonic Toughbook CF-19, CF-30 and CF31 (#5908)

6 years agoMerge pull request #5907 from keszybz/mark-python-scripts-+x
Michael Biebl [Mon, 8 May 2017 00:30:27 +0000 (02:30 +0200)] 
Merge pull request #5907 from keszybz/mark-python-scripts-+x

Mark python scripts executable

6 years agoAdd short-iso-precise for journalctl output (#5884)
Ian Wienand [Mon, 8 May 2017 00:23:49 +0000 (10:23 +1000)] 
Add short-iso-precise for journalctl output (#5884)

This adds a short-iso-precise option for journalctl output.  It is similar to
short-iso, but includes microseconds.

6 years agoMark python scripts executable 5907/head
Zbigniew Jędrzejewski-Szmek [Sun, 7 May 2017 15:35:32 +0000 (11:35 -0400)] 
Mark python scripts executable

Since all our python scripts have a proper python3 shebang, there is no benefit
to letting meson autodetect them. On linux, meson will just uses exec(), so the
shebang is used anyway. The only difference should be in how meson reports the
script and that the detection won't fail for (most likely misconfigured)
non-UTF8 locales.

Closes #5855.

6 years agoman: fix two references to our own binaries 5906/head
Zbigniew Jędrzejewski-Szmek [Sun, 7 May 2017 15:29:55 +0000 (11:29 -0400)] 
man: fix two references to our own binaries

6 years agoman: fix links to external man pages
Zbigniew Jędrzejewski-Szmek [Sun, 7 May 2017 15:29:40 +0000 (11:29 -0400)] 
man: fix links to external man pages

linkchecker ftw!

6 years agoMerge pull request #5901 from keszybz/mkosi-meson
Lennart Poettering [Sun, 7 May 2017 11:13:13 +0000 (07:13 -0400)] 
Merge pull request #5901 from keszybz/mkosi-meson

Convert mkosi instructions to meson

6 years agotree-wide: use SET_FLAG in more places (#5892)
Zbigniew Jędrzejewski-Szmek [Sun, 7 May 2017 11:03:28 +0000 (07:03 -0400)] 
tree-wide: use SET_FLAG in more places (#5892)

6 years agomkosi.build: set encoding 5901/head
Zbigniew Jędrzejewski-Szmek [Sat, 6 May 2017 01:19:04 +0000 (21:19 -0400)] 
mkosi.build: set encoding

Otherwise python3 (via meson) complains.

6 years agomkosi.fedora: we need lz4 for lz4cat
Zbigniew Jędrzejewski-Szmek [Sat, 6 May 2017 01:18:54 +0000 (21:18 -0400)] 
mkosi.fedora: we need lz4 for lz4cat

6 years agomkosi: switch build to meson
Zbigniew Jędrzejewski-Szmek [Sat, 6 May 2017 01:18:44 +0000 (21:18 -0400)] 
mkosi: switch build to meson

For Fedora, the version is bumped to 26. In F25, ninja is still called ninja-build
(while the package with the rename is going through QA).

6 years agosocket-util: add parse_ip_prefix (#5867)
Susant Sahani [Sat, 6 May 2017 00:04:07 +0000 (00:04 +0000)] 
socket-util: add parse_ip_prefix (#5867)

networkd: replace parse prefix with generic in_addr_prefix_from_string

6 years agoman: document that OnCalendar may be specified more than once. (#5885)
Mark Stosberg [Fri, 5 May 2017 23:00:45 +0000 (19:00 -0400)] 
man: document that OnCalendar may be specified more than once. (#5885)

It's helpful to know you can provide this more than once, rather than try
to make a more complicated / less clear single expression.

6 years agoman: fix URL for kernel-parameters doc
Zbigniew Jędrzejewski-Szmek [Fri, 5 May 2017 01:29:59 +0000 (21:29 -0400)] 
man: fix URL for kernel-parameters doc

With the move to sphinx-generated docs, the old URL seems to have stopped
working and returns 404.

6 years agocore: when deserializing a unit, fully restore its cgroup state 5619/head
Franck Bui [Mon, 27 Mar 2017 16:00:54 +0000 (18:00 +0200)] 
core: when deserializing a unit, fully restore its cgroup state

The state of a unit was not fully restored, especially the
"cgroup_realized_mask/cgroup_enabled_mask" fields were missing.

This could be seen with the following sequence:

 $ systemctl show -p TasksCurrent sshd
 TasksCurrent=1

 $ systemctl daemon-reload

 $ systemctl show -p TasksCurrent sshd
 TasksCurrent=18446744073709551615

This was also visible with the "status" command: "Tasks: " row wasn't
showed in status of a service after a "daemon-reload" command.

6 years agocore: introduce cg_mask_from_string()/cg_mask_to_string()
Franck Bui [Tue, 2 May 2017 07:59:17 +0000 (09:59 +0200)] 
core: introduce cg_mask_from_string()/cg_mask_to_string()

6 years agoseccomp: add clone syscall definitions for mips (#5880)
James Cowgill [Wed, 3 May 2017 16:35:45 +0000 (17:35 +0100)] 
seccomp: add clone syscall definitions for mips (#5880)

Also updates the documentation and adds a mention of ppc64 support
which was enabled by #5325.

Tested on Debian mipsel and mips64el. The other 4 mips architectures
should have an identical user <-> kernel ABI to one of the 2 tested
systems.

6 years agoMerge pull request #5842 from keszybz/meson-status-and-conditionals
Michael Biebl [Wed, 3 May 2017 14:45:31 +0000 (16:45 +0200)] 
Merge pull request #5842 from keszybz/meson-status-and-conditionals

Meson status and conditional simplification

6 years agomeson: use booleans for conf.set and drop unecessary conditionals 5842/head
Zbigniew Jędrzejewski-Szmek [Fri, 28 Apr 2017 01:13:08 +0000 (21:13 -0400)] 
meson: use booleans for conf.set and drop unecessary conditionals

Using conf.set() with a boolean argument does the right thing:
either #ifdef or #undef. This means that conf.set can be used unconditionally.

Previously I used '1' as the placeholder value, and that needs to be changed to
'true' for consistency (under meson 1 cannot be used in boolean context). All
checks need to be adjusted.

6 years agomeson: add status report
Zbigniew Jędrzejewski-Szmek [Fri, 28 Apr 2017 00:54:52 +0000 (20:54 -0400)] 
meson: add status report

This is similar to what ./configure prints. Instead of a long list of yes/no lines,
I added two lines at the end with "enabled features" and "disabled features".
This is what the mplayer/mencoder ./configure script did back in the day.
The advantage is that it's easy to look at the list of disabled features
and check for any unexpected entries.

6 years agomeson: add forgotten debug options
Zbigniew Jędrzejewski-Szmek [Fri, 28 Apr 2017 00:51:34 +0000 (20:51 -0400)] 
meson: add forgotten debug options

v2:
-rename -Dextra-debug to -Ddebug to match ./configure --debug

6 years agosd-ndisc: Reset counter for sent Router Solicitations (#5874)
Patrik Flykt [Tue, 2 May 2017 19:36:24 +0000 (22:36 +0300)] 
sd-ndisc: Reset counter for sent Router Solicitations (#5874)

Reset also the counter for number of Router Solicitations sent when
the associated file descriptor is closed and the event source
unreferenced. With this change the router discovery can now be
stopped and restarted arbitrary many times.

6 years agonetwork: reject bridge port priorities above kernel's max value. (#5877)
Dimitri John Ledkov [Tue, 2 May 2017 19:32:42 +0000 (20:32 +0100)] 
network: reject bridge port priorities above kernel's max value. (#5877)

Bridge port priority in the kernel can only be between 0 and 63. Therefore
reject values above maximum.

Fixes: #5729
6 years agobuild-sys: re-add systemd.directives and systemd.index to MANPAGES (#5876)
Michael Biebl [Tue, 2 May 2017 19:30:14 +0000 (21:30 +0200)] 
build-sys: re-add systemd.directives and systemd.index to MANPAGES (#5876)

Those were dropped accidentally in commit
19fe49f62cc916f1237ea92a04fc80ee75285dde, most likely by running
make update-man-list. This is a known limitation of the autotools build:
the man pages must be built before update-man-list is called.

6 years agohwdb: update axis ranges for the Asus UX301LAA touchpad (#5872)
Peter Hutterer [Tue, 2 May 2017 06:53:08 +0000 (16:53 +1000)] 
hwdb: update axis ranges for the Asus UX301LAA touchpad (#5872)

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

6 years agoMerge pull request #5871 from keszybz/meson-html-2
Michael Biebl [Mon, 1 May 2017 17:18:02 +0000 (19:18 +0200)] 
Merge pull request #5871 from keszybz/meson-html-2

meson: make sure html symlinks are also created in build directory

6 years agomeson: make sure html symlinks are also created in build directory 5871/head
Zbigniew Jędrzejewski-Szmek [Mon, 1 May 2017 04:17:20 +0000 (00:17 -0400)] 
meson: make sure html symlinks are also created in build directory

The symlinks should be created in the build directory in two cases: when
configuration specifies -Dhtml=true, or when ninja html target is built.
Normally install : {true,false} is used to decide if a target should be built,
but in this case, we cannot use install : true, because, as described in
488477d101, that results in the target file being copied into the
installation directory instead of a symlink. So we need a work-around. To
achieve the first end, the commands to create the symlinks are added as
dependencies of the command to create the html page. To the second end, they
are added as dependencies of the html target.

Follow-up for 488477d101 and 064d9ef0d7.

6 years agomeson: create index.html symlink pointing at systemd.index.html (#5870)
Michael Biebl [Mon, 1 May 2017 15:02:17 +0000 (17:02 +0200)] 
meson: create index.html symlink pointing at systemd.index.html (#5870)

Re-use bits from 488477d1011559078dbebfea18e22dcc1c9ca7ea to create the
index.html symlink.

Fixes #5862

6 years agoMerge pull request #5869 from keszybz/meson-html
Michael Biebl [Mon, 1 May 2017 13:21:51 +0000 (15:21 +0200)] 
Merge pull request #5869 from keszybz/meson-html

meson: fix creation of html symlinks

6 years agomeson: fix creation of html symlinks 5869/head
Zbigniew Jędrzejewski-Szmek [Mon, 1 May 2017 04:17:20 +0000 (00:17 -0400)] 
meson: fix creation of html symlinks

This adds two somewhat independent rules:
1. to create symlinks to html pages in the build directory
2. to create symlinks in the installation directory

The second part needs to be coded separately, because telling meson to install
the symlinks created in step 1. results in a copy of the target, instead of a
symlink. So step 2. needs to ignore the result of 1. and create the symlink again.

Fixes #5863.

6 years agomore portable python shebangs (#5816)
Jörg Thalheim [Mon, 1 May 2017 00:26:56 +0000 (02:26 +0200)] 
more portable python shebangs (#5816)

This is useful on systems like NixOS, where python3 is not in
/usr/bin/python3 as well as for people using alternative ways to
install python such as virtualenv/pyenv.

6 years agobuild-sys: don't generate index.html with --disable-manpages (#5865)
Michael Biebl [Sun, 30 Apr 2017 16:21:59 +0000 (18:21 +0200)] 
build-sys: don't generate index.html with --disable-manpages (#5865)

Don't generate man/index.html and the dependent man/systemd.index.html
if man pages have been disabled.

Closes #5854

6 years agonetworkd: Add check to ensure link is down before attempting to enslave (#5853)
Roelf Wichertjes [Sun, 30 Apr 2017 11:12:32 +0000 (13:12 +0200)] 
networkd: Add check to ensure link is down before attempting to enslave (#5853)

netdev to bond.

There are situations where a link can be in an "UP" state when
 systemd-networkd attempts to add the link to a bond device.
This is a problem because the bonding driver will refuse to
 enslave a link if it is in the "UP" state.
This check ensures systemd-networkd sets the link to "DOWN"
 before attempting to add the link to the bond.

Fixes #5838.

6 years agoMerge pull request #5808 from ssahani/util
Lennart Poettering [Sun, 30 Apr 2017 09:36:12 +0000 (11:36 +0200)] 
Merge pull request #5808 from ssahani/util

conf parser: add config_parse_ip_port

6 years agosd-boot: remove compiler warning (#5860)
Max Resch [Sun, 30 Apr 2017 02:11:34 +0000 (04:11 +0200)] 
sd-boot: remove compiler warning (#5860)

This small fixup removes a compiler warning when passing tcg (a const
arg type) to the uefi call wapper, which does not define it as const.

All other source files in sd-boot do this cast except measure.c, so
let's fix that.

6 years agoMerge pull request #5809 from keszybz/glob-safe
Martin Pitt [Sat, 29 Apr 2017 19:19:24 +0000 (21:19 +0200)] 
Merge pull request #5809 from keszybz/glob-safe

Implement `safe_glob` that ignores "." and ".."

7 years agoconf parser: add config_parse_ip_port 5808/head
Susant Sahani [Sat, 29 Apr 2017 18:04:17 +0000 (23:34 +0530)] 
conf parser: add config_parse_ip_port

7 years agojournald: fix assertion failure on journal_file_link_data. (#5843)
Yusuke Nojima [Sat, 29 Apr 2017 17:37:53 +0000 (02:37 +0900)] 
journald: fix assertion failure on journal_file_link_data. (#5843)

When some error occurs during the initialization of JournalFile,
the JournalFile can be left without hash tables created.  When later
trying to append an entry to that file, the assertion in
journal_file_link_data() fails, and journald crashes.

This patch fix this issue by checking *_hash_table_size in
journal_file_verify_header().

7 years agonetworkd: replace geneve/vxlan port parsing with generic config_parse_ip_port
Susant Sahani [Thu, 27 Apr 2017 05:14:22 +0000 (10:44 +0530)] 
networkd: replace geneve/vxlan port parsing with generic config_parse_ip_port

7 years agoconfig parser: Introduce config_parse_ip_port
Susant Sahani [Thu, 27 Apr 2017 05:11:46 +0000 (10:41 +0530)] 
config parser: Introduce config_parse_ip_port

7 years agoMerge pull request #5164 from Werkov/ordering-for-_netdev-devices
Lennart Poettering [Sat, 29 Apr 2017 16:40:19 +0000 (18:40 +0200)] 
Merge pull request #5164 from Werkov/ordering-for-_netdev-devices

Ordering for _netdev devices

7 years agoMerge pull request #5783 from keszybz/compiler-warning-fixes
Lennart Poettering [Sat, 29 Apr 2017 16:35:56 +0000 (18:35 +0200)] 
Merge pull request #5783 from keszybz/compiler-warning-fixes

shared/extract-word: replace enum with int to avoid undefined behaviour

7 years agoMerge pull request #5529 from ssahani/label
Lennart Poettering [Sat, 29 Apr 2017 11:42:09 +0000 (13:42 +0200)] 
Merge pull request #5529 from ssahani/label

networkd / sd-netlink: add support for address label

7 years agoMerge pull request #5852 from phomes/trivial
Martin Pitt [Sat, 29 Apr 2017 11:39:47 +0000 (13:39 +0200)] 
Merge pull request #5852 from phomes/trivial

Trivial cleanups

7 years agoMerge pull request #5801 from keszybz/help-error
Lennart Poettering [Sat, 29 Apr 2017 10:30:29 +0000 (12:30 +0200)] 
Merge pull request #5801 from keszybz/help-error

nspawn,cgtop: make sure --version, --help always work

7 years agosd-boot: remove unnecessary defines (#5848)
Max Resch [Sat, 29 Apr 2017 10:24:25 +0000 (12:24 +0200)] 
sd-boot: remove unnecessary defines (#5848)

As discussed in #5829 `#define` is not necessary, meson and autotools
set the correct compiler flags and the default value is provided by them.

7 years agotest: explain why we explicitly make all despite test/Makefile's check target calling...
Chris Lamb [Sat, 29 Apr 2017 06:23:13 +0000 (07:23 +0100)] 
test: explain why we explicitly make all despite test/Makefile's check target calling it (#5830)

7 years agomeson: do not link libshared dynamically against libudev (#5850)
Michael Biebl [Sat, 29 Apr 2017 06:21:07 +0000 (08:21 +0200)] 
meson: do not link libshared dynamically against libudev (#5850)

Linking dynamically against libudev will fail once
https://github.com/mesonbuild/meson/pull/1545 is merged and apparently
already triggers a link failure on s390x.

Make libshared provide the udev symbols by including libudev_sources
into libshared. This will cause those files to be compiled twice, but it
actually reduces the installed size and is closer to what the autotools
build system is doing.

Closes #5828

7 years agotree-wide: remove unused variables 5852/head
Thomas Hindoe Paaboel Andersen [Fri, 28 Apr 2017 21:49:50 +0000 (23:49 +0200)] 
tree-wide: remove unused variables

7 years agonetworkd: remove duplicated include
Thomas Hindoe Paaboel Andersen [Fri, 28 Apr 2017 21:44:57 +0000 (23:44 +0200)] 
networkd: remove duplicated include

7 years agoshared: assert the source for memcpy
Thomas Hindoe Paaboel Andersen [Fri, 28 Apr 2017 21:37:35 +0000 (23:37 +0200)] 
shared: assert the source for memcpy

7 years agobuild-sys: do not install manpages from disabled features (#5844)
userwithuid [Fri, 28 Apr 2017 12:22:17 +0000 (12:22 +0000)] 
build-sys: do not install manpages from disabled features (#5844)

A few of the manpages where missing the "conditional" attribute.

7 years agohwdb: add Samsung 880Z5E series touchpad overrides (#5825)
Peter Hutterer [Fri, 28 Apr 2017 06:19:31 +0000 (16:19 +1000)] 
hwdb: add Samsung 880Z5E series touchpad overrides (#5825)

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

7 years agomeson: add compiler flags for "--tpm" in EFI apps (#5829)
Max Resch [Fri, 28 Apr 2017 00:59:37 +0000 (02:59 +0200)] 
meson: add compiler flags for "--tpm" in EFI apps (#5829)

Readds boot log tpm feature that was missing in meson by readding a
defines in efi_conf.h

7 years agoMerge pull request #5827 from keszybz/meson-libcap
Martin Pitt [Thu, 27 Apr 2017 20:12:28 +0000 (22:12 +0200)] 
Merge pull request #5827 from keszybz/meson-libcap

meson: fixes to allow meson builds on Ubuntu Trusty

7 years agomeson: do not install files from disabled features (#5811)
userwithuid [Thu, 27 Apr 2017 17:47:04 +0000 (17:47 +0000)] 
meson: do not install files from disabled features (#5811)

Mirror conditions from Makefile.am.

7 years agoMerge pull request #5818 from mbiebl/meson-no-libudev
Zbigniew Jędrzejewski-Szmek [Thu, 27 Apr 2017 17:40:15 +0000 (13:40 -0400)] 
Merge pull request #5818 from mbiebl/meson-no-libudev

meson: drop implicit libudev link dependencies

7 years agoMerge branch 'master' into meson-no-libudev 5818/head
Zbigniew Jędrzejewski-Szmek [Thu, 27 Apr 2017 17:39:54 +0000 (13:39 -0400)] 
Merge branch 'master' into meson-no-libudev

7 years agoMerge pull request #5821 from mbiebl/meson-no-libiptc
Zbigniew Jędrzejewski-Szmek [Thu, 27 Apr 2017 17:37:01 +0000 (13:37 -0400)] 
Merge pull request #5821 from mbiebl/meson-no-libiptc

Merge libfirewall into libshared, and link libshared to libip[46]tc directly.

7 years agobuild-sys: only install libexecdir/resolv.conf if resolved is enabled (#5826)
userwithuid [Thu, 27 Apr 2017 17:22:40 +0000 (17:22 +0000)] 
build-sys: only install libexecdir/resolv.conf if resolved is enabled (#5826)

as mentioned in https://github.com/systemd/systemd/pull/5811

7 years agoexecute: filter out "." for ".." in EnvironmentFile= globs too 5809/head
Zbigniew Jędrzejewski-Szmek [Wed, 26 Apr 2017 02:54:50 +0000 (22:54 -0400)] 
execute: filter out "." for ".." in EnvironmentFile= globs too

This doesn't really matter much, only in case somebody would use
something strange like

  EnvironmentFile=/etc/something/.*

Make sure that "." and ".." is not returned by that glob. This makes
all our globbing patterns behave the same.

7 years agotmpfiles: use safe_glob()
Zbigniew Jędrzejewski-Szmek [Wed, 26 Apr 2017 03:50:35 +0000 (23:50 -0400)] 
tmpfiles: use safe_glob()

This filters out "." and ".." from glob results. Fixes #5655 and #5644.

Any judgements on whether the path is "safe" are removed. We will not remove
"/" under any name (including "/../" and such), but we will remove stuff that
is specified using paths that include "//", "/./" and "/../". Such paths can be
created when joining strings automatically, or for other reasons, and people
generally know what ".." and "." is.

Tests are added to make sure that the helper functions behave as expected.

7 years agobasic: add readdir_no_dot and safe_glob functions
Zbigniew Jędrzejewski-Szmek [Wed, 26 Apr 2017 03:44:34 +0000 (23:44 -0400)] 
basic: add readdir_no_dot and safe_glob functions

safe_glob filters out "." and "..".

This converts all users of glob_extend() and glob_exists() to safe_glob.

7 years agomeson: fix detection of "-Wno-" options 5827/head
Zbigniew Jędrzejewski-Szmek [Thu, 27 Apr 2017 14:05:41 +0000 (10:05 -0400)] 
meson: fix detection of "-Wno-" options

7 years agomeson: add version check for libseccomp
Zbigniew Jędrzejewski-Szmek [Thu, 27 Apr 2017 14:05:18 +0000 (10:05 -0400)] 
meson: add version check for libseccomp

Compilation fails because of the missing arm64 bits with old seccomp versions.

7 years agomeson: also search for libcap directly
Zbigniew Jędrzejewski-Szmek [Thu, 27 Apr 2017 05:30:30 +0000 (01:30 -0400)] 
meson: also search for libcap directly

7 years agoimprove readability (#5814)
Matija Skala [Thu, 27 Apr 2017 00:08:52 +0000 (02:08 +0200)] 
improve readability (#5814)

7 years agoupdate-done: Create using a temporary file (#5789)
codekipper [Wed, 26 Apr 2017 23:49:06 +0000 (01:49 +0200)] 
update-done: Create using a temporary file (#5789)

'/etc/.updated' is created without using a temporary file, this can be
problematic with filesystems that cache writes. Modify so that the
timestamp is written to a temporary file and then use an atomic move
to move it to its correct place.

7 years agomeson: get rid of libfirewall 5821/head
Michael Biebl [Wed, 26 Apr 2017 20:14:23 +0000 (22:14 +0200)] 
meson: get rid of libfirewall

7 years agomeson: drop libiptc link dependencies from libshared
Michael Biebl [Wed, 26 Apr 2017 16:57:18 +0000 (18:57 +0200)] 
meson: drop libiptc link dependencies from libshared

The only place where libiptc is needed is in libfirewall, which already
takes care of linking against libiptc.

7 years agomeson: drop implicit libudev link dependencies 5817/head
Michael Biebl [Tue, 25 Apr 2017 18:19:54 +0000 (20:19 +0200)] 
meson: drop implicit libudev link dependencies

Executables which link against libshared do not need an explicit
dependency on libudev, as libshared will make sure that those symbols
are available.

7 years agomeson: add address label to build system 5529/head
Susant Sahani [Wed, 26 Apr 2017 10:29:46 +0000 (15:59 +0530)] 
meson: add address label to build system

7 years agonetworkd: add support for address label
Susant Sahani [Tue, 25 Apr 2017 10:36:50 +0000 (16:06 +0530)] 
networkd: add support for address label

IPv6 address labels are used for address selection; they are described in RFC 3484.
Precedence is managed by userspace, and only the label itself is stored in the kernel.

enp0s25.network

[Match]
Name=enp0s25

[Network]
DHCP=yes
Address = 2001:db8:f00:baa::b

[AddressLabel]
Label=199
Prefix=2001:db8:41::/64

[AddressLabel]
Label=11
Prefix=2001:db8:31::/64

[AddressLabel]
Label=123
Prefix=2001:db8:21::/64

[AddressLabel]
Label=124
Prefix=2001:db8:11::/64
[sus@maximus label]$ ip addrlabel list

prefix ::1/128 label 0
prefix ::/96 label 3
prefix ::ffff:0.0.0.0/96 label 4
prefix 2001:db8:41::/64 dev enp0s25 label 199
prefix 2001:db8:31::/64 dev enp0s25 label 11
prefix 2001:db8:21::/64 dev enp0s25 label 123
prefix 2001:db8:11::/64 dev enp0s25 label 124
prefix 2001::/32 label 6
prefix 2001:10::/28 label 7
prefix 3ffe::/16 label 12
prefix 2002::/16 label 2
prefix fec0::/10 label 11
prefix fc00::/7 label 5
prefix ::/0 label 1

7 years agosd-netlink: add support for address label
Susant Sahani [Tue, 25 Apr 2017 10:36:12 +0000 (16:06 +0530)] 
sd-netlink: add support for address label

7 years agomain: improve RLIMIT_NOFILE handling (#5795)
Christian Brauner [Wed, 26 Apr 2017 04:18:10 +0000 (06:18 +0200)] 
main: improve RLIMIT_NOFILE handling (#5795)

This has systemd look at /proc/sys/fs/nr_open to find the current maximum of
open files compiled into the kernel and tries to set the RLIMIT_NOFILE max to
it. This has the advantage the value chosen as limit is less arbitrary and also
improves the behavior of systemd in containers that have an rlimit set: When
systemd currently starts in a container that has RLIMIT_NOFILE set to e.g.
100000 systemd will lower it to 65536. With this patch systemd will try to set
the nofile limit to the allowed kernel maximum. If this fails, it will compute
the minimum of the current set value (the limit that is set on the container)
and the maximum value as soft limit and the currently set maximum value as the
maximum value. This way it retains the limit set on the container.

7 years agotest-sizeof: print the size of an enum 5783/head
Zbigniew Jędrzejewski-Szmek [Wed, 26 Apr 2017 01:14:59 +0000 (21:14 -0400)] 
test-sizeof: print the size of an enum

7 years agoshared/extract-word: replace enum with unsigned int to avoid undefined behaviour
Zbigniew Jędrzejewski-Szmek [Sat, 22 Apr 2017 23:04:02 +0000 (19:04 -0400)] 
shared/extract-word: replace enum with unsigned int to avoid undefined behaviour

../src/basic/extract-word.c:255:22: warning: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Wvarargs]
        va_start(ap, flags);
                     ^
../src/basic/extract-word.c:244:77: note: parameter of type 'ExtractFlags' (aka 'enum ExtractFlags') is declared here
int extract_many_words(const char **p, const char *separators, ExtractFlags flags, ...) {
                                                                            ^
../src/basic/extract-word.c:286:22: warning: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Wvarargs]
        va_start(ap, flags);
                     ^
../src/basic/extract-word.c:244:77: note: parameter of type 'ExtractFlags' (aka 'enum ExtractFlags') is declared here
int extract_many_words(const char **p, const char *separators, ExtractFlags flags, ...) {
                                                                            ^
2 warnings generated.

I think the relevant part of C99 is 6.7.2.2 Enumeration specifiers:

Each enumerated type shall be compatible with char, a signed integer type, or
an unsigned integer type. The choice of type is implementation-defined, but
shall be capable of representing the values of all the members of the
enumeration.

and 7.16.1.4:

The parameter parmN is the identifier of the rightmost parameter in the
variable parameter list in the function definition (the one just before the
...). If the parameter parmN is declared with the register storage class, with
a function or array type, or with a type that is not compatible with the type
that results after application of the default argument promotions, the behavior
is undefined.

This might cause a real issue if the compiler chooses something that is not an
integer for ExtractFlags. Rework the code to avoid the warning, but add an
assert_cc in a large-valued ExtractFlags element is ever defined and the type
is bumped to something wider than an int.

7 years agoimportd: support SUSE style checksums supplementary (#5800)
tblume [Wed, 26 Apr 2017 00:37:07 +0000 (02:37 +0200)] 
importd: support SUSE style checksums supplementary (#5800)

some small changes to make the code look better

7 years agobus: report builtins in GetManagedObjects() (#5799)
David Herrmann [Wed, 26 Apr 2017 00:36:30 +0000 (02:36 +0200)] 
bus: report builtins in GetManagedObjects() (#5799)

We already report builtin interfaces with InterfacesAdded and InterfacesRemoved. However,
we never reported them in GetManagedObjects(). This might end up confusing callers that
want to use those interfaces (or simply rely on the interface count to be coherent).

Report the builtins for all objects that are queried.

7 years agoMerge pull request #5803 from ssahani/util
Zbigniew Jędrzejewski-Szmek [Wed, 26 Apr 2017 00:28:38 +0000 (20:28 -0400)] 
Merge pull request #5803 from ssahani/util

config_parser: add util function config_parse_uint8

7 years agoMerge pull request #5805 from keszybz/apendv-man-rule
Michael Biebl [Tue, 25 Apr 2017 19:16:34 +0000 (21:16 +0200)] 
Merge pull request #5805 from keszybz/apendv-man-rule

meson: add sd_bus_message_appendv alias to man list

7 years agomeson: add sd_bus_message_appendv alias to man list 5805/head
Zbigniew Jędrzejewski-Szmek [Tue, 25 Apr 2017 18:20:55 +0000 (14:20 -0400)] 
meson: add sd_bus_message_appendv alias to man list

As generated by "nj update-man-rules".

7 years agocore/device: Use JobRunningTimeoutSec= for device units 5164/head
Michal Koutný [Wed, 5 Apr 2017 12:11:12 +0000 (14:11 +0200)] 
core/device: Use JobRunningTimeoutSec= for device units

Device job timeouts should respect possible device job dependencies so we set
JobRunningTimeoutSec= by default.

7 years agofstab-generator: Apply _netdev option also to device units
Michal Koutný [Tue, 24 Jan 2017 16:04:32 +0000 (17:04 +0100)] 
fstab-generator: Apply _netdev option also to device units

In case the device field of fstab record is an actual device (not an address)
apply same dependencies to the device unit as to the mount unit, i.e.

> After=network-online.target network.target
> Wants=network-online.targe

It makes sense to start the device expecting job only when network is actually
ready (consider e.g. iSCSI devices) since it is device's implicit dependency.

The eventual implementation should better obtain network flag from udev
database and would also take into account device hierarchy (see [1]).
This patch approximates that by taking the `_netdev` option as a hint from the
user both about the filesystem and underlying device. (For local devices with
network filesystems (e.g. ocfs2), this hint leads to unused dependencies.)

[1] https://lists.freedesktop.org/archives/systemd-devel/2014-October/024718.html

7 years agoMerge pull request #5804 from ssahani/geneve
Michael Biebl [Tue, 25 Apr 2017 16:00:32 +0000 (18:00 +0200)] 
Merge pull request #5804 from ssahani/geneve

meson: add geneve to build system