From 7f822277927f25fbf317845d9fdd8e42259af4d7 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Mon, 13 Feb 2023 15:25:20 +0100 Subject: [PATCH] Resolves: #2167592 Update to 102.8.0 build1 --- .gitignore | 2 + D161379.diff | 322 --------------------------------- D161895.diff | 49 ----- backport-rnp-use-openssl.patch | 12 -- sources | 4 +- thunderbird.spec | 20 +- 6 files changed, 11 insertions(+), 398 deletions(-) delete mode 100644 D161379.diff delete mode 100644 D161895.diff delete mode 100644 backport-rnp-use-openssl.patch diff --git a/.gitignore b/.gitignore index 93825ef..df4145d 100644 --- a/.gitignore +++ b/.gitignore @@ -57,3 +57,5 @@ /thunderbird-102.7.1.processed-source.tar.xz /thunderbird-langpacks-102.7.1-20230124.tar.xz /thunderbird-langpacks-102.7.1-20230131.tar.xz +/thunderbird-102.8.0.processed-source.tar.xz +/thunderbird-langpacks-102.8.0-20230210.tar.xz diff --git a/D161379.diff b/D161379.diff deleted file mode 100644 index c8469bd..0000000 --- a/D161379.diff +++ /dev/null @@ -1,322 +0,0 @@ -diff -up comm/third_party/moz.build.D161379.diff comm/third_party/moz.build ---- comm/third_party/moz.build.D161379.diff 2022-10-14 21:45:15.000000000 +0200 -+++ comm/third_party/moz.build 2022-11-10 11:49:44.194016978 +0100 -@@ -11,9 +11,11 @@ if CONFIG["TB_LIBOTR_PREBUILT"]: - - if CONFIG["MZLA_LIBRNP"]: - DIRS += [ -- "botan", - "bzip2", - "json-c", - "rnp", - "zlib", - ] -+ if CONFIG["MZLA_LIBRNP_BACKEND"] == "botan": -+ DIRS += [ "botan" ] -+ -diff -up comm/third_party/openpgp.configure.D161379.diff comm/third_party/openpgp.configure ---- comm/third_party/openpgp.configure.D161379.diff 2022-11-10 11:49:37.605024129 +0100 -+++ comm/third_party/openpgp.configure 2022-11-10 11:49:44.194016978 +0100 -@@ -199,16 +199,136 @@ with only_when(in_tree_librnp): - set_config("MZLA_BZIP2_CFLAGS", bzip2_flags.cflags) - set_config("MZLA_BZIP2_LIBS", bzip2_flags.ldflags) - -- # BOTAN --with-system-botan -- system_lib_option( -- "--with-system-botan", -- help="Use system Botan for librnp (located with pkgconfig)", -- ) -- -- botan_pkg = pkg_check_modules( -- "MZLA_BOTAN", "botan-2 >= 2.8.0", when="--with-system-botan" -- ) -- set_config("MZLA_SYSTEM_BOTAN", depends_if(botan_pkg)(lambda _: True)) -+ # librnp crypto backend selection -+ option("--with-librnp-backend", -+ help="Build librnp with the selected backend: {botan, openssl}", -+ default="botan") -+ -+ @depends("--with-librnp-backend") -+ def librnp_backend(backend): -+ allowed = ("botan", "openssl") -+ if backend[0] in allowed: -+ return backend[0] -+ else: -+ die(f"Unsupported librnp backend {backend[0]}.") -+ -+ set_config("MZLA_LIBRNP_BACKEND", librnp_backend) -+ -+ @depends(librnp_backend) -+ def rnp_botan(backend): -+ return backend == "botan" -+ -+ @depends(librnp_backend) -+ def rnp_openssl(backend): -+ return backend == "openssl" -+ -+ # Botan backend (--with-system-botan) -+ with only_when(rnp_botan): -+ system_lib_option( -+ "--with-system-botan", -+ help="Use system Botan for librnp (located with pkgconfig)", -+ ) -+ -+ botan_pkg = pkg_check_modules( -+ "MZLA_BOTAN", "botan-2 >= 2.8.0", when="--with-system-botan" -+ ) -+ set_config("MZLA_SYSTEM_BOTAN", depends_if(botan_pkg)(lambda _: True)) -+ -+ -+ # OpenSSL backend -+ with only_when(rnp_openssl): -+ option( -+ "--with-openssl", -+ nargs=1, -+ help="OpenSSL library prefix (when not found by pkgconfig)" -+ ) -+ openssl_pkg = pkg_check_modules( -+ "MZLA_LIBRNP_OPENSSL", -+ "openssl > 1.1.1", -+ allow_missing=True, -+ config=False -+ ) -+ @depends_if("--with-openssl", openssl_pkg) -+ @imports(_from="os.path", _import="isdir") -+ @imports(_from="os.path", _import="join") -+ def openssl_flags(openssl_prefix, openssl_pkg): -+ if openssl_prefix: -+ openssl_prefix = openssl_prefix[0] -+ include = join(openssl_prefix, "include") -+ lib = join(openssl_prefix, "lib") -+ if not isdir(lib): -+ lib = join(openssl_prefix, "lib64") -+ if isdir(include) and isdir(lib): -+ log.info(f"Using OpenSSL at {openssl_prefix}.") -+ return namespace( -+ cflags=(f"-I{include}",), -+ ldflags=(f"-L{lib}", "-lssl", "-lcrypto"), -+ ) -+ if openssl_pkg: -+ return namespace( -+ cflags=openssl_pkg.cflags, -+ ldflags=openssl_pkg.libs, -+ ) -+ set_config("MZLA_LIBRNP_OPENSSL_CFLAGS", openssl_flags.cflags) -+ set_config("MZLA_LIBRNP_OPENSSL_LIBS", openssl_flags.ldflags) -+ -+ -+ @depends(c_compiler, openssl_flags) -+ @imports(_from="textwrap", _import="dedent") -+ def openssl_version(compiler, openssl_flags): -+ log.info("Checking for OpenSSL >= 1.1.1") -+ if openssl_flags is None: -+ die("OpenSSL not found. Must be locatable with pkg-config or use --with-openssl.") -+ -+ def ossl_hexver(hex_str): -+ # See opensshlv.h for description of OPENSSL_VERSION_NUMBER -+ MIN_OSSL_VER = 0x1010100f # Version 1.1.1 -+ ver_as_int = int(hex_str[:-1], 16) -+ ossl_major = (ver_as_int & 0xf0000000) >> 28 -+ ossl_minor = (ver_as_int & 0x0ff00000) >> 20 -+ ossl_fix = (ver_as_int & 0x000ff000) >> 12 -+ ossl_patch = chr(96 + (ver_as_int & 0x00000ff0) >> 4) # as a letter a-z -+ ver_as_str = f"{ossl_major}.{ossl_minor}.{ossl_fix}{ossl_patch}" -+ if ver_as_int < MIN_OSSL_VER: -+ die(f"OpenSSL version {ver_as_str} is too old.") -+ return ver_as_str -+ -+ check = dedent( -+ """\ -+ #include -+ #ifdef OPENSSL_VERSION_STR -+ OPENSSL_VERSION_STR -+ #elif defined(OPENSSL_VERSION_NUMBER) -+ OPENSSL_VERSION_NUMBER -+ #else -+ #error Unable to determine OpenSSL version. -+ #endif -+ """ -+ ) -+ result = try_preprocess( -+ compiler.wrapper -+ + [compiler.compiler] -+ + compiler.flags -+ + list(openssl_flags.cflags), -+ "C", -+ check -+ ) -+ if result: -+ openssl_ver = result.splitlines()[-1] -+ if openssl_ver.startswith("0x"): -+ # OpenSSL 1.x.x - like 0x1010107fL -+ openssl_ver = ossl_hexver(openssl_ver) -+ else: -+ # OpenSSL 3.x.x - quoted version like "3.0.7" -+ openssl_ver = openssl_ver.replace('"', "") -+ major_version = openssl_ver.split(".")[0] -+ if major_version != "3": -+ die("Unrecognized OpenSSL version {openssl_version} found. Require >= 1.1.1 or 3.x.x") -+ -+ log.info(f"Found OpenSSL {openssl_ver}.") -+ return openssl_ver -+ -+ set_config("MZLA_LIBRNP_OPENSSL_VERSION", openssl_version) - - # Checks for building librnp itself - # ================================= -diff -up comm/third_party/rnp/moz.build.D161379.diff comm/third_party/rnp/moz.build ---- comm/third_party/rnp/moz.build.D161379.diff 2022-11-10 11:49:43.682017534 +0100 -+++ comm/third_party/rnp/moz.build 2022-11-10 11:51:22.878909880 +0100 -@@ -36,17 +36,53 @@ if CONFIG["CC_TYPE"] == "clang-cl": - "/EHs", - ] - -+LOCAL_INCLUDES = [ -+ "include", -+ "src", -+ "src/common", -+ "src/lib", -+] -+ -+IQuote( -+ "{}/src/lib".format(OBJDIR), -+ "{}/src/lib".format(SRCDIR), -+) -+ -+# Set up defines for src/lib/config.h - rnp_defines = { - "HAVE_BZLIB_H": True, - "HAVE_ZLIB_H": True, -- "CRYPTO_BACKEND_OPENSSL": True, -- "ENABLE_AEAD": True, -- "ENABLE_TWOFISH": True, -- "ENABLE_BRAINPOOL": True, - "ENABLE_IDEA": True, - "PACKAGE_BUGREPORT": '"https://bugzilla.mozilla.org/enter_bug.cgi?product=Thunderbird"', - "PACKAGE_STRING": '"rnp {}"'.format(CONFIG["MZLA_LIBRNP_FULL_VERSION"]) - } -+if CONFIG["MZLA_LIBRNP_BACKEND"] == "botan": -+ LOCAL_INCLUDES += ["!../botan/build/include"] -+ if CONFIG["MZLA_SYSTEM_BOTAN"]: -+ CXXFLAGS += CONFIG["MZLA_BOTAN_CFLAGS"] -+ -+ rnp_defines.update({ -+ "CRYPTO_BACKEND_BOTAN": True, -+ "ENABLE_AEAD": True, -+ "ENABLE_TWOFISH": True, -+ "ENABLE_BRAINPOOL": True, -+ }) -+elif CONFIG["MZLA_LIBRNP_BACKEND"] == "openssl": -+ CXXFLAGS += CONFIG["MZLA_LIBRNP_OPENSSL_CFLAGS"] -+ OS_LIBS += CONFIG["MZLA_LIBRNP_OPENSSL_LIBS"] -+ -+ rnp_defines.update({ -+ "CRYPTO_BACKEND_OPENSSL": True, -+ # Not supported with RNP+OpenSSL https://github.com/rnpgp/rnp/issues/1642 -+ "ENABLE_AEAD": False, -+ # Not supported by OpenSSL https://github.com/openssl/openssl/issues/2046 -+ "ENABLE_TWOFISH": False, -+ # Supported, but not with RHEL's OpenSSL, disabled for now; -+ "ENABLE_BRAINPOOL": False, -+ }) -+ if CONFIG["MZLA_LIBRNP_OPENSSL_VERSION"][0] == "3": -+ rnp_defines["CRYPTO_BACKEND_OPENSSL3"] = True -+ - GeneratedFile( - "src/lib/config.h", - script="/comm/python/rocbuild/process_cmake_define_files.py", -@@ -57,23 +93,6 @@ GeneratedFile( - ], - ) - --LOCAL_INCLUDES = [ -- "include", -- "src", -- "src/common", -- "src/lib", --] -- --IQuote( -- "{}/src/lib".format(OBJDIR), -- "{}/src/lib".format(SRCDIR), --) -- --if CONFIG["MZLA_SYSTEM_BOTAN"]: -- CXXFLAGS += CONFIG["MZLA_BOTAN_CFLAGS"] --else: -- LOCAL_INCLUDES += ["!../botan/build/include"] -- - if CONFIG["MOZ_SYSTEM_ZLIB"]: - CXXFLAGS += CONFIG["MOZ_ZLIB_CFLAGS"] - else: -@@ -109,29 +128,16 @@ SOURCES += [ - "src/common/time-utils.cpp", - "src/lib/crypto.cpp", - "src/lib/crypto/backend_version.cpp", -- "src/lib/crypto/bn.cpp", - "src/lib/crypto/cipher.cpp", -- "src/lib/crypto/cipher_botan.cpp", -- "src/lib/crypto/dsa.cpp", -- "src/lib/crypto/ec.cpp", - "src/lib/crypto/ec_curves.cpp", -- "src/lib/crypto/ecdh.cpp", - "src/lib/crypto/ecdh_utils.cpp", -- "src/lib/crypto/ecdsa.cpp", -- "src/lib/crypto/eddsa.cpp", -- "src/lib/crypto/elgamal.cpp", -- "src/lib/crypto/hash.cpp", - "src/lib/crypto/hash_common.cpp", - "src/lib/crypto/hash_sha1cd.cpp", -- "src/lib/crypto/mem.cpp", - "src/lib/crypto/mpi.cpp", -- "src/lib/crypto/rng.cpp", -- "src/lib/crypto/rsa.cpp", - "src/lib/crypto/s2k.cpp", - "src/lib/crypto/sha1cd/sha1.c", - "src/lib/crypto/sha1cd/ubc_check.c", - "src/lib/crypto/signatures.cpp", -- "src/lib/crypto/symmetric.cpp", - "src/lib/fingerprint.cpp", - "src/lib/generate-key.cpp", - "src/lib/json-utils.cpp", -@@ -159,4 +165,40 @@ SOURCES += [ - "src/librepgp/stream-write.cpp", - ] - -+if CONFIG["MZLA_LIBRNP_BACKEND"] == "botan": -+ SOURCES += [ -+ "src/lib/crypto/bn.cpp", -+ "src/lib/crypto/cipher_botan.cpp", -+ "src/lib/crypto/dsa.cpp", -+ "src/lib/crypto/ec.cpp", -+ "src/lib/crypto/ecdh.cpp", -+ "src/lib/crypto/ecdsa.cpp", -+ "src/lib/crypto/eddsa.cpp", -+ "src/lib/crypto/elgamal.cpp", -+ "src/lib/crypto/hash.cpp", -+ "src/lib/crypto/mem.cpp", -+ "src/lib/crypto/rng.cpp", -+ "src/lib/crypto/rsa.cpp", -+ "src/lib/crypto/symmetric.cpp", -+ ] -+if CONFIG["MZLA_LIBRNP_BACKEND"] == "openssl": -+ SOURCES += [ -+ "src/lib/crypto/bn_ossl.cpp", -+ "src/lib/crypto/cipher_ossl.cpp", -+ "src/lib/crypto/dl_ossl.cpp", -+ "src/lib/crypto/dsa_ossl.cpp", -+ "src/lib/crypto/ec_ossl.cpp", -+ "src/lib/crypto/ecdh_ossl.cpp", -+ "src/lib/crypto/ecdsa_ossl.cpp", -+ "src/lib/crypto/eddsa_ossl.cpp", -+ "src/lib/crypto/elgamal_ossl.cpp", -+ "src/lib/crypto/hash_crc24.cpp", -+ "src/lib/crypto/hash_ossl.cpp", -+ "src/lib/crypto/mem_ossl.cpp", -+ "src/lib/crypto/rng_ossl.cpp", -+ "src/lib/crypto/rsa_ossl.cpp", -+ "src/lib/crypto/s2k_ossl.cpp", -+ "src/lib/crypto/symmetric_ossl.cpp", -+ ] -+ - DIRS += ["src/rnp", "src/rnpkeys"] diff --git a/D161895.diff b/D161895.diff deleted file mode 100644 index fd0953f..0000000 --- a/D161895.diff +++ /dev/null @@ -1,49 +0,0 @@ -diff --git a/third_party/openpgp.configure b/third_party/openpgp.configure ---- a/third_party/openpgp.configure -+++ b/third_party/openpgp.configure -@@ -198,21 +198,27 @@ - ) - set_config("MZLA_BZIP2_CFLAGS", bzip2_flags.cflags) - set_config("MZLA_BZIP2_LIBS", bzip2_flags.ldflags) - - # librnp crypto backend selection -+ @depends(target_is_linux) -+ def librnp_backend_choices(is_linux): -+ if is_linux: -+ return ("botan", "openssl") -+ else: -+ return ("botan",) -+ - option("--with-librnp-backend", -- help="Build librnp with the selected backend: {botan, openssl}", -+ help="Build librnp with the selected backend", -+ choices=librnp_backend_choices, -+ nargs=1, - default="botan") - - @depends("--with-librnp-backend") - def librnp_backend(backend): -- allowed = ("botan", "openssl") -- if backend[0] in allowed: -+ if backend: - return backend[0] -- else: -- die(f"Unsupported librnp backend {backend[0]}.") - - set_config("MZLA_LIBRNP_BACKEND", librnp_backend) - - @depends(librnp_backend) - def rnp_botan(backend): -@@ -273,10 +279,11 @@ - set_config("MZLA_LIBRNP_OPENSSL_LIBS", openssl_flags.ldflags) - - - @depends(c_compiler, openssl_flags) - @imports(_from="textwrap", _import="dedent") -+ @imports(_from="__builtin__", _import="chr") - def openssl_version(compiler, openssl_flags): - log.info("Checking for OpenSSL >= 1.1.1") - if openssl_flags is None: - die("OpenSSL not found. Must be locatable with pkg-config or use --with-openssl.") - - diff --git a/backport-rnp-use-openssl.patch b/backport-rnp-use-openssl.patch deleted file mode 100644 index a529758..0000000 --- a/backport-rnp-use-openssl.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up thunderbird-102.4.0/comm/third_party/rnp/moz.build.rnp-openssl thunderbird-102.4.0/comm/third_party/rnp/moz.build ---- thunderbird-102.4.0/comm/third_party/rnp/moz.build.rnp-openssl 2022-11-01 14:36:02.940726858 +0100 -+++ thunderbird-102.4.0/comm/third_party/rnp/moz.build 2022-11-01 14:36:23.091726917 +0100 -@@ -39,7 +39,7 @@ if CONFIG["CC_TYPE"] == "clang-cl": - rnp_defines = { - "HAVE_BZLIB_H": True, - "HAVE_ZLIB_H": True, -- "CRYPTO_BACKEND_BOTAN": True, -+ "CRYPTO_BACKEND_OPENSSL": True, - "ENABLE_AEAD": True, - "ENABLE_TWOFISH": True, - "ENABLE_BRAINPOOL": True, diff --git a/sources b/sources index 91b8f8f..4d3bd0e 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ SHA512 (nss-3.79.0-6.el8_1.src.rpm) = 5887d0f306045adf7c6f3389840fff2e2732e5a15ec5e22cf885e578105b54d9e753c237e7730c2d3f0990728b10123c653e8d18a8b8dd0174bfb5b443eab7ef SHA512 (nspr-4.34.0-3.el8_1.src.rpm) = fe4715694c297cd8cefa577946358a90103bde73e78a3fdf13d202a3791736e8a48fbece09ee3d15f6d81ae051e26d96400b03bb6bf8630715746c5e1a643543 SHA512 (cbindgen-vendor.tar.xz) = 590e27b6c093a5c1bd839ca39c68537097d0849087a4a385ee6d7b180e9ceadbbb8974fa997f5f75af03e2c243a2f232d0d4c4c46e253ea464521b76c6886067 -SHA512 (thunderbird-102.7.1.processed-source.tar.xz) = 4f07a9ed308517b828c65db3c8542b6ae2b79859ceb1219333207dd03d3649b8a7b40f90e9f20ae5190958412597b15b8a638ddea42f40ae46958ac80e362675 -SHA512 (thunderbird-langpacks-102.7.1-20230131.tar.xz) = aeece42e25fa60d17d2714890d183520f512bca1640280bf9b3704abdb504cb860d536bd9368993850c12152ce4590ff7d26682b169d1f8cffbb956100f15b90 +SHA512 (thunderbird-102.8.0.processed-source.tar.xz) = 58c4afb7a5bba2273ee9c63dbebe97c5694ba78a4d15a6816b059a350c595067bed629141a9a01c6e21e03769f6ad2e82b33d56bad43f457bf3f321f1ce9322d +SHA512 (thunderbird-langpacks-102.8.0-20230210.tar.xz) = d572654a4d3f6e5bdaa9910bf396f59dd17c8e5cc8505df31df328652735cb13c8c709c7816c38d471e9f3b484f3eeae1e59492de27e22b83a1f26569b2ef1a5 diff --git a/thunderbird.spec b/thunderbird.spec index 67485ad..b217c71 100644 --- a/thunderbird.spec +++ b/thunderbird.spec @@ -165,8 +165,8 @@ end} Summary: Mozilla Thunderbird mail/newsgroup client Name: thunderbird -Version: 102.7.1 -Release: 2%{?dist} +Version: 102.8.0 +Release: 1%{?dist} URL: http://www.mozilla.org/projects/thunderbird/ License: MPLv1.1 or GPLv2+ or LGPLv2+ @@ -187,7 +187,7 @@ ExcludeArch: aarch64 s390 ppc #Source0: https://archive.mozilla.org/pub/thunderbird/releases/%{version}%{?pre_version}/source/thunderbird-%{version}%{?pre_version}.processed-source.tar.xz Source0: thunderbird-%{version}%{?pre_version}.processed-source.tar.xz %if %{build_langpacks} -Source1: thunderbird-langpacks-%{version}-20230131.tar.xz +Source1: thunderbird-langpacks-%{version}-20230210.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: process-official-tarball @@ -245,9 +245,6 @@ Patch422: mozilla-s390x-skia-gradient.patch Patch423: one_swizzle_to_rule_them_all.patch Patch424: svg-rendering.patch Patch425: D158770.diff -Patch5439: backport-rnp-use-openssl.patch -Patch5479: D161379.diff -Patch5480: D161895.diff # PGO/LTO patches Patch600: pgo.patch @@ -617,13 +614,7 @@ echo "use_rustts %{?use_rustts}" %patch424 -p1 -b .svg-rendering %patch425 -p1 -b .D158770.diff -%if %{?use_openssl_for_librnp} -%patch5439 -p1 -b .backport-rnp-use-openssl -pushd comm -%patch5479 -p1 -b .D161379.diff -%patch5480 -p1 -b .D161895.diff -popd -%else +%if !%{?use_openssl_for_librnp} %patch230 -p1 -b .disable-openpgp-in-thunderbird %endif @@ -1258,6 +1249,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #=============================================================================== %changelog +* Fri Feb 10 2023 Eike Rathke - 102.8.0-1 +- Update to 102.8.0 build1 + * Tue Jan 31 2023 Eike Rathke - 102.7.1-2 - Update to 102.7.1 build2