From ab279ccc25fb3147ea21d64652afbab05d2cec65 Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Thu, 5 Dec 2024 01:39:03 +0300 Subject: [PATCH] import chromium-131.0.6778.108-1.el8 --- .chromium.metadata | 2 +- .gitignore | 2 +- .../chromium-131-el8-libavcodec-parser.patch | 690 ------------------ SOURCES/chromium-131-qt-ui.patch | 12 + ...ert-decommit-pooled-pages-by-default.patch | 32 + SOURCES/clean_ffmpeg.sh | 6 + SPECS/chromium.spec | 27 +- 7 files changed, 71 insertions(+), 700 deletions(-) delete mode 100644 SOURCES/chromium-131-el8-libavcodec-parser.patch create mode 100644 SOURCES/chromium-131-qt-ui.patch create mode 100644 SOURCES/chromium-131-revert-decommit-pooled-pages-by-default.patch diff --git a/.chromium.metadata b/.chromium.metadata index 150c4fd6..1e421625 100644 --- a/.chromium.metadata +++ b/.chromium.metadata @@ -1,4 +1,4 @@ -0e4eddd04ec167cb3e60ab5e2d6aafb759a62f8c SOURCES/chromium-131.0.6778.85-clean.tar.xz +2eff2cce3fdc518b5fb4859d27cdbdeb5fb56485 SOURCES/chromium-131.0.6778.108-clean.tar.xz 7e5d2c7864c5c83ec789b59c77cd9c20d2594916 SOURCES/linux-arm64-0.19.2.tgz dea187019741602d57aaf189a80abba261fbd2aa SOURCES/linux-x64-0.19.2.tgz 3e94bb4f999c636293bc745b02d98e7925da5616 SOURCES/node-v20.6.1-linux-arm64.tar.xz diff --git a/.gitignore b/.gitignore index 37445fff..0d0305a1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -SOURCES/chromium-131.0.6778.85-clean.tar.xz +SOURCES/chromium-131.0.6778.108-clean.tar.xz SOURCES/linux-arm64-0.19.2.tgz SOURCES/linux-x64-0.19.2.tgz SOURCES/node-v20.6.1-linux-arm64.tar.xz diff --git a/SOURCES/chromium-131-el8-libavcodec-parser.patch b/SOURCES/chromium-131-el8-libavcodec-parser.patch deleted file mode 100644 index 24da282f..00000000 --- a/SOURCES/chromium-131-el8-libavcodec-parser.patch +++ /dev/null @@ -1,690 +0,0 @@ ---- /dev/null 2024-11-22 07:51:33.845958571 +0100 -+++ chromium-131.0.6778.85/third_party/ffmpeg/libavcodec/parser.h 2024-11-19 23:48:49.634320300 +0100 -@@ -0,0 +1,58 @@ -+/* -+ * AVCodecParser prototypes and definitions -+ * Copyright (c) 2003 Fabrice Bellard -+ * Copyright (c) 2003 Michael Niedermayer -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#ifndef AVCODEC_PARSER_H -+#define AVCODEC_PARSER_H -+ -+#include "avcodec.h" -+ -+typedef struct ParseContext{ -+ uint8_t *buffer; -+ int index; -+ int last_index; -+ unsigned int buffer_size; -+ uint32_t state; ///< contains the last few bytes in MSB order -+ int frame_start_found; -+ int overread; ///< the number of bytes which where irreversibly read from the next frame -+ int overread_index; ///< the index into ParseContext.buffer of the overread bytes -+ uint64_t state64; ///< contains the last 8 bytes in MSB order -+} ParseContext; -+ -+#define END_NOT_FOUND (-100) -+ -+/** -+ * Combine the (truncated) bitstream to a complete frame. -+ * @return -1 if no complete frame could be created, -+ * AVERROR(ENOMEM) if there was a memory allocation error -+ */ -+int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size); -+void ff_parse_close(AVCodecParserContext *s); -+ -+/** -+ * Fetch timestamps for a specific byte within the current access unit. -+ * @param off byte position within the access unit -+ * @param remove Found timestamps will be removed if set to 1, kept if set to 0. -+ * @param fuzzy Only use found value if it is more informative than what we already have -+ */ -+void ff_fetch_timestamp(AVCodecParserContext *s, int off, int remove, int fuzzy); -+ -+#endif /* AVCODEC_PARSER_H */ ---- /dev/null 2024-11-22 07:51:33.845958571 +0100 -+++ chromium-131.0.6778.85/third_party/ffmpeg/libavcodec/parser.c 2024-11-19 23:48:49.633320000 +0100 -@@ -0,0 +1,295 @@ -+/* -+ * Audio and Video frame extraction -+ * Copyright (c) 2003 Fabrice Bellard -+ * Copyright (c) 2003 Michael Niedermayer -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#include -+#include -+#include -+ -+#include "libavutil/avassert.h" -+#include "libavutil/mem.h" -+ -+#include "parser.h" -+ -+AVCodecParserContext *av_parser_init(int codec_id) -+{ -+ AVCodecParserContext *s = NULL; -+ const AVCodecParser *parser; -+ void *i = 0; -+ int ret; -+ -+ if (codec_id == AV_CODEC_ID_NONE) -+ return NULL; -+ -+ while ((parser = av_parser_iterate(&i))) { -+ if (parser->codec_ids[0] == codec_id || -+ parser->codec_ids[1] == codec_id || -+ parser->codec_ids[2] == codec_id || -+ parser->codec_ids[3] == codec_id || -+ parser->codec_ids[4] == codec_id || -+ parser->codec_ids[5] == codec_id || -+ parser->codec_ids[6] == codec_id) -+ goto found; -+ } -+ return NULL; -+ -+found: -+ s = av_mallocz(sizeof(AVCodecParserContext)); -+ if (!s) -+ goto err_out; -+ s->parser = parser; -+ s->priv_data = av_mallocz(parser->priv_data_size); -+ if (!s->priv_data) -+ goto err_out; -+ s->fetch_timestamp=1; -+ s->pict_type = AV_PICTURE_TYPE_I; -+ if (parser->parser_init) { -+ ret = parser->parser_init(s); -+ if (ret != 0) -+ goto err_out; -+ } -+ s->key_frame = -1; -+ s->dts_sync_point = INT_MIN; -+ s->dts_ref_dts_delta = INT_MIN; -+ s->pts_dts_delta = INT_MIN; -+ s->format = -1; -+ -+ return s; -+ -+err_out: -+ if (s) -+ av_freep(&s->priv_data); -+ av_free(s); -+ return NULL; -+} -+ -+void ff_fetch_timestamp(AVCodecParserContext *s, int off, int remove, int fuzzy) -+{ -+ int i; -+ -+ if (!fuzzy) { -+ s->dts = -+ s->pts = AV_NOPTS_VALUE; -+ s->pos = -1; -+ s->offset = 0; -+ } -+ for (i = 0; i < AV_PARSER_PTS_NB; i++) { -+ if (s->cur_offset + off >= s->cur_frame_offset[i] && -+ (s->frame_offset < s->cur_frame_offset[i] || -+ (!s->frame_offset && !s->next_frame_offset)) && // first field/frame -+ // check disabled since MPEG-TS does not send complete PES packets -+ /*s->next_frame_offset + off <*/ s->cur_frame_end[i]){ -+ -+ if (!fuzzy || s->cur_frame_dts[i] != AV_NOPTS_VALUE) { -+ s->dts = s->cur_frame_dts[i]; -+ s->pts = s->cur_frame_pts[i]; -+ s->pos = s->cur_frame_pos[i]; -+ s->offset = s->next_frame_offset - s->cur_frame_offset[i]; -+ } -+ if (remove) -+ s->cur_frame_offset[i] = INT64_MAX; -+ if (s->cur_offset + off < s->cur_frame_end[i]) -+ break; -+ } -+ } -+} -+ -+int av_parser_parse2(AVCodecParserContext *s, AVCodecContext *avctx, -+ uint8_t **poutbuf, int *poutbuf_size, -+ const uint8_t *buf, int buf_size, -+ int64_t pts, int64_t dts, int64_t pos) -+{ -+ int index, i; -+ uint8_t dummy_buf[AV_INPUT_BUFFER_PADDING_SIZE]; -+ -+ av_assert1(avctx->codec_id != AV_CODEC_ID_NONE); -+ -+ /* Parsers only work for the specified codec ids. */ -+ av_assert1(avctx->codec_id == s->parser->codec_ids[0] || -+ avctx->codec_id == s->parser->codec_ids[1] || -+ avctx->codec_id == s->parser->codec_ids[2] || -+ avctx->codec_id == s->parser->codec_ids[3] || -+ avctx->codec_id == s->parser->codec_ids[4] || -+ avctx->codec_id == s->parser->codec_ids[5] || -+ avctx->codec_id == s->parser->codec_ids[6]); -+ -+ if (!(s->flags & PARSER_FLAG_FETCHED_OFFSET)) { -+ s->next_frame_offset = -+ s->cur_offset = pos; -+ s->flags |= PARSER_FLAG_FETCHED_OFFSET; -+ } -+ -+ if (buf_size == 0) { -+ /* padding is always necessary even if EOF, so we add it here */ -+ memset(dummy_buf, 0, sizeof(dummy_buf)); -+ buf = dummy_buf; -+ } else if (s->cur_offset + buf_size != s->cur_frame_end[s->cur_frame_start_index]) { /* skip remainder packets */ -+ /* add a new packet descriptor */ -+ i = (s->cur_frame_start_index + 1) & (AV_PARSER_PTS_NB - 1); -+ s->cur_frame_start_index = i; -+ s->cur_frame_offset[i] = s->cur_offset; -+ s->cur_frame_end[i] = s->cur_offset + buf_size; -+ s->cur_frame_pts[i] = pts; -+ s->cur_frame_dts[i] = dts; -+ s->cur_frame_pos[i] = pos; -+ } -+ -+ if (s->fetch_timestamp) { -+ s->fetch_timestamp = 0; -+ s->last_pts = s->pts; -+ s->last_dts = s->dts; -+ s->last_pos = s->pos; -+ ff_fetch_timestamp(s, 0, 0, 0); -+ } -+ /* WARNING: the returned index can be negative */ -+ index = s->parser->parser_parse(s, avctx, (const uint8_t **) poutbuf, -+ poutbuf_size, buf, buf_size); -+ av_assert0(index > -0x20000000); // The API does not allow returning AVERROR codes -+#define FILL(name) if(s->name > 0 && avctx->name <= 0) avctx->name = s->name -+ if (avctx->codec_type == AVMEDIA_TYPE_VIDEO) { -+ FILL(field_order); -+ FILL(coded_width); -+ FILL(coded_height); -+ FILL(width); -+ FILL(height); -+ } -+ -+ /* update the file pointer */ -+ if (*poutbuf_size) { -+ /* fill the data for the current frame */ -+ s->frame_offset = s->next_frame_offset; -+ -+ /* offset of the next frame */ -+ s->next_frame_offset = s->cur_offset + index; -+ s->fetch_timestamp = 1; -+ } else { -+ /* Don't return a pointer to dummy_buf. */ -+ *poutbuf = NULL; -+ } -+ if (index < 0) -+ index = 0; -+ s->cur_offset += index; -+ return index; -+} -+ -+void av_parser_close(AVCodecParserContext *s) -+{ -+ if (s) { -+ if (s->parser->parser_close) -+ s->parser->parser_close(s); -+ av_freep(&s->priv_data); -+ av_free(s); -+ } -+} -+ -+int ff_combine_frame(ParseContext *pc, int next, -+ const uint8_t **buf, int *buf_size) -+{ -+ if (pc->overread) { -+ ff_dlog(NULL, "overread %d, state:%"PRIX32" next:%d index:%d o_index:%d\n", -+ pc->overread, pc->state, next, pc->index, pc->overread_index); -+ ff_dlog(NULL, "%X %X %X %X\n", -+ (*buf)[0], (*buf)[1], (*buf)[2], (*buf)[3]); -+ } -+ -+ /* Copy overread bytes from last frame into buffer. */ -+ for (; pc->overread > 0; pc->overread--) -+ pc->buffer[pc->index++] = pc->buffer[pc->overread_index++]; -+ -+ if (next > *buf_size) -+ return AVERROR(EINVAL); -+ -+ /* flush remaining if EOF */ -+ if (!*buf_size && next == END_NOT_FOUND) -+ next = 0; -+ -+ pc->last_index = pc->index; -+ -+ /* copy into buffer end return */ -+ if (next == END_NOT_FOUND) { -+ void *new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size, -+ *buf_size + pc->index + -+ AV_INPUT_BUFFER_PADDING_SIZE); -+ -+ if (!new_buffer) { -+ av_log(NULL, AV_LOG_ERROR, "Failed to reallocate parser buffer to %d\n", *buf_size + pc->index + AV_INPUT_BUFFER_PADDING_SIZE); -+ pc->index = 0; -+ return AVERROR(ENOMEM); -+ } -+ pc->buffer = new_buffer; -+ memcpy(&pc->buffer[pc->index], *buf, *buf_size); -+ memset(&pc->buffer[pc->index + *buf_size], 0, AV_INPUT_BUFFER_PADDING_SIZE); -+ pc->index += *buf_size; -+ return -1; -+ } -+ -+ av_assert0(next >= 0 || pc->buffer); -+ -+ *buf_size = -+ pc->overread_index = pc->index + next; -+ -+ /* append to buffer */ -+ if (pc->index) { -+ void *new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size, -+ next + pc->index + -+ AV_INPUT_BUFFER_PADDING_SIZE); -+ if (!new_buffer) { -+ av_log(NULL, AV_LOG_ERROR, "Failed to reallocate parser buffer to %d\n", next + pc->index + AV_INPUT_BUFFER_PADDING_SIZE); -+ *buf_size = -+ pc->overread_index = -+ pc->index = 0; -+ return AVERROR(ENOMEM); -+ } -+ pc->buffer = new_buffer; -+ if (next > -AV_INPUT_BUFFER_PADDING_SIZE) -+ memcpy(&pc->buffer[pc->index], *buf, -+ next + AV_INPUT_BUFFER_PADDING_SIZE); -+ pc->index = 0; -+ *buf = pc->buffer; -+ } -+ -+ if (next < -8) { -+ pc->overread += -8 - next; -+ next = -8; -+ } -+ /* store overread bytes */ -+ for (; next < 0; next++) { -+ pc->state = pc->state << 8 | pc->buffer[pc->last_index + next]; -+ pc->state64 = pc->state64 << 8 | pc->buffer[pc->last_index + next]; -+ pc->overread++; -+ } -+ -+ if (pc->overread) { -+ ff_dlog(NULL, "overread %d, state:%"PRIX32" next:%d index:%d o_index:%d\n", -+ pc->overread, pc->state, next, pc->index, pc->overread_index); -+ ff_dlog(NULL, "%X %X %X %X\n", -+ (*buf)[0], (*buf)[1], (*buf)[2], (*buf)[3]); -+ } -+ -+ return 0; -+} -+ -+void ff_parse_close(AVCodecParserContext *s) -+{ -+ ParseContext *pc = s->priv_data; -+ -+ av_freep(&pc->buffer); -+} ---- /dev/null 2024-11-22 07:51:33.845958571 +0100 -+++ chromium-131.0.6778.85/third_party/ffmpeg/libavcodec/hevc/hevc.h 2024-11-19 23:48:49.494310400 +0100 -@@ -0,0 +1,163 @@ -+/* -+ * HEVC shared code -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#ifndef AVCODEC_HEVC_HEVC_H -+#define AVCODEC_HEVC_HEVC_H -+ -+/** -+ * Table 7-1 – NAL unit type codes and NAL unit type classes in -+ * T-REC-H.265-201802 -+ */ -+enum HEVCNALUnitType { -+ HEVC_NAL_TRAIL_N = 0, -+ HEVC_NAL_TRAIL_R = 1, -+ HEVC_NAL_TSA_N = 2, -+ HEVC_NAL_TSA_R = 3, -+ HEVC_NAL_STSA_N = 4, -+ HEVC_NAL_STSA_R = 5, -+ HEVC_NAL_RADL_N = 6, -+ HEVC_NAL_RADL_R = 7, -+ HEVC_NAL_RASL_N = 8, -+ HEVC_NAL_RASL_R = 9, -+ HEVC_NAL_VCL_N10 = 10, -+ HEVC_NAL_VCL_R11 = 11, -+ HEVC_NAL_VCL_N12 = 12, -+ HEVC_NAL_VCL_R13 = 13, -+ HEVC_NAL_VCL_N14 = 14, -+ HEVC_NAL_VCL_R15 = 15, -+ HEVC_NAL_BLA_W_LP = 16, -+ HEVC_NAL_BLA_W_RADL = 17, -+ HEVC_NAL_BLA_N_LP = 18, -+ HEVC_NAL_IDR_W_RADL = 19, -+ HEVC_NAL_IDR_N_LP = 20, -+ HEVC_NAL_CRA_NUT = 21, -+ HEVC_NAL_RSV_IRAP_VCL22 = 22, -+ HEVC_NAL_RSV_IRAP_VCL23 = 23, -+ HEVC_NAL_RSV_VCL24 = 24, -+ HEVC_NAL_RSV_VCL25 = 25, -+ HEVC_NAL_RSV_VCL26 = 26, -+ HEVC_NAL_RSV_VCL27 = 27, -+ HEVC_NAL_RSV_VCL28 = 28, -+ HEVC_NAL_RSV_VCL29 = 29, -+ HEVC_NAL_RSV_VCL30 = 30, -+ HEVC_NAL_RSV_VCL31 = 31, -+ HEVC_NAL_VPS = 32, -+ HEVC_NAL_SPS = 33, -+ HEVC_NAL_PPS = 34, -+ HEVC_NAL_AUD = 35, -+ HEVC_NAL_EOS_NUT = 36, -+ HEVC_NAL_EOB_NUT = 37, -+ HEVC_NAL_FD_NUT = 38, -+ HEVC_NAL_SEI_PREFIX = 39, -+ HEVC_NAL_SEI_SUFFIX = 40, -+ HEVC_NAL_RSV_NVCL41 = 41, -+ HEVC_NAL_RSV_NVCL42 = 42, -+ HEVC_NAL_RSV_NVCL43 = 43, -+ HEVC_NAL_RSV_NVCL44 = 44, -+ HEVC_NAL_RSV_NVCL45 = 45, -+ HEVC_NAL_RSV_NVCL46 = 46, -+ HEVC_NAL_RSV_NVCL47 = 47, -+ HEVC_NAL_UNSPEC48 = 48, -+ HEVC_NAL_UNSPEC49 = 49, -+ HEVC_NAL_UNSPEC50 = 50, -+ HEVC_NAL_UNSPEC51 = 51, -+ HEVC_NAL_UNSPEC52 = 52, -+ HEVC_NAL_UNSPEC53 = 53, -+ HEVC_NAL_UNSPEC54 = 54, -+ HEVC_NAL_UNSPEC55 = 55, -+ HEVC_NAL_UNSPEC56 = 56, -+ HEVC_NAL_UNSPEC57 = 57, -+ HEVC_NAL_UNSPEC58 = 58, -+ HEVC_NAL_UNSPEC59 = 59, -+ HEVC_NAL_UNSPEC60 = 60, -+ HEVC_NAL_UNSPEC61 = 61, -+ HEVC_NAL_UNSPEC62 = 62, -+ HEVC_NAL_UNSPEC63 = 63, -+}; -+ -+enum HEVCSliceType { -+ HEVC_SLICE_B = 0, -+ HEVC_SLICE_P = 1, -+ HEVC_SLICE_I = 2, -+}; -+ -+enum { -+ // 7.4.3.1: vps_max_layers_minus1 is in [0, 62]. -+ HEVC_MAX_LAYERS = 63, -+ // 7.4.3.1: vps_max_sub_layers_minus1 is in [0, 6]. -+ HEVC_MAX_SUB_LAYERS = 7, -+ // 7.4.3.1: vps_num_layer_sets_minus1 is in [0, 1023]. -+ HEVC_MAX_LAYER_SETS = 1024, -+ -+ // 7.4.2.1: vps_video_parameter_set_id is u(4). -+ HEVC_MAX_VPS_COUNT = 16, -+ // 7.4.3.2.1: sps_seq_parameter_set_id is in [0, 15]. -+ HEVC_MAX_SPS_COUNT = 16, -+ // 7.4.3.3.1: pps_pic_parameter_set_id is in [0, 63]. -+ HEVC_MAX_PPS_COUNT = 64, -+ -+ // A.4.2: MaxDpbSize is bounded above by 16. -+ HEVC_MAX_DPB_SIZE = 16, -+ // 7.4.3.1: vps_max_dec_pic_buffering_minus1[i] is in [0, MaxDpbSize - 1]. -+ HEVC_MAX_REFS = HEVC_MAX_DPB_SIZE, -+ -+ // 7.4.3.2.1: num_short_term_ref_pic_sets is in [0, 64]. -+ HEVC_MAX_SHORT_TERM_REF_PIC_SETS = 64, -+ // 7.4.3.2.1: num_long_term_ref_pics_sps is in [0, 32]. -+ HEVC_MAX_LONG_TERM_REF_PICS = 32, -+ -+ // A.3: all profiles require that CtbLog2SizeY is in [4, 6]. -+ HEVC_MIN_LOG2_CTB_SIZE = 4, -+ HEVC_MAX_LOG2_CTB_SIZE = 6, -+ -+ // E.3.2: cpb_cnt_minus1[i] is in [0, 31]. -+ HEVC_MAX_CPB_CNT = 32, -+ -+ // A.4.1: in table A.6 the highest level allows a MaxLumaPs of 35 651 584. -+ HEVC_MAX_LUMA_PS = 35651584, -+ // A.4.1: pic_width_in_luma_samples and pic_height_in_luma_samples are -+ // constrained to be not greater than sqrt(MaxLumaPs * 8). Hence height/ -+ // width are bounded above by sqrt(8 * 35651584) = 16888.2 samples. -+ HEVC_MAX_WIDTH = 16888, -+ HEVC_MAX_HEIGHT = 16888, -+ -+ // A.4.1: table A.6 allows at most 22 tile rows for any level. -+ HEVC_MAX_TILE_ROWS = 22, -+ // A.4.1: table A.6 allows at most 20 tile columns for any level. -+ HEVC_MAX_TILE_COLUMNS = 20, -+ -+ // A.4.2: table A.6 allows at most 600 slice segments for any level. -+ HEVC_MAX_SLICE_SEGMENTS = 600, -+ -+ // 7.4.7.1: in the worst case (tiles_enabled_flag and -+ // entropy_coding_sync_enabled_flag are both set), entry points can be -+ // placed at the beginning of every Ctb row in every tile, giving an -+ // upper bound of (num_tile_columns_minus1 + 1) * PicHeightInCtbsY - 1. -+ // Only a stream with very high resolution and perverse parameters could -+ // get near that, though, so set a lower limit here with the maximum -+ // possible value for 4K video (at most 135 16x16 Ctb rows). -+ HEVC_MAX_ENTRY_POINT_OFFSETS = HEVC_MAX_TILE_COLUMNS * 135, -+ -+ // A.3.7: Screen content coding extensions -+ HEVC_MAX_PALETTE_PREDICTOR_SIZE = 128, -+}; -+ -+ -+#endif /* AVCODEC_HEVC_HEVC_H */ ---- /dev/null 2024-11-22 07:51:33.845958571 +0100 -+++ chromium-131.0.6778.85/third_party/ffmpeg/libavutil/aarch64/intreadwrite.h 2024-11-19 23:48:50.697394400 +0100 -@@ -0,0 +1,42 @@ -+/* -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#ifndef AVUTIL_AARCH64_INTREADWRITE_H -+#define AVUTIL_AARCH64_INTREADWRITE_H -+ -+#if HAVE_INTRINSICS_NEON -+ -+#include -+ -+#define AV_COPY128 AV_COPY128 -+static av_always_inline void AV_COPY128(void *d, const void *s) -+{ -+ uint8x16_t tmp = vld1q_u8((const uint8_t *)s); -+ vst1q_u8((uint8_t *)d, tmp); -+} -+ -+#define AV_ZERO128 AV_ZERO128 -+static av_always_inline void AV_ZERO128(void *d) -+{ -+ uint8x16_t zero = vdupq_n_u8(0); -+ vst1q_u8((uint8_t *)d, zero); -+} -+ -+#endif /* HAVE_INTRINSICS_NEON */ -+ -+#endif /* AVUTIL_AARCH64_INTREADWRITE_H */ ---- /dev/null 2024-11-22 07:51:33.845958571 +0100 -+++ chromium-131.0.6778.85/third_party/ffmpeg/libavcodec/opus/enc.h 2024-11-19 23:48:49.631320000 +0100 -@@ -0,0 +1,55 @@ -+/* -+ * Opus encoder -+ * Copyright (c) 2017 Rostislav Pehlivanov -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#ifndef AVCODEC_OPUS_ENC_H -+#define AVCODEC_OPUS_ENC_H -+ -+#include "libavutil/intmath.h" -+#include "opus.h" -+ -+/* Determines the maximum delay the psychoacoustic system will use for lookahead */ -+#define FF_BUFQUEUE_SIZE 145 -+#include "libavfilter/bufferqueue.h" -+ -+#define OPUS_MAX_LOOKAHEAD ((FF_BUFQUEUE_SIZE - 1)*2.5f) -+ -+#define OPUS_MAX_CHANNELS 2 -+ -+/* 120 ms / 2.5 ms = 48 frames (extremely improbable, but the encoder'll work) */ -+#define OPUS_MAX_FRAMES_PER_PACKET 48 -+ -+#define OPUS_BLOCK_SIZE(x) (2 * 15 * (1 << ((x) + 2))) -+ -+#define OPUS_SAMPLES_TO_BLOCK_SIZE(x) (ff_log2((x) / (2 * 15)) - 2) -+ -+typedef struct OpusEncOptions { -+ float max_delay_ms; -+ int apply_phase_inv; -+} OpusEncOptions; -+ -+typedef struct OpusPacketInfo { -+ enum OpusMode mode; -+ enum OpusBandwidth bandwidth; -+ int framesize; -+ int frames; -+} OpusPacketInfo; -+ -+#endif /* AVCODEC_OPUS_ENC_H */ ---- /dev/null 2024-11-22 07:51:33.845958571 +0100 -+++ chromium-131.0.6778.85/third_party/ffmpeg/libavcodec/opus/opus.h 2024-11-19 23:48:49.631320000 +0100 -@@ -0,0 +1,59 @@ -+/* -+ * Opus common header -+ * Copyright (c) 2012 Andrew D'Addesio -+ * Copyright (c) 2013-2014 Mozilla Corporation -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#ifndef AVCODEC_OPUS_OPUS_H -+#define AVCODEC_OPUS_OPUS_H -+ -+#include -+ -+#define OPUS_MAX_FRAME_SIZE 1275 -+#define OPUS_MAX_FRAMES 48 -+#define OPUS_MAX_PACKET_DUR 5760 -+ -+#define OPUS_TS_HEADER 0x7FE0 // 0x3ff (11 bits) -+#define OPUS_TS_MASK 0xFFE0 // top 11 bits -+ -+static const uint8_t opus_default_extradata[30] = { -+ 'O', 'p', 'u', 's', 'H', 'e', 'a', 'd', -+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -+}; -+ -+enum OpusMode { -+ OPUS_MODE_SILK, -+ OPUS_MODE_HYBRID, -+ OPUS_MODE_CELT, -+ -+ OPUS_MODE_NB -+}; -+ -+enum OpusBandwidth { -+ OPUS_BANDWIDTH_NARROWBAND, -+ OPUS_BANDWIDTH_MEDIUMBAND, -+ OPUS_BANDWIDTH_WIDEBAND, -+ OPUS_BANDWIDTH_SUPERWIDEBAND, -+ OPUS_BANDWIDTH_FULLBAND, -+ -+ OPUS_BANDWITH_NB -+}; -+ -+#endif /* AVCODEC_OPUS_OPUS_H */ diff --git a/SOURCES/chromium-131-qt-ui.patch b/SOURCES/chromium-131-qt-ui.patch new file mode 100644 index 00000000..a8343477 --- /dev/null +++ b/SOURCES/chromium-131-qt-ui.patch @@ -0,0 +1,12 @@ +diff -up chromium-131.0.6778.85/ui/qt/qt_shim.cc.me chromium-131.0.6778.85/ui/qt/qt_shim.cc +--- chromium-131.0.6778.85/ui/qt/qt_shim.cc.me 2024-11-23 10:04:16.789121846 +0100 ++++ chromium-131.0.6778.85/ui/qt/qt_shim.cc 2024-11-23 11:40:02.905064702 +0100 +@@ -265,7 +265,7 @@ FontRenderParams QtShim::GetFontRenderPa + FontDescription QtShim::GetFontDescription() const { + QFont font = app_.font(); + return { +- .family = String(font.family().toStdString().c_str()), ++ .family = String(font.family().toUtf8().constData()), + .size_pixels = font.pixelSize(), + .size_points = font.pointSize(), + .is_italic = IsStyleItalic(font.style()), diff --git a/SOURCES/chromium-131-revert-decommit-pooled-pages-by-default.patch b/SOURCES/chromium-131-revert-decommit-pooled-pages-by-default.patch new file mode 100644 index 00000000..4639b416 --- /dev/null +++ b/SOURCES/chromium-131-revert-decommit-pooled-pages-by-default.patch @@ -0,0 +1,32 @@ +commit 1ab1a14ad97394d384d8dc6de51bb229625e66d6 +Author: Benoît Lizé +Date: Mon Sep 16 12:01:14 2024 +0200 + + [cppgc] Decommit pooled pages by default + + This reduces committed memory by a large amount, which matters on + Windows. See the field trial results, which measure committed memory: + https://screenshot.googleplex.com/kEBAScqJSEXuRoy + + Bug: chromium:326303884 + Change-Id: I619257871bcdb7ed50a71f41af341d0df634428a + Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5864909 + Reviewed-by: Michael Lippautz + Reviewed-by: Anton Bikineev + Commit-Queue: Anton Bikineev + Auto-Submit: Benoit Lize + Cr-Commit-Position: refs/heads/main@{#96107} + +diff --git a/v8/src/flags/flag-definitions.h b/v8/src/flags/flag-definitions.h +index 69946faf5ed..85c4b68612e 100644 +--- a/v8/src/flags/flag-definitions.h ++++ b/v8/src/flags/flag-definitions.h +@@ -821,7 +821,7 @@ DEFINE_BOOL(trace_block_coverage, false, + "trace collected block coverage information") + DEFINE_BOOL(trace_protector_invalidation, false, + "trace protector cell invalidations") +-DEFINE_BOOL(decommit_pooled_pages, false, ++DEFINE_BOOL(decommit_pooled_pages, true, + "decommit, rather than discard pooled pages") + + #ifdef V8_MINORMS_STRING_SHORTCUTTING diff --git a/SOURCES/clean_ffmpeg.sh b/SOURCES/clean_ffmpeg.sh index 07460ce6..2e21b733 100755 --- a/SOURCES/clean_ffmpeg.sh +++ b/SOURCES/clean_ffmpeg.sh @@ -72,6 +72,7 @@ header_files=" libavcodec/x86/inline_asm.h \ libavcodec/aacpsdsp.h \ libavcodec/aacsbrdata.h \ libavcodec/aac_ac3_parser.h \ + libavcodec/parser.h \ libavcodec/aac_defines.h \ libavcodec/ac3.h \ libavcodec/ac3defs.h \ @@ -99,6 +100,7 @@ header_files=" libavcodec/x86/inline_asm.h \ libavcodec/get_bits.h \ libavcodec/h263dsp.h \ libavcodec/h264chroma.h \ + libavcodec/hevc/hevc.h \ libavcodec/hpeldsp.h \ libavcodec/hwaccels.h \ libavcodec/hwaccel_internal.h \ @@ -124,6 +126,8 @@ header_files=" libavcodec/x86/inline_asm.h \ libavcodec/mpegvideo.h \ libavcodec/mpegvideodata.h \ libavcodec/mpegvideoencdsp.h \ + libavcodec/opus/enc.h \ + libavcodec/opus/opus.h \ libavcodec/options_table.h \ libavcodec/packet.h \ libavcodec/packet_internal.h \ @@ -180,6 +184,7 @@ header_files=" libavcodec/x86/inline_asm.h \ libavformat/iamf_reader.h \ libavformat/iamf.h \ libavutil/aarch64/cpu.h \ + libavutil/aarch64/intreadwrite.h \ libavutil/x86/asm.h \ libavutil/x86/bswap.h \ libavutil/x86/cpu.h \ @@ -250,6 +255,7 @@ manual_files=" libavcodec/aarch64/h264pred_neon.S \ libavcodec/hpel_template.c \ libavcodec/hpeldsp.c \ libavcodec/options.c \ + libavcodec/parser.c \ libavcodec/pcm.c \ libavcodec/pel_template.c \ libavcodec/utils.c \ diff --git a/SPECS/chromium.spec b/SPECS/chromium.spec index f99a6ac0..dc0cff40 100644 --- a/SPECS/chromium.spec +++ b/SPECS/chromium.spec @@ -157,7 +157,7 @@ %endif # enable qt backend -%global enable_qt 0 +%global enable_qt 1 %global use_qt6 0 %global use_qt 0 @@ -279,7 +279,7 @@ %endif Name: chromium%{chromium_channel} -Version: 131.0.6778.85 +Version: 131.0.6778.108 Release: 1%{?dist} Summary: A WebKit (Blink) powered web browser that Google doesn't want you to use Url: http://www.chromium.org/Home @@ -329,14 +329,16 @@ Patch133: chromium-121-system-old-ffmpeg.patch patch134: chromium-125-disable-FFmpegAllowLists.patch # revert, it causes build error: use of undeclared identifier 'AVFMT_FLAG_NOH264PARSE' Patch135: chromium-129-disable-H.264-video-parser-during-demuxing.patch -# workaround for build error on el8 (should be removed in next rebase) -Patch136: chromium-131-el8-libavcodec-parser.patch # file conflict with old kernel on el8/el9 Patch141: chromium-118-dma_buf_export_sync_file-conflict.patch # add correct path for Qt6Gui header and libs Patch150: chromium-124-qt6.patch +Patch151: chromium-131-qt-ui.patch + +# revert, it causes ramdom crash on aarch64 +Patch300: chromium-131-revert-decommit-pooled-pages-by-default.patch # disable memory tagging (epel8 on aarch64) due to new feature IFUNC-Resolver # it is not supported in old glibc < 2.30, error: fatal error: 'sys/ifunc.h' file not found @@ -1043,16 +1045,17 @@ Qt6 UI for chromium. %patch -P135 -p1 -b .disable-H.264-video-parser-during-demuxing %endif -%if 0%{?rhel} == 8 -%patch -P136 -p1 -b .el8-libavcodec-parser -%endif - %if 0%{?rhel} == 8 || 0%{?rhel} == 9 %patch -P141 -p1 -b .dma_buf_export_sync_file-conflict %endif %if 0%{?rhel} > 9 || 0%{?fedora} > 39 %patch -P150 -p1 -b .qt6 +%patch -P151 -p1 -b .qt-ui +%endif + +%ifarch aarch64 ppc64le +%patch -P300 -p1 -R -b .revert-decommit-pooled-pages-by-default %endif %if 0%{?rhel} == 8 @@ -1930,6 +1933,14 @@ getent group chrome-remote-desktop >/dev/null || groupadd -r chrome-remote-deskt %endif %changelog +* Wed Dec 04 2024 Than Ngo - 131.0.6778.108-1 +- Update to 131.0.6778.108 + * High CVE-2024-12053: Type Confusion in V8 + +* Sat Nov 23 2024 Than Ngo - 131.0.6778.85-2 +- Enable qt-ui +- Workaround for random crash + * Wed Nov 20 2024 Than Ngo - 131.0.6778.85-1 - Update to 131.0.6778.85 * High CVE-2024-11395: Type Confusion in V8