Commit graph

10183 commits

Author SHA1 Message Date
netblue30
411ad6c892 lutris profile (#6192) 2024-12-15 09:44:46 -05:00
Kelvin M. Klann
6ba4215c02
profiles: clamav: add /etc/clamav (#6565)
See also commit 2453f0ecf ("email-common.profile: allow clamav plugin
for claws-mail", 2023-03-07) / PR #5719.
2024-12-13 18:06:33 +00:00
Kelvin M. Klann
58c3ebef15 RELNOTES: add build and profile items
Relates to #6556 #6557 #6562.
2024-12-09 10:30:38 -03:00
Kelvin M. Klann
d3848e27ee
profiles: video-players: add missing /usr/share paths (#6557)
Add missing paths for:

* lua (for mpv)
* mplayer
* mpv
* smplayer
* vlc

Apparently mpv plugins may break without the lua path; see commit
ccff014de ("fix Lua in mpv.profile", 2020-07-28) / issue #3554.

Command used to search for relevant profiles:

    $ git grep -IE -l '/\.?(s?mplayer|mpv|vlc)' -- etc

This is a follow-up to commit e4ebbfafe ("profiles: ensure allow-lua
where mpv is allowed (#6555)", 2024-11-29).
2024-12-09 12:49:24 +00:00
Kelvin M. Klann
3826645ef1
Merge pull request #6556 from kmk3/sort-py-strip-ws
build: sort.py: strip whitespace in profiles
2024-12-05 08:01:39 +00:00
Kelvin M. Klann
08e5f8161c build: sort.py: strip whitespace in commands
Currently whitespace is left as is within an entry.

In a `protocol` entry, if there is whitespace between the command and
its argument or around an item, the item in question is dropped from the
output.

Changes:

* `protocol`: Strip all whitespace in the argument
* Other commands: Strip leading/trailing whitespace around each item,
  including any extra whitespace between a command and its argument

Note: Whitespace characters inside paths are left as is, as some paths
(such as `Foo Bar` may contain spaces.

Before:

    $ printf 'private-bin a,b\nprivate-bin  a,b\nprivate-bin  b,a\nprivate-bin  C,A  B\nprotocol  unix,net\nprotocol  inet,unix\n' \
      >foo.profile
    $ ./contrib/sort.py -n foo.profile
    sort.py: checking 1 profile(s)...
    foo.profile:5:-protocol  unix,net
    foo.profile:5:+protocol
    foo.profile:6:-protocol  inet,unix
    foo.profile:6:+protocol unix

After:

    $ printf 'private-bin a,b\nprivate-bin  a,b\nprivate-bin  b,a\nprivate-bin  C,A  B\nprotocol  unix,net\nprotocol  inet,unix\n' \
      >foo.profile
    $ ./contrib/sort.py -n foo.profile
    sort.py: checking 1 profile(s)...
    foo.profile:2:-private-bin  a,b
    foo.profile:2:+private-bin a,b
    foo.profile:3:-private-bin  b,a
    foo.profile:3:+private-bin a,b
    foo.profile:4:-private-bin  C,A  B
    foo.profile:4:+private-bin A  B,C
    foo.profile:5:-protocol  unix,net
    foo.profile:5:+protocol unix
    foo.profile:6:-protocol  inet,unix
    foo.profile:6:+protocol unix,inet
2024-12-05 04:53:41 -03:00
Kelvin M. Klann
53ff8e0ad9 build: sort.py: strip trailing whitespace in all lines
Currently the output is mangled if the last item on the line contains
trailing whitespace and is moved when sorting.

So remove trailing whitespace in all lines (that is, not just in lines
containing supported commands).

Leave leading whitespace as is for now since it could potentially be
used for indentation.

Before:

    $ printf '# hello world  \nprivate-bin a,b  \nprivate-bin b,a  \nprivate-bin  a,b\n' \
      >foo.profile
    $ ./contrib/sort.py -n foo.profile | tr ' ' .
    sort.py:.checking.1.profile(s)...
    foo.profile:3:-private-bin.b,a..
    foo.profile:3:+private-bin.a..,b

After:

    $ printf '# hello world  \nprivate-bin a,b  \nprivate-bin b,a  \n' \
      >foo.profile
    $ ./contrib/sort.py -n foo.profile | tr ' ' .
    sort.py:.checking.1.profile(s)...
    foo.profile:1:-#.hello.world..
    foo.profile:1:+#.hello.world
    foo.profile:2:-private-bin.a,b..
    foo.profile:2:+private-bin.a,b
    foo.profile:3:-private-bin.b,a..
    foo.profile:3:+private-bin.a,b
2024-12-05 04:53:35 -03:00
Kelvin M. Klann
406b1cb18e build: sort.py: rename line variables
Rename `line` to `original_line` to make it less likely to accidentally
read from/write to it instead of the fixed line.

Rename `fixed_line` to `line` to make the code shorter since it is now
referenced much more often (up to 3 times in the same line of code) than
the original line.

See also commit aa17ca5fc ("sort.py: rename protocols to
original_protocols", 2022-10-17) / PR #5429.
2024-12-05 04:43:00 -03:00
Kelvin M. Klann
ced8b19dbe build: sort.py: operate mostly on fixed_line
Set `fixed_line` to `line` and only use the latter when needed.

This makes it easier to modify `fixed_line` multiple times.
2024-12-05 04:43:00 -03:00
Kelvin M. Klann
4e8253a695
build: sort.py: add -h option for help (#6562)
Print the usage if `-h` is given.

Kind of relates to #6290.
2024-12-02 10:26:21 +00:00
Kelvin M. Klann
245a0aba89 build: sort.py: format/clarify misc options usage
This amends commit a6d2119ee ("build: sort.py: support "--" and fail on
unknown option", 2024-05-13) / PR #6339.
2024-12-01 11:45:32 -03:00
dependabot[bot]
28512d16ea build(deps): bump step-security/harden-runner from 2.10.1 to 2.10.2
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.10.1 to 2.10.2.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](91182cccc0...0080882f6c)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-01 08:19:01 +00:00
dependabot[bot]
9ddba6a09e build(deps): bump github/codeql-action from 3.27.0 to 3.27.5
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.27.0 to 3.27.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](662472033e...f09c1c0a94)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-01 08:18:52 +00:00
Kelvin M. Klann
c8614b329a private-etc: add gnutls dir to @network group
This is currently only present in `private-etc` in mutt.profile, though
it may also be used by other programs that use GNU TLS.

This was added to mutt.profile on commit a8a8e33bc ("Add whitelisting to
mutt; improve geary, new profile for neomutt", 2020-12-28) / PR #3849.

Relates to #6400.
2024-11-29 19:56:14 -03:00
Kelvin M. Klann
b554b17386 RELNOTES: add profile items
Relates to #6542 #6545 #6551 #6552 #6555.
2024-11-29 03:22:48 -03:00
Kelvin M. Klann
e4ebbfafea
profiles: ensure allow-lua where mpv is allowed (#6555)
mpv crashes if luajit is blocked:

    $ firejail --quiet --noprofile \
      --include=/etc/firejail/disable-interpreters.inc /usr/bin/mpv
    /usr/bin/mpv: error while loading shared libraries: libluajit-5.1.so.2: cannot open shared object file: Permission denied

So make sure that allow-lua.inc is always included when mpv paths (such
as ~/.config/mpv) are allowed.

Environment: luajit 2.1.1727870382-1, mpv 1:0.39.0-3 on Artix Linux.

Related commits:

* db2bdaadd ("add lua support for mpv (#3243)", 2020-02-24) /
  PR #3243
* d6a6fb905 ("Allow Lua for mpv in dolphin.profile", 2020-04-18) /
  issue #3363
* f3585e539 ("fixes, closes, enhances, improvements, and so on",
  2020-11-09) /
  issue #3686
* 3ec523f11 ("profiles: anki: allow lua", 2024-11-14) /
  PR #6545
2024-11-29 06:10:46 +00:00
Kelvin M. Klann
e99d10f2b8
profiles: tesseract: disable private-tmp to fix ocrmypdf (#6552)
As reported by @kmille[1]:

The current `tesseract` profile breaks `ocrmypdf`:

    kmille@linbox:scans ocrmypdf C.pdf del.pdf
    Scanning contents     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 1/1 0:00:00
        1  Error, could not create hOCR output file: No such file or directory                             tesseract.py:253
        1  Error, could not create TXT output file: No such file or directory                              tesseract.py:253
    OCR                   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━   0% 0/1 -:--:--
    An exception occurred while executing the pipeline                                                       _common.py:294
    Traceback (most recent call last):
      File "/usr/lib/python3.12/site-packages/ocrmypdf/_pipelines/_common.py", line 259, in
    cli_exception_handler
        return fn(options, plugin_manager)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [...]
      File "/usr/lib/python3.12/pathlib.py", line 840, in stat
        return os.stat(self, follow_symlinks=follow_symlinks)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/ocrmypdf.io.0od81kk5/000001_ocr_hocr.hocr'

These are some of the commands that run in background:

    [...]
    2024/11/23 22:13:53 PID=403915 UID=0     CMD=/usr/bin/firejail /usr/bin/tesseract --list-langs
    2024/11/23 22:13:53 PID=403917 UID=0     CMD=/run/firejail/lib/fcopy /usr/bin/text2image /run/firejail/mnt/bin
    2024/11/23 22:13:53 PID=403939 UID=1000  CMD=gs -dQUIET [...] -f /tmp/ocrmypdf.io.0od81kk5/origin.pdf
    [...]
    2024/11/23 22:14:03 PID=403953 UID=0     CMD=tesseract -l eng /tmp/ocrmypdf.io.0od81kk5/000001_ocr.png [...]

Fixes #6550.

[1] https://github.com/netblue30/firejail/issues/6550#issue-2686607038

Reported-by: @kmille
Suggested-by: @kmille
2024-11-25 20:14:10 +00:00
Kelvin M. Klann
650405ebab
profiles: wget: unify wget2 into wget profile (#6551)
According to @rusty-snake[1]:

> Distributions started to replace wget with wget2 (I.e. `wget` and
> `wget2` are the same binary where one of them is a symlink to the
> other).

So move all custom entries (other than `private-bin`) from wget2.profile
into wget.profile and turn wget2.profile into more of a redirect to
wget.profile.

[1] https://github.com/netblue30/firejail/pull/6542#pullrequestreview-2426287045
2024-11-25 20:13:58 +00:00
celenityy
66a281875a
profiles: wget: allow ~/.local/share/wget (#6542)
wget appears to require access to this directory for HSTS & HPKP.

Without access to this directory, I get the following error when running
wget:

    Failed to read HSTS data
    Failed to read HPKP data
    Failed to write HSTS file

This fixes it.
2024-11-24 18:25:26 +00:00
Kelvin M. Klann
5804bb69a7 profiles: chatterino: fix include comments
Make them match the comments in profile.template.

Command used to search for potential issues:

    $ git grep -E '# Allow [A-Z][A-Za-z]+ .* \(blacklisted'

Added on commit 3af6c4068 ("Add Chatterino profile", 2022-12-24) /
PR #5556.
2024-11-19 16:23:36 -03:00
Kelvin M. Klann
d3f68587fb
Merge pull request #6545 from haplo/anki-mpv-lua
profiles: anki: fix opening, allow media & add to firecfg
2024-11-19 17:52:12 +00:00
Fidel Ramos
c45e83e609 profiles: firecfg: enable anki 2024-11-19 14:45:02 -03:00
Fidel Ramos
024f421e30 profiles: anki: allow sound
Anki needs sound access for recording and playing media.
2024-11-19 14:44:59 -03:00
Fidel Ramos
3ec523f110 profiles: anki: allow lua
Anki uses mpv to play media, which requires the lua interpreter.

Without this, anki displays this error in the console and falls back to
mplayer:

    mpv: error while loading shared libraries: libluajit-5.1.so.2: cannot open shared object file: Permission denied
    Traceback (most recent call last):
    File "/usr/lib/python3.12/site-packages/aqt/sound.py", line 854, in setup_audio
    mpvManager = MpvManager(base_folder, media_folder)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.12/site-packages/aqt/sound.py", line 408, in __init__
    super().__init__(window_id=None, debug=False)
    File "/usr/lib/python3.12/site-packages/aqt/mpv.py", line 442, in __init__
    super().__init__(*args, **kwargs)
    File "/usr/lib/python3.12/site-packages/aqt/mpv.py", line 104, in __init__
    self._start_socket()
    File "/usr/lib/python3.12/site-packages/aqt/mpv.py", line 194, in _start_socket
    raise MPVProcessError("unable to start process")
    aqt.mpv.MPVProcessError: unable to start process

    mpv too old or failed to open, reverting to mplayer
2024-11-19 14:44:40 -03:00
Kelvin M. Klann
3a03bcd513 profiles: anki: allow mpv/mplayer
Anki relies on mpv/mplayer for playing audio and video files.
2024-11-19 14:44:33 -03:00
Fidel Ramos
c974e17361 profiles: anki: add mpv/mplayer to private-bin
Without this change, Anki fails to start.

Fixes #6544.
2024-11-19 13:31:54 -03:00
Kelvin M. Klann
ffa95cce31 README: fix typo of "several"
This fixes the codespell job in CI[1]:

    $ make codespell
    Running codespell...
    ./README:1244: serveral ==> several
    make: *** [Makefile:393: codespell] Error 65

Added on commit 8e7996132 ("README file update", 2024-11-16).

[1] https://github.com/netblue30/firejail/actions/runs/11874111807/job/33089673920
2024-11-18 11:44:27 -03:00
netblue30
559e4039bc static IP map update 2024-11-16 18:36:34 -05:00
netblue30
8e7996132b README file update 2024-11-16 18:36:09 -05:00
Kelvin M. Klann
d01e1779d6 RELNOTES: improve modif item
Format and add missing PR reference.

Relates to #5378 #5957.
2024-11-08 07:40:55 -03:00
Kelvin M. Klann
a11d1536a6 RELNOTES: add profile items
Relates to #6533 #6534.
2024-11-08 07:36:54 -03:00
Kelvin M. Klann
26be7180fa
profiles: game-launchers: disable nou2f (#6534)
While gamepads apparently work fine in the Steam client itself, `nou2f`
appears to make gamepads unresponsive inside certain games while using
"Steam Input" (possibly due to `nou2f` blocking access to `/dev/hidraw*`
devices).

This issue reportedly affects at least the following games on Steam:
"Undertale", "Persona 4 Golden" and "Persona 5 Royal".

Disable nou2f to ensure that gamepads can be used.

Relates to #6523.

Reported-by: @opqriu
2024-11-08 10:34:00 +00:00
Kelvin M. Klann
096d5a2a2d
profiles: firecfg.config: disable dnsmasq (#6533)
There are multiple reports in #6121 that dnsmasq does not work when
called by libvirt:

    $ sudo virsh net-start default
    error: Failed to start network default
    error: internal error: Child process (VIR_BRIDGE_NAME=virbr0 /usr/local/bin/dnsmasq [...]) unexpected exit status 1: Error: PATH environment variable not set

Also, note that this is a server program, so it might be better to
disable it by default anyway.

Reported-by: @marek22k
2024-11-08 10:33:26 +00:00
Kelvin M. Klann
9f1d2c7ed5 RELNOTES: add docs and profile items
Relates to #3314 #6524 #6526 #6531.
2024-11-06 23:36:21 -03:00
Kelvin M. Klann
9a3dc2c0c3
keepassxc: allow access to ssh-agent socket (#6531)
Fixes #3314.

Relates to #6529.
2024-11-07 02:30:28 +00:00
Ted Robertson
d763fb73ca
docs: clarify intro and build section in README (#6524)
Make the introduction friendlier for non-kernel geeks and clarify the
build section.

Relates to #4049.
2024-11-04 18:58:24 +00:00
dependabot[bot]
4ded6b7774 build(deps): bump github/codeql-action from 3.26.10 to 3.27.0
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.10 to 3.27.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](e2b3eafc8d...662472033e)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-01 16:41:26 +00:00
dependabot[bot]
d1ffe4532a build(deps): bump actions/checkout from 4.2.0 to 4.2.2
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.0 to 4.2.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](d632683dd7...11bd71901b)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-01 16:41:18 +00:00
Ted Robertson
cf02e8dd4f
docs: fix typos of --enable-selinux configure option (#6526) 2024-10-31 18:48:37 +00:00
Kelvin M. Klann
b2be4870d1 RELNOTES: add feature items
Relates to #6435 #6514 #6515.
2024-10-25 11:23:24 -03:00
Kelvin M. Klann
040c42c54c
profiles: firefox-esr: allow /etc/firefox-esr (#6515)
This path is apparently used on Debian.

Relates to #5518 #6400 #6435.

Reported-by: @Boruch-Baum
2024-10-25 14:20:27 +00:00
celenityy
bfa00e385e
profiles: thunderbird: allow /etc/thunderbird (#6514)
This fixes access to Thunderbird system policies, which can be set
system-wide via `/etc/thunderbird/policies/policies.json`.

Users can also use this directory to set different default preferences.

Relates to #6400 #6435.
2024-10-23 21:05:58 +00:00
Foxreef
07ff98385f
profiles: steam: add ~/.config/UNDERTALE (#6503)
Whitelist ~/.config/UNDERTALE to allow the game to save.
2024-10-11 06:55:13 +00:00
Kelvin M. Klann
116f7bf833 RELNOTES: add private-etc rework feature item
And move the #6104 item into it.

Relates to #5518 #5608 #5609 #5629 #5638 #5641 #5642 #5643 #5650 #5655.
Relates to #5681 #5737 #5844 #5989 #6016 #6104 #6400.
2024-10-04 21:07:15 -03:00
Kelvin M. Klann
f2b0d91ae9 RELNOTES: add profile items
Relates to #6444 #6498 #6499.
2024-10-04 18:12:17 -03:00
Kelvin M. Klann
aa6b08ffd0
profiles: firefox-common: allow org.freedesktop.portal.Documents (#6499)
This fixes drag and drop for at least Dolphin.

Fixes #6444.

Reported-by: @Utini2000
Suggested-by: @rusty-snake
2024-10-04 21:11:04 +00:00
Kelvin M. Klann
ff2c7bd10d profiles: kube: sort dbus entries
This amends commit 7df28c1ed ("New profiles for balsa,trojita,kube
(#3603)", 2020-09-03).
2024-10-01 12:06:48 -03:00
Kelvin M. Klann
3470a3721e profiles: signal-desktop: sort dbus entries
This amends commit 047d86f46 ("Add access to D-Bus freedesktop.org
secret API", 2024-10-01) / PR #6498.
2024-10-01 11:54:42 -03:00
netblue30
c926850b5b
Merge pull request #6494 from netblue30/dependabot/github_actions/github/codeql-action-3.26.10
build(deps): bump github/codeql-action from 3.26.6 to 3.26.10
2024-10-01 10:47:32 -04:00
netblue30
0c470aa6c5
Merge pull request #6495 from netblue30/dependabot/github_actions/actions/checkout-4.2.0
build(deps): bump actions/checkout from 4.1.7 to 4.2.0
2024-10-01 10:47:14 -04:00