From e603f09fd61eb62736136404406d8396f17b6a5d Mon Sep 17 00:00:00 2001 From: Aster Boese Date: Sat, 6 Jun 2026 16:40:39 +0200 Subject: [PATCH] CI: grep: disallow /etc/local.d /etc/local.d/ is reserved entirely for sysadmins for usage with OpenRC. There was an effort to move this path to *-openrc subpackages in abuild!484, but it was stalled for this reason. As such, it makes the most sense to disallow all files in /etc/local.d/ in packaging. Signed-off-by: Aster Boese Part-of: --- .ci/grep.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.ci/grep.sh b/.ci/grep.sh index ff94af044..0d5e37578 100755 --- a/.ci/grep.sh +++ b/.ci/grep.sh @@ -120,6 +120,14 @@ if grep -qr '# Maintainer:' -- *; then exit_code=1 fi +# Disallow sysadmin OpenRC files +if grep -qr '/etc/local.d' --exclude-dir='archived' -- *; then + echo "ERROR: Please replace the '/etc/local.d' script with real OpenRC service files." + echo "See https://gitlab.postmarketos.org/postmarketOS/pmaports/-/work_items/4360" + grep --color=always -r '/etc/local.d' --exclude-dir='archived' -- * + exit_code=1 +fi + if [ -n "$CI_MERGE_REQUEST_DIFF_BASE_SHA" ]; then # Find all added, modified or renamed kernel APKBUILDs in main, community or testing MODIFIED_MAINLINE_KERNEL_PACKAGES=$(git show --pretty="" --name-only --diff-filter=AMR "$CI_MERGE_REQUEST_DIFF_BASE_SHA"..HEAD | grep "device/\(main\|community\|testing\)/linux-.*/APKBUILD" || true)