Toshaan Bharvani
2 years ago
commit
43feb1f711
30 changed files with 3445 additions and 0 deletions
@ -0,0 +1,42 @@ |
|||||||
|
From efd5bc0715e5477318be95a76811cda0a89e8289 Mon Sep 17 00:00:00 2001 |
||||||
|
From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= <emilio@crisal.io> |
||||||
|
Date: Fri, 4 Mar 2022 12:00:26 +0100 |
||||||
|
Subject: [PATCH] GLIBCXX fix for GCC 12? |
||||||
|
|
||||||
|
Borrowed from Firefox and adjusted to Thunderbird 91.7.0 |
||||||
|
|
||||||
|
--- |
||||||
|
build/unix/stdc++compat/stdc++compat.cpp | 14 ++++++++++++++ |
||||||
|
1 file changed, 14 insertions(+) |
||||||
|
|
||||||
|
diff --git a/build/unix/stdc++compat/stdc++compat.cpp b/build/unix/stdc++compat/stdc++compat.cpp |
||||||
|
--- thunderbird-91.7.0/build/unix/stdc++compat/stdc++compat.cpp.0001-GLIBCXX-fix-for-GCC-12 2022-03-07 20:34:15.000000000 +0100 |
||||||
|
+++ thunderbird-91.7.0/build/unix/stdc++compat/stdc++compat.cpp 2022-03-15 22:50:03.161345590 +0100 |
||||||
|
@@ -24,6 +24,7 @@ |
||||||
|
GLIBCXX_3.4.27 is from gcc 10 |
||||||
|
GLIBCXX_3.4.28 is from gcc 10 |
||||||
|
GLIBCXX_3.4.29 is from gcc 11 |
||||||
|
+ GLIBCXX_3.4.30 is from gcc 12 |
||||||
|
|
||||||
|
This file adds the necessary compatibility tricks to avoid symbols with |
||||||
|
version GLIBCXX_3.4.20 and bigger, keeping binary compatibility with |
||||||
|
@@ -73,6 +74,19 @@ void __attribute__((weak)) __throw_bad_a |
||||||
|
|
||||||
|
} // namespace std |
||||||
|
#endif |
||||||
|
+ |
||||||
|
+#if _GLIBCXX_RELEASE >= 12 |
||||||
|
+namespace std { |
||||||
|
+ |
||||||
|
+/* This avoids the GLIBCXX_3.4.30 symbol version. */ |
||||||
|
+void __attribute__((weak)) |
||||||
|
+__glibcxx_assert_fail(const char* __file, int __line, const char* __function, |
||||||
|
+ const char* __condition) { |
||||||
|
+ MOZ_CRASH(); |
||||||
|
+} |
||||||
|
+ |
||||||
|
+} // namespace std |
||||||
|
+#endif |
||||||
|
|
||||||
|
#if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 21) |
||||||
|
/* While we generally don't build with exceptions, we have some host tools |
@ -0,0 +1,12 @@ |
|||||||
|
diff -up thunderbird-60.5.0/mfbt/LinuxSignal.h.mozilla-1238661 thunderbird-60.5.0/mfbt/LinuxSignal.h |
||||||
|
--- thunderbird-60.5.0/mfbt/LinuxSignal.h.mozilla-1238661 2019-01-30 11:33:21.447003175 +0100 |
||||||
|
+++ thunderbird-60.5.0/mfbt/LinuxSignal.h 2019-01-30 11:35:13.848537051 +0100 |
||||||
|
@@ -22,7 +22,7 @@ __attribute__((naked)) void SignalTrampo |
||||||
|
void* aContext) { |
||||||
|
asm volatile("nop; nop; nop; nop" : : : "memory"); |
||||||
|
|
||||||
|
- asm volatile("b %0" : : "X"(H) : "memory"); |
||||||
|
+ asm volatile("bx %0" : : "r"(H), "l"(aSignal), "l"(aInfo), "l"(aContext) : "memory"); |
||||||
|
} |
||||||
|
|
||||||
|
#define MOZ_SIGNAL_TRAMPOLINE(h) (mozilla::SignalTrampoline<h>) |
@ -0,0 +1,136 @@ |
|||||||
|
diff --git a/dom/base/usecounters.py b/dom/base/usecounters.py |
||||||
|
--- a/dom/base/usecounters.py |
||||||
|
+++ b/dom/base/usecounters.py |
||||||
|
@@ -6,11 +6,11 @@ |
||||||
|
import re |
||||||
|
|
||||||
|
|
||||||
|
def read_conf(conf_filename): |
||||||
|
# Can't read/write from a single StringIO, so make a new one for reading. |
||||||
|
- stream = open(conf_filename, "rU") |
||||||
|
+ stream = open(conf_filename, "r") |
||||||
|
|
||||||
|
def parse_counters(stream): |
||||||
|
for line_num, line in enumerate(stream): |
||||||
|
line = line.rstrip("\n") |
||||||
|
if not line or line.startswith("//"): |
||||||
|
diff --git a/python/mozbuild/mozbuild/action/process_define_files.py b/python/mozbuild/mozbuild/action/process_define_files.py |
||||||
|
--- a/python/mozbuild/mozbuild/action/process_define_files.py |
||||||
|
+++ b/python/mozbuild/mozbuild/action/process_define_files.py |
||||||
|
@@ -34,11 +34,11 @@ |
||||||
|
if mozpath.basedir( |
||||||
|
path, [mozpath.join(topsrcdir, "js/src")] |
||||||
|
) and not config.substs.get("JS_STANDALONE"): |
||||||
|
config = PartialConfigEnvironment(mozpath.join(topobjdir, "js", "src")) |
||||||
|
|
||||||
|
- with open(path, "rU") as input: |
||||||
|
+ with open(path, "r") as input: |
||||||
|
r = re.compile( |
||||||
|
"^\s*#\s*(?P<cmd>[a-z]+)(?:\s+(?P<name>\S+)(?:\s+(?P<value>\S+))?)?", re.U |
||||||
|
) |
||||||
|
for l in input: |
||||||
|
m = r.match(l) |
||||||
|
diff --git a/python/mozbuild/mozbuild/backend/base.py b/python/mozbuild/mozbuild/backend/base.py |
||||||
|
--- a/python/mozbuild/mozbuild/backend/base.py |
||||||
|
+++ b/python/mozbuild/mozbuild/backend/base.py |
||||||
|
@@ -270,11 +270,11 @@ |
||||||
|
self._write_purgecaches(config) |
||||||
|
|
||||||
|
return status |
||||||
|
|
||||||
|
@contextmanager |
||||||
|
- def _write_file(self, path=None, fh=None, readmode="rU"): |
||||||
|
+ def _write_file(self, path=None, fh=None, readmode="r"): |
||||||
|
"""Context manager to write a file. |
||||||
|
|
||||||
|
This is a glorified wrapper around FileAvoidWrite with integration to |
||||||
|
update the summary data on this instance. |
||||||
|
|
||||||
|
diff --git a/python/mozbuild/mozbuild/preprocessor.py b/python/mozbuild/mozbuild/preprocessor.py |
||||||
|
--- a/python/mozbuild/mozbuild/preprocessor.py |
||||||
|
+++ b/python/mozbuild/mozbuild/preprocessor.py |
||||||
|
@@ -529,11 +529,11 @@ |
||||||
|
) |
||||||
|
depfile = get_output_file(options.depend) |
||||||
|
|
||||||
|
if args: |
||||||
|
for f in args: |
||||||
|
- with io.open(f, "rU", encoding="utf-8") as input: |
||||||
|
+ with io.open(f, "r", encoding="utf-8") as input: |
||||||
|
self.processFile(input=input, output=out) |
||||||
|
if depfile: |
||||||
|
mk = Makefile() |
||||||
|
mk.create_rule([six.ensure_text(options.output)]).add_dependencies( |
||||||
|
self.includes |
||||||
|
@@ -858,11 +858,11 @@ |
||||||
|
args = _to_text(args) |
||||||
|
if filters: |
||||||
|
args = self.applyFilters(args) |
||||||
|
if not os.path.isabs(args): |
||||||
|
args = os.path.join(self.curdir, args) |
||||||
|
- args = io.open(args, "rU", encoding="utf-8") |
||||||
|
+ args = io.open(args, "r", encoding="utf-8") |
||||||
|
except Preprocessor.Error: |
||||||
|
raise |
||||||
|
except Exception: |
||||||
|
raise Preprocessor.Error(self, "FILE_NOT_FOUND", _to_text(args)) |
||||||
|
self.checkLineNumbers = bool( |
||||||
|
@@ -912,11 +912,11 @@ |
||||||
|
|
||||||
|
|
||||||
|
def preprocess(includes=[sys.stdin], defines={}, output=sys.stdout, marker="#"): |
||||||
|
pp = Preprocessor(defines=defines, marker=marker) |
||||||
|
for f in includes: |
||||||
|
- with io.open(f, "rU", encoding="utf-8") as input: |
||||||
|
+ with io.open(f, "r", encoding="utf-8") as input: |
||||||
|
pp.processFile(input=input, output=output) |
||||||
|
return pp.includes |
||||||
|
|
||||||
|
|
||||||
|
# Keep this module independently executable. |
||||||
|
diff --git a/python/mozbuild/mozbuild/util.py b/python/mozbuild/mozbuild/util.py |
||||||
|
--- a/python/mozbuild/mozbuild/util.py |
||||||
|
+++ b/python/mozbuild/mozbuild/util.py |
||||||
|
@@ -234,11 +234,11 @@ |
||||||
|
Additionally, there is dry run mode where the file is not actually written |
||||||
|
out, but reports whether the file was existing and would have been updated |
||||||
|
still occur, as well as diff capture if requested. |
||||||
|
""" |
||||||
|
|
||||||
|
- def __init__(self, filename, capture_diff=False, dry_run=False, readmode="rU"): |
||||||
|
+ def __init__(self, filename, capture_diff=False, dry_run=False, readmode="r"): |
||||||
|
BytesIO.__init__(self) |
||||||
|
self.name = filename |
||||||
|
assert type(capture_diff) == bool |
||||||
|
assert type(dry_run) == bool |
||||||
|
assert "r" in readmode |
||||||
|
diff --git a/python/mozbuild/mozpack/files.py b/python/mozbuild/mozpack/files.py |
||||||
|
--- a/python/mozbuild/mozpack/files.py |
||||||
|
+++ b/python/mozbuild/mozpack/files.py |
||||||
|
@@ -552,11 +552,11 @@ |
||||||
|
|
||||||
|
def inputs(self): |
||||||
|
pp = Preprocessor(defines=self.defines, marker=self.marker) |
||||||
|
pp.setSilenceDirectiveWarnings(self.silence_missing_directive_warnings) |
||||||
|
|
||||||
|
- with _open(self.path, "rU") as input: |
||||||
|
+ with _open(self.path, "r") as input: |
||||||
|
with _open(os.devnull, "w") as output: |
||||||
|
pp.processFile(input=input, output=output) |
||||||
|
|
||||||
|
# This always yields at least self.path. |
||||||
|
return pp.includes |
||||||
|
@@ -609,11 +609,11 @@ |
||||||
|
if self.depfile: |
||||||
|
deps_out = FileAvoidWrite(self.depfile) |
||||||
|
pp = Preprocessor(defines=self.defines, marker=self.marker) |
||||||
|
pp.setSilenceDirectiveWarnings(self.silence_missing_directive_warnings) |
||||||
|
|
||||||
|
- with _open(self.path, "rU") as input: |
||||||
|
+ with _open(self.path, "r") as input: |
||||||
|
pp.processFile(input=input, output=dest, depfile=deps_out) |
||||||
|
|
||||||
|
dest.close() |
||||||
|
if self.depfile: |
||||||
|
deps_out.close() |
||||||
|
|
@ -0,0 +1,45 @@ |
|||||||
|
diff --git a/ipc/chromium/src/third_party/libevent/README.mozilla b/ipc/chromium/src/third_party/libevent/README.mozilla |
||||||
|
--- a/ipc/chromium/src/third_party/libevent/README.mozilla |
||||||
|
+++ b/ipc/chromium/src/third_party/libevent/README.mozilla |
||||||
|
@@ -20,8 +20,12 @@ |
||||||
|
Mac doesn't need this since only 64-bit is supported. Use __LP64__ to |
||||||
|
distinguish the two cases. If you get something wrong, the CHECK_EVENT_SIZEOF |
||||||
|
static assertions in message_pump_libevent.cc will fail. If a new constant is |
||||||
|
added, also add a static assertion for it to message_pump_libevent.cc. |
||||||
|
|
||||||
|
+You also need to modify the EVENT__HAVE_ARC4RANDOM and EVENT__HAVE_ARC4RANDOM_BUF |
||||||
|
+constants in the generated Linux header to account for the results of the arc4random |
||||||
|
+and arc4random_buf configure checks. |
||||||
|
+ |
||||||
|
2. No additional patches are needed at this time, but be careful to avoid |
||||||
|
clobbering changes to the various event-config.h files which have been customized |
||||||
|
over time to avoid various build bustages. |
||||||
|
diff --git a/ipc/chromium/src/third_party/libevent/linux/event2/event-config.h b/ipc/chromium/src/third_party/libevent/linux/event2/event-config.h |
||||||
|
--- a/ipc/chromium/src/third_party/libevent/linux/event2/event-config.h |
||||||
|
+++ b/ipc/chromium/src/third_party/libevent/linux/event2/event-config.h |
||||||
|
@@ -27,18 +27,22 @@ |
||||||
|
#define EVENT__HAVE_ACCEPT4 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the <afunix.h> header file. */ |
||||||
|
/* #undef EVENT__HAVE_AFUNIX_H 1 */ |
||||||
|
|
||||||
|
+#ifdef HAVE_ARC4RANDOM |
||||||
|
/* Define to 1 if you have the `arc4random' function. */ |
||||||
|
-/* #undef EVENT__HAVE_ARC4RANDOM */ |
||||||
|
+#define EVENT__HAVE_ARC4RANDOM 1 |
||||||
|
+#endif |
||||||
|
|
||||||
|
/* Define to 1 if you have the `arc4random_addrandom' function. */ |
||||||
|
/* #undef EVENT__HAVE_ARC4RANDOM_ADDRANDOM */ |
||||||
|
|
||||||
|
+#ifdef HAVE_ARC4RANDOM_BUF |
||||||
|
/* Define to 1 if you have the `arc4random_buf' function. */ |
||||||
|
-/* #undef EVENT__HAVE_ARC4RANDOM_BUF */ |
||||||
|
+#define EVENT__HAVE_ARC4RANDOM_BUF 1 |
||||||
|
+#endif |
||||||
|
|
||||||
|
/* Define to 1 if you have the <arpa/inet.h> header file. */ |
||||||
|
#define EVENT__HAVE_ARPA_INET_H 1 |
||||||
|
|
||||||
|
/* Define to 1 if you have the `clock_gettime' function. */ |
||||||
|
|
@ -0,0 +1,17 @@ |
|||||||
|
diff --git a/toolkit/crashreporter/client/ping.cpp b/toolkit/crashreporter/client/ping.cpp |
||||||
|
--- a/toolkit/crashreporter/client/ping.cpp |
||||||
|
+++ b/toolkit/crashreporter/client/ping.cpp |
||||||
|
@@ -51,11 +51,11 @@ |
||||||
|
CFUUIDBytes bytes = CFUUIDGetUUIDBytes(uuid); |
||||||
|
memcpy(&id, &bytes, sizeof(UUID)); |
||||||
|
|
||||||
|
CFRelease(uuid); |
||||||
|
#elif defined(HAVE_ARC4RANDOM_BUF) // Android, BSD, ... |
||||||
|
- arc4random_buf(id, sizeof(UUID)); |
||||||
|
+ arc4random_buf(&id, sizeof(UUID)); |
||||||
|
#else // Linux |
||||||
|
int fd = open("/dev/urandom", O_RDONLY); |
||||||
|
|
||||||
|
if (fd == -1) { |
||||||
|
return ""; |
||||||
|
|
@ -0,0 +1,12 @@ |
|||||||
|
diff -up firefox-97.0/toolkit/moz.configure.disable-elfhack firefox-97.0/toolkit/moz.configure |
||||||
|
--- firefox-97.0/toolkit/moz.configure.disable-elfhack 2022-02-08 09:58:47.518047952 +0100 |
||||||
|
+++ firefox-97.0/toolkit/moz.configure 2022-02-08 10:17:49.552945956 +0100 |
||||||
|
@@ -1273,7 +1273,7 @@ with only_when("--enable-compile-environ |
||||||
|
help="{Enable|Disable} elf hacks", |
||||||
|
) |
||||||
|
|
||||||
|
- set_config("USE_ELF_HACK", depends_if("--enable-elf-hack")(lambda _: True)) |
||||||
|
+ set_config("USE_ELF_HACK", depends_if("--enable-elf-hack")(lambda _: False)) |
||||||
|
|
||||||
|
|
||||||
|
@depends(build_environment) |
@ -0,0 +1,11 @@ |
|||||||
|
diff -up thunderbird-102.1.0/gfx/webrender_bindings/webrender_ffi.h.cbindgen-covers thunderbird-102.1.0/gfx/webrender_bindings/webrender_ffi.h |
||||||
|
--- thunderbird-102.1.0/gfx/webrender_bindings/webrender_ffi.h.cbindgen-covers 2022-08-04 12:47:06.970587140 +0200 |
||||||
|
+++ thunderbird-102.1.0/gfx/webrender_bindings/webrender_ffi.h 2022-08-04 12:47:13.642579587 +0200 |
||||||
|
@@ -73,7 +73,6 @@ struct WrPipelineInfo; |
||||||
|
struct WrPipelineIdAndEpoch; |
||||||
|
using WrPipelineIdEpochs = nsTArray<WrPipelineIdAndEpoch>; |
||||||
|
|
||||||
|
-const uint64_t ROOT_CLIP_CHAIN = ~0; |
||||||
|
|
||||||
|
} // namespace wr |
||||||
|
} // namespace mozilla |
Binary file not shown.
@ -0,0 +1,49 @@ |
|||||||
|
diff -up thunderbird-91.7.0/parser/expat/lib/xmltok.c.expat-CVE-2022-25235 thunderbird-91.7.0/parser/expat/lib/xmltok.c |
||||||
|
--- thunderbird-91.7.0/parser/expat/lib/xmltok.c.expat-CVE-2022-25235 2022-03-02 17:57:38.364361168 +0100 |
||||||
|
+++ thunderbird-91.7.0/parser/expat/lib/xmltok.c 2022-03-02 17:58:22.235512399 +0100 |
||||||
|
@@ -65,13 +65,6 @@ |
||||||
|
+ ((((byte)[2]) >> 5) & 1)] \ |
||||||
|
& (1u << (((byte)[2]) & 0x1F))) |
||||||
|
|
||||||
|
-#define UTF8_GET_NAMING(pages, p, n) \ |
||||||
|
- ((n) == 2 \ |
||||||
|
- ? UTF8_GET_NAMING2(pages, (const unsigned char *)(p)) \ |
||||||
|
- : ((n) == 3 \ |
||||||
|
- ? UTF8_GET_NAMING3(pages, (const unsigned char *)(p)) \ |
||||||
|
- : 0)) |
||||||
|
- |
||||||
|
/* Detection of invalid UTF-8 sequences is based on Table 3.1B |
||||||
|
of Unicode 3.2: http://www.unicode.org/unicode/reports/tr28/ |
||||||
|
with the additional restriction of not allowing the Unicode |
||||||
|
diff -up thunderbird-91.7.0/parser/expat/lib/xmltok_impl.c.expat-CVE-2022-25235 thunderbird-91.7.0/parser/expat/lib/xmltok_impl.c |
||||||
|
--- thunderbird-91.7.0/parser/expat/lib/xmltok_impl.c.expat-CVE-2022-25235 2022-03-02 17:57:38.365361172 +0100 |
||||||
|
+++ thunderbird-91.7.0/parser/expat/lib/xmltok_impl.c 2022-03-02 18:04:51.240853247 +0100 |
||||||
|
@@ -34,7 +34,7 @@ |
||||||
|
case BT_LEAD ## n: \ |
||||||
|
if (end - ptr < n) \ |
||||||
|
return XML_TOK_PARTIAL_CHAR; \ |
||||||
|
- if (!IS_NAME_CHAR(enc, ptr, n)) { \ |
||||||
|
+ if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) { \ |
||||||
|
*nextTokPtr = ptr; \ |
||||||
|
return XML_TOK_INVALID; \ |
||||||
|
} \ |
||||||
|
@@ -62,7 +62,7 @@ |
||||||
|
case BT_LEAD ## n: \ |
||||||
|
if (end - ptr < n) \ |
||||||
|
return XML_TOK_PARTIAL_CHAR; \ |
||||||
|
- if (!IS_NMSTRT_CHAR(enc, ptr, n)) { \ |
||||||
|
+ if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) { \ |
||||||
|
*nextTokPtr = ptr; \ |
||||||
|
return XML_TOK_INVALID; \ |
||||||
|
} \ |
||||||
|
@@ -1090,6 +1090,10 @@ PREFIX(prologTok)(const ENCODING *enc, c |
||||||
|
case BT_LEAD ## n: \ |
||||||
|
if (end - ptr < n) \ |
||||||
|
return XML_TOK_PARTIAL_CHAR; \ |
||||||
|
+ if (IS_INVALID_CHAR(enc, ptr, n)) { \ |
||||||
|
+ *nextTokPtr = ptr; \ |
||||||
|
+ return XML_TOK_INVALID; \ |
||||||
|
+ } \ |
||||||
|
if (IS_NMSTRT_CHAR(enc, ptr, n)) { \ |
||||||
|
ptr += n; \ |
||||||
|
tok = XML_TOK_NAME; \ |
@ -0,0 +1,40 @@ |
|||||||
|
diff -up thunderbird-91.7.0/parser/expat/lib/xmlparse.c.expat-CVE-2022-25236 thunderbird-91.7.0/parser/expat/lib/xmlparse.c |
||||||
|
--- thunderbird-91.7.0/parser/expat/lib/xmlparse.c.expat-CVE-2022-25236 2022-03-02 18:08:40.085642028 +0100 |
||||||
|
+++ thunderbird-91.7.0/parser/expat/lib/xmlparse.c 2022-03-02 18:13:31.838667958 +0100 |
||||||
|
@@ -700,8 +700,7 @@ XML_ParserCreate(const XML_Char *encodin |
||||||
|
XML_Parser XMLCALL |
||||||
|
XML_ParserCreateNS(const XML_Char *encodingName, XML_Char nsSep) |
||||||
|
{ |
||||||
|
- XML_Char tmp[2]; |
||||||
|
- *tmp = nsSep; |
||||||
|
+ XML_Char tmp[2] = {nsSep, 0}; |
||||||
|
return XML_ParserCreate_MM(encodingName, NULL, tmp); |
||||||
|
} |
||||||
|
#endif |
||||||
|
@@ -1276,8 +1275,7 @@ XML_ExternalEntityParserCreate(XML_Parse |
||||||
|
would be otherwise. |
||||||
|
*/ |
||||||
|
if (ns) { |
||||||
|
- XML_Char tmp[2]; |
||||||
|
- *tmp = namespaceSeparator; |
||||||
|
+ XML_Char tmp[2] = {parser->m_namespaceSeparator, 0}; |
||||||
|
parser = parserCreate(encodingName, &parser->m_mem, tmp, newDtd); |
||||||
|
} |
||||||
|
else { |
||||||
|
@@ -3667,6 +3665,16 @@ addBinding(XML_Parser parser, PREFIX *pr |
||||||
|
if (!mustBeXML && isXMLNS |
||||||
|
&& (len > xmlnsLen || uri[len] != xmlnsNamespace[len])) |
||||||
|
isXMLNS = XML_FALSE; |
||||||
|
+ // NOTE: While Expat does not validate namespace URIs against RFC 3986, |
||||||
|
+ // we have to at least make sure that the XML processor on top of |
||||||
|
+ // Expat (that is splitting tag names by namespace separator into |
||||||
|
+ // 2- or 3-tuples (uri-local or uri-local-prefix)) cannot be confused |
||||||
|
+ // by an attacker putting additional namespace separator characters |
||||||
|
+ // into namespace declarations. That would be ambiguous and not to |
||||||
|
+ // be expected. |
||||||
|
+ if (parser->m_ns && (uri[len] == parser->m_namespaceSeparator)) { |
||||||
|
+ return XML_ERROR_SYNTAX; |
||||||
|
+ } |
||||||
|
} |
||||||
|
isXML = isXML && len == xmlLen; |
||||||
|
isXMLNS = isXMLNS && len == xmlnsLen; |
@ -0,0 +1,24 @@ |
|||||||
|
diff -up thunderbird-91.7.0/parser/expat/lib/xmlparse.c.expat-CVE-2022-25315 thunderbird-91.7.0/parser/expat/lib/xmlparse.c |
||||||
|
--- thunderbird-91.7.0/parser/expat/lib/xmlparse.c.expat-CVE-2022-25315 2022-03-02 18:17:50.966583254 +0100 |
||||||
|
+++ thunderbird-91.7.0/parser/expat/lib/xmlparse.c 2022-03-02 18:19:27.636924735 +0100 |
||||||
|
@@ -2479,6 +2479,7 @@ storeRawNames(XML_Parser parser) |
||||||
|
while (tag) { |
||||||
|
int bufSize; |
||||||
|
int nameLen = sizeof(XML_Char) * (tag->name.strLen + 1); |
||||||
|
+ size_t rawNameLen; |
||||||
|
char *rawNameBuf = tag->buf + nameLen; |
||||||
|
/* Stop if already stored. Since tagStack is a stack, we can stop |
||||||
|
at the first entry that has already been copied; everything |
||||||
|
@@ -2490,7 +2491,11 @@ storeRawNames(XML_Parser parser) |
||||||
|
/* For re-use purposes we need to ensure that the |
||||||
|
size of tag->buf is a multiple of sizeof(XML_Char). |
||||||
|
*/ |
||||||
|
- bufSize = nameLen + ROUND_UP(tag->rawNameLength, sizeof(XML_Char)); |
||||||
|
+ rawNameLen = ROUND_UP(tag->rawNameLength, sizeof(XML_Char)); |
||||||
|
+ /* Detect and prevent integer overflow. */ |
||||||
|
+ if (rawNameLen > (size_t)INT_MAX - nameLen) |
||||||
|
+ return XML_FALSE; |
||||||
|
+ bufSize = nameLen + (int)rawNameLen; |
||||||
|
if (bufSize > tag->bufEnd - tag->buf) { |
||||||
|
char *temp = (char *)REALLOC(tag->buf, bufSize); |
||||||
|
if (temp == NULL) |
@ -0,0 +1,126 @@ |
|||||||
|
#!/bin/bash |
||||||
|
#set -x |
||||||
|
set -e |
||||||
|
usage() |
||||||
|
{ |
||||||
|
cat << EOF |
||||||
|
usage: $0 options |
||||||
|
|
||||||
|
This script downloads calendar langpacks for Thunderbird. |
||||||
|
|
||||||
|
OPTIONS: |
||||||
|
-h Show this message |
||||||
|
-v Version string (7.0.1) |
||||||
|
-b Build number (1, 2, 3) |
||||||
|
-r Reuse downloaded files (when you don't want to redownload) |
||||||
|
EOF |
||||||
|
} |
||||||
|
|
||||||
|
VER= |
||||||
|
BUILDNUM= |
||||||
|
LANG_DATE=`date "+%Y%m%d"` |
||||||
|
while getopts “hv:b:r” OPTION |
||||||
|
do |
||||||
|
case $OPTION in |
||||||
|
h) |
||||||
|
usage |
||||||
|
exit 1 |
||||||
|
;; |
||||||
|
v) |
||||||
|
VER=$OPTARG |
||||||
|
;; |
||||||
|
b) |
||||||
|
BUILDNUM=$OPTARG |
||||||
|
;; |
||||||
|
?) |
||||||
|
usage |
||||||
|
exit |
||||||
|
;; |
||||||
|
esac |
||||||
|
done |
||||||
|
|
||||||
|
if [ -z "$VER" -o -z "$BUILDNUM" ] |
||||||
|
then |
||||||
|
echo "Missing version or build number." |
||||||
|
usage |
||||||
|
exit 1 |
||||||
|
fi |
||||||
|
|
||||||
|
WHITE='\033[1;33m' |
||||||
|
NC='\033[0m' # No Color |
||||||
|
|
||||||
|
LOCALES=`curl -f https://archive.mozilla.org/pub/thunderbird/candidates/$VER-candidates/build$BUILDNUM/linux-i686/ | grep "a href"|sed -e "s|.*/\([^/]*\)/\".*|\1|"|tail -n+2 |grep -v xpi` |
||||||
|
#echo $LOCALES |
||||||
|
rm -rf lightning-langpacks |
||||||
|
mkdir -p lightning-langpacks |
||||||
|
cd lightning-langpacks |
||||||
|
LOCALE_COUNT=`echo $LOCALES| tr ' ' '\n' | wc -l` |
||||||
|
LOCALE_NUM=0 |
||||||
|
for lang in $LOCALES; do |
||||||
|
LOCALE_NUM=$((LOCALE_NUM+1)) |
||||||
|
echo -e "${WHITE}Processing calendar locale: $lang ($LOCALE_NUM/$LOCALE_COUNT)${NC}" |
||||||
|
mkdir -p extracted_lightning |
||||||
|
mkdir -p calendar-locales |
||||||
|
#echo Downloading TB binary for locale: $lang |
||||||
|
wget --quiet https://archive.mozilla.org/pub/thunderbird/candidates/$VER-candidates/build$BUILDNUM/linux-i686/$lang/thunderbird-$VER.tar.bz2 |
||||||
|
|
||||||
|
cd extracted_lightning |
||||||
|
tar -xf ../thunderbird-$VER.tar.bz2 thunderbird/distribution/extensions/\{e2fda1a4-762b-4020-b5ad-a41df1933103\}.xpi |
||||||
|
set +e |
||||||
|
unzip -qq thunderbird/distribution/extensions/\{e2fda1a4-762b-4020-b5ad-a41df1933103\}.xpi |
||||||
|
set -e |
||||||
|
LIGHTNING_VERSION=`cat app.ini |grep "^Version="|sed -e 's/Version=//'` |
||||||
|
BUILD_ID=`cat app.ini |grep "^BuildID="|sed -e 's/BuildID=//'` |
||||||
|
MAX_VERSION=`cat app.ini |grep MaxVersion|sed -e s/MaxVersion=//` |
||||||
|
MIN_VERSION=`cat app.ini |grep MinVersion|sed -e s/MinVersion=//` |
||||||
|
rm -rf thunderbird |
||||||
|
mkdir -p ../calendar-locales/chrome |
||||||
|
cp -r chrome/calendar-$lang ../calendar-locales/chrome |
||||||
|
cp -r chrome/lightning-$lang ../calendar-locales/chrome |
||||||
|
cd - |
||||||
|
|
||||||
|
cd calendar-locales |
||||||
|
# create manifest |
||||||
|
cat > manifest.json <<EOL |
||||||
|
{ |
||||||
|
"languages": { |
||||||
|
"$lang": { |
||||||
|
"chrome_resources": { |
||||||
|
"calendar": "chrome/calendar-$lang/locale/$lang/calendar/", |
||||||
|
"lightning": "chrome/lightning-$lang/locale/$lang/lightning/" |
||||||
|
}, |
||||||
|
"version": "$LIGHTNING_VERSION" |
||||||
|
} |
||||||
|
}, |
||||||
|
"applications": { |
||||||
|
"gecko": { |
||||||
|
"strict_min_version": "$MIN_VERSION", |
||||||
|
"id": "langpack-cal-$lang@lightning.mozilla.org", |
||||||
|
"strict_max_version": "$MAX_VERSION" |
||||||
|
} |
||||||
|
}, |
||||||
|
"langpack_id": "$lang", |
||||||
|
"version": "7.$LIGHTNING_VERSION.$BUILD_ID", |
||||||
|
"name": "$lang Language Pack Calendar", |
||||||
|
"manifest_version": 2, |
||||||
|
"sources": { |
||||||
|
"browser": { |
||||||
|
"base_path": "browser/" |
||||||
|
} |
||||||
|
}, |
||||||
|
"author": "Mozilla.cz (contributors: Pavel Cvrček, Pavel Franc, Michal Stanke, Michal Vašíček)", |
||||||
|
"description": "Language pack for Thunderbird for $lang, this was repacked by Fedora/RHEL package maintainer from original binaries." |
||||||
|
} |
||||||
|
|
||||||
|
EOL |
||||||
|
zip --quiet -r ../langpack-cal-$lang@lightning.mozilla.org.xpi * |
||||||
|
cd - |
||||||
|
rm -rf calendar-locales |
||||||
|
rm -rf extracted_lightning |
||||||
|
|
||||||
|
rm -f thunderbird-$VER.tar.bz2 |
||||||
|
done |
||||||
|
echo "Creating lightning-langpacks-$VER.tar.xz..." |
||||||
|
tar cJf ../lightning-langpacks-$VER.tar.xz *.xpi |
||||||
|
cd .. |
||||||
|
rm -rf lightning-langpacks |
@ -0,0 +1,99 @@ |
|||||||
|
diff -up firefox-75.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 firefox-75.0/extensions/pref/autoconfig/src/nsReadConfig.cpp |
||||||
|
--- firefox-75.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 2020-04-03 21:34:41.000000000 +0200 |
||||||
|
+++ firefox-75.0/extensions/pref/autoconfig/src/nsReadConfig.cpp 2020-04-06 22:40:02.760674871 +0200 |
||||||
|
@@ -244,8 +244,20 @@ nsresult nsReadConfig::openAndEvaluateJS |
||||||
|
if (NS_FAILED(rv)) return rv; |
||||||
|
|
||||||
|
rv = NS_NewLocalFileInputStream(getter_AddRefs(inStr), jsFile); |
||||||
|
- if (NS_FAILED(rv)) return rv; |
||||||
|
+ if (NS_FAILED(rv)) { |
||||||
|
+ // Look for cfg file in /etc/<application>/pref |
||||||
|
+ rv = NS_GetSpecialDirectory(NS_APP_PREFS_SYSTEM_CONFIG_DIR, |
||||||
|
+ getter_AddRefs(jsFile)); |
||||||
|
+ NS_ENSURE_SUCCESS(rv, rv); |
||||||
|
+ |
||||||
|
+ rv = jsFile->AppendNative(nsLiteralCString("pref")); |
||||||
|
+ NS_ENSURE_SUCCESS(rv, rv); |
||||||
|
+ rv = jsFile->AppendNative(nsDependentCString(aFileName)); |
||||||
|
+ NS_ENSURE_SUCCESS(rv, rv); |
||||||
|
|
||||||
|
+ rv = NS_NewLocalFileInputStream(getter_AddRefs(inStr), jsFile); |
||||||
|
+ NS_ENSURE_SUCCESS(rv, rv); |
||||||
|
+ } |
||||||
|
} else { |
||||||
|
nsAutoCString location("resource://gre/defaults/autoconfig/"); |
||||||
|
location += aFileName; |
||||||
|
diff -up firefox-75.0/modules/libpref/Preferences.cpp.1170092 firefox-75.0/modules/libpref/Preferences.cpp |
||||||
|
--- firefox-75.0/modules/libpref/Preferences.cpp.1170092 2020-04-06 22:40:02.761674865 +0200 |
||||||
|
+++ firefox-75.0/modules/libpref/Preferences.cpp 2020-04-06 22:40:57.675325227 +0200 |
||||||
|
@@ -4468,6 +4468,9 @@ nsresult Preferences::InitInitialObjects |
||||||
|
// |
||||||
|
// Thus, in the omni.jar case, we always load app-specific default |
||||||
|
// preferences from omni.jar, whether or not `$app == $gre`. |
||||||
|
+ // |
||||||
|
+ // At very end load configuration from system config location: |
||||||
|
+ // - /etc/firefox/pref/*.js |
||||||
|
|
||||||
|
nsresult rv = NS_ERROR_FAILURE; |
||||||
|
UniquePtr<nsZipFind> find; |
||||||
|
diff -up firefox-75.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-75.0/toolkit/xre/nsXREDirProvider.cpp |
||||||
|
--- firefox-75.0/toolkit/xre/nsXREDirProvider.cpp.1170092 2020-04-03 21:35:39.000000000 +0200 |
||||||
|
+++ firefox-75.0/toolkit/xre/nsXREDirProvider.cpp 2020-04-06 22:40:02.761674865 +0200 |
||||||
|
@@ -60,6 +60,7 @@ |
||||||
|
#endif |
||||||
|
#ifdef XP_UNIX |
||||||
|
# include <ctype.h> |
||||||
|
+# include "nsIXULAppInfo.h" |
||||||
|
#endif |
||||||
|
#ifdef XP_IOS |
||||||
|
# include "UIKitDirProvider.h" |
||||||
|
@@ -533,6 +534,21 @@ nsXREDirProvider::GetFile(const char* aP |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
+ |
||||||
|
+#if defined(XP_UNIX) |
||||||
|
+ if (!strcmp(aProperty, NS_APP_PREFS_SYSTEM_CONFIG_DIR)) { |
||||||
|
+ nsCString sysConfigDir = nsLiteralCString("/etc/"); |
||||||
|
+ nsCOMPtr<nsIXULAppInfo> appInfo = do_GetService("@mozilla.org/xre/app-info;1"); |
||||||
|
+ if (!appInfo) |
||||||
|
+ return NS_ERROR_NOT_AVAILABLE; |
||||||
|
+ nsCString appName; |
||||||
|
+ appInfo->GetName(appName); |
||||||
|
+ ToLowerCase(appName); |
||||||
|
+ sysConfigDir.Append(appName); |
||||||
|
+ return NS_NewNativeLocalFile(sysConfigDir, false, aFile); |
||||||
|
+ } |
||||||
|
+#endif |
||||||
|
+ |
||||||
|
if (NS_FAILED(rv) || !file) return NS_ERROR_FAILURE; |
||||||
|
|
||||||
|
if (ensureFilePermissions) { |
||||||
|
@@ -845,6 +861,16 @@ nsresult nsXREDirProvider::GetFilesInter |
||||||
|
|
||||||
|
LoadDirIntoArray(mXULAppDir, kAppendPrefDir, directories); |
||||||
|
|
||||||
|
+ // Add /etc/<application>/pref/ directory if it exists |
||||||
|
+ nsCOMPtr<nsIFile> systemPrefDir; |
||||||
|
+ rv = NS_GetSpecialDirectory(NS_APP_PREFS_SYSTEM_CONFIG_DIR, |
||||||
|
+ getter_AddRefs(systemPrefDir)); |
||||||
|
+ if (NS_SUCCEEDED(rv)) { |
||||||
|
+ rv = systemPrefDir->AppendNative(nsLiteralCString("pref")); |
||||||
|
+ if (NS_SUCCEEDED(rv)) |
||||||
|
+ directories.AppendObject(systemPrefDir); |
||||||
|
+ } |
||||||
|
+ |
||||||
|
rv = NS_NewArrayEnumerator(aResult, directories, NS_GET_IID(nsIFile)); |
||||||
|
} else if (!strcmp(aProperty, NS_APP_CHROME_DIR_LIST)) { |
||||||
|
// NS_APP_CHROME_DIR_LIST is only used to get default (native) icons |
||||||
|
diff -up firefox-75.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 firefox-75.0/xpcom/io/nsAppDirectoryServiceDefs.h |
||||||
|
--- firefox-75.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 2020-04-03 21:35:39.000000000 +0200 |
||||||
|
+++ firefox-75.0/xpcom/io/nsAppDirectoryServiceDefs.h 2020-04-06 22:40:02.761674865 +0200 |
||||||
|
@@ -60,6 +60,7 @@ |
||||||
|
#define NS_APP_PREFS_DEFAULTS_DIR_LIST "PrefDL" |
||||||
|
#define NS_APP_PREFS_OVERRIDE_DIR \ |
||||||
|
"PrefDOverride" // Directory for per-profile defaults |
||||||
|
+#define NS_APP_PREFS_SYSTEM_CONFIG_DIR "PrefSysConf" // Directory with system-wide configuration |
||||||
|
|
||||||
|
#define NS_APP_USER_PROFILE_50_DIR "ProfD" |
||||||
|
#define NS_APP_USER_PROFILE_LOCAL_50_DIR "ProfLD" |
@ -0,0 +1,17 @@ |
|||||||
|
# Remove when mozbz#1269319 lands |
||||||
|
|
||||||
|
--- firefox-45.0.1-orig/js/src/Makefile.in 2016-05-17 14:53:58.753178403 +0200 |
||||||
|
+++ firefox-45.0.1/js/src/Makefile.in 2016-05-17 14:53:28.432817862 +0200 |
||||||
|
@@ -144,6 +144,11 @@ distclean:: |
||||||
|
|
||||||
|
CFLAGS += $(MOZ_ZLIB_CFLAGS) |
||||||
|
|
||||||
|
+# Avoid GNU gcc bug #70526 |
||||||
|
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70526#c14 |
||||||
|
+CFLAGS += -fno-schedule-insns2 |
||||||
|
+CXXFLAGS += -fno-schedule-insns2 |
||||||
|
+ |
||||||
|
# Silence warnings on AIX/HP-UX from non-GNU compilers |
||||||
|
ifndef GNU_CC |
||||||
|
ifeq ($(OS_ARCH),AIX) |
||||||
|
|
@ -0,0 +1,21 @@ |
|||||||
|
diff -up thunderbird-68.1.0/js/xpconnect/src/XPCWrappedNative.cpp.mozbz-1512162 thunderbird-68.1.0/js/xpconnect/src/XPCWrappedNative.cpp |
||||||
|
--- thunderbird-68.1.0/js/xpconnect/src/XPCWrappedNative.cpp.mozbz-1512162 2019-09-10 01:43:33.000000000 +0200 |
||||||
|
+++ thunderbird-68.1.0/js/xpconnect/src/XPCWrappedNative.cpp 2019-09-12 16:16:52.644123766 +0200 |
||||||
|
@@ -1092,7 +1092,7 @@ class MOZ_STACK_CLASS CallMethodHelper f |
||||||
|
MOZ_ALWAYS_INLINE bool GetOutParamSource(uint8_t paramIndex, |
||||||
|
MutableHandleValue srcp) const; |
||||||
|
|
||||||
|
- MOZ_ALWAYS_INLINE bool GatherAndConvertResults(); |
||||||
|
+ bool GatherAndConvertResults(); |
||||||
|
|
||||||
|
MOZ_ALWAYS_INLINE bool QueryInterfaceFastPath(); |
||||||
|
|
||||||
|
@@ -1139,7 +1139,7 @@ class MOZ_STACK_CLASS CallMethodHelper f |
||||||
|
|
||||||
|
~CallMethodHelper(); |
||||||
|
|
||||||
|
- MOZ_ALWAYS_INLINE bool Call(); |
||||||
|
+ bool Call(); |
||||||
|
|
||||||
|
// Trace implementation so we can put our CallMethodHelper in a Rooted<T>. |
||||||
|
void trace(JSTracer* aTrc); |
@ -0,0 +1,14 @@ |
|||||||
|
diff -up firefox-60.6.0/widget/gtk/nsFilePicker.cpp.old firefox-60.6.0/widget/gtk/nsFilePicker.cpp |
||||||
|
--- firefox-60.6.0/widget/gtk/nsFilePicker.cpp.old 2019-03-27 10:29:47.918560620 +0100 |
||||||
|
+++ firefox-60.6.0/widget/gtk/nsFilePicker.cpp 2019-03-27 10:30:08.384491717 +0100 |
||||||
|
@@ -366,9 +366,7 @@ nsFilePicker::Open(nsIFilePickerShownCal |
||||||
|
// If we have --enable-proxy-bypass-protection, then don't allow |
||||||
|
// remote URLs to be used. |
||||||
|
#ifndef MOZ_PROXY_BYPASS_PROTECTION |
||||||
|
- if (mAllowURLs) { |
||||||
|
- gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(file_chooser), FALSE); |
||||||
|
- } |
||||||
|
+ gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(file_chooser), FALSE); |
||||||
|
#endif |
||||||
|
|
||||||
|
if (action == GTK_FILE_CHOOSER_ACTION_OPEN || |
@ -0,0 +1,12 @@ |
|||||||
|
diff -up firefox-29.0/mozilla-release/gfx/ycbcr/moz.build.arm firefox-29.0/mozilla-release/gfx/ycbcr/moz.build |
||||||
|
--- firefox-29.0/mozilla-release/gfx/ycbcr/moz.build.arm 2014-04-22 07:27:47.000000000 +0200 |
||||||
|
+++ firefox-29.0/mozilla-release/gfx/ycbcr/moz.build 2014-04-22 16:40:34.862849368 +0200 |
||||||
|
@@ -61,7 +61,7 @@ else: |
||||||
|
'yuv_row_other.cpp', |
||||||
|
] |
||||||
|
|
||||||
|
-if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['HAVE_ARM_NEON']: |
||||||
|
+if CONFIG['HAVE_ARM_NEON']: |
||||||
|
SOURCES += [ |
||||||
|
'yuv_row_arm.s', |
||||||
|
] |
@ -0,0 +1,2 @@ |
|||||||
|
#!/bin/sh |
||||||
|
exec /usr/bin/node "$@" 2>&1 | cat - |
@ -0,0 +1,27 @@ |
|||||||
|
--- thunderbird-91.11.0/xpcom/idl-parser/xpidl/xpidl.py.python-inline-flags 2022-06-28 04:39:56.000000000 +0200 |
||||||
|
+++ thunderbird-91.11.0/xpcom/idl-parser/xpidl/xpidl.py 2022-07-11 21:55:05.287553042 +0200 |
||||||
|
@@ -1563,13 +1563,13 @@ class IDLParser(object): |
||||||
|
t_ignore = " \t" |
||||||
|
|
||||||
|
def t_multilinecomment(self, t): |
||||||
|
- r"/\*(?s).*?\*/" |
||||||
|
+ r"/\*(?s:.*?)\*/" |
||||||
|
t.lexer.lineno += t.value.count("\n") |
||||||
|
if t.value.startswith("/**"): |
||||||
|
self._doccomments.append(t.value) |
||||||
|
|
||||||
|
def t_singlelinecomment(self, t): |
||||||
|
- r"(?m)//.*?$" |
||||||
|
+ r"(?m://.*?$)" |
||||||
|
|
||||||
|
def t_IID(self, t): |
||||||
|
return t |
||||||
|
@@ -1582,7 +1582,7 @@ class IDLParser(object): |
||||||
|
return t |
||||||
|
|
||||||
|
def t_LCDATA(self, t): |
||||||
|
- r"(?s)%\{[ ]*C\+\+[ ]*\n(?P<cdata>.*?\n?)%\}[ ]*(C\+\+)?" |
||||||
|
+ r"(?s:%\{[ ]*C\+\+[ ]*\n(?P<cdata>.*?\n?)%\}[ ]*(C\+\+)?)" |
||||||
|
t.type = "CDATA" |
||||||
|
t.value = t.lexer.lexmatch.group("cdata") |
||||||
|
t.lexer.lineno += t.value.count("\n") |
@ -0,0 +1,23 @@ |
|||||||
|
diff -up firefox-55.0/js/src/old-configure.in.rhbz-1219542-s390 firefox-55.0/js/src/old-configure.in |
||||||
|
--- firefox-55.0/js/src/old-configure.in.rhbz-1219542-s390 2017-07-31 18:20:48.000000000 +0200 |
||||||
|
+++ firefox-55.0/js/src/old-configure.in 2017-08-02 14:31:32.190243669 +0200 |
||||||
|
@@ -541,7 +541,7 @@ case "$host" in |
||||||
|
|
||||||
|
*-linux*|*-kfreebsd*-gnu|*-gnu*) |
||||||
|
HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" |
||||||
|
- HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" |
||||||
|
+ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O1}" |
||||||
|
;; |
||||||
|
|
||||||
|
*) |
||||||
|
@@ -617,8 +617,8 @@ case "$target" in |
||||||
|
|
||||||
|
*-*linux*) |
||||||
|
if test "$GNU_CC" -o "$GNU_CXX"; then |
||||||
|
- MOZ_PGO_OPTIMIZE_FLAGS="-O3" |
||||||
|
- MOZ_OPTIMIZE_FLAGS="-O3" |
||||||
|
+ MOZ_PGO_OPTIMIZE_FLAGS="-O1" |
||||||
|
+ MOZ_OPTIMIZE_FLAGS="-O1" |
||||||
|
if test -z "$CLANG_CC"; then |
||||||
|
MOZ_OPTIMIZE_FLAGS="-freorder-blocks $MOZ_OPTIMIZE_FLAGS" |
||||||
|
fi |
Binary file not shown.
@ -0,0 +1,44 @@ |
|||||||
|
mk_add_options MOZ_CO_PROJECT=mail |
||||||
|
ac_add_options --enable-application=comm/mail |
||||||
|
|
||||||
|
ac_add_options --with-system-zlib |
||||||
|
ac_add_options --disable-strip |
||||||
|
#ac_add_options --enable-libnotify |
||||||
|
ac_add_options --enable-necko-wifi |
||||||
|
ac_add_options --disable-updater |
||||||
|
ac_add_options --enable-chrome-format=omni |
||||||
|
ac_add_options --enable-pulseaudio |
||||||
|
ac_add_options --enable-av1 |
||||||
|
ac_add_options --without-system-icu |
||||||
|
ac_add_options --enable-release |
||||||
|
ac_add_options --update-channel=release |
||||||
|
ac_add_options --allow-addon-sideload |
||||||
|
ac_add_options --enable-js-shell |
||||||
|
ac_add_options --with-unsigned-addon-scopes=app,system |
||||||
|
ac_add_options --without-wasm-sandboxed-libraries |
||||||
|
ac_add_options --disable-bootstrap |
||||||
|
ac_add_options --without-sysroot |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#mk_add_options AUTOCONF=autoconf-2.13 |
||||||
|
|
||||||
|
#ac_add_options --enable-default-toolkit=cairo-gtk3-wayland |
||||||
|
|
||||||
|
#ac_add_options --prefix="$PREFIX" |
||||||
|
#ac_add_options --libdir="$LIBDIR" |
||||||
|
#ac_add_options --with-system-jpeg |
||||||
|
#ac_add_options --with-system-zlib |
||||||
|
#ac_add_options --with-system-libvpx |
||||||
|
#ac_add_options --disable-tests |
||||||
|
#ac_add_options --disable-strip |
||||||
|
## temporary disable system cairo, because compilation fails |
||||||
|
#ac_add_options --disable-necko-wifi |
||||||
|
#ac_add_options --disable-updater |
||||||
|
#ac_add_options --with-system-icu |
||||||
|
|
||||||
|
export BUILD_OFFICIAL=1 |
||||||
|
export MOZILLA_OFFICIAL=1 |
||||||
|
mk_add_options BUILD_OFFICIAL=1 |
||||||
|
mk_add_options MOZILLA_OFFICIAL=1 |
||||||
|
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir |
@ -0,0 +1 @@ |
|||||||
|
ac_add_options --enable-official-branding |
@ -0,0 +1,36 @@ |
|||||||
|
pref("app.update.enabled", false); |
||||||
|
pref("app.update.autoInstallEnabled", false); |
||||||
|
/* Allow users to set custom colors*/ |
||||||
|
/* pref("browser.display.use_system_colors", true);*/ |
||||||
|
pref("general.useragent.vendor", "Fedora"); |
||||||
|
pref("general.useragent.vendorSub", "THUNDERBIRD_RPM_VR"); |
||||||
|
pref("intl.locale.matchOS", true); |
||||||
|
pref("mail.shell.checkDefaultClient", false); |
||||||
|
pref("toolkit.networkmanager.disable", false); |
||||||
|
pref("offline.autoDetect", true); |
||||||
|
|
||||||
|
/* Disable global indexing by default*/ |
||||||
|
pref("mailnews.database.global.indexer.enabled", false); |
||||||
|
|
||||||
|
/* Do not switch to Smart Folders after upgrade to 3.0b4 */ |
||||||
|
pref("mail.folder.views.version", "1"); |
||||||
|
pref("extensions.shownSelectionUI", true); |
||||||
|
pref("extensions.autoDisableScopes", 0); |
||||||
|
|
||||||
|
/* For rhbz#1024232 */ |
||||||
|
pref("ui.SpellCheckerUnderlineStyle", 1); |
||||||
|
|
||||||
|
/* Workaround for rhbz#1753011 */ |
||||||
|
pref("spellchecker.dictionary_path", "/usr/share/myspell"); |
||||||
|
/* Workaround for rhbz#1134876 */ |
||||||
|
pref("javascript.options.baselinejit", false); |
||||||
|
/* Workaround for rhbz#1110291 */ |
||||||
|
pref("network.negotiate-auth.allow-insecure-ntlm-v1", true); |
||||||
|
/* Workaround for mozbz#1063315 */ |
||||||
|
pref("security.use_mozillapkix_verification", false); |
||||||
|
/* Use OS settings for UI language */ |
||||||
|
pref("intl.locale.requested", ""); |
||||||
|
/* Disable telemetry */ |
||||||
|
pref("datareporting.healthreport.uploadEnabled", false); |
||||||
|
pref("datareporting.policy.dataSubmissionEnabled", false); |
||||||
|
pref("toolkit.telemetry.archive.enabled", false); |
@ -0,0 +1,30 @@ |
|||||||
|
[Desktop Entry] |
||||||
|
Version=1.0 |
||||||
|
Name=Thunderbird on Wayland |
||||||
|
GenericName=Email |
||||||
|
Comment=Send and Receive Email |
||||||
|
Exec=thunderbird-wayland --name thunderbird-wayland %u |
||||||
|
TryExec=thunderbird-wayland |
||||||
|
Icon=thunderbird |
||||||
|
Terminal=false |
||||||
|
Type=Application |
||||||
|
MimeType=message/rfc822;x-scheme-handler/mailto; |
||||||
|
StartupNotify=true |
||||||
|
Categories=Network;Email; |
||||||
|
Name[cs]=Poštovní klient Thunderbird |
||||||
|
Name[ca]=Client de correu Thunderbird |
||||||
|
Name[fi]=Thunderbird-sähköposti |
||||||
|
Name[fr]=Messagerie Thunderbird |
||||||
|
Name[pl]=Klient poczty Thunderbird |
||||||
|
Name[pt_BR]=Cliente de E-mail Thunderbird |
||||||
|
Name[sv]=E-postklienten Thunderbird |
||||||
|
Comment[ca]=Llegiu i escriviu correu |
||||||
|
Comment[cs]=Čtení a psaní pošty |
||||||
|
Comment[de]=Emails lesen und verfassen |
||||||
|
Comment[fi]=Lue ja kirjoita sähköposteja |
||||||
|
Comment[fr]=Lire et écrire des courriels |
||||||
|
Comment[it]=Leggere e scrivere email |
||||||
|
Comment[ja]=メールの読み書き |
||||||
|
Comment[pl]=Czytanie i wysyłanie e-maili |
||||||
|
Comment[pt_BR]=Ler e escrever suas mensagens |
||||||
|
Comment[sv]=Läs och skriv e-post |
@ -0,0 +1,6 @@ |
|||||||
|
#!/bin/bash |
||||||
|
# |
||||||
|
# Run Thunderbird under Wayland |
||||||
|
# |
||||||
|
export MOZ_ENABLE_WAYLAND=1 |
||||||
|
exec __PREFIX__/bin/thunderbird "$@" |
@ -0,0 +1,30 @@ |
|||||||
|
[Desktop Entry] |
||||||
|
Version=1.0 |
||||||
|
Name=Thunderbird |
||||||
|
GenericName=Email |
||||||
|
Comment=Send and Receive Email |
||||||
|
Exec=thunderbird %u |
||||||
|
TryExec=thunderbird |
||||||
|
Icon=thunderbird |
||||||
|
Terminal=false |
||||||
|
Type=Application |
||||||
|
MimeType=message/rfc822;x-scheme-handler/mailto; |
||||||
|
StartupNotify=true |
||||||
|
Categories=Network;Email; |
||||||
|
Name[cs]=Poštovní klient Thunderbird |
||||||
|
Name[ca]=Client de correu Thunderbird |
||||||
|
Name[fi]=Thunderbird-sähköposti |
||||||
|
Name[fr]=Messagerie Thunderbird |
||||||
|
Name[pl]=Klient poczty Thunderbird |
||||||
|
Name[pt_BR]=Cliente de E-mail Thunderbird |
||||||
|
Name[sv]=E-postklienten Thunderbird |
||||||
|
Comment[ca]=Llegiu i escriviu correu |
||||||
|
Comment[cs]=Čtení a psaní pošty |
||||||
|
Comment[de]=Emails lesen und verfassen |
||||||
|
Comment[fi]=Lue ja kirjoita sähköposteja |
||||||
|
Comment[fr]=Lire et écrire des courriels |
||||||
|
Comment[it]=Leggere e scrivere email |
||||||
|
Comment[ja]=メールの読み書き |
||||||
|
Comment[pl]=Czytanie i wysyłanie e-maili |
||||||
|
Comment[pt_BR]=Ler e escrever suas mensagens |
||||||
|
Comment[sv]=Läs och skriv e-post |
@ -0,0 +1,172 @@ |
|||||||
|
#!/bin/bash |
||||||
|
# |
||||||
|
# Startup script for the fedora.us Thunderbird RPM |
||||||
|
# (based on the Mozilla RPM launch script) |
||||||
|
# |
||||||
|
|
||||||
|
## |
||||||
|
## Variables |
||||||
|
## |
||||||
|
MOZ_ARCH=$(uname -m) |
||||||
|
case $MOZ_ARCH in |
||||||
|
x86_64 | s390x | sparc64 ) |
||||||
|
MOZ_LIB_DIR="__PREFIX__/lib64" |
||||||
|
SECONDARY_LIB_DIR="__PREFIX__/lib" |
||||||
|
;; |
||||||
|
* ) |
||||||
|
MOZ_LIB_DIR="__PREFIX__/lib" |
||||||
|
SECONDARY_LIB_DIR="__PREFIX__/lib64" |
||||||
|
;; |
||||||
|
esac |
||||||
|
|
||||||
|
if [ ! -x $MOZ_LIB_DIR/thunderbird/thunderbird ]; then |
||||||
|
if [ ! -x $SECONDARY_LIB_DIR/thunderbird/thunderbird ]; then |
||||||
|
echo "Error: $MOZ_LIB_DIR/thunderbird/thunderbird not found" |
||||||
|
if [ -d $SECONDARY_LIB_DIR ]; then |
||||||
|
echo " $SECONDARY_LIB_DIR/thunderbird/thunderbird not found" |
||||||
|
fi |
||||||
|
exit 1 |
||||||
|
fi |
||||||
|
MOZ_LIB_DIR="$SECONDARY_LIB_DIR" |
||||||
|
fi |
||||||
|
|
||||||
|
MOZ_DIST_BIN="$MOZ_LIB_DIR/thunderbird" |
||||||
|
MOZ_PROGRAM="$MOZ_DIST_BIN/thunderbird" |
||||||
|
MOZ_LANGPACKS_DIR="$MOZ_DIST_BIN/langpacks" |
||||||
|
MOZ_EXTENSIONS_PROFILE_DIR="$HOME/.mozilla/extensions/{3550f703-e582-4d05-9a08-453d09bdfdc6}" |
||||||
|
MOZ_LAUNCHER="$MOZ_DIST_BIN/thunderbird" |
||||||
|
|
||||||
|
## |
||||||
|
## Set MOZ_ENABLE_PANGO is no longer used because Pango is enabled by default |
||||||
|
## you may use MOZ_DISABLE_PANGO=1 to force disabling of pango |
||||||
|
## |
||||||
|
#MOZ_DISABLE_PANGO=1 |
||||||
|
#export MOZ_DISABLE_PANGO |
||||||
|
|
||||||
|
## |
||||||
|
## Set MOZ_APP_LAUNCHER for gnome-session |
||||||
|
## |
||||||
|
export MOZ_APP_LAUNCHER="__PREFIX__/bin/thunderbird" |
||||||
|
|
||||||
|
## |
||||||
|
## Disable the GNOME crash dialog, Moz has it's own |
||||||
|
## |
||||||
|
GNOME_DISABLE_CRASH_DIALOG=1 |
||||||
|
export GNOME_DISABLE_CRASH_DIALOG |
||||||
|
|
||||||
|
## |
||||||
|
## Disable the SLICE allocator (rhbz#1014858) |
||||||
|
## |
||||||
|
export G_SLICE=always-malloc |
||||||
|
|
||||||
|
## |
||||||
|
## Allow downgrade because during distro upgrade the build time can be |
||||||
|
## older in newer version than the previous one. |
||||||
|
## |
||||||
|
export MOZ_ALLOW_DOWNGRADE=1 |
||||||
|
|
||||||
|
## |
||||||
|
## To disable the use of Firefox localization, set MOZ_DISABLE_LANGPACKS=1 |
||||||
|
## in your environment before launching Firefox. |
||||||
|
## |
||||||
|
# |
||||||
|
# MOZ_DISABLE_LANGPACKS=1 |
||||||
|
# export MOZ_DISABLE_LANGPACKS |
||||||
|
# |
||||||
|
|
||||||
|
## |
||||||
|
## Use D-Bus remote exclusively when there's Wayland display. |
||||||
|
## |
||||||
|
if [ "$WAYLAND_DISPLAY" ]; then |
||||||
|
export MOZ_DBUS_REMOTE=1 |
||||||
|
fi |
||||||
|
|
||||||
|
## |
||||||
|
## Automatically installed langpacks are tracked by .fedora-langpack-install |
||||||
|
## config file. |
||||||
|
## |
||||||
|
FEDORA_LANGPACK_CONFIG="$MOZ_EXTENSIONS_PROFILE_DIR/.fedora-langpack-install" |
||||||
|
|
||||||
|
# MOZ_DISABLE_LANGPACKS disables language packs completelly |
||||||
|
MOZILLA_DOWN=0 |
||||||
|
if ! [ $MOZ_DISABLE_LANGPACKS ] || [ $MOZ_DISABLE_LANGPACKS -eq 0 ]; then |
||||||
|
pidof thunderbird > /dev/null 2>&1 |
||||||
|
MOZILLA_DOWN=$? |
||||||
|
fi |
||||||
|
|
||||||
|
# Modify language pack configuration only when thunderbird is not running |
||||||
|
# and language packs are not disabled |
||||||
|
if [ $MOZILLA_DOWN -ne 0 ]; then |
||||||
|
|
||||||
|
# Clear already installed langpacks |
||||||
|
mkdir -p $MOZ_EXTENSIONS_PROFILE_DIR |
||||||
|
if [ -f $FEDORA_LANGPACK_CONFIG ]; then |
||||||
|
rm `cat $FEDORA_LANGPACK_CONFIG` > /dev/null 2>&1 |
||||||
|
rm $FEDORA_LANGPACK_CONFIG > /dev/null 2>&1 |
||||||
|
# remove all empty langpacks dirs while they block installation of langpacks |
||||||
|
rmdir $MOZ_EXTENSIONS_PROFILE_DIR/lang* > /dev/null 2>&1 |
||||||
|
fi |
||||||
|
|
||||||
|
# Get locale from system |
||||||
|
CURRENT_LOCALE=$LC_ALL |
||||||
|
CURRENT_LOCALE=${CURRENT_LOCALE:-$LC_MESSAGES} |
||||||
|
CURRENT_LOCALE=${CURRENT_LOCALE:-$LANG} |
||||||
|
|
||||||
|
# Try without a local variant first, then with a local variant |
||||||
|
# So that pt-BR doesn't try to use pt for example |
||||||
|
SHORTMOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*||g"` |
||||||
|
MOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*|-\1|g"` |
||||||
|
|
||||||
|
function create_langpack_link() { |
||||||
|
local language=$* |
||||||
|
local langpack=langpack-${language}@thunderbird.mozilla.org.xpi |
||||||
|
if [ -f $MOZ_LANGPACKS_DIR/$langpack ]; then |
||||||
|
rm -rf $MOZ_EXTENSIONS_PROFILE_DIR/$langpack |
||||||
|
ln -s $MOZ_LANGPACKS_DIR/$langpack \ |
||||||
|
$MOZ_EXTENSIONS_PROFILE_DIR/$langpack |
||||||
|
echo $MOZ_EXTENSIONS_PROFILE_DIR/$langpack > $FEDORA_LANGPACK_CONFIG |
||||||
|
return 0 |
||||||
|
fi |
||||||
|
return 1 |
||||||
|
} |
||||||
|
|
||||||
|
create_langpack_link $SHORTMOZLOCALE || create_langpack_link $MOZLOCALE || true |
||||||
|
fi |
||||||
|
|
||||||
|
# BEAST fix (rhbz#1005611) |
||||||
|
NSS_SSL_CBC_RANDOM_IV=${NSS_SSL_CBC_RANDOM_IV-1} |
||||||
|
export NSS_SSL_CBC_RANDOM_IV |
||||||
|
|
||||||
|
# Prepare command line arguments |
||||||
|
script_args="" |
||||||
|
pass_arg_count=0 |
||||||
|
while [ $# -gt $pass_arg_count ] |
||||||
|
do |
||||||
|
case "$1" in |
||||||
|
-g | --debug) |
||||||
|
script_args="$script_args -g" |
||||||
|
debugging=1 |
||||||
|
shift |
||||||
|
;; |
||||||
|
-d | --debugger) |
||||||
|
if [ $# -gt 1 ]; then |
||||||
|
script_args="$script_args -d $2" |
||||||
|
shift 2 |
||||||
|
else |
||||||
|
shift |
||||||
|
fi |
||||||
|
;; |
||||||
|
*) |
||||||
|
# Move the unrecognized argument to the end of the list. |
||||||
|
arg="$1" |
||||||
|
shift |
||||||
|
set -- "$@" "$arg" |
||||||
|
pass_arg_count=`expr $pass_arg_count + 1` |
||||||
|
;; |
||||||
|
esac |
||||||
|
done |
||||||
|
|
||||||
|
# Don't throw "old profile" dialog box. |
||||||
|
export MOZ_ALLOW_DOWNGRADE=1 |
||||||
|
|
||||||
|
exec $MOZ_PROGRAM "$@" |
Loading…
Reference in new issue