Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 700934 - www-client/firefox allow customization of policies.json
Summary: www-client/firefox allow customization of policies.json
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement with 1 vote (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-22 13:09 UTC by Jaak Ristioja
Modified: 2023-06-07 20:25 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaak Ristioja 2019-11-22 13:09:13 UTC
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!
Comment 1 Joonas Niilola gentoo-dev 2022-09-28 12:42:15 UTC
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).
Comment 2 Joonas Niilola gentoo-dev 2023-06-06 14:11:14 UTC
This should now be possible by upstream on 114.0 release.
Comment 3 Larry the Git Cow gentoo-dev 2023-06-06 19:21:15 UTC
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(+)
Comment 4 Jaak Ristioja 2023-06-07 15:51:45 UTC
(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?
Comment 5 Joonas Niilola gentoo-dev 2023-06-07 16:24:37 UTC
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."
Comment 6 Jaak Ristioja 2023-06-07 20:25:56 UTC
Thank you! :)