From bb4a013d42d6c68cfcd4e4fc5dc9685d71e4b0aeaf3879f6e4f00f5ca7f9c7bd Mon Sep 17 00:00:00 2001 From: Stanislav Brabec Date: Tue, 8 Jan 2019 16:41:49 +0000 Subject: [PATCH] Accepting request 662937 from home:sbrabec:branches:util-linux-b1120298 - agetty: Fixes for reload issue only if it is really needed (bsc#1085196, boo#1120298, util-linux-agetty-smart-reload-10.patch, util-linux-agetty-smart-reload-11.patch, util-linux-agetty-smart-reload-12.patch). OBS-URL: https://build.opensuse.org/request/show/662937 OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=391 --- python3-libmount.changes | 9 ++++ python3-libmount.spec | 16 ++++--- util-linux-agetty-smart-reload-10.patch | 59 +++++++++++++++++++++++++ util-linux-agetty-smart-reload-11.patch | 26 +++++++++++ util-linux-agetty-smart-reload-12.patch | 30 +++++++++++++ util-linux-systemd.changes | 9 ++++ util-linux-systemd.spec | 16 ++++--- util-linux.changes | 9 ++++ util-linux.spec | 16 ++++--- 9 files changed, 172 insertions(+), 18 deletions(-) create mode 100644 util-linux-agetty-smart-reload-10.patch create mode 100644 util-linux-agetty-smart-reload-11.patch create mode 100644 util-linux-agetty-smart-reload-12.patch diff --git a/python3-libmount.changes b/python3-libmount.changes index 20e1bf7..36d611c 100644 --- a/python3-libmount.changes +++ b/python3-libmount.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Jan 4 22:56:19 CET 2019 - sbrabec@suse.com + +- agetty: Fixes for reload issue only if it is really needed + (bsc#1085196, boo#1120298, + util-linux-agetty-smart-reload-10.patch, + util-linux-agetty-smart-reload-11.patch, + util-linux-agetty-smart-reload-12.patch). + ------------------------------------------------------------------- Mon Dec 10 19:08:35 CET 2018 - sbrabec@suse.com diff --git a/python3-libmount.spec b/python3-libmount.spec index 8a77397..c9b3456 100644 --- a/python3-libmount.spec +++ b/python3-libmount.spec @@ -1,7 +1,7 @@ # # spec file for package python3-libmount # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -140,13 +140,15 @@ Source13: %{_name}.keyring Source14: runuser.pamd Source15: runuser-l.pamd Source16: su-l.pamd -# Source51: blkid.conf -## -## util-linux patches -## # PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path Patch0: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff +# PATCH-FEATURE-UPSTREAM util-linux-agetty-smart-reload-10.patch bsc1085196 sbrabec@suse.com -- agetty: Reload issue only if it is really needed. +Patch22: util-linux-agetty-smart-reload-10.patch +# PATCH-FEATURE-UPSTREAM util-linux-agetty-smart-reload-11.patch bsc1085196 sbrabec@suse.com -- agetty: Reload issue only if it is really needed. +Patch23: util-linux-agetty-smart-reload-11.patch +# PATCH-FEATURE-UPSTREAM util-linux-agetty-smart-reload-12.patch bsc1085196 sbrabec@suse.com -- agetty: Reload issue only if it is really needed. +Patch24: util-linux-agetty-smart-reload-12.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # %if %build_util_linux @@ -383,7 +385,9 @@ library. %prep %setup -q -n %{_name}-%{version} %patch0 -p1 -# +%patch22 -p1 +%patch23 -p1 +%patch24 -p1 %build %if %build_util_linux diff --git a/util-linux-agetty-smart-reload-10.patch b/util-linux-agetty-smart-reload-10.patch new file mode 100644 index 0000000..5f7b367 --- /dev/null +++ b/util-linux-agetty-smart-reload-10.patch @@ -0,0 +1,59 @@ +From d7a412fe0ae5fa08b891769be2961e5d80769484 Mon Sep 17 00:00:00 2001 +From: Samuel Thibault +Date: Mon, 12 Nov 2018 11:31:17 +0100 +Subject: [PATCH] agetty: fix portability issues + +Signed-off-by: Karel Zak +--- + term-utils/agetty.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/term-utils/agetty.c b/term-utils/agetty.c +index 05a269abb..759cea5b8 100644 +--- a/term-utils/agetty.c ++++ b/term-utils/agetty.c +@@ -1768,6 +1768,7 @@ static void eval_issue_file(struct issue *ie __attribute__((__unused__)), + } + #else /* ISSUE_SUPPORT */ + ++#ifdef AGETTY_RELOAD + static int issue_is_changed(struct issue *ie) + { + if (ie->mem_old && ie->mem +@@ -1780,6 +1781,7 @@ static int issue_is_changed(struct issue *ie) + + return 1; + } ++#endif + + static void print_issue_file(struct issue *ie, + struct options *op, +@@ -2066,8 +2068,8 @@ static char *get_logname(struct issue *ie, struct options *op, struct termios *t + /* Write issue file and prompt */ + do_prompt(ie, op, tp); + +-#ifdef AGETTY_RELOAD + no_reload: ++#ifdef AGETTY_RELOAD + if (!wait_for_term_input(STDIN_FILENO)) { + /* refresh prompt -- discard input data, clear terminal + * and call do_prompt() again +@@ -2731,6 +2733,7 @@ static void output_special_char(struct issue *ie, + fprintf (ie->output, "%d ", users); + break; + } ++#if defined(RTMGRP_IPV4_IFADDR) && defined(RTMGRP_IPV6_IFADDR) + case '4': + case '6': + { +@@ -2754,6 +2757,7 @@ static void output_special_char(struct issue *ie, + netlink_groups |= RTMGRP_IPV6_IFADDR; + break; + } ++#endif + default: + putchar(c); + break; +-- +2.19.1 + diff --git a/util-linux-agetty-smart-reload-11.patch b/util-linux-agetty-smart-reload-11.patch new file mode 100644 index 0000000..c1b9ee7 --- /dev/null +++ b/util-linux-agetty-smart-reload-11.patch @@ -0,0 +1,26 @@ +From f8ee3af9fabc4369c36fdbd706a17deb246a751c Mon Sep 17 00:00:00 2001 +From: Christian Hesse +Date: Wed, 7 Nov 2018 13:55:06 +0100 +Subject: [PATCH] agetty: fix output of escaped characters + +Signed-off-by: Christian Hesse +--- + term-utils/agetty.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/term-utils/agetty.c b/term-utils/agetty.c +index 759cea5b8..615db2c78 100644 +--- a/term-utils/agetty.c ++++ b/term-utils/agetty.c +@@ -2759,7 +2759,7 @@ static void output_special_char(struct issue *ie, + } + #endif + default: +- putchar(c); ++ putc(c, ie->output); + break; + } + } +-- +2.19.1 + diff --git a/util-linux-agetty-smart-reload-12.patch b/util-linux-agetty-smart-reload-12.patch new file mode 100644 index 0000000..7c0ea44 --- /dev/null +++ b/util-linux-agetty-smart-reload-12.patch @@ -0,0 +1,30 @@ +From d16afd8d157d41bd128da9f792ee49a716b76fd1 Mon Sep 17 00:00:00 2001 +From: Stanislav Brabec +Date: Tue, 20 Nov 2018 00:38:14 +0100 +Subject: [PATCH] agetty: Return old behavior with empty logname + +c094fcd37 introduced a behavior change: When Return is entered with empty +logname, nothing happens. As it confuses users, return back the old +behavior: re-prompt. + +Signed-off-by: Stanislav Brabec +--- + term-utils/agetty.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/term-utils/agetty.c b/term-utils/agetty.c +index 615db2c78..fc373847e 100644 +--- a/term-utils/agetty.c ++++ b/term-utils/agetty.c +@@ -2185,7 +2185,7 @@ static char *get_logname(struct issue *ie, struct options *op, struct termios *t + break; + } + /* Everything was erased. */ +- if (bp == logname) ++ if (bp == logname && cp->eol == '\0') + goto no_reload; + } + } +-- +2.19.1 + diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index 20e1bf7..36d611c 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Jan 4 22:56:19 CET 2019 - sbrabec@suse.com + +- agetty: Fixes for reload issue only if it is really needed + (bsc#1085196, boo#1120298, + util-linux-agetty-smart-reload-10.patch, + util-linux-agetty-smart-reload-11.patch, + util-linux-agetty-smart-reload-12.patch). + ------------------------------------------------------------------- Mon Dec 10 19:08:35 CET 2018 - sbrabec@suse.com diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index 5f124a4..5552984 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -1,7 +1,7 @@ # # spec file for package util-linux-systemd # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -140,13 +140,15 @@ Source13: %{_name}.keyring Source14: runuser.pamd Source15: runuser-l.pamd Source16: su-l.pamd -# Source51: blkid.conf -## -## util-linux patches -## # PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path Patch0: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff +# PATCH-FEATURE-UPSTREAM util-linux-agetty-smart-reload-10.patch bsc1085196 sbrabec@suse.com -- agetty: Reload issue only if it is really needed. +Patch22: util-linux-agetty-smart-reload-10.patch +# PATCH-FEATURE-UPSTREAM util-linux-agetty-smart-reload-11.patch bsc1085196 sbrabec@suse.com -- agetty: Reload issue only if it is really needed. +Patch23: util-linux-agetty-smart-reload-11.patch +# PATCH-FEATURE-UPSTREAM util-linux-agetty-smart-reload-12.patch bsc1085196 sbrabec@suse.com -- agetty: Reload issue only if it is really needed. +Patch24: util-linux-agetty-smart-reload-12.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # %if %build_util_linux @@ -383,7 +385,9 @@ library. %prep %setup -q -n %{_name}-%{version} %patch0 -p1 -# +%patch22 -p1 +%patch23 -p1 +%patch24 -p1 %build %if %build_util_linux diff --git a/util-linux.changes b/util-linux.changes index 20e1bf7..36d611c 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Jan 4 22:56:19 CET 2019 - sbrabec@suse.com + +- agetty: Fixes for reload issue only if it is really needed + (bsc#1085196, boo#1120298, + util-linux-agetty-smart-reload-10.patch, + util-linux-agetty-smart-reload-11.patch, + util-linux-agetty-smart-reload-12.patch). + ------------------------------------------------------------------- Mon Dec 10 19:08:35 CET 2018 - sbrabec@suse.com diff --git a/util-linux.spec b/util-linux.spec index 1f005ea..a361048 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ # # spec file for package util-linux # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -140,13 +140,15 @@ Source13: %{_name}.keyring Source14: runuser.pamd Source15: runuser-l.pamd Source16: su-l.pamd -# Source51: blkid.conf -## -## util-linux patches -## # PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path Patch0: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff +# PATCH-FEATURE-UPSTREAM util-linux-agetty-smart-reload-10.patch bsc1085196 sbrabec@suse.com -- agetty: Reload issue only if it is really needed. +Patch22: util-linux-agetty-smart-reload-10.patch +# PATCH-FEATURE-UPSTREAM util-linux-agetty-smart-reload-11.patch bsc1085196 sbrabec@suse.com -- agetty: Reload issue only if it is really needed. +Patch23: util-linux-agetty-smart-reload-11.patch +# PATCH-FEATURE-UPSTREAM util-linux-agetty-smart-reload-12.patch bsc1085196 sbrabec@suse.com -- agetty: Reload issue only if it is really needed. +Patch24: util-linux-agetty-smart-reload-12.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # %if %build_util_linux @@ -383,7 +385,9 @@ library. %prep %setup -q -n %{_name}-%{version} %patch0 -p1 -# +%patch22 -p1 +%patch23 -p1 +%patch24 -p1 %build %if %build_util_linux