main/postmarketos-base: split openrc specifics into subpackages (MR 5364)
Co-authored-by: Clayton Craft <clayton@craftyguy.net>
This commit is contained in:
parent
3c0d991089
commit
dc81fbcd23
4 changed files with 63 additions and 29 deletions
|
@ -1,6 +1,6 @@
|
||||||
pkgname=postmarketos-base
|
pkgname=postmarketos-base
|
||||||
pkgver=32
|
pkgver=32
|
||||||
pkgrel=5
|
pkgrel=6
|
||||||
pkgdesc="Meta package for minimal postmarketOS base"
|
pkgdesc="Meta package for minimal postmarketOS base"
|
||||||
url="https://postmarketos.org"
|
url="https://postmarketos.org"
|
||||||
arch="noarch"
|
arch="noarch"
|
||||||
|
@ -24,7 +24,9 @@ triggers="$pkgname.trigger=/usr/share/deviceinfo"
|
||||||
subpackages="
|
subpackages="
|
||||||
$pkgname-mesa
|
$pkgname-mesa
|
||||||
$pkgname-nftables
|
$pkgname-nftables
|
||||||
|
$pkgname-nftables-openrc:nftables_openrc
|
||||||
$pkgname-nofde
|
$pkgname-nofde
|
||||||
|
$pkgname-openrc
|
||||||
"
|
"
|
||||||
options="!check"
|
options="!check"
|
||||||
|
|
||||||
|
@ -35,11 +37,8 @@ replaces="
|
||||||
alpine-baselayout-data
|
alpine-baselayout-data
|
||||||
alpine-release
|
alpine-release
|
||||||
busybox-initscripts
|
busybox-initscripts
|
||||||
busybox-openrc
|
|
||||||
openrc
|
|
||||||
sudo
|
sudo
|
||||||
sudo-ldap
|
sudo-ldap
|
||||||
zram-init-openrc
|
|
||||||
"
|
"
|
||||||
replaces_priority=100 # leave plenty for alpine
|
replaces_priority=100 # leave plenty for alpine
|
||||||
|
|
||||||
|
@ -112,10 +111,18 @@ mesa() {
|
||||||
nftables() {
|
nftables() {
|
||||||
install_if="$pkgname=$pkgver-r$pkgrel nftables"
|
install_if="$pkgname=$pkgver-r$pkgrel nftables"
|
||||||
depends="postmarketos-config-nftables"
|
depends="postmarketos-config-nftables"
|
||||||
install="$subpkgname.post-install"
|
|
||||||
mkdir "$subpkgdir"
|
mkdir "$subpkgdir"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nftables_openrc() {
|
||||||
|
install_if="$pkgname-openrc=$pkgver-r$pkgrel nftables"
|
||||||
|
depends="nftables-openrc"
|
||||||
|
install="$subpkgname.post-install"
|
||||||
|
|
||||||
|
mkdir -p "$subpkgdir"
|
||||||
|
}
|
||||||
|
|
||||||
nofde() {
|
nofde() {
|
||||||
# dummy package that satisfies the unlocker dependency for mkinitfs without
|
# dummy package that satisfies the unlocker dependency for mkinitfs without
|
||||||
# installing anything for systems that don't use fde
|
# installing anything for systems that don't use fde
|
||||||
|
@ -124,6 +131,30 @@ nofde() {
|
||||||
mkdir "$subpkgdir"
|
mkdir "$subpkgdir"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
openrc() {
|
||||||
|
install_if="$pkgname=$pkgver-r$pkgrel openrc"
|
||||||
|
install="$subpkgname.post-install"
|
||||||
|
replaces="
|
||||||
|
busybox-openrc
|
||||||
|
openrc
|
||||||
|
zram-init-openrc
|
||||||
|
"
|
||||||
|
depends="
|
||||||
|
eudev-openrc
|
||||||
|
logbookd-openrc
|
||||||
|
openssh-server-common-openrc
|
||||||
|
udev-init-scripts-openrc
|
||||||
|
zram-init-openrc
|
||||||
|
"
|
||||||
|
|
||||||
|
amove etc/conf.d/swapfile
|
||||||
|
amove etc/conf.d/zram-init
|
||||||
|
amove etc/conf.d/syslog
|
||||||
|
amove etc/init.d/deferred-initcalls
|
||||||
|
amove etc/init.d/swapfile
|
||||||
|
amove etc/init.d/tmpfs
|
||||||
|
}
|
||||||
|
|
||||||
sha512sums="
|
sha512sums="
|
||||||
e529f5cef1f31481b577f99b8917704f2cfefb963d98bf40a14b017938e55a00134d2033f81d2cb0b8489c5e9b4a92fdc0a788013f1adb4cd46d9580c9988186 rootfs-etc-sudoers
|
e529f5cef1f31481b577f99b8917704f2cfefb963d98bf40a14b017938e55a00134d2033f81d2cb0b8489c5e9b4a92fdc0a788013f1adb4cd46d9580c9988186 rootfs-etc-sudoers
|
||||||
9591c9cb2194fa1092505159c9eb3d899bec95b6dbd9a0222be62098db012da113a125e40d70373d60af9880dfa489bdbe12b6b897bdef5613e023800fb6ee1b rootfs-etc-doas.d-10-postmarketos.conf
|
9591c9cb2194fa1092505159c9eb3d899bec95b6dbd9a0222be62098db012da113a125e40d70373d60af9880dfa489bdbe12b6b897bdef5613e023800fb6ee1b rootfs-etc-doas.d-10-postmarketos.conf
|
||||||
|
|
27
main/postmarketos-base/postmarketos-base-openrc.post-install
Normal file
27
main/postmarketos-base/postmarketos-base-openrc.post-install
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# Enable eudev service
|
||||||
|
rc-update add udev sysinit
|
||||||
|
rc-update add udev-trigger sysinit
|
||||||
|
rc-update add udev-settle sysinit
|
||||||
|
rc-update add udev-postmount default
|
||||||
|
|
||||||
|
# Enable other OpenRC services
|
||||||
|
for service in devfs dmesg; do
|
||||||
|
rc-update -q add $service sysinit
|
||||||
|
done
|
||||||
|
for service in hwclock modules sysctl hostname bootmisc logbookd tmpfs; do
|
||||||
|
rc-update -q add $service boot
|
||||||
|
done
|
||||||
|
for service in sshd swapfile local zram-init; do
|
||||||
|
rc-update -q add $service default
|
||||||
|
done
|
||||||
|
for service in mount-ro killprocs savecache; do
|
||||||
|
rc-update -q add $service shutdown
|
||||||
|
done
|
||||||
|
|
||||||
|
# Prime swclock with a reasonable date/time on first boot
|
||||||
|
mkdir -p /run/openrc
|
||||||
|
touch /run/openrc/shutdowntime
|
||||||
|
|
||||||
|
exit 0
|
|
@ -1,29 +1,5 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
# Enable eudev service
|
|
||||||
rc-update add udev sysinit
|
|
||||||
rc-update add udev-trigger sysinit
|
|
||||||
rc-update add udev-settle sysinit
|
|
||||||
rc-update add udev-postmount default
|
|
||||||
|
|
||||||
# Enable other OpenRC services
|
|
||||||
for service in devfs dmesg; do
|
|
||||||
rc-update -q add $service sysinit
|
|
||||||
done
|
|
||||||
for service in hwclock modules sysctl hostname bootmisc logbookd tmpfs; do
|
|
||||||
rc-update -q add $service boot
|
|
||||||
done
|
|
||||||
for service in sshd swapfile local zram-init; do
|
|
||||||
rc-update -q add $service default
|
|
||||||
done
|
|
||||||
for service in mount-ro killprocs savecache; do
|
|
||||||
rc-update -q add $service shutdown
|
|
||||||
done
|
|
||||||
|
|
||||||
# Prime swclock with a reasonable date/time on first boot
|
|
||||||
mkdir -p /run/openrc
|
|
||||||
touch /run/openrc/shutdowntime
|
|
||||||
|
|
||||||
# Make apk interactive by default
|
# Make apk interactive by default
|
||||||
touch /etc/apk/interactive
|
touch /etc/apk/interactive
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue