diff options
author | CoprDistGit <infra@openeuler.org> | 2024-03-20 03:46:37 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2024-03-20 03:46:37 +0000 |
commit | fa06f8afb826bc7e16e2919c3b6feee02417ce28 (patch) | |
tree | 042a9bca624cc1e2a2c3dd7ef4943f0ac042556f | |
parent | 5e81daef691f9d194780705f7af7e5f84133315e (diff) |
automatic import of chromiumopeneuler23.09
58 files changed, 8832 insertions, 0 deletions
@@ -0,0 +1,4 @@ +/chromium-119.0.6045.159.tar.xz +/linux-arm64-0.19.11.tgz +/linux-riscv64-0.19.11.tgz +/linux-x64-0.19.11.tgz diff --git a/chrome-remote-desktop@.service b/chrome-remote-desktop@.service new file mode 100644 index 0000000..4b5b1fc --- /dev/null +++ b/chrome-remote-desktop@.service @@ -0,0 +1,14 @@ +[Unit] +Description="Chrome Remote Desktop host daemon" + +[Service] +User=%i +Environment=HOME=%h +ExecStart=@@CRD_PATH@@/chrome-remote-desktop --start --foreground +ExecStop=@@CRD_PATH@@/chrome-remote-desktop --stop +ExecReload=@@CRD_PATH@@/chrome-remote-desktop --reload +Restart=always +TimeoutStopSec=10 + +[Install] +WantedBy=multi-user.target diff --git a/chromium-103.0.5060.53-update-rjsmin-to-1.2.0.patch b/chromium-103.0.5060.53-update-rjsmin-to-1.2.0.patch new file mode 100644 index 0000000..29a5d9c --- /dev/null +++ b/chromium-103.0.5060.53-update-rjsmin-to-1.2.0.patch @@ -0,0 +1,1700 @@ +diff -up chromium-103.0.5060.53/third_party/catapult/common/py_vulcanize/third_party/rjsmin/rjsmin.c.12 chromium-103.0.5060.53/third_party/catapult/common/py_vulcanize/third_party/rjsmin/rjsmin.c +--- chromium-103.0.5060.53/third_party/catapult/common/py_vulcanize/third_party/rjsmin/rjsmin.c.12 2022-06-28 12:50:10.167324583 +0000 ++++ chromium-103.0.5060.53/third_party/catapult/common/py_vulcanize/third_party/rjsmin/rjsmin.c 2021-11-14 19:50:55.000000000 +0000 +@@ -1,5 +1,5 @@ + /* +- * Copyright 2011 - 2015 ++ * Copyright 2011 - 2021 + * Andr\xe9 Malo or his licensors, as applicable + * + * Licensed under the Apache License, Version 2.0 (the "License"); +@@ -18,21 +18,21 @@ + #include "cext.h" + EXT_INIT_FUNC; + +-#define RJSMIN_DULL_BIT (1 << 0) +-#define RJSMIN_PRE_REGEX_BIT (1 << 1) +-#define RJSMIN_REGEX_DULL_BIT (1 << 2) +-#define RJSMIN_REGEX_CC_DULL_BIT (1 << 3) +-#define RJSMIN_ID_LIT_BIT (1 << 4) +-#define RJSMIN_ID_LIT_O_BIT (1 << 5) +-#define RJSMIN_ID_LIT_C_BIT (1 << 6) +-#define RJSMIN_STRING_DULL_BIT (1 << 7) +-#define RJSMIN_SPACE_BIT (1 << 8) +-#define RJSMIN_POST_REGEX_OFF_BIT (1 << 9) ++#define RJSMIN_DULL_BIT (1 << 0) ++#define RJSMIN_PRE_REGEX_BIT (1 << 1) ++#define RJSMIN_REGEX_DULL_BIT (1 << 2) ++#define RJSMIN_REGEX_CC_DULL_BIT (1 << 3) ++#define RJSMIN_ID_LIT_BIT (1 << 4) ++#define RJSMIN_ID_LIT_O_BIT (1 << 5) ++#define RJSMIN_ID_LIT_C_BIT (1 << 6) ++#define RJSMIN_STRING_DULL_BIT (1 << 7) ++#define RJSMIN_SPACE_BIT (1 << 8) ++#define RJSMIN_POST_REGEX_OFF_BIT (1 << 9) ++#define RJSMIN_A_Z_BIT (1 << 10) + +-#ifdef EXT3 +-typedef Py_UNICODE rchar; +-#else + typedef unsigned char rchar; ++#ifdef U ++#undef U + #endif + #define U(c) ((rchar)(c)) + +@@ -66,66 +66,120 @@ typedef unsigned char rchar; + #define RJSMIN_IS_PRE_REGEX_1(c) ((U(c) <= 127) && \ + (rjsmin_charmask[U(c) & 0x7F] & RJSMIN_PRE_REGEX_BIT)) + ++#define RJSMIN_IS_A_Z(c) ((U(c) <= 127) && \ ++ (rjsmin_charmask[U(c) & 0x7F] & RJSMIN_A_Z_BIT)) ++ + + static const unsigned short rjsmin_charmask[128] = { +- 396, 396, 396, 396, 396, 396, 396, 396, +- 396, 396, 2, 396, 396, 2, 396, 396, +- 396, 396, 396, 396, 396, 396, 396, 396, +- 396, 396, 396, 396, 396, 396, 396, 396, +- 396, 687, 588, 653, 765, 653, 143, 588, +- 687, 205, 653, 237, 143, 237, 141, 648, +- 765, 765, 765, 765, 765, 765, 765, 765, +- 765, 765, 143, 143, 653, 143, 653, 143, +- 653, 765, 765, 765, 765, 765, 765, 765, +- 765, 765, 765, 765, 765, 765, 765, 765, +- 765, 765, 765, 765, 765, 765, 765, 765, +- 765, 765, 765, 683, 513, 197, 653, 765, +- 653, 765, 765, 765, 765, 765, 765, 765, +- 765, 765, 765, 765, 765, 765, 765, 765, +- 765, 765, 765, 765, 765, 765, 765, 765, +- 765, 765, 765, 687, 143, 207, 653, 765 ++ 396, 396, 396, 396, 396, 396, 396, 396, ++ 396, 396, 2, 396, 396, 2, 396, 396, ++ 396, 396, 396, 396, 396, 396, 396, 396, ++ 396, 396, 396, 396, 396, 396, 396, 396, ++ 396, 687, 588, 653, 765, 653, 143, 588, ++ 687, 205, 655, 239, 143, 239, 141, 648, ++ 765, 765, 765, 765, 765, 765, 765, 765, ++ 765, 765, 143, 143, 653, 143, 653, 143, ++ 653, 765, 765, 765, 765, 765, 765, 765, ++ 765, 765, 765, 765, 765, 765, 765, 765, ++ 765, 765, 765, 765, 765, 765, 765, 765, ++ 765, 765, 765, 683, 513, 197, 653, 765, ++ 588, 1789, 1789, 1789, 1789, 1789, 1789, 1789, ++ 1789, 1789, 1789, 1789, 1789, 1789, 1789, 1789, ++ 1789, 1789, 1789, 1789, 1789, 1789, 1789, 1789, ++ 1789, 1789, 1789, 687, 143, 207, 653, 765 + }; + ++ + static Py_ssize_t + rjsmin(const rchar *source, rchar *target, Py_ssize_t length, + int keep_bang_comments) + { +- const rchar *reset, *pcreset = NULL, *pctoken = NULL, *xtarget, +- *sentinel = source + length; +- rchar *tstart = target; +- int post_regex = 0; +- rchar c, quote, spaced = U(' '); ++ const rchar ++ *sentinel = source + length, /* never hit this pointer (source buf) */ ++ *reset, /* reset pointer (source buf) */ ++ *pcreset = NULL, /* pre-comment reset pointer (source buf) */ ++ *pctoken = NULL, /* pre-comment token pointer (target buf) ++ * Pointing to before the last kept comment, if any */ ++ *rsreset = NULL, /* regex-with-method reset pointer (source buf) */ ++ *xtarget; /* pre-regex-2 target pointer */ ++ ++ rchar *tstart = target, /* Target start pointer for reference */ ++ *rtreset = NULL; /* regex-with-method reset pointer (target buf) */ ++ ++ int rsdot, /* seen dot after regex-with-method pattern? */ ++ post_regex = 0; ++ rchar c, quote, ++ spaced = U(' '); /* the last seen kind of space (nl taking prio), ++ * init with ' ' */ + ++ /* main loop */ + while (source < sentinel) { + c = *source++; ++ + if (RJSMIN_IS_DULL(c)) { + if (post_regex) post_regex = 0; + if (pctoken) pctoken = NULL; + if (spaced == U('\n')) spaced = U(' '); ++ if (rsreset) { ++ /* both a-z and . are covered by "dull" */ ++ if (!rsdot) { ++ if (c != U('.')) { ++ /* reset regex-with-method to the starting slash */ ++ source = rsreset; ++ target = rtreset; ++ rsreset = NULL; ++ continue; /* main loop */ ++ } ++ /* Found a dot after possible regex, looking for a-z now */ ++ rsdot = 1; ++ } ++ else if (!RJSMIN_IS_A_Z(c)) { ++ /* reset regex-with-method to the starting slash */ ++ source = rsreset; ++ target = rtreset; ++ rsreset = NULL; ++ continue; /* main loop */ ++ } ++ else { ++ /* Successfull finish the regex-with-method match */ ++ rsreset = NULL; ++ } ++ } + + *target++ = c; +- continue; ++ continue; /* main loop */ + } ++ + switch (c) { + + /* String */ +- case U('\''): case U('"'): ++ case U('\''): case U('"'): case U('`'): + if (post_regex) post_regex = 0; + if (pctoken) pctoken = NULL; + if (spaced == U('\n')) spaced = U(' '); ++ if (rsreset) { ++ /* reset regex-with-method to the starting slash */ ++ source = rsreset; ++ target = rtreset; ++ rsreset = NULL; ++ continue; /* main loop */ ++ } + + reset = source; + *target++ = quote = c; ++ ++ /* string loop */ + while (source < sentinel) { + c = *source++; + *target++ = c; + if (RJSMIN_IS_STRING_DULL(c)) +- continue; ++ continue; /* string loop */ ++ + switch (c) { +- case U('\''): case U('"'): ++ case U('\''): case U('"'): case U('`'): + if (c == quote) +- goto cont; +- continue; ++ goto cont; /* main loop */ ++ continue; /* string loop */ + case U('\\'): + if (source < sentinel) { + c = *source++; +@@ -134,13 +188,18 @@ rjsmin(const rchar *source, rchar *targe + && *source == U('\n')) + *target++ = *source++; + } +- continue; ++ continue; /* string loop */ ++ case U('\r'): case U('\n'): ++ if (quote != U('`')) ++ break; /* string reset */ ++ continue; /* string loop */ + } +- break; ++ break; /* string reset */ + } ++ /* string reset */ + target -= source - reset; + source = reset; +- continue; ++ continue; /* main loop */ + + /* Comment or Regex or something else entirely */ + case U('/'): +@@ -148,6 +207,13 @@ rjsmin(const rchar *source, rchar *targe + if (post_regex) post_regex = 0; + if (pctoken) pctoken = NULL; + if (spaced == U('\n')) spaced = U(' '); ++ if (rsreset) { ++ /* reset regex-with-method to the starting slash */ ++ source = rsreset; ++ target = rtreset; ++ rsreset = NULL; ++ continue; /* main loop */ ++ } + + *target++ = c; + } +@@ -157,7 +223,19 @@ rjsmin(const rchar *source, rchar *targe + case U('*'): case U('/'): + goto skip_or_copy_ws; + ++ /* Regex or slash */ + default: ++ if (rsreset) { ++ /* reset regex-with-method to the starting slash */ ++ if (post_regex) post_regex = 0; ++ if (pctoken) pctoken = NULL; ++ if (spaced == U('\n')) spaced = U(' '); ++ source = rsreset; ++ target = rtreset; ++ rsreset = NULL; ++ continue; /* main loop */ ++ } ++ + xtarget = NULL; + if ( target == tstart + || RJSMIN_IS_PRE_REGEX_1(*((pctoken ? pctoken : target) +@@ -176,99 +254,148 @@ rjsmin(const rchar *source, rchar *targe + || !RJSMIN_IS_ID_LITERAL(*(xtarget - 7)) + ) + )) { +- +- /* Regex */ ++ /* nothing to do here, continuing down below ++ * We could unset rsreset here, but we know it already ++ * is. */ ++ ; ++ } ++ else if (*((pctoken ? pctoken : target) - 1) == U(')')) { ++ xtarget = NULL; ++ rsreset = source; ++ rtreset = target + 1; ++ rsdot = 0; ++ } ++ else { ++ /* Just a slash */ + if (post_regex) post_regex = 0; + if (pctoken) pctoken = NULL; ++ if (spaced == U('\n')) spaced = U(' '); + +- reset = source; +- if (spaced == U('\n')) { +- spaced = U(' '); +- if (xtarget) +- *target++ = U('\n'); +- } ++ *target++ = c; ++ continue; /* main loop */ ++ } + +- *target++ = U('/'); +- while (source < sentinel) { +- c = *source++; +- *target++ = c; +- if (RJSMIN_IS_REGEX_DULL(c)) +- continue; +- switch (c) { +- case U('/'): +- post_regex = 1; +- goto cont; +- case U('\\'): +- if (source < sentinel) { +- c = *source++; +- *target++ = c; +- if (c == U('\r') || c == U('\n')) +- break; +- } +- continue; +- case U('['): +- while (source < sentinel) { +- c = *source++; +- *target++ = c; +- if (RJSMIN_IS_REGEX_CC_DULL(c)) +- continue; +- switch (c) { +- case U('\\'): +- if (source < sentinel) { +- c = *source++; +- *target++ = c; +- if (c == U('\r') || c == U('\n')) +- break; +- } +- continue; +- case U(']'): +- goto cont_regex; ++ if (post_regex) post_regex = 0; ++ if (pctoken) pctoken = NULL; ++ ++ reset = source; ++ if (spaced == U('\n')) { ++ spaced = U(' '); ++ if (xtarget) ++ *target++ = U('\n'); ++ } ++ ++ *target++ = U('/'); ++ ++ /* regex loop */ ++ while (source < sentinel) { ++ c = *source++; ++ *target++ = c; ++ ++ if (RJSMIN_IS_REGEX_DULL(c)) ++ continue; /* regex loop */ ++ ++ switch (c) { ++ case U('/'): ++ while (source < sentinel ++ && RJSMIN_IS_A_Z(*source)) ++ *target++ = *source++; ++ post_regex = !rsreset; ++ /* This check is supposed to make it faster. ++ * It doesn't. It slows it down. I wonder why... ++ */ ++ /* ++ * if (!post_regex ++ * && source < sentinel - 1 ++ * && *source == U('.') ++ * && RJSMIN_IS_A_Z(*(source + 1))) ++ * rsreset = NULL; ++ */ ++ ++ goto cont; /* main loop */ ++ ++ case U('\\'): ++ if (source < sentinel) { ++ c = *source++; ++ *target++ = c; ++ if (c == U('\r') || c == U('\n')) ++ break; /* regex reset */ ++ } ++ continue; /* regex loop */ ++ ++ case U('['): ++ /* regex CC loop */ ++ while (source < sentinel) { ++ c = *source++; ++ *target++ = c; ++ ++ if (RJSMIN_IS_REGEX_CC_DULL(c)) ++ continue; /* regex CC loop */ ++ ++ switch (c) { ++ case U('\\'): ++ if (source < sentinel) { ++ c = *source++; ++ *target++ = c; ++ if (c == U('\r') || c == U('\n')) ++ break; /* regex reset */ + } ++ continue; /* regex CC loop */ ++ ++ case U(']'): ++ goto cont_regex; /* regex loop */ + } +- break; + } +- break; +- cont_regex: +- continue; ++ break; /* regex reset */ ++ + } +- target -= source - reset; +- source = reset; +- } +- else { +- /* Just a slash */ +- if (post_regex) post_regex = 0; +- if (pctoken) pctoken = NULL; +- if (spaced == U('\n')) spaced = U(' '); ++ break; /* regex reset */ + +- *target++ = c; ++ cont_regex: ++ continue; /* regex loop */ + } +- continue; ++ ++ /* regex reset */ ++ target -= source - reset; ++ source = reset; ++ rsreset = NULL; ++ continue; /* main loop */ + } + } +- continue; ++ continue; /* main loop */ /* LCOV_EXCL_LINE */ + + /* Whitespace */ + default: + skip_or_copy_ws: ++ /* remember if we've seen a newline, start with: no */ + quote = U(' '); + --source; ++ ++ /* space loop */ + while (source < sentinel) { + c = *source++; + if (RJSMIN_IS_SPACE(c)) +- continue; ++ continue; /* space loop */ ++ + switch (c) { + case U('\r'): case U('\n'): + quote = U('\n'); +- continue; ++ continue; /* space loop */ ++ ++ /* Can only be a comment at this point ++ * (or ending prematurely) */ + case U('/'): + if (source < sentinel) { + switch (*source) { ++ ++ /* multiline comment */ + case U('*'): + reset = source++; + /* copy bang comment, if requested */ + if ( keep_bang_comments && source < sentinel + && *source == U('!')) { + if (!pctoken) { ++ /* Backtracking if ending prematurely */ + pctoken = target; + pcreset = reset; + } +@@ -276,6 +403,8 @@ rjsmin(const rchar *source, rchar *targe + *target++ = U('/'); + *target++ = U('*'); + *target++ = *source++; ++ ++ /* comment loop */ + while (source < sentinel) { + c = *source++; + *target++ = c; +@@ -283,20 +412,21 @@ rjsmin(const rchar *source, rchar *targe + && *source == U('/')) { + *target++ = *source++; + reset = NULL; +- break; ++ break; /* continue space loop */ + } + } + if (!reset) +- continue; ++ continue; /* space loop */ + ++ /* comment reset */ + target -= source - reset; + source = reset; + if (pcreset == reset) { + pctoken = NULL; + pcreset = NULL; + } +- + } ++ + /* strip regular comment */ + else { + while (source < sentinel) { +@@ -305,41 +435,52 @@ rjsmin(const rchar *source, rchar *targe + && *source == U('/')) { + ++source; + reset = NULL; +- break; ++ break; /* continue space loop */ + } + } + if (!reset) +- continue; ++ continue; /* space loop */ ++ ++ /* comment reset: fallback to slash */ + source = reset; + *target++ = U('/'); + } +- goto cont; ++ goto cont; /* main loop */ ++ ++ /* single line comment */ + case U('/'): + ++source; ++ ++ /* single line comment loop */ + while (source < sentinel) { + c = *source++; + switch (c) { + case U('\n'): +- break; ++ break; /* continue space loop */ ++ + case U('\r'): + if (source < sentinel + && *source == U('\n')) + ++source; +- break; ++ break; /* continue space loop */ ++ + default: +- continue; ++ continue; /* single line comment loop */ + } +- break; ++ break; /* continue space loop */ + } + quote = U('\n'); +- continue; ++ continue; /* space loop */ + } + } + } ++ ++ /* No more spacy character found */ + --source; +- break; ++ break; /* end space loop */ + } + ++ /* Copy a space if needed */ + if ((tstart < (pctoken ? pctoken : target) && source < sentinel) + && ((quote == U('\n') + && ((RJSMIN_IS_ID_LITERAL_CLOSE(*((pctoken ? +@@ -363,8 +504,9 @@ rjsmin(const rchar *source, rchar *targe + pcreset = NULL; + spaced = quote; + } ++ + cont: +- continue; ++ continue; /* main loop */ + } + return (Py_ssize_t)(target - tstart); + } +@@ -385,15 +527,15 @@ substitution regex.\n\ + :Note: This is a hand crafted C implementation built on the regex\n\ + semantics.\n\ + \n\ +-:Parameters:\n\ +- `script` : ``str``\n\ ++Parameters:\n\ ++ script (str):\n\ + Script to minify\n\ + \n\ +- `keep_bang_comments` : ``bool``\n\ ++ keep_bang_comments (bool):\n\ + Keep comments starting with an exclamation mark? (``/*!...*/``)\n\ + \n\ +-:Return: Minified script\n\ +-:Rtype: ``str``"); ++Returns:\n\ ++ str: Minified script"); + + static PyObject * + rjsmin_jsmin(PyObject *self, PyObject *args, PyObject *kwds) +@@ -404,15 +546,15 @@ rjsmin_jsmin(PyObject *self, PyObject *a + int keep_bang_comments; + #ifdef EXT2 + int uni; +-#define UOBJ "O" + #endif + #ifdef EXT3 +-#define UOBJ "U" ++ int bytes; ++ rchar *bytescript; + #endif + +- if (!PyArg_ParseTupleAndKeywords(args, kwds, UOBJ "|O", kwlist, ++ if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|O", kwlist, + &script, &keep_bang_comments_)) +- return NULL; ++ LCOV_EXCL_LINE_RETURN(NULL); + + if (!keep_bang_comments_) + keep_bang_comments = 0; +@@ -425,28 +567,27 @@ rjsmin_jsmin(PyObject *self, PyObject *a + #ifdef EXT2 + if (PyUnicode_Check(script)) { + if (!(script = PyUnicode_AsUTF8String(script))) +- return NULL; ++ LCOV_EXCL_LINE_RETURN(NULL); + uni = 1; + } ++ else if (!PyString_Check(script)) { ++ PyErr_SetString(PyExc_TypeError, "Unexpected type"); ++ return NULL; ++ } + else { + if (!(script = PyObject_Str(script))) +- return NULL; ++ LCOV_EXCL_LINE_RETURN(NULL); + uni = 0; + } +-#endif +- +-#ifdef EXT3 +- Py_INCREF(script); +-#define PyString_GET_SIZE PyUnicode_GET_SIZE +-#define PyString_AS_STRING PyUnicode_AS_UNICODE +-#define _PyString_Resize PyUnicode_Resize +-#define PyString_FromStringAndSize PyUnicode_FromUnicode +-#endif +- + slength = PyString_GET_SIZE(script); ++ + if (!(result = PyString_FromStringAndSize(NULL, slength))) { ++ LCOV_EXCL_START ++ + Py_DECREF(script); + return NULL; ++ ++ LCOV_EXCL_STOP + } + Py_BEGIN_ALLOW_THREADS + length = rjsmin((rchar *)PyString_AS_STRING(script), +@@ -456,30 +597,97 @@ rjsmin_jsmin(PyObject *self, PyObject *a + + Py_DECREF(script); + if (length < 0) { ++ LCOV_EXCL_START ++ + Py_DECREF(result); + return NULL; ++ ++ LCOV_EXCL_STOP + } + if (length != slength && _PyString_Resize(&result, length) == -1) +- return NULL; ++ LCOV_EXCL_LINE_RETURN(NULL); + +-#ifdef EXT2 + if (uni) { + script = PyUnicode_DecodeUTF8(PyString_AS_STRING(result), + PyString_GET_SIZE(result), "strict"); + Py_DECREF(result); +- if (!script) +- return NULL; +- result = script; ++ return script; + } +-#endif ++ + return result; ++ ++#else /* EXT3 */ ++ ++ if (PyUnicode_Check(script)) { ++ bytes = 0; ++ script = PyUnicode_AsUTF8String(script); ++ bytescript = (rchar *)PyBytes_AS_STRING(script); ++ slength = PyBytes_GET_SIZE(script); ++ } ++ else if (PyBytes_Check(script)) { ++ bytes = 1; ++ Py_INCREF(script); ++ bytescript = (rchar *)PyBytes_AS_STRING(script); ++ slength = PyBytes_GET_SIZE(script); ++ } ++ else if (PyByteArray_Check(script)) { ++ bytes = 2; ++ Py_INCREF(script); ++ bytescript = (rchar *)PyByteArray_AS_STRING(script); ++ slength = PyByteArray_GET_SIZE(script); ++ } ++ else { ++ PyErr_SetString(PyExc_TypeError, "Unexpected type"); ++ return NULL; ++ } ++ ++ if (!(result = PyBytes_FromStringAndSize(NULL, slength))) { ++ LCOV_EXCL_START ++ ++ Py_DECREF(script); ++ return NULL; ++ ++ LCOV_EXCL_STOP ++ } ++ Py_BEGIN_ALLOW_THREADS ++ length = rjsmin(bytescript, (rchar *)PyBytes_AS_STRING(result), ++ slength, keep_bang_comments); ++ Py_END_ALLOW_THREADS ++ ++ Py_DECREF(script); ++ if (length < 0) { ++ LCOV_EXCL_START ++ ++ Py_DECREF(result); ++ return NULL; ++ ++ LCOV_EXCL_STOP ++ } ++ ++ if (!bytes) { ++ script = PyUnicode_DecodeUTF8(PyBytes_AS_STRING(result), length, ++ "strict"); ++ Py_DECREF(result); ++ return script; ++ } ++ if (bytes == 1) { ++ if (length != slength) { ++ _PyBytes_Resize(&result, length); ++ } ++ return result; ++ } ++ /* bytes == 2: bytearray */ ++ script = PyByteArray_FromStringAndSize(PyBytes_AS_STRING(result), length); ++ Py_DECREF(result); ++ return script; ++#endif + } + + /* ------------------------ BEGIN MODULE DEFINITION ------------------------ */ + + EXT_METHODS = { + {"jsmin", +- (PyCFunction)rjsmin_jsmin, METH_VARARGS | METH_KEYWORDS, ++ EXT_CFUNC(rjsmin_jsmin), METH_VARARGS | METH_KEYWORDS, + rjsmin_jsmin__doc__}, + + {NULL} /* Sentinel */ +@@ -499,10 +707,10 @@ EXT_INIT_FUNC { + + /* Create the module and populate stuff */ + if (!(m = EXT_CREATE(&EXT_DEFINE_VAR))) +- EXT_INIT_ERROR(NULL); ++ EXT_INIT_ERROR(LCOV_EXCL_LINE(NULL)); + + EXT_ADD_UNICODE(m, "__author__", "Andr\xe9 Malo", "latin-1"); +- EXT_ADD_STRING(m, "__docformat__", "restructuredtext en"); ++ EXT_ADD_STRING(m, "__version__", STRINGIFY(EXT_VERSION)); + + EXT_INIT_RETURN(m); + } +diff -up chromium-103.0.5060.53/third_party/catapult/common/py_vulcanize/third_party/rjsmin/rjsmin.py.12 chromium-103.0.5060.53/third_party/catapult/common/py_vulcanize/third_party/rjsmin/rjsmin.py +--- chromium-103.0.5060.53/third_party/catapult/common/py_vulcanize/third_party/rjsmin/rjsmin.py.12 2022-07-01 20:33:39.317727375 +0000 ++++ chromium-103.0.5060.53/third_party/catapult/common/py_vulcanize/third_party/rjsmin/rjsmin.py 2021-11-14 20:24:16.000000000 +0000 +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + # -*- coding: ascii -*- +-r""" ++u""" + ===================== + Javascript Minifier + ===================== +@@ -11,7 +11,7 @@ The minifier is based on the semantics o + + :Copyright: + +- Copyright 2011 - 2015 ++ Copyright 2011 - 2021 + Andr\xe9 Malo or his licensors, as applicable + + :License: +@@ -39,9 +39,11 @@ same results as the original ``jsmin.c`` + - Newline characters are not allowed inside string and regex literals, except + for line continuations in string literals (ECMA-5). + - "return /regex/" is recognized correctly. ++- More characters are allowed before regexes. + - Line terminators after regex literals are handled more sensibly + - "+ +" and "- -" sequences are not collapsed to '++' or '--' + - Newlines before ! operators are removed more sensibly ++- (Unnested) template literals are supported (ECMA-6) + - Comments starting with an exclamation mark (``!``) can be kept optionally + - rJSmin does not handle streams, but only complete strings. (However, the + module provides a "streamy" interface). +@@ -56,20 +58,17 @@ file for details. + + rjsmin.c is a reimplementation of rjsmin.py in C and speeds it up even more. + +-Both python 2 and python 3 are supported. ++Supported python versions are 2.7 and 3.6+. + + .. _jsmin.c by Douglas Crockford: + http://www.crockford.com/javascript/jsmin.c + """ +-if __doc__: +- # pylint: disable = redefined-builtin +- __doc__ = __doc__.encode('ascii').decode('unicode_escape') +-__author__ = r"Andr\xe9 Malo".encode('ascii').decode('unicode_escape') +-__docformat__ = "restructuredtext en" ++__author__ = u"Andr\xe9 Malo" + __license__ = "Apache License, Version 2.0" +-__version__ = '1.0.12' ++__version__ = '1.2.0' + __all__ = ['jsmin'] + ++import functools as _ft + import re as _re + + +@@ -80,13 +79,13 @@ def _make_jsmin(python_only=False): + .. _jsmin.c by Douglas Crockford: + http://www.crockford.com/javascript/jsmin.c + +- :Parameters: +- `python_only` : ``bool`` ++ Parameters: ++ python_only (bool): + Use only the python variant. If true, the c extension is not even + tried to be loaded. + +- :Return: Minifier +- :Rtype: ``callable`` ++ Returns: ++ callable: Minifier + """ + # pylint: disable = unused-variable + # pylint: disable = too-many-locals +@@ -97,7 +96,10 @@ def _make_jsmin(python_only=False): + except ImportError: + pass + else: +- return _rjsmin.jsmin ++ # Ensure that the C version is in sync ++ # https://github.com/ndparker/rjsmin/issues/11 ++ if getattr(_rjsmin, '__version__', None) == __version__: ++ return _rjsmin.jsmin + try: + xrange + except NameError: +@@ -110,15 +112,16 @@ def _make_jsmin(python_only=False): + space_comment_nobang = r'(?:/\*(?!!)[^*]*\*+(?:[^/*][^*]*\*+)*/)' + bang_comment = r'(?:/\*![^*]*\*+(?:[^/*][^*]*\*+)*/)' + +- string1 = \ +- r'(?:\047[^\047\\\r\n]*(?:\\(?:[^\r\n]|\r?\n|\r)[^\047\\\r\n]*)*\047)' ++ string1 = r"(?:'[^'\\\r\n]*(?:\\(?:[^\r\n]|\r?\n|\r)[^'\\\r\n]*)*')" ++ string1 = string1.replace("'", r'\047') # portability + string2 = r'(?:"[^"\\\r\n]*(?:\\(?:[^\r\n]|\r?\n|\r)[^"\\\r\n]*)*")' +- string3 = r'(?:`(?:[^`\\]|\\.)*`)' ++ string3 = r'(?:`[^`\\]*(?:\\(?:[^\r\n]|\r?\n|\r)[^`\\]*)*`)' ++ string3 = string3.replace('`', r'\140') # portability + strings = r'(?:%s|%s|%s)' % (string1, string2, string3) + + charclass = r'(?:\[[^\\\]\r\n]*(?:\\[^\r\n][^\\\]\r\n]*)*\])' + nospecial = r'[^/\\\[\r\n]' +- regex = r'(?:/(?![\r\n/*])%s*(?:(?:\\[^\r\n]|%s)%s*)*/)' % ( ++ regex = r'(?:/(?![\r\n/*])%s*(?:(?:\\[^\r\n]|%s)%s*)*/[a-z]*)' % ( + nospecial, charclass, nospecial + ) + space = r'(?:%s|%s)' % (space_chars, space_comment) +@@ -154,7 +157,7 @@ def _make_jsmin(python_only=False): + ) for first, last in result]) # noqa + + return _re.sub( +- r'([\000-\040\047])', # \047 for better portability ++ r"([\000-\040'`])", # ' and ` for better portability + lambda m: '\\%03o' % ord(m.group(1)), ( + sequentize(result) + .replace('\\', '\\\\') +@@ -180,42 +183,48 @@ def _make_jsmin(python_only=False): + return r'[%s]' % fix_charclass(result) + + not_id_literal = not_id_literal_(r'[a-zA-Z0-9_$]') +- preregex1 = r'[(,=:\[!&|?{};\r\n]' ++ preregex1 = r'[(,=:\[!&|?{};\r\n+*-]' + preregex2 = r'%(not_id_literal)sreturn' % locals() + + id_literal = id_literal_(r'[a-zA-Z0-9_$]') + id_literal_open = id_literal_(r'[a-zA-Z0-9_${\[(!+-]') +- id_literal_close = id_literal_(r'[a-zA-Z0-9_$}\])"\047+-]') ++ id_literal_close = id_literal_(r'[a-zA-Z0-9_$}\])"\047\140+-]') + post_regex_off = id_literal_(r'[^\000-\040}\])?:|,;.&=+-]') + +- dull = r'[^\047"`/\000-\040]' ++ dull = r'[^\047"\140/\000-\040]' + + space_sub_simple = _re.compile(( +- # noqa pylint: disable = bad-continuation ++ # noqa pylint: disable = bad-option-value, bad-continuation + + r'(%(dull)s+)' # 0 + r'|(%(strings)s%(dull)s*)' # 1 +- r'|(?<=%(preregex1)s)' ++ r'|(?<=[)])' + r'%(space)s*(?:%(newline)s%(space)s*)*' + r'(%(regex)s)' # 2 +- r'(%(space)s*(?:%(newline)s%(space)s*)+' # 3 ++ r'(?=%(space)s*(?:%(newline)s%(space)s*)*' ++ r'\.' ++ r'%(space)s*(?:%(newline)s%(space)s*)*[a-z])' ++ r'|(?<=%(preregex1)s)' ++ r'%(space)s*(?:%(newline)s%(space)s*)*' ++ r'(%(regex)s)' # 3 ++ r'(%(space)s*(?:%(newline)s%(space)s*)+' # 4 + r'(?=%(post_regex_off)s))?' + r'|(?<=%(preregex2)s)' +- r'%(space)s*(?:(%(newline)s)%(space)s*)*' # 4 +- r'(%(regex)s)' # 5 +- r'(%(space)s*(?:%(newline)s%(space)s*)+' # 6 ++ r'%(space)s*(?:(%(newline)s)%(space)s*)*' # 5 ++ r'(%(regex)s)' # 6 ++ r'(%(space)s*(?:%(newline)s%(space)s*)+' # 7 + r'(?=%(post_regex_off)s))?' + r'|(?<=%(id_literal_close)s)' +- r'%(space)s*(?:(%(newline)s)%(space)s*)+' # 7 ++ r'%(space)s*(?:(%(newline)s)%(space)s*)+' # 8 + r'(?=%(id_literal_open)s)' +- r'|(?<=%(id_literal)s)(%(space)s)+(?=%(id_literal)s)' # 8 +- r'|(?<=\+)(%(space)s)+(?=\+)' # 9 +- r'|(?<=-)(%(space)s)+(?=-)' # 10 ++ r'|(?<=%(id_literal)s)(%(space)s)+(?=%(id_literal)s)' # 9 ++ r'|(?<=\+)(%(space)s)+(?=\+)' # 10 ++ r'|(?<=-)(%(space)s)+(?=-)' # 11 + r'|%(space)s+' + r'|(?:%(newline)s%(space)s*)+' + ) % locals()).sub + +- # print space_sub_simple.__self__.pattern ++ # print(space_sub_simple.__self__.pattern) + + def space_subber_simple(match): + """ Substitution callback """ +@@ -227,48 +236,56 @@ def _make_jsmin(python_only=False): + elif groups[1]: + return groups[1] + elif groups[2]: +- if groups[3]: +- return groups[2] + '\n' + return groups[2] +- elif groups[5]: ++ elif groups[3]: ++ if groups[4]: ++ return groups[3] + '\n' ++ return groups[3] ++ elif groups[6]: + return "%s%s%s" % ( +- groups[4] and '\n' or '', +- groups[5], +- groups[6] and '\n' or '', ++ groups[5] and '\n' or '', ++ groups[6], ++ groups[7] and '\n' or '', + ) +- elif groups[7]: ++ elif groups[8]: + return '\n' +- elif groups[8] or groups[9] or groups[10]: ++ elif groups[9] or groups[10] or groups[11]: + return ' ' + else: + return '' + + space_sub_banged = _re.compile(( +- # noqa pylint: disable = bad-continuation ++ # noqa pylint: disable = bad-option-value, bad-continuation + + r'(%(dull)s+)' # 0 + r'|(%(strings)s%(dull)s*)' # 1 +- r'|(?<=%(preregex1)s)' ++ r'|(?<=[)])' + r'(%(space)s*(?:%(newline)s%(space)s*)*)' # 2 + r'(%(regex)s)' # 3 +- r'(%(space)s*(?:%(newline)s%(space)s*)+' # 4 ++ r'(?=%(space)s*(?:%(newline)s%(space)s*)*' ++ r'\.' ++ r'%(space)s*(?:%(newline)s%(space)s*)*[a-z])' ++ r'|(?<=%(preregex1)s)' ++ r'(%(space)s*(?:%(newline)s%(space)s*)*)' # 4 ++ r'(%(regex)s)' # 5 ++ r'(%(space)s*(?:%(newline)s%(space)s*)+' # 6 + r'(?=%(post_regex_off)s))?' + r'|(?<=%(preregex2)s)' +- r'(%(space)s*(?:(%(newline)s)%(space)s*)*)' # 5, 6 +- r'(%(regex)s)' # 7 +- r'(%(space)s*(?:%(newline)s%(space)s*)+' # 8 ++ r'(%(space)s*(?:(%(newline)s)%(space)s*)*)' # 7, 8 ++ r'(%(regex)s)' # 9 ++ r'(%(space)s*(?:%(newline)s%(space)s*)+' # 10 + r'(?=%(post_regex_off)s))?' + r'|(?<=%(id_literal_close)s)' +- r'(%(space)s*(?:%(newline)s%(space)s*)+)' # 9 ++ r'(%(space)s*(?:%(newline)s%(space)s*)+)' # 11 + r'(?=%(id_literal_open)s)' +- r'|(?<=%(id_literal)s)(%(space)s+)(?=%(id_literal)s)' # 10 +- r'|(?<=\+)(%(space)s+)(?=\+)' # 11 +- r'|(?<=-)(%(space)s+)(?=-)' # 12 +- r'|(%(space)s+)' # 13 +- r'|((?:%(newline)s%(space)s*)+)' # 14 ++ r'|(?<=%(id_literal)s)(%(space)s+)(?=%(id_literal)s)' # 12 ++ r'|(?<=\+)(%(space)s+)(?=\+)' # 13 ++ r'|(?<=-)(%(space)s+)(?=-)' # 14 ++ r'|(%(space)s+)' # 15 ++ r'|((?:%(newline)s%(space)s*)+)' # 16 + ) % locals()).sub + +- # print space_sub_banged.__self__.pattern ++ # print(space_sub_banged.__self__.pattern) + + keep = _re.compile(( + r'%(space_chars)s+|%(space_comment_nobang)s+|%(newline)s+' +@@ -276,7 +293,7 @@ def _make_jsmin(python_only=False): + ) % locals()).sub + keeper = lambda m: m.groups()[0] or '' + +- # print keep.__self__.pattern ++ # print(keep.__self__.pattern) + + def space_subber_banged(match): + """ Substitution callback """ +@@ -288,26 +305,34 @@ def _make_jsmin(python_only=False): + elif groups[1]: + return groups[1] + elif groups[3]: +- return "%s%s%s%s" % ( ++ return "%s%s" % ( + keep(keeper, groups[2]), + groups[3], +- keep(keeper, groups[4] or ''), +- groups[4] and '\n' or '', + ) +- elif groups[7]: +- return "%s%s%s%s%s" % ( +- keep(keeper, groups[5]), ++ elif groups[5]: ++ return "%s%s%s%s" % ( ++ keep(keeper, groups[4]), ++ groups[5], ++ keep(keeper, groups[6] or ''), + groups[6] and '\n' or '', +- groups[7], +- keep(keeper, groups[8] or ''), +- groups[8] and '\n' or '', + ) + elif groups[9]: +- return keep(keeper, groups[9]) + '\n' +- elif groups[10] or groups[11] or groups[12]: +- return keep(keeper, groups[10] or groups[11] or groups[12]) or ' ' ++ return "%s%s%s%s%s" % ( ++ keep(keeper, groups[7]), ++ groups[8] and '\n' or '', ++ groups[9], ++ keep(keeper, groups[10] or ''), ++ groups[10] and '\n' or '', ++ ) ++ elif groups[11]: ++ return keep(keeper, groups[11]) + '\n' ++ elif groups[12] or groups[13] or groups[14]: ++ return keep(keeper, groups[12] or groups[13] or groups[14]) or ' ' + else: +- return keep(keeper, groups[13] or groups[14]) ++ return keep(keeper, groups[15] or groups[16]) ++ ++ banged = _ft.partial(space_sub_banged, space_subber_banged) ++ simple = _ft.partial(space_sub_simple, space_subber_simple) + + def jsmin(script, keep_bang_comments=False): + r""" +@@ -320,32 +345,51 @@ def _make_jsmin(python_only=False): + .. _jsmin.c by Douglas Crockford: + http://www.crockford.com/javascript/jsmin.c + +- :Parameters: +- `script` : ``str`` ++ Parameters: ++ script (str): + Script to minify + +- `keep_bang_comments` : ``bool`` ++ keep_bang_comments (bool): + Keep comments starting with an exclamation mark? (``/*!...*/``) + +- :Return: Minified script +- :Rtype: ``str`` ++ Returns: ++ str: Minified script + """ + # pylint: disable = redefined-outer-name + +- if keep_bang_comments: +- return space_sub_banged( +- space_subber_banged, '\n%s\n' % script +- ).strip() +- else: +- return space_sub_simple( +- space_subber_simple, '\n%s\n' % script +- ).strip() ++ is_bytes, script = _as_str(script) ++ script = (banged if keep_bang_comments else simple)( ++ '\n%s\n' % script ++ ).strip() ++ if is_bytes: ++ script = script.encode('latin-1') ++ if is_bytes == 2: ++ script = bytearray(script) ++ return script + + return jsmin + + jsmin = _make_jsmin() + + ++def _as_str(script): ++ """ Make sure the script is a text string """ ++ is_bytes = False ++ if str is bytes: ++ if not isinstance(script, basestring): # noqa pylint: disable = undefined-variable ++ raise TypeError("Unexpected type") ++ elif isinstance(script, bytes): ++ is_bytes = True ++ script = script.decode('latin-1') ++ elif isinstance(script, bytearray): ++ is_bytes = 2 ++ script = script.decode('latin-1') ++ elif not isinstance(script, str): ++ raise TypeError("Unexpected type") ++ ++ return is_bytes, script ++ ++ + def jsmin_for_posers(script, keep_bang_comments=False): + r""" + Minify javascript based on `jsmin.c by Douglas Crockford`_\. +@@ -361,49 +405,61 @@ def jsmin_for_posers(script, keep_bang_c + utilizes the resulting regexes. It's here for fun and may + vanish any time. Use the `jsmin` function instead. + +- :Parameters: +- `script` : ``str`` ++ Parameters: ++ script (str): + Script to minify + +- `keep_bang_comments` : ``bool`` ++ keep_bang_comments (bool): + Keep comments starting with an exclamation mark? (``/*!...*/``) + +- :Return: Minified script +- :Rtype: ``str`` ++ Returns: ++ str: Minified script + """ + if not keep_bang_comments: + rex = ( +- r'([^\047"/\000-\040]+)|((?:(?:\047[^\047\\\r\n]*(?:\\(?:[^\r\n]' +- r'|\r?\n|\r)[^\047\\\r\n]*)*\047)|(?:"[^"\\\r\n]*(?:\\(?:[^\r\n]' +- r'|\r?\n|\r)[^"\\\r\n]*)*"))[^\047"/\000-\040]*)|(?<=[(,=:\[!&|?' +- r'{};\r\n])(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*' +- r'][^*]*\*+)*/))*(?:(?:(?://[^\r\n]*)?[\r\n])(?:[\000-\011\013\0' +- r'14\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)*((?:/(?![\r' +- r'\n/*])[^/\\\[\r\n]*(?:(?:\\[^\r\n]|(?:\[[^\\\]\r\n]*(?:\\[^\r' +- r'\n][^\\\]\r\n]*)*\]))[^/\\\[\r\n]*)*/))((?:[\000-\011\013\014' ++ r'([^\047"\140/\000-\040]+)|((?:(?:\047[^\047\\\r\n]*(?:\\(?:[^' ++ r'\r\n]|\r?\n|\r)[^\047\\\r\n]*)*\047)|(?:"[^"\\\r\n]*(?:\\(?:[^' ++ r'\r\n]|\r?\n|\r)[^"\\\r\n]*)*")|(?:\140[^\140\\]*(?:\\(?:[^\r\n' ++ r']|\r?\n|\r)[^\140\\]*)*\140))[^\047"\140/\000-\040]*)|(?<=[)])' ++ r'(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+' ++ r')*/))*(?:(?:(?://[^\r\n]*)?[\r\n])(?:[\000-\011\013\014\016-\0' ++ r'40]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)*((?:/(?![\r\n/*])[^/' ++ r'\\\[\r\n]*(?:(?:\\[^\r\n]|(?:\[[^\\\]\r\n]*(?:\\[^\r\n][^\\\]' ++ r'\r\n]*)*\]))[^/\\\[\r\n]*)*/[a-z]*))(?=(?:[\000-\011\013\014\0' ++ r'16-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?:(?:(?://[^\r\n' ++ r']*)?[\r\n])(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^' ++ r'/*][^*]*\*+)*/))*)*\.(?:[\000-\011\013\014\016-\040]|(?:/\*[^*' ++ r']*\*+(?:[^/*][^*]*\*+)*/))*(?:(?:(?://[^\r\n]*)?[\r\n])(?:[\00' ++ r'0-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)' ++ r'*[a-z])|(?<=[(,=:\[!&|?{};\r\n+*-])(?:[\000-\011\013\014\016-' ++ r'\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?:(?:(?://[^\r\n]*)' ++ r'?[\r\n])(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*]' ++ r'[^*]*\*+)*/))*)*((?:/(?![\r\n/*])[^/\\\[\r\n]*(?:(?:\\[^\r\n]|' ++ r'(?:\[[^\\\]\r\n]*(?:\\[^\r\n][^\\\]\r\n]*)*\]))[^/\\\[\r\n]*)*' ++ r'/[a-z]*))((?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/' ++ r'*][^*]*\*+)*/))*(?:(?:(?://[^\r\n]*)?[\r\n])(?:[\000-\011\013' ++ r'\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)+(?=[^\000' ++ r'-\040&)+,.:;=?\]|}-]))?|(?<=[\000-#%-,./:-@\[-^\140{-~-]return' ++ r')(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*' ++ r'+)*/))*(?:((?:(?://[^\r\n]*)?[\r\n]))(?:[\000-\011\013\014\016' ++ r'-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)*((?:/(?![\r\n/*])' ++ r'[^/\\\[\r\n]*(?:(?:\\[^\r\n]|(?:\[[^\\\]\r\n]*(?:\\[^\r\n][^' ++ r'\\\]\r\n]*)*\]))[^/\\\[\r\n]*)*/[a-z]*))((?:[\000-\011\013\014' + r'\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?:(?:(?://[^\r' + r'\n]*)?[\r\n])(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:' +- r'[^/*][^*]*\*+)*/))*)+(?=[^\000-\040&)+,.:;=?\]|}-]))?|(?<=[\00' +- r'0-#%-,./:-@\[-^`{-~-]return)(?:[\000-\011\013\014\016-\040]|(?' +- r':/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?:((?:(?://[^\r\n]*)?[\r\n]' +- r'))(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*' +- r'\*+)*/))*)*((?:/(?![\r\n/*])[^/\\\[\r\n]*(?:(?:\\[^\r\n]|(?:\[' +- r'[^\\\]\r\n]*(?:\\[^\r\n][^\\\]\r\n]*)*\]))[^/\\\[\r\n]*)*/))((' +- r'?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)' +- r'*/))*(?:(?:(?://[^\r\n]*)?[\r\n])(?:[\000-\011\013\014\016-\04' +- r'0]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)+(?=[^\000-\040&)+,.:;' +- r'=?\]|}-]))?|(?<=[^\000-!#%&(*,./:-@\[\\^`{|~])(?:[\000-\011\01' +- r'3\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?:((?:(?:' +- r'//[^\r\n]*)?[\r\n]))(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]' +- r'*\*+(?:[^/*][^*]*\*+)*/))*)+(?=[^\000-\040"#%-\047)*,./:-@\\-^' +- r'`|-~])|(?<=[^\000-#%-,./:-@\[-^`{-~-])((?:[\000-\011\013\014\0' +- r'16-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/)))+(?=[^\000-#%-,./' +- r':-@\[-^`{-~-])|(?<=\+)((?:[\000-\011\013\014\016-\040]|(?:/\*[' +- r'^*]*\*+(?:[^/*][^*]*\*+)*/)))+(?=\+)|(?<=-)((?:[\000-\011\013' +- r'\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/)))+(?=-)|(?:[' +- r'\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/)' +- r')+|(?:(?:(?://[^\r\n]*)?[\r\n])(?:[\000-\011\013\014\016-\040]' +- r'|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)+' ++ r'[^/*][^*]*\*+)*/))*)+(?=[^\000-\040&)+,.:;=?\]|}-]))?|(?<=[^\0' ++ r'00-!#%&(*,./:-@\[\\^{|~])(?:[\000-\011\013\014\016-\040]|(?:/' ++ r'\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?:((?:(?://[^\r\n]*)?[\r\n]))' ++ r'(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+' ++ r')*/))*)+(?=[^\000-\040"#%-\047)*,./:-@\\-^\140|-~])|(?<=[^\000' ++ r'-#%-,./:-@\[-^\140{-~-])((?:[\000-\011\013\014\016-\040]|(?:/' ++ r'\*[^*]*\*+(?:[^/*][^*]*\*+)*/)))+(?=[^\000-#%-,./:-@\[-^\140{-' ++ r'~-])|(?<=\+)((?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:' ++ r'[^/*][^*]*\*+)*/)))+(?=\+)|(?<=-)((?:[\000-\011\013\014\016-\0' ++ r'40]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/)))+(?=-)|(?:[\000-\011\0' ++ r'13\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))+|(?:(?:(?' ++ r'://[^\r\n]*)?[\r\n])(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]' ++ r'*\*+(?:[^/*][^*]*\*+)*/))*)+' + ) + + def subber(match): +@@ -412,59 +468,72 @@ def jsmin_for_posers(script, keep_bang_c + return ( + groups[0] or + groups[1] or +- (groups[3] and (groups[2] + '\n')) or + groups[2] or +- (groups[5] and "%s%s%s" % ( +- groups[4] and '\n' or '', +- groups[5], +- groups[6] and '\n' or '', ++ (groups[4] and (groups[3] + '\n')) or ++ groups[3] or ++ (groups[6] and "%s%s%s" % ( ++ groups[5] and '\n' or '', ++ groups[6], ++ groups[7] and '\n' or '', + )) or +- (groups[7] and '\n') or +- (groups[8] and ' ') or ++ (groups[8] and '\n') or + (groups[9] and ' ') or + (groups[10] and ' ') or ++ (groups[11] and ' ') or + '' + ) + else: + rex = ( +- r'([^\047"/\000-\040]+)|((?:(?:\047[^\047\\\r\n]*(?:\\(?:[^\r\n]' +- r'|\r?\n|\r)[^\047\\\r\n]*)*\047)|(?:"[^"\\\r\n]*(?:\\(?:[^\r\n]' +- r'|\r?\n|\r)[^"\\\r\n]*)*"))[^\047"/\000-\040]*)|(?<=[(,=:\[!&|?' +- r'{};\r\n])((?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/' +- r'*][^*]*\*+)*/))*(?:(?:(?://[^\r\n]*)?[\r\n])(?:[\000-\011\013' +- r'\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)*)((?:/(?!' +- r'[\r\n/*])[^/\\\[\r\n]*(?:(?:\\[^\r\n]|(?:\[[^\\\]\r\n]*(?:\\[^' +- r'\r\n][^\\\]\r\n]*)*\]))[^/\\\[\r\n]*)*/))((?:[\000-\011\013\01' +- r'4\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?:(?:(?://[^' ++ r'([^\047"\140/\000-\040]+)|((?:(?:\047[^\047\\\r\n]*(?:\\(?:[^' ++ r'\r\n]|\r?\n|\r)[^\047\\\r\n]*)*\047)|(?:"[^"\\\r\n]*(?:\\(?:[^' ++ r'\r\n]|\r?\n|\r)[^"\\\r\n]*)*")|(?:\140[^\140\\]*(?:\\(?:[^\r\n' ++ r']|\r?\n|\r)[^\140\\]*)*\140))[^\047"\140/\000-\040]*)|(?<=[)])' ++ r'((?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*' ++ r'+)*/))*(?:(?:(?://[^\r\n]*)?[\r\n])(?:[\000-\011\013\014\016-' ++ r'\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)*)((?:/(?![\r\n/*])' ++ r'[^/\\\[\r\n]*(?:(?:\\[^\r\n]|(?:\[[^\\\]\r\n]*(?:\\[^\r\n][^' ++ r'\\\]\r\n]*)*\]))[^/\\\[\r\n]*)*/[a-z]*))(?=(?:[\000-\011\013\0' ++ r'14\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?:(?:(?://[^' + r'\r\n]*)?[\r\n])(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(' +- r'?:[^/*][^*]*\*+)*/))*)+(?=[^\000-\040&)+,.:;=?\]|}-]))?|(?<=[' +- r'\000-#%-,./:-@\[-^`{-~-]return)((?:[\000-\011\013\014\016-\040' +- r']|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?:((?:(?://[^\r\n]*)?[' +- r'\r\n]))(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][' +- r'^*]*\*+)*/))*)*)((?:/(?![\r\n/*])[^/\\\[\r\n]*(?:(?:\\[^\r\n]|' +- r'(?:\[[^\\\]\r\n]*(?:\\[^\r\n][^\\\]\r\n]*)*\]))[^/\\\[\r\n]*)*' +- r'/))((?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]' +- r'*\*+)*/))*(?:(?:(?://[^\r\n]*)?[\r\n])(?:[\000-\011\013\014\01' +- r'6-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)+(?=[^\000-\040&)' +- r'+,.:;=?\]|}-]))?|(?<=[^\000-!#%&(*,./:-@\[\\^`{|~])((?:[\000-' +- r'\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?:' +- r'(?:(?://[^\r\n]*)?[\r\n])(?:[\000-\011\013\014\016-\040]|(?:/' +- r'\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)+)(?=[^\000-\040"#%-\047)*,./' +- r':-@\\-^`|-~])|(?<=[^\000-#%-,./:-@\[-^`{-~-])((?:[\000-\011\01' +- r'3\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))+)(?=[^\000' +- r'-#%-,./:-@\[-^`{-~-])|(?<=\+)((?:[\000-\011\013\014\016-\040]|' +- r'(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))+)(?=\+)|(?<=-)((?:[\000-\0' +- r'11\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))+)(?=-' +- r')|((?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*' +- r'\*+)*/))+)|((?:(?:(?://[^\r\n]*)?[\r\n])(?:[\000-\011\013\014' +- r'\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)+)' ++ r'?:[^/*][^*]*\*+)*/))*)*\.(?:[\000-\011\013\014\016-\040]|(?:/' ++ r'\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?:(?:(?://[^\r\n]*)?[\r\n])(?' ++ r':[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*' ++ r'/))*)*[a-z])|(?<=[(,=:\[!&|?{};\r\n+*-])((?:[\000-\011\013\014' ++ r'\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?:(?:(?://[^\r' ++ r'\n]*)?[\r\n])(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:' ++ r'[^/*][^*]*\*+)*/))*)*)((?:/(?![\r\n/*])[^/\\\[\r\n]*(?:(?:\\[^' ++ r'\r\n]|(?:\[[^\\\]\r\n]*(?:\\[^\r\n][^\\\]\r\n]*)*\]))[^/\\\[\r' ++ r'\n]*)*/[a-z]*))((?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+' ++ r'(?:[^/*][^*]*\*+)*/))*(?:(?:(?://[^\r\n]*)?[\r\n])(?:[\000-\01' ++ r'1\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)+(?=[' ++ r'^\000-\040&)+,.:;=?\]|}-]))?|(?<=[\000-#%-,./:-@\[-^\140{-~-]r' ++ r'eturn)((?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][' ++ r'^*]*\*+)*/))*(?:((?:(?://[^\r\n]*)?[\r\n]))(?:[\000-\011\013\0' ++ r'14\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)*)((?:/(?![' ++ r'\r\n/*])[^/\\\[\r\n]*(?:(?:\\[^\r\n]|(?:\[[^\\\]\r\n]*(?:\\[^' ++ r'\r\n][^\\\]\r\n]*)*\]))[^/\\\[\r\n]*)*/[a-z]*))((?:[\000-\011' ++ r'\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?:(?:(' ++ r'?://[^\r\n]*)?[\r\n])(?:[\000-\011\013\014\016-\040]|(?:/\*[^*' ++ r']*\*+(?:[^/*][^*]*\*+)*/))*)+(?=[^\000-\040&)+,.:;=?\]|}-]))?|' ++ r'(?<=[^\000-!#%&(*,./:-@\[\\^{|~])((?:[\000-\011\013\014\016-\0' ++ r'40]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?:(?:(?://[^\r\n]*)?[' ++ r'\r\n])(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^' ++ r'*]*\*+)*/))*)+)(?=[^\000-\040"#%-\047)*,./:-@\\-^\140|-~])|(?<' ++ r'=[^\000-#%-,./:-@\[-^\140{-~-])((?:[\000-\011\013\014\016-\040' ++ r']|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))+)(?=[^\000-#%-,./:-@\[-^' ++ r'\140{-~-])|(?<=\+)((?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*' ++ r'\*+(?:[^/*][^*]*\*+)*/))+)(?=\+)|(?<=-)((?:[\000-\011\013\014' ++ r'\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))+)(?=-)|((?:[\00' ++ r'0-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))+)' ++ r'|((?:(?:(?://[^\r\n]*)?[\r\n])(?:[\000-\011\013\014\016-\040]|' ++ r'(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)+)' + ) + +- keep = _re.compile(( ++ keep = _re.compile( + r'[\000-\011\013\014\016-\040]+|(?:/\*(?!!)[^*]*\*+(?:[^/*][^*]*' + r'\*+)*/)+|(?:(?://[^\r\n]*)?[\r\n])+|((?:/\*![^*]*\*+(?:[^/*][^' + r'*]*\*+)*/)+)' +- ) % locals()).sub ++ ).sub + keeper = lambda m: m.groups()[0] or '' + + def subber(match): +@@ -473,27 +542,37 @@ def jsmin_for_posers(script, keep_bang_c + return ( + groups[0] or + groups[1] or +- (groups[3] and "%s%s%s%s" % ( ++ groups[3] and "%s%s" % ( + keep(keeper, groups[2]), + groups[3], +- keep(keeper, groups[4] or ''), +- groups[4] and '\n' or '', +- )) or +- (groups[7] and "%s%s%s%s%s" % ( +- keep(keeper, groups[5]), ++ ) or ++ groups[5] and "%s%s%s%s" % ( ++ keep(keeper, groups[4]), ++ groups[5], ++ keep(keeper, groups[6] or ''), + groups[6] and '\n' or '', +- groups[7], +- keep(keeper, groups[8] or ''), ++ ) or ++ groups[9] and "%s%s%s%s%s" % ( ++ keep(keeper, groups[7]), + groups[8] and '\n' or '', +- )) or +- (groups[9] and keep(keeper, groups[9] + '\n')) or +- (groups[10] and keep(keeper, groups[10]) or ' ') or +- (groups[11] and keep(keeper, groups[11]) or ' ') or +- (groups[12] and keep(keeper, groups[12]) or ' ') or +- keep(keeper, groups[13] or groups[14]) ++ groups[9], ++ keep(keeper, groups[10] or ''), ++ groups[10] and '\n' or '', ++ ) or ++ groups[11] and (keep(keeper, groups[11]) + '\n') or ++ groups[12] and (keep(keeper, groups[12]) or ' ') or ++ groups[13] and (keep(keeper, groups[13]) or ' ') or ++ groups[14] and (keep(keeper, groups[14]) or ' ') or ++ keep(keeper, groups[15] or groups[16]) + ) + +- return _re.sub(rex, subber, '\n%s\n' % script).strip() ++ is_bytes, script = _as_str(script) ++ script = _re.sub(rex, subber, '\n%s\n' % script).strip() ++ if is_bytes: ++ script = script.encode('latin-1') ++ if is_bytes == 2: ++ script = bytearray(script) ++ return script + + + if __name__ == '__main__': +diff -up chromium-103.0.5060.53/third_party/catapult/common/py_vulcanize/third_party/rjsmin/setup.py.12 chromium-103.0.5060.53/third_party/catapult/common/py_vulcanize/third_party/rjsmin/setup.py +--- chromium-103.0.5060.53/third_party/catapult/common/py_vulcanize/third_party/rjsmin/setup.py.12 2022-06-28 12:50:10.171324444 +0000 ++++ chromium-103.0.5060.53/third_party/catapult/common/py_vulcanize/third_party/rjsmin/setup.py 2021-11-05 17:03:12.000000000 +0000 +@@ -1,41 +1,264 @@ + #!/usr/bin/env python + # -*- coding: ascii -*- +-# +-# Copyright 2006 - 2013 +-# Andr\xe9 Malo or his licensors, as applicable +-# +-# Licensed under the Apache License, Version 2.0 (the "License"); +-# you may not use this file except in compliance with the License. +-# You may obtain a copy of the License at +-# +-# http://www.apache.org/licenses/LICENSE-2.0 +-# +-# Unless required by applicable law or agreed to in writing, software +-# distributed under the License is distributed on an "AS IS" BASIS, +-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-# See the License for the specific language governing permissions and +-# limitations under the License. ++u""" ++:Copyright: + ++ Copyright 2011 - 2021 ++ Andr\xe9 Malo or his licensors, as applicable ++ ++:License: ++ ++ Licensed under the Apache License, Version 2.0 (the "License"); ++ you may not use this file except in compliance with the License. ++ You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++ ++=========================================== ++ rJSmin - A Javascript Minifier For Python ++=========================================== ++ ++rJSmin - A Javascript Minifier For Python. ++""" ++from __future__ import print_function ++__author__ = u"Andr\xe9 Malo" ++__docformat__ = "restructuredtext en" ++ ++import os as _os ++import posixpath as _posixpath + import sys as _sys +-from _setup import run + ++# pylint: disable = no-name-in-module, import-error, raise-missing-from ++import setuptools as _setuptools ++ ++# pylint: disable = invalid-name ++ ++ ++def _doc(filename): ++ """ Read docs file """ ++ # pylint: disable = unspecified-encoding ++ args = {} if str is bytes else dict(encoding='utf-8') ++ try: ++ with open(_os.path.join('docs', filename), **args) as fp: ++ return fp.read() ++ except IOError: ++ return None ++ ++ ++def _lines(multiline): ++ """ Split multiline string into single line % empty and comments """ ++ return [line for line in ( ++ line.strip() for line in multiline.splitlines(False) ++ ) if line and not line.startswith('#')] ++ ++ ++package = dict( ++ name='rjsmin', ++ top='.', ++ pathname='.', ++ provides=_doc('PROVIDES'), ++ desc=_doc('SUMMARY').strip(), ++ longdesc=_doc('DESCRIPTION'), ++ author=__author__, ++ email='nd@perlig.de', ++ license="Apache License, Version 2.0", ++ keywords=_lines(_doc('KEYWORDS')), ++ url='http://opensource.perlig.de/rjsmin/', ++ classifiers=_lines(_doc('CLASSIFIERS') or ''), ++ ++ packages=False, ++ py_modules=['rjsmin'], ++ version_file='rjsmin.py', ++ install_requires=[], ++) ++ ++ ++class BuildFailed(Exception): ++ """ The build has failed """ ++ ++ ++from distutils.command import build_ext as _build_ext # pylint: disable = wrong-import-order ++from distutils import errors as _errors # pylint: disable = wrong-import-order ++class build_ext(_build_ext.build_ext): # pylint: disable = no-init ++ """ Improved extension building code """ ++ ++ def run(self): ++ """ Unify exception """ ++ try: ++ _build_ext.build_ext.run(self) ++ except _errors.DistutilsPlatformError: ++ raise BuildFailed() ++ ++ ++ def build_extension(self, ext): ++ """ ++ Build C extension - with extended functionality + +-def setup(args=None, _manifest=0): +- """ Main setup function """ +- from _setup.ext import Extension ++ The following features are added here: + +- if 'java' in _sys.platform.lower(): +- # no c extension for jython +- ext = None ++ - The macros ``EXT_PACKAGE`` and ``EXT_MODULE`` will be filled (or ++ unset) depending on the extensions name, but only if they are not ++ already defined. ++ ++ - "." is added to the include directories (for cext.h) ++ ++ :Parameters: ++ `ext` : `Extension` ++ The extension to build ++ ++ :Return: whatever ``distutils.command.build_ext.build_ext`` returns ++ :Rtype: any ++ """ ++ # handle name macros ++ macros = dict(ext.define_macros or ()) ++ tup = ext.name.split('.') ++ if len(tup) == 1: ++ pkg, mod = None, tup[0] ++ else: ++ pkg, mod = '.'.join(tup[:-1]), tup[-1] ++ if pkg is not None and 'EXT_PACKAGE' not in macros: ++ ext.define_macros.append(('EXT_PACKAGE', pkg)) ++ if 'EXT_MODULE' not in macros: ++ ext.define_macros.append(('EXT_MODULE', mod)) ++ if pkg is None: ++ macros = dict(ext.undef_macros or ()) ++ if 'EXT_PACKAGE' not in macros: ++ ext.undef_macros.append('EXT_PACKAGE') ++ ++ import pprint; pprint.pprint(ext.__dict__) ++ try: ++ return _build_ext.build_ext.build_extension(self, ext) ++ except (_errors.CCompilerError, _errors.DistutilsExecError, ++ _errors.DistutilsPlatformError, IOError, ValueError): ++ raise BuildFailed() ++ ++ ++class Extension(_setuptools.Extension): ++ """ improved functionality """ ++ ++ def __init__(self, *args, **kwargs): ++ """ Initialization """ ++ version = kwargs.pop('version') ++ self.depends = [] ++ if 'depends' in kwargs: ++ self.depends = kwargs['depends'] ++ _setuptools.Extension.__init__(self, *args, **kwargs) ++ self.define_macros.append(('EXT_VERSION', version)) ++ ++ # add include path ++ included = '.' ++ if included not in self.include_dirs: ++ self.include_dirs.append(included) ++ ++ # add cext.h to the dependencies ++ cext_h = _posixpath.normpath(_posixpath.join(included, 'cext.h')) ++ for item in self.depends: ++ if _posixpath.normpath(item) == cext_h: ++ break ++ else: ++ self.depends.append(cext_h) ++ ++ ++EXTENSIONS = lambda v: [Extension('_rjsmin', ["rjsmin.c"], version=v)] ++ ++ ++def do_setup(cext): ++ """ Main """ ++ # pylint: disable = too-many-branches ++ # pylint: disable = unspecified-encoding ++ ++ args = {} if str is bytes else dict(encoding='utf-8') ++ version_file = '%s/%s' % (package['pathname'], ++ package.get('version_file', '__init__.py')) ++ with open(version_file, **args) as fp: ++ for line in fp: # pylint: disable = redefined-outer-name ++ if line.startswith('__version__'): ++ version = line.split('=', 1)[1].strip() ++ if version.startswith(("'", '"')): ++ version = version[1:-1].strip() ++ break ++ else: ++ raise RuntimeError("Version not found") ++ ++ kwargs = {} ++ ++ if not cext or 'java' in _sys.platform.lower(): ++ extensions = [] + else: +- ext=[Extension('_rjsmin', sources=['rjsmin.c'])] ++ extensions = EXTENSIONS(version) ++ ++ if extensions: ++ if 'build_ext' in globals(): ++ kwargs.setdefault('cmdclass', {})['build_ext'] = build_ext ++ kwargs['ext_modules'] = extensions ++ ++ cflags = None ++ if _os.environ.get('CFLAGS') is None: ++ from distutils import ccompiler as _ccompiler ++ ++ compiler = _ccompiler.get_default_compiler() ++ try: ++ with open("debug.%s.cflags" % compiler) as fp: ++ cflags = ' '.join([ ++ line for line in (line.strip() for line in fp) ++ if line and not line.startswith('#') ++ ]).split() or None ++ except IOError: ++ pass ++ ++ if cflags: ++ gcov = 'coverage' in ' '.join(cflags) ++ for ext in extensions: ++ # pylint: disable = attribute-defined-outside-init ++ ext.extra_compile_args = \ ++ getattr(ext, 'extra_compile_args', []) + cflags ++ if gcov: ++ ext.libraries.append('gcov') ++ ++ ++ if package.get('packages', True): ++ kwargs['packages'] = [package['top']] + [ ++ '%s.%s' % (package['top'], item) ++ for item in ++ _setuptools.find_packages(package['pathname']) ++ ] ++ if package.get('py_modules'): ++ kwargs['py_modules'] = package['py_modules'] + +- return run(script_args=args, ext=ext, manifest_only=_manifest) ++ _setuptools.setup( ++ name=package['name'], ++ author=package['author'], ++ author_email=package['email'], ++ license=package['license'], ++ classifiers=package['classifiers'], ++ description=package['desc'], ++ long_description=package['longdesc'], ++ url=package['url'], ++ install_requires=package['install_requires'], ++ version=version, ++ zip_safe=False, ++ **kwargs ++ ) + + +-def manifest(): +- """ Create List of packaged files """ +- return setup((), _manifest=1) ++def setup(): ++ """ Run setup """ ++ try: ++ do_setup(True) ++ except BuildFailed: ++ env = 'SETUP_CEXT_REQUIRED' ++ if _os.environ.get(env, '') not in ('', '0'): ++ raise ++ print("C extension build failed - building python only version now. " ++ "Set '%s' environment variable to '1' to make it fail." ++ % (env,), file=_sys.stderr) ++ do_setup(False) + + + if __name__ == '__main__': diff --git a/chromium-105.0.5195.52-python-six-1.16.0.patch b/chromium-105.0.5195.52-python-six-1.16.0.patch new file mode 100644 index 0000000..ece7e22 --- /dev/null +++ b/chromium-105.0.5195.52-python-six-1.16.0.patch @@ -0,0 +1,50 @@ +diff --git a/third_party/catapult/third_party/six/six.py b/third_party/catapult/third_party/six/six.py +index 83f69783d1..4e15675d8b 100644 +--- a/third_party/catapult/third_party/six/six.py ++++ b/third_party/catapult/third_party/six/six.py +@@ -29,7 +29,7 @@ import sys + import types + + __author__ = "Benjamin Peterson <benjamin@python.org>" +-__version__ = "1.15.0" ++__version__ = "1.16.0" + + + # Useful for very coarse version differentiation. +@@ -71,6 +71,11 @@ else: + MAXSIZE = int((1 << 63) - 1) + del X + ++if PY34: ++ from importlib.util import spec_from_loader ++else: ++ spec_from_loader = None ++ + + def _add_doc(func, doc): + """Add documentation to a function.""" +@@ -186,6 +191,11 @@ class _SixMetaPathImporter(object): + return self + return None + ++ def find_spec(self, fullname, path, target=None): ++ if fullname in self.known_modules: ++ return spec_from_loader(fullname, self) ++ return None ++ + def __get_module(self, fullname): + try: + return self.known_modules[fullname] +@@ -223,6 +233,12 @@ class _SixMetaPathImporter(object): + return None + get_source = get_code # same as get_code + ++ def create_module(self, spec): ++ return self.load_module(spec.name) ++ ++ def exec_module(self, module): ++ pass ++ + _importer = _SixMetaPathImporter(__name__) + + diff --git a/chromium-107-ffmpeg-5.x-duration.patch b/chromium-107-ffmpeg-5.x-duration.patch new file mode 100644 index 0000000..ee01cd9 --- /dev/null +++ b/chromium-107-ffmpeg-5.x-duration.patch @@ -0,0 +1,16 @@ +diff -up chromium-107.0.5304.121/media/filters/audio_file_reader.cc.me chromium-107.0.5304.121/media/filters/audio_file_reader.cc +--- chromium-107.0.5304.121/media/filters/audio_file_reader.cc.me 2022-12-17 08:27:12.204753071 +0100 ++++ chromium-107.0.5304.121/media/filters/audio_file_reader.cc 2022-12-17 08:28:40.908211808 +0100 +@@ -243,10 +243,10 @@ bool AudioFileReader::OnNewFrame( + // silence from being output. In the case where we are also discarding some + // portion of the packet (as indicated by a negative pts), we further want to + // adjust the duration downward by however much exists before zero. +- if (audio_codec_ == AudioCodec::kAAC && frame->duration) { ++ if (audio_codec_ == AudioCodec::kAAC && frame->pkt_duration) { + const base::TimeDelta pkt_duration = ConvertFromTimeBase( + glue_->format_context()->streams[stream_index_]->time_base, +- frame->duration + std::min(static_cast<int64_t>(0), frame->pts)); ++ frame->pkt_duration + std::min(static_cast<int64_t>(0), frame->pts)); + const base::TimeDelta frame_duration = + base::Seconds(frames_read / static_cast<double>(sample_rate_)); + diff --git a/chromium-107-proprietary-codecs.patch b/chromium-107-proprietary-codecs.patch new file mode 100644 index 0000000..94b95b6 --- /dev/null +++ b/chromium-107-proprietary-codecs.patch @@ -0,0 +1,16 @@ +diff -up chromium-107.0.5304.121/media/BUILD.gn.me chromium-107.0.5304.121/media/BUILD.gn +--- chromium-107.0.5304.121/media/BUILD.gn.me 2022-12-17 12:35:44.546779129 +0100 ++++ chromium-107.0.5304.121/media/BUILD.gn 2022-12-17 12:35:59.296047028 +0100 +@@ -64,12 +64,6 @@ buildflag_header("media_buildflags") { + } + } + +-if (proprietary_codecs && media_use_ffmpeg) { +- assert( +- ffmpeg_branding != "Chromium", +- "proprietary codecs and ffmpeg_branding set to Chromium are incompatible") +-} +- + # Common configuration for targets in the media directory; these must not be + # exported since things like USE_NEON and USE_CRAS have different meanings + # elsewhere in the code base. diff --git a/chromium-108-system-opus.patch b/chromium-108-system-opus.patch new file mode 100644 index 0000000..3c7d9f2 --- /dev/null +++ b/chromium-108-system-opus.patch @@ -0,0 +1,12 @@ +diff -up chromium-108.0.5359.124/media/audio/audio_opus_encoder.h.me chromium-108.0.5359.124/media/audio/audio_opus_encoder.h +--- chromium-108.0.5359.124/media/audio/audio_opus_encoder.h.me 2022-12-31 09:49:17.100277502 +0100 ++++ chromium-108.0.5359.124/media/audio/audio_opus_encoder.h 2022-12-31 09:49:57.101016710 +0100 +@@ -12,7 +12,7 @@ + #include "media/base/audio_converter.h" + #include "media/base/audio_encoder.h" + #include "media/base/audio_timestamp_helper.h" +-#include "third_party/opus/src/include/opus.h" ++#include <opus/opus.h> + + namespace media { + diff --git a/chromium-115-clang-warnings.patch b/chromium-115-clang-warnings.patch new file mode 100644 index 0000000..2bbd08f --- /dev/null +++ b/chromium-115-clang-warnings.patch @@ -0,0 +1,57 @@ +diff -up chromium-115.0.5790.98/sql/recover_module/cursor.h.me chromium-115.0.5790.98/sql/recover_module/cursor.h +--- chromium-115.0.5790.98/sql/recover_module/cursor.h.me 2023-07-21 20:13:43.587451992 +0200 ++++ chromium-115.0.5790.98/sql/recover_module/cursor.h 2023-07-21 20:16:24.989457148 +0200 +@@ -61,6 +61,10 @@ class VirtualCursor { + // The VirtualCursor instance that embeds a given SQLite virtual table cursor. + // + // |sqlite_cursor| must have been returned by VirtualTable::SqliteCursor(). ++#ifdef __GNUC__ ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Winvalid-offsetof" ++#endif + static inline VirtualCursor* FromSqliteCursor( + sqlite3_vtab_cursor* sqlite_cursor) { + VirtualCursor* result = reinterpret_cast<VirtualCursor*>( +@@ -69,6 +73,9 @@ class VirtualCursor { + CHECK_EQ(sqlite_cursor, &result->sqlite_cursor_); + return result; + } ++#ifdef __GNUC__ ++#pragma GCC diagnostic pop ++#endif + + // Seeks the cursor to the first readable row. Returns a SQLite status code. + int First(); +diff -up chromium-115.0.5790.98/third_party/angle/src/libANGLE/BlobCache.cpp.me chromium-115.0.5790.98/third_party/angle/src/libANGLE/BlobCache.cpp +--- chromium-115.0.5790.98/third_party/angle/src/libANGLE/BlobCache.cpp.me 2023-07-21 20:10:05.119385885 +0200 ++++ chromium-115.0.5790.98/third_party/angle/src/libANGLE/BlobCache.cpp 2023-07-21 20:10:14.386558331 +0200 +@@ -14,7 +14,6 @@ + #include "libANGLE/histogram_macros.h" + #include "platform/PlatformMethods.h" + +-#define USE_SYSTEM_ZLIB + #include "compression_utils_portable.h" + + namespace egl +diff -up chromium-115.0.5790.98/third_party/angle/src/libANGLE/MemoryProgramCache.cpp.me chromium-115.0.5790.98/third_party/angle/src/libANGLE/MemoryProgramCache.cpp +--- chromium-115.0.5790.98/third_party/angle/src/libANGLE/MemoryProgramCache.cpp.me 2023-07-21 20:10:36.864976619 +0200 ++++ chromium-115.0.5790.98/third_party/angle/src/libANGLE/MemoryProgramCache.cpp 2023-07-21 20:11:07.629549228 +0200 +@@ -8,7 +8,6 @@ + // layer to warm up the cache from disk. + + // Include zlib first, otherwise FAR gets defined elsewhere. +-#define USE_SYSTEM_ZLIB + #include "compression_utils_portable.h" + + #include "libANGLE/MemoryProgramCache.h" +diff -up chromium-115.0.5790.98/third_party/angle/src/libANGLE/renderer/vulkan/vk_internal_shaders_autogen.cpp.me chromium-115.0.5790.98/third_party/angle/src/libANGLE/renderer/vulkan/vk_internal_shaders_autogen.cpp +--- chromium-115.0.5790.98/third_party/angle/src/libANGLE/renderer/vulkan/vk_internal_shaders_autogen.cpp.me 2023-07-21 20:09:44.206996746 +0200 ++++ chromium-115.0.5790.98/third_party/angle/src/libANGLE/renderer/vulkan/vk_internal_shaders_autogen.cpp 2023-07-21 20:09:51.834138674 +0200 +@@ -10,7 +10,6 @@ + + #include "libANGLE/renderer/vulkan/vk_internal_shaders_autogen.h" + +-#define USE_SYSTEM_ZLIB + #include "compression_utils_portable.h" + + namespace rx diff --git a/chromium-115-compiler-SkColor4f.patch b/chromium-115-compiler-SkColor4f.patch new file mode 100644 index 0000000..7e17cb0 --- /dev/null +++ b/chromium-115-compiler-SkColor4f.patch @@ -0,0 +1,26 @@ +diff -up chromium-115.0.5790.40/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc.me chromium-115.0.5790.40/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc +--- chromium-115.0.5790.40/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc.me 2023-06-24 10:38:11.011511463 +0200 ++++ chromium-115.0.5790.40/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc 2023-06-24 13:07:35.865375884 +0200 +@@ -84,6 +84,7 @@ CanvasStyle::CanvasStyle(const CanvasSty + + void CanvasStyle::ApplyToFlags(cc::PaintFlags& flags, + float global_alpha) const { ++ SkColor4f custom_color = SkColor4f{0.0f, 0.0f, 0.0f, global_alpha}; + switch (type_) { + case kColor: + ApplyColorToFlags(flags, global_alpha); +@@ -91,12 +92,12 @@ void CanvasStyle::ApplyToFlags(cc::Paint + case kGradient: + GetCanvasGradient()->GetGradient()->ApplyToFlags(flags, SkMatrix::I(), + ImageDrawOptions()); +- flags.setColor(SkColor4f(0.0f, 0.0f, 0.0f, global_alpha)); ++ flags.setColor(custom_color); + break; + case kImagePattern: + GetCanvasPattern()->GetPattern()->ApplyToFlags( + flags, AffineTransformToSkMatrix(GetCanvasPattern()->GetTransform())); +- flags.setColor(SkColor4f(0.0f, 0.0f, 0.0f, global_alpha)); ++ flags.setColor(custom_color); + break; + default: + NOTREACHED(); diff --git a/chromium-115-initial_prefs-etc-path.patch b/chromium-115-initial_prefs-etc-path.patch new file mode 100644 index 0000000..b666b0c --- /dev/null +++ b/chromium-115-initial_prefs-etc-path.patch @@ -0,0 +1,16 @@ +diff -up chromium-115.0.5790.32/chrome/browser/first_run/first_run_internal_linux.cc.me chromium-115.0.5790.32/chrome/browser/first_run/first_run_internal_linux.cc +--- chromium-115.0.5790.32/chrome/browser/first_run/first_run_internal_linux.cc.me 2023-06-17 19:43:08.481952671 +0200 ++++ chromium-115.0.5790.32/chrome/browser/first_run/first_run_internal_linux.cc 2023-06-17 19:44:26.165349772 +0200 +@@ -20,10 +20,8 @@ bool IsOrganicFirstRun() { + + base::FilePath InitialPrefsPath() { + // The standard location of the initial prefs is next to the chrome binary. +- base::FilePath dir_exe; +- if (!base::PathService::Get(base::DIR_EXE, &dir_exe)) { +- return base::FilePath(); +- } ++ // ...but we patch it to use /etc/chromium ++ base::FilePath dir_exe = base::FilePath("/etc/chromium"); + + return installer::InitialPreferences::Path(dir_exe); + } diff --git a/chromium-116-system-brotli.patch b/chromium-116-system-brotli.patch new file mode 100644 index 0000000..b62b128 --- /dev/null +++ b/chromium-116-system-brotli.patch @@ -0,0 +1,38 @@ +diff -up chromium-116.0.5845.50/net/filter/brotli_source_stream.cc.system-brotli chromium-116.0.5845.50/net/filter/brotli_source_stream.cc +--- chromium-116.0.5845.50/net/filter/brotli_source_stream.cc.system-brotli 2023-07-30 13:06:06.284705823 +0200 ++++ chromium-116.0.5845.50/net/filter/brotli_source_stream.cc 2023-07-30 13:08:43.398218141 +0200 +@@ -12,8 +12,8 @@ + #include "base/memory/raw_ptr.h" + #include "base/metrics/histogram_macros.h" + #include "net/base/io_buffer.h" +-#include "third_party/brotli/include/brotli/decode.h" +-#include "third_party/brotli/include/brotli/shared_dictionary.h" ++#include <brotli/decode.h> ++#include <brotli/shared_dictionary.h> + + namespace net { + +diff -up chromium-116.0.5845.50/net/ssl/cert_compression.cc.system-brotli chromium-116.0.5845.50/net/ssl/cert_compression.cc +--- chromium-116.0.5845.50/net/ssl/cert_compression.cc.system-brotli 2023-07-26 17:43:01.000000000 +0200 ++++ chromium-116.0.5845.50/net/ssl/cert_compression.cc 2023-07-30 13:06:06.284705823 +0200 +@@ -9,7 +9,7 @@ + #include "third_party/boringssl/src/include/openssl/ssl.h" + + #if !defined(NET_DISABLE_BROTLI) +-#include "third_party/brotli/include/brotli/decode.h" ++#include <brotli/decode.h> + #endif + + namespace net { +diff -up chromium-116.0.5845.50/ui/base/resource/resource_bundle.cc.system-brotli chromium-116.0.5845.50/ui/base/resource/resource_bundle.cc +--- chromium-116.0.5845.50/ui/base/resource/resource_bundle.cc.system-brotli 2023-07-26 17:43:23.000000000 +0200 ++++ chromium-116.0.5845.50/ui/base/resource/resource_bundle.cc 2023-07-30 13:06:06.284705823 +0200 +@@ -32,7 +32,7 @@ + #include "net/filter/gzip_header.h" + #include "skia/ext/image_operations.h" + #include "third_party/abseil-cpp/absl/types/variant.h" +-#include "third_party/brotli/include/brotli/decode.h" ++#include <brotli/decode.h> + #include "third_party/skia/include/core/SkBitmap.h" + #include "third_party/skia/include/core/SkColor.h" + #include "third_party/zlib/google/compression_utils.h" diff --git a/chromium-117-mnemonic-error.patch b/chromium-117-mnemonic-error.patch new file mode 100644 index 0000000..455b3e5 --- /dev/null +++ b/chromium-117-mnemonic-error.patch @@ -0,0 +1,12 @@ +diff -up chromium-117.0.5938.48/third_party/blink/renderer/core/BUILD.gn.me chromium-117.0.5938.48/third_party/blink/renderer/core/BUILD.gn +--- chromium-117.0.5938.48/third_party/blink/renderer/core/BUILD.gn.me 2023-09-10 16:54:00.804385139 +0200 ++++ chromium-117.0.5938.48/third_party/blink/renderer/core/BUILD.gn 2023-09-10 16:54:13.540625077 +0200 +@@ -1694,8 +1694,6 @@ action_foreach("element_locator_test_pro + python_path_root = "${root_out_dir}/pyproto" + python_path_proto = "${python_path_root}/third_party/blink/renderer/core/lcp_critical_path_predictor" + +- mnemonic = "ELOC_PROTO" +- + source_dir = "lcp_critical_path_predictor/test_proto" + sources = rebase_path([ "lcp_image_id.asciipb" ], "", source_dir) + diff --git a/chromium-117-string-convert.patch b/chromium-117-string-convert.patch new file mode 100644 index 0000000..cb48e4b --- /dev/null +++ b/chromium-117-string-convert.patch @@ -0,0 +1,21 @@ +diff -up chromium-117.0.5938.62/net/dns/host_resolver_cache.cc.me chromium-117.0.5938.62/net/dns/host_resolver_cache.cc +diff -up chromium-117.0.5938.62/net/dns/host_resolver_cache.h.me chromium-117.0.5938.62/net/dns/host_resolver_cache.h +--- chromium-117.0.5938.62/net/dns/host_resolver_cache.h.me 2023-09-14 15:21:24.632965004 +0200 ++++ chromium-117.0.5938.62/net/dns/host_resolver_cache.h 2023-09-15 09:15:48.511300845 +0200 +@@ -143,12 +143,14 @@ class NET_EXPORT HostResolverCache final + } + + bool operator()(const Key& lhs, const KeyRef& rhs) const { ++ const std::string rhs_domain_name{rhs.domain_name}; + return std::tie(lhs.domain_name, lhs.network_anonymization_key) < +- std::tie(rhs.domain_name, *rhs.network_anonymization_key); ++ std::tie(rhs_domain_name, *rhs.network_anonymization_key); + } + + bool operator()(const KeyRef& lhs, const Key& rhs) const { +- return std::tie(lhs.domain_name, *lhs.network_anonymization_key) < ++ const std::string lhs_domain_name{lhs.domain_name}; ++ return std::tie(lhs_domain_name, *lhs.network_anonymization_key) < + std::tie(rhs.domain_name, rhs.network_anonymization_key); + } + }; diff --git a/chromium-117-system-zstd.patch b/chromium-117-system-zstd.patch new file mode 100644 index 0000000..0fcd3ef --- /dev/null +++ b/chromium-117-system-zstd.patch @@ -0,0 +1,46 @@ +From ae3ae3711784865bdc38bf119a6182a7b8dae91c Mon Sep 17 00:00:00 2001 +From: Matt Jolly <Matt.Jolly@footclan.ninja> +Date: Sun, 17 Sep 2023 16:51:42 +1000 +Subject: [PATCH] Add system-zstd + +--- a/build/linux/unbundle/replace_gn_files.py ++++ b/build/linux/unbundle/replace_gn_files.py +@@ -74,6 +74,7 @@ REPLACEMENTS = { + # + 'woff2': 'third_party/woff2/BUILD.gn', + 'zlib': 'third_party/zlib/BUILD.gn', ++ 'zstd': 'third_party/zstd/BUILD.gn', + } + + +--- /dev/null ++++ b/build/linux/unbundle/zstd.gn +@@ -0,0 +1,25 @@ ++import("//build/config/linux/pkg_config.gni") ++import("//build/shim_headers.gni") ++ ++pkg_config("system_zstd") { ++ packages = [ "libzstd" ] ++} ++ ++shim_headers("zstd_shim") { ++ root_path = "src/lib" ++ headers = [ ++ "zdict.h", ++ "zstd.h", ++ "zstd_errors.h", ++ ] ++} ++ ++source_set("zstd") { ++ deps = [ ":zstd_shim" ] ++ public_configs = [ ":system_zstd" ] ++} ++ ++source_set("decompress") { ++ deps = [ ":zstd_shim" ] ++ public_configs = [ ":system_zstd" ] ++} +-- +2.42.0 + diff --git a/chromium-117-typename.patch b/chromium-117-typename.patch new file mode 100644 index 0000000..d3b00e7 --- /dev/null +++ b/chromium-117-typename.patch @@ -0,0 +1,164 @@ +diff -up chromium-115.0.5790.24/chrome/browser/download/bubble/download_bubble_update_service.cc.me chromium-115.0.5790.24/chrome/browser/download/bubble/download_bubble_update_service.cc +--- chromium-115.0.5790.24/chrome/browser/download/bubble/download_bubble_update_service.cc.me 2023-06-17 14:50:56.342591702 +0200 ++++ chromium-115.0.5790.24/chrome/browser/download/bubble/download_bubble_update_service.cc 2023-06-17 14:57:48.024377375 +0200 +@@ -91,7 +91,7 @@ ItemSortKey GetSortKey(const Item& item) + // Helper to get an iterator to the last element in the cache. The cache + // must not be empty. + template <typename Item> +-SortedItems<Item>::const_iterator GetLastIter(const SortedItems<Item>& cache) { ++typename SortedItems<Item>::const_iterator GetLastIter(const SortedItems<Item>& cache) { + CHECK(!cache.empty()); + auto it = cache.end(); + return std::prev(it); +@@ -967,9 +967,9 @@ bool DownloadBubbleUpdateService::CacheM + } + + template <typename Id, typename Item> +-SortedItems<Item>::iterator ++typename SortedItems<Item>::iterator + DownloadBubbleUpdateService::CacheManager::RemoveItemFromCacheByIter( +- SortedItems<Item>::iterator iter, ++ typename SortedItems<Item>::iterator iter, + SortedItems<Item>& cache, + IterMap<Id, Item>& iter_map) { + CHECK(iter != cache.end()); +diff -up chromium-115.0.5790.32/components/optimization_guide/core/tflite_model_executor.h.me chromium-115.0.5790.32/components/optimization_guide/core/tflite_model_executor.h +--- chromium-115.0.5790.32/components/optimization_guide/core/tflite_model_executor.h.me 2023-06-18 21:52:53.515625237 +0200 ++++ chromium-115.0.5790.32/components/optimization_guide/core/tflite_model_executor.h 2023-06-18 21:53:06.881881293 +0200 +@@ -189,7 +189,7 @@ class TFLiteModelExecutor : public Model + void SendForBatchExecution( + BatchExecutionCallback callback_on_complete, + base::TimeTicks start_time, +- ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs) ++ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs) + override { + DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +diff -up chromium-115.0.5790.32/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc.me chromium-115.0.5790.32/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc +--- chromium-115.0.5790.32/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc.me 2023-06-19 10:03:32.319218678 +0200 ++++ chromium-115.0.5790.32/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc 2023-06-19 10:04:12.023942232 +0200 +@@ -169,7 +169,7 @@ class HTMLFastPathParser { + using Span = base::span<const Char>; + using USpan = base::span<const UChar>; + // 32 matches that used by HTMLToken::Attribute. +- typedef std::conditional<std::is_same_v<Char, UChar>, ++ typedef typename std::conditional<std::is_same_v<Char, UChar>, + UCharLiteralBuffer<32>, + LCharLiteralBuffer<32>>::type LiteralBufferType; + typedef UCharLiteralBuffer<32> UCharLiteralBufferType; +diff -up chromium-116.0.5845.50/content/public/browser/web_ui_browser_interface_broker_registry.h.me chromium-116.0.5845.50/content/public/browser/web_ui_browser_interface_broker_registry.h +--- chromium-116.0.5845.50/content/public/browser/web_ui_browser_interface_broker_registry.h.me 2023-08-02 16:18:30.380108125 +0200 ++++ chromium-116.0.5845.50/content/public/browser/web_ui_browser_interface_broker_registry.h 2023-08-02 16:20:59.660024578 +0200 +@@ -127,10 +127,10 @@ class CONTENT_EXPORT WebUIBrowserInterfa + // + // TODO(crbug.com/1407936): Point to WebUIJsBridge documentation. + template <typename ControllerType> +- JsBridgeTraits<ControllerType>::BinderInitializer& ForWebUIWithJsBridge() { ++ typename JsBridgeTraits<ControllerType>::BinderInitializer& ForWebUIWithJsBridge() { + using Traits = JsBridgeTraits<ControllerType>; +- using Interface = Traits::Interface; +- using JsBridgeBinderInitializer = Traits::BinderInitializer; ++ using Interface = typename Traits::Interface; ++ using JsBridgeBinderInitializer = typename Traits::BinderInitializer; + + // WebUIController::GetType() requires an instantiated WebUIController + // (because it's a virtual method and can't be static). Here we only have +diff -up chromium-116.0.5845.50/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h.me chromium-116.0.5845.50/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h +--- chromium-116.0.5845.50/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h.me 2023-08-02 20:41:23.984729462 +0200 ++++ chromium-116.0.5845.50/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h 2023-08-02 20:41:53.737583093 +0200 +@@ -270,8 +270,8 @@ class CORE_EXPORT ObjectPaintPropertiesS + NodeList& nodes, + NodeId node_id, + const ParentType& parent, +- NodeType::State&& state, +- const NodeType::AnimationState& animation_state = ++ typename NodeType::State&& state, ++ const typename NodeType::AnimationState& animation_state = + NodeType::AnimationState()) { + // First, check if we need to add a new node. + if (!nodes.HasField(node_id)) { +diff -up chromium-117.0.5938.62/components/optimization_guide/core/tflite_model_executor.h.me chromium-117.0.5938.62/components/optimization_guide/core/tflite_model_executor.h +--- chromium-117.0.5938.62/components/optimization_guide/core/tflite_model_executor.h.me 2023-09-15 10:22:51.889698402 +0200 ++++ chromium-117.0.5938.62/components/optimization_guide/core/tflite_model_executor.h 2023-09-15 10:28:26.702716224 +0200 +@@ -234,7 +234,7 @@ class TFLiteModelExecutor : public Model + // Starts the synchronous execution of the model. Returns model outputs. + // Model needs to be loaded. Synchronous calls do not load or unload model. + std::vector<absl::optional<OutputType>> SendForBatchExecutionSync( +- ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs) ++ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs) + override { + DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +@@ -389,7 +389,7 @@ class TFLiteModelExecutor : public Model + // executes it on the model execution thread. + void LoadModelFileAndBatchExecute( + BatchExecutionCallback callback_on_complete, +- ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs) { ++ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs) { + DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + +@@ -406,7 +406,7 @@ class TFLiteModelExecutor : public Model + + // Batch executes the loaded model for inputs. + void BatchExecuteLoadedModel( +- ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs, ++ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs, + std::vector<absl::optional<OutputType>>* outputs) { + DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +@@ -466,7 +466,7 @@ class TFLiteModelExecutor : public Model + // Unloads the model if needed. + void BatchExecuteLoadedModelAndRunCallback( + BatchExecutionCallback callback_on_complete, +- ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs, ++ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs, + ExecutionStatus execution_status) { + DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +diff -up chromium-117.0.5938.62/components/supervised_user/core/browser/proto_fetcher.cc.me chromium-117.0.5938.62/components/supervised_user/core/browser/proto_fetcher.cc +--- chromium-117.0.5938.62/components/supervised_user/core/browser/proto_fetcher.cc.me 2023-09-15 17:20:22.550657586 +0200 ++++ chromium-117.0.5938.62/components/supervised_user/core/browser/proto_fetcher.cc 2023-09-15 17:24:11.396716734 +0200 +@@ -399,7 +399,7 @@ class RetryingFetcherImpl final : public + RetryingFetcherImpl(const RetryingFetcherImpl&) = delete; + RetryingFetcherImpl& operator=(const RetryingFetcherImpl&) = delete; + +- void Start(ProtoFetcher<Response>::Callback callback) override { ++ void Start(typename ProtoFetcher<Response>::Callback callback) override { + callback_ = std::move(callback); + Retry(); + } +@@ -435,7 +435,7 @@ class RetryingFetcherImpl final : public + } + + // Client callback. +- ProtoFetcher<Response>::Callback callback_; ++ typename ProtoFetcher<Response>::Callback callback_; + + // Retry controls. + base::OneShotTimer timer_; +@@ -578,7 +578,7 @@ ParallelFetchManager<Request, Response>: + template <typename Request, typename Response> + void ParallelFetchManager<Request, Response>::Fetch( + const Request& request, +- Fetcher::Callback callback) { ++ typename Fetcher::Callback callback) { + CHECK(callback) << "Use base::DoNothing() instead of empty callback."; + KeyType key = requests_in_flight_.Add(MakeFetcher(request)); + requests_in_flight_.Lookup(key)->Start( +diff -up chromium-117.0.5938.62/components/supervised_user/core/browser/proto_fetcher.h.me chromium-117.0.5938.62/components/supervised_user/core/browser/proto_fetcher.h +--- chromium-117.0.5938.62/components/supervised_user/core/browser/proto_fetcher.h.me 2023-09-15 17:20:56.540460391 +0200 ++++ chromium-117.0.5938.62/components/supervised_user/core/browser/proto_fetcher.h 2023-09-15 17:22:18.246237817 +0200 +@@ -165,10 +165,10 @@ class ParallelFetchManager { + + // Starts the fetch. Underlying fetcher is stored internally, and will be + // cleaned up after finish or when this manager is destroyed. +- void Fetch(const Request& request, Fetcher::Callback callback); ++ void Fetch(const Request& request, typename Fetcher::Callback callback); + + private: +- using KeyType = base::IDMap<std::unique_ptr<Fetcher>>::KeyType; ++ using KeyType = typename base::IDMap<std::unique_ptr<Fetcher>>::KeyType; + + // Remove fetcher under key from requests_in_flight_. + void Remove(KeyType key); diff --git a/chromium-117-widevine-other-locations.patch b/chromium-117-widevine-other-locations.patch new file mode 100644 index 0000000..38f3a27 --- /dev/null +++ b/chromium-117-widevine-other-locations.patch @@ -0,0 +1,33 @@ +diff -up chromium-108.0.5359.124/chrome/common/chrome_paths.cc.widevine-other-locations chromium-108.0.5359.124/chrome/common/chrome_paths.cc +--- chromium-108.0.5359.124/chrome/common/chrome_paths.cc.widevine-other-locations 2023-01-02 11:10:03.951330305 +0100 ++++ chromium-108.0.5359.124/chrome/common/chrome_paths.cc 2023-01-02 13:42:26.781022150 +0100 +@@ -319,6 +319,16 @@ bool PathProvider(int key, base::FilePat + + #if BUILDFLAG(ENABLE_WIDEVINE) + case chrome::DIR_BUNDLED_WIDEVINE_CDM: ++ base::PathService::Get(base::DIR_HOME, &cur); ++ cur = cur.Append(FILE_PATH_LITERAL(".config/chromium/WidevineCdm")); ++ if (base::PathExists(cur)) { ++ break; ++ } ++ // Yes, this has an arch hardcoded in the path, but at this time, it is the only place to find libwidevinecdm.so ++ if (base::PathExists(base::FilePath(FILE_PATH_LITERAL("/opt/google/chrome/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so")))) { ++ cur = base::FilePath(FILE_PATH_LITERAL("/opt/google/chrome/WidevineCdm")); ++ break; ++ } + if (!GetComponentDirectory(&cur)) { + return false; + } + cur = cur.AppendASCII(kWidevineCdmBaseDirectory); +diff -up chromium-108.0.5359.124/third_party/widevine/cdm/BUILD.gn.widevine-other-locations chromium-108.0.5359.124/third_party/widevine/cdm/BUILD.gn +--- chromium-108.0.5359.124/third_party/widevine/cdm/BUILD.gn.widevine-other-locations 2023-01-02 11:10:45.953114153 +0100 ++++ chromium-108.0.5359.124/third_party/widevine/cdm/BUILD.gn 2023-01-02 11:10:45.953114153 +0100 +@@ -22,7 +22,7 @@ buildflag_header("buildflags") { + + flags = [ + "ENABLE_WIDEVINE=$enable_widevine", +- "BUNDLE_WIDEVINE_CDM=$bundle_widevine_cdm", ++ "BUNDLE_WIDEVINE_CDM=true", + "ENABLE_WIDEVINE_CDM_COMPONENT=$enable_widevine_cdm_component", + "ENABLE_MEDIA_FOUNDATION_WIDEVINE_CDM=$enable_media_foundation_widevine_cdm", + ] diff --git a/chromium-117-workaround_for_crash_on_BTI_capable_system.patch b/chromium-117-workaround_for_crash_on_BTI_capable_system.patch new file mode 100644 index 0000000..c0ff2ae --- /dev/null +++ b/chromium-117-workaround_for_crash_on_BTI_capable_system.patch @@ -0,0 +1,12 @@ +diff -up chromium-117.0.5938.132/build/config/arm.gni.me chromium-117.0.5938.132/build/config/arm.gni +--- chromium-117.0.5938.132/build/config/arm.gni.me 2023-09-29 15:37:18.281122162 +0200 ++++ chromium-117.0.5938.132/build/config/arm.gni 2023-09-29 15:38:24.855369796 +0200 +@@ -140,7 +140,7 @@ if (current_cpu == "arm" || v8_current_c + # target_cpu == "arm64" filters out some cases (e.g. the ChromeOS x64 + # MSAN build) where the target platform is x64, but V8 is configured to + # use the arm64 simulator. +- arm_control_flow_integrity = "standard" ++ arm_control_flow_integrity = "pac" + } + } + assert(arm_control_flow_integrity == "none" || diff --git a/chromium-118-arm64-memory_tagging.patch b/chromium-118-arm64-memory_tagging.patch new file mode 100644 index 0000000..463fb37 --- /dev/null +++ b/chromium-118-arm64-memory_tagging.patch @@ -0,0 +1,15 @@ +diff -up chromium-118.0.5993.32/base/allocator/partition_allocator/partition_alloc_config.h.me chromium-118.0.5993.32/base/allocator/partition_allocator/partition_alloc_config.h +--- chromium-118.0.5993.32/base/allocator/partition_allocator/partition_alloc_config.h.me 2023-10-03 20:25:01.282782425 +0200 ++++ chromium-118.0.5993.32/base/allocator/partition_allocator/partition_alloc_config.h 2023-10-03 20:25:27.151236664 +0200 +@@ -152,10 +152,7 @@ static_assert(sizeof(void*) != 8, ""); + (!BUILDFLAG(PUT_REF_COUNT_IN_PREVIOUS_SLOT) && \ + defined(ARCH_CPU_LITTLE_ENDIAN)) + +-#define PA_CONFIG_HAS_MEMORY_TAGGING() \ +- (defined(ARCH_CPU_ARM64) && defined(__clang__) && \ +- !defined(ADDRESS_SANITIZER) && \ +- (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID))) ++#define PA_CONFIG_HAS_MEMORY_TAGGING() 0 + + #if PA_CONFIG(HAS_MEMORY_TAGGING) + static_assert(sizeof(void*) == 8); diff --git a/chromium-118-dma_buf_export_sync_file-conflict.patch b/chromium-118-dma_buf_export_sync_file-conflict.patch new file mode 100644 index 0000000..fe2ee4c --- /dev/null +++ b/chromium-118-dma_buf_export_sync_file-conflict.patch @@ -0,0 +1,12 @@ +diff -up chromium-118.0.5993.32/ui/gfx/linux/dmabuf_uapi.h.me chromium-118.0.5993.32/ui/gfx/linux/dmabuf_uapi.h +--- chromium-118.0.5993.32/ui/gfx/linux/dmabuf_uapi.h.me 2023-10-04 22:18:44.259800011 +0200 ++++ chromium-118.0.5993.32/ui/gfx/linux/dmabuf_uapi.h 2023-10-04 22:28:17.068756669 +0200 +@@ -28,7 +28,7 @@ constexpr unsigned long DMA_BUF_IOCTL_SY + _IOW(DMA_BUF_BASE, 0, struct dma_buf_sync); + #endif + +-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) ++#if 0 + struct dma_buf_export_sync_file { + __u32 flags; + __s32 fd; diff --git a/chromium-118-python-3.12-deprecated.patch b/chromium-118-python-3.12-deprecated.patch new file mode 100644 index 0000000..5837ae5 --- /dev/null +++ b/chromium-118-python-3.12-deprecated.patch @@ -0,0 +1,138 @@ +diff -up chromium-115.0.5790.102/base/write_build_date_header.py.me chromium-115.0.5790.102/base/write_build_date_header.py +--- chromium-115.0.5790.102/base/write_build_date_header.py.me 2023-07-22 14:23:42.620679397 +0200 ++++ chromium-115.0.5790.102/base/write_build_date_header.py 2023-07-22 15:24:46.833310310 +0200 +@@ -17,7 +17,7 @@ def main(): + args = argument_parser.parse_args() + + date_val = int(args.timestamp) +- date = datetime.datetime.utcfromtimestamp(date_val) ++ date = datetime.datetime.fromtimestamp(date_val, datetime.timezone.utc) + output = ('// Generated by //base/write_build_date_header.py\n' + '#ifndef BASE_GENERATED_BUILD_DATE_TIMESTAMP \n' + f'#define BASE_GENERATED_BUILD_DATE_TIMESTAMP {date_val}' +diff -up chromium-115.0.5790.102/build/write_buildflag_header.py.me chromium-115.0.5790.102/build/write_buildflag_header.py +--- chromium-115.0.5790.102/build/write_buildflag_header.py.me 2023-07-22 14:16:14.196975451 +0200 ++++ chromium-115.0.5790.102/build/write_buildflag_header.py 2023-07-22 14:20:24.977239994 +0200 +@@ -44,7 +44,7 @@ def GetOptions(): + header_guard = cmdline_options.output.upper() + if header_guard[0].isdigit(): + header_guard = '_' + header_guard +- header_guard = re.sub('[^\w]', '_', header_guard) ++ header_guard = re.sub(r'[^\w]', '_', header_guard) + header_guard += '_' + + # The actual output file is inside the gen dir. +diff -up chromium-115.0.5790.102/components/resources/protobufs/binary_proto_generator.py.me chromium-115.0.5790.102/components/resources/protobufs/binary_proto_generator.py +--- chromium-115.0.5790.102/components/resources/protobufs/binary_proto_generator.py.me 2023-07-22 14:47:34.230764210 +0200 ++++ chromium-115.0.5790.102/components/resources/protobufs/binary_proto_generator.py 2023-07-22 15:11:50.360983383 +0200 +@@ -9,7 +9,8 @@ + """ + from __future__ import print_function + import abc +-import imp ++import types ++import importlib + import optparse + import os + import re +@@ -40,6 +41,12 @@ class GoogleProtobufModuleImporter: + return filepath + return None + ++ def load_source(name: str, path: str) -> types.ModuleType: ++ spec = importlib.util.spec_from_file_location(name, path) ++ module = importlib.util.module_from_spec(spec) ++ spec.loader.exec_module(module) ++ return module ++ + def _module_exists(self, fullname): + return self._fullname_to_filepath(fullname) is not None + +@@ -68,7 +75,7 @@ class GoogleProtobufModuleImporter: + raise ImportError(fullname) + + filepath = self._fullname_to_filepath(fullname) +- return imp.load_source(fullname, filepath) ++ return load_source(fullname, filepath) + + class BinaryProtoGenerator: + +diff -up chromium-115.0.5790.102/mojo/public/tools/bindings/concatenate_and_replace_closure_exports.py.me chromium-115.0.5790.102/mojo/public/tools/bindings/concatenate_and_replace_closure_exports.py +--- chromium-115.0.5790.102/mojo/public/tools/bindings/concatenate_and_replace_closure_exports.py.me 2023-07-22 15:17:19.114258801 +0200 ++++ chromium-115.0.5790.102/mojo/public/tools/bindings/concatenate_and_replace_closure_exports.py 2023-07-22 15:17:43.368200491 +0200 +@@ -32,7 +32,7 @@ def FilterLine(filename, line, output): + return + + if line.startswith("goog.provide"): +- match = re.match("goog.provide\('([^']+)'\);", line) ++ match = re.match(r"goog.provide\('([^']+)'\);", line) + if not match: + print("Invalid goog.provide line in %s:\n%s" % (filename, line)) + sys.exit(1) +diff -up chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/html_generation_controller.py.me chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/html_generation_controller.py +--- chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/html_generation_controller.py.me 2023-07-22 15:12:41.850895179 +0200 ++++ chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/html_generation_controller.py 2023-07-22 15:12:55.844871207 +0200 +@@ -18,7 +18,7 @@ class HTMLGenerationController(object): + + def GetHTMLForInlineStylesheet(self, contents): + if self.current_module is None: +- if re.search('url\(.+\)', contents): ++ if re.search(r'url\(.+\)', contents): + raise Exception( + 'Default HTMLGenerationController cannot handle inline style urls') + return contents +diff -up chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/js_utils.py.me chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/js_utils.py +--- chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/js_utils.py.me 2023-07-22 15:14:06.923717910 +0200 ++++ chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/js_utils.py 2023-07-22 15:18:03.704150614 +0200 +@@ -4,4 +4,4 @@ + + + def EscapeJSIfNeeded(js): +- return js.replace('</script>', '<\/script>') ++ return js.replace(r'</script>', r'<\/script>') +diff -up chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/parse_html_deps.py.me chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/parse_html_deps.py +--- chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/parse_html_deps.py.me 2023-07-22 15:14:30.105662532 +0200 ++++ chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/parse_html_deps.py 2023-07-22 15:14:57.977595950 +0200 +@@ -293,6 +293,6 @@ class HTMLModuleParser(): + html = '' + else: + if html.find('< /script>') != -1: +- raise Exception('Escape script tags with <\/script>') ++ raise Exception(r'Escape script tags with <\/script>') + + return HTMLModuleParserResults(html) +diff -up chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/style_sheet.py.me chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/style_sheet.py +--- chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/style_sheet.py.me 2023-07-22 15:13:12.316842990 +0200 ++++ chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/style_sheet.py 2023-07-22 15:13:49.684759091 +0200 +@@ -60,7 +60,7 @@ class ParsedStyleSheet(object): + return 'url(data:image/%s;base64,%s)' % (ext[1:], data.decode('utf-8')) + + # I'm assuming we only have url()'s associated with images +- return re.sub('url\((?P<quote>"|\'|)(?P<url>[^"\'()]*)(?P=quote)\)', ++ return re.sub(r'url\((?P<quote>"|\'|)(?P<url>[^"\'()]*)(?P=quote)\)', + InlineUrl, self.contents) + + def AppendDirectlyDependentFilenamesTo(self, dependent_filenames): +@@ -72,7 +72,7 @@ class ParsedStyleSheet(object): + raise Exception('@imports are not supported') + + matches = re.findall( +- 'url\((?:["|\']?)([^"\'()]*)(?:["|\']?)\)', ++ r'url\((?:["|\']?)([^"\'()]*)(?:["|\']?)\)', + self.contents) + + def resolve_url(url): +diff -up chromium-115.0.5790.102/third_party/dawn/generator/generator_lib.py.me chromium-115.0.5790.102/third_party/dawn/generator/generator_lib.py +--- chromium-115.0.5790.102/third_party/dawn/generator/generator_lib.py.me 2023-07-22 15:11:56.826972306 +0200 ++++ chromium-115.0.5790.102/third_party/dawn/generator/generator_lib.py 2023-07-22 15:12:37.550902545 +0200 +@@ -119,8 +119,8 @@ class _PreprocessingLoader(jinja2.BaseLo + source = self.preprocess(f.read()) + return source, path, lambda: mtime == os.path.getmtime(path) + +- blockstart = re.compile('{%-?\s*(if|elif|else|for|block|macro)[^}]*%}') +- blockend = re.compile('{%-?\s*(end(if|for|block|macro)|elif|else)[^}]*%}') ++ blockstart = re.compile(r'{%-?\s*(if|elif|else|for|block|macro)[^}]*%}') ++ blockend = re.compile(r'{%-?\s*(end(if|for|block|macro)|elif|else)[^}]*%}') + + def preprocess(self, source): + lines = source.split('\n') diff --git a/chromium-118-sigtrap_system_ffmpeg.patch b/chromium-118-sigtrap_system_ffmpeg.patch new file mode 100644 index 0000000..053e59e --- /dev/null +++ b/chromium-118-sigtrap_system_ffmpeg.patch @@ -0,0 +1,16 @@ +fix tab crash with SIGTRAP when opening website like ge.globo.com + +author: Than Ngo <than@redhat.com> + +diff -up chromium-118.0.5993.70/media/filters/ffmpeg_glue.cc.me chromium-118.0.5993.70/media/filters/ffmpeg_glue.cc +--- chromium-118.0.5993.70/media/filters/ffmpeg_glue.cc.me 2023-10-16 12:52:01.716573884 +0200 ++++ chromium-118.0.5993.70/media/filters/ffmpeg_glue.cc 2023-10-16 12:56:03.476075446 +0200 +@@ -157,7 +157,7 @@ bool FFmpegGlue::OpenContext(bool is_loc + container_ = container_names::MediaContainerName::kContainerAVI; + + // For a successfully opened file, we will get a container we've compiled in. +- CHECK_NE(container_, container_names::MediaContainerName::kContainerUnknown); ++ DCHECK_NE(container_, container_names::MediaContainerName::kContainerUnknown); + LogContainer(is_local_file, container_); + + return true; diff --git a/chromium-118-workaround_clang_bug-structured_binding.patch b/chromium-118-workaround_clang_bug-structured_binding.patch new file mode 100644 index 0000000..3b79f51 --- /dev/null +++ b/chromium-118-workaround_clang_bug-structured_binding.patch @@ -0,0 +1,96 @@ +diff -up chromium-115.0.5790.24/media/base/cdm_promise_adapter.cc.workaround_clang_bug-structured_binding chromium-115.0.5790.24/media/base/cdm_promise_adapter.cc +--- chromium-115.0.5790.24/media/base/cdm_promise_adapter.cc.workaround_clang_bug-structured_binding 2023-06-07 21:48:37.000000000 +0200 ++++ chromium-115.0.5790.24/media/base/cdm_promise_adapter.cc 2023-06-17 16:53:20.216628557 +0200 +@@ -94,7 +94,9 @@ void CdmPromiseAdapter::RejectPromise(ui + void CdmPromiseAdapter::Clear(ClearReason reason) { + // Reject all outstanding promises. + DCHECK(thread_checker_.CalledOnValidThread()); +- for (auto& [promise_id, promise] : promises_) { ++ for (auto& [p_i, p_e] : promises_) { ++ auto& promise_id = p_i; ++ auto& promise = p_e; + TRACE_EVENT_NESTABLE_ASYNC_END1( + "media", "CdmPromise", TRACE_ID_WITH_SCOPE("CdmPromise", promise_id), + "status", "cleared"); +diff -up chromium-115.0.5790.24/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc.workaround_clang_bug-structured_binding chromium-115.0.5790.24/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc +--- chromium-115.0.5790.24/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc.workaround_clang_bug-structured_binding 2023-06-07 21:48:41.000000000 +0200 ++++ chromium-115.0.5790.24/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc 2023-06-17 18:47:06.001403966 +0200 +@@ -655,8 +658,10 @@ NGGridSizingTree NGGridLayoutAlgorithm:: + NGGridSizingTree sizing_tree; + + if (const auto* layout_subtree = ConstraintSpace().GridLayoutSubtree()) { +- auto& [grid_items, layout_data, subtree_size] = +- sizing_tree.CreateSizingData(); ++ auto& [g_i, l_d, s_s] = sizing_tree.CreateSizingData(); ++ auto& grid_items = g_i; ++ auto& layout_data = l_d; ++ auto& subtree_size = s_s; + + const auto& node = Node(); + grid_items = +@@ -1798,8 +1803,10 @@ void NGGridLayoutAlgorithm::CompleteTrac + bool* opt_needs_additional_pass) const { + DCHECK(sizing_subtree); + +- auto& [grid_items, layout_data, subtree_size] = +- sizing_subtree.SubtreeRootData(); ++ auto& [g_i, l_d, s_s] = sizing_subtree.SubtreeRootData(); ++ auto& grid_items = g_i; ++ auto& layout_data = l_d; ++ auto& subtree_size = s_s; + + const bool is_for_columns = track_direction == kForColumns; + const bool has_non_definite_track = +@@ -1924,8 +1931,10 @@ template <typename CallbackFunc> + void NGGridLayoutAlgorithm::ForEachSubgrid( + const NGGridSizingSubtree& sizing_subtree, + const CallbackFunc& callback_func) const { +- auto& [grid_items, layout_data, subtree_size] = +- sizing_subtree.SubtreeRootData(); ++ auto& [g_i, l_d, s_s] = sizing_subtree.SubtreeRootData(); ++ auto& grid_items = g_i; ++ auto& layout_data = l_d; ++ auto& subtree_size = s_s; + + // If we know this subtree doesn't have nested subgrids we can exit early + // instead of iterating over every grid item looking for them. +diff -up chromium-115.0.5790.32/content/browser/service_worker/service_worker_context_wrapper.cc.me chromium-115.0.5790.32/content/browser/service_worker/service_worker_context_wrapper.cc +--- chromium-115.0.5790.32/content/browser/service_worker/service_worker_context_wrapper.cc.me 2023-06-19 08:04:02.287072722 +0200 ++++ chromium-115.0.5790.32/content/browser/service_worker/service_worker_context_wrapper.cc 2023-06-19 08:18:24.576814950 +0200 +@@ -1393,7 +1393,8 @@ void ServiceWorkerContextWrapper::MaybeP + return; + } + +- auto [document_url, key, callback] = std::move(*request); ++ auto [d_u, key, callback] = std::move(*request); ++ auto document_url = d_u; + + DCHECK(document_url.is_valid()); + TRACE_EVENT1("ServiceWorker", +diff -up chromium-117.0.5938.62/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc.me chromium-117.0.5938.62/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc +--- chromium-117.0.5938.62/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc.me 2023-09-15 13:03:00.787257048 +0200 ++++ chromium-117.0.5938.62/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc 2023-09-15 13:15:05.502706522 +0200 +@@ -3437,7 +3437,10 @@ void NGGridLayoutAlgorithm::PlaceGridIte + DCHECK(out_row_break_between); + + const auto& container_space = ConstraintSpace(); +- const auto& [grid_items, layout_data, tree_size] = sizing_tree.TreeRootData(); ++ const auto& [g_i, l_d, t_s] = sizing_tree.TreeRootData(); ++ const auto& grid_items = g_i; ++ const auto& layout_data = l_d; ++ const auto& tree_size = t_s; + + const auto* cached_layout_subtree = container_space.GridLayoutSubtree(); + const auto container_writing_direction = +@@ -3601,7 +3604,10 @@ void NGGridLayoutAlgorithm::PlaceGridIte + + // TODO(ikilpatrick): Update |SetHasSeenAllChildren| and early exit if true. + const auto& constraint_space = ConstraintSpace(); +- const auto& [grid_items, layout_data, tree_size] = sizing_tree.TreeRootData(); ++ const auto& [g_i, l_d, t_s] = sizing_tree.TreeRootData(); ++ const auto& grid_items = g_i; ++ const auto& layout_data = l_d; ++ const auto& tree_size =t_s; + + const auto* cached_layout_subtree = constraint_space.GridLayoutSubtree(); + const auto container_writing_direction = diff --git a/chromium-119-assert.patch b/chromium-119-assert.patch new file mode 100644 index 0000000..6c502f1 --- /dev/null +++ b/chromium-119-assert.patch @@ -0,0 +1,12 @@ +diff -up chromium-119.0.6045.59/v8/src/base/small-vector.h.than chromium-119.0.6045.59/v8/src/base/small-vector.h +--- chromium-119.0.6045.59/v8/src/base/small-vector.h.than 2023-11-01 16:13:12.645301345 +0100 ++++ chromium-119.0.6045.59/v8/src/base/small-vector.h 2023-11-01 16:13:29.660610182 +0100 +@@ -22,7 +22,7 @@ template <typename T, size_t kSize, type + class SmallVector { + // Currently only support trivially copyable and trivially destructible data + // types, as it uses memcpy to copy elements and never calls destructors. +- ASSERT_TRIVIALLY_COPYABLE(T); ++ //ASSERT_TRIVIALLY_COPYABLE(T); + static_assert(std::is_trivially_destructible<T>::value); + + public: diff --git a/chromium-119-constexpr.patch b/chromium-119-constexpr.patch new file mode 100644 index 0000000..b195ff4 --- /dev/null +++ b/chromium-119-constexpr.patch @@ -0,0 +1,12 @@ +diff -up chromium-119.0.6045.59/components/miracle_parameter/common/public/miracle_parameter.h.me chromium-119.0.6045.59/components/miracle_parameter/common/public/miracle_parameter.h +--- chromium-119.0.6045.59/components/miracle_parameter/common/public/miracle_parameter.h.me 2023-10-31 21:05:05.548565241 +0100 ++++ chromium-119.0.6045.59/components/miracle_parameter/common/public/miracle_parameter.h 2023-10-31 21:20:53.945532094 +0100 +@@ -93,7 +93,7 @@ class MiracleParameter { + template <> + class MiracleParameter<std::string> : public MiracleParameterBase<std::string> { + public: +- constexpr MiracleParameter(const base::Feature* feature, ++ MiracleParameter(const base::Feature* feature, + const char* param_name, + std::string default_value) + : MiracleParameterBase(feature, param_name, std::move(default_value)) {} diff --git a/chromium-119-disable-GlobalMediaControlsCastStartStop.patch b/chromium-119-disable-GlobalMediaControlsCastStartStop.patch new file mode 100644 index 0000000..2082095 --- /dev/null +++ b/chromium-119-disable-GlobalMediaControlsCastStartStop.patch @@ -0,0 +1,19 @@ +diff -up chromium-119.0.6045.105/chrome/browser/media/router/media_router_feature.cc.disable-GlobalMediaControlsCastStartStop chromium-119.0.6045.105/chrome/browser/media/router/media_router_feature.cc +--- chromium-119.0.6045.105/chrome/browser/media/router/media_router_feature.cc.disable-GlobalMediaControlsCastStartStop 2023-11-06 12:57:04.096696491 +0100 ++++ chromium-119.0.6045.105/chrome/browser/media/router/media_router_feature.cc 2023-11-06 13:00:30.480926343 +0100 +@@ -68,15 +68,9 @@ BASE_FEATURE(kCastMirroringPlayoutDelay, + base::FEATURE_DISABLED_BY_DEFAULT); + const base::FeatureParam<int> kCastMirroringPlayoutDelayMs{ + &kCastMirroringPlayoutDelay, "cast_mirroring_playout_delay_ms", -1}; +-#if BUILDFLAG(IS_CHROMEOS) + BASE_FEATURE(kGlobalMediaControlsCastStartStop, + "GlobalMediaControlsCastStartStop", + base::FEATURE_DISABLED_BY_DEFAULT); +-#else +-BASE_FEATURE(kGlobalMediaControlsCastStartStop, +- "GlobalMediaControlsCastStartStop", +- base::FEATURE_ENABLED_BY_DEFAULT); +-#endif // BUILDFLAG(IS_CHROMEOS) + #endif // !BUILDFLAG(IS_ANDROID) + + namespace { diff --git a/chromium-119-dont-redefine-ATSPI-version-macros.patch b/chromium-119-dont-redefine-ATSPI-version-macros.patch new file mode 100644 index 0000000..ab64c54 --- /dev/null +++ b/chromium-119-dont-redefine-ATSPI-version-macros.patch @@ -0,0 +1,50 @@ +commit fc09363b2278893790d131c72a4ed96ec9837624 +Author: Elly <ellyjones@chromium.org> +Date: Thu Sep 21 22:09:59 2023 +0000 + + a11y: don't redefine ATSPI version macros + + As of ATSPI 2.49.90, the library itself defines these, and if we + redefine them on the compiler command line, we get a build warning. + See: https://gitlab.gnome.org/GNOME/at-spi2-core/-/issues/129 + + Bug: None + Change-Id: I5cc655bd32c90d7af52c9dca60724f334c4a2a65 + Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4883576 + Auto-Submit: Elly FJ <ellyjones@chromium.org> + Reviewed-by: Thomas Anderson <thomasanderson@chromium.org> + Commit-Queue: Thomas Anderson <thomasanderson@chromium.org> + Cr-Commit-Position: refs/heads/main@{#1199870} + +diff --git a/build/config/linux/atspi2/BUILD.gn b/build/config/linux/atspi2/BUILD.gn +index 51b6d33aab3c2..d1629205c82a3 100644 +--- a/build/config/linux/atspi2/BUILD.gn ++++ b/build/config/linux/atspi2/BUILD.gn +@@ -17,13 +17,19 @@ if (use_atk) { + "--version-as-components", + ], + "value") +- atspi_major_version = atspi_version[0] +- atspi_minor_version = atspi_version[1] +- atspi_micro_version = atspi_version[2] +- defines = [ +- "ATSPI_MAJOR_VERSION=$atspi_major_version", +- "ATSPI_MINOR_VERSION=$atspi_minor_version", +- "ATSPI_MICRO_VERSION=$atspi_micro_version", +- ] ++ major = atspi_version[0] ++ minor = atspi_version[1] ++ micro = atspi_version[2] ++ ++ # ATSPI 2.49.90 now defines these for us and it's an error for us to ++ # redefine them on the compiler command line. ++ # See ATSPI 927344a34cd5bf81fc64da4968241735ecb4f03b ++ if (minor < 49 || (minor == 49 && micro < 90)) { ++ defines = [ ++ "ATSPI_MAJOR_VERSION=$major", ++ "ATSPI_MINOR_VERSION=$minor", ++ "ATSPI_MICRO_VERSION=$micro", ++ ] ++ } + } + } diff --git a/chromium-119-ffmpeg-first_dts.patch b/chromium-119-ffmpeg-first_dts.patch new file mode 100644 index 0000000..19cf84b --- /dev/null +++ b/chromium-119-ffmpeg-first_dts.patch @@ -0,0 +1,94 @@ +diff -up chromium-119.0.6045.105/media/filters/ffmpeg_demuxer.cc.first_dts chromium-119.0.6045.105/media/filters/ffmpeg_demuxer.cc +--- chromium-119.0.6045.105/media/filters/ffmpeg_demuxer.cc.first_dts 2023-11-01 19:10:31.000000000 +0100 ++++ chromium-119.0.6045.105/media/filters/ffmpeg_demuxer.cc 2023-11-06 13:05:09.819011697 +0100 +@@ -101,7 +101,7 @@ static base::TimeDelta FramesToTimeDelta + sample_rate); + } + +-static base::TimeDelta ExtractStartTime(AVStream* stream) { ++static base::TimeDelta ExtractStartTime(AVStream* stream, int64_t first_dts) { + // The default start time is zero. + base::TimeDelta start_time; + +@@ -111,12 +111,12 @@ static base::TimeDelta ExtractStartTime( + + // Next try to use the first DTS value, for codecs where we know PTS == DTS + // (excludes all H26x codecs). The start time must be returned in PTS. +- if (av_stream_get_first_dts(stream) != kNoFFmpegTimestamp && ++ if (first_dts != AV_NOPTS_VALUE && + stream->codecpar->codec_id != AV_CODEC_ID_HEVC && + stream->codecpar->codec_id != AV_CODEC_ID_H264 && + stream->codecpar->codec_id != AV_CODEC_ID_MPEG4) { + const base::TimeDelta first_pts = +- ConvertFromTimeBase(stream->time_base, av_stream_get_first_dts(stream)); ++ ConvertFromTimeBase(stream->time_base, first_dts); + if (first_pts < start_time) + start_time = first_pts; + } +@@ -274,6 +274,7 @@ FFmpegDemuxerStream::FFmpegDemuxerStream + fixup_negative_timestamps_(false), + fixup_chained_ogg_(false), + num_discarded_packet_warnings_(0), ++ first_dts_(AV_NOPTS_VALUE), + last_packet_pos_(AV_NOPTS_VALUE), + last_packet_dts_(AV_NOPTS_VALUE) { + DCHECK(demuxer_); +@@ -336,6 +337,10 @@ void FFmpegDemuxerStream::EnqueuePacket( + int64_t packet_dts = + packet->dts == AV_NOPTS_VALUE ? packet->pts : packet->dts; + ++ if (first_dts_ == AV_NOPTS_VALUE) { ++ first_dts_ = packet_dts; ++ } ++ + // Chained ogg files have non-monotonically increasing position and time stamp + // values, which prevents us from using them to determine if a packet should + // be dropped. Since chained ogg is only allowed on single track audio only +@@ -1442,7 +1447,8 @@ void FFmpegDemuxer::OnFindStreamInfoDone + + max_duration = std::max(max_duration, streams_[i]->duration()); + +- base::TimeDelta start_time = ExtractStartTime(stream); ++ base::TimeDelta start_time = ++ ExtractStartTime(stream, streams_[i]->first_dts()); + + // Note: This value is used for seeking, so we must take the true value and + // not the one possibly clamped to zero below. +@@ -1604,7 +1610,7 @@ FFmpegDemuxerStream* FFmpegDemuxer::Find + for (const auto& stream : streams_) { + if (!stream || stream->IsEnabled() != enabled) + continue; +- if (av_stream_get_first_dts(stream->av_stream()) == kInvalidPTSMarker) ++ if (stream->first_dts() == AV_NOPTS_VALUE) + continue; + if (!lowest_start_time_stream || + stream->start_time() < lowest_start_time_stream->start_time()) { +@@ -1625,7 +1631,7 @@ FFmpegDemuxerStream* FFmpegDemuxer::Find + if (stream->type() != DemuxerStream::VIDEO) + continue; + +- if (av_stream_get_first_dts(stream->av_stream()) == kInvalidPTSMarker) ++ if (stream->first_dts() == AV_NOPTS_VALUE) + continue; + + if (!stream->IsEnabled()) +diff -up chromium-119.0.6045.105/media/filters/ffmpeg_demuxer.h.first_dts chromium-119.0.6045.105/media/filters/ffmpeg_demuxer.h +--- chromium-119.0.6045.105/media/filters/ffmpeg_demuxer.h.first_dts 2023-11-01 19:10:31.000000000 +0100 ++++ chromium-119.0.6045.105/media/filters/ffmpeg_demuxer.h 2023-11-06 13:08:43.425784988 +0100 +@@ -142,6 +142,8 @@ class MEDIA_EXPORT FFmpegDemuxerStream : + base::TimeDelta start_time() const { return start_time_; } + void set_start_time(base::TimeDelta time) { start_time_ = time; } + ++ int64_t first_dts() const { return first_dts_; } ++ + private: + friend class FFmpegDemuxerTest; + +@@ -198,6 +200,7 @@ class MEDIA_EXPORT FFmpegDemuxerStream : + bool fixup_chained_ogg_; + + int num_discarded_packet_warnings_; ++ int64_t first_dts_; + int64_t last_packet_pos_; + int64_t last_packet_dts_; + // Requested buffer count. The actual returned buffer count could be less diff --git a/chromium-119-hide-UseChromeOSDirectVideoDecoder-flag-on-VA-API-devices.patch b/chromium-119-hide-UseChromeOSDirectVideoDecoder-flag-on-VA-API-devices.patch new file mode 100644 index 0000000..10db551 --- /dev/null +++ b/chromium-119-hide-UseChromeOSDirectVideoDecoder-flag-on-VA-API-devices.patch @@ -0,0 +1,189 @@ +commit 87fca7f1759e800bd72b5ab6511eea17d6400a76 +Author: Pilar Molina Lopez <pmolinalopez@chromium.org> +Date: Tue Oct 24 19:57:55 2023 +0000 + + video: hide UseChromeOSDirectVideoDecoder flag on VA-API devices + + We are seeing crashes causes by this CHECK statement: + https://source.chromium.org/chromium/chromium/src/+/main:content/public/browser/gpu_utils.cc;l=151;drc=0e777ba9b6c34611705d5b145c92bcd09539011c + It's triggered when the user manually disables the UseChromeOSDirectVideoDecoder + flag on VA-API devices (Intel and AMD). This flag is supported only on + non-Intel and non-AMD devices. This CL adds this information to the flag + description and hides the flag in case VA-API is used. + + Bug: 1469285 + Test: manual test on volteer + Change-Id: I153b9ccb3815498c91ce5eee966834060749e247 + Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4960919 + Reviewed-by: Dale Curtis <dalecurtis@chromium.org> + Reviewed-by: Andres Calderon Jaramillo <andrescj@chromium.org> + Reviewed-by: Avi Drissman <avi@chromium.org> + Commit-Queue: Pilar Molina Lopez <pmolinalopez@chromium.org> + Cr-Commit-Position: refs/heads/main@{#1214411} + +diff -up chromium-119.0.6045.105/chrome/browser/about_flags.cc.hide-UseChromeOSDirectVideoDecoder-flag-on-VA-API-devices chromium-119.0.6045.105/chrome/browser/about_flags.cc +--- chromium-119.0.6045.105/chrome/browser/about_flags.cc.hide-UseChromeOSDirectVideoDecoder-flag-on-VA-API-devices 2023-11-01 19:10:09.000000000 +0100 ++++ chromium-119.0.6045.105/chrome/browser/about_flags.cc 2023-11-06 17:12:08.057984291 +0100 +@@ -7771,11 +7771,13 @@ const FeatureEntry kFeatureEntries[] = { + #endif // BUILDFLAG(IS_CHROMEOS_ASH) + + #if BUILDFLAG(IS_CHROMEOS) && BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION) ++#if !BUILDFLAG(USE_VAAPI) + {"chromeos-direct-video-decoder", + flag_descriptions::kChromeOSDirectVideoDecoderName, + flag_descriptions::kChromeOSDirectVideoDecoderDescription, + kOsCrOS | kOsLacros, + FEATURE_VALUE_TYPE(media::kUseChromeOSDirectVideoDecoder)}, ++#endif // !BUILDFLAG(USE_VAAPI) + + {"enable-vbr-encode-acceleration", + flag_descriptions::kChromeOSHWVBREncodingName, +diff -up chromium-119.0.6045.105/chrome/browser/DEPS.hide-UseChromeOSDirectVideoDecoder-flag-on-VA-API-devices chromium-119.0.6045.105/chrome/browser/DEPS +--- chromium-119.0.6045.105/chrome/browser/DEPS.hide-UseChromeOSDirectVideoDecoder-flag-on-VA-API-devices 2023-11-01 19:10:09.000000000 +0100 ++++ chromium-119.0.6045.105/chrome/browser/DEPS 2023-11-06 17:12:08.055984248 +0100 +@@ -415,6 +415,7 @@ include_rules = [ + "+media/base", # For media switches + "+media/capabilities", # For InMemoryVideoDecodeStatsDB + "+media/cdm", ++ "+media/gpu/buildflags.h", + "+media/remoting/device_capability_checker.h", + "+media/capture", + "+media/midi", # For midi switches +diff -up chromium-119.0.6045.105/chrome/browser/flag_descriptions.cc.hide-UseChromeOSDirectVideoDecoder-flag-on-VA-API-devices chromium-119.0.6045.105/chrome/browser/flag_descriptions.cc +--- chromium-119.0.6045.105/chrome/browser/flag_descriptions.cc.hide-UseChromeOSDirectVideoDecoder-flag-on-VA-API-devices 2023-11-01 19:10:12.000000000 +0100 ++++ chromium-119.0.6045.105/chrome/browser/flag_descriptions.cc 2023-11-06 17:12:08.059984335 +0100 +@@ -7,6 +7,7 @@ + #include "build/build_config.h" + #include "build/chromeos_buildflags.h" + #include "components/supervised_user/core/common/buildflags.h" ++#include "media/gpu/buildflags.h" + #include "pdf/buildflags.h" + + // Keep in identical order as the header file, see the comment at the top +@@ -7424,6 +7425,7 @@ const char kVaapiVP9kSVCEncoderDescripti + #endif // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS) + + #if BUILDFLAG(IS_CHROMEOS) && BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION) ++#if !BUILDFLAG(USE_VAAPI) + const char kChromeOSDirectVideoDecoderName[] = "ChromeOS Direct Video Decoder"; + const char kChromeOSDirectVideoDecoderDescription[] = + "Enables the hardware-accelerated ChromeOS direct media::VideoDecoder " +@@ -7431,7 +7433,8 @@ const char kChromeOSDirectVideoDecoderDe + "--platform-disallows-chromeos-direct-video-decoder command line switch " + "which is added for platforms where said direct VideoDecoder does not work " + "or is not well tested (see the disable_cros_video_decoder USE flag in " +- "ChromeOS)"; ++ "ChromeOS). This flag is supported only on non-Intel and non-AMD devices."; ++#endif // !BUILDFLAG(USE_VAAPI) + const char kChromeOSHWVBREncodingName[] = + "ChromeOS Hardware Variable Bitrate Encoding"; + const char kChromeOSHWVBREncodingDescription[] = +diff -up chromium-119.0.6045.105/content/public/browser/gpu_utils.cc.hide-UseChromeOSDirectVideoDecoder-flag-on-VA-API-devices chromium-119.0.6045.105/content/public/browser/gpu_utils.cc +--- chromium-119.0.6045.105/content/public/browser/gpu_utils.cc.hide-UseChromeOSDirectVideoDecoder-flag-on-VA-API-devices 2023-11-01 19:10:26.000000000 +0100 ++++ chromium-119.0.6045.105/content/public/browser/gpu_utils.cc 2023-11-06 17:12:08.059984335 +0100 +@@ -133,20 +133,26 @@ const gpu::GpuPreferences GetGpuPreferen + #if BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION) + // The direct VideoDecoder is disallowed on some particular SoC/platforms. + const bool should_use_direct_video_decoder = ++#if BUILDFLAG(USE_VAAPI) ++ true; ++#else + !command_line->HasSwitch( + switches::kPlatformDisallowsChromeOSDirectVideoDecoder) && + base::FeatureList::IsEnabled(media::kUseChromeOSDirectVideoDecoder); ++#endif // BUILDFLAG(USE_VAAPI) ++ ++ gpu_preferences.enable_chromeos_direct_video_decoder = ++#if BUILDFLAG(USE_VAAPI) ++ should_use_direct_video_decoder; ++#else ++ // For testing purposes, the following flag allows using the "other" video ++ // decoder implementation. ++ base::FeatureList::IsEnabled( ++ media::kUseAlternateVideoDecoderImplementation) ++ ? !should_use_direct_video_decoder ++ : should_use_direct_video_decoder; ++#endif // BUILDFLAG(USE_VAAPI) + +- // For testing purposes, the following flag allows using the "other" video +- // decoder implementation. +- if (base::FeatureList::IsEnabled( +- media::kUseAlternateVideoDecoderImplementation)) { +- gpu_preferences.enable_chromeos_direct_video_decoder = +- !should_use_direct_video_decoder; +- } else { +- gpu_preferences.enable_chromeos_direct_video_decoder = +- should_use_direct_video_decoder; +- } + #if BUILDFLAG(USE_VAAPI) + CHECK(gpu_preferences.enable_chromeos_direct_video_decoder); + #endif // BUILDFLAG(USE_VAAPI) +diff -up chromium-119.0.6045.105/media/base/media_switches.cc.hide-UseChromeOSDirectVideoDecoder-flag-on-VA-API-devices chromium-119.0.6045.105/media/base/media_switches.cc +--- chromium-119.0.6045.105/media/base/media_switches.cc.hide-UseChromeOSDirectVideoDecoder-flag-on-VA-API-devices 2023-11-01 19:10:31.000000000 +0100 ++++ chromium-119.0.6045.105/media/base/media_switches.cc 2023-11-06 17:12:08.060984356 +0100 +@@ -1202,6 +1202,7 @@ BASE_FEATURE(kChromeOSHWVBREncoding, + "ChromeOSHWVBREncoding", + base::FEATURE_DISABLED_BY_DEFAULT); + ++#if !BUILDFLAG(USE_VAAPI) + // Enable the hardware-accelerated direct video decoder instead of the one + // needing the VdaVideoDecoder adapter. This flag is used mainly as a + // chrome:flag for developers debugging issues as well as to be able to +@@ -1210,6 +1211,7 @@ BASE_FEATURE(kChromeOSHWVBREncoding, + BASE_FEATURE(kUseChromeOSDirectVideoDecoder, + "UseChromeOSDirectVideoDecoder", + base::FEATURE_ENABLED_BY_DEFAULT); ++#endif // !BUILDFLAG(USE_VAAPI) + + // Limit the number of concurrent hardware decoder instances on ChromeOS. + BASE_FEATURE(kLimitConcurrentDecoderInstances, +@@ -1238,7 +1240,7 @@ BASE_FEATURE(kPreferSoftwareMT21, + "PreferSoftwareMT21", + base::FEATURE_DISABLED_BY_DEFAULT); + #endif // defined(ARCH_CPU_ARM_FAMILY) +-#if BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(USE_VAAPI) + // ChromeOS has one of two VideoDecoder implementations active based on + // SoC/board specific configurations that are sent via command line flags. This + // switch allows using the non default implementation for testing. +@@ -1246,7 +1248,7 @@ BASE_FEATURE(kPreferSoftwareMT21, + BASE_FEATURE(kUseAlternateVideoDecoderImplementation, + "UseAlternateVideoDecoderImplementation", + base::FEATURE_DISABLED_BY_DEFAULT); +-#endif // BUILDFLAG(IS_CHROMEOS) ++#endif // BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(USE_VAAPI) + #endif // BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION) + + #if BUILDFLAG(IS_WIN) +diff -up chromium-119.0.6045.105/media/base/media_switches.h.hide-UseChromeOSDirectVideoDecoder-flag-on-VA-API-devices chromium-119.0.6045.105/media/base/media_switches.h +--- chromium-119.0.6045.105/media/base/media_switches.h.hide-UseChromeOSDirectVideoDecoder-flag-on-VA-API-devices 2023-11-01 19:10:31.000000000 +0100 ++++ chromium-119.0.6045.105/media/base/media_switches.h 2023-11-06 17:12:08.060984356 +0100 +@@ -14,6 +14,7 @@ + #include "build/build_config.h" + #include "build/chromeos_buildflags.h" + #include "media/base/media_export.h" ++#include "media/gpu/buildflags.h" + #include "media/media_buildflags.h" + + namespace base { +@@ -382,16 +383,18 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kBuilt + #if BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION) + MEDIA_EXPORT BASE_DECLARE_FEATURE(kChromeOSHWAV1Decoder); + MEDIA_EXPORT BASE_DECLARE_FEATURE(kChromeOSHWVBREncoding); ++#if !BUILDFLAG(USE_VAAPI) + MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseChromeOSDirectVideoDecoder); ++#endif // !BUILDFLAG(USE_VAAPI) + MEDIA_EXPORT BASE_DECLARE_FEATURE(kLimitConcurrentDecoderInstances); + MEDIA_EXPORT BASE_DECLARE_FEATURE(kUSeSequencedTaskRunnerForVEA); + #if defined(ARCH_CPU_ARM_FAMILY) + MEDIA_EXPORT BASE_DECLARE_FEATURE(kPreferGLImageProcessor); + MEDIA_EXPORT BASE_DECLARE_FEATURE(kPreferSoftwareMT21); + #endif // defined(ARCH_CPU_ARM_FAMILY) +-#if BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(USE_VAAPI) + MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseAlternateVideoDecoderImplementation); +-#endif // BUILDFLAG(IS_CHROMEOS) ++#endif // BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(USE_VAAPI) + #endif // BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION) + + #if BUILDFLAG(IS_WIN) diff --git a/chromium-119-missing-header-files.patch b/chromium-119-missing-header-files.patch new file mode 100644 index 0000000..c19a1f5 --- /dev/null +++ b/chromium-119-missing-header-files.patch @@ -0,0 +1,470 @@ +diff -up chromium-119.0.6045.105/base/check_op.h.missing-header-files chromium-119.0.6045.105/base/check_op.h +--- chromium-119.0.6045.105/base/check_op.h.missing-header-files 2023-11-01 19:10:05.000000000 +0100 ++++ chromium-119.0.6045.105/base/check_op.h 2023-11-06 14:34:01.808868982 +0100 +@@ -5,6 +5,7 @@ + #ifndef BASE_CHECK_OP_H_ + #define BASE_CHECK_OP_H_ + ++#include <cstdint> + #include <cstddef> + #include <string> + #include <string_view> +diff -up chromium-119.0.6045.105/base/containers/flat_map.h.missing-header-files chromium-119.0.6045.105/base/containers/flat_map.h +--- chromium-119.0.6045.105/base/containers/flat_map.h.missing-header-files 2023-11-01 19:10:05.000000000 +0100 ++++ chromium-119.0.6045.105/base/containers/flat_map.h 2023-11-06 14:34:01.813869089 +0100 +@@ -5,6 +5,7 @@ + #ifndef BASE_CONTAINERS_FLAT_MAP_H_ + #define BASE_CONTAINERS_FLAT_MAP_H_ + ++#include <cstdint> + #include <functional> + #include <tuple> + #include <type_traits> +diff -up chromium-119.0.6045.105/base/debug/profiler.h.missing-header-files chromium-119.0.6045.105/base/debug/profiler.h +--- chromium-119.0.6045.105/base/debug/profiler.h.missing-header-files 2023-11-01 19:10:05.000000000 +0100 ++++ chromium-119.0.6045.105/base/debug/profiler.h 2023-11-06 14:34:01.809869004 +0100 +@@ -8,6 +8,7 @@ + #include <stddef.h> + #include <stdint.h> + ++#include <cstdint> + #include <string> + + #include "base/base_export.h" +diff -up chromium-119.0.6045.105/base/memory/ref_counted.h.missing-header-files chromium-119.0.6045.105/base/memory/ref_counted.h +--- chromium-119.0.6045.105/base/memory/ref_counted.h.missing-header-files 2023-11-01 19:10:05.000000000 +0100 ++++ chromium-119.0.6045.105/base/memory/ref_counted.h 2023-11-06 14:34:01.808868982 +0100 +@@ -6,6 +6,7 @@ + #define BASE_MEMORY_REF_COUNTED_H_ + + #include <stddef.h> ++#include <limits> + + #include <limits> + #include <utility> +diff -up chromium-119.0.6045.105/chrome/browser/privacy_budget/encountered_surface_tracker.h.missing-header-files chromium-119.0.6045.105/chrome/browser/privacy_budget/encountered_surface_tracker.h +--- chromium-119.0.6045.105/chrome/browser/privacy_budget/encountered_surface_tracker.h.missing-header-files 2023-11-01 19:10:13.000000000 +0100 ++++ chromium-119.0.6045.105/chrome/browser/privacy_budget/encountered_surface_tracker.h 2023-11-06 14:34:01.814869110 +0100 +@@ -7,6 +7,7 @@ + + #include <stdint.h> + ++#include <cstdint> + #include <map> + + #include "base/containers/flat_set.h" +diff -up chromium-119.0.6045.105/chrome/browser/webauthn/authenticator_request_dialog_model.h.missing-header-files chromium-119.0.6045.105/chrome/browser/webauthn/authenticator_request_dialog_model.h +--- chromium-119.0.6045.105/chrome/browser/webauthn/authenticator_request_dialog_model.h.missing-header-files 2023-11-01 19:10:16.000000000 +0100 ++++ chromium-119.0.6045.105/chrome/browser/webauthn/authenticator_request_dialog_model.h 2023-11-06 14:34:01.817869174 +0100 +@@ -8,6 +8,7 @@ + #include <memory> + #include <string> + #include <vector> ++#include <variant> + + #include "base/containers/span.h" + #include "base/functional/callback_forward.h" +diff -up chromium-119.0.6045.105/chrome/test/chromedriver/chrome/web_view_impl.cc.missing-header-files chromium-119.0.6045.105/chrome/test/chromedriver/chrome/web_view_impl.cc +--- chromium-119.0.6045.105/chrome/test/chromedriver/chrome/web_view_impl.cc.missing-header-files 2023-11-01 19:10:16.000000000 +0100 ++++ chromium-119.0.6045.105/chrome/test/chromedriver/chrome/web_view_impl.cc 2023-11-06 14:34:01.818869196 +0100 +@@ -11,6 +11,7 @@ + #include <queue> + #include <utility> + #include <vector> ++#include <cstring> + + #include "base/check.h" + #include "base/files/file_path.h" +diff -up chromium-119.0.6045.105/components/autofill/core/browser/autofill_ablation_study.h.missing-header-files chromium-119.0.6045.105/components/autofill/core/browser/autofill_ablation_study.h +--- chromium-119.0.6045.105/components/autofill/core/browser/autofill_ablation_study.h.missing-header-files 2023-11-01 19:10:19.000000000 +0100 ++++ chromium-119.0.6045.105/components/autofill/core/browser/autofill_ablation_study.h 2023-11-06 14:34:01.815869132 +0100 +@@ -7,6 +7,7 @@ + + #include <stdint.h> + ++#include <cstdint> + #include <string> + + class GURL; +diff -up chromium-119.0.6045.105/components/crash/core/app/crash_reporter_client.h.missing-header-files chromium-119.0.6045.105/components/crash/core/app/crash_reporter_client.h +--- chromium-119.0.6045.105/components/crash/core/app/crash_reporter_client.h.missing-header-files 2023-11-01 19:10:20.000000000 +0100 ++++ chromium-119.0.6045.105/components/crash/core/app/crash_reporter_client.h 2023-11-06 14:34:01.813869089 +0100 +@@ -7,6 +7,7 @@ + + #include <stdint.h> + ++#include <cstdint> + #include <string> + + #include "build/build_config.h" +diff -up chromium-119.0.6045.105/components/feature_engagement/internal/event_storage_validator.h.missing-header-files chromium-119.0.6045.105/components/feature_engagement/internal/event_storage_validator.h +--- chromium-119.0.6045.105/components/feature_engagement/internal/event_storage_validator.h.missing-header-files 2023-11-01 19:10:21.000000000 +0100 ++++ chromium-119.0.6045.105/components/feature_engagement/internal/event_storage_validator.h 2023-11-06 14:34:01.814869110 +0100 +@@ -7,6 +7,7 @@ + + #include <stdint.h> + ++#include <cstdint> + #include <string> + + namespace feature_engagement { +diff -up chromium-119.0.6045.105/components/feature_engagement/internal/never_event_storage_validator.h.missing-header-files chromium-119.0.6045.105/components/feature_engagement/internal/never_event_storage_validator.h +--- chromium-119.0.6045.105/components/feature_engagement/internal/never_event_storage_validator.h.missing-header-files 2023-11-01 19:10:21.000000000 +0100 ++++ chromium-119.0.6045.105/components/feature_engagement/internal/never_event_storage_validator.h 2023-11-06 14:34:01.814869110 +0100 +@@ -5,6 +5,7 @@ + #ifndef COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_NEVER_EVENT_STORAGE_VALIDATOR_H_ + #define COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_NEVER_EVENT_STORAGE_VALIDATOR_H_ + ++#include <cstdint> + #include <string> + + #include "components/feature_engagement/internal/event_storage_validator.h" +diff -up chromium-119.0.6045.105/components/omnibox/browser/on_device_head_model.h.missing-header-files chromium-119.0.6045.105/components/omnibox/browser/on_device_head_model.h +--- chromium-119.0.6045.105/components/omnibox/browser/on_device_head_model.h.missing-header-files 2023-11-01 19:10:21.000000000 +0100 ++++ chromium-119.0.6045.105/components/omnibox/browser/on_device_head_model.h 2023-11-06 14:34:01.815869132 +0100 +@@ -7,6 +7,7 @@ + + #include <stdint.h> + ++#include <cstdint> + #include <string> + #include <utility> + #include <vector> +diff -up chromium-119.0.6045.105/components/password_manager/core/browser/generation/password_generator.h.missing-header-files chromium-119.0.6045.105/components/password_manager/core/browser/generation/password_generator.h +--- chromium-119.0.6045.105/components/password_manager/core/browser/generation/password_generator.h.missing-header-files 2023-11-01 19:10:21.000000000 +0100 ++++ chromium-119.0.6045.105/components/password_manager/core/browser/generation/password_generator.h 2023-11-06 14:34:01.814869110 +0100 +@@ -7,6 +7,7 @@ + + #include <stdint.h> + ++#include <cstdint> + #include <string> + + +diff -up chromium-119.0.6045.105/components/payments/content/utility/fingerprint_parser.h.missing-header-files chromium-119.0.6045.105/components/payments/content/utility/fingerprint_parser.h +--- chromium-119.0.6045.105/components/payments/content/utility/fingerprint_parser.h.missing-header-files 2023-11-01 19:10:21.000000000 +0100 ++++ chromium-119.0.6045.105/components/payments/content/utility/fingerprint_parser.h 2023-11-06 14:34:01.815869132 +0100 +@@ -5,6 +5,7 @@ + #ifndef COMPONENTS_PAYMENTS_CONTENT_UTILITY_FINGERPRINT_PARSER_H_ + #define COMPONENTS_PAYMENTS_CONTENT_UTILITY_FINGERPRINT_PARSER_H_ + ++#include <cstdint> + #include <stddef.h> + #include <stdint.h> + +diff -up chromium-119.0.6045.105/gin/time_clamper.h.missing-header-files chromium-119.0.6045.105/gin/time_clamper.h +--- chromium-119.0.6045.105/gin/time_clamper.h.missing-header-files 2023-11-01 19:10:28.000000000 +0100 ++++ chromium-119.0.6045.105/gin/time_clamper.h 2023-11-06 14:34:01.818869196 +0100 +@@ -48,7 +48,7 @@ class GIN_EXPORT TimeClamper { + const int64_t micros = now_micros % 1000; + // abs() is necessary for devices with times before unix-epoch (most likely + // configured incorrectly). +- if (abs(micros) + kResolutionMicros < 1000) { ++ if (std::abs(micros) + kResolutionMicros < 1000) { + return now_micros / 1000; + } + return ClampTimeResolution(now_micros) / 1000; +diff -up chromium-119.0.6045.105/gpu/config/gpu_feature_info.h.missing-header-files chromium-119.0.6045.105/gpu/config/gpu_feature_info.h +--- chromium-119.0.6045.105/gpu/config/gpu_feature_info.h.missing-header-files 2023-11-01 19:10:28.000000000 +0100 ++++ chromium-119.0.6045.105/gpu/config/gpu_feature_info.h 2023-11-06 14:34:01.809869004 +0100 +@@ -7,6 +7,7 @@ + + #include <stdint.h> + ++#include <cstdint> + #include <string> + #include <vector> + +diff -up chromium-119.0.6045.105/net/base/net_export.h.missing-header-files chromium-119.0.6045.105/net/base/net_export.h +--- chromium-119.0.6045.105/net/base/net_export.h.missing-header-files 2023-11-01 19:10:32.000000000 +0100 ++++ chromium-119.0.6045.105/net/base/net_export.h 2023-11-06 14:34:01.809869004 +0100 +@@ -5,6 +5,8 @@ + #ifndef NET_BASE_NET_EXPORT_H_ + #define NET_BASE_NET_EXPORT_H_ + ++#include <cstdint> ++ + // Defines NET_EXPORT so that functionality implemented by the net module can + // be exported to consumers, and NET_EXPORT_PRIVATE that allows unit tests to + // access features not intended to be used directly by real consumers. +diff -up chromium-119.0.6045.105/pdf/document_attachment_info.h.missing-header-files chromium-119.0.6045.105/pdf/document_attachment_info.h +--- chromium-119.0.6045.105/pdf/document_attachment_info.h.missing-header-files 2023-11-01 19:10:34.000000000 +0100 ++++ chromium-119.0.6045.105/pdf/document_attachment_info.h 2023-11-06 14:34:01.815869132 +0100 +@@ -7,6 +7,7 @@ + + #include <stdint.h> + ++#include <cstdint> + #include <string> + + +diff -up chromium-119.0.6045.105/sandbox/linux/syscall_broker/broker_file_permission.h.missing-header-files chromium-119.0.6045.105/sandbox/linux/syscall_broker/broker_file_permission.h +--- chromium-119.0.6045.105/sandbox/linux/syscall_broker/broker_file_permission.h.missing-header-files 2023-11-01 19:10:34.000000000 +0100 ++++ chromium-119.0.6045.105/sandbox/linux/syscall_broker/broker_file_permission.h 2023-11-06 14:34:01.809869004 +0100 +@@ -5,6 +5,7 @@ + #ifndef SANDBOX_LINUX_SYSCALL_BROKER_BROKER_FILE_PERMISSION_H_ + #define SANDBOX_LINUX_SYSCALL_BROKER_BROKER_FILE_PERMISSION_H_ + ++#include <cstdint> + #include <bitset> + #include <cstdint> + #include <string> +diff -up chromium-119.0.6045.105/services/device/public/cpp/generic_sensor/sensor_reading.h.missing-header-files chromium-119.0.6045.105/services/device/public/cpp/generic_sensor/sensor_reading.h +--- chromium-119.0.6045.105/services/device/public/cpp/generic_sensor/sensor_reading.h.missing-header-files 2023-11-01 19:10:35.000000000 +0100 ++++ chromium-119.0.6045.105/services/device/public/cpp/generic_sensor/sensor_reading.h 2023-11-06 14:34:01.820869238 +0100 +@@ -8,6 +8,9 @@ + #include <stddef.h> + #include <stdint.h> + ++#include <cstddef> ++#include <cstdint> ++ + #include <type_traits> + + namespace device { +diff -up chromium-119.0.6045.105/skia/ext/skcolorspace_trfn.cc.missing-header-files chromium-119.0.6045.105/skia/ext/skcolorspace_trfn.cc +--- chromium-119.0.6045.105/skia/ext/skcolorspace_trfn.cc.missing-header-files 2023-11-01 19:10:35.000000000 +0100 ++++ chromium-119.0.6045.105/skia/ext/skcolorspace_trfn.cc 2023-11-06 14:34:01.818869196 +0100 +@@ -3,6 +3,7 @@ + // found in the LICENSE file. + + #include "skia/ext/skcolorspace_trfn.h" ++#include <cmath> + + #include <cmath> + +diff -up chromium-119.0.6045.105/third_party/abseil-cpp/absl/strings/string_view.h.missing-header-files chromium-119.0.6045.105/third_party/abseil-cpp/absl/strings/string_view.h +--- chromium-119.0.6045.105/third_party/abseil-cpp/absl/strings/string_view.h.missing-header-files 2023-11-01 19:10:36.000000000 +0100 ++++ chromium-119.0.6045.105/third_party/abseil-cpp/absl/strings/string_view.h 2023-11-06 14:34:01.809869004 +0100 +@@ -27,6 +27,7 @@ + #ifndef ABSL_STRINGS_STRING_VIEW_H_ + #define ABSL_STRINGS_STRING_VIEW_H_ + ++#include <cstdint> + #include <algorithm> + #include <cassert> + #include <cstddef> +diff -up chromium-119.0.6045.105/third_party/angle/include/GLSLANG/ShaderVars.h.missing-header-files chromium-119.0.6045.105/third_party/angle/include/GLSLANG/ShaderVars.h +--- chromium-119.0.6045.105/third_party/angle/include/GLSLANG/ShaderVars.h.missing-header-files 2023-11-01 19:11:59.000000000 +0100 ++++ chromium-119.0.6045.105/third_party/angle/include/GLSLANG/ShaderVars.h 2023-11-06 14:34:01.810869025 +0100 +@@ -10,6 +10,7 @@ + #ifndef GLSLANG_SHADERVARS_H_ + #define GLSLANG_SHADERVARS_H_ + ++#include <cstdint> + #include <algorithm> + #include <array> + #include <cstdint> +diff -up chromium-119.0.6045.105/third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h.missing-header-files chromium-119.0.6045.105/third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h +--- chromium-119.0.6045.105/third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h.missing-header-files 2023-11-01 19:10:37.000000000 +0100 ++++ chromium-119.0.6045.105/third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h 2023-11-06 14:34:01.810869025 +0100 +@@ -7,6 +7,7 @@ + + #include <stdint.h> + ++#include <cstdint> + #include <array> + #include <cstdint> + #include <functional> +diff -up chromium-119.0.6045.105/third_party/dawn/src/tint/lang/spirv/reader/ast_parser/namer.h.missing-header-files chromium-119.0.6045.105/third_party/dawn/src/tint/lang/spirv/reader/ast_parser/namer.h +--- chromium-119.0.6045.105/third_party/dawn/src/tint/lang/spirv/reader/ast_parser/namer.h.missing-header-files 2023-11-01 19:13:50.000000000 +0100 ++++ chromium-119.0.6045.105/third_party/dawn/src/tint/lang/spirv/reader/ast_parser/namer.h 2023-11-06 14:34:01.810869025 +0100 +@@ -15,6 +15,7 @@ + #ifndef SRC_TINT_LANG_SPIRV_READER_AST_PARSER_NAMER_H_ + #define SRC_TINT_LANG_SPIRV_READER_AST_PARSER_NAMER_H_ + ++#include <cstdint> + #include <string> + #include <unordered_map> + #include <vector> +diff -up chromium-119.0.6045.105/third_party/ipcz/src/ipcz/router_link.h.missing-header-files chromium-119.0.6045.105/third_party/ipcz/src/ipcz/router_link.h +--- chromium-119.0.6045.105/third_party/ipcz/src/ipcz/router_link.h.missing-header-files 2023-11-01 19:11:20.000000000 +0100 ++++ chromium-119.0.6045.105/third_party/ipcz/src/ipcz/router_link.h 2023-11-06 14:34:01.819869217 +0100 +@@ -5,6 +5,7 @@ + #ifndef IPCZ_SRC_IPCZ_ROUTER_LINK_H_ + #define IPCZ_SRC_IPCZ_ROUTER_LINK_H_ + ++#include <memory> + #include <cstddef> + #include <functional> + #include <memory> +diff -up chromium-119.0.6045.105/third_party/material_color_utilities/src/cpp/palettes/tones.cc.missing-header-files chromium-119.0.6045.105/third_party/material_color_utilities/src/cpp/palettes/tones.cc +--- chromium-119.0.6045.105/third_party/material_color_utilities/src/cpp/palettes/tones.cc.missing-header-files 2023-11-01 19:11:53.000000000 +0100 ++++ chromium-119.0.6045.105/third_party/material_color_utilities/src/cpp/palettes/tones.cc 2023-11-06 14:34:01.819869217 +0100 +@@ -14,6 +14,7 @@ + * limitations under the License. + */ + ++#include <cmath> + #include "cpp/palettes/tones.h" + + #include "cpp/cam/cam.h" +diff -up chromium-119.0.6045.105/third_party/openscreen/src/discovery/dnssd/public/dns_sd_txt_record.h.missing-header-files chromium-119.0.6045.105/third_party/openscreen/src/discovery/dnssd/public/dns_sd_txt_record.h +--- chromium-119.0.6045.105/third_party/openscreen/src/discovery/dnssd/public/dns_sd_txt_record.h.missing-header-files 2023-11-01 19:11:59.000000000 +0100 ++++ chromium-119.0.6045.105/third_party/openscreen/src/discovery/dnssd/public/dns_sd_txt_record.h 2023-11-06 14:34:01.810869025 +0100 +@@ -7,6 +7,7 @@ + + #include <stdint.h> + ++#include <cstdint> + #include <functional> + #include <map> + #include <set> +diff -up chromium-119.0.6045.105/third_party/pdfium/constants/annotation_flags.h.missing-header-files chromium-119.0.6045.105/third_party/pdfium/constants/annotation_flags.h +--- chromium-119.0.6045.105/third_party/pdfium/constants/annotation_flags.h.missing-header-files 2023-11-01 19:14:48.000000000 +0100 ++++ chromium-119.0.6045.105/third_party/pdfium/constants/annotation_flags.h 2023-11-06 14:34:01.815869132 +0100 +@@ -7,6 +7,8 @@ + + #include <stdint.h> + ++#include <cstdint> ++ + namespace pdfium { + namespace annotation_flags { + +diff -up chromium-119.0.6045.105/third_party/ruy/src/ruy/profiler/instrumentation.h.missing-header-files chromium-119.0.6045.105/third_party/ruy/src/ruy/profiler/instrumentation.h +--- chromium-119.0.6045.105/third_party/ruy/src/ruy/profiler/instrumentation.h.missing-header-files 2023-11-01 19:12:02.000000000 +0100 ++++ chromium-119.0.6045.105/third_party/ruy/src/ruy/profiler/instrumentation.h 2023-11-06 14:34:01.813869089 +0100 +@@ -17,6 +17,7 @@ limitations under the License. + #define RUY_RUY_PROFILER_INSTRUMENTATION_H_ + + #ifdef RUY_PROFILER ++#include <string> + #include <cstdio> + #include <mutex> + #include <vector> +diff -up chromium-119.0.6045.105/third_party/swiftshader/src/System/LRUCache.hpp.missing-header-files chromium-119.0.6045.105/third_party/swiftshader/src/System/LRUCache.hpp +--- chromium-119.0.6045.105/third_party/swiftshader/src/System/LRUCache.hpp.missing-header-files 2023-11-01 19:12:15.000000000 +0100 ++++ chromium-119.0.6045.105/third_party/swiftshader/src/System/LRUCache.hpp 2023-11-06 14:34:01.810869025 +0100 +@@ -17,6 +17,7 @@ + + #include "System/Debug.hpp" + ++#include <cstdint> + #include <cstddef> + #include <cstdint> + #include <functional> +diff -up chromium-119.0.6045.105/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc.missing-header-files chromium-119.0.6045.105/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc +--- chromium-119.0.6045.105/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc.missing-header-files 2023-11-01 19:12:42.000000000 +0100 ++++ chromium-119.0.6045.105/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc 2023-11-06 14:34:01.814869110 +0100 +@@ -45,6 +45,7 @@ + #include "llvm/Support/SaveAndRestore.h" + #include "llvm/Support/raw_ostream.h" + #include <algorithm> ++#include <cstdint> + #include <string> + #include <sysexits.h> + #ifdef HAVE_BACKTRACE +diff -up chromium-119.0.6045.105/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h.missing-header-files chromium-119.0.6045.105/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h +--- chromium-119.0.6045.105/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h.missing-header-files 2023-11-01 19:13:20.000000000 +0100 ++++ chromium-119.0.6045.105/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h 2023-11-06 14:34:01.813869089 +0100 +@@ -31,6 +31,7 @@ limitations under the License. + #ifndef TENSORFLOW_LITE_KERNELS_INTERNAL_SPECTROGRAM_H_ + #define TENSORFLOW_LITE_KERNELS_INTERNAL_SPECTROGRAM_H_ + ++#include <cstdint> + #include <complex> + #include <deque> + #include <vector> +diff -up chromium-119.0.6045.105/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h.missing-header-files chromium-119.0.6045.105/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h +--- chromium-119.0.6045.105/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h.missing-header-files 2023-11-01 19:12:45.000000000 +0100 ++++ chromium-119.0.6045.105/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h 2023-11-06 14:34:01.817869174 +0100 +@@ -2884,6 +2884,7 @@ static void vma_aligned_free(void* VMA_N + + // Define this macro to 1 to enable functions: vmaBuildStatsString, vmaFreeStatsString. + #if VMA_STATS_STRING_ENABLED ++#include <stdio.h> + static inline void VmaUint32ToStr(char* VMA_NOT_NULL outStr, size_t strLen, uint32_t num) + { + snprintf(outStr, strLen, "%u", static_cast<unsigned int>(num)); +diff -up chromium-119.0.6045.105/third_party/vulkan_memory_allocator/include/vk_mem_alloc.h.missing-header-files chromium-119.0.6045.105/third_party/vulkan_memory_allocator/include/vk_mem_alloc.h +--- chromium-119.0.6045.105/third_party/vulkan_memory_allocator/include/vk_mem_alloc.h.missing-header-files 2023-11-01 19:12:13.000000000 +0100 ++++ chromium-119.0.6045.105/third_party/vulkan_memory_allocator/include/vk_mem_alloc.h 2023-11-06 14:34:01.812869068 +0100 +@@ -2388,6 +2388,7 @@ VMA_CALL_PRE void VMA_CALL_POST vmaFreeV + #ifdef VMA_IMPLEMENTATION
+ #undef VMA_IMPLEMENTATION
+
++#include <cstdio>
+ #include <cstdint>
+ #include <cstdlib>
+ #include <cstring>
+diff -up chromium-119.0.6045.105/third_party/webrtc/audio/utility/channel_mixer.cc.missing-header-files chromium-119.0.6045.105/third_party/webrtc/audio/utility/channel_mixer.cc +--- chromium-119.0.6045.105/third_party/webrtc/audio/utility/channel_mixer.cc.missing-header-files 2023-11-01 19:14:05.000000000 +0100 ++++ chromium-119.0.6045.105/third_party/webrtc/audio/utility/channel_mixer.cc 2023-11-06 14:34:01.819869217 +0100 +@@ -8,6 +8,8 @@ + * be found in the AUTHORS file in the root of the source tree. + */ + ++#include <cstring> ++ + #include "audio/utility/channel_mixer.h" + + #include "audio/utility/channel_mixing_matrix.h" +diff -up chromium-119.0.6045.105/third_party/webrtc/common_video/h264/sps_parser.h.missing-header-files chromium-119.0.6045.105/third_party/webrtc/common_video/h264/sps_parser.h +--- chromium-119.0.6045.105/third_party/webrtc/common_video/h264/sps_parser.h.missing-header-files 2023-11-01 19:14:06.000000000 +0100 ++++ chromium-119.0.6045.105/third_party/webrtc/common_video/h264/sps_parser.h 2023-11-06 14:34:01.819869217 +0100 +@@ -11,6 +11,7 @@ + #ifndef COMMON_VIDEO_H264_SPS_PARSER_H_ + #define COMMON_VIDEO_H264_SPS_PARSER_H_ + ++#include <cstdint> + #include "absl/types/optional.h" + #include "rtc_base/bitstream_reader.h" + +diff -up chromium-119.0.6045.105/third_party/webrtc/modules/include/module_common_types_public.h.missing-header-files chromium-119.0.6045.105/third_party/webrtc/modules/include/module_common_types_public.h +--- chromium-119.0.6045.105/third_party/webrtc/modules/include/module_common_types_public.h.missing-header-files 2023-11-01 19:14:11.000000000 +0100 ++++ chromium-119.0.6045.105/third_party/webrtc/modules/include/module_common_types_public.h 2023-11-06 14:34:01.819869217 +0100 +@@ -11,6 +11,7 @@ + #ifndef MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_ + #define MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_ + ++#include <cstdint> + #include <limits> + + #include "absl/types/optional.h" +diff -up chromium-119.0.6045.105/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc.missing-header-files chromium-119.0.6045.105/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc +--- chromium-119.0.6045.105/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc.missing-header-files 2023-11-01 19:14:12.000000000 +0100 ++++ chromium-119.0.6045.105/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc 2023-11-06 14:34:01.819869217 +0100 +@@ -10,6 +10,7 @@ + + #include "modules/video_coding/utility/ivf_file_reader.h" + ++#include <cstring> + #include <string> + #include <vector> + +diff -up chromium-119.0.6045.105/ui/base/prediction/kalman_filter.h.missing-header-files chromium-119.0.6045.105/ui/base/prediction/kalman_filter.h +--- chromium-119.0.6045.105/ui/base/prediction/kalman_filter.h.missing-header-files 2023-11-01 19:11:28.000000000 +0100 ++++ chromium-119.0.6045.105/ui/base/prediction/kalman_filter.h 2023-11-06 14:34:01.814869110 +0100 +@@ -7,6 +7,8 @@ + + #include <stdint.h> + ++#include <cstdint> ++ + #include "base/component_export.h" + #include "ui/gfx/geometry/matrix3_f.h" + +diff -up chromium-119.0.6045.105/ui/gfx/geometry/linear_gradient.h.missing-header-files chromium-119.0.6045.105/ui/gfx/geometry/linear_gradient.h +--- chromium-119.0.6045.105/ui/gfx/geometry/linear_gradient.h.missing-header-files 2023-11-01 19:11:28.000000000 +0100 ++++ chromium-119.0.6045.105/ui/gfx/geometry/linear_gradient.h 2023-11-06 14:34:01.812869068 +0100 +@@ -7,6 +7,7 @@ + + #include <stdint.h> + ++#include <cstdint> + #include <array> + #include <cstddef> + #include <cstdint> +diff -up chromium-119.0.6045.105/ui/gfx/linux/drm_util_linux.h.missing-header-files chromium-119.0.6045.105/ui/gfx/linux/drm_util_linux.h +--- chromium-119.0.6045.105/ui/gfx/linux/drm_util_linux.h.missing-header-files 2023-11-01 19:11:28.000000000 +0100 ++++ chromium-119.0.6045.105/ui/gfx/linux/drm_util_linux.h 2023-11-06 14:34:01.819869217 +0100 +@@ -9,6 +9,8 @@ + + #include "ui/gfx/buffer_types.h" + ++#include <cstdint> ++ + namespace ui { + + int GetFourCCFormatFromBufferFormat(gfx::BufferFormat format); diff --git a/chromium-119-no_matching_constructor.patch b/chromium-119-no_matching_constructor.patch new file mode 100644 index 0000000..a16c979 --- /dev/null +++ b/chromium-119-no_matching_constructor.patch @@ -0,0 +1,703 @@ +diff -up chromium-119.0.6045.59/base/trace_event/trace_log.cc.no_matching_constructor chromium-119.0.6045.59/base/trace_event/trace_log.cc +--- chromium-119.0.6045.59/base/trace_event/trace_log.cc.no_matching_constructor 2023-10-26 18:16:51.000000000 +0200 ++++ chromium-119.0.6045.59/base/trace_event/trace_log.cc 2023-10-30 16:51:02.270151487 +0100 +@@ -2191,8 +2191,8 @@ void TraceLog::SetTraceBufferForTesting( + #if BUILDFLAG(USE_PERFETTO_CLIENT_LIBRARY) + void TraceLog::OnSetup(const perfetto::DataSourceBase::SetupArgs& args) { + AutoLock lock(track_event_lock_); +- track_event_sessions_.emplace_back(args.internal_instance_index, *args.config, +- args.backend_type); ++ track_event_sessions_.emplace_back() = {args.internal_instance_index, *args.config, ++ args.backend_type}; + } + + void TraceLog::OnStart(const perfetto::DataSourceBase::StartArgs&) { +diff -up chromium-119.0.6045.59/chrome/browser/content_settings/one_time_permission_provider.cc.no_matching_constructor chromium-119.0.6045.59/chrome/browser/content_settings/one_time_permission_provider.cc +--- chromium-119.0.6045.59/chrome/browser/content_settings/one_time_permission_provider.cc.no_matching_constructor 2023-10-26 18:16:57.000000000 +0200 ++++ chromium-119.0.6045.59/chrome/browser/content_settings/one_time_permission_provider.cc 2023-10-30 16:51:02.269151462 +0100 +@@ -226,8 +226,8 @@ void OneTimePermissionProvider::OnSuspen + + while (rule_iterator && rule_iterator->HasNext()) { + auto rule = rule_iterator->Next(); +- patterns_to_delete.emplace_back(setting_type, rule->primary_pattern, +- rule->secondary_pattern); ++ patterns_to_delete.emplace_back() = {setting_type, rule->primary_pattern, ++ rule->secondary_pattern}; + permissions::PermissionUmaUtil::RecordOneTimePermissionEvent( + setting_type, + permissions::OneTimePermissionEvent::EXPIRED_ON_SUSPEND); +@@ -329,8 +329,8 @@ void OneTimePermissionProvider::DeleteEn + auto rule = rule_iterator->Next(); + if (rule->primary_pattern.Matches(origin_gurl) && + rule->secondary_pattern.Matches(origin_gurl)) { +- patterns_to_delete.emplace_back( +- content_setting_type, rule->primary_pattern, rule->secondary_pattern); ++ patterns_to_delete.emplace_back() = { ++ content_setting_type, rule->primary_pattern, rule->secondary_pattern}; + permissions::PermissionUmaUtil::RecordOneTimePermissionEvent( + content_setting_type, trigger_event); + } +diff -up chromium-119.0.6045.59/chrome/browser/enterprise/profile_management/profile_management_navigation_throttle.cc.no_matching_constructor chromium-119.0.6045.59/chrome/browser/enterprise/profile_management/profile_management_navigation_throttle.cc +--- chromium-119.0.6045.59/chrome/browser/enterprise/profile_management/profile_management_navigation_throttle.cc.no_matching_constructor 2023-10-26 18:16:57.000000000 +0200 ++++ chromium-119.0.6045.59/chrome/browser/enterprise/profile_management/profile_management_navigation_throttle.cc 2023-10-30 16:51:02.267151412 +0100 +@@ -67,8 +67,8 @@ base::flat_map<std::string, SAMLProfileA + // TODO(crbug.com/1445072): Add actual domains with attribute names. + profile_attributes->insert(std::make_pair( + "supported.test", +- SAMLProfileAttributes("placeholderName", "placeholderDomain", +- "placeholderToken"))); ++ SAMLProfileAttributes{"placeholderName", "placeholderDomain", ++ "placeholderToken"})); + + // Extract domains and attributes from the command line switch. + const base::CommandLine& command_line = +diff -up chromium-119.0.6045.59/chrome/browser/ui/omnibox/chrome_omnibox_client.cc.no_matching_constructor chromium-119.0.6045.59/chrome/browser/ui/omnibox/chrome_omnibox_client.cc +--- chromium-119.0.6045.59/chrome/browser/ui/omnibox/chrome_omnibox_client.cc.no_matching_constructor 2023-10-26 18:17:00.000000000 +0200 ++++ chromium-119.0.6045.59/chrome/browser/ui/omnibox/chrome_omnibox_client.cc 2023-10-30 16:51:02.262151288 +0100 +@@ -474,10 +474,10 @@ void ChromeOmniboxClient::OnAutocomplete + alternative_nav_match); + + // Store the details necessary to open the omnibox match via browser commands. +- location_bar_->set_navigation_params(LocationBar::NavigationParams( ++ location_bar_->set_navigation_params(LocationBar::NavigationParams{ + destination_url, disposition, transition, match_selection_timestamp, + destination_url_entered_without_scheme, +- destination_url_entered_with_http_scheme)); ++ destination_url_entered_with_http_scheme}); + + if (browser_) { + auto navigation = chrome::OpenCurrentURL(browser_); +diff -up chromium-119.0.6045.59/chrome/test/chromedriver/capabilities.cc.no_matching_constructor chromium-119.0.6045.59/chrome/test/chromedriver/capabilities.cc +--- chromium-119.0.6045.59/chrome/test/chromedriver/capabilities.cc.no_matching_constructor 2023-10-26 18:17:01.000000000 +0200 ++++ chromium-119.0.6045.59/chrome/test/chromedriver/capabilities.cc 2023-10-30 16:51:02.268151437 +0100 +@@ -346,7 +346,7 @@ Status ParseMobileEmulation(const base:: + "'version' field of type string"); + } + +- brands.emplace_back(*brand, *version); ++ brands.emplace_back() = {*brand, *version}; + } + + client_hints.brands = std::move(brands); +@@ -384,7 +384,7 @@ Status ParseMobileEmulation(const base:: + "a 'version' field of type string"); + } + +- full_version_list.emplace_back(*brand, *version); ++ full_version_list.emplace_back() = {*brand, *version}; + } + + client_hints.full_version_list = std::move(full_version_list); +diff -up chromium-119.0.6045.59/components/autofill/core/browser/contact_info_sync_util.cc.no_matching_constructor chromium-119.0.6045.59/components/autofill/core/browser/contact_info_sync_util.cc +--- chromium-119.0.6045.59/components/autofill/core/browser/contact_info_sync_util.cc.no_matching_constructor 2023-10-30 16:51:02.273151562 +0100 ++++ chromium-119.0.6045.59/components/autofill/core/browser/contact_info_sync_util.cc 2023-10-30 17:41:12.685887538 +0100 +@@ -195,9 +195,9 @@ class ContactInfoProfileSetter { + CHECK(observations.empty()); + for (const sync_pb::ContactInfoSpecifics::Observation& proto_observation : + metadata.observations()) { +- observations.emplace_back(proto_observation.type(), ++ observations.emplace_back() = {static_cast<unsigned char>(proto_observation.type()), + ProfileTokenQuality::FormSignatureHash( +- proto_observation.form_hash())); ++ proto_observation.form_hash())}; + } + } + } +diff -up chromium-119.0.6045.59/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc.no_matching_constructor chromium-119.0.6045.59/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc +--- chromium-119.0.6045.59/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc.no_matching_constructor 2023-10-26 18:17:12.000000000 +0200 ++++ chromium-119.0.6045.59/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc 2023-10-30 16:51:02.260151238 +0100 +@@ -1530,7 +1530,7 @@ void SkiaOutputSurfaceImplOnGpu::CopyOut + + // Issue readbacks from the surfaces: + for (size_t i = 0; i < CopyOutputResult::kNV12MaxPlanes; ++i) { +- SkISize size(plane_surfaces[i]->width(), plane_surfaces[i]->height()); ++ SkISize size{plane_surfaces[i]->width(), plane_surfaces[i]->height()}; + SkImageInfo dst_info = SkImageInfo::Make( + size, (i == 0) ? kAlpha_8_SkColorType : kR8G8_unorm_SkColorType, + kUnpremul_SkAlphaType); +diff -up chromium-119.0.6045.59/content/browser/download/save_package.cc.no_matching_constructor chromium-119.0.6045.59/content/browser/download/save_package.cc +--- chromium-119.0.6045.59/content/browser/download/save_package.cc.no_matching_constructor 2023-10-26 18:17:12.000000000 +0200 ++++ chromium-119.0.6045.59/content/browser/download/save_package.cc 2023-10-30 16:51:02.271151512 +0100 +@@ -769,8 +769,8 @@ void SavePackage::Finish() { + if (download_) { + std::vector<download::DownloadSaveItemData::ItemInfo> files; + for (auto& item : saved_success_items_) { +- files.emplace_back(item.second->full_path(), item.second->url(), +- item.second->referrer().url); ++ files.emplace_back() = {item.second->full_path(), item.second->url(), ++ item.second->referrer().url}; + } + download::DownloadSaveItemData::AttachItemData(download_, std::move(files)); + } +diff -up chromium-119.0.6045.59/content/browser/renderer_host/render_frame_host_impl.cc.no_matching_constructor chromium-119.0.6045.59/content/browser/renderer_host/render_frame_host_impl.cc +--- chromium-119.0.6045.59/content/browser/renderer_host/render_frame_host_impl.cc.no_matching_constructor 2023-10-26 18:17:12.000000000 +0200 ++++ chromium-119.0.6045.59/content/browser/renderer_host/render_frame_host_impl.cc 2023-10-30 17:38:09.351389984 +0100 +@@ -8567,7 +8567,7 @@ void RenderFrameHostImpl::SendFencedFram + for (const blink::FencedFrame::ReportingDestination& destination : + destinations) { + SendFencedFrameReportingBeaconInternal( +- DestinationEnumEvent(event_type, event_data), destination, ++ DestinationEnumEvent{event_type, event_data}, destination, + /*from_renderer=*/true, attribution_reporting_runtime_features, + GetFrameTreeNodeId()); + } +@@ -8603,7 +8603,7 @@ void RenderFrameHostImpl::SendFencedFram + } + + SendFencedFrameReportingBeaconInternal( +- DestinationURLEvent(destination_url), ++ DestinationURLEvent{destination_url}, + blink::FencedFrame::ReportingDestination::kBuyer, + /*from_renderer=*/true, attribution_reporting_runtime_features, + GetFrameTreeNodeId()); +@@ -8703,8 +8703,8 @@ void RenderFrameHostImpl::MaybeSendFence + data = info->data; + } + initiator_rfh->SendFencedFrameReportingBeaconInternal( +- DestinationEnumEvent(blink::kFencedFrameTopNavigationBeaconType, +- data), ++ DestinationEnumEvent{blink::kFencedFrameTopNavigationBeaconType, ++ data}, + destination, + /*from_renderer=*/false, attribution_reporting_features, + GetFrameTreeNodeId(), navigation_request.GetNavigationId()); +@@ -8717,8 +8717,8 @@ void RenderFrameHostImpl::MaybeSendFence + for (blink::FencedFrame::ReportingDestination destination : + info->destinations) { + initiator_rfh->SendFencedFrameReportingBeaconInternal( +- DestinationEnumEvent(blink::kFencedFrameTopNavigationBeaconType, +- info->data), ++ DestinationEnumEvent{blink::kFencedFrameTopNavigationBeaconType, ++ info->data}, + destination, + /*from_renderer=*/false, info->attribution_reporting_runtime_features, + GetFrameTreeNodeId(), navigation_request.GetNavigationId()); +diff -up chromium-119.0.6045.59/third_party/blink/renderer/platform/fonts/font_palette.h.no_matching_constructor chromium-119.0.6045.59/third_party/blink/renderer/platform/fonts/font_palette.h +--- chromium-119.0.6045.59/third_party/blink/renderer/platform/fonts/font_palette.h.no_matching_constructor 2023-10-26 18:17:24.000000000 +0200 ++++ chromium-119.0.6045.59/third_party/blink/renderer/platform/fonts/font_palette.h 2023-10-30 16:51:02.262151288 +0100 +@@ -96,7 +96,7 @@ class PLATFORM_EXPORT FontPalette : publ + Color::ColorSpace color_interpolation_space, + absl::optional<Color::HueInterpolationMethod> hue_interpolation_method) { + return base::AdoptRef(new FontPalette( +- start, end, NonNormalizedPercentages(start_percentage, end_percentage), ++ start, end, NonNormalizedPercentages{start_percentage, end_percentage}, + normalized_percentage, alpha_multiplier, color_interpolation_space, + hue_interpolation_method)); + } +@@ -170,7 +170,7 @@ class PLATFORM_EXPORT FontPalette : publ + double normalized_percentage) { + double end_percentage = normalized_percentage * 100.0; + double start_percentage = 100.0 - end_percentage; +- return NonNormalizedPercentages(start_percentage, end_percentage); ++ return NonNormalizedPercentages{start_percentage, end_percentage}; + } + + double GetAlphaMultiplier() const { +diff -up chromium-119.0.6045.59/third_party/blink/renderer/platform/fonts/palette_interpolation.cc.no_matching_constructor chromium-119.0.6045.59/third_party/blink/renderer/platform/fonts/palette_interpolation.cc +--- chromium-119.0.6045.59/third_party/blink/renderer/platform/fonts/palette_interpolation.cc.no_matching_constructor 2023-10-26 18:17:24.000000000 +0200 ++++ chromium-119.0.6045.59/third_party/blink/renderer/platform/fonts/palette_interpolation.cc 2023-10-30 16:51:02.261151263 +0100 +@@ -31,7 +31,7 @@ Vector<FontPalette::FontPaletteOverride> + color_interpolation_space, hue_interpolation_method, start_color, + end_color, percentage, alpha_multiplier); + +- FontPalette::FontPaletteOverride result_color_record(i, result_color); ++ FontPalette::FontPaletteOverride result_color_record{static_cast<int>(i), result_color}; + result_color_records.push_back(result_color_record); + } + return result_color_records; +diff -up chromium-119.0.6045.59/ui/gtk/gtk_ui.cc.no_matching_constructor chromium-119.0.6045.59/ui/gtk/gtk_ui.cc +--- chromium-119.0.6045.59/ui/gtk/gtk_ui.cc.no_matching_constructor 2023-10-26 18:18:14.000000000 +0200 ++++ chromium-119.0.6045.59/ui/gtk/gtk_ui.cc 2023-10-30 16:51:02.272151537 +0100 +@@ -993,11 +993,11 @@ ui::DisplayConfig GtkUi::GetDisplayConfi + GdkRectangle geometry; + gdk_monitor_get_geometry(monitor, &geometry); + int monitor_scale = std::max(1, gdk_monitor_get_scale_factor(monitor)); +- config.display_geometries.emplace_back( ++ config.display_geometries.emplace_back() = { + gfx::Rect(monitor_scale * geometry.x, monitor_scale * geometry.y, + monitor_scale * geometry.width, + monitor_scale * geometry.height), +- monitor_scale * font_scale); ++ static_cast<float>(monitor_scale * font_scale)}; + } + return config; + } +diff -up chromium-119.0.6045.59/base/metrics/persistent_histogram_allocator.cc.me chromium-119.0.6045.59/base/metrics/persistent_histogram_allocator.cc +--- chromium-119.0.6045.59/base/metrics/persistent_histogram_allocator.cc.me 2023-10-31 18:14:49.275728099 +0100 ++++ chromium-119.0.6045.59/base/metrics/persistent_histogram_allocator.cc 2023-10-31 18:19:54.599223239 +0100 +@@ -221,13 +221,13 @@ PersistentSparseHistogramDataManager::Lo + // The sample-record could be for any sparse histogram. Add the reference + // to the appropriate collection for later use. + if (found_id == match_id) { +- found_records.emplace_back(ref, value); ++ found_records.emplace_back() = {ref, value}; + found = true; + } else { + std::vector<ReferenceAndSample>* samples = + GetSampleMapRecordsWhileLocked(found_id); + CHECK(samples); +- samples->emplace_back(ref, value); ++ samples->emplace_back() = {ref, value}; + } + } + +diff -up chromium-119.0.6045.59/net/dns/host_resolver_cache.cc.me chromium-119.0.6045.59/net/dns/host_resolver_cache.cc +--- chromium-119.0.6045.59/net/dns/host_resolver_cache.cc.me 2023-10-31 20:48:19.153868338 +0100 ++++ chromium-119.0.6045.59/net/dns/host_resolver_cache.cc 2023-10-31 20:51:37.634526549 +0100 +@@ -368,7 +368,7 @@ void HostResolverCache::Set( + + std::string domain_name = result->domain_name(); + entries_.emplace( +- Key(std::move(domain_name), network_anonymization_key), ++ Key{std::move(domain_name), network_anonymization_key}, + Entry(std::move(result), source, secure, staleness_generation)); + + if (entries_.size() > max_entries_) { +diff -up chromium-119.0.6045.59/components/autofill/core/browser/webdata/autofill_table.cc.me chromium-119.0.6045.59/components/autofill/core/browser/webdata/autofill_table.cc +--- chromium-119.0.6045.59/components/autofill/core/browser/webdata/autofill_table.cc.me 2023-10-31 22:32:58.995997897 +0100 ++++ chromium-119.0.6045.59/components/autofill/core/browser/webdata/autofill_table.cc 2023-10-31 22:33:28.290520601 +0100 +@@ -1733,10 +1733,10 @@ std::unique_ptr<AutofillProfile> Autofil + } + + base::span<const uint8_t> observations_data = s.ColumnBlob(3); +- field_type_values.emplace_back( ++ field_type_values.emplace_back() = { + type, s.ColumnString16(1), s.ColumnInt(2), + std::vector<uint8_t>(observations_data.begin(), +- observations_data.end())); ++ observations_data.end())}; + + if (type == ADDRESS_HOME_COUNTRY) { + country_code = base::UTF16ToUTF8(s.ColumnString16(1)); +diff -up chromium-119.0.6045.59/components/password_manager/core/browser/password_manager.cc.than chromium-119.0.6045.59/components/password_manager/core/browser/password_manager.cc +--- chromium-119.0.6045.59/components/password_manager/core/browser/password_manager.cc.than 2023-10-31 22:41:22.850233005 +0100 ++++ chromium-119.0.6045.59/components/password_manager/core/browser/password_manager.cc 2023-10-31 22:42:37.276931933 +0100 +@@ -625,7 +625,7 @@ void PasswordManager::OnUserModifiedNonP + // |driver| might be empty on iOS or in tests. + int driver_id = driver ? driver->GetId() : 0; + possible_usernames_.Put( +- PossibleUsernameFieldIdentifier(driver_id, renderer_id), ++ PossibleUsernameFieldIdentifier{driver_id, renderer_id}, + PossibleUsernameData(GetSignonRealm(driver->GetLastCommittedURL()), + renderer_id, value, base::Time::Now(), driver_id, + autocomplete_attribute_has_username, is_likely_otp)); +diff -up chromium-119.0.6045.59/content/browser/interest_group/interest_group_storage.cc.than chromium-119.0.6045.59/content/browser/interest_group/interest_group_storage.cc +--- chromium-119.0.6045.59/content/browser/interest_group/interest_group_storage.cc.than 2023-10-31 23:31:08.438267908 +0100 ++++ chromium-119.0.6045.59/content/browser/interest_group/interest_group_storage.cc 2023-10-31 23:32:08.979358711 +0100 +@@ -2854,10 +2854,10 @@ DoGetKAnonymityData(sql::Database& db, + + std::vector<StorageInterestGroup::KAnonymityData> k_anon_data; + while (interest_group_kanon_query.Step()) { +- k_anon_data.emplace_back( ++ k_anon_data.emplace_back() = { + /*key=*/interest_group_kanon_query.ColumnString(0), + /*is_k_anonymous=*/interest_group_kanon_query.ColumnBool(1), +- /*last_updated=*/interest_group_kanon_query.ColumnTime(2)); ++ /*last_updated=*/interest_group_kanon_query.ColumnTime(2)}; + } + if (!interest_group_kanon_query.Succeeded()) { + return absl::nullopt; +diff -up chromium-119.0.6045.59/content/browser/webid/federated_auth_request_impl.cc.than chromium-119.0.6045.59/content/browser/webid/federated_auth_request_impl.cc +--- chromium-119.0.6045.59/content/browser/webid/federated_auth_request_impl.cc.than 2023-11-01 11:19:42.745395797 +0100 ++++ chromium-119.0.6045.59/content/browser/webid/federated_auth_request_impl.cc 2023-11-01 11:22:16.670920679 +0100 +@@ -1881,7 +1881,7 @@ void FederatedAuthRequestImpl::ShowError + base::BindOnce(&FederatedAuthRequestImpl::CompleteRequestWithError, + weak_ptr_factory_.GetWeakPtr())); + absl::optional<TokenError> token_error = +- error ? absl::make_optional<TokenError>(error->code, error->url) ++ error ? absl::make_optional<TokenError>({error->code, error->url}) + : absl::nullopt; + + // TODO(crbug.com/1485710): Refactor IdentityCredentialTokenError +--- chromium-119.0.6045.59/ui/base/wayland/color_manager_util.h.no_matching_constructor 2023-10-26 18:18:14.000000000 +0200 ++++ chromium-119.0.6045.59/ui/base/wayland/color_manager_util.h 2023-11-01 17:29:54.269820415 +0100 +@@ -52,53 +52,53 @@ + zcr_color_manager_v1_chromaticity_names, + PrimaryVersion>( + {{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT601_525_LINE, +- PrimaryVersion(gfx::ColorSpace::PrimaryID::SMPTE170M, +- kDefaultSinceVersion)}, ++ PrimaryVersion{gfx::ColorSpace::PrimaryID::SMPTE170M, ++ kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT601_625_LINE, +- PrimaryVersion(gfx::ColorSpace::PrimaryID::BT470BG, +- kDefaultSinceVersion)}, ++ PrimaryVersion{gfx::ColorSpace::PrimaryID::BT470BG, ++ kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTE170M, +- PrimaryVersion(gfx::ColorSpace::PrimaryID::SMPTE170M, +- kDefaultSinceVersion)}, ++ PrimaryVersion{gfx::ColorSpace::PrimaryID::SMPTE170M, ++ kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT709, +- PrimaryVersion(gfx::ColorSpace::PrimaryID::BT709, kDefaultSinceVersion)}, ++ PrimaryVersion{gfx::ColorSpace::PrimaryID::BT709, kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT2020, +- PrimaryVersion(gfx::ColorSpace::PrimaryID::BT2020, kDefaultSinceVersion)}, ++ PrimaryVersion{gfx::ColorSpace::PrimaryID::BT2020, kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SRGB, +- PrimaryVersion(gfx::ColorSpace::PrimaryID::BT709, kDefaultSinceVersion)}, ++ PrimaryVersion{gfx::ColorSpace::PrimaryID::BT709, kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_DISPLAYP3, +- PrimaryVersion(gfx::ColorSpace::PrimaryID::P3, kDefaultSinceVersion)}, ++ PrimaryVersion{gfx::ColorSpace::PrimaryID::P3, kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_ADOBERGB, +- PrimaryVersion(gfx::ColorSpace::PrimaryID::ADOBE_RGB, +- kDefaultSinceVersion)}, ++ PrimaryVersion{gfx::ColorSpace::PrimaryID::ADOBE_RGB, ++ kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_WIDE_GAMUT_COLOR_SPIN, +- PrimaryVersion( ++ PrimaryVersion{ + gfx::ColorSpace::PrimaryID::WIDE_GAMUT_COLOR_SPIN, +- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_WIDE_GAMUT_COLOR_SPIN_SINCE_VERSION)}, ++ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_WIDE_GAMUT_COLOR_SPIN_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT470M, +- PrimaryVersion( ++ PrimaryVersion{ + gfx::ColorSpace::PrimaryID::BT470M, +- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT470M_SINCE_VERSION)}, ++ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT470M_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTE240M, +- PrimaryVersion( ++ PrimaryVersion{ + gfx::ColorSpace::PrimaryID::SMPTE240M, +- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTE240M_SINCE_VERSION)}, ++ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTE240M_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_XYZ_D50, +- PrimaryVersion( ++ PrimaryVersion{ + gfx::ColorSpace::PrimaryID::XYZ_D50, +- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_XYZ_D50_SINCE_VERSION)}, ++ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_XYZ_D50_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST428_1, +- PrimaryVersion( ++ PrimaryVersion{ + gfx::ColorSpace::PrimaryID::SMPTEST428_1, +- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST428_1_SINCE_VERSION)}, ++ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST428_1_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST431_2, +- PrimaryVersion( ++ PrimaryVersion{ + gfx::ColorSpace::PrimaryID::SMPTEST431_2, +- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST431_2_SINCE_VERSION)}, ++ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST431_2_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_FILM, +- PrimaryVersion( ++ PrimaryVersion{ + gfx::ColorSpace::PrimaryID::FILM, +- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_FILM_SINCE_VERSION)}}); ++ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_FILM_SINCE_VERSION}}}); + + // A map from the zcr_color_manager_v1 eotf_names enum values + // representing well-known EOTFs, to their equivalent TransferIDs. +@@ -107,68 +107,68 @@ + zcr_color_manager_v1_eotf_names, + TransferVersion>({ + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LINEAR, +- TransferVersion(gfx::ColorSpace::TransferID::LINEAR, +- kDefaultSinceVersion)}, ++ TransferVersion{gfx::ColorSpace::TransferID::LINEAR, ++ kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB, +- TransferVersion(gfx::ColorSpace::TransferID::SRGB, kDefaultSinceVersion)}, ++ TransferVersion{gfx::ColorSpace::TransferID::SRGB, kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB_HDR, +- TransferVersion(gfx::ColorSpace::TransferID::SRGB_HDR, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB_HDR_SINCE_VERSION)}, ++ TransferVersion{gfx::ColorSpace::TransferID::SRGB_HDR, ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB_HDR_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709, +- TransferVersion(gfx::ColorSpace::TransferID::BT709, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709_SINCE_VERSION)}, ++ TransferVersion{gfx::ColorSpace::TransferID::BT709, ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2087, +- TransferVersion(gfx::ColorSpace::TransferID::GAMMA24, +- kDefaultSinceVersion)}, ++ TransferVersion{gfx::ColorSpace::TransferID::GAMMA24, ++ kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_ADOBERGB, + // This is ever so slightly inaccurate. The number ought to be + // 2.19921875f, not 2.2 +- TransferVersion(gfx::ColorSpace::TransferID::GAMMA22, +- kDefaultSinceVersion)}, ++ TransferVersion{gfx::ColorSpace::TransferID::GAMMA22, ++ kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_PQ, +- TransferVersion(gfx::ColorSpace::TransferID::PQ, kDefaultSinceVersion)}, ++ TransferVersion{gfx::ColorSpace::TransferID::PQ, kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG, +- TransferVersion(gfx::ColorSpace::TransferID::HLG, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG_SINCE_VERSION)}, ++ TransferVersion{gfx::ColorSpace::TransferID::HLG, ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE170M, +- TransferVersion(gfx::ColorSpace::TransferID::SMPTE170M, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE170M_SINCE_VERSION)}, ++ TransferVersion{gfx::ColorSpace::TransferID::SMPTE170M, ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE170M_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE240M, +- TransferVersion(gfx::ColorSpace::TransferID::SMPTE240M, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE240M_SINCE_VERSION)}, ++ TransferVersion{gfx::ColorSpace::TransferID::SMPTE240M, ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE240M_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTEST428_1, +- TransferVersion( ++ TransferVersion{ + gfx::ColorSpace::TransferID::SMPTEST428_1, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTEST428_1_SINCE_VERSION)}, ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTEST428_1_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG, +- TransferVersion(gfx::ColorSpace::TransferID::LOG, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG_SINCE_VERSION)}, ++ TransferVersion{gfx::ColorSpace::TransferID::LOG, ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG_SQRT, +- TransferVersion(gfx::ColorSpace::TransferID::LOG_SQRT, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG_SQRT_SINCE_VERSION)}, ++ TransferVersion{gfx::ColorSpace::TransferID::LOG_SQRT, ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG_SQRT_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_IEC61966_2_4, +- TransferVersion( ++ TransferVersion{ + gfx::ColorSpace::TransferID::IEC61966_2_4, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_IEC61966_2_4_SINCE_VERSION)}, ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_IEC61966_2_4_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT1361_ECG, +- TransferVersion(gfx::ColorSpace::TransferID::BT1361_ECG, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT1361_ECG_SINCE_VERSION)}, ++ TransferVersion{gfx::ColorSpace::TransferID::BT1361_ECG, ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT1361_ECG_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_10, +- TransferVersion(gfx::ColorSpace::TransferID::BT2020_10, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_10_SINCE_VERSION)}, ++ TransferVersion{gfx::ColorSpace::TransferID::BT2020_10, ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_10_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_12, +- TransferVersion(gfx::ColorSpace::TransferID::BT2020_12, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_12_SINCE_VERSION)}, ++ TransferVersion{gfx::ColorSpace::TransferID::BT2020_12, ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_12_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SCRGB_LINEAR_80_NITS, +- TransferVersion( ++ TransferVersion{ + gfx::ColorSpace::TransferID::SCRGB_LINEAR_80_NITS, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SCRGB_LINEAR_80_NITS_SINCE_VERSION)}, ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SCRGB_LINEAR_80_NITS_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA18, +- TransferVersion(gfx::ColorSpace::TransferID::GAMMA18, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA18_SINCE_VERSION)}, ++ TransferVersion{gfx::ColorSpace::TransferID::GAMMA18, ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA18_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA28, +- TransferVersion(gfx::ColorSpace::TransferID::GAMMA28, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA28_SINCE_VERSION)}, ++ TransferVersion{gfx::ColorSpace::TransferID::GAMMA28, ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA28_SINCE_VERSION}}, + }); + + // A map from the SDR zcr_color_manager_v1 eotf_names enum values +@@ -177,18 +177,18 @@ + constexpr auto kTransferMap = + base::MakeFixedFlatMap<zcr_color_manager_v1_eotf_names, TransferFnVersion>({ + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LINEAR, +- TransferFnVersion(SkNamedTransferFn::kLinear, kDefaultSinceVersion)}, ++ TransferFnVersion{SkNamedTransferFn::kLinear, kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB, +- TransferFnVersion(SkNamedTransferFnExt::kSRGB, kDefaultSinceVersion)}, ++ TransferFnVersion{SkNamedTransferFnExt::kSRGB, kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709, +- TransferFnVersion( ++ TransferFnVersion{ + SkNamedTransferFnExt::kRec709, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709_SINCE_VERSION)}, ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2087, +- TransferFnVersion(gamma24, kDefaultSinceVersion)}, ++ TransferFnVersion{gamma24, kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_ADOBERGB, +- TransferFnVersion(SkNamedTransferFnExt::kA98RGB, +- kDefaultSinceVersion)}, ++ TransferFnVersion{SkNamedTransferFnExt::kA98RGB, ++ kDefaultSinceVersion}}, + }); + + // A map from the HDR zcr_color_manager_v1 eotf_names enum values +@@ -197,70 +197,70 @@ + constexpr auto kHDRTransferMap = + base::MakeFixedFlatMap<zcr_color_manager_v1_eotf_names, TransferFnVersion>( + {{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LINEAR, +- TransferFnVersion(SkNamedTransferFn::kLinear, kDefaultSinceVersion)}, ++ TransferFnVersion{SkNamedTransferFn::kLinear, kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB_HDR, +- TransferFnVersion( ++ TransferFnVersion{ + SkNamedTransferFnExt::kSRGB, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB_HDR_SINCE_VERSION)}, ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB_HDR_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_PQ, +- TransferFnVersion(SkNamedTransferFn::kPQ, kDefaultSinceVersion)}, ++ TransferFnVersion{SkNamedTransferFn::kPQ, kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG, +- TransferFnVersion(SkNamedTransferFn::kHLG, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG_SINCE_VERSION)}, ++ TransferFnVersion{SkNamedTransferFn::kHLG, ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_EOTF_NAMES_EXTENDEDSRGB10, +- TransferFnVersion( ++ TransferFnVersion{ + SkNamedTransferFnExt::kSRGBExtended1023Over510, +- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_EXTENDEDSRGB10_SINCE_VERSION)}}); ++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_EXTENDEDSRGB10_SINCE_VERSION}}}); + + // A map from zcr_color_manager_v1 matrix_names enum values to + // gfx::ColorSpace::MatrixIDs. + constexpr auto kMatrixMap = + base::MakeFixedFlatMap<zcr_color_manager_v1_matrix_names, MatrixVersion>( + {{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_RGB, +- MatrixVersion(gfx::ColorSpace::MatrixID::RGB, kDefaultSinceVersion)}, ++ MatrixVersion{gfx::ColorSpace::MatrixID::RGB, kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT709, +- MatrixVersion(gfx::ColorSpace::MatrixID::BT709, +- kDefaultSinceVersion)}, ++ MatrixVersion{gfx::ColorSpace::MatrixID::BT709, ++ kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT470BG, +- MatrixVersion( ++ MatrixVersion{ + gfx::ColorSpace::MatrixID::BT470BG, +- ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT470BG_SINCE_VERSION)}, ++ ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT470BG_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT2020_NCL, +- MatrixVersion(gfx::ColorSpace::MatrixID::BT2020_NCL, +- kDefaultSinceVersion)}, ++ MatrixVersion{gfx::ColorSpace::MatrixID::BT2020_NCL, ++ kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT2020_CL, +- MatrixVersion(gfx::ColorSpace::MatrixID::BT2020_CL, +- kDefaultSinceVersion)}, ++ MatrixVersion{gfx::ColorSpace::MatrixID::BT2020_CL, ++ kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_FCC, +- MatrixVersion(gfx::ColorSpace::MatrixID::FCC, kDefaultSinceVersion)}, ++ MatrixVersion{gfx::ColorSpace::MatrixID::FCC, kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YCOCG, +- MatrixVersion(gfx::ColorSpace::MatrixID::YCOCG, +- ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YCOCG_SINCE_VERSION)}, ++ MatrixVersion{gfx::ColorSpace::MatrixID::YCOCG, ++ ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YCOCG_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YDZDX, +- MatrixVersion(gfx::ColorSpace::MatrixID::YDZDX, +- ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YDZDX_SINCE_VERSION)}, ++ MatrixVersion{gfx::ColorSpace::MatrixID::YDZDX, ++ ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YDZDX_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_GBR, +- MatrixVersion(gfx::ColorSpace::MatrixID::GBR, +- ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_GBR_SINCE_VERSION)}, ++ MatrixVersion{gfx::ColorSpace::MatrixID::GBR, ++ ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_GBR_SINCE_VERSION}}, + {ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_SMPTE170M, +- MatrixVersion(gfx::ColorSpace::MatrixID::SMPTE170M, +- kDefaultSinceVersion)}, ++ MatrixVersion{gfx::ColorSpace::MatrixID::SMPTE170M, ++ kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_SMPTE240M, +- MatrixVersion(gfx::ColorSpace::MatrixID::SMPTE240M, +- kDefaultSinceVersion)}}); ++ MatrixVersion{gfx::ColorSpace::MatrixID::SMPTE240M, ++ kDefaultSinceVersion}}}); + + // A map from zcr_color_manager_v1 range_names enum values to + // gfx::ColorSpace::RangeIDs. + constexpr auto kRangeMap = + base::MakeFixedFlatMap<zcr_color_manager_v1_range_names, RangeVersion>( + {{ZCR_COLOR_MANAGER_V1_RANGE_NAMES_LIMITED, +- RangeVersion(gfx::ColorSpace::RangeID::LIMITED, +- kDefaultSinceVersion)}, ++ RangeVersion{gfx::ColorSpace::RangeID::LIMITED, ++ kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_RANGE_NAMES_FULL, +- RangeVersion(gfx::ColorSpace::RangeID::FULL, kDefaultSinceVersion)}, ++ RangeVersion{gfx::ColorSpace::RangeID::FULL, kDefaultSinceVersion}}, + {ZCR_COLOR_MANAGER_V1_RANGE_NAMES_DERIVED, +- RangeVersion(gfx::ColorSpace::RangeID::DERIVED, +- kDefaultSinceVersion)}}); ++ RangeVersion{gfx::ColorSpace::RangeID::DERIVED, ++ kDefaultSinceVersion}}}); + + zcr_color_manager_v1_chromaticity_names ToColorManagerChromaticity( + gfx::ColorSpace::PrimaryID primaryID, +@@ -283,4 +283,4 @@ + + } // namespace ui::wayland + +-#endif // UI_BASE_WAYLAND_COLOR_MANAGER_UTIL_H_ +\ Kein Zeilenumbruch am Dateiende. ++#endif // UI_BASE_WAYLAND_COLOR_MANAGER_UTIL_H_ +diff -up chromium-119.0.6045.59/chrome/browser/ui/views/permissions/embedded_permission_prompt_previously_granted_view.cc.me chromium-119.0.6045.59/chrome/browser/ui/views/permissions/embedded_permission_prompt_previously_granted_view.cc +--- chromium-119.0.6045.59/chrome/browser/ui/views/permissions/embedded_permission_prompt_previously_granted_view.cc.me 2023-11-01 20:46:15.997861278 +0100 ++++ chromium-119.0.6045.59/chrome/browser/ui/views/permissions/embedded_permission_prompt_previously_granted_view.cc 2023-11-01 20:49:33.603371680 +0100 +@@ -58,13 +58,13 @@ EmbeddedPermissionPromptPreviouslyGrante + std::vector<EmbeddedPermissionPromptPreviouslyGrantedView::ButtonConfiguration> + EmbeddedPermissionPromptPreviouslyGrantedView::GetButtonsConfiguration() { + std::vector<ButtonConfiguration> buttons; +- buttons.emplace_back( ++ buttons.emplace_back() = { + l10n_util::GetStringUTF16(IDS_EMBEDDED_PROMPT_CONTINUE_ALLOWING), +- ButtonType::kContinueAllowing, ui::ButtonStyle::kTonal); ++ ButtonType::kContinueAllowing, ui::ButtonStyle::kTonal}; + +- buttons.emplace_back( ++ buttons.emplace_back() = { + l10n_util::GetStringUTF16(IDS_EMBEDDED_PROMPT_STOP_ALLOWING), +- ButtonType::kStopAllowing, ui::ButtonStyle::kTonal); ++ ButtonType::kStopAllowing, ui::ButtonStyle::kTonal}; + return buttons; + } + +diff -up chromium-119.0.6045.59/chrome/browser/ui/views/permissions/embedded_permission_prompt_ask_view.cc.than chromium-119.0.6045.59/chrome/browser/ui/views/permissions/embedded_permission_prompt_ask_view.cc +--- chromium-119.0.6045.59/chrome/browser/ui/views/permissions/embedded_permission_prompt_ask_view.cc.than 2023-11-01 20:52:29.005464494 +0100 ++++ chromium-119.0.6045.59/chrome/browser/ui/views/permissions/embedded_permission_prompt_ask_view.cc 2023-11-01 21:14:12.741859604 +0100 +@@ -56,12 +56,12 @@ std::vector<EmbeddedPermissionPromptAskV + EmbeddedPermissionPromptAskView::GetButtonsConfiguration() { + std::vector<ButtonConfiguration> buttons; + if (base::FeatureList::IsEnabled(permissions::features::kOneTimePermission)) { +- buttons.emplace_back( ++ buttons.emplace_back() = { + l10n_util::GetStringUTF16(IDS_PERMISSION_ALLOW_THIS_TIME), +- ButtonType::kAllowThisTime, ui::ButtonStyle::kTonal); ++ ButtonType::kAllowThisTime, ui::ButtonStyle::kTonal}; + } +- buttons.emplace_back(l10n_util::GetStringUTF16(IDS_PERMISSION_ALLOW), +- ButtonType::kAllow, ui::ButtonStyle::kTonal); ++ buttons.emplace_back() = {l10n_util::GetStringUTF16(IDS_PERMISSION_ALLOW), ++ ButtonType::kAllow, ui::ButtonStyle::kTonal}; + return buttons; + } + +diff -up chromium-119.0.6045.59/chrome/browser/ui/views/permissions/embedded_permission_prompt_base_view.h.me chromium-119.0.6045.59/chrome/browser/ui/views/permissions/embedded_permission_prompt_base_view.h +--- chromium-119.0.6045.59/chrome/browser/ui/views/permissions/embedded_permission_prompt_base_view.h.me 2023-11-01 21:22:02.222646903 +0100 ++++ chromium-119.0.6045.59/chrome/browser/ui/views/permissions/embedded_permission_prompt_base_view.h 2023-11-01 21:19:58.769619393 +0100 +@@ -72,6 +72,7 @@ class EmbeddedPermissionPromptBaseView : + struct RequestLineConfiguration { + const raw_ptr<const gfx::VectorIcon> icon; + std::u16string message; ++ RequestLineConfiguration(auto i, auto m) : icon(i), message(m) { } + }; + + struct ButtonConfiguration { +diff -up chromium-119.0.6045.59/chrome/browser/ui/views/permissions/embedded_permission_prompt_policy_view.cc.than chromium-119.0.6045.59/chrome/browser/ui/views/permissions/embedded_permission_prompt_policy_view.cc +--- chromium-119.0.6045.59/chrome/browser/ui/views/permissions/embedded_permission_prompt_policy_view.cc.than 2023-11-01 21:25:31.118626473 +0100 ++++ chromium-119.0.6045.59/chrome/browser/ui/views/permissions/embedded_permission_prompt_policy_view.cc 2023-11-01 21:30:06.383340274 +0100 +@@ -48,8 +48,8 @@ EmbeddedPermissionPromptPolicyView::GetR + std::vector<EmbeddedPermissionPromptPolicyView::ButtonConfiguration> + EmbeddedPermissionPromptPolicyView::GetButtonsConfiguration() { + std::vector<ButtonConfiguration> buttons; +- buttons.emplace_back(l10n_util::GetStringUTF16(IDS_EMBEDDED_PROMPT_OK_LABEL), +- ButtonType::kPolicyOK, ui::ButtonStyle::kTonal); ++ buttons.emplace_back() = {l10n_util::GetStringUTF16(IDS_EMBEDDED_PROMPT_OK_LABEL), ++ ButtonType::kPolicyOK, ui::ButtonStyle::kTonal}; + return buttons; + } + diff --git a/chromium-119-norar.patch b/chromium-119-norar.patch new file mode 100644 index 0000000..51b7155 --- /dev/null +++ b/chromium-119-norar.patch @@ -0,0 +1,63 @@ +diff -up chromium-119.0.6045.105/chrome/browser/safe_browsing/download_protection/file_analyzer.cc.nounrar chromium-119.0.6045.105/chrome/browser/safe_browsing/download_protection/file_analyzer.cc +--- chromium-119.0.6045.105/chrome/browser/safe_browsing/download_protection/file_analyzer.cc.nounrar 2023-11-01 19:10:13.000000000 +0100 ++++ chromium-119.0.6045.105/chrome/browser/safe_browsing/download_protection/file_analyzer.cc 2023-11-06 17:16:55.630255973 +0100 +@@ -77,8 +77,6 @@ void FileAnalyzer::Start(const base::Fil + + if (inspection_type == DownloadFileType::ZIP) { + StartExtractZipFeatures(); +- } else if (inspection_type == DownloadFileType::RAR) { +- StartExtractRarFeatures(); + #if BUILDFLAG(IS_MAC) + } else if (inspection_type == DownloadFileType::DMG) { + StartExtractDmgFeatures(); +diff -up chromium-119.0.6045.105/chrome/common/safe_browsing/BUILD.gn.nounrar chromium-119.0.6045.105/chrome/common/safe_browsing/BUILD.gn +--- chromium-119.0.6045.105/chrome/common/safe_browsing/BUILD.gn.nounrar 2023-11-01 19:10:16.000000000 +0100 ++++ chromium-119.0.6045.105/chrome/common/safe_browsing/BUILD.gn 2023-11-06 17:16:55.630255973 +0100 +@@ -143,7 +143,6 @@ source_set("safe_browsing") { + "//components/safe_browsing/content/common:file_type_policies", + "//components/safe_browsing/core/common", + "//third_party/lzma_sdk/google:seven_zip_reader", +- "//third_party/unrar:unrar", + ] + + public_deps = [ +diff -up chromium-119.0.6045.105/chrome/services/file_util/safe_archive_analyzer.cc.nounrar chromium-119.0.6045.105/chrome/services/file_util/safe_archive_analyzer.cc +--- chromium-119.0.6045.105/chrome/services/file_util/safe_archive_analyzer.cc.nounrar 2023-11-06 18:07:30.549291823 +0100 ++++ chromium-119.0.6045.105/chrome/services/file_util/safe_archive_analyzer.cc 2023-11-06 18:08:00.510076945 +0100 +@@ -74,6 +74,7 @@ void SafeArchiveAnalyzer::AnalyzeRarFile + const absl::optional<std::string>& password, + mojo::PendingRemote<chrome::mojom::TemporaryFileGetter> temp_file_getter, + AnalyzeRarFileCallback callback) { ++#if 0 + DCHECK(rar_file.IsValid()); + temp_file_getter_.Bind(std::move(temp_file_getter)); + callback_ = std::move(callback); +@@ -90,6 +91,9 @@ void SafeArchiveAnalyzer::AnalyzeRarFile + /*password=*/password, + std::move(analysis_finished_callback), + std::move(temp_file_getter_callback), &results_); ++#else ++ NOTREACHED(); ++#endif + } + + void SafeArchiveAnalyzer::AnalyzeSevenZipFile( +diff -up chromium-119.0.6045.105/chrome/services/file_util/safe_archive_analyzer.h.nounrar chromium-119.0.6045.105/chrome/services/file_util/safe_archive_analyzer.h +--- chromium-119.0.6045.105/chrome/services/file_util/safe_archive_analyzer.h.nounrar 2023-11-01 19:10:16.000000000 +0100 ++++ chromium-119.0.6045.105/chrome/services/file_util/safe_archive_analyzer.h 2023-11-06 17:16:55.630255973 +0100 +@@ -7,7 +7,6 @@ + + #include "chrome/common/safe_browsing/archive_analyzer_results.h" + #include "chrome/services/file_util/public/mojom/safe_archive_analyzer.mojom.h" +-#include "chrome/utility/safe_browsing/rar_analyzer.h" + #include "chrome/utility/safe_browsing/seven_zip_analyzer.h" + #include "chrome/utility/safe_browsing/zip_analyzer.h" + #include "mojo/public/cpp/bindings/remote.h" +@@ -66,7 +65,6 @@ class SafeArchiveAnalyzer : public chrom + void Timeout(); + + safe_browsing::ZipAnalyzer zip_analyzer_; +- safe_browsing::RarAnalyzer rar_analyzer_; + safe_browsing::SevenZipAnalyzer seven_zip_analyzer_; + #if BUILDFLAG(IS_MAC) + safe_browsing::dmg::DMGAnalyzer dmg_analyzer_; diff --git a/chromium-119-nullptr_t-without-namespace-std.patch b/chromium-119-nullptr_t-without-namespace-std.patch new file mode 100644 index 0000000..5cb969f --- /dev/null +++ b/chromium-119-nullptr_t-without-namespace-std.patch @@ -0,0 +1,21 @@ +diff -up chromium-119.0.6045.59/third_party/blink/renderer/core/paint/fragment_data_iterator.h.me chromium-119.0.6045.59/third_party/blink/renderer/core/paint/fragment_data_iterator.h +--- chromium-119.0.6045.59/third_party/blink/renderer/core/paint/fragment_data_iterator.h.me 2023-10-27 20:07:16.421230815 +0200 ++++ chromium-119.0.6045.59/third_party/blink/renderer/core/paint/fragment_data_iterator.h 2023-10-27 20:07:36.883600085 +0200 +@@ -52,7 +52,7 @@ class FragmentDataIterator + public: + explicit FragmentDataIterator(const LayoutObject& object) + : FragmentDataIteratorBase(&object.FirstFragment()) {} +- explicit FragmentDataIterator(nullptr_t) ++ explicit FragmentDataIterator(std::nullptr_t) + : FragmentDataIteratorBase(nullptr) {} + }; + +@@ -63,7 +63,7 @@ class MutableFragmentDataIterator + explicit MutableFragmentDataIterator(const LayoutObject& object) + : FragmentDataIteratorBase( + &object.GetMutableForPainting().FirstFragment()) {} +- explicit MutableFragmentDataIterator(nullptr_t) ++ explicit MutableFragmentDataIterator(std::nullptr_t) + : FragmentDataIteratorBase(nullptr) {} + }; + diff --git a/chromium-119-nvidia-use-separate-bo-to-verify-modifier.patch b/chromium-119-nvidia-use-separate-bo-to-verify-modifier.patch new file mode 100644 index 0000000..717d897 --- /dev/null +++ b/chromium-119-nvidia-use-separate-bo-to-verify-modifier.patch @@ -0,0 +1,164 @@ +commit bdcc23e0a5e7e220660d3f54c97262f9a4c31606 +Author: Nick Diego Yamane <nickdiego@igalia.com> +Date: Thu Nov 2 17:26:25 2023 +0000 + + gbm: nvidia: use separate bo to verify modifiers + + Buggy Nvidia drivers fail to return FDs for planes of a BO which had + already an imported BO destroyed before. This is a workaround for that + issue, which consists of creating/destroying a separate 1x1 BO for + validating the modifiers before actually creating the final requested + BO, which for now is limited to IS_LINUX builds. + + The Nvidia driver bug is being tracked under internal bug 4315529. There + seems to be other issues when running under Wayland with Nvidia, which + will be tracked and addressed in separate patches. + + R=dcastagna, msisov@igalia.com + + with ozone/wayland backend and verify GPU acceleration is not broken. + + Test: In a single Nvidia GPU setup, with proprietary driver, run Chrome + Bug: 1273758, 1478684, 1463851 + Change-Id: I9f322bcf40b460bcd4ead02f05dd2e9a8d271cea + Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4989782 + Reviewed-by: Maksim Sisov <msisov@igalia.com> + Commit-Queue: Nick Yamane <nickdiego@igalia.com> + Cr-Commit-Position: refs/heads/main@{#1218924} + +diff --git a/ui/gfx/linux/gbm_wrapper.cc b/ui/gfx/linux/gbm_wrapper.cc +index bf90b76605f68..14918c19c0ab0 100644 +--- a/ui/gfx/linux/gbm_wrapper.cc ++++ b/ui/gfx/linux/gbm_wrapper.cc +@@ -11,6 +11,7 @@ + #include "base/logging.h" + #include "base/memory/raw_ptr.h" + #include "base/memory/raw_ptr_exclusion.h" ++#include "base/numerics/safe_conversions.h" + #include "base/posix/eintr_wrapper.h" + #include "skia/ext/legacy_display_globals.h" + #include "third_party/skia/include/core/SkSurface.h" +@@ -71,6 +72,7 @@ base::ScopedFD GetPlaneFdForBo(gbm_bo* bo, size_t plane) { + int ret; + // Use DRM_RDWR to allow the fd to be mappable in another process. + ret = drmPrimeHandleToFD(dev_fd, plane_handle, DRM_CLOEXEC | DRM_RDWR, &fd); ++ PLOG_IF(ERROR, ret != 0) << "Failed to get fd for plane."; + + // Older DRM implementations blocked DRM_RDWR, but gave a read/write mapping + // anyways +@@ -301,58 +303,82 @@ class Device final : public ui::GbmDevice { + + std::unique_ptr<ui::GbmBuffer> CreateBufferWithModifiers( + uint32_t format, +- const gfx::Size& size, ++ const gfx::Size& requested_size, + uint32_t flags, + const std::vector<uint64_t>& modifiers) override { +- if (modifiers.empty()) +- return CreateBuffer(format, size, flags); +- +- std::vector<uint64_t> filtered_modifiers = +- GetFilteredModifiers(format, flags, modifiers); +- struct gbm_bo* bo = nullptr; +- while (filtered_modifiers.size() > 0) { +- bo = gbm_bo_create_with_modifiers(device_, size.width(), size.height(), +- format, filtered_modifiers.data(), +- filtered_modifiers.size()); +- if (!bo) { ++ if (modifiers.empty()) { ++ return CreateBuffer(format, requested_size, flags); ++ } ++ ++ // Buggy drivers prevent us from getting plane FDs from a BO which had its ++ // previously imported BO destroyed. E.g: Nvidia. Thus, on Linux Desktop, we ++ // do the create/import modifiers validation loop below using a separate set ++ // of 1x1 BOs which are destroyed before creating the final BO creation used ++ // to instantiate the returned GbmBuffer. ++ gfx::Size size = ++#if BUILDFLAG(IS_LINUX) ++ gfx::Size(1, 1); ++#else ++ requested_size; ++#endif ++ auto filtered_modifiers = GetFilteredModifiers(format, flags, modifiers); ++ struct gbm_bo* created_bo = nullptr; ++ bool valid_modifiers = false; ++ ++ while (!valid_modifiers && !filtered_modifiers.empty()) { ++ created_bo = gbm_bo_create_with_modifiers( ++ device_, size.width(), size.height(), format, ++ filtered_modifiers.data(), filtered_modifiers.size()); ++ if (!created_bo) { + return nullptr; + } + +- struct gbm_import_fd_modifier_data fd_data; +- fd_data.width = size.width(); +- fd_data.height = size.height(); +- fd_data.format = format; +- fd_data.num_fds = gbm_bo_get_plane_count(bo); +- fd_data.modifier = gbm_bo_get_modifier(bo); +- +- // Store fds in the vector of base::ScopedFDs. Will be released +- // automatically. ++ const int planes_count = gbm_bo_get_plane_count(created_bo); ++ struct gbm_import_fd_modifier_data fd_data = { ++ .width = base::checked_cast<uint32_t>(size.width()), ++ .height = base::checked_cast<uint32_t>(size.height()), ++ .format = format, ++ .num_fds = base::checked_cast<uint32_t>(planes_count), ++ .modifier = gbm_bo_get_modifier(created_bo)}; ++ // Store fds in a base::ScopedFDs vector. Will be released automatically. + std::vector<base::ScopedFD> fds; + for (size_t i = 0; i < static_cast<size_t>(fd_data.num_fds); ++i) { +- fds.emplace_back(GetPlaneFdForBo(bo, i)); ++ fds.emplace_back(GetPlaneFdForBo(created_bo, i)); + fd_data.fds[i] = fds.back().get(); +- fd_data.strides[i] = gbm_bo_get_stride_for_plane(bo, i); +- fd_data.offsets[i] = gbm_bo_get_offset(bo, i); ++ fd_data.strides[i] = gbm_bo_get_stride_for_plane(created_bo, i); ++ fd_data.offsets[i] = gbm_bo_get_offset(created_bo, i); + } + +- struct gbm_bo* bo_import = ++ struct gbm_bo* imported_bo = + gbm_bo_import(device_, GBM_BO_IMPORT_FD_MODIFIER, &fd_data, flags); +- if (bo_import) { +- gbm_bo_destroy(bo_import); +- break; ++ ++ if (imported_bo) { ++ valid_modifiers = true; ++ gbm_bo_destroy(imported_bo); + } else { +- gbm_bo_destroy(bo); +- bo = nullptr; + AddModifierToBlocklist(format, flags, fd_data.modifier); + filtered_modifiers = + GetFilteredModifiers(format, flags, filtered_modifiers); + } ++ ++ if (!valid_modifiers || size != requested_size) { ++ gbm_bo_destroy(created_bo); ++ created_bo = nullptr; ++ } + } +- if (!bo) { +- return nullptr; ++ ++ // If modifiers were successfully verified though `created_bo` is null here, ++ // it it means that the buffer created for verification could not be reused, ++ // ie: different size, so create it now with the `requested_size`. ++ if (valid_modifiers && !created_bo) { ++ created_bo = gbm_bo_create_with_modifiers( ++ device_, requested_size.width(), requested_size.height(), format, ++ filtered_modifiers.data(), filtered_modifiers.size()); ++ PLOG_IF(ERROR, !created_bo) << "Failed to create BO with modifiers."; + } + +- return CreateBufferForBO(bo, format, size, flags); ++ return created_bo ? CreateBufferForBO(created_bo, format, size, flags) ++ : nullptr; + } + + std::unique_ptr<ui::GbmBuffer> CreateBufferFromHandle( diff --git a/chromium-119-revert-av1enc-el9.patch b/chromium-119-revert-av1enc-el9.patch new file mode 100644 index 0000000..b533ab9 --- /dev/null +++ b/chromium-119-revert-av1enc-el9.patch @@ -0,0 +1,121 @@ +diff -up chromium-114.0.5735.35/media/gpu/vaapi/vaapi_video_encode_accelerator.cc.me chromium-114.0.5735.35/media/gpu/vaapi/vaapi_video_encode_accelerator.cc +--- chromium-114.0.5735.35/media/gpu/vaapi/vaapi_video_encode_accelerator.cc.me 2023-05-21 10:05:00.357860329 +0200 ++++ chromium-114.0.5735.35/media/gpu/vaapi/vaapi_video_encode_accelerator.cc 2023-05-21 10:18:09.665432735 +0200 +@@ -41,7 +41,6 @@ + #include "media/gpu/gpu_video_encode_accelerator_helpers.h" + #include "media/gpu/h264_dpb.h" + #include "media/gpu/macros.h" +-#include "media/gpu/vaapi/av1_vaapi_video_encoder_delegate.h" + #include "media/gpu/vaapi/h264_vaapi_video_encoder_delegate.h" + #include "media/gpu/vaapi/va_surface.h" + #include "media/gpu/vaapi/vaapi_common.h" +@@ -200,7 +199,7 @@ bool VaapiVideoEncodeAccelerator::Initia + + const VideoCodec codec = VideoCodecProfileToVideoCodec(config.output_profile); + if (codec != VideoCodec::kH264 && codec != VideoCodec::kVP8 && +- codec != VideoCodec::kVP9 && codec != VideoCodec::kAV1) { ++ codec != VideoCodec::kVP9) { + MEDIA_LOG(ERROR, media_log.get()) + << "Unsupported profile: " << GetProfileName(config.output_profile); + return false; +@@ -293,7 +292,6 @@ void VaapiVideoEncodeAccelerator::Initia + break; + case VideoCodec::kVP8: + case VideoCodec::kVP9: +- case VideoCodec::kAV1: + mode = VaapiWrapper::kEncodeConstantQuantizationParameter; + break; + default: +@@ -356,12 +354,6 @@ void VaapiVideoEncodeAccelerator::Initia + vaapi_wrapper_, error_cb); + } + break; +- case VideoCodec::kAV1: +- if (!IsConfiguredForTesting()) { +- encoder_ = std::make_unique<AV1VaapiVideoEncoderDelegate>( +- vaapi_wrapper_, error_cb); +- } +- break; + default: + NOTREACHED() << "Unsupported codec type " << GetCodecName(output_codec_); + return; +@@ -835,10 +827,6 @@ VaapiVideoEncodeAccelerator::CreateEncod + case VideoCodec::kVP9: + picture = new VaapiVP9Picture(std::move(reconstructed_surface)); + break; +- case VideoCodec::kAV1: +- picture = new VaapiAV1Picture(/*display_va_surface=*/nullptr, +- std::move(reconstructed_surface)); +- break; + default: + return nullptr; + } +diff -up chromium-114.0.5735.35/media/gpu/BUILD.gn.revert-av1enc chromium-114.0.5735.35/media/gpu/BUILD.gn +--- chromium-114.0.5735.35/media/gpu/BUILD.gn.revert-av1enc 2023-05-18 00:37:57.000000000 +0200 ++++ chromium-114.0.5735.35/media/gpu/BUILD.gn 2023-05-20 13:14:10.755183630 +0200 +@@ -373,10 +373,7 @@ source_set("common") { + "vp9_svc_layers.h", + ] + configs += [ "//third_party/libvpx:libvpx_config" ] +- deps += [ +- "//third_party/libaom:libaomrc", +- "//third_party/libvpx:libvpxrc", +- ] ++ deps += [ "//third_party/libvpx:libvpxrc" ] + } + if (use_libgav1_parser) { + sources += [ +diff -up chromium-114.0.5735.35/media/gpu/vaapi/BUILD.gn.revert-av1enc chromium-114.0.5735.35/media/gpu/vaapi/BUILD.gn +--- chromium-114.0.5735.35/media/gpu/vaapi/BUILD.gn.revert-av1enc 2023-05-18 00:37:57.000000000 +0200 ++++ chromium-114.0.5735.35/media/gpu/vaapi/BUILD.gn 2023-05-20 13:14:10.756183626 +0200 +@@ -38,8 +38,6 @@ source_set("vaapi") { + sources = [ + "av1_vaapi_video_decoder_delegate.cc", + "av1_vaapi_video_decoder_delegate.h", +- "av1_vaapi_video_encoder_delegate.cc", +- "av1_vaapi_video_encoder_delegate.h", + "h264_vaapi_video_decoder_delegate.cc", + "h264_vaapi_video_decoder_delegate.h", + "h264_vaapi_video_encoder_delegate.cc", +@@ -107,7 +105,6 @@ source_set("vaapi") { + "//media/gpu/chromeos:common", + "//media/parsers", + "//mojo/public/cpp/bindings", +- "//third_party/libaom:libaomrc", + "//third_party/libvpx:libvpxrc", + "//third_party/libyuv", + "//ui/gfx", +diff -up chromium-119.0.6045.105/media/gpu/vaapi/vaapi_wrapper.cc.me chromium-119.0.6045.105/media/gpu/vaapi/vaapi_wrapper.cc +--- chromium-119.0.6045.105/media/gpu/vaapi/vaapi_wrapper.cc.me 2023-11-02 15:08:30.921325747 +0100 ++++ chromium-119.0.6045.105/media/gpu/vaapi/vaapi_wrapper.cc 2023-11-02 15:09:46.123692602 +0100 +@@ -3124,6 +3124,7 @@ bool VaapiWrapper::GetSupportedPackedHea + return true; + } + ++#if 0 //disable AV1 due to old libva on epel9 + bool VaapiWrapper::GetMinAV1SegmentSize(VideoCodecProfile profile, + uint32_t& min_seg_size) { + CHECK(!enforce_sequence_affinity_ || +@@ -3141,6 +3142,7 @@ bool VaapiWrapper::GetMinAV1SegmentSize( + + return true; + } ++#endif + + bool VaapiWrapper::BlitSurface(const VASurface& va_surface_src, + const VASurface& va_surface_dest, +diff -up chromium-119.0.6045.105/media/gpu/vaapi/vaapi_wrapper.h.me chromium-119.0.6045.105/media/gpu/vaapi/vaapi_wrapper.h +--- chromium-119.0.6045.105/media/gpu/vaapi/vaapi_wrapper.h.me 2023-11-02 15:09:58.973928395 +0100 ++++ chromium-119.0.6045.105/media/gpu/vaapi/vaapi_wrapper.h 2023-11-02 15:10:45.990791114 +0100 +@@ -553,9 +553,11 @@ class MEDIA_GPU_EXPORT VaapiWrapper + bool& packed_pps, + bool& packed_slice); + ++#if 0 //disable AV1 due to old libva on epel9 + // Gets the minimum segment block size supported for AV1 encoding. + [[nodiscard]] bool GetMinAV1SegmentSize(VideoCodecProfile profile, + uint32_t& min_seg_size); ++#endif + + // Blits a VASurface |va_surface_src| into another VASurface + // |va_surface_dest| applying pixel format conversion, cropping diff --git a/chromium-119-system-libusb.patch b/chromium-119-system-libusb.patch new file mode 100644 index 0000000..d147fe0 --- /dev/null +++ b/chromium-119-system-libusb.patch @@ -0,0 +1,39 @@ +diff -up chromium-119.0.6045.105/build/linux/unbundle/libusb.gn.gnsystem chromium-119.0.6045.105/build/linux/unbundle/libusb.gn +--- chromium-119.0.6045.105/build/linux/unbundle/libusb.gn.gnsystem 2023-11-06 12:22:08.550625387 +0100 ++++ chromium-119.0.6045.105/build/linux/unbundle/libusb.gn 2023-11-06 12:22:08.550625387 +0100 +@@ -0,0 +1,24 @@ ++# Copyright 2016 The Chromium Authors. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++import("//build/config/linux/pkg_config.gni") ++import("//build/shim_headers.gni") ++ ++pkg_config("system_libusb") { ++ packages = [ "libusb-1.0" ] ++} ++ ++shim_headers("libusb_shim") { ++ root_path = "src/libusb" ++ headers = [ ++ "libusb.h", ++ ] ++} ++ ++source_set("libusb") { ++ deps = [ ++ ":libusb_shim", ++ ] ++ public_configs = [ ":system_libusb" ] ++} +diff -up chromium-119.0.6045.105/build/linux/unbundle/replace_gn_files.py.gnsystem chromium-119.0.6045.105/build/linux/unbundle/replace_gn_files.py +--- chromium-119.0.6045.105/build/linux/unbundle/replace_gn_files.py.gnsystem 2023-11-06 12:22:08.550625387 +0100 ++++ chromium-119.0.6045.105/build/linux/unbundle/replace_gn_files.py 2023-11-06 12:28:28.295776501 +0100 +@@ -54,6 +54,7 @@ REPLACEMENTS = { + 'libevent': 'third_party/libevent/BUILD.gn', + 'libjpeg': 'third_party/libjpeg.gni', + 'libpng': 'third_party/libpng/BUILD.gn', ++ 'libusb': 'third_party/libusb/BUILD.gn', + 'libvpx': 'third_party/libvpx/BUILD.gn', + 'libwebp': 'third_party/libwebp/BUILD.gn', + 'libxml': 'third_party/libxml/BUILD.gn', diff --git a/chromium-119-system-minizip-header-fix.patch b/chromium-119-system-minizip-header-fix.patch new file mode 100644 index 0000000..14ac00b --- /dev/null +++ b/chromium-119-system-minizip-header-fix.patch @@ -0,0 +1,65 @@ +diff -up chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_extractor.cc.system-minizip chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_extractor.cc +--- chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_extractor.cc.system-minizip 2023-11-06 12:42:34.928657960 +0100 ++++ chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_extractor.cc 2023-11-06 12:51:12.547834851 +0100 +@@ -28,9 +28,8 @@ limitations under the License. + #include "tensorflow_lite_support/cc/port/status_macros.h" + #include "tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.h" + #include "tensorflow_lite_support/metadata/metadata_schema_generated.h" +-#include "third_party/zlib/contrib/minizip/ioapi.h" +-#include "third_party/zlib/contrib/minizip/unzip.h" +- ++#include <minizip/ioapi.h> ++#include <minizip/unzip.h> + + namespace tflite { + namespace metadata { +diff -up chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_populator.cc.system-minizip chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_populator.cc +--- chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_populator.cc.system-minizip 2023-11-01 19:11:24.000000000 +0100 ++++ chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_populator.cc 2023-11-06 12:42:34.928657960 +0100 +@@ -26,8 +26,8 @@ limitations under the License. + #include "tensorflow_lite_support/cc/port/statusor.h" + #include "tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.h" + #include "tensorflow_lite_support/metadata/metadata_schema_generated.h" +-#include "third_party/zlib/contrib/minizip/ioapi.h" +-#include "third_party/zlib/contrib/minizip/unzip.h" ++#include <minizip/ioapi.h> ++#include <minizip/zip.h> + + namespace tflite { + namespace metadata { +diff -up chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc.system-minizip chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc +--- chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc.system-minizip 2023-11-01 19:11:24.000000000 +0100 ++++ chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc 2023-11-06 12:42:34.929657982 +0100 +@@ -19,7 +19,7 @@ limitations under the License. + #include <cstdio> + + #include "absl/strings/string_view.h" // from @com_google_absl +-#include "third_party/zlib/contrib/minizip/ioapi.h" ++#include <minizip/ioapi.h> + + namespace tflite { + namespace metadata { +diff -up chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.cc.system-minizip chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.cc +--- chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.cc.system-minizip 2023-11-01 19:11:24.000000000 +0100 ++++ chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.cc 2023-11-06 12:42:34.929657982 +0100 +@@ -19,7 +19,7 @@ limitations under the License. + #include <cstdio> + + #include "absl/strings/string_view.h" // from @com_google_absl +-#include "third_party/zlib/contrib/minizip/ioapi.h" ++#include <minizip/ioapi.h> + + namespace tflite { + namespace metadata { +diff -up chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.h.system-minizip chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.h +--- chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.h.system-minizip 2023-11-01 19:11:24.000000000 +0100 ++++ chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.h 2023-11-06 12:42:34.929657982 +0100 +@@ -19,7 +19,7 @@ limitations under the License. + #include <cstdlib> + + #include "absl/strings/string_view.h" // from @com_google_absl +-#include "third_party/zlib/contrib/minizip/ioapi.h" ++#include <minizip/ioapi.h> + + namespace tflite { + namespace metadata { diff --git a/chromium-70.0.3538.67-sandbox-pie.patch b/chromium-70.0.3538.67-sandbox-pie.patch new file mode 100644 index 0000000..0f104e9 --- /dev/null +++ b/chromium-70.0.3538.67-sandbox-pie.patch @@ -0,0 +1,20 @@ +diff -up chromium-70.0.3538.67/sandbox/linux/BUILD.gn.sandboxpie chromium-70.0.3538.67/sandbox/linux/BUILD.gn +--- chromium-70.0.3538.67/sandbox/linux/BUILD.gn.sandboxpie 2018-10-18 12:14:05.766939769 -0400 ++++ chromium-70.0.3538.67/sandbox/linux/BUILD.gn 2018-10-18 12:16:37.820027182 -0400 +@@ -315,10 +315,16 @@ if (is_linux) { + # For ULLONG_MAX + "-std=gnu99", + ++ "-fPIE", ++ + # These files have a suspicious comparison. + # TODO fix this and re-enable this warning. + "-Wno-sign-compare", + ] ++ ++ ldflags = [ ++ "-pie", ++ ] + } + } + diff --git a/chromium-77.0.3865.75-no-zlib-mangle.patch b/chromium-77.0.3865.75-no-zlib-mangle.patch new file mode 100644 index 0000000..c32d226 --- /dev/null +++ b/chromium-77.0.3865.75-no-zlib-mangle.patch @@ -0,0 +1,22 @@ +diff -up chromium-77.0.3865.75/third_party/zlib/zconf.h.nozmangle chromium-77.0.3865.75/third_party/zlib/zconf.h +--- chromium-77.0.3865.75/third_party/zlib/zconf.h.nozmangle 2019-09-12 09:36:37.924086850 +0200 ++++ chromium-77.0.3865.75/third_party/zlib/zconf.h 2019-09-12 09:53:01.623958551 +0200 +@@ -9,18 +9,6 @@ + #define ZCONF_H + + /* +- * This library is also built as a part of AOSP, which does not need to include +- * chromeconf.h. This config does not want chromeconf.h, so it can set this +- * macro to opt out. While this works today, there's no guarantee that building +- * zlib outside of Chromium keeps working in the future. +- */ +-#if !defined(CHROMIUM_ZLIB_NO_CHROMECONF) +-/* This include does prefixing as below, but with an updated set of names. Also +- * sets up export macros in component builds. */ +-#include "chromeconf.h" +-#endif +- +-/* + * If you *really* need a unique prefix for all types and library functions, + * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. + * Even better than compiling with -DZ_PREFIX would be to use configure to set diff --git a/chromium-81.0.4044.92-unbundle-zlib.patch b/chromium-81.0.4044.92-unbundle-zlib.patch new file mode 100644 index 0000000..ff4e3b1 --- /dev/null +++ b/chromium-81.0.4044.92-unbundle-zlib.patch @@ -0,0 +1,12 @@ +diff -up chromium-81.0.4044.92/third_party/perfetto/gn/BUILD.gn.unbundle-zlib chromium-81.0.4044.92/third_party/perfetto/gn/BUILD.gn +--- chromium-81.0.4044.92/third_party/perfetto/gn/BUILD.gn.unbundle-zlib 2020-04-13 12:25:09.001172601 -0400 ++++ chromium-81.0.4044.92/third_party/perfetto/gn/BUILD.gn 2020-04-13 12:25:23.688921586 -0400 +@@ -294,7 +294,7 @@ if (enable_perfetto_zlib) { + public_configs = [ "//buildtools:zlib_config" ] + public_deps = [ "//buildtools:zlib" ] + } else { +- public_configs = [ "//third_party/zlib:zlib_config" ] ++ public_configs = [ "//third_party/zlib:system_zlib" ] + public_deps = [ "//third_party/zlib" ] + } + } diff --git a/chromium-91.0.4472.77-java-only-allowed-in-android-builds.patch b/chromium-91.0.4472.77-java-only-allowed-in-android-builds.patch new file mode 100644 index 0000000..a4748d9 --- /dev/null +++ b/chromium-91.0.4472.77-java-only-allowed-in-android-builds.patch @@ -0,0 +1,13 @@ +diff -up chromium-91.0.4472.77/third_party/closure_compiler/compiler.py.java-allowed chromium-91.0.4472.77/third_party/closure_compiler/compiler.py +--- chromium-91.0.4472.77/third_party/closure_compiler/compiler.py.java-allowed 2021-06-02 17:14:48.445064647 +0000 ++++ chromium-91.0.4472.77/third_party/closure_compiler/compiler.py 2021-06-02 17:15:12.994836949 +0000 +@@ -13,8 +13,7 @@ import subprocess + + + _CURRENT_DIR = os.path.join(os.path.dirname(__file__)) +-_JAVA_PATH = os.path.join(_CURRENT_DIR, "..", "jdk", "current", "bin", "java") +-assert os.path.isfile(_JAVA_PATH), "java only allowed in android builds" ++_JAVA_PATH = "java" + + class Compiler(object): + """Runs the Closure compiler on given source files to typecheck them diff --git a/chromium-93.0.4577.63-py3-bootstrap.patch b/chromium-93.0.4577.63-py3-bootstrap.patch new file mode 100644 index 0000000..899495f --- /dev/null +++ b/chromium-93.0.4577.63-py3-bootstrap.patch @@ -0,0 +1,12 @@ +diff -up chromium-93.0.4577.63/tools/gn/bootstrap/bootstrap.py.py3 chromium-93.0.4577.63/tools/gn/bootstrap/bootstrap.py +--- chromium-93.0.4577.63/tools/gn/bootstrap/bootstrap.py.py3 2021-08-31 21:40:34.000000000 -0400 ++++ chromium-93.0.4577.63/tools/gn/bootstrap/bootstrap.py 2021-09-02 08:26:04.415846917 -0400 +@@ -130,7 +130,7 @@ def main(argv): + if not options.debug: + gn_gen_args += ' is_debug=false' + subprocess.check_call([ +- gn_path, 'gen', out_dir, ++ gn_path, 'gen', out_dir, ' --script-executable=/usr/bin/python3', + '--args=%s' % gn_gen_args, "--root=" + SRC_ROOT + ]) + diff --git a/chromium-98.0.4758.102-remoting-no-tests.patch b/chromium-98.0.4758.102-remoting-no-tests.patch new file mode 100644 index 0000000..a8c4dbd --- /dev/null +++ b/chromium-98.0.4758.102-remoting-no-tests.patch @@ -0,0 +1,20 @@ +diff -up chromium-98.0.4758.102/remoting/BUILD.gn.remoting-no-tests chromium-98.0.4758.102/remoting/BUILD.gn +--- chromium-98.0.4758.102/remoting/BUILD.gn.remoting-no-tests 2022-02-28 19:15:23.835872267 +0000 ++++ chromium-98.0.4758.102/remoting/BUILD.gn 2022-03-01 17:55:50.625536957 +0000 +@@ -8,7 +8,7 @@ import("//remoting/build/config/remoting + group("remoting_all") { + testonly = true + +- deps = [ ":remoting_unittests" ] ++ deps = [ ] + + if (is_win) { + deps += [ +@@ -37,7 +37,6 @@ group("remoting_all") { + + if (enable_remoting_host) { + deps += [ +- ":remoting_perftests", + "//remoting/host", + ] + diff --git a/chromium-browser.desktop b/chromium-browser.desktop new file mode 100644 index 0000000..23d3257 --- /dev/null +++ b/chromium-browser.desktop @@ -0,0 +1,356 @@ +[Desktop Entry] +Version=1.0 +Name=Chromium Web Browser +Name[ast]=Restolador web Chromium +Name[ca]=Navegador web Chromium +Name[de]=Chromium-Webbrowser +Name[es]=Navegador web Chromium +Name[fr]=Navigateur Web Chromium +Name[gl]=Navegador web Chromium +Name[he]=דפדפן האינטרנט Chromium +Name[hr]=Chromium web preglednik +Name[hu]=Chromium webböngésző +Name[id]=Peramban Web Chromium +Name[it]=Browser web Chromium +Name[ja]=Chromium ウェブ・ブラウザ +Name[ko]=Chromium 웹 브라우저 +Name[pt_BR]=Chromium Navegador da Internet +Name[ru]=Веб-браузер Chromium +Name[sl]=Chromium spletni brskalnik +Name[sv]=Webbläsaren Chromium +Name[ug]=Chromium توركۆرگۈ +Name[zh_CN]=Chromium 网页浏览器 +Name[zh_HK]=Chromium 網頁瀏覽器 +Name[zh_TW]=Chromium 網頁瀏覽器 +Comment=Access the Internet +Comment[ar]=الدخول إلى الإنترنت +Comment[ast]=Accesu a Internet +Comment[bg]=Достъп до интернет +Comment[bn]=ইন্টারনেটটি অ্যাক্সেস করুন +Comment[ca]=Accediu a Internet +Comment[cs]=Přístup k internetu +Comment[da]=Få adgang til internettet +Comment[de]=Internetzugriff +Comment[el]=Πρόσβαση στο Διαδίκτυο +Comment[en_GB]=Access the Internet +Comment[es]=Acceda a Internet +Comment[et]=Pääs Internetti +Comment[fi]=Käytä internetiä +Comment[fil]=I-access ang Internet +Comment[fr]=Explorer le Web +Comment[gl]=Acceda a Internet +Comment[gu]=ઇંટરનેટ ઍક્સેસ કરો +Comment[he]=גישה לאינטרנט +Comment[hi]=इंटरनेट तक पहुंच स्थापित करें +Comment[hr]=Pristupite Internetu +Comment[hu]=Az internet elérése +Comment[id]=Akses Internet +Comment[it]=Accesso a Internet +Comment[ja]=インターネットにアクセス +Comment[kn]=ಇಂಟರ್ನೆಟ್ ಅನ್ನು ಪ್ರವೇಶಿಸಿs +Comment[ko]=인터넷에 연결합니다 +Comment[lt]=Interneto prieiga +Comment[lv]=Piekļūt internetam +Comment[ml]=ഇന്റര്നെറ്റ് ആക്സസ് ചെയ്യുക +Comment[mr]=इंटरनेटमध्ये प्रवेश करा +Comment[nb]=Gå til Internett +Comment[nl]=Verbinding maken met internet +Comment[or]=ଇଣ୍ଟର୍ନେଟ୍ ପ୍ରବେଶ କରନ୍ତୁ +Comment[pl]=Skorzystaj z internetu +Comment[pt]=Aceder à Internet +Comment[pt_BR]=Acessar a internet +Comment[ro]=Accesaţi Internetul +Comment[ru]=Доступ в Интернет +Comment[sk]=Prístup do siete Internet +Comment[sl]=Dostop do interneta +Comment[sr]=Приступите Интернету +Comment[sv]=Surfa på Internet +Comment[ta]=இணையத்தை அணுகுதல் +Comment[te]=ఇంటర్నెట్ను ఆక్సెస్ చెయ్యండి +Comment[th]=เข้าถึงอินเทอร์เน็ต +Comment[tr]=İnternet'e erişin +Comment[ug]=ئىنتېرنېتنى زىيارەت قىلىش +Comment[uk]=Доступ до Інтернету +Comment[vi]=Truy cập Internet +Comment[zh_CN]=访问互联网 +Comment[zh_HK]=連線到網際網路 +Comment[zh_TW]=連線到網際網路 +GenericName=Web Browser +GenericName[ar]=متصفح الشبكة +GenericName[ast]=Restolador web +GenericName[bg]=Уеб браузър +GenericName[bn]=ওয়েব ব্রাউজার +GenericName[ca]=Navegador web +GenericName[cs]=WWW prohlížeč +GenericName[da]=Browser +GenericName[de]=Web-Browser +GenericName[el]=Περιηγητής ιστού +GenericName[en_GB]=Web Browser +GenericName[es]=Navegador web +GenericName[et]=Veebibrauser +GenericName[fi]=WWW-selain +GenericName[fil]=Web Browser +GenericName[fr]=Navigateur Web +GenericName[gl]=Navegador web +GenericName[gu]=વેબ બ્રાઉઝર +GenericName[he]=דפדפן אינטרנט +GenericName[hi]=वेब ब्राउज़र +GenericName[hr]=Web preglednik +GenericName[hu]=Webböngésző +GenericName[id]=Peramban Web +GenericName[it]=Browser web +GenericName[ja]=ウェブ・ブラウザ +GenericName[kn]=ಜಾಲ ವೀಕ್ಷಕ +GenericName[ko]=웹 브라우저 +GenericName[lt]=Žiniatinklio naršyklė +GenericName[lv]=Tīmekļa pārlūks +GenericName[ml]=വെബ് ബ്രൌസര് +GenericName[mr]=वेब ब्राऊजर +GenericName[nb]=Nettleser +GenericName[nl]=Webbrowser +GenericName[or]=ଓ୍ବେବ ବ୍ରାଉଜର +GenericName[pl]=Przeglądarka WWW +GenericName[pt]=Navegador Web +GenericName[pt_BR]=Navegador da Internet +GenericName[ro]=Navigator de Internet +GenericName[ru]=Веб-браузер +GenericName[sk]=WWW prehliadač +GenericName[sl]=Spletni brskalnik +GenericName[sr]=Интернет прегледник +GenericName[sv]=Webbläsare +GenericName[ta]=இணைய உலாவி +GenericName[te]=మహాతల అన్వేషి +GenericName[th]=เว็บเบราว์เซอร์ +GenericName[tr]=Web Tarayıcı +GenericName[ug]=توركۆرگۈ +GenericName[uk]=Навігатор Тенет +GenericName[vi]=Bộ duyệt Web +GenericName[zh_CN]=网页浏览器 +GenericName[zh_HK]=網頁瀏覽器 +GenericName[zh_TW]=網頁瀏覽器 +Exec=/usr/bin/chromium-browser %U +Terminal=false +X-MultipleArgs=false +Type=Application +Icon=chromium-browser +Categories=Network;WebBrowser; +MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/http;x-scheme-handler/https; +StartupWMClass=Chromium-browser +Keywords=web;browser;internet; +Actions=new-window;new-private-window; + +[Desktop Action new-window] +Name=Open a New Window +Name[ach]=Dirica manyen +Name[af]=Nuwe venster +Name[an]=Nueva finestra +Name[ar]=نافذة جديدة +Name[as]=নতুন উইন্ডো +Name[ast]=Ventana nueva +Name[az]=Yeni Pəncərə +Name[be]=Новае акно +Name[bg]=Нов прозорец +Name[bn-BD]=নতুন উইন্ডো (N) +Name[bn-IN]=নতুন উইন্ডো +Name[br]=Prenestr nevez +Name[brx]=गोदान उइन्ड'(N) +Name[bs]=Novi prozor +Name[ca]=Finestra nova +Name[cak]=K'ak'a' tzuwäch +Name[cs]=Nové okno +Name[cy]=Ffenestr Newydd +Name[da]=Nyt vindue +Name[de]=Neues Fenster +Name[dsb]=Nowe wokno +Name[el]=Νέο παράθυρο +Name[en-GB]=New Window +Name[en-US]=New Window +Name[en-ZA]=New Window +Name[eo]=Nova fenestro +Name[es-AR]=Nueva ventana +Name[es-CL]=Nueva ventana +Name[es-ES]=Nueva ventana +Name[es-MX]=Nueva ventana +Name[et]=Uus aken +Name[eu]=Leiho berria +Name[fa]=پنجره جدید +Name[ff]=Henorde Hesere +Name[fi]=Uusi ikkuna +Name[fr]=Nouvelle fenêtre +Name[fy-NL]=Nij finster +Name[ga-IE]=Fuinneog Nua +Name[gd]=Uinneag ùr +Name[gl]=Nova xanela +Name[gn]=Ovetã pyahu +Name[gu-IN]=નવી વિન્ડો +Name[he]=חלון חדש +Name[hi-IN]=नया विंडो +Name[hr]=Novi prozor +Name[hsb]=Nowe wokno +Name[hu]=Új ablak +Name[hy-AM]=Նոր Պատուհան +Name[id]=Jendela Baru +Name[is]=Nýr gluggi +Name[it]=Nuova finestra +Name[ja]=新しいウィンドウ +Name[ja-JP-mac]=新規ウインドウ +Name[ka]=ახალი ფანჯარა +Name[kk]=Жаңа терезе +Name[km]=បង្អួចថ្មី +Name[kn]=ಹೊಸ ಕಿಟಕಿ +Name[ko]=새 창 +Name[kok]=नवें जनेल +Name[ks]=نئئ وِنڈو +Name[lij]=Neuvo barcon +Name[lo]=ຫນ້າຕ່າງໃຫມ່ +Name[lt]=Naujas langas +Name[ltg]=Jauns lūgs +Name[lv]=Jauns logs +Name[mai]=नव विंडो +Name[mk]=Нов прозорец +Name[ml]=പുതിയ ജാലകം +Name[mr]=नवीन पटल +Name[ms]=Tetingkap Baru +Name[my]=ဝင်းဒိုးအသစ် +Name[nb-NO]=Nytt vindu +Name[ne-NP]=नयाँ सञ्झ्याल +Name[nl]=Nieuw venster +Name[nn-NO]=Nytt vindauge +Name[or]=ନୂତନ ୱିଣ୍ଡୋ +Name[pa-IN]=ਨਵੀਂ ਵਿੰਡੋ +Name[pl]=Nowe okno +Name[pt-BR]=Nova janela +Name[pt-PT]=Nova janela +Name[rm]=Nova fanestra +Name[ro]=Fereastră nouă +Name[ru]=Новое окно +Name[sat]=नावा विंडो (N) +Name[si]=නව කවුළුවක් +Name[sk]=Nové okno +Name[sl]=Novo okno +Name[son]=Zanfun taaga +Name[sq]=Dritare e Re +Name[sr]=Нови прозор +Name[sv-SE]=Nytt fönster +Name[ta]=புதிய சாளரம் +Name[te]=కొత్త విండో +Name[th]=หน้าต่างใหม่ +Name[tr]=Yeni pencere +Name[tsz]=Eraatarakua jimpani +Name[uk]=Нове вікно +Name[ur]=نیا دریچہ +Name[uz]=Yangi oyna +Name[vi]=Cửa sổ mới +Name[wo]=Palanteer bu bees +Name[xh]=Ifestile entsha +Name[zh-CN]=新建窗口 +Name[zh-TW]=開新視窗 +Exec=chromium-browser %U + +[Desktop Action new-private-window] +Name=Open a New Private Window +Name[ach]=Dirica manyen me mung +Name[af]=Nuwe privaatvenster +Name[an]=Nueva finestra privada +Name[ar]=نافذة خاصة جديدة +Name[as]=নতুন ব্যক্তিগত উইন্ডো +Name[ast]=Ventana privada nueva +Name[az]=Yeni Məxfi Pəncərə +Name[be]=Новае акно адасаблення +Name[bg]=Нов прозорец за поверително сърфиране +Name[bn-BD]=নতুন ব্যক্তিগত উইন্ডো +Name[bn-IN]=নতুন ব্যক্তিগত উইন্ডো +Name[br]=Prenestr merdeiñ prevez nevez +Name[brx]=गोदान प्राइभेट उइन्ड' +Name[bs]=Novi privatni prozor +Name[ca]=Finestra privada nova +Name[cak]=K'ak'a' ichinan tzuwäch +Name[cs]=Nové anonymní okno +Name[cy]=Ffenestr Breifat Newydd +Name[da]=Nyt privat vindue +Name[de]=Neues privates Fenster +Name[dsb]=Nowe priwatne wokno +Name[el]=Νέο παράθυρο ιδιωτικής περιήγησης +Name[en-GB]=New Private Window +Name[en-US]=New Private Window +Name[en-ZA]=New Private Window +Name[eo]=Nova privata fenestro +Name[es-AR]=Nueva ventana privada +Name[es-CL]=Nueva ventana privada +Name[es-ES]=Nueva ventana privada +Name[es-MX]=Nueva ventana privada +Name[et]=Uus privaatne aken +Name[eu]=Leiho pribatu berria +Name[fa]=پنجره ناشناس جدید +Name[ff]=Henorde Suturo Hesere +Name[fi]=Uusi yksityinen ikkuna +Name[fr]=Nouvelle fenêtre de navigation privée +Name[fy-NL]=Nij priveefinster +Name[ga-IE]=Fuinneog Nua Phríobháideach +Name[gd]=Uinneag phrìobhaideach ùr +Name[gl]=Nova xanela privada +Name[gn]=Ovetã ñemi pyahu +Name[gu-IN]=નવી ખાનગી વિન્ડો +Name[he]=חלון פרטי חדש +Name[hi-IN]=नयी निजी विंडो +Name[hr]=Novi privatni prozor +Name[hsb]=Nowe priwatne wokno +Name[hu]=Új privát ablak +Name[hy-AM]=Սկսել Գաղտնի դիտարկում +Name[id]=Jendela Mode Pribadi Baru +Name[is]=Nýr huliðsgluggi +Name[it]=Nuova finestra anonima +Name[ja]=新しいプライベートウィンドウ +Name[ja-JP-mac]=新規プライベートウインドウ +Name[ka]=ახალი პირადი ფანჯარა +Name[kk]=Жаңа жекелік терезе +Name[km]=បង្អួចឯកជនថ្មី +Name[kn]=ಹೊಸ ಖಾಸಗಿ ಕಿಟಕಿ +Name[ko]=새 사생활 보호 모드 +Name[kok]=नवो खाजगी विंडो +Name[ks]=نْو پرایوٹ وینڈو& +Name[lij]=Neuvo barcon privou +Name[lo]=ເປີດຫນ້າຕ່າງສວນຕົວຂື້ນມາໃຫມ່ +Name[lt]=Naujas privataus naršymo langas +Name[ltg]=Jauns privatais lūgs +Name[lv]=Jauns privātais logs +Name[mai]=नया निज विंडो (W) +Name[mk]=Нов приватен прозорец +Name[ml]=പുതിയ സ്വകാര്യ ജാലകം +Name[mr]=नवीन वैयक्तिक पटल +Name[ms]=Tetingkap Persendirian Baharu +Name[my]=New Private Window +Name[nb-NO]=Nytt privat vindu +Name[ne-NP]=नयाँ निजी सञ्झ्याल +Name[nl]=Nieuw privévenster +Name[nn-NO]=Nytt privat vindauge +Name[or]=ନୂତନ ବ୍ୟକ୍ତିଗତ ୱିଣ୍ଡୋ +Name[pa-IN]=ਨਵੀਂ ਪ੍ਰਾਈਵੇਟ ਵਿੰਡੋ +Name[pl]=Nowe okno prywatne +Name[pt-BR]=Nova janela privativa +Name[pt-PT]=Nova janela privada +Name[rm]=Nova fanestra privata +Name[ro]=Fereastră privată nouă +Name[ru]=Новое приватное окно +Name[sat]=नावा निजेराक् विंडो (W ) +Name[si]=නව පුද්ගලික කවුළුව (W) +Name[sk]=Nové okno v režime Súkromné prehliadanie +Name[sl]=Novo zasebno okno +Name[son]=Sutura zanfun taaga +Name[sq]=Dritare e Re Private +Name[sr]=Нови приватан прозор +Name[sv-SE]=Nytt privat fönster +Name[ta]=புதிய தனிப்பட்ட சாளரம் +Name[te]=కొత్త ఆంతరంగిక విండో +Name[th]=หน้าต่างส่วนตัวใหม่ +Name[tr]=Yeni gizli pencere +Name[tsz]=Juchiiti eraatarakua jimpani +Name[uk]=Приватне вікно +Name[ur]=نیا نجی دریچہ +Name[uz]=Yangi maxfiy oyna +Name[vi]=Cửa sổ riêng tư mới +Name[wo]=Panlanteeru biir bu bees +Name[xh]=Ifestile yangasese entsha +Name[zh-CN]=新建隐私浏览窗口 +Name[zh-TW]=新增隱私視窗 +Exec=chromium-browser --incognito %U diff --git a/chromium-browser.sh b/chromium-browser.sh new file mode 100755 index 0000000..492a496 --- /dev/null +++ b/chromium-browser.sh @@ -0,0 +1,61 @@ +#!/bin/bash +# +# Copyright (c) 2011 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# Let the wrapped binary know that it has been run through the wrapper. +export CHROME_WRAPPER="`readlink -f "$0"`" + +HERE="`dirname "$CHROME_WRAPPER"`" + +# We include some xdg utilities next to the binary, and we want to prefer them +# over the system versions when we know the system versions are very old. We +# detect whether the system xdg utilities are sufficiently new to be likely to +# work for us by looking for xdg-settings. If we find it, we leave $PATH alone, +# so that the system xdg utilities (including any distro patches) will be used. +if ! which xdg-settings &> /dev/null; then + # Old xdg utilities. Prepend $HERE to $PATH to use ours instead. + export PATH="$HERE:$PATH" +else + # Use system xdg utilities. But first create mimeapps.list if it doesn't + # exist; some systems have bugs in xdg-mime that make it fail without it. + xdg_app_dir="${XDG_DATA_HOME:-$HOME/.local/share/applications}" + mkdir -p "$xdg_app_dir" + [ -f "$xdg_app_dir/mimeapps.list" ] || touch "$xdg_app_dir/mimeapps.list" +fi + +# Always use our versions of ffmpeg libs. +# This also makes RPMs find the compatibly-named library symlinks. +if [[ -n "$LD_LIBRARY_PATH" ]]; then + LD_LIBRARY_PATH="$HERE:$HERE/lib:$LD_LIBRARY_PATH" +else + LD_LIBRARY_PATH="$HERE:$HERE/lib" +fi +export LD_LIBRARY_PATH + +export CHROME_VERSION_EXTRA="Built from source for @@BUILD_TARGET@@" + +# We don't want bug-buddy intercepting our crashes. http://crbug.com/24120 +export GNOME_DISABLE_CRASH_DIALOG=SET_BY_GOOGLE_CHROME + +# Allow users to override command-line options and prefer user defined +# CHROMIUM_USER_FLAGS from env over system wide CHROMIUM_FLAGS +[[ -f /etc/chromium/chromium.conf ]] && . /etc/chromium/chromium.conf +CHROMIUM_FLAGS=${CHROMIUM_USER_FLAGS:-$CHROMIUM_FLAGS} + +CHROMIUM_DISTRO_FLAGS=" --enable-plugins \ + --enable-extensions \ + --enable-user-scripts \ + --enable-printing \ + --enable-gpu-rasterization \ + --enable-sync \ + --auto-ssl-client-auth @@EXTRA_FLAGS@@" + +# Sanitize std{in,out,err} because they'll be shared with untrusted child +# processes (http://crbug.com/376567). +exec < /dev/null +exec > >(exec cat) +exec 2> >(exec cat >&2) + +exec -a "$0" "$HERE/@@CHROMIUM_BROWSER_CHANNEL@@" $CHROMIUM_FLAGS $CHROMIUM_DISTRO_FLAGS "$@" diff --git a/chromium-browser.xml b/chromium-browser.xml new file mode 100644 index 0000000..159e05c --- /dev/null +++ b/chromium-browser.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE default-apps SYSTEM "gnome-da-list.dtd"> +<default-apps> + <web-browsers> + <web-browser> + <name>Chromium</name> + <executable>chromium-browser</executable> + <command>/usr/bin/chromium-browser %s</command> + <icon-name>chromium-browser</icon-name> + <run-in-terminal>false</run-in-terminal> + <netscape-remote>false</netscape-remote> + <!-- + <tab-command>false</tab-command> + <win-command>false</win-command> + --> + </web-browser> + </web-browsers> +</default-apps> diff --git a/chromium-disable-font-tests.patch b/chromium-disable-font-tests.patch new file mode 100644 index 0000000..ae38a8a --- /dev/null +++ b/chromium-disable-font-tests.patch @@ -0,0 +1,26 @@ +description: disable building font tests +author: Michael Gilbert <mgilbert@debian.org> + +--- a/skia/BUILD.gn ++++ b/skia/BUILD.gn +@@ -860,7 +860,7 @@ group("test_fonts_resources") { + if (is_apple) { + deps += [ ":test_fonts_bundle_data" ] + data_deps += [ ":test_fonts_bundle_data" ] +- } else { ++ } else if (false) { + deps += [ "//third_party/test_fonts" ] + data_deps += [ "//third_party/test_fonts" ] + } +--- a/third_party/test_fonts/fontconfig/BUILD.gn ++++ b/third_party/test_fonts/fontconfig/BUILD.gn +@@ -8,9 +8,7 @@ if (is_linux || is_chromeos) { + group("test_support") { + testonly = true + public_deps = [ ":fontconfig_util_linux" ] +- data_deps = [ "//third_party/test_fonts" ] + if (current_toolchain == host_toolchain) { +- data_deps += [ ":do_generate_fontconfig_caches" ] + } + } + diff --git a/chromium-icu72-2.patch b/chromium-icu72-2.patch new file mode 100644 index 0000000..d79bf18 --- /dev/null +++ b/chromium-icu72-2.patch @@ -0,0 +1,55 @@ +From 103e1ff08c00590be56c98aa5647e92c7fa78631 Mon Sep 17 00:00:00 2001 +From: Mustafa Emre Acer <meacer@chromium.org> +Date: Fri, 18 Nov 2022 22:52:00 +0000 +Subject: [PATCH] IDN Spoof Checks: Disallow ZWJ and ZWNJ in ICU versions below + 72 + +ICU 72 updates to Unicode 15 which changes the zero width joiner (ZWJ) +and zero width non-joiner (ZWNJ) characters from +Identifier_Status=Allowed to Identifier_Status=Restricted. These +characters are therefore no longer allowed by default in ICU 72. + +crbug/694157 recently implemented Non-Transitional IDNA 2008 behind a +flag. ZWJ and ZWNJ are disallowed in Transitional Mode but allowed in +Non-Transitional Mode, so the test cases with the Non-Transitional Mode +enabled fail in ICU 72. + +This CL removes ZWJ and ZWNJ from the allowed identifiers set for +ICU versions below 72. This effectively disables these characters even +in Non-Transitional Mode. + +This is a temporary fix. Once ICU 72 is rolled out, we should check if +we can use UIDNA_CHECK_CONTEXTJ and explicitly add ZWJ and ZWNJ to +the allowed sets again. + +Bug: 1386204, 694157 +Change-Id: I606c43b9d94fea0f2331e5aed530f633bb94517c +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4038542 +Reviewed-by: Frank Tang <ftang@chromium.org> +Commit-Queue: Mustafa Emre Acer <meacer@chromium.org> +Cr-Commit-Position: refs/heads/main@{#1073605} +--- + .../spoof_checks/idn_spoof_checker.cc | 9 ++++++ + .../idn_spoof_checker_unittest.cc | 28 +++++++++++-------- + 2 files changed, 25 insertions(+), 12 deletions(-) + +Index: chromium-110.0.5481.38/components/url_formatter/spoof_checks/idn_spoof_checker.cc +=================================================================== +--- chromium-110.0.5481.38.orig/components/url_formatter/spoof_checks/idn_spoof_checker.cc ++++ chromium-110.0.5481.38/components/url_formatter/spoof_checks/idn_spoof_checker.cc +@@ -722,6 +722,15 @@ void IDNSpoofChecker::SetAllowedUnicodeS + allowed_set.remove(0x200Du); // Zero Width Joiner + #endif + ++#if U_ICU_VERSION_MAJOR_NUM < 72 ++ // Unicode 15 changes ZWJ and ZWNJ from allowed to restricted. Restrict them ++ // in lower versions too. This only relevant in Non-Transitional Mode as ++ // Transitional Mode maps these characters out. ++ // TODO(crbug.com/1386204): Remove these after ICU 72 is rolled out. ++ allowed_set.remove(0x200Cu); // Zero Width Non-Joiner ++ allowed_set.remove(0x200Du); // Zero Width Joiner ++#endif ++ + uspoof_setAllowedUnicodeSet(checker_, &allowed_set, status); + } + diff --git a/chromium.conf b/chromium.conf new file mode 100644 index 0000000..b30a512 --- /dev/null +++ b/chromium.conf @@ -0,0 +1,3 @@ +# system wide chromium flags +CHROMIUM_FLAGS="" +CHROMIUM_FLAGS+=" --enable-features=VaapiVideoEncoder,VaapiVideoDecodeLinuxGL" diff --git a/chromium.spec b/chromium.spec new file mode 100644 index 0000000..abc3d6f --- /dev/null +++ b/chromium.spec @@ -0,0 +1,1463 @@ +%define _lto_cflags %{nil} +# enable | disable system build flags +# official builds have less debugging and go faster... but we have to shut some things off. +%global official_build 1 +%global enable_thin_lto 0 +# enable | disable bootstrap +# If this is 1, we enable bootstrap +%global bootstrap 0 +%global esbuild 1 +%global esbuild_version 0.19.11 + + +# set default numjobs for the koji build +%global numjobs %{_smp_build_ncpus} + +# Fancy build status, so we at least know, where we are.. +# %1 where +# %2 what +%global build_target() \ + export NINJA_STATUS="[%2:%f/%t] " ; \ + ninja -v -j %{numjobs} -C '%1' '%2' +# enable | disable headless client build +%global build_headless 1 +# enable|disable chrome-remote-desktop build +%global build_remoting 0 +%global system_nodejs 1 + +# enable | disable system brotli +# disable system brotli due to old system brotli +%global bundlebrotli 1 +# Chromium's fork of ICU is now something we can't unbundle. +# This is left here to ease the change if that ever switches. +%global bundleicu 1 +%global bundlere2 1 + +# The libxml_utils code depends on the specific bundled libxml checkout +# which is not compatible with the current code in the +# 2017-06-08. +%global bundlelibxml 0 +# openEuler's Python 2 stack is being removed, we use the bundled Python libraries +# This can be revisited once we upgrade to Python 3 +%global bundlepylibs 0 +%global bundlezlib 1 +%global use_qt 1 +# enable gtk3 by default +%global gtk3 1 + +%global bundleopus 1 +%global bundlelibusbx 1 +%global bundleharfbuzz 1 +%global bundlelibwebp 1 +%global bundlelibpng 1 +%global bundlelibjpeg 1 +%global bundlefreetype 1 +%global bundlelibdrm 1 +%global bundlefontconfig 1 +%global bundleffmpegfree 0 +%global bundlelibaom 1 +%global bundlevpx 1 +%global bundlezstd 0 + +%global use_vaapi 1 +%global use_v4l2_codec 0 +%global disable_bti 0 +%global enable_swiftshader 0 +# enable v4l2 and disable vaapi for aarch64 platform +%ifarch aarch64 +%global use_vaapi 0 +%global use_v4l2_codec 1 +%global optflags %(echo %{optflags} | sed 's/-mbranch-protection=standard /-mbranch-protection=pac-ret /') +# Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=2239523 +# Disable BTI until this is fixed upstream. +%global disable_bti 1 +%endif + +%ifarch riscv64 +%global use_vaapi 0 +%global bundlevpx 0 +%endif + +%global python312 0 +# Seems like we might need this sometimes +# Practically, no. But it's here in case we do. +%global use_gold 0 +%global build_clear_key_cdm 0 +# Disabled because of Google, starting with Chromium 88. +%global userestrictedapikeys 0 +# openEuer does not currently provide an official Google API key. +%global useapikey 0 + +# Leave this alone, please. +%global builddir out/Release +%global headlessbuilddir out/Headless +%global remotingbuilddir out/Remoting + +# enable|disable debuginfo +%global enable_debug 0 +%if ! %{enable_debug} +%global debug_package %{nil} +%global debug_level 0 +%else +%global debug_level 1 +# workaround for the error empty file debugsource +%undefine _debugsource_packages +%endif + +# %%{nil} for Stable; -beta for Beta; -dev for Devel +# dash in -beta and -dev is intentional ! +%global chromium_channel %{nil} +%global chromium_menu_name Chromium +%global chromium_browser_channel chromium-browser%{chromium_channel} +%global chromium_path %{_libdir}/chromium-browser%{chromium_channel} +%global crd_path %{_libdir}/chrome-remote-desktop + +%global __provides_exclude_from ^(%{chromium_path}/.*\\.so|%{chromium_path}/.*\\.so.*)$ +%global __requires_exclude ^(%{chromium_path}/.*\\.so|%{chromium_path}/.*\\.so.*)$ + +# enable clang by default +%global clang 1 +# set correct toolchain +%if %{clang} +%global toolchain clang +%else +%global toolchain gcc +%endif + + + +### Google API keys (see http://www.chromium.org/developers/how-tos/api-keys) +# Currently we do not provide API key unless somebody need this +%if %{useapikey} +%global api_key %nil +%else +%global api_key %nil +%endif +%global default_client_id %nil +%global default_client_secret %nil +%global chromoting_client_id %nil + +Name: chromium%{chromium_channel} +Version: 119.0.6045.159 +Release: 1 +Summary: A WebKit (Blink) powered web browser. +Url: http://www.chromium.org/Home +License: BSD-3-Clause AND LGPL-2.1-or-later AND Apache-2.0 AND IJG AND MIT AND GPL-2.0-or-later AND ISC AND OpenSSL AND (MPL-1.1 OR GPL-2.0-only OR LGPL-2.0-only) + +### Chromium Patches ### +Patch0: chromium-70.0.3538.67-sandbox-pie.patch +# Use /etc/chromium for initial_prefs +Patch1: chromium-115-initial_prefs-etc-path.patch +# system libusb +Patch2: chromium-119-system-libusb.patch +# Do not mangle zlib +Patch5: chromium-77.0.3865.75-no-zlib-mangle.patch +# Do not use unrar code, it is non-free +Patch6: chromium-119-norar.patch +# Try to load widevine from other places +Patch8: chromium-117-widevine-other-locations.patch +# Tell bootstrap.py to always use the version of Python we specify +Patch11: chromium-93.0.4577.63-py3-bootstrap.patch +# debian patch, disable font-test +Patch20: chromium-disable-font-tests.patch +# https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/chromium/files/chromium-unbundle-zlib.patch +Patch52: chromium-81.0.4044.92-unbundle-zlib.patch +# Fix headers to look for system paths when we are using system minizip +Patch61: chromium-119-system-minizip-header-fix.patch +# Fix issue where closure_compiler thinks java is only allowed in android builds +# https://bugs.chromium.org/p/chromium/issues/detail?id=1192875 +Patch65: chromium-91.0.4472.77-java-only-allowed-in-android-builds.patch +# Update rjsmin to 1.2.0 +Patch69: chromium-103.0.5060.53-update-rjsmin-to-1.2.0.patch +# Update six to 1.16.0 +Patch70: chromium-105.0.5195.52-python-six-1.16.0.patch +# Disable tests on remoting build +Patch82: chromium-98.0.4758.102-remoting-no-tests.patch +# patch for using system brotli +Patch89: chromium-116-system-brotli.patch +# disable GlobalMediaControlsCastStartStop to avoid crash +# when using the address bar media player button +Patch90: chromium-119-disable-GlobalMediaControlsCastStartStop.patch +# patch for using system opus +Patch91: chromium-108-system-opus.patch + +# need for old ffmpeg 5.x +Patch114: chromium-107-ffmpeg-5.x-duration.patch +# disable the check +Patch115: chromium-107-proprietary-codecs.patch +# drop av_stream_get_first_dts from internal ffmpeg +Patch116: chromium-119-ffmpeg-first_dts.patch +# fix tab crash with SIGTRAP error when using system ffmpeg +Patch117: chromium-118-sigtrap_system_ffmpeg.patch +# https://bugs.chromium.org/p/chromium/issues/detail?id=1325301 +# https://www.mail-archive.com/ffmpeg-devel@ffmpeg.org/msg121495.html + +# revert AV1 VAAPI video encode due to old libva on el9 +Patch130: chromium-119-revert-av1enc-el9.patch +# file conflict with old kernel on el8/el9 +Patch140: chromium-118-dma_buf_export_sync_file-conflict.patch + +Patch200: chromium-117-system-zstd.patch +# fixes for old clang version +# compiler build errors, no matching constructor for initialization +Patch300: chromium-119-no_matching_constructor.patch +Patch301: chromium-115-compiler-SkColor4f.patch +# workaround for clang bug, https://github.com/llvm/llvm-project/issues/57826 +Patch302: chromium-118-workaround_clang_bug-structured_binding.patch +# missing typename +Patch303: chromium-117-typename.patch +# error: invalid operands to binary expression +Patch304: chromium-117-string-convert.patch +# error: constexpr constructor's 3rd parameter type 'std::string' (aka 'basic_string<char>') is not a literal type +Patch305: chromium-119-constexpr.patch +Patch306: chromium-119-assert.patch +# not supported in old glibc < 2.30, error: fatal error: 'sys/ifunc.h' file not found +Patch307: chromium-118-arm64-memory_tagging.patch +# missing include header files +Patch310: chromium-119-missing-header-files.patch +# clang warnings +Patch311: chromium-115-clang-warnings.patch +# imp module is removed in python-3.12 +Patch312: chromium-118-python-3.12-deprecated.patch +# build error +Patch351: chromium-117-mnemonic-error.patch +# Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=2239523 +# https://bugs.chromium.org/p/chromium/issues/detail?id=1145581#c60 +# Disable BTI until this is fixed upstream. +Patch352: chromium-117-workaround_for_crash_on_BTI_capable_system.patch +# upstream patches +Patch400: chromium-119-dont-redefine-ATSPI-version-macros.patch +# fix build error, nullptr_t without namespace std:: +Patch401: chromium-119-nullptr_t-without-namespace-std.patch +# workaround for buggy Nvidia drivers fail to return FDs for planes +# of a BO which had already an imported BO destroyed before. +Patch402: chromium-119-nvidia-use-separate-bo-to-verify-modifier.patch +# hide UseChromeOSDirectVideoDecoder flag on VA-API devices to avoid crashes +Patch403: chromium-119-hide-UseChromeOSDirectVideoDecoder-flag-on-VA-API-devices.patch + +Patch404: fix-headers-ldflags.patch + +Patch500: chromium-icu72-2.patch + +# RISC-V Support +Patch1001: riscv-base.patch +Patch1002: riscv-build.patch +Patch1003: riscv-sandbox.patch +Patch1004: riscv-angle.patch +Patch1005: riscv-dav1d.patch +Patch1006: riscv-swiftshader.patch + + +# Use chromium-latest.py to generate clean tarball from released build tarballs, found here: +# https://commondatastorage.googleapis.com/chromium-browser-official/chromium-%%{version}.tar.xz +Source0: chromium-%{version}.tar.xz +Source2: chromium.conf +Source3: chromium-browser.sh +Source4: %{chromium_browser_channel}.desktop +Source5: chromium-browser.xml +Source6: chrome-remote-desktop@.service +Source7: master_preferences + +# esbuild binary +%if 0%{?esbuild} +Source101: https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-%{esbuild_version}.tgz +Source102: https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-%{esbuild_version}.tgz +Source103: https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-%{esbuild_version}.tgz +%endif + + +%if %{clang} +BuildRequires: clang +BuildRequires: clang-tools-extra +BuildRequires: llvm +BuildRequires: lld +%else +BuildRequires: gcc-c++ +BuildRequires: gcc +BuildRequires: binutils +%endif + +BuildRequires: libicu-devel +# build with system ffmpeg-free +%if ! %{bundleffmpegfree} +BuildRequires: pkgconfig(libavcodec) +BuildRequires: pkgconfig(libavfilter) +BuildRequires: pkgconfig(libavformat) +BuildRequires: pkgconfig(libavutil) +BuildRequires: ffmpeg-devel +%endif + +# build with system libaom +%if ! %{bundlelibaom} +BuildRequires: libaom-devel +%endif + +BuildRequires: alsa-lib-devel +BuildRequires: atk-devel +BuildRequires: bison +BuildRequires: cups-devel +BuildRequires: dbus-devel +BuildRequires: desktop-file-utils +BuildRequires: expat-devel +BuildRequires: flex +BuildRequires: fontconfig-devel +BuildRequires: glib2-devel +BuildRequires: glibc-devel +BuildRequires: gperf +BuildRequires: snappy-devel +BuildRequires: pkgconfig(dri) +BuildRequires: pkgconfig(epoxy) + +%if %{use_qt} +BuildRequires: pkgconfig(Qt5Core) +BuildRequires: pkgconfig(Qt5Widgets) +%endif + +%if ! %{bundleharfbuzz} +BuildRequires: harfbuzz-devel >= 2.4.0 +%endif + +BuildRequires: libatomic +BuildRequires: libcap-devel +BuildRequires: libcurl-devel + +%if ! %{bundlelibdrm} +BuildRequires: libdrm-devel +%endif + +BuildRequires: libgcrypt-devel +BuildRequires: libudev-devel +BuildRequires: libuuid-devel +BuildRequires: libusb-devel +BuildRequires: libutempter-devel +BuildRequires: libXdamage-devel +BuildRequires: libXtst-devel +BuildRequires: xcb-proto +BuildRequires: mesa-libgbm-devel + +%if ! %{bundlezlib} +BuildRequires: pkgconfig(zlib) minizip-ng-devel +%endif + +%if %{system_nodejs} +BuildRequires: nodejs +%endif + +%if ! %{bootstrap} +BuildRequires: gn +%endif + +BuildRequires: nss-devel >= 3.26 +BuildRequires: pciutils-devel +BuildRequires: pulseaudio-libs-devel + +# For screen sharing on Wayland +BuildRequires: pkgconfig(libpipewire-0.3) +# for /usr/bin/appstream-util +BuildRequires: libappstream-glib + +%if %{bootstrap} +# gn needs these +BuildRequires: libstdc++-static +%endif + +# Tries to use system libs whenever it can. +BuildRequires: bzip2-devel +BuildRequires: dbus-glib-devel +# For eu-strip +BuildRequires: elfutils +BuildRequires: elfutils-libelf-devel +BuildRequires: flac-devel +BuildRequires: pkgconfig(libexif) + +BuildRequires: pkgconfig(flac++) +BuildRequires: pkgconfig(slang) +BuildRequires: pkgconfig(theora) +BuildRequires: pkgconfig(sqlite3) + +%if ! %{bundlefreetype} +BuildRequires: freetype-devel +%endif +BuildRequires: git +BuildRequires: hwdata +BuildRequires: kernel-headers +BuildRequires: libevent-devel +BuildRequires: libffi-devel +BuildRequires: fdupes + +%if ! %{bundlelibjpeg} +BuildRequires: libjpeg-devel +%endif + +%if ! %{bundlelibpng} +BuildRequires: libpng-devel +%endif + +BuildRequires: libudev-devel +%if ! %{bundlelibusbx} +Requires: libusbx >= 1.0.21-0.1.git448584a +BuildRequires: libusbx-devel >= 1.0.21-0.1.git448584a +%endif +%if %{use_vaapi} +BuildRequires: libva-devel +%endif + +%if ! %{bundlelibwebp} +BuildRequires: libwebp-devel +%endif + +%if ! %{bundlezstd} +BuildRequires: pkgconfig(libzstd) +%endif + +BuildRequires: libxslt-devel +BuildRequires: libxshmfence-devel + +BuildRequires: mesa-libGL-devel + +%if ! %{bundleopus} +BuildRequires: opus-devel +%endif + +BuildRequires: perl(Switch) +BuildRequires: python3 +BuildRequires: pkgconfig(gtk+-3.0) +BuildRequires: python3-devel +BuildRequires: python3-zipp +BuildRequires: python3-simplejson +BuildRequires: python3-importlib-metadata +BuildRequires: python3-six + +%if ! %{bundlepylibs} +BuildRequires: python3-beautifulsoup4 +BuildRequires: python3-html5lib +BuildRequires: python3-markupsafe +BuildRequires: python3-ply +BuildRequires: python3-jinja2 +%endif + +%if ! %{bundlere2} +Requires: re2 >= 20160401 +BuildRequires: re2-devel >= 20160401 +%endif + +%if ! %{bundlebrotli} +BuildRequires: brotli-devel +%endif + +BuildRequires: speech-dispatcher-devel +BuildRequires: yasm +BuildRequires: zlib-devel + +# remote desktop needs this +BuildRequires: pam-devel +BuildRequires: systemd + +# using the built from source version on aarch64 +BuildRequires: ninja-build + +# Yes, java is needed as well.. +%if %{build_headless} +BuildRequires: java-17-openjdk-headless +%endif + +BuildRequires: libevdev-devel + +BuildRequires: procps-ng + +# There is a hardcoded check for nss 3.26 in the chromium code (crypto/nss_util.cc) +Requires: nss%{_isa} >= 3.26 +Requires: nss-mdns%{_isa} + +# GTK modules it expects to find for some reason. +%if %{gtk3} +Requires: libcanberra-gtk3%{_isa} +%else +Requires: libcanberra-gtk2%{_isa} +%endif + +# This enables support for u2f tokens +Requires: u2f-hidraw-policy + +Requires: chromium-common%{_isa} = %{version}-%{release} + +ExclusiveArch: x86_64 aarch64 riscv64 + +# Bundled bits (I'm sure I've missed some) +Provides: bundled(angle) = 2422 +Provides: bundled(bintrees) = 1.0.1 +# This is a fork of openssl. +Provides: bundled(boringssl) + +%if %{bundlebrotli} +Provides: bundled(brotli) = 222564a95d9ab58865a096b8d9f7324ea5f2e03e +%endif + +Provides: bundled(bspatch) +Provides: bundled(cacheinvalidation) = 20150720 +Provides: bundled(colorama) = 799604a104 +Provides: bundled(crashpad) +Provides: bundled(dmg_fp) +Provides: bundled(expat) = 2.2.0 +Provides: bundled(fdmlibm) = 5.3 + +# Don't get too excited. MPEG and other legally problematic stuff is stripped out. +%if %{bundleffmpegfree} +Provides: bundled(ffmpeg) = 6.0 +%endif + +%if %{bundlelibaom} +Provides: bundled(libaom) +%endif + +Provides: bundled(fips181) = 2.2.3 + +%if %{bundlefontconfig} +Provides: bundled(fontconfig) = 2.12.6 +%endif + +%if %{bundlefreetype} +Provides: bundled(freetype) = 2.11.0git +%endif + +Provides: bundled(gperftools) = svn144 + +%if %{bundleharfbuzz} +Provides: bundled(harfbuzz) = 2.4.0 +%endif + +Provides: bundled(hunspell) = 1.6.0 +Provides: bundled(iccjpeg) + +%if %{bundleicu} +Provides: bundled(icu) +%endif + +Provides: bundled(kitchensink) = 1 +Provides: bundled(leveldb) = 1.20 +Provides: bundled(libaddressinput) = 0 + +%if %{bundlelibdrm} +Provides: bundled(libdrm) = 2.4.85 +%endif + +Provides: bundled(libevent) = 1.4.15 +Provides: bundled(libjingle) = 9564 + +%if %{bundlelibjpeg} +Provides: bundled(libjpeg-turbo) = 1.4.90 +%endif + +Provides: bundled(libphonenumber) = a4da30df63a097d67e3c429ead6790ad91d36cf4 + +%if %{bundlelibpng} +Provides: bundled(libpng) = 1.6.22 +%endif + +Provides: bundled(libsrtp) = 2cbd85085037dc7bf2eda48d4cf62e2829056e2d + +%if %{bundlelibusbx} +Provides: bundled(libusbx) = 1.0.17 +%endif + +Provides: bundled(libvpx) = 1.6.0 + +%if %{bundlelibwebp} +Provides: bundled(libwebp) = 0.6.0 +%endif + +%if %{bundlelibxml} +# Well, it's actually newer than 2.9.4 and has code in it that has been reverted upstream... but eh. +Provides: bundled(libxml) = 2.9.4 +%endif + +Provides: bundled(libXNVCtrl) = 302.17 +Provides: bundled(libyuv) = 1651 +Provides: bundled(lzma) = 15.14 +Provides: bundled(libudis86) = 1.7.1 +Provides: bundled(mesa) = 9.0.3 +Provides: bundled(NSBezierPath) = 1.0 +Provides: bundled(mozc) + +%if %{bundleopus} +Provides: bundled(opus) = 1.1.3 +%endif + +Provides: bundled(ots) = 8d70cffebbfa58f67a5c3ed0e9bc84dccdbc5bc0 +Provides: bundled(protobuf) = 3.0.0.beta.3 +Provides: bundled(qcms) = 4 + +%if %{bundlere2} +Provides: bundled(re2) +%endif + +Provides: bundled(sfntly) = 04740d2600193b14aa3ef24cd9fbb3d5996b9f77 +Provides: bundled(skia) +Provides: bundled(SMHasher) = 0 +Provides: bundled(snappy) = 1.1.4-head +Provides: bundled(speech-dispatcher) = 0.7.1 +Provides: bundled(sqlite) = 3.17patched +Provides: bundled(superfasthash) = 0 +Provides: bundled(talloc) = 2.0.1 +Provides: bundled(usrsctp) = 0 +Provides: bundled(v8) = 5.9.211.31 +Provides: bundled(webrtc) = 90usrsctp +Provides: bundled(woff2) = 445f541996fe8376f3976d35692fd2b9a6eedf2d +Provides: bundled(xdg-mime) +Provides: bundled(xdg-user-dirs) +%if %{bundlezlib} +Provides: bundled(zlib) +%endif + +# For selinux scriptlet +Requires(post): /usr/sbin/semanage +Requires(post): /usr/sbin/restorecon + +%description +Chromium is an open-source web browser, powered by WebKit (Blink). + +%package common +Summary: Files needed for both the headless_shell and full Chromium + +# -common doesn't have chrome-remote-desktop bits +# but we need to clean it up if it gets disabled again +# NOTE: Check obsoletes version to be sure it matches +%if ! %{build_remoting} +Provides: chrome-remote-desktop = %{version}-%{release} +Obsoletes: chrome-remote-desktop <= 81.0.4044.138 +%endif + +%description common +%{summary}. + +%if %{build_remoting} +%package -n chrome-remote-desktop +Requires(pre): shadow-utils +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd +Requires: xorg-x11-server-Xvfb +Requires: python3-psutil +Requires: chromium-common%{_isa} = %{version}-%{release} +Summary: Remote desktop support for google-chrome & chromium + +%description -n chrome-remote-desktop +Remote desktop support for google-chrome & chromium. +%endif + +%package -n chromedriver +Summary: WebDriver for Google Chrome/Chromium +Requires: chromium-common%{_isa} = %{version}-%{release} + +%description -n chromedriver +WebDriver is an open source tool for automated testing of webapps across many +browsers. It provides capabilities for navigating to web pages, user input, +JavaScript execution, and more. ChromeDriver is a standalone server which +implements WebDriver's wire protocol for Chromium. It is being developed by +members of the Chromium and WebDriver teams. + +%package headless +Summary: A minimal headless shell built from Chromium +Requires: chromium-common%{_isa} = %{version}-%{release} + +%description headless +A minimal headless client built from Chromium. headless_shell is built +without support for alsa, cups, dbus, gconf, gio, kerberos, pulseaudio, or +udev. + +%prep +# download source0 +cd %{_sourcedir} +rm -f %{SOURCE0} +wget https://user-repo.openeuler.openatom.cn/lfs-tar/chromium/chromium-%{version}.tar.xz +cd - + +#%{__cat} %{SOURCE101} %{SOURCE102} %{SOURCE103} %{SOURCE104} %{SOURCE105} > %{SOURCE0} + +%setup -q -n chromium-%{version} + +### Chromium Patches ### +%patch -P0 -p1 -b .sandboxpie +%patch -P1 -p1 -b .etc +%patch -P2 -p1 -b .system-libusb +%patch -P5 -p1 -b .nozlibmangle +%patch -P6 -p1 -b .nounrar +%patch -P8 -p1 -b .widevine-other-locations +%patch -P11 -p1 -b .py3 +%patch -P20 -p1 -b .disable-font-test +%if ! %{bundlezlib} +%patch -P52 -p1 -b .unbundle-zlib +%patch -P61 -p1 -b .system-minizip +%endif +%patch -P65 -p1 -b .java-only-allowed +%patch -P69 -p1 -b .update-rjsmin-to-1.2.0 +%patch -P70 -p1 -b .update-six-to-1.16.0 +%patch -P82 -p1 -b .remoting-no-tests +%if ! %{bundlebrotli} +%patch -P89 -p1 -b .system-brotli +%endif +%patch -P90 -p1 -b .disable-GlobalMediaControlsCastStartStop +%if ! %{bundleopus} +%patch -P91 -p1 -b .system-opus +%endif +%if ! %{bundleffmpegfree} +%patch -P114 -p1 -b .ffmpeg-5.x-duration +%patch -P116 -p1 -b .first_dts +%patch -P115 -p1 -b .prop-codecs +%patch -P117 -p1 -b .sigtrap_system_ffmpeg +%endif +%patch -P140 -p1 -b .dma_buf_export_sync_file-conflict +%patch -P130 -p1 -b .revert-av1enc + +%if ! %{bundlezstd} +%patch -P200 -p1 -b .system-zstd +%endif + +%if %{clang} +%patch -P300 -p1 -b .no_matching_constructor +%patch -P301 -p1 -b .workaround_clang-SkColor4f +%patch -P302 -p1 -b .workaround_clang_bug-structured_binding +%patch -P303 -p1 -b .typename +%patch -P304 -p1 -b .string-convert +%patch -P305 -p1 -b .constexpr +%patch -P306 -p1 -b .assert +%endif + +%ifarch aarch64 +%patch -P307 -p1 -b .memory_tagging +%endif + +%patch -P310 -p1 -b .missing-header-files +%patch -P311 -p1 -b .clang-warnings + +%if 0%{?python312} +%patch -P312 -p1 -b .python-3.12-deprecated +%endif + +%patch -P351 -p1 -b .mnemonic-error + +%if %{disable_bti} +%patch -P352 -p1 -b .workaround_for_crash_on_BTI_capable_system +%endif + +%patch -P400 -p1 -R -b .revert-dont-redefine-ATSPI-version-macros +%patch -P401 -p1 -b .nullptr_t-without-namespace-std +%patch -P402 -p1 -b .nvidia-use-separate-bo-to-verify-modifiers +%patch -P403 -p1 -b .UseChromeOSDirectVideoDecoder-flag-on-VA-API-devices +%patch -P404 -p1 -b .fix-headers-ldflags + +%patch -P500 -p1 -b .icu72-2 + +# riscv patch + +%patch -P1001 -p1 -b .riscv-base +%patch -P1002 -p1 -b .riscv-build +%patch -P1003 -p1 -b .riscv-sandbox +%patch -P1004 -p1 -b .riscv-angle +%patch -P1005 -p1 -b .riscv-dav1d +%patch -P1006 -p1 -b .riscv-swiftshader + +# Change shebang in all relevant files in this directory and all subdirectories +# See `man find` for how the `-exec command {} +` syntax works +find -type f \( -iname "*.py" \) -exec sed -i '1s=^#! */usr/bin/\(python\|env python\)[23]\?=#!%{__python3}=' {} + + +%if %{bundlelibusbx} +# no hackity hack hack +%else +# hackity hack hack +rm -rf third_party/libusb/src/libusb/libusb.h +# we _shouldn't need to do this, but it looks like we do. +cp -a %{_includedir}/libusb-1.0/libusb.h third_party/libusb/src/libusb/libusb.h +%endif + +# Hard code extra version +sed -i 's/getenv("CHROME_VERSION_EXTRA")/"openEuler Project"/' chrome/common/channel_info_posix.cc + +# Fix hardcoded path in remoting code +sed -i 's|/opt/google/chrome-remote-desktop|%{crd_path}|g' remoting/host/setup/daemon_controller_delegate_linux.cc + +# change moc to moc-qt5 for +sed -i 's|moc|moc-qt5|g' ui/qt/moc_wrapper.py + + +# Get rid of the bundled esbuild + + +%build +%if ! %{esbuild} + ln -sf %{_bindir}/esbuild third_party/devtools-frontend/src/third_party/esbuild/esbuild +%else + %ifarch x86_64 + tar -zxf %{SOURCE101} --directory %{_tmppath} + %endif + %ifarch aarch64 + tar -zxf %{SOURCE102} --directory %{_tmppath} + %endif + %ifarch riscv64 + tar -zxf %{SOURCE103} --directory %{_tmppath} + %endif + mv %{_tmppath}/package/bin/esbuild third_party/devtools-frontend/src/third_party/esbuild/esbuild +%endif + +#correct path for nodejs binary +mkdir -p third_party/node/linux/node-linux-x64/bin +ln -s %{_bindir}/node third_party/node/linux/node-linux-x64/bin/node + +# Get rid of the pre-built eu-strip binary, it is x86_64 and of mysterious origin +rm -rf buildtools/third_party/eu-strip/bin/eu-strip +# Replace it with a symlink to copy +ln -s %{_bindir}/eu-strip buildtools/third_party/eu-strip/bin/eu-strip + + +# python3 +mkdir -p $HOME/bin +export PYTHON=python3 +ln -sfn %{_bindir}/$PYTHON $HOME/bin/python +export PATH="$HOME/bin/:$PATH" + +# REDUCE DEBUG as it gets TOO large +ARCH_FLAGS="`echo %{optflags} | sed -e 's/^-g / /g' -e 's/ -g / /g' -e 's/ -g$//g'`" +export CXXFLAGS="${ARCH_FLAGS} -Wno-return-type" +# extra flags to reduce warnings that aren't very useful +export CXXFLAGS="${CXXFLAGS} -Wno-pedantic -Wno-unused-result -Wno-unused-function -Wno-unused-variable -Wno-deprecated-declarations" +# ignore warnings for minor mistakes that are too common +export CXXFLAGS="${CXXFLAGS} -Wno-return-type -Wno-parentheses -Wno-misleading-indentation" +# ignore warnings that are not supported well until gcc 8 +export CXXFLAGS="${CXXFLAGS} -Wno-attributes" +# ignore warnings due to gcc bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84055) +export CXXFLAGS="${CXXFLAGS} -Wno-ignored-attributes" +# ingore new gcc 8 warnings that aren't yet handled upstream +export CXXFLAGS="${CXXFLAGS} -Wno-address -Wno-dangling-else -D_GNU_SOURCE" +# for wayland +export CXXFLAGS="${CXXFLAGS} -I/usr/include/wayland -I/usr/include/libxkbcommon -I/usr/include/opus" + + +%if %{clang} +export CC=clang +export CXX=clang++ +export AR=llvm-ar +export NM=llvm-nm +export READELF=llvm-readelf +export LDFLAGS="${LDFLAGS} -Wl,--build-id=sha1" +export CXXFLAGS="${CXXFLAGS} -Wno-unused-command-line-argument -Wno-unknown-warning-option" +%define __strip /usr/bin/llvm-strip +%if 0%{?enable_thin_lto} +# reduce the threads for linking even more due to LTO eating ton of memory +_link_threads=$(((%{jobs} - 2))) +test "$_link_threads" -le 0 && _link_threads=1 +export LDFLAGS="-flto=$_link_threads --param lto-max-streaming-parallelism=1" +%endif +%else +export CC=gcc +export CXX=g++ +export AR=ar +export NM=nm +export READELF=readelf +%endif + +%ifarch aarch64 +%if %{clang} +export CXXFLAGS="${CXXFLAGS} -flax-vector-conversions=all" +%else +export CXXFLAGS="${CXXFLAGS} -flax-vector-conversions -fno-omit-frame-pointer" +%endif +%endif + +# Core defines are flags that are true for both the browser and headless. +CHROMIUM_CORE_GN_DEFINES="" +# using system toolchain +CHROMIUM_CORE_GN_DEFINES+=' custom_toolchain="//build/toolchain/linux/unbundle:default"' +CHROMIUM_CORE_GN_DEFINES+=' host_toolchain="//build/toolchain/linux/unbundle:default"' +CHROMIUM_CORE_GN_DEFINES+=' is_debug=false dcheck_always_on=false dcheck_is_configurable=false' +CHROMIUM_CORE_GN_DEFINES+=' use_goma=false' +CHROMIUM_CORE_GN_DEFINES+=' enable_nacl=false' +CHROMIUM_CORE_GN_DEFINES+=' system_libdir="%{_lib}"' + +%if %{official_build} +CHROMIUM_CORE_GN_DEFINES+=' is_official_build=true is_cfi=false chrome_pgo_phase=0 use_debug_fission=true' +sed -i 's|OFFICIAL_BUILD|GOOGLE_CHROME_BUILD|g' tools/generate_shim_headers/generate_shim_headers.py +%endif + +%if %{useapikey} +CHROMIUM_CORE_GN_DEFINES+=' google_api_key="%{api_key}"' +%endif + +%if %{clang} +CHROMIUM_CORE_GN_DEFINES+=' is_clang=true' +CHROMIUM_CORE_GN_DEFINES+=' clang_base_path="%{_prefix}"' +CHROMIUM_CORE_GN_DEFINES+=' clang_use_chrome_plugins=false' +CHROMIUM_CORE_GN_DEFINES+=' use_lld=true' +%if %{enable_thin_lto} +CHROMIUM_CORE_GN_DEFINES+=" use_thin_lto=true" +%else +CHROMIUM_CORE_GN_DEFINES+=" use_thin_lto=false" +%endif +%else +CHROMIUM_CORE_GN_DEFINES+=' is_clang=false' +CHROMIUM_CORE_GN_DEFINES+=' use_lld=false' +%endif + +# disable rust, it's only using for testing +CHROMIUM_CORE_GN_DEFINES+=' enable_rust=false' + +CHROMIUM_CORE_GN_DEFINES+=' use_sysroot=false disable_fieldtrial_testing_config=true rtc_enable_symbol_export=true' + +%if %{use_gold} +CHROMIUM_CORE_GN_DEFINES+=' use_gold=true' +%else +CHROMIUM_CORE_GN_DEFINES+=' use_gold=false' +%endif + +%ifarch x86_64 +CHROMIUM_CORE_GN_DEFINES+=' host_cpu="x64"' +%endif +%ifarch aarch64 +CHROMIUM_CORE_GN_DEFINES+=' host_cpu="arm64"' +%endif +%ifarch riscv64 +CHROMIUM_CORE_GN_DEFINES+=' host_cpu="riscv64"' +%endif + +%if ! %{bundleicu} +CHROMIUM_CORE_GN_DEFINES+=' icu_use_data_file=false' +%endif +CHROMIUM_CORE_GN_DEFINES+=' target_os="linux"' +CHROMIUM_CORE_GN_DEFINES+=' current_os="linux"' +CHROMIUM_CORE_GN_DEFINES+=' treat_warnings_as_errors=false' +CHROMIUM_CORE_GN_DEFINES+=' use_custom_libcxx=false' +CHROMIUM_CORE_GN_DEFINES+=' enable_iterator_debugging=false' +CHROMIUM_CORE_GN_DEFINES+=' enable_vr=false' +CHROMIUM_CORE_GN_DEFINES+=' build_dawn_tests=false enable_perfetto_unittests=false' +CHROMIUM_CORE_GN_DEFINES+=' disable_fieldtrial_testing_config=true' +CHROMIUM_CORE_GN_DEFINES+=' symbol_level=1' +CHROMIUM_CORE_GN_DEFINES+=' blink_symbol_level=%{debug_level} v8_symbol_level=%{debug_level}' +CHROMIUM_CORE_GN_DEFINES+=' blink_enable_generated_code_formatting=false' +CHROMIUM_CORE_GN_DEFINES+=' angle_has_histograms=false' +CHROMIUM_CORE_GN_DEFINES+=' optimize_webui=false' +CHROMIUM_CORE_GN_DEFINES+=' enable_reading_list=false' +CHROMIUM_CORE_GN_DEFINES+=' fatal_linker_warnings=false' +CHROMIUM_CORE_GN_DEFINES+=' use_allocator_shim=true' +CHROMIUM_CORE_GN_DEFINES+=' use_partition_alloc=true' +CHROMIUM_CORE_GN_DEFINES+=' use_unofficial_version_number=false' + +%if ! %{bundleharfbuzz} +CHROMIUM_CORE_GN_DEFINES+=" use_system_harfbuzz=true" +%endif + +%if ! %{bundlefreetype} +CHROMIUM_CORE_GN_DEFINES+=" use_system_freetype=true" +%endif + +%if 0%{?enable_swiftshader} +CHROMIUM_CORE_GN_DEFINES+=" use_swiftshader_with_subzero=true" +%endif + +export CHROMIUM_CORE_GN_DEFINES + +# browser gn defines +CHROMIUM_BROWSER_GN_DEFINES="" + +# if systemwide ffmpeg free is used, the proprietary codecs can be set to true to load the codecs from ffmpeg-free +# the codecs computation is passed to ffmpeg-free in this case +%if ! %{bundleffmpegfree} +CHROMIUM_BROWSER_GN_DEFINES+=' ffmpeg_branding="Chrome" proprietary_codecs=true is_component_ffmpeg=true enable_ffmpeg_video_decoders=true media_use_ffmpeg=true' +%else +CHROMIUM_BROWSER_GN_DEFINES+=' ffmpeg_branding="Chromium" proprietary_codecs=true is_component_ffmpeg=true enable_ffmpeg_video_decoders=true media_use_ffmpeg=true' +%endif +CHROMIUM_BROWSER_GN_DEFINES+=' media_use_openh264=false' +CHROMIUM_BROWSER_GN_DEFINES+=' rtc_use_h264=false' +CHROMIUM_BROWSER_GN_DEFINES+=' use_kerberos=true' + +%if %{use_qt} +CHROMIUM_BROWSER_GN_DEFINES+=' use_qt=true' +%else +CHROMIUM_BROWSER_GN_DEFINES+=' use_qt=false' +%endif + +CHROMIUM_BROWSER_GN_DEFINES+=' use_gio=true use_pulseaudio=true link_pulseaudio=true' +CHROMIUM_BROWSER_GN_DEFINES+=' enable_hangout_services_extension=true' +CHROMIUM_BROWSER_GN_DEFINES+=' use_aura=true' +CHROMIUM_BROWSER_GN_DEFINES+=' enable_widevine=true' + +%if %{use_vaapi} +CHROMIUM_BROWSER_GN_DEFINES+=' use_vaapi=true' +%else +CHROMIUM_BROWSER_GN_DEFINES+=' use_vaapi=false' +%endif + +%if %{use_v4l2_codec} +CHROMIUM_BROWSER_GN_DEFINES+=' use_v4l2_codec=true' +%endif + +CHROMIUM_BROWSER_GN_DEFINES+=' rtc_use_pipewire=true rtc_link_pipewire=true' +CHROMIUM_BROWSER_GN_DEFINES+=' use_system_libffi=true' +CHROMIUM_BROWSER_GN_DEFINES+=' use_cups=true' +CHROMIUM_BROWSER_GN_DEFINES+=' use_dbus=true' +export CHROMIUM_BROWSER_GN_DEFINES + +# headless gn defines +CHROMIUM_HEADLESS_GN_DEFINES="" +CHROMIUM_HEADLESS_GN_DEFINES+=' use_ozone=true ozone_auto_platforms=false ozone_platform="headless" ozone_platform_headless=true' +CHROMIUM_HEADLESS_GN_DEFINES+=' angle_enable_vulkan=true angle_enable_swiftshader=true headless_use_embedded_resources=false' +CHROMIUM_HEADLESS_GN_DEFINES+=' headless_use_prefs=false headless_use_policy=false' +CHROMIUM_HEADLESS_GN_DEFINES+=' v8_use_external_startup_data=false enable_print_preview=false enable_remoting=false' +CHROMIUM_HEADLESS_GN_DEFINES+=' use_alsa=false use_bluez=false use_cups=false use_dbus=false use_gio=false use_kerberos=false' +CHROMIUM_HEADLESS_GN_DEFINES+=' use_libpci=false use_pulseaudio=false use_udev=false rtc_use_pipewire=false' +CHROMIUM_HEADLESS_GN_DEFINES+=' v8_enable_lazy_source_positions=false use_glib=false use_gtk=false use_pangocairo=false' +CHROMIUM_HEADLESS_GN_DEFINES+=' use_qt=false is_component_build=false enable_ffmpeg_video_decoders=false media_use_ffmpeg=false' +CHROMIUM_HEADLESS_GN_DEFINES+=' media_use_libvpx=false proprietary_codecs=false' +export CHROMIUM_HEADLESS_GN_DEFINES + +build/linux/unbundle/replace_gn_files.py --system-libraries \ + libevent \ + snappy \ +%if ! %{bundlelibaom} + libaom \ +%endif +%if ! %{bundlezstd} + zstd \ +%endif +%if ! %{bundlebrotli} + brotli \ +%endif +%if ! %{bundlefontconfig} + fontconfig \ +%endif +%if ! %{bundleffmpegfree} + ffmpeg \ +%endif +%if ! %{bundlefreetype} + freetype \ +%endif +%if ! %{bundleharfbuzz} + harfbuzz-ng \ +%endif +%if ! %{bundleicu} + icu \ +%endif +%if ! %{bundlelibdrm} + libdrm \ +%endif +%if ! %{bundlelibjpeg} + libjpeg \ +%endif +%if ! %{bundlelibpng} + libpng \ +%endif +%if ! %{bundlelibusbx} + libusb \ +%endif +%if ! %{bundlelibwebp} + libwebp \ +%endif +%if ! %{bundlelibxml} + libxml \ +%endif + libxslt \ +%if ! %{bundleopus} + opus \ +%endif +%if ! %{bundlere2} + re2 \ +%endif +%if ! %{bundlezlib} + zlib \ +%endif + flac + +# Check that there is no system 'google' module, shadowing bundled ones: +if python3 -c 'import google ; print google.__path__' 2> /dev/null ; then \ + echo "Python 3 'google' module is defined, this will shadow modules of this build"; \ + exit 1 ; \ +fi + +%if %{bootstrap} +tools/gn/bootstrap/bootstrap.py --gn-gen-args="$CHROMIUM_CORE_GN_DEFINES $CHROMIUM_BROWSER_GN_DEFINES" +%else +mkdir -p %{builddir} && cp -a %{_bindir}/gn %{builddir}/ +%endif + +%{builddir}/gn --script-executable=python3 gen --args="$CHROMIUM_CORE_GN_DEFINES $CHROMIUM_BROWSER_GN_DEFINES" %{builddir} + +%if %{build_headless} +%{builddir}/gn --script-executable=python3 gen --args="$CHROMIUM_CORE_GN_DEFINES $CHROMIUM_HEADLESS_GN_DEFINES" %{headlessbuilddir} +%endif + +%if %{build_remoting} +%{builddir}/gn --script-executable=python3 gen --args="$CHROMIUM_CORE_GN_DEFINES $CHROMIUM_BROWSER_GN_DEFINES" %{remotingbuilddir} +%endif + +%if %{build_headless} +# Do headless first. +%build_target %{headlessbuilddir} headless_shell +%endif + +%build_target %{builddir} chrome +%build_target %{builddir} chrome_sandbox +%build_target %{builddir} chromedriver + +%if %{build_clear_key_cdm} +%build_target %{builddir} clear_key_cdm +%endif + +%build_target %{builddir} policy_templates + +%if %{build_remoting} +# remote client +# ninja -C ../%{builddir} -vvv remoting_me2me_host remoting_start_host remoting_it2me_native_messaging_host remoting_me2me_native_messaging_host remoting_native_messaging_manifests remoting_resources +%build_target %{remotingbuilddir} remoting_all +%endif + +%install +rm -rf %{buildroot} + +mkdir -p %{buildroot}%{_bindir} \ + %{buildroot}%{chromium_path}/locales \ + %{buildroot}%{_sysconfdir}/%{name} + +# install system wide chromium config +%ifnarch riscv64 +cp -a %{SOURCE2} %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf +%endif +cp -a %{SOURCE3} %{buildroot}%{chromium_path}/%{chromium_browser_channel}.sh +chmod +x %{buildroot}%{chromium_path}/%{chromium_browser_channel}.sh + +%if ! %{use_vaapi} +# remove vaapi flags +echo "# system wide chromium flags" > %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf +%endif + +export BUILD_TARGET=`cat /etc/openEuler-release` +export CHROMIUM_PATH=%{chromium_path} +export CHROMIUM_BROWSER_CHANNEL=%{chromium_browser_channel} + +sed -i "s|@@BUILD_TARGET@@|$BUILD_TARGET|g" %{buildroot}%{chromium_path}/%{chromium_browser_channel}.sh +sed -i "s|@@CHROMIUM_PATH@@|$CHROMIUM_PATH|g" %{buildroot}%{chromium_path}/%{chromium_browser_channel}.sh +sed -i "s|@@CHROMIUM_BROWSER_CHANNEL@@|$CHROMIUM_BROWSER_CHANNEL|g" %{buildroot}%{chromium_path}/%{chromium_browser_channel}.sh + +%if "%{chromium_channel}" == "%{nil}" + sed -i "s|@@EXTRA_FLAGS@@||g" %{buildroot}%{chromium_path}/%{chromium_browser_channel}.sh +%else + # Enable debug outputs for beta and dev channels + export EXTRA_FLAGS="--enable-logging=stderr --v=2" + sed -i "s|@@EXTRA_FLAGS@@|$EXTRA_FLAGS|g" %{buildroot}%{chromium_path}/%{chromium_browser_channel}.sh +%endif + +ln -s ../..%{chromium_path}/%{chromium_browser_channel}.sh %{buildroot}%{_bindir}/%{chromium_browser_channel} +mkdir -p %{buildroot}%{_mandir}/man1/ + +pushd %{builddir} + cp -a chrom*.pak resources.pak icudtl.dat %{buildroot}%{chromium_path} + cp -a locales/*.pak %{buildroot}%{chromium_path}/locales/ + %ifarch x86_64 aarch64 riscv64 + cp -a libvk_swiftshader.so %{buildroot}%{chromium_path} + cp -a libvulkan.so.1 %{buildroot}%{chromium_path} + cp -a vk_swiftshader_icd.json %{buildroot}%{chromium_path} + %endif + cp -a chrome %{buildroot}%{chromium_path}/%{chromium_browser_channel} + cp -a chrome_sandbox %{buildroot}%{chromium_path}/chrome-sandbox + cp -a chrome_crashpad_handler %{buildroot}%{chromium_path}/chrome_crashpad_handler + cp -a ../../chrome/app/resources/manpage.1.in %{buildroot}%{_mandir}/man1/%{chromium_browser_channel}.1 + sed -i "s|@@PACKAGE@@|%{chromium_browser_channel}|g" %{buildroot}%{_mandir}/man1/%{chromium_browser_channel}.1 + sed -i "s|@@MENUNAME@@|%{chromium_menu_name}|g" %{buildroot}%{_mandir}/man1/%{chromium_browser_channel}.1 + + # V8 initial snapshots + # https://code.google.com/p/chromium/issues/detail?id=421063 + cp -a v8_context_snapshot.bin %{buildroot}%{chromium_path} + + # This is ANGLE, not to be confused with the similarly named files under swiftshader/ + cp -a libEGL.so libGLESv2.so %{buildroot}%{chromium_path} + + %if %{use_qt} + cp -a libqt5_shim.so %{buildroot}%{chromium_path} + %endif + + %if %{build_clear_key_cdm} + %ifarch x86_64 + cp -a ClearKeyCdm/_platform_specific/linux_x64/libclearkeycdm.so %{buildroot}%{chromium_path} + %endif + %ifarch aarch64 + cp -a ClearKeyCdm/_platform_specific/linux_arm64/libclearkeycdm.so %{buildroot}%{chromium_path} + %endif + %ifarch riscv64 + cp -a ClearKeyCdm/_platform_specific/linux_riscv64/libclearkeycdm.so %{buildroot}%{chromium_path} + %endif + %ifnarch x86_64 aarch64 riscv64 + cp -a libclearkeycdm.so %{buildroot}%{chromium_path} + %endif + %endif + + # chromedriver + cp -a chromedriver %{buildroot}%{chromium_path}/chromedriver + ln -s ../..%{chromium_path}/chromedriver %{buildroot}%{_bindir}/chromedriver + + %if %{build_remoting} + # Remote desktop bits + mkdir -p %{buildroot}%{crd_path} + %endif +popd + +%if %{build_remoting} + pushd %{remotingbuilddir} + # Hey, there is a library now. + cp -a libremoting_core.so %{buildroot}%{crd_path}/ + + # See remoting/host/installer/linux/Makefile for logic + mkdir -p %{buildroot}%{crd_path}/remoting_locales + cp -a remoting_native_messaging_host %{buildroot}%{crd_path}/native-messaging-host + cp -a remote_assistance_host %{buildroot}%{crd_path}/remote-assistance-host + cp -a remoting_locales/*.pak %{buildroot}%{crd_path}/remoting_locales/ + cp -a remoting_me2me_host %{buildroot}%{crd_path}/chrome-remote-desktop-host + cp -a remoting_start_host %{buildroot}%{crd_path}/start-host + cp -a remoting_user_session %{buildroot}%{crd_path}/user-session + chmod +s %{buildroot}%{crd_path}/user-session + + # chromium + mkdir -p %{buildroot}%{_sysconfdir}/chromium/native-messaging-hosts + # google-chrome + mkdir -p %{buildroot}%{_sysconfdir}/opt/chrome/ + cp -a remoting/* %{buildroot}%{_sysconfdir}/chromium/native-messaging-hosts/ + for i in %{buildroot}%{_sysconfdir}/chromium/native-messaging-hosts/*.json; do + sed -i 's|/opt/google/chrome-remote-desktop|%{crd_path}|g' $i + done + mkdir -p %{buildroot}%{_sysconfdir}/opt/chrome/native-messaging-hosts + pushd %{buildroot}%{_sysconfdir}/opt/chrome/native-messaging-hosts + for i in ../../../chromium/native-messaging-hosts/*; do + # rpm gets unhappy when we symlink here + cp -a $i . + done + popd + popd + + mkdir -p %{buildroot}/var/lib/chrome-remote-desktop + touch %{buildroot}/var/lib/chrome-remote-desktop/hashes + + mkdir -p %{buildroot}%{_sysconfdir}/pam.d/ + pushd %{buildroot}%{_sysconfdir}/pam.d/ + ln -s system-auth chrome-remote-desktop + popd + + cp -a remoting/host/linux/linux_me2me_host.py %{buildroot}%{crd_path}/chrome-remote-desktop + cp -a remoting/host/installer/linux/is-remoting-session %{buildroot}%{crd_path}/ + + mkdir -p %{buildroot}%{_unitdir} + cp -a %{SOURCE6} %{buildroot}%{_unitdir}/ + sed -i 's|@@CRD_PATH@@|%{crd_path}|g' %{buildroot}%{_unitdir}/chrome-remote-desktop@.service +%endif + +%if %{build_headless} + pushd %{headlessbuilddir} + cp -a headless_lib_data.pak headless_lib_strings.pak headless_shell %{buildroot}%{chromium_path} + popd +%endif + +# need to strip binaries explicitly when debug is disable +%if ! %{enable_debug} +pushd %{buildroot}%{chromium_path}/ +for f in *.so chrome_crashpad_handler chrome-sandbox chromium-browser headless_shell chromedriver chrome; do + [ -f $f ] && %{__strip} $f +done +popd +%endif + +# Add directories for policy management +mkdir -p %{buildroot}%{_sysconfdir}/chromium/policies/managed +mkdir -p %{buildroot}%{_sysconfdir}/chromium/policies/recommended + +cp -a out/Release/gen/chrome/app/policy/common/html/en-US/*.html . +cp -a out/Release/gen/chrome/app/policy/linux/examples/chrome.json . + +mkdir -p %{buildroot}%{_datadir}/icons/hicolor/256x256/apps +cp -a chrome/app/theme/chromium/product_logo_256.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/%{chromium_browser_channel}.png +mkdir -p %{buildroot}%{_datadir}/icons/hicolor/128x128/apps +cp -a chrome/app/theme/chromium/product_logo_128.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/%{chromium_browser_channel}.png +mkdir -p %{buildroot}%{_datadir}/icons/hicolor/64x64/apps +cp -a chrome/app/theme/chromium/product_logo_64.png %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/%{chromium_browser_channel}.png +mkdir -p %{buildroot}%{_datadir}/icons/hicolor/48x48/apps +cp -a chrome/app/theme/chromium/product_logo_48.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/%{chromium_browser_channel}.png +mkdir -p %{buildroot}%{_datadir}/icons/hicolor/24x24/apps +cp -a chrome/app/theme/chromium/product_logo_24.png %{buildroot}%{_datadir}/icons/hicolor/24x24/apps/%{chromium_browser_channel}.png + +# Install the master_preferences file +install -m 0644 %{SOURCE7} %{buildroot}%{_sysconfdir}/%{name}/ + +mkdir -p %{buildroot}%{_datadir}/applications/ +desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE4} + +install -D -m0644 chrome/installer/linux/common/chromium-browser/chromium-browser.appdata.xml \ + ${RPM_BUILD_ROOT}%{_datadir}/metainfo/%{chromium_browser_channel}.appdata.xml +appstream-util validate-relax --nonet ${RPM_BUILD_ROOT}%{_datadir}/metainfo/%{chromium_browser_channel}.appdata.xml + +mkdir -p %{buildroot}%{_datadir}/gnome-control-center/default-apps/ +cp -a %{SOURCE5} %{buildroot}%{_datadir}/gnome-control-center/default-apps/ + + +%post +# Set SELinux labels - semanage itself will adjust the lib directory naming +# But only do it when selinux is enabled, otherwise, it gets noisy. +if selinuxenabled; then + semanage fcontext -a -t bin_t /usr/lib/%{chromium_browser_channel} &>/dev/null || : + semanage fcontext -a -t bin_t /usr/lib/%{chromium_browser_channel}/%{chromium_browser_channel}.sh &>/dev/null || : + semanage fcontext -a -t chrome_sandbox_exec_t /usr/lib/chrome-sandbox &>/dev/null || : + restorecon -R -v %{chromium_path}/%{chromium_browser_channel} &>/dev/null || : +fi + +%if %{build_remoting} +%pretrans -n chrome-remote-desktop -p <lua> +path = "/etc/opt/chrome/native-messaging-hosts" +st = posix.stat(path) +if st and st.type == "link" then + os.remove(path) +end +%endif + +%if %{build_remoting} +%pre -n chrome-remote-desktop +getent group chrome-remote-desktop >/dev/null || groupadd -r chrome-remote-desktop + +%post -n chrome-remote-desktop +%systemd_post chrome-remote-desktop@.service + +%preun -n chrome-remote-desktop +%systemd_preun chrome-remote-desktop@.service + +%postun -n chrome-remote-desktop +%systemd_postun_with_restart chrome-remote-desktop@.service +%endif + +%files +%doc chrome_policy_list.html *.json +%license LICENSE +%config(noreplace) %{_sysconfdir}/%{name}/chromium.conf +%config %{_sysconfdir}/%{name}/master_preferences +%config %{_sysconfdir}/%{name}/policies/ +%if %{build_remoting} +%exclude %{_sysconfdir}/%{name}/native-messaging-hosts/* +%endif +%{_bindir}/%{chromium_browser_channel} +%{chromium_path}/*.bin +%{chromium_path}/chrome_*.pak +%{chromium_path}/chrome_crashpad_handler +%{chromium_path}/resources.pak +%{chromium_path}/%{chromium_browser_channel} +%{chromium_path}/%{chromium_browser_channel}.sh +%attr(4755, root, root) %{chromium_path}/chrome-sandbox +%if %{use_qt} +%{chromium_path}/libqt5_shim.so +%endif +%{_mandir}/man1/%{chromium_browser_channel}.* +%{_datadir}/icons/hicolor/*/apps/%{chromium_browser_channel}.png +%{_datadir}/applications/*.desktop +%{_datadir}/metainfo/*.appdata.xml +%{_datadir}/gnome-control-center/default-apps/chromium-browser.xml + +%files common +%if %{build_clear_key_cdm} +%{chromium_path}/libclearkeycdm.so +%endif +%ifarch x86_64 aarch64 riscv64 +%{chromium_path}/libvk_swiftshader.so* +%{chromium_path}/libvulkan.so* +%{chromium_path}/vk_swiftshader_icd.json +%{chromium_path}/libEGL.so* +%{chromium_path}/libGLESv2.so* +%endif +%{chromium_path}/icudtl.dat +%dir %{chromium_path}/ +%dir %{chromium_path}/locales/ +%lang(af) %{chromium_path}/locales/af.pak +%lang(am) %{chromium_path}/locales/am.pak +%lang(ar) %{chromium_path}/locales/ar.pak +%lang(bg) %{chromium_path}/locales/bg.pak +%lang(bn) %{chromium_path}/locales/bn.pak +%lang(ca) %{chromium_path}/locales/ca.pak +%lang(cs) %{chromium_path}/locales/cs.pak +%lang(da) %{chromium_path}/locales/da.pak +%lang(de) %{chromium_path}/locales/de.pak +%lang(el) %{chromium_path}/locales/el.pak +%lang(en_GB) %{chromium_path}/locales/en-GB.pak +# Chromium _ALWAYS_ needs en-US.pak as a fallback +# This means we cannot apply the lang code here. +# Otherwise, it is filtered out on install. +%{chromium_path}/locales/en-US.pak +%lang(es) %{chromium_path}/locales/es.pak +%lang(es) %{chromium_path}/locales/es-419.pak +%lang(et) %{chromium_path}/locales/et.pak +%lang(fa) %{chromium_path}/locales/fa.pak +%lang(fi) %{chromium_path}/locales/fi.pak +%lang(fil) %{chromium_path}/locales/fil.pak +%lang(fr) %{chromium_path}/locales/fr.pak +%lang(gu) %{chromium_path}/locales/gu.pak +%lang(he) %{chromium_path}/locales/he.pak +%lang(hi) %{chromium_path}/locales/hi.pak +%lang(hr) %{chromium_path}/locales/hr.pak +%lang(hu) %{chromium_path}/locales/hu.pak +%lang(id) %{chromium_path}/locales/id.pak +%lang(it) %{chromium_path}/locales/it.pak +%lang(ja) %{chromium_path}/locales/ja.pak +%lang(kn) %{chromium_path}/locales/kn.pak +%lang(ko) %{chromium_path}/locales/ko.pak +%lang(lt) %{chromium_path}/locales/lt.pak +%lang(lv) %{chromium_path}/locales/lv.pak +%lang(ml) %{chromium_path}/locales/ml.pak +%lang(mr) %{chromium_path}/locales/mr.pak +%lang(ms) %{chromium_path}/locales/ms.pak +%lang(nb) %{chromium_path}/locales/nb.pak +%lang(nl) %{chromium_path}/locales/nl.pak +%lang(pl) %{chromium_path}/locales/pl.pak +%lang(pt_BR) %{chromium_path}/locales/pt-BR.pak +%lang(pt_PT) %{chromium_path}/locales/pt-PT.pak +%lang(ro) %{chromium_path}/locales/ro.pak +%lang(ru) %{chromium_path}/locales/ru.pak +%lang(sk) %{chromium_path}/locales/sk.pak +%lang(sl) %{chromium_path}/locales/sl.pak +%lang(sr) %{chromium_path}/locales/sr.pak +%lang(sv) %{chromium_path}/locales/sv.pak +%lang(sw) %{chromium_path}/locales/sw.pak +%lang(ta) %{chromium_path}/locales/ta.pak +%lang(te) %{chromium_path}/locales/te.pak +%lang(th) %{chromium_path}/locales/th.pak +%lang(tr) %{chromium_path}/locales/tr.pak +%lang(uk) %{chromium_path}/locales/uk.pak +%lang(ur) %{chromium_path}/locales/ur.pak +%lang(vi) %{chromium_path}/locales/vi.pak +%lang(zh_CN) %{chromium_path}/locales/zh-CN.pak +%lang(zh_TW) %{chromium_path}/locales/zh-TW.pak + +%if %{build_headless} +%files headless +%{chromium_path}/headless_shell +%{chromium_path}/headless_lib_data.pak +%{chromium_path}/headless_lib_strings.pak +%endif + +%if %{build_remoting} +%files -n chrome-remote-desktop +%{crd_path}/chrome-remote-desktop +%{crd_path}/chrome-remote-desktop-host +%{crd_path}/is-remoting-session +%{crd_path}/libremoting_core.so* +%{crd_path}/native-messaging-host +%{crd_path}/remote-assistance-host +%{_sysconfdir}/pam.d/chrome-remote-desktop +%{_sysconfdir}/chromium/native-messaging-hosts/* +%{_sysconfdir}/opt/chrome/ +%{crd_path}/remoting_locales/ +%{crd_path}/start-host +%{crd_path}/user-session +%{_unitdir}/chrome-remote-desktop@.service +/var/lib/chrome-remote-desktop/ +%endif + +%files -n chromedriver +%doc AUTHORS +%license LICENSE +%{_bindir}/chromedriver +%{chromium_path}/chromedriver + +%changelog +* Wed Mar 06 2024 misaka00251 <liuxin@iscas.ac.cn> - 119.0.6045.159-1 +- Upgrade to version 119 + +* Wed Dec 30 2020 Jeffery.Gao <gaojianxing@huawei.com> - 87.0.4280.88-1 +- Package init diff --git a/fix-headers-ldflags.patch b/fix-headers-ldflags.patch new file mode 100644 index 0000000..c98f034 --- /dev/null +++ b/fix-headers-ldflags.patch @@ -0,0 +1,38 @@ +From 93f423aff6a293ff5212c1d870963c87c7b7823c Mon Sep 17 00:00:00 2001 +From: misaka00251 <liuxin@iscas.ac.cn> +Date: Mon, 29 Jan 2024 16:36:54 +0800 +Subject: [PATCH] Fix headers & ldflags + +--- + build/config/compiler/BUILD.gn | 2 +- + v8/src/compiler/turboshaft/utils.h | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn +index 6d05512ae3..b04747fd19 100644 +--- a/build/config/compiler/BUILD.gn ++++ b/build/config/compiler/BUILD.gn +@@ -773,7 +773,7 @@ config("compiler") { + # toolchain has this flag. + # We only use one version of LLVM within a build so there's no need to + # upgrade debug info, which can be expensive since it runs the verifier. +- ldflags += [ "-Wl,-mllvm,-disable-auto-upgrade-debug-info" ] ++ # ldflags += [ "-Wl,-mllvm,-disable-auto-upgrade-debug-info" ] + } + } + +diff --git a/v8/src/compiler/turboshaft/utils.h b/v8/src/compiler/turboshaft/utils.h +index 232c7a6dbd..8b70a15a88 100644 +--- a/v8/src/compiler/turboshaft/utils.h ++++ b/v8/src/compiler/turboshaft/utils.h +@@ -8,6 +8,7 @@ + #include <iostream> + #include <tuple> + ++#include <limits> + #include "src/base/logging.h" + + namespace v8::internal::compiler::turboshaft { +-- +2.39.3 (Apple Git-145) + diff --git a/master_preferences b/master_preferences new file mode 100644 index 0000000..f14b145 --- /dev/null +++ b/master_preferences @@ -0,0 +1,30 @@ +{ + "homepage": "https://www.openeuler.org/", + "homepage_is_newtabpage": false, + "distribution": { + "skip_first_run_ui": true, + "alternate_shortcut_text": false, + "oem_bubble": true, + "chrome_shortcut_icon_index": 0, + "create_all_shortcuts": true, + "show_welcome_page": true, + "system_level": false, + "verbose_logging": false, + "make_chrome_default": false, + "make_chrome_default_for_user": false + }, + "download": { + "extensions_to_open": "ymp" + }, + "browser": { + "show_home_button": true, + "check_default_browser": false, + "custom_chrome_frame": true +}, +"bookmark_bar": { + "show_on_all_tabs": true +}, + "first_run_tabs": [ + "https://www.openeuler.org/" + ] +} diff --git a/riscv-angle.patch b/riscv-angle.patch new file mode 100644 index 0000000..f474698 --- /dev/null +++ b/riscv-angle.patch @@ -0,0 +1,13 @@ +Index: chromium-115.0.5790.98/third_party/angle/src/common/platform.h +=================================================================== +--- chromium-115.0.5790.98.orig/third_party/angle/src/common/platform.h ++++ chromium-115.0.5790.98/third_party/angle/src/common/platform.h +@@ -108,7 +108,7 @@ + #endif + + // Mips and arm devices need to include stddef for size_t. +-#if defined(__mips__) || defined(__arm__) || defined(__aarch64__) ++#if defined(__mips__) || defined(__arm__) || defined(__aarch64__) || defined(__riscv) + # include <stddef.h> + #endif + diff --git a/riscv-base.patch b/riscv-base.patch new file mode 100644 index 0000000..513f89b --- /dev/null +++ b/riscv-base.patch @@ -0,0 +1,13 @@ +Index: chromium-115.0.5790.170/base/system/sys_info.cc +=================================================================== +--- chromium-115.0.5790.170.orig/base/system/sys_info.cc ++++ chromium-115.0.5790.170/base/system/sys_info.cc +@@ -185,6 +185,8 @@ std::string SysInfo::ProcessCPUArchitect + return "ARM"; + #elif defined(ARCH_CPU_ARM64) + return "ARM_64"; ++#elif defined(ARCH_CPU_RISCV64) ++ return "RISCV_64"; + #else + return std::string(); + #endif diff --git a/riscv-build.patch b/riscv-build.patch new file mode 100644 index 0000000..220817e --- /dev/null +++ b/riscv-build.patch @@ -0,0 +1,13 @@ +Index: chromium-119.0.6045.123/build/nocompile.gni +=================================================================== +--- chromium-119.0.6045.123.orig/build/nocompile.gni ++++ chromium-119.0.6045.123/build/nocompile.gni +@@ -57,7 +57,7 @@ if (is_win) { + declare_args() { + enable_nocompile_tests = (is_linux || is_chromeos || is_apple || is_win) && + is_clang && host_cpu == target_cpu +- enable_nocompile_tests_new = is_clang && !is_nacl ++ enable_nocompile_tests_new = is_clang && !is_nacl && false + } + + if (enable_nocompile_tests_new) { diff --git a/riscv-dav1d.patch b/riscv-dav1d.patch new file mode 100644 index 0000000..e20413d --- /dev/null +++ b/riscv-dav1d.patch @@ -0,0 +1,53 @@ +Index: chromium-113.0.5672.92/third_party/dav1d/config/linux/riscv64/config.h +=================================================================== +--- /dev/null ++++ chromium-113.0.5672.92/third_party/dav1d/config/linux/riscv64/config.h +@@ -0,0 +1,48 @@ ++/* ++ * Autogenerated by the Meson build system. ++ * Do not edit, your changes will be lost. ++ */ ++ ++#pragma once ++ ++#define ARCH_AARCH64 0 ++ ++#define ARCH_ARM 0 ++ ++#define ARCH_PPC64LE 0 ++ ++#define ARCH_X86 0 ++ ++#define ARCH_X86_32 0 ++ ++#define ARCH_X86_64 0 ++ ++#define CONFIG_16BPC 1 ++ ++#define CONFIG_8BPC 1 ++ ++// #define CONFIG_LOG 1 -- Logging is controlled by Chromium ++ ++#define ENDIANNESS_BIG 0 ++ ++#define HAVE_ASM 0 ++ ++#define HAVE_AS_FUNC 0 ++ ++#define HAVE_C11_GENERIC 1 ++ ++#define HAVE_CLOCK_GETTIME 1 ++ ++#define HAVE_DLSYM 1 ++ ++#define HAVE_GETAUXVAL 1 ++ ++#define HAVE_POSIX_MEMALIGN 1 ++ ++// #define HAVE_PTHREAD_GETAFFINITY_NP 1 -- Controlled by Chomium ++ ++// #define HAVE_PTHREAD_SETAFFINITY_NP 1 -- Controlled by Chomium ++ ++#define HAVE_UNISTD_H 1 ++ ++#define TRIM_DSP_FUNCTIONS 1 diff --git a/riscv-sandbox.patch b/riscv-sandbox.patch new file mode 100644 index 0000000..99501ca --- /dev/null +++ b/riscv-sandbox.patch @@ -0,0 +1,2038 @@ +Index: chromium-117.0.5938.132/sandbox/features.gni +=================================================================== +--- chromium-117.0.5938.132.orig/sandbox/features.gni ++++ chromium-117.0.5938.132/sandbox/features.gni +@@ -9,7 +9,8 @@ + use_seccomp_bpf = (is_linux || is_chromeos || is_android) && + (current_cpu == "x86" || current_cpu == "x64" || + current_cpu == "arm" || current_cpu == "arm64" || +- current_cpu == "mipsel" || current_cpu == "mips64el") ++ current_cpu == "mipsel" || current_cpu == "mips64el" || ++ current_cpu == "riscv64") + + # SSBD (Speculative Store Bypass Disable) is a mitigation of Spectre Variant 4. + # As Spectre Variant 4 can be mitigated by site isolation, opt-out SSBD on site +Index: chromium-117.0.5938.132/sandbox/linux/bpf_dsl/linux_syscall_ranges.h +=================================================================== +--- chromium-117.0.5938.132.orig/sandbox/linux/bpf_dsl/linux_syscall_ranges.h ++++ chromium-117.0.5938.132/sandbox/linux/bpf_dsl/linux_syscall_ranges.h +@@ -56,6 +56,13 @@ + #define MAX_PUBLIC_SYSCALL __NR_syscalls + #define MAX_SYSCALL MAX_PUBLIC_SYSCALL + ++#elif defined(__riscv) ++ ++#include <asm/unistd.h> ++#define MIN_SYSCALL 0u ++#define MAX_PUBLIC_SYSCALL __NR_syscalls ++#define MAX_SYSCALL MAX_PUBLIC_SYSCALL ++ + #else + #error "Unsupported architecture" + #endif +Index: chromium-117.0.5938.132/sandbox/linux/bpf_dsl/seccomp_macros.h +=================================================================== +--- chromium-117.0.5938.132.orig/sandbox/linux/bpf_dsl/seccomp_macros.h ++++ chromium-117.0.5938.132/sandbox/linux/bpf_dsl/seccomp_macros.h +@@ -343,6 +343,48 @@ struct regs_struct { + #define SECCOMP_PT_PARM4(_regs) (_regs).regs[3] + #define SECCOMP_PT_PARM5(_regs) (_regs).regs[4] + #define SECCOMP_PT_PARM6(_regs) (_regs).regs[5] ++ ++#elif defined(__riscv) ++struct regs_struct { ++ unsigned long regs[32]; ++}; ++ ++#define SECCOMP_ARCH AUDIT_ARCH_RISCV64 ++ ++#define SECCOMP_REG(_ctx, _reg) ((_ctx)->uc_mcontext.__gregs[_reg]) ++ ++#define SECCOMP_RESULT(_ctx) SECCOMP_REG(_ctx, REG_A0) ++#define SECCOMP_SYSCALL(_ctx) SECCOMP_REG(_ctx, REG_A0+7) ++#define SECCOMP_IP(_ctx) (_ctx)->uc_mcontext.__gregs[REG_PC] ++#define SECCOMP_PARM1(_ctx) SECCOMP_REG(_ctx, REG_A0) ++#define SECCOMP_PARM2(_ctx) SECCOMP_REG(_ctx, REG_A0+1) ++#define SECCOMP_PARM3(_ctx) SECCOMP_REG(_ctx, REG_A0+2) ++#define SECCOMP_PARM4(_ctx) SECCOMP_REG(_ctx, REG_A0+3) ++#define SECCOMP_PARM5(_ctx) SECCOMP_REG(_ctx, REG_A0+4) ++#define SECCOMP_PARM6(_ctx) SECCOMP_REG(_ctx, REG_A0+5) ++#define SECCOMP_PARM7(_ctx) SECCOMP_REG(_ctx, REG_A0+6) ++ ++#define SECCOMP_NR_IDX (offsetof(struct arch_seccomp_data, nr)) ++#define SECCOMP_ARCH_IDX (offsetof(struct arch_seccomp_data, arch)) ++#define SECCOMP_IP_MSB_IDX \ ++ (offsetof(struct arch_seccomp_data, instruction_pointer) + 4) ++#define SECCOMP_IP_LSB_IDX \ ++ (offsetof(struct arch_seccomp_data, instruction_pointer) + 0) ++#define SECCOMP_ARG_MSB_IDX(nr) \ ++ (offsetof(struct arch_seccomp_data, args) + 8 * (nr) + 4) ++#define SECCOMP_ARG_LSB_IDX(nr) \ ++ (offsetof(struct arch_seccomp_data, args) + 8 * (nr) + 0) ++ ++#define SECCOMP_PT_RESULT(_regs) (_regs).regs[REG_A0] ++#define SECCOMP_PT_SYSCALL(_regs) (_regs).regs[REG_A0+7] ++#define SECCOMP_PT_IP(_regs) (_regs).regs[REG_PC] ++#define SECCOMP_PT_PARM1(_regs) (_regs).regs[REG_A0] ++#define SECCOMP_PT_PARM2(_regs) (_regs).regs[REG_A0+1] ++#define SECCOMP_PT_PARM3(_regs) (_regs).regs[REG_A0+2] ++#define SECCOMP_PT_PARM4(_regs) (_regs).regs[REG_A0+3] ++#define SECCOMP_PT_PARM5(_regs) (_regs).regs[REG_A0+4] ++#define SECCOMP_PT_PARM6(_regs) (_regs).regs[REG_A0+5] ++#define SECCOMP_PT_PARM7(_regs) (_regs).regs[REG_A0+6] + #else + #error Unsupported target platform + +Index: chromium-117.0.5938.132/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc +=================================================================== +--- chromium-117.0.5938.132.orig/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc ++++ chromium-117.0.5938.132/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc +@@ -60,6 +60,9 @@ bool IsBaselinePolicyAllowed(int sysno) + #if defined(__mips__) + SyscallSets::IsMipsPrivate(sysno) || + #endif ++#if defined(__riscv) ++ SyscallSets::IsRiscvPrivate(sysno) || ++#endif + SyscallSets::IsAllowedOperationOnFd(sysno); + // clang-format on + } +@@ -193,7 +196,7 @@ ResultExpr EvaluateSyscallImpl(int fs_de + return RestrictFcntlCommands(); + #endif + +-#if !defined(__aarch64__) ++#if !defined(__aarch64__) && !defined(__riscv) + // fork() is never used as a system call (clone() is used instead), but we + // have seen it in fallback code on Android. + if (sysno == __NR_fork) { +@@ -255,7 +258,7 @@ ResultExpr EvaluateSyscallImpl(int fs_de + } + + #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ +- defined(__aarch64__) ++ defined(__aarch64__) || defined(__riscv) + if (sysno == __NR_mmap) + return RestrictMmapFlags(); + #endif +@@ -276,7 +279,7 @@ ResultExpr EvaluateSyscallImpl(int fs_de + return RestrictPrctl(); + + #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \ +- defined(__aarch64__) ++ defined(__aarch64__) || defined(__riscv) + if (sysno == __NR_socketpair) { + // Only allow AF_UNIX, PF_UNIX. Crash if anything else is seen. + static_assert(AF_UNIX == PF_UNIX, +@@ -366,7 +369,7 @@ ResultExpr EvaluateSyscallImpl(int fs_de + // Allow creating pipes, but don't allow weird flags to pipe2(). + // O_NOTIFICATION_PIPE (== O_EXCL) can be used to create + // "notification pipes", which are rarely used. +-#if !defined(__aarch64__) ++#if !defined(__aarch64__) && !defined(__riscv) + if (sysno == __NR_pipe) { + return Allow(); + } +Index: chromium-117.0.5938.132/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc +=================================================================== +--- chromium-117.0.5938.132.orig/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc ++++ chromium-117.0.5938.132/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc +@@ -37,6 +37,7 @@ + + #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \ + !defined(__arm__) && !defined(__aarch64__) && \ ++ !defined(__riscv) && \ + !defined(PTRACE_GET_THREAD_AREA) + // Also include asm/ptrace-abi.h since ptrace.h in older libc (for instance + // the one in Ubuntu 16.04 LTS) is missing PTRACE_GET_THREAD_AREA. +@@ -449,8 +450,10 @@ ResultExpr RestrictPtrace() { + #endif + return Switch(request) + .Cases({ +-#if !defined(__aarch64__) ++#if !defined(__aarch64__) && !defined(__riscv) + PTRACE_GETREGS, PTRACE_GETFPREGS, PTRACE_GET_THREAD_AREA, ++#endif ++#if !defined(__aarch64__) + PTRACE_GETREGSET, + #endif + #if defined(__arm__) +Index: chromium-117.0.5938.132/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc +=================================================================== +--- chromium-117.0.5938.132.orig/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc ++++ chromium-117.0.5938.132/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc +@@ -103,7 +103,7 @@ bool SyscallSets::IsUmask(int sysno) { + // Both EPERM and ENOENT are valid errno unless otherwise noted in comment. + bool SyscallSets::IsFileSystem(int sysno) { + switch (sysno) { +-#if !defined(__aarch64__) ++#if !defined(__aarch64__) && !defined(__riscv) + case __NR_access: // EPERM not a valid errno. + case __NR_chmod: + case __NR_chown: +@@ -136,7 +136,7 @@ bool SyscallSets::IsFileSystem(int sysno + case __NR_faccessat2: + case __NR_fchmodat: + case __NR_fchownat: // Should be called chownat ? +-#if defined(__x86_64__) || defined(__aarch64__) ++#if defined(__x86_64__) || defined(__aarch64__) || defined(__riscv) + case __NR_newfstatat: // fstatat(). EPERM not a valid errno. + #elif defined(__i386__) || defined(__arm__) || \ + (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) +@@ -241,7 +241,7 @@ bool SyscallSets::IsAllowedFileSystemAcc + case __NR_oldfstat: + #endif + #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ +- defined(__aarch64__) ++ defined(__aarch64__) || defined(__riscv) + case __NR_sync_file_range: // EPERM not a valid errno. + #elif defined(__arm__) + case __NR_arm_sync_file_range: // EPERM not a valid errno. +@@ -260,7 +260,7 @@ bool SyscallSets::IsDeniedFileSystemAcce + #if defined(__i386__) || defined(__arm__) + case __NR_fchown32: + #endif +-#if !defined(__aarch64__) ++#if !defined(__aarch64__) && !defined(__riscv) + case __NR_getdents: // EPERM not a valid errno. + #endif + case __NR_getdents64: // EPERM not a valid errno. +@@ -339,7 +339,7 @@ bool SyscallSets::IsProcessPrivilegeChan + bool SyscallSets::IsProcessGroupOrSession(int sysno) { + switch (sysno) { + case __NR_setpgid: +-#if !defined(__aarch64__) ++#if !defined(__aarch64__) && !defined(__riscv) + case __NR_getpgrp: + #endif + case __NR_setsid: +@@ -373,7 +373,7 @@ bool SyscallSets::IsAllowedSignalHandlin + case __NR_rt_sigqueueinfo: + case __NR_rt_sigsuspend: + case __NR_rt_tgsigqueueinfo: +-#if !defined(__aarch64__) ++#if !defined(__aarch64__) && !defined(__riscv) + case __NR_signalfd: + #endif + case __NR_signalfd4: +@@ -397,12 +397,12 @@ bool SyscallSets::IsAllowedOperationOnFd + switch (sysno) { + case __NR_close: + case __NR_dup: +-#if !defined(__aarch64__) ++#if !defined(__aarch64__) && !defined(__riscv) + case __NR_dup2: + #endif + case __NR_dup3: + #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \ +- defined(__aarch64__) ++ defined(__aarch64__) || defined(__riscv) + case __NR_shutdown: + #endif + return true; +@@ -441,7 +441,7 @@ bool SyscallSets::IsAllowedProcessStartO + return true; + case __NR_clone: // Should be parameter-restricted. + case __NR_setns: // Privileged. +-#if !defined(__aarch64__) ++#if !defined(__aarch64__) && !defined(__riscv) + case __NR_fork: + #endif + #if defined(__i386__) || defined(__x86_64__) +@@ -452,7 +452,7 @@ bool SyscallSets::IsAllowedProcessStartO + #endif + case __NR_set_tid_address: + case __NR_unshare: +-#if !defined(__mips__) && !defined(__aarch64__) ++#if !defined(__mips__) && !defined(__aarch64__) && !defined(__riscv) + case __NR_vfork: + #endif + default: +@@ -477,7 +477,7 @@ bool SyscallSets::IsAllowedFutex(int sys + + bool SyscallSets::IsAllowedEpoll(int sysno) { + switch (sysno) { +-#if !defined(__aarch64__) ++#if !defined(__aarch64__) && !defined(__riscv) + case __NR_epoll_create: + case __NR_epoll_wait: + #endif +@@ -499,7 +499,7 @@ bool SyscallSets::IsAllowedEpoll(int sys + bool SyscallSets::IsDeniedGetOrModifySocket(int sysno) { + switch (sysno) { + #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \ +- defined(__aarch64__) ++ defined(__aarch64__) || defined(__riscv) + case __NR_accept: + case __NR_accept4: + case __NR_bind: +@@ -553,7 +553,7 @@ bool SyscallSets::IsAllowedAddressSpaceA + case __NR_mincore: + case __NR_mlockall: + #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ +- defined(__aarch64__) ++ defined(__aarch64__) || defined(__riscv) + case __NR_mmap: + #endif + #if defined(__i386__) || defined(__arm__) || \ +@@ -586,7 +586,7 @@ bool SyscallSets::IsAllowedGeneralIo(int + (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) + case __NR__llseek: + #endif +-#if !defined(__aarch64__) ++#if !defined(__aarch64__) && !defined(__riscv) + case __NR_poll: + #endif + case __NR_ppoll: +@@ -607,7 +607,7 @@ bool SyscallSets::IsAllowedGeneralIo(int + case __NR_recv: + #endif + #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \ +- defined(__aarch64__) ++ defined(__aarch64__) || defined(__riscv) + case __NR_recvfrom: // Could specify source. + case __NR_recvmsg: // Could specify source. + #endif +@@ -622,7 +622,7 @@ bool SyscallSets::IsAllowedGeneralIo(int + case __NR_send: + #endif + #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \ +- defined(__aarch64__) ++ defined(__aarch64__) || defined(__riscv) + case __NR_sendmsg: // Could specify destination. + case __NR_sendto: // Could specify destination. + #endif +@@ -671,7 +671,7 @@ bool SyscallSets::IsSeccomp(int sysno) { + bool SyscallSets::IsAllowedBasicScheduler(int sysno) { + switch (sysno) { + case __NR_sched_yield: +-#if !defined(__aarch64__) ++#if !defined(__aarch64__) && !defined(__riscv) + case __NR_pause: + #endif + case __NR_nanosleep: +@@ -755,7 +755,7 @@ bool SyscallSets::IsNuma(int sysno) { + case __NR_getcpu: + case __NR_mbind: + #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ +- defined(__aarch64__) ++ defined(__aarch64__) || defined(__riscv) + case __NR_migrate_pages: + #endif + case __NR_move_pages: +@@ -790,7 +790,7 @@ bool SyscallSets::IsGlobalProcessEnviron + switch (sysno) { + case __NR_acct: // Privileged. + #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ +- defined(__aarch64__) ++ defined(__aarch64__) || defined(__riscv) + case __NR_getrlimit: + #endif + #if defined(__i386__) || defined(__arm__) +@@ -825,7 +825,7 @@ bool SyscallSets::IsDebug(int sysno) { + + bool SyscallSets::IsGlobalSystemStatus(int sysno) { + switch (sysno) { +-#if !defined(__aarch64__) ++#if !defined(__aarch64__) && !defined(__riscv) + case __NR__sysctl: + case __NR_sysfs: + #endif +@@ -843,7 +843,7 @@ bool SyscallSets::IsGlobalSystemStatus(i + + bool SyscallSets::IsEventFd(int sysno) { + switch (sysno) { +-#if !defined(__aarch64__) ++#if !defined(__aarch64__) && !defined(__riscv) + case __NR_eventfd: + #endif + case __NR_eventfd2: +@@ -895,6 +895,7 @@ bool SyscallSets::IsKeyManagement(int sy + } + + #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \ ++ defined(__riscv) || \ + (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) + bool SyscallSets::IsSystemVSemaphores(int sysno) { + switch (sysno) { +@@ -914,7 +915,7 @@ bool SyscallSets::IsSystemVSemaphores(in + #endif + + #if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \ +- defined(__aarch64__) || \ ++ defined(__aarch64__) || defined(__riscv) || \ + (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) + // These give a lot of ambient authority and bypass the setuid sandbox. + bool SyscallSets::IsSystemVSharedMemory(int sysno) { +@@ -931,6 +932,7 @@ bool SyscallSets::IsSystemVSharedMemory( + #endif + + #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \ ++ defined(__riscv) || \ + (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) + bool SyscallSets::IsSystemVMessageQueue(int sysno) { + switch (sysno) { +@@ -962,6 +964,7 @@ bool SyscallSets::IsSystemVIpc(int sysno + + bool SyscallSets::IsAnySystemV(int sysno) { + #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \ ++ defined(__riscv) || \ + (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) + return IsSystemVMessageQueue(sysno) || IsSystemVSemaphores(sysno) || + IsSystemVSharedMemory(sysno); +@@ -999,7 +1002,7 @@ bool SyscallSets::IsAdvancedScheduler(in + bool SyscallSets::IsInotify(int sysno) { + switch (sysno) { + case __NR_inotify_add_watch: +-#if !defined(__aarch64__) ++#if !defined(__aarch64__) && !defined(__riscv) + case __NR_inotify_init: + #endif + case __NR_inotify_init1: +@@ -1137,7 +1140,7 @@ bool SyscallSets::IsMisc(int sysno) { + #if defined(__x86_64__) + case __NR_tuxcall: + #endif +-#if !defined(__aarch64__) ++#if !defined(__aarch64__) && !defined(__riscv) + case __NR_vserver: + #endif + return true; +@@ -1196,6 +1199,17 @@ bool SyscallSets::IsMipsMisc(int sysno) + } + #endif // defined(__mips__) + ++#if defined(__riscv) ++bool SyscallSets::IsRiscvPrivate(int sysno) { ++ switch (sysno) { ++ case __NR_riscv_flush_icache: ++ return true; ++ default: ++ return false; ++ } ++} ++#endif // defined(__riscv) ++ + bool SyscallSets::IsGoogle3Threading(int sysno) { + switch (sysno) { + case __NR_getitimer: +Index: chromium-117.0.5938.132/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h +=================================================================== +--- chromium-117.0.5938.132.orig/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h ++++ chromium-117.0.5938.132/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h +@@ -52,7 +52,7 @@ class SANDBOX_EXPORT SyscallSets { + #endif + + #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \ +- defined(__aarch64__) ++ defined(__aarch64__) || defined(__riscv) + static bool IsNetworkSocketInformation(int sysno); + #endif + +@@ -79,18 +79,21 @@ class SANDBOX_EXPORT SyscallSets { + static bool IsAsyncIo(int sysno); + static bool IsKeyManagement(int sysno); + #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \ +- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) ++ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \ ++ defined(__riscv) + static bool IsSystemVSemaphores(int sysno); + #endif + #if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \ + defined(__aarch64__) || \ +- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) ++ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \ ++ defined(__riscv) + // These give a lot of ambient authority and bypass the setuid sandbox. + static bool IsSystemVSharedMemory(int sysno); + #endif + + #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \ +- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) ++ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \ ++ defined(__riscv) + static bool IsSystemVMessageQueue(int sysno); + #endif + +@@ -117,6 +120,9 @@ class SANDBOX_EXPORT SyscallSets { + static bool IsMipsPrivate(int sysno); + static bool IsMipsMisc(int sysno); + #endif // defined(__mips__) ++#if defined(__riscv) ++ static bool IsRiscvPrivate(int sysno); ++#endif + static bool IsGoogle3Threading(int sysno); + }; + +Index: chromium-117.0.5938.132/sandbox/linux/seccomp-bpf/syscall.cc +=================================================================== +--- chromium-117.0.5938.132.orig/sandbox/linux/seccomp-bpf/syscall.cc ++++ chromium-117.0.5938.132/sandbox/linux/seccomp-bpf/syscall.cc +@@ -18,7 +18,7 @@ namespace sandbox { + namespace { + + #if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY) || \ +- defined(ARCH_CPU_MIPS_FAMILY) ++ defined(ARCH_CPU_MIPS_FAMILY) || defined(ARCH_CPU_RISCV_FAMILY) + // Number that's not currently used by any Linux kernel ABIs. + const int kInvalidSyscallNumber = 0x351d3; + #else +@@ -308,6 +308,28 @@ asm(// We need to be able to tell the ke + "2:ret\n" + ".cfi_endproc\n" + ".size SyscallAsm, .-SyscallAsm\n" ++#elif defined(__riscv) ++ ".text\n" ++ ".align 2\n" ++ ".type SyscallAsm, %function\n" ++ "SyscallAsm:\n" ++ ".cfi_startproc\n" ++ "bgez a0,1f\n" ++ "lla a0,2f\n" ++ "j 2f\n" ++ "1:mv a7, a0\n" ++ "ld a0, (a1)\n" ++ "ld a2, 16(a1)\n" ++ "ld a3, 24(a1)\n" ++ "ld a4, 32(a1)\n" ++ "ld a5, 40(a1)\n" ++ "ld a6, 48(a1)\n" ++ "ld a1, 8(a1)\n" ++ // Enter the kernel ++ "scall\n" ++ "2:ret\n" ++ ".cfi_endproc\n" ++ ".size SyscallAsm, .-SyscallAsm\n" + #endif + ); // asm + +@@ -319,6 +341,10 @@ intptr_t SyscallAsm(intptr_t nr, const i + extern "C" { + intptr_t SyscallAsm(intptr_t nr, const intptr_t args[8]); + } ++#elif defined(__riscv) ++extern "C" { ++intptr_t SyscallAsm(intptr_t nr, const intptr_t args[7]); ++} + #endif + + } // namespace +@@ -351,6 +377,10 @@ intptr_t Syscall::Call(int nr, + // where that makes sense. + #if defined(__mips__) + const intptr_t args[8] = {p0, p1, p2, p3, p4, p5, p6, p7}; ++#elif defined(__riscv) ++ DCHECK_EQ(p7, 0) << " Support for syscalls with more than seven arguments " ++ "not added for this architecture"; ++ const intptr_t args[7] = {p0, p1, p2, p3, p4, p5, p6}; + #else + DCHECK_EQ(p6, 0) << " Support for syscalls with more than six arguments not " + "added for this architecture"; +@@ -425,6 +455,8 @@ intptr_t Syscall::Call(int nr, + ret = inout; + } + ++#elif defined(__riscv) ++ intptr_t ret = SyscallAsm(nr, args); + #else + #error "Unimplemented architecture" + #endif +Index: chromium-117.0.5938.132/sandbox/linux/services/credentials.cc +=================================================================== +--- chromium-117.0.5938.132.orig/sandbox/linux/services/credentials.cc ++++ chromium-117.0.5938.132/sandbox/linux/services/credentials.cc +@@ -80,7 +80,7 @@ bool ChrootToSafeEmptyDir() { + pid_t pid = -1; + alignas(16) char stack_buf[PTHREAD_STACK_MIN]; + #if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY) || \ +- defined(ARCH_CPU_MIPS_FAMILY) ++ defined(ARCH_CPU_MIPS_FAMILY) || defined(ARCH_CPU_RISCV_FAMILY) + // The stack grows downward. + void* stack = stack_buf + sizeof(stack_buf); + #else +Index: chromium-117.0.5938.132/sandbox/linux/services/syscall_wrappers.cc +=================================================================== +--- chromium-117.0.5938.132.orig/sandbox/linux/services/syscall_wrappers.cc ++++ chromium-117.0.5938.132/sandbox/linux/services/syscall_wrappers.cc +@@ -61,7 +61,7 @@ long sys_clone(unsigned long flags, + #if defined(ARCH_CPU_X86_64) + return syscall(__NR_clone, flags, child_stack, ptid, ctid, tls); + #elif defined(ARCH_CPU_X86) || defined(ARCH_CPU_ARM_FAMILY) || \ +- defined(ARCH_CPU_MIPS_FAMILY) ++ defined(ARCH_CPU_MIPS_FAMILY) || defined(ARCH_CPU_RISCV_FAMILY) + // CONFIG_CLONE_BACKWARDS defined. + return syscall(__NR_clone, flags, child_stack, ptid, tls, ctid); + #endif +Index: chromium-117.0.5938.132/sandbox/linux/syscall_broker/broker_process.cc +=================================================================== +--- chromium-117.0.5938.132.orig/sandbox/linux/syscall_broker/broker_process.cc ++++ chromium-117.0.5938.132/sandbox/linux/syscall_broker/broker_process.cc +@@ -122,44 +122,46 @@ bool BrokerProcess::IsSyscallBrokerable( + // and are default disabled in Android. So, we should refuse to broker them + // to be consistent with the platform's restrictions. + switch (sysno) { +-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) ++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv) + case __NR_access: + #endif + case __NR_faccessat: + case __NR_faccessat2: + return !fast_check || policy_->allowed_command_set.test(COMMAND_ACCESS); + +-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) ++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv) + case __NR_mkdir: + #endif + case __NR_mkdirat: + return !fast_check || policy_->allowed_command_set.test(COMMAND_MKDIR); + +-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) ++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv) + case __NR_open: + #endif + case __NR_openat: + return !fast_check || policy_->allowed_command_set.test(COMMAND_OPEN); + +-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) ++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv) + case __NR_readlink: + #endif + case __NR_readlinkat: + return !fast_check || policy_->allowed_command_set.test(COMMAND_READLINK); + +-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) ++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv) + case __NR_rename: + #endif ++#ifdef __NR_renameat + case __NR_renameat: ++#endif + case __NR_renameat2: + return !fast_check || policy_->allowed_command_set.test(COMMAND_RENAME); + +-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) ++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv) + case __NR_rmdir: + return !fast_check || policy_->allowed_command_set.test(COMMAND_RMDIR); + #endif + +-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) ++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv) + case __NR_stat: + case __NR_lstat: + #endif +@@ -169,7 +171,7 @@ bool BrokerProcess::IsSyscallBrokerable( + #if defined(__NR_fstatat64) + case __NR_fstatat64: + #endif +-#if defined(__x86_64__) || defined(__aarch64__) ++#if defined(__x86_64__) || defined(__aarch64__) || defined(__riscv) + case __NR_newfstatat: + #endif + return !fast_check || policy_->allowed_command_set.test(COMMAND_STAT); +@@ -184,7 +186,7 @@ bool BrokerProcess::IsSyscallBrokerable( + return !fast_check || policy_->allowed_command_set.test(COMMAND_STAT); + #endif + +-#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) ++#if !defined(__aarch64__) && !BUILDFLAG(IS_ANDROID) && !defined(__riscv) + case __NR_unlink: + return !fast_check || policy_->allowed_command_set.test(COMMAND_UNLINK); + #endif +Index: chromium-117.0.5938.132/sandbox/linux/system_headers/linux_seccomp.h +=================================================================== +--- chromium-117.0.5938.132.orig/sandbox/linux/system_headers/linux_seccomp.h ++++ chromium-117.0.5938.132/sandbox/linux/system_headers/linux_seccomp.h +@@ -39,6 +39,10 @@ + #define EM_AARCH64 183 + #endif + ++#ifndef EM_RISCV ++#define EM_RISCV 243 ++#endif ++ + #ifndef __AUDIT_ARCH_64BIT + #define __AUDIT_ARCH_64BIT 0x80000000 + #endif +@@ -71,6 +75,10 @@ + #define AUDIT_ARCH_AARCH64 (EM_AARCH64 | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE) + #endif + ++#ifndef AUDIT_ARCH_RISCV64 ++#define AUDIT_ARCH_RISCV64 (EM_RISCV|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) ++#endif ++ + // For prctl.h + #ifndef PR_SET_SECCOMP + #define PR_SET_SECCOMP 22 +Index: chromium-117.0.5938.132/sandbox/linux/system_headers/linux_signal.h +=================================================================== +--- chromium-117.0.5938.132.orig/sandbox/linux/system_headers/linux_signal.h ++++ chromium-117.0.5938.132/sandbox/linux/system_headers/linux_signal.h +@@ -13,7 +13,7 @@ + // (not undefined, but defined different values and in different memory + // layouts). So, fill the gap here. + #if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \ +- defined(__aarch64__) ++ defined(__aarch64__) || defined(__riscv) + + #define LINUX_SIGHUP 1 + #define LINUX_SIGINT 2 +Index: chromium-117.0.5938.132/sandbox/linux/system_headers/linux_stat.h +=================================================================== +--- chromium-117.0.5938.132.orig/sandbox/linux/system_headers/linux_stat.h ++++ chromium-117.0.5938.132/sandbox/linux/system_headers/linux_stat.h +@@ -150,7 +150,7 @@ struct kernel_stat { + int st_blocks; + int st_pad4[14]; + }; +-#elif defined(__aarch64__) ++#elif defined(__aarch64__) || defined(__riscv) + struct kernel_stat { + unsigned long st_dev; + unsigned long st_ino; +Index: chromium-117.0.5938.132/sandbox/linux/system_headers/linux_syscalls.h +=================================================================== +--- chromium-117.0.5938.132.orig/sandbox/linux/system_headers/linux_syscalls.h ++++ chromium-117.0.5938.132/sandbox/linux/system_headers/linux_syscalls.h +@@ -35,5 +35,9 @@ + #include "sandbox/linux/system_headers/arm64_linux_syscalls.h" + #endif + ++#if defined(__riscv) && __riscv_xlen == 64 ++#include "sandbox/linux/system_headers/riscv64_linux_syscalls.h" ++#endif ++ + #endif // SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SYSCALLS_H_ + +Index: chromium-117.0.5938.132/sandbox/linux/system_headers/riscv64_linux_syscalls.h +=================================================================== +--- /dev/null ++++ chromium-117.0.5938.132/sandbox/linux/system_headers/riscv64_linux_syscalls.h +@@ -0,0 +1,1222 @@ ++// Copyright 2014 The Chromium Authors ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#ifndef SANDBOX_LINUX_SYSTEM_HEADERS_RISCV64_LINUX_SYSCALLS_H_ ++#define SANDBOX_LINUX_SYSTEM_HEADERS_RISCV64_LINUX_SYSCALLS_H_ ++ ++#include <asm-generic/unistd.h> ++ ++#if !defined(__NR_io_setup) ++#define __NR_io_setup 0 ++#endif ++ ++#if !defined(__NR_io_destroy) ++#define __NR_io_destroy 1 ++#endif ++ ++#if !defined(__NR_io_submit) ++#define __NR_io_submit 2 ++#endif ++ ++#if !defined(__NR_io_cancel) ++#define __NR_io_cancel 3 ++#endif ++ ++#if !defined(__NR_io_getevents) ++#define __NR_io_getevents 4 ++#endif ++ ++#if !defined(__NR_setxattr) ++#define __NR_setxattr 5 ++#endif ++ ++#if !defined(__NR_lsetxattr) ++#define __NR_lsetxattr 6 ++#endif ++ ++#if !defined(__NR_fsetxattr) ++#define __NR_fsetxattr 7 ++#endif ++ ++#if !defined(__NR_getxattr) ++#define __NR_getxattr 8 ++#endif ++ ++#if !defined(__NR_lgetxattr) ++#define __NR_lgetxattr 9 ++#endif ++ ++#if !defined(__NR_fgetxattr) ++#define __NR_fgetxattr 10 ++#endif ++ ++#if !defined(__NR_listxattr) ++#define __NR_listxattr 11 ++#endif ++ ++#if !defined(__NR_llistxattr) ++#define __NR_llistxattr 12 ++#endif ++ ++#if !defined(__NR_flistxattr) ++#define __NR_flistxattr 13 ++#endif ++ ++#if !defined(__NR_removexattr) ++#define __NR_removexattr 14 ++#endif ++ ++#if !defined(__NR_lremovexattr) ++#define __NR_lremovexattr 15 ++#endif ++ ++#if !defined(__NR_fremovexattr) ++#define __NR_fremovexattr 16 ++#endif ++ ++#if !defined(__NR_getcwd) ++#define __NR_getcwd 17 ++#endif ++ ++#if !defined(__NR_lookup_dcookie) ++#define __NR_lookup_dcookie 18 ++#endif ++ ++#if !defined(__NR_eventfd2) ++#define __NR_eventfd2 19 ++#endif ++ ++#if !defined(__NR_epoll_create1) ++#define __NR_epoll_create1 20 ++#endif ++ ++#if !defined(__NR_epoll_ctl) ++#define __NR_epoll_ctl 21 ++#endif ++ ++#if !defined(__NR_epoll_pwait) ++#define __NR_epoll_pwait 22 ++#endif ++ ++#if !defined(__NR_dup) ++#define __NR_dup 23 ++#endif ++ ++#if !defined(__NR_dup3) ++#define __NR_dup3 24 ++#endif ++ ++#if !defined(__NR_fcntl) ++#define __NR_fcntl 25 ++#endif ++ ++#if !defined(__NR_inotify_init1) ++#define __NR_inotify_init1 26 ++#endif ++ ++#if !defined(__NR_inotify_add_watch) ++#define __NR_inotify_add_watch 27 ++#endif ++ ++#if !defined(__NR_inotify_rm_watch) ++#define __NR_inotify_rm_watch 28 ++#endif ++ ++#if !defined(__NR_ioctl) ++#define __NR_ioctl 29 ++#endif ++ ++#if !defined(__NR_ioprio_set) ++#define __NR_ioprio_set 30 ++#endif ++ ++#if !defined(__NR_ioprio_get) ++#define __NR_ioprio_get 31 ++#endif ++ ++#if !defined(__NR_flock) ++#define __NR_flock 32 ++#endif ++ ++#if !defined(__NR_mknodat) ++#define __NR_mknodat 33 ++#endif ++ ++#if !defined(__NR_mkdirat) ++#define __NR_mkdirat 34 ++#endif ++ ++#if !defined(__NR_unlinkat) ++#define __NR_unlinkat 35 ++#endif ++ ++#if !defined(__NR_symlinkat) ++#define __NR_symlinkat 36 ++#endif ++ ++#if !defined(__NR_linkat) ++#define __NR_linkat 37 ++#endif ++ ++#if !defined(__NR_renameat) ++#define __NR_renameat 38 ++#endif ++ ++#if !defined(__NR_umount2) ++#define __NR_umount2 39 ++#endif ++ ++#if !defined(__NR_mount) ++#define __NR_mount 40 ++#endif ++ ++#if !defined(__NR_pivot_root) ++#define __NR_pivot_root 41 ++#endif ++ ++#if !defined(__NR_nfsservctl) ++#define __NR_nfsservctl 42 ++#endif ++ ++#if !defined(__NR_statfs) ++#define __NR_statfs 43 ++#endif ++ ++#if !defined(__NR_fstatfs) ++#define __NR_fstatfs 44 ++#endif ++ ++#if !defined(__NR_truncate) ++#define __NR_truncate 45 ++#endif ++ ++#if !defined(__NR_ftruncate) ++#define __NR_ftruncate 46 ++#endif ++ ++#if !defined(__NR_fallocate) ++#define __NR_fallocate 47 ++#endif ++ ++#if !defined(__NR_faccessat) ++#define __NR_faccessat 48 ++#endif ++ ++#if !defined(__NR_chdir) ++#define __NR_chdir 49 ++#endif ++ ++#if !defined(__NR_fchdir) ++#define __NR_fchdir 50 ++#endif ++ ++#if !defined(__NR_chroot) ++#define __NR_chroot 51 ++#endif ++ ++#if !defined(__NR_fchmod) ++#define __NR_fchmod 52 ++#endif ++ ++#if !defined(__NR_fchmodat) ++#define __NR_fchmodat 53 ++#endif ++ ++#if !defined(__NR_fchownat) ++#define __NR_fchownat 54 ++#endif ++ ++#if !defined(__NR_fchown) ++#define __NR_fchown 55 ++#endif ++ ++#if !defined(__NR_openat) ++#define __NR_openat 56 ++#endif ++ ++#if !defined(__NR_close) ++#define __NR_close 57 ++#endif ++ ++#if !defined(__NR_vhangup) ++#define __NR_vhangup 58 ++#endif ++ ++#if !defined(__NR_pipe2) ++#define __NR_pipe2 59 ++#endif ++ ++#if !defined(__NR_quotactl) ++#define __NR_quotactl 60 ++#endif ++ ++#if !defined(__NR_getdents64) ++#define __NR_getdents64 61 ++#endif ++ ++#if !defined(__NR_lseek) ++#define __NR_lseek 62 ++#endif ++ ++#if !defined(__NR_read) ++#define __NR_read 63 ++#endif ++ ++#if !defined(__NR_write) ++#define __NR_write 64 ++#endif ++ ++#if !defined(__NR_readv) ++#define __NR_readv 65 ++#endif ++ ++#if !defined(__NR_writev) ++#define __NR_writev 66 ++#endif ++ ++#if !defined(__NR_pread64) ++#define __NR_pread64 67 ++#endif ++ ++#if !defined(__NR_pwrite64) ++#define __NR_pwrite64 68 ++#endif ++ ++#if !defined(__NR_preadv) ++#define __NR_preadv 69 ++#endif ++ ++#if !defined(__NR_pwritev) ++#define __NR_pwritev 70 ++#endif ++ ++#if !defined(__NR_sendfile) ++#define __NR_sendfile 71 ++#endif ++ ++#if !defined(__NR_pselect6) ++#define __NR_pselect6 72 ++#endif ++ ++#if !defined(__NR_ppoll) ++#define __NR_ppoll 73 ++#endif ++ ++#if !defined(__NR_signalfd4) ++#define __NR_signalfd4 74 ++#endif ++ ++#if !defined(__NR_vmsplice) ++#define __NR_vmsplice 75 ++#endif ++ ++#if !defined(__NR_splice) ++#define __NR_splice 76 ++#endif ++ ++#if !defined(__NR_tee) ++#define __NR_tee 77 ++#endif ++ ++#if !defined(__NR_readlinkat) ++#define __NR_readlinkat 78 ++#endif ++ ++#if !defined(__NR_newfstatat) ++#define __NR_newfstatat 79 ++#endif ++ ++#if !defined(__NR_fstat) ++#define __NR_fstat 80 ++#endif ++ ++#if !defined(__NR_sync) ++#define __NR_sync 81 ++#endif ++ ++#if !defined(__NR_fsync) ++#define __NR_fsync 82 ++#endif ++ ++#if !defined(__NR_fdatasync) ++#define __NR_fdatasync 83 ++#endif ++ ++#if !defined(__NR_sync_file_range) ++#define __NR_sync_file_range 84 ++#endif ++ ++#if !defined(__NR_timerfd_create) ++#define __NR_timerfd_create 85 ++#endif ++ ++#if !defined(__NR_timerfd_settime) ++#define __NR_timerfd_settime 86 ++#endif ++ ++#if !defined(__NR_timerfd_gettime) ++#define __NR_timerfd_gettime 87 ++#endif ++ ++#if !defined(__NR_utimensat) ++#define __NR_utimensat 88 ++#endif ++ ++#if !defined(__NR_acct) ++#define __NR_acct 89 ++#endif ++ ++#if !defined(__NR_capget) ++#define __NR_capget 90 ++#endif ++ ++#if !defined(__NR_capset) ++#define __NR_capset 91 ++#endif ++ ++#if !defined(__NR_personality) ++#define __NR_personality 92 ++#endif ++ ++#if !defined(__NR_exit) ++#define __NR_exit 93 ++#endif ++ ++#if !defined(__NR_exit_group) ++#define __NR_exit_group 94 ++#endif ++ ++#if !defined(__NR_waitid) ++#define __NR_waitid 95 ++#endif ++ ++#if !defined(__NR_set_tid_address) ++#define __NR_set_tid_address 96 ++#endif ++ ++#if !defined(__NR_unshare) ++#define __NR_unshare 97 ++#endif ++ ++#if !defined(__NR_futex) ++#define __NR_futex 98 ++#endif ++ ++#if !defined(__NR_set_robust_list) ++#define __NR_set_robust_list 99 ++#endif ++ ++#if !defined(__NR_get_robust_list) ++#define __NR_get_robust_list 100 ++#endif ++ ++#if !defined(__NR_nanosleep) ++#define __NR_nanosleep 101 ++#endif ++ ++#if !defined(__NR_getitimer) ++#define __NR_getitimer 102 ++#endif ++ ++#if !defined(__NR_setitimer) ++#define __NR_setitimer 103 ++#endif ++ ++#if !defined(__NR_kexec_load) ++#define __NR_kexec_load 104 ++#endif ++ ++#if !defined(__NR_init_module) ++#define __NR_init_module 105 ++#endif ++ ++#if !defined(__NR_delete_module) ++#define __NR_delete_module 106 ++#endif ++ ++#if !defined(__NR_timer_create) ++#define __NR_timer_create 107 ++#endif ++ ++#if !defined(__NR_timer_gettime) ++#define __NR_timer_gettime 108 ++#endif ++ ++#if !defined(__NR_timer_getoverrun) ++#define __NR_timer_getoverrun 109 ++#endif ++ ++#if !defined(__NR_timer_settime) ++#define __NR_timer_settime 110 ++#endif ++ ++#if !defined(__NR_timer_delete) ++#define __NR_timer_delete 111 ++#endif ++ ++#if !defined(__NR_clock_settime) ++#define __NR_clock_settime 112 ++#endif ++ ++#if !defined(__NR_clock_gettime) ++#define __NR_clock_gettime 113 ++#endif ++ ++#if !defined(__NR_clock_getres) ++#define __NR_clock_getres 114 ++#endif ++ ++#if !defined(__NR_clock_nanosleep) ++#define __NR_clock_nanosleep 115 ++#endif ++ ++#if !defined(__NR_syslog) ++#define __NR_syslog 116 ++#endif ++ ++#if !defined(__NR_ptrace) ++#define __NR_ptrace 117 ++#endif ++ ++#if !defined(__NR_sched_setparam) ++#define __NR_sched_setparam 118 ++#endif ++ ++#if !defined(__NR_sched_setscheduler) ++#define __NR_sched_setscheduler 119 ++#endif ++ ++#if !defined(__NR_sched_getscheduler) ++#define __NR_sched_getscheduler 120 ++#endif ++ ++#if !defined(__NR_sched_getparam) ++#define __NR_sched_getparam 121 ++#endif ++ ++#if !defined(__NR_sched_setaffinity) ++#define __NR_sched_setaffinity 122 ++#endif ++ ++#if !defined(__NR_sched_getaffinity) ++#define __NR_sched_getaffinity 123 ++#endif ++ ++#if !defined(__NR_sched_yield) ++#define __NR_sched_yield 124 ++#endif ++ ++#if !defined(__NR_sched_get_priority_max) ++#define __NR_sched_get_priority_max 125 ++#endif ++ ++#if !defined(__NR_sched_get_priority_min) ++#define __NR_sched_get_priority_min 126 ++#endif ++ ++#if !defined(__NR_sched_rr_get_interval) ++#define __NR_sched_rr_get_interval 127 ++#endif ++ ++#if !defined(__NR_restart_syscall) ++#define __NR_restart_syscall 128 ++#endif ++ ++#if !defined(__NR_kill) ++#define __NR_kill 129 ++#endif ++ ++#if !defined(__NR_tkill) ++#define __NR_tkill 130 ++#endif ++ ++#if !defined(__NR_tgkill) ++#define __NR_tgkill 131 ++#endif ++ ++#if !defined(__NR_sigaltstack) ++#define __NR_sigaltstack 132 ++#endif ++ ++#if !defined(__NR_rt_sigsuspend) ++#define __NR_rt_sigsuspend 133 ++#endif ++ ++#if !defined(__NR_rt_sigaction) ++#define __NR_rt_sigaction 134 ++#endif ++ ++#if !defined(__NR_rt_sigprocmask) ++#define __NR_rt_sigprocmask 135 ++#endif ++ ++#if !defined(__NR_rt_sigpending) ++#define __NR_rt_sigpending 136 ++#endif ++ ++#if !defined(__NR_rt_sigtimedwait) ++#define __NR_rt_sigtimedwait 137 ++#endif ++ ++#if !defined(__NR_rt_sigqueueinfo) ++#define __NR_rt_sigqueueinfo 138 ++#endif ++ ++#if !defined(__NR_rt_sigreturn) ++#define __NR_rt_sigreturn 139 ++#endif ++ ++#if !defined(__NR_setpriority) ++#define __NR_setpriority 140 ++#endif ++ ++#if !defined(__NR_getpriority) ++#define __NR_getpriority 141 ++#endif ++ ++#if !defined(__NR_reboot) ++#define __NR_reboot 142 ++#endif ++ ++#if !defined(__NR_setregid) ++#define __NR_setregid 143 ++#endif ++ ++#if !defined(__NR_setgid) ++#define __NR_setgid 144 ++#endif ++ ++#if !defined(__NR_setreuid) ++#define __NR_setreuid 145 ++#endif ++ ++#if !defined(__NR_setuid) ++#define __NR_setuid 146 ++#endif ++ ++#if !defined(__NR_setresuid) ++#define __NR_setresuid 147 ++#endif ++ ++#if !defined(__NR_getresuid) ++#define __NR_getresuid 148 ++#endif ++ ++#if !defined(__NR_setresgid) ++#define __NR_setresgid 149 ++#endif ++ ++#if !defined(__NR_getresgid) ++#define __NR_getresgid 150 ++#endif ++ ++#if !defined(__NR_setfsuid) ++#define __NR_setfsuid 151 ++#endif ++ ++#if !defined(__NR_setfsgid) ++#define __NR_setfsgid 152 ++#endif ++ ++#if !defined(__NR_times) ++#define __NR_times 153 ++#endif ++ ++#if !defined(__NR_setpgid) ++#define __NR_setpgid 154 ++#endif ++ ++#if !defined(__NR_getpgid) ++#define __NR_getpgid 155 ++#endif ++ ++#if !defined(__NR_getsid) ++#define __NR_getsid 156 ++#endif ++ ++#if !defined(__NR_setsid) ++#define __NR_setsid 157 ++#endif ++ ++#if !defined(__NR_getgroups) ++#define __NR_getgroups 158 ++#endif ++ ++#if !defined(__NR_setgroups) ++#define __NR_setgroups 159 ++#endif ++ ++#if !defined(__NR_uname) ++#define __NR_uname 160 ++#endif ++ ++#if !defined(__NR_sethostname) ++#define __NR_sethostname 161 ++#endif ++ ++#if !defined(__NR_setdomainname) ++#define __NR_setdomainname 162 ++#endif ++ ++#if !defined(__NR_getrlimit) ++#define __NR_getrlimit 163 ++#endif ++ ++#if !defined(__NR_setrlimit) ++#define __NR_setrlimit 164 ++#endif ++ ++#if !defined(__NR_getrusage) ++#define __NR_getrusage 165 ++#endif ++ ++#if !defined(__NR_umask) ++#define __NR_umask 166 ++#endif ++ ++#if !defined(__NR_prctl) ++#define __NR_prctl 167 ++#endif ++ ++#if !defined(__NR_getcpu) ++#define __NR_getcpu 168 ++#endif ++ ++#if !defined(__NR_gettimeofday) ++#define __NR_gettimeofday 169 ++#endif ++ ++#if !defined(__NR_settimeofday) ++#define __NR_settimeofday 170 ++#endif ++ ++#if !defined(__NR_adjtimex) ++#define __NR_adjtimex 171 ++#endif ++ ++#if !defined(__NR_getpid) ++#define __NR_getpid 172 ++#endif ++ ++#if !defined(__NR_getppid) ++#define __NR_getppid 173 ++#endif ++ ++#if !defined(__NR_getuid) ++#define __NR_getuid 174 ++#endif ++ ++#if !defined(__NR_geteuid) ++#define __NR_geteuid 175 ++#endif ++ ++#if !defined(__NR_getgid) ++#define __NR_getgid 176 ++#endif ++ ++#if !defined(__NR_getegid) ++#define __NR_getegid 177 ++#endif ++ ++#if !defined(__NR_gettid) ++#define __NR_gettid 178 ++#endif ++ ++#if !defined(__NR_sysinfo) ++#define __NR_sysinfo 179 ++#endif ++ ++#if !defined(__NR_mq_open) ++#define __NR_mq_open 180 ++#endif ++ ++#if !defined(__NR_mq_unlink) ++#define __NR_mq_unlink 181 ++#endif ++ ++#if !defined(__NR_mq_timedsend) ++#define __NR_mq_timedsend 182 ++#endif ++ ++#if !defined(__NR_mq_timedreceive) ++#define __NR_mq_timedreceive 183 ++#endif ++ ++#if !defined(__NR_mq_notify) ++#define __NR_mq_notify 184 ++#endif ++ ++#if !defined(__NR_mq_getsetattr) ++#define __NR_mq_getsetattr 185 ++#endif ++ ++#if !defined(__NR_msgget) ++#define __NR_msgget 186 ++#endif ++ ++#if !defined(__NR_msgctl) ++#define __NR_msgctl 187 ++#endif ++ ++#if !defined(__NR_msgrcv) ++#define __NR_msgrcv 188 ++#endif ++ ++#if !defined(__NR_msgsnd) ++#define __NR_msgsnd 189 ++#endif ++ ++#if !defined(__NR_semget) ++#define __NR_semget 190 ++#endif ++ ++#if !defined(__NR_semctl) ++#define __NR_semctl 191 ++#endif ++ ++#if !defined(__NR_semtimedop) ++#define __NR_semtimedop 192 ++#endif ++ ++#if !defined(__NR_semop) ++#define __NR_semop 193 ++#endif ++ ++#if !defined(__NR_shmget) ++#define __NR_shmget 194 ++#endif ++ ++#if !defined(__NR_shmctl) ++#define __NR_shmctl 195 ++#endif ++ ++#if !defined(__NR_shmat) ++#define __NR_shmat 196 ++#endif ++ ++#if !defined(__NR_shmdt) ++#define __NR_shmdt 197 ++#endif ++ ++#if !defined(__NR_socket) ++#define __NR_socket 198 ++#endif ++ ++#if !defined(__NR_socketpair) ++#define __NR_socketpair 199 ++#endif ++ ++#if !defined(__NR_bind) ++#define __NR_bind 200 ++#endif ++ ++#if !defined(__NR_listen) ++#define __NR_listen 201 ++#endif ++ ++#if !defined(__NR_accept) ++#define __NR_accept 202 ++#endif ++ ++#if !defined(__NR_connect) ++#define __NR_connect 203 ++#endif ++ ++#if !defined(__NR_getsockname) ++#define __NR_getsockname 204 ++#endif ++ ++#if !defined(__NR_getpeername) ++#define __NR_getpeername 205 ++#endif ++ ++#if !defined(__NR_sendto) ++#define __NR_sendto 206 ++#endif ++ ++#if !defined(__NR_recvfrom) ++#define __NR_recvfrom 207 ++#endif ++ ++#if !defined(__NR_setsockopt) ++#define __NR_setsockopt 208 ++#endif ++ ++#if !defined(__NR_getsockopt) ++#define __NR_getsockopt 209 ++#endif ++ ++#if !defined(__NR_shutdown) ++#define __NR_shutdown 210 ++#endif ++ ++#if !defined(__NR_sendmsg) ++#define __NR_sendmsg 211 ++#endif ++ ++#if !defined(__NR_recvmsg) ++#define __NR_recvmsg 212 ++#endif ++ ++#if !defined(__NR_readahead) ++#define __NR_readahead 213 ++#endif ++ ++#if !defined(__NR_brk) ++#define __NR_brk 214 ++#endif ++ ++#if !defined(__NR_munmap) ++#define __NR_munmap 215 ++#endif ++ ++#if !defined(__NR_mremap) ++#define __NR_mremap 216 ++#endif ++ ++#if !defined(__NR_add_key) ++#define __NR_add_key 217 ++#endif ++ ++#if !defined(__NR_request_key) ++#define __NR_request_key 218 ++#endif ++ ++#if !defined(__NR_keyctl) ++#define __NR_keyctl 219 ++#endif ++ ++#if !defined(__NR_clone) ++#define __NR_clone 220 ++#endif ++ ++#if !defined(__NR_execve) ++#define __NR_execve 221 ++#endif ++ ++#if !defined(__NR_mmap) ++#define __NR_mmap 222 ++#endif ++ ++#if !defined(__NR_fadvise64) ++#define __NR_fadvise64 223 ++#endif ++ ++#if !defined(__NR_swapon) ++#define __NR_swapon 224 ++#endif ++ ++#if !defined(__NR_swapoff) ++#define __NR_swapoff 225 ++#endif ++ ++#if !defined(__NR_mprotect) ++#define __NR_mprotect 226 ++#endif ++ ++#if !defined(__NR_msync) ++#define __NR_msync 227 ++#endif ++ ++#if !defined(__NR_mlock) ++#define __NR_mlock 228 ++#endif ++ ++#if !defined(__NR_munlock) ++#define __NR_munlock 229 ++#endif ++ ++#if !defined(__NR_mlockall) ++#define __NR_mlockall 230 ++#endif ++ ++#if !defined(__NR_munlockall) ++#define __NR_munlockall 231 ++#endif ++ ++#if !defined(__NR_mincore) ++#define __NR_mincore 232 ++#endif ++ ++#if !defined(__NR_madvise) ++#define __NR_madvise 233 ++#endif ++ ++#if !defined(__NR_remap_file_pages) ++#define __NR_remap_file_pages 234 ++#endif ++ ++#if !defined(__NR_mbind) ++#define __NR_mbind 235 ++#endif ++ ++#if !defined(__NR_get_mempolicy) ++#define __NR_get_mempolicy 236 ++#endif ++ ++#if !defined(__NR_set_mempolicy) ++#define __NR_set_mempolicy 237 ++#endif ++ ++#if !defined(__NR_migrate_pages) ++#define __NR_migrate_pages 238 ++#endif ++ ++#if !defined(__NR_move_pages) ++#define __NR_move_pages 239 ++#endif ++ ++#if !defined(__NR_rt_tgsigqueueinfo) ++#define __NR_rt_tgsigqueueinfo 240 ++#endif ++ ++#if !defined(__NR_perf_event_open) ++#define __NR_perf_event_open 241 ++#endif ++ ++#if !defined(__NR_accept4) ++#define __NR_accept4 242 ++#endif ++ ++#if !defined(__NR_recvmmsg) ++#define __NR_recvmmsg 243 ++#endif ++ ++#if !defined(__NR_riscv_flush_icache) ++#define __NR_riscv_flush_icache 259 ++#endif ++ ++#if !defined(__NR_wait4) ++#define __NR_wait4 260 ++#endif ++ ++#if !defined(__NR_prlimit64) ++#define __NR_prlimit64 261 ++#endif ++ ++#if !defined(__NR_fanotify_init) ++#define __NR_fanotify_init 262 ++#endif ++ ++#if !defined(__NR_fanotify_mark) ++#define __NR_fanotify_mark 263 ++#endif ++ ++#if !defined(__NR_name_to_handle_at) ++#define __NR_name_to_handle_at 264 ++#endif ++ ++#if !defined(__NR_open_by_handle_at) ++#define __NR_open_by_handle_at 265 ++#endif ++ ++#if !defined(__NR_clock_adjtime) ++#define __NR_clock_adjtime 266 ++#endif ++ ++#if !defined(__NR_syncfs) ++#define __NR_syncfs 267 ++#endif ++ ++#if !defined(__NR_setns) ++#define __NR_setns 268 ++#endif ++ ++#if !defined(__NR_sendmmsg) ++#define __NR_sendmmsg 269 ++#endif ++ ++#if !defined(__NR_process_vm_readv) ++#define __NR_process_vm_readv 270 ++#endif ++ ++#if !defined(__NR_process_vm_writev) ++#define __NR_process_vm_writev 271 ++#endif ++ ++#if !defined(__NR_kcmp) ++#define __NR_kcmp 272 ++#endif ++ ++#if !defined(__NR_finit_module) ++#define __NR_finit_module 273 ++#endif ++ ++#if !defined(__NR_sched_setattr) ++#define __NR_sched_setattr 274 ++#endif ++ ++#if !defined(__NR_sched_getattr) ++#define __NR_sched_getattr 275 ++#endif ++ ++#if !defined(__NR_renameat2) ++#define __NR_renameat2 276 ++#endif ++ ++#if !defined(__NR_seccomp) ++#define __NR_seccomp 277 ++#endif ++ ++#if !defined(__NR_getrandom) ++#define __NR_getrandom 278 ++#endif ++ ++#if !defined(__NR_memfd_create) ++#define __NR_memfd_create 279 ++#endif ++ ++#if !defined(__NR_bpf) ++#define __NR_bpf 280 ++#endif ++ ++#if !defined(__NR_execveat) ++#define __NR_execveat 281 ++#endif ++ ++#if !defined(__NR_userfaultfd) ++#define __NR_userfaultfd 282 ++#endif ++ ++#if !defined(__NR_membarrier) ++#define __NR_membarrier 283 ++#endif ++ ++#if !defined(__NR_mlock2) ++#define __NR_mlock2 284 ++#endif ++ ++#if !defined(__NR_copy_file_range) ++#define __NR_copy_file_range 285 ++#endif ++ ++#if !defined(__NR_preadv2) ++#define __NR_preadv2 286 ++#endif ++ ++#if !defined(__NR_pwritev2) ++#define __NR_pwritev2 287 ++#endif ++ ++#if !defined(__NR_pkey_mprotect) ++#define __NR_pkey_mprotect 288 ++#endif ++ ++#if !defined(__NR_pkey_alloc) ++#define __NR_pkey_alloc 289 ++#endif ++ ++#if !defined(__NR_pkey_free) ++#define __NR_pkey_free 290 ++#endif ++ ++#if !defined(__NR_statx) ++#define __NR_statx 291 ++#endif ++ ++#if !defined(__NR_io_pgetevents) ++#define __NR_io_pgetevents 292 ++#endif ++ ++#if !defined(__NR_rseq) ++#define __NR_rseq 293 ++#endif ++ ++#if !defined(__NR_kexec_file_load) ++#define __NR_kexec_file_load 294 ++#endif ++ ++#if !defined(__NR_pidfd_send_signal) ++#define __NR_pidfd_send_signal 424 ++#endif ++ ++#if !defined(__NR_io_uring_setup) ++#define __NR_io_uring_setup 425 ++#endif ++ ++#if !defined(__NR_io_uring_enter) ++#define __NR_io_uring_enter 426 ++#endif ++ ++#if !defined(__NR_io_uring_register) ++#define __NR_io_uring_register 427 ++#endif ++ ++#if !defined(__NR_open_tree) ++#define __NR_open_tree 428 ++#endif ++ ++#if !defined(__NR_move_mount) ++#define __NR_move_mount 429 ++#endif ++ ++#if !defined(__NR_fsopen) ++#define __NR_fsopen 430 ++#endif ++ ++#if !defined(__NR_fsconfig) ++#define __NR_fsconfig 431 ++#endif ++ ++#if !defined(__NR_fsmount) ++#define __NR_fsmount 432 ++#endif ++ ++#if !defined(__NR_fspick) ++#define __NR_fspick 433 ++#endif ++ ++#if !defined(__NR_pidfd_open) ++#define __NR_pidfd_open 434 ++#endif ++ ++#if !defined(__NR_clone3) ++#define __NR_clone3 435 ++#endif ++ ++#if !defined(__NR_close_range) ++#define __NR_close_range 436 ++#endif ++ ++#if !defined(__NR_openat2) ++#define __NR_openat2 437 ++#endif ++ ++#if !defined(__NR_pidfd_getfd) ++#define __NR_pidfd_getfd 438 ++#endif ++ ++#if !defined(__NR_faccessat2) ++#define __NR_faccessat2 439 ++#endif ++ ++#if !defined(__NR_process_madvise) ++#define __NR_process_madvise 440 ++#endif ++ ++#if !defined(__NR_epoll_pwait2) ++#define __NR_epoll_pwait2 441 ++#endif ++ ++#if !defined(__NR_mount_setattr) ++#define __NR_mount_setattr 442 ++#endif ++ ++#if !defined(__NR_quotactl_path) ++#define __NR_quotactl_path 443 ++#endif ++ ++#if !defined(__NR_landlock_create_ruleset) ++#define __NR_landlock_create_ruleset 444 ++#endif ++ ++#if !defined(__NR_landlock_add_rule) ++#define __NR_landlock_add_rule 445 ++#endif ++ ++#if !defined(__NR_landlock_restrict_self) ++#define __NR_landlock_restrict_self 446 ++#endif ++ ++#endif // SANDBOX_LINUX_SYSTEM_HEADERS_RISCV64_LINUX_SYSCALLS_H_ +Index: chromium-117.0.5938.132/sandbox/policy/linux/bpf_cdm_policy_linux.cc +=================================================================== +--- chromium-117.0.5938.132.orig/sandbox/policy/linux/bpf_cdm_policy_linux.cc ++++ chromium-117.0.5938.132/sandbox/policy/linux/bpf_cdm_policy_linux.cc +@@ -33,7 +33,7 @@ ResultExpr CdmProcessPolicy::EvaluateSys + case __NR_ftruncate: + case __NR_fallocate: + #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ +- defined(__aarch64__) ++ defined(__aarch64__) || defined(__riscv) + case __NR_getrlimit: + #endif + #if defined(__i386__) || defined(__arm__) +Index: chromium-117.0.5938.132/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc +=================================================================== +--- chromium-117.0.5938.132.orig/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc ++++ chromium-117.0.5938.132/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc +@@ -38,7 +38,7 @@ ResultExpr CrosAmdGpuProcessPolicy::Eval + case __NR_sched_setscheduler: + case __NR_sysinfo: + case __NR_uname: +-#if !defined(__aarch64__) ++#if !defined(__aarch64__) && !defined(__riscv) + case __NR_readlink: + case __NR_stat: + #endif +Index: chromium-117.0.5938.132/sandbox/policy/linux/bpf_gpu_policy_linux.cc +=================================================================== +--- chromium-117.0.5938.132.orig/sandbox/policy/linux/bpf_gpu_policy_linux.cc ++++ chromium-117.0.5938.132/sandbox/policy/linux/bpf_gpu_policy_linux.cc +@@ -73,7 +73,7 @@ ResultExpr GpuProcessPolicy::EvaluateSys + (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) + case __NR_ftruncate64: + #endif +-#if !defined(__aarch64__) ++#if !defined(__aarch64__) && !defined(__riscv) + case __NR_getdents: + #endif + case __NR_getdents64: +Index: chromium-117.0.5938.132/sandbox/policy/linux/bpf_network_policy_linux.cc +=================================================================== +--- chromium-117.0.5938.132.orig/sandbox/policy/linux/bpf_network_policy_linux.cc ++++ chromium-117.0.5938.132/sandbox/policy/linux/bpf_network_policy_linux.cc +@@ -255,7 +255,7 @@ ResultExpr NetworkProcessPolicy::Evaluat + case __NR_fdatasync: + case __NR_fsync: + case __NR_mremap: +-#if !defined(__aarch64__) ++#if !defined(__aarch64__) && !defined(__riscv) + case __NR_getdents: + #endif + case __NR_getdents64: +Index: chromium-117.0.5938.132/sandbox/policy/linux/bpf_print_compositor_policy_linux.cc +=================================================================== +--- chromium-117.0.5938.132.orig/sandbox/policy/linux/bpf_print_compositor_policy_linux.cc ++++ chromium-117.0.5938.132/sandbox/policy/linux/bpf_print_compositor_policy_linux.cc +@@ -33,7 +33,7 @@ ResultExpr PrintCompositorProcessPolicy: + case __NR_fdatasync: + case __NR_fsync: + #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ +- defined(__aarch64__) ++ defined(__aarch64__) || defined (__riscv) + case __NR_getrlimit: + #endif + #if defined(__i386__) || defined(__arm__) +Index: chromium-117.0.5938.132/sandbox/policy/linux/bpf_renderer_policy_linux.cc +=================================================================== +--- chromium-117.0.5938.132.orig/sandbox/policy/linux/bpf_renderer_policy_linux.cc ++++ chromium-117.0.5938.132/sandbox/policy/linux/bpf_renderer_policy_linux.cc +@@ -71,7 +71,7 @@ ResultExpr RendererProcessPolicy::Evalua + case __NR_ftruncate64: + #endif + #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ +- defined(__aarch64__) ++ defined(__aarch64__) || defined(__riscv) + case __NR_getrlimit: + case __NR_setrlimit: + // We allow setrlimit to dynamically adjust the address space limit as +Index: chromium-117.0.5938.132/sandbox/policy/linux/bpf_service_policy_linux.cc +=================================================================== +--- chromium-117.0.5938.132.orig/sandbox/policy/linux/bpf_service_policy_linux.cc ++++ chromium-117.0.5938.132/sandbox/policy/linux/bpf_service_policy_linux.cc +@@ -26,7 +26,7 @@ ResultExpr ServiceProcessPolicy::Evaluat + return RestrictIoctl(); + // Allow the system calls below. + #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ +- defined(__aarch64__) ++ defined(__aarch64__) || defined(__riscv) + case __NR_getrlimit: + #endif + #if defined(__i386__) || defined(__arm__) +Index: chromium-117.0.5938.132/sandbox/policy/linux/bpf_utility_policy_linux.cc +=================================================================== +--- chromium-117.0.5938.132.orig/sandbox/policy/linux/bpf_utility_policy_linux.cc ++++ chromium-117.0.5938.132/sandbox/policy/linux/bpf_utility_policy_linux.cc +@@ -34,7 +34,7 @@ ResultExpr UtilityProcessPolicy::Evaluat + case __NR_fdatasync: + case __NR_fsync: + #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ +- defined(__aarch64__) ++ defined(__aarch64__) || defined(__riscv) + case __NR_getrlimit: + #endif + #if defined(__i386__) || defined(__arm__) diff --git a/riscv-swiftshader.patch b/riscv-swiftshader.patch new file mode 100644 index 0000000..323ee2e --- /dev/null +++ b/riscv-swiftshader.patch @@ -0,0 +1,13 @@ +Index: chromium-115.0.5790.170/third_party/swiftshader/src/Reactor/BUILD.gn +=================================================================== +--- chromium-115.0.5790.170.orig/third_party/swiftshader/src/Reactor/BUILD.gn ++++ chromium-115.0.5790.170/third_party/swiftshader/src/Reactor/BUILD.gn +@@ -307,7 +307,7 @@ if (supports_subzero) { + + if (supports_llvm) { + swiftshader_source_set("swiftshader_llvm_reactor") { +- llvm_dir = "../../third_party/llvm-10.0" ++ llvm_dir = "../../third_party/llvm-16.0" + + deps = [ + ":swiftshader_reactor_base", @@ -0,0 +1,4 @@ +d41d8cd98f00b204e9800998ecf8427e chromium-119.0.6045.159.tar.xz +17465cd91681d5b9a170f209e4b2092d linux-arm64-0.19.11.tgz +08030da94149fd725828f0dac361e271 linux-riscv64-0.19.11.tgz +fda50a2985003127e13148c4f1945e8a linux-x64-0.19.11.tgz |