From acc9b528ea54db22436f386caed99d2ca807eb52 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Thu, 11 Aug 2022 10:12:45 -0700 Subject: [PATCH] devops: remove universal WebKit build (#16468) We experimented with it and are not ready to commit. --- .../checkout_build_archive_upload.sh | 7 --- browser_patches/docker_build.sh | 7 --- browser_patches/webkit/EXPECTED_BUILDS | 1 - browser_patches/webkit/archive.sh | 30 ++-------- browser_patches/webkit/build.sh | 57 +++++-------------- 5 files changed, 18 insertions(+), 84 deletions(-) diff --git a/browser_patches/checkout_build_archive_upload.sh b/browser_patches/checkout_build_archive_upload.sh index a9ff2d523f..3d6e6ce179 100755 --- a/browser_patches/checkout_build_archive_upload.sh +++ b/browser_patches/checkout_build_archive_upload.sh @@ -331,13 +331,6 @@ elif [[ "$BUILD_FLAVOR" == "webkit-debian-11" ]]; then EXPECTED_HOST_OS="Debian" EXPECTED_HOST_OS_VERSION="11" BUILD_BLOB_NAME="webkit-debian-11.zip" -elif [[ "$BUILD_FLAVOR" == "webkit-universal" ]]; then - BROWSER_NAME="webkit" - EXTRA_BUILD_ARGS="--full --universal" - EXTRA_ARCHIVE_ARGS="--universal" - EXPECTED_HOST_OS="Ubuntu" - EXPECTED_HOST_OS_VERSION="20.04" - BUILD_BLOB_NAME="webkit-linux-universal.zip" elif [[ "$BUILD_FLAVOR" == "webkit-ubuntu-18.04" ]]; then BROWSER_NAME="webkit" EXTRA_BUILD_ARGS="--full" diff --git a/browser_patches/docker_build.sh b/browser_patches/docker_build.sh index 919dae7d4e..1c354e5e7b 100755 --- a/browser_patches/docker_build.sh +++ b/browser_patches/docker_build.sh @@ -86,9 +86,6 @@ elif [[ "${BUILD_FLAVOR}" == "webkit-ubuntu-22.04-arm64" ]]; then elif [[ "${BUILD_FLAVOR}" == "webkit-debian-11" ]]; then DOCKER_PLATFORM="linux/amd64" DOCKER_IMAGE_NAME="debian:11" -elif [[ "${BUILD_FLAVOR}" == "webkit-universal" ]]; then - DOCKER_PLATFORM="linux/amd64" - DOCKER_IMAGE_NAME="ubuntu:20.04" else echo "ERROR: unknown build flavor - '${BUILD_FLAVOR}'" exit 1 @@ -113,10 +110,6 @@ function ensure_docker_container { if docker ps | grep "${DOCKER_CONTAINER_NAME}" 2>&1 1>/dev/null; then return; fi - if [[ "${BUILD_FLAVOR}" == "webkit-universal" ]]; then - # NOTE: WebKit Linux Universal build is run in PRIVILEGED container due to Flatpak! - DOCKER_ARGS="${DOCKER_ARGS} --privileged" - fi docker pull --platform "${DOCKER_PLATFORM}" "${DOCKER_IMAGE_NAME}" docker run --rm ${DOCKER_ARGS} --name "${DOCKER_CONTAINER_NAME}" --platform "${DOCKER_PLATFORM}" -d -t "${DOCKER_IMAGE_NAME}" /bin/bash docker exec ${DOCKER_ARGS} "${DOCKER_CONTAINER_NAME}" /bin/bash -c ' diff --git a/browser_patches/webkit/EXPECTED_BUILDS b/browser_patches/webkit/EXPECTED_BUILDS index 5d69fe40d2..ec19ebc5fc 100644 --- a/browser_patches/webkit/EXPECTED_BUILDS +++ b/browser_patches/webkit/EXPECTED_BUILDS @@ -1,4 +1,3 @@ -webkit-linux-universal.zip webkit-ubuntu-18.04.zip webkit-ubuntu-20.04.zip webkit-ubuntu-20.04-arm64.zip diff --git a/browser_patches/webkit/archive.sh b/browser_patches/webkit/archive.sh index f7be8ab94c..89f95f76b9 100755 --- a/browser_patches/webkit/archive.sh +++ b/browser_patches/webkit/archive.sh @@ -3,7 +3,7 @@ set -e set +x if [[ ("$1" == "-h") || ("$1" == "--help") ]]; then - echo "usage: $(basename "$0") [output-absolute-path] [--universal]" + echo "usage: $(basename "$0") [output-absolute-path]" echo echo "Generate distributable .zip archive from ./checkout folder that was previously built." echo @@ -28,11 +28,6 @@ if ! [[ -d $(dirname "$ZIP_PATH") ]]; then exit 1 fi -IS_UNIVERSAL_BUILD="" -if [[ $2 == "--universal" ]]; then - IS_UNIVERSAL_BUILD=1 -fi - main() { if [[ ! -z "${WK_CHECKOUT_PATH}" ]]; then cd "${WK_CHECKOUT_PATH}" @@ -67,17 +62,10 @@ createZipForLinux() { # Generate and unpack MiniBrowser bundles for each port for port in gtk wpe; do - if [[ -n "${IS_UNIVERSAL_BUILD}" ]]; then - Tools/Scripts/generate-bundle \ - --syslibs=bundle-all \ - --bundle=MiniBrowser --release \ - --platform=${port} --destination="${tmpdir}" - else - WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/${port^^} \ - Tools/Scripts/generate-bundle \ - --bundle=MiniBrowser --release \ - --platform=${port} --destination="${tmpdir}" - fi + WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/${port^^} \ + Tools/Scripts/generate-bundle \ + --bundle=MiniBrowser --release \ + --platform=${port} --destination="${tmpdir}" unzip "${tmpdir}"/MiniBrowser_${port}_release.zip -d "${tmpdir}"/minibrowser-${port} rm -f "${tmpdir}"/MiniBrowser_${port}_release.zip @@ -85,14 +73,6 @@ createZipForLinux() { cd "$tmpdir" - if [[ -n "${IS_UNIVERSAL_BUILD}" ]]; then - # De-duplicate common files: convert to relative symlinks identical files (same hash). - # We apply this algorithm only to unified build since in JHBuild WPE/Minibrowser - # and GTK/Minibrowser executables are identical and should not be symlinked. - rdfind -deterministic true -makesymlinks true -makehardlinks false -makeresultsfile false . - symlinks -rc . - fi - # zip resulting directory and cleanup TMP. zip --symlinks -r "$ZIP_PATH" ./ cd - diff --git a/browser_patches/webkit/build.sh b/browser_patches/webkit/build.sh index 70299f3e7f..c354783adb 100755 --- a/browser_patches/webkit/build.sh +++ b/browser_patches/webkit/build.sh @@ -7,13 +7,8 @@ cd "$(dirname "$0")" SCRIPT_FOLDER="$(pwd -P)" source "${SCRIPT_FOLDER}/../utils.sh" -# On Linux, Universal build uses Flatpak rather then JHBuild -# and packs into a universal binary that can run on any linux -# distribution. -IS_UNIVERSAL_BUILD="" - build_gtk() { - if [[ -z "${IS_UNIVERSAL_BUILD}" && ! -d "./WebKitBuild/GTK/DependenciesGTK" ]]; then + if [[ ! -d "./WebKitBuild/GTK/DependenciesGTK" ]]; then yes | WEBKIT_JHBUILD=1 \ WEBKIT_JHBUILD_MODULESET=minimal \ WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/GTK \ @@ -27,18 +22,14 @@ build_gtk() { if [[ -n "${EXPORT_COMPILE_COMMANDS}" ]]; then CMAKE_ARGS+=("--cmakeargs=-DCMAKE_EXPORT_COMPILE_COMMANDS=1") fi - if [[ -n "${IS_UNIVERSAL_BUILD}" ]]; then - ./Tools/Scripts/build-webkit --gtk --release "${CMAKE_ARGS}" --touch-events --orientation-events --no-bubblewrap-sandbox "${CMAKE_ARGS[@]}" MiniBrowser - else - WEBKIT_JHBUILD=1 \ - WEBKIT_JHBUILD_MODULESET=minimal \ - WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/GTK \ - ./Tools/Scripts/build-webkit --gtk --release "${CMAKE_ARGS}" --touch-events --orientation-events --no-bubblewrap-sandbox "${CMAKE_ARGS[@]}" MiniBrowser - fi + WEBKIT_JHBUILD=1 \ + WEBKIT_JHBUILD_MODULESET=minimal \ + WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/GTK \ + ./Tools/Scripts/build-webkit --gtk --release "${CMAKE_ARGS}" --touch-events --orientation-events --no-bubblewrap-sandbox "${CMAKE_ARGS[@]}" MiniBrowser } build_wpe() { - if [[ -z "${IS_UNIVERSAL_BUILD}" && ! -d "./WebKitBuild/WPE/DependenciesWPE" ]]; then + if [[ ! -d "./WebKitBuild/WPE/DependenciesWPE" ]]; then yes | WEBKIT_JHBUILD=1 \ WEBKIT_JHBUILD_MODULESET=minimal \ WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/WPE \ @@ -55,35 +46,19 @@ build_wpe() { CMAKE_ARGS+=("--cmakeargs=-DCMAKE_EXPORT_COMPILE_COMMANDS=1") fi - if [[ -n "${IS_UNIVERSAL_BUILD}" ]]; then - ./Tools/Scripts/build-webkit --wpe --release "${CMAKE_ARGS}" --touch-events --orientation-events --no-bubblewrap-sandbox "${CMAKE_ARGS[@]}" MiniBrowser - else - WEBKIT_JHBUILD=1 \ - WEBKIT_JHBUILD_MODULESET=minimal \ - WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/WPE \ - ./Tools/Scripts/build-webkit --wpe --release "${CMAKE_ARGS}" --touch-events --orientation-events --no-bubblewrap-sandbox "${CMAKE_ARGS[@]}" MiniBrowser - fi + WEBKIT_JHBUILD=1 \ + WEBKIT_JHBUILD_MODULESET=minimal \ + WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/WPE \ + ./Tools/Scripts/build-webkit --wpe --release "${CMAKE_ARGS}" --touch-events --orientation-events --no-bubblewrap-sandbox "${CMAKE_ARGS[@]}" MiniBrowser } ensure_linux_deps() { - if [[ -n "${IS_UNIVERSAL_BUILD}" ]]; then - SUDO="" ; [ $UID -ne 0 ] && SUDO="sudo" - # - flatpak drives the build - # - symlinks and rdfind are needed to de-duplicate files on the GTK+WPE bundle to reduce its size. - DEBIAN_FRONTEND=noninteractive ${SUDO} apt-get install -y flatpak symlinks rdfind - fi - yes | DEBIAN_FRONTEND=noninteractive ./Tools/gtk/install-dependencies yes | DEBIAN_FRONTEND=noninteractive ./Tools/wpe/install-dependencies - if [[ -z "${IS_UNIVERSAL_BUILD}" ]]; then - # In non-universal build install JHBuild deps. - yes | DEBIAN_FRONTEND=noninteractive WEBKIT_JHBUILD=1 WEBKIT_JHBUILD_MODULESET=minimal WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/WPE ./Tools/Scripts/update-webkitwpe-libs - yes | DEBIAN_FRONTEND=noninteractive WEBKIT_JHBUILD=1 WEBKIT_JHBUILD_MODULESET=minimal WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/GTK ./Tools/Scripts/update-webkitgtk-libs - else - yes | ./Tools/Scripts/update-webkitwpe-libs - yes | ./Tools/Scripts/update-webkitgtk-libs - fi + # Install JHBuild deps. + yes | DEBIAN_FRONTEND=noninteractive WEBKIT_JHBUILD=1 WEBKIT_JHBUILD_MODULESET=minimal WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/WPE ./Tools/Scripts/update-webkitwpe-libs + yes | DEBIAN_FRONTEND=noninteractive WEBKIT_JHBUILD=1 WEBKIT_JHBUILD_MODULESET=minimal WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/GTK ./Tools/Scripts/update-webkitgtk-libs } if [[ ! -z "${WK_CHECKOUT_PATH}" ]]; then @@ -106,7 +81,6 @@ elif is_linux; then --full) IS_FULL="1"; unset args[i]; ;; --gtk) BUILD_GTK="1"; unset args[i]; ;; --wpe) BUILD_WPE="1"; unset args[i]; ;; - --universal) IS_UNIVERSAL_BUILD="1"; unset args[i]; ;; esac done @@ -117,11 +91,6 @@ elif is_linux; then fi echo "== BUILD CONFIGURATION ==" - if [[ -n "${IS_UNIVERSAL_BUILD}" ]]; then - echo "- universal build: YES" - else - echo "- universal build: NO" - fi if [[ -n "${IS_FULL}" ]]; then echo "- install dependencies: YES" else