diffstat for systemd-232 systemd-232 .pc/.quilt_patches | 1 .pc/.quilt_series | 1 .pc/.version | 1 changelog | 31 +++++++ patches/rbt-logind-multisession.patch | 138 ++++++++++++++++++++++++++++++++++ patches/series | 1 rules | 2 7 files changed, 174 insertions(+), 1 deletion(-) diff -Nru systemd-232/debian/.pc/.quilt_patches systemd-232/debian/.pc/.quilt_patches --- systemd-232/debian/.pc/.quilt_patches 1970-01-01 00:00:00.000000000 +0000 +++ systemd-232/debian/.pc/.quilt_patches 2018-05-16 17:03:47.000000000 +0000 @@ -0,0 +1 @@ +patches diff -Nru systemd-232/debian/.pc/.quilt_series systemd-232/debian/.pc/.quilt_series --- systemd-232/debian/.pc/.quilt_series 1970-01-01 00:00:00.000000000 +0000 +++ systemd-232/debian/.pc/.quilt_series 2018-05-16 17:03:47.000000000 +0000 @@ -0,0 +1 @@ +series diff -Nru systemd-232/debian/.pc/.version systemd-232/debian/.pc/.version --- systemd-232/debian/.pc/.version 1970-01-01 00:00:00.000000000 +0000 +++ systemd-232/debian/.pc/.version 2018-05-16 17:03:47.000000000 +0000 @@ -0,0 +1 @@ +2 diff -Nru systemd-232/debian/changelog systemd-232/debian/changelog --- systemd-232/debian/changelog 2017-12-03 14:03:50.000000000 +0000 +++ systemd-232/debian/changelog 2018-05-19 14:59:33.000000000 +0000 @@ -1,3 +1,34 @@ +systemd (232-25+deb9u2astra.ce5) unstable; urgency=medium + + * rbt-logind-multisession.patch: fix for hotplug added devices + + -- Alexander Smirnov Sat, 19 May 2018 17:59:33 +0300 + +systemd (232-25+deb9u2astra.ce4) unstable; urgency=medium + + * Update rbt-logind-mutisession.patch + + -- Alexander Smirnov Wed, 16 May 2018 19:28:55 +0300 + +systemd (232-25+deb9u2astra.ce3) unstable; urgency=medium + + * rbt-logind-multisession.patch improved not to pause new X server when old one is not finished yet + + -- Alexander Smirnov Sat, 28 Apr 2018 15:16:15 +0300 + +systemd (232-25+deb9u2astra.ce2) unstable; urgency=medium + + * Update rbt-logind-mutisession.patch + + -- Egor Lebedev Tue, 20 Mar 2018 13:51:50 +0300 + +systemd (232-25+deb9u2astra.ce1) unstable; urgency=medium + + * add rbt-logind-mutisession.patch + * debian/rules: add with-kill-user-processes option + + -- Egor Lebedev Mon, 19 Mar 2018 20:03:50 +0300 + systemd (232-25+deb9u2) stretch; urgency=medium * networkd: Handle MTU field in IPv6 RA (Closes: #878162) diff -Nru systemd-232/debian/patches/rbt-logind-multisession.patch systemd-232/debian/patches/rbt-logind-multisession.patch --- systemd-232/debian/patches/rbt-logind-multisession.patch 1970-01-01 00:00:00.000000000 +0000 +++ systemd-232/debian/patches/rbt-logind-multisession.patch 2018-05-19 14:59:27.000000000 +0000 @@ -0,0 +1,138 @@ +diff -Naur systemd-232.old/src/login/logind-seat.c systemd-232.new/src/login/logind-seat.c +--- systemd-232.old/src/login/logind-seat.c 2018-05-01 17:59:41.000000000 +0300 ++++ systemd-232.new/src/login/logind-seat.c 2018-05-01 17:43:00.038853830 +0300 +@@ -230,8 +230,20 @@ + return r; + } + ++static Session * seat_get_greeter_session(Seat *s,unsigned int vtnr) //alex ++{ ++ Session *i, *x_active = NULL; ++ LIST_FOREACH(sessions_by_seat, i, s->sessions) ++ if (i->vtnr == vtnr && i->class==SESSION_GREETER) ++ { ++ x_active = i; ++ break; ++ } ++ return x_active; ++} ++ + int seat_set_active(Seat *s, Session *session) { +- Session *old_active; ++ Session *old_active, *x_active = NULL; + + assert(s); + assert(!session || session->seat == s); +@@ -243,11 +255,24 @@ + s->active = session; + + if (old_active) { +- session_device_pause_all(old_active); ++ if (session && old_active->vtnr == session->vtnr) //alex ++ x_active = seat_get_greeter_session(s,session->vtnr); ++ else x_active = seat_get_greeter_session(s,old_active->vtnr); ++ ++ log_debug("sess=%s(%s) x_active=%s(%s) old_active=%s(%s)\n", ++ session?session->id:"none", session?(session->stopping?"stopping":"not stopping"):"unkn", ++ x_active?x_active->id:"none", x_active?(x_active->stopping?"stopping":"not stopping"):"unkn", ++ old_active?old_active->id:"none", old_active?(old_active->stopping?"stopping":"not stopping"):"unkn" ++ ); ++ ++ if (x_active && session /*&& x_active!=session*/ && session->vtnr==x_active->vtnr) ++ log_debug("Don't pause devices when switch active session from greeter to user on the same vt=%d\n",x_active->vtnr); ++ else ++ session_device_pause_all(x_active?x_active:old_active); + session_send_changed(old_active, "Active", NULL); + } + +- seat_apply_acls(s, old_active); ++ seat_apply_acls(s, x_active?x_active:old_active); + + if (session && session->started) { + session_send_changed(session, "Active", NULL); +@@ -333,8 +358,9 @@ + } + + int seat_active_vt_changed(Seat *s, unsigned int vtnr) { +- Session *i, *new_active = NULL; ++ Session *i, *new_active = NULL, *x_active = NULL; + int r; ++ int x_set = 0; + + assert(s); + assert(vtnr >= 1); +@@ -344,24 +370,42 @@ + + log_debug("VT changed to %u", vtnr); + ++ x_active = seat_get_greeter_session(s,vtnr); //alex ++ + /* we might have earlier closing sessions on the same VT, so try to + * find a running one first */ + LIST_FOREACH(sessions_by_seat, i, s->sessions) +- if (i->vtnr == vtnr && !i->stopping) { +- new_active = i; +- break; ++ if (i->vtnr == vtnr && !i->stopping && i!=x_active) { ++ if (i->class==SESSION_GREETER) /*x_active = i*/ ; //second X, but may be previous still unfinished ++ else new_active = i; ++ break; + } + +- if (!new_active) { ++ if (0/*!new_active*/) { + /* no running one? then we can't decide which one is the + * active one, let the first one win */ + LIST_FOREACH(sessions_by_seat, i, s->sessions) +- if (i->vtnr == vtnr) { +- new_active = i; +- break; ++ if (i->vtnr == vtnr && i!=x_active) { ++ if (i->class==SESSION_GREETER) /*x_active = i*/ ; //second X, but may be previous still unfinished ++ else new_active = i; ++ break; + } + } + ++ log_debug("new_active==%s(%s) x_active=%s(%s)\n", ++ new_active?new_active->id:"none", new_active?(new_active->stopping?"stopping":"not stopping"):"unkn", ++ x_active?x_active->id:"none", x_active?(x_active->stopping?"stopping":"not stopping"):"unkn"); ++ ++ if (x_active && /*new_active &&*/ x_active!=new_active) { //alex ++ r = seat_set_active(s, x_active); ++ x_set = 1; ++ } ++ ++ if (x_set!=0) ++ { ++ if (new_active) seat_set_active(s, new_active); ++ } ++ else + r = seat_set_active(s, new_active); + manager_spawn_autovt(s->manager, vtnr); + +diff -Naur systemd-232.old/src/login/logind-session.c systemd-232.new/src/login/logind-session.c +--- systemd-232.old/src/login/logind-session.c 2018-04-28 14:59:46.000000000 +0300 ++++ systemd-232.new/src/login/logind-session.c 2018-04-27 20:52:26.000000000 +0300 +@@ -871,8 +871,8 @@ + assert(s->fifo_fd == fd); + + /* EOF on the FIFO means the session died abnormally. */ +- + session_remove_fifo(s); ++ if (s->class!=SESSION_GREETER) //alex + session_stop(s, false); + + return 1; +diff -Naur systemd-232.old/src/login/logind-session-device.c systemd-232.new/src/login/logind-session-device.c +--- systemd-232.old/src/login/logind-session-device.c 2016-11-03 20:16:42.000000000 +0300 ++++ systemd-232.new/src/login/logind-session-device.c 2018-05-19 15:50:15.447970290 +0300 +@@ -374,7 +374,7 @@ + * to the caller. If the session is not active, this _might_ immediately + * revoke access and thus invalidate the fd. But this is still needed + * to pass a valid fd back. */ +- sd->active = session_is_active(s); ++ sd->active = session_is_active(s) || s->class==SESSION_GREETER; //alex to get hotplug devices + r = session_device_open(sd, sd->active); + if (r < 0) { + /* EINVAL _may_ mean a master is active; retry inactive */ diff -Nru systemd-232/debian/patches/series systemd-232/debian/patches/series --- systemd-232/debian/patches/series 2017-12-03 14:03:50.000000000 +0000 +++ systemd-232/debian/patches/series 2018-05-16 16:28:39.000000000 +0000 @@ -101,3 +101,4 @@ debian/Revert-core-enable-TasksMax-for-all-services-by-default-a.patch debian/Let-graphical-session-pre.target-be-manually-started.patch debian/Add-env-variable-for-machine-ID-path.patch +rbt-logind-multisession.patch diff -Nru systemd-232/debian/rules systemd-232/debian/rules --- systemd-232/debian/rules 2017-12-03 14:03:50.000000000 +0000 +++ systemd-232/debian/rules 2018-03-19 17:01:44.000000000 +0000 @@ -116,7 +116,7 @@ --with-telinit=/lib/sysvinit/telinit \ --with-dbuspolicydir=/etc/dbus-1/system.d/ \ --with-support-url=$(SUPPORT_URL) \ - --without-kill-user-processes \ + --with-kill-user-processes \ --with-pamconfdir=no \ --enable-split-usr \ --disable-qrencode \