From c3ff255f8a97c99c062d422a5a793c00864d4064 Mon Sep 17 00:00:00 2001 From: Yurii Kolesnykov Date: Mon, 23 Jan 2017 16:59:50 +0300 Subject: port arch changes --- .SRCINFO | 24 ++++++++++------ PKGBUILD | 32 ++++++++++++++------- systemd-git.install | 80 --------------------------------------------------- systemd-hwdb.hook | 11 +++++++ systemd-sysusers.hook | 11 +++++++ systemd-tmpfiles.hook | 11 +++++++ systemd-update.hook | 11 +++++++ systemd.install | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 162 insertions(+), 98 deletions(-) delete mode 100644 systemd-git.install create mode 100644 systemd-hwdb.hook create mode 100644 systemd-sysusers.hook create mode 100644 systemd-tmpfiles.hook create mode 100644 systemd-update.hook create mode 100644 systemd.install diff --git a/.SRCINFO b/.SRCINFO index 6ae7e66..967d24d 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,8 +1,8 @@ pkgbase = systemd-git pkgdesc = systemd from git - pkgver = 232.r595.g8171bcc70 + pkgver = 232.r615.g88e4dbd50 pkgrel = 1 - url = http://www.freedesktop.org/wiki/Software/systemd + url = https://www.github.com/systemd/systemd arch = i686 arch = x86_64 makedepends = acl @@ -37,20 +37,28 @@ pkgbase = systemd-git source = initcpio-install-udev source = arch.conf source = loader.conf - source = udev-hwdb.hook + source = splash-arch.bmp::https://git.archlinux.org/svntogit/packages.git/plain/trunk/splash-arch.bmp?h=packages/systemd source = systemd-user.pam + source = systemd-hwdb.hook + source = systemd-sysusers.hook + source = systemd-tmpfiles.hook + source = systemd-update.hook sha512sums = SKIP sha512sums = f0d933e8c6064ed830dec54049b0a01e27be87203208f6ae982f10fb4eddc7258cb2919d594cbfb9a33e74c3510cfd682f3416ba8e804387ab87d1a217eb4b73 sha512sums = 52af734947a768758d5eb3f18e31a1cfec6699eca6fa10e40b90c7f11991509186c0a696e3490af3eaba80064ea4cb93e041579abf05addf072d294300aa4b28 sha512sums = fec639de0d99967ed3e67289eff5ff78fff0c5829d350e73bed536a8391f1daa1d118d72dbdc1f480ffd33fc22b72f4817d0973bd09ec7f182fd26ad87b24355 sha512sums = 61032d29241b74a0f28446f8cf1be0e8ec46d0847a61dadb2a4f096e8686d5f57fe5c72bcf386003f6520bc4b5856c32d63bf3efe7eb0bc0deefc9f68159e648 sha512sums = c416e2121df83067376bcaacb58c05b01990f4614ad9de657d74b6da3efa441af251d13bf21e3f0f71ddcb4c9ea658b81da3d915667dc5c309c87ec32a1cb5a5 - sha512sums = 888ab01bc6e09beb08d7126472c34c9e1aa35ea34e62a09e900ae34c93b1de2fcc988586efd8d0dc962393974f45c77b206d59a86cf53e370f061bf9a1b1a862 + sha512sums = 5a1d78b5170da5abe3d18fdf9f2c3a4d78f15ba7d1ee9ec2708c4c9c2e28973469bc19386f70b3cf32ffafbe4fcc4303e5ebbd6d5187a1df3314ae0965b25e75 sha512sums = b90c99d768dc2a4f020ba854edf45ccf1b86a09d2f66e475de21fe589ff7e32c33ef4aa0876d7f1864491488fd7edb2682fc0d68e83a6d4890a0778dc2d6fe19 + sha512sums = 2c1f765e7cefc50f07ad994634ea25d9396e6b9c0de46e58f18377e642a471517a0dbf5eb547070a38c6ecf84ec8e030f650a6cee010871cd7a466a32534adda + sha512sums = 9d27d97f172a503f5b7044480a0b9ccc0c4ed5dbb2eb3b2b1aa929332c3bcfe38ef0c0310b6566f23b34f9c05b77035221164a7ab7677784c4a54664f12fca22 + sha512sums = 0f4efddd25256e09c42b953caeee4b93eb49ecc6eaebf02e616b4dcbfdac9860c3d8a3d1a106325b2ebc4dbc6e08ac46702abcb67a06737227ccb052aaa2a067 + sha512sums = 10190fba9f39a8f4b620a0829e0ba8ed63bb4dbeca712966011ee7807880d01ab2abff1a80baafeb6674db70526a473fe585db8190e864f318fc4d6068552618 pkgname = systemd-git pkgdesc = system and service manager - install = systemd-git.install + install = systemd.install license = GPL2 license = LGPL2.1 depends = acl @@ -76,9 +84,9 @@ pkgname = systemd-git optdepends = systemd-sysvcompat-git: symlink package to provide sysvinit binaries optdepends = polkit: allow administration as unprivileged user provides = nss-myhostname - provides = systemd-tools=232.r595.g8171bcc70 - provides = udev=232.r595.g8171bcc70 - provides = systemd=232.r595.g8171bcc70 + provides = systemd-tools=232.r615.g88e4dbd50 + provides = udev=232.r615.g88e4dbd50 + provides = systemd=232.r615.g88e4dbd50 conflicts = nss-myhostname conflicts = systemd-tools conflicts = udev diff --git a/PKGBUILD b/PKGBUILD index 8eccbdb..abe7598 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -5,32 +5,40 @@ pkgbase=systemd-git pkgname=('systemd-git' 'libsystemd-git' 'systemd-sysvcompat-git') pkgdesc="systemd from git" -pkgver=232.r595.g8171bcc70 +pkgver=232.r615.g88e4dbd50 pkgrel=1 branch='master' arch=('i686' 'x86_64') -url="http://www.freedesktop.org/wiki/Software/systemd" +url="https://www.github.com/systemd/systemd" makedepends=('acl' 'cryptsetup' 'docbook-xsl' 'gperf' 'lz4' 'xz' 'pam' 'libelf' 'intltool' 'iptables' 'kmod' 'libcap' 'libidn' 'libgcrypt' 'libmicrohttpd' 'libxslt' 'util-linux' 'linux-api-headers' 'python-lxml' 'quota-tools' 'shadow' 'gnu-efi-libs' 'git') options=('strip' '!distcc' '!ccache') source=("systemd-git::git://github.com/systemd/systemd.git#branch=${branch}" - 'initcpio-hook-udev' + 'initcpio-hook-udev' 'initcpio-install-systemd' 'initcpio-install-udev' 'arch.conf' 'loader.conf' - 'udev-hwdb.hook' - 'systemd-user.pam') + 'splash-arch.bmp'::'https://git.archlinux.org/svntogit/packages.git/plain/trunk/splash-arch.bmp?h=packages/systemd' + 'systemd-user.pam' + 'systemd-hwdb.hook' + 'systemd-sysusers.hook' + 'systemd-tmpfiles.hook' + 'systemd-update.hook') sha512sums=('SKIP' 'f0d933e8c6064ed830dec54049b0a01e27be87203208f6ae982f10fb4eddc7258cb2919d594cbfb9a33e74c3510cfd682f3416ba8e804387ab87d1a217eb4b73' '52af734947a768758d5eb3f18e31a1cfec6699eca6fa10e40b90c7f11991509186c0a696e3490af3eaba80064ea4cb93e041579abf05addf072d294300aa4b28' 'fec639de0d99967ed3e67289eff5ff78fff0c5829d350e73bed536a8391f1daa1d118d72dbdc1f480ffd33fc22b72f4817d0973bd09ec7f182fd26ad87b24355' '61032d29241b74a0f28446f8cf1be0e8ec46d0847a61dadb2a4f096e8686d5f57fe5c72bcf386003f6520bc4b5856c32d63bf3efe7eb0bc0deefc9f68159e648' 'c416e2121df83067376bcaacb58c05b01990f4614ad9de657d74b6da3efa441af251d13bf21e3f0f71ddcb4c9ea658b81da3d915667dc5c309c87ec32a1cb5a5' - '888ab01bc6e09beb08d7126472c34c9e1aa35ea34e62a09e900ae34c93b1de2fcc988586efd8d0dc962393974f45c77b206d59a86cf53e370f061bf9a1b1a862' - 'b90c99d768dc2a4f020ba854edf45ccf1b86a09d2f66e475de21fe589ff7e32c33ef4aa0876d7f1864491488fd7edb2682fc0d68e83a6d4890a0778dc2d6fe19') + '5a1d78b5170da5abe3d18fdf9f2c3a4d78f15ba7d1ee9ec2708c4c9c2e28973469bc19386f70b3cf32ffafbe4fcc4303e5ebbd6d5187a1df3314ae0965b25e75' + 'b90c99d768dc2a4f020ba854edf45ccf1b86a09d2f66e475de21fe589ff7e32c33ef4aa0876d7f1864491488fd7edb2682fc0d68e83a6d4890a0778dc2d6fe19' + '2c1f765e7cefc50f07ad994634ea25d9396e6b9c0de46e58f18377e642a471517a0dbf5eb547070a38c6ecf84ec8e030f650a6cee010871cd7a466a32534adda' + '9d27d97f172a503f5b7044480a0b9ccc0c4ed5dbb2eb3b2b1aa929332c3bcfe38ef0c0310b6566f23b34f9c05b77035221164a7ab7677784c4a54664f12fca22' + '0f4efddd25256e09c42b953caeee4b93eb49ecc6eaebf02e616b4dcbfdac9860c3d8a3d1a106325b2ebc4dbc6e08ac46702abcb67a06737227ccb052aaa2a067' + '10190fba9f39a8f4b620a0829e0ba8ed63bb4dbeca712966011ee7807880d01ab2abff1a80baafeb6674db70526a473fe585db8190e864f318fc4d6068552618') pkgver() { cd "${srcdir}/$pkgbase" # cutting off 'foo-' prefix that presents in the git tag @@ -68,6 +76,7 @@ build() { --with-sysvrcnd-path= --with-ntp-servers="${timeservers[*]}" --with-default-dnssec=no + --with-dbuspolicydir=/usr/share/dbus-1/system.d --without-kill-user-processes ) @@ -101,7 +110,7 @@ package_systemd-git() { etc/systemd/resolved.conf etc/systemd/user.conf etc/udev/udev.conf) - install="systemd-git.install" + install="systemd.install" make -C "$pkgbase" DESTDIR="$pkgdir" install @@ -147,9 +156,12 @@ package_systemd-git() { # add example bootctl configuration install -Dm644 "$srcdir/arch.conf" "$pkgdir"/usr/share/systemd/bootctl/arch.conf install -Dm644 "$srcdir/loader.conf" "$pkgdir"/usr/share/systemd/bootctl/loader.conf - #install -Dm644 "$srcdir/splash-arch.bmp" "$pkgdir"/usr/share/systemd/bootctl/splash-arch.bmp + install -Dm644 "$srcdir/splash-arch.bmp" "$pkgdir"/usr/share/systemd/bootctl/splash-arch.bmp - install -Dm644 "$srcdir/udev-hwdb.hook" "$pkgdir/usr/share/libalpm/hooks/udev-hwdb.hook" + install -Dm644 "$srcdir/systemd-hwdb.hook" "$pkgdir/usr/share/libalpm/hooks/systemd-hwdb.hook" + install -Dm644 "$srcdir/systemd-sysusers.hook" "$pkgdir/usr/share/libalpm/hooks/systemd-sysusers.hook" + install -Dm644 "$srcdir/systemd-tmpfiles.hook" "$pkgdir/usr/share/libalpm/hooks/systemd-tmpfiles.hook" + install -Dm644 "$srcdir/systemd-update.hook" "$pkgdir/usr/share/libalpm/hooks/systemd-update.hook" # overwrite the systemd-user PAM configuration with our own install -Dm644 systemd-user.pam "$pkgdir/etc/pam.d/systemd-user" diff --git a/systemd-git.install b/systemd-git.install deleted file mode 100644 index b59de20..0000000 --- a/systemd-git.install +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/bash - -sd_booted() { - [[ -d run/systemd/system && ! -L run/systemd/system ]] -} - -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 - : -} - -post_common() { - systemd-sysusers - journalctl --update-catalog -} - -_216_2_changes() { - echo ':: Coredumps are handled by systemd by default. Collection behavior can be' - echo ' tuned in /etc/systemd/coredump.conf.' -} - -_219_2_changes() { - if mkdir -m2755 var/log/journal/remote 2>/dev/null; then - chgrp systemd-journal-remote var/log/journal/remote - fi -} - -_219_4_changes() { - if ! systemctl is-enabled -q remote-fs.target; then - systemctl enable -q remote-fs.target - fi -} - -_230_1_changes() { - echo ':: systemd-bootchart is no longer included with systemd' -} - -post_install() { - systemd-machine-id-setup - - post_common "$@" - - add_journal_acls - - # enable some services by default, but don't track them - systemctl enable getty@tty1.service remote-fs.target - - echo ":: Append 'init=/usr/lib/systemd/systemd' to your kernel command line in your" - echo " bootloader to replace sysvinit with systemd, or install systemd-sysvcompat" - - # group 'systemd-journal-remote' is created by systemd-sysusers - mkdir -m2755 var/log/journal/remote - chgrp systemd-journal-remote var/log/journal/remote -} - -post_upgrade() { - post_common "$@" - - # don't reexec if the old version is 231-1 or 231-2. - # https://github.com/systemd/systemd/commit/bd64d82c1c - if [[ $1 != 231-[12] ]] && sd_booted; then - systemctl --system daemon-reexec - fi - - local v upgrades=( - 216-2 - 219-2 - 219-4 - 230-1 - ) - - for v in "${upgrades[@]}"; do - if [[ $(vercmp "$v" "$2") -eq 1 ]]; then - "_${v//-/_}_changes" - fi - done -} - -# vim:set ts=2 sw=2 et: diff --git a/systemd-hwdb.hook b/systemd-hwdb.hook new file mode 100644 index 0000000..d7c9877 --- /dev/null +++ b/systemd-hwdb.hook @@ -0,0 +1,11 @@ +[Trigger] +Type = File +Operation = Install +Operation = Upgrade +Operation = Remove +Target = usr/lib/udev/hwdb.d/* + +[Action] +Description = Updating udev hardware database... +When = PostTransaction +Exec = /usr/bin/systemd-hwdb --usr update diff --git a/systemd-sysusers.hook b/systemd-sysusers.hook new file mode 100644 index 0000000..b0888d7 --- /dev/null +++ b/systemd-sysusers.hook @@ -0,0 +1,11 @@ +[Trigger] +Type = File +Operation = Install +Operation = Upgrade +Target = usr/lib/sysusers.d/*.conf + +[Action] +Description = Updating system user accounts... +When = PostTransaction +Exec = /bin/sh -c 'while read -r f; do /usr/bin/systemd-sysusers "/$f" ; done' +NeedsTargets diff --git a/systemd-tmpfiles.hook b/systemd-tmpfiles.hook new file mode 100644 index 0000000..a2c5e3e --- /dev/null +++ b/systemd-tmpfiles.hook @@ -0,0 +1,11 @@ +[Trigger] +Type = File +Operation = Install +Operation = Upgrade +Target = usr/lib/tmpfiles.d/*.conf + +[Action] +Description = Creating temporary files... +When = PostTransaction +Exec = /bin/sh -c 'while read -r f; do /usr/bin/systemd-tmpfiles --create "/$f"; done' +NeedsTargets diff --git a/systemd-update.hook b/systemd-update.hook new file mode 100644 index 0000000..3697fbd --- /dev/null +++ b/systemd-update.hook @@ -0,0 +1,11 @@ +[Trigger] +Type = File +Operation = Install +Operation = Upgrade +Operation = Remove +Target = usr/ + +[Action] +Description = Arming ConditionNeedsUpdate... +When = PostTransaction +Exec = /usr/bin/touch -c /usr diff --git a/systemd.install b/systemd.install new file mode 100644 index 0000000..b59de20 --- /dev/null +++ b/systemd.install @@ -0,0 +1,80 @@ +#!/bin/bash + +sd_booted() { + [[ -d run/systemd/system && ! -L run/systemd/system ]] +} + +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 + : +} + +post_common() { + systemd-sysusers + journalctl --update-catalog +} + +_216_2_changes() { + echo ':: Coredumps are handled by systemd by default. Collection behavior can be' + echo ' tuned in /etc/systemd/coredump.conf.' +} + +_219_2_changes() { + if mkdir -m2755 var/log/journal/remote 2>/dev/null; then + chgrp systemd-journal-remote var/log/journal/remote + fi +} + +_219_4_changes() { + if ! systemctl is-enabled -q remote-fs.target; then + systemctl enable -q remote-fs.target + fi +} + +_230_1_changes() { + echo ':: systemd-bootchart is no longer included with systemd' +} + +post_install() { + systemd-machine-id-setup + + post_common "$@" + + add_journal_acls + + # enable some services by default, but don't track them + systemctl enable getty@tty1.service remote-fs.target + + echo ":: Append 'init=/usr/lib/systemd/systemd' to your kernel command line in your" + echo " bootloader to replace sysvinit with systemd, or install systemd-sysvcompat" + + # group 'systemd-journal-remote' is created by systemd-sysusers + mkdir -m2755 var/log/journal/remote + chgrp systemd-journal-remote var/log/journal/remote +} + +post_upgrade() { + post_common "$@" + + # don't reexec if the old version is 231-1 or 231-2. + # https://github.com/systemd/systemd/commit/bd64d82c1c + if [[ $1 != 231-[12] ]] && sd_booted; then + systemctl --system daemon-reexec + fi + + local v upgrades=( + 216-2 + 219-2 + 219-4 + 230-1 + ) + + for v in "${upgrades[@]}"; do + if [[ $(vercmp "$v" "$2") -eq 1 ]]; then + "_${v//-/_}_changes" + fi + done +} + +# vim:set ts=2 sw=2 et: -- cgit v1.2.3-70-g09d2