mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-11 12:14:37 +08:00
crda: update to 3.13 gnutls: update to 3.3.11 cryptsetup: update to 1.6.6 libgcrypt: update to 1.6.2 libgpg-error: update to 1.17 libxslt: rebuild systemd: rebuild vpnc: fixed + rebuilt
183 lines
7.1 KiB
Bash
183 lines
7.1 KiB
Bash
# maintainer: Fabian Kosmale <inkane@chakra-project.org>
|
|
pkgname=systemd
|
|
pkgver=218
|
|
pkgrel=2
|
|
_fedora_patch=ea19761321f4e7f5e2cbdd66fe38388c93790c20
|
|
pkgdesc="A system and service manager for Linux"
|
|
arch=('x86_64')
|
|
url="http://www.freedesktop.org/wiki/Software/systemd"
|
|
license=('GPL2' 'LGPL2.1' 'MIT')
|
|
depends=('acl' 'bash' 'glibc' 'glib2' 'hwids' 'util-linux' 'kbd' 'kmod>=19' 'libcap' 'libxslt'
|
|
'linux-api-headers' 'lz4' 'pam' 'xz' 'libgcrypt' 'dbus-core' 'libidn' 'quota-tools' 'elfutils' 'curl')
|
|
makedepends=('docbook-xsl' 'cryptsetup' 'gobject-introspection' 'python2' 'python2-lxml' 'gperf' 'intltool' 'libmicrohttpd')
|
|
optdepends=('python: systemd library bindings'
|
|
'cryptsetup: required for encrypted block devices'
|
|
'libmicrohttpd: remote journald capabilities'
|
|
'quota-tools: kernel-level quota management'
|
|
'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)
|
|
provides=("udev=$pkgver")
|
|
conflicts=('udev' 'sysvinit' 'initscripts' 'initscripts-systemd')
|
|
replaces=('udev')
|
|
install="systemd.install"
|
|
source=("http://www.freedesktop.org/software/$pkgname/$pkgname-$pkgver.tar.xz"
|
|
# "git://pkgs.fedoraproject.org/systemd.git#commit=${_fedora_patch}"
|
|
'initcpio-hook-udev'
|
|
'initcpio-install-systemd'
|
|
'initcpio-install-udev'
|
|
'99-default.preset')
|
|
md5sums=('4e2c511b0a7932d7fc9d79822273aac6'
|
|
'7a79eb3e4ce19906cfebfea75fb9f8bb'
|
|
'a736284f0c8e549dd988522e75628ec0'
|
|
'bde43090d4ac0ef048e3eaee8202a407'
|
|
'a1bf25da736d3719e9720b2e4caea341')
|
|
|
|
prepare() {
|
|
cd "$pkgname-$pkgver"
|
|
|
|
# git init
|
|
# git config user.email "chakra-devel@googlegroups.com"
|
|
# git config user.name "Chakra Packager"
|
|
# git add .
|
|
# git commit -a -q -m "${pkgver}} baseline."
|
|
#
|
|
# git am \
|
|
# --exclude .gitignore \
|
|
# --exclude docs/.gitignore \
|
|
# --exclude docs/gudev/.gitignore \
|
|
# --exclude docs/libudev/.gitignore \
|
|
# --exclude docs/sysvinit/.gitignore \
|
|
# --exclude docs/var-log/.gitignore \
|
|
# --exclude hwdb/.gitignore \
|
|
# --exclude m4/.gitignore \
|
|
# --exclude man/.gitignore \
|
|
# --exclude po/.gitignore \
|
|
# --exclude rules/.gitignore \
|
|
# --exclude src/.gitignore \
|
|
# --exclude src/analyze/.gitignore \
|
|
# --exclude src/core/.gitignore \
|
|
# --exclude src/gudev/.gitignore \
|
|
# --exclude src/hostname/.gitignore \
|
|
# --exclude src/journal/.gitignore \
|
|
# --exclude src/libsystemd-daemon/.gitignore \
|
|
# --exclude src/libsystemd-id128/.gitignore \
|
|
# --exclude src/libudev/.gitignore \
|
|
# --exclude src/locale/.gitignore \
|
|
# --exclude src/login/.gitignore \
|
|
# --exclude src/python-systemd/.gitignore \
|
|
# --exclude src/python-systemd/docs/.gitignore \
|
|
# --exclude src/timedate/.gitignore \
|
|
# --exclude src/udev/.gitignore \
|
|
# --exclude src/udev/scsi_id/.gitignore \
|
|
# --exclude sysctl.d/.gitignore \
|
|
# --exclude test/.gitignore \
|
|
# --exclude units/.gitignore \
|
|
# --exclude units/user/.gitignore \
|
|
# --exclude src/libsystemd/sd-bus/PORTING-DBUS1 \
|
|
# --exclude CODING_STYLE \
|
|
# --exclude src/readahead/Makefile \
|
|
# --exclude src/libsystemd-terminal/unifont-def.h \
|
|
# ../systemd/00*-*.patch
|
|
#
|
|
# autoreconf -i
|
|
}
|
|
|
|
build() {
|
|
cd "$pkgname-$pkgver"
|
|
|
|
./configure \
|
|
PYTHON=python2 \
|
|
PYTHON_CONFIG=python2-config \
|
|
--libexecdir=/usr/lib \
|
|
--localstatedir=/var \
|
|
--sysconfdir=/etc \
|
|
--enable-introspection \
|
|
--disable-gtk-doc \
|
|
--enable-lz4 \
|
|
--enable-compat-libs \
|
|
--disable-audit \
|
|
--disable-ima \
|
|
--disable-kdbus \
|
|
--with-sysvinit-path= \
|
|
--with-sysvrcnd-path= \
|
|
--with-firmware-path="/usr/lib/firmware/updates:/usr/lib/firmware"
|
|
make
|
|
}
|
|
|
|
package() {
|
|
make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install
|
|
|
|
install -dm755 "$pkgdir/usr/bin"
|
|
ln -s ../../usr/lib/systemd/systemd "$pkgdir/usr/bin/systemd"
|
|
|
|
install -dm755 "$pkgdir/usr/sbin"
|
|
for tool in runlevel reboot shutdown poweroff halt telinit; do
|
|
ln -s '/usr/bin/systemctl' "$pkgdir/usr/sbin/$tool"
|
|
done
|
|
|
|
ln -s '../lib/systemd/systemd' "$pkgdir/usr/sbin/init"
|
|
|
|
# the path to udevadm is hardcoded in some places
|
|
ln -s ../bin/udevadm "$pkgdir/usr/sbin/udevadm"
|
|
|
|
# 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 "$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"
|
|
|
|
# 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
|
|
}
|