[PR #5987] [MERGED] profiles: standardize commented code and eol comments #5769

Closed
opened 2026-05-05 10:44:34 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netblue30/firejail/pull/5987
Author: @kmk3
Created: 9/6/2023
Status: Merged
Merged: 9/8/2023
Merged by: @kmk3

Base: masterHead: profiles-fix-eol-comments


📝 Commits (2)

  • 8e99a8c profiles: fix some comments
  • c6d3337 profiles: fix commented code and eol comments

📊 Changes

231 files changed (+555 additions, -547 deletions)

View changed files

📝 etc/inc/disable-common.inc (+7 -5)
📝 etc/profile-a-l/abiword.profile (+2 -2)
📝 etc/profile-a-l/akonadi_control.profile (+6 -6)
📝 etc/profile-a-l/akregator.profile (+1 -1)
📝 etc/profile-a-l/alacarte.profile (+1 -1)
📝 etc/profile-a-l/amarok.profile (+4 -4)
📝 etc/profile-a-l/android-studio.profile (+1 -1)
📝 etc/profile-a-l/anki.profile (+1 -1)
📝 etc/profile-a-l/arduino.profile (+1 -1)
📝 etc/profile-a-l/aria2c.profile (+1 -1)
📝 etc/profile-a-l/ark.profile (+3 -3)
📝 etc/profile-a-l/artha.profile (+1 -1)
📝 etc/profile-a-l/asunder.profile (+2 -2)
📝 etc/profile-a-l/atom.profile (+1 -1)
📝 etc/profile-a-l/atril.profile (+2 -2)
📝 etc/profile-a-l/audacious.profile (+1 -1)
📝 etc/profile-a-l/audacity.profile (+2 -2)
📝 etc/profile-a-l/audio-recorder.profile (+2 -2)
📝 etc/profile-a-l/authenticator.profile (+6 -6)
📝 etc/profile-a-l/autokey-common.profile (+1 -1)

...and 80 more files

📄 Description

Main changes:

  • Remove the space after # for commented code lines to distinguish
    them from normal comments
  • Use # instead of - for comments at the end of the line so that
    commented code lines work after being uncommented

Commands used to search and replace:

arg0="$(cat contrib/syntax/lists/profile_commands_arg0.list |
  LC_ALL=C sort -u | tr '\n' '|' | sed -e 's/|$//' -e 's/\./\\./g')"
arg1="$(cat contrib/syntax/lists/profile_commands_arg1.list |
  LC_ALL=C sort -u | tr '\n' '|' | sed -e 's/|$//' -e 's/\./\\./g')"
git ls-files -z -- etc/inc etc/profile* | xargs -0 -I '{}' \
  sh -c "printf '%s\n' \"\$(sed -E \
    -e 's/^# ($arg0)( [#-]-? .*)?\$/#\\1\\2/' \
    -e 's/^# ($arg1)( [^ ]*)?( [#-]-? .*)?\$/#\\1\\2\\3/' \
    -e 's/^# (whitelist \\$)/#\\1/' \
    -e 's/^(#[^ ].+) --? /\\1 # /' \
    '{}')\" >'{}'"

Commands used to check for leftover entries:

arg0="$(cat contrib/syntax/lists/profile_commands_arg0.list |
  LC_ALL=C sort -u | tr '\n' '|' | sed -e 's/|$//' -e 's/\./\\./g')"
arg1="$(cat contrib/syntax/lists/profile_commands_arg1.list |
  LC_ALL=C sort -u | tr '\n' '|' | sed -e 's/|$//' -e 's/\./\\./g')"
git grep -E "^# ($arg0|$arg1)( +|$)" -- etc/inc etc/profile*

See also commit 30f9ad908 ("build: improve comments in firecfg.config",
2023-08-05) / PR #5942.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netblue30/firejail/pull/5987 **Author:** [@kmk3](https://github.com/kmk3) **Created:** 9/6/2023 **Status:** ✅ Merged **Merged:** 9/8/2023 **Merged by:** [@kmk3](https://github.com/kmk3) **Base:** `master` ← **Head:** `profiles-fix-eol-comments` --- ### 📝 Commits (2) - [`8e99a8c`](https://github.com/netblue30/firejail/commit/8e99a8c2e3385fb43241426c1df390c31f5e9913) profiles: fix some comments - [`c6d3337`](https://github.com/netblue30/firejail/commit/c6d33375cc34e4e5e527ab43c219adfbc8848c62) profiles: fix commented code and eol comments ### 📊 Changes **231 files changed** (+555 additions, -547 deletions) <details> <summary>View changed files</summary> 📝 `etc/inc/disable-common.inc` (+7 -5) 📝 `etc/profile-a-l/abiword.profile` (+2 -2) 📝 `etc/profile-a-l/akonadi_control.profile` (+6 -6) 📝 `etc/profile-a-l/akregator.profile` (+1 -1) 📝 `etc/profile-a-l/alacarte.profile` (+1 -1) 📝 `etc/profile-a-l/amarok.profile` (+4 -4) 📝 `etc/profile-a-l/android-studio.profile` (+1 -1) 📝 `etc/profile-a-l/anki.profile` (+1 -1) 📝 `etc/profile-a-l/arduino.profile` (+1 -1) 📝 `etc/profile-a-l/aria2c.profile` (+1 -1) 📝 `etc/profile-a-l/ark.profile` (+3 -3) 📝 `etc/profile-a-l/artha.profile` (+1 -1) 📝 `etc/profile-a-l/asunder.profile` (+2 -2) 📝 `etc/profile-a-l/atom.profile` (+1 -1) 📝 `etc/profile-a-l/atril.profile` (+2 -2) 📝 `etc/profile-a-l/audacious.profile` (+1 -1) 📝 `etc/profile-a-l/audacity.profile` (+2 -2) 📝 `etc/profile-a-l/audio-recorder.profile` (+2 -2) 📝 `etc/profile-a-l/authenticator.profile` (+6 -6) 📝 `etc/profile-a-l/autokey-common.profile` (+1 -1) _...and 80 more files_ </details> ### 📄 Description Main changes: * Remove the space after `#` for commented code lines to distinguish them from normal comments * Use `#` instead of `-` for comments at the end of the line so that commented code lines work after being uncommented Commands used to search and replace: arg0="$(cat contrib/syntax/lists/profile_commands_arg0.list | LC_ALL=C sort -u | tr '\n' '|' | sed -e 's/|$//' -e 's/\./\\./g')" arg1="$(cat contrib/syntax/lists/profile_commands_arg1.list | LC_ALL=C sort -u | tr '\n' '|' | sed -e 's/|$//' -e 's/\./\\./g')" git ls-files -z -- etc/inc etc/profile* | xargs -0 -I '{}' \ sh -c "printf '%s\n' \"\$(sed -E \ -e 's/^# ($arg0)( [#-]-? .*)?\$/#\\1\\2/' \ -e 's/^# ($arg1)( [^ ]*)?( [#-]-? .*)?\$/#\\1\\2\\3/' \ -e 's/^# (whitelist \\$)/#\\1/' \ -e 's/^(#[^ ].+) --? /\\1 # /' \ '{}')\" >'{}'" Commands used to check for leftover entries: arg0="$(cat contrib/syntax/lists/profile_commands_arg0.list | LC_ALL=C sort -u | tr '\n' '|' | sed -e 's/|$//' -e 's/\./\\./g')" arg1="$(cat contrib/syntax/lists/profile_commands_arg1.list | LC_ALL=C sort -u | tr '\n' '|' | sed -e 's/|$//' -e 's/\./\\./g')" git grep -E "^# ($arg0|$arg1)( +|$)" -- etc/inc etc/profile* See also commit 30f9ad908 ("build: improve comments in firecfg.config", 2023-08-05) / PR #5942. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 10:44:34 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#5769
No description provided.