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.
This commit is contained in:
Kelvin M. Klann 2023-08-05 15:54:33 -03:00
parent 30f9ad908e
commit ac2bd3211d
2 changed files with 19 additions and 14 deletions

View file

@ -1,2 +1,5 @@
#!/bin/sh #!/bin/sh
tail -n +4 "$1" | sed 's/^# /#/' | LC_ALL=C sort -c -d # See ../../../src/firecfg/firecfg.config
sed -E -e '/^#$/d' -e '/^# /d' -e 's/^#([^ ])/\1/' "$1" |
LC_ALL=C sort -c -u

View file

@ -1,6 +1,8 @@
# /etc/firejail/firecfg.config - firecfg utility configuration file # /etc/firejail/firecfg.config - firecfg utility configuration file
# This is the list of programs in alphabetical order handled by firecfg utility # This is the list of programs in alphabetical order handled by firecfg utility
# #
# Note: Normal comment lines should start with `# ` and commented code lines
# should start with just `#` (no spaces).
0ad 0ad
1password 1password
2048-qt 2048-qt
@ -149,8 +151,8 @@ clamdscan
clamdtop clamdtop
clamscan clamscan
clamtk clamtk
clawsker
claws-mail claws-mail
clawsker
clementine clementine
clion clion
clion-eap clion-eap
@ -182,6 +184,7 @@ crow
cryptocat cryptocat
cvlc cvlc
cyberfox cyberfox
d-feet
daisy daisy
darktable darktable
dconf-editor dconf-editor
@ -192,7 +195,6 @@ deluge
desktopeditors desktopeditors
devhelp devhelp
dex2jar dex2jar
d-feet
dia dia
dig dig
digikam digikam
@ -271,8 +273,8 @@ flacsplt
flameshot flameshot
flashpeak-slimjet flashpeak-slimjet
flowblade flowblade
fontforge
font-manager font-manager
fontforge
fossamail fossamail
four-in-a-row four-in-a-row
fractal fractal
@ -384,12 +386,12 @@ gradio
gramps gramps
gravity-beams-and-evaporating-stars gravity-beams-and-evaporating-stars
gthumb gthumb
gtk2-youtube-viewer
gtk3-youtube-viewer
gtk-lbry-viewer gtk-lbry-viewer
gtk-pipe-viewer gtk-pipe-viewer
gtk-straw-viewer gtk-straw-viewer
gtk-youtube-viewer gtk-youtube-viewer
gtk2-youtube-viewer
gtk3-youtube-viewer
guayadeque guayadeque
gucharmap gucharmap
gummi gummi
@ -410,8 +412,8 @@ icecat
icedove icedove
iceweasel iceweasel
idea idea
ideaIC
idea.sh idea.sh
ideaIC
imagej imagej
img2txt img2txt
impressive impressive
@ -559,7 +561,6 @@ mp3wrap
mpDris2 mpDris2
mpg123 mpg123
mpg123-alsa mpg123-alsa
mpg123.bin
mpg123-id3dump mpg123-id3dump
mpg123-jack mpg123-jack
mpg123-nas mpg123-nas
@ -568,6 +569,7 @@ mpg123-oss
mpg123-portaudio mpg123-portaudio
mpg123-pulse mpg123-pulse
mpg123-strip mpg123-strip
mpg123.bin
mplayer mplayer
mpsyt mpsyt
mpv mpv
@ -636,11 +638,11 @@ onionshare-cli
onionshare-gui onionshare-gui
ooffice ooffice
ooviewdoc ooviewdoc
open-invaders
openarena openarena
openarena_ded openarena_ded
opencity opencity
openclonk openclonk
open-invaders
openmw openmw
openmw-launcher openmw-launcher
openoffice.org openoffice.org
@ -780,8 +782,8 @@ sniffnet
snox snox
soffice soffice
sol sol
soundconverter
sound-juicer sound-juicer
soundconverter
spectacle spectacle
spectral spectral
spotify spotify
@ -794,8 +796,8 @@ steam
steam-native steam-native
steam-runtime steam-runtime
stellarium stellarium
strawberry
straw-viewer straw-viewer
strawberry
strings strings
studio.sh studio.sh
subdownloader subdownloader
@ -826,7 +828,6 @@ thunderbird-beta
thunderbird-wayland thunderbird-wayland
tilp tilp
tor-browser tor-browser
torbrowser
tor-browser-ar tor-browser-ar
tor-browser-ca tor-browser-ca
tor-browser-cs tor-browser-cs
@ -848,7 +849,6 @@ tor-browser-it
tor-browser-ja tor-browser-ja
tor-browser-ka tor-browser-ka
tor-browser-ko tor-browser-ko
torbrowser-launcher
tor-browser-nb tor-browser-nb
tor-browser-nl tor-browser-nl
tor-browser-pl tor-browser-pl
@ -859,6 +859,8 @@ tor-browser-tr
tor-browser-vi tor-browser-vi
tor-browser-zh-cn tor-browser-zh-cn
tor-browser-zh-tw tor-browser-zh-tw
torbrowser
torbrowser-launcher
torcs torcs
totem totem
tracker tracker
@ -968,8 +970,8 @@ yelp
youtube youtube
youtube-dl youtube-dl
youtube-dl-gui youtube-dl-gui
youtubemusic-nativefier
youtube-viewer youtube-viewer
youtubemusic-nativefier
yt-dlp yt-dlp
ytmdesktop ytmdesktop
zaproxy zaproxy