aboutsummaryrefslogtreecommitdiffstats
path: root/ci/check/profiles
diff options
context:
space:
mode:
authorLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2023-08-05 15:54:33 -0300
committerLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2023-08-05 17:17:15 -0300
commitac2bd3211d02587b5e5b61b1f2f931d1f9e2a0ed (patch)
tree2fb46cca6c85d61dd37520610aa976528bd77484 /ci/check/profiles
parentbuild: improve comments in firecfg.config (diff)
downloadfirejail-ac2bd3211d02587b5e5b61b1f2f931d1f9e2a0ed.tar.gz
firejail-ac2bd3211d02587b5e5b61b1f2f931d1f9e2a0ed.tar.zst
firejail-ac2bd3211d02587b5e5b61b1f2f931d1f9e2a0ed.zip
build: use ASCII sort on firecfg and check for duplicates
Currently the CI check does not consider certain special characters (such as `-`) when sorting due to `sort -d`. So remove `-d`, sort firecfg using `LC_ALL=C` and enforce that order. Also add `sort -u` to check for duplicates. This also allows the CI check to ignore normal comments (lines starting with `# `) anywhere in the file. Relates to #4643.
Diffstat (limited to 'ci/check/profiles')
-rwxr-xr-xci/check/profiles/sort-firecfg.config.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/ci/check/profiles/sort-firecfg.config.sh b/ci/check/profiles/sort-firecfg.config.sh
index 17a595350..dbfbf24f5 100755
--- a/ci/check/profiles/sort-firecfg.config.sh
+++ b/ci/check/profiles/sort-firecfg.config.sh
@@ -1,2 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2tail -n +4 "$1" | sed 's/^# /#/' | LC_ALL=C sort -c -d 2# See ../../../src/firecfg/firecfg.config
3
4sed -E -e '/^#$/d' -e '/^# /d' -e 's/^#([^ ])/\1/' "$1" |
5LC_ALL=C sort -c -u