1
0
forked from pool/util-linux

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
This commit is contained in:
Stanislav Brabec 2019-01-08 16:41:49 +00:00 committed by Git OBS Bridge
parent df7d07a772
commit bb4a013d42
9 changed files with 172 additions and 18 deletions

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,59 @@
From d7a412fe0ae5fa08b891769be2961e5d80769484 Mon Sep 17 00:00:00 2001
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Mon, 12 Nov 2018 11:31:17 +0100
Subject: [PATCH] agetty: fix portability issues
Signed-off-by: Karel Zak <kzak@redhat.com>
---
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

View File

@ -0,0 +1,26 @@
From f8ee3af9fabc4369c36fdbd706a17deb246a751c Mon Sep 17 00:00:00 2001
From: Christian Hesse <mail@eworm.de>
Date: Wed, 7 Nov 2018 13:55:06 +0100
Subject: [PATCH] agetty: fix output of escaped characters
Signed-off-by: Christian Hesse <mail@eworm.de>
---
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

View File

@ -0,0 +1,30 @@
From d16afd8d157d41bd128da9f792ee49a716b76fd1 Mon Sep 17 00:00:00 2001
From: Stanislav Brabec <sbrabec@suse.cz>
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 <sbrabec@suse.cz>
---
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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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