* bug#32026: IceCat locales are missing? @ 2018-07-01 20:23 Ludovic Courtès 2023-02-14 1:55 ` bug#32026: [PATCH 00/10] Add proper locale support to IceCat and Icedove Maxim Cournoyer ` (3 more replies) 0 siblings, 4 replies; 80+ messages in thread From: Ludovic Courtès @ 2018-07-01 20:23 UTC (permalink / raw) To: 32026 Hello Guix, As of e96ba83faed499b7d6fc4ed984d40a6f74d549cc, IceCat appears to lack localized message catalogs altogether. ISTR Mozilla distributes them separately. Perhaps we should package them somehow? Ludo’. ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 00/10] Add proper locale support to IceCat and Icedove 2018-07-01 20:23 bug#32026: IceCat locales are missing? Ludovic Courtès @ 2023-02-14 1:55 ` Maxim Cournoyer 2023-02-14 1:55 ` bug#32026: [PATCH 01/10] gnu: Add a 'update-mozilla-locales' helper for maintenance Maxim Cournoyer ` (9 more replies) 2023-02-16 4:36 ` bug#32026: [PATCH 01/10] gnu: Add a 'update-mozilla-locales' helper for maintenance Maxim Cournoyer ` (2 subsequent siblings) 3 siblings, 10 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-14 1:55 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer Hi, This series adds the localization data packages (language packs) for IceCat and Icedove, and have them used out of the box, per your operating system defined locale (as for normal applications that didn't try didn't reinventing the wheel!). Thanks, Maxim Cournoyer (10): gnu: Add a 'update-mozilla-locales' helper for maintenance. gnu: icedove: Compute a self-contained source. gnu: Define UPSTREAM-FIREFOX-SOURCE at the top level. gnu: icecat: Update the "ach" locale. gnu: icecat: Add a patch that makes building language packs reproducible. gnu: Add icecat-l10n and icedove-l10n. gnu: icedove: Automatically load system-provided extensions. gnu: Add language packs to icecat and icedove. gnu: icedove: Use the locale of the system. gnu: icecat: Use the locale of the system. gnu/local.mk | 1 + gnu/packages/gnuzilla.scm | 514 ++++++++++++++---- gnu/packages/patches/icecat-makeicecat.patch | 26 +- .../icecat-reproducible-langpacks.patch | 43 ++ 4 files changed, 484 insertions(+), 100 deletions(-) create mode 100644 gnu/packages/patches/icecat-reproducible-langpacks.patch base-commit: 67d2f688fb89553df53e73a4c584b1b9eb7d5c24 -- 2.39.1 ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 01/10] gnu: Add a 'update-mozilla-locales' helper for maintenance. 2023-02-14 1:55 ` bug#32026: [PATCH 00/10] Add proper locale support to IceCat and Icedove Maxim Cournoyer @ 2023-02-14 1:55 ` Maxim Cournoyer 2023-02-14 1:55 ` bug#32026: [PATCH 02/10] gnu: icedove: Compute a self-contained source Maxim Cournoyer ` (8 subsequent siblings) 9 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-14 1:55 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer * gnu/packages/gnuzilla.scm (update-mozilla-locales): New procedure. (all-mozilla-locales): Comment how to proceed to update it. --- gnu/packages/gnuzilla.scm | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 33b5744c17..7e549d93e6 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -37,6 +37,7 @@ (define-module (gnu packages gnuzilla) #:use-module ((srfi srfi-1) #:hide (zip)) + #:use-module (ice-9 format) #:use-module (ice-9 match) #:use-module (gnu packages) #:use-module ((guix licenses) #:prefix license:) @@ -91,7 +92,8 @@ (define-module (gnu packages gnuzilla) #:use-module (gnu packages xiph) #:use-module (gnu packages xdisorg) #:use-module (gnu packages readline) - #:use-module (gnu packages sqlite)) + #:use-module (gnu packages sqlite) + #:autoload (json parser) (json->scm)) (define-public mozjs (package @@ -348,6 +350,10 @@ (define-public mozjs-78 (inputs (list icu4c readline zlib)))) +\f +;;; +;;; Localization helper procedures. +;;; (define mozilla-compare-locales (origin (method hg-fetch) @@ -371,6 +377,27 @@ (define-syntax-rule (mozilla-locales (hash-string changeset locale) ...) (list (mozilla-locale locale changeset hash-string) ...)) +(define (update-mozilla-locales changesets.json) + "Output a new list of Mozilla locales, to update the ALL-MOZILLA-LOCALES +variable defined bellow. It requires guile-json to be installed." + ;; To extract the file used as argument, do: + ;; tar -xf $(./pre-inst-env guix build \ + ;; -e '(@@ (gnu packages gnuzilla) upstream-firefox-source)') \ + ;; --strip-components=3 \ + ;; --wildcards '*/browser/locales/l10n-changesets.json' + (match (call-with-input-file changesets.json json->scm) + (((lang ("revision" . revision) platforms pin) ...) + (let ((data (reverse (map (lambda (rev lang) + `(,(list->string (make-list 40 #\0)) + ,(string-take rev 12) ,lang)) + revision lang)))) + (format #t "~{~s~%~}" data) + data)))) + +;;; This list must be maintained by hand by comparing with the entries in the +;;; browser/locales/l10n-changesets.json file in the Firefox source (see the +;;; 'update-mozilla-locales' procedure above which aims to make this a bit +;;; easier). (define all-mozilla-locales (mozilla-locales ;; sha256 changeset locale -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 02/10] gnu: icedove: Compute a self-contained source. 2023-02-14 1:55 ` bug#32026: [PATCH 00/10] Add proper locale support to IceCat and Icedove Maxim Cournoyer 2023-02-14 1:55 ` bug#32026: [PATCH 01/10] gnu: Add a 'update-mozilla-locales' helper for maintenance Maxim Cournoyer @ 2023-02-14 1:55 ` Maxim Cournoyer 2023-02-14 21:32 ` Jonathan Brielmaier 2023-02-14 1:55 ` bug#32026: [PATCH 03/10] gnu: Define UPSTREAM-FIREFOX-SOURCE at the top level Maxim Cournoyer ` (7 subsequent siblings) 9 siblings, 1 reply; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-14 1:55 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer This refactoring work is to prepare for adding a icedove-l10n package, which will reuse that source. * gnu/packages/gnuzilla.scm (comm-source->locales+changset): New procedure. (thunderbird-source): Rename to... (thunderbird-comm-source): ... here. (icedove-source): New variable. (icedove) [source]: Use it. [phases]: Remove the prepare-thunderbird-sources and rename-to-icedove phases. --- gnu/packages/gnuzilla.scm | 210 +++++++++++++++++++++++++------------- 1 file changed, 140 insertions(+), 70 deletions(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 7e549d93e6..8be41c2832 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -47,6 +47,7 @@ (define-module (gnu packages gnuzilla) #:use-module (guix hg-download) #:use-module (guix gexp) #:use-module (guix store) + #:use-module (guix modules) #:use-module (guix monads) #:use-module (guix utils) #:use-module (guix build-system gnu) @@ -1129,7 +1130,7 @@ (define %icedove-version "102.7.2") ;; Provides the "comm" folder which is inserted into the icecat source. ;; Avoids the duplication of Icecat's source tarball. -(define thunderbird-source +(define thunderbird-comm-source (origin (method hg-fetch) (uri (hg-reference @@ -1140,11 +1141,148 @@ (define thunderbird-source (base32 "071q0pcfvfpzx741ly1sl8anlmzx02h17w4ylfnrkwrpaclq3p6p")))) +(define (comm-source->locales+changset source) + "Given SOURCE, a checkout of the Thunderbird 'comm' component, return the +list of languages supported as well as the currently used changeset." + (match (update-mozilla-locales + (string-append source "/mail/locales/l10n-changesets.json")) + (((_ changeset locale) ...) + (values locale (first changeset))))) + +;;; To find out which changeset to use for the comm-l10n repo, use the +;;; 'comm-source->locales+changeset' procedure on the thunderbird-comm-source +;;; checkout directory. The complete localization data will be released as a +;;; tarball starting with 102.2.8 (see: +;;; https://bugzilla.mozilla.org/show_bug.cgi?id=1810727). When this tarball +;;; is available, it should replace the complete 'l10n' directory at the root +;;; of the IceCat source, instead of only the 'calendar', chat and mail +;;; directories that it provides. +(define thunderbird-comm-l10n + (let* ((changeset "5b6788295358") + (version (git-version %icedove-version "0" changeset))) + (origin + (method hg-fetch) + (uri (hg-reference + (url "https://hg.mozilla.org/projects/comm-l10n") + (changeset changeset))) + (file-name (git-file-name "comm-l10n" version)) + (sha256 + (base32 + "1jrsmkscjjllcfawi3788vwm53wn25inbhdis5nk4vfpr7wk5ill"))))) + +(define icedove-source + (let ((name (string-append "icedove-" %icedove-version))) + (origin + (method computed-origin-method) + (file-name (string-append name ".tar.xz")) + (sha256 #f) + (uri + (delay + (with-imported-modules (source-module-closure '((guix build utils))) + #~(begin + (use-modules (guix build utils) + (sxml simple)) + + (set-path-environment-variable + "PATH" '("bin") + (list #+(canonical-package tar) + #+(canonical-package xz))) + + ;; Extract the base Icecat tarball, renaming its top-level + ;; directory. + (invoke "tar" "--transform" (string-append "s,[^/]*," #$name ",") + "-xf" #$icecat-source) + (chdir #$name) + + ;; Merge the Thunderdbird localization data. + (copy-recursively #$thunderbird-comm-l10n "l10n") + + ;; Add the Thunderbird-specific "comm" directory.. + (mkdir "comm") + (copy-recursively #$thunderbird-comm-source "comm") + (delete-file "sourcestamp.txt") + + ;; Adjust the application name. + (substitute* "comm/mail/confvars.sh" + (("MOZ_APP_NAME=thunderbird") + "MOZ_APP_NAME=icedove") + (("MOZ_UPDATER=1") + "MOZ_UPDATER=0")) + + ;; Remove branding to comply with Mozilla's trademark policy + (with-directory-excursion "comm/mail/branding/nightly" + (delete-file "content/about-wordmark.svg") + (call-with-output-file "content/about-wordmark.svg" + (lambda (port) + (sxml->xml '(svg (@ (xmlns "http://www.w3.org/2000/svg") + (viewBox "0 0 789.1 90.78") + (width "333") + (height "48") + (fill "#fff")) + (text (@ (x "400") (y "70") + (text-anchor "middle") + (font-size "90")) + "Icedove Daily")) + port))) + (substitute* '("locales/en-US/brand.properties" + "locales/en-US/brand.ftl" + "locales/en-US/brand.dtd" + "configure.sh") + (("Thunderbird") "Icedove") + (("mozilla.org") "guix.gnu.org"))) + ;; Remove other mentions of Thunderbird in user-visible text. + (with-directory-excursion "comm/mail/base/content" + (substitute* '("overrides/app-license-name.html") + (("Thunderbird") "Icedove"))) + (with-directory-excursion "comm/mail/components/" + (substitute* '("MailGlue.jsm" + "extensions/schemas/addressBook.json" + "extensions/schemas/tabs.json" + "extensions/schemas/cloudFile.json" + "extensions/schemas/chrome_settings_overrides.json" + "extensions/schemas/windows.json" + "extensions/parent/ext-mail.js" + "im/messages/mail/Info.plist" + "enterprisepolicies/moz.build" + "enterprisepolicies/helpers/moz.build" + "enterprisepolicies/schemas/moz.build") + (("Thunderbird") "Icedove"))) + (substitute* '("comm/mailnews/base/prefs/content/accountUtils.js" + "comm/mail/base/content/customizeToolbar.js" + "comm/suite/components/customizeToolbar.js") + (("AppConstants.MOZ_APP_NAME (.)= \"thunderbird" _ e) + (format #f "AppConstants.MOZ_APP_NAME ~a= \"icedove" e))) + + ;; Override addon URLs and settings + (substitute* "comm/mail/app/profile/all-thunderbird.js" + (("(pref\\(\"extensions.webservice.discoverURL\").*" _ m) + (string-append m ", \"https://directory.fsf.org/wiki/Icedove\");")) + (("(pref\\(\"extensions.getAddons.search.url\").*" _ m) + (string-append m ", \"https://guix.gnu.org/packages\");")) + (("(pref\\(\"extensions.update.enabled\").*" _ m) + (string-append m ", false);")) + (("(pref\\(\"extensions.systemAddon.update.enabled\").*" _ m) + (string-append m ", false);")) + (("(pref\\(\"lightweightThemes.update.enabled\").*" _ m) + (string-append m ", false);"))) + + ;; Step out of the directory and create the tarball. + (chdir "..") + (format #t "Packing Icedove source tarball...~%") + (force-output) + (setenv "XZ_DEFAULTS" (string-join (%xz-parallel-args))) + (invoke "tar" "cfa" #$output + "--mtime=@315619200" ;1980-01-02 UTC + "--owner=root:0" + "--group=root:0" + "--sort=name" + #$name)))))))) + (define-public icedove (package (name "icedove") (version %icedove-version) - (source icecat-source) + (source icedove-source) (properties `((cpe-name . "thunderbird_esr"))) (build-system gnu-build-system) @@ -1158,11 +1296,6 @@ (define-public icedove ,@%gnu-build-system-modules) #:phases #~(modify-phases %standard-phases - (add-after 'unpack 'prepare-thunderbird-sources - (lambda _ - (mkdir "comm") - (copy-recursively #$thunderbird-source "comm") - (delete-file "sourcestamp.txt"))) (add-after 'patch-source-shebangs 'patch-cargo-checksums (lambda _ (use-modules (guix build cargo-utils)) @@ -1192,69 +1325,6 @@ (define-public icedove (substitute* "comm/mail/moz.configure" (("MOZ_DEDICATED_PROFILES, True") "MOZ_DEDICATED_PROFILES, False")))) - (add-after 'prepare-thunderbird-sources 'rename-to-icedove - (lambda _ - (substitute* "comm/mail/confvars.sh" - (("MOZ_APP_NAME=thunderbird") - "MOZ_APP_NAME=icedove") - (("MOZ_UPDATER=1") - "MOZ_UPDATER=0")) - ;; Remove branding to comply with Mozilla's trademark policy - (with-directory-excursion "comm/mail/branding/nightly" - (delete-file "content/about-wordmark.svg") - (call-with-output-file "content/about-wordmark.svg" - (lambda (port) - (sxml->xml '(svg (@ (xmlns "http://www.w3.org/2000/svg") - (viewBox "0 0 789.1 90.78") - (width "333") - (height "48") - (fill "#fff")) - (text (@ (x "400") (y "70") - (text-anchor "middle") - (font-size "90")) - "Icedove Daily")) - port))) - (substitute* '("locales/en-US/brand.properties" - "locales/en-US/brand.ftl" - "locales/en-US/brand.dtd" - "configure.sh") - (("Thunderbird") "Icedove") - (("mozilla.org") "guix.gnu.org"))) - ;; Remove other mentions of Thunderbird in user-visible text. - (with-directory-excursion "comm/mail/base/content" - (substitute* '("overrides/app-license-name.html") - (("Thunderbird") "Icedove"))) - (with-directory-excursion "comm/mail/components/" - (substitute* '("MailGlue.jsm" - "extensions/schemas/addressBook.json" - "extensions/schemas/tabs.json" - "extensions/schemas/cloudFile.json" - "extensions/schemas/chrome_settings_overrides.json" - "extensions/schemas/windows.json" - "extensions/parent/ext-mail.js" - "im/messages/mail/Info.plist" - "enterprisepolicies/moz.build" - "enterprisepolicies/helpers/moz.build" - "enterprisepolicies/schemas/moz.build") - (("Thunderbird") "Icedove"))) - (substitute* '("comm/mailnews/base/prefs/content/accountUtils.js" - "comm/mail/base/content/customizeToolbar.js" - "comm/suite/components/customizeToolbar.js") - (("AppConstants.MOZ_APP_NAME (.)= \"thunderbird" _ e) - (format #f "AppConstants.MOZ_APP_NAME ~a= \"icedove" e))) - - ;; Override addon URLs and settings - (substitute* "comm/mail/app/profile/all-thunderbird.js" - (("(pref\\(\"extensions.webservice.discoverURL\").*" _ m) - (string-append m ", \"https://directory.fsf.org/wiki/Icedove\");")) - (("(pref\\(\"extensions.getAddons.search.url\").*" _ m) - (string-append m ", \"https://guix.gnu.org/packages\");")) - (("(pref\\(\"extensions.update.enabled\").*" _ m) - (string-append m ", false);")) - (("(pref\\(\"extensions.systemAddon.update.enabled\").*" _ m) - (string-append m ", false);")) - (("(pref\\(\"lightweightThemes.update.enabled\").*" _ m) - (string-append m ", false);"))))) (add-after 'build 'neutralize-store-references (lambda _ ;; Mangle the store references to compilers & other build tools in -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 02/10] gnu: icedove: Compute a self-contained source. 2023-02-14 1:55 ` bug#32026: [PATCH 02/10] gnu: icedove: Compute a self-contained source Maxim Cournoyer @ 2023-02-14 21:32 ` Jonathan Brielmaier 2023-02-16 0:55 ` Maxim Cournoyer 0 siblings, 1 reply; 80+ messages in thread From: Jonathan Brielmaier @ 2023-02-14 21:32 UTC (permalink / raw) To: Maxim Cournoyer, 32026; +Cc: mhw, ludo On 14.02.23 02:55, Maxim Cournoyer wrote: > +;;; To find out which changeset to use for the comm-l10n repo, use the > +;;; 'comm-source->locales+changeset' procedure on the thunderbird-comm-source > +;;; checkout directory. The complete localization data will be released as a > +;;; tarball starting with 102.2.8 (see: > +;;; https://bugzilla.mozilla.org/show_bug.cgi?id=1810727). When this tarball Version 102.8.0 is it called. ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 02/10] gnu: icedove: Compute a self-contained source. 2023-02-14 21:32 ` Jonathan Brielmaier @ 2023-02-16 0:55 ` Maxim Cournoyer 0 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-16 0:55 UTC (permalink / raw) To: Jonathan Brielmaier; +Cc: mhw, 32026, ludo Hello, Jonathan Brielmaier <jonathan.brielmaier@web.de> writes: > On 14.02.23 02:55, Maxim Cournoyer wrote: >> +;;; To find out which changeset to use for the comm-l10n repo, use the >> +;;; 'comm-source->locales+changeset' procedure on the thunderbird-comm-source >> +;;; checkout directory. The complete localization data will be released as a >> +;;; tarball starting with 102.2.8 (see: >> +;;; https://bugzilla.mozilla.org/show_bug.cgi?id=1810727). When this tarball > > Version 102.8.0 is it called. Thanks. I've reworded the comment. -- Thanks, Maxim ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 03/10] gnu: Define UPSTREAM-FIREFOX-SOURCE at the top level. 2023-02-14 1:55 ` bug#32026: [PATCH 00/10] Add proper locale support to IceCat and Icedove Maxim Cournoyer 2023-02-14 1:55 ` bug#32026: [PATCH 01/10] gnu: Add a 'update-mozilla-locales' helper for maintenance Maxim Cournoyer 2023-02-14 1:55 ` bug#32026: [PATCH 02/10] gnu: icedove: Compute a self-contained source Maxim Cournoyer @ 2023-02-14 1:55 ` Maxim Cournoyer 2023-02-14 1:55 ` bug#32026: [PATCH 04/10] gnu: icecat: Update the "ach" locale Maxim Cournoyer ` (6 subsequent siblings) 9 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-14 1:55 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer * gnu/packages/gnuzilla.scm (%icecat-base-version): New variable. (%upstream-firefox-version): Likewise. (%icecat-version): Define in terms of %icecat-base-version. (upstream-firefox-source): New variable. (icecat-source): Adjust to use the above newly introduced variables. --- gnu/packages/gnuzilla.scm | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 8be41c2832..8f18c50dde 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -505,31 +505,29 @@ (define all-mozilla-locales ;; XXXX: Workaround 'snippet' limitations. (define computed-origin-method (@@ (guix packages) computed-origin-method)) -(define %icecat-version "102.7.0-guix0-preview1") +(define %icecat-base-version "102.7.0") +(define %upstream-firefox-version (string-append %icecat-base-version "esr")) +(define %icecat-version (string-append %icecat-base-version "-guix0-preview1")) (define %icecat-build-id "20230117000000") ;must be of the form YYYYMMDDhhmmss +(define upstream-firefox-source + (origin + (method url-fetch) + (uri (string-append + "https://ftp.mozilla.org/pub/firefox/releases/" + %upstream-firefox-version "/source/" + "firefox-" %upstream-firefox-version ".source.tar.xz")) + (sha256 + (base32 + "1ahl66x8chnsz80capqa5ivyrqhc50s91zrcgz1jxd7w2ws61957")))) + ;; 'icecat-source' is a "computed" origin that generates an IceCat tarball ;; from the corresponding upstream Firefox ESR tarball, using the 'makeicecat' ;; script from the upstream IceCat project. (define icecat-source - (let* ((base-version (first (string-split %icecat-version #\-))) - - (major-version (first (string-split base-version #\.))) - (minor-version (second (string-split base-version #\.))) - (sub-version (third (string-split base-version #\.))) - - (upstream-firefox-version (string-append base-version "esr")) - (upstream-firefox-source - (origin - (method url-fetch) - (uri (string-append - "https://ftp.mozilla.org/pub/firefox/releases/" - upstream-firefox-version "/source/" - "firefox-" upstream-firefox-version ".source.tar.xz")) - (sha256 - (base32 - "1ahl66x8chnsz80capqa5ivyrqhc50s91zrcgz1jxd7w2ws61957")))) - + (let* ((major-version (first (string-split %icecat-base-version #\.))) + (minor-version (second (string-split %icecat-base-version #\.))) + (sub-version (third (string-split %icecat-base-version #\.))) (upstream-icecat-base-version "102.7.0") ; maybe older than base-version ;;(gnuzilla-commit (string-append "v" upstream-icecat-base-version)) (gnuzilla-commit "7f76da3cfd5d04fa38d894f6ea6ac5f2fd0ea837") @@ -562,7 +560,7 @@ (define icecat-source #~(begin (use-modules (guix build utils)) (let ((firefox-dir - (string-append "firefox-" #$base-version)) + (string-append "firefox-" #$%icecat-base-version)) (icecat-dir (string-append "icecat-" #$%icecat-version))) -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 04/10] gnu: icecat: Update the "ach" locale. 2023-02-14 1:55 ` bug#32026: [PATCH 00/10] Add proper locale support to IceCat and Icedove Maxim Cournoyer ` (2 preceding siblings ...) 2023-02-14 1:55 ` bug#32026: [PATCH 03/10] gnu: Define UPSTREAM-FIREFOX-SOURCE at the top level Maxim Cournoyer @ 2023-02-14 1:55 ` Maxim Cournoyer 2023-02-15 6:39 ` Mark H Weaver 2023-02-14 1:55 ` bug#32026: [PATCH 05/10] gnu: icecat: Add a patch that makes building language packs reproducible Maxim Cournoyer ` (5 subsequent siblings) 9 siblings, 1 reply; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-14 1:55 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer The currently captured changeset didn't match what the manifest in the source specifies. This was discovered by running 'update-mozilla-locales'. * gnu/packages/gnuzilla.scm (all-mozilla-locales) [ach]: Update revision and hash. --- gnu/packages/gnuzilla.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 8f18c50dde..28cb16554d 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -403,7 +403,7 @@ (define all-mozilla-locales (mozilla-locales ;; sha256 changeset locale ;;--------------------------------------------------------------------------- - ("1y562h0dg33vhhhwfk6jl7xbr67gng21vcf3rpm96zzcgbnf8rjj" "503a7baec899" "ach") + ("1s59ihmj8x6z0ssq4xav689jb5azrpdnay8csgjm1b9pw7wmvcli" "a6940ae1a02f" "ach") ("1cqixlk9f8p63jz20wzsvnfb7xa82ba725gzdydlwz2axgp09c26" "4e2c7d1ddbed" "af") ("19r1yhmfxqasyslc8gr9as5w1scscz1xr8iqy9zi4b90fdjzs0ac" "06897e40a7ea" "an") ("0nfknb1p03j9fgmkwlm1mzdyh10g0l33x34ab39kc072apziyv0n" "9272819b09e2" "ar") -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 04/10] gnu: icecat: Update the "ach" locale. 2023-02-14 1:55 ` bug#32026: [PATCH 04/10] gnu: icecat: Update the "ach" locale Maxim Cournoyer @ 2023-02-15 6:39 ` Mark H Weaver 0 siblings, 0 replies; 80+ messages in thread From: Mark H Weaver @ 2023-02-15 6:39 UTC (permalink / raw) To: Maxim Cournoyer, 32026; +Cc: ludo, Jonathan Brielmaier, Maxim Cournoyer Hi Maxim, Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: > The currently captured changeset didn't match what the manifest in the source > specifies. This was discovered by running 'update-mozilla-locales'. > > * gnu/packages/gnuzilla.scm (all-mozilla-locales) [ach]: Update revision and > hash. I took the liberty of pushing this commit, with a slightly modified commit log, to the 'master' branch, together with the IceCat 102.8.0 update. It's commit c44149de9702743b866e5bae2e0773c31d9bc29d. Thank you! Mark ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 05/10] gnu: icecat: Add a patch that makes building language packs reproducible. 2023-02-14 1:55 ` bug#32026: [PATCH 00/10] Add proper locale support to IceCat and Icedove Maxim Cournoyer ` (3 preceding siblings ...) 2023-02-14 1:55 ` bug#32026: [PATCH 04/10] gnu: icecat: Update the "ach" locale Maxim Cournoyer @ 2023-02-14 1:55 ` Maxim Cournoyer 2023-02-14 7:58 ` Mark H Weaver 2023-02-14 1:55 ` bug#32026: [PATCH 06/10] gnu: Add icecat-l10n and icedove-l10n Maxim Cournoyer ` (4 subsequent siblings) 9 siblings, 1 reply; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-14 1:55 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer * gnu/packages/patches/icecat-reproducible-langpacks.patch: New file. * gnu/local.mk (dist_patch_DATA): Register. it. * gnu/packages/gnuzilla.scm (icecat-source): Apply it. --- gnu/local.mk | 1 + gnu/packages/gnuzilla.scm | 1 + .../icecat-reproducible-langpacks.patch | 43 +++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 gnu/packages/patches/icecat-reproducible-langpacks.patch diff --git a/gnu/local.mk b/gnu/local.mk index cdb99813d0..96787661ac 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1327,6 +1327,7 @@ dist_patch_DATA = \ %D%/packages/patches/i7z-gcc-10.patch \ %D%/packages/patches/icecat-makeicecat.patch \ %D%/packages/patches/icecat-avoid-bundled-libraries.patch \ + %D%/packages/patches/icecat-reproducible-langpacks.patch \ %D%/packages/patches/icecat-use-system-graphite2+harfbuzz.patch \ %D%/packages/patches/icecat-use-system-media-libs.patch \ %D%/packages/patches/icedtea-7-hotspot-aarch64-use-c++98.patch\ diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 28cb16554d..db7ca5ceb2 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -554,6 +554,7 @@ (define icecat-source (method computed-origin-method) (file-name (string-append "icecat-" %icecat-version ".tar.xz")) (sha256 #f) + (patches (search-patches "icecat-reproducible-langpacks.patch")) (uri (delay (with-imported-modules '((guix build utils)) diff --git a/gnu/packages/patches/icecat-reproducible-langpacks.patch b/gnu/packages/patches/icecat-reproducible-langpacks.patch new file mode 100644 index 0000000000..376345d085 --- /dev/null +++ b/gnu/packages/patches/icecat-reproducible-langpacks.patch @@ -0,0 +1,43 @@ +Prevent the extension manifests from embedding the current date. + +This is inspired by the Debian +"Use-build-id-as-langpack-version-for-reproducibility.patch" maintained for +their Firefox package as well as reproducible-builds.org guidelines from +https://reproducible-builds.org/docs/source-date-epoch/. + +--- ./python/mozbuild/mozbuild/action/langpack_manifest.py.old 2023-02-13 11:01:21.051537347 -0500 ++++ ./python/mozbuild/mozbuild/action/langpack_manifest.py 2023-02-13 11:04:33.141817330 -0500 +@@ -36,6 +36,15 @@ + pushlog_api_url = "{0}/json-rev/{1}" + + ++import os ++import time ++import datetime ++ ++def get_build_date(): ++ """Honor SOURCE_DATE_EPOCH for reproducibility.""" ++ return datetime.datetime.utcfromtimestamp( ++ int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))) ++ + ### + # Retrievers a UTC datetime of the push for the current commit + # from a mercurial clone directory. +@@ -54,7 +63,7 @@ + with mozversioncontrol.get_repository_object(path=path) as repo: + phase = repo._run("log", "-r", ".", "-T" "{phase}") + if phase.strip() != "public": +- return datetime.datetime.utcnow() ++ return get_build_date() + repo_url = repo._run("paths", "default") + repo_url = repo_url.strip().replace("ssh://", "https://") + repo_url = repo_url.replace("hg://", "https://") +@@ -105,7 +114,7 @@ + dt = get_dt_from_hg(path) + + if dt is None: +- dt = datetime.datetime.utcnow() ++ dt = get_build_date() + + dt = dt.replace(microsecond=0) + return dt.strftime("%Y%m%d%H%M%S") -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 05/10] gnu: icecat: Add a patch that makes building language packs reproducible. 2023-02-14 1:55 ` bug#32026: [PATCH 05/10] gnu: icecat: Add a patch that makes building language packs reproducible Maxim Cournoyer @ 2023-02-14 7:58 ` Mark H Weaver 2023-02-14 13:58 ` Maxim Cournoyer 0 siblings, 1 reply; 80+ messages in thread From: Mark H Weaver @ 2023-02-14 7:58 UTC (permalink / raw) To: Maxim Cournoyer, 32026; +Cc: ludo, Jonathan Brielmaier, Maxim Cournoyer Hi Maxim, Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: > * gnu/packages/patches/icecat-reproducible-langpacks.patch: New file. > * gnu/local.mk (dist_patch_DATA): Register. it. > * gnu/packages/gnuzilla.scm (icecat-source): Apply it. Let's make this change in upstream IceCat instead of in Guix. What do you think? Thanks, Mark ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 05/10] gnu: icecat: Add a patch that makes building language packs reproducible. 2023-02-14 7:58 ` Mark H Weaver @ 2023-02-14 13:58 ` Maxim Cournoyer 2023-02-14 21:06 ` Mark H Weaver 0 siblings, 1 reply; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-14 13:58 UTC (permalink / raw) To: Mark H Weaver; +Cc: 32026, ludo, Jonathan Brielmaier Hi Mark, Mark H Weaver <mhw@netris.org> writes: > Hi Maxim, > > Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: > >> * gnu/packages/patches/icecat-reproducible-langpacks.patch: New file. >> * gnu/local.mk (dist_patch_DATA): Register. it. >> * gnu/packages/gnuzilla.scm (icecat-source): Apply it. > > Let's make this change in upstream IceCat instead of in Guix. > What do you think? Or in Firefox upstream itself? I can check if they think it'd be reasonable to apply it there. -- Thanks, Maxim ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 05/10] gnu: icecat: Add a patch that makes building language packs reproducible. 2023-02-14 13:58 ` Maxim Cournoyer @ 2023-02-14 21:06 ` Mark H Weaver 2023-02-15 21:32 ` Maxim Cournoyer 0 siblings, 1 reply; 80+ messages in thread From: Mark H Weaver @ 2023-02-14 21:06 UTC (permalink / raw) To: Maxim Cournoyer; +Cc: 32026, ludo, Jonathan Brielmaier Hi Maxim, Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: > Mark H Weaver <mhw@netris.org> writes: > >> Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: >> >>> * gnu/packages/patches/icecat-reproducible-langpacks.patch: New file. >>> * gnu/local.mk (dist_patch_DATA): Register. it. >>> * gnu/packages/gnuzilla.scm (icecat-source): Apply it. >> >> Let's make this change in upstream IceCat instead of in Guix. >> What do you think? > > Or in Firefox upstream itself? I can check if they think it'd be > reasonable to apply it there. Sure, that would be even better. If they don't apply it to the ESR branch immediately, I can include the patch in upstream IceCat in the meantime. Thanks, Mark ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 05/10] gnu: icecat: Add a patch that makes building language packs reproducible. 2023-02-14 21:06 ` Mark H Weaver @ 2023-02-15 21:32 ` Maxim Cournoyer 0 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-15 21:32 UTC (permalink / raw) To: Mark H Weaver; +Cc: 32026, ludo, Jonathan Brielmaier Hello, Mark H Weaver <mhw@netris.org> writes: > Hi Maxim, > > Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: > >> Mark H Weaver <mhw@netris.org> writes: >> >>> Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: >>> >>>> * gnu/packages/patches/icecat-reproducible-langpacks.patch: New file. >>>> * gnu/local.mk (dist_patch_DATA): Register. it. >>>> * gnu/packages/gnuzilla.scm (icecat-source): Apply it. >>> >>> Let's make this change in upstream IceCat instead of in Guix. >>> What do you think? >> >> Or in Firefox upstream itself? I can check if they think it'd be >> reasonable to apply it there. > > Sure, that would be even better. If they don't apply it to the ESR > branch immediately, I can include the patch in upstream IceCat in the > meantime. Done: https://phabricator.services.mozilla.com/D169979 -- Thanks, Maxim ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 06/10] gnu: Add icecat-l10n and icedove-l10n. 2023-02-14 1:55 ` bug#32026: [PATCH 00/10] Add proper locale support to IceCat and Icedove Maxim Cournoyer ` (4 preceding siblings ...) 2023-02-14 1:55 ` bug#32026: [PATCH 05/10] gnu: icecat: Add a patch that makes building language packs reproducible Maxim Cournoyer @ 2023-02-14 1:55 ` Maxim Cournoyer 2023-02-14 1:55 ` bug#32026: [PATCH 07/10] gnu: icedove: Automatically load system-provided extensions Maxim Cournoyer ` (3 subsequent siblings) 9 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-14 1:55 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer * gnu/packages/gnuzilla.scm (%icecat-locales, %icedove-locales): New variable. (make-l10n-package): New procedure. (icecat-l10n, icedove-l10n): New variables. --- gnu/packages/gnuzilla.scm | 146 +++++++++++++++++++++++++++++++++++++- 1 file changed, 145 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index db7ca5ceb2..d7c4d6013c 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -17,7 +17,7 @@ ;;; Copyright © 2020, 2022 Marius Bakke <marius@gnu.org> ;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re> ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be> -;;; Copyright © 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2021 Baptiste Strazzul <bstrazzull@hotmail.fr> ;;; ;;; This file is part of GNU Guix. @@ -1124,6 +1124,16 @@ (define (runpaths-of-input label) (cpe-name . "firefox_esr") (cpe-version . ,(first (string-split version #\-))))))) +(define %icecat-locales + '("ach" "af" "an" "ar" "ast" "az" "be" "bg" "bn" "br" "bs" "ca" "cak" + "ca-valencia" "cs" "cy" "da" "de" "dsb" "el" "en-CA" "en-GB" "eo" "es-AR" + "es-CL" "es-ES" "es-MX" "et" "eu" "fa" "ff" "fi" "fr" "fy-NL" "ga-IE" "gd" + "gl" "gn" "gu-IN" "he" "hi-IN" "hr" "hsb" "hu" "hy-AM" "ia" "id" "is" "it" + "ja" "ja-JP-mac" "ka" "kab" "kk" "km" "kn" "ko" "lij" "lt" "lv" "mk" "mr" "ms" + "my" "nb-NO" "ne-NP" "nl" "nn-NO" "oc" "pa-IN" "pl" "pt-BR" "pt-PT" "rm" "ro" + "ru" "sco" "si" "sk" "sl" "son" "sq" "sr" "sv-SE" "szl" "ta" "te" "th" "tl" + "tr" "trs" "uk" "ur" "uz" "vi" "xh" "zh-CN" "zh-TW")) + (define %icedove-build-id "20230207000000") ;must be of the form YYYYMMDDhhmmss (define %icedove-version "102.7.2") @@ -1148,6 +1158,15 @@ (define (comm-source->locales+changset source) (((_ changeset locale) ...) (values locale (first changeset))))) +;;; Generated with comm-source->locales+changeset. +(define %icedove-locales + '("af" "ar" "ast" "be" "bg" "br" "ca" "cak" "cs" "cy" "da" "de" "dsb" "el" + "en-CA" "en-GB" "es-AR" "es-ES" "es-MX" "et" "eu" "fi" "fr" "fy-NL" "ga-IE" + "gd" "gl" "he" "hr" "hsb" "hu" "hy-AM" "id" "is" "it" "ja" "ja-JP-mac" "ka" + "kab" "kk" "ko" "lt" "lv" "ms" "nb-NO" "nl" "nn-NO" "pa-IN" "pl" "pt-BR" + "pt-PT" "rm" "ro" "ru" "sk" "sl" "sq" "sr" "sv-SE" "th" "tr" "uk" "uz" "vi" + "zh-CN" "zh-TW")) + ;;; To find out which changeset to use for the comm-l10n repo, use the ;;; 'comm-source->locales+changeset' procedure on the thunderbird-comm-source ;;; checkout directory. The complete localization data will be released as a @@ -1556,6 +1575,131 @@ (define-public icedove/wayland (native-inputs '()) (inputs '()))) +(define (make-l10n-package project) + "Return a package for PROJECT, a symbol (either icecat or icedove). +It assumes the %PROJECT-VERSION, PROJECT-SOURCE and %PROJECT-LOCALES variables +already exist." + (unless (member project '(icecat icedove)) + (error "only icecat or icedove components are currently supported")) + + (let ((name (if (eq? 'icecat project) + "IceCat" + "Icedove"))) + + (package + (name (format #f "~a-l10n" project)) + (version (module-ref (current-module) + (symbol-append '% project '-version))) + (source (module-ref (current-module) + (symbol-append project '-source))) + (outputs (cons "out" (module-ref (current-module) + (symbol-append '% project '-locales)))) + (build-system gnu-build-system) + (arguments + (list + #:modules '((guix build gnu-build-system) + (guix build utils) + (ice-9 format) + (ice-9 ftw) + (srfi srfi-1) + (srfi srfi-26)) + #:tests? #f ;no tests, this is data + #:phases + #~(modify-phases %standard-phases + (delete 'bootstrap) + (delete 'install) + (replace 'configure + (lambda _ + ;; The following configuration is inspired by guidance at + ;; https://firefox-source-docs.mozilla.org/build/buildsystem/locales.html. + (call-with-output-file ".mozconfig" + (lambda (p) + (format p "~{~a~%~}" + (list (if (eq? 'icecat '#$project) + "ac_add_options --enable-project=browser" + "ac_add_options --enable-project=comm/mail") + "ac_add_options --disable-compile-environment" + (string-append + "ac_add_options --with-l10n-base=" + (getcwd) "/l10n") + ;; Hack, otherwise the build system throws: + ;; 'RuntimeError: File "brand.dtd" not found'. + "ac_add_options --enable-official-branding" + "mk_add_options MOZ_OBJDIR=obj")))) + (setenv "CONFIG_SHELL" (which "bash")) + (setenv "MOZBUILD_STATE_PATH" + (string-append (getcwd) "/mach_state")) + (setenv "MOZCONFIG" (string-append (getcwd) "/.mozconfig")) + (setenv "MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE" "system") + (setenv "BUILD_BACKENDS" "FasterMake,RecursiveMake"))) + (replace 'build ;build and install data files + (lambda* (#:key outputs #:allow-other-keys) + (define (find-file dir name) + (let ((files (find-files dir name))) + (when (null? files) + (error "could not find file in dir" name dir)) + (car files))) + + (for-each + (lambda (l) + (let* ((out (assoc-ref outputs l)) + ;; The older lib/$project/distribution/extensions + ;; directory is deprecated. Use the newer app-global + ;; directory, which is lib/$project/extensions. + (ext-dir-prefix + (format + #f "lib/~a/~:[~;browser/~]extensions" + '#$project (eq? 'icecat '#$project))) + (all-ext (string-append #$output "/" ext-dir-prefix)) + (ext-dir (string-append out "/" ext-dir-prefix)) + ;; XXX: Because Icedove doesn't have a makeicedove + ;; script that substitutes all the Thunderbird + ;; references to Icedove, the MOZ_LANGPACK_EID + ;; defined in comm/mail/locales/Makefile.in uses + ;; 'thunderbird' in its ID extension rather than + ;; 'icedove'. + (name (format #f "langpack-~a@~a.mozilla.org.xpi" + l (if (eq? 'icedove '#$project) + 'thunderbird + '#$project)))) + (format #t "processing locale `~a'...~%" l) + (if (eq? 'icecat '#$project) + ;; XXX: For some reasons, for IceCat, there are some + ;; parsing errors that cause the build system to + ;; return an unclean exit code; use system* to ignore + ;; errors. + (system* "./mach" "build" (string-append "langpack-" l)) + (invoke "./mach" "build" (string-append "langpack-" l))) + (mkdir-p ext-dir) + (let ((xpi (find-file "obj" (string-append + "\\." l "\\.langpack\\.xpi$")))) + (copy-file xpi (string-append ext-dir "/" name)) + ;; Symlink to the main output so that a user can + ;; install all of the language packs at once. + (mkdir-p all-ext) + (symlink (string-append ext-dir "/" name) + (string-append all-ext "/" name))))) + (if (eq? 'icedove '#$project) + '#$%icedove-locales + '#$%icecat-locales))))))) + (native-inputs + (list m4 + perl + python-wrapper + node + unzip)) + (home-page "https://www.mozilla.org/") + (synopsis (string-append "Language localization data for " name)) + (description (string-append "This package contains the various language +localization data files (language pack extensions) for " name ". The +individual localization packages can be installed by using the output +associated with their name.")) + (license license:mpl2.0)))) + +(define-public icecat-l10n (make-l10n-package 'icecat)) + +(define-public icedove-l10n (make-l10n-package 'icedove)) + (define-public firefox-decrypt (package (name "firefox-decrypt") -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 07/10] gnu: icedove: Automatically load system-provided extensions. 2023-02-14 1:55 ` bug#32026: [PATCH 00/10] Add proper locale support to IceCat and Icedove Maxim Cournoyer ` (5 preceding siblings ...) 2023-02-14 1:55 ` bug#32026: [PATCH 06/10] gnu: Add icecat-l10n and icedove-l10n Maxim Cournoyer @ 2023-02-14 1:55 ` Maxim Cournoyer 2023-02-14 1:55 ` bug#32026: [PATCH 08/10] gnu: Add language packs to icecat and icedove Maxim Cournoyer ` (2 subsequent siblings) 9 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-14 1:55 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer * gnu/packages/gnuzilla.scm (icedove-source): Set the extensions.autoDisableScopes preference value to 3. (icedove-minimal) [phases]: Add the --allow-addon-sideload and --with-unsigned-addon-scopes=app,system ac options to the configure phase. --- gnu/packages/gnuzilla.scm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index d7c4d6013c..2c83323c64 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -1282,7 +1282,15 @@ (define icedove-source (("(pref\\(\"extensions.systemAddon.update.enabled\").*" _ m) (string-append m ", false);")) (("(pref\\(\"lightweightThemes.update.enabled\").*" _ m) - (string-append m ", false);"))) + (string-append m ", false);")) + + ;; XXX: The autoDisableScopes is tweaked by the makeicecat + ;; script, but it doesn't know about Thunderbird. This is + ;; necessary to allow picking up the extensions found in the + ;; system global application directory, such as the language + ;; packs. + (("\"extensions.autoDisableScopes\", 15") + "\"extensions.autoDisableScopes\", 3")) ;; Step out of the directory and create the tarball. (chdir "..") @@ -1395,6 +1403,8 @@ (define-public icedove (lambda () (display (string-append + "ac_add_options --allow-addon-sideload\n" + "ac_add_options --with-unsigned-addon-scopes=app,system\n" "ac_add_options --disable-crashreporter\n" "ac_add_options --disable-debug\n" "ac_add_options --disable-debug-symbols\n" -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 08/10] gnu: Add language packs to icecat and icedove. 2023-02-14 1:55 ` bug#32026: [PATCH 00/10] Add proper locale support to IceCat and Icedove Maxim Cournoyer ` (6 preceding siblings ...) 2023-02-14 1:55 ` bug#32026: [PATCH 07/10] gnu: icedove: Automatically load system-provided extensions Maxim Cournoyer @ 2023-02-14 1:55 ` Maxim Cournoyer 2023-02-14 1:55 ` bug#32026: [PATCH 09/10] gnu: icedove: Use the locale of the system Maxim Cournoyer 2023-02-14 1:55 ` bug#32026: [PATCH 10/10] gnu: icecat: " Maxim Cournoyer 9 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-14 1:55 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer Fixes <https://issues.guix.gnu.org/32026>. * gnu/packages/gnuzilla.scm (icecat): Rename to... (icecat-minimal): ... this. (icedove: Rename to... (icedove-minimal): ... this. (make-mozilla-with-l10n): New procedure. (icecat, icedove): New variables. --- gnu/packages/gnuzilla.scm | 135 ++++++++++++++++++++++++++++---------- 1 file changed, 100 insertions(+), 35 deletions(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 2c83323c64..05f96c9622 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -680,9 +680,9 @@ (define icecat-source "--sort=name" icecat-dir))))))))) -(define-public icecat +(define-public icecat-minimal (package - (name "icecat") + (name "icecat-minimal") (version %icecat-version) (source icecat-source) (build-system gnu-build-system) @@ -1304,9 +1304,9 @@ (define icedove-source "--sort=name" #$name)))))))) -(define-public icedove +(define-public icedove-minimal (package - (name "icedove") + (name "icedove-minimal") (version %icedove-version) (source icedove-source) (properties @@ -1556,35 +1556,6 @@ (define-public icedove Thunderbird. It supports email, news feeds, chat, calendar and contacts.") (license license:mpl2.0))) -(define-public icedove/wayland - (package - (inherit icedove) - (name "icedove-wayland") - (build-system trivial-build-system) - (arguments - (list - #:modules '((guix build utils)) - #:builder - #~(begin - (use-modules (guix build utils)) - (let* ((exe (string-append #$output "/bin/icedove"))) - (mkdir-p (dirname exe)) - (call-with-output-file exe - (lambda (port) - (format port "#!~a - MOZ_ENABLE_WAYLAND=1 exec ~a $@" - #$(file-append bash-minimal "/bin/bash") - #$(file-append icedove "/bin/icedove")))) - (chmod exe #o555) - ;; Provide the manual and .desktop file. - (copy-recursively (string-append #$icedove "/share") - (string-append #$output "/share")) - (substitute* (string-append #$output - "/share/applications/icedove.desktop") - ((#$icedove) #$output)))))) - (native-inputs '()) - (inputs '()))) - (define (make-l10n-package project) "Return a package for PROJECT, a symbol (either icecat or icedove). It assumes the %PROJECT-VERSION, PROJECT-SOURCE and %PROJECT-LOCALES variables @@ -1706,9 +1677,103 @@ (define (find-file dir name) associated with their name.")) (license license:mpl2.0)))) -(define-public icecat-l10n (make-l10n-package 'icecat)) +(define icecat-l10n (make-l10n-package 'icecat)) + +(define icedove-l10n (make-l10n-package 'icedove)) + +;;; This hack exists because there's no way to configure extra extension +;;; search paths for IceCat or Icedove. The global extensions directory is +;;; constructed relatively to the executable file name. +(define (make-mozilla-with-l10n project) + (let ((base (module-ref (current-module) + (symbol-append project '-minimal))) + (l10n-package (module-ref (current-module) + (symbol-append project '-l10n))) + (name (symbol->string project)) + (icecat? (eq? 'icecat project))) + (package + (inherit base) + (name (symbol->string project)) + (build-system trivial-build-system) + (arguments + (list + #:modules '((guix build union) + (guix build utils)) + #:builder + #~(begin + (use-modules (guix build union) + (guix build utils)) + + (union-build #$output (list #$base #$l10n-package) + #:create-all-directories? #t) + + (define* (expose name #:optional (proc copy-file) + #:key (source #$base)) + (let ((dest (string-append #$output "/" name))) + (mkdir-p (dirname dest)) + (proc (string-append source "/" name) dest))) + + (let ((wrapper (string-append "lib/" #$name "/" #$name)) + (real-binary (string-append "lib/" #$name "/." #$name + "-real")) + (desktop-file (string-append "share/applications/" + #$name ".desktop"))) + ;; Copy wrapper file. + (delete-file (string-append #$output "/" wrapper)) + (expose wrapper) + + ;; Recreate bin symlink. + (delete-file (string-append #$output "/bin/" #$name)) + (symlink (string-append #$output "/" wrapper) + (string-append #$output "/bin/" #$name)) + + ;; Copy actual binary. + (delete-file (string-append #$output "/" real-binary)) + (expose real-binary) + + ;; Copy desktop file. + (delete-file (string-append #$output "/" desktop-file)) + (expose desktop-file) + + ;; Adjust the references in the desktop file and wrapper. + (substitute* (list (string-append #$output "/" desktop-file) + (string-append #$output "/" wrapper)) + ((#$base) #$output)))))) + (native-inputs '()) + (inputs '())))) + +(define-public icecat (make-mozilla-with-l10n 'icecat)) + +(define-public icedove (make-mozilla-with-l10n 'icedove)) -(define-public icedove-l10n (make-l10n-package 'icedove)) +(define-public icedove/wayland + (package + (inherit icedove) + (name "icedove-wayland") + (build-system trivial-build-system) + (arguments + (list + #:modules '((guix build utils)) + #:builder + #~(begin + (use-modules (guix build utils)) + (let* ((exe (string-append #$output "/bin/icedove"))) + (mkdir-p (dirname exe)) + (call-with-output-file exe + (lambda (port) + (format port "#!~a + MOZ_ENABLE_WAYLAND=1 exec ~a $@" + #$(file-append bash-minimal "/bin/bash") + #$(file-append icedove "/bin/icedove")))) + (chmod exe #o555) + ;; Provide the manual and .desktop file. + (copy-recursively (string-append #$icedove "/share") + (string-append #$output "/share")) + (substitute* (string-append #$output + "/share/applications/icedove.desktop") + ((#$icedove) #$output)))))) + (native-inputs '()) + (inputs '()))) (define-public firefox-decrypt (package -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 09/10] gnu: icedove: Use the locale of the system. 2023-02-14 1:55 ` bug#32026: [PATCH 00/10] Add proper locale support to IceCat and Icedove Maxim Cournoyer ` (7 preceding siblings ...) 2023-02-14 1:55 ` bug#32026: [PATCH 08/10] gnu: Add language packs to icecat and icedove Maxim Cournoyer @ 2023-02-14 1:55 ` Maxim Cournoyer 2023-02-14 1:55 ` bug#32026: [PATCH 10/10] gnu: icecat: " Maxim Cournoyer 9 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-14 1:55 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer * gnu/packages/gnuzilla.scm (icedove-source): Set the intl.locale.requested option to the empty string. --- gnu/packages/gnuzilla.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 05f96c9622..f2ae8f72a9 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -1290,7 +1290,12 @@ (define icedove-source ;; system global application directory, such as the language ;; packs. (("\"extensions.autoDisableScopes\", 15") - "\"extensions.autoDisableScopes\", 3")) + "\"extensions.autoDisableScopes\", 3") + + ;; Set the default locale to that of the operating system. + ((".*extensions.autoDisableScopes.*" anchor) + (string-append anchor + "pref(\"intl.locale.requested\", \"\");\n"))) ;; Step out of the directory and create the tarball. (chdir "..") -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 10/10] gnu: icecat: Use the locale of the system. 2023-02-14 1:55 ` bug#32026: [PATCH 00/10] Add proper locale support to IceCat and Icedove Maxim Cournoyer ` (8 preceding siblings ...) 2023-02-14 1:55 ` bug#32026: [PATCH 09/10] gnu: icedove: Use the locale of the system Maxim Cournoyer @ 2023-02-14 1:55 ` Maxim Cournoyer 2023-02-14 9:23 ` Mark H Weaver 9 siblings, 1 reply; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-14 1:55 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Maxim Cournoyer * gnu/packages/patches/icecat-makeicecat.patch: Set the intl.locale.requested option to the empty string. --- gnu/packages/patches/icecat-makeicecat.patch | 26 +++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/gnu/packages/patches/icecat-makeicecat.patch b/gnu/packages/patches/icecat-makeicecat.patch index c46cb27ff6..bc179726b1 100644 --- a/gnu/packages/patches/icecat-makeicecat.patch +++ b/gnu/packages/patches/icecat-makeicecat.patch @@ -2,8 +2,28 @@ Make some of the changes needed to the 'makeicecat' script, to allow it to run in a snippet without network access. After this patch is applied, some additional changes will be made using 'substitute*'. +The settings.js hunk below has been submitted upstream (see: +https://issues.guix.gnu.org/61495). + +diff --git a/data/settings.js b/data/settings.js +index 0fe5956..0bb2af1 100644 +--- a/data/settings.js ++++ b/data/settings.js +@@ -30,8 +30,10 @@ pref("privacy.firstparty.isolate", true); + + // Extensions cannot be updated without permission + pref("extensions.update.enabled", false); +-// Use LANG environment variable to choose locale +-pref("intl.locale.matchOS", true); ++ ++// Set the default locale to that of the operating system. ++pref("intl.locale.requested", ""); ++ + // Allow unsigned langpacks + pref("extensions.langpacks.signatures.required", false); + // Disable default browser checking. diff --git a/makeicecat b/makeicecat -index bf2b7a6..bc3b19b 100755 +index 63eb2f0..f7d3ccd 100755 --- a/makeicecat +++ b/makeicecat @@ -58,7 +58,7 @@ readonly SOURCEDIR=icecat-${FFVERSION} @@ -15,8 +35,8 @@ index bf2b7a6..bc3b19b 100755 ############################################################################### -@@ -459,7 +459,7 @@ configure_search() - sed 's|ddg@|ddg-html@|' -i browser/components/search/extensions/ddg-html/manifest.json +@@ -473,7 +473,7 @@ configure_search() + # Process various JSON pre-configuration dumps. - python3 ../../tools/process-json-files.py . browser/components/extensions/schemas/ -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 10/10] gnu: icecat: Use the locale of the system. 2023-02-14 1:55 ` bug#32026: [PATCH 10/10] gnu: icecat: " Maxim Cournoyer @ 2023-02-14 9:23 ` Mark H Weaver 2023-02-14 14:00 ` Maxim Cournoyer 0 siblings, 1 reply; 80+ messages in thread From: Mark H Weaver @ 2023-02-14 9:23 UTC (permalink / raw) To: Maxim Cournoyer, 32026; +Cc: ludo, Maxim Cournoyer Hi Maxim, Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: > * gnu/packages/patches/icecat-makeicecat.patch: Set the intl.locale.requested > option to the empty string. Let's fix this in upstream IceCat. I see that you've already posted a proposed patch to bug-gnuzilla. I'll followup there. Thanks! Mark ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 10/10] gnu: icecat: Use the locale of the system. 2023-02-14 9:23 ` Mark H Weaver @ 2023-02-14 14:00 ` Maxim Cournoyer 0 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-14 14:00 UTC (permalink / raw) To: Mark H Weaver; +Cc: 32026, ludo Hi Mark, Mark H Weaver <mhw@netris.org> writes: > Hi Maxim, > > Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: >> * gnu/packages/patches/icecat-makeicecat.patch: Set the intl.locale.requested >> option to the empty string. > > Let's fix this in upstream IceCat. I see that you've already posted a > proposed patch to bug-gnuzilla. I'll followup there. Yes, the one I sent is the exact same, but applied to the gnuzilla tree instead. So this one is temporary until it appears upstream :-). -- Thanks, Maxim ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 01/10] gnu: Add a 'update-mozilla-locales' helper for maintenance. 2018-07-01 20:23 bug#32026: IceCat locales are missing? Ludovic Courtès 2023-02-14 1:55 ` bug#32026: [PATCH 00/10] Add proper locale support to IceCat and Icedove Maxim Cournoyer @ 2023-02-16 4:36 ` Maxim Cournoyer 2023-02-16 4:36 ` bug#32026: [PATCH 02/10] gnu: icedove: Compute a self-contained source Maxim Cournoyer ` (9 more replies) 2023-02-17 12:55 ` bug#32026: [PATCH v3 01/11] " Maxim Cournoyer 2023-02-19 19:23 ` bug#32026: [PATCH v4 1/9] gnu: Add a 'update-mozilla-locales' helper for maintenance Maxim Cournoyer 3 siblings, 10 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-16 4:36 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer * gnu/packages/gnuzilla.scm (update-mozilla-locales): New procedure. (all-mozilla-locales): Comment how to proceed to update it. --- (no changes since v1) gnu/packages/gnuzilla.scm | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index b2e0870fea..2011555d47 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -37,6 +37,7 @@ (define-module (gnu packages gnuzilla) #:use-module ((srfi srfi-1) #:hide (zip)) + #:use-module (ice-9 format) #:use-module (ice-9 match) #:use-module (gnu packages) #:use-module ((guix licenses) #:prefix license:) @@ -91,7 +92,8 @@ (define-module (gnu packages gnuzilla) #:use-module (gnu packages xiph) #:use-module (gnu packages xdisorg) #:use-module (gnu packages readline) - #:use-module (gnu packages sqlite)) + #:use-module (gnu packages sqlite) + #:autoload (json parser) (json->scm)) (define-public mozjs (package @@ -348,6 +350,10 @@ (define-public mozjs-78 (inputs (list icu4c readline zlib)))) +\f +;;; +;;; Localization helper procedures. +;;; (define mozilla-compare-locales (origin (method hg-fetch) @@ -371,6 +377,27 @@ (define-syntax-rule (mozilla-locales (hash-string changeset locale) ...) (list (mozilla-locale locale changeset hash-string) ...)) +(define (update-mozilla-locales changesets.json) + "Output a new list of Mozilla locales, to update the ALL-MOZILLA-LOCALES +variable defined bellow. It requires guile-json to be installed." + ;; To extract the file used as argument, do: + ;; tar -xf $(./pre-inst-env guix build \ + ;; -e '(@@ (gnu packages gnuzilla) upstream-firefox-source)') \ + ;; --strip-components=3 \ + ;; --wildcards '*/browser/locales/l10n-changesets.json' + (match (call-with-input-file changesets.json json->scm) + (((lang ("revision" . revision) platforms pin) ...) + (let ((data (reverse (map (lambda (rev lang) + `(,(list->string (make-list 40 #\0)) + ,(string-take rev 12) ,lang)) + revision lang)))) + (format #t "~{~s~%~}" data) + data)))) + +;;; This list must be maintained by hand by comparing with the entries in the +;;; browser/locales/l10n-changesets.json file in the Firefox source (see the +;;; 'update-mozilla-locales' procedure above which aims to make this a bit +;;; easier). (define all-mozilla-locales (mozilla-locales ;; sha256 changeset locale base-commit: 47439697aeed1d8788e7fc4c02ef1c610e0b4151 -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 02/10] gnu: icedove: Compute a self-contained source. 2023-02-16 4:36 ` bug#32026: [PATCH 01/10] gnu: Add a 'update-mozilla-locales' helper for maintenance Maxim Cournoyer @ 2023-02-16 4:36 ` Maxim Cournoyer 2023-02-16 4:36 ` bug#32026: [PATCH 03/10] gnu: Define UPSTREAM-FIREFOX-SOURCE at the top level Maxim Cournoyer ` (8 subsequent siblings) 9 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-16 4:36 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer This refactoring work is to prepare for adding a icedove-l10n package, which will reuse that source. * gnu/packages/gnuzilla.scm (comm-source->locales+changset): New procedure. (thunderbird-source): Rename to... (thunderbird-comm-source): ... here. (icedove-source): New variable. (icedove) [source]: Use it. [phases]: Remove the prepare-thunderbird-sources and rename-to-icedove phases. --- Changes in v2: - Fix typo in comm-source->locales+changset - Reword comment gnu/packages/gnuzilla.scm | 210 +++++++++++++++++++++++++------------- 1 file changed, 140 insertions(+), 70 deletions(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 2011555d47..1ed52c68e9 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -47,6 +47,7 @@ (define-module (gnu packages gnuzilla) #:use-module (guix hg-download) #:use-module (guix gexp) #:use-module (guix store) + #:use-module (guix modules) #:use-module (guix monads) #:use-module (guix utils) #:use-module (guix build-system gnu) @@ -1128,7 +1129,7 @@ (define %icedove-version "102.7.2") ;; Provides the "comm" folder which is inserted into the icecat source. ;; Avoids the duplication of Icecat's source tarball. -(define thunderbird-source +(define thunderbird-comm-source (origin (method hg-fetch) (uri (hg-reference @@ -1139,11 +1140,148 @@ (define thunderbird-source (base32 "071q0pcfvfpzx741ly1sl8anlmzx02h17w4ylfnrkwrpaclq3p6p")))) +(define (comm-source->locales+changeset source) + "Given SOURCE, a checkout of the Thunderbird 'comm' component, return the +list of languages supported as well as the currently used changeset." + (match (update-mozilla-locales + (string-append source "/mail/locales/l10n-changesets.json")) + (((_ changeset locale) ...) + (values locale (first changeset))))) + +;;; To find out which changeset to use for the comm-l10n repo, use the +;;; 'comm-source->locales+changeset' procedure on the thunderbird-comm-source +;;; checkout directory. The complete localization data should be released as +;;; a tarball in the next release (see: +;;; https://bugzilla.mozilla.org/show_bug.cgi?id=1817086). When this tarball +;;; is available, it should replace the complete 'l10n' directory at the root +;;; of the IceCat source, instead of only the 'calendar', chat and mail +;;; directories that it provides. +(define thunderbird-comm-l10n + (let* ((changeset "5b6788295358") + (version (git-version %icedove-version "0" changeset))) + (origin + (method hg-fetch) + (uri (hg-reference + (url "https://hg.mozilla.org/projects/comm-l10n") + (changeset changeset))) + (file-name (git-file-name "comm-l10n" version)) + (sha256 + (base32 + "1jrsmkscjjllcfawi3788vwm53wn25inbhdis5nk4vfpr7wk5ill"))))) + +(define icedove-source + (let ((name (string-append "icedove-" %icedove-version))) + (origin + (method computed-origin-method) + (file-name (string-append name ".tar.xz")) + (sha256 #f) + (uri + (delay + (with-imported-modules (source-module-closure '((guix build utils))) + #~(begin + (use-modules (guix build utils) + (sxml simple)) + + (set-path-environment-variable + "PATH" '("bin") + (list #+(canonical-package tar) + #+(canonical-package xz))) + + ;; Extract the base Icecat tarball, renaming its top-level + ;; directory. + (invoke "tar" "--transform" (string-append "s,[^/]*," #$name ",") + "-xf" #$icecat-source) + (chdir #$name) + + ;; Merge the Thunderdbird localization data. + (copy-recursively #$thunderbird-comm-l10n "l10n") + + ;; Add the Thunderbird-specific "comm" directory.. + (mkdir "comm") + (copy-recursively #$thunderbird-comm-source "comm") + (delete-file "sourcestamp.txt") + + ;; Adjust the application name. + (substitute* "comm/mail/confvars.sh" + (("MOZ_APP_NAME=thunderbird") + "MOZ_APP_NAME=icedove") + (("MOZ_UPDATER=1") + "MOZ_UPDATER=0")) + + ;; Remove branding to comply with Mozilla's trademark policy + (with-directory-excursion "comm/mail/branding/nightly" + (delete-file "content/about-wordmark.svg") + (call-with-output-file "content/about-wordmark.svg" + (lambda (port) + (sxml->xml '(svg (@ (xmlns "http://www.w3.org/2000/svg") + (viewBox "0 0 789.1 90.78") + (width "333") + (height "48") + (fill "#fff")) + (text (@ (x "400") (y "70") + (text-anchor "middle") + (font-size "90")) + "Icedove Daily")) + port))) + (substitute* '("locales/en-US/brand.properties" + "locales/en-US/brand.ftl" + "locales/en-US/brand.dtd" + "configure.sh") + (("Thunderbird") "Icedove") + (("mozilla.org") "guix.gnu.org"))) + ;; Remove other mentions of Thunderbird in user-visible text. + (with-directory-excursion "comm/mail/base/content" + (substitute* '("overrides/app-license-name.html") + (("Thunderbird") "Icedove"))) + (with-directory-excursion "comm/mail/components/" + (substitute* '("MailGlue.jsm" + "extensions/schemas/addressBook.json" + "extensions/schemas/tabs.json" + "extensions/schemas/cloudFile.json" + "extensions/schemas/chrome_settings_overrides.json" + "extensions/schemas/windows.json" + "extensions/parent/ext-mail.js" + "im/messages/mail/Info.plist" + "enterprisepolicies/moz.build" + "enterprisepolicies/helpers/moz.build" + "enterprisepolicies/schemas/moz.build") + (("Thunderbird") "Icedove"))) + (substitute* '("comm/mailnews/base/prefs/content/accountUtils.js" + "comm/mail/base/content/customizeToolbar.js" + "comm/suite/components/customizeToolbar.js") + (("AppConstants.MOZ_APP_NAME (.)= \"thunderbird" _ e) + (format #f "AppConstants.MOZ_APP_NAME ~a= \"icedove" e))) + + ;; Override addon URLs and settings + (substitute* "comm/mail/app/profile/all-thunderbird.js" + (("(pref\\(\"extensions.webservice.discoverURL\").*" _ m) + (string-append m ", \"https://directory.fsf.org/wiki/Icedove\");")) + (("(pref\\(\"extensions.getAddons.search.url\").*" _ m) + (string-append m ", \"https://guix.gnu.org/packages\");")) + (("(pref\\(\"extensions.update.enabled\").*" _ m) + (string-append m ", false);")) + (("(pref\\(\"extensions.systemAddon.update.enabled\").*" _ m) + (string-append m ", false);")) + (("(pref\\(\"lightweightThemes.update.enabled\").*" _ m) + (string-append m ", false);"))) + + ;; Step out of the directory and create the tarball. + (chdir "..") + (format #t "Packing Icedove source tarball...~%") + (force-output) + (setenv "XZ_DEFAULTS" (string-join (%xz-parallel-args))) + (invoke "tar" "cfa" #$output + "--mtime=@315619200" ;1980-01-02 UTC + "--owner=root:0" + "--group=root:0" + "--sort=name" + #$name)))))))) + (define-public icedove (package (name "icedove") (version %icedove-version) - (source icecat-source) + (source icedove-source) (properties `((cpe-name . "thunderbird_esr"))) (build-system gnu-build-system) @@ -1157,11 +1295,6 @@ (define-public icedove ,@%gnu-build-system-modules) #:phases #~(modify-phases %standard-phases - (add-after 'unpack 'prepare-thunderbird-sources - (lambda _ - (mkdir "comm") - (copy-recursively #$thunderbird-source "comm") - (delete-file "sourcestamp.txt"))) (add-after 'patch-source-shebangs 'patch-cargo-checksums (lambda _ (use-modules (guix build cargo-utils)) @@ -1191,69 +1324,6 @@ (define-public icedove (substitute* "comm/mail/moz.configure" (("MOZ_DEDICATED_PROFILES, True") "MOZ_DEDICATED_PROFILES, False")))) - (add-after 'prepare-thunderbird-sources 'rename-to-icedove - (lambda _ - (substitute* "comm/mail/confvars.sh" - (("MOZ_APP_NAME=thunderbird") - "MOZ_APP_NAME=icedove") - (("MOZ_UPDATER=1") - "MOZ_UPDATER=0")) - ;; Remove branding to comply with Mozilla's trademark policy - (with-directory-excursion "comm/mail/branding/nightly" - (delete-file "content/about-wordmark.svg") - (call-with-output-file "content/about-wordmark.svg" - (lambda (port) - (sxml->xml '(svg (@ (xmlns "http://www.w3.org/2000/svg") - (viewBox "0 0 789.1 90.78") - (width "333") - (height "48") - (fill "#fff")) - (text (@ (x "400") (y "70") - (text-anchor "middle") - (font-size "90")) - "Icedove Daily")) - port))) - (substitute* '("locales/en-US/brand.properties" - "locales/en-US/brand.ftl" - "locales/en-US/brand.dtd" - "configure.sh") - (("Thunderbird") "Icedove") - (("mozilla.org") "guix.gnu.org"))) - ;; Remove other mentions of Thunderbird in user-visible text. - (with-directory-excursion "comm/mail/base/content" - (substitute* '("overrides/app-license-name.html") - (("Thunderbird") "Icedove"))) - (with-directory-excursion "comm/mail/components/" - (substitute* '("MailGlue.jsm" - "extensions/schemas/addressBook.json" - "extensions/schemas/tabs.json" - "extensions/schemas/cloudFile.json" - "extensions/schemas/chrome_settings_overrides.json" - "extensions/schemas/windows.json" - "extensions/parent/ext-mail.js" - "im/messages/mail/Info.plist" - "enterprisepolicies/moz.build" - "enterprisepolicies/helpers/moz.build" - "enterprisepolicies/schemas/moz.build") - (("Thunderbird") "Icedove"))) - (substitute* '("comm/mailnews/base/prefs/content/accountUtils.js" - "comm/mail/base/content/customizeToolbar.js" - "comm/suite/components/customizeToolbar.js") - (("AppConstants.MOZ_APP_NAME (.)= \"thunderbird" _ e) - (format #f "AppConstants.MOZ_APP_NAME ~a= \"icedove" e))) - - ;; Override addon URLs and settings - (substitute* "comm/mail/app/profile/all-thunderbird.js" - (("(pref\\(\"extensions.webservice.discoverURL\").*" _ m) - (string-append m ", \"https://directory.fsf.org/wiki/Icedove\");")) - (("(pref\\(\"extensions.getAddons.search.url\").*" _ m) - (string-append m ", \"https://guix.gnu.org/packages\");")) - (("(pref\\(\"extensions.update.enabled\").*" _ m) - (string-append m ", false);")) - (("(pref\\(\"extensions.systemAddon.update.enabled\").*" _ m) - (string-append m ", false);")) - (("(pref\\(\"lightweightThemes.update.enabled\").*" _ m) - (string-append m ", false);"))))) (add-after 'build 'neutralize-store-references (lambda _ ;; Mangle the store references to compilers & other build tools in -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 03/10] gnu: Define UPSTREAM-FIREFOX-SOURCE at the top level. 2023-02-16 4:36 ` bug#32026: [PATCH 01/10] gnu: Add a 'update-mozilla-locales' helper for maintenance Maxim Cournoyer 2023-02-16 4:36 ` bug#32026: [PATCH 02/10] gnu: icedove: Compute a self-contained source Maxim Cournoyer @ 2023-02-16 4:36 ` Maxim Cournoyer 2023-02-16 22:26 ` Mark H Weaver 2023-02-16 4:36 ` bug#32026: [PATCH 04/10] gnu: icecat: Make language packs reproducible Maxim Cournoyer ` (7 subsequent siblings) 9 siblings, 1 reply; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-16 4:36 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer * gnu/packages/gnuzilla.scm (%icecat-base-version): New variable. (%upstream-firefox-version): Likewise. (%icecat-version): Define in terms of %icecat-base-version. (upstream-firefox-source): New variable. (icecat-source): Adjust to use the above newly introduced variables. --- (no changes since v1) gnu/packages/gnuzilla.scm | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 1ed52c68e9..1bafa92377 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -505,31 +505,29 @@ (define all-mozilla-locales ;; XXXX: Workaround 'snippet' limitations. (define computed-origin-method (@@ (guix packages) computed-origin-method)) -(define %icecat-version "102.8.0-guix0-preview1") +(define %icecat-base-version "102.8.0") +(define %upstream-firefox-version (string-append %icecat-base-version "esr")) +(define %icecat-version (string-append %icecat-base-version "-guix0-preview1")) (define %icecat-build-id "20230214000000") ;must be of the form YYYYMMDDhhmmss +(define upstream-firefox-source + (origin + (method url-fetch) + (uri (string-append + "https://ftp.mozilla.org/pub/firefox/releases/" + %upstream-firefox-version "/source/" + "firefox-" %upstream-firefox-version ".source.tar.xz")) + (sha256 + (base32 + "0j6afrgfsmd0adbbmffw4p1f2hznpck9d36z3bsjx36f7cjgdy27")))) + ;; 'icecat-source' is a "computed" origin that generates an IceCat tarball ;; from the corresponding upstream Firefox ESR tarball, using the 'makeicecat' ;; script from the upstream IceCat project. (define icecat-source - (let* ((base-version (first (string-split %icecat-version #\-))) - - (major-version (first (string-split base-version #\.))) - (minor-version (second (string-split base-version #\.))) - (sub-version (third (string-split base-version #\.))) - - (upstream-firefox-version (string-append base-version "esr")) - (upstream-firefox-source - (origin - (method url-fetch) - (uri (string-append - "https://ftp.mozilla.org/pub/firefox/releases/" - upstream-firefox-version "/source/" - "firefox-" upstream-firefox-version ".source.tar.xz")) - (sha256 - (base32 - "0j6afrgfsmd0adbbmffw4p1f2hznpck9d36z3bsjx36f7cjgdy27")))) - + (let* ((major-version (first (string-split %icecat-base-version #\.))) + (minor-version (second (string-split %icecat-base-version #\.))) + (sub-version (third (string-split %icecat-base-version #\.))) (upstream-icecat-base-version "102.8.0") ; maybe older than base-version ;;(gnuzilla-commit (string-append "v" upstream-icecat-base-version)) (gnuzilla-commit "03d9e3db5affe21db077c410ec08c313d6aa280e") @@ -562,7 +560,7 @@ (define icecat-source #~(begin (use-modules (guix build utils)) (let ((firefox-dir - (string-append "firefox-" #$base-version)) + (string-append "firefox-" #$%icecat-base-version)) (icecat-dir (string-append "icecat-" #$%icecat-version))) -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 03/10] gnu: Define UPSTREAM-FIREFOX-SOURCE at the top level. 2023-02-16 4:36 ` bug#32026: [PATCH 03/10] gnu: Define UPSTREAM-FIREFOX-SOURCE at the top level Maxim Cournoyer @ 2023-02-16 22:26 ` Mark H Weaver 2023-02-17 2:55 ` Maxim Cournoyer 0 siblings, 1 reply; 80+ messages in thread From: Mark H Weaver @ 2023-02-16 22:26 UTC (permalink / raw) To: Maxim Cournoyer, 32026; +Cc: ludo, Jonathan Brielmaier, Maxim Cournoyer Hi Maxim, Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: > * gnu/packages/gnuzilla.scm (%icecat-base-version): New variable. > (%upstream-firefox-version): Likewise. > (%icecat-version): Define in terms of %icecat-base-version. > (upstream-firefox-source): New variable. > (icecat-source): Adjust to use the above newly introduced variables. I'm deeply uncomfortable binding toplevel variables, even unexported ones, that provide non-FSDG-complaint software. I guess that the primary motivation for this commit was to make it easier to use the 'update-mozilla-locales' helper. In an earlier message <https://bugs.gnu.org/32026#100>, I suggested an alternative way to use the code in your proposed 'update-mozilla-locales' helper which would eliminate the need to expose any *firefox* toplevel variables. I hope you'll find that alternative approach acceptable, so that we can avoid exposing non-FSDG-compliant software in our toplevel bindings. What do you think? Thanks, Mark ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 03/10] gnu: Define UPSTREAM-FIREFOX-SOURCE at the top level. 2023-02-16 22:26 ` Mark H Weaver @ 2023-02-17 2:55 ` Maxim Cournoyer 2023-02-18 20:46 ` Mark H Weaver 0 siblings, 1 reply; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-17 2:55 UTC (permalink / raw) To: Mark H Weaver; +Cc: 32026, ludo, Jonathan Brielmaier Hi Mark, Mark H Weaver <mhw@netris.org> writes: > Hi Maxim, > > Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: > >> * gnu/packages/gnuzilla.scm (%icecat-base-version): New variable. >> (%upstream-firefox-version): Likewise. >> (%icecat-version): Define in terms of %icecat-base-version. >> (upstream-firefox-source): New variable. >> (icecat-source): Adjust to use the above newly introduced variables. > > I'm deeply uncomfortable binding toplevel variables, even unexported > ones, that provide non-FSDG-complaint software. I guess that the > primary motivation for this commit was to make it easier to use the > 'update-mozilla-locales' helper. While I appreciate your concern, I think "hiding" the upstream source would be akin to putting our head in the sand. We do need that upstream source to produce GNU IceCat from source, so it may as well be convenient to handle while hacking on the GNU IceCat package. As you've noted, it isn't exported, so I think it'd be a stretch to say that this private binding "steers" users toward non-FSDG software. Note that we also have a %upstream-linux-source procedure in (gnu packages linux). > In an earlier message <https://bugs.gnu.org/32026#100>, I suggested an > alternative way to use the code in your proposed > 'update-mozilla-locales' helper which would eliminate the need to expose > any *firefox* toplevel variables. I hope you'll find that alternative > approach acceptable, so that we can avoid exposing non-FSDG-compliant > software in our toplevel bindings. > > What do you think? See my explanation there that the need to maintain the various l10n repositories commits/hashes is going away soon. -- Thanks, Maxim ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 03/10] gnu: Define UPSTREAM-FIREFOX-SOURCE at the top level. 2023-02-17 2:55 ` Maxim Cournoyer @ 2023-02-18 20:46 ` Mark H Weaver 2023-02-19 17:43 ` Maxim Cournoyer 2023-02-20 1:06 ` Maxim Cournoyer 0 siblings, 2 replies; 80+ messages in thread From: Mark H Weaver @ 2023-02-18 20:46 UTC (permalink / raw) To: Maxim Cournoyer; +Cc: 32026, ludo, Jonathan Brielmaier Hi Maxim, Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: > Mark H Weaver <mhw@netris.org> writes: > >> Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: >> >>> * gnu/packages/gnuzilla.scm (%icecat-base-version): New variable. >>> (%upstream-firefox-version): Likewise. >>> (%icecat-version): Define in terms of %icecat-base-version. >>> (upstream-firefox-source): New variable. >>> (icecat-source): Adjust to use the above newly introduced variables. >> >> I'm deeply uncomfortable binding toplevel variables, even unexported >> ones, that provide non-FSDG-complaint software. I guess that the >> primary motivation for this commit was to make it easier to use the >> 'update-mozilla-locales' helper. > > While I appreciate your concern, I think "hiding" the upstream source > would be akin to putting our head in the sand. We do need that upstream > source to produce GNU IceCat from source, so it may as well be > convenient to handle while hacking on the GNU IceCat package. As you've > noted, it isn't exported, so I think it'd be a stretch to say that this > private binding "steers" users toward non-FSDG software. Note that we > also have a %upstream-linux-source procedure in (gnu packages linux). The '%upstream-linux-source' procedure was not easily avoidable, and it's not at all convenient to use because it requires passing in the nix-formatted hash. In contrast, the argument for adding 'unstream-firefox-source' as a toplevel binding is a very slender thread, and it would immediately enable users to type commands like: guix build -e '(@@ (gnu packages gnuzilla) upstream-firefox-source)' At which point Guix would dutifully provide non-FSDG-compliant software to the user. Moreover, in another of your proposed commits ("gnu: Add a 'update-mozilla-locales' helper for maintenance"), in a comment, you literally steer the user to download the Firefox source and provide the precise command to do it. This is a slippery slope. It is not the role of core Guix to facilitate downloading Firefox source code for purposes of IceCat development. That is the domain of the IceCat project itself. I feel very strongly about this. Thanks, Mark ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 03/10] gnu: Define UPSTREAM-FIREFOX-SOURCE at the top level. 2023-02-18 20:46 ` Mark H Weaver @ 2023-02-19 17:43 ` Maxim Cournoyer 2023-02-20 1:06 ` Maxim Cournoyer 1 sibling, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-19 17:43 UTC (permalink / raw) To: Mark H Weaver; +Cc: 32026, ludo, Jonathan Brielmaier Hello, Mark H Weaver <mhw@netris.org> writes: > Hi Maxim, > > Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: > >> Mark H Weaver <mhw@netris.org> writes: >> >>> Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: >>> >>>> * gnu/packages/gnuzilla.scm (%icecat-base-version): New variable. >>>> (%upstream-firefox-version): Likewise. >>>> (%icecat-version): Define in terms of %icecat-base-version. >>>> (upstream-firefox-source): New variable. >>>> (icecat-source): Adjust to use the above newly introduced variables. >>> >>> I'm deeply uncomfortable binding toplevel variables, even unexported >>> ones, that provide non-FSDG-complaint software. I guess that the >>> primary motivation for this commit was to make it easier to use the >>> 'update-mozilla-locales' helper. >> >> While I appreciate your concern, I think "hiding" the upstream source >> would be akin to putting our head in the sand. We do need that upstream >> source to produce GNU IceCat from source, so it may as well be >> convenient to handle while hacking on the GNU IceCat package. As you've >> noted, it isn't exported, so I think it'd be a stretch to say that this >> private binding "steers" users toward non-FSDG software. Note that we >> also have a %upstream-linux-source procedure in (gnu packages linux). > > The '%upstream-linux-source' procedure was not easily avoidable, and > it's not at all convenient to use because it requires passing in the > nix-formatted hash. > > In contrast, the argument for adding 'unstream-firefox-source' as a > toplevel binding is a very slender thread, and it would immediately > enable users to type commands like: > > guix build -e '(@@ (gnu packages gnuzilla) upstream-firefox-source)' > At which point Guix would dutifully provide non-FSDG-compliant software > to the user. > > Moreover, in another of your proposed commits ("gnu: Add a > 'update-mozilla-locales' helper for maintenance"), in a comment, you > literally steer the user to download the Firefox source and provide the > precise command to do it. > > This is a slippery slope. It is not the role of core Guix to facilitate > downloading Firefox source code for purposes of IceCat development. > That is the domain of the IceCat project itself. We're already on a slippery slope for fetching the non-free source ourselves to process them, but I'd argue that this doesn't steer users toward non-free software, but rather empowers them to free the original source of the software they use. In an ideal GNU FSDG world put forward by some proponents, we'd not even let users' machine fetch the non-free source and instead host it somewhere else, ready to be used. > I feel very strongly about this. I don't really see how "obsfuscating" the non-free source we process makes it much different, or how having an easier access to that non-free source from the CLI would steer users toward "using" non-free software. A source is not a usable (executable) form. But anyway, with that opinion of mine expressed, I've reverted the offending bits so that we can move on, knowing that once we get the strings_all.tar.zst locales data planned in future releases, it won't matter much anyway. See the result in v4. -- Thanks, Maxim ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 03/10] gnu: Define UPSTREAM-FIREFOX-SOURCE at the top level. 2023-02-18 20:46 ` Mark H Weaver 2023-02-19 17:43 ` Maxim Cournoyer @ 2023-02-20 1:06 ` Maxim Cournoyer 1 sibling, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-20 1:06 UTC (permalink / raw) To: Mark H Weaver; +Cc: 32026-done, ludo, Jonathan Brielmaier Hi Mark, I believe I've addressed all your comments; I've now pushed the series to master (taking care to update the gnuzilla commit to f23f8b6 for the language pack reproducibility fix). Thank you for the review, and let me know if I missed anything! Closing. -- Thanks, Maxim ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 04/10] gnu: icecat: Make language packs reproducible. 2023-02-16 4:36 ` bug#32026: [PATCH 01/10] gnu: Add a 'update-mozilla-locales' helper for maintenance Maxim Cournoyer 2023-02-16 4:36 ` bug#32026: [PATCH 02/10] gnu: icedove: Compute a self-contained source Maxim Cournoyer 2023-02-16 4:36 ` bug#32026: [PATCH 03/10] gnu: Define UPSTREAM-FIREFOX-SOURCE at the top level Maxim Cournoyer @ 2023-02-16 4:36 ` Maxim Cournoyer 2023-02-16 4:36 ` bug#32026: [PATCH 05/10] gnu: Add icecat-l10n and icedove-l10n Maxim Cournoyer ` (6 subsequent siblings) 9 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-16 4:36 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer * gnu/packages/patches/icecat-reproducible-langpacks.patch: New file. * gnu/local.mk (dist_patch_DATA): Register. it. * gnu/packages/gnuzilla.scm (icecat-source): Apply it. --- (no changes since v1) gnu/local.mk | 1 + gnu/packages/gnuzilla.scm | 1 + .../icecat-reproducible-langpacks.patch | 45 +++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 gnu/packages/patches/icecat-reproducible-langpacks.patch diff --git a/gnu/local.mk b/gnu/local.mk index 07a7a0f527..d6f1f4482a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1327,6 +1327,7 @@ dist_patch_DATA = \ %D%/packages/patches/i7z-gcc-10.patch \ %D%/packages/patches/icecat-makeicecat.patch \ %D%/packages/patches/icecat-avoid-bundled-libraries.patch \ + %D%/packages/patches/icecat-reproducible-langpacks.patch \ %D%/packages/patches/icecat-use-system-graphite2+harfbuzz.patch \ %D%/packages/patches/icecat-use-system-media-libs.patch \ %D%/packages/patches/icedtea-7-hotspot-aarch64-use-c++98.patch\ diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 1bafa92377..17edb9fa7e 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -554,6 +554,7 @@ (define icecat-source (method computed-origin-method) (file-name (string-append "icecat-" %icecat-version ".tar.xz")) (sha256 #f) + (patches (search-patches "icecat-reproducible-langpacks.patch")) (uri (delay (with-imported-modules '((guix build utils)) diff --git a/gnu/packages/patches/icecat-reproducible-langpacks.patch b/gnu/packages/patches/icecat-reproducible-langpacks.patch new file mode 100644 index 0000000000..b36a770cc6 --- /dev/null +++ b/gnu/packages/patches/icecat-reproducible-langpacks.patch @@ -0,0 +1,45 @@ +Prevent the extension manifests from embedding the current date. + +This is inspired by the Debian +"Use-build-id-as-langpack-version-for-reproducibility.patch" maintained for +their Firefox package as well as reproducible-builds.org guidelines from +https://reproducible-builds.org/docs/source-date-epoch/. + +Upstream status: https://phabricator.services.mozilla.com/D169979 + +--- ./python/mozbuild/mozbuild/action/langpack_manifest.py.old 2023-02-13 11:01:21.051537347 -0500 ++++ ./python/mozbuild/mozbuild/action/langpack_manifest.py 2023-02-13 11:04:33.141817330 -0500 +@@ -36,6 +36,15 @@ + pushlog_api_url = "{0}/json-rev/{1}" + + ++import os ++import time ++import datetime ++ ++def get_build_date(): ++ """Honor SOURCE_DATE_EPOCH for reproducibility.""" ++ return datetime.datetime.utcfromtimestamp( ++ int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))) ++ + ### + # Retrievers a UTC datetime of the push for the current commit + # from a mercurial clone directory. +@@ -54,7 +63,7 @@ + with mozversioncontrol.get_repository_object(path=path) as repo: + phase = repo._run("log", "-r", ".", "-T" "{phase}") + if phase.strip() != "public": +- return datetime.datetime.utcnow() ++ return get_build_date() + repo_url = repo._run("paths", "default") + repo_url = repo_url.strip().replace("ssh://", "https://") + repo_url = repo_url.replace("hg://", "https://") +@@ -105,7 +114,7 @@ + dt = get_dt_from_hg(path) + + if dt is None: +- dt = datetime.datetime.utcnow() ++ dt = get_build_date() + + dt = dt.replace(microsecond=0) + return dt.strftime("%Y%m%d%H%M%S") -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 05/10] gnu: Add icecat-l10n and icedove-l10n. 2023-02-16 4:36 ` bug#32026: [PATCH 01/10] gnu: Add a 'update-mozilla-locales' helper for maintenance Maxim Cournoyer ` (2 preceding siblings ...) 2023-02-16 4:36 ` bug#32026: [PATCH 04/10] gnu: icecat: Make language packs reproducible Maxim Cournoyer @ 2023-02-16 4:36 ` Maxim Cournoyer 2023-02-16 22:45 ` Mark H Weaver 2023-02-16 4:36 ` bug#32026: [PATCH 06/10] gnu: icedove: Automatically load system-provided extensions Maxim Cournoyer ` (5 subsequent siblings) 9 siblings, 1 reply; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-16 4:36 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer * gnu/packages/gnuzilla.scm (%icecat-locales, %icedove-locales): New variable. (make-l10n-package): New procedure. (icecat-l10n, icedove-l10n): New variables. --- (no changes since v1) gnu/packages/gnuzilla.scm | 146 +++++++++++++++++++++++++++++++++++++- 1 file changed, 145 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 17edb9fa7e..63ea7440e6 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -17,7 +17,7 @@ ;;; Copyright © 2020, 2022 Marius Bakke <marius@gnu.org> ;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re> ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be> -;;; Copyright © 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2021 Baptiste Strazzul <bstrazzull@hotmail.fr> ;;; ;;; This file is part of GNU Guix. @@ -1123,6 +1123,16 @@ (define (runpaths-of-input label) (cpe-name . "firefox_esr") (cpe-version . ,(first (string-split version #\-))))))) +(define %icecat-locales + '("ach" "af" "an" "ar" "ast" "az" "be" "bg" "bn" "br" "bs" "ca" "cak" + "ca-valencia" "cs" "cy" "da" "de" "dsb" "el" "en-CA" "en-GB" "eo" "es-AR" + "es-CL" "es-ES" "es-MX" "et" "eu" "fa" "ff" "fi" "fr" "fy-NL" "ga-IE" "gd" + "gl" "gn" "gu-IN" "he" "hi-IN" "hr" "hsb" "hu" "hy-AM" "ia" "id" "is" "it" + "ja" "ja-JP-mac" "ka" "kab" "kk" "km" "kn" "ko" "lij" "lt" "lv" "mk" "mr" "ms" + "my" "nb-NO" "ne-NP" "nl" "nn-NO" "oc" "pa-IN" "pl" "pt-BR" "pt-PT" "rm" "ro" + "ru" "sco" "si" "sk" "sl" "son" "sq" "sr" "sv-SE" "szl" "ta" "te" "th" "tl" + "tr" "trs" "uk" "ur" "uz" "vi" "xh" "zh-CN" "zh-TW")) + (define %icedove-build-id "20230207000000") ;must be of the form YYYYMMDDhhmmss (define %icedove-version "102.7.2") @@ -1147,6 +1157,15 @@ (define (comm-source->locales+changeset source) (((_ changeset locale) ...) (values locale (first changeset))))) +;;; Generated with comm-source->locales+changeset. +(define %icedove-locales + '("af" "ar" "ast" "be" "bg" "br" "ca" "cak" "cs" "cy" "da" "de" "dsb" "el" + "en-CA" "en-GB" "es-AR" "es-ES" "es-MX" "et" "eu" "fi" "fr" "fy-NL" "ga-IE" + "gd" "gl" "he" "hr" "hsb" "hu" "hy-AM" "id" "is" "it" "ja" "ja-JP-mac" "ka" + "kab" "kk" "ko" "lt" "lv" "ms" "nb-NO" "nl" "nn-NO" "pa-IN" "pl" "pt-BR" + "pt-PT" "rm" "ro" "ru" "sk" "sl" "sq" "sr" "sv-SE" "th" "tr" "uk" "uz" "vi" + "zh-CN" "zh-TW")) + ;;; To find out which changeset to use for the comm-l10n repo, use the ;;; 'comm-source->locales+changeset' procedure on the thunderbird-comm-source ;;; checkout directory. The complete localization data should be released as @@ -1555,6 +1574,131 @@ (define-public icedove/wayland (native-inputs '()) (inputs '()))) +(define (make-l10n-package project) + "Return a package for PROJECT, a symbol (either icecat or icedove). +It assumes the %PROJECT-VERSION, PROJECT-SOURCE and %PROJECT-LOCALES variables +already exist." + (unless (member project '(icecat icedove)) + (error "only icecat or icedove components are currently supported")) + + (let ((name (if (eq? 'icecat project) + "IceCat" + "Icedove"))) + + (package + (name (format #f "~a-l10n" project)) + (version (module-ref (current-module) + (symbol-append '% project '-version))) + (source (module-ref (current-module) + (symbol-append project '-source))) + (outputs (cons "out" (module-ref (current-module) + (symbol-append '% project '-locales)))) + (build-system gnu-build-system) + (arguments + (list + #:modules '((guix build gnu-build-system) + (guix build utils) + (ice-9 format) + (ice-9 ftw) + (srfi srfi-1) + (srfi srfi-26)) + #:tests? #f ;no tests, this is data + #:phases + #~(modify-phases %standard-phases + (delete 'bootstrap) + (delete 'install) + (replace 'configure + (lambda _ + ;; The following configuration is inspired by guidance at + ;; https://firefox-source-docs.mozilla.org/build/buildsystem/locales.html. + (call-with-output-file ".mozconfig" + (lambda (p) + (format p "~{~a~%~}" + (list (if (eq? 'icecat '#$project) + "ac_add_options --enable-project=browser" + "ac_add_options --enable-project=comm/mail") + "ac_add_options --disable-compile-environment" + (string-append + "ac_add_options --with-l10n-base=" + (getcwd) "/l10n") + ;; Hack, otherwise the build system throws: + ;; 'RuntimeError: File "brand.dtd" not found'. + "ac_add_options --enable-official-branding" + "mk_add_options MOZ_OBJDIR=obj")))) + (setenv "CONFIG_SHELL" (which "bash")) + (setenv "MOZBUILD_STATE_PATH" + (string-append (getcwd) "/mach_state")) + (setenv "MOZCONFIG" (string-append (getcwd) "/.mozconfig")) + (setenv "MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE" "system") + (setenv "BUILD_BACKENDS" "FasterMake,RecursiveMake"))) + (replace 'build ;build and install data files + (lambda* (#:key outputs #:allow-other-keys) + (define (find-file dir name) + (let ((files (find-files dir name))) + (when (null? files) + (error "could not find file in dir" name dir)) + (car files))) + + (for-each + (lambda (l) + (let* ((out (assoc-ref outputs l)) + ;; The older lib/$project/distribution/extensions + ;; directory is deprecated. Use the newer app-global + ;; directory, which is lib/$project/extensions. + (ext-dir-prefix + (format + #f "lib/~a/~:[~;browser/~]extensions" + '#$project (eq? 'icecat '#$project))) + (all-ext (string-append #$output "/" ext-dir-prefix)) + (ext-dir (string-append out "/" ext-dir-prefix)) + ;; XXX: Because Icedove doesn't have a makeicedove + ;; script that substitutes all the Thunderbird + ;; references to Icedove, the MOZ_LANGPACK_EID + ;; defined in comm/mail/locales/Makefile.in uses + ;; 'thunderbird' in its ID extension rather than + ;; 'icedove'. + (name (format #f "langpack-~a@~a.mozilla.org.xpi" + l (if (eq? 'icedove '#$project) + 'thunderbird + '#$project)))) + (format #t "processing locale `~a'...~%" l) + (if (eq? 'icecat '#$project) + ;; XXX: For some reasons, for IceCat, there are some + ;; parsing errors that cause the build system to + ;; return an unclean exit code; use system* to ignore + ;; errors. + (system* "./mach" "build" (string-append "langpack-" l)) + (invoke "./mach" "build" (string-append "langpack-" l))) + (mkdir-p ext-dir) + (let ((xpi (find-file "obj" (string-append + "\\." l "\\.langpack\\.xpi$")))) + (copy-file xpi (string-append ext-dir "/" name)) + ;; Symlink to the main output so that a user can + ;; install all of the language packs at once. + (mkdir-p all-ext) + (symlink (string-append ext-dir "/" name) + (string-append all-ext "/" name))))) + (if (eq? 'icedove '#$project) + '#$%icedove-locales + '#$%icecat-locales))))))) + (native-inputs + (list m4 + perl + python-wrapper + node + unzip)) + (home-page "https://www.mozilla.org/") + (synopsis (string-append "Language localization data for " name)) + (description (string-append "This package contains the various language +localization data files (language pack extensions) for " name ". The +individual localization packages can be installed by using the output +associated with their name.")) + (license license:mpl2.0)))) + +(define-public icecat-l10n (make-l10n-package 'icecat)) + +(define-public icedove-l10n (make-l10n-package 'icedove)) + (define-public firefox-decrypt (package (name "firefox-decrypt") -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 05/10] gnu: Add icecat-l10n and icedove-l10n. 2023-02-16 4:36 ` bug#32026: [PATCH 05/10] gnu: Add icecat-l10n and icedove-l10n Maxim Cournoyer @ 2023-02-16 22:45 ` Mark H Weaver 2023-02-17 3:37 ` Maxim Cournoyer 0 siblings, 1 reply; 80+ messages in thread From: Mark H Weaver @ 2023-02-16 22:45 UTC (permalink / raw) To: Maxim Cournoyer, 32026; +Cc: ludo, Jonathan Brielmaier, Maxim Cournoyer Hi Maxim, Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: > * gnu/packages/gnuzilla.scm (%icecat-locales, %icedove-locales): New variable. > (make-l10n-package): New procedure. > (icecat-l10n, icedove-l10n): New variables. Thanks very much for this important work. Our lack of support for language packs has been sore spot for several years, and I'm profoundly grateful to you for taking this on and getting it done! For now, I have just two general questions/comments: (1) Instead of generating the locales in separate "*-locales" packages and then merging them with the main package (which must then be renamed to "*-minimal"), how feasible would it be to incorporate the locale generation directly into the existing packages? (2) In terms of the API, I very much dislike the approach of having the 'make-l10n-package' accept just one argument: a symbol, which it uses to construct the variable names of toplevel variables that must be looked up using 'module-ref'. I'd greatly prefer to simply pass in all of the variables that are needed. What do you think? I'll hold off on a more detailed review until we can (hopefully) reach agreement on the overall approach. Thanks again! Mark ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 05/10] gnu: Add icecat-l10n and icedove-l10n. 2023-02-16 22:45 ` Mark H Weaver @ 2023-02-17 3:37 ` Maxim Cournoyer 2023-02-18 20:22 ` Mark H Weaver 0 siblings, 1 reply; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-17 3:37 UTC (permalink / raw) To: Mark H Weaver; +Cc: 32026, ludo, Jonathan Brielmaier Hi Mark! Mark H Weaver <mhw@netris.org> writes: > Hi Maxim, > > Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: >> * gnu/packages/gnuzilla.scm (%icecat-locales, %icedove-locales): New variable. >> (make-l10n-package): New procedure. >> (icecat-l10n, icedove-l10n): New variables. > > Thanks very much for this important work. Our lack of support for > language packs has been sore spot for several years, and I'm profoundly > grateful to you for taking this on and getting it done! > > For now, I have just two general questions/comments: Thanks! The motivator was a family member starting to use Guix System... ha! > (1) Instead of generating the locales in separate "*-locales" packages > and then merging them with the main package (which must then be > renamed to "*-minimal"), how feasible would it be to incorporate the > locale generation directly into the existing packages? It's entirely feasible, but I see a couple downsides that explain why I stuck with the current design: 1. The user no longer has an option to install IceCat without the 70 MiB or so of extra locales (via icecat-minimal). 2. The already lengthy IceCat package definition gets even more verbose and hard to follow. 3. The locales are slow to generate (it's sequential, and there are a lot of them). Currently they can be generate at the same time as icecat-minimal is built. 4. It makes debugging locale-generation problems more focused. > (2) In terms of the API, I very much dislike the approach of having the > 'make-l10n-package' accept just one argument: a symbol, which it > uses to construct the variable names of toplevel variables that must > be looked up using 'module-ref'. I'd greatly prefer to simply pass > in all of the variables that are needed. > > What do you think? I don't feel strongly about it. Since you do, I've adjusted it, in an upcoming v3. > I'll hold off on a more detailed review until we can (hopefully) reach > agreement on the overall approach. OK! Thanks for the comments. I hope I don't sound dismissive of them, although I find myself disagreeing with a few of them :-). -- Thanks, Maxim ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 05/10] gnu: Add icecat-l10n and icedove-l10n. 2023-02-17 3:37 ` Maxim Cournoyer @ 2023-02-18 20:22 ` Mark H Weaver 2023-02-18 20:42 ` Maxim Cournoyer 0 siblings, 1 reply; 80+ messages in thread From: Mark H Weaver @ 2023-02-18 20:22 UTC (permalink / raw) To: Maxim Cournoyer; +Cc: 32026, ludo, Jonathan Brielmaier Hi Maxim, Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: > Mark H Weaver <mhw@netris.org> writes: [...] >> (1) Instead of generating the locales in separate "*-locales" packages >> and then merging them with the main package (which must then be >> renamed to "*-minimal"), how feasible would it be to incorporate the >> locale generation directly into the existing packages? > > It's entirely feasible, but I see a couple downsides that explain why I > stuck with the current design: > > 1. The user no longer has an option to install IceCat without the 70 MiB > or so of extra locales (via icecat-minimal). > > 2. The already lengthy IceCat package definition gets even more verbose > and hard to follow. > > 3. The locales are slow to generate (it's sequential, and there are a > lot of them). Currently they can be generate at the same time as > icecat-minimal is built. > > 4. It makes debugging locale-generation problems more focused. Okay, that makes sense. Thanks for explaining it. I didn't realize until now that there's no way, in the current patch set, to install a subset of language packs. I see that the icecat-l10n package installs each language pack into a separate output, which led me to initially guess that users could install a subset of those outputs. At present, I guess that those separate outputs are not yet usable. At some point, it would be good to facilitate the creation of custom 'icecat' packages with only a subset of language packs added, but we can work on that later. There's no need to hold back on this important first step. >> (2) In terms of the API, I very much dislike the approach of having the >> 'make-l10n-package' accept just one argument: a symbol, which it >> uses to construct the variable names of toplevel variables that must >> be looked up using 'module-ref'. I'd greatly prefer to simply pass >> in all of the variables that are needed. >> >> What do you think? > > I don't feel strongly about it. Since you do, I've adjusted it, in an > upcoming v3. Thank you! Regards, Mark ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 05/10] gnu: Add icecat-l10n and icedove-l10n. 2023-02-18 20:22 ` Mark H Weaver @ 2023-02-18 20:42 ` Maxim Cournoyer 0 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-18 20:42 UTC (permalink / raw) To: Mark H Weaver; +Cc: 32026, ludo, Jonathan Brielmaier Hi Mark, Mark H Weaver <mhw@netris.org> writes: > Hi Maxim, > > Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: > >> Mark H Weaver <mhw@netris.org> writes: > [...] >>> (1) Instead of generating the locales in separate "*-locales" packages >>> and then merging them with the main package (which must then be >>> renamed to "*-minimal"), how feasible would it be to incorporate the >>> locale generation directly into the existing packages? >> >> It's entirely feasible, but I see a couple downsides that explain why I >> stuck with the current design: >> >> 1. The user no longer has an option to install IceCat without the 70 MiB >> or so of extra locales (via icecat-minimal). >> >> 2. The already lengthy IceCat package definition gets even more verbose >> and hard to follow. >> >> 3. The locales are slow to generate (it's sequential, and there are a >> lot of them). Currently they can be generate at the same time as >> icecat-minimal is built. >> >> 4. It makes debugging locale-generation problems more focused. > > Okay, that makes sense. Thanks for explaining it. > > I didn't realize until now that there's no way, in the current patch > set, to install a subset of language packs. I see that the icecat-l10n > package installs each language pack into a separate output, which led me > to initially guess that users could install a subset of those outputs. > At present, I guess that those separate outputs are not yet usable. > > At some point, it would be good to facilitate the creation of custom > 'icecat' packages with only a subset of language packs added, but we can > work on that later. There's no need to hold back on this important > first step. It would be nice indeed, and that's what I initially aimed at, until I realize there was no such ready to use facility in Mozilla products (there's no easy way to extend the static search path). I've left the packages public, because the .xpi files can still be installed manually, perhaps useful for users of other distributions of of an icecat-minimal user that wants to install a single trusted .xpi. -- Thanks, Maxim ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 06/10] gnu: icedove: Automatically load system-provided extensions. 2023-02-16 4:36 ` bug#32026: [PATCH 01/10] gnu: Add a 'update-mozilla-locales' helper for maintenance Maxim Cournoyer ` (3 preceding siblings ...) 2023-02-16 4:36 ` bug#32026: [PATCH 05/10] gnu: Add icecat-l10n and icedove-l10n Maxim Cournoyer @ 2023-02-16 4:36 ` Maxim Cournoyer 2023-02-16 4:36 ` bug#32026: [PATCH 07/10] gnu: Add language packs to icecat and icedove Maxim Cournoyer ` (4 subsequent siblings) 9 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-16 4:36 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer * gnu/packages/gnuzilla.scm (icedove-source): Set the extensions.autoDisableScopes preference value to 3. (icedove-minimal) [phases]: Add the --allow-addon-sideload and --with-unsigned-addon-scopes=app,system ac options to the configure phase. --- (no changes since v1) gnu/packages/gnuzilla.scm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 63ea7440e6..a578142967 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -1281,7 +1281,15 @@ (define icedove-source (("(pref\\(\"extensions.systemAddon.update.enabled\").*" _ m) (string-append m ", false);")) (("(pref\\(\"lightweightThemes.update.enabled\").*" _ m) - (string-append m ", false);"))) + (string-append m ", false);")) + + ;; XXX: The autoDisableScopes is tweaked by the makeicecat + ;; script, but it doesn't know about Thunderbird. This is + ;; necessary to allow picking up the extensions found in the + ;; system global application directory, such as the language + ;; packs. + (("\"extensions.autoDisableScopes\", 15") + "\"extensions.autoDisableScopes\", 3")) ;; Step out of the directory and create the tarball. (chdir "..") @@ -1394,6 +1402,8 @@ (define-public icedove (lambda () (display (string-append + "ac_add_options --allow-addon-sideload\n" + "ac_add_options --with-unsigned-addon-scopes=app,system\n" "ac_add_options --disable-crashreporter\n" "ac_add_options --disable-debug\n" "ac_add_options --disable-debug-symbols\n" -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 07/10] gnu: Add language packs to icecat and icedove. 2023-02-16 4:36 ` bug#32026: [PATCH 01/10] gnu: Add a 'update-mozilla-locales' helper for maintenance Maxim Cournoyer ` (4 preceding siblings ...) 2023-02-16 4:36 ` bug#32026: [PATCH 06/10] gnu: icedove: Automatically load system-provided extensions Maxim Cournoyer @ 2023-02-16 4:36 ` Maxim Cournoyer 2023-02-16 4:36 ` bug#32026: [PATCH 08/10] gnu: icedove: Use the locale of the system Maxim Cournoyer ` (3 subsequent siblings) 9 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-16 4:36 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer Fixes <https://issues.guix.gnu.org/32026>. * gnu/packages/gnuzilla.scm (icecat): Rename to... (icecat-minimal): ... this. (icedove: Rename to... (icedove-minimal): ... this. (make-mozilla-with-l10n): New procedure. (icecat, icedove): New variables. --- Changes in v2: - Do not clear native-inputs and inputs in make-mozilla-with-l10n, for 'guix shell -D icecat' gnu/packages/gnuzilla.scm | 133 ++++++++++++++++++++++++++++---------- 1 file changed, 98 insertions(+), 35 deletions(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index a578142967..9492d9a26a 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -679,9 +679,9 @@ (define icecat-source "--sort=name" icecat-dir))))))))) -(define-public icecat +(define-public icecat-minimal (package - (name "icecat") + (name "icecat-minimal") (version %icecat-version) (source icecat-source) (build-system gnu-build-system) @@ -1303,9 +1303,9 @@ (define icedove-source "--sort=name" #$name)))))))) -(define-public icedove +(define-public icedove-minimal (package - (name "icedove") + (name "icedove-minimal") (version %icedove-version) (source icedove-source) (properties @@ -1555,35 +1555,6 @@ (define-public icedove Thunderbird. It supports email, news feeds, chat, calendar and contacts.") (license license:mpl2.0))) -(define-public icedove/wayland - (package - (inherit icedove) - (name "icedove-wayland") - (build-system trivial-build-system) - (arguments - (list - #:modules '((guix build utils)) - #:builder - #~(begin - (use-modules (guix build utils)) - (let* ((exe (string-append #$output "/bin/icedove"))) - (mkdir-p (dirname exe)) - (call-with-output-file exe - (lambda (port) - (format port "#!~a - MOZ_ENABLE_WAYLAND=1 exec ~a $@" - #$(file-append bash-minimal "/bin/bash") - #$(file-append icedove "/bin/icedove")))) - (chmod exe #o555) - ;; Provide the manual and .desktop file. - (copy-recursively (string-append #$icedove "/share") - (string-append #$output "/share")) - (substitute* (string-append #$output - "/share/applications/icedove.desktop") - ((#$icedove) #$output)))))) - (native-inputs '()) - (inputs '()))) - (define (make-l10n-package project) "Return a package for PROJECT, a symbol (either icecat or icedove). It assumes the %PROJECT-VERSION, PROJECT-SOURCE and %PROJECT-LOCALES variables @@ -1705,9 +1676,101 @@ (define (find-file dir name) associated with their name.")) (license license:mpl2.0)))) -(define-public icecat-l10n (make-l10n-package 'icecat)) +(define icecat-l10n (make-l10n-package 'icecat)) + +(define icedove-l10n (make-l10n-package 'icedove)) + +;;; This hack exists because there's no way to configure extra extension +;;; search paths for IceCat or Icedove. The global extensions directory is +;;; constructed relatively to the executable file name. +(define (make-mozilla-with-l10n project) + (let ((base (module-ref (current-module) + (symbol-append project '-minimal))) + (l10n-package (module-ref (current-module) + (symbol-append project '-l10n))) + (name (symbol->string project)) + (icecat? (eq? 'icecat project))) + (package + (inherit base) + (name (symbol->string project)) + (build-system trivial-build-system) + (arguments + (list + #:modules '((guix build union) + (guix build utils)) + #:builder + #~(begin + (use-modules (guix build union) + (guix build utils)) + + (union-build #$output (list #$base #$l10n-package) + #:create-all-directories? #t) + + (define* (expose name #:optional (proc copy-file) + #:key (source #$base)) + (let ((dest (string-append #$output "/" name))) + (mkdir-p (dirname dest)) + (proc (string-append source "/" name) dest))) + + (let ((wrapper (string-append "lib/" #$name "/" #$name)) + (real-binary (string-append "lib/" #$name "/." #$name + "-real")) + (desktop-file (string-append "share/applications/" + #$name ".desktop"))) + ;; Copy wrapper file. + (delete-file (string-append #$output "/" wrapper)) + (expose wrapper) + + ;; Recreate bin symlink. + (delete-file (string-append #$output "/bin/" #$name)) + (symlink (string-append #$output "/" wrapper) + (string-append #$output "/bin/" #$name)) + + ;; Copy actual binary. + (delete-file (string-append #$output "/" real-binary)) + (expose real-binary) + + ;; Copy desktop file. + (delete-file (string-append #$output "/" desktop-file)) + (expose desktop-file) + + ;; Adjust the references in the desktop file and wrapper. + (substitute* (list (string-append #$output "/" desktop-file) + (string-append #$output "/" wrapper)) + ((#$base) #$output))))))))) + +(define-public icecat (make-mozilla-with-l10n 'icecat)) + +(define-public icedove (make-mozilla-with-l10n 'icedove)) -(define-public icedove-l10n (make-l10n-package 'icedove)) +(define-public icedove/wayland + (package + (inherit icedove) + (name "icedove-wayland") + (build-system trivial-build-system) + (arguments + (list + #:modules '((guix build utils)) + #:builder + #~(begin + (use-modules (guix build utils)) + (let* ((exe (string-append #$output "/bin/icedove"))) + (mkdir-p (dirname exe)) + (call-with-output-file exe + (lambda (port) + (format port "#!~a + MOZ_ENABLE_WAYLAND=1 exec ~a $@" + #$(file-append bash-minimal "/bin/bash") + #$(file-append icedove "/bin/icedove")))) + (chmod exe #o555) + ;; Provide the manual and .desktop file. + (copy-recursively (string-append #$icedove "/share") + (string-append #$output "/share")) + (substitute* (string-append #$output + "/share/applications/icedove.desktop") + ((#$icedove) #$output)))))) + (native-inputs '()) + (inputs '()))) (define-public firefox-decrypt (package -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 08/10] gnu: icedove: Use the locale of the system. 2023-02-16 4:36 ` bug#32026: [PATCH 01/10] gnu: Add a 'update-mozilla-locales' helper for maintenance Maxim Cournoyer ` (5 preceding siblings ...) 2023-02-16 4:36 ` bug#32026: [PATCH 07/10] gnu: Add language packs to icecat and icedove Maxim Cournoyer @ 2023-02-16 4:36 ` Maxim Cournoyer 2023-02-16 4:36 ` bug#32026: [PATCH 09/10] gnu: icecat: Remove gtk+-2 input Maxim Cournoyer ` (2 subsequent siblings) 9 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-16 4:36 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer * gnu/packages/gnuzilla.scm (icedove-source): Set the intl.locale.requested option to the empty string. --- (no changes since v1) gnu/packages/gnuzilla.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 9492d9a26a..fa868f6824 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -1289,7 +1289,12 @@ (define icedove-source ;; system global application directory, such as the language ;; packs. (("\"extensions.autoDisableScopes\", 15") - "\"extensions.autoDisableScopes\", 3")) + "\"extensions.autoDisableScopes\", 3") + + ;; Set the default locale to that of the operating system. + ((".*extensions.autoDisableScopes.*" anchor) + (string-append anchor + "pref(\"intl.locale.requested\", \"\");\n"))) ;; Step out of the directory and create the tarball. (chdir "..") -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 09/10] gnu: icecat: Remove gtk+-2 input. 2023-02-16 4:36 ` bug#32026: [PATCH 01/10] gnu: Add a 'update-mozilla-locales' helper for maintenance Maxim Cournoyer ` (6 preceding siblings ...) 2023-02-16 4:36 ` bug#32026: [PATCH 08/10] gnu: icedove: Use the locale of the system Maxim Cournoyer @ 2023-02-16 4:36 ` Maxim Cournoyer 2023-02-16 22:50 ` Mark H Weaver 2023-02-16 4:36 ` bug#32026: [PATCH 10/10] gnu: icecat: Unbundle nss and nspr Maxim Cournoyer 2023-02-16 22:05 ` bug#32026: [PATCH 01/10] gnu: Add a 'update-mozilla-locales' helper for maintenance Mark H Weaver 9 siblings, 1 reply; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-16 4:36 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer * gnu/packages/gnuzilla.scm (icecat-minimal) [inputs]: Remove gtk+-2. --- Changes in v2: - New commit gnu/packages/gnuzilla.scm | 1 - 1 file changed, 1 deletion(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index fa868f6824..8e90327ea4 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -693,7 +693,6 @@ (define-public icecat-minimal gdk-pixbuf glib gtk+ - gtk+-2 ;; UNBUNDLE-ME! graphite2 cairo pango -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 09/10] gnu: icecat: Remove gtk+-2 input. 2023-02-16 4:36 ` bug#32026: [PATCH 09/10] gnu: icecat: Remove gtk+-2 input Maxim Cournoyer @ 2023-02-16 22:50 ` Mark H Weaver 0 siblings, 0 replies; 80+ messages in thread From: Mark H Weaver @ 2023-02-16 22:50 UTC (permalink / raw) To: Maxim Cournoyer, 32026; +Cc: ludo, Jonathan Brielmaier, Maxim Cournoyer Hi Maxim, Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: > * gnu/packages/gnuzilla.scm (icecat-minimal) [inputs]: Remove gtk+-2. Looks good to me, except that the commit log should say 'icecat' instead of 'icecat-minimal' if it's pushed now. Thanks, Mark ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 10/10] gnu: icecat: Unbundle nss and nspr. 2023-02-16 4:36 ` bug#32026: [PATCH 01/10] gnu: Add a 'update-mozilla-locales' helper for maintenance Maxim Cournoyer ` (7 preceding siblings ...) 2023-02-16 4:36 ` bug#32026: [PATCH 09/10] gnu: icecat: Remove gtk+-2 input Maxim Cournoyer @ 2023-02-16 4:36 ` Maxim Cournoyer 2023-02-16 22:14 ` Mark H Weaver 2023-02-16 22:05 ` bug#32026: [PATCH 01/10] gnu: Add a 'update-mozilla-locales' helper for maintenance Mark H Weaver 9 siblings, 1 reply; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-16 4:36 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer * gnu/packages/gnuzilla.scm (icecat-minimal) [inputs]: Add nspr-next and nss-next. [configure-flags]: Re-instate the "--with-system-nspr" and "--with-system-nss" configure flags. [phases] {remove-bundled-libraries}: Update comment. --- Changes in v2: - New commit gnu/packages/gnuzilla.scm | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 8e90327ea4..ced3f75ecf 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -723,10 +723,8 @@ (define-public icecat-minimal mit-krb5 hunspell libnotify - ;; See <https://bugs.gnu.org/32833> - ;; and related comments in the 'remove-bundled-libraries' phase. - ;; UNBUNDLE-ME! nspr - ;; UNBUNDLE-ME! nss + nspr-next + nss-next shared-mime-info sqlite eudev @@ -821,12 +819,8 @@ (define-public icecat-minimal ;; UNBUNDLE-ME! "--with-system-theora" ; wants theora-1.2, not yet released ;; UNBUNDLE-ME! "--with-system-libvpx" "--with-system-icu" - - ;; See <https://bugs.gnu.org/32833> - ;; and related comments in the - ;; 'remove-bundled-libraries' phase below. - ;; UNBUNDLE-ME! "--with-system-nspr" - ;; UNBUNDLE-ME! "--with-system-nss" + "--with-system-nspr" + "--with-system-nss" ;; UNBUNDLE-ME! "--with-system-harfbuzz" ;; UNBUNDLE-ME! "--with-system-graphite2" @@ -875,12 +869,9 @@ (define-public icecat-minimal ;; FIXME: A script from the bundled nspr is used. ;;"nsprpub" ;; - ;; FIXME: With the update to IceCat 60, using system NSS - ;; broke certificate validation. See - ;; <https://bugs.gnu.org/32833>. For now, we use - ;; the bundled NSPR and NSS. TODO: Investigate, - ;; and try to unbundle these libraries again. - ;; UNBUNDLE-ME! "security/nss" + ;; FIXME: Some of the bundled NSS sources are used + ;; to build third_party/prio. + ;;"security/nss" ;; ;; TODO: Use more system media libraries. See: ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=517422> -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 10/10] gnu: icecat: Unbundle nss and nspr. 2023-02-16 4:36 ` bug#32026: [PATCH 10/10] gnu: icecat: Unbundle nss and nspr Maxim Cournoyer @ 2023-02-16 22:14 ` Mark H Weaver 2023-02-17 19:44 ` Maxim Cournoyer 0 siblings, 1 reply; 80+ messages in thread From: Mark H Weaver @ 2023-02-16 22:14 UTC (permalink / raw) To: Maxim Cournoyer, 32026; +Cc: ludo, Jonathan Brielmaier, Maxim Cournoyer Hi Maxim, Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: > * gnu/packages/gnuzilla.scm (icecat-minimal) [inputs]: Add nspr-next and > nss-next. > [configure-flags]: Re-instate the "--with-system-nspr" and "--with-system-nss" > configure flags. > [phases] {remove-bundled-libraries}: Update comment. This is really great, thank you! There's just one transient issue that makes me want to hold off on this: As I recently reported to guix-security, a Mozilla security advisory <https://www.mozilla.org/en-US/security/advisories/mfsa2023-06/> published on Tuesday mentions "CVE-2023-0767: Arbitrary memory write via PKCS 12 in NSS". I'd like someone to confirm that this issue has been fixed in 'nss-next' before applying this commit. I don't have time to check it myself right now. Thanks, Mark ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 10/10] gnu: icecat: Unbundle nss and nspr. 2023-02-16 22:14 ` Mark H Weaver @ 2023-02-17 19:44 ` Maxim Cournoyer 2023-02-18 1:02 ` Mark H Weaver 0 siblings, 1 reply; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-17 19:44 UTC (permalink / raw) To: Mark H Weaver; +Cc: 32026, ludo, Jonathan Brielmaier Hi Mark, Mark H Weaver <mhw@netris.org> writes: > Hi Maxim, > > Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: > >> * gnu/packages/gnuzilla.scm (icecat-minimal) [inputs]: Add nspr-next and >> nss-next. >> [configure-flags]: Re-instate the "--with-system-nspr" and "--with-system-nss" >> configure flags. >> [phases] {remove-bundled-libraries}: Update comment. > > This is really great, thank you! > > There's just one transient issue that makes me want to hold off on this: > As I recently reported to guix-security, a Mozilla security advisory > <https://www.mozilla.org/en-US/security/advisories/mfsa2023-06/> > published on Tuesday mentions "CVE-2023-0767: Arbitrary memory write via > PKCS 12 in NSS". I'd like someone to confirm that this issue has been > fixed in 'nss-next' before applying this commit. I don't have time to > check it myself right now. I've updated nss-next to 3.88.1 on master, which is supposed to fix this CVE, and pushed the whole revised series as v3. -- Thanks, Maxim ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 10/10] gnu: icecat: Unbundle nss and nspr. 2023-02-17 19:44 ` Maxim Cournoyer @ 2023-02-18 1:02 ` Mark H Weaver 2023-02-18 14:09 ` Maxim Cournoyer 0 siblings, 1 reply; 80+ messages in thread From: Mark H Weaver @ 2023-02-18 1:02 UTC (permalink / raw) To: Maxim Cournoyer; +Cc: 32026, ludo, Jonathan Brielmaier Hi Maxim, Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: > I've updated nss-next to 3.88.1 on master, which is supposed to fix this > CVE, [...] Great, thanks! Could you please make sure that 'nspr-next' is up-to-date as well? It would be good to avoid inadvertently downgrading the NSPR used by IceCat. I don't know off-hand what fixes might be undone as a result. Mark ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 10/10] gnu: icecat: Unbundle nss and nspr. 2023-02-18 1:02 ` Mark H Weaver @ 2023-02-18 14:09 ` Maxim Cournoyer 0 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-18 14:09 UTC (permalink / raw) To: Mark H Weaver; +Cc: 32026, ludo, Jonathan Brielmaier Hi Mark, Mark H Weaver <mhw@netris.org> writes: > Hi Maxim, > > Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: >> I've updated nss-next to 3.88.1 on master, which is supposed to fix this >> CVE, [...] > > Great, thanks! > > Could you please make sure that 'nspr-next' is up-to-date as well? > It would be good to avoid inadvertently downgrading the NSPR used by > IceCat. I don't know off-hand what fixes might be undone as a result. I had already verified, and if I'm correct, it's already at the latest version available (4.35) [0]. [0] https://ftp.mozilla.org/pub/nspr/releases/ -- Thanks, Maxim ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 01/10] gnu: Add a 'update-mozilla-locales' helper for maintenance. 2023-02-16 4:36 ` bug#32026: [PATCH 01/10] gnu: Add a 'update-mozilla-locales' helper for maintenance Maxim Cournoyer ` (8 preceding siblings ...) 2023-02-16 4:36 ` bug#32026: [PATCH 10/10] gnu: icecat: Unbundle nss and nspr Maxim Cournoyer @ 2023-02-16 22:05 ` Mark H Weaver 2023-02-17 2:25 ` Maxim Cournoyer 9 siblings, 1 reply; 80+ messages in thread From: Mark H Weaver @ 2023-02-16 22:05 UTC (permalink / raw) To: Maxim Cournoyer, 32026; +Cc: ludo, Jonathan Brielmaier, Maxim Cournoyer Hi Maxim, Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: > * gnu/packages/gnuzilla.scm (update-mozilla-locales): New procedure. > (all-mozilla-locales): Comment how to proceed to update it. [...] > +(define (update-mozilla-locales changesets.json) > + "Output a new list of Mozilla locales, to update the ALL-MOZILLA-LOCALES > +variable defined bellow. It requires guile-json to be installed." > + ;; To extract the file used as argument, do: > + ;; tar -xf $(./pre-inst-env guix build \ > + ;; -e '(@@ (gnu packages gnuzilla) upstream-firefox-source)') \ > + ;; --strip-components=3 \ > + ;; --wildcards '*/browser/locales/l10n-changesets.json' > + (match (call-with-input-file changesets.json json->scm) > + (((lang ("revision" . revision) platforms pin) ...) > + (let ((data (reverse (map (lambda (rev lang) > + `(,(list->string (make-list 40 #\0)) > + ,(string-take rev 12) ,lang)) > + revision lang)))) > + (format #t "~{~s~%~}" data) > + data)))) Thanks very much for this! I didn't know about the browser/locales/l10n-changesets.json file, and neither does the code in the upstream 'makeicecat' script, which simply uses "hg clone" to fetch the latest revisions at the time the 'makeicecat' script is run. Now we can change that code to use the revisions listed in 'l10n-changesets.json' instead, and thus eliminate a source of nondeterminism for non-Guix users of IceCat. However, I'd like to propose a different way to make use of this code. Instead of adding this new toplevel procedure that must be run manually, which involves steering the user toward the 'upstream-firefox-source' variable (which therefore must be promoted to a toplevel binding), all of which makes me extremely uncomfortable, how about the following: I propose adding a check to the code that populates the l10n directory in 'icecat-source'. That code has access to the unpacked firefox source directory, and already makes use of '#+all-mozilla-locales'. It's in a perfect position to check whether '#+all-mozilla-locales' is up-to-date w.r.t. browser/locales/l10n-changesets.json. My suggestion would be this: if '#+all-mozilla-locales' is not up-to-date, print an error report with the relevant information and force the derivation to *fail*. What do you think? If the idea sounds good to you, would you like to work on it, or should I? Thanks again for your work on this! Regards, Mark ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH 01/10] gnu: Add a 'update-mozilla-locales' helper for maintenance. 2023-02-16 22:05 ` bug#32026: [PATCH 01/10] gnu: Add a 'update-mozilla-locales' helper for maintenance Mark H Weaver @ 2023-02-17 2:25 ` Maxim Cournoyer 0 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-17 2:25 UTC (permalink / raw) To: Mark H Weaver; +Cc: 32026, ludo, Jonathan Brielmaier Hi Mark, Mark H Weaver <mhw@netris.org> writes: > Hi Maxim, > > Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: > >> * gnu/packages/gnuzilla.scm (update-mozilla-locales): New procedure. >> (all-mozilla-locales): Comment how to proceed to update it. > > [...] > >> +(define (update-mozilla-locales changesets.json) >> + "Output a new list of Mozilla locales, to update the ALL-MOZILLA-LOCALES >> +variable defined bellow. It requires guile-json to be installed." >> + ;; To extract the file used as argument, do: >> + ;; tar -xf $(./pre-inst-env guix build \ >> + ;; -e '(@@ (gnu packages gnuzilla) upstream-firefox-source)') \ >> + ;; --strip-components=3 \ >> + ;; --wildcards '*/browser/locales/l10n-changesets.json' >> + (match (call-with-input-file changesets.json json->scm) >> + (((lang ("revision" . revision) platforms pin) ...) >> + (let ((data (reverse (map (lambda (rev lang) >> + `(,(list->string (make-list 40 #\0)) >> + ,(string-take rev 12) ,lang)) >> + revision lang)))) >> + (format #t "~{~s~%~}" data) >> + data)))) > > Thanks very much for this! I didn't know about the > browser/locales/l10n-changesets.json file, and neither does the code in > the upstream 'makeicecat' script, which simply uses "hg clone" to fetch > the latest revisions at the time the 'makeicecat' script is run. Now we > can change that code to use the revisions listed in > 'l10n-changesets.json' instead, and thus eliminate a source of > nondeterminism for non-Guix users of IceCat. > > However, I'd like to propose a different way to make use of this code. > > Instead of adding this new toplevel procedure that must be run manually, > which involves steering the user toward the 'upstream-firefox-source' > variable (which therefore must be promoted to a toplevel binding), all > of which makes me extremely uncomfortable, how about the following: > > I propose adding a check to the code that populates the l10n directory > in 'icecat-source'. That code has access to the unpacked firefox source > directory, and already makes use of '#+all-mozilla-locales'. It's in a > perfect position to check whether '#+all-mozilla-locales' is up-to-date > w.r.t. browser/locales/l10n-changesets.json. > > My suggestion would be this: if '#+all-mozilla-locales' is not > up-to-date, print an error report with the relevant information and > force the derivation to *fail*. > > What do you think? If the idea sounds good to you, would you like to > work on it, or should I? It's a good idea, but I don't think it's worth implementing at this point, given that Mozilla will soon provide us with a strings_all.tar.zst tarball per release, which will include both Firefox and Thunderbird l10n data (it'll be available along the releases tarball) [0]. This will obsolete all this tedious work of keeping hashes up to date. [0] https://bugzilla.mozilla.org/show_bug.cgi?id=1817086 -- Thanks, Maxim ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH v3 01/11] gnu: Add a 'update-mozilla-locales' helper for maintenance. 2018-07-01 20:23 bug#32026: IceCat locales are missing? Ludovic Courtès 2023-02-14 1:55 ` bug#32026: [PATCH 00/10] Add proper locale support to IceCat and Icedove Maxim Cournoyer 2023-02-16 4:36 ` bug#32026: [PATCH 01/10] gnu: Add a 'update-mozilla-locales' helper for maintenance Maxim Cournoyer @ 2023-02-17 12:55 ` Maxim Cournoyer 2023-02-17 12:55 ` bug#32026: [PATCH v3 02/11] gnu: icedove: Compute a self-contained source Maxim Cournoyer ` (9 more replies) 2023-02-19 19:23 ` bug#32026: [PATCH v4 1/9] gnu: Add a 'update-mozilla-locales' helper for maintenance Maxim Cournoyer 3 siblings, 10 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-17 12:55 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer * gnu/packages/gnuzilla.scm (update-mozilla-locales): New procedure. (all-mozilla-locales): Comment how to proceed to update it. --- (no changes since v1) gnu/packages/gnuzilla.scm | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index b2e0870fea..2011555d47 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -37,6 +37,7 @@ (define-module (gnu packages gnuzilla) #:use-module ((srfi srfi-1) #:hide (zip)) + #:use-module (ice-9 format) #:use-module (ice-9 match) #:use-module (gnu packages) #:use-module ((guix licenses) #:prefix license:) @@ -91,7 +92,8 @@ (define-module (gnu packages gnuzilla) #:use-module (gnu packages xiph) #:use-module (gnu packages xdisorg) #:use-module (gnu packages readline) - #:use-module (gnu packages sqlite)) + #:use-module (gnu packages sqlite) + #:autoload (json parser) (json->scm)) (define-public mozjs (package @@ -348,6 +350,10 @@ (define-public mozjs-78 (inputs (list icu4c readline zlib)))) +\f +;;; +;;; Localization helper procedures. +;;; (define mozilla-compare-locales (origin (method hg-fetch) @@ -371,6 +377,27 @@ (define-syntax-rule (mozilla-locales (hash-string changeset locale) ...) (list (mozilla-locale locale changeset hash-string) ...)) +(define (update-mozilla-locales changesets.json) + "Output a new list of Mozilla locales, to update the ALL-MOZILLA-LOCALES +variable defined bellow. It requires guile-json to be installed." + ;; To extract the file used as argument, do: + ;; tar -xf $(./pre-inst-env guix build \ + ;; -e '(@@ (gnu packages gnuzilla) upstream-firefox-source)') \ + ;; --strip-components=3 \ + ;; --wildcards '*/browser/locales/l10n-changesets.json' + (match (call-with-input-file changesets.json json->scm) + (((lang ("revision" . revision) platforms pin) ...) + (let ((data (reverse (map (lambda (rev lang) + `(,(list->string (make-list 40 #\0)) + ,(string-take rev 12) ,lang)) + revision lang)))) + (format #t "~{~s~%~}" data) + data)))) + +;;; This list must be maintained by hand by comparing with the entries in the +;;; browser/locales/l10n-changesets.json file in the Firefox source (see the +;;; 'update-mozilla-locales' procedure above which aims to make this a bit +;;; easier). (define all-mozilla-locales (mozilla-locales ;; sha256 changeset locale base-commit: 23d56ba150ddeaa58e96b3ecf9df251fbd05ed00 -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH v3 02/11] gnu: icedove: Compute a self-contained source. 2023-02-17 12:55 ` bug#32026: [PATCH v3 01/11] " Maxim Cournoyer @ 2023-02-17 12:55 ` Maxim Cournoyer 2023-02-17 12:55 ` bug#32026: [PATCH v3 03/11] gnu: Define UPSTREAM-FIREFOX-SOURCE at the top level Maxim Cournoyer ` (8 subsequent siblings) 9 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-17 12:55 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer This refactoring work is to prepare for adding a icedove-l10n package, which will reuse that source. * gnu/packages/gnuzilla.scm (comm-source->locales+changset): New procedure. (thunderbird-source): Rename to... (thunderbird-comm-source): ... here. (icedove-source): New variable. (icedove) [source]: Use it. [phases]: Remove the prepare-thunderbird-sources and rename-to-icedove phases. --- (no changes since v2) Changes in v2: - Fix typo in comm-source->locales+changset - Reword comment gnu/packages/gnuzilla.scm | 210 +++++++++++++++++++++++++------------- 1 file changed, 140 insertions(+), 70 deletions(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 2011555d47..1ed52c68e9 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -47,6 +47,7 @@ (define-module (gnu packages gnuzilla) #:use-module (guix hg-download) #:use-module (guix gexp) #:use-module (guix store) + #:use-module (guix modules) #:use-module (guix monads) #:use-module (guix utils) #:use-module (guix build-system gnu) @@ -1128,7 +1129,7 @@ (define %icedove-version "102.7.2") ;; Provides the "comm" folder which is inserted into the icecat source. ;; Avoids the duplication of Icecat's source tarball. -(define thunderbird-source +(define thunderbird-comm-source (origin (method hg-fetch) (uri (hg-reference @@ -1139,11 +1140,148 @@ (define thunderbird-source (base32 "071q0pcfvfpzx741ly1sl8anlmzx02h17w4ylfnrkwrpaclq3p6p")))) +(define (comm-source->locales+changeset source) + "Given SOURCE, a checkout of the Thunderbird 'comm' component, return the +list of languages supported as well as the currently used changeset." + (match (update-mozilla-locales + (string-append source "/mail/locales/l10n-changesets.json")) + (((_ changeset locale) ...) + (values locale (first changeset))))) + +;;; To find out which changeset to use for the comm-l10n repo, use the +;;; 'comm-source->locales+changeset' procedure on the thunderbird-comm-source +;;; checkout directory. The complete localization data should be released as +;;; a tarball in the next release (see: +;;; https://bugzilla.mozilla.org/show_bug.cgi?id=1817086). When this tarball +;;; is available, it should replace the complete 'l10n' directory at the root +;;; of the IceCat source, instead of only the 'calendar', chat and mail +;;; directories that it provides. +(define thunderbird-comm-l10n + (let* ((changeset "5b6788295358") + (version (git-version %icedove-version "0" changeset))) + (origin + (method hg-fetch) + (uri (hg-reference + (url "https://hg.mozilla.org/projects/comm-l10n") + (changeset changeset))) + (file-name (git-file-name "comm-l10n" version)) + (sha256 + (base32 + "1jrsmkscjjllcfawi3788vwm53wn25inbhdis5nk4vfpr7wk5ill"))))) + +(define icedove-source + (let ((name (string-append "icedove-" %icedove-version))) + (origin + (method computed-origin-method) + (file-name (string-append name ".tar.xz")) + (sha256 #f) + (uri + (delay + (with-imported-modules (source-module-closure '((guix build utils))) + #~(begin + (use-modules (guix build utils) + (sxml simple)) + + (set-path-environment-variable + "PATH" '("bin") + (list #+(canonical-package tar) + #+(canonical-package xz))) + + ;; Extract the base Icecat tarball, renaming its top-level + ;; directory. + (invoke "tar" "--transform" (string-append "s,[^/]*," #$name ",") + "-xf" #$icecat-source) + (chdir #$name) + + ;; Merge the Thunderdbird localization data. + (copy-recursively #$thunderbird-comm-l10n "l10n") + + ;; Add the Thunderbird-specific "comm" directory.. + (mkdir "comm") + (copy-recursively #$thunderbird-comm-source "comm") + (delete-file "sourcestamp.txt") + + ;; Adjust the application name. + (substitute* "comm/mail/confvars.sh" + (("MOZ_APP_NAME=thunderbird") + "MOZ_APP_NAME=icedove") + (("MOZ_UPDATER=1") + "MOZ_UPDATER=0")) + + ;; Remove branding to comply with Mozilla's trademark policy + (with-directory-excursion "comm/mail/branding/nightly" + (delete-file "content/about-wordmark.svg") + (call-with-output-file "content/about-wordmark.svg" + (lambda (port) + (sxml->xml '(svg (@ (xmlns "http://www.w3.org/2000/svg") + (viewBox "0 0 789.1 90.78") + (width "333") + (height "48") + (fill "#fff")) + (text (@ (x "400") (y "70") + (text-anchor "middle") + (font-size "90")) + "Icedove Daily")) + port))) + (substitute* '("locales/en-US/brand.properties" + "locales/en-US/brand.ftl" + "locales/en-US/brand.dtd" + "configure.sh") + (("Thunderbird") "Icedove") + (("mozilla.org") "guix.gnu.org"))) + ;; Remove other mentions of Thunderbird in user-visible text. + (with-directory-excursion "comm/mail/base/content" + (substitute* '("overrides/app-license-name.html") + (("Thunderbird") "Icedove"))) + (with-directory-excursion "comm/mail/components/" + (substitute* '("MailGlue.jsm" + "extensions/schemas/addressBook.json" + "extensions/schemas/tabs.json" + "extensions/schemas/cloudFile.json" + "extensions/schemas/chrome_settings_overrides.json" + "extensions/schemas/windows.json" + "extensions/parent/ext-mail.js" + "im/messages/mail/Info.plist" + "enterprisepolicies/moz.build" + "enterprisepolicies/helpers/moz.build" + "enterprisepolicies/schemas/moz.build") + (("Thunderbird") "Icedove"))) + (substitute* '("comm/mailnews/base/prefs/content/accountUtils.js" + "comm/mail/base/content/customizeToolbar.js" + "comm/suite/components/customizeToolbar.js") + (("AppConstants.MOZ_APP_NAME (.)= \"thunderbird" _ e) + (format #f "AppConstants.MOZ_APP_NAME ~a= \"icedove" e))) + + ;; Override addon URLs and settings + (substitute* "comm/mail/app/profile/all-thunderbird.js" + (("(pref\\(\"extensions.webservice.discoverURL\").*" _ m) + (string-append m ", \"https://directory.fsf.org/wiki/Icedove\");")) + (("(pref\\(\"extensions.getAddons.search.url\").*" _ m) + (string-append m ", \"https://guix.gnu.org/packages\");")) + (("(pref\\(\"extensions.update.enabled\").*" _ m) + (string-append m ", false);")) + (("(pref\\(\"extensions.systemAddon.update.enabled\").*" _ m) + (string-append m ", false);")) + (("(pref\\(\"lightweightThemes.update.enabled\").*" _ m) + (string-append m ", false);"))) + + ;; Step out of the directory and create the tarball. + (chdir "..") + (format #t "Packing Icedove source tarball...~%") + (force-output) + (setenv "XZ_DEFAULTS" (string-join (%xz-parallel-args))) + (invoke "tar" "cfa" #$output + "--mtime=@315619200" ;1980-01-02 UTC + "--owner=root:0" + "--group=root:0" + "--sort=name" + #$name)))))))) + (define-public icedove (package (name "icedove") (version %icedove-version) - (source icecat-source) + (source icedove-source) (properties `((cpe-name . "thunderbird_esr"))) (build-system gnu-build-system) @@ -1157,11 +1295,6 @@ (define-public icedove ,@%gnu-build-system-modules) #:phases #~(modify-phases %standard-phases - (add-after 'unpack 'prepare-thunderbird-sources - (lambda _ - (mkdir "comm") - (copy-recursively #$thunderbird-source "comm") - (delete-file "sourcestamp.txt"))) (add-after 'patch-source-shebangs 'patch-cargo-checksums (lambda _ (use-modules (guix build cargo-utils)) @@ -1191,69 +1324,6 @@ (define-public icedove (substitute* "comm/mail/moz.configure" (("MOZ_DEDICATED_PROFILES, True") "MOZ_DEDICATED_PROFILES, False")))) - (add-after 'prepare-thunderbird-sources 'rename-to-icedove - (lambda _ - (substitute* "comm/mail/confvars.sh" - (("MOZ_APP_NAME=thunderbird") - "MOZ_APP_NAME=icedove") - (("MOZ_UPDATER=1") - "MOZ_UPDATER=0")) - ;; Remove branding to comply with Mozilla's trademark policy - (with-directory-excursion "comm/mail/branding/nightly" - (delete-file "content/about-wordmark.svg") - (call-with-output-file "content/about-wordmark.svg" - (lambda (port) - (sxml->xml '(svg (@ (xmlns "http://www.w3.org/2000/svg") - (viewBox "0 0 789.1 90.78") - (width "333") - (height "48") - (fill "#fff")) - (text (@ (x "400") (y "70") - (text-anchor "middle") - (font-size "90")) - "Icedove Daily")) - port))) - (substitute* '("locales/en-US/brand.properties" - "locales/en-US/brand.ftl" - "locales/en-US/brand.dtd" - "configure.sh") - (("Thunderbird") "Icedove") - (("mozilla.org") "guix.gnu.org"))) - ;; Remove other mentions of Thunderbird in user-visible text. - (with-directory-excursion "comm/mail/base/content" - (substitute* '("overrides/app-license-name.html") - (("Thunderbird") "Icedove"))) - (with-directory-excursion "comm/mail/components/" - (substitute* '("MailGlue.jsm" - "extensions/schemas/addressBook.json" - "extensions/schemas/tabs.json" - "extensions/schemas/cloudFile.json" - "extensions/schemas/chrome_settings_overrides.json" - "extensions/schemas/windows.json" - "extensions/parent/ext-mail.js" - "im/messages/mail/Info.plist" - "enterprisepolicies/moz.build" - "enterprisepolicies/helpers/moz.build" - "enterprisepolicies/schemas/moz.build") - (("Thunderbird") "Icedove"))) - (substitute* '("comm/mailnews/base/prefs/content/accountUtils.js" - "comm/mail/base/content/customizeToolbar.js" - "comm/suite/components/customizeToolbar.js") - (("AppConstants.MOZ_APP_NAME (.)= \"thunderbird" _ e) - (format #f "AppConstants.MOZ_APP_NAME ~a= \"icedove" e))) - - ;; Override addon URLs and settings - (substitute* "comm/mail/app/profile/all-thunderbird.js" - (("(pref\\(\"extensions.webservice.discoverURL\").*" _ m) - (string-append m ", \"https://directory.fsf.org/wiki/Icedove\");")) - (("(pref\\(\"extensions.getAddons.search.url\").*" _ m) - (string-append m ", \"https://guix.gnu.org/packages\");")) - (("(pref\\(\"extensions.update.enabled\").*" _ m) - (string-append m ", false);")) - (("(pref\\(\"extensions.systemAddon.update.enabled\").*" _ m) - (string-append m ", false);")) - (("(pref\\(\"lightweightThemes.update.enabled\").*" _ m) - (string-append m ", false);"))))) (add-after 'build 'neutralize-store-references (lambda _ ;; Mangle the store references to compilers & other build tools in -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH v3 03/11] gnu: Define UPSTREAM-FIREFOX-SOURCE at the top level. 2023-02-17 12:55 ` bug#32026: [PATCH v3 01/11] " Maxim Cournoyer 2023-02-17 12:55 ` bug#32026: [PATCH v3 02/11] gnu: icedove: Compute a self-contained source Maxim Cournoyer @ 2023-02-17 12:55 ` Maxim Cournoyer 2023-02-17 12:55 ` bug#32026: [PATCH v3 04/11] gnu: icecat: Make language packs reproducible Maxim Cournoyer ` (7 subsequent siblings) 9 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-17 12:55 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer * gnu/packages/gnuzilla.scm (%icecat-base-version): New variable. (%upstream-firefox-version): Likewise. (%icecat-version): Define in terms of %icecat-base-version. (upstream-firefox-source): New variable. (icecat-source): Adjust to use the above newly introduced variables. --- (no changes since v1) gnu/packages/gnuzilla.scm | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 1ed52c68e9..1bafa92377 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -505,31 +505,29 @@ (define all-mozilla-locales ;; XXXX: Workaround 'snippet' limitations. (define computed-origin-method (@@ (guix packages) computed-origin-method)) -(define %icecat-version "102.8.0-guix0-preview1") +(define %icecat-base-version "102.8.0") +(define %upstream-firefox-version (string-append %icecat-base-version "esr")) +(define %icecat-version (string-append %icecat-base-version "-guix0-preview1")) (define %icecat-build-id "20230214000000") ;must be of the form YYYYMMDDhhmmss +(define upstream-firefox-source + (origin + (method url-fetch) + (uri (string-append + "https://ftp.mozilla.org/pub/firefox/releases/" + %upstream-firefox-version "/source/" + "firefox-" %upstream-firefox-version ".source.tar.xz")) + (sha256 + (base32 + "0j6afrgfsmd0adbbmffw4p1f2hznpck9d36z3bsjx36f7cjgdy27")))) + ;; 'icecat-source' is a "computed" origin that generates an IceCat tarball ;; from the corresponding upstream Firefox ESR tarball, using the 'makeicecat' ;; script from the upstream IceCat project. (define icecat-source - (let* ((base-version (first (string-split %icecat-version #\-))) - - (major-version (first (string-split base-version #\.))) - (minor-version (second (string-split base-version #\.))) - (sub-version (third (string-split base-version #\.))) - - (upstream-firefox-version (string-append base-version "esr")) - (upstream-firefox-source - (origin - (method url-fetch) - (uri (string-append - "https://ftp.mozilla.org/pub/firefox/releases/" - upstream-firefox-version "/source/" - "firefox-" upstream-firefox-version ".source.tar.xz")) - (sha256 - (base32 - "0j6afrgfsmd0adbbmffw4p1f2hznpck9d36z3bsjx36f7cjgdy27")))) - + (let* ((major-version (first (string-split %icecat-base-version #\.))) + (minor-version (second (string-split %icecat-base-version #\.))) + (sub-version (third (string-split %icecat-base-version #\.))) (upstream-icecat-base-version "102.8.0") ; maybe older than base-version ;;(gnuzilla-commit (string-append "v" upstream-icecat-base-version)) (gnuzilla-commit "03d9e3db5affe21db077c410ec08c313d6aa280e") @@ -562,7 +560,7 @@ (define icecat-source #~(begin (use-modules (guix build utils)) (let ((firefox-dir - (string-append "firefox-" #$base-version)) + (string-append "firefox-" #$%icecat-base-version)) (icecat-dir (string-append "icecat-" #$%icecat-version))) -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH v3 04/11] gnu: icecat: Make language packs reproducible. 2023-02-17 12:55 ` bug#32026: [PATCH v3 01/11] " Maxim Cournoyer 2023-02-17 12:55 ` bug#32026: [PATCH v3 02/11] gnu: icedove: Compute a self-contained source Maxim Cournoyer 2023-02-17 12:55 ` bug#32026: [PATCH v3 03/11] gnu: Define UPSTREAM-FIREFOX-SOURCE at the top level Maxim Cournoyer @ 2023-02-17 12:55 ` Maxim Cournoyer 2023-02-18 21:02 ` Mark H Weaver 2023-02-17 12:55 ` bug#32026: [PATCH v3 05/11] gnu: Add icecat-l10n and icedove-l10n Maxim Cournoyer ` (6 subsequent siblings) 9 siblings, 1 reply; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-17 12:55 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer * gnu/packages/patches/icecat-reproducible-langpacks.patch: New file. * gnu/local.mk (dist_patch_DATA): Register. it. * gnu/packages/gnuzilla.scm (icecat-source): Apply it. --- (no changes since v1) gnu/local.mk | 1 + gnu/packages/gnuzilla.scm | 1 + .../icecat-reproducible-langpacks.patch | 45 +++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 gnu/packages/patches/icecat-reproducible-langpacks.patch diff --git a/gnu/local.mk b/gnu/local.mk index 5fcbdd4586..ddc5796ca8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1327,6 +1327,7 @@ dist_patch_DATA = \ %D%/packages/patches/i7z-gcc-10.patch \ %D%/packages/patches/icecat-makeicecat.patch \ %D%/packages/patches/icecat-avoid-bundled-libraries.patch \ + %D%/packages/patches/icecat-reproducible-langpacks.patch \ %D%/packages/patches/icecat-use-system-graphite2+harfbuzz.patch \ %D%/packages/patches/icecat-use-system-media-libs.patch \ %D%/packages/patches/icedtea-7-hotspot-aarch64-use-c++98.patch\ diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 1bafa92377..17edb9fa7e 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -554,6 +554,7 @@ (define icecat-source (method computed-origin-method) (file-name (string-append "icecat-" %icecat-version ".tar.xz")) (sha256 #f) + (patches (search-patches "icecat-reproducible-langpacks.patch")) (uri (delay (with-imported-modules '((guix build utils)) diff --git a/gnu/packages/patches/icecat-reproducible-langpacks.patch b/gnu/packages/patches/icecat-reproducible-langpacks.patch new file mode 100644 index 0000000000..b36a770cc6 --- /dev/null +++ b/gnu/packages/patches/icecat-reproducible-langpacks.patch @@ -0,0 +1,45 @@ +Prevent the extension manifests from embedding the current date. + +This is inspired by the Debian +"Use-build-id-as-langpack-version-for-reproducibility.patch" maintained for +their Firefox package as well as reproducible-builds.org guidelines from +https://reproducible-builds.org/docs/source-date-epoch/. + +Upstream status: https://phabricator.services.mozilla.com/D169979 + +--- ./python/mozbuild/mozbuild/action/langpack_manifest.py.old 2023-02-13 11:01:21.051537347 -0500 ++++ ./python/mozbuild/mozbuild/action/langpack_manifest.py 2023-02-13 11:04:33.141817330 -0500 +@@ -36,6 +36,15 @@ + pushlog_api_url = "{0}/json-rev/{1}" + + ++import os ++import time ++import datetime ++ ++def get_build_date(): ++ """Honor SOURCE_DATE_EPOCH for reproducibility.""" ++ return datetime.datetime.utcfromtimestamp( ++ int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))) ++ + ### + # Retrievers a UTC datetime of the push for the current commit + # from a mercurial clone directory. +@@ -54,7 +63,7 @@ + with mozversioncontrol.get_repository_object(path=path) as repo: + phase = repo._run("log", "-r", ".", "-T" "{phase}") + if phase.strip() != "public": +- return datetime.datetime.utcnow() ++ return get_build_date() + repo_url = repo._run("paths", "default") + repo_url = repo_url.strip().replace("ssh://", "https://") + repo_url = repo_url.replace("hg://", "https://") +@@ -105,7 +114,7 @@ + dt = get_dt_from_hg(path) + + if dt is None: +- dt = datetime.datetime.utcnow() ++ dt = get_build_date() + + dt = dt.replace(microsecond=0) + return dt.strftime("%Y%m%d%H%M%S") -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH v3 04/11] gnu: icecat: Make language packs reproducible. 2023-02-17 12:55 ` bug#32026: [PATCH v3 04/11] gnu: icecat: Make language packs reproducible Maxim Cournoyer @ 2023-02-18 21:02 ` Mark H Weaver 2023-02-19 17:35 ` Maxim Cournoyer 0 siblings, 1 reply; 80+ messages in thread From: Mark H Weaver @ 2023-02-18 21:02 UTC (permalink / raw) To: Maxim Cournoyer, 32026; +Cc: ludo, Jonathan Brielmaier, Maxim Cournoyer Hi Maxim, Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: > * gnu/packages/patches/icecat-reproducible-langpacks.patch: New file. > * gnu/local.mk (dist_patch_DATA): Register. it. > * gnu/packages/gnuzilla.scm (icecat-source): Apply it. Instead of adding this patch in Guix, let's make the change in upstream IceCat. Among other things, adding a 'patches' field to 'icecat-source' has the unfortunate consequence of forcing an additional 'patch-and-repack' phase during the build, which unpacks the entire multigigabyte source code, applies the patch, and repacks it all again. Would you like to submit a commit to the gnuzilla repo that simply adds the 'icecat-reproducible-langpacks.patch' file to the data/patches/ directory? I guess the file names in the patch also need a component added to the front (e.g. "a/" and "b/"). If you don't want to do it, I'll do it. In any case, it should be removed from this series of commits for Guix. Does that make sense? Regards, Mark ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH v3 04/11] gnu: icecat: Make language packs reproducible. 2023-02-18 21:02 ` Mark H Weaver @ 2023-02-19 17:35 ` Maxim Cournoyer 0 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-19 17:35 UTC (permalink / raw) To: Mark H Weaver; +Cc: 32026, ludo, Jonathan Brielmaier Hi Mark, Mark H Weaver <mhw@netris.org> writes: > Hi Maxim, > > Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: >> * gnu/packages/patches/icecat-reproducible-langpacks.patch: New file. >> * gnu/local.mk (dist_patch_DATA): Register. it. >> * gnu/packages/gnuzilla.scm (icecat-source): Apply it. > > Instead of adding this patch in Guix, let's make the change in upstream > IceCat. > > Among other things, adding a 'patches' field to 'icecat-source' has the > unfortunate consequence of forcing an additional 'patch-and-repack' > phase during the build, which unpacks the entire multigigabyte source > code, applies the patch, and repacks it all again. > > Would you like to submit a commit to the gnuzilla repo that simply adds > the 'icecat-reproducible-langpacks.patch' file to the data/patches/ > directory? I guess the file names in the patch also need a component > added to the front (e.g. "a/" and "b/"). > > If you don't want to do it, I'll do it. In any case, it should be > removed from this series of commits for Guix. Done! The issue number of the patch sent is: #61633 I tested it with this: --8<---------------cut here---------------start------------->8--- modified gnu/packages/gnuzilla.scm @@ -43,6 +43,7 @@ (define-module (gnu packages gnuzilla) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix git) #:use-module (guix git-download) #:use-module (guix hg-download) #:use-module (guix gexp) @@ -523,19 +524,22 @@ (define icecat-source ;; The upstream-icecat-base-version may be older than the ;; %icecat-base-version. (upstream-icecat-base-version "102.8.0") - (gnuzilla-commit "03d9e3db5affe21db077c410ec08c313d6aa280e") + (gnuzilla-commit "fffdd8891c641a9f84a298c0a5ea42f75caec203") (gnuzilla-source - (origin - (method git-fetch) - (uri (git-reference - (url "git://git.savannah.gnu.org/gnuzilla.git") - (commit gnuzilla-commit))) - (file-name (git-file-name "gnuzilla" - ;;upstream-icecat-base-version - (string-take gnuzilla-commit 8))) - (sha256 - (base32 - "12id87nsdwm6kra0gm3d3ww8kr0xxb4yllw9wcqmnrlnmspdc1n8")))) + (git-checkout + (url "file:///home/maxim/src/gnuzilla") + (commit gnuzilla-commit)) + ;; (method git-fetch) + ;; (uri (git-reference + ;; (url "file:///home/maxim/src/gnuzilla") + ;; (commit gnuzilla-commit))) + ;; (file-name (git-file-name "gnuzilla" + ;; ;;upstream-icecat-base-version + ;; (string-take gnuzilla-commit 8))) + ;; (sha256 + ;; (base32 + ;; "12id87nsdwm6kra0gm3d3ww8kr0xxb4yllw9wcqmnrlnmspdc1n8")) + ) --8<---------------cut here---------------end--------------->8--- -- Thanks, Maxim ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH v3 05/11] gnu: Add icecat-l10n and icedove-l10n. 2023-02-17 12:55 ` bug#32026: [PATCH v3 01/11] " Maxim Cournoyer ` (2 preceding siblings ...) 2023-02-17 12:55 ` bug#32026: [PATCH v3 04/11] gnu: icecat: Make language packs reproducible Maxim Cournoyer @ 2023-02-17 12:55 ` Maxim Cournoyer 2023-02-17 12:55 ` bug#32026: [PATCH v3 06/11] gnu: icedove: Automatically load system-provided extensions Maxim Cournoyer ` (5 subsequent siblings) 9 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-17 12:55 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer * gnu/packages/gnuzilla.scm (%icecat-locales, %icedove-locales): New variable. (make-l10n-package): New procedure. (icecat-l10n, icedove-l10n): New variables. --- (no changes since v1) gnu/packages/gnuzilla.scm | 143 +++++++++++++++++++++++++++++++++++++- 1 file changed, 142 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 17edb9fa7e..7bc7ad6cec 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -17,7 +17,7 @@ ;;; Copyright © 2020, 2022 Marius Bakke <marius@gnu.org> ;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re> ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be> -;;; Copyright © 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2021 Baptiste Strazzul <bstrazzull@hotmail.fr> ;;; ;;; This file is part of GNU Guix. @@ -1123,6 +1123,16 @@ (define (runpaths-of-input label) (cpe-name . "firefox_esr") (cpe-version . ,(first (string-split version #\-))))))) +(define %icecat-locales + '("ach" "af" "an" "ar" "ast" "az" "be" "bg" "bn" "br" "bs" "ca" "cak" + "ca-valencia" "cs" "cy" "da" "de" "dsb" "el" "en-CA" "en-GB" "eo" "es-AR" + "es-CL" "es-ES" "es-MX" "et" "eu" "fa" "ff" "fi" "fr" "fy-NL" "ga-IE" "gd" + "gl" "gn" "gu-IN" "he" "hi-IN" "hr" "hsb" "hu" "hy-AM" "ia" "id" "is" "it" + "ja" "ja-JP-mac" "ka" "kab" "kk" "km" "kn" "ko" "lij" "lt" "lv" "mk" "mr" "ms" + "my" "nb-NO" "ne-NP" "nl" "nn-NO" "oc" "pa-IN" "pl" "pt-BR" "pt-PT" "rm" "ro" + "ru" "sco" "si" "sk" "sl" "son" "sq" "sr" "sv-SE" "szl" "ta" "te" "th" "tl" + "tr" "trs" "uk" "ur" "uz" "vi" "xh" "zh-CN" "zh-TW")) + (define %icedove-build-id "20230207000000") ;must be of the form YYYYMMDDhhmmss (define %icedove-version "102.7.2") @@ -1147,6 +1157,15 @@ (define (comm-source->locales+changeset source) (((_ changeset locale) ...) (values locale (first changeset))))) +;;; Generated with comm-source->locales+changeset. +(define %icedove-locales + '("af" "ar" "ast" "be" "bg" "br" "ca" "cak" "cs" "cy" "da" "de" "dsb" "el" + "en-CA" "en-GB" "es-AR" "es-ES" "es-MX" "et" "eu" "fi" "fr" "fy-NL" "ga-IE" + "gd" "gl" "he" "hr" "hsb" "hu" "hy-AM" "id" "is" "it" "ja" "ja-JP-mac" "ka" + "kab" "kk" "ko" "lt" "lv" "ms" "nb-NO" "nl" "nn-NO" "pa-IN" "pl" "pt-BR" + "pt-PT" "rm" "ro" "ru" "sk" "sl" "sq" "sr" "sv-SE" "th" "tr" "uk" "uz" "vi" + "zh-CN" "zh-TW")) + ;;; To find out which changeset to use for the comm-l10n repo, use the ;;; 'comm-source->locales+changeset' procedure on the thunderbird-comm-source ;;; checkout directory. The complete localization data should be released as @@ -1555,6 +1574,128 @@ (define-public icedove/wayland (native-inputs '()) (inputs '()))) +(define (make-l10n-package project version source locales) + "Return a package for PROJECT, a symbol (either icecat or icedove), with +their corresponding VERSION, SOURCE and LOCALES variables." + (unless (member project '(icecat icedove)) + (error "only icecat or icedove components are currently supported")) + + (let ((name (if (eq? 'icecat project) + "IceCat" + "Icedove"))) + (package + (name (format #f "~a-l10n" project)) + (version version) + (source source) + (outputs (cons "out" locales)) + (build-system gnu-build-system) + (arguments + (list + #:modules '((guix build gnu-build-system) + (guix build utils) + (ice-9 format) + (ice-9 ftw) + (srfi srfi-1) + (srfi srfi-26)) + #:tests? #f ;no tests, this is data + #:phases + #~(modify-phases %standard-phases + (delete 'bootstrap) + (delete 'install) + (replace 'configure + (lambda _ + ;; The following configuration is inspired by guidance at + ;; https://firefox-source-docs.mozilla.org/build/buildsystem/locales.html. + (call-with-output-file ".mozconfig" + (lambda (p) + (format p "~{~a~%~}" + (list (if (eq? 'icecat '#$project) + "ac_add_options --enable-project=browser" + "ac_add_options --enable-project=comm/mail") + "ac_add_options --disable-compile-environment" + (string-append + "ac_add_options --with-l10n-base=" + (getcwd) "/l10n") + ;; Hack, otherwise the build system throws: + ;; 'RuntimeError: File "brand.dtd" not found'. + "ac_add_options --enable-official-branding" + "mk_add_options MOZ_OBJDIR=obj")))) + (setenv "CONFIG_SHELL" (which "bash")) + (setenv "MOZBUILD_STATE_PATH" + (string-append (getcwd) "/mach_state")) + (setenv "MOZCONFIG" (string-append (getcwd) "/.mozconfig")) + (setenv "MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE" "system") + (setenv "BUILD_BACKENDS" "FasterMake,RecursiveMake"))) + (replace 'build ;build and install data files + (lambda* (#:key outputs #:allow-other-keys) + (define (find-file dir name) + (let ((files (find-files dir name))) + (when (null? files) + (error "could not find file in dir" name dir)) + (car files))) + + (for-each + (lambda (l) + (let* ((out (assoc-ref outputs l)) + ;; The older lib/$project/distribution/extensions + ;; directory is deprecated. Use the newer app-global + ;; directory, which is lib/$project/extensions. + (ext-dir-prefix + (format + #f "lib/~a/~:[~;browser/~]extensions" + '#$project (eq? 'icecat '#$project))) + (all-ext (string-append #$output "/" ext-dir-prefix)) + (ext-dir (string-append out "/" ext-dir-prefix)) + ;; XXX: Because Icedove doesn't have a makeicedove + ;; script that substitutes all the Thunderbird + ;; references to Icedove, the MOZ_LANGPACK_EID + ;; defined in comm/mail/locales/Makefile.in uses + ;; 'thunderbird' in its ID extension rather than + ;; 'icedove'. + (name (format #f "langpack-~a@~a.mozilla.org.xpi" + l (if (eq? 'icedove '#$project) + 'thunderbird + '#$project)))) + (format #t "processing locale `~a'...~%" l) + (if (eq? 'icecat '#$project) + ;; XXX: For some reasons, for IceCat, there are some + ;; parsing errors that cause the build system to + ;; return an unclean exit code; use system* to ignore + ;; errors. + (system* "./mach" "build" (string-append "langpack-" l)) + (invoke "./mach" "build" (string-append "langpack-" l))) + (mkdir-p ext-dir) + (let ((xpi (find-file "obj" (string-append + "\\." l "\\.langpack\\.xpi$")))) + (copy-file xpi (string-append ext-dir "/" name)) + ;; Symlink to the main output so that a user can + ;; install all of the language packs at once. + (mkdir-p all-ext) + (symlink (string-append ext-dir "/" name) + (string-append all-ext "/" name))))) + (if (eq? 'icedove '#$project) + '#$%icedove-locales + '#$%icecat-locales))))))) + (native-inputs + (list m4 + perl + python-wrapper + node + unzip)) + (home-page "https://www.mozilla.org/") + (synopsis (string-append "Language localization data for " name)) + (description (string-append "This package contains the various language +localization data files (language pack extensions) for " name ". The +individual localization packages can be installed by using the output +associated with their name.")) + (license license:mpl2.0)))) + +(define-public icecat-l10n + (make-l10n-package 'icecat %icecat-version icecat-source %icecat-locales)) + +(define-public icedove-l10n + (make-l10n-package 'icedove %icedove-version icedove-source %icedove-locales)) + (define-public firefox-decrypt (package (name "firefox-decrypt") -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH v3 06/11] gnu: icedove: Automatically load system-provided extensions. 2023-02-17 12:55 ` bug#32026: [PATCH v3 01/11] " Maxim Cournoyer ` (3 preceding siblings ...) 2023-02-17 12:55 ` bug#32026: [PATCH v3 05/11] gnu: Add icecat-l10n and icedove-l10n Maxim Cournoyer @ 2023-02-17 12:55 ` Maxim Cournoyer 2023-02-17 12:55 ` bug#32026: [PATCH v3 07/11] gnu: Add language packs to icecat and icedove Maxim Cournoyer ` (4 subsequent siblings) 9 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-17 12:55 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer * gnu/packages/gnuzilla.scm (icedove-source): Set the extensions.autoDisableScopes preference value to 3. (icedove-minimal) [phases]: Add the --allow-addon-sideload and --with-unsigned-addon-scopes=app,system ac options to the configure phase. --- (no changes since v1) gnu/packages/gnuzilla.scm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 7bc7ad6cec..3ece3f057c 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -1281,7 +1281,15 @@ (define icedove-source (("(pref\\(\"extensions.systemAddon.update.enabled\").*" _ m) (string-append m ", false);")) (("(pref\\(\"lightweightThemes.update.enabled\").*" _ m) - (string-append m ", false);"))) + (string-append m ", false);")) + + ;; XXX: The autoDisableScopes is tweaked by the makeicecat + ;; script, but it doesn't know about Thunderbird. This is + ;; necessary to allow picking up the extensions found in the + ;; system global application directory, such as the language + ;; packs. + (("\"extensions.autoDisableScopes\", 15") + "\"extensions.autoDisableScopes\", 3")) ;; Step out of the directory and create the tarball. (chdir "..") @@ -1394,6 +1402,8 @@ (define-public icedove (lambda () (display (string-append + "ac_add_options --allow-addon-sideload\n" + "ac_add_options --with-unsigned-addon-scopes=app,system\n" "ac_add_options --disable-crashreporter\n" "ac_add_options --disable-debug\n" "ac_add_options --disable-debug-symbols\n" -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH v3 07/11] gnu: Add language packs to icecat and icedove. 2023-02-17 12:55 ` bug#32026: [PATCH v3 01/11] " Maxim Cournoyer ` (4 preceding siblings ...) 2023-02-17 12:55 ` bug#32026: [PATCH v3 06/11] gnu: icedove: Automatically load system-provided extensions Maxim Cournoyer @ 2023-02-17 12:55 ` Maxim Cournoyer 2023-02-17 12:55 ` bug#32026: [PATCH v3 08/11] gnu: icedove: Use the locale of the system Maxim Cournoyer ` (3 subsequent siblings) 9 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-17 12:55 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer Fixes <https://issues.guix.gnu.org/32026>. * gnu/packages/gnuzilla.scm (icecat): Rename to... (icecat-minimal): ... this. (icedove: Rename to... (icedove-minimal): ... this. (make-mozilla-with-l10n): New procedure. (icecat, icedove): New variables. --- Changes in v3: - Make make-l10n-package more functional, taking inputs as arguments - Validate the PROJECT argument in make-l10n-package Changes in v2: - Do not clear native-inputs and inputs in make-mozilla-with-l10n, for 'guix shell -D icecat' gnu/packages/gnuzilla.scm | 133 ++++++++++++++++++++++++++++---------- 1 file changed, 100 insertions(+), 33 deletions(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 3ece3f057c..02493b9aff 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -679,9 +679,9 @@ (define icecat-source "--sort=name" icecat-dir))))))))) -(define-public icecat +(define-public icecat-minimal (package - (name "icecat") + (name "icecat-minimal") (version %icecat-version) (source icecat-source) (build-system gnu-build-system) @@ -1303,9 +1303,9 @@ (define icedove-source "--sort=name" #$name)))))))) -(define-public icedove +(define-public icedove-minimal (package - (name "icedove") + (name "icedove-minimal") (version %icedove-version) (source icedove-source) (properties @@ -1555,35 +1555,6 @@ (define-public icedove Thunderbird. It supports email, news feeds, chat, calendar and contacts.") (license license:mpl2.0))) -(define-public icedove/wayland - (package - (inherit icedove) - (name "icedove-wayland") - (build-system trivial-build-system) - (arguments - (list - #:modules '((guix build utils)) - #:builder - #~(begin - (use-modules (guix build utils)) - (let* ((exe (string-append #$output "/bin/icedove"))) - (mkdir-p (dirname exe)) - (call-with-output-file exe - (lambda (port) - (format port "#!~a - MOZ_ENABLE_WAYLAND=1 exec ~a $@" - #$(file-append bash-minimal "/bin/bash") - #$(file-append icedove "/bin/icedove")))) - (chmod exe #o555) - ;; Provide the manual and .desktop file. - (copy-recursively (string-append #$icedove "/share") - (string-append #$output "/share")) - (substitute* (string-append #$output - "/share/applications/icedove.desktop") - ((#$icedove) #$output)))))) - (native-inputs '()) - (inputs '()))) - (define (make-l10n-package project version source locales) "Return a package for PROJECT, a symbol (either icecat or icedove), with their corresponding VERSION, SOURCE and LOCALES variables." @@ -1706,6 +1677,102 @@ (define-public icecat-l10n (define-public icedove-l10n (make-l10n-package 'icedove %icedove-version icedove-source %icedove-locales)) +;;; This hack exists because there's no way to configure extra extension +;;; search paths for IceCat or Icedove. The global extensions directory is +;;; constructed relatively to the executable file name. +(define (make-mozilla-with-l10n project base l10n-package) + "Return a package definition for PROJECT (a symbol such as 'icecat or +'icedove) that combines the BASE package with L10N-PACKAGE." + + (unless (member project '(icecat icedove)) + (error "only icecat or icedove components are currently supported")) + + (let ((name (symbol->string project)) + (icecat? (eq? 'icecat project))) + (package + (inherit base) + (name (symbol->string project)) + (build-system trivial-build-system) + (arguments + (list + #:modules '((guix build union) + (guix build utils)) + #:builder + #~(begin + (use-modules (guix build union) + (guix build utils)) + + (union-build #$output (list #$base #$l10n-package) + #:create-all-directories? #t) + + (define* (expose name #:optional (proc copy-file) + #:key (source #$base)) + (let ((dest (string-append #$output "/" name))) + (mkdir-p (dirname dest)) + (proc (string-append source "/" name) dest))) + + (let ((wrapper (string-append "lib/" #$name "/" #$name)) + (real-binary (string-append "lib/" #$name "/." #$name + "-real")) + (desktop-file (string-append "share/applications/" + #$name ".desktop"))) + ;; Copy wrapper file. + (delete-file (string-append #$output "/" wrapper)) + (expose wrapper) + + ;; Recreate bin symlink. + (delete-file (string-append #$output "/bin/" #$name)) + (symlink (string-append #$output "/" wrapper) + (string-append #$output "/bin/" #$name)) + + ;; Copy actual binary. + (delete-file (string-append #$output "/" real-binary)) + (expose real-binary) + + ;; Copy desktop file. + (delete-file (string-append #$output "/" desktop-file)) + (expose desktop-file) + + ;; Adjust the references in the desktop file and wrapper. + (substitute* (list (string-append #$output "/" desktop-file) + (string-append #$output "/" wrapper)) + ((#$base) #$output))))))))) + +(define-public icecat + (make-mozilla-with-l10n 'icecat icecat-minimal icecat-l10n)) + +(define-public icedove + (make-mozilla-with-l10n 'icedove icedove-minimal icedove-l10n)) + +(define-public icedove/wayland + (package + (inherit icedove) + (name "icedove-wayland") + (build-system trivial-build-system) + (arguments + (list + #:modules '((guix build utils)) + #:builder + #~(begin + (use-modules (guix build utils)) + (let* ((exe (string-append #$output "/bin/icedove"))) + (mkdir-p (dirname exe)) + (call-with-output-file exe + (lambda (port) + (format port "#!~a + MOZ_ENABLE_WAYLAND=1 exec ~a $@" + #$(file-append bash-minimal "/bin/bash") + #$(file-append icedove "/bin/icedove")))) + (chmod exe #o555) + ;; Provide the manual and .desktop file. + (copy-recursively (string-append #$icedove "/share") + (string-append #$output "/share")) + (substitute* (string-append #$output + "/share/applications/icedove.desktop") + ((#$icedove) #$output)))))) + (native-inputs '()) + (inputs '()))) + (define-public firefox-decrypt (package (name "firefox-decrypt") -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH v3 08/11] gnu: icedove: Use the locale of the system. 2023-02-17 12:55 ` bug#32026: [PATCH v3 01/11] " Maxim Cournoyer ` (5 preceding siblings ...) 2023-02-17 12:55 ` bug#32026: [PATCH v3 07/11] gnu: Add language packs to icecat and icedove Maxim Cournoyer @ 2023-02-17 12:55 ` Maxim Cournoyer 2023-02-17 12:55 ` bug#32026: [PATCH v3 09/11] gnu: icecat: Remove gtk+-2 input Maxim Cournoyer ` (2 subsequent siblings) 9 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-17 12:55 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer * gnu/packages/gnuzilla.scm (icedove-source): Set the intl.locale.requested option to the empty string. --- (no changes since v1) gnu/packages/gnuzilla.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 02493b9aff..d331e89f75 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -1289,7 +1289,12 @@ (define icedove-source ;; system global application directory, such as the language ;; packs. (("\"extensions.autoDisableScopes\", 15") - "\"extensions.autoDisableScopes\", 3")) + "\"extensions.autoDisableScopes\", 3") + + ;; Set the default locale to that of the operating system. + ((".*extensions.autoDisableScopes.*" anchor) + (string-append anchor + "pref(\"intl.locale.requested\", \"\");\n"))) ;; Step out of the directory and create the tarball. (chdir "..") -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH v3 09/11] gnu: icecat: Remove gtk+-2 input. 2023-02-17 12:55 ` bug#32026: [PATCH v3 01/11] " Maxim Cournoyer ` (6 preceding siblings ...) 2023-02-17 12:55 ` bug#32026: [PATCH v3 08/11] gnu: icedove: Use the locale of the system Maxim Cournoyer @ 2023-02-17 12:55 ` Maxim Cournoyer 2023-02-17 12:55 ` bug#32026: [PATCH v3 10/11] gnu: nss-next: Update to 3.88.1 [fixes CVE-2023-0767] Maxim Cournoyer 2023-02-17 12:55 ` bug#32026: [PATCH v3 11/11] gnu: icecat: Unbundle nss and nspr Maxim Cournoyer 9 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-17 12:55 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer * gnu/packages/gnuzilla.scm (icecat-minimal) [inputs]: Remove gtk+-2. --- (no changes since v2) Changes in v2: - New commit gnu/packages/gnuzilla.scm | 1 - 1 file changed, 1 deletion(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index d331e89f75..bf8f8378dd 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -693,7 +693,6 @@ (define-public icecat-minimal gdk-pixbuf glib gtk+ - gtk+-2 ;; UNBUNDLE-ME! graphite2 cairo pango -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH v3 10/11] gnu: nss-next: Update to 3.88.1 [fixes CVE-2023-0767]. 2023-02-17 12:55 ` bug#32026: [PATCH v3 01/11] " Maxim Cournoyer ` (7 preceding siblings ...) 2023-02-17 12:55 ` bug#32026: [PATCH v3 09/11] gnu: icecat: Remove gtk+-2 input Maxim Cournoyer @ 2023-02-17 12:55 ` Maxim Cournoyer 2023-02-17 21:38 ` Mark H Weaver 2023-02-17 12:55 ` bug#32026: [PATCH v3 11/11] gnu: icecat: Unbundle nss and nspr Maxim Cournoyer 9 siblings, 1 reply; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-17 12:55 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Maxim Cournoyer * gnu/packages/nss.scm (nss-next): Update to 3.88.1 --- Changes in v3: - New commit. gnu/packages/nss.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/nss.scm b/gnu/packages/nss.scm index c1d9966fd7..c06807c808 100644 --- a/gnu/packages/nss.scm +++ b/gnu/packages/nss.scm @@ -246,7 +246,7 @@ (define-public nss (define-public nss-next (package (inherit nss) - (version "3.83") + (version "3.88.1") (source (origin (inherit (package-source nss)) (uri (let ((version-with-underscores @@ -257,5 +257,5 @@ (define-public nss-next "nss-" version ".tar.gz"))) (sha256 (base32 - "0a01xwfrr334mibj1agbykjkc72ph906f2n8ff5hn2b4z5kyl8xb")))) + "15il9fsmixa1r4446zq1wl627sg0hz9h67w6kjxz273xz3nl7li7")))) (propagated-inputs (list nspr-next)))) ;required by nss.pc -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH v3 10/11] gnu: nss-next: Update to 3.88.1 [fixes CVE-2023-0767]. 2023-02-17 12:55 ` bug#32026: [PATCH v3 10/11] gnu: nss-next: Update to 3.88.1 [fixes CVE-2023-0767] Maxim Cournoyer @ 2023-02-17 21:38 ` Mark H Weaver 2023-02-18 17:27 ` Maxim Cournoyer 0 siblings, 1 reply; 80+ messages in thread From: Mark H Weaver @ 2023-02-17 21:38 UTC (permalink / raw) To: Maxim Cournoyer, 32026; +Cc: ludo, Maxim Cournoyer Hi Maxim, Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: > * gnu/packages/nss.scm (nss-next): Update to 3.88.1 This commit should be pushed immediately as an important security update. Thanks, Mark ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH v3 10/11] gnu: nss-next: Update to 3.88.1 [fixes CVE-2023-0767]. 2023-02-17 21:38 ` Mark H Weaver @ 2023-02-18 17:27 ` Maxim Cournoyer 2023-02-18 19:49 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix 0 siblings, 1 reply; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-18 17:27 UTC (permalink / raw) To: Mark H Weaver; +Cc: 32026, ludo Hi Mark! Mark H Weaver <mhw@netris.org> writes: > Hi Maxim, > > Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: >> * gnu/packages/nss.scm (nss-next): Update to 3.88.1 > > This commit should be pushed immediately as an important security > update. It's already been pushed for nss-next, and Tobias has taken care of grafting our main 'nss' package, which has many dependents. See commits 246a3d90eac82966b691bdca4660ab9c5d802631 and b04ee227a47419291391a2b6e857e41ed1c32155, respectively. -- Thanks, Maxim ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH v3 10/11] gnu: nss-next: Update to 3.88.1 [fixes CVE-2023-0767]. 2023-02-18 17:27 ` Maxim Cournoyer @ 2023-02-18 19:49 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix 2023-02-18 20:45 ` Maxim Cournoyer 0 siblings, 1 reply; 80+ messages in thread From: Tobias Geerinckx-Rice via Bug reports for GNU Guix @ 2023-02-18 19:49 UTC (permalink / raw) To: Maxim Cournoyer; +Cc: mhw, 32026, ludo [-- Attachment #1: Type: text/plain, Size: 626 bytes --] Maxim Cournoyer 写道: > It's already been pushed for nss-next, and Tobias has taken care > of > grafting our main 'nss' package, which has many dependents. See > commits > 246a3d90eac82966b691bdca4660ab9c5d802631 and > b04ee227a47419291391a2b6e857e41ed1c32155, respectively. Grafting such a big version jump made me nervous. I did so anyway, partially on Mozilla's assurance (FWIW) that it's ABI-compatible, but mainly because I dare not vouch for a single cherry-pick to 3.81 actually keeping users safe. I'd much rather deal with ABI bug reports than the alternative :-) Kind regards, T G-R [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 247 bytes --] ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH v3 10/11] gnu: nss-next: Update to 3.88.1 [fixes CVE-2023-0767]. 2023-02-18 19:49 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix @ 2023-02-18 20:45 ` Maxim Cournoyer 0 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-18 20:45 UTC (permalink / raw) To: Tobias Geerinckx-Rice; +Cc: mhw, 32026, ludo Hi, Tobias Geerinckx-Rice <me@tobias.gr> writes: > Maxim Cournoyer 写道: >> It's already been pushed for nss-next, and Tobias has taken care of >> grafting our main 'nss' package, which has many dependents. See >> commits >> 246a3d90eac82966b691bdca4660ab9c5d802631 and >> b04ee227a47419291391a2b6e857e41ed1c32155, respectively. > > Grafting such a big version jump made me nervous. > > I did so anyway, partially on Mozilla's assurance (FWIW) that it's > ABI-compatible, but mainly because I dare not vouch for a single > cherry-pick to 3.81 actually keeping users safe. > > I'd much rather deal with ABI bug reports than the alternative :-) Sounds a reasonable gamble, thank you! -- Thanks, Maxim ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH v3 11/11] gnu: icecat: Unbundle nss and nspr. 2023-02-17 12:55 ` bug#32026: [PATCH v3 01/11] " Maxim Cournoyer ` (8 preceding siblings ...) 2023-02-17 12:55 ` bug#32026: [PATCH v3 10/11] gnu: nss-next: Update to 3.88.1 [fixes CVE-2023-0767] Maxim Cournoyer @ 2023-02-17 12:55 ` Maxim Cournoyer 9 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-17 12:55 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer * gnu/packages/gnuzilla.scm (icecat-minimal) [inputs]: Add nspr-next and nss-next. [configure-flags]: Re-instate the "--with-system-nspr" and "--with-system-nss" configure flags. [phases] {remove-bundled-libraries}: Update comment. --- (no changes since v2) Changes in v2: - New commit gnu/packages/gnuzilla.scm | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index bf8f8378dd..fd15076cc6 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -723,10 +723,8 @@ (define-public icecat-minimal mit-krb5 hunspell libnotify - ;; See <https://bugs.gnu.org/32833> - ;; and related comments in the 'remove-bundled-libraries' phase. - ;; UNBUNDLE-ME! nspr - ;; UNBUNDLE-ME! nss + nspr-next + nss-next shared-mime-info sqlite eudev @@ -821,12 +819,8 @@ (define-public icecat-minimal ;; UNBUNDLE-ME! "--with-system-theora" ; wants theora-1.2, not yet released ;; UNBUNDLE-ME! "--with-system-libvpx" "--with-system-icu" - - ;; See <https://bugs.gnu.org/32833> - ;; and related comments in the - ;; 'remove-bundled-libraries' phase below. - ;; UNBUNDLE-ME! "--with-system-nspr" - ;; UNBUNDLE-ME! "--with-system-nss" + "--with-system-nspr" + "--with-system-nss" ;; UNBUNDLE-ME! "--with-system-harfbuzz" ;; UNBUNDLE-ME! "--with-system-graphite2" @@ -875,12 +869,9 @@ (define-public icecat-minimal ;; FIXME: A script from the bundled nspr is used. ;;"nsprpub" ;; - ;; FIXME: With the update to IceCat 60, using system NSS - ;; broke certificate validation. See - ;; <https://bugs.gnu.org/32833>. For now, we use - ;; the bundled NSPR and NSS. TODO: Investigate, - ;; and try to unbundle these libraries again. - ;; UNBUNDLE-ME! "security/nss" + ;; FIXME: Some of the bundled NSS sources are used + ;; to build third_party/prio. + ;;"security/nss" ;; ;; TODO: Use more system media libraries. See: ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=517422> -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH v4 1/9] gnu: Add a 'update-mozilla-locales' helper for maintenance. 2018-07-01 20:23 bug#32026: IceCat locales are missing? Ludovic Courtès ` (2 preceding siblings ...) 2023-02-17 12:55 ` bug#32026: [PATCH v3 01/11] " Maxim Cournoyer @ 2023-02-19 19:23 ` Maxim Cournoyer 2023-02-19 19:23 ` bug#32026: [PATCH v4 2/9] gnu: icedove: Compute a self-contained source Maxim Cournoyer ` (9 more replies) 3 siblings, 10 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-19 19:23 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer * gnu/packages/gnuzilla.scm (update-mozilla-locales): New procedure. (all-mozilla-locales): Comment how to proceed to update it. --- Changes in v4: - Strip useful comments, in the name of non-free source obfuscation gnu/packages/gnuzilla.scm | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index b2e0870fea..16e2208426 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -37,6 +37,7 @@ (define-module (gnu packages gnuzilla) #:use-module ((srfi srfi-1) #:hide (zip)) + #:use-module (ice-9 format) #:use-module (ice-9 match) #:use-module (gnu packages) #:use-module ((guix licenses) #:prefix license:) @@ -91,7 +92,8 @@ (define-module (gnu packages gnuzilla) #:use-module (gnu packages xiph) #:use-module (gnu packages xdisorg) #:use-module (gnu packages readline) - #:use-module (gnu packages sqlite)) + #:use-module (gnu packages sqlite) + #:autoload (json parser) (json->scm)) (define-public mozjs (package @@ -348,6 +350,10 @@ (define-public mozjs-78 (inputs (list icu4c readline zlib)))) +\f +;;; +;;; Localization helper procedures. +;;; (define mozilla-compare-locales (origin (method hg-fetch) @@ -371,6 +377,18 @@ (define-syntax-rule (mozilla-locales (hash-string changeset locale) ...) (list (mozilla-locale locale changeset hash-string) ...)) +(define (update-mozilla-locales changesets.json) + "Output a new list of Mozilla locales, to update the ALL-MOZILLA-LOCALES +variable defined bellow. It requires guile-json to be installed." + (match (call-with-input-file changesets.json json->scm) + (((lang ("revision" . revision) platforms pin) ...) + (let ((data (reverse (map (lambda (rev lang) + `(,(list->string (make-list 40 #\0)) + ,(string-take rev 12) ,lang)) + revision lang)))) + (format #t "~{~s~%~}" data) + data)))) + (define all-mozilla-locales (mozilla-locales ;; sha256 changeset locale base-commit: 636b771536b95d15a2fd68b468deeebac97d6bee -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH v4 2/9] gnu: icedove: Compute a self-contained source. 2023-02-19 19:23 ` bug#32026: [PATCH v4 1/9] gnu: Add a 'update-mozilla-locales' helper for maintenance Maxim Cournoyer @ 2023-02-19 19:23 ` Maxim Cournoyer 2023-02-19 19:23 ` bug#32026: [PATCH v4 3/9] gnu: Define %icecat-base-version at the top level Maxim Cournoyer ` (8 subsequent siblings) 9 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-19 19:23 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer This refactoring work is to prepare for adding a icedove-l10n package, which will reuse that source. * gnu/packages/gnuzilla.scm (comm-source->locales+changset): New procedure. (thunderbird-source): Rename to... (thunderbird-comm-source): ... here. (icedove-source): New variable. (icedove) [source]: Use it. [phases]: Remove the prepare-thunderbird-sources and rename-to-icedove phases. --- (no changes since v2) Changes in v2: - Fix typo in comm-source->locales+changset - Reword comment gnu/packages/gnuzilla.scm | 210 +++++++++++++++++++++++++------------- 1 file changed, 140 insertions(+), 70 deletions(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 16e2208426..3a742d06c6 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -47,6 +47,7 @@ (define-module (gnu packages gnuzilla) #:use-module (guix hg-download) #:use-module (guix gexp) #:use-module (guix store) + #:use-module (guix modules) #:use-module (guix monads) #:use-module (guix utils) #:use-module (guix build-system gnu) @@ -1119,7 +1120,7 @@ (define %icedove-version "102.7.2") ;; Provides the "comm" folder which is inserted into the icecat source. ;; Avoids the duplication of Icecat's source tarball. -(define thunderbird-source +(define thunderbird-comm-source (origin (method hg-fetch) (uri (hg-reference @@ -1130,11 +1131,148 @@ (define thunderbird-source (base32 "071q0pcfvfpzx741ly1sl8anlmzx02h17w4ylfnrkwrpaclq3p6p")))) +(define (comm-source->locales+changeset source) + "Given SOURCE, a checkout of the Thunderbird 'comm' component, return the +list of languages supported as well as the currently used changeset." + (match (update-mozilla-locales + (string-append source "/mail/locales/l10n-changesets.json")) + (((_ changeset locale) ...) + (values locale (first changeset))))) + +;;; To find out which changeset to use for the comm-l10n repo, use the +;;; 'comm-source->locales+changeset' procedure on the thunderbird-comm-source +;;; checkout directory. The complete localization data should be released as +;;; a tarball in the next release (see: +;;; https://bugzilla.mozilla.org/show_bug.cgi?id=1817086). When this tarball +;;; is available, it should replace the complete 'l10n' directory at the root +;;; of the IceCat source, instead of only the 'calendar', chat and mail +;;; directories that it provides. +(define thunderbird-comm-l10n + (let* ((changeset "5b6788295358") + (version (git-version %icedove-version "0" changeset))) + (origin + (method hg-fetch) + (uri (hg-reference + (url "https://hg.mozilla.org/projects/comm-l10n") + (changeset changeset))) + (file-name (git-file-name "comm-l10n" version)) + (sha256 + (base32 + "1jrsmkscjjllcfawi3788vwm53wn25inbhdis5nk4vfpr7wk5ill"))))) + +(define icedove-source + (let ((name (string-append "icedove-" %icedove-version))) + (origin + (method computed-origin-method) + (file-name (string-append name ".tar.xz")) + (sha256 #f) + (uri + (delay + (with-imported-modules (source-module-closure '((guix build utils))) + #~(begin + (use-modules (guix build utils) + (sxml simple)) + + (set-path-environment-variable + "PATH" '("bin") + (list #+(canonical-package tar) + #+(canonical-package xz))) + + ;; Extract the base Icecat tarball, renaming its top-level + ;; directory. + (invoke "tar" "--transform" (string-append "s,[^/]*," #$name ",") + "-xf" #$icecat-source) + (chdir #$name) + + ;; Merge the Thunderdbird localization data. + (copy-recursively #$thunderbird-comm-l10n "l10n") + + ;; Add the Thunderbird-specific "comm" directory.. + (mkdir "comm") + (copy-recursively #$thunderbird-comm-source "comm") + (delete-file "sourcestamp.txt") + + ;; Adjust the application name. + (substitute* "comm/mail/confvars.sh" + (("MOZ_APP_NAME=thunderbird") + "MOZ_APP_NAME=icedove") + (("MOZ_UPDATER=1") + "MOZ_UPDATER=0")) + + ;; Remove branding to comply with Mozilla's trademark policy + (with-directory-excursion "comm/mail/branding/nightly" + (delete-file "content/about-wordmark.svg") + (call-with-output-file "content/about-wordmark.svg" + (lambda (port) + (sxml->xml '(svg (@ (xmlns "http://www.w3.org/2000/svg") + (viewBox "0 0 789.1 90.78") + (width "333") + (height "48") + (fill "#fff")) + (text (@ (x "400") (y "70") + (text-anchor "middle") + (font-size "90")) + "Icedove Daily")) + port))) + (substitute* '("locales/en-US/brand.properties" + "locales/en-US/brand.ftl" + "locales/en-US/brand.dtd" + "configure.sh") + (("Thunderbird") "Icedove") + (("mozilla.org") "guix.gnu.org"))) + ;; Remove other mentions of Thunderbird in user-visible text. + (with-directory-excursion "comm/mail/base/content" + (substitute* '("overrides/app-license-name.html") + (("Thunderbird") "Icedove"))) + (with-directory-excursion "comm/mail/components/" + (substitute* '("MailGlue.jsm" + "extensions/schemas/addressBook.json" + "extensions/schemas/tabs.json" + "extensions/schemas/cloudFile.json" + "extensions/schemas/chrome_settings_overrides.json" + "extensions/schemas/windows.json" + "extensions/parent/ext-mail.js" + "im/messages/mail/Info.plist" + "enterprisepolicies/moz.build" + "enterprisepolicies/helpers/moz.build" + "enterprisepolicies/schemas/moz.build") + (("Thunderbird") "Icedove"))) + (substitute* '("comm/mailnews/base/prefs/content/accountUtils.js" + "comm/mail/base/content/customizeToolbar.js" + "comm/suite/components/customizeToolbar.js") + (("AppConstants.MOZ_APP_NAME (.)= \"thunderbird" _ e) + (format #f "AppConstants.MOZ_APP_NAME ~a= \"icedove" e))) + + ;; Override addon URLs and settings + (substitute* "comm/mail/app/profile/all-thunderbird.js" + (("(pref\\(\"extensions.webservice.discoverURL\").*" _ m) + (string-append m ", \"https://directory.fsf.org/wiki/Icedove\");")) + (("(pref\\(\"extensions.getAddons.search.url\").*" _ m) + (string-append m ", \"https://guix.gnu.org/packages\");")) + (("(pref\\(\"extensions.update.enabled\").*" _ m) + (string-append m ", false);")) + (("(pref\\(\"extensions.systemAddon.update.enabled\").*" _ m) + (string-append m ", false);")) + (("(pref\\(\"lightweightThemes.update.enabled\").*" _ m) + (string-append m ", false);"))) + + ;; Step out of the directory and create the tarball. + (chdir "..") + (format #t "Packing Icedove source tarball...~%") + (force-output) + (setenv "XZ_DEFAULTS" (string-join (%xz-parallel-args))) + (invoke "tar" "cfa" #$output + "--mtime=@315619200" ;1980-01-02 UTC + "--owner=root:0" + "--group=root:0" + "--sort=name" + #$name)))))))) + (define-public icedove (package (name "icedove") (version %icedove-version) - (source icecat-source) + (source icedove-source) (properties `((cpe-name . "thunderbird_esr"))) (build-system gnu-build-system) @@ -1148,11 +1286,6 @@ (define-public icedove ,@%gnu-build-system-modules) #:phases #~(modify-phases %standard-phases - (add-after 'unpack 'prepare-thunderbird-sources - (lambda _ - (mkdir "comm") - (copy-recursively #$thunderbird-source "comm") - (delete-file "sourcestamp.txt"))) (add-after 'patch-source-shebangs 'patch-cargo-checksums (lambda _ (use-modules (guix build cargo-utils)) @@ -1182,69 +1315,6 @@ (define-public icedove (substitute* "comm/mail/moz.configure" (("MOZ_DEDICATED_PROFILES, True") "MOZ_DEDICATED_PROFILES, False")))) - (add-after 'prepare-thunderbird-sources 'rename-to-icedove - (lambda _ - (substitute* "comm/mail/confvars.sh" - (("MOZ_APP_NAME=thunderbird") - "MOZ_APP_NAME=icedove") - (("MOZ_UPDATER=1") - "MOZ_UPDATER=0")) - ;; Remove branding to comply with Mozilla's trademark policy - (with-directory-excursion "comm/mail/branding/nightly" - (delete-file "content/about-wordmark.svg") - (call-with-output-file "content/about-wordmark.svg" - (lambda (port) - (sxml->xml '(svg (@ (xmlns "http://www.w3.org/2000/svg") - (viewBox "0 0 789.1 90.78") - (width "333") - (height "48") - (fill "#fff")) - (text (@ (x "400") (y "70") - (text-anchor "middle") - (font-size "90")) - "Icedove Daily")) - port))) - (substitute* '("locales/en-US/brand.properties" - "locales/en-US/brand.ftl" - "locales/en-US/brand.dtd" - "configure.sh") - (("Thunderbird") "Icedove") - (("mozilla.org") "guix.gnu.org"))) - ;; Remove other mentions of Thunderbird in user-visible text. - (with-directory-excursion "comm/mail/base/content" - (substitute* '("overrides/app-license-name.html") - (("Thunderbird") "Icedove"))) - (with-directory-excursion "comm/mail/components/" - (substitute* '("MailGlue.jsm" - "extensions/schemas/addressBook.json" - "extensions/schemas/tabs.json" - "extensions/schemas/cloudFile.json" - "extensions/schemas/chrome_settings_overrides.json" - "extensions/schemas/windows.json" - "extensions/parent/ext-mail.js" - "im/messages/mail/Info.plist" - "enterprisepolicies/moz.build" - "enterprisepolicies/helpers/moz.build" - "enterprisepolicies/schemas/moz.build") - (("Thunderbird") "Icedove"))) - (substitute* '("comm/mailnews/base/prefs/content/accountUtils.js" - "comm/mail/base/content/customizeToolbar.js" - "comm/suite/components/customizeToolbar.js") - (("AppConstants.MOZ_APP_NAME (.)= \"thunderbird" _ e) - (format #f "AppConstants.MOZ_APP_NAME ~a= \"icedove" e))) - - ;; Override addon URLs and settings - (substitute* "comm/mail/app/profile/all-thunderbird.js" - (("(pref\\(\"extensions.webservice.discoverURL\").*" _ m) - (string-append m ", \"https://directory.fsf.org/wiki/Icedove\");")) - (("(pref\\(\"extensions.getAddons.search.url\").*" _ m) - (string-append m ", \"https://guix.gnu.org/packages\");")) - (("(pref\\(\"extensions.update.enabled\").*" _ m) - (string-append m ", false);")) - (("(pref\\(\"extensions.systemAddon.update.enabled\").*" _ m) - (string-append m ", false);")) - (("(pref\\(\"lightweightThemes.update.enabled\").*" _ m) - (string-append m ", false);"))))) (add-after 'build 'neutralize-store-references (lambda _ ;; Mangle the store references to compilers & other build tools in -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH v4 3/9] gnu: Define %icecat-base-version at the top level. 2023-02-19 19:23 ` bug#32026: [PATCH v4 1/9] gnu: Add a 'update-mozilla-locales' helper for maintenance Maxim Cournoyer 2023-02-19 19:23 ` bug#32026: [PATCH v4 2/9] gnu: icedove: Compute a self-contained source Maxim Cournoyer @ 2023-02-19 19:23 ` Maxim Cournoyer 2023-02-19 20:13 ` Mark H Weaver 2023-02-19 19:24 ` bug#32026: [PATCH v4 4/9] gnu: Add icecat-l10n and icedove-l10n Maxim Cournoyer ` (7 subsequent siblings) 9 siblings, 1 reply; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-19 19:23 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer * gnu/packages/gnuzilla.scm (%icecat-base-version): New variable. (%icecat-version): Define in terms of %icecat-base-version. (icecat-source): Adjust to use the above newly introduced variables. --- Changes in v4: - Re-obfuscate upstream-firefox-source gnu/packages/gnuzilla.scm | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 3a742d06c6..bb379a7fb1 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -496,20 +496,19 @@ (define all-mozilla-locales ;; XXXX: Workaround 'snippet' limitations. (define computed-origin-method (@@ (guix packages) computed-origin-method)) -(define %icecat-version "102.8.0-guix0-preview1") +(define %icecat-base-version "102.8.0") +(define %icecat-version (string-append %icecat-base-version "-guix0-preview1")) (define %icecat-build-id "20230214000000") ;must be of the form YYYYMMDDhhmmss ;; 'icecat-source' is a "computed" origin that generates an IceCat tarball ;; from the corresponding upstream Firefox ESR tarball, using the 'makeicecat' ;; script from the upstream IceCat project. (define icecat-source - (let* ((base-version (first (string-split %icecat-version #\-))) + (let* ((major-version (first (string-split %icecat-base-version #\.))) + (minor-version (second (string-split %icecat-base-version #\.))) + (sub-version (third (string-split %icecat-base-version #\.))) - (major-version (first (string-split base-version #\.))) - (minor-version (second (string-split base-version #\.))) - (sub-version (third (string-split base-version #\.))) - - (upstream-firefox-version (string-append base-version "esr")) + (upstream-firefox-version (string-append %icecat-base-version "esr")) (upstream-firefox-source (origin (method url-fetch) @@ -521,8 +520,9 @@ (define icecat-source (base32 "0j6afrgfsmd0adbbmffw4p1f2hznpck9d36z3bsjx36f7cjgdy27")))) - (upstream-icecat-base-version "102.8.0") ; maybe older than base-version - ;;(gnuzilla-commit (string-append "v" upstream-icecat-base-version)) + ;; The upstream-icecat-base-version may be older than the + ;; %icecat-base-version. + (upstream-icecat-base-version "102.8.0") (gnuzilla-commit "03d9e3db5affe21db077c410ec08c313d6aa280e") (gnuzilla-source (origin @@ -553,7 +553,7 @@ (define icecat-source #~(begin (use-modules (guix build utils)) (let ((firefox-dir - (string-append "firefox-" #$base-version)) + (string-append "firefox-" #$%icecat-base-version)) (icecat-dir (string-append "icecat-" #$%icecat-version))) -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH v4 3/9] gnu: Define %icecat-base-version at the top level. 2023-02-19 19:23 ` bug#32026: [PATCH v4 3/9] gnu: Define %icecat-base-version at the top level Maxim Cournoyer @ 2023-02-19 20:13 ` Mark H Weaver 2023-02-19 22:14 ` Maxim Cournoyer 0 siblings, 1 reply; 80+ messages in thread From: Mark H Weaver @ 2023-02-19 20:13 UTC (permalink / raw) To: Maxim Cournoyer, 32026; +Cc: ludo, Jonathan Brielmaier, Maxim Cournoyer Hi Maxim, Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: > * gnu/packages/gnuzilla.scm (%icecat-base-version): New variable. > (%icecat-version): Define in terms of %icecat-base-version. > (icecat-source): Adjust to use the above newly introduced variables. What's the rationale for this? I couldn't find any uses of '%icecat-base-version' in your patch set outside of 'icecat-source'. I don't have a strong objection, but it seems unjustified. Thanks, Mark ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH v4 3/9] gnu: Define %icecat-base-version at the top level. 2023-02-19 20:13 ` Mark H Weaver @ 2023-02-19 22:14 ` Maxim Cournoyer 0 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-19 22:14 UTC (permalink / raw) To: Mark H Weaver; +Cc: 32026, ludo, Jonathan Brielmaier Hi Mark, Mark H Weaver <mhw@netris.org> writes: > Hi Maxim, > > Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: >> * gnu/packages/gnuzilla.scm (%icecat-base-version): New variable. >> (%icecat-version): Define in terms of %icecat-base-version. >> (icecat-source): Adjust to use the above newly introduced variables. > > What's the rationale for this? I couldn't find any uses of > '%icecat-base-version' in your patch set outside of 'icecat-source'. > I don't have a strong objection, but it seems unjustified. > > Thanks, > Mark Not much anymore, but I just thought it was cleaner than having to do (base-version (first (string-split %icecat-version #\-))) later on to retrieve this information. -- Thanks, Maxim ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH v4 4/9] gnu: Add icecat-l10n and icedove-l10n. 2023-02-19 19:23 ` bug#32026: [PATCH v4 1/9] gnu: Add a 'update-mozilla-locales' helper for maintenance Maxim Cournoyer 2023-02-19 19:23 ` bug#32026: [PATCH v4 2/9] gnu: icedove: Compute a self-contained source Maxim Cournoyer 2023-02-19 19:23 ` bug#32026: [PATCH v4 3/9] gnu: Define %icecat-base-version at the top level Maxim Cournoyer @ 2023-02-19 19:24 ` Maxim Cournoyer 2023-02-19 19:24 ` bug#32026: [PATCH v4 5/9] gnu: icedove: Automatically load system-provided extensions Maxim Cournoyer ` (6 subsequent siblings) 9 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-19 19:24 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer * gnu/packages/gnuzilla.scm (%icecat-locales, %icedove-locales): New variable. (make-l10n-package): New procedure. (icecat-l10n, icedove-l10n): New variables. --- (no changes since v1) gnu/packages/gnuzilla.scm | 143 +++++++++++++++++++++++++++++++++++++- 1 file changed, 142 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index bb379a7fb1..01fc974805 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -17,7 +17,7 @@ ;;; Copyright © 2020, 2022 Marius Bakke <marius@gnu.org> ;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re> ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be> -;;; Copyright © 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2021 Baptiste Strazzul <bstrazzull@hotmail.fr> ;;; ;;; This file is part of GNU Guix. @@ -1115,6 +1115,16 @@ (define (runpaths-of-input label) (cpe-name . "firefox_esr") (cpe-version . ,(first (string-split version #\-))))))) +(define %icecat-locales + '("ach" "af" "an" "ar" "ast" "az" "be" "bg" "bn" "br" "bs" "ca" "cak" + "ca-valencia" "cs" "cy" "da" "de" "dsb" "el" "en-CA" "en-GB" "eo" "es-AR" + "es-CL" "es-ES" "es-MX" "et" "eu" "fa" "ff" "fi" "fr" "fy-NL" "ga-IE" "gd" + "gl" "gn" "gu-IN" "he" "hi-IN" "hr" "hsb" "hu" "hy-AM" "ia" "id" "is" "it" + "ja" "ja-JP-mac" "ka" "kab" "kk" "km" "kn" "ko" "lij" "lt" "lv" "mk" "mr" "ms" + "my" "nb-NO" "ne-NP" "nl" "nn-NO" "oc" "pa-IN" "pl" "pt-BR" "pt-PT" "rm" "ro" + "ru" "sco" "si" "sk" "sl" "son" "sq" "sr" "sv-SE" "szl" "ta" "te" "th" "tl" + "tr" "trs" "uk" "ur" "uz" "vi" "xh" "zh-CN" "zh-TW")) + (define %icedove-build-id "20230207000000") ;must be of the form YYYYMMDDhhmmss (define %icedove-version "102.7.2") @@ -1139,6 +1149,15 @@ (define (comm-source->locales+changeset source) (((_ changeset locale) ...) (values locale (first changeset))))) +;;; Generated with comm-source->locales+changeset. +(define %icedove-locales + '("af" "ar" "ast" "be" "bg" "br" "ca" "cak" "cs" "cy" "da" "de" "dsb" "el" + "en-CA" "en-GB" "es-AR" "es-ES" "es-MX" "et" "eu" "fi" "fr" "fy-NL" "ga-IE" + "gd" "gl" "he" "hr" "hsb" "hu" "hy-AM" "id" "is" "it" "ja" "ja-JP-mac" "ka" + "kab" "kk" "ko" "lt" "lv" "ms" "nb-NO" "nl" "nn-NO" "pa-IN" "pl" "pt-BR" + "pt-PT" "rm" "ro" "ru" "sk" "sl" "sq" "sr" "sv-SE" "th" "tr" "uk" "uz" "vi" + "zh-CN" "zh-TW")) + ;;; To find out which changeset to use for the comm-l10n repo, use the ;;; 'comm-source->locales+changeset' procedure on the thunderbird-comm-source ;;; checkout directory. The complete localization data should be released as @@ -1547,6 +1566,128 @@ (define-public icedove/wayland (native-inputs '()) (inputs '()))) +(define (make-l10n-package project version source locales) + "Return a package for PROJECT, a symbol (either icecat or icedove), with +their corresponding VERSION, SOURCE and LOCALES variables." + (unless (member project '(icecat icedove)) + (error "only icecat or icedove components are currently supported")) + + (let ((name (if (eq? 'icecat project) + "IceCat" + "Icedove"))) + (package + (name (format #f "~a-l10n" project)) + (version version) + (source source) + (outputs (cons "out" locales)) + (build-system gnu-build-system) + (arguments + (list + #:modules '((guix build gnu-build-system) + (guix build utils) + (ice-9 format) + (ice-9 ftw) + (srfi srfi-1) + (srfi srfi-26)) + #:tests? #f ;no tests, this is data + #:phases + #~(modify-phases %standard-phases + (delete 'bootstrap) + (delete 'install) + (replace 'configure + (lambda _ + ;; The following configuration is inspired by guidance at + ;; https://firefox-source-docs.mozilla.org/build/buildsystem/locales.html. + (call-with-output-file ".mozconfig" + (lambda (p) + (format p "~{~a~%~}" + (list (if (eq? 'icecat '#$project) + "ac_add_options --enable-project=browser" + "ac_add_options --enable-project=comm/mail") + "ac_add_options --disable-compile-environment" + (string-append + "ac_add_options --with-l10n-base=" + (getcwd) "/l10n") + ;; Hack, otherwise the build system throws: + ;; 'RuntimeError: File "brand.dtd" not found'. + "ac_add_options --enable-official-branding" + "mk_add_options MOZ_OBJDIR=obj")))) + (setenv "CONFIG_SHELL" (which "bash")) + (setenv "MOZBUILD_STATE_PATH" + (string-append (getcwd) "/mach_state")) + (setenv "MOZCONFIG" (string-append (getcwd) "/.mozconfig")) + (setenv "MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE" "system") + (setenv "BUILD_BACKENDS" "FasterMake,RecursiveMake"))) + (replace 'build ;build and install data files + (lambda* (#:key outputs #:allow-other-keys) + (define (find-file dir name) + (let ((files (find-files dir name))) + (when (null? files) + (error "could not find file in dir" name dir)) + (car files))) + + (for-each + (lambda (l) + (let* ((out (assoc-ref outputs l)) + ;; The older lib/$project/distribution/extensions + ;; directory is deprecated. Use the newer app-global + ;; directory, which is lib/$project/extensions. + (ext-dir-prefix + (format + #f "lib/~a/~:[~;browser/~]extensions" + '#$project (eq? 'icecat '#$project))) + (all-ext (string-append #$output "/" ext-dir-prefix)) + (ext-dir (string-append out "/" ext-dir-prefix)) + ;; XXX: Because Icedove doesn't have a makeicedove + ;; script that substitutes all the Thunderbird + ;; references to Icedove, the MOZ_LANGPACK_EID + ;; defined in comm/mail/locales/Makefile.in uses + ;; 'thunderbird' in its ID extension rather than + ;; 'icedove'. + (name (format #f "langpack-~a@~a.mozilla.org.xpi" + l (if (eq? 'icedove '#$project) + 'thunderbird + '#$project)))) + (format #t "processing locale `~a'...~%" l) + (if (eq? 'icecat '#$project) + ;; XXX: For some reasons, for IceCat, there are some + ;; parsing errors that cause the build system to + ;; return an unclean exit code; use system* to ignore + ;; errors. + (system* "./mach" "build" (string-append "langpack-" l)) + (invoke "./mach" "build" (string-append "langpack-" l))) + (mkdir-p ext-dir) + (let ((xpi (find-file "obj" (string-append + "\\." l "\\.langpack\\.xpi$")))) + (copy-file xpi (string-append ext-dir "/" name)) + ;; Symlink to the main output so that a user can + ;; install all of the language packs at once. + (mkdir-p all-ext) + (symlink (string-append ext-dir "/" name) + (string-append all-ext "/" name))))) + (if (eq? 'icedove '#$project) + '#$%icedove-locales + '#$%icecat-locales))))))) + (native-inputs + (list m4 + perl + python-wrapper + node + unzip)) + (home-page "https://www.mozilla.org/") + (synopsis (string-append "Language localization data for " name)) + (description (string-append "This package contains the various language +localization data files (language pack extensions) for " name ". The +individual localization packages can be installed by using the output +associated with their name.")) + (license license:mpl2.0)))) + +(define-public icecat-l10n + (make-l10n-package 'icecat %icecat-version icecat-source %icecat-locales)) + +(define-public icedove-l10n + (make-l10n-package 'icedove %icedove-version icedove-source %icedove-locales)) + (define-public firefox-decrypt (package (name "firefox-decrypt") -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH v4 5/9] gnu: icedove: Automatically load system-provided extensions. 2023-02-19 19:23 ` bug#32026: [PATCH v4 1/9] gnu: Add a 'update-mozilla-locales' helper for maintenance Maxim Cournoyer ` (2 preceding siblings ...) 2023-02-19 19:24 ` bug#32026: [PATCH v4 4/9] gnu: Add icecat-l10n and icedove-l10n Maxim Cournoyer @ 2023-02-19 19:24 ` Maxim Cournoyer 2023-02-19 19:24 ` bug#32026: [PATCH v4 6/9] gnu: Add language packs to icecat and icedove Maxim Cournoyer ` (5 subsequent siblings) 9 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-19 19:24 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer * gnu/packages/gnuzilla.scm (icedove-source): Set the extensions.autoDisableScopes preference value to 3. (icedove-minimal) [phases]: Add the --allow-addon-sideload and --with-unsigned-addon-scopes=app,system ac options to the configure phase. --- (no changes since v1) gnu/packages/gnuzilla.scm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 01fc974805..38c34251ab 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -1273,7 +1273,15 @@ (define icedove-source (("(pref\\(\"extensions.systemAddon.update.enabled\").*" _ m) (string-append m ", false);")) (("(pref\\(\"lightweightThemes.update.enabled\").*" _ m) - (string-append m ", false);"))) + (string-append m ", false);")) + + ;; XXX: The autoDisableScopes is tweaked by the makeicecat + ;; script, but it doesn't know about Thunderbird. This is + ;; necessary to allow picking up the extensions found in the + ;; system global application directory, such as the language + ;; packs. + (("\"extensions.autoDisableScopes\", 15") + "\"extensions.autoDisableScopes\", 3")) ;; Step out of the directory and create the tarball. (chdir "..") @@ -1386,6 +1394,8 @@ (define-public icedove (lambda () (display (string-append + "ac_add_options --allow-addon-sideload\n" + "ac_add_options --with-unsigned-addon-scopes=app,system\n" "ac_add_options --disable-crashreporter\n" "ac_add_options --disable-debug\n" "ac_add_options --disable-debug-symbols\n" -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH v4 6/9] gnu: Add language packs to icecat and icedove. 2023-02-19 19:23 ` bug#32026: [PATCH v4 1/9] gnu: Add a 'update-mozilla-locales' helper for maintenance Maxim Cournoyer ` (3 preceding siblings ...) 2023-02-19 19:24 ` bug#32026: [PATCH v4 5/9] gnu: icedove: Automatically load system-provided extensions Maxim Cournoyer @ 2023-02-19 19:24 ` Maxim Cournoyer 2023-02-19 19:24 ` bug#32026: [PATCH v4 7/9] gnu: icedove: Use the locale of the system Maxim Cournoyer ` (4 subsequent siblings) 9 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-19 19:24 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer Fixes <https://issues.guix.gnu.org/32026>. * gnu/packages/gnuzilla.scm (icecat): Rename to... (icecat-minimal): ... this. (icedove: Rename to... (icedove-minimal): ... this. (make-mozilla-with-l10n): New procedure. (icecat, icedove): New variables. --- (no changes since v3) Changes in v3: - Make make-l10n-package more functional, taking inputs as arguments - Validate the PROJECT argument in make-l10n-package Changes in v2: - Do not clear native-inputs and inputs in make-mozilla-with-l10n, for 'guix shell -D icecat' gnu/packages/gnuzilla.scm | 133 ++++++++++++++++++++++++++++---------- 1 file changed, 100 insertions(+), 33 deletions(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 38c34251ab..ab2065054a 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -671,9 +671,9 @@ (define icecat-source "--sort=name" icecat-dir))))))))) -(define-public icecat +(define-public icecat-minimal (package - (name "icecat") + (name "icecat-minimal") (version %icecat-version) (source icecat-source) (build-system gnu-build-system) @@ -1295,9 +1295,9 @@ (define icedove-source "--sort=name" #$name)))))))) -(define-public icedove +(define-public icedove-minimal (package - (name "icedove") + (name "icedove-minimal") (version %icedove-version) (source icedove-source) (properties @@ -1547,35 +1547,6 @@ (define-public icedove Thunderbird. It supports email, news feeds, chat, calendar and contacts.") (license license:mpl2.0))) -(define-public icedove/wayland - (package - (inherit icedove) - (name "icedove-wayland") - (build-system trivial-build-system) - (arguments - (list - #:modules '((guix build utils)) - #:builder - #~(begin - (use-modules (guix build utils)) - (let* ((exe (string-append #$output "/bin/icedove"))) - (mkdir-p (dirname exe)) - (call-with-output-file exe - (lambda (port) - (format port "#!~a - MOZ_ENABLE_WAYLAND=1 exec ~a $@" - #$(file-append bash-minimal "/bin/bash") - #$(file-append icedove "/bin/icedove")))) - (chmod exe #o555) - ;; Provide the manual and .desktop file. - (copy-recursively (string-append #$icedove "/share") - (string-append #$output "/share")) - (substitute* (string-append #$output - "/share/applications/icedove.desktop") - ((#$icedove) #$output)))))) - (native-inputs '()) - (inputs '()))) - (define (make-l10n-package project version source locales) "Return a package for PROJECT, a symbol (either icecat or icedove), with their corresponding VERSION, SOURCE and LOCALES variables." @@ -1698,6 +1669,102 @@ (define-public icecat-l10n (define-public icedove-l10n (make-l10n-package 'icedove %icedove-version icedove-source %icedove-locales)) +;;; This hack exists because there's no way to configure extra extension +;;; search paths for IceCat or Icedove. The global extensions directory is +;;; constructed relatively to the executable file name. +(define (make-mozilla-with-l10n project base l10n-package) + "Return a package definition for PROJECT (a symbol such as 'icecat or +'icedove) that combines the BASE package with L10N-PACKAGE." + + (unless (member project '(icecat icedove)) + (error "only icecat or icedove components are currently supported")) + + (let ((name (symbol->string project)) + (icecat? (eq? 'icecat project))) + (package + (inherit base) + (name (symbol->string project)) + (build-system trivial-build-system) + (arguments + (list + #:modules '((guix build union) + (guix build utils)) + #:builder + #~(begin + (use-modules (guix build union) + (guix build utils)) + + (union-build #$output (list #$base #$l10n-package) + #:create-all-directories? #t) + + (define* (expose name #:optional (proc copy-file) + #:key (source #$base)) + (let ((dest (string-append #$output "/" name))) + (mkdir-p (dirname dest)) + (proc (string-append source "/" name) dest))) + + (let ((wrapper (string-append "lib/" #$name "/" #$name)) + (real-binary (string-append "lib/" #$name "/." #$name + "-real")) + (desktop-file (string-append "share/applications/" + #$name ".desktop"))) + ;; Copy wrapper file. + (delete-file (string-append #$output "/" wrapper)) + (expose wrapper) + + ;; Recreate bin symlink. + (delete-file (string-append #$output "/bin/" #$name)) + (symlink (string-append #$output "/" wrapper) + (string-append #$output "/bin/" #$name)) + + ;; Copy actual binary. + (delete-file (string-append #$output "/" real-binary)) + (expose real-binary) + + ;; Copy desktop file. + (delete-file (string-append #$output "/" desktop-file)) + (expose desktop-file) + + ;; Adjust the references in the desktop file and wrapper. + (substitute* (list (string-append #$output "/" desktop-file) + (string-append #$output "/" wrapper)) + ((#$base) #$output))))))))) + +(define-public icecat + (make-mozilla-with-l10n 'icecat icecat-minimal icecat-l10n)) + +(define-public icedove + (make-mozilla-with-l10n 'icedove icedove-minimal icedove-l10n)) + +(define-public icedove/wayland + (package + (inherit icedove) + (name "icedove-wayland") + (build-system trivial-build-system) + (arguments + (list + #:modules '((guix build utils)) + #:builder + #~(begin + (use-modules (guix build utils)) + (let* ((exe (string-append #$output "/bin/icedove"))) + (mkdir-p (dirname exe)) + (call-with-output-file exe + (lambda (port) + (format port "#!~a + MOZ_ENABLE_WAYLAND=1 exec ~a $@" + #$(file-append bash-minimal "/bin/bash") + #$(file-append icedove "/bin/icedove")))) + (chmod exe #o555) + ;; Provide the manual and .desktop file. + (copy-recursively (string-append #$icedove "/share") + (string-append #$output "/share")) + (substitute* (string-append #$output + "/share/applications/icedove.desktop") + ((#$icedove) #$output)))))) + (native-inputs '()) + (inputs '()))) + (define-public firefox-decrypt (package (name "firefox-decrypt") -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH v4 7/9] gnu: icedove: Use the locale of the system. 2023-02-19 19:23 ` bug#32026: [PATCH v4 1/9] gnu: Add a 'update-mozilla-locales' helper for maintenance Maxim Cournoyer ` (4 preceding siblings ...) 2023-02-19 19:24 ` bug#32026: [PATCH v4 6/9] gnu: Add language packs to icecat and icedove Maxim Cournoyer @ 2023-02-19 19:24 ` Maxim Cournoyer 2023-02-19 19:24 ` bug#32026: [PATCH v4 8/9] gnu: icecat: Remove gtk+-2 input Maxim Cournoyer ` (3 subsequent siblings) 9 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-19 19:24 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer * gnu/packages/gnuzilla.scm (icedove-source): Set the intl.locale.requested option to the empty string. --- (no changes since v1) gnu/packages/gnuzilla.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index ab2065054a..f12b1fd64d 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -1281,7 +1281,12 @@ (define icedove-source ;; system global application directory, such as the language ;; packs. (("\"extensions.autoDisableScopes\", 15") - "\"extensions.autoDisableScopes\", 3")) + "\"extensions.autoDisableScopes\", 3") + + ;; Set the default locale to that of the operating system. + ((".*extensions.autoDisableScopes.*" anchor) + (string-append anchor + "pref(\"intl.locale.requested\", \"\");\n"))) ;; Step out of the directory and create the tarball. (chdir "..") -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH v4 8/9] gnu: icecat: Remove gtk+-2 input. 2023-02-19 19:23 ` bug#32026: [PATCH v4 1/9] gnu: Add a 'update-mozilla-locales' helper for maintenance Maxim Cournoyer ` (5 preceding siblings ...) 2023-02-19 19:24 ` bug#32026: [PATCH v4 7/9] gnu: icedove: Use the locale of the system Maxim Cournoyer @ 2023-02-19 19:24 ` Maxim Cournoyer 2023-02-19 19:24 ` bug#32026: [PATCH v4 9/9] gnu: icecat: Unbundle nss and nspr Maxim Cournoyer ` (2 subsequent siblings) 9 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-19 19:24 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer * gnu/packages/gnuzilla.scm (icecat-minimal) [inputs]: Remove gtk+-2. --- (no changes since v2) Changes in v2: - New commit gnu/packages/gnuzilla.scm | 1 - 1 file changed, 1 deletion(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index f12b1fd64d..daffc97771 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -685,7 +685,6 @@ (define-public icecat-minimal gdk-pixbuf glib gtk+ - gtk+-2 ;; UNBUNDLE-ME! graphite2 cairo pango -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH v4 9/9] gnu: icecat: Unbundle nss and nspr. 2023-02-19 19:23 ` bug#32026: [PATCH v4 1/9] gnu: Add a 'update-mozilla-locales' helper for maintenance Maxim Cournoyer ` (6 preceding siblings ...) 2023-02-19 19:24 ` bug#32026: [PATCH v4 8/9] gnu: icecat: Remove gtk+-2 input Maxim Cournoyer @ 2023-02-19 19:24 ` Maxim Cournoyer 2023-02-19 20:17 ` bug#32026: [PATCH v4 1/9] gnu: Add a 'update-mozilla-locales' helper for maintenance Mark H Weaver 2023-02-20 11:06 ` Ludovic Courtès 9 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-19 19:24 UTC (permalink / raw) To: 32026; +Cc: mhw, ludo, Jonathan Brielmaier, Maxim Cournoyer * gnu/packages/gnuzilla.scm (icecat-minimal) [inputs]: Add nspr-next and nss-next. [configure-flags]: Re-instate the "--with-system-nspr" and "--with-system-nss" configure flags. [phases] {remove-bundled-libraries}: Update comment. --- (no changes since v2) Changes in v2: - New commit gnu/packages/gnuzilla.scm | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index daffc97771..f4723d683c 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -715,10 +715,8 @@ (define-public icecat-minimal mit-krb5 hunspell libnotify - ;; See <https://bugs.gnu.org/32833> - ;; and related comments in the 'remove-bundled-libraries' phase. - ;; UNBUNDLE-ME! nspr - ;; UNBUNDLE-ME! nss + nspr-next + nss-next shared-mime-info sqlite eudev @@ -813,12 +811,8 @@ (define-public icecat-minimal ;; UNBUNDLE-ME! "--with-system-theora" ; wants theora-1.2, not yet released ;; UNBUNDLE-ME! "--with-system-libvpx" "--with-system-icu" - - ;; See <https://bugs.gnu.org/32833> - ;; and related comments in the - ;; 'remove-bundled-libraries' phase below. - ;; UNBUNDLE-ME! "--with-system-nspr" - ;; UNBUNDLE-ME! "--with-system-nss" + "--with-system-nspr" + "--with-system-nss" ;; UNBUNDLE-ME! "--with-system-harfbuzz" ;; UNBUNDLE-ME! "--with-system-graphite2" @@ -867,12 +861,9 @@ (define-public icecat-minimal ;; FIXME: A script from the bundled nspr is used. ;;"nsprpub" ;; - ;; FIXME: With the update to IceCat 60, using system NSS - ;; broke certificate validation. See - ;; <https://bugs.gnu.org/32833>. For now, we use - ;; the bundled NSPR and NSS. TODO: Investigate, - ;; and try to unbundle these libraries again. - ;; UNBUNDLE-ME! "security/nss" + ;; FIXME: Some of the bundled NSS sources are used + ;; to build third_party/prio. + ;;"security/nss" ;; ;; TODO: Use more system media libraries. See: ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=517422> -- 2.39.1 ^ permalink raw reply related [flat|nested] 80+ messages in thread
* bug#32026: [PATCH v4 1/9] gnu: Add a 'update-mozilla-locales' helper for maintenance. 2023-02-19 19:23 ` bug#32026: [PATCH v4 1/9] gnu: Add a 'update-mozilla-locales' helper for maintenance Maxim Cournoyer ` (7 preceding siblings ...) 2023-02-19 19:24 ` bug#32026: [PATCH v4 9/9] gnu: icecat: Unbundle nss and nspr Maxim Cournoyer @ 2023-02-19 20:17 ` Mark H Weaver 2023-02-19 23:17 ` Maxim Cournoyer 2023-02-20 11:06 ` Ludovic Courtès 9 siblings, 1 reply; 80+ messages in thread From: Mark H Weaver @ 2023-02-19 20:17 UTC (permalink / raw) To: Maxim Cournoyer, 32026; +Cc: ludo, Jonathan Brielmaier, Maxim Cournoyer Hi Maxim, Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: > * gnu/packages/gnuzilla.scm (update-mozilla-locales): New procedure. > (all-mozilla-locales): Comment how to proceed to update it. The second line above should be removed to reflect the updated patch. > +(define (update-mozilla-locales changesets.json) > + "Output a new list of Mozilla locales, to update the ALL-MOZILLA-LOCALES > +variable defined bellow. It requires guile-json to be installed." s/bellow/below/ Otherwise, it looks good to me. Thanks! Mark ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH v4 1/9] gnu: Add a 'update-mozilla-locales' helper for maintenance. 2023-02-19 20:17 ` bug#32026: [PATCH v4 1/9] gnu: Add a 'update-mozilla-locales' helper for maintenance Mark H Weaver @ 2023-02-19 23:17 ` Maxim Cournoyer 0 siblings, 0 replies; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-19 23:17 UTC (permalink / raw) To: Mark H Weaver; +Cc: 32026, ludo, Jonathan Brielmaier Hi! Mark H Weaver <mhw@netris.org> writes: > Hi Maxim, > > Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: >> * gnu/packages/gnuzilla.scm (update-mozilla-locales): New procedure. >> (all-mozilla-locales): Comment how to proceed to update it. > > The second line above should be removed to reflect the updated patch. > >> +(define (update-mozilla-locales changesets.json) >> + "Output a new list of Mozilla locales, to update the ALL-MOZILLA-LOCALES >> +variable defined bellow. It requires guile-json to be installed." > > s/bellow/below/ > > Otherwise, it looks good to me. Adjusted locally, thanks! -- Thanks, Maxim ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH v4 1/9] gnu: Add a 'update-mozilla-locales' helper for maintenance. 2023-02-19 19:23 ` bug#32026: [PATCH v4 1/9] gnu: Add a 'update-mozilla-locales' helper for maintenance Maxim Cournoyer ` (8 preceding siblings ...) 2023-02-19 20:17 ` bug#32026: [PATCH v4 1/9] gnu: Add a 'update-mozilla-locales' helper for maintenance Mark H Weaver @ 2023-02-20 11:06 ` Ludovic Courtès 2023-02-20 15:35 ` Maxim Cournoyer 9 siblings, 1 reply; 80+ messages in thread From: Ludovic Courtès @ 2023-02-20 11:06 UTC (permalink / raw) To: Maxim Cournoyer; +Cc: mhw, 32026, Jonathan Brielmaier Hey Maxim, Thanks a lot for working on this! Having locales available makes a big difference to many users. (A couple of years ago I started working on that for the LibreOffice package. I got quite far but didn’t complete it. I can dig that from my stashes if there’s interest in giving a hand.) Ludo’. ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: [PATCH v4 1/9] gnu: Add a 'update-mozilla-locales' helper for maintenance. 2023-02-20 11:06 ` Ludovic Courtès @ 2023-02-20 15:35 ` Maxim Cournoyer 2023-02-22 9:19 ` bug#32026: LibreOffice locales Ludovic Courtès 0 siblings, 1 reply; 80+ messages in thread From: Maxim Cournoyer @ 2023-02-20 15:35 UTC (permalink / raw) To: Ludovic Courtès; +Cc: mhw, 32026, Jonathan Brielmaier Hi Ludovic, Ludovic Courtès <ludo@gnu.org> writes: > Hey Maxim, > > Thanks a lot for working on this! Having locales available makes a big > difference to many users. > > (A couple of years ago I started working on that for the LibreOffice > package. I got quite far but didn’t complete it. I can dig that from > my stashes if there’s interest in giving a hand.) I'd be interested to pick it up, yes! Perhaps not in the coming 2 weeks, which will be very busy for me, but afterward. -- Thanks, Maxim ^ permalink raw reply [flat|nested] 80+ messages in thread
* bug#32026: LibreOffice locales 2023-02-20 15:35 ` Maxim Cournoyer @ 2023-02-22 9:19 ` Ludovic Courtès 0 siblings, 0 replies; 80+ messages in thread From: Ludovic Courtès @ 2023-02-22 9:19 UTC (permalink / raw) To: Maxim Cournoyer; +Cc: mhw, 32026, Jonathan Brielmaier [-- Attachment #1: Type: text/plain, Size: 626 bytes --] Hi! Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis: > Ludovic Courtès <ludo@gnu.org> writes: [...] >> (A couple of years ago I started working on that for the LibreOffice >> package. I got quite far but didn’t complete it. I can dig that from >> my stashes if there’s interest in giving a hand.) > > I'd be interested to pick it up, yes! Perhaps not in the coming 2 > weeks, which will be very busy for me, but afterward. Here’s the WIP patch and associated LibreOffice patch (which didn’t quite work for some reason: LO wouldn’t look for locales where I wanted it to.) Ludo’. [-- Attachment #2: Type: text/x-patch, Size: 6515 bytes --] Unstaged modified gnu/packages/libreoffice.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be> ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2017 Andy Wingo <wingo@igalia.com> -;;; Copyright © 2017, 2018 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com> ;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net> @@ -53,6 +53,7 @@ (define-module (gnu packages libreoffice) #:use-module (gnu packages documentation) #:use-module (gnu packages flex) #:use-module (gnu packages fontutils) + #:use-module (gnu packages gettext) #:use-module (gnu packages ghostscript) #:use-module (gnu packages gl) #:use-module (gnu packages glib) @@ -969,7 +970,8 @@ (define-public libreoffice "0apbmammmp4pk473xiv5vk50r4c5gjvqzf9jkficksvz58q6114f")))) (search-patches "libreoffice-boost.patch" "libreoffice-icu.patch" - "libreoffice-glm.patch"))) + "libreoffice-glm.patch" + "libreoffice-locale-directory.patch"))) (modules '((guix build utils))) (snippet '(begin @@ -1164,6 +1166,16 @@ (define (install-appdata app) "--disable-pdfium" "--disable-gtk" ; disable use of GTK+ 2 "--without-doxygen"))) + + (native-search-paths + ;; This Guix-specific environment variable tells LibreOffice where to + ;; find locale data as provided by the 'libreoffice-translation-*' + ;; packages. + (list (search-path-specification + (variable "LO_LOCALE_DIRECTORY") + (separator #f) + (files '("share/libreoffice/locale"))))) + (home-page "https://www.libreoffice.org/") (synopsis "Office suite") (description "LibreOffice is a comprehensive office suite. It contains @@ -1172,3 +1184,84 @@ (define (install-appdata app) flowcharting application; Base, a database and database frontend; Math for editing mathematics.") (license mpl2.0))) + +(define (libreoffice-translation language) + (package + (inherit libreoffice) + (name (string-append "libreoffice-translation-" language)) + (version (package-version libreoffice)) + (build-system gnu-build-system) + (arguments + (substitute-keyword-arguments (package-arguments libreoffice) + ((#:phases phases '%standard-phases) + `(modify-phases ,phases + (add-after 'unpack 'unpack-translations + (lambda* (#:key inputs #:allow-other-keys) + (let ((translations (assoc-ref inputs "translations"))) + (mkdir "src") + (symlink translations + (string-append "src/libreoffice-translations-" + ,version ".tar.xz")) + #t))) + (replace 'build + (lambda _ + (invoke "make" "build-l10n-only" + "-j" (number->string (parallel-job-count))))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (locale (string-append out + ,(string-append + "/share/libreoffice/locale/" + language + "/LC_MESSAGES"))) + (registry (string-append out + "/lib/libreoffice/share/registry"))) + (for-each (lambda (mo) + (install-file mo locale)) + (find-files "." "\\.mo$")) + (for-each (lambda (xcd) + (install-file xcd registry)) + (find-files "." "^Langpack-.*\\.xcd$")) + (for-each (lambda (xcd) + (install-file xcd + (string-append registry "/res"))) + (find-files "." + ,(string-append language "\\.xcd$"))) + #t))) + (delete 'bin-and-desktop-install))) + ((#:configure-flags flags '()) + `(cons ,(string-append "--with-lang=" language) ,flags)) + ((#:tests? _ #f) + #f))) + (native-inputs + `(("gettext" ,gnu-gettext) + ("translations" ,(origin + (method url-fetch) + (uri (string-append + "https://download.documentfoundation.org/libreoffice/src/" + (version-prefix version 3) "/libreoffice-translations-" + version ".tar.xz")) + (sha256 + (base32 + "15fdni68b3kyl6115v0d24cl0dp1hdjhkx571w086lrpz0fk9mfi")))) + ,@(package-native-inputs libreoffice))) + (synopsis "Translation of the LibreOffice user interface"))) + +(define %libreoffice-translations + ;; List of available translations. Obtained by calling 'scandir' on the + ;; contents of 'translations/source' from the "libreoffice-translations" + ;; tarball. + '("ab" "af" "am" "an" "ar" "as" "ast" "az" "be" "bg" "bn" "bn-IN" "bo" "br" + "brx" "bs" "ca" "ca-valencia" "cs" "cy" "da" "de" "dgo" "dz" "el" "en-GB" + "en-ZA" "eo" "es" "et" "eu" "fa" "fi" "fr" "fy" "ga" "gd" "gl" "gu" "gug" + "he" "hi" "hr" "hsb" "hu" "id" "is" "it" "ja" "jv" "ka" "kab" "kk" "kl" + "km" "kmr-Latn" "kn" "ko" "kok" "ks" "ky" "lb" "lo" "lt" "lv" "mai" "mk" + "ml" "mn" "mni" "mr" "my" "nb" "ne" "nl" "nn" "nr" "nso" "oc" "om" "or" + "pa-IN" "pl" "pt" "pt-BR" "ro" "ru" "rw" "sah" "sa-IN" "sat" "sd" "si" + "sid" "sk" "sl" "sq" "sr" "sr-Latn" "ss" "st" "sv" "sw-TZ" "szl" "ta" "te" + "tg" "th" "ti" "tn" "tr" "ts" "tt" "ug" "uk" "ur" "uz" "ve" "vec" "vi" + "xh" "zh-CN" "zh-TW" "zu")) + +(define-public libreoffice-l10n-fr + (libreoffice-translation "fr")) [-- Attachment #3: the LO patch --] [-- Type: text/x-patch, Size: 1048 bytes --] Define a new environment variable to determine the directory where message catalogs ('.mo' files) are to be be looked up. LibreOffice already has environment variables such as 'BRAND_BASE_DIR' and 'BRAND_SHARE_RESOURCE_SUBDIR' but these are not helpful in this case. Patch by Ludovic Courtès <ludo@gnu.org>. --- libreoffice-6.1.5.2/unotools/source/i18n/resmgr.cxx 2019-03-10 16:22:21.352963608 +0100 +++ libreoffice-6.1.5.2/unotools/source/i18n/resmgr.cxx 2019-03-10 16:30:20.090848346 +0100 @@ -144,6 +144,11 @@ namespace Translate rtl::Bootstrap::expandMacros(uri); OUString path; osl::File::getSystemPathFromFileURL(uri, path); + + const char *cLocaleDir = ::getenv("LO_LOCALE_DIRECTORY"); + if (cLocaleDir != NULL) + path = OUString::createFromAscii(cLocaleDir); + OString sPath(OUStringToOString(path, osl_getThreadTextEncoding())); gen.add_messages_path(sPath.getStr()); #if defined UNX && !defined MACOSX && !defined IOS && !defined ANDROID ^ permalink raw reply [flat|nested] 80+ messages in thread
end of thread, other threads:[~2023-02-22 9:20 UTC | newest] Thread overview: 80+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-07-01 20:23 bug#32026: IceCat locales are missing? Ludovic Courtès 2023-02-14 1:55 ` bug#32026: [PATCH 00/10] Add proper locale support to IceCat and Icedove Maxim Cournoyer 2023-02-14 1:55 ` bug#32026: [PATCH 01/10] gnu: Add a 'update-mozilla-locales' helper for maintenance Maxim Cournoyer 2023-02-14 1:55 ` bug#32026: [PATCH 02/10] gnu: icedove: Compute a self-contained source Maxim Cournoyer 2023-02-14 21:32 ` Jonathan Brielmaier 2023-02-16 0:55 ` Maxim Cournoyer 2023-02-14 1:55 ` bug#32026: [PATCH 03/10] gnu: Define UPSTREAM-FIREFOX-SOURCE at the top level Maxim Cournoyer 2023-02-14 1:55 ` bug#32026: [PATCH 04/10] gnu: icecat: Update the "ach" locale Maxim Cournoyer 2023-02-15 6:39 ` Mark H Weaver 2023-02-14 1:55 ` bug#32026: [PATCH 05/10] gnu: icecat: Add a patch that makes building language packs reproducible Maxim Cournoyer 2023-02-14 7:58 ` Mark H Weaver 2023-02-14 13:58 ` Maxim Cournoyer 2023-02-14 21:06 ` Mark H Weaver 2023-02-15 21:32 ` Maxim Cournoyer 2023-02-14 1:55 ` bug#32026: [PATCH 06/10] gnu: Add icecat-l10n and icedove-l10n Maxim Cournoyer 2023-02-14 1:55 ` bug#32026: [PATCH 07/10] gnu: icedove: Automatically load system-provided extensions Maxim Cournoyer 2023-02-14 1:55 ` bug#32026: [PATCH 08/10] gnu: Add language packs to icecat and icedove Maxim Cournoyer 2023-02-14 1:55 ` bug#32026: [PATCH 09/10] gnu: icedove: Use the locale of the system Maxim Cournoyer 2023-02-14 1:55 ` bug#32026: [PATCH 10/10] gnu: icecat: " Maxim Cournoyer 2023-02-14 9:23 ` Mark H Weaver 2023-02-14 14:00 ` Maxim Cournoyer 2023-02-16 4:36 ` bug#32026: [PATCH 01/10] gnu: Add a 'update-mozilla-locales' helper for maintenance Maxim Cournoyer 2023-02-16 4:36 ` bug#32026: [PATCH 02/10] gnu: icedove: Compute a self-contained source Maxim Cournoyer 2023-02-16 4:36 ` bug#32026: [PATCH 03/10] gnu: Define UPSTREAM-FIREFOX-SOURCE at the top level Maxim Cournoyer 2023-02-16 22:26 ` Mark H Weaver 2023-02-17 2:55 ` Maxim Cournoyer 2023-02-18 20:46 ` Mark H Weaver 2023-02-19 17:43 ` Maxim Cournoyer 2023-02-20 1:06 ` Maxim Cournoyer 2023-02-16 4:36 ` bug#32026: [PATCH 04/10] gnu: icecat: Make language packs reproducible Maxim Cournoyer 2023-02-16 4:36 ` bug#32026: [PATCH 05/10] gnu: Add icecat-l10n and icedove-l10n Maxim Cournoyer 2023-02-16 22:45 ` Mark H Weaver 2023-02-17 3:37 ` Maxim Cournoyer 2023-02-18 20:22 ` Mark H Weaver 2023-02-18 20:42 ` Maxim Cournoyer 2023-02-16 4:36 ` bug#32026: [PATCH 06/10] gnu: icedove: Automatically load system-provided extensions Maxim Cournoyer 2023-02-16 4:36 ` bug#32026: [PATCH 07/10] gnu: Add language packs to icecat and icedove Maxim Cournoyer 2023-02-16 4:36 ` bug#32026: [PATCH 08/10] gnu: icedove: Use the locale of the system Maxim Cournoyer 2023-02-16 4:36 ` bug#32026: [PATCH 09/10] gnu: icecat: Remove gtk+-2 input Maxim Cournoyer 2023-02-16 22:50 ` Mark H Weaver 2023-02-16 4:36 ` bug#32026: [PATCH 10/10] gnu: icecat: Unbundle nss and nspr Maxim Cournoyer 2023-02-16 22:14 ` Mark H Weaver 2023-02-17 19:44 ` Maxim Cournoyer 2023-02-18 1:02 ` Mark H Weaver 2023-02-18 14:09 ` Maxim Cournoyer 2023-02-16 22:05 ` bug#32026: [PATCH 01/10] gnu: Add a 'update-mozilla-locales' helper for maintenance Mark H Weaver 2023-02-17 2:25 ` Maxim Cournoyer 2023-02-17 12:55 ` bug#32026: [PATCH v3 01/11] " Maxim Cournoyer 2023-02-17 12:55 ` bug#32026: [PATCH v3 02/11] gnu: icedove: Compute a self-contained source Maxim Cournoyer 2023-02-17 12:55 ` bug#32026: [PATCH v3 03/11] gnu: Define UPSTREAM-FIREFOX-SOURCE at the top level Maxim Cournoyer 2023-02-17 12:55 ` bug#32026: [PATCH v3 04/11] gnu: icecat: Make language packs reproducible Maxim Cournoyer 2023-02-18 21:02 ` Mark H Weaver 2023-02-19 17:35 ` Maxim Cournoyer 2023-02-17 12:55 ` bug#32026: [PATCH v3 05/11] gnu: Add icecat-l10n and icedove-l10n Maxim Cournoyer 2023-02-17 12:55 ` bug#32026: [PATCH v3 06/11] gnu: icedove: Automatically load system-provided extensions Maxim Cournoyer 2023-02-17 12:55 ` bug#32026: [PATCH v3 07/11] gnu: Add language packs to icecat and icedove Maxim Cournoyer 2023-02-17 12:55 ` bug#32026: [PATCH v3 08/11] gnu: icedove: Use the locale of the system Maxim Cournoyer 2023-02-17 12:55 ` bug#32026: [PATCH v3 09/11] gnu: icecat: Remove gtk+-2 input Maxim Cournoyer 2023-02-17 12:55 ` bug#32026: [PATCH v3 10/11] gnu: nss-next: Update to 3.88.1 [fixes CVE-2023-0767] Maxim Cournoyer 2023-02-17 21:38 ` Mark H Weaver 2023-02-18 17:27 ` Maxim Cournoyer 2023-02-18 19:49 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix 2023-02-18 20:45 ` Maxim Cournoyer 2023-02-17 12:55 ` bug#32026: [PATCH v3 11/11] gnu: icecat: Unbundle nss and nspr Maxim Cournoyer 2023-02-19 19:23 ` bug#32026: [PATCH v4 1/9] gnu: Add a 'update-mozilla-locales' helper for maintenance Maxim Cournoyer 2023-02-19 19:23 ` bug#32026: [PATCH v4 2/9] gnu: icedove: Compute a self-contained source Maxim Cournoyer 2023-02-19 19:23 ` bug#32026: [PATCH v4 3/9] gnu: Define %icecat-base-version at the top level Maxim Cournoyer 2023-02-19 20:13 ` Mark H Weaver 2023-02-19 22:14 ` Maxim Cournoyer 2023-02-19 19:24 ` bug#32026: [PATCH v4 4/9] gnu: Add icecat-l10n and icedove-l10n Maxim Cournoyer 2023-02-19 19:24 ` bug#32026: [PATCH v4 5/9] gnu: icedove: Automatically load system-provided extensions Maxim Cournoyer 2023-02-19 19:24 ` bug#32026: [PATCH v4 6/9] gnu: Add language packs to icecat and icedove Maxim Cournoyer 2023-02-19 19:24 ` bug#32026: [PATCH v4 7/9] gnu: icedove: Use the locale of the system Maxim Cournoyer 2023-02-19 19:24 ` bug#32026: [PATCH v4 8/9] gnu: icecat: Remove gtk+-2 input Maxim Cournoyer 2023-02-19 19:24 ` bug#32026: [PATCH v4 9/9] gnu: icecat: Unbundle nss and nspr Maxim Cournoyer 2023-02-19 20:17 ` bug#32026: [PATCH v4 1/9] gnu: Add a 'update-mozilla-locales' helper for maintenance Mark H Weaver 2023-02-19 23:17 ` Maxim Cournoyer 2023-02-20 11:06 ` Ludovic Courtès 2023-02-20 15:35 ` Maxim Cournoyer 2023-02-22 9:19 ` bug#32026: LibreOffice locales Ludovic Courtès
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/guix.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).