From ecbd67ef232d9333934d45d7b82b8fb31223794a47273e4f7b906dfee848d193 Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Thu, 17 Mar 2022 10:43:43 +0000 Subject: [PATCH] - Add 1000-Revert-getty-Pass-tty-to-use-by-agetty-via-stdin.patch A temporary workaround until bsc#1197178 is resolved. OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1265 --- ...-Pass-tty-to-use-by-agetty-via-stdin.patch | 90 +++++++++++++++++++ systemd.changes | 7 ++ systemd.spec | 3 + 3 files changed, 100 insertions(+) create mode 100644 1000-Revert-getty-Pass-tty-to-use-by-agetty-via-stdin.patch diff --git a/1000-Revert-getty-Pass-tty-to-use-by-agetty-via-stdin.patch b/1000-Revert-getty-Pass-tty-to-use-by-agetty-via-stdin.patch new file mode 100644 index 00000000..107b6553 --- /dev/null +++ b/1000-Revert-getty-Pass-tty-to-use-by-agetty-via-stdin.patch @@ -0,0 +1,90 @@ +From 8f2cc8089304b769c25f871f28503fa1af7a468f Mon Sep 17 00:00:00 2001 +From: Franck Bui +Date: Thu, 17 Mar 2022 11:35:33 +0100 +Subject: [PATCH 1/1] Revert "getty: Pass tty to use by agetty via stdin" + +This reverts commit b4bf9007cbee7dc0b1356897344ae2a7890df84c. +--- + units/console-getty.service.in | 4 +--- + units/container-getty@.service.in | 4 +--- + units/getty@.service.in | 4 +--- + units/serial-getty@.service.in | 4 +--- + 4 files changed, 4 insertions(+), 12 deletions(-) + +diff --git a/units/console-getty.service.in b/units/console-getty.service.in +index 73871d6f50..bb67541dce 100644 +--- a/units/console-getty.service.in ++++ b/units/console-getty.service.in +@@ -23,12 +23,10 @@ ConditionPathExists=/dev/console + # The '-o' option value tells agetty to replace 'login' arguments with an + # option to preserve environment (-p), followed by '--' for safety, and then + # the entered username. +-ExecStart=-/sbin/agetty -o '-p -- \\u' --noclear --keep-baud - 115200,38400,9600 $TERM ++ExecStart=-/sbin/agetty -o '-p -- \\u' --noclear --keep-baud console 115200,38400,9600 $TERM + Type=idle + Restart=always + UtmpIdentifier=cons +-StandardInput=tty +-StandardOutput=tty + TTYPath=/dev/console + TTYReset=yes + TTYVHangup=yes +diff --git a/units/container-getty@.service.in b/units/container-getty@.service.in +index a6e3f94e2a..ed1eb7bde1 100644 +--- a/units/container-getty@.service.in ++++ b/units/container-getty@.service.in +@@ -28,13 +28,11 @@ Before=rescue.service + # The '-o' option value tells agetty to replace 'login' arguments with an + # option to preserve environment (-p), followed by '--' for safety, and then + # the entered username. +-ExecStart=-/sbin/agetty -o '-p -- \\u' --noclear --keep-baud - 115200,38400,9600 $TERM ++ExecStart=-/sbin/agetty -o '-p -- \\u' --noclear --keep-baud pts/%I 115200,38400,9600 $TERM + Type=idle + Restart=always + RestartSec=0 + UtmpIdentifier=pts/%I +-StandardInput=tty +-StandardOutput=tty + TTYPath=/dev/pts/%I + TTYReset=yes + TTYVHangup=yes +diff --git a/units/getty@.service.in b/units/getty@.service.in +index 21d66f9367..78deb7cffe 100644 +--- a/units/getty@.service.in ++++ b/units/getty@.service.in +@@ -38,13 +38,11 @@ ConditionPathExists=/dev/tty0 + # The '-o' option value tells agetty to replace 'login' arguments with an + # option to preserve environment (-p), followed by '--' for safety, and then + # the entered username. +-ExecStart=-/sbin/agetty -o '-p -- \\u' --noclear - $TERM ++ExecStart=-/sbin/agetty -o '-p -- \\u' --noclear %I $TERM + Type=idle + Restart=always + RestartSec=0 + UtmpIdentifier=%I +-StandardInput=tty +-StandardOutput=tty + TTYPath=/dev/%I + TTYReset=yes + TTYVHangup=yes +diff --git a/units/serial-getty@.service.in b/units/serial-getty@.service.in +index 2433124c55..bb7af3105d 100644 +--- a/units/serial-getty@.service.in ++++ b/units/serial-getty@.service.in +@@ -33,12 +33,10 @@ Before=rescue.service + # The '-o' option value tells agetty to replace 'login' arguments with an + # option to preserve environment (-p), followed by '--' for safety, and then + # the entered username. +-ExecStart=-/sbin/agetty -o '-p -- \\u' --keep-baud 115200,57600,38400,9600 - $TERM ++ExecStart=-/sbin/agetty -o '-p -- \\u' --keep-baud 115200,57600,38400,9600 %I $TERM + Type=idle + Restart=always + UtmpIdentifier=%I +-StandardInput=tty +-StandardOutput=tty + TTYPath=/dev/%I + TTYReset=yes + TTYVHangup=yes +-- +2.34.1 + diff --git a/systemd.changes b/systemd.changes index 804d36bf..82a330ca 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Mar 17 10:38:16 UTC 2022 - Franck Bui + +- Add 1000-Revert-getty-Pass-tty-to-use-by-agetty-via-stdin.patch + + A temporary workaround until bsc#1197178 is resolved. + ------------------------------------------------------------------- Wed Mar 16 20:50:35 UTC 2022 - Franck Bui diff --git a/systemd.spec b/systemd.spec index 4d5b7db2..c1daf61f 100644 --- a/systemd.spec +++ b/systemd.spec @@ -222,6 +222,9 @@ Patch10: 0001-conf-parser-introduce-early-drop-ins.patch Patch11: 0011-core-disable-session-keyring-per-system-sevice-entir.patch Patch12: 0009-pid1-handle-console-specificities-weirdness-for-s390.patch +# Temporary workaround until bsc#1197178 is addressed. +Patch1000: 1000-Revert-getty-Pass-tty-to-use-by-agetty-via-stdin.patch + # Patches listed below are put in quarantine. Normally all changes # must go to upstream first and then are cherry-picked in the SUSE git # repository. But in very few cases, some stuff might be broken in