[PR #3961] [MERGED] etc: use ${DOCUMENTS} macro where appropriate #4966

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

📋 Pull Request Information

Original PR: https://github.com/netblue30/firejail/pull/3961
Author: @kmk3
Created: 2/8/2021
Status: Merged
Merged: 2/8/2021
Merged by: @undefined

Base: masterHead: fix-macro-usage


📝 Commits (1)

  • 5df1f27 etc: use ${DOCUMENTS} macro where appropriate

📊 Changes

2 files changed (+5 additions, -5 deletions)

View changed files

📝 etc/profile-a-l/keepassxc.profile (+3 -3)
📝 etc/profile-m-z/Mathematica.profile (+2 -2)

📄 Description

Currently, some paths are hard-coded:

$ grep -Fnr '${HOME}/Documents' etc etc-fixes
etc/profile-m-z/Mathematica.profile:19:mkdir ${HOME}/Documents/Wolfram Mathematica
etc/profile-m-z/Mathematica.profile:22:whitelist ${HOME}/Documents/Wolfram Mathematica
etc/profile-a-l/keepassxc.profile:34:# If you do so, you MUST store your database under ${HOME}/Documents/KeePassXC/foo.kdbx
etc/profile-a-l/keepassxc.profile:35:#mkdir ${HOME}/Documents/KeePassXC
etc/profile-a-l/keepassxc.profile:36:#whitelist ${HOME}/Documents/KeePassXC

Commands used to search and replace:

$ find etc etc-fixes/ -type f -exec \
  sed -i.bak -e 's|\${HOME}/Documents|${DOCUMENTS}|' '{}' +

Related to that, the (lack of) usage of ${DOWNLOADS} has been recently
fixed on commit deae31301 ("use ${DOWNLOADS} in lutris.profile
(#3955)").

With the above change, all macros other than ${DOCUMENTS} seem to be
already used appropriately:

$ grep -Fnr '${HOME}/Desktop' etc etc-fixes
$ grep -Fnr '${HOME}/Downloads' etc etc-fixes
$ grep -Fnr '${HOME}/Music' etc etc-fixes
$ grep -Fnr '${HOME}/Pictures' etc etc-fixes
$ grep -Fnr '${HOME}/Videos' etc etc-fixes

See src/firejail/macros.c for details.


🔄 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/3961 **Author:** [@kmk3](https://github.com/kmk3) **Created:** 2/8/2021 **Status:** ✅ Merged **Merged:** 2/8/2021 **Merged by:** [@undefined](undefined) **Base:** `master` ← **Head:** `fix-macro-usage` --- ### 📝 Commits (1) - [`5df1f27`](https://github.com/netblue30/firejail/commit/5df1f27c638c487dfd664ea3a0f756565e1e57bd) etc: use ${DOCUMENTS} macro where appropriate ### 📊 Changes **2 files changed** (+5 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `etc/profile-a-l/keepassxc.profile` (+3 -3) 📝 `etc/profile-m-z/Mathematica.profile` (+2 -2) </details> ### 📄 Description Currently, some paths are hard-coded: $ grep -Fnr '${HOME}/Documents' etc etc-fixes etc/profile-m-z/Mathematica.profile:19:mkdir ${HOME}/Documents/Wolfram Mathematica etc/profile-m-z/Mathematica.profile:22:whitelist ${HOME}/Documents/Wolfram Mathematica etc/profile-a-l/keepassxc.profile:34:# If you do so, you MUST store your database under ${HOME}/Documents/KeePassXC/foo.kdbx etc/profile-a-l/keepassxc.profile:35:#mkdir ${HOME}/Documents/KeePassXC etc/profile-a-l/keepassxc.profile:36:#whitelist ${HOME}/Documents/KeePassXC Commands used to search and replace: $ find etc etc-fixes/ -type f -exec \ sed -i.bak -e 's|\${HOME}/Documents|${DOCUMENTS}|' '{}' + Related to that, the (lack of) usage of ${DOWNLOADS} has been recently fixed on commit deae31301 ("use ${DOWNLOADS} in lutris.profile (#3955)"). With the above change, all macros other than ${DOCUMENTS} seem to be already used appropriately: $ grep -Fnr '${HOME}/Desktop' etc etc-fixes $ grep -Fnr '${HOME}/Downloads' etc etc-fixes $ grep -Fnr '${HOME}/Music' etc etc-fixes $ grep -Fnr '${HOME}/Pictures' etc etc-fixes $ grep -Fnr '${HOME}/Videos' etc etc-fixes See src/firejail/macros.c for details. --- <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:29:51 -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#4966
No description provided.