Accepting request 221003 from Base:System

- Change and extend patch 
  0001-On_s390_con3270_disable_ANSI_colour_esc.patch
  to disable the workaround to find /dev/3270/tty1 as this now
  should be done by a) the kernel patch
  http://lkml.indiana.edu/hypermail/linux/kernel/1402.0/02319.html
  and the changed udev rule 99-systemd.rules

- Remove PreReq pidof from udev, nothing in this pkg uses it

- Change and extend patch
  0001-On_s390_con3270_disable_ANSI_colour_esc.patch
  to re-enable colouring if 3270 console was enforced on the kernel
  command line as 3270 cna handle colour ANSI escape sequences.
  Also let the serial getty generator find the /dev/3270/tty1
  character device (bnc#861316)

- Add patch 0001-On_s390_con3270_disable_ANSI_colour_esc.patch
  to strip the colouring ANSI escape sequences from the console
  messages (bnc#860937)

- Change and extend patch 
  0001-On_s390_con3270_disable_ANSI_colour_esc.patch
  to disable the workaround to find /dev/3270/tty1 as this now
  should be done by a) the kernel patch
  http://lkml.indiana.edu/hypermail/linux/kernel/1402.0/02319.html
  and the changed udev rule 99-systemd.rules

- Remove PreReq pidof from udev, nothing in this pkg uses it

- Change and extend patch

OBS-URL: https://build.opensuse.org/request/show/221003
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=174
This commit is contained in:
Stephan Kulow 2014-02-06 08:17:12 +00:00 committed by Git OBS Bridge
parent 8f6010ffdf
commit 00a36bdb9a
6 changed files with 236 additions and 2 deletions

View File

@ -0,0 +1,123 @@
---
rules/99-systemd.rules.in | 2 -
src/getty-generator/getty-generator.c | 2 -
src/shared/util.c | 62 ++++++++++++++++++++++++++++++++--
3 files changed, 61 insertions(+), 5 deletions(-)
--- systemd-208/rules/99-systemd.rules.in
+++ systemd-208/rules/99-systemd.rules.in 2014-02-05 10:34:17.346235540 +0000
@@ -7,7 +7,7 @@
ACTION=="remove", GOTO="systemd_end"
-SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*", TAG+="systemd"
+SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*|ttysclp*|sclp_line*|3270/tty*", TAG+="systemd"
KERNEL=="vport*", TAG+="systemd"
--- systemd-208/src/shared/util.c
+++ systemd-208/src/shared/util.c 2014-01-31 11:54:07.222235280 +0000
@@ -2967,6 +2967,7 @@ int status_vprintf(const char *status, b
struct iovec iovec[6] = {};
int n = 0;
static bool prev_ephemeral;
+ static int cached_on_tty = -1;
assert(format);
@@ -2980,6 +2981,51 @@ int status_vprintf(const char *status, b
if (fd < 0)
return fd;
+ if (_unlikely_(cached_on_tty < 0)) {
+ cached_on_tty = isatty(fd) > 0;
+ if (cached_on_tty) {
+ const char *e = getenv("TERM");
+ if (e && (strcmp(e, "dumb") == 0 || strcmp(e, "ibm327x") == 0)) {
+ char *mode = NULL;
+ int r = parse_env_file("/proc/cmdline", WHITESPACE, "conmode", &mode, NULL);
+ if (r < 0 || !mode || !streq(mode, "3270"))
+ cached_on_tty = 0;
+ }
+ }
+ }
+
+ if (status && !cached_on_tty) {
+ const char *esc, *ptr;
+ esc = strchr(status, 0x1B);
+ if (esc && (ptr = strpbrk(esc, "SOFDTI*"))) {
+ switch(*ptr) {
+ case 'S':
+ status = " SKIP ";
+ break;
+ case 'O':
+ status = " OK ";
+ break;
+ case 'F':
+ status = "FAILED";
+ break;
+ case 'D':
+ status = "DEPEND";
+ break;
+ case 'T':
+ status = " TIME ";
+ break;
+ case 'I':
+ status = " INFO ";
+ break;
+ case '*':
+ status = " BUSY ";
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
if (ellipse) {
char *e;
size_t emax, sl;
@@ -3002,8 +3048,12 @@ int status_vprintf(const char *status, b
}
}
- if (prev_ephemeral)
- IOVEC_SET_STRING(iovec[n++], "\r" ANSI_ERASE_TO_END_OF_LINE);
+ if (prev_ephemeral) {
+ if (cached_on_tty)
+ IOVEC_SET_STRING(iovec[n++], "\r" ANSI_ERASE_TO_END_OF_LINE);
+ else
+ IOVEC_SET_STRING(iovec[n++], "\r");
+ }
prev_ephemeral = ephemeral;
if (status) {
@@ -3267,8 +3317,14 @@ void columns_lines_cache_reset(int signu
bool on_tty(void) {
static int cached_on_tty = -1;
- if (_unlikely_(cached_on_tty < 0))
+ if (_unlikely_(cached_on_tty < 0)) {
cached_on_tty = isatty(STDOUT_FILENO) > 0;
+ if (cached_on_tty) {
+ const char *e = getenv("TERM");
+ if (e && (strcmp(e, "dumb") == 0))
+ cached_on_tty = 0;
+ }
+ }
return cached_on_tty;
}
--- systemd-208/src/getty-generator/getty-generator.c
+++ systemd-208/src/getty-generator/getty-generator.c 2014-02-05 10:41:29.502245927 +0000
@@ -149,9 +149,9 @@ int main(int argc, char *argv[]) {
* only for non-VC terminals. */
k = add_serial_getty(tty);
+ free(tty);
if (k < 0) {
- free(tty);
free(active);
r = EXIT_FAILURE;
goto finish;

View File

@ -0,0 +1,35 @@
--- systemd-208/units/console-shell.service.m4.in
+++ systemd-208/units/console-shell.service.m4.in 2014-02-05 11:28:31.446735287 +0000
@@ -17,6 +17,8 @@ Before=getty.target
[Service]
Environment=HOME=/root
WorkingDirectory=/root
+ExecStartPre=-/usr/bin/plymouth quit
+ExecStartPre=-/usr/bin/plymouth --wait
ExecStart=-/usr/sbin/sulogin
ExecStopPost=-@SYSTEMCTL@ poweroff
Type=idle
--- systemd-208/units/rescue.service.m4.in
+++ systemd-208/units/rescue.service.m4.in 2014-02-05 11:28:45.214235524 +0000
@@ -16,7 +16,8 @@ Before=shutdown.target
[Service]
Environment=HOME=/root
WorkingDirectory=/root
-ExecStartPre=-/bin/plymouth quit
+ExecStartPre=-/usr/bin/plymouth quit
+ExecStartPre=-/usr/bin/plymouth --wait
ExecStartPre=-/bin/echo -e 'Welcome to rescue mode! Type "systemctl default" or ^D to enter default mode.\\nType "journalctl -xb" to view system logs. Type "systemctl reboot" to reboot.'
ExecStart=-/usr/sbin/sulogin
ExecStopPost=-@SYSTEMCTL@ --fail --no-block default
--- systemd-208/units/emergency.service.in
+++ systemd-208/units/emergency.service.in 2014-02-05 11:28:51.782235282 +0000
@@ -15,7 +15,8 @@ Before=shutdown.target
[Service]
Environment=HOME=/root
WorkingDirectory=/root
-ExecStartPre=-/bin/plymouth quit
+ExecStartPre=-/usr/bin/plymouth quit
+ExecStartPre=-/usr/bin/plymouth --wait
ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" to try again\\nto boot into default mode.'
ExecStart=-/usr/sbin/sulogin
ExecStopPost=@SYSTEMCTL@ --fail --no-block default

View File

@ -1,3 +1,35 @@
-------------------------------------------------------------------
Wed Feb 5 11:19:28 UTC 2014 - werner@suse.de
- Change and extend patch
0001-On_s390_con3270_disable_ANSI_colour_esc.patch
to disable the workaround to find /dev/3270/tty1 as this now
should be done by a) the kernel patch
http://lkml.indiana.edu/hypermail/linux/kernel/1402.0/02319.html
and the changed udev rule 99-systemd.rules
-------------------------------------------------------------------
Sun Feb 2 08:53:17 UTC 2014 - ohering@suse.com
- Remove PreReq pidof from udev, nothing in this pkg uses it
-------------------------------------------------------------------
Fri Jan 31 14:24:35 UTC 2014 - werner@suse.de
- Change and extend patch
0001-On_s390_con3270_disable_ANSI_colour_esc.patch
to re-enable colouring if 3270 console was enforced on the kernel
command line as 3270 cna handle colour ANSI escape sequences.
Also let the serial getty generator find the /dev/3270/tty1
character device (bnc#861316)
-------------------------------------------------------------------
Thu Jan 30 12:33:08 UTC 2014 - werner@suse.de
- Add patch 0001-On_s390_con3270_disable_ANSI_colour_esc.patch
to strip the colouring ANSI escape sequences from the console
messages (bnc#860937)
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Jan 30 08:29:00 UTC 2014 - werner@suse.de Thu Jan 30 08:29:00 UTC 2014 - werner@suse.de

View File

@ -271,6 +271,10 @@ Patch87: 0001-core-introduce-new-KillMode-mixed-which-sends-SIGTER.patch
Patch88: 0002-service-allow-KillMode-mixed-in-conjunction-with-PAM.patch Patch88: 0002-service-allow-KillMode-mixed-in-conjunction-with-PAM.patch
# PATCH-FIX-UPSTREAM 0003-core-make-sure-to-always-go-through-both-SIGTERM-and.patch -- Make sure final SIGKILL actually kills everything (bnc#841544) # PATCH-FIX-UPSTREAM 0003-core-make-sure-to-always-go-through-both-SIGTERM-and.patch -- Make sure final SIGKILL actually kills everything (bnc#841544)
Patch89: 0003-core-make-sure-to-always-go-through-both-SIGTERM-and.patch Patch89: 0003-core-make-sure-to-always-go-through-both-SIGTERM-and.patch
# PATCH-FIX-SUSE 0001-On_s390_con3270_disable_ANSI_colour_esc.patch
Patch90: 0001-On_s390_con3270_disable_ANSI_colour_esc.patch
# PATCH-FIX-SUSE plymouth-quit-and-wait-for-emergency-service.patch -- Make sure that no plymouthd is locking the tty
Patch91: plymouth-quit-and-wait-for-emergency-service.patch
# udev patches # udev patches
# PATCH-FIX-OPENSUSE 1001-re-enable-by_path-links-for-ata-devices.patch # PATCH-FIX-OPENSUSE 1001-re-enable-by_path-links-for-ata-devices.patch
@ -352,7 +356,7 @@ Summary: A rule-based device node and kernel event manager
License: GPL-2.0 License: GPL-2.0
Group: System/Kernel Group: System/Kernel
Url: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html Url: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
PreReq: /bin/pidof /bin/rm /usr/bin/stat %insserv_prereq %fillup_prereq /usr/sbin/groupadd /usr/bin/getent /sbin/mkinitrd /usr/bin/sg_inq PreReq: /bin/rm /usr/bin/stat %insserv_prereq %fillup_prereq /usr/sbin/groupadd /usr/bin/getent /sbin/mkinitrd /usr/bin/sg_inq
Requires(post): lib%{udevpkgname}%{udev_major} Requires(post): lib%{udevpkgname}%{udev_major}
Conflicts: systemd < 39 Conflicts: systemd < 39
Conflicts: aaa_base < 11.5 Conflicts: aaa_base < 11.5
@ -580,6 +584,8 @@ cp %{SOURCE7} m4/
%patch87 -p1 %patch87 -p1
%patch88 -p1 %patch88 -p1
%patch89 -p1 %patch89 -p1
%patch90 -p1
%patch91 -p1
# udev patches # udev patches
%patch1001 -p1 %patch1001 -p1

View File

@ -1,3 +1,35 @@
-------------------------------------------------------------------
Wed Feb 5 11:19:28 UTC 2014 - werner@suse.de
- Change and extend patch
0001-On_s390_con3270_disable_ANSI_colour_esc.patch
to disable the workaround to find /dev/3270/tty1 as this now
should be done by a) the kernel patch
http://lkml.indiana.edu/hypermail/linux/kernel/1402.0/02319.html
and the changed udev rule 99-systemd.rules
-------------------------------------------------------------------
Sun Feb 2 08:53:17 UTC 2014 - ohering@suse.com
- Remove PreReq pidof from udev, nothing in this pkg uses it
-------------------------------------------------------------------
Fri Jan 31 14:24:35 UTC 2014 - werner@suse.de
- Change and extend patch
0001-On_s390_con3270_disable_ANSI_colour_esc.patch
to re-enable colouring if 3270 console was enforced on the kernel
command line as 3270 cna handle colour ANSI escape sequences.
Also let the serial getty generator find the /dev/3270/tty1
character device (bnc#861316)
-------------------------------------------------------------------
Thu Jan 30 12:33:08 UTC 2014 - werner@suse.de
- Add patch 0001-On_s390_con3270_disable_ANSI_colour_esc.patch
to strip the colouring ANSI escape sequences from the console
messages (bnc#860937)
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Jan 30 08:29:00 UTC 2014 - werner@suse.de Thu Jan 30 08:29:00 UTC 2014 - werner@suse.de

View File

@ -266,6 +266,10 @@ Patch87: 0001-core-introduce-new-KillMode-mixed-which-sends-SIGTER.patch
Patch88: 0002-service-allow-KillMode-mixed-in-conjunction-with-PAM.patch Patch88: 0002-service-allow-KillMode-mixed-in-conjunction-with-PAM.patch
# PATCH-FIX-UPSTREAM 0003-core-make-sure-to-always-go-through-both-SIGTERM-and.patch -- Make sure final SIGKILL actually kills everything (bnc#841544) # PATCH-FIX-UPSTREAM 0003-core-make-sure-to-always-go-through-both-SIGTERM-and.patch -- Make sure final SIGKILL actually kills everything (bnc#841544)
Patch89: 0003-core-make-sure-to-always-go-through-both-SIGTERM-and.patch Patch89: 0003-core-make-sure-to-always-go-through-both-SIGTERM-and.patch
# PATCH-FIX-SUSE 0001-On_s390_con3270_disable_ANSI_colour_esc.patch
Patch90: 0001-On_s390_con3270_disable_ANSI_colour_esc.patch
# PATCH-FIX-SUSE plymouth-quit-and-wait-for-emergency-service.patch -- Make sure that no plymouthd is locking the tty
Patch91: plymouth-quit-and-wait-for-emergency-service.patch
# udev patches # udev patches
# PATCH-FIX-OPENSUSE 1001-re-enable-by_path-links-for-ata-devices.patch # PATCH-FIX-OPENSUSE 1001-re-enable-by_path-links-for-ata-devices.patch
@ -347,7 +351,7 @@ Summary: A rule-based device node and kernel event manager
License: GPL-2.0 License: GPL-2.0
Group: System/Kernel Group: System/Kernel
Url: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html Url: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
PreReq: /bin/pidof /bin/rm /usr/bin/stat %insserv_prereq %fillup_prereq /usr/sbin/groupadd /usr/bin/getent /sbin/mkinitrd /usr/bin/sg_inq PreReq: /bin/rm /usr/bin/stat %insserv_prereq %fillup_prereq /usr/sbin/groupadd /usr/bin/getent /sbin/mkinitrd /usr/bin/sg_inq
Requires(post): lib%{udevpkgname}%{udev_major} Requires(post): lib%{udevpkgname}%{udev_major}
Conflicts: systemd < 39 Conflicts: systemd < 39
Conflicts: aaa_base < 11.5 Conflicts: aaa_base < 11.5
@ -575,6 +579,8 @@ cp %{SOURCE7} m4/
%patch87 -p1 %patch87 -p1
%patch88 -p1 %patch88 -p1
%patch89 -p1 %patch89 -p1
%patch90 -p1
%patch91 -p1
# udev patches # udev patches
%patch1001 -p1 %patch1001 -p1