core/systemd/PKGBUILD

159 lines
5.9 KiB
Bash
Raw Normal View History

2013-07-15 04:12:54 +08:00
# maintainer: Fabian Kosmale <inkane@chakra-project.org>
2012-09-09 12:17:16 +08:00
pkgname=systemd
2016-08-24 03:31:09 +08:00
pkgver=231
2017-01-16 04:09:37 +08:00
pkgrel=4
2013-04-20 18:49:40 +08:00
pkgdesc="A system and service manager for Linux"
arch=('x86_64')
2012-09-09 12:17:16 +08:00
url="http://www.freedesktop.org/wiki/Software/systemd"
license=('GPL2' 'LGPL2.1' 'MIT')
depends=('acl' 'bash' 'dbus' 'iptables' 'kbd' 'kmod' 'hwids' 'libcap'
'libgcrypt' 'glibc' 'libidn' 'lz4' 'pam' 'libseccomp' 'util-linux'
'xz'
'libxkbcommon>=0.5.0-2' 'gnutls' 'elfutils')
makedepends=('acl' 'cryptsetup' 'docbook-xsl' 'gperf' 'lz4' 'xz' 'pam'
'intltool' 'iptables' 'kmod' 'libcap' 'libidn' 'libgcrypt'
'libmicrohttpd' 'libxslt' 'util-linux' 'linux-api-headers'
'python' 'python2-lxml' 'quota-tools' 'shadow' 'gnu-efi-libs' 'git' 'curl')
optdepends=('curl: upload journal and pull image'
2014-07-16 04:27:03 +08:00
'cryptsetup: required for encrypted block devices'
2014-09-06 07:37:39 +08:00
'libmicrohttpd: remote journald capabilities'
'quota-tools: kernel-level quota management'
'polkit: allow administration as unprivileged user')
options=('debug')
2012-09-09 12:17:16 +08:00
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
2012-09-09 12:17:16 +08:00
etc/dbus-1/system.d/org.freedesktop.timedate1.conf
etc/dbus-1/system.d/org.freedesktop.import1.conf
etc/dbus-1/system.d/org.freedesktop.network1.conf
etc/pam.d/systemd-user
2014-09-06 07:37:39 +08:00
etc/systemd/bootchart.conf
etc/systemd/coredump.conf
2012-09-09 12:17:16 +08:00
etc/systemd/journald.conf
etc/systemd/journal-remote.conf
etc/systemd/journal-upload.conf
2014-09-06 07:37:39 +08:00
etc/systemd/logind.conf
etc/systemd/system.conf
etc/systemd/timesyncd.conf
etc/systemd/resolved.conf
2014-09-06 07:37:39 +08:00
etc/systemd/user.conf
2012-09-09 12:17:16 +08:00
etc/udev/udev.conf)
provides=("udev=$pkgver" 'gummiboot')
conflicts=('udev' 'sysvinit' 'initscripts' 'initscripts-systemd' 'gummiboot')
replaces=('udev' 'gummiboot')
2012-09-09 12:17:16 +08:00
install="systemd.install"
2015-12-24 11:07:54 +08:00
source=("git+https://github.com/systemd/systemd.git#tag=v$pkgver"
2012-09-09 12:17:16 +08:00
'initcpio-hook-udev'
2013-08-28 06:27:36 +08:00
'initcpio-install-systemd'
2014-11-18 00:57:51 +08:00
'initcpio-install-udev'
'99-default.preset'
'chakra.conf'
'chakra_fallback.conf'
'loader.conf'
2016-05-22 17:37:55 +08:00
'splash-chakra.bmp')
md5sums=('SKIP'
2015-07-09 12:29:57 +08:00
'90ea67a7bb237502094914622a39e281'
'19185c46811f7e056a760864870bfb4c'
2015-07-09 12:29:57 +08:00
'1b3aa3a0551b08af9305d33f85b5c2fc'
2015-12-24 10:53:10 +08:00
'34c0e45a4c7b598d57a5efcf63ecee2f'
'0fdb041cc891292162f6c2f7d1af830c'
'bfccc8b2a9da47823e4dcef2206d4b1b'
'88949acaf49231fd01e9f0733c5dd812'
2016-05-22 17:37:55 +08:00
'3f1e033e9334e33d6e15f3bf7ce076e3')
2012-09-09 12:17:16 +08:00
2014-11-18 00:57:51 +08:00
prepare() {
cd "$pkgname"
./autogen.sh
2014-11-18 00:57:51 +08:00
}
build() {
cd "$pkgname"
2014-09-27 12:12:32 +08:00
local timeservers=({0..3}.chakra.pool.ntp.org)
2014-09-27 12:12:32 +08:00
./configure \
2012-09-09 12:17:16 +08:00
--libexecdir=/usr/lib \
--localstatedir=/var \
--sysconfdir=/etc \
--enable-introspection \
--disable-gtk-doc \
2014-11-18 00:57:51 +08:00
--enable-lz4 \
--enable-gnuefi \
2012-09-09 12:17:16 +08:00
--disable-audit \
2013-03-13 04:03:32 +08:00
--disable-ima \
2013-07-15 04:12:54 +08:00
--with-sysvinit-path= \
--with-sysvrcnd-path= \
--with-ntp-servers="${timeservers[*]}" \
--with-default-dnssec=no
#--without-kill-user-processes
2013-07-15 04:12:54 +08:00
make
2012-09-09 12:17:16 +08:00
}
package() {
make -C "$pkgname" DESTDIR="$pkgdir" install
2012-09-09 12:17:16 +08:00
2014-09-27 12:12:32 +08:00
install -dm755 "$pkgdir/usr/bin"
ln -s ../../usr/lib/systemd/systemd "$pkgdir/usr/bin/systemd"
2012-09-09 12:17:16 +08:00
2014-09-27 12:12:32 +08:00
install -dm755 "$pkgdir/usr/sbin"
2012-09-09 12:17:16 +08:00
for tool in runlevel reboot shutdown poweroff halt telinit; do
2014-09-27 12:12:32 +08:00
ln -s '/usr/bin/systemctl' "$pkgdir/usr/sbin/$tool"
2012-09-09 12:17:16 +08:00
done
2014-09-27 12:49:10 +08:00
ln -s '../lib/systemd/systemd' "$pkgdir/usr/sbin/init"
2012-09-09 12:17:16 +08:00
# the path to udevadm is hardcoded in some places
2014-09-27 12:49:10 +08:00
ln -s ../bin/udevadm "$pkgdir/usr/sbin/udevadm"
2012-09-09 12:17:16 +08:00
# udevd is no longer udevd because systemd. why isn't udevadm now udevctl?
ln -s ../lib/systemd/systemd-udevd "$pkgdir/usr/bin/udevd"
# 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
2014-02-27 05:35:16 +08:00
# get rid of RPM macros
rm -r "$pkgdir/usr/lib/rpm"
2012-09-09 12:17:16 +08:00
# add back tmpfiles.d/legacy.conf
install -m644 "$pkgname/tmpfiles.d/legacy.conf" "$pkgdir/usr/lib/tmpfiles.d"
2012-09-09 12:17:16 +08: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
2014-08-27 05:16:45 +08:00
sed -i 's/dialout/uucp/g;
s/tape/storage/g;
s/cdrom/optical/g' "$pkgdir"/usr/lib/sysusers.d/basic.conf
2012-09-09 12:17:16 +08:00
# add mkinitcpio hooks
2014-09-06 07:37:39 +08:00
install -Dm644 "$srcdir/initcpio-install-systemd" "$pkgdir/usr/lib/initcpio/install/systemd"
2012-09-09 12:17:16 +08:00
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-02-27 05:35:16 +08:00
2014-09-06 07:37:39 +08:00
# ensure proper permissions for /var/log/journal. This is only to placate
2014-02-27 05:35:16 +08:00
chown root:systemd-journal "$pkgdir/var/log/journal"
2015-07-09 12:29:57 +08:00
chmod 2755 "$pkgdir/var/log/journal"
# we'll create this on installation
rmdir "$pkgdir/var/log/journal/remote"
2014-02-27 05:35:16 +08:00
# fix pam file
sed 's|system-auth|system-login|g' -i "$pkgdir/etc/pam.d/systemd-user"
2012-09-09 12:17:16 +08:00
# Chakra specific .preset
install -Dm644 "$srcdir/99-default.preset" "$pkgdir/usr/lib/systemd/system-preset/99-default.preset"
# Make journalctl persistent
install -dm755 "$pkgdir/var/log/journal"
sed -i -e 's/#SystemMaxUse=/SystemMaxUse=25M/' ${pkgdir}/etc/systemd/journald.conf
# add example bootctl configuration
install -Dm644 "$srcdir/chakra.conf" "$pkgdir"/usr/share/systemd/bootctl/chakra.conf
install -Dm644 "$srcdir/chakra_fallback.conf" "$pkgdir"/usr/share/systemd/bootctl/chakra_fallback.conf
install -Dm644 "$srcdir/loader.conf" "$pkgdir"/usr/share/systemd/bootctl/loader.conf
install -Dm644 "$srcdir/splash-chakra.bmp" "$pkgdir"/usr/share/systemd/bootctl/splash-chakra.bmp
2012-09-09 12:17:16 +08:00
}