Skip to content

Commit

Permalink
build: use ASCII sort on firecfg and check for duplicates
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kmk3 committed Aug 5, 2023
1 parent 30f9ad9 commit ac2bd32
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
5 changes: 4 additions & 1 deletion ci/check/profiles/sort-firecfg.config.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
#!/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
28 changes: 15 additions & 13 deletions src/firecfg/firecfg.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# /etc/firejail/firecfg.config - firecfg utility configuration file
# 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
1password
2048-qt
Expand Down Expand Up @@ -149,8 +151,8 @@ clamdscan
clamdtop
clamscan
clamtk
clawsker
claws-mail
clawsker
clementine
clion
clion-eap
Expand Down Expand Up @@ -182,6 +184,7 @@ crow
cryptocat
cvlc
cyberfox
d-feet
daisy
darktable
dconf-editor
Expand All @@ -192,7 +195,6 @@ deluge
desktopeditors
devhelp
dex2jar
d-feet
dia
dig
digikam
Expand Down Expand Up @@ -271,8 +273,8 @@ flacsplt
flameshot
flashpeak-slimjet
flowblade
fontforge
font-manager
fontforge
fossamail
four-in-a-row
fractal
Expand Down Expand Up @@ -384,12 +386,12 @@ gradio
gramps
gravity-beams-and-evaporating-stars
gthumb
gtk2-youtube-viewer
gtk3-youtube-viewer
gtk-lbry-viewer
gtk-pipe-viewer
gtk-straw-viewer
gtk-youtube-viewer
gtk2-youtube-viewer
gtk3-youtube-viewer
guayadeque
gucharmap
gummi
Expand All @@ -410,8 +412,8 @@ icecat
icedove
iceweasel
idea
ideaIC
idea.sh
ideaIC
imagej
img2txt
impressive
Expand Down Expand Up @@ -559,7 +561,6 @@ mp3wrap
mpDris2
mpg123
mpg123-alsa
mpg123.bin
mpg123-id3dump
mpg123-jack
mpg123-nas
Expand All @@ -568,6 +569,7 @@ mpg123-oss
mpg123-portaudio
mpg123-pulse
mpg123-strip
mpg123.bin
mplayer
mpsyt
mpv
Expand Down Expand Up @@ -636,11 +638,11 @@ onionshare-cli
onionshare-gui
ooffice
ooviewdoc
open-invaders
openarena
openarena_ded
opencity
openclonk
open-invaders
openmw
openmw-launcher
openoffice.org
Expand Down Expand Up @@ -780,8 +782,8 @@ sniffnet
snox
soffice
sol
soundconverter
sound-juicer
soundconverter
spectacle
spectral
spotify
Expand All @@ -794,8 +796,8 @@ steam
steam-native
steam-runtime
stellarium
strawberry
straw-viewer
strawberry
strings
studio.sh
subdownloader
Expand Down Expand Up @@ -826,7 +828,6 @@ thunderbird-beta
thunderbird-wayland
tilp
tor-browser
torbrowser
tor-browser-ar
tor-browser-ca
tor-browser-cs
Expand All @@ -848,7 +849,6 @@ tor-browser-it
tor-browser-ja
tor-browser-ka
tor-browser-ko
torbrowser-launcher
tor-browser-nb
tor-browser-nl
tor-browser-pl
Expand All @@ -859,6 +859,8 @@ tor-browser-tr
tor-browser-vi
tor-browser-zh-cn
tor-browser-zh-tw
torbrowser
torbrowser-launcher
torcs
totem
tracker
Expand Down Expand Up @@ -968,8 +970,8 @@ yelp
youtube
youtube-dl
youtube-dl-gui
youtubemusic-nativefier
youtube-viewer
youtubemusic-nativefier
yt-dlp
ytmdesktop
zaproxy
Expand Down

0 comments on commit ac2bd32

Please sign in to comment.