mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-12-08 23:03:46 +00:00
215 lines
8.4 KiB
Bash
215 lines
8.4 KiB
Bash
# Maintainer: Dave Reisner <dreisner@archlinux.org>
|
|
# Maintainer: Tom Gundersen <teg@jklm.no>
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
# - disable optimization, currently breaks many things
|
|
|
|
pkgbase=systemd
|
|
pkgname=('systemd' 'libsystemd' 'systemd-sysvcompat')
|
|
pkgver=218
|
|
pkgrel=2
|
|
arch=('i686' 'x86_64')
|
|
url="http://www.freedesktop.org/wiki/Software/systemd"
|
|
makedepends=('acl' 'cryptsetup' 'docbook-xsl' 'gobject-introspection' 'gperf'
|
|
'gtk-doc' 'intltool' 'kmod' 'libcap' 'libidn' 'libgcrypt' 'libmicrohttpd'
|
|
'libxslt' 'util-linux' 'linux-api-headers' 'lz4' 'pam' 'python'
|
|
'python-lxml' 'quota-tools' 'shadow' 'xz')
|
|
options=('strip' 'debug')
|
|
source=("http://www.freedesktop.org/software/$pkgname/$pkgname-$pkgver.tar.xz"
|
|
'initcpio-hook-udev'
|
|
'initcpio-install-systemd'
|
|
'initcpio-install-udev'
|
|
0001-journal-fix-dangling-else-ambiguity.patch
|
|
0002-nspawn-properly-validate-machine-names.patch
|
|
0003-systemctl-fix-argument-handling-when-invoked-as-shut.patch
|
|
0004-systemctl-properly-iterate-through-service-array-whe.patch
|
|
0005-nss-myhostname-always-will-in-canonical-hostname-fie.patch
|
|
0010-log-fix-log_full_errno-with-custom-facilities.patch
|
|
0014-timesyncd-consider-too-long-packets-as-invalid.patch
|
|
0016-logind-fix-sd_eviocrevoke-ioctl-call.patch
|
|
0019-sd-bus-fix-handling-of-double-parameters-in-sd_bus_m.patch
|
|
0021-units-fix-all-TTY-paths-for-container-gettys.patch
|
|
0024-sd-dhcp-chop-of-trailing-dot-of-DHCP-supplied-host-a.patch
|
|
0025-logind-handle-closing-sessions-over-daemon-restarts.patch
|
|
0026-core-make-setting-the-shutdown-watchdog-configuratio.patch
|
|
0027-sd-rtnl-don-t-fail-event-handler-when-callback-fails.patch
|
|
0029-config_parse_set_status-put-signals-in-the-correct-s.patch
|
|
0030-network-address-test-network-avoid-undefined-behavio.patch
|
|
0033-core-disarm-shutdown-watchdog-if-we-fail-to-set-time.patch
|
|
0034-exit-on-idle-only-exit-if-actually-idle.patch)
|
|
md5sums=('4e2c511b0a7932d7fc9d79822273aac6'
|
|
'90ea67a7bb237502094914622a39e281'
|
|
'c9db3010602913559295de3481019681'
|
|
'bde43090d4ac0ef048e3eaee8202a407'
|
|
'22920ff32e345a26a9c05662ec274314'
|
|
'6960b43aaec4f899fdf0fe87d0457901'
|
|
'715cefd0e803d8b441811688fd4da1c3'
|
|
'3bb57f2812572ee999928ba33b489afe'
|
|
'5d42fda1f10c02861ee454277b516716'
|
|
'a079c6e5c8d0184adf47794aaf338ac4'
|
|
'c9b4e7bff3d1c073852c3d1b3bb8002e'
|
|
'ae4d820582570ceb7b7c80b6810596f1'
|
|
'5b212435622f69c2a24b01ef7380bc94'
|
|
'0523c9ae27abdd30b847625b1c9c7a03'
|
|
'c0d236b41dd4afad3f91dee72bb296a8'
|
|
'25e191463fb877fd5dabecb95f15ee8f'
|
|
'5911ef7d3ab5c5a06076fdea221ea27e'
|
|
'ab7baf675e224cf19b9194fc1e4ea5ff'
|
|
'1d6cb563b3864fd8d724982bc2007f16'
|
|
'529c4fba7e0a709fda9e108e658e76c3'
|
|
'9d0d909507294afb879965e74fef79c8'
|
|
'c0b68cefe7f00ea5ec856c64f799cca4')
|
|
|
|
prepare() {
|
|
cd "$pkgname-$pkgver"
|
|
|
|
for p in "${source[@]}"; do
|
|
[[ $p = *.patch ]] || continue
|
|
patch -Np1 <"../$p"
|
|
done
|
|
}
|
|
|
|
build() {
|
|
cd "$pkgname-$pkgver"
|
|
|
|
CFLAGS=`echo $CFLAGS | sed -e 's/-O2/-O0/'` && CXXFLAGS="$CFLAGS"
|
|
unset CPPFLAGS
|
|
|
|
local timeservers=({0..3}.arch.pool.ntp.org)
|
|
|
|
./configure \
|
|
--libexecdir=/usr/lib \
|
|
--localstatedir=/var \
|
|
--sysconfdir=/etc \
|
|
--enable-introspection \
|
|
--enable-gtk-doc \
|
|
--enable-lz4 \
|
|
--enable-compat-libs \
|
|
--disable-audit \
|
|
--disable-ima \
|
|
--disable-kdbus \
|
|
--with-sysvinit-path= \
|
|
--with-sysvrcnd-path= \
|
|
--with-ntp-servers="${timeservers[*]}"
|
|
|
|
make
|
|
}
|
|
|
|
package_systemd() {
|
|
pkgdesc="system and service manager"
|
|
license=('GPL2' 'LGPL2.1' 'MIT')
|
|
depends=('acl' 'bash' 'dbus' 'glib2' 'kbd' 'kmod' 'hwids' 'libcap' 'libgcrypt'
|
|
'libsystemd' 'libidn' 'lz4' 'pam' '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=('python: systemd library bindings'
|
|
'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/dbus-1/system.d/org.freedesktop.systemd1.conf
|
|
etc/dbus-1/system.d/org.freedesktop.hostname1.conf
|
|
etc/dbus-1/system.d/org.freedesktop.login1.conf
|
|
etc/dbus-1/system.d/org.freedesktop.locale1.conf
|
|
etc/dbus-1/system.d/org.freedesktop.machine1.conf
|
|
etc/dbus-1/system.d/org.freedesktop.timedate1.conf
|
|
etc/pam.d/systemd-user
|
|
etc/systemd/bootchart.conf
|
|
etc/systemd/coredump.conf
|
|
etc/systemd/journald.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 "$pkgname-$pkgver" DESTDIR="$pkgdir" install
|
|
|
|
# don't write units to /etc by default. some of these will be re-enabled on
|
|
# post_install.
|
|
rm "$pkgdir/etc/systemd/system/getty.target.wants/getty@tty1.service" \
|
|
"$pkgdir/etc/systemd/system/multi-user.target.wants/systemd-networkd.service" \
|
|
"$pkgdir/etc/systemd/system/multi-user.target.wants/systemd-resolved.service" \
|
|
"$pkgdir/etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service" \
|
|
"$pkgdir/etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service"
|
|
rmdir "$pkgdir/etc/systemd/system/getty.target.wants" \
|
|
"$pkgdir/etc/systemd/system/network-online.target.wants"
|
|
|
|
# get rid of RPM macros
|
|
rm -r "$pkgdir/usr/lib/rpm"
|
|
|
|
# add back tmpfiles.d/legacy.conf
|
|
install -m644 "systemd-$pkgver/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"{,/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
|
|
|
|
### split out manpages for sysvcompat
|
|
rm -rf "$srcdir/_sysvcompat"
|
|
install -dm755 "$srcdir"/_sysvcompat/usr/share/man/man8/
|
|
mv "$pkgdir"/usr/share/man/man8/{telinit,halt,reboot,poweroff,runlevel,shutdown}.8 \
|
|
"$srcdir"/_sysvcompat/usr/share/man/man8
|
|
|
|
### split off runtime libraries
|
|
rm -rf "$srcdir/_libsystemd"
|
|
install -dm755 "$srcdir"/_libsystemd/usr/lib
|
|
cd "$srcdir"/_libsystemd
|
|
mv "$pkgdir"/usr/lib/lib{systemd,{g,}udev}*.so* usr/lib
|
|
|
|
# include MIT license, since it's technically custom
|
|
install -Dm644 "$srcdir/$pkgname-$pkgver/LICENSE.MIT" \
|
|
"$pkgdir/usr/share/licenses/systemd/LICENSE.MIT"
|
|
}
|
|
|
|
package_libsystemd() {
|
|
pkgdesc="systemd client libraries"
|
|
depends=('glib2' 'glibc' 'libgcrypt' 'lz4' 'xz')
|
|
license=('GPL2')
|
|
provides=('libgudev-1.0.so' 'libsystemd.so' 'libsystemd-daemon.so' 'libsystemd-id128.so'
|
|
'libsystemd-journal.so' 'libsystemd-login.so' 'libudev.so')
|
|
|
|
mv "$srcdir/_libsystemd"/* "$pkgdir"
|
|
}
|
|
|
|
package_systemd-sysvcompat() {
|
|
pkgdesc="sysvinit compat for systemd"
|
|
license=('GPL2')
|
|
groups=('base')
|
|
conflicts=('sysvinit')
|
|
depends=('systemd')
|
|
|
|
mv "$srcdir/_sysvcompat"/* "$pkgdir"
|
|
|
|
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
|