From 4dcb8d17b43bdb09e6db9009f64bb2c599ca9f23 Mon Sep 17 00:00:00 2001 From: david Date: Tue, 13 Jun 2023 14:11:47 +0200 Subject: [PATCH 1/2] chromium copy of install script --- chromium-114.0.5735.106-0.build.sh | 164 +++++++++++++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100755 chromium-114.0.5735.106-0.build.sh diff --git a/chromium-114.0.5735.106-0.build.sh b/chromium-114.0.5735.106-0.build.sh new file mode 100755 index 0000000..ea8a21d --- /dev/null +++ b/chromium-114.0.5735.106-0.build.sh @@ -0,0 +1,164 @@ +#! /bin/bash -x + +set -xe + +#COOKIE=$(mcookie|cut -c-8); grep -v V_GREP_ME $0 > /dev/shm/runme-$COOKIE.sh ; sleep 0.3; exec bash /dev/shm/runme-$COOKIE.sh + +PKG=chromium +VERSION=108.0.5359.94 +BUILD=0 + +PREFIX=/pkg/$PKG-$VERSION-$BUILD +if [ -n "$TESTING" ]; then PREFIX=/scratch/local2/$PKG-$VERSION-$BUILD ; fi + +umask 022 + +BUILD_TMPDIR=/scratch/local2/$PKG-$VERSION-$BUILD.build.tmp +test -d $BUILD_TMPDIR && rm -rf $BUILD_TMPDIR +mkdir -p $BUILD_TMPDIR/home +export TMPDIR=$BUILD_TMPDIR +export HOME=$BUILD_TMPDIR/home + +exec $PREFIX/profile <<-EOF + PATH=$PREFIX/bin:\$PATH + if [ -d $PREFIX/.compatlibs ]; then export LD_LIBRARY_PATH=$PREFIX/.compatlibs\${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH} ; fi +EOF +. $PREFIX/profile + +export MAKEFLAGS="-j $(nproc)" + +BUILDDIR=$PREFIX/build + +#source google API Zeug; wird benoetigt damit browser sync funktioniert +dirname="$(dirname $0)" +if [ -f ${dirname}/google_api_zeug ]; then + #geht nur ohne COOKIE + . ${dirname}/google_api_zeug +elif [[ $0 == "/dev/shm/runme-"*".sh" ]]; then + #muss ich mir nich was besseres ueberlegen + . /home/schrader/git_zeug/pkg-scripts/google_api_zeug +else + echo "google_default_client_id, google_api_key und google_default_client_secret wird benoetigt, damit Browser Sync funktioniert(siehe HelmutSchmidtSeite)." + exit 1 + # uncomment if you want it with out api key +fi + +mkdir -p $BUILDDIR +cd $BUILDDIR + +# clean for rebuild +if [ -d ${PKG}-${VERSION} ];then + rm -rf ${PKG}-${VERSION} +fi + +test -e ${PKG}-${VERSION}.tar.xz || wget https://commondatastorage.googleapis.com/${PKG}-browser-official/${PKG}-${VERSION}.tar.xz +test -d ${PKG}-${VERSION} || tar xf ${PKG}-${VERSION}.tar.xz + +cd ${PKG}-${VERSION} + +#Create Directories for Build and Install +test -d $PREFIX/bin || mkdir $PREFIX/bin +test -d out || mkdir out + +mkdir -p third_party/node/linux/node-linux-x64/bin +if [ ! -e third_party/node/linux/node-linux-x64/bin/node ]; then + ln -s /pkg/node-16.16.0-0/bin/node third_party/node/linux/node-linux-x64/bin/ +fi + +# Add essential proprietary codecs to the "chrome" branding of ffmpeg: + cat /src/mariux/patches/chromium_ffmpeg_prop.patch | patch -p1 + +# Do not make the build fail, see Chromium issue #386097: +python3 third_party/libaddressinput/chromium/tools/update-strings.py + +# Fix for: ERROR at //build/config/sysroot.gni:57:5: Assertion failed +python3 build/linux/sysroot_scripts/install-sysroot.py --arch=amd64 + +# Generate the ninja build files: + +python3 tools/clang/scripts/update.py + +#Ensure that only this clang version is used +export PATH=${BUILDDIR}/${PKG}-${VERSION}/third_party/llvm-build/Release+Asserts/bin:$PATH + +#ffmpeg and HEVC want to play together now :) +cd third_party/ffmpeg +FFMPEG_BRANDING=Chrome +echo " +- Adding HEVC support..." +FFMPEG_CUSTOM_ARGS="--enable-decoder=hevc --enable-demuxer=hevc --enable-parser=hevc" +python3 chromium/scripts/build_ffmpeg.py linux x64 \ +--branding ${FFMPEG_BRANDING} -- ${FFMPEG_CUSTOM_ARGS} +chromium/scripts/copy_config.sh +python3 chromium/scripts/generate_gn.py + +cd ${BUILDDIR}/${PKG}-${VERSION} + +python3 tools/gn/bootstrap/bootstrap.py + +_chromium_conf=( + 'blink_enable_generated_code_formatting=false' + 'blink_symbol_level=0' + 'is_debug=false' + #'remove_webcore_debug_symbols=true' + 'use_gnome_keyring=true' + 'treat_warnings_as_errors=false' + 'enable_nacl=false' + 'use_sysroot=true' + 'is_official_build=true' + 'fatal_linker_warnings=false' + 'enable_platform_hevc=true' + 'proprietary_codecs=true' + 'enable_platform_ac3_eac3_audio=true' + 'enable_platform_mpeg_h_audio=true' + "ffmpeg_branding=\"${FFMPEG_BRANDING}\"" + 'enable_precompiled_headers=false' + "google_api_key=\"$google_api_key\"" + "google_default_client_id=\"$google_default_client_id\"" + "google_default_client_secret=\"$google_default_client_secret\"" + 'enable_js_type_check=false' + 'enable_vulkan=true' +) + +# make sure to use python3 +source /pkg/python-3.9.7-0/profile + +out/Release/gn gen out/Release --args="${_chromium_conf[*]}" + +ninja -C out/Release pdf chrome chromedriver chrome_sandbox +#ninja -C out/Release chrome + +install -D out/Release/chrome ${PREFIX}/bin/chrome2 +install -m755 out/Release/chromedriver ${PREFIX}/bin/ +install -m755 out/Release/chrome_sandbox ${PREFIX}/bin/ +install -m755 out/Release/chrome_crashpad_handler ${PREFIX}/bin/ + + +cp -a out/Release/*.pak ${PREFIX}/bin/ +cp -a out/Release/*.so ${PREFIX}/bin/ +cp -a out/Release/libvulkan.so.1 ${PREFIX}/bin/ +cp -a out/Release/icudtl.dat ${PREFIX}/bin/ +cp -a out/Release/locales ${PREFIX}/bin/ +cp -a out/Release/angledata ${PREFIX}/bin/ +install -m755 out/Release/vk_swiftshader_icd.json ${PREFIX}/bin/ + +for i in out/Release/{natives_blob.bin,snapshot_blob.bin,v8_context_snapshot.bin}; do + if [ -f $i ]; then + cp -a $i ${PREFIX}/bin/ + fi +done + +strip --strip-unneeded ${PREFIX}/bin/*.so +strip --strip-unneeded ${PREFIX}/bin/chrome2 + +cat >$PREFIX/bin/chromium <<-EOF + #!/usr/bin/bash + $PREFIX/bin/chrome2 --password-store=basic \${@} +EOF +chmod a+x $PREFIX/bin/chromium +cd $PREFIX/bin +ln -s chromium chrome + +exit From d3bba13f6ab8ba7b9bc0719b9072e697557d9449 Mon Sep 17 00:00:00 2001 From: david Date: Thu, 15 Jun 2023 13:53:19 +0200 Subject: [PATCH 2/2] Update chromium to 114.0.5735.106-0 --- chromium-114.0.5735.106-0.build.sh | 31 +++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/chromium-114.0.5735.106-0.build.sh b/chromium-114.0.5735.106-0.build.sh index ea8a21d..9704fd4 100755 --- a/chromium-114.0.5735.106-0.build.sh +++ b/chromium-114.0.5735.106-0.build.sh @@ -1,11 +1,10 @@ #! /bin/bash -x - set -xe #COOKIE=$(mcookie|cut -c-8); grep -v V_GREP_ME $0 > /dev/shm/runme-$COOKIE.sh ; sleep 0.3; exec bash /dev/shm/runme-$COOKIE.sh PKG=chromium -VERSION=108.0.5359.94 +VERSION=114.0.5735.106 BUILD=0 PREFIX=/pkg/$PKG-$VERSION-$BUILD @@ -28,7 +27,8 @@ cat >$PREFIX/profile <<-EOF EOF . $PREFIX/profile -export MAKEFLAGS="-j $(nproc)" +NPROC=$(( $(nproc) * 4 / 5 + 1 )) +export MAKEFLAGS="-j ${NPROC}" BUILDDIR=$PREFIX/build @@ -57,6 +57,10 @@ fi test -e ${PKG}-${VERSION}.tar.xz || wget https://commondatastorage.googleapis.com/${PKG}-browser-official/${PKG}-${VERSION}.tar.xz test -d ${PKG}-${VERSION} || tar xf ${PKG}-${VERSION}.tar.xz +PATCHURL+=("https://beehive.molgen.mpg.de/b1aeb5cb6cfeb1d7ecf3e522a85a1f26/chromium_gcc10.patch https://beehive.molgen.mpg.de/b1aeb5cb6cfeb1d7ecf3e522a85a1f26/chromium_gcc10.patch") +test -e *.patch || wget $PATCHURL + + cd ${PKG}-${VERSION} #Create Directories for Build and Install @@ -65,11 +69,18 @@ test -d out || mkdir out mkdir -p third_party/node/linux/node-linux-x64/bin if [ ! -e third_party/node/linux/node-linux-x64/bin/node ]; then - ln -s /pkg/node-16.16.0-0/bin/node third_party/node/linux/node-linux-x64/bin/ + ln -s /pkg/node-18.16.0-0/bin/node third_party/node/linux/node-linux-x64/bin/ fi # Add essential proprietary codecs to the "chrome" branding of ffmpeg: - cat /src/mariux/patches/chromium_ffmpeg_prop.patch | patch -p1 + cat ${BUILDDIR}/chromium_ffmpeg_prop.patch | patch -p1 + +# Be compatible with gcc 10 + cat ${BUILDDIR}/chromium_gcc10.patch |patch -p1 + + # Allow building against system libraries in official builds: + sed -e 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \ + -i tools/generate_shim_headers/generate_shim_headers.py # Do not make the build fail, see Chromium issue #386097: python3 third_party/libaddressinput/chromium/tools/update-strings.py @@ -77,7 +88,8 @@ python3 third_party/libaddressinput/chromium/tools/update-strings.py # Fix for: ERROR at //build/config/sysroot.gni:57:5: Assertion failed python3 build/linux/sysroot_scripts/install-sysroot.py --arch=amd64 -# Generate the ninja build files: +# trouble with bootstrap rust trigger download manual +python3 tools/rust/update_rust.py python3 tools/clang/scripts/update.py @@ -96,6 +108,8 @@ python3 chromium/scripts/generate_gn.py cd ${BUILDDIR}/${PKG}-${VERSION} +# Generate the ninja build files: + python3 tools/gn/bootstrap/bootstrap.py _chromium_conf=( @@ -123,12 +137,11 @@ _chromium_conf=( ) # make sure to use python3 -source /pkg/python-3.9.7-0/profile +source /pkg/python-3.10.10-1/profile -out/Release/gn gen out/Release --args="${_chromium_conf[*]}" +out/Release/gn gen out/Release -v --args="${_chromium_conf[*]}" ninja -C out/Release pdf chrome chromedriver chrome_sandbox -#ninja -C out/Release chrome install -D out/Release/chrome ${PREFIX}/bin/chrome2 install -m755 out/Release/chromedriver ${PREFIX}/bin/