diff options
author | Martin Filla <freebsd@sysctl.cz> | 2023-01-19 19:52:57 +0100 |
---|---|---|
committer | Jesper Schmitz Mouridsen <jsm@FreeBSD.org> | 2023-01-21 19:34:48 +0100 |
commit | 4e77dee79c17245e0c3b4b98af5a718ed2c5eb81 (patch) | |
tree | 1af2a1c76c0c6d33307e7456f888546cf0ded567 /www/librewolf/files/patch-env-api-keys | |
parent | security/openscep: Mark DEPRECATED (diff) |
www/librewolf: New port
PR: 258503
Diffstat (limited to 'www/librewolf/files/patch-env-api-keys')
-rw-r--r-- | www/librewolf/files/patch-env-api-keys | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/www/librewolf/files/patch-env-api-keys b/www/librewolf/files/patch-env-api-keys new file mode 100644 index 000000000000..a97a99d6b54a --- /dev/null +++ b/www/librewolf/files/patch-env-api-keys @@ -0,0 +1,21 @@ +# Accept API keys from environment like before bug 1294585 + +--- build/moz.configure/keyfiles.configure ++++ build/moz.configure/keyfiles.configure +@@ -19,6 +19,7 @@ def keyfile(desc, default=None, help=None, callback=lambda x: x): + @checking("for the %s key" % desc, lambda x: x and x is not no_key) + @imports(_from="__builtin__", _import="open") + @imports(_from="__builtin__", _import="IOError") ++ @imports(_from="os", _import="environ") + def keyfile(value): + if value: + try: +@@ -29,7 +30,7 @@ def keyfile(desc, default=None, help=None, callback=lambda x: x): + raise FatalCheckError("'%s' is empty." % value[0]) + except IOError as e: + raise FatalCheckError("'%s': %s." % (value[0], e.strerror)) +- return no_key ++ return environ.get("MOZ_%s_KEY" % desc.upper().replace(" ", "_")) or no_key + + return keyfile + |