Bug#985096: unblock: systemd/247.3-3

Michael Biebl biebl at debian.org
Fri Mar 12 19:45:09 GMT 2021


Package: release.debian.org
Severity: normal
User: release.debian.org at packages.debian.org
Usertags: unblock
X-Debbugs-Cc: pkg-systemd-maintainers at lists.alioth.debian.org, debian-boot at lists.debian.org, kibi at debian.org

Please unblock package systemd

I'd like to see systemd 247.3 unblocked.
It contains a number of fixes which are not critical but which I
consider polishing. Given the importance of the systemd package, I think
those changes are worthwile.

An annotated changelog follows:

systemd (247.3-3) unstable; urgency=medium

  * pkg-config: make prefix overridable again (Closes: #984763)

https://salsa.debian.org/systemd-team/systemd/-/commit/deaf89e4cbb5d1347a1e17f782df2e56ee58e42c
cherry-pick from upstream, low risk change, was explicitly requested for
development environments like jhbuild

  * Downgrade a couple of warnings to debug.
    If a package still ships only a SysV init script or if a service file or
    tmpfile uses /var/run, downgrade those messages to debug. We can use
    lintian to detect those issues.
    For service files and tmpfiles in /etc, keep the warning, as those files
    are typically added locally and aren't checked by lintian.
    (Closes: #981407)

https://salsa.debian.org/systemd-team/systemd/-/commit/0c6d90f783093fc255e529f8a33b2ed2a8e6c2d6
given that it only downgrades a couple of warnings, low regression
potential.

  * core: fix mtime calculation of dropin files
    (Closes: #975289)

https://salsa.debian.org/systemd-team/systemd/-/commit/39391c55cf5cee23f934e8ee29c9613ff4d33ed0
cherry-pick from upstream, probably the highest regression potential
from all changes. Fixes an annoying issue where systemd would
incorrectly report, that a .service file with .drop-in config was
modified on disk and requires a daemon-reload.

  * analyze: slightly reword PrivateTmp= message
    (Closes: #931753)

https://salsa.debian.org/systemd-team/systemd/-/commit/2ab3ec0387b12be15a2b61d3edc90929ec64d6a2
cherry-pick from upstream, trivial documentation update


 * rules: move ID_SMARTCARD_READER definition to a <70 configuration
    (Closes: #978011)

https://salsa.debian.org/systemd-team/systemd/-/commit/7d68acb67f2ff402fb764664a3b686ff7df424ae
cherry-pick from upstream, trivial change

  * table: drop trailing white spaces of the last cell in row
    (Closes: #980820)

https://salsa.debian.org/systemd-team/systemd/-/commit/7018915f046893bb013ac7fa09f3c95824e3cbc3
cherry-pick from upstream, fixes a regression compared to v241, i.e. the
current version in buster. It's more of a cosmetic issue, but the change
is rather small and if by chance it helps to fix scripts which parse the
output of systemd's tools, then it's probably worthwile to have this
change.

 -- Michael Biebl <biebl at debian.org>  Sat, 06 Mar 2021 22:32:14 +0100

We run a rather extensive test-suite and a we also have a lot of reverse
dependencies which were triggered by the upload, so the chances of a
(major) regression are small.

Full debdiff is attached. I've CCed kibi/debian-boot, since we build a
udeb.


Thanks for considering. If there are chances above which you don't
consider appropriate, please let me know and I will revert them in a -4
upload.

Regards,
Michael


unblock systemd/247.3-3
-------------- next part --------------
diff --git a/debian/changelog b/debian/changelog
index d1b21bb..0588fec 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,37 @@
+systemd (247.3-3) unstable; urgency=medium
+
+  * pkg-config: make prefix overridable again (Closes: #984763)
+  * Revert "units: turn off DNSSEC validation when timesyncd resolves
+    hostnames"
+    Support for SYSTEMD_NSS_RESOLVE_VALIDATE=0 requires the changes from
+    https://github.com/systemd/systemd/pull/17823 for the dnssec bypass
+    logic. Those are rather invasive changes and not suitable for a stable
+    backport.
+
+ -- Michael Biebl <biebl at debian.org>  Thu, 11 Mar 2021 18:09:35 +0100
+
+systemd (247.3-2) unstable; urgency=medium
+
+  * Downgrade a couple of warnings to debug.
+    If a package still ships only a SysV init script or if a service file or
+    tmpfile uses /var/run, downgrade those messages to debug. We can use
+    lintian to detect those issues.
+    For service files and tmpfiles in /etc, keep the warning, as those files
+    are typically added locally and aren't checked by lintian.
+    (Closes: #981407)
+  * core: fix mtime calculation of dropin files
+    (Closes: #975289)
+  * analyze: slightly reword PrivateTmp= message
+    (Closes: #931753)
+  * rules: move ID_SMARTCARD_READER definition to a <70 configuration
+    (Closes: #978011)
+  * units: turn off DNSSEC validation when timesyncd resolves hostnames
+    (Closes: #898530)
+  * table: drop trailing white spaces of the last cell in row
+    (Closes: #980820)
+
+ -- Michael Biebl <biebl at debian.org>  Sat, 06 Mar 2021 22:32:14 +0100
+
 systemd (247.3-1) unstable; urgency=medium
 
   [ Michael Biebl ]
diff --git a/debian/patches/analyze-slightly-reword-PrivateTmp-message.patch b/debian/patches/analyze-slightly-reword-PrivateTmp-message.patch
new file mode 100644
index 0000000..e6d9f1a
--- /dev/null
+++ b/debian/patches/analyze-slightly-reword-PrivateTmp-message.patch
@@ -0,0 +1,26 @@
+From: Lennart Poettering <lennart at poettering.net>
+Date: Wed, 10 Feb 2021 10:50:23 +0100
+Subject: analyze: slightly reword PrivateTmp= message
+
+Apparently there way confusion about "does not apply". Let's say "is not
+appropriate".
+
+Fixes: #13095
+(cherry picked from commit 77552b9520ba0d47cbf33cdbe1ddedb9ce9b5bf3)
+---
+ src/analyze/analyze-security.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/analyze/analyze-security.c b/src/analyze/analyze-security.c
+index 8d94fbc..99ec7b5 100644
+--- a/src/analyze/analyze-security.c
++++ b/src/analyze/analyze-security.c
+@@ -1545,7 +1545,7 @@ static int assess(const struct security_info *info, Table *overview_table, Analy
+ 
+                 if (a->default_dependencies_only && !info->default_dependencies) {
+                         badness = UINT64_MAX;
+-                        d = strdup("Service runs in special boot phase, option does not apply");
++                        d = strdup("Service runs in special boot phase, option is not appropriate");
+                         if (!d)
+                                 return log_oom();
+                 } else {
diff --git a/debian/patches/core-fix-mtime-calculation-of-dropin-files.patch b/debian/patches/core-fix-mtime-calculation-of-dropin-files.patch
new file mode 100644
index 0000000..4c6b1e8
--- /dev/null
+++ b/debian/patches/core-fix-mtime-calculation-of-dropin-files.patch
@@ -0,0 +1,100 @@
+From: =?utf-8?q?Zbigniew_J=C4=99drzejewski-Szmek?= <zbyszek at in.waw.pl>
+Date: Thu, 4 Mar 2021 00:36:24 +0100
+Subject: core: fix mtime calculation of dropin files
+
+Nominally, the bug was in unit_load_dropin(), which just took the last mtime
+instead of calculating the maximum. But instead of adding code to wrap the
+loop, this patch goes in the other direction.
+
+All (correct) callers of config_parse() followed a very similar pattern to
+calculate the maximum mtime. So let's simplify things by making config_parse()
+assume that mtime is initialized and update it to the maximum. This makes all
+the callers that care about mtime simpler and also fixes the issue in
+unit_load_dropin().
+
+config_parse_many_nulstr() and config_parse_many() are different, because it
+makes sense to call them just once, and current ret_mtime behaviour make sense.
+
+Fixes #17730, https://bugzilla.redhat.com/show_bug.cgi?id=1933137.
+
+(cherry picked from commit da46a1bc3cd28ac36114002c216196dae004b05c)
+---
+ src/core/load-dropin.c   |  1 +
+ src/shared/conf-parser.c | 15 +++++++--------
+ src/shared/conf-parser.h |  2 +-
+ 3 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/src/core/load-dropin.c b/src/core/load-dropin.c
+index d1c85e2..3bb4856 100644
+--- a/src/core/load-dropin.c
++++ b/src/core/load-dropin.c
+@@ -112,6 +112,7 @@ int unit_load_dropin(Unit *u) {
+                         return log_oom();
+         }
+ 
++        u->dropin_mtime = 0;
+         STRV_FOREACH(f, u->dropin_paths)
+                 (void) config_parse(
+                                 u->id, *f, NULL,
+diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c
+index 35d301d..099c47a 100644
+--- a/src/shared/conf-parser.c
++++ b/src/shared/conf-parser.c
+@@ -259,7 +259,7 @@ int config_parse(const char *unit,
+                  const void *table,
+                  ConfigParseFlags flags,
+                  void *userdata,
+-                 usec_t *ret_mtime) {
++                 usec_t *latest_mtime) {
+ 
+         _cleanup_free_ char *section = NULL, *continuation = NULL;
+         _cleanup_fclose_ FILE *ours = NULL;
+@@ -271,6 +271,9 @@ int config_parse(const char *unit,
+         assert(filename);
+         assert(lookup);
+ 
++        /* latest_mtime is an input-output parameter: it will be updated if the mtime of the file we're
++         * looking at is later than the current *latest_mtime value. */
++
+         if (!f) {
+                 f = ours = fopen(filename, "re");
+                 if (!f) {
+@@ -413,8 +416,8 @@ int config_parse(const char *unit,
+                 }
+         }
+ 
+-        if (ret_mtime)
+-                *ret_mtime = mtime;
++        if (latest_mtime)
++                *latest_mtime = MAX(*latest_mtime, mtime);
+ 
+         return 0;
+ }
+@@ -440,13 +443,9 @@ static int config_parse_many_files(
+         }
+ 
+         STRV_FOREACH(fn, files) {
+-                usec_t t;
+-
+-                r = config_parse(NULL, *fn, NULL, sections, lookup, table, flags, userdata, &t);
++                r = config_parse(NULL, *fn, NULL, sections, lookup, table, flags, userdata, &mtime);
+                 if (r < 0)
+                         return r;
+-                if (t > mtime) /* Find the newest */
+-                        mtime = t;
+         }
+ 
+         if (ret_mtime)
+diff --git a/src/shared/conf-parser.h b/src/shared/conf-parser.h
+index f115cb2..84c9bf6 100644
+--- a/src/shared/conf-parser.h
++++ b/src/shared/conf-parser.h
+@@ -89,7 +89,7 @@ int config_parse(
+                 const void *table,
+                 ConfigParseFlags flags,
+                 void *userdata,
+-                usec_t *ret_mtime);         /* possibly NULL */
++                usec_t *latest_mtime);      /* input/output, possibly NULL */
+ 
+ int config_parse_many_nulstr(
+                 const char *conf_file,      /* possibly NULL */
diff --git a/debian/patches/debian/Downgrade-a-couple-of-warnings-to-debug.patch b/debian/patches/debian/Downgrade-a-couple-of-warnings-to-debug.patch
new file mode 100644
index 0000000..466a232
--- /dev/null
+++ b/debian/patches/debian/Downgrade-a-couple-of-warnings-to-debug.patch
@@ -0,0 +1,74 @@
+From: Michael Biebl <biebl at debian.org>
+Date: Tue, 16 Feb 2021 00:18:50 +0100
+Subject: Downgrade a couple of warnings to debug
+
+If a package still ships only a SysV init script or if a service file or
+tmpfile uses /var/run, downgrade those messages to debug. We can use
+lintian to detect those issues.
+For service files and tmpfiles in /etc, keep the warning, as those files
+are typically added locally and aren't checked by lintian.
+
+Closes: #981407
+---
+ src/core/load-fragment.c            | 4 +++-
+ src/sysv-generator/sysv-generator.c | 2 +-
+ src/tmpfiles/tmpfiles.c             | 4 +++-
+ 3 files changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
+index 4964249..2d48783 100644
+--- a/src/core/load-fragment.c
++++ b/src/core/load-fragment.c
+@@ -372,6 +372,7 @@ static int patch_var_run(
+ 
+         const char *e;
+         char *z;
++        int log_level;
+ 
+         e = path_startswith(*path, "/var/run/");
+         if (!e)
+@@ -381,7 +382,8 @@ static int patch_var_run(
+         if (!z)
+                 return log_oom();
+ 
+-        log_syntax(unit, LOG_NOTICE, filename, line, 0,
++        log_level = path_startswith(filename, "/etc") ? LOG_NOTICE : LOG_DEBUG;
++        log_syntax(unit, log_level, filename, line, 0,
+                    "%s= references a path below legacy directory /var/run/, updating %s ? %s; "
+                    "please update the unit file accordingly.", lvalue, *path, z);
+ 
+diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
+index 008a825..ab0054e 100644
+--- a/src/sysv-generator/sysv-generator.c
++++ b/src/sysv-generator/sysv-generator.c
+@@ -787,7 +787,7 @@ static int enumerate_sysv(const LookupPaths *lp, Hashmap *all_services) {
+                         if (!fpath)
+                                 return log_oom();
+ 
+-                        log_warning("SysV service '%s' lacks a native systemd unit file. "
++                        log_debug("SysV service '%s' lacks a native systemd unit file. "
+                                     "Automatically generating a unit file for compatibility. "
+                                     "Please update package to include a native systemd unit file, in order to make it more safe and robust.", fpath);
+ 
+diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
+index 9906c70..31e5707 100644
+--- a/src/tmpfiles/tmpfiles.c
++++ b/src/tmpfiles/tmpfiles.c
+@@ -2538,6 +2538,7 @@ static int specifier_expansion_from_arg(Item *i) {
+ static int patch_var_run(const char *fname, unsigned line, char **path) {
+         const char *k;
+         char *n;
++        int log_level;
+ 
+         assert(path);
+         assert(*path);
+@@ -2563,7 +2564,8 @@ static int patch_var_run(const char *fname, unsigned line, char **path) {
+         /* Also log about this briefly. We do so at LOG_NOTICE level, as we fixed up the situation automatically, hence
+          * there's no immediate need for action by the user. However, in the interest of making things less confusing
+          * to the user, let's still inform the user that these snippets should really be updated. */
+-        log_syntax(NULL, LOG_NOTICE, fname, line, 0, "Line references path below legacy directory /var/run/, updating %s ? %s; please update the tmpfiles.d/ drop-in file accordingly.", *path, n);
++        log_level = path_startswith(fname, "/etc") ? LOG_NOTICE : LOG_DEBUG;
++        log_syntax(NULL, log_level, fname, line, 0, "Line references path below legacy directory /var/run/, updating %s ? %s; please update the tmpfiles.d/ drop-in file accordingly.", *path, n);
+ 
+         free_and_replace(*path, n);
+ 
diff --git a/debian/patches/debian/Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-back-to-.patch b/debian/patches/debian/Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-back-to-.patch
index 4b8bf19..ae0bb3f 100644
--- a/debian/patches/debian/Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-back-to-.patch
+++ b/debian/patches/debian/Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-back-to-.patch
@@ -14,11 +14,11 @@ Closes: #971282
  2 files changed, 8 insertions(+), 8 deletions(-)
 
 diff --git a/src/core/systemd.pc.in b/src/core/systemd.pc.in
-index f2c0455..a009020 100644
+index b5cc8f9..21dbf30 100644
 --- a/src/core/systemd.pc.in
 +++ b/src/core/systemd.pc.in
 @@ -65,16 +65,16 @@ systemdshutdowndir=${systemd_shutdown_dir}
- tmpfiles_dir=/usr/lib/tmpfiles.d
+ tmpfiles_dir=${prefix}/lib/tmpfiles.d
  tmpfilesdir=${tmpfiles_dir}
  
 -sysusers_dir=${rootprefix}/lib/sysusers.d
@@ -37,7 +37,7 @@ index f2c0455..a009020 100644
 +modules_load_dir=${prefix}/lib/modules-load.d
  modulesloaddir=${modules_load_dir}
  
- catalog_dir=/usr/lib/systemd/catalog
+ catalog_dir=${prefix}/lib/systemd/catalog
 diff --git a/src/libsystemd/sd-path/sd-path.c b/src/libsystemd/sd-path/sd-path.c
 index 61ed7cb..682e3f1 100644
 --- a/src/libsystemd/sd-path/sd-path.c
diff --git a/debian/patches/pkg-config-make-prefix-overridable-again.patch b/debian/patches/pkg-config-make-prefix-overridable-again.patch
new file mode 100644
index 0000000..68e50bc
--- /dev/null
+++ b/debian/patches/pkg-config-make-prefix-overridable-again.patch
@@ -0,0 +1,75 @@
+From: Jan Tojnar <jtojnar at gmail.com>
+Date: Sat, 2 Jan 2021 02:46:33 +0100
+Subject: pkg-config: make prefix overridable again
+
+While we don't support prefix being != /usr, and this is hardcoded
+all over the place, variables in pkg-config file are expected
+to have overridable base directory.
+
+This is important for at least the following two use cases:
+
+- Installing projects to non-FHS package-specific prefixes for Nix-style
+  package managers. Of course, it is then their responsibility
+  to ensure systemd can find the service files.
+- Installing to local path for development purposes.
+  This is a compromise between running a program from a build directory,
+  and running it fully installed to system prefix.
+
+You will not want to write to system prefix in either case.
+
+For more information, see also
+https://www.bassi.io/articles/2018/03/15/pkg-config-and-paths/
+
+Fixes https://github.com/systemd/systemd/issues/18082
+
+Partially reverts 6e65df89c348242dbd10036abc7dd5e8181cf733
+
+(cherry picked from commit 60bce7c6d9606185114df1bdcd5ea100407688b8)
+---
+ src/core/systemd.pc.in | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/core/systemd.pc.in b/src/core/systemd.pc.in
+index f2c0455..b5cc8f9 100644
+--- a/src/core/systemd.pc.in
++++ b/src/core/systemd.pc.in
+@@ -26,10 +26,10 @@ systemdsystemunitdir=${systemd_system_unit_dir}
+ systemd_system_preset_dir=${rootprefix}/lib/systemd/system-preset
+ systemdsystempresetdir=${systemd_system_preset_dir}
+ 
+-systemd_user_unit_dir=/usr/lib/systemd/user
++systemd_user_unit_dir=${prefix}/lib/systemd/user
+ systemduserunitdir=${systemd_user_unit_dir}
+ 
+-systemd_user_preset_dir=/usr/lib/systemd/user-preset
++systemd_user_preset_dir=${prefix}/lib/systemd/user-preset
+ systemduserpresetdir=${systemd_user_preset_dir}
+ 
+ systemd_system_conf_dir=${sysconfdir}/systemd/system
+@@ -47,7 +47,7 @@ systemduserunitpath=${systemd_user_unit_path}
+ systemd_system_generator_dir=${root_prefix}/lib/systemd/system-generators
+ systemdsystemgeneratordir=${systemd_system_generator_dir}
+ 
+-systemd_user_generator_dir=/usr/lib/systemd/user-generators
++systemd_user_generator_dir=${prefix}/lib/systemd/user-generators
+ systemdusergeneratordir=${systemd_user_generator_dir}
+ 
+ systemd_system_generator_path=/run/systemd/system-generators:/etc/systemd/system-generators:/usr/local/lib/systemd/system-generators:${systemd_system_generator_dir}
+@@ -62,7 +62,7 @@ systemdsleepdir=${systemd_sleep_dir}
+ systemd_shutdown_dir=${root_prefix}/lib/systemd/system-shutdown
+ systemdshutdowndir=${systemd_shutdown_dir}
+ 
+-tmpfiles_dir=/usr/lib/tmpfiles.d
++tmpfiles_dir=${prefix}/lib/tmpfiles.d
+ tmpfilesdir=${tmpfiles_dir}
+ 
+ sysusers_dir=${rootprefix}/lib/sysusers.d
+@@ -77,7 +77,7 @@ binfmtdir=${binfmt_dir}
+ modules_load_dir=${rootprefix}/lib/modules-load.d
+ modulesloaddir=${modules_load_dir}
+ 
+-catalog_dir=/usr/lib/systemd/catalog
++catalog_dir=${prefix}/lib/systemd/catalog
+ catalogdir=${catalog_dir}
+ 
+ system_uid_max=@SYSTEM_UID_MAX@
diff --git a/debian/patches/rules-Move-ID_SMARTCARD_READER-definition-to-a-70-configu.patch b/debian/patches/rules-Move-ID_SMARTCARD_READER-definition-to-a-70-configu.patch
new file mode 100644
index 0000000..d338f49
--- /dev/null
+++ b/debian/patches/rules-Move-ID_SMARTCARD_READER-definition-to-a-70-configu.patch
@@ -0,0 +1,41 @@
+From: Vincent Pelletier <plr.vincent at gmail.com>
+Date: Sat, 27 Feb 2021 00:17:06 +0000
+Subject: rules: Move ID_SMARTCARD_READER definition to a <70 configuration.
+
+70-uaccess.rules sets the uaccess tag on devices with ID_SMARTCARD_READER
+set, but it is set in 99-systemd.rules .
+Move this to a 60-*.rules which already matches USB CCID class, factorising
+the matching, so 70-uaccess.rules sets up these devices as expected.
+
+(cherry picked from commit dbdcd51f78bde5e9033d98d61bbb750c868bde9d)
+---
+ rules.d/60-fido-id.rules    | 3 ++-
+ rules.d/99-systemd.rules.in | 1 -
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/rules.d/60-fido-id.rules b/rules.d/60-fido-id.rules
+index c7d5d2f..48c259e 100644
+--- a/rules.d/60-fido-id.rules
++++ b/rules.d/60-fido-id.rules
+@@ -7,7 +7,8 @@ SUBSYSTEM=="hidraw", IMPORT{program}="fido_id"
+ # Tag any form of security token as such
+ ENV{ID_SECURITY_TOKEN}=="1", TAG+="security-device"
+ 
++SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0b????:*", ENV{ID_SMARTCARD_READER}="1"
+ # Tag any CCID device (i.e. Smartcard Reader) as security token
+-SUBSYSTEM=="usb", ATTR{bInterfaceClass}=="0b", TAG+="security-device"
++ENV{ID_SMARTCARD_READER}=="1", TAG+="security-device"
+ 
+ LABEL="fido_id_end"
+diff --git a/rules.d/99-systemd.rules.in b/rules.d/99-systemd.rules.in
+index 7c22eef..0abca6e 100644
+--- a/rules.d/99-systemd.rules.in
++++ b/rules.d/99-systemd.rules.in
+@@ -49,7 +49,6 @@ SUBSYSTEM=="net", KERNEL!="lo", TAG+="systemd", ENV{SYSTEMD_ALIAS}+="/sys/subsys
+ SUBSYSTEM=="bluetooth", TAG+="systemd", ENV{SYSTEMD_ALIAS}+="/sys/subsystem/bluetooth/devices/%k", \
+   ENV{SYSTEMD_WANTS}+="bluetooth.target", ENV{SYSTEMD_USER_WANTS}+="bluetooth.target"
+ 
+-SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0b????:*", ENV{ID_SMARTCARD_READER}="1"
+ ENV{ID_SMARTCARD_READER}=="?*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="smartcard.target", ENV{SYSTEMD_USER_WANTS}+="smartcard.target"
+ SUBSYSTEM=="sound", KERNEL=="controlC*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="sound.target", ENV{SYSTEMD_USER_WANTS}+="sound.target"
+ 
diff --git a/debian/patches/series b/debian/patches/series
index e5577c3..5b05dca 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1,10 @@
 Add-helper-for-case-independent-string-equality-checks.patch
 localed-Run-locale-gen-if-available-to-generate-missing-l.patch
+core-fix-mtime-calculation-of-dropin-files.patch
+analyze-slightly-reword-PrivateTmp-message.patch
+rules-Move-ID_SMARTCARD_READER-definition-to-a-70-configu.patch
+table-drop-trailing-white-spaces-of-the-last-cell-in-row.patch
+pkg-config-make-prefix-overridable-again.patch
 debian/Use-Debian-specific-config-files.patch
 debian/Bring-tmpfiles.d-tmp.conf-in-line-with-Debian-defaul.patch
 debian/Make-run-lock-tmpfs-an-API-fs.patch
@@ -21,3 +26,4 @@ debian/Keep-journal-files-compatible-with-older-versions.patch
 debian/Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-back-to-.patch
 debian/systemctl-do-not-shutdown-immediately-on-scheduled-shutdo.patch
 debian/test-disable-DnsmasqClientTest.test_resolved_etc_hosts-in.patch
+debian/Downgrade-a-couple-of-warnings-to-debug.patch
diff --git a/debian/patches/table-drop-trailing-white-spaces-of-the-last-cell-in-row.patch b/debian/patches/table-drop-trailing-white-spaces-of-the-last-cell-in-row.patch
new file mode 100644
index 0000000..fea1aec
--- /dev/null
+++ b/debian/patches/table-drop-trailing-white-spaces-of-the-last-cell-in-row.patch
@@ -0,0 +1,167 @@
+From: Yu Watanabe <watanabe.yu+github at gmail.com>
+Date: Tue, 2 Feb 2021 01:47:58 +0900
+Subject: table: drop trailing white spaces of the last cell in row
+
+Fixes #18415.
+
+(cherry picked from commit 71894e18313e41a72cecdc77fea5037f95d6903f)
+---
+ src/shared/format-table.c    |  6 ++++++
+ src/test/test-format-table.c | 40 ++++++++++++++++++++--------------------
+ 2 files changed, 26 insertions(+), 20 deletions(-)
+
+diff --git a/src/shared/format-table.c b/src/shared/format-table.c
+index a13a198..2dc95e9 100644
+--- a/src/shared/format-table.c
++++ b/src/shared/format-table.c
+@@ -2155,6 +2155,12 @@ int table_print(Table *t, FILE *f) {
+                                                 if (!aligned)
+                                                         return -ENOMEM;
+ 
++                                                /* Drop trailing white spaces of last column when no cosmetics is set. */
++                                                if (j == display_columns - 1 &&
++                                                    (!colors_enabled() || !table_data_color(d)) &&
++                                                    (!urlify_enabled() || !d->url))
++                                                        delete_trailing_chars(aligned, NULL);
++
+                                                 free_and_replace(buffer, aligned);
+                                                 field = buffer;
+                                         }
+diff --git a/src/test/test-format-table.c b/src/test/test-format-table.c
+index 24ee1df..b2943e6 100644
+--- a/src/test/test-format-table.c
++++ b/src/test/test-format-table.c
+@@ -29,7 +29,7 @@ static void test_issue_9549(void) {
+ 
+         printf("%s\n", formatted);
+         assert_se(streq(formatted,
+-                        "NAME  TYPE RO  USAGE CREATED                    MODIFIED                   \n"
++                        "NAME  TYPE RO  USAGE CREATED                    MODIFIED\n"
+                         "foooo raw  no 673.6M Wed 2018-07-11 00:10:33 J? Wed 2018-07-11 00:16:00 JST\n"
+                         ));
+ }
+@@ -72,7 +72,7 @@ static void test_multiline(void) {
+                         "FOO         BAR\n"
+                         "three       two\n"
+                         "different lines\n"
+-                        "lines          \n"));
++                        "lines     \n"));
+         formatted = mfree(formatted);
+ 
+         table_set_cell_height_max(table, (size_t) -1);
+@@ -82,7 +82,7 @@ static void test_multiline(void) {
+                         "FOO         BAR\n"
+                         "three       two\n"
+                         "different lines\n"
+-                        "lines          \n"));
++                        "lines     \n"));
+         formatted = mfree(formatted);
+ 
+         assert_se(table_add_many(table,
+@@ -123,7 +123,7 @@ static void test_multiline(void) {
+                         "FOO         BAR\n"
+                         "three       two\n"
+                         "different lines\n"
+-                        "lines          \n"
++                        "lines     \n"
+                         "short         a\n"
+                         "           pair\n"
+                         "short2        a\n"
+@@ -138,7 +138,7 @@ static void test_multiline(void) {
+                         "FOO         BAR\n"
+                         "three       two\n"
+                         "different lines\n"
+-                        "lines          \n"
++                        "lines     \n"
+                         "short         a\n"
+                         "           pair\n"
+                         "short2        a\n"
+@@ -186,7 +186,7 @@ static void test_strv(void) {
+                         "FOO         BAR\n"
+                         "three       two\n"
+                         "different lines\n"
+-                        "lines          \n"));
++                        "lines     \n"));
+         formatted = mfree(formatted);
+ 
+         table_set_cell_height_max(table, (size_t) -1);
+@@ -196,7 +196,7 @@ static void test_strv(void) {
+                         "FOO         BAR\n"
+                         "three       two\n"
+                         "different lines\n"
+-                        "lines          \n"));
++                        "lines     \n"));
+         formatted = mfree(formatted);
+ 
+         assert_se(table_add_many(table,
+@@ -237,7 +237,7 @@ static void test_strv(void) {
+                         "FOO         BAR\n"
+                         "three       two\n"
+                         "different lines\n"
+-                        "lines          \n"
++                        "lines     \n"
+                         "short         a\n"
+                         "           pair\n"
+                         "short2        a\n"
+@@ -252,7 +252,7 @@ static void test_strv(void) {
+                         "FOO         BAR\n"
+                         "three       two\n"
+                         "different lines\n"
+-                        "lines          \n"
++                        "lines     \n"
+                         "short         a\n"
+                         "           pair\n"
+                         "short2        a\n"
+@@ -333,7 +333,7 @@ static void test_strv_wrapped(void) {
+         assert_se(streq(formatted,
+                         "FOO                           BAR\n"
+                         "three different         two lines\n"
+-                        "lines                            \n"
++                        "lines           \n"
+                         "short                      a pair\n"
+                         "short2          a eight line ????\n"
+                         "                 ___5___ ___6___?\n"));
+@@ -345,7 +345,7 @@ static void test_strv_wrapped(void) {
+         assert_se(streq(formatted,
+                         "FOO                           BAR\n"
+                         "three different         two lines\n"
+-                        "lines                            \n"
++                        "lines           \n"
+                         "short                      a pair\n"
+                         "short2          a eight line ????\n"
+                         "                  ___5___ ___6___\n"
+@@ -358,7 +358,7 @@ static void test_strv_wrapped(void) {
+         assert_se(streq(formatted,
+                         "FOO                           BAR\n"
+                         "three different         two lines\n"
+-                        "lines                            \n"
++                        "lines           \n"
+                         "short                      a pair\n"
+                         "short2          a eight line ????\n"
+                         "                  ___5___ ___6___\n"
+@@ -493,17 +493,17 @@ int main(int argc, char *argv[]) {
+         if (isatty(STDOUT_FILENO))
+                 assert_se(streq(formatted,
+                                 "  no a long f?   no a long f? a long fi?\n"
+-                                "  no f???        no f???      f???      \n"
+-                                " yes f???       yes f???      f???      \n"
+-                                " yes xxx        yes xxx       xxx       \n"
+-                                "5min           5min                     \n"));
++                                "  no f???        no f???      f???\n"
++                                " yes f???       yes f???      f???\n"
++                                " yes xxx        yes xxx       xxx\n"
++                                "5min           5min           \n"));
+         else
+                 assert_se(streq(formatted,
+                                 "  no a long field   no a long field a long field\n"
+-                                "  no f???           no f???         f???        \n"
+-                                " yes f???          yes f???         f???        \n"
+-                                " yes xxx           yes xxx          xxx         \n"
+-                                "5min              5min                          \n"));
++                                "  no f???           no f???         f???\n"
++                                " yes f???          yes f???         f???\n"
++                                " yes xxx           yes xxx          xxx\n"
++                                "5min              5min              \n"));
+ 
+         test_issue_9549();
+         test_multiline();


More information about the Pkg-systemd-maintainers mailing list