From 0715fcdb8221dab1b431652f983d1d79bc18ba01 Mon Sep 17 00:00:00 2001 From: Aster Boese Date: Sun, 19 Jul 2026 22:44:50 +0200 Subject: [PATCH] ci: grep: always run nonfree-firmware check Changes the nonfree-firmware check to check all APKBUILDs outside of 'archived' to align better with the other checks. This is now possible now that no package uses the old nonfree-firmware logic outside of 'archived'. Signed-off-by: Aster Boese Part-of: --- .ci/grep.sh | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/.ci/grep.sh b/.ci/grep.sh index e68500983..6ee4ccd2f 100755 --- a/.ci/grep.sh +++ b/.ci/grep.sh @@ -135,6 +135,14 @@ if grep -qr '# Contributor:' --exclude-dir='docs' -- *; then exit_code=1 fi + # Disallow non-free firmware subpackages +if grep -qr 'pkgname-nonfree-firmware' --exclude-dir='archived' -- *; then + echo "ERROR: Please remove the nonfree-firmware subpackage(s) and move the firmware to depends in the following APKBUILDs." + echo "See https://docs.postmarketos.org/pmaports/main/packaging/firmware-packages.html" + grep --color=always -r 'pkgname-nonfree-firmware' --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) @@ -187,18 +195,6 @@ if [ -n "$CI_MERGE_REQUEST_DIFF_BASE_SHA" ]; then fi fi - # Disallow non-free firmware subpackages - CHANGED_APKBUILDS=$(git show --pretty="" --name-only --diff-filter=AMR "$CI_MERGE_REQUEST_DIFF_BASE_SHA"..HEAD | grep APKBUILD || true) - - if [ -n "$CHANGED_APKBUILDS" ]; then - if [ -n "$(grep -r 'pkgname-nonfree-firmware' $CHANGED_APKBUILDS || true)" ]; then - echo "ERROR: Please remove the nonfree-firmware subpackage(s) and move the firmware to depends in the following APKBUILDs." - echo "See https://docs.postmarketos.org/pmaports/main/packaging/firmware-packages.html" - grep --color=always -l 'pkgname-nonfree-firmware' $CHANGED_APKBUILDS - exit_code=1 - fi - fi - # Get latest commit message in MR case "$CI_COMMIT_DESCRIPTION" in *"[ci:skip-grep]"*)