Accepting request 315376 from home:jengelh:branches:Base:System

- Avoid restarting logind [bnc#934901]
- Do not suppress errors in any case, even if they are ignored

OBS-URL: https://build.opensuse.org/request/show/315376
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=884
This commit is contained in:
Marcus Meissner 2015-07-07 15:19:45 +00:00 committed by Git OBS Bridge
parent 9643f10967
commit 1a0cc00367
4 changed files with 60 additions and 46 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Jul 7 08:54:38 UTC 2015 - jengelh@inai.de
- Avoid restarting logind [bnc#934901]
- Do not suppress errors in any case, even if they are ignored
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Jul 5 15:52:33 UTC 2015 - hrvoje.senjan@gmail.com Sun Jul 5 15:52:33 UTC 2015 - hrvoje.senjan@gmail.com

View File

@ -920,16 +920,16 @@ exit 0
%endif %endif
/sbin/ldconfig /sbin/ldconfig
[ -e %{_localstatedir}/lib/random-seed ] && mv %{_localstatedir}/lib/random-seed %{_localstatedir}/lib/systemd/ > /dev/null || : [ -e %{_localstatedir}/lib/random-seed ] && mv %{_localstatedir}/lib/random-seed %{_localstatedir}/lib/systemd/ > /dev/null || :
/usr/bin/systemd-machine-id-setup >/dev/null 2>&1 || : /usr/bin/systemd-machine-id-setup || :
/usr/lib/systemd/systemd-random-seed save >/dev/null 2>&1 || : /usr/lib/systemd/systemd-random-seed save || :
/usr/bin/systemctl daemon-reexec >/dev/null 2>&1 || : /usr/bin/systemctl daemon-reexec || :
/usr/bin/journalctl --update-catalog >/dev/null 2>&1 || : /usr/bin/journalctl --update-catalog || :
# Make sure new journal files # Make sure new journal files
chgrp systemd-journal %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : chgrp systemd-journal %{_localstatedir}/log/journal/ || :
chmod g+s %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : chmod g+s %{_localstatedir}/log/journal/ || :
if read ID < /etc/machine-id > /dev/null 2>&1 ; then if read ID < /etc/machine-id > /dev/null 2>&1 ; then
chgrp systemd-journal %{_localstatedir}/log/journal/$ID > /dev/null 2>&1 || : chgrp systemd-journal "%{_localstatedir}/log/journal/$ID" || :
chmod g+s %{_localstatedir}/log/journal/$ID > /dev/null 2>&1 || : chmod g+s "%{_localstatedir}/log/journal/$ID" || :
fi fi
%if %{with systemgrps} %if %{with systemgrps}
getent group wheel && setfacl -Rnm g:wheel:rx,d:g:wheel:rx %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : getent group wheel && setfacl -Rnm g:wheel:rx,d:g:wheel:rx %{_localstatedir}/log/journal/ > /dev/null 2>&1 || :
@ -952,7 +952,7 @@ if [ "$1" -eq 1 ]; then
getty@tty1.service \ getty@tty1.service \
systemd-readahead-collect.service \ systemd-readahead-collect.service \
systemd-readahead-replay.service \ systemd-readahead-replay.service \
remote-fs.target >/dev/null 2>&1 || : remote-fs.target || :
fi fi
# since v207 /etc/sysctl.conf is no longer parsed, however # since v207 /etc/sysctl.conf is no longer parsed, however
@ -970,8 +970,9 @@ done
%postun %postun
/sbin/ldconfig /sbin/ldconfig
if [ $1 -ge 1 ]; then if [ $1 -ge 1 ]; then
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : /usr/bin/systemctl daemon-reload || :
/usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || : #Avoid restarting logind [bnc#934901] until fixed upstream
#/usr/bin/systemctl try-restart systemd-logind.service || :
fi fi
%if ! 0%{?bootstrap} %if ! 0%{?bootstrap}
if [ $1 -eq 0 ]; then if [ $1 -eq 0 ]; then
@ -983,7 +984,7 @@ fi
if [ $1 -eq 0 ]; then if [ $1 -eq 0 ]; then
/usr/bin/systemctl disable \ /usr/bin/systemctl disable \
getty@.service \ getty@.service \
remote-fs.target >/dev/null 2>&1 || : remote-fs.target || :
rm -f /etc/systemd/system/default.target 2>&1 || : rm -f /etc/systemd/system/default.target 2>&1 || :
fi fi
@ -1001,31 +1002,31 @@ elif [ ! -e /lib/udev ]; then
ln -s /usr/lib/udev /lib/udev ln -s /usr/lib/udev /lib/udev
fi fi
# Create "tape" group which is referenced by 50-udev-default.rules and 60-persistent-storage-tape.rules # Create "tape" group which is referenced by 50-udev-default.rules and 60-persistent-storage-tape.rules
getent group tape >/dev/null || groupadd -r tape 2> /dev/null || : getent group tape >/dev/null || groupadd -r tape || :
# kill daemon if we are not in a chroot # kill 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
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 || : systemctl stop systemd-udevd-control.socket systemd-udevd-kernel.socket systemd-udevd.service udev.service udev-control.socket udev-kernel.socket || :
udevadm control --exit 2>&1 || : udevadm control --exit || :
fi fi
fi fi
%post -n udev%{?mini} %post -n udev%{?mini}
/usr/bin/udevadm hwdb --update >/dev/null 2>&1 || : /usr/bin/udevadm hwdb --update || :
# add KERNEL name match to existing persistent net rules # add KERNEL name match to existing persistent net rules
sed -ri '/KERNEL/ ! { s/NAME="(eth|wlan|ath)([0-9]+)"/KERNEL=="\1*", NAME="\1\2"/}' \ sed -ri '/KERNEL/ ! { s/NAME="(eth|wlan|ath)([0-9]+)"/KERNEL=="\1*", NAME="\1\2"/}' \
/etc/udev/rules.d/70-persistent-net.rules >/dev/null 2>&1 || : /etc/udev/rules.d/70-persistent-net.rules || :
# cleanup old stuff # cleanup old stuff
rm -f /etc/sysconfig/udev 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
systemctl daemon-reload >/dev/null 2>&1 || : systemctl daemon-reload || :
# 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
if ! systemctl start systemd-udevd.service >/dev/null 2>&1; then if ! systemctl start systemd-udevd.service; then
/usr/lib/systemd/systemd-udevd --daemon >/dev/null 2>&1 || : /usr/lib/systemd/systemd-udevd --daemon || :
fi fi
fi fi
fi fi
@ -1047,7 +1048,7 @@ fi
%postun -n udev%{?mini} %postun -n udev%{?mini}
%insserv_cleanup %insserv_cleanup
systemctl daemon-reload >/dev/null 2>&1 || : systemctl daemon-reload || :
if [ "${YAST_IS_RUNNING}" != "instsys" ]; then if [ "${YAST_IS_RUNNING}" != "instsys" ]; then
if [ -e %{_localstatedir}/lib/no_initrd_recreation_by_suspend ]; then if [ -e %{_localstatedir}/lib/no_initrd_recreation_by_suspend ]; then
@ -1095,7 +1096,7 @@ getent group adm && setfacl -Rnm g:adm:rx,d:g:adm:rx %{_localstatedir}/log
%endif %endif
if [ "$1" -eq 1 ]; then if [ "$1" -eq 1 ]; then
# tell journal to start logging on disk if directory didn't exist before # tell journal to start logging on disk if directory didn't exist before
systemctl --no-block restart systemd-journal-flush.service >/dev/null 2>&1 || : systemctl --no-block restart systemd-journal-flush.service || :
fi fi
%preun -n nss-myhostname %preun -n nss-myhostname
@ -1111,7 +1112,7 @@ fi
%postun -n nss-mymachines -p /sbin/ldconfig %postun -n nss-mymachines -p /sbin/ldconfig
%pre journal-gateway %pre journal-gateway
getent passwd systemd-journal-gateway >/dev/null || useradd -r -l -g systemd-journal-gateway -d %{_localstatedir}/log/journal/ -s /usr/sbin/nologin -c "Journal Gateway" systemd-journal-gateway >/dev/null 2>&1 || : getent passwd systemd-journal-gateway >/dev/null || useradd -r -l -g systemd-journal-gateway -d %{_localstatedir}/log/journal/ -s /usr/sbin/nologin -c "Journal Gateway" systemd-journal-gateway || :
getent group systemd-journal-gateway >/dev/null || groupadd -r systemd-journal-gateway || : getent group systemd-journal-gateway >/dev/null || groupadd -r systemd-journal-gateway || :
%service_add_pre systemd-journal-gatewayd.socket systemd-journal-gatewayd.service %service_add_pre systemd-journal-gatewayd.socket systemd-journal-gatewayd.service
exit 0 exit 0

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Jul 7 08:54:38 UTC 2015 - jengelh@inai.de
- Avoid restarting logind [bnc#934901]
- Do not suppress errors in any case, even if they are ignored
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Jul 5 15:52:33 UTC 2015 - hrvoje.senjan@gmail.com Sun Jul 5 15:52:33 UTC 2015 - hrvoje.senjan@gmail.com

View File

@ -915,16 +915,16 @@ exit 0
%endif %endif
/sbin/ldconfig /sbin/ldconfig
[ -e %{_localstatedir}/lib/random-seed ] && mv %{_localstatedir}/lib/random-seed %{_localstatedir}/lib/systemd/ > /dev/null || : [ -e %{_localstatedir}/lib/random-seed ] && mv %{_localstatedir}/lib/random-seed %{_localstatedir}/lib/systemd/ > /dev/null || :
/usr/bin/systemd-machine-id-setup >/dev/null 2>&1 || : /usr/bin/systemd-machine-id-setup || :
/usr/lib/systemd/systemd-random-seed save >/dev/null 2>&1 || : /usr/lib/systemd/systemd-random-seed save || :
/usr/bin/systemctl daemon-reexec >/dev/null 2>&1 || : /usr/bin/systemctl daemon-reexec || :
/usr/bin/journalctl --update-catalog >/dev/null 2>&1 || : /usr/bin/journalctl --update-catalog || :
# Make sure new journal files # Make sure new journal files
chgrp systemd-journal %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : chgrp systemd-journal %{_localstatedir}/log/journal/ || :
chmod g+s %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : chmod g+s %{_localstatedir}/log/journal/ || :
if read ID < /etc/machine-id > /dev/null 2>&1 ; then if read ID < /etc/machine-id > /dev/null 2>&1 ; then
chgrp systemd-journal %{_localstatedir}/log/journal/$ID > /dev/null 2>&1 || : chgrp systemd-journal "%{_localstatedir}/log/journal/$ID" || :
chmod g+s %{_localstatedir}/log/journal/$ID > /dev/null 2>&1 || : chmod g+s "%{_localstatedir}/log/journal/$ID" || :
fi fi
%if %{with systemgrps} %if %{with systemgrps}
getent group wheel && setfacl -Rnm g:wheel:rx,d:g:wheel:rx %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : getent group wheel && setfacl -Rnm g:wheel:rx,d:g:wheel:rx %{_localstatedir}/log/journal/ > /dev/null 2>&1 || :
@ -947,7 +947,7 @@ if [ "$1" -eq 1 ]; then
getty@tty1.service \ getty@tty1.service \
systemd-readahead-collect.service \ systemd-readahead-collect.service \
systemd-readahead-replay.service \ systemd-readahead-replay.service \
remote-fs.target >/dev/null 2>&1 || : remote-fs.target || :
fi fi
# since v207 /etc/sysctl.conf is no longer parsed, however # since v207 /etc/sysctl.conf is no longer parsed, however
@ -965,8 +965,9 @@ done
%postun %postun
/sbin/ldconfig /sbin/ldconfig
if [ $1 -ge 1 ]; then if [ $1 -ge 1 ]; then
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : /usr/bin/systemctl daemon-reload || :
/usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || : #Avoid restarting logind [bnc#934901] until fixed upstream
#/usr/bin/systemctl try-restart systemd-logind.service || :
fi fi
%if ! 0%{?bootstrap} %if ! 0%{?bootstrap}
if [ $1 -eq 0 ]; then if [ $1 -eq 0 ]; then
@ -978,7 +979,7 @@ fi
if [ $1 -eq 0 ]; then if [ $1 -eq 0 ]; then
/usr/bin/systemctl disable \ /usr/bin/systemctl disable \
getty@.service \ getty@.service \
remote-fs.target >/dev/null 2>&1 || : remote-fs.target || :
rm -f /etc/systemd/system/default.target 2>&1 || : rm -f /etc/systemd/system/default.target 2>&1 || :
fi fi
@ -996,31 +997,31 @@ elif [ ! -e /lib/udev ]; then
ln -s /usr/lib/udev /lib/udev ln -s /usr/lib/udev /lib/udev
fi fi
# Create "tape" group which is referenced by 50-udev-default.rules and 60-persistent-storage-tape.rules # Create "tape" group which is referenced by 50-udev-default.rules and 60-persistent-storage-tape.rules
getent group tape >/dev/null || groupadd -r tape 2> /dev/null || : getent group tape >/dev/null || groupadd -r tape || :
# kill daemon if we are not in a chroot # kill 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
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 || : systemctl stop systemd-udevd-control.socket systemd-udevd-kernel.socket systemd-udevd.service udev.service udev-control.socket udev-kernel.socket || :
udevadm control --exit 2>&1 || : udevadm control --exit || :
fi fi
fi fi
%post -n udev%{?mini} %post -n udev%{?mini}
/usr/bin/udevadm hwdb --update >/dev/null 2>&1 || : /usr/bin/udevadm hwdb --update || :
# add KERNEL name match to existing persistent net rules # add KERNEL name match to existing persistent net rules
sed -ri '/KERNEL/ ! { s/NAME="(eth|wlan|ath)([0-9]+)"/KERNEL=="\1*", NAME="\1\2"/}' \ sed -ri '/KERNEL/ ! { s/NAME="(eth|wlan|ath)([0-9]+)"/KERNEL=="\1*", NAME="\1\2"/}' \
/etc/udev/rules.d/70-persistent-net.rules >/dev/null 2>&1 || : /etc/udev/rules.d/70-persistent-net.rules || :
# cleanup old stuff # cleanup old stuff
rm -f /etc/sysconfig/udev 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
systemctl daemon-reload >/dev/null 2>&1 || : systemctl daemon-reload || :
# 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
if ! systemctl start systemd-udevd.service >/dev/null 2>&1; then if ! systemctl start systemd-udevd.service; then
/usr/lib/systemd/systemd-udevd --daemon >/dev/null 2>&1 || : /usr/lib/systemd/systemd-udevd --daemon || :
fi fi
fi fi
fi fi
@ -1042,7 +1043,7 @@ fi
%postun -n udev%{?mini} %postun -n udev%{?mini}
%insserv_cleanup %insserv_cleanup
systemctl daemon-reload >/dev/null 2>&1 || : systemctl daemon-reload || :
if [ "${YAST_IS_RUNNING}" != "instsys" ]; then if [ "${YAST_IS_RUNNING}" != "instsys" ]; then
if [ -e %{_localstatedir}/lib/no_initrd_recreation_by_suspend ]; then if [ -e %{_localstatedir}/lib/no_initrd_recreation_by_suspend ]; then
@ -1090,7 +1091,7 @@ getent group adm && setfacl -Rnm g:adm:rx,d:g:adm:rx %{_localstatedir}/log
%endif %endif
if [ "$1" -eq 1 ]; then if [ "$1" -eq 1 ]; then
# tell journal to start logging on disk if directory didn't exist before # tell journal to start logging on disk if directory didn't exist before
systemctl --no-block restart systemd-journal-flush.service >/dev/null 2>&1 || : systemctl --no-block restart systemd-journal-flush.service || :
fi fi
%preun -n nss-myhostname %preun -n nss-myhostname
@ -1106,7 +1107,7 @@ fi
%postun -n nss-mymachines -p /sbin/ldconfig %postun -n nss-mymachines -p /sbin/ldconfig
%pre journal-gateway %pre journal-gateway
getent passwd systemd-journal-gateway >/dev/null || useradd -r -l -g systemd-journal-gateway -d %{_localstatedir}/log/journal/ -s /usr/sbin/nologin -c "Journal Gateway" systemd-journal-gateway >/dev/null 2>&1 || : getent passwd systemd-journal-gateway >/dev/null || useradd -r -l -g systemd-journal-gateway -d %{_localstatedir}/log/journal/ -s /usr/sbin/nologin -c "Journal Gateway" systemd-journal-gateway || :
getent group systemd-journal-gateway >/dev/null || groupadd -r systemd-journal-gateway || : getent group systemd-journal-gateway >/dev/null || groupadd -r systemd-journal-gateway || :
%service_add_pre systemd-journal-gatewayd.socket systemd-journal-gatewayd.service %service_add_pre systemd-journal-gatewayd.socket systemd-journal-gatewayd.service
exit 0 exit 0