forked from pool/systemd
Accepting request 140248 from Base:System
- Don't hardcode path for systemctl in udev post script. - Ensure systemd-udevd.service is shadowing boot.udev when booting under systemd. - Fix udev daemon upgrade under both systemd and sysvinit. - Add fix-logind-pty-seat.patch: fix logind complaining when doing su/sudo in X terminal. (forwarded request 140247 from fcrozat) OBS-URL: https://build.opensuse.org/request/show/140248 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=113
This commit is contained in:
parent
87fde291e2
commit
7564493967
29
fix-logind-pty-seat.patch
Normal file
29
fix-logind-pty-seat.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
From 978cf3c75fbd94fd0e046206ada6169b35edd919 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Lennart Poettering <lennart@poettering.net>
|
||||||
|
Date: Sun, 28 Oct 2012 17:37:16 +0100
|
||||||
|
Subject: [PATCH] logind: it's OK if a process on an pty requests a session
|
||||||
|
for seat0
|
||||||
|
|
||||||
|
After all, if a sudo/su inside an X terminal should get added to the
|
||||||
|
same session as the X session itself.
|
||||||
|
---
|
||||||
|
src/login/logind-dbus.c | 3 +--
|
||||||
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
|
||||||
|
index 4326e5b..8b6021d 100644
|
||||||
|
--- a/src/login/logind-dbus.c
|
||||||
|
+++ b/src/login/logind-dbus.c
|
||||||
|
@@ -415,8 +415,7 @@ static int bus_manager_create_session(Manager *m, DBusMessage *message, DBusMess
|
||||||
|
if (vtnr != 0)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
- } else if (!isempty(tty) && s && seat_is_vtconsole(s))
|
||||||
|
- return -EINVAL;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
if (s) {
|
||||||
|
if (seat_can_multi_session(s)) {
|
||||||
|
--
|
||||||
|
1.7.10.4
|
||||||
|
|
@ -1,3 +1,13 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Nov 5 14:37:46 UTC 2012 - fcrozat@suse.com
|
||||||
|
|
||||||
|
- Don't hardcode path for systemctl in udev post script.
|
||||||
|
- Ensure systemd-udevd.service is shadowing boot.udev when booting
|
||||||
|
under systemd.
|
||||||
|
- Fix udev daemon upgrade under both systemd and sysvinit.
|
||||||
|
- Add fix-logind-pty-seat.patch: fix logind complaining when doing
|
||||||
|
su/sudo in X terminal.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Nov 3 07:21:44 UTC 2012 - coolo@suse.com
|
Sat Nov 3 07:21:44 UTC 2012 - coolo@suse.com
|
||||||
|
|
||||||
|
@ -131,6 +131,8 @@ Patch60: var-run-lock.patch
|
|||||||
# Never add any patches to this package without the upstream commit id
|
# Never add any patches to this package without the upstream commit id
|
||||||
# in the patch. Any patches added here without a very good reason to make
|
# in the patch. Any patches added here without a very good reason to make
|
||||||
# an exception will be silently removed with the next version update.
|
# an exception will be silently removed with the next version update.
|
||||||
|
# PATCH-FIX-UPSTREAM fix-logind-pty-seat.patch fcrozat@suse.com -- fix logind complaining when doing su/sudo in X terminal
|
||||||
|
Patch61: fix-logind-pty-seat.patch
|
||||||
|
|
||||||
# udev patches
|
# udev patches
|
||||||
# PATCH-FIX-OPENSUSE 0001-Reinstate-TIMEOUT-handling.patch
|
# PATCH-FIX-OPENSUSE 0001-Reinstate-TIMEOUT-handling.patch
|
||||||
@ -311,6 +313,7 @@ provides GObject access to udev device information.
|
|||||||
%patch56 -p1
|
%patch56 -p1
|
||||||
%patch59 -p1
|
%patch59 -p1
|
||||||
%patch60 -p1
|
%patch60 -p1
|
||||||
|
%patch61 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if ! 0%{?bootstrap}
|
%if ! 0%{?bootstrap}
|
||||||
@ -348,6 +351,7 @@ mkdir -p $RPM_BUILD_ROOT/%{_prefix}/usr/lib/firmware/updates
|
|||||||
ln -sf /lib/firmware $RPM_BUILD_ROOT/usr/lib/firmware
|
ln -sf /lib/firmware $RPM_BUILD_ROOT/usr/lib/firmware
|
||||||
|
|
||||||
install -m755 -D %{S:1060} $RPM_BUILD_ROOT/etc/init.d/boot.udev
|
install -m755 -D %{S:1060} $RPM_BUILD_ROOT/etc/init.d/boot.udev
|
||||||
|
ln -s systemd-udevd.service $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/udev.service
|
||||||
install -m755 -D %{S:1061} $RPM_BUILD_ROOT/%{_prefix}/lib/udev/write_dev_root_rule
|
install -m755 -D %{S:1061} $RPM_BUILD_ROOT/%{_prefix}/lib/udev/write_dev_root_rule
|
||||||
install -m644 -D %{S:1062} $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/udev-root-symlink.service
|
install -m644 -D %{S:1062} $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/udev-root-symlink.service
|
||||||
mkdir -p $RPM_BUILD_ROOT/lib/systemd/system/basic.target.wants
|
mkdir -p $RPM_BUILD_ROOT/lib/systemd/system/basic.target.wants
|
||||||
@ -496,6 +500,13 @@ if test -L /usr/lib/udev -a /lib/udev -ef /usr/lib/udev ; then
|
|||||||
mv /lib/udev /usr/lib
|
mv /lib/udev /usr/lib
|
||||||
ln -s /usr/lib/udev /lib/udev
|
ln -s /usr/lib/udev /lib/udev
|
||||||
fi
|
fi
|
||||||
|
# kill daemon if we are not in a chroot
|
||||||
|
if test -f /proc/1/exe -a -d /proc/1/root ; then
|
||||||
|
if test "$(stat -Lc '%%D-%%i' /)" = "$(stat -Lc '%%D-%%i' /proc/1/root)"; then
|
||||||
|
systemctl stop systemd-udevd-control.socket systemd-udevd-kernel.socket systemd-udevd.service udev.service udev-control.socket udev-kernel.socket >/dev/null 2>&1 || :
|
||||||
|
udevadm control --exit 2>&1 || :
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
%post -n %{udevpkgname}
|
%post -n %{udevpkgname}
|
||||||
%{fillup_and_insserv -Y boot.udev}
|
%{fillup_and_insserv -Y boot.udev}
|
||||||
@ -507,12 +518,13 @@ rm -f /etc/sysconfig/udev
|
|||||||
rm -f /etc/udev/rules.d/20-cdrom.rules
|
rm -f /etc/udev/rules.d/20-cdrom.rules
|
||||||
rm -f /etc/udev/rules.d/55-cdrom.rules
|
rm -f /etc/udev/rules.d/55-cdrom.rules
|
||||||
rm -f /etc/udev/rules.d/65-cdrom.rules
|
rm -f /etc/udev/rules.d/65-cdrom.rules
|
||||||
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
systemctl daemon-reload >/dev/null 2>&1 || :
|
||||||
# start daemon if we are not in a chroot
|
# start daemon if we are not in a chroot
|
||||||
if test -f /proc/1/exe -a -d /proc/1/root; then
|
if test -f /proc/1/exe -a -d /proc/1/root; then
|
||||||
if test "$(stat -Lc '%%D-%%i' /)" = "$(stat -Lc '%%D-%%i' /proc/1/root)"; then
|
if test "$(stat -Lc '%%D-%%i' /)" = "$(stat -Lc '%%D-%%i' /proc/1/root)"; then
|
||||||
/usr/bin/systemctl start systemd-udevd.service >/dev/null 2>&1 || :
|
if ! systemctl start systemd-udevd.service >/dev/null 2>&1; then
|
||||||
/usr/lib/systemd/systemd-udevd --daemon >/dev/null 2>&1 || :
|
/usr/lib/systemd/systemd-udevd --daemon >/dev/null 2>&1 || :
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -526,7 +538,7 @@ fi
|
|||||||
|
|
||||||
%postun -n %{udevpkgname}
|
%postun -n %{udevpkgname}
|
||||||
%insserv_cleanup
|
%insserv_cleanup
|
||||||
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
systemctl daemon-reload >/dev/null 2>&1 || :
|
||||||
|
|
||||||
[ -x /sbin/mkinitrd_setup ] && /sbin/mkinitrd_setup
|
[ -x /sbin/mkinitrd_setup ] && /sbin/mkinitrd_setup
|
||||||
if [ -e /var/lib/no_initrd_recreation_by_suspend ]; then
|
if [ -e /var/lib/no_initrd_recreation_by_suspend ]; then
|
||||||
@ -586,6 +598,7 @@ rm -rf %{buildroot}
|
|||||||
%dir %{_prefix}/lib/systemd/user
|
%dir %{_prefix}/lib/systemd/user
|
||||||
%dir %{_prefix}/lib/systemd/system
|
%dir %{_prefix}/lib/systemd/system
|
||||||
%exclude %{_prefix}/lib/systemd/system/systemd-udev*.*
|
%exclude %{_prefix}/lib/systemd/system/systemd-udev*.*
|
||||||
|
%exclude %{_prefix}/lib/systemd/system/udev.service
|
||||||
%exclude %{_prefix}/lib/systemd/system/udev-root-symlink.service
|
%exclude %{_prefix}/lib/systemd/system/udev-root-symlink.service
|
||||||
%exclude %{_prefix}/lib/systemd/system/*.target.wants/systemd-udev*.*
|
%exclude %{_prefix}/lib/systemd/system/*.target.wants/systemd-udev*.*
|
||||||
%exclude %{_prefix}/lib/systemd/system/basic.target.wants/udev-root-symlink.service
|
%exclude %{_prefix}/lib/systemd/system/basic.target.wants/udev-root-symlink.service
|
||||||
|
@ -1,3 +1,13 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Nov 5 14:37:46 UTC 2012 - fcrozat@suse.com
|
||||||
|
|
||||||
|
- Don't hardcode path for systemctl in udev post script.
|
||||||
|
- Ensure systemd-udevd.service is shadowing boot.udev when booting
|
||||||
|
under systemd.
|
||||||
|
- Fix udev daemon upgrade under both systemd and sysvinit.
|
||||||
|
- Add fix-logind-pty-seat.patch: fix logind complaining when doing
|
||||||
|
su/sudo in X terminal.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Nov 3 07:21:44 UTC 2012 - coolo@suse.com
|
Sat Nov 3 07:21:44 UTC 2012 - coolo@suse.com
|
||||||
|
|
||||||
|
21
systemd.spec
21
systemd.spec
@ -126,6 +126,8 @@ Patch60: var-run-lock.patch
|
|||||||
# Never add any patches to this package without the upstream commit id
|
# Never add any patches to this package without the upstream commit id
|
||||||
# in the patch. Any patches added here without a very good reason to make
|
# in the patch. Any patches added here without a very good reason to make
|
||||||
# an exception will be silently removed with the next version update.
|
# an exception will be silently removed with the next version update.
|
||||||
|
# PATCH-FIX-UPSTREAM fix-logind-pty-seat.patch fcrozat@suse.com -- fix logind complaining when doing su/sudo in X terminal
|
||||||
|
Patch61: fix-logind-pty-seat.patch
|
||||||
|
|
||||||
# udev patches
|
# udev patches
|
||||||
# PATCH-FIX-OPENSUSE 0001-Reinstate-TIMEOUT-handling.patch
|
# PATCH-FIX-OPENSUSE 0001-Reinstate-TIMEOUT-handling.patch
|
||||||
@ -306,6 +308,7 @@ provides GObject access to udev device information.
|
|||||||
%patch56 -p1
|
%patch56 -p1
|
||||||
%patch59 -p1
|
%patch59 -p1
|
||||||
%patch60 -p1
|
%patch60 -p1
|
||||||
|
%patch61 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if ! 0%{?bootstrap}
|
%if ! 0%{?bootstrap}
|
||||||
@ -343,6 +346,7 @@ mkdir -p $RPM_BUILD_ROOT/%{_prefix}/usr/lib/firmware/updates
|
|||||||
ln -sf /lib/firmware $RPM_BUILD_ROOT/usr/lib/firmware
|
ln -sf /lib/firmware $RPM_BUILD_ROOT/usr/lib/firmware
|
||||||
|
|
||||||
install -m755 -D %{S:1060} $RPM_BUILD_ROOT/etc/init.d/boot.udev
|
install -m755 -D %{S:1060} $RPM_BUILD_ROOT/etc/init.d/boot.udev
|
||||||
|
ln -s systemd-udevd.service $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/udev.service
|
||||||
install -m755 -D %{S:1061} $RPM_BUILD_ROOT/%{_prefix}/lib/udev/write_dev_root_rule
|
install -m755 -D %{S:1061} $RPM_BUILD_ROOT/%{_prefix}/lib/udev/write_dev_root_rule
|
||||||
install -m644 -D %{S:1062} $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/udev-root-symlink.service
|
install -m644 -D %{S:1062} $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/udev-root-symlink.service
|
||||||
mkdir -p $RPM_BUILD_ROOT/lib/systemd/system/basic.target.wants
|
mkdir -p $RPM_BUILD_ROOT/lib/systemd/system/basic.target.wants
|
||||||
@ -491,6 +495,13 @@ if test -L /usr/lib/udev -a /lib/udev -ef /usr/lib/udev ; then
|
|||||||
mv /lib/udev /usr/lib
|
mv /lib/udev /usr/lib
|
||||||
ln -s /usr/lib/udev /lib/udev
|
ln -s /usr/lib/udev /lib/udev
|
||||||
fi
|
fi
|
||||||
|
# kill daemon if we are not in a chroot
|
||||||
|
if test -f /proc/1/exe -a -d /proc/1/root ; then
|
||||||
|
if test "$(stat -Lc '%%D-%%i' /)" = "$(stat -Lc '%%D-%%i' /proc/1/root)"; then
|
||||||
|
systemctl stop systemd-udevd-control.socket systemd-udevd-kernel.socket systemd-udevd.service udev.service udev-control.socket udev-kernel.socket >/dev/null 2>&1 || :
|
||||||
|
udevadm control --exit 2>&1 || :
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
%post -n %{udevpkgname}
|
%post -n %{udevpkgname}
|
||||||
%{fillup_and_insserv -Y boot.udev}
|
%{fillup_and_insserv -Y boot.udev}
|
||||||
@ -502,12 +513,13 @@ rm -f /etc/sysconfig/udev
|
|||||||
rm -f /etc/udev/rules.d/20-cdrom.rules
|
rm -f /etc/udev/rules.d/20-cdrom.rules
|
||||||
rm -f /etc/udev/rules.d/55-cdrom.rules
|
rm -f /etc/udev/rules.d/55-cdrom.rules
|
||||||
rm -f /etc/udev/rules.d/65-cdrom.rules
|
rm -f /etc/udev/rules.d/65-cdrom.rules
|
||||||
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
systemctl daemon-reload >/dev/null 2>&1 || :
|
||||||
# start daemon if we are not in a chroot
|
# start daemon if we are not in a chroot
|
||||||
if test -f /proc/1/exe -a -d /proc/1/root; then
|
if test -f /proc/1/exe -a -d /proc/1/root; then
|
||||||
if test "$(stat -Lc '%%D-%%i' /)" = "$(stat -Lc '%%D-%%i' /proc/1/root)"; then
|
if test "$(stat -Lc '%%D-%%i' /)" = "$(stat -Lc '%%D-%%i' /proc/1/root)"; then
|
||||||
/usr/bin/systemctl start systemd-udevd.service >/dev/null 2>&1 || :
|
if ! systemctl start systemd-udevd.service >/dev/null 2>&1; then
|
||||||
/usr/lib/systemd/systemd-udevd --daemon >/dev/null 2>&1 || :
|
/usr/lib/systemd/systemd-udevd --daemon >/dev/null 2>&1 || :
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -521,7 +533,7 @@ fi
|
|||||||
|
|
||||||
%postun -n %{udevpkgname}
|
%postun -n %{udevpkgname}
|
||||||
%insserv_cleanup
|
%insserv_cleanup
|
||||||
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
systemctl daemon-reload >/dev/null 2>&1 || :
|
||||||
|
|
||||||
[ -x /sbin/mkinitrd_setup ] && /sbin/mkinitrd_setup
|
[ -x /sbin/mkinitrd_setup ] && /sbin/mkinitrd_setup
|
||||||
if [ -e /var/lib/no_initrd_recreation_by_suspend ]; then
|
if [ -e /var/lib/no_initrd_recreation_by_suspend ]; then
|
||||||
@ -581,6 +593,7 @@ rm -rf %{buildroot}
|
|||||||
%dir %{_prefix}/lib/systemd/user
|
%dir %{_prefix}/lib/systemd/user
|
||||||
%dir %{_prefix}/lib/systemd/system
|
%dir %{_prefix}/lib/systemd/system
|
||||||
%exclude %{_prefix}/lib/systemd/system/systemd-udev*.*
|
%exclude %{_prefix}/lib/systemd/system/systemd-udev*.*
|
||||||
|
%exclude %{_prefix}/lib/systemd/system/udev.service
|
||||||
%exclude %{_prefix}/lib/systemd/system/udev-root-symlink.service
|
%exclude %{_prefix}/lib/systemd/system/udev-root-symlink.service
|
||||||
%exclude %{_prefix}/lib/systemd/system/*.target.wants/systemd-udev*.*
|
%exclude %{_prefix}/lib/systemd/system/*.target.wants/systemd-udev*.*
|
||||||
%exclude %{_prefix}/lib/systemd/system/basic.target.wants/udev-root-symlink.service
|
%exclude %{_prefix}/lib/systemd/system/basic.target.wants/udev-root-symlink.service
|
||||||
|
Loading…
Reference in New Issue
Block a user