diff -Nru systemd-242/debian/changelog systemd-242/debian/changelog --- systemd-242/debian/changelog 2020-02-06 14:45:57.000000000 +0000 +++ systemd-242/debian/changelog 2020-04-20 13:44:51.000000000 +0000 @@ -1,3 +1,22 @@ +systemd (242-7ubuntu3.8) eoan; urgency=medium + + * d/t/logind: skip if nonexistent /sys/power/state (LP: #1862657) + * d/p/lp1859862-network-Do-not-disable-IPv6-by-writing-to-sysctl.patch: + - enable ipv6 when needed (LP: #1859862) + * d/p/lp1858412-journalctl-allow-running-vacuum-on-remote-journals-t.patch: + - allow vacuuming journal 'root' dir (LP: #1858412) + * d/rules: use meson --print-errorlogs instead of cat testlog + - (LP: #1870811) + * d/p/lp1776654-test-Synchronize-journal-before-reading-from-it.patch: + - sync journal before reading from it (LP: #1776654) + * d/p/lp1837914-journal-do-not-trigger-assertion-when-journal_file_c.patch: + - do not crash if NULL passted to journal destructor (LP: #1837914) + * d/e/initramfs-tools/hooks/udev: + - Follow symlinks when finding link files to copy into initramfs + (LP: #1868892) + + -- Dan Streetman Mon, 20 Apr 2020 09:44:51 -0400 + systemd (242-7ubuntu3.7) eoan; urgency=medium [ Dariusz Gadomski ] diff -Nru systemd-242/debian/extra/initramfs-tools/hooks/udev systemd-242/debian/extra/initramfs-tools/hooks/udev --- systemd-242/debian/extra/initramfs-tools/hooks/udev 2020-02-06 14:45:57.000000000 +0000 +++ systemd-242/debian/extra/initramfs-tools/hooks/udev 2020-04-20 12:56:49.000000000 +0000 @@ -22,9 +22,9 @@ # copy .link files containing interface naming definitions mkdir -p "$DESTDIR/lib/systemd/network/" -find /lib/systemd/network -name '*.link' -execdir cp -pt "$DESTDIR/lib/systemd/network/" '{}' + +find -L /lib/systemd/network -name '*.link' -execdir cp -pt "$DESTDIR/lib/systemd/network/" '{}' + if [ -d /etc/systemd/network ]; then - find /etc/systemd/network -name '*.link' -execdir cp -pt "$DESTDIR/lib/systemd/network/" '{}' + + find -L /etc/systemd/network -name '*.link' -execdir cp -pt "$DESTDIR/lib/systemd/network/" '{}' + fi mkdir -p "$DESTDIR/lib/udev/rules.d/" diff -Nru systemd-242/debian/patches/lp1776654-test-Synchronize-journal-before-reading-from-it.patch systemd-242/debian/patches/lp1776654-test-Synchronize-journal-before-reading-from-it.patch --- systemd-242/debian/patches/lp1776654-test-Synchronize-journal-before-reading-from-it.patch 1970-01-01 00:00:00.000000000 +0000 +++ systemd-242/debian/patches/lp1776654-test-Synchronize-journal-before-reading-from-it.patch 2020-04-20 12:56:49.000000000 +0000 @@ -0,0 +1,26 @@ +From 37b9966e2525790843ab302a5b8009853a7905a0 Mon Sep 17 00:00:00 2001 +From: dann frazier +Date: Mon, 27 Jan 2020 18:45:17 -0700 +Subject: [PATCH] test: Synchronize journal before reading from it +Origin: upstream, https://github.com/systemd/systemd/commit/37b9966e2525790843ab302a5b8009853a7905a0 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1776654 + +There's a race condition in the sysuser test where it may try to read +entries from the journal before they are available. Fix it by adding a +`journalctl --sync` call. + +BugLink: https://bugs.launchpad.net/bugs/1776654 +--- + test/TEST-21-SYSUSERS/test.sh | 1 + + 1 file changed, 1 insertion(+) + +--- a/test/TEST-21-SYSUSERS/test.sh ++++ b/test/TEST-21-SYSUSERS/test.sh +@@ -116,6 +116,7 @@ test_run() { + prepare_testdir ${f%.input} + cp $f $TESTDIR/usr/lib/sysusers.d/test.conf + systemd-sysusers --root=$TESTDIR 2> /dev/null ++ journalctl --sync + journalctl -t systemd-sysusers -o cat | tail -n1 > $TESTDIR/tmp/err + if ! diff -u $TESTDIR/tmp/err ${f%.*}.expected-err; then + echo "**** Unexpected error output for $f" diff -Nru systemd-242/debian/patches/lp1837914-journal-do-not-trigger-assertion-when-journal_file_c.patch systemd-242/debian/patches/lp1837914-journal-do-not-trigger-assertion-when-journal_file_c.patch --- systemd-242/debian/patches/lp1837914-journal-do-not-trigger-assertion-when-journal_file_c.patch 1970-01-01 00:00:00.000000000 +0000 +++ systemd-242/debian/patches/lp1837914-journal-do-not-trigger-assertion-when-journal_file_c.patch 2020-04-20 12:56:49.000000000 +0000 @@ -0,0 +1,45 @@ +From c377a6f3ad3d9bed4ce7e873e8e9ec6b1650c57d Mon Sep 17 00:00:00 2001 +From: Yu Watanabe +Date: Tue, 28 May 2019 12:40:17 +0900 +Subject: [PATCH 1/2] journal: do not trigger assertion when + journal_file_close() get NULL +Origin: upstream, https://github.com/systemd/systemd/pull/12679/commits/c377a6f3ad3d9bed4ce7e873e8e9ec6b1650c57d +Bug: https://github.com/systemd/systemd/issues/12400 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1837914 + +We generally expect destructors to not complain if a NULL argument is passed. + +Closes #12400. +--- + src/journal/journal-file.c | 3 ++- + src/journal/journald-server.c | 7 ++----- + 2 files changed, 4 insertions(+), 6 deletions(-) + +--- a/src/journal/journal-file.c ++++ b/src/journal/journal-file.c +@@ -340,7 +340,8 @@ bool journal_file_is_offlining(JournalFi + } + + JournalFile* journal_file_close(JournalFile *f) { +- assert(f); ++ if (!f) ++ return NULL; + + #if HAVE_GCRYPT + /* Write the final tag */ +--- a/src/journal/journald-server.c ++++ b/src/journal/journald-server.c +@@ -2038,11 +2038,8 @@ void server_done(Server *s) { + + client_context_flush_all(s); + +- if (s->system_journal) +- (void) journal_file_close(s->system_journal); +- +- if (s->runtime_journal) +- (void) journal_file_close(s->runtime_journal); ++ (void) journal_file_close(s->system_journal); ++ (void) journal_file_close(s->runtime_journal); + + ordered_hashmap_free_with_destructor(s->user_journals, journal_file_close); + diff -Nru systemd-242/debian/patches/lp1858412-journalctl-allow-running-vacuum-on-remote-journals-t.patch systemd-242/debian/patches/lp1858412-journalctl-allow-running-vacuum-on-remote-journals-t.patch --- systemd-242/debian/patches/lp1858412-journalctl-allow-running-vacuum-on-remote-journals-t.patch 1970-01-01 00:00:00.000000000 +0000 +++ systemd-242/debian/patches/lp1858412-journalctl-allow-running-vacuum-on-remote-journals-t.patch 2020-04-20 12:56:49.000000000 +0000 @@ -0,0 +1,34 @@ +From c488660e6edb3c1375ab62514a8df035c3d712bf Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jan=20Kundr=C3=A1t?= +Date: Sat, 2 Nov 2019 16:42:01 +0100 +Subject: [PATCH] journalctl: allow running vacuum on remote journals, too +Origin: upstream, https://github.com/systemd/systemd/commit/c488660e6edb3c1375ab62514a8df035c3d712bf +Bug: https://github.com/systemd/systemd/issues/2376 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1858412 + +Right now the `systemd-journal-remote` service does not constrain its +resource usage (I just run out of space on my 100GB partition, for +example). This patch does not change that, but it at least makes it +possible to run something like: + + journalctl --directory /var/log/journal/remote --rotate --vacuum-size=90G + +fixes #2376 + +Co-authored-by: Mike Auty +--- + src/journal/journalctl.c | 3 --- + 1 file changed, 3 deletions(-) + +--- a/src/journal/journalctl.c ++++ b/src/journal/journalctl.c +@@ -2306,9 +2306,6 @@ int main(int argc, char *argv[]) { + HASHMAP_FOREACH(d, j->directories_by_path, i) { + int q; + +- if (d->is_root) +- continue; +- + q = journal_directory_vacuum(d->path, arg_vacuum_size, arg_vacuum_n_files, arg_vacuum_time, NULL, !arg_quiet); + if (q < 0) { + log_error_errno(q, "Failed to vacuum %s: %m", d->path); diff -Nru systemd-242/debian/patches/lp1859862-network-Do-not-disable-IPv6-by-writing-to-sysctl.patch systemd-242/debian/patches/lp1859862-network-Do-not-disable-IPv6-by-writing-to-sysctl.patch --- systemd-242/debian/patches/lp1859862-network-Do-not-disable-IPv6-by-writing-to-sysctl.patch 1970-01-01 00:00:00.000000000 +0000 +++ systemd-242/debian/patches/lp1859862-network-Do-not-disable-IPv6-by-writing-to-sysctl.patch 2020-04-20 12:56:49.000000000 +0000 @@ -0,0 +1,66 @@ +From 482efedc081b0c4bf2e77a3dee6b979d9c9a5765 Mon Sep 17 00:00:00 2001 +From: Susant Sahani +Date: Mon, 19 Aug 2019 15:30:35 +0530 +Subject: [PATCH] network: Do not disable IPv6 by writing to sysctl +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1859862 +Origin: upstream, https://github.com/systemd/systemd/commit/482efedc081b0c4bf2e77a3dee6b979d9c9a5765 + +Only enable is and do not disable IPv6 +--- + src/network/networkd-link.c | 25 +++++++++++++------------ + 1 file changed, 13 insertions(+), 12 deletions(-) + +--- a/src/network/networkd-link.c ++++ b/src/network/networkd-link.c +@@ -332,20 +332,20 @@ static IPv6PrivacyExtensions link_ipv6_p + } + + static int link_enable_ipv6(Link *link) { +- bool disabled; ++ bool enabled; + int r; + + if (link->flags & IFF_LOOPBACK) + return 0; + +- disabled = !link_ipv6_enabled(link); +- +- r = sysctl_write_ip_property_boolean(AF_INET6, link->ifname, "disable_ipv6", disabled); +- if (r < 0) +- log_link_warning_errno(link, r, "Cannot %s IPv6 for interface %s: %m", +- enable_disable(!disabled), link->ifname); +- else +- log_link_info(link, "IPv6 successfully %sd", enable_disable(!disabled)); ++ enabled = link_ipv6_enabled(link); ++ if (enabled) { ++ r = sysctl_write_ip_property_boolean(AF_INET6, link->ifname, "disable_ipv6", false); ++ if (r < 0) ++ log_link_warning_errno(link, r, "Cannot enable IPv6: %m"); ++ else ++ log_link_info(link, "IPv6 successfully enabled"); ++ } + + return 0; + } +@@ -1503,10 +1503,6 @@ int link_set_mtu(Link *link, uint32_t mt + if (r < 0) + return log_link_error_errno(link, r, "Could not allocate RTM_SETLINK message: %m"); + +- /* If IPv6 not configured (no static IPv6 address and IPv6LL autoconfiguration is disabled) +- * for this interface, then disable IPv6 else enable it. */ +- (void) link_enable_ipv6(link); +- + /* IPv6 protocol requires a minimum MTU of IPV6_MTU_MIN(1280) bytes + * on the interface. Bump up MTU bytes to IPV6_MTU_MIN. */ + if (link_ipv6_enabled(link) && mtu < IPV6_MIN_MTU) { +@@ -3220,6 +3216,10 @@ static int link_configure(Link *link) { + if (STRPTR_IN_SET(link->kind, "can", "vcan")) + return link_configure_can(link); + ++ /* If IPv6 configured that is static IPv6 address and IPv6LL autoconfiguration is enabled ++ * for this interface, then enable IPv6 */ ++ (void) link_enable_ipv6(link); ++ + r = link_set_proxy_arp(link); + if (r < 0) + return r; diff -Nru systemd-242/debian/patches/series systemd-242/debian/patches/series --- systemd-242/debian/patches/series 2020-02-06 14:45:57.000000000 +0000 +++ systemd-242/debian/patches/series 2020-04-20 12:56:49.000000000 +0000 @@ -99,3 +99,7 @@ lp1762391/0006-test-Add-tests-for-gid-list-ops.patch lp1762391/0007-execute-add-const-to-array-parameters-where-possible.patch lp1762391/0008-execute-allow-pam_setcred-to-fail-ignore-errors.patch +lp1859862-network-Do-not-disable-IPv6-by-writing-to-sysctl.patch +lp1858412-journalctl-allow-running-vacuum-on-remote-journals-t.patch +lp1776654-test-Synchronize-journal-before-reading-from-it.patch +lp1837914-journal-do-not-trigger-assertion-when-journal_file_c.patch diff -Nru systemd-242/debian/rules systemd-242/debian/rules --- systemd-242/debian/rules 2020-02-06 14:45:57.000000000 +0000 +++ systemd-242/debian/rules 2020-04-20 12:56:49.000000000 +0000 @@ -296,9 +296,7 @@ ifeq (, $(filter nocheck, $(DEB_BUILD_OPTIONS))) echo "01234567890123456789012345678901" > build-deb/machine-id # some tests hang under fakeroot, so disable fakeroot - env -u LD_PRELOAD SYSTEMD_MACHINE_ID_PATH=$(CURDIR)/build-deb/machine-id meson test -C build-deb $(TEST_TIMEOUT_MULTIPLIER) || ( \ - cat build-deb/meson-logs/testlog.txt; \ - exit 1) + env -u LD_PRELOAD SYSTEMD_MACHINE_ID_PATH=$(CURDIR)/build-deb/machine-id meson test -C build-deb --print-errorlogs $(TEST_TIMEOUT_MULTIPLIER) endif %: diff -Nru systemd-242/debian/tests/logind systemd-242/debian/tests/logind --- systemd-242/debian/tests/logind 2020-02-06 14:45:57.000000000 +0000 +++ systemd-242/debian/tests/logind 2020-04-20 12:36:51.000000000 +0000 @@ -42,7 +42,7 @@ echo " * Skipping suspend test in container" return fi - if ! grep -q mem /sys/power/state; then + if ! grep -s -q mem /sys/power/state; then echo " * suspend not supported on this testbed, skipping" return fi