2014-07-16 02:33:04 +00:00
|
|
|
# Maintainer: Dave Reisner <dreisner@archlinux.org>
|
|
|
|
# Maintainer: Tom Gundersen <teg@jklm.no>
|
|
|
|
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
2015-10-10 14:58:52 +00:00
|
|
|
# - disable gold/LTO
|
2015-06-23 02:00:02 +00:00
|
|
|
# - removed makedepend on gnu-efi-libs, --enable-gnuefi configure option
|
2014-07-16 02:33:04 +00:00
|
|
|
|
|
|
|
pkgbase=systemd
|
|
|
|
pkgname=('systemd' 'libsystemd' 'systemd-sysvcompat')
|
2016-11-30 13:44:40 +00:00
|
|
|
pkgver=232
|
2016-10-09 21:16:33 +00:00
|
|
|
pkgrel=4
|
2014-07-16 02:33:04 +00:00
|
|
|
arch=('i686' 'x86_64')
|
2016-11-30 13:44:40 +00:00
|
|
|
url="https://www.github.com/systemd/systemd"
|
2015-11-27 17:40:32 +00:00
|
|
|
makedepends=('acl' 'cryptsetup' 'docbook-xsl' 'gperf' 'lz4' 'xz' 'pam' 'libelf'
|
2015-06-23 02:00:02 +00:00
|
|
|
'intltool' 'iptables' 'kmod' 'libcap' 'libidn' 'libgcrypt'
|
|
|
|
'libmicrohttpd' 'libxslt' 'util-linux' 'linux-api-headers'
|
2015-07-30 12:05:41 +00:00
|
|
|
'python-lxml' 'quota-tools' 'shadow' 'git')
|
2016-11-30 13:44:40 +00:00
|
|
|
options=('strip')
|
2015-06-23 02:00:02 +00:00
|
|
|
source=("git://github.com/systemd/systemd.git#tag=v$pkgver"
|
2014-07-16 02:33:04 +00:00
|
|
|
'initcpio-hook-udev'
|
|
|
|
'initcpio-install-systemd'
|
2015-02-17 04:46:29 +00:00
|
|
|
'initcpio-install-udev'
|
2015-06-23 02:00:02 +00:00
|
|
|
'arch.conf'
|
|
|
|
'loader.conf'
|
2016-06-03 23:51:30 +00:00
|
|
|
'splash-arch.bmp'
|
2016-11-30 13:44:40 +00:00
|
|
|
'udev-hwdb.hook'
|
|
|
|
'0001-disable-RestrictAddressFamilies-on-i686.patch'
|
|
|
|
'0001-Revert-nspawn-try-to-bind-mount-resolved-s-resolv.co.patch')
|
|
|
|
sha512sums=('SKIP'
|
|
|
|
'f0d933e8c6064ed830dec54049b0a01e27be87203208f6ae982f10fb4eddc7258cb2919d594cbfb9a33e74c3510cfd682f3416ba8e804387ab87d1a217eb4b73'
|
|
|
|
'52af734947a768758d5eb3f18e31a1cfec6699eca6fa10e40b90c7f11991509186c0a696e3490af3eaba80064ea4cb93e041579abf05addf072d294300aa4b28'
|
|
|
|
'fec639de0d99967ed3e67289eff5ff78fff0c5829d350e73bed536a8391f1daa1d118d72dbdc1f480ffd33fc22b72f4817d0973bd09ec7f182fd26ad87b24355'
|
|
|
|
'61032d29241b74a0f28446f8cf1be0e8ec46d0847a61dadb2a4f096e8686d5f57fe5c72bcf386003f6520bc4b5856c32d63bf3efe7eb0bc0deefc9f68159e648'
|
|
|
|
'c416e2121df83067376bcaacb58c05b01990f4614ad9de657d74b6da3efa441af251d13bf21e3f0f71ddcb4c9ea658b81da3d915667dc5c309c87ec32a1cb5a5'
|
|
|
|
'5a1d78b5170da5abe3d18fdf9f2c3a4d78f15ba7d1ee9ec2708c4c9c2e28973469bc19386f70b3cf32ffafbe4fcc4303e5ebbd6d5187a1df3314ae0965b25e75'
|
|
|
|
'888ab01bc6e09beb08d7126472c34c9e1aa35ea34e62a09e900ae34c93b1de2fcc988586efd8d0dc962393974f45c77b206d59a86cf53e370f061bf9a1b1a862'
|
|
|
|
'89f9b2d3918c679ce4f76c2b10dc7fcb7e04f1925a5f92542f06891de2a123a91df7eb67fd4ce71506a8132f5440b3560b7bb667e1c1813944b115c1dfe35e3f'
|
|
|
|
'b993a42c5534582631f7b379d54f6abc37e3aaa56ecf869a6d86ff14ae5a52628f4e447b6a30751bc1c14c30cec63a5c6d0aa268362d235ed477b639cac3a219')
|
|
|
|
validpgpkeys=(
|
|
|
|
'63CDA1E5D3FC22B998D20DD6327F26951A015CC4' # Lennart Poettering
|
|
|
|
)
|
2015-02-17 04:46:29 +00:00
|
|
|
|
2016-06-03 23:51:30 +00:00
|
|
|
_backports=(
|
2016-11-30 13:44:40 +00:00
|
|
|
'843d5baf6aad6c53fc00ea8d95d83209a4f92de1' # core: don't use the unified hierarchy for the systemd cgroup yet (#4628)
|
|
|
|
'abd67ce74858491565cde157c7b08fda43d3279c' # basic/virt: fix userns check on CONFIG_USER_NS=n kernel (#4651)
|
|
|
|
'4318abe8d26e969ebdb97744a63ab900233a0185' # build-sys: do not install ctrl-alt-del.target symlink twice
|
|
|
|
'd112eae7da77899be245ab52aa1747d4675549f1' # device: Avoid calling unit_free(NULL) in device setup logic (#4748)
|
2016-06-03 23:51:30 +00:00
|
|
|
)
|
2015-11-27 17:40:32 +00:00
|
|
|
|
2016-11-30 13:44:40 +00:00
|
|
|
_validate_tag() {
|
|
|
|
local success fingerprint trusted status tag=v$pkgver
|
|
|
|
|
|
|
|
parse_gpg_statusfile /dev/stdin < <(git verify-tag --raw "$tag" 2>&1)
|
|
|
|
|
|
|
|
if (( ! success )); then
|
|
|
|
error 'failed to validate tag %s\n' "$tag"
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if ! in_array "$fingerprint" "${validpgpkeys[@]}" && (( ! trusted )); then
|
|
|
|
error 'unknown or untrusted public key: %s\n' "$fingerprint"
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
case $status in
|
|
|
|
'expired')
|
|
|
|
warning 'the signature has expired'
|
|
|
|
;;
|
|
|
|
'expiredkey')
|
|
|
|
warning 'the key has expired'
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2016-06-03 23:51:30 +00:00
|
|
|
prepare() {
|
|
|
|
cd "$pkgbase"
|
2016-02-05 16:06:22 +00:00
|
|
|
|
2016-11-30 13:44:40 +00:00
|
|
|
_validate_tag || return
|
|
|
|
|
2016-06-03 23:51:30 +00:00
|
|
|
if (( ${#_backports[*]} > 0 )); then
|
|
|
|
git cherry-pick -n "${_backports[@]}"
|
|
|
|
fi
|
2016-02-22 14:31:02 +00:00
|
|
|
|
2016-11-30 13:44:40 +00:00
|
|
|
# these patches aren't upstream, but they make v232 more useable.
|
|
|
|
|
|
|
|
# https://github.com/systemd/systemd/issues/4575
|
|
|
|
patch -Np1 <../0001-disable-RestrictAddressFamilies-on-i686.patch
|
|
|
|
|
|
|
|
# https://github.com/systemd/systemd/issues/4595
|
|
|
|
# https://github.com/systemd/systemd/issues/3826
|
|
|
|
patch -Np1 <../0001-Revert-nspawn-try-to-bind-mount-resolved-s-resolv.co.patch
|
|
|
|
|
2015-06-23 02:00:02 +00:00
|
|
|
./autogen.sh
|
2015-02-17 04:46:29 +00:00
|
|
|
}
|
2014-07-16 02:33:04 +00:00
|
|
|
|
|
|
|
build() {
|
2015-09-20 15:32:52 +00:00
|
|
|
cd "$pkgbase"
|
2015-06-23 02:00:02 +00:00
|
|
|
|
|
|
|
local timeservers=({0..3}.arch.pool.ntp.org)
|
2014-07-16 02:33:04 +00:00
|
|
|
|
2015-10-10 14:58:52 +00:00
|
|
|
LDFLAGS+=" -Wl,-fuse-ld=bfd"
|
|
|
|
CFLAGS+=" -fno-lto"
|
|
|
|
CXXFLAGS+=" -fno-lto"
|
2014-07-18 01:02:26 +00:00
|
|
|
|
2016-06-03 23:51:30 +00:00
|
|
|
local configure_options=(
|
|
|
|
--libexecdir=/usr/lib
|
|
|
|
--localstatedir=/var
|
|
|
|
--sysconfdir=/etc
|
|
|
|
|
|
|
|
--enable-lz4
|
|
|
|
--disable-audit
|
|
|
|
--disable-ima
|
|
|
|
|
|
|
|
--with-sysvinit-path=
|
|
|
|
--with-sysvrcnd-path=
|
|
|
|
--with-ntp-servers="${timeservers[*]}"
|
|
|
|
--with-default-dnssec=no
|
2016-07-20 13:31:52 +00:00
|
|
|
--with-dbuspolicydir=/usr/share/dbus-1/system.d
|
2016-06-03 23:51:30 +00:00
|
|
|
--without-kill-user-processes
|
|
|
|
)
|
|
|
|
|
|
|
|
./configure "${configure_options[@]}"
|
2014-07-16 02:33:04 +00:00
|
|
|
|
|
|
|
make
|
|
|
|
}
|
|
|
|
|
|
|
|
package_systemd() {
|
|
|
|
pkgdesc="system and service manager"
|
2015-06-23 02:00:02 +00:00
|
|
|
license=('GPL2' 'LGPL2.1')
|
2016-06-03 23:51:30 +00:00
|
|
|
depends=('acl' 'bash' 'dbus' 'iptables' 'kbd' 'kmod' 'hwids' 'libcap'
|
2015-11-27 17:40:32 +00:00
|
|
|
'libgcrypt' 'libsystemd' 'libidn' 'lz4' 'pam' 'libelf' 'libseccomp'
|
2015-10-17 01:00:28 +00:00
|
|
|
'util-linux' 'xz')
|
2014-07-16 02:33:04 +00:00
|
|
|
provides=('nss-myhostname' "systemd-tools=$pkgver" "udev=$pkgver")
|
|
|
|
replaces=('nss-myhostname' 'systemd-tools' 'udev')
|
|
|
|
conflicts=('nss-myhostname' 'systemd-tools' 'udev')
|
2015-07-30 12:05:41 +00:00
|
|
|
optdepends=('cryptsetup: required for encrypted block devices'
|
2014-07-16 02:33:04 +00:00
|
|
|
'libmicrohttpd: remote journald capabilities'
|
|
|
|
'quota-tools: kernel-level quota management'
|
2014-08-27 06:22:24 +00:00
|
|
|
'systemd-sysvcompat: symlink package to provide sysvinit binaries'
|
|
|
|
'polkit: allow administration as unprivileged user')
|
2016-07-20 13:31:52 +00:00
|
|
|
backup=(etc/pam.d/systemd-user
|
2014-09-03 00:17:53 +00:00
|
|
|
etc/systemd/coredump.conf
|
2014-07-16 02:33:04 +00:00
|
|
|
etc/systemd/journald.conf
|
2015-04-19 14:43:25 +00:00
|
|
|
etc/systemd/journal-remote.conf
|
|
|
|
etc/systemd/journal-upload.conf
|
2014-07-16 02:33:04 +00:00
|
|
|
etc/systemd/logind.conf
|
|
|
|
etc/systemd/system.conf
|
|
|
|
etc/systemd/timesyncd.conf
|
|
|
|
etc/systemd/resolved.conf
|
|
|
|
etc/systemd/user.conf
|
|
|
|
etc/udev/udev.conf)
|
|
|
|
install="systemd.install"
|
|
|
|
|
2015-09-20 15:32:52 +00:00
|
|
|
make -C "$pkgbase" DESTDIR="$pkgdir" install
|
2014-07-16 02:33:04 +00:00
|
|
|
|
|
|
|
# don't write units to /etc by default. some of these will be re-enabled on
|
|
|
|
# post_install.
|
2015-04-19 14:43:25 +00:00
|
|
|
rm -r "$pkgdir/etc/systemd/system/"*.wants
|
2014-07-16 02:33:04 +00:00
|
|
|
|
|
|
|
# get rid of RPM macros
|
|
|
|
rm -r "$pkgdir/usr/lib/rpm"
|
|
|
|
|
|
|
|
# add back tmpfiles.d/legacy.conf
|
2015-09-20 15:32:52 +00:00
|
|
|
install -m644 "$pkgbase/tmpfiles.d/legacy.conf" "$pkgdir/usr/lib/tmpfiles.d"
|
2014-07-16 02:33:04 +00:00
|
|
|
|
|
|
|
# Replace dialout/tape/cdrom group in rules with uucp/storage/optical group
|
|
|
|
sed -i 's#GROUP="dialout"#GROUP="uucp"#g;
|
|
|
|
s#GROUP="tape"#GROUP="storage"#g;
|
|
|
|
s#GROUP="cdrom"#GROUP="optical"#g' "$pkgdir"/usr/lib/udev/rules.d/*.rules
|
|
|
|
sed -i 's/dialout/uucp/g;
|
|
|
|
s/tape/storage/g;
|
|
|
|
s/cdrom/optical/g' "$pkgdir"/usr/lib/sysusers.d/basic.conf
|
|
|
|
|
|
|
|
# add mkinitcpio hooks
|
|
|
|
install -Dm644 "$srcdir/initcpio-install-systemd" "$pkgdir/usr/lib/initcpio/install/systemd"
|
|
|
|
install -Dm644 "$srcdir/initcpio-install-udev" "$pkgdir/usr/lib/initcpio/install/udev"
|
|
|
|
install -Dm644 "$srcdir/initcpio-hook-udev" "$pkgdir/usr/lib/initcpio/hooks/udev"
|
|
|
|
|
2014-09-03 00:17:53 +00:00
|
|
|
# ensure proper permissions for /var/log/journal. This is only to placate
|
2014-07-16 02:33:04 +00:00
|
|
|
chown root:systemd-journal "$pkgdir/var/log/journal"
|
2015-04-19 14:43:25 +00:00
|
|
|
chmod 2755 "$pkgdir/var/log/journal"
|
|
|
|
|
|
|
|
# we'll create this on installation
|
|
|
|
rmdir "$pkgdir/var/log/journal/remote"
|
2014-07-16 02:33:04 +00:00
|
|
|
|
|
|
|
# fix pam file
|
|
|
|
sed 's|system-auth|system-login|g' -i "$pkgdir/etc/pam.d/systemd-user"
|
|
|
|
|
2014-09-03 00:17:53 +00:00
|
|
|
# ship default policy to leave services disabled
|
|
|
|
echo 'disable *' >"$pkgdir"/usr/lib/systemd/system-preset/99-default.preset
|
|
|
|
|
2015-09-29 00:27:17 +00:00
|
|
|
### manpages shipped with systemd-sysvcompat
|
|
|
|
rm "$pkgdir"/usr/share/man/man8/{telinit,halt,reboot,poweroff,runlevel,shutdown}.8
|
2014-07-16 02:33:04 +00:00
|
|
|
|
2015-09-29 00:27:17 +00:00
|
|
|
### runtime libraries shipped with libsystemd
|
|
|
|
rm "$pkgdir"/usr/lib/lib{nss,systemd,udev}*.so*
|
2014-07-16 02:33:04 +00:00
|
|
|
|
2015-06-23 02:00:02 +00:00
|
|
|
# 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
|
2016-06-03 23:51:30 +00:00
|
|
|
|
|
|
|
install -Dm644 "$srcdir/udev-hwdb.hook" "$pkgdir/usr/share/libalpm/hooks/udev-hwdb.hook"
|
2014-07-16 02:33:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package_libsystemd() {
|
|
|
|
pkgdesc="systemd client libraries"
|
2016-02-18 15:22:48 +00:00
|
|
|
depends=('glibc' 'libcap' 'libgcrypt' 'lz4' 'xz')
|
2014-07-16 02:33:04 +00:00
|
|
|
license=('GPL2')
|
2016-02-18 15:22:48 +00:00
|
|
|
provides=('libsystemd.so' 'libudev.so')
|
2014-07-16 02:33:04 +00:00
|
|
|
|
2016-11-30 13:44:40 +00:00
|
|
|
make -C "$pkgbase" DESTDIR="$pkgdir" install-rootlibLTLIBRARIES
|
2014-07-16 02:33:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package_systemd-sysvcompat() {
|
|
|
|
pkgdesc="sysvinit compat for systemd"
|
|
|
|
license=('GPL2')
|
|
|
|
groups=('base')
|
|
|
|
conflicts=('sysvinit')
|
|
|
|
depends=('systemd')
|
|
|
|
|
2015-09-29 00:27:17 +00:00
|
|
|
install -dm755 "$pkgdir"/usr/share/man/man8
|
|
|
|
cp -d --no-preserve=ownership,timestamp \
|
|
|
|
"$pkgbase"/man/{telinit,halt,reboot,poweroff,runlevel,shutdown}.8 \
|
|
|
|
"$pkgdir"/usr/share/man/man8
|
2014-07-16 02:33:04 +00:00
|
|
|
|
|
|
|
install -dm755 "$pkgdir/usr/bin"
|
|
|
|
for tool in runlevel reboot shutdown poweroff halt telinit; do
|
|
|
|
ln -s 'systemctl' "$pkgdir/usr/bin/$tool"
|
|
|
|
done
|
|
|
|
|
|
|
|
ln -s '../lib/systemd/systemd' "$pkgdir/usr/bin/init"
|
|
|
|
}
|
|
|
|
|
|
|
|
# vim: ft=sh syn=sh et
|