SHA256
1
0
forked from pool/systemd

Accepting request 1060655 from Base:System

- Drop 1000-Revert-getty-Pass-tty-to-use-by-agetty-via-stdin.patch
  It's no more necessary since util-linux 2.38 has been released in Factory.

- Make sure we apply the presets on units shipped by systemd package

OBS-URL: https://build.opensuse.org/request/show/1060655
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=377
This commit is contained in:
Dominique Leuenberger 2023-01-25 16:42:40 +00:00 committed by Git OBS Bridge
parent 59b703ed39
commit 54c156c423
3 changed files with 68 additions and 140 deletions

View File

@ -1,90 +0,0 @@
From 9e41b33e4e0d0fcc1dba654b485d6f5238e71ea8 Mon Sep 17 00:00:00 2001
From: Franck Bui <fbui@suse.com>
Date: Thu, 17 Mar 2022 11:35:33 +0100
Subject: [PATCH 8/8] 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 606b7dbe16..54fd7c292d 100644
--- a/units/console-getty.service.in
+++ b/units/console-getty.service.in
@@ -22,12 +22,10 @@ ConditionPathExists=/dev/console
[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 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 8d7e20d5ec..5dc75f769e 100644
--- a/units/container-getty@.service.in
+++ b/units/container-getty@.service.in
@@ -27,13 +27,11 @@ Before=rescue.service
[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 - $TERM
+ExecStart=-/sbin/agetty -o '-p -- \\u' --noclear pts/%I $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.35.3

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Tue Jan 24 13:19:01 UTC 2023 - Franck Bui <fbui@suse.com>
- Drop 1000-Revert-getty-Pass-tty-to-use-by-agetty-via-stdin.patch
It's no more necessary since util-linux 2.38 has been released in Factory.
-------------------------------------------------------------------
Mon Jan 23 10:48:30 UTC 2023 - Franck Bui <fbui@suse.com>
- Make sure we apply the presets on units shipped by systemd package
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Jan 6 10:10:37 UTC 2023 - Franck Bui <fbui@suse.com> Fri Jan 6 10:10:37 UTC 2023 - Franck Bui <fbui@suse.com>

View File

@ -208,9 +208,6 @@ Patch8: 0008-sysv-generator-translate-Required-Start-into-a-Wants.patch
Patch10: 0001-conf-parser-introduce-early-drop-ins.patch Patch10: 0001-conf-parser-introduce-early-drop-ins.patch
Patch12: 0009-pid1-handle-console-specificities-weirdness-for-s390.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 # 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 for # upstream first and then are cherry-picked in the SUSE git repository. But for
# very few cases, some stuff might be broken in upstream and need to be fixed # very few cases, some stuff might be broken in upstream and need to be fixed
@ -959,11 +956,16 @@ find %{buildroot}%{_testsuitedir}/ -name .git\* -exec rm -fr {} \;
%find_lang systemd %find_lang systemd
%endif %endif
# Build of installation images uses a hard coded list of packages with a %%pre # Don't drop %%pre section even if it becomes empty: the build process of
# that needs to be run during the build. systemd is one of them so keep the # installation images uses a hardcoded list of packages with a %%pre that needs
# section even if it's empty. # to be run during the build and complains if it can't find one.
%pre %pre
: # Units listed below can be enabled at installation according to their preset
# setting.
%systemd_pre machines.target
%systemd_pre remote-fs.target
%systemd_pre getty@.service
%systemd_pre systemd-timesyncd.service
%post %post
# Make /etc/machine-id an empty file during package installation. On the first # Make /etc/machine-id an empty file during package installation. On the first
@ -1018,11 +1020,11 @@ fi
%journal_catalog_update %journal_catalog_update
%tmpfiles_create %tmpfiles_create
# Create default config in /etc at first install. # Units listed below can be enabled at installation accoding to their preset
# Later package updates should not overwrite these settings. # setting.
%systemd_post getty@.service
%systemd_post machines.target %systemd_post machines.target
%systemd_post remote-fs.target %systemd_post remote-fs.target
%systemd_post getty@.service
%systemd_post systemd-timesyncd.service %systemd_post systemd-timesyncd.service
# v228 wrongly set world writable suid root permissions on timestamp files used # v228 wrongly set world writable suid root permissions on timestamp files used
@ -1069,6 +1071,8 @@ fi
# Avoid restarting logind until fixed upstream (issue #1163) # Avoid restarting logind until fixed upstream (issue #1163)
%pre -n udev%{?mini} %pre -n udev%{?mini}
# Units listed below can be enabled at installation accoding to their preset
# setting.
%systemd_pre remote-cryptsetup.target %systemd_pre remote-cryptsetup.target
%systemd_pre systemd-pstore.service %systemd_pre systemd-pstore.service
@ -1086,6 +1090,8 @@ fi
%tmpfiles_create systemd-pstore.conf %tmpfiles_create systemd-pstore.conf
# Units listed below can be enabled at installation accoding to their preset
# setting.
%systemd_post remote-cryptsetup.target %systemd_post remote-cryptsetup.target
%systemd_post systemd-pstore.service %systemd_post systemd-pstore.service
@ -1162,107 +1168,107 @@ fi
%if %{with journal_remote} %if %{with journal_remote}
%pre journal-remote %pre journal-remote
%service_add_pre systemd-journal-gatewayd.socket systemd-journal-gatewayd.service %systemd_pre systemd-journal-gatewayd.socket systemd-journal-gatewayd.service
%service_add_pre systemd-journal-remote.socket systemd-journal-remote.service %systemd_pre systemd-journal-remote.socket systemd-journal-remote.service
%service_add_pre systemd-journal-upload.service %systemd_pre systemd-journal-upload.service
%post journal-remote %post journal-remote
# Assume that all files shipped by systemd-journal-remove are owned by root. # Assume that all files shipped by systemd-journal-remove are owned by root.
%sysusers_create systemd-remote.conf %sysusers_create systemd-remote.conf
%service_add_post systemd-journal-gatewayd.socket systemd-journal-gatewayd.service %systemd_post systemd-journal-gatewayd.socket systemd-journal-gatewayd.service
%service_add_post systemd-journal-remote.socket systemd-journal-remote.service %systemd_post systemd-journal-remote.socket systemd-journal-remote.service
%service_add_post systemd-journal-upload.service %systemd_post systemd-journal-upload.service
%preun journal-remote %preun journal-remote
%service_del_preun systemd-journal-gatewayd.socket systemd-journal-gatewayd.service %systemd_preun systemd-journal-gatewayd.socket systemd-journal-gatewayd.service
%service_del_preun systemd-journal-remote.socket systemd-journal-remote.service %systemd_preun systemd-journal-remote.socket systemd-journal-remote.service
%service_del_preun systemd-journal-upload.service %systemd_preun systemd-journal-upload.service
%postun journal-remote %postun journal-remote
%service_del_postun systemd-journal-gatewayd.socket systemd-journal-gatewayd.service %systemd_postun systemd-journal-gatewayd.socket systemd-journal-gatewayd.service
%service_del_postun systemd-journal-remote.socket systemd-journal-remote.service %systemd_postun systemd-journal-remote.socket systemd-journal-remote.service
%service_del_postun systemd-journal-upload.service %systemd_postun systemd-journal-upload.service
%endif %endif
%if %{with networkd} || %{with resolved} %if %{with networkd} || %{with resolved}
%pre network %pre network
%if %{with networkd} %if %{with networkd}
%service_add_pre systemd-networkd.service %systemd_pre systemd-networkd.service
%service_add_pre systemd-networkd-wait-online.service %systemd_pre systemd-networkd-wait-online.service
%endif %endif
%if %{with resolved} %if %{with resolved}
%service_add_pre systemd-resolved.service %systemd_pre systemd-resolved.service
%endif %endif
%post network %post network
%if %{with networkd} %if %{with networkd}
%sysusers_create systemd-network.conf %sysusers_create systemd-network.conf
%tmpfiles_create systemd-network.conf %tmpfiles_create systemd-network.conf
%service_add_post systemd-networkd.service %systemd_post systemd-networkd.service
%service_add_post systemd-networkd-wait-online.service %systemd_post systemd-networkd-wait-online.service
%endif %endif
%if %{with resolved} %if %{with resolved}
%ldconfig %ldconfig
%sysusers_create systemd-resolve.conf %sysusers_create systemd-resolve.conf
%service_add_post systemd-resolved.service %systemd_post systemd-resolved.service
%endif %endif
%preun network %preun network
%if %{with networkd} %if %{with networkd}
%service_del_preun systemd-networkd.service %systemd_preun systemd-networkd.service
%service_del_preun systemd-networkd-wait-online.service %systemd_preun systemd-networkd-wait-online.service
%endif %endif
%if %{with resolved} %if %{with resolved}
%service_del_preun systemd-resolved.service %systemd_preun systemd-resolved.service
%endif %endif
%postun network %postun network
%if %{with networkd} %if %{with networkd}
%service_del_postun systemd-networkd.service %systemd_postun systemd-networkd.service
%service_del_postun systemd-networkd-wait-online.service %systemd_postun systemd-networkd-wait-online.service
%endif %endif
%if %{with resolved} %if %{with resolved}
%ldconfig %ldconfig
%service_del_postun systemd-resolved.service %systemd_postun systemd-resolved.service
%endif %endif
%endif %endif
%if %{with portabled} %if %{with portabled}
%pre portable %pre portable
%service_add_pre systemd-portabled.service %systemd_pre systemd-portabled.service
%post portable %post portable
%tmpfiles_create portables.conf %tmpfiles_create portables.conf
%service_add_post systemd-portabled.service %systemd_post systemd-portabled.service
%preun portable %preun portable
%service_del_preun systemd-portabled.service %systemd_preun systemd-portabled.service
%postun portable %postun portable
%service_del_postun systemd-portabled.service %systemd_postun systemd-portabled.service
%endif %endif
%if %{with experimental} %if %{with experimental}
%pre experimental %pre experimental
%service_add_pre systemd-homed.service %systemd_pre systemd-homed.service
%service_add_pre systemd-oomd.service systemd-oomd.socket %systemd_pre systemd-oomd.service systemd-oomd.socket
%service_add_pre systemd-userdbd.service systemd-userdbd.socket %systemd_pre systemd-userdbd.service systemd-userdbd.socket
%post experimental %post experimental
%sysusers_create systemd-oom.conf %sysusers_create systemd-oom.conf
%service_add_post systemd-homed.service %systemd_post systemd-homed.service
%service_add_post systemd-oomd.service systemd-oomd.socket %systemd_post systemd-oomd.service systemd-oomd.socket
%service_add_post systemd-userdbd.service systemd-userdbd.socket %systemd_post systemd-userdbd.service systemd-userdbd.socket
%preun experimental %preun experimental
%service_del_preun systemd-homed.service %systemd_preun systemd-homed.service
%service_del_preun systemd-oomd.service systemd-oomd.socket %systemd_preun systemd-oomd.service systemd-oomd.socket
%service_del_preun systemd-userdbd.service systemd-userdbd.socket %systemd_preun systemd-userdbd.service systemd-userdbd.socket
%postun experimental %postun experimental
%service_del_postun systemd-homed.service %systemd_postun systemd-homed.service
%service_del_postun systemd-oomd.service systemd-oomd.socket %systemd_postun systemd-oomd.service systemd-oomd.socket
%service_del_postun systemd-userdbd.service systemd-userdbd.socket %systemd_postun systemd-userdbd.service systemd-userdbd.socket
%endif %endif
%files %files