mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
214 lines
7 KiB
Bash
214 lines
7 KiB
Bash
# Maintainer: Dave Reisner <dreisner@archlinux.org>
|
|
# Maintainer: Tom Gundersen <teg@jklm.no>
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
# - disable gold/LTO
|
|
# - removed makedepend on gnu-efi-libs, --enable-gnuefi configure option
|
|
|
|
pkgbase=systemd
|
|
pkgname=('systemd' 'libsystemd' 'systemd-sysvcompat')
|
|
pkgver=230
|
|
pkgrel=7
|
|
arch=('i686' 'x86_64')
|
|
url="http://www.freedesktop.org/wiki/Software/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' 'git')
|
|
options=('strip' 'debug')
|
|
source=("git://github.com/systemd/systemd.git#tag=v$pkgver"
|
|
'initcpio-hook-udev'
|
|
'initcpio-install-systemd'
|
|
'initcpio-install-udev'
|
|
'arch.conf'
|
|
'loader.conf'
|
|
'splash-arch.bmp'
|
|
'udev-hwdb.hook')
|
|
md5sums=('SKIP'
|
|
'90ea67a7bb237502094914622a39e281'
|
|
'bee7fd6ccda39582259708e3f262ea6d'
|
|
'1b3aa3a0551b08af9305d33f85b5c2fc'
|
|
'20ead378f5d6df4b2a3e670301510a7d'
|
|
'ddaef54f68f6c86c6c07835fc668f62a'
|
|
'1e2f9a8b0fa32022bf0a8f39123e5f4e'
|
|
'a475a5ed8f03fb0f6b58b4684998d05c')
|
|
|
|
_backports=(
|
|
# Revert "rules: allow users to access frame buffer devices" (#3333)
|
|
e77813ca9f4e0735fd0e3e2caae4d7d1ee436011
|
|
|
|
# {machine,system}ctl: always pass &changes and &n_changes (#3350)
|
|
acc0269cad31d1aaef2034a055b34c07c88a353d
|
|
|
|
# systemctl: fix return values on success
|
|
5f056378b0ceffb6e6fba3513f7eae72e2d09dc8
|
|
|
|
# automount: handle expire_tokens when the mount unit changes its state (#3434)
|
|
0a62f81045dd810c8f1223cccbac4d706ea2cb45
|
|
|
|
# networkd: networkd: ndisc set SO_BINDTODEVICE on socket (#3294)
|
|
15fec93be37f12ef6c36a3e8f7dbb1984e1bcfe7
|
|
|
|
# resolved: when restarting a transaction make sure to not touch it anymore (#3553)
|
|
5278bbfe0c79c1f2b5bf8a215d8e7d63f1900ce9
|
|
|
|
# basic: pass flags to the fnmatch
|
|
2027927b1002a74d24300704a655614f8ea48e45
|
|
|
|
# nspawn: fix uid patching logic
|
|
0c6aeb4609f619328b9dcf8d8d815bd06e412ac5
|
|
|
|
# load-fragment: don't try to do a template instance replacement if we are not an instance (#3451)
|
|
9d3e340639bc0b4610f7ece98a84157dbc1c2c8f
|
|
)
|
|
|
|
prepare() {
|
|
cd "$pkgbase"
|
|
|
|
if (( ${#_backports[*]} > 0 )); then
|
|
git cherry-pick -n "${_backports[@]}"
|
|
fi
|
|
|
|
./autogen.sh
|
|
}
|
|
|
|
build() {
|
|
cd "$pkgbase"
|
|
|
|
local timeservers=({0..3}.arch.pool.ntp.org)
|
|
|
|
LDFLAGS+=" -Wl,-fuse-ld=bfd"
|
|
CFLAGS+=" -fno-lto"
|
|
CXXFLAGS+=" -fno-lto"
|
|
|
|
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
|
|
--with-dbuspolicydir=/usr/share/dbus-1/system.d
|
|
--without-kill-user-processes
|
|
)
|
|
|
|
./configure "${configure_options[@]}"
|
|
|
|
make
|
|
}
|
|
|
|
package_systemd() {
|
|
pkgdesc="system and service manager"
|
|
license=('GPL2' 'LGPL2.1')
|
|
depends=('acl' 'bash' 'dbus' 'iptables' 'kbd' 'kmod' 'hwids' 'libcap'
|
|
'libgcrypt' 'libsystemd' 'libidn' 'lz4' 'pam' 'libelf' 'libseccomp'
|
|
'util-linux' 'xz')
|
|
provides=('nss-myhostname' "systemd-tools=$pkgver" "udev=$pkgver")
|
|
replaces=('nss-myhostname' 'systemd-tools' 'udev')
|
|
conflicts=('nss-myhostname' 'systemd-tools' 'udev')
|
|
optdepends=('cryptsetup: required for encrypted block devices'
|
|
'libmicrohttpd: remote journald capabilities'
|
|
'quota-tools: kernel-level quota management'
|
|
'systemd-sysvcompat: symlink package to provide sysvinit binaries'
|
|
'polkit: allow administration as unprivileged user')
|
|
backup=(etc/pam.d/systemd-user
|
|
etc/systemd/coredump.conf
|
|
etc/systemd/journald.conf
|
|
etc/systemd/journal-remote.conf
|
|
etc/systemd/journal-upload.conf
|
|
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"
|
|
|
|
make -C "$pkgbase" DESTDIR="$pkgdir" install
|
|
|
|
# don't write units to /etc by default. some of these will be re-enabled on
|
|
# post_install.
|
|
rm -r "$pkgdir/etc/systemd/system/"*.wants
|
|
|
|
# get rid of RPM macros
|
|
rm -r "$pkgdir/usr/lib/rpm"
|
|
|
|
# add back tmpfiles.d/legacy.conf
|
|
install -m644 "$pkgbase/tmpfiles.d/legacy.conf" "$pkgdir/usr/lib/tmpfiles.d"
|
|
|
|
# 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"
|
|
|
|
# ensure proper permissions for /var/log/journal. This is only to placate
|
|
chown root:systemd-journal "$pkgdir/var/log/journal"
|
|
chmod 2755 "$pkgdir/var/log/journal"
|
|
|
|
# we'll create this on installation
|
|
rmdir "$pkgdir/var/log/journal/remote"
|
|
|
|
# fix pam file
|
|
sed 's|system-auth|system-login|g' -i "$pkgdir/etc/pam.d/systemd-user"
|
|
|
|
# ship default policy to leave services disabled
|
|
echo 'disable *' >"$pkgdir"/usr/lib/systemd/system-preset/99-default.preset
|
|
|
|
### manpages shipped with systemd-sysvcompat
|
|
rm "$pkgdir"/usr/share/man/man8/{telinit,halt,reboot,poweroff,runlevel,shutdown}.8
|
|
|
|
### runtime libraries shipped with libsystemd
|
|
rm "$pkgdir"/usr/lib/lib{nss,systemd,udev}*.so*
|
|
|
|
# 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/udev-hwdb.hook" "$pkgdir/usr/share/libalpm/hooks/udev-hwdb.hook"
|
|
}
|
|
|
|
package_libsystemd() {
|
|
pkgdesc="systemd client libraries"
|
|
depends=('glibc' 'libcap' 'libgcrypt' 'lz4' 'xz')
|
|
license=('GPL2')
|
|
provides=('libsystemd.so' 'libudev.so')
|
|
|
|
make -C "$pkgbase" DESTDIR="$pkgdir" install-libLTLIBRARIES
|
|
}
|
|
|
|
package_systemd-sysvcompat() {
|
|
pkgdesc="sysvinit compat for systemd"
|
|
license=('GPL2')
|
|
groups=('base')
|
|
conflicts=('sysvinit')
|
|
depends=('systemd')
|
|
|
|
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
|
|
|
|
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
|