.
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=755
This commit is contained in:
parent
e0c1f8c284
commit
e187dc7107
40
0001-hwdb-keymaps-for-Samsung-900X3E-900X3F.patch
Normal file
40
0001-hwdb-keymaps-for-Samsung-900X3E-900X3F.patch
Normal file
@ -0,0 +1,40 @@
|
||||
From 77e8ff6974ffaa6c9954e3d2264d9aa75ef25233 Mon Sep 17 00:00:00 2001
|
||||
From: Kieran Clancy <clancy.kieran@gmail.com>
|
||||
Date: Thu, 27 Feb 2014 16:02:57 +1030
|
||||
Subject: [PATCH] hwdb: keymaps for Samsung 900X3E/900X3F
|
||||
|
||||
Keymaps for Samsung 900X3E and 900X3F should be the same as for other
|
||||
models in the series.
|
||||
|
||||
I have also moved the comment for '# Series 9' to the right place
|
||||
---
|
||||
hwdb/60-keyboard.hwdb | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git hwdb/60-keyboard.hwdb hwdb/60-keyboard.hwdb
|
||||
index edfa842..bd8fd10 100644
|
||||
--- hwdb/60-keyboard.hwdb
|
||||
+++ hwdb/60-keyboard.hwdb
|
||||
@@ -897,9 +897,10 @@ keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*550P*:pvr*
|
||||
KEYBOARD_KEY_a8=! # Fn Lock - Function lock on
|
||||
KEYBOARD_KEY_a9=! # Fn Lock - Function lock off
|
||||
|
||||
+# Series 7 / 9
|
||||
keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*700Z*:pvr*
|
||||
keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*700G*:pvr*
|
||||
-keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*900X[34][CDG]*:pvr*
|
||||
+keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*900X[34][CDEFG]*:pvr*
|
||||
keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*940X3G*:pvr*
|
||||
KEYBOARD_KEY_ce=!prog1 # Fn+F1 launch settings
|
||||
KEYBOARD_KEY_a0=!mute # Fn+F6 mute
|
||||
@@ -909,7 +910,6 @@ keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*940X3G*:pvr*
|
||||
KEYBOARD_KEY_96=!kbdillumup # Fn+F10 keyboard backlight up
|
||||
KEYBOARD_KEY_b3=!prog3 # Fn+F11 fan/cooling mode changer
|
||||
|
||||
-# Series 9
|
||||
keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*900X[34][AB]*:pvr*
|
||||
KEYBOARD_KEY_ce=! # Fn+F8 keyboard backlight up
|
||||
KEYBOARD_KEY_8d=! # Fn+F7 keyboard backlight down
|
||||
--
|
||||
1.7.9.2
|
||||
|
31
0002-Add-hwdb-entry-for-Samsung-Series-7-Ultra.patch
Normal file
31
0002-Add-hwdb-entry-for-Samsung-Series-7-Ultra.patch
Normal file
@ -0,0 +1,31 @@
|
||||
From 15f392394e75ffb7f318920008fd1bbe4e82b488 Mon Sep 17 00:00:00 2001
|
||||
From: Scott Thrasher <scott.thrasher@gmail.com>
|
||||
Date: Wed, 26 Mar 2014 18:48:13 -0700
|
||||
Subject: [PATCH] Add hwdb entry for Samsung Series 7 Ultra
|
||||
|
||||
---
|
||||
hwdb/60-keyboard.hwdb | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git hwdb/60-keyboard.hwdb hwdb/60-keyboard.hwdb
|
||||
index bd8fd10..832c686 100644
|
||||
--- hwdb/60-keyboard.hwdb
|
||||
+++ hwdb/60-keyboard.hwdb
|
||||
@@ -924,6 +924,14 @@ keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*90X3A*:pvr*
|
||||
KEYBOARD_KEY_96=!kbdillumup # Fn+F8 keyboard backlight up
|
||||
KEYBOARD_KEY_d5=!wlan # Fn+F12 Wi-Fi toggle
|
||||
|
||||
+# Series 7 Ultra
|
||||
+keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*7[34]0U3E*:pvr*
|
||||
+ KEYBOARD_KEY_ce=!prog1 # Fn+F1 launch settings
|
||||
+ KEYBOARD_KEY_97=!kbdillumdown # Fn+F9 keyboard backlight down
|
||||
+ KEYBOARD_KEY_96=!kbdillumup # Fn+F10 keyboard backlight up
|
||||
+ KEYBOARD_KEY_b3=!prog3 # Fn+F11 fan/cooling mode changer
|
||||
+ KEYBOARD_KEY_d5=!wlan # Fn+F12 wlan/airplane switch
|
||||
+
|
||||
# SQ1US
|
||||
keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pnSQ1US:pvr*
|
||||
KEYBOARD_KEY_d4=menu
|
||||
--
|
||||
1.7.9.2
|
||||
|
28
0003-keymap-Fix-HP-Pavillon-DV7.patch
Normal file
28
0003-keymap-Fix-HP-Pavillon-DV7.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From efb4bf4e419e14a13eead6289ea40165579a816f Mon Sep 17 00:00:00 2001
|
||||
From: Martin Pitt <martin.pitt@ubuntu.com>
|
||||
Date: Tue, 5 Aug 2014 12:29:27 +0200
|
||||
Subject: [PATCH] keymap: Fix HP Pavillon DV7
|
||||
|
||||
Properly disable scan code 94 instead of producing KEY_0.
|
||||
|
||||
https://launchpad.net/bugs/1322770
|
||||
---
|
||||
hwdb/60-keyboard.hwdb | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git hwdb/60-keyboard.hwdb hwdb/60-keyboard.hwdb
|
||||
index cbbbf2c..5c3d4ca 100644
|
||||
--- hwdb/60-keyboard.hwdb
|
||||
+++ hwdb/60-keyboard.hwdb
|
||||
@@ -368,7 +368,7 @@ keyboard:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHP*Pavilion*dv7*Notebook*PC:pvr
|
||||
KEYBOARD_KEY_b7=print
|
||||
KEYBOARD_KEY_c2=media # FIXME: quick play
|
||||
KEYBOARD_KEY_c6=break
|
||||
- KEYBOARD_KEY_94=0
|
||||
+ KEYBOARD_KEY_94=reserved
|
||||
|
||||
# Elitebook
|
||||
keyboard:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*Compaq*:pvr*
|
||||
--
|
||||
1.7.9.2
|
||||
|
@ -0,0 +1,60 @@
|
||||
From fa9d4be3f1f4a792b2f3624c2a08fe9cc6ce6e54 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Thu, 7 Aug 2014 21:48:57 -0400
|
||||
Subject: [PATCH] hwdb: update format description and document reloading
|
||||
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=82311
|
||||
---
|
||||
hwdb/60-keyboard.hwdb | 32 +++++++++++++++++++++++---------
|
||||
1 file changed, 23 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git hwdb/60-keyboard.hwdb hwdb/60-keyboard.hwdb
|
||||
index 5c3d4ca..ef0ebc5 100644
|
||||
--- hwdb/60-keyboard.hwdb
|
||||
+++ hwdb/60-keyboard.hwdb
|
||||
@@ -28,19 +28,33 @@
|
||||
# driver, <vendor> is the firmware-provided string exported
|
||||
# by the kernel DMI modalias.
|
||||
#
|
||||
-# Scan codes are specified as:
|
||||
-# KEYBOARD_KEY_<hex scan code>=<key code identifier>
|
||||
-# The scan code should be expressed in hex lowercase and in
|
||||
-# full bytes, a multiple of 2 digits. The key codes are retrieved
|
||||
-# and normalized from the kernel input API header.
|
||||
+# Scan codes are specified as:
|
||||
+# KEYBOARD_KEY_<hex scan code>=<key code identifier>
|
||||
+# The scan code should be expressed in hex lowercase. The key codes
|
||||
+# are retrieved and normalized from the kernel input API header.
|
||||
#
|
||||
-# A '!' as the first charcter of the key identifier string
|
||||
-# will add the scan code to the AT keyboard's list of scan codes
|
||||
-# where the driver will synthesize a release event and not expect
|
||||
-# it to be generated by the hardware.
|
||||
+# An '!' as the first character of the key identifier string
|
||||
+# will add the scan code to the AT keyboard's list of scan codes
|
||||
+# where the driver will synthesize a release event and not expect
|
||||
+# it to be generated by the hardware.
|
||||
#
|
||||
# To debug key presses and access scan code mapping data of
|
||||
# an input device use the commonly available tool: evtest(1).
|
||||
+#
|
||||
+# To update this file, create a new file
|
||||
+# /etc/udev/hwdb.d/70-keyboad.hwdb
|
||||
+# and add your rules there. To load the new rules execute (as root):
|
||||
+# udevadm hwdb --update
|
||||
+# udevadm trigger /dev/input/eventXX
|
||||
+# where /dev/input/eventXX is the keyboard in question. If in
|
||||
+# doubt, simply use /dev/input/event* to reload all input rules.
|
||||
+#
|
||||
+# If your changes are generally applicable, open a bug report on
|
||||
+# http://bugs.freedesktop.org/enter_bug.cgi?product=systemd
|
||||
+# and include your new rules, a description of the device, and the
|
||||
+# output of
|
||||
+# udevadm info /dev/input/eventXX
|
||||
+# (or /dev/input/event*).
|
||||
|
||||
##########################################
|
||||
# Acer
|
||||
--
|
||||
1.7.9.2
|
||||
|
134
0004-login-set_controller-should-fail-if-prepare_vt-fails.patch
Normal file
134
0004-login-set_controller-should-fail-if-prepare_vt-fails.patch
Normal file
@ -0,0 +1,134 @@
|
||||
Based on baccf3e40bab6c0b69992ae29c396930de4660c9 Mon Sep 17 00:00:00 2001
|
||||
From: Olivier Brunel <jjk@jjacky.com>
|
||||
Date: Fri, 8 Aug 2014 20:45:43 +0200
|
||||
Subject: [PATCH] login: set_controller should fail if prepare_vt fails
|
||||
|
||||
If controllers can expect logind to have "prepared" the VT (e.g. set it to
|
||||
graphics mode, etc) then TakeControl() should fail if said preparation
|
||||
failed (and session_restore_vt() was called).
|
||||
|
||||
(David: fixed up !CONFIG_VT case and errno-numbers)
|
||||
---
|
||||
src/login/logind-session.c | 47 +++++++++++++++++++++++++++++++++------------
|
||||
src/login/logind-session.h | 2 -
|
||||
2 files changed, 36 insertions(+), 13 deletions(-)
|
||||
|
||||
--- src/login/logind-session.c
|
||||
+++ src/login/logind-session.c 2014-08-26 10:14:21.014235811 +0000
|
||||
@@ -950,8 +950,8 @@ int session_kill(Session *s, KillWho who
|
||||
static int session_open_vt(Session *s) {
|
||||
char path[sizeof("/dev/tty") + DECIMAL_STR_MAX(s->vtnr)];
|
||||
|
||||
- if (!s->vtnr)
|
||||
- return -1;
|
||||
+ if (s->vtnr < 1)
|
||||
+ return -ENODEV;
|
||||
|
||||
if (s->vtfd >= 0)
|
||||
return s->vtfd;
|
||||
@@ -975,22 +975,38 @@ static int session_vt_fn(sd_event_source
|
||||
return 0;
|
||||
}
|
||||
|
||||
-void session_mute_vt(Session *s) {
|
||||
+int session_mute_vt(Session *s) {
|
||||
int vt, r;
|
||||
struct vt_mode mode = { 0 };
|
||||
sigset_t mask;
|
||||
|
||||
+ if (s->vtnr < 1)
|
||||
+ return 0;
|
||||
+
|
||||
vt = session_open_vt(s);
|
||||
if (vt < 0)
|
||||
- return;
|
||||
+ return vt;
|
||||
+
|
||||
+ r = fchown(vt, s->user->uid, -1);
|
||||
+ if (r < 0) {
|
||||
+ r = -errno;
|
||||
+ log_error("Cannot change owner of /dev/tty%u: %m", s->vtnr);
|
||||
+ goto error;
|
||||
+ }
|
||||
|
||||
r = ioctl(vt, KDSKBMODE, K_OFF);
|
||||
- if (r < 0)
|
||||
+ if (r < 0) {
|
||||
+ r = -errno;
|
||||
+ log_error("Cannot set K_OFF on /dev/tty%u: %m", s->vtnr);
|
||||
goto error;
|
||||
+ }
|
||||
|
||||
r = ioctl(vt, KDSETMODE, KD_GRAPHICS);
|
||||
- if (r < 0)
|
||||
+ if (r < 0) {
|
||||
+ r = -errno;
|
||||
+ log_error("Cannot set KD_GRAPHICS on /dev/tty%u: %m", s->vtnr);
|
||||
goto error;
|
||||
+ }
|
||||
|
||||
sigemptyset(&mask);
|
||||
sigaddset(&mask, SIGUSR1);
|
||||
@@ -1007,14 +1023,17 @@ void session_mute_vt(Session *s) {
|
||||
mode.relsig = SIGUSR1;
|
||||
mode.acqsig = SIGUSR1;
|
||||
r = ioctl(vt, VT_SETMODE, &mode);
|
||||
- if (r < 0)
|
||||
+ if (r < 0) {
|
||||
+ r = -errno;
|
||||
+ log_error("Cannot set VT_PROCESS on /dev/tty%u: %m", s->vtnr);
|
||||
goto error;
|
||||
+ }
|
||||
|
||||
- return;
|
||||
+ return 0;
|
||||
|
||||
error:
|
||||
- log_error("cannot mute VT %u for session %s (%d/%d)", s->vtnr, s->id, r, errno);
|
||||
session_restore_vt(s);
|
||||
+ return r;
|
||||
}
|
||||
|
||||
void session_restore_vt(Session *s) {
|
||||
@@ -1037,6 +1056,8 @@ void session_restore_vt(Session *s) {
|
||||
mode.mode = VT_AUTO;
|
||||
ioctl(vt, VT_SETMODE, &mode);
|
||||
|
||||
+ fchown(vt, 0, -1);
|
||||
+
|
||||
close_nointr_nofail(vt);
|
||||
s->vtfd = -1;
|
||||
}
|
||||
@@ -1091,8 +1112,6 @@ int session_set_controller(Session *s, c
|
||||
return r;
|
||||
}
|
||||
|
||||
- session_swap_controller(s, t);
|
||||
-
|
||||
/* When setting a session controller, we forcibly mute the VT and set
|
||||
* it into graphics-mode. Applications can override that by changing
|
||||
* VT state after calling TakeControl(). However, this serves as a good
|
||||
@@ -1101,7 +1120,11 @@ int session_set_controller(Session *s, c
|
||||
* exits.
|
||||
* If logind crashes/restarts, we restore the controller during restart
|
||||
* or reset the VT in case it crashed/exited, too. */
|
||||
- session_mute_vt(s);
|
||||
+ r = session_mute_vt(s);
|
||||
+ if (r < 0)
|
||||
+ return r;
|
||||
+
|
||||
+ session_swap_controller(s, t);
|
||||
|
||||
return 0;
|
||||
}
|
||||
--- src/login/logind-session.h
|
||||
+++ src/login/logind-session.h 2014-08-25 17:19:29.042236429 +0000
|
||||
@@ -172,7 +172,7 @@ SessionClass session_class_from_string(c
|
||||
const char *kill_who_to_string(KillWho k) _const_;
|
||||
KillWho kill_who_from_string(const char *s) _pure_;
|
||||
|
||||
-void session_mute_vt(Session *s);
|
||||
+int session_mute_vt(Session *s);
|
||||
void session_restore_vt(Session *s);
|
||||
|
||||
bool session_is_controller(Session *s, const char *sender);
|
246
0006-login-share-VT-signal-handler-between-sessions.patch
Normal file
246
0006-login-share-VT-signal-handler-between-sessions.patch
Normal file
@ -0,0 +1,246 @@
|
||||
Based on 92683ad2e28c79891e4123d9a421b018dc58870c Mon Sep 17 00:00:00 2001
|
||||
From: David Herrmann <dh.herrmann@gmail.com>
|
||||
Date: Mon, 11 Aug 2014 18:17:54 +0200
|
||||
Subject: [PATCH] login: share VT-signal handler between sessions
|
||||
|
||||
sd-event does not allow multiple handlers for a single signal. However,
|
||||
logind sets up signal handlers for each session with VT_PROCESS set (that
|
||||
is, it has an active controller). Therefore, registering multiple such
|
||||
controllers will fail.
|
||||
|
||||
Lets make the VT-handler global, as it's mostly trivial, anyway. This way,
|
||||
the sessions don't have to take care of that and we can simply acknowledge
|
||||
all VT-switch requests as we always did.
|
||||
---
|
||||
src/libsystemd/sd-event/sd-event.c | 5 +-
|
||||
src/login/logind-session.c | 26 +------------
|
||||
src/login/logind-session.h | 1
|
||||
src/login/logind.c | 70 +++++++++++++++++++++++++++++++++++++
|
||||
src/shared/util.c | 18 +++++++++
|
||||
src/shared/util.h | 1
|
||||
6 files changed, 94 insertions(+), 27 deletions(-)
|
||||
|
||||
--- src/libsystemd/sd-event/sd-event.c
|
||||
+++ src/libsystemd/sd-event/sd-event.c 2014-08-26 11:02:54.500683967 +0000
|
||||
@@ -839,7 +839,6 @@ _public_ int sd_event_add_signal(
|
||||
assert_return(sig > 0, -EINVAL);
|
||||
assert_return(sig < _NSIG, -EINVAL);
|
||||
assert_return(callback, -EINVAL);
|
||||
- assert_return(ret, -EINVAL);
|
||||
assert_return(e->state != SD_EVENT_FINISHED, -ESTALE);
|
||||
assert_return(!event_pid_changed(e), -ECHILD);
|
||||
|
||||
@@ -877,7 +876,9 @@ _public_ int sd_event_add_signal(
|
||||
}
|
||||
}
|
||||
|
||||
- *ret = s;
|
||||
+ if (ret)
|
||||
+ *ret = s;
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
--- src/login/logind-session.c
|
||||
+++ src/login/logind-session.c 2014-08-25 17:22:46.000000000 +0000
|
||||
@@ -153,8 +153,6 @@ void session_free(Session *s) {
|
||||
|
||||
hashmap_remove(s->manager->sessions, s->id);
|
||||
|
||||
- s->vt_source = sd_event_source_unref(s->vt_source);
|
||||
-
|
||||
free(s->state_file);
|
||||
free(s);
|
||||
}
|
||||
@@ -966,19 +964,9 @@ static int session_open_vt(Session *s) {
|
||||
return s->vtfd;
|
||||
}
|
||||
|
||||
-static int session_vt_fn(sd_event_source *source, const struct signalfd_siginfo *si, void *data) {
|
||||
- Session *s = data;
|
||||
-
|
||||
- if (s->vtfd >= 0)
|
||||
- ioctl(s->vtfd, VT_RELDISP, 1);
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
int session_mute_vt(Session *s) {
|
||||
int vt, r;
|
||||
struct vt_mode mode = { 0 };
|
||||
- sigset_t mask;
|
||||
|
||||
if (s->vtnr < 1)
|
||||
return 0;
|
||||
@@ -1008,20 +996,12 @@ int session_mute_vt(Session *s) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
- sigemptyset(&mask);
|
||||
- sigaddset(&mask, SIGUSR1);
|
||||
- sigprocmask(SIG_BLOCK, &mask, NULL);
|
||||
-
|
||||
- r = sd_event_add_signal(s->manager->event, &s->vt_source, SIGUSR1, session_vt_fn, s);
|
||||
- if (r < 0)
|
||||
- goto error;
|
||||
-
|
||||
/* Oh, thanks to the VT layer, VT_AUTO does not work with KD_GRAPHICS.
|
||||
* So we need a dummy handler here which just acknowledges *all* VT
|
||||
* switch requests. */
|
||||
mode.mode = VT_PROCESS;
|
||||
- mode.relsig = SIGUSR1;
|
||||
- mode.acqsig = SIGUSR1;
|
||||
+ mode.relsig = SIGRTMIN;
|
||||
+ mode.acqsig = SIGRTMIN + 1;
|
||||
r = ioctl(vt, VT_SETMODE, &mode);
|
||||
if (r < 0) {
|
||||
r = -errno;
|
||||
@@ -1045,8 +1025,6 @@ void session_restore_vt(Session *s) {
|
||||
if (vt < 0)
|
||||
return;
|
||||
|
||||
- s->vt_source = sd_event_source_unref(s->vt_source);
|
||||
-
|
||||
ioctl(vt, KDSETMODE, KD_TEXT);
|
||||
|
||||
if (read_one_line_file("/sys/module/vt/parameters/default_utf8", &utf8) >= 0 && *utf8 == '1')
|
||||
--- src/login/logind-session.h
|
||||
+++ src/login/logind-session.h 2014-08-25 00:00:00.000000000 +0000
|
||||
@@ -98,7 +98,6 @@ struct Session {
|
||||
Seat *seat;
|
||||
unsigned int vtnr;
|
||||
int vtfd;
|
||||
- sd_event_source *vt_source;
|
||||
|
||||
pid_t leader;
|
||||
uint32_t audit_id;
|
||||
--- src/login/logind.c
|
||||
+++ src/login/logind.c 2014-08-26 11:18:41.422235366 +0000
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <linux/vt.h>
|
||||
+#include <sys/ioctl.h>
|
||||
#include <sys/timerfd.h>
|
||||
|
||||
#include "sd-daemon.h"
|
||||
@@ -714,6 +715,47 @@ static int manager_connect_bus(Manager *
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int manager_vt_switch(sd_event_source *src, const struct signalfd_siginfo *si, void *data) {
|
||||
+ Manager *m = data;
|
||||
+ Session *active, *iter;
|
||||
+
|
||||
+ /*
|
||||
+ * We got a VT-switch signal and we have to acknowledge it immediately.
|
||||
+ * Preferably, we'd just use m->seat0->active->vtfd, but unfortunately,
|
||||
+ * old user-space might run multiple sessions on a single VT, *sigh*.
|
||||
+ * Therefore, we have to iterate all sessions and find one with a vtfd
|
||||
+ * on the requested VT.
|
||||
+ * As only VTs with active controllers have VT_PROCESS set, our current
|
||||
+ * notion of the active VT might be wrong (for instance if the switch
|
||||
+ * happens while we setup VT_PROCESS). Therefore, read the current VT
|
||||
+ * first and then use s->active->vtnr as reference. Note that this is
|
||||
+ * not racy, as no further VT-switch can happen as long as we're in
|
||||
+ * synchronous VT_PROCESS mode.
|
||||
+ */
|
||||
+
|
||||
+ assert(m->seat0);
|
||||
+ seat_read_active_vt(m->seat0);
|
||||
+
|
||||
+ active = m->seat0->active;
|
||||
+ if (!active || active->vtnr < 1) {
|
||||
+ log_warning("Received VT_PROCESS signal without a registered session on that VT.");
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if (active->vtfd >= 0) {
|
||||
+ ioctl(active->vtfd, VT_RELDISP, 1);
|
||||
+ } else {
|
||||
+ LIST_FOREACH(sessions_by_seat, iter, m->seat0->sessions) {
|
||||
+ if (iter->vtnr == active->vtnr && iter->vtfd >= 0) {
|
||||
+ ioctl(iter->vtfd, VT_RELDISP, 1);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int manager_connect_console(Manager *m) {
|
||||
int r;
|
||||
|
||||
@@ -744,6 +786,34 @@ static int manager_connect_console(Manag
|
||||
return r;
|
||||
}
|
||||
|
||||
+ /*
|
||||
+ * SIGRTMIN is used as global VT-release signal, SIGRTMIN + 1 is used
|
||||
+ * as VT-acquire signal. We ignore any acquire-events (yes, we still
|
||||
+ * have to provide a valid signal-number for it!) and acknowledge all
|
||||
+ * release events immediately.
|
||||
+ */
|
||||
+
|
||||
+ if (SIGRTMIN + 1 > SIGRTMAX) {
|
||||
+ log_error("Not enough real-time signals available: %u-%u", SIGRTMIN, SIGRTMAX);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ r = ignore_signals(SIGRTMIN + 1, -1);
|
||||
+ if (r < 0) {
|
||||
+ log_error("Cannot ignore SIGRTMIN + 1: %s", strerror(-r));
|
||||
+ return r;
|
||||
+ }
|
||||
+
|
||||
+ r = sigprocmask_many(SIG_BLOCK, SIGRTMIN, -1);
|
||||
+ if (r < 0) {
|
||||
+ log_error("Cannot block SIGRTMIN: %s", strerror(-r));
|
||||
+ return r;
|
||||
+ }
|
||||
+
|
||||
+ r = sd_event_add_signal(m->event, NULL, SIGRTMIN, manager_vt_switch, m);
|
||||
+ if (r < 0)
|
||||
+ return r;
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
--- src/shared/util.c
|
||||
+++ src/shared/util.c 2014-08-26 10:20:14.000000000 +0000
|
||||
@@ -2434,6 +2434,24 @@ void sigset_add_many(sigset_t *ss, ...)
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
+int sigprocmask_many(int how, ...) {
|
||||
+ va_list ap;
|
||||
+ sigset_t ss;
|
||||
+ int sig;
|
||||
+
|
||||
+ assert_se(sigemptyset(&ss) == 0);
|
||||
+
|
||||
+ va_start(ap, how);
|
||||
+ while ((sig = va_arg(ap, int)) > 0)
|
||||
+ assert_se(sigaddset(&ss, sig) == 0);
|
||||
+ va_end(ap);
|
||||
+
|
||||
+ if (sigprocmask(how, &ss, NULL) < 0)
|
||||
+ return -errno;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
char* gethostname_malloc(void) {
|
||||
struct utsname u;
|
||||
|
||||
--- src/shared/util.h
|
||||
+++ src/shared/util.h 2014-08-26 10:21:08.000000000 +0000
|
||||
@@ -390,6 +390,7 @@ char* dirname_malloc(const char *path);
|
||||
void rename_process(const char name[8]);
|
||||
|
||||
void sigset_add_many(sigset_t *ss, ...);
|
||||
+int sigprocmask_many(int how, ...);
|
||||
|
||||
bool hostname_is_set(void);
|
||||
|
1425
0008-hwdb-update.patch
Normal file
1425
0008-hwdb-update.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 26 11:25:57 UTC 2014 - werner@suse.de
|
||||
|
||||
- Port back and add the missed upstream patches from 2014/08/22
|
||||
0004-login-set_controller-should-fail-if-prepare_vt-fails.patch
|
||||
0006-login-share-VT-signal-handler-between-sessions.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 22 15:12:23 UTC 2014 - werner@suse.de
|
||||
|
||||
|
@ -771,19 +771,33 @@ Patch370: 0002-switch-root-umount-the-old-root-correctly.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/08/22
|
||||
Patch371: 0003-bootchart-it-s-not-OK-to-return-1-from-a-main-progra.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/08/22
|
||||
Patch372: 0005-sd-resolve-fix-allocation-if-query-ids-never-reuse-t.patch
|
||||
Patch372: 0004-login-set_controller-should-fail-if-prepare_vt-fails.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/08/22
|
||||
Patch373: 0007-journald-also-increase-the-SendBuffer-of-dev-log-to-.patch
|
||||
Patch373: 0005-sd-resolve-fix-allocation-if-query-ids-never-reuse-t.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/08/22
|
||||
Patch374: 0008-mount-setup-fix-counting-of-early-mounts-without-SMA.patch
|
||||
Patch374: 0006-login-share-VT-signal-handler-between-sessions.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/08/22
|
||||
Patch375: 0009-journald-Fix-off-by-one-error-in-Missed-X-kernel-mes.patch
|
||||
Patch375: 0007-journald-also-increase-the-SendBuffer-of-dev-log-to-.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/08/22
|
||||
Patch376: 0010-machine_kill-Don-t-kill-the-unit-when-killing-the-le.patch
|
||||
Patch376: 0008-mount-setup-fix-counting-of-early-mounts-without-SMA.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/08/22
|
||||
Patch377: 0011-units-fix-BindsTo-logic-when-applied-relative-to-ser.patch
|
||||
Patch377: 0009-journald-Fix-off-by-one-error-in-Missed-X-kernel-mes.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/08/22
|
||||
Patch378: 0012-util-try-to-be-a-bit-more-NFS-compatible-when-checki.patch
|
||||
Patch378: 0010-machine_kill-Don-t-kill-the-unit-when-killing-the-le.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/08/22
|
||||
Patch379: 0011-units-fix-BindsTo-logic-when-applied-relative-to-ser.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/08/22
|
||||
Patch380: 0012-util-try-to-be-a-bit-more-NFS-compatible-when-checki.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/08/25
|
||||
Patch381: 0001-hwdb-keymaps-for-Samsung-900X3E-900X3F.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/08/25
|
||||
Patch382: 0002-Add-hwdb-entry-for-Samsung-Series-7-Ultra.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/08/25
|
||||
Patch383: 0003-keymap-Fix-HP-Pavillon-DV7.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/08/25
|
||||
Patch384: 0004-hwdb-update-format-description-and-document-reloadin.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/08/25
|
||||
Patch385: 0008-hwdb-update.patch
|
||||
|
||||
# UDEV PATCHES
|
||||
# ============
|
||||
@ -1454,6 +1468,13 @@ cp %{SOURCE7} m4/
|
||||
%patch376 -p0
|
||||
%patch377 -p0
|
||||
%patch378 -p0
|
||||
%patch379 -p0
|
||||
%patch380 -p0
|
||||
%patch381 -p0
|
||||
%patch382 -p0
|
||||
%patch383 -p0
|
||||
%patch384 -p0
|
||||
%patch385 -p0
|
||||
|
||||
# udev patches
|
||||
%patch1001 -p1
|
||||
@ -1541,6 +1562,9 @@ cp %{SOURCE7} m4/
|
||||
%patch1062 -p1
|
||||
%patch1063 -p0
|
||||
|
||||
# remove patch backups
|
||||
find -name '*.orig' -exec rm -f '{}' \+
|
||||
|
||||
# ensure generate files are removed
|
||||
rm -f units/emergency.service
|
||||
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 26 11:25:57 UTC 2014 - werner@suse.de
|
||||
|
||||
- Port back and add the missed upstream patches from 2014/08/22
|
||||
0004-login-set_controller-should-fail-if-prepare_vt-fails.patch
|
||||
0006-login-share-VT-signal-handler-between-sessions.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 22 15:12:23 UTC 2014 - werner@suse.de
|
||||
|
||||
|
38
systemd.spec
38
systemd.spec
@ -766,19 +766,33 @@ Patch370: 0002-switch-root-umount-the-old-root-correctly.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/08/22
|
||||
Patch371: 0003-bootchart-it-s-not-OK-to-return-1-from-a-main-progra.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/08/22
|
||||
Patch372: 0005-sd-resolve-fix-allocation-if-query-ids-never-reuse-t.patch
|
||||
Patch372: 0004-login-set_controller-should-fail-if-prepare_vt-fails.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/08/22
|
||||
Patch373: 0007-journald-also-increase-the-SendBuffer-of-dev-log-to-.patch
|
||||
Patch373: 0005-sd-resolve-fix-allocation-if-query-ids-never-reuse-t.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/08/22
|
||||
Patch374: 0008-mount-setup-fix-counting-of-early-mounts-without-SMA.patch
|
||||
Patch374: 0006-login-share-VT-signal-handler-between-sessions.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/08/22
|
||||
Patch375: 0009-journald-Fix-off-by-one-error-in-Missed-X-kernel-mes.patch
|
||||
Patch375: 0007-journald-also-increase-the-SendBuffer-of-dev-log-to-.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/08/22
|
||||
Patch376: 0010-machine_kill-Don-t-kill-the-unit-when-killing-the-le.patch
|
||||
Patch376: 0008-mount-setup-fix-counting-of-early-mounts-without-SMA.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/08/22
|
||||
Patch377: 0011-units-fix-BindsTo-logic-when-applied-relative-to-ser.patch
|
||||
Patch377: 0009-journald-Fix-off-by-one-error-in-Missed-X-kernel-mes.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/08/22
|
||||
Patch378: 0012-util-try-to-be-a-bit-more-NFS-compatible-when-checki.patch
|
||||
Patch378: 0010-machine_kill-Don-t-kill-the-unit-when-killing-the-le.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/08/22
|
||||
Patch379: 0011-units-fix-BindsTo-logic-when-applied-relative-to-ser.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/08/22
|
||||
Patch380: 0012-util-try-to-be-a-bit-more-NFS-compatible-when-checki.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/08/25
|
||||
Patch381: 0001-hwdb-keymaps-for-Samsung-900X3E-900X3F.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/08/25
|
||||
Patch382: 0002-Add-hwdb-entry-for-Samsung-Series-7-Ultra.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/08/25
|
||||
Patch383: 0003-keymap-Fix-HP-Pavillon-DV7.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/08/25
|
||||
Patch384: 0004-hwdb-update-format-description-and-document-reloadin.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/08/25
|
||||
Patch385: 0008-hwdb-update.patch
|
||||
|
||||
# UDEV PATCHES
|
||||
# ============
|
||||
@ -1449,6 +1463,13 @@ cp %{SOURCE7} m4/
|
||||
%patch376 -p0
|
||||
%patch377 -p0
|
||||
%patch378 -p0
|
||||
%patch379 -p0
|
||||
%patch380 -p0
|
||||
%patch381 -p0
|
||||
%patch382 -p0
|
||||
%patch383 -p0
|
||||
%patch384 -p0
|
||||
%patch385 -p0
|
||||
|
||||
# udev patches
|
||||
%patch1001 -p1
|
||||
@ -1536,6 +1557,9 @@ cp %{SOURCE7} m4/
|
||||
%patch1062 -p1
|
||||
%patch1063 -p0
|
||||
|
||||
# remove patch backups
|
||||
find -name '*.orig' -exec rm -f '{}' \+
|
||||
|
||||
# ensure generate files are removed
|
||||
rm -f units/emergency.service
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user