[arch-commits] Commit in systemd/trunk (systemd.install)
Date: Thursday, April 25, 2019 @ 11:29:11 Author: eworm Revision: 352118 fix systemd-timesyncd startup fixes FS#62161 Modified: systemd/trunk/systemd.install -+ systemd.install | 10 ++ 1 file changed, 10 insertions(+) Modified: systemd.install === --- systemd.install 2019-04-25 10:40:24 UTC (rev 352117) +++ systemd.install 2019-04-25 11:29:11 UTC (rev 352118) @@ -53,6 +53,15 @@ fi } +_242_0_2_changes() { + if [[ -L var/lib/systemd/timesync ]]; then +rm var/lib/systemd/timesync +if [[ -d var/lib/private/systemd/timesync ]]; then + mv var/lib/{private/,}systemd/timesync +fi + fi +} + post_install() { systemd-machine-id-setup @@ -87,6 +96,7 @@ 230-1 232-8 233.75-3 +242.0-2 ) for v in "${upgrades[@]}"; do
[arch-commits] Commit in systemd/trunk (systemd.install)
Date: Thursday, July 6, 2017 @ 11:27:57 Author: eworm Revision: 299757 handle dots in pkgver, reenable systemd-resolved on upgrade Modified: systemd/trunk/systemd.install -+ systemd.install | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) Modified: systemd.install === --- systemd.install 2017-07-06 11:14:15 UTC (rev 299756) +++ systemd.install 2017-07-06 11:27:57 UTC (rev 299757) @@ -45,6 +45,14 @@ fi } +_233_75_3_changes() { + # upstream installs services to /etc, which we remove + # to keep bus activation we re-enable systemd-resolved + if systemctl is-enabled -q systemd-resolved.service; then +systemctl reenable -q systemd-resolved.service + fi +} + post_install() { systemd-machine-id-setup @@ -78,11 +86,12 @@ 219-4 230-1 232-8 +233.75-3 ) for v in "${upgrades[@]}"; do if [[ $(vercmp "$v" "$2") -eq 1 ]]; then - "_${v//-/_}_changes" + "_${v//[.-]/_}_changes" fi done }
[arch-commits] Commit in systemd/trunk (systemd.install)
Date: Monday, July 18, 2016 @ 11:34:14 Author: dreisner Revision: 271974 remove upgrade transitions for anything older than 2 years Modified: systemd/trunk/systemd.install -+ systemd.install | 139 ++ 1 file changed, 6 insertions(+), 133 deletions(-) Modified: systemd.install === --- systemd.install 2016-07-18 07:19:04 UTC (rev 271973) +++ systemd.install 2016-07-18 11:34:14 UTC (rev 271974) @@ -4,13 +4,6 @@ [[ -d run/systemd/system && ! -L run/systemd/system ]] } -add_privs() { - if ! setcap "$2" "$1" 2>/dev/null; then -echo "==> Warning: setcap failed, falling back to setuid root on /$1" -chmod u+s "$1" - fi -} - add_journal_acls() { # ignore errors, since the filesystem might not support ACLs setfacl -Rnm g:wheel:rx,d:g:wheel:rx,g:adm:rx,d:g:adm:rx var/log/journal/ 2>/dev/null @@ -18,128 +11,16 @@ } maybe_reexec() { - # don't reexec on 209-1 upgrade due to large infrastructural changes. - if [[ $(vercmp 209-1 "$2") -eq 1 ]]; then -echo ':: systemd has not been reexecuted. It is recommended that you' -echo ' reboot at your earliest convenience.' -return - fi - if sd_booted; then systemctl --system daemon-reexec fi } -_dir_empty() { - set -- "$1"/* - [[ ! -e $1 && ! -L $1 ]] -} - post_common() { systemd-sysusers journalctl --update-catalog } -_204_1_changes() { - printf '==> The /bin/systemd symlink has been removed. Any references in your\n' - printf 'bootloader (or elsewhere) must be updated to /usr/lib/systemd/systemd.\n' -} - -_205_1_changes() { - printf '==> systemd 205 restructures the cgroup hierarchy and changes internal\n' - printf 'protocols. You should reboot at your earliest convenience.\n' -} - -_206_1_changes() { - printf '==> The "timestamp" hook for mkinitcpio no longer exists. If you used\n' - printf 'this hook, you must remove it from /etc/mkinitcpio.conf. A "systemd"\n' - printf 'hook has been added which provides this functionality, and more.\n' -} - -_208_1_changes() { - if [[ -e var/lib/backlight && ! -e var/lib/systemd/backlight ]]; then -mv -T var/lib/backlight var/lib/systemd/backlight - fi - - if [[ -e var/lib/random-seed && ! -e var/lib/systemd/random-seed ]]; then -mv -T var/lib/random-seed var/lib/systemd/random-seed - fi -} - -_208_8_changes() { - add_journal_acls -} - -_209_1_changes() { - # attempt to preserve existing behavior - - local old_rule=etc/udev/rules.d/80-net-name-slot.rules - local new_rule=etc/udev/rules.d/80-net-setup-link.rules - - echo ":: Network device naming is now controlled by udev's net_setup_link" - echo " builtin. Refer to the systemd.link manpage for a full description." - - # not clear what action we can take here, so don't do anything - [[ -e $new_rule ]] && return 0 - - # rename the old rule to the new one so that we preserve the user's - # existing option. - if [[ -e $old_rule ]]; then -printf ':: Renaming %s to %s in order\n' "${old_rule##*/}" "${new_rule##*/}" -printf ' to preserve existing network naming behavior.\n' -mv -v "$old_rule" "$new_rule" - else -echo ':: No changes have been made to your network naming configuration.' -echo ' Interfaces should continue to maintain the same names.' - fi -} - -_210_1_changes() { - if sd_booted; then -# If /etc/systemd/network is non-empty, then this is a 209 user who used -# networkd. Re-enable it for them. -if ! _dir_empty etc/systemd/network; then - systemctl enable systemd-networkd -fi - fi -} - -_213_4_changes() { - if sd_booted; then -# if /etc/resolv.conf is a symlink, just assume that it was being managed -# by systemd-networkd, and re-enable systemd-resolved. -if [[ -L etc/resolv.conf ]]; then - systemctl enable systemd-resolved -fi - fi -} - -_214_2_changes() { - # /run/systemd/network/resolv.conf -> /run/systemd/resolve/resolv.conf - if [[ etc/resolv.conf -ef run/systemd/network/resolv.conf ]]; then -ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf - -if sd_booted; then - if [[ ! -d run/systemd/resolve ]]; then -mkdir run/systemd/resolve - fi - - if [[ -f run/systemd/network/resolv.conf ]]; then -mv run/systemd/{network,resolve}/resolv.conf - fi -fi - fi - - echo ':: coredumps are no longer sent to the journal by default. To re-enable:' - echo ' echo >/etc/sysctl.d/50-coredump.conf \' - echo ' "kernel.core_pattern=|/usr/lib/systemd/systemd-coredump %p %u %g %s %t %e"' -} - -_215_2_changes() { - # create at least the symlink from /etc/os-release to /usr/lib/os-release - systemd-tmpfiles --create etc.conf -} - _216_2_changes() { echo ':: Coredumps are handled by systemd by default. Collection behavior can be' echo ' tuned in /etc/systemd/coredump.conf.' @@ -184,20
[arch-commits] Commit in systemd/trunk (systemd.install)
Date: Monday, June 9, 2014 @ 22:01:46 Author: dreisner Revision: 214758 remove mode/ownership changing This will be fixed up by tmpfiles on next boot, anyways. The current values are wrong (both before and after), and need to be dealt with in systemd. Modified: systemd/trunk/systemd.install -+ systemd.install |3 --- 1 file changed, 3 deletions(-) Modified: systemd.install === --- systemd.install 2014-06-09 17:28:26 UTC (rev 214757) +++ systemd.install 2014-06-09 20:01:46 UTC (rev 214758) @@ -63,9 +63,6 @@ } _208_1_changes() { - chown root:systemd-journal var/log/journal - chmod 2750 var/log/journal - if [[ -e var/lib/backlight ! -e var/lib/systemd/backlight ]]; then mv -T var/lib/backlight var/lib/systemd/backlight fi
[arch-commits] Commit in systemd/trunk (systemd.install)
Date: Sunday, June 1, 2014 @ 05:57:18 Author: dreisner Revision: 213936 convert install scriptlet to bash, ease maintenance Modified: systemd/trunk/systemd.install -+ systemd.install | 82 +++--- 1 file changed, 42 insertions(+), 40 deletions(-) Modified: systemd.install === --- systemd.install 2014-06-01 02:30:44 UTC (rev 213935) +++ systemd.install 2014-06-01 03:57:18 UTC (rev 213936) @@ -1,7 +1,7 @@ -#!/bin/sh +#!/bin/bash sd_booted() { - [ -d /run/systemd/system ] + [[ -d run/systemd/system ]] } add_privs() { @@ -13,13 +13,13 @@ add_journal_acls() { # ignore errors, since the filesystem might not support ACLs - setfacl -Rnm g:wheel:rx,d:g:wheel:rx,g:adm:rx,d:g:adm:rx /var/log/journal/ 2/dev/null + setfacl -Rnm g:wheel:rx,d:g:wheel:rx,g:adm:rx,d:g:adm:rx var/log/journal/ 2/dev/null : } maybe_reexec() { # don't reexec on 209-1 upgrade due to large infrastructural changes. - if [ $(vercmp 209-1 $2) -eq 1 ]; then + if [[ $(vercmp 209-1 $2) -eq 1 ]]; then echo ':: systemd has not been reexecuted. It is recommended that you' echo ' reboot at your earliest convenience.' return @@ -32,7 +32,7 @@ _dir_empty() { set -- $1/* - [ ! -e $1 ] [ ! -L $1 ] + [[ ! -e $1 ! -L $1 ]] } post_common() { @@ -44,20 +44,40 @@ journalctl --update-catalog } -_208_changes() { +_204_1_changes() { + printf '== The /bin/systemd symlink has been removed. Any references in your\n' + printf 'bootloader (or elsewhere) must be updated to /usr/lib/systemd/systemd.\n' +} + +_205_1_changes() { + printf '== systemd 205 restructures the cgroup hierarchy and changes internal\n' + printf 'protocols. You should reboot at your earliest convenience.\n' +} + +_206_1_changes() { + printf '== The timestamp hook for mkinitcpio no longer exists. If you used\n' + printf 'this hook, you must remove it from /etc/mkinitcpio.conf. A systemd\n' + printf 'hook has been added which provides this functionality, and more.\n' +} + +_208_1_changes() { chown root:systemd-journal var/log/journal chmod 2755 var/log/journal - if [ -e var/lib/backlight ] [ ! -e var/lib/systemd/backlight ]; then + if [[ -e var/lib/backlight ! -e var/lib/systemd/backlight ]]; then mv -T var/lib/backlight var/lib/systemd/backlight fi - if [ -e var/lib/random-seed ] [ ! -e var/lib/systemd/random-seed ]; then + if [[ -e var/lib/random-seed ! -e var/lib/systemd/random-seed ]]; then mv -T var/lib/random-seed var/lib/systemd/random-seed fi } -_209_changes() { +_208_8_changes() { + add_journal_acls +} + +_209_1_changes() { # attempt to preserve existing behavior local old_rule=etc/udev/rules.d/80-net-name-slot.rules @@ -81,7 +101,7 @@ fi } -_210_changes() { +_210_1_changes() { if sd_booted; then # If /etc/systemd/network is non-empty, then this is a 209 user who used # networkd. Re-enable it for them. @@ -108,37 +128,19 @@ maybe_reexec $@ - if [ $(vercmp 204-1 $2) -eq 1 ]; then -printf '== The /bin/systemd symlink has been removed. Any references in your\n' -printf 'bootloader (or elsewhere) must be updated to /usr/lib/systemd/systemd.\n' - fi + local v upgrades=(204-1 +205-1 +206-1 +208-1 +208-8 +209-1 +210-1) - if [ $(vercmp 205-1 $2) -eq 1 ]; then -printf '== systemd 205 restructures the cgroup hierarchy and changes internal\n' -printf 'protocols. You should reboot at your earliest convenience.\n' - fi - - if [ $(vercmp 206-1 $2) -eq 1 ]; then -printf '== The timestamp hook for mkinitcpio no longer exists. If you used\n' -printf 'this hook, you must remove it from /etc/mkinitcpio.conf. A systemd\n' -printf 'hook has been added which provides this functionality, and more.\n' - fi - - if [ $(vercmp 208-1 $2) -eq 1 ]; then -_208_changes - fi - - if [ $(vercmp 208-8 $2) -eq 1 ]; then -add_journal_acls - fi - - if [ $(vercmp 209-1 $2) -eq 1 ]; then -_209_changes - fi - - if [ $(vercmp 210-1 $2) -eq 1 ]; then -_210_changes - fi + for v in ${upgrades[@]}; do +if [[ $(vercmp $v $2) -eq 1 ]]; then + _${v//-/_}_changes +fi + done } # vim:set ts=2 sw=2 et:
[arch-commits] Commit in systemd/trunk (systemd.install)
Date: Sunday, March 16, 2014 @ 20:01:50 Author: dreisner Revision: 207988 fix reference to net setup link documentation Modified: systemd/trunk/systemd.install -+ systemd.install |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) Modified: systemd.install === --- systemd.install 2014-03-16 16:42:29 UTC (rev 207987) +++ systemd.install 2014-03-16 19:01:50 UTC (rev 207988) @@ -64,8 +64,7 @@ local new_rule=etc/udev/rules.d/80-net-setup-link.rules echo :: Network device naming is now controlled by udev's net_setup_link - echobuiltin. Refer to the NETWORK LINK CONFIGURATION section of the - echoudev manpage for a full description. + echobuiltin. Refer to the systemd.link manpage for a full description. # not clear what action we can take here, so don't do anything [[ -e $new_rule ]] return 0
[arch-commits] Commit in systemd/trunk (systemd.install)
Date: Sunday, February 23, 2014 @ 01:02:57 Author: dreisner Revision: 206256 avoid call to vercmp in post_install Modified: systemd/trunk/systemd.install -+ systemd.install |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Modified: systemd.install === --- systemd.install 2014-02-22 23:32:53 UTC (rev 206255) +++ systemd.install 2014-02-23 00:02:57 UTC (rev 206256) @@ -26,7 +26,7 @@ journalctl --update-catalog # don't reexec on 209-1 upgrade - if [ $(vercmp 209-1 $2) -eq 1 ]; then + if [ -n $2 ] [ $(vercmp 209-1 $2) -eq 1 ]; then return fi
[arch-commits] Commit in systemd/trunk (systemd.install)
Date: Sunday, August 4, 2013 @ 03:30:12 Author: dreisner Revision: 192007 make sure we enable getty on the right tty Modified: systemd/trunk/systemd.install -+ systemd.install |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Modified: systemd.install === --- systemd.install 2013-08-03 20:46:26 UTC (rev 192006) +++ systemd.install 2013-08-04 01:30:12 UTC (rev 192007) @@ -42,7 +42,7 @@ post_common # enable getty@tty1 by default, but don't track the file - systemctl enable getty@.service + systemctl enable getty@tty1.service echo :: Append 'init=/usr/lib/systemd/systemd' to your kernel command line in your echobootloader to replace sysvinit with systemd, or install systemd-sysvcompat
[arch-commits] Commit in systemd/trunk (systemd.install)
Date: Tuesday, October 23, 2012 @ 17:55:45 Author: dreisner Revision: 169580 clean up install scriptlet - restore reexec on upgrade - set FS caps on systemd-detect-virt (FS#32178) Modified: systemd/trunk/systemd.install -+ systemd.install | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) Modified: systemd.install === --- systemd.install 2012-10-23 20:01:18 UTC (rev 169579) +++ systemd.install 2012-10-23 21:55:45 UTC (rev 169580) @@ -4,18 +4,28 @@ [ -e sys/fs/cgroup/systemd ] } +post_common() { + systemd-machine-id-setup + + setcap cap_dac_override,cap_sys_ptrace+ep usr/bin/systemd-detect-virt + + if sd_booted; then +systemctl --system daemon-reexec + fi +} + post_install() { + post_common + # enable getty@tty1 by default, but don't track the file systemctl enable getty@.service - systemd-machine-id-setup - echo :: Append 'init=/bin/systemd' to your kernel command line in your echobootloader to replace sysvinit with systemd } post_upgrade() { - systemd-machine-id-setup + post_common # getty@tty1.service is no longer enabled by default, but we don't want to break # existing setups.
[arch-commits] Commit in systemd/trunk (systemd.install)
Date: Tuesday, June 19, 2012 @ 11:04:42 Author: dreisner Revision: 162084 avoid removal of lock group. this belongs to filesystem now Modified: systemd/trunk/systemd.install -+ systemd.install | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) Modified: systemd.install === --- systemd.install 2012-06-19 14:45:55 UTC (rev 162083) +++ systemd.install 2012-06-19 15:04:42 UTC (rev 162084) @@ -5,9 +5,7 @@ } post_install() { - if [ ! -f etc/machine-id ]; then -systemd-machine-id-setup - fi + systemd-machine-id-setup # enable getty@tty1 by default, but don't track the file systemctl enable getty@.service @@ -17,9 +15,7 @@ } post_upgrade() { - if [ ! -f etc/machine-id ]; then -systemd-machine-id-setup - fi + systemd-machine-id-setup if sd_booted; then # we moved the binary in 44-2 to /usr, so a reexec leads to a @@ -42,10 +38,4 @@ fi } -post_remove() { - if getent group lock /dev/null; then -groupdel lock - fi -} - # vim:set ts=2 sw=2 et:
[arch-commits] Commit in systemd/trunk (systemd.install)
Date: Wednesday, January 18, 2012 @ 05:53:29 Author: dreisner Revision: 146790 fix incorrect path in install scriptlet Modified: systemd/trunk/systemd.install -+ systemd.install |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Modified: systemd.install === --- systemd.install 2012-01-18 10:29:11 UTC (rev 146789) +++ systemd.install 2012-01-18 10:53:29 UTC (rev 146790) @@ -2,7 +2,7 @@ checkgroups() { if ! getent group lock /dev/null; then -sbin/groupadd -g 54 lock +groupadd -g 54 lock fi }