]> git.proxmox.com Git - systemd.git/commitdiff
Backport patches to fix tmpfiles error and missing /dev/serial/by-id/usb-*
authorLuca Boccassi <bluca@debian.org>
Fri, 4 Nov 2022 15:25:29 +0000 (15:25 +0000)
committerLuca Boccassi <bluca@debian.org>
Fri, 4 Nov 2022 15:28:32 +0000 (15:28 +0000)
https://github.com/systemd/systemd/pull/25246
https://github.com/systemd/systemd/pull/25251

Closes: #1023311
debian/patches/debian/Don-t-enable-audit-by-default.patch
debian/patches/debian/Downgrade-a-couple-of-warnings-to-debug.patch
debian/patches/debian/Re-enable-journal-forwarding-to-syslog.patch
debian/patches/series
debian/patches/tmpfiles.d-do-not-fail-if-provision.conf-fails.patch [new file with mode: 0644]
debian/patches/udev-first-set-properties-based-on-usb-subsystem.patch [new file with mode: 0644]

index 11c714264424184114e190d04cc18a3558cef34f..9f54054b9282a672a44998e58696a1eb7202f12c 100644 (file)
@@ -16,10 +16,10 @@ Bug-Debian: https://bugs.debian.org/773528
  3 files changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/man/journald.conf.xml b/man/journald.conf.xml
-index 043b3ea..91ba8f0 100644
+index 185e1dc..d963a1d 100644
 --- a/man/journald.conf.xml
 +++ b/man/journald.conf.xml
-@@ -434,7 +434,7 @@
+@@ -429,7 +429,7 @@
          <command>systemd-journald</command> collects generated audit records, it just controls whether it
          tells the kernel to generate them. This means if another tool turns on auditing even if
          <command>systemd-journald</command> left it off, it will still collect the generated
index 379e8904eb953f752637208e042af306a71d7c3e..ef3a739ecf87526d3e3357ea6bd71814fb3c095e 100644 (file)
@@ -51,7 +51,7 @@ index 3c5df6c..24eff86 100644
                                      "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 7687316..2240ff9 100644
+index 784b895..de75047 100644
 --- a/src/tmpfiles/tmpfiles.c
 +++ b/src/tmpfiles/tmpfiles.c
 @@ -2970,6 +2970,7 @@ static int specifier_expansion_from_arg(const Specifier *specifier_table, Item *
index 678d720bf36113d91c4f7e07604b93858cda0202..99707330f1826672ab8b15c498ca115b9ca044da 100644 (file)
@@ -17,10 +17,10 @@ conf.d snippet.
  3 files changed, 3 insertions(+), 2 deletions(-)
 
 diff --git a/man/journald.conf.xml b/man/journald.conf.xml
-index a14abad..043b3ea 100644
+index 24cee4c..185e1dc 100644
 --- a/man/journald.conf.xml
 +++ b/man/journald.conf.xml
-@@ -361,7 +361,7 @@
+@@ -356,7 +356,7 @@
          traditional syslog daemon, to the kernel log buffer (kmsg), to the system console, or sent as wall
          messages to all logged-in users.  These options take boolean arguments. If forwarding to syslog is
          enabled but nothing reads messages from the socket, forwarding to syslog has no effect. By default,
index e6d8fbcee2188aaad657c80eecae37a87be49e2a..88275b836c0cadd12e320753d23a95fda3b109dc 100644 (file)
@@ -1,3 +1,5 @@
+udev-first-set-properties-based-on-usb-subsystem.patch
+tmpfiles.d-do-not-fail-if-provision.conf-fails.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 --git a/debian/patches/tmpfiles.d-do-not-fail-if-provision.conf-fails.patch b/debian/patches/tmpfiles.d-do-not-fail-if-provision.conf-fails.patch
new file mode 100644 (file)
index 0000000..d19f91b
--- /dev/null
@@ -0,0 +1,24 @@
+From: Luca Boccassi <bluca@debian.org>
+Date: Thu, 3 Nov 2022 20:10:57 +0000
+Subject: [PATCH] tmpfiles.d: do not fail if provision.conf fails
+
+On a read-only filesystem creating /root/.ssh might fail, but that's ok.
+Do not fail the run, as this is only needed to add the credential, which
+is a separate step.
+---
+ tmpfiles.d/provision.conf | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tmpfiles.d/provision.conf b/tmpfiles.d/provision.conf
+index 3c56f42..093104a 100644
+--- a/tmpfiles.d/provision.conf
++++ b/tmpfiles.d/provision.conf
+@@ -17,6 +17,6 @@ f^ /etc/issue.d/50-provision.conf - - - - login.issue
+ f^ /etc/hosts - - - - network.hosts
+ # Provision SSH key for root
+-d /root :0700 root :root -
+-d /root/.ssh :0700 root :root -
++d- /root :0700 root :root -
++d- /root/.ssh :0700 root :root -
+ f^ /root/.ssh/authorized_keys :0600 root :root - ssh.authorized_keys.root
diff --git a/debian/patches/udev-first-set-properties-based-on-usb-subsystem.patch b/debian/patches/udev-first-set-properties-based-on-usb-subsystem.patch
new file mode 100644 (file)
index 0000000..7729fa6
--- /dev/null
@@ -0,0 +1,32 @@
+From: Yu Watanabe <watanabe.yu+github@gmail.com>
+Date: Thu, 3 Nov 2022 09:39:36 +0900
+Subject: [PATCH] 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.
+---
+ 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"