From ec82d020534270d1979da2d0b27f84e1846b2851 Mon Sep 17 00:00:00 2001 From: Sven Eden Date: Tue, 25 Jul 2017 08:32:29 +0200 Subject: [PATCH] Prep v234: Update root build files to upstream. --- .dir-locals.el | 6 +- .gitignore | 10 +- .mailmap | 21 ++++ Makefile-man.am | 5 + Makefile.am | 99 +++++++++-------- NEWS | 137 +++++++++++++++++++++++- TODO | 9 ++ cb/elogind.cbp | 9 ++ configure.ac | 40 +++++-- src/libelogind/sd-bus/test-bus-vtable.c | 81 ++++++++++++++ src/test/test-random-util.c | 65 +++++++++++ 11 files changed, 430 insertions(+), 52 deletions(-) create mode 100644 src/libelogind/sd-bus/test-bus-vtable.c create mode 100644 src/test/test-random-util.c diff --git a/.dir-locals.el b/.dir-locals.el index 3e1b2d76c..5ef7e1163 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -20,4 +20,8 @@ (eval . (c-set-offset 'arglist-intro '++)) (eval . (c-set-offset 'arglist-close 0)))) (nxml-mode . ((nxml-child-indent . 2) - (fill-column . 119)))) + (fill-column . 119))) + (meson-mode . ((meson-indent-basic . 8))) + (sh-mode . ((sh-basic-offset . 8) + (sh-indentation . 8))) + (awk-mode . ((c-basic-offset . 8)))) diff --git a/.gitignore b/.gitignore index 6b4d5ced2..7508a427c 100644 --- a/.gitignore +++ b/.gitignore @@ -28,7 +28,7 @@ /TAGS /ata_id /bootctl -/build-aux +/build* /busctl /cdrom_id /collect @@ -160,6 +160,8 @@ /test-bus-server /test-bus-signature /test-bus-track +/test-bus-vtable +/test-bus-vtable-cc /test-bus-zero-copy /test-calendarspec /test-cap-list @@ -265,13 +267,16 @@ /test-process-util /test-pty /test-qcow2 +/test-random-util /test-ratelimit /test-replace-var /test-resolve /test-resolve-tables +/test-resolved-packet /test-ring /test-rlimit-util /test-sched-prio +/test-sd-dhcp-lease /test-seccomp /test-selinux /test-set @@ -290,6 +295,7 @@ /test-tables /test-terminal-util /test-time +/test-timesync /test-tmpfiles /test-udev /test-uid-range @@ -355,3 +361,5 @@ patches/ /coccinelle mask_po_files.sh cccc +*.v234 +*.v234.diff diff --git a/.mailmap b/.mailmap index d46c166cf..e2a390bbe 100644 --- a/.mailmap +++ b/.mailmap @@ -102,3 +102,24 @@ Paolo Giangrandi Karl Kraus Tibor Nagy Stuart McLaren +John Paul Adrian Glaubitz +John Paul Adrian Glaubitz +Sjoerd Simons +Neil Brown +Michal Suchanek +Michal Suchanek +Bastien Nocera +Umut Tezduyar Lindskog +Alexander Kurtz +Piotr Szydełko +Łukasz Stelmach +Krzysztof Jackiewicz +Marcus Cooper +Insun Pyo +Ted Wood +Ted Wood +Anthony Parsons +Federico Di Pierro +Josef Andersson +Josef Andersson +Hendrik Westerberg diff --git a/Makefile-man.am b/Makefile-man.am index b25bb0043..2355ff8a6 100644 --- a/Makefile-man.am +++ b/Makefile-man.am @@ -133,6 +133,7 @@ MANPAGES_ALIAS += \ man/sd_bus_message_append_array_iovec.3 \ man/sd_bus_message_append_array_memfd.3 \ man/sd_bus_message_append_array_space.3 \ + man/sd_bus_message_appendv.3 \ man/sd_bus_negotiate_creds.3 \ man/sd_bus_negotiate_timestamp.3 \ man/sd_bus_open.3 \ @@ -289,6 +290,7 @@ man/sd_bus_error_setf.3: man/sd_bus_error.3 man/sd_bus_message_append_array_iovec.3: man/sd_bus_message_append_array.3 man/sd_bus_message_append_array_memfd.3: man/sd_bus_message_append_array.3 man/sd_bus_message_append_array_space.3: man/sd_bus_message_append_array.3 +man/sd_bus_message_appendv.3: man/sd_bus_message_append.3 man/sd_bus_negotiate_creds.3: man/sd_bus_negotiate_fds.3 man/sd_bus_negotiate_timestamp.3: man/sd_bus_negotiate_fds.3 man/sd_bus_open.3: man/sd_bus_default.3 @@ -591,6 +593,9 @@ man/sd_bus_message_append_array_memfd.html: man/sd_bus_message_append_array.html man/sd_bus_message_append_array_space.html: man/sd_bus_message_append_array.html $(html-alias) +man/sd_bus_message_appendv.html: man/sd_bus_message_append.html + $(html-alias) + man/sd_bus_negotiate_creds.html: man/sd_bus_negotiate_fds.html $(html-alias) diff --git a/Makefile.am b/Makefile.am index f41296b13..029c5ff96 100644 --- a/Makefile.am +++ b/Makefile.am @@ -38,9 +38,9 @@ SUBDIRS = . po # Keep the test-suite.log .PRECIOUS: $(TEST_SUITE_LOG) Makefile -LIBELOGIND_CURRENT=18 -LIBELOGIND_REVISION=3 -LIBELOGIND_AGE=18 +LIBELOGIND_CURRENT=19 +LIBELOGIND_REVISION=0 +LIBELOGIND_AGE=19 # Dirs of external packages dbuspolicydir=@dbuspolicydir@ @@ -260,9 +260,11 @@ man/index.html: man/elogind.index.html $(AM_V_LN)$(LN_S) -f elogind.index.html $@ if HAVE_PYTHON +if ENABLE_MANPAGES noinst_DATA += \ man/index.html endif +endif CLEANFILES += \ man/index.html @@ -509,7 +511,6 @@ libelogind_shared_la_CFLAGS = \ $(libelogind_journal_internal_la_CFLAGS) \ $(libudev_internal_la_CFLAGS) \ $(ACL_CFLAGS) \ - $(LIBIDN_CFLAGS) \ $(SECCOMP_CFLAGS) \ -fvisibility=default @@ -520,7 +521,6 @@ libelogind_shared_la_LIBADD = \ $(libelogind_internal_la_LIBADD) \ $(UDEV_LIBS) \ $(ACL_LIBS) \ - $(LIBIDN_LIBS) \ $(SECCOMP_LIBS) libelogind_shared_la_LDFLAGS = \ @@ -600,6 +600,7 @@ tests += \ test-list \ test-unaligned \ test-conf-files \ + test-random-util \ test-conf-parser \ test-locale-util \ test-copy \ @@ -640,6 +641,12 @@ test_copy_SOURCES = \ test_copy_LDADD = \ libshared.la +test_random_util_SOURCES = \ + src/test/test-random-util.c + +test_random_util_LDADD = \ + libelogind-shared.la + test_util_SOURCES = \ src/test/test-util.c @@ -751,9 +758,6 @@ test_selinux_LDADD = \ test_sizeof_SOURCES = \ src/test/test-sizeof.c -test_sizeof_LDADD = \ - libelogind-shared.la - BUILT_SOURCES += \ src/test/test-hashmap-ordered.c @@ -972,7 +976,6 @@ noinst_LTLIBRARIES += \ EXTRA_DIST += \ src/libelogind/libelogind.pc.in \ - src/libelogind/sd-bus/DIFFERENCES \ src/libelogind/sd-bus/GVARIANT-SERIALIZATION libelogind_la_SOURCES = @@ -1017,6 +1020,7 @@ tests += \ test-bus-server \ test-bus-match \ test-bus-introspect \ + test-bus-vtable \ test-bus-error \ test-event @@ -1032,6 +1036,12 @@ test_bus_server_SOURCES = \ test_bus_server_LDADD = \ libelogind-shared.la +test_bus_vtable_SOURCES = \ + src/libelogind/sd-bus/test-bus-vtable.c + +test_bus_vtable_LDADD = \ + libelogind-shared.la + test_bus_error_SOURCES = \ src/libelogind/sd-bus/test-bus-error.c @@ -1197,10 +1207,10 @@ test_login_tables_LDADD = \ libelogind-core.la manual_tests += \ - test-login \ test-inhibit tests += \ + test-login \ test-login-tables \ test-login-shared @@ -1284,15 +1294,13 @@ substitutions = \ '|exec_prefix=$(exec_prefix)|' \ '|libdir=$(libdir)|' \ '|includedir=$(includedir)|' \ - '|VERSION=$(VERSION)|' \ '|rootprefix=$(rootprefix)|' \ '|udevlibexecdir=$(udevlibexecdir)|' \ '|KILL=$(KILL)|' \ '|MKDIR_P=$(MKDIR_P)|' \ '|KILL_USER_PROCESSES=$(KILL_USER_PROCESSES)|' \ '|systemuidmax=$(SYSTEM_UID_MAX)|' \ - '|systemgidmax=$(SYSTEM_GID_MAX)|' \ - '|TTY_GID=$(TTY_GID)|' + '|systemgidmax=$(SYSTEM_GID_MAX)|' SED_PROCESS = \ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ @@ -1351,8 +1359,10 @@ if ENABLE_POLKIT nodist_polkitpolicy_DATA = \ $(polkitpolicy_files) polkitrules_DATA = $(polkitrules_files) +if ENABLE_POLKIT_PKLA polkitpkla_DATA = $(polkitpkla_files) endif +endif EXTRA_DIST += \ $(polkitpolicy_in_files) @@ -1375,7 +1385,7 @@ XSLTPROC_FLAGS = \ --stringparam funcsynopsis.style ansi \ --stringparam man.authors.section.enabled 0 \ --stringparam man.copyright.section.enabled 0 \ - --stringparam elogind.version $(VERSION) \ + --stringparam elogind.version $(PACKAGE_VERSION) \ --path '$(builddir)/man:$(srcdir)/man' XSLTPROC_PROCESS_MAN = \ @@ -1465,38 +1475,43 @@ dist: .PHONY: git-tag git-tag: - git tag -s "v$(VERSION)" -m "elogind $(VERSION)" + git tag -s "v$(PACKAGE_VERSION)" -m "elogind $(PACKAGE_VERSION)" .PHONY: git-tar git-tar: - $(AM_V_at)git archive --format=tar --prefix=elogind-$(VERSION)-raw/ HEAD | \ + $(AM_V_at)git archive --format=tar --prefix=elogind-$(PACKAGE_VERSION)-raw/ HEAD | \ (cd /var/tmp/ && tar xf -) - $(AM_V_GEN)(cd /var/tmp && rm -rf elogind-$(VERSION) && $(MKDIR_P) elogind-$(VERSION) && \ - for f in `find elogind-$(VERSION)-raw/ -type f | cut -d '/' -f 2-` ; do \ - $(MKDIR_P) elogind-$(VERSION)/`dirname $$f` ; \ - $(AWK) 'BEGIN { i=0;e=0 } \ - /^#if\s+0.*elogind.*$$/ { i=1;next } \ - /^#else\s*$$/ { \ - { if ( i==1 ) e=1; else print }{next} \ - } \ - /^#endif\s*\/\/\s*0\s*$$/ { \ - { if ( i==1 ) { i=0;e=0 } else print }{next} \ - } \ - /^\s*\/\/\/.*elogind.*$$/{ next } \ - /^\s*\/\/\s*#include.+$$/{ next } \ - { if ( (i==0) || (e==1) ) print }' \ - elogind-$(VERSION)-raw/$$f \ - > elogind-$(VERSION)/$$f ; \ - chmod `stat -c '%a' elogind-$(VERSION)-raw/$$f` \ - elogind-$(VERSION)/$$f ; \ - done ; \ - for l in `find elogind-$(VERSION)-raw/ -type l | cut -d '/' -f 2-` ; do \ - $(MKDIR_P) elogind-$(VERSION)/`dirname $$l` ; \ - cp -P elogind-$(VERSION)-raw/$$l elogind-$(VERSION)/$$l ; \ - done ; \ - tar czf elogind-$(VERSION).tar.gz elogind-$(VERSION) ; \ - rm -rf elogind-$(VERSION) elogind-$(VERSION)-raw) ; \ - $(AM_V_at)mv /var/tmp/elogind-$(VERSION).tar.gz ./ + $(AM_V_GEN)(cd /var/tmp && \ + rm -rf elogind-$(PACKAGE_VERSION) && \ + $(MKDIR_P) elogind-$(PACKAGE_VERSION) && \ + for f in `find elogind-$(PACKAGE_VERSION)-raw/ -type f | \ + cut -d '/' -f 2-` ; do \ + $(MKDIR_P) elogind-$(PACKAGE_VERSION)/`dirname $$f` ; \ + $(AWK) 'BEGIN { i=0;e=0 } \ + /^#if\s+0.*elogind.*$$/ { i=1;next } \ + /^#else\s*$$/ { \ + { if ( i==1 ) e=1; else print }{next} \ + } \ + /^#endif\s*\/\/\s*0\s*$$/ { \ + { if ( i==1 ) { i=0;e=0 } else print }{next} \ + } \ + /^\s*\/\/\/.*elogind.*$$/{ next } \ + /^\s*\/\/\s*#include.+$$/{ next } \ + { if ( (i==0) || (e==1) ) print }' \ + elogind-$(PACKAGE_VERSION)-raw/$$f \ + > elogind-$(PACKAGE_VERSION)/$$f ; \ + chmod `stat -c '%a' elogind-$(PACKAGE_VERSION)-raw/$$f` \ + elogind-$(PACKAGE_VERSION)/$$f ; \ + done ; \ + for l in `find elogind-$(PACKAGE_VERSION)-raw/ -type l | \ + cut -d '/' -f 2-` ; do \ + $(MKDIR_P) elogind-$(PACKAGE_VERSION)/`dirname $$l` ; \ + cp -P elogind-$(PACKAGE_VERSION)-raw/$$l \ + elogind-$(PACKAGE_VERSION)/$$l ; \ + done ; \ + tar czf elogind-$(PACKAGE_VERSION).tar.gz elogind-$(PACKAGE_VERSION) ; \ + rm -rf elogind-$(PACKAGE_VERSION) elogind-$(PACKAGE_VERSION)-raw) ; \ + $(AM_V_at)mv /var/tmp/elogind-$(PACKAGE_VERSION).tar.gz ./ .PHONY: install-tree install-tree: all diff --git a/NEWS b/NEWS index da9e20383..d56b7a6f2 100644 --- a/NEWS +++ b/NEWS @@ -1,7 +1,140 @@ systemd System and Service Manager +CHANGES WITH 234: + + * Meson is now supported as build system in addition to Automake. It is + our plan to remove Automake in one of our next releases, so that + Meson becomes our exclusive build system. Hence, please start using + the Meson build system in your downstream packaging. There's plenty + of documentation around how to use Meson, the extremely brief + summary: + + ./autogen.sh && ./configure && make && sudo make install + + becomes: + + meson build && ninja -C build && sudo ninja -C build install + + * Unit files gained support for a new JobRunningTimeoutUSec= setting, + which permits configuring a timeout on the time a job is + running. This is particularly useful for setting timeouts on jobs for + .device units. + + * Unit files gained two new options ConditionUser= and ConditionGroup= + for conditionalizing units based on the identity of the user/group + running a systemd user instance. + + * systemd-networkd now understands a new FlowLabel= setting in the + [VXLAN] section of .network files, as well as a Priority= in + [Bridge], GVRP= + MVRP= + LooseBinding= + ReorderHeader= in [VLAN] + and GatewayOnlink= + IPv6Preference= + Protocol= in [Route]. It also + gained support for configuration of GENEVE links, and IPv6 address + labels. The [Network] section gained the new IPv6ProxyNDP= setting. + + * .link files now understand a new Port= setting. + + * systemd-networkd's DHCP support gained support for DHCP option 119 + (domain search list). + + * systemd-networkd gained support for serving IPv6 address ranges using + the Router Advertisment protocol. The new .network configuration + section [IPv6Prefix] may be used to configure the ranges to + serve. This is implemented based on a new, minimal, native server + implementation of RA. + + * journalctl's --output= switch gained support for a new parameter + "short-iso-precise" for a mode where timestamps are shown as precise + ISO date values. + + * systemd-udevd's "net_id" builtin may now generate stable network + interface names from IBM PowerVM VIO devices as well as ACPI platform + devices. + + * MulticastDNS support in systemd-resolved may now be explicitly + enabled/disabled using the new MulticastDNS= configuration file + option. + + * systemd-resolved may now optionally use libidn2 instead of the libidn + for processing internationalized domain names. Support for libidn2 + should be considered experimental and should not be enabled by + default yet. + + * "machinectl pull-tar" and related call may now do verification of + downloaded images using SUSE-style .sha256 checksum files in addition + to the already existing support for validating using Ubuntu-style + SHA256SUMS files. + + * sd-bus gained support for a new sd_bus_message_appendv() call which + is va_list equivalent of sd_bus_message_append(). + + * sd-boot gained support for validating images using SHIM/MOK. + + * The SMACK code learnt support for "onlycap". + + * systemd-mount --umount is now much smarter in figuring out how to + properly unmount a device given its mount or device path. + + * The code to call libnss_dns as a fallback from libnss_resolve when + the communication with systemd-resolved fails was removed. This + fallback was redundant and interfered with the [!UNAVAIL=return] + suffix. See nss-resolve(8) for the recommended configuration. + + * systemd-logind may now be restarted without losing state. It stores + the file descriptors for devices it manages in the system manager + using the FDSTORE= mechanism. Please note that further changes in + other components may be required to make use of this (for example + Xorg has code to listen for stops of systemd-logind and terminate + itself when logind is stopped or restarted, in order to avoid using + stale file descriptors for graphical devices, which is now + counterproductive and must be reverted in order for restarts of + systemd-logind to be safe. See + https://cgit.freedesktop.org/xorg/xserver/commit/?id=dc48bd653c7e101.) + + * All kernel install plugins are called with the environment variable + KERNEL_INSTALL_MACHINE_ID which is set to the machine ID given by + /etc/machine-id. If the file is missing or empty, the variable is + empty and BOOT_DIR_ABS is the path of a temporary directory which is + removed after all the plugins exit. So, if KERNEL_INSTALL_MACHINE_ID + is empty, all plugins should not put anything in BOOT_DIR_ABS. + + Contributions from: Adrian Heine né Lang, Aggelos Avgerinos, Alexander + Kurtz, Alexandros Frantzis, Alexey Brodkin, Alex Lu, Amir Pakdel, Amir + Yalon, Anchor Cat, Anthony Parsons, Bastien Nocera, Benjamin Gilbert, + Benjamin Robin, Boucman, Charles Plessy, Chris Chiu, Chris Lamb, + Christian Brauner, Christian Hesse, Colin Walters, Daniel Drake, + Danielle Church, Daniel Molkentin, Daniel Rusek, Daniel Wang, Davide + Cavalca, David Herrmann, David Michael, Dax Kelson, Dimitri John + Ledkov, Djalal Harouni, Dušan Kazik, Elias Probst, Evgeny Vereshchagin, + Federico Di Pierro, Felipe Sateler, Felix Zhang, Franck Bui, Gary + Tierney, George McCollister, Giedrius Statkevičius, Hans de Goede, + hecke, Hendrik Westerberg, Hristo Venev, Ian Wienand, Insun Pyo, Ivan + Shapovalov, James Cowgill, James Hemsing, Janne Heß, Jan Synacek, Jason + Reeder, João Paulo Rechi Vita, John Paul Adrian Glaubitz, Jörg + Thalheim, Josef Andersson, Josef Gajdusek, Julian Mehne, Kai Krakow, + Krzysztof Jackiewicz, Lars Karlitski, Lennart Poettering, Lluís Gili, + Lucas Werkmeister, Lukáš Nykrýn, Łukasz Stelmach, Mantas Mikulėnas, + Marcin Bachry, Marcus Cooper, Mark Stosberg, Martin Pitt, Matija Skala, + Matt Clarkson, Matthew Garrett, Matthias Greiner, Matthijs van Duin, + Max Resch, Michael Biebl, Michal Koutný, Michal Sekletar, Michal + Soltys, Michal Suchanek, Mike Gilbert, Nate Clark, Nathaniel R. Lewis, + Neil Brown, Nikolai Kondrashov, Pascal S. de Kloe, Pat Riehecky, Patrik + Flykt, Paul Kocialkowski, Peter Hutterer, Philip Withnall, Piotr + Szydełko, Rafael Fontenelle, Ray Strode, Richard Maw, Roelf Wichertjes, + Ronny Chevalier, Sarang S. Dalal, Sjoerd Simons, slodki, Stefan + Schweter, Susant Sahani, Ted Wood, Thomas Blume, Thomas Haller, Thomas + H. P. Andersen, Timothée Ravier, Tobias Jungel, Tobias Stoeckmann, Tom + Gundersen, Tom Yan, Torstein Husebø, Umut Tezduyar Lindskog, + userwithuid, Vito Caputo, Waldemar Brodkorb, WaLyong Cho, Yu, Li-Yu, + Yusuke Nojima, Yu Watanabe, Zbigniew Jędrzejewski-Szmek, Дамјан + Георгиевски + + — Berlin, 2017-07-12 + CHANGES WITH 233: + * This version requires at least gperf 3.1 for building, 3.0 is not + sufficient. + * The "hybrid" control group mode has been modified to improve compatibility with "legacy" cgroups-v1 setups. Specifically, the "hybrid" setup of /sys/fs/cgroup is now pretty much identical to @@ -348,7 +481,7 @@ CHANGES WITH 233: these NTP servers officially. We still recommend downstreams to properly register an NTP pool with the NTP pool project though. - * coredumpctl gained new new "--reverse" option for printing the list + * coredumpctl gained a new "--reverse" option for printing the list of coredumps in reverse order. * coredumpctl will now show additional information about truncated and @@ -3315,7 +3448,7 @@ CHANGES WITH 216: like Cockpit which register web clients as PAM sessions. * timer units with at least one OnCalendar= setting will now - be started only after timer-sync.target has been + be started only after time-sync.target has been reached. This way they will not elapse before the system clock has been corrected by a local NTP client or similar. This is particular useful on RTC-less embedded diff --git a/TODO b/TODO index 3cf4ce393..61efa5e9f 100644 --- a/TODO +++ b/TODO @@ -24,6 +24,15 @@ Janitorial Clean-ups: Features: +* Add AddUser= setting to unit files, similar to DynamicUser=1 which however + creates a static, persistent user rather than a dynamic, transient user. We + can leverage code from sysusers.d for this. + +* add some optional flag to ReadWritePaths= and friends, that has the effect + that we create the dir in question when the service is started. Example: + + ReadWritePaths=:/var/lib/foobar + * sort generated hwdb files alphabetically when we import them, so that git diffs remain minimal (in particular: the OUI databases we import are not sorted, and not stable) diff --git a/cb/elogind.cbp b/cb/elogind.cbp index b1171e3e5..818c48570 100644 --- a/cb/elogind.cbp +++ b/cb/elogind.cbp @@ -396,6 +396,9 @@ + + @@ -556,6 +559,9 @@