systemd 255-1
This commit is contained in:
commit
5680fec0e5
10
30-systemd-binfmt.hook
Normal file
10
30-systemd-binfmt.hook
Normal file
@ -0,0 +1,10 @@
|
||||
[Trigger]
|
||||
Type = Path
|
||||
Operation = Install
|
||||
Operation = Upgrade
|
||||
Target = usr/lib/binfmt.d/*.conf
|
||||
|
||||
[Action]
|
||||
Description = Registering binary formats...
|
||||
When = PostTransaction
|
||||
Exec = /usr/share/libalpm/scripts/systemd-hook binfmt
|
11
30-systemd-catalog.hook
Normal file
11
30-systemd-catalog.hook
Normal file
@ -0,0 +1,11 @@
|
||||
[Trigger]
|
||||
Type = Path
|
||||
Operation = Install
|
||||
Operation = Upgrade
|
||||
Operation = Remove
|
||||
Target = usr/lib/systemd/catalog/*
|
||||
|
||||
[Action]
|
||||
Description = Updating journal message catalog...
|
||||
When = PostTransaction
|
||||
Exec = /usr/share/libalpm/scripts/systemd-hook catalog
|
11
30-systemd-daemon-reload-system.hook
Normal file
11
30-systemd-daemon-reload-system.hook
Normal file
@ -0,0 +1,11 @@
|
||||
[Trigger]
|
||||
Type = Path
|
||||
Operation = Install
|
||||
Operation = Upgrade
|
||||
Operation = Remove
|
||||
Target = usr/lib/systemd/system/*
|
||||
|
||||
[Action]
|
||||
Description = Reloading system manager configuration...
|
||||
When = PostTransaction
|
||||
Exec = /usr/share/libalpm/scripts/systemd-hook daemon-reload-system
|
11
30-systemd-daemon-reload-user.hook
Normal file
11
30-systemd-daemon-reload-user.hook
Normal file
@ -0,0 +1,11 @@
|
||||
[Trigger]
|
||||
Type = Path
|
||||
Operation = Install
|
||||
Operation = Upgrade
|
||||
Operation = Remove
|
||||
Target = usr/lib/systemd/user/*
|
||||
|
||||
[Action]
|
||||
Description = Reloading user manager configuration...
|
||||
When = PostTransaction
|
||||
Exec = /usr/share/libalpm/scripts/systemd-hook daemon-reload-user
|
11
30-systemd-hwdb.hook
Normal file
11
30-systemd-hwdb.hook
Normal file
@ -0,0 +1,11 @@
|
||||
[Trigger]
|
||||
Type = Path
|
||||
Operation = Install
|
||||
Operation = Upgrade
|
||||
Operation = Remove
|
||||
Target = usr/lib/udev/hwdb.d/*
|
||||
|
||||
[Action]
|
||||
Description = Updating udev hardware database...
|
||||
When = PostTransaction
|
||||
Exec = /usr/share/libalpm/scripts/systemd-hook hwdb
|
10
30-systemd-sysctl.hook
Normal file
10
30-systemd-sysctl.hook
Normal file
@ -0,0 +1,10 @@
|
||||
[Trigger]
|
||||
Type = Path
|
||||
Operation = Install
|
||||
Operation = Upgrade
|
||||
Target = usr/lib/sysctl.d/*.conf
|
||||
|
||||
[Action]
|
||||
Description = Applying kernel sysctl settings...
|
||||
When = PostTransaction
|
||||
Exec = /usr/share/libalpm/scripts/systemd-hook sysctl
|
10
30-systemd-tmpfiles.hook
Normal file
10
30-systemd-tmpfiles.hook
Normal file
@ -0,0 +1,10 @@
|
||||
[Trigger]
|
||||
Type = Path
|
||||
Operation = Install
|
||||
Operation = Upgrade
|
||||
Target = usr/lib/tmpfiles.d/*.conf
|
||||
|
||||
[Action]
|
||||
Description = Creating temporary files...
|
||||
When = PostTransaction
|
||||
Exec = /usr/share/libalpm/scripts/systemd-hook tmpfiles
|
11
30-systemd-udev-reload.hook
Normal file
11
30-systemd-udev-reload.hook
Normal file
@ -0,0 +1,11 @@
|
||||
[Trigger]
|
||||
Type = Path
|
||||
Operation = Install
|
||||
Operation = Upgrade
|
||||
Operation = Remove
|
||||
Target = usr/lib/udev/rules.d/*
|
||||
|
||||
[Action]
|
||||
Description = Reloading device manager configuration...
|
||||
When = PostTransaction
|
||||
Exec = /usr/share/libalpm/scripts/systemd-hook udev-reload
|
11
30-systemd-update.hook
Normal file
11
30-systemd-update.hook
Normal file
@ -0,0 +1,11 @@
|
||||
[Trigger]
|
||||
Type = Path
|
||||
Operation = Install
|
||||
Operation = Upgrade
|
||||
Operation = Remove
|
||||
Target = usr/
|
||||
|
||||
[Action]
|
||||
Description = Arming ConditionNeedsUpdate...
|
||||
When = PostTransaction
|
||||
Exec = /usr/share/libalpm/scripts/systemd-hook update
|
124
PKGBUILD
Normal file
124
PKGBUILD
Normal file
@ -0,0 +1,124 @@
|
||||
# Maintainer: Future Linux Team <futurelinux@163.com>
|
||||
|
||||
pkgname=systemd
|
||||
pkgver=255
|
||||
pkgrel=1
|
||||
pkgdesc="system and service manager"
|
||||
arch=('x86_64')
|
||||
url="https://www.freedesktop.org/wiki/Software/systemd/"
|
||||
license=('GPL2' 'LGPL2.1')
|
||||
groups=('base')
|
||||
depends=('glibc' 'gcc-libs' 'libcap' 'libgcrypt' 'xz' 'zstd'
|
||||
'acl' 'bash' 'kbd' 'kmod' 'libxcrypt' 'libidn2' 'linux-pam'
|
||||
'libelf' 'libseccomp' 'util-linux' 'pcre2' 'openssl'
|
||||
'libpwquality' 'python-jinja2' 'python-pefile')
|
||||
makedepends=('lz4' 'gperf' 'intltool' 'linux-api-headers'
|
||||
'shadow' 'meson' 'curl' 'gnu-efi')
|
||||
backup=(etc/pam.d/systemd-user
|
||||
etc/systemd/coredump.conf
|
||||
etc/systemd/homed.conf
|
||||
etc/systemd/journal-upload.conf
|
||||
etc/systemd/journald.conf
|
||||
etc/systemd/logind.conf
|
||||
etc/systemd/networkd.conf
|
||||
etc/systemd/oomd.conf
|
||||
etc/systemd/pstore.conf
|
||||
etc/systemd/resolved.conf
|
||||
etc/systemd/sleep.conf
|
||||
etc/systemd/system.conf
|
||||
etc/systemd/timesyncd.conf
|
||||
etc/systemd/user.conf
|
||||
etc/udev/iocost.conf
|
||||
etc/udev/udev.conf)
|
||||
install=${pkgname}.install
|
||||
source=(https://github.com/systemd/systemd/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz
|
||||
${pkgname}-${pkgver}-upstream_fixes-1.patch
|
||||
30-systemd-binfmt.hook
|
||||
30-systemd-catalog.hook
|
||||
30-systemd-daemon-reload-system.hook
|
||||
30-systemd-daemon-reload-user.hook
|
||||
30-systemd-hwdb.hook
|
||||
30-systemd-sysctl.hook
|
||||
30-systemd-tmpfiles.hook
|
||||
30-systemd-udev-reload.hook
|
||||
30-systemd-update.hook
|
||||
systemd-hook
|
||||
systemd-user.pam)
|
||||
sha256sums=(28854ffb2cb5f9e07fcbdbaf1e03a80b3462a12edeef84893ca2f37b22e4491e
|
||||
139dfec2705b5c2827f6c1a68d0717ab0f397517accd5e07b5c5450d24ea9dc8
|
||||
a938701f4244ebdc4ae88ed0032a8315b68f086c6e45d9f2e34ef9442a8f6b47
|
||||
be3c749ed51ee26c8412e0304a41ac5e00e668f4d5227b5f359a3b0c31d18d5d
|
||||
2d2733a167ee360a36d6cc613001913deb62f199d73e86d39bfe06e669f4b066
|
||||
5e35263da327771ec1b9bff1d792b0da4c802f0322e40838f07554788fc191e2
|
||||
b19b23467dc33b3e8267cabea10726b0d181e0de1b491ec538b9fb620bccf57f
|
||||
1af0fbaeaf974fe3d8409854179fac68e8461524dd49849b7e889374363ce3c9
|
||||
3cfdc3c21d32cc35b1315f4ff4df87238bc7d2c27bdcf4e5a70600832c481e95
|
||||
f6364443609b1d5a07f385e7228ace0eae5040ae3bbd4e00ed5033ef1b19e4b9
|
||||
1090b7b1edba2042298b609a77bbe122982ca936208408fb79d77b33a2f3c27a
|
||||
cb8c630ed261cdac797e044793726c4080a6144f9a9fd0f2f992dde9da3fd6c4
|
||||
bdf4bc315b05af3e3b6a15ca9baa7ec53a6049b8e4033bedc931c0257e0fbe74)
|
||||
|
||||
prepare() {
|
||||
cd ${pkgname}-${pkgver}
|
||||
|
||||
sed -i -e 's/GROUP="render"/GROUP="video"/' \
|
||||
-e 's/GROUP="sgx", //' rules.d/50-udev-default.rules.in
|
||||
|
||||
patch -Np1 -i ${srcdir}/${pkgname}-${pkgver}-upstream_fixes-1.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd ${pkgname}-${pkgver}
|
||||
|
||||
local _timeservers=(ntp.aliyun.com ntp{1..7}.aliyun.com)
|
||||
|
||||
meson setup build \
|
||||
--prefix=/usr \
|
||||
--libdir=/usr/lib64 \
|
||||
--buildtype=release \
|
||||
-Ddefault-dnssec=no \
|
||||
-Dfirstboot=false \
|
||||
-Dinstall-tests=false \
|
||||
-Dldconfig=false \
|
||||
-Dman=auto \
|
||||
-Dsysusers=false \
|
||||
-Drpmmacrosdir=no \
|
||||
-Dhomed=disabled \
|
||||
-Duserdb=true \
|
||||
-Dmode=release \
|
||||
-Dpam=enabled \
|
||||
-Dpamconfdir=/etc/pam.d \
|
||||
-Ddev-kvm-mode=0660 \
|
||||
-Dnobody-group=nogroup \
|
||||
-Dsysupdate=disabled \
|
||||
-Dukify=enabled \
|
||||
-Dlibidn2=enabled \
|
||||
-Defi=true \
|
||||
-Dlz4=enabled \
|
||||
-Dnscd=false \
|
||||
-Ddocdir=/usr/share/doc/${pkgname}-${pkgver} \
|
||||
-Dntp-servers="${_timeservers[*]}" \
|
||||
-Dfallback-hostname='futurelinux' \
|
||||
-Dsbat-distro='future' \
|
||||
-Dsbat-distro-summary="Future Linux" \
|
||||
-Dsbat-distro-pkgname=${pkgname} \
|
||||
-Dsbat-distro-version=${pkgver} \
|
||||
-Dsbat-distro-url="https://futurelinux.github.io"
|
||||
|
||||
meson compile -C build
|
||||
}
|
||||
|
||||
package() {
|
||||
cd ${pkgname}-${pkgver}
|
||||
|
||||
meson install -C build --destdir ${pkgdir}
|
||||
|
||||
install -vDm644 ${srcdir}/systemd-user.pam ${pkgdir}/etc/pam.d/systemd-user
|
||||
|
||||
install -d -o root -g root -m 2755 ${pkgdir}/var/log/journal
|
||||
|
||||
# pacman hooks
|
||||
install -D -m0755 ${srcdir}/systemd-hook ${pkgdir}/usr/share/libalpm/scripts/systemd-hook
|
||||
install -D -m0644 -t ${pkgdir}/usr/share/libalpm/hooks ${srcdir}/*.hook
|
||||
|
||||
}
|
78
systemd-hook
Normal file
78
systemd-hook
Normal file
@ -0,0 +1,78 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
is_chrooted() {
|
||||
if systemd-detect-virt --chroot; then
|
||||
echo >&2 " Skipped: Running in chroot."
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
|
||||
systemd_live() {
|
||||
is_chrooted
|
||||
if [ ! -d /run/systemd/system ]; then
|
||||
echo >&2 " Skipped: Current root is not booted."
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
|
||||
udevd_live() {
|
||||
is_chrooted
|
||||
if [ ! -S /run/udev/control ]; then
|
||||
echo >&2 " Skipped: Device manager is not running."
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
|
||||
op="$1"; shift
|
||||
|
||||
case "$op" in
|
||||
binfmt)
|
||||
systemd_live
|
||||
/usr/lib/systemd/systemd-binfmt
|
||||
;;
|
||||
catalog)
|
||||
/usr/bin/journalctl --update-catalog
|
||||
;;
|
||||
daemon-reload-system)
|
||||
systemd_live
|
||||
/usr/bin/systemctl --system daemon-reload
|
||||
;;
|
||||
daemon-reload-user)
|
||||
systemd_live
|
||||
/usr/bin/systemctl kill --kill-whom='main' --signal='SIGHUP' 'user@*.service'
|
||||
;;
|
||||
hwdb)
|
||||
/usr/bin/systemd-hwdb --usr update
|
||||
;;
|
||||
sysctl)
|
||||
systemd_live
|
||||
/usr/lib/systemd/systemd-sysctl
|
||||
;;
|
||||
tmpfiles)
|
||||
/usr/bin/systemd-tmpfiles --create
|
||||
;;
|
||||
update)
|
||||
touch -c /usr
|
||||
;;
|
||||
udev-reload)
|
||||
udevd_live
|
||||
/usr/bin/udevadm control --reload
|
||||
if [ ! -e /etc/systemd/do-not-udevadm-trigger-on-update ]; then
|
||||
/usr/bin/udevadm trigger -c change
|
||||
/usr/bin/udevadm settle
|
||||
fi
|
||||
;;
|
||||
|
||||
# For use by other packages
|
||||
reload)
|
||||
systemd_live
|
||||
/usr/bin/systemctl try-reload-or-restart "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo >&2 " Invalid operation '$op'"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
15
systemd-user.pam
Normal file
15
systemd-user.pam
Normal file
@ -0,0 +1,15 @@
|
||||
# Begin /etc/pam.d/systemd-user
|
||||
|
||||
account required pam_access.so
|
||||
account include system-account
|
||||
|
||||
session required pam_env.so
|
||||
session required pam_limits.so
|
||||
session required pam_loginuid.so
|
||||
session optional pam_keyinit.so force revoke
|
||||
session optional pam_systemd.so
|
||||
|
||||
auth required pam_deny.so
|
||||
password required pam_deny.so
|
||||
|
||||
# End /etc/pam.d/systemd-user
|
14
systemd.install
Normal file
14
systemd.install
Normal file
@ -0,0 +1,14 @@
|
||||
# This is a default template for a post-install scriptlet.
|
||||
# Uncomment only required functions and remove any functions
|
||||
# you don't need (and this header).
|
||||
|
||||
post_install() {
|
||||
systemd-machine-id-setup
|
||||
systemctl preset-all
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install
|
||||
systemctl daemon-reexec
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user