GNOME Bugzilla – Bug 761111
cerbero: allow building without reading ~/.cerbero
Last modified: 2018-02-21 15:55:11 UTC
By default, cerbero looks for ~/.cerbero for configuration. However, when building in an isolated environment, such as on a build machine, it's desirable to have a reproducible build that is not influenced by settings outside of the cerbero git repo. The attached patch adds a command-line option -i/--isolated to not read ~/.cerbero, defaulting to False in order to preserve the current behavior when an isolated build is not needed.
Created attachment 319719 [details] [review] cerbero: allow building without reading ~/.cerbero
Comment on attachment 319719 [details] [review] cerbero: allow building without reading ~/.cerbero Maybe instead of that we could just remove the warning if ~/.cerbero is not found?
Or in general not read ~/.cerbero if -c is provided?
Not reading ~/.cerbero if -c is provided seems sensible to me, as long as we're OK with breaking people who may have been relying on both configs taking effect. If you'd like me to submit that, I'll rework and attach a new patch. I don't want to merely removing the warning, as the main intention of the patch is to get more reproducible builds by making sure ~/.cerbero won't cause different builds on different users' machines.
Let's not break the behaviour. Just remove the warning if .cerbero is not present (regardless of whether -c is being used or not). .cerbero is the "system-wide" settings, whereas -c is generally used for specific builds.
I would be happy to remove the warning. However, merely removing the warning doesn't address the case of a build machine in which you want reproducible builds that don't depend on config that happens to be in ~/.cerbero. For example, if you someone creates a ~/.cerbero file and then forgets that they did so, they will get different build behavior that someone else who does not, which can result in hard-to-debug build issues. That's why I think having a --isolated switch to explicitly ignore the environment is useful; it satisfies my use case and avoids breaking anyone who relies on ~/.cerbero.
(friendly ping)
Works fine now. Closing.