summaryrefslogtreecommitdiff
path: root/aports/openrc/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'aports/openrc/APKBUILD')
-rw-r--r--aports/openrc/APKBUILD124
1 files changed, 124 insertions, 0 deletions
diff --git a/aports/openrc/APKBUILD b/aports/openrc/APKBUILD
new file mode 100644
index 0000000..fd2f6de
--- /dev/null
+++ b/aports/openrc/APKBUILD
@@ -0,0 +1,124 @@
+# Maintainer: Gabor Pali <pali.gabor@gmail.com>
+pkgname=openrc
+pkgver=0.44.7
+pkgrel=5
+pkgdesc="OpenRC manages the services, startup and shutdown of a host"
+url="https://github.com/OpenRC/openrc"
+arch="all"
+license="BSD-2-Clause"
+depends="ifupdown-any"
+makedepends="bsd-compat-headers linux-headers"
+checkdepends=
+subpackages=
+install=
+source="$pkgname-$pkgver.tar.gz::https://github.com/OpenRC/openrc/archive/$pkgver.tar.gz
+
+ 0001-call-sbin-mkmntdirs-in-localmount-OpenRC-service.patch
+ 0002-fsck-don-t-add-C0-to-busybox-fsck.patch
+ 0003-rc-pull-in-sysinit-and-boot-as-stacked-levels-when-n.patch
+ 0004-make-consolefont-service-compatible-with-busyboxs-se.patch
+ 0005-Support-early-loading-of-keymap-if-kbd-is-installed.patch
+ 0006-Add-support-for-starting-services-in-a-specified-VRF.patch
+ 0007-Clean-up-staticroute-config-remove-irrelevant-parts-.patch
+ 0008-bootmisc-switch-wipe_tmp-setting-to-no-by-default.patch
+ seedrng.patch
+
+ openrc.logrotate
+ hostname.initd
+ hwdrivers.initd
+ modules.initd
+ modloop.initd
+ modloop.confd
+ sysfsconf.initd
+ firstboot.initd
+ sysctl.initd
+ machine-id.initd
+ "
+
+# secfixes:
+# 0.44.6-r1:
+# - CVE-2021-42341
+
+prepare() {
+ default_prepare
+ sed -i -e '/^sed/d' "$builddir"/pkgconfig/Makefile
+}
+
+build() {
+ export MKZSHCOMP=no
+ export MKBASHCOMP=no
+ make LIBDIR=/lib LIBEXECDIR=/lib/rc
+}
+
+package() {
+ local i j
+
+ make LIBEXECDIR=/lib/rc DESTDIR="$pkgdir/" install
+
+ # we cannot have anything turned on by default
+ rm -f "$pkgdir"/etc/runlevels/*/*
+
+ # we still use our ifup/ifdown based net config
+ rm -f "$pkgdir"/etc/conf.d/network "$pkgdir"/etc/init.d/network
+
+ # our hostname init script reads hostname from /etc/hostname
+ rm -f "$pkgdir"/etc/conf.d/hostname
+
+ # we override some of the scripts
+ for i in "$srcdir"/*.initd; do
+ j=${i##*/}
+ install -Dm755 $i "$pkgdir"/etc/init.d/${j%.initd}
+ done
+
+ # we override some of the conf.d files
+ for i in "$srcdir"/*.confd; do
+ j=${i##*/}
+ install -Dm644 $i "$pkgdir"/etc/conf.d/${j%.confd}
+ done
+
+ # we use a virtual keymaps services to allow users to set their
+ # keymaps either with the OpenRC loadkeys service provided by
+ # the kbd aport or with the loadkmap service provided by the
+ # busybox-initscripts aport.
+ rm -f "$pkgdir/etc/init.d/keymaps" \
+ "$pkgdir/etc/conf.d/keymaps"
+
+ install -Dm644 "$srcdir/$pkgname.logrotate" "$pkgdir/etc/logrotate.d/$pkgname"
+ install -d "$pkgdir"/etc/local.d "$pkgdir"/run
+
+ # openrc upstream removed service(8) for whatever reason, put it back
+ ln -s /sbin/rc-service "$pkgdir"/sbin/service
+
+ # remove deprecated /sbin/runscript to avoid conflict with minicom
+ rm "$pkgdir"/sbin/runscript
+
+ rm -rf "$pkgdir"/usr/share/man \
+ "$pkgdir"/usr/share/openrc \
+ "$pkgdir"/usr/include \
+ "$pkgdir"/usr/lib/pkgconfig \
+ "$pkgdir"/etc/sysctl.d/README \
+ "$pkgdir"/etc/local.d/README
+}
+
+sha512sums="
+c6b3e2e30615d97a5185320a140ced881bc59ba31ea8dff5d80440396166af237826de6ffc7836ec141e305c92176cd9cc3dabff7e42ac0d80e5238513fefdb7 openrc-0.44.7.tar.gz
+6085d127f7385eb86a00676a263c8613748fb0cbbf064bc908d346a1b368e226d8a3014e871d281f57d334a70ec1301269fe431e085f0e907b4f6ef8a99bf07f 0001-call-sbin-mkmntdirs-in-localmount-OpenRC-service.patch
+3f47b4f7e6c5b7fb53ff8a13470fbada67f7470e5eba71a683e6c022162c3905f560d561c3d61698e3fde367d6ae715edf76e99949f52a22a3bbf79debc33f64 0002-fsck-don-t-add-C0-to-busybox-fsck.patch
+61c72be18283108163bde4349616e55adb535bd34312ee09f90fcd85277ffe17dcef792bbf465877c0d8b1fec87a3836f714d8d849a9cf322902a89bc1256e13 0003-rc-pull-in-sysinit-and-boot-as-stacked-levels-when-n.patch
+71a743bf969110a27259405ef4b4dc4fad608b8e49039fd6afb1b1486d0f1dfccc3ef5275410fa3d6d1554ccee59c5a3424be4f2919e14453ebb709282c588a7 0004-make-consolefont-service-compatible-with-busyboxs-se.patch
+9e2ae6c8e189ceae0f3f2662d9504f796e9a6a987a26ee2e10add85746b6596eb04cc256dc532a39f711b4e1aa07f1d12a384ef45d23cab49878b887bf0a878c 0005-Support-early-loading-of-keymap-if-kbd-is-installed.patch
+8bf00b82d7fc0eb1b529ec735009f91d277141ba7e5c04e23d10bbcf36eb453f0b31d48aec45e50b5be4c14f611acc4454933f3cefdf8beab07d851328223464 0006-Add-support-for-starting-services-in-a-specified-VRF.patch
+431ac28808e684bea5511386bf5f06efe7f509f1dbe7e15ae6309563d813deae8f3edd872a0943ef8088e3cf778d7bc5ebd15a893dc4a08f4022b7a56bbafc63 0007-Clean-up-staticroute-config-remove-irrelevant-parts-.patch
+475f4ea63b9b5d7eb9c623e96b6cc3d3072abcb7194d0045b84e0688836c8514fccfc68b0eae0b4bee60878cdea8042c3ce7e48406ee7a2f0e4a3e128a153468 0008-bootmisc-switch-wipe_tmp-setting-to-no-by-default.patch
+715af2188cf4d1ed42f75b31ad718f5c533ea6f8cfc3c5df0fd7fc4240cd342dc637b7edf358c5da1e77d700618adaa7927ddaeae60698dd9f130dd64d83d8d5 seedrng.patch
+12bb6354e808fbf47bbab963de55ee7901738b4a912659982c57ef2777fff9a670e867fcb8ec316a76b151032c92dc89a950d7d1d835ef53f753a8f3b41d2cec openrc.logrotate
+493f27d588e64bb2bb542b32493ed05873f4724e8ad1751002982d7b4e07963cfb72f93603b2d678f305177cf9556d408a87b793744c6b7cd46cf9be4b744c02 hostname.initd
+c06eac7264f6cc6888563feeae5ca745aae538323077903de1b19102e4f16baa34c18b8c27af5dd5423e7670834e2261e9aa55f2b1ec8d8fdc2be105fe894d55 hwdrivers.initd
+7113c930f7f5fb5b345b115db175f8e5837e3541b3e022d5cecf1b59067ed4b40b2adea2324a008035b97d653311217ac5cf961b4d0fc8b714a8b2505883cdc6 modules.initd
+61857beb0ce1b462ff4bde595ee3808d12b1c51935e6a6bc263bf26a4adc99b434676277e270d82ed2886ceb9c82cb2a5604887bc25fef20bec223097c4d0ee4 modloop.initd
+80e43ded522e2d48b876131c7c9997debd43f3790e0985801a8c1dd60bc6e09f625b35a127bf225eb45a65eec7808a50d1c08a5e8abceafc61726211e061e0a2 modloop.confd
+d76c75c58e6f4b0801edac4e081b725ef3d50a9a8c9bbb5692bf4d0f804af7d383bf71a73d5d03ed348a89741ef0b2427eb6a7cbf5a9b9ff60a240639fa6ec88 sysfsconf.initd
+990855f875513a85c2b737685ac5bfdfa86f8dadacf00c1826a456547f99b69d4ecf1b9a09c0ce002f1df618b44b1febabe53f95a2c0cd02b504d565bccb50c8 firstboot.initd
+2d5f9f6d41b7c0a8643cfdee1ce3c399bfe4ebff54421f33ab1e74c1c4c1b96a49e54b5cd69f0339a060342e4e5a11067bbff68c39fa487919259d73e8e46ed1 sysctl.initd
+35682e1742196133b79e4a0b21fe8df039a982ba4fdd0181b1e3872f3885e40726179d4996fec83a1da11ff314d71f8910609c1c05acb3d0f9b923147e2f1d55 machine-id.initd
+"