Currently policies.json is always overridden by the ebuilds: newins "${FILESDIR}"/disable-auto-update.policy.json policies.json On my system it currently installs to /usr/lib64/firefox/distribution/policies.json, but as an administrator, I would like to be able to customize its contents somehow, without having each update or reinstall overwrite my changes. Would it please be possible to relocate that file to /etc/ or some other CONFIG_PROTECT location? Or perhaps add /usr/lib64/firefox/distribution/policies.json to CONFIG_PROTECT? Thank you!
Sorry for the very late reply. I think we can add a variable, I_HAVE_MY_OWN_CUSTOM_POLICIES or similar, that you can add via package.env for Firefox. You'd place a file in your ${DISTDIR}/my-firefox-custom-policies.json that is used instead of ${FILESDIR}/*policy.json. DISTDIR because I'm not sure how far we can get outside the sandbox when building Firefox (/ why not Thunderbird too).
This should now be possible by upstream on 114.0 release.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=39cfe283ccf6455b9781e4ac8ac15c9cf9937ed6 commit 39cfe283ccf6455b9781e4ac8ac15c9cf9937ed6 Author: Joonas Niilola <juippis@gentoo.org> AuthorDate: 2023-06-06 19:12:21 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2023-06-06 19:15:33 +0000 www-client/firefox: add 114.0 - enable 'valgrind' use flag, - include couple upstream skia patches from the upcoming 115 release, - increase ulimit in the ebuild when using mold linker and 'lto' use flag so the build does not fail. Bug: https://bugs.gentoo.org/838373 Closes: https://bugs.gentoo.org/700934 Closes: https://bugs.gentoo.org/905780 Closes: https://bugs.gentoo.org/906509 Closes: https://bugs.gentoo.org/907485 Signed-off-by: Joonas Niilola <juippis@gentoo.org> www-client/firefox/Manifest | 101 +++ www-client/firefox/firefox-114.0.ebuild | 1445 +++++++++++++++++++++++++++++++ 2 files changed, 1546 insertions(+)
(In reply to Joonas Niilola from comment #2) > This should now be possible by upstream on 114.0 release. I was unable to find any documentation on this being possible in Firefox 114.0. Could you please also provide a reference?
https://bugzilla.mozilla.org/show_bug.cgi?id=1170092 this is the bug I had in mind, it talks about policies.json being able to be overwritten in /etc. Here's some document about it too: https://github.com/mozilla/policy-templates/blob/7021378b93af2902c2b294dcdf6005254b1c9b70/README.md "On Linux, the file goes into firefox/distribution, where firefox is the installation directory for firefox, which varies by distribution or you can specify system-wide policy by placing the file in /etc/firefox/policies."
Thank you! :)