[GH-ISSUE #3591] firejail breaks haskell development tools cabal and stack #2251

Closed
opened 2026-05-05 08:56:44 -06:00 by gitea-mirror · 4 comments
Owner

Originally created by @hyiltiz on GitHub (Aug 16, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3591

cabal and stack are like package managers for Haskell. They manage their local database for packages, which can be synced with xxx update commands, and they can install packages from online via xxx install. The Haskell community uses both tools. For a starter, it may be useful to base their .profile on something similar like pip or npm, then fine tune.

I'd give a full bug report, but profiles for them are missing and Haskell isn't even mentioned while pip gems luarocks etc. are mentioned, I'd wait until someone comes up with something. To start, maybe whitelist their database folders, give permissions to binaries that deal with project management for Haskell such as running parsers, compilers (GHC) etc., and also some network support (for Hackage and Stackage to download package from).

Originally created by @hyiltiz on GitHub (Aug 16, 2020). Original GitHub issue: https://github.com/netblue30/firejail/issues/3591 `cabal` and `stack` are like package managers for Haskell. They manage their *local database* for packages, which can be synced with `xxx update` commands, and they can install packages from *online* via `xxx install`. The Haskell community uses both tools. For a starter, it may be useful to base their `.profile` on something similar like `pip` or `npm`, then fine tune. I'd give a full bug report, but profiles for them are missing and Haskell isn't even mentioned while `pip` `gems` `luarocks` etc. are mentioned, I'd wait until someone comes up with something. To start, maybe whitelist their database folders, give permissions to binaries that deal with project management for Haskell such as running parsers, compilers (GHC) etc., and also some network support (for Hackage and Stackage to download package from).
Author
Owner

@bbhtt commented on GitHub (Aug 16, 2020):

How are you running them, neither has a profile; or is this a profile request?

<!-- gh-comment-id:674479776 --> @bbhtt commented on GitHub (Aug 16, 2020): How are you running them, neither has a profile; or is this a profile request?
Author
Owner

@hyiltiz commented on GitHub (Aug 16, 2020):

This is a profile request. When I ran stack setup or cabal install agda for example, they failed; however, when I ran /usr/bin/stack setup it would succeed... I am guessing stack was just running a /usr/local/bin/stack link with some default profile, but not sure.

<!-- gh-comment-id:674496813 --> @hyiltiz commented on GitHub (Aug 16, 2020): This is a profile request. When I ran `stack setup` or `cabal install agda` for example, they failed; however, when I ran `/usr/bin/stack setup` it would succeed... I am guessing `stack` was just running a `/usr/local/bin/stack` link with some default profile, but not sure.
Author
Owner

@bbhtt commented on GitHub (Aug 16, 2020):

which -a stack or which -a cabal? And firejail --list is it? If I'm not mistaken there's no profile for pip,npm,yarn,cabal,stack,brew,apt etc. in firejail repository.

<!-- gh-comment-id:674509921 --> @bbhtt commented on GitHub (Aug 16, 2020): `which -a stack` or `which -a cabal`? And `firejail --list` is it? If I'm not mistaken there's no profile for `pip,npm,yarn,cabal,stack,brew,apt` etc. in firejail repository.
Author
Owner

@hyiltiz commented on GitHub (Aug 16, 2020):

I have at least two binaries for each... And none seem relevant to firejail. Sorry for the trouble. Yes, there are no profiles for those, but they seem to be mentioned in disable-common.inc; I wasn't sure if that would globally disable all those stuff once firejail is installed, unless whitelisted by specific profiles.

<!-- gh-comment-id:674574213 --> @hyiltiz commented on GitHub (Aug 16, 2020): I have at least two binaries for each... And none seem relevant to firejail. Sorry for the trouble. Yes, there are no profiles for those, but they seem to be mentioned in `disable-common.inc`; I wasn't sure if that would globally disable all those stuff once firejail is installed, unless whitelisted by specific profiles.
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#2251
No description provided.