diff --git a/main/openrc/0011-openrc-run-Fix-loading-of-user-configs-for-system-su.patch b/main/openrc/0011-openrc-run-Fix-loading-of-user-configs-for-system-su.patch new file mode 100644 index 0000000000000000000000000000000000000000..20f0f45134f00346fefc5766b9f1eb5000394260 --- /dev/null +++ b/main/openrc/0011-openrc-run-Fix-loading-of-user-configs-for-system-su.patch @@ -0,0 +1,56 @@ +From 028eadec44f6321652fede7fb6eae77b0131bd90 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net> +Date: Sun, 16 Mar 2025 12:32:20 +0100 +Subject: [PATCH] openrc-run: Fix loading of user configs for system-supplied + user services + +Without this patch, OpenRC loads user configuration files for +system-supplied services from `~/.config/rc/$SERVICE` instead of +`~/.config/rc/conf.d/$SERVICE`. Since the latter is documented in the +user-guide, and used for user services not supplied by the system, I +believe it to be the correct location. + +Note that the `_usr_conf_d` variable is probably a bit inappropriately +named as the similarly named `_conf_d` points to the system conf.d +directory while `_usr_conf_d` points to the base rc configuration +directory. Therefore, while at it, rename `_usr_conf_d` to `_usr_conf` +to avoid this confusion in the future. + +This is a fixup for ae9d743207f27481efe2c80593eea51cd8742ab2. +--- + sh/openrc-run.sh.in | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/sh/openrc-run.sh.in b/sh/openrc-run.sh.in +index c8e347dd..9939adf2 100644 +--- a/sh/openrc-run.sh.in ++++ b/sh/openrc-run.sh.in +@@ -234,9 +234,9 @@ if [ -d "@SYSCONFDIR@/rc.conf.d" ]; then + done + fi + +-_usr_conf_d=${XDG_CONFIG_HOME:-${HOME}/.config}/rc ++_usr_conf=${XDG_CONFIG_HOME:-${HOME}/.config}/rc + if yesno "$RC_USER_SERVICES"; then +- sourcex -e "$_usr_conf_d/rc.conf" ++ sourcex -e "$_usr_conf/rc.conf" + fi + + _conf_d=${RC_SERVICE%/*}/../conf.d +@@ -255,12 +255,12 @@ if ! sourcex -e "$_conf_d/$RC_SVCNAME.$RC_RUNLEVEL"; then + fi + unset _conf_d + +-if yesno "$RC_USER_SERVICES" && [ $_usr_conf_d != ${RC_SERVICE%/*} ]; then +- if ! sourcex -e "$_usr_conf_d/$RC_SVCNAME.$RC_RUNLEVEL"; then +- sourcex -e "$_usr_conf_d/$RC_SVCNAME" ++if yesno "$RC_USER_SERVICES" && [ "$_usr_conf/init.d" != "${RC_SERVICE%/*}" ]; then ++ if ! sourcex -e "$_usr_conf/conf.d/$RC_SVCNAME.$RC_RUNLEVEL"; then ++ sourcex -e "$_usr_conf/conf.d/$RC_SVCNAME" + fi + fi +-unset _usr_conf_d ++unset _usr_conf + + # load service supervisor functions + sourcex "@LIBEXECDIR@/sh/runit.sh" diff --git a/main/openrc/APKBUILD b/main/openrc/APKBUILD index 258df370894ae5d295376d94b51d37cf354dae9f..d5b61e7edfc764ffa097a148c37bb38baa213e5d 100644 --- a/main/openrc/APKBUILD +++ b/main/openrc/APKBUILD @@ -2,7 +2,7 @@ pkgname=openrc pkgver=0.60 _ver=${pkgver/_git*/} -pkgrel=1 +pkgrel=2 pkgdesc="OpenRC manages the services, startup and shutdown of a host" url="https://github.com/OpenRC/openrc" arch="all" @@ -34,6 +34,7 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/OpenRC/openrc/archive/$pkgve 0008-bootmisc-switch-wipe_tmp-setting-to-no-by-default.patch 0009-Based-on-the-vrf-patch-it-adds-support-to-run-servic.patch 0010-librc-fix-loading-rc.conf.patch + 0011-openrc-run-Fix-loading-of-user-configs-for-system-su.patch supervise-daemon-defaults.patch sysctl-readme.patch @@ -187,6 +188,7 @@ aa44e62392c47c5f20a66072574ae452be0c1b0c4914bb58fa35b6ecc3e2a75c7a2d6245198e30a8 475f4ea63b9b5d7eb9c623e96b6cc3d3072abcb7194d0045b84e0688836c8514fccfc68b0eae0b4bee60878cdea8042c3ce7e48406ee7a2f0e4a3e128a153468 0008-bootmisc-switch-wipe_tmp-setting-to-no-by-default.patch d7b8b1facd7fb9a6a8350912644cce3956947bcaa8bcb645f9c26a2bb0d062970efaa14bd66a7987f0748daff7b5a8e701b45b3fcca7c7c7e393ac262728f1a6 0009-Based-on-the-vrf-patch-it-adds-support-to-run-servic.patch 730d41fe9c590a68f04f20988e0c3426f20f5ece60a2f678a35cd4d20760785086c68dfc456cfbceb2d550e687ff0e19e029bbdf7cb80f6f16aa7aa208e171c1 0010-librc-fix-loading-rc.conf.patch +1fa65d7b692a5647cc2db61506f2801a874e7bebec8b4380929431e13a0b32bd76ec892ef818b0de6765a7297e75e64eccfea0a210166ee4d5b97e419a636555 0011-openrc-run-Fix-loading-of-user-configs-for-system-su.patch 86a2fb1564b8537f5dd7e06587a572ebefd110bf8bea049bc2254d4008ed3fed2296b4e9fde793ddbed7a66f70335b6c228f0b10fc0a6e7d106d3ad226fc0ba4 supervise-daemon-defaults.patch 903ff555275a67ff08da91badb55d9fa6c6a2901e8ef09ca8366bd74d69757491c8336347f04551268ecf053c8ae974f50decd869926894dd94e382008e3e925 sysctl-readme.patch 12bb6354e808fbf47bbab963de55ee7901738b4a912659982c57ef2777fff9a670e867fcb8ec316a76b151032c92dc89a950d7d1d835ef53f753a8f3b41d2cec openrc.logrotate