summaryrefslogtreecommitdiff
path: root/system/openrc
diff options
context:
space:
mode:
Diffstat (limited to 'system/openrc')
-rw-r--r--system/openrc/0003-sysctl-add-compatibility-for-busybox-sysctl.patch2
-rw-r--r--system/openrc/0006-mount-efivars-read-only.patch27
-rw-r--r--system/openrc/0007-make-consolefont-service-compatible-with-busyboxs-se.patch70
-rw-r--r--system/openrc/APKBUILD24
-rw-r--r--system/openrc/hwclock-grep.patch15
-rw-r--r--system/openrc/modern-gcc.patch14
-rw-r--r--system/openrc/openrc-configuration.patch13
-rw-r--r--system/openrc/openrc.post-install32
8 files changed, 55 insertions, 142 deletions
diff --git a/system/openrc/0003-sysctl-add-compatibility-for-busybox-sysctl.patch b/system/openrc/0003-sysctl-add-compatibility-for-busybox-sysctl.patch
index 3803bcca8..8280e3bad 100644
--- a/system/openrc/0003-sysctl-add-compatibility-for-busybox-sysctl.patch
+++ b/system/openrc/0003-sysctl-add-compatibility-for-busybox-sysctl.patch
@@ -1,5 +1,5 @@
From ed120780512b6dd0bfabba0ea59d06d1099924b0 Mon Sep 17 00:00:00 2001
-From: William Pitcock <nenolod@dereferenced.org>
+From: Ariadne Conill <ariadne@dereferenced.org>
Date: Wed, 1 Feb 2017 04:08:33 +0000
Subject: [PATCH 3/7] sysctl: add compatibility for busybox sysctl
diff --git a/system/openrc/0006-mount-efivars-read-only.patch b/system/openrc/0006-mount-efivars-read-only.patch
deleted file mode 100644
index ec2321dd2..000000000
--- a/system/openrc/0006-mount-efivars-read-only.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 37feb4b716525f0c5c5469f21686ab4efcf06fab Mon Sep 17 00:00:00 2001
-From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Wed, 1 Feb 2017 04:18:53 +0000
-Subject: [PATCH 6/7] mount efivars read-only
-
-unintentional writes to efivars may result in bricked hardware. mount it
-read-only to play safe.
----
- init.d/sysfs.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/init.d/sysfs.in b/init.d/sysfs.in
-index e493f584..bfd0d438 100644
---- a/init.d/sysfs.in
-+++ b/init.d/sysfs.in
-@@ -101,7 +101,7 @@ mount_misc()
- if [ -d /sys/firmware/efi/efivars ] &&
- ! mountinfo -q /sys/firmware/efi/efivars; then
- ebegin "Mounting efivarfs filesystem"
-- mount -n -t efivarfs -o ${sysfs_opts} \
-+ mount -n -t efivarfs -o ro,${sysfs_opts} \
- efivarfs /sys/firmware/efi/efivars 2> /dev/null
- eend 0
- fi
---
-2.11.1
-
diff --git a/system/openrc/0007-make-consolefont-service-compatible-with-busyboxs-se.patch b/system/openrc/0007-make-consolefont-service-compatible-with-busyboxs-se.patch
deleted file mode 100644
index 6c23e2ab0..000000000
--- a/system/openrc/0007-make-consolefont-service-compatible-with-busyboxs-se.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 3d0d2b89745597ea973129eafa3f999cf19d761f Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
-Date: Wed, 17 Aug 2016 17:52:58 +0200
-Subject: [PATCH 7/7] make consolefont service compatible with busyboxs setfont
- applet
-
-Compared to kdbs setfont program it doesn't support -O and -m.
----
- conf.d/consolefont | 11 ++---------
- init.d/consolefont.in | 7 ++-----
- 2 files changed, 4 insertions(+), 14 deletions(-)
-
-diff --git a/conf.d/consolefont b/conf.d/consolefont
-index e01ae842..75544b2f 100644
---- a/conf.d/consolefont
-+++ b/conf.d/consolefont
-@@ -3,16 +3,9 @@
- #
- # consolefont specifies the default font that you'd like Linux to use on the
- # console. You can find a good selection of fonts in /usr/share/consolefonts;
--# you shouldn't specify the trailing ".psf.gz", just the font name below.
--# To use the default console font, comment out the CONSOLEFONT setting below.
--consolefont="default8x16"
-+consolefont="default8x16.psf.gz"
-
- # consoletranslation is the charset map file to use. Leave commented to use
- # the default one. Have a look in /usr/share/consoletrans for a selection of
- # map files you can use.
--#consoletranslation="8859-1_to_uni"
--
--# unicodemap is the unicode map file to use. Leave commented to use the
--# default one. Have a look in /usr/share/unimaps for a selection of map files
--# you can use.
--#unicodemap="iso01"
-+#consoletranslation="8859-1_to_uni.trans"
-diff --git a/init.d/consolefont.in b/init.d/consolefont.in
-index 9fe95afa..173ed426 100644
---- a/init.d/consolefont.in
-+++ b/init.d/consolefont.in
-@@ -22,7 +22,6 @@ start()
- {
- ttyn=${rc_tty_number:-${RC_TTY_NUMBER:-12}}
- consolefont=${consolefont:-${CONSOLEFONT}}
-- unicodemap=${unicodemap:-${UNICODEMAP}}
- consoletranslation=${consoletranslation:-${CONSOLETRANSLATION}}
-
- if [ -z "$consolefont" ]; then
-@@ -43,9 +42,6 @@ start()
- if [ -n "$consoletranslation" ]; then
- param="$param -m $consoletranslation"
- fi
-- if [ -n "${unicodemap}" ]; then
-- param="$param -u $unicodemap"
-- fi
-
- # Set the console font
- ebegin "Setting console font [$consolefont]"
-@@ -63,7 +59,8 @@ start()
- # Store the font so we can use it ASAP on boot
- if [ $retval -eq 0 ] && checkpath -W "$RC_LIBEXECDIR"; then
- mkdir -p "$RC_LIBEXECDIR"/console
-- setfont -O "$RC_LIBEXECDIR"/console/font
-+ zcat "/usr/share/consolefonts/$consolefont" \
-+ > "$RC_LIBEXECDIR"/console/font
- fi
-
- return $retval
---
-2.11.0
-
diff --git a/system/openrc/APKBUILD b/system/openrc/APKBUILD
index 6c41d9f99..632b55452 100644
--- a/system/openrc/APKBUILD
+++ b/system/openrc/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer:
pkgname=openrc
pkgver=0.24.1
-pkgrel=8
+pkgrel=14
pkgdesc="OpenRC manages the services, startup and shutdown of a host"
url="https://github.com/OpenRC/openrc"
arch="all"
@@ -18,9 +18,9 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/OpenRC/openrc/archive/$pkgve
0003-sysctl-add-compatibility-for-busybox-sysctl.patch
0004-hide-error-when-migrating-var-run-to-run.patch
0005-rc-pull-in-sysinit-and-boot-as-stacked-levels-when-n.patch
- 0006-mount-efivars-read-only.patch
- 0007-make-consolefont-service-compatible-with-busyboxs-se.patch
+ hwclock-grep.patch
+ modern-gcc.patch
openrc-configuration.patch
openrc.logrotate
@@ -38,18 +38,15 @@ prepare() {
}
build() {
- cd "$builddir"
export BRANDING="Adélie Linux"
make LIBEXECDIR=/lib/rc MKNET=no
}
check() {
- cd "$builddir"
make check
}
package() {
- cd "$builddir"
make LIBEXECDIR=/lib/rc DESTDIR="$pkgdir/" install
# we cannot have anything turned on by default
@@ -72,8 +69,11 @@ package() {
rm "$pkgdir"/etc/conf.d/network
rm "$pkgdir"/etc/init.d/network
- # we use console-setup for keymaps
- rm "$pkgdir"/etc/init.d/keymaps
+ # we ship these in system/kbd
+ for i in consolefont keymaps; do
+ rm "$pkgdir"/etc/conf.d/$i
+ rm "$pkgdir"/etc/init.d/$i
+ done
# we use gettys-openrc for TTY
rm "$pkgdir"/etc/init.d/agetty
@@ -85,12 +85,12 @@ package() {
sha512sums="8d2aec029cb675ae5d446fe4a2f9613fac2fc5ea74b091d93e62b1f7bd4f8e3a96893bafa39a301129dad4623cc30acdcfd9e383a74f98c69f29820adb6d9aa0 openrc-0.24.1.tar.gz
71fce711adbcb411189a089f1d49567c50348e12c42b7a9c9b582dae5d18051f88ccf81c768337e87d6792d953e84d1e8b93d7978a1947d7d20ef3b1cd330875 0001-call-sbin-mkmntdirs-in-localmount-OpenRC-service.patch
aedf77f9159fefb4bd5f30a29a33b6aedbc986c9a0f993aa928cc79fbe24aac76bd9e5974dcce52ee8736c22d7e90375930d4bb5c66af3519d8e46590df00fe1 0002-force-root-be-rw-before-localmount.patch
-9dea3fcdb90e3e8078a771beefeba3ca91b9966a1b8ee9ff96cf460e7dd21abbc4a46a501a960c3edf5a76c083c2cf60ccb06d9da7a4c6df2a50660745beb278 0003-sysctl-add-compatibility-for-busybox-sysctl.patch
+5494f5ee520b26219048586882919dc0b45e839bd9543edc974f7b283d7b9326dc0362f9d2608b6acf043613399ea16c8287b854da874f49801963165e239dba 0003-sysctl-add-compatibility-for-busybox-sysctl.patch
d54630d40a2d6b10a325cb012d4efcda997a60c008ca953ce5d60059d3f267308a59dabddf93a5fc0d301aa91967137d144effbe5f574394af768ce4ebc48738 0004-hide-error-when-migrating-var-run-to-run.patch
39a35c54ec9112fe84c901ed155a711cec8e194af02d5483ee60b80743dab12391e6fdc7b3da2f86844dd4edcf53e681ff95bd4d6fa1101a89ce54dce2ddbb7c 0005-rc-pull-in-sysinit-and-boot-as-stacked-levels-when-n.patch
-7221dd2daccd8844f6f9481b7b5921abc2711c8abd1a4bb72f04db8fd8e734b817f5d0d571daea0e2e05d3bc687f75ee1d8025249996bdee0b3328e18d9da7d3 0006-mount-efivars-read-only.patch
-234c4f3cf39df3350dbea25c00b8d584794b28194f44c726767a6a16d91a26fee1b5d2dd16635f19803fc015b4e9d99c52b23128e6b815938b88365feba8cf59 0007-make-consolefont-service-compatible-with-busyboxs-se.patch
-2dde266f3176456724e4b0c40476e7061e31986b67744b4a53c71ba0d3896860b4569e3af2ea4777a9d8fe3b6282ff869666570f1daa86cdc410c0e09805c990 openrc-configuration.patch
+43355d72ad82858787e240450ae556cdd40aa9a3719545991d76719df80cc5c851c21374b339a6953f0344f1468e08e99c4da11334dc0b72647f4aa1db08558c hwclock-grep.patch
+aeb63843b69bf5dc3e513a9b0fa1c5631b509b2ecc9e127d6d5e1ac18254375a45afb6e82429d2c559e29aef70e01286b82cabbdc7c3907a5cce6cdfb32be4f9 modern-gcc.patch
+634c09a36d542a69b147a292418fa99a5d071d7a384bd2d2b30917a986cdc82ef4e96e380bc3a154cb0709c57d5308320c30fd6973972d6e6d7f8ac5b2e31bea openrc-configuration.patch
12bb6354e808fbf47bbab963de55ee7901738b4a912659982c57ef2777fff9a670e867fcb8ec316a76b151032c92dc89a950d7d1d835ef53f753a8f3b41d2cec openrc.logrotate
99b542c0903ad6874b8c308b2e0660a4fe2ff9db962dfec65325cd12c368873a2ae800d5e6d42dc4deff775e1d5c0068869eb72581f7ab16e88d5738afe1d3dd hostname.initd
c06eac7264f6cc6888563feeae5ca745aae538323077903de1b19102e4f16baa34c18b8c27af5dd5423e7670834e2261e9aa55f2b1ec8d8fdc2be105fe894d55 hwdrivers.initd
diff --git a/system/openrc/hwclock-grep.patch b/system/openrc/hwclock-grep.patch
new file mode 100644
index 000000000..2d25a486a
--- /dev/null
+++ b/system/openrc/hwclock-grep.patch
@@ -0,0 +1,15 @@
+Silence warning about pattern.
+
+Ref: https://git.adelielinux.org/adelie/packages/-/issues/1046
+
+--- openrc-0.24.1/init.d/hwclock.in.old 2017-03-14 19:58:26.000000000 -0500
++++ openrc-0.24.1/init.d/hwclock.in 2023-10-02 01:02:49.249806693 -0500
+@@ -75,7 +75,7 @@
+ {
+ if ! yesno $clock_adjfile; then
+ # Some implementations don't handle adjustments
+- if LC_ALL=C hwclock --help 2>&1 | grep -q "\-\-noadjfile"; then
++ if LC_ALL=C hwclock --help 2>&1 | grep -q "\--noadjfile"; then
+ echo --noadjfile
+ fi
+ fi
diff --git a/system/openrc/modern-gcc.patch b/system/openrc/modern-gcc.patch
new file mode 100644
index 000000000..e50029af2
--- /dev/null
+++ b/system/openrc/modern-gcc.patch
@@ -0,0 +1,14 @@
+Ensure we can build with -fno-common.
+--- openrc-0.24.1/src/rc/rc-logger.h.old 2017-03-14 19:58:26.000000000 -0500
++++ openrc-0.24.1/src/rc/rc-logger.h 2024-05-25 12:47:43.244186307 -0500
+@@ -13,8 +13,8 @@
+ #ifndef RC_LOGGER_H
+ #define RC_LOGGER_H
+
+-pid_t rc_logger_pid;
+-int rc_logger_tty;
++extern pid_t rc_logger_pid;
++extern int rc_logger_tty;
+ extern bool rc_in_logger;
+
+ void rc_logger_open(const char *runlevel);
diff --git a/system/openrc/openrc-configuration.patch b/system/openrc/openrc-configuration.patch
index ff2ce5f34..f15ba3de7 100644
--- a/system/openrc/openrc-configuration.patch
+++ b/system/openrc/openrc-configuration.patch
@@ -1,5 +1,14 @@
---- openrc-0.24.1/etc/rc.conf.original 2017-03-14 19:58:26.000000000 -0500
-+++ openrc-0.24.1/etc/rc.conf 2017-08-22 23:48:32.903169635 -0500
+--- a/etc/rc.conf
++++ b/etc/rc.conf
+@@ -13,7 +13,7 @@
+ # boot so you can choose to start specific services. Set to "NO" to disable
+ # this feature. This feature is automatically disabled if rc_parallel is
+ # set to YES.
+-#rc_interactive="YES"
++rc_interactive="YES"
+
+ # If we need to drop to a shell, you can specify it here.
+ # If not specified we use $SHELL, otherwise the one specified in /etc/passwd,
@@ -48,7 +48,7 @@
# /var/log/rc.log
# NOTE: Linux systems require the devfs service to be started before
diff --git a/system/openrc/openrc.post-install b/system/openrc/openrc.post-install
index 1057eed41..9632de2ee 100644
--- a/system/openrc/openrc.post-install
+++ b/system/openrc/openrc.post-install
@@ -1,36 +1,8 @@
#!/bin/sh
-rc_update() {
- local svc="$1"
- local level="$2"
- mkdir -p /etc/runlevels/$level
- ln -sf /etc/init.d/$svc /etc/runlevels/$level
-}
-
-if [ ! -d etc/rcS.d ] && [ ! -d etc/rcL.d ]; then
+if [ -d /etc/runlevels/sysinit ]; then
exit 0
fi
-for i in etc/rc[SL].d/*; do
- [ -L "$i" ] || continue
- oldsvc=${i##*/S[0-9][0-9]}
- # some services are renamed
- case "$oldsvc" in
- modutils) svc=modules;;
- procps) svc=sysctl;;
- bootmisc.sh) svc=bootmisc;;
- keymap) svc=keymaps;;
- rc.local) svc=local;;
- *) svc=$oldsvc;;
- esac
-
- # add the service to correct "runlevel"
- case "$svc" in
- hwclock|modules|sysctl|hostname|keymaps|syslog|bootmisc)
- rc_update $svc boot;;
- *) rc_update $svc default;;
- esac
-
- rm $i
-done
+cp -PRr /usr/share/openrc/runlevels /etc/