Version in base suite: 247.3-7+deb11u2 Base version: systemd_247.3-7+deb11u2 Target version: systemd_247.3-7+deb11u3 Base file: /srv/ftp-master.debian.org/ftp/pool/main/s/systemd/systemd_247.3-7+deb11u2.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/s/systemd/systemd_247.3-7+deb11u3.dsc changelog | 8 + patches/Always-free-deserialized_subscribed-on-reload.patch | 25 ++++ patches/Revert-udev-do-not-execute-hwdb-builtin-import-twice-or-t.patch | 52 ++++++++++ patches/series | 3 patches/udev-first-set-properties-based-on-usb-subsystem.patch | 34 ++++++ 5 files changed, 122 insertions(+) diff: /srv/release.debian.org/tmp/Lun3qk8v0Y/systemd-247.3/test/testdata: recursive directory loop diff -Nru systemd-247.3/debian/changelog systemd-247.3/debian/changelog --- systemd-247.3/debian/changelog 2022-12-22 11:55:42.000000000 +0000 +++ systemd-247.3/debian/changelog 2023-04-30 12:56:31.000000000 +0000 @@ -1,3 +1,11 @@ +systemd (247.3-7+deb11u3) bullseye; urgency=medium + + * udev: fix creating /dev/serial/by-id/ symlinks for USB devices. + (Closes: #1035094) + * Fix memory leak on daemon-reload + + -- Luca Boccassi Sun, 30 Apr 2023 13:56:31 +0100 + systemd (247.3-7+deb11u2) bullseye; urgency=medium [ Michael Biebl ] diff -Nru systemd-247.3/debian/patches/Always-free-deserialized_subscribed-on-reload.patch systemd-247.3/debian/patches/Always-free-deserialized_subscribed-on-reload.patch --- systemd-247.3/debian/patches/Always-free-deserialized_subscribed-on-reload.patch 1970-01-01 00:00:00.000000000 +0000 +++ systemd-247.3/debian/patches/Always-free-deserialized_subscribed-on-reload.patch 2023-04-30 12:50:03.000000000 +0000 @@ -0,0 +1,25 @@ +From: Ali Abdallah +Date: Thu, 21 Jan 2021 07:37:21 +0100 +Subject: Always free deserialized_subscribed on reload + +Otherwise, it will keep consuming memory on systemctl daemon-reload. + +(cherry picked from commit 3deed59afdc2c18ecb76fe90b9bba0cd66045dfa) +--- + src/core/manager.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/core/manager.c b/src/core/manager.c +index a1d6f7c..6858950 100644 +--- a/src/core/manager.c ++++ b/src/core/manager.c +@@ -3842,6 +3842,9 @@ int manager_reload(Manager *m) { + /* Clean up runtime objects no longer referenced */ + manager_vacuum(m); + ++ /* Clean up deserialized tracked clients */ ++ m->deserialized_subscribed = strv_free(m->deserialized_subscribed); ++ + /* Consider the reload process complete now. */ + assert(m->n_reloading > 0); + m->n_reloading--; diff -Nru systemd-247.3/debian/patches/Revert-udev-do-not-execute-hwdb-builtin-import-twice-or-t.patch systemd-247.3/debian/patches/Revert-udev-do-not-execute-hwdb-builtin-import-twice-or-t.patch --- systemd-247.3/debian/patches/Revert-udev-do-not-execute-hwdb-builtin-import-twice-or-t.patch 1970-01-01 00:00:00.000000000 +0000 +++ systemd-247.3/debian/patches/Revert-udev-do-not-execute-hwdb-builtin-import-twice-or-t.patch 2023-04-30 12:50:03.000000000 +0000 @@ -0,0 +1,52 @@ +From: =?utf-8?q?Zbigniew_J=C4=99drzejewski-Szmek?= +Date: Wed, 10 Mar 2021 10:17:23 +0100 +Subject: Revert "udev: do not execute hwdb builtin import twice or thrice" + +This reverts commit 876c75fe870846b09b54423a6b719d80bc879b27. + +The patch seems to cause usb devices to get some attributes set from the parent +PCI device. 'hwdb' builtin has support for breaking iteration upwards on usb +devices. But when '--subsystem=foo' is specified, iteration is continued. I'm +sure it *could* be figured out, but it seems hard to get all the combinations +correct. So let's revert to functional status quo ante, even if does the lookup +more than once unnecessarily. + +Fixes #18125. + +(cherry picked from commit 451ba55fecd8b494add2001b3ca3c1915c8fd655) +--- + rules.d/50-udev-default.rules.in | 3 +-- + rules.d/60-serial.rules | 5 ++--- + 2 files changed, 3 insertions(+), 5 deletions(-) + +diff --git a/rules.d/50-udev-default.rules.in b/rules.d/50-udev-default.rules.in +index cef78f9..50747a1 100644 +--- a/rules.d/50-udev-default.rules.in ++++ b/rules.d/50-udev-default.rules.in +@@ -10,9 +10,8 @@ SUBSYSTEM=="virtio-ports", KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio- + SUBSYSTEM=="rtc", ATTR{hctosys}=="1", SYMLINK+="rtc" + SUBSYSTEM=="rtc", KERNEL=="rtc0", SYMLINK+="rtc", OPTIONS+="link_priority=-100" + +-SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb", GOTO="default_hwdb_imported" ++SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb" + ENV{MODALIAS}!="", IMPORT{builtin}="hwdb --subsystem=$env{SUBSYSTEM}" +-LABEL="default_hwdb_imported" + + ACTION!="add", GOTO="default_end" + +diff --git a/rules.d/60-serial.rules b/rules.d/60-serial.rules +index b162665..f303e27 100644 +--- a/rules.d/60-serial.rules ++++ b/rules.d/60-serial.rules +@@ -4,9 +4,8 @@ ACTION=="remove", GOTO="serial_end" + SUBSYSTEM!="tty", GOTO="serial_end" + + SUBSYSTEMS=="pci", ENV{ID_BUS}="pci", ENV{ID_VENDOR_ID}="$attr{vendor}", ENV{ID_MODEL_ID}="$attr{device}" +-# We already ran the hwdb builtin for devices with MODALIAS in 50-default.rules. +-# Let's cover the remaining case here, where we walk up the tree to find a node with $MODALIAS. +-ENV{MODALIAS}=="", SUBSYSTEMS=="pci", IMPORT{builtin}="hwdb --subsystem=pci" ++SUBSYSTEMS=="pci", IMPORT{builtin}="hwdb --subsystem=pci" ++SUBSYSTEMS=="usb", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb" + + # /dev/serial/by-path/, /dev/serial/by-id/ for USB devices + KERNEL!="ttyUSB[0-9]*|ttyACM[0-9]*", GOTO="serial_end" diff -Nru systemd-247.3/debian/patches/series systemd-247.3/debian/patches/series --- systemd-247.3/debian/patches/series 2022-12-22 11:55:42.000000000 +0000 +++ systemd-247.3/debian/patches/series 2023-04-30 12:51:17.000000000 +0000 @@ -30,10 +30,13 @@ virt-detect-OpenStack-Nova-instance.patch ata_id-Fixed-getting-Response-Code-from-SCSI-Sense-Data-2.patch udev-always-create-device-symlinks-for-USB-disks.patch +Revert-udev-do-not-execute-hwdb-builtin-import-twice-or-t.patch +udev-first-set-properties-based-on-usb-subsystem.patch logind-fix-getting-property-OnExternalPower-via-D-Bus.patch coredump-do-not-allow-user-to-access-coredumps-with-chang.patch time-util-fix-buffer-over-run.patch machined-varlink-fix-double-free.patch +Always-free-deserialized_subscribed-on-reload.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 diff -Nru systemd-247.3/debian/patches/udev-first-set-properties-based-on-usb-subsystem.patch systemd-247.3/debian/patches/udev-first-set-properties-based-on-usb-subsystem.patch --- systemd-247.3/debian/patches/udev-first-set-properties-based-on-usb-subsystem.patch 1970-01-01 00:00:00.000000000 +0000 +++ systemd-247.3/debian/patches/udev-first-set-properties-based-on-usb-subsystem.patch 2023-04-30 12:50:03.000000000 +0000 @@ -0,0 +1,34 @@ +From: Yu Watanabe +Date: Thu, 3 Nov 2022 09:39:36 +0900 +Subject: udev: first set properties based on usb subsystem + +After 479da1107a0d4e2f7ef5cd938512b87a0e45f180, the usb_id builtin +command does not set ID_SERIAL if ID_BUS is already set. +Before the commit, all properties set based on pci bus were overwritten +by the usb_id, hence now it is sufficient setting them only when ID_BUS is +not set yet. + +Fixes #25238. + +(cherry picked from commit 01e704eba982fbc1517287cd261d229ff8e0a779) +--- + rules.d/60-serial.rules | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/rules.d/60-serial.rules b/rules.d/60-serial.rules +index f303e27..c133f26 100644 +--- a/rules.d/60-serial.rules ++++ b/rules.d/60-serial.rules +@@ -3,9 +3,10 @@ + ACTION=="remove", GOTO="serial_end" + SUBSYSTEM!="tty", GOTO="serial_end" + +-SUBSYSTEMS=="pci", ENV{ID_BUS}="pci", ENV{ID_VENDOR_ID}="$attr{vendor}", ENV{ID_MODEL_ID}="$attr{device}" +-SUBSYSTEMS=="pci", IMPORT{builtin}="hwdb --subsystem=pci" + SUBSYSTEMS=="usb", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb" ++SUBSYSTEMS=="pci", ENV{ID_BUS}=="", ENV{ID_BUS}="pci", \ ++ ENV{ID_VENDOR_ID}="$attr{vendor}", ENV{ID_MODEL_ID}="$attr{device}", \ ++ IMPORT{builtin}="hwdb --subsystem=pci" + + # /dev/serial/by-path/, /dev/serial/by-id/ for USB devices + KERNEL!="ttyUSB[0-9]*|ttyACM[0-9]*", GOTO="serial_end"