From edfa3c24e9ffe4989d767935acfdf7ffb3a8cfbf Mon Sep 17 00:00:00 2001 From: Eloston Date: Fri, 23 Nov 2018 02:09:11 +0000 Subject: [PATCH] Update Debian files and patches from ungoogled-chromium-debian --- config_bundles/common/patch_order.list | 4 +- config_bundles/debian_buster/patch_order.list | 3 + .../debian_stretch/patch_order.list | 2 +- config_bundles/linux_rooted/gn_flags.map | 1 + packaging/debian_buster/.gitignore | 15 +++++ packaging/debian_buster/README.debian | 27 +++++++- packaging/debian_buster/clean | 2 + packaging/debian_buster/control | 28 ++++++++- packaging/debian_buster/copyright | 12 +++- packaging/debian_buster/etc/README | 1 + .../debian_buster/{ => etc}/default-flags | 0 packaging/debian_buster/etc/extensions | 5 ++ .../{ => etc}/master_preferences | 0 packaging/debian_buster/extensions | 2 - packaging/debian_buster/rules | 61 +++++++++---------- .../debian_buster/scripts/mk-origtargz.patch | 30 +++++---- packaging/debian_buster/scripts/unbundle | 2 +- .../ungoogled-chromium-common.install | 2 +- .../ungoogled-chromium-driver.install | 2 +- .../ungoogled-chromium-l10n.install | 2 +- ...googled-chromium-sandbox.lintian-overrides | 2 + .../ungoogled-chromium-shell.install | 6 +- .../ungoogled-chromium.bug-control | 1 + .../debian_buster/ungoogled-chromium.install | 20 +++--- .../debian_buster/ungoogled-chromium.manpages | 2 +- packaging/debian_minimal/control | 56 +++++++++-------- packaging/debian_minimal/scripts/unbundle | 2 +- .../ungoogled-chromium-common.install | 12 ++-- .../debian_minimal/ungoogled-chromium.install | 20 ------ packaging/debian_stretch/clean | 5 ++ packaging/debian_stretch/control | 24 +++++++- .../debian_buster/debianization/sandbox.patch | 24 ++++++++ patches/debian_buster/fixes/polymer.patch | 18 ++++++ patches/debian_buster/system/harfbuzz.patch | 43 +++++++++++++ .../warnings/explicit-constructor.patch} | 3 +- patches/debian_stretch/arm/crashpad.patch | 2 +- patches/debian_stretch/system/icu.patch | 2 +- .../debian_stretch/system/openjpeg21.patch | 44 ++++++------- 38 files changed, 336 insertions(+), 151 deletions(-) create mode 100644 packaging/debian_buster/.gitignore create mode 100644 packaging/debian_buster/etc/README rename packaging/debian_buster/{ => etc}/default-flags (100%) create mode 100644 packaging/debian_buster/etc/extensions rename packaging/debian_buster/{ => etc}/master_preferences (100%) delete mode 100644 packaging/debian_buster/extensions create mode 100644 packaging/debian_buster/ungoogled-chromium-sandbox.lintian-overrides create mode 100644 packaging/debian_buster/ungoogled-chromium.bug-control delete mode 100644 packaging/debian_minimal/ungoogled-chromium.install create mode 100644 patches/debian_buster/debianization/sandbox.patch create mode 100644 patches/debian_buster/fixes/polymer.patch create mode 100644 patches/debian_buster/system/harfbuzz.patch rename patches/{ungoogled-chromium/linux/fix-old-libstdcxx-incompatibility.patch => debian_buster/warnings/explicit-constructor.patch} (83%) diff --git a/config_bundles/common/patch_order.list b/config_bundles/common/patch_order.list index f1936a45..b096b55d 100644 --- a/config_bundles/common/patch_order.list +++ b/config_bundles/common/patch_order.list @@ -28,6 +28,8 @@ debian_buster/arm/skia.patch debian_buster/arm/gcc_skcms_ice.patch debian_buster/fixes/mojo.patch debian_buster/fixes/sizet.patch +debian_buster/fixes/alignof.patch +debian_buster/fixes/polymer.patch debian_buster/fixes/optimize.patch debian_buster/fixes/ps-print.patch debian_buster/fixes/as-needed.patch @@ -41,7 +43,6 @@ debian_buster/fixes/ownership-error.patch debian_buster/fixes/member-assignment.patch debian_buster/fixes/widevine-locations.patch debian_buster/fixes/connection-message.patch -debian_buster/fixes/alignof.patch debian_buster/disable/android.patch debian_buster/disable/fuzzers.patch debian_buster/disable/perfetto.patch @@ -57,6 +58,7 @@ debian_buster/warnings/sequence-point.patch debian_buster/warnings/initialization.patch debian_buster/warnings/unused-typedefs.patch debian_buster/warnings/null-destination.patch +debian_buster/warnings/explicit-constructor.patch debian_buster/system/fontconfig.patch iridium-browser/net-cert-increase-default-key-length-for-newly-gener.patch diff --git a/config_bundles/debian_buster/patch_order.list b/config_bundles/debian_buster/patch_order.list index cf47ecf3..221463ce 100644 --- a/config_bundles/debian_buster/patch_order.list +++ b/config_bundles/debian_buster/patch_order.list @@ -1,7 +1,10 @@ debian_buster/disable/openh264.patch debian_buster/system/ffmpeg34.patch +debian_buster/system/harfbuzz.patch debian_buster/system/openjpeg.patch + +debian_buster/debianization/sandbox.patch debian_buster/debianization/master-preferences.patch ungoogled-chromium/linux/manpage.patch diff --git a/config_bundles/debian_stretch/patch_order.list b/config_bundles/debian_stretch/patch_order.list index 6a48f4fa..775d8622 100644 --- a/config_bundles/debian_stretch/patch_order.list +++ b/config_bundles/debian_stretch/patch_order.list @@ -9,8 +9,8 @@ debian_buster/system/ffmpeg34.patch debian_buster/system/openjpeg.patch debian_stretch/system/openjpeg21.patch +debian_buster/debianization/sandbox.patch debian_buster/debianization/master-preferences.patch ungoogled-chromium/linux/fix-libva1-compatibility.patch -ungoogled-chromium/linux/fix-old-libstdcxx-incompatibility.patch ungoogled-chromium/linux/manpage.patch diff --git a/config_bundles/linux_rooted/gn_flags.map b/config_bundles/linux_rooted/gn_flags.map index ee39f632..4dd47dd1 100644 --- a/config_bundles/linux_rooted/gn_flags.map +++ b/config_bundles/linux_rooted/gn_flags.map @@ -11,6 +11,7 @@ use_cups=true use_custom_libcxx=false use_gio=true use_kerberos=false +use_libjpeg_turbo=true use_openh264=false use_pulseaudio=true use_system_freetype=true diff --git a/packaging/debian_buster/.gitignore b/packaging/debian_buster/.gitignore new file mode 100644 index 00000000..06a56598 --- /dev/null +++ b/packaging/debian_buster/.gitignore @@ -0,0 +1,15 @@ +files +*.log +*.substvars + +.debhelper +debhelper-build-stamp + +ungoogled-chromium +ungoogled-chromium-l10n +ungoogled-chromium-shell +ungoogled-chromium-driver +ungoogled-chromium-common +ungoogled-chromium-sandbox + +scripts/mk-origtargz diff --git a/packaging/debian_buster/README.debian b/packaging/debian_buster/README.debian index 89afbc75..75bcdb32 100644 --- a/packaging/debian_buster/README.debian +++ b/packaging/debian_buster/README.debian @@ -36,10 +36,35 @@ package and launch chromium with the "-g" flag. $ chromium -g +If you try to install chromium-dbgsym and it fails, you may not have Debian's +dbgsym package repository configured and enabled. To set this up, first as +root add one or more of the following lines to your /etc/apt/sources.list file +(select the one appropriate to the Debian release you are using): + +deb http://debug.mirrors.debian.org/debian-debug stable-debug main +deb http://debug.mirrors.debian.org/debian-debug testing-debug main +deb http://debug.mirrors.debian.org/debian-debug unstable-debug main + +Then execute these commands (also as root): + +# apt update +# apt install chromium-dbgsym + Information about installing dbgsym packages can be found on the Debian wiki: http://wiki.debian.org/AutomaticDebugPackages -More information about debugging chromium can also be found on the Debian wiki: +Additional information about debugging chromium can also be found on the Debian +wiki, but it is often out of date: http://wiki.debian.org/Chromium/Debugging + +Running as Root +=============== + +First of all, this is a very bad idea for a large number of reasons, so please +do not do this unless you really know what you are doing. However, if you want +to accept the risks, you can use the --no-sandbox command line argument to be +able to run chromium as root: + +# chromium --no-sandbox diff --git a/packaging/debian_buster/clean b/packaging/debian_buster/clean index 33be56c0..33ed55bb 100644 --- a/packaging/debian_buster/clean +++ b/packaging/debian_buster/clean @@ -31,3 +31,5 @@ third_party/yasm/run_yasm.py tools/gn/base/numerics/safe_math_arm_impl.h tools/gn/base/numerics/safe_conversions_arm_impl.h + +third_party/catapult/third_party/polymer/components diff --git a/packaging/debian_buster/control b/packaging/debian_buster/control index e84af267..fa8ddeb7 100644 --- a/packaging/debian_buster/control +++ b/packaging/debian_buster/control @@ -72,7 +72,7 @@ Build-Depends: libspeechd-dev (>= 0.8.3), libminizip-dev, libhunspell-dev, - libharfbuzz-dev, + libharfbuzz-dev (>= 2.1.1), libusb-1.0-0-dev, libopenjp2-7-dev, libmodpbase64-dev, @@ -81,11 +81,12 @@ Build-Depends: libcups2-dev (>= 1.5.0), libevent-dev (>= 1.4.13), libjs-jquery, - libjs-excanvas, libjs-jquery-flot, libgcrypt20-dev, libva-dev, -Standards-Version: 4.1.4 + fonts-ipafont-gothic, + fonts-ipafont-mincho, +Standards-Version: 4.2.1 Package: ungoogled-chromium Architecture: i386 amd64 arm64 armhf @@ -94,6 +95,8 @@ Depends: ${misc:Depends}, ${shlibs:Depends}, ungoogled-chromium-common (= ${binary:Version}), +Recommends: + ungoogled-chromium-sandbox, Suggests: ungoogled-chromium-l10n, ungoogled-chromium-shell, @@ -101,6 +104,9 @@ Suggests: Provides: www-browser, gnome-www-browser, +Breaks: + chromium-lwn4chrome (<= 1.0-2), + chromium-tt-rss-notifier (<= 0.5.2-2), Conflicts: libnettle4, libsecret-1-0 (<< 0.18), @@ -185,6 +191,7 @@ Recommends: libu2f-udev, libva1, libgl1-mesa-dri, + ungoogled-chromium-sandbox, fonts-liberation, notification-daemon, Breaks: @@ -199,3 +206,18 @@ Description: web browser - common resources used by ungoogled-chromium packages . This package contains resources that are in common to different ungoogled-chromium packages. + +Package: ungoogled-chromium-sandbox +Architecture: i386 amd64 arm64 armhf +Depends: + ${misc:Depends}, + ${shlibs:Depends}, +Breaks: + chromium (<< ${binary:Version}), +Replaces: + chromium (<< ${binary:Version}), +Description: web browser - setuid security sandbox for ungoogled-chromium + Web browser that aims to build a safer, faster, and more stable internet + browsing experience. + . + This package contains the setuid chromium sandbox. diff --git a/packaging/debian_buster/copyright b/packaging/debian_buster/copyright index 0fdaf388..f5189137 100644 --- a/packaging/debian_buster/copyright +++ b/packaging/debian_buster/copyright @@ -51,10 +51,10 @@ Files-Excluded: third_party/re2 third_party/icu third_party/ink - third_party/deqp third_party/opus third_party/flac third_party/llvm + third_party/webgl third_party/libpng third_party/libvpx third_party/libdrm @@ -89,6 +89,7 @@ Files-Excluded: third_party/zlib/contrib third_party/zlib/patches third_party/skia/tools/gyp + third_party/skia/src/compute third_party/skia/site/user/api third_party/skia/platform_tools third_party/skia/resources/icc_profiles @@ -107,12 +108,14 @@ Files-Excluded: third_party/swiftshader third_party/apache-win32 third_party/apache-portable-runtime + third_party/instrumented_libraries third_party/sqlite/sqlite-src* + third_party/angle/third_party/deqp third_party/sfntly/src/java/lib third_party/sfntly/src/cpp/ext/redist + third_party/chromevox/third_party/sre third_party/crashpad/crashpad/handler/win third_party/crashpad/crashpad/snapshot/elf/elf_image_reader_fuzzer_corpus - third_party/mesa/src/src/gallium/state_trackers/d3d1x/w32api third_party/blink/renderer/devtools/scripts/closure third_party/blink/renderer/platform/text_codec_fuzzer_seed_corpus third_party/google_input_tools/src/chrome/os/inputview/_locales/*.js @@ -135,8 +138,12 @@ Files-Excluded: third_party/accessibility-audit/axs_testing.js third_party/catapult/third_party/flot third_party/catapult/third_party/chai + third_party/catapult/third_party/vinn third_party/catapult/third_party/mocha third_party/catapult/third_party/coverage + third_party/catapult/third_party/polymer2 + third_party/catapult/third_party/polymer3 + third_party/catapult/third_party/polymer/components third_party/catapult/tracing/test_data third_party/catapult/tracing/third_party/chai/chai.js third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/mat3-spec.js @@ -157,6 +164,7 @@ Files-Excluded: third_party/pdfium/third_party/yasm/source third_party/pdfium/third_party/libopenjpeg20 third_party/breakpad/breakpad/src/client/mac + third_party/breakpad/breakpad/src/common/convert_UTF.* third_party/boringssl/crypto_test_data.cc third_party/boringssl/src/crypto/cipher_extra/test third_party/dom_distiller_js/dist/js/domdistiller_wrapped.js diff --git a/packaging/debian_buster/etc/README b/packaging/debian_buster/etc/README new file mode 100644 index 00000000..2f953121 --- /dev/null +++ b/packaging/debian_buster/etc/README @@ -0,0 +1 @@ +Any files placed in this directory will be sourced prior to executing chromium. diff --git a/packaging/debian_buster/default-flags b/packaging/debian_buster/etc/default-flags similarity index 100% rename from packaging/debian_buster/default-flags rename to packaging/debian_buster/etc/default-flags diff --git a/packaging/debian_buster/etc/extensions b/packaging/debian_buster/etc/extensions new file mode 100644 index 00000000..17597822 --- /dev/null +++ b/packaging/debian_buster/etc/extensions @@ -0,0 +1,5 @@ +# remote extensions on by default +export CHROMIUM_FLAGS="$CHROMIUM_FLAGS --enable-remote-extensions" + +# load all of the extensions installed to /usr/share/chromium/extensions +export CHROMIUM_FLAGS="$CHROMIUM_FLAGS --load-extension=`ls -dm /usr/share/chromium/extensions/* 2>/dev/null | tr -d '\n'`" diff --git a/packaging/debian_buster/master_preferences b/packaging/debian_buster/etc/master_preferences similarity index 100% rename from packaging/debian_buster/master_preferences rename to packaging/debian_buster/etc/master_preferences diff --git a/packaging/debian_buster/extensions b/packaging/debian_buster/extensions deleted file mode 100644 index 24bd902a..00000000 --- a/packaging/debian_buster/extensions +++ /dev/null @@ -1,2 +0,0 @@ -# remote extensions on by default -export CHROMIUM_FLAGS="$CHROMIUM_FLAGS --enable-remote-extensions" diff --git a/packaging/debian_buster/rules b/packaging/debian_buster/rules index 4fe5224e..dc890bd1 100755 --- a/packaging/debian_buster/rules +++ b/packaging/debian_buster/rules @@ -67,10 +67,10 @@ domsubcache=debian/scripts/ungoogled-chromium/domsubcache.tar.gz %: dh $@ -out/Default/gn: - mkdir -p out/Default || true +out/Release/gn: + mkdir -p out/Release || true cp base/numerics/safe_conversions_arm_impl.h base/numerics/safe_math_arm_impl.h tools/gn/base/numerics - ./tools/gn/bootstrap/bootstrap.py -o out/Default/gn -j$(njobs) + ./tools/gn/bootstrap/bootstrap.py -o out/Release/gn -j$(njobs) override_dh_auto_configure: # output compiler information @@ -78,47 +78,44 @@ override_dh_auto_configure: # put yasm script in the location expected by gn ln -sf ../pdfium/third_party/yasm/run_yasm.py third_party/yasm # strip out system third_party libraries + # NOTE: Removing base/third_party/libevent/BUILD.gn and build/config/freetype/freetype.gni in scripts/unbundle ./debian/scripts/unbundle # apply domain substitution - if [ ! -e $(domsubcache) ]; then python3 $(buildkit_cli) domains apply -b $(config_bundle) -c $(domsubcache) ./; fi + if [ ! -e $(domsubcache) ]; then python3 -B $(buildkit_cli) domains apply -b $(config_bundle) -c $(domsubcache) ./; fi # use system flot for file in $(flotpaths); do ln -sf $$file third_party/flot; done + # use polymer from chromium's top level third_party directory + ln -sf ../../../../third_party/polymer/v1_0/components-chromium third_party/catapult/third_party/polymer/components -override_dh_auto_build-arch: out/Default/gn - ./out/Default/gn gen out/Default --args="$(defines)" --fail-on-unused-args - ninja -j$(njobs) -C out/Default chrome chrome_sandbox content_shell chromedriver +override_dh_auto_build-arch: out/Release/gn + ./out/Release/gn gen out/Release --args="$(defines)" --fail-on-unused-args + ninja -j$(njobs) -C out/Release chrome chrome_sandbox content_shell chromedriver -override_dh_auto_build-indep: out/Default/gn - ./out/Default/gn gen out/Default --args="$(defines)" --fail-on-unused-args - ninja -j$(njobs) -C out/Default packed_resources +override_dh_auto_build-indep: out/Release/gn + ./out/Release/gn gen out/Release --args="$(defines)" --fail-on-unused-args + ninja -j$(njobs) -C out/Release packed_resources + rm -f out/Release/locales/en-US.pak override_dh_prep: # building is done by this step; remove domain substitution - if [ -e $(domsubcache) ]; then python3 $(buildkit_cli) domains revert -c $(domsubcache) ./; fi + if [ -e $(domsubcache) ]; then python3 -B $(buildkit_cli) domains revert -c $(domsubcache) ./; fi dh_prep override_dh_auto_install-arch: - cp out/Default/chrome out/Default/chromium - cp out/Default/content_shell out/Default/chromium-shell - cp out/Default/chrome_sandbox out/Default/chrome-sandbox - cp out/Default/locales/en-US.pak out/Default/resources - chmod 4755 out/Default/chrome-sandbox # suid sandbox + cp out/Release/chrome out/Release/chromium + cp out/Release/content_shell out/Release/chromium-shell + cp out/Release/chrome_sandbox out/Release/chrome-sandbox + cp out/Release/locales/en-US.pak out/Release/resources + chmod 4755 out/Release/chrome-sandbox # suid sandbox sed -e s/@@PACKAGE@@/chromium/g -e s/@@MENUNAME@@/Chromium/g \ - < chrome/app/resources/manpage.1.in > out/Default/chromium.1 + < chrome/app/resources/manpage.1.in > out/Release/chromium.1 dh_auto_install - # create /etc/chromium.d README file - echo "Any files placed in this directory will be sourced prior to executing chromium." \ - > debian/ungoogled-chromium/etc/chromium.d/README # update launcher script with build information sed 's|@BUILD_DIST@|$(shell printf "%s %s/%s" $(shell lsb_release -si) $(shell lsb_release -sc) $(shell lsb_release -sr))|' \ < debian/scripts/chromium > debian/ungoogled-chromium/usr/bin/chromium # move icons into /usr/share ./debian/scripts/icons -override_dh_auto_install-indep: - rm -f out/Default/locales/en-US.pak - dh_auto_install - override_dh_fixperms: dh_fixperms --exclude chrome-sandbox @@ -146,16 +143,16 @@ removed=$(debvers).files-removed seconds=$(debvers).seconds get-orig-source: - if [ ! -e debian/patches ]; then python3 $(buildkit_cli) patches export -b $(config_bundle) debian/patches/; fi + if [ ! -e debian/patches ]; then python3 -B $(buildkit_cli) patches export -b $(config_bundle) debian/patches/; fi wget -nv --show-progress -c $(url)/$(tarball) -O ../$(tarball) - cp /usr/bin/mk-origtargz debian/scripts + cp /usr/share/perl5/Devscripts/MkOrigtargz.pm debian/scripts/mk-origtargz patch -p1 < debian/scripts/mk-origtargz.patch date +%s > $(seconds) - ./debian/scripts/mk-origtargz ../$(tarball) > $(removed) + perl debian/scripts/mk-origtargz ../$(tarball) > $(removed) echo $$(($$(date +%s) - $$(cat $(seconds)))) seconds test ! -e $(extract) || rm -rf $(extract) tar xf ../$(tarball) - python3 $(buildkit_cli) prune -b $(config_bundle) $(extract) + python3 -B $(buildkit_cli) prune -b $(config_bundle) $(extract) echo $$(($$(date +%s) - $$(cat $(seconds)))) seconds while read line; do rm -rf $$line; done < $(removed) cd $(extract) && ../debian/scripts/check-upstream @@ -170,7 +167,7 @@ get-orig-source: setup-local-src: mkdir ../download_cache || true - python3 $(buildkit_cli) downloads retrieve -b $(config_bundle) -c ../download_cache - python3 $(buildkit_cli) downloads unpack -b $(config_bundle) -c ../download_cache ./ - python3 $(buildkit_cli) prune -b $(config_bundle) ./ - python3 $(buildkit_cli) patches export -b $(config_bundle) debian/patches/ + python3 -B $(buildkit_cli) downloads retrieve -b $(config_bundle) -c ../download_cache + python3 -B $(buildkit_cli) downloads unpack -b $(config_bundle) -c ../download_cache ./ + python3 -B $(buildkit_cli) prune -b $(config_bundle) ./ + python3 -B $(buildkit_cli) patches export -b $(config_bundle) debian/patches/ diff --git a/packaging/debian_buster/scripts/mk-origtargz.patch b/packaging/debian_buster/scripts/mk-origtargz.patch index cc84fd95..d9f6aab1 100644 --- a/packaging/debian_buster/scripts/mk-origtargz.patch +++ b/packaging/debian_buster/scripts/mk-origtargz.patch @@ -1,14 +1,20 @@ ---- a/debian/scripts/mk-origtargz 2017-10-27 12:52:18.000000000 +0000 -+++ b/debian/scripts/mk-origtargz 2017-11-26 23:39:05.818091051 +0000 -@@ -551,6 +551,11 @@ +--- b/debian/scripts/mk-origtargz ++++ a/debian/scripts/mk-origtargz +@@ -211,6 +212,11 @@ + } + + if ($deletecount or $self->config->force_repack) { ++ for my $filename (@to_delete) { ++ printf "$filename\n"; ++ } ++ return $self->status(0); ++ + $destfilebase = sprintf "%s_%s%s.%s.tar", $self->config->package, + $self->config->version, $self->config->repack_suffix, + $self->config->orig; +@@ -558,4 +563,4 @@ + compression_get_property($self->config->compression, "file_ext"); } - if ($deletecount) { -+ for my $file (@to_delete) { -+ print "$file\n"; -+ } -+ exit 0; -+ - $destfilebase = sprintf "%s_%s%s.%s.tar", $package, $version, $suffix, $orig; - $destfiletar = sprintf "%s/%s", $destdir, $destfilebase; - $destfile = sprintf "%s.%s", $destfiletar, $destext; +-1; ++exit Devscripts::MkOrigtargz->new->do; diff --git a/packaging/debian_buster/scripts/unbundle b/packaging/debian_buster/scripts/unbundle index 36826eac..27941eeb 100755 --- a/packaging/debian_buster/scripts/unbundle +++ b/packaging/debian_buster/scripts/unbundle @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/python3 -B import os import sys diff --git a/packaging/debian_buster/ungoogled-chromium-common.install b/packaging/debian_buster/ungoogled-chromium-common.install index 9a0d9dca..73899a75 100644 --- a/packaging/debian_buster/ungoogled-chromium-common.install +++ b/packaging/debian_buster/ungoogled-chromium-common.install @@ -1 +1 @@ -out/Default/*.bin usr/lib/chromium +out/Release/*.bin usr/lib/chromium diff --git a/packaging/debian_buster/ungoogled-chromium-driver.install b/packaging/debian_buster/ungoogled-chromium-driver.install index 92424d1c..1d8f6c34 100644 --- a/packaging/debian_buster/ungoogled-chromium-driver.install +++ b/packaging/debian_buster/ungoogled-chromium-driver.install @@ -1 +1 @@ -out/Default/chromedriver usr/lib/chromium +out/Release/chromedriver usr/bin diff --git a/packaging/debian_buster/ungoogled-chromium-l10n.install b/packaging/debian_buster/ungoogled-chromium-l10n.install index 94bf88f1..867d2af9 100644 --- a/packaging/debian_buster/ungoogled-chromium-l10n.install +++ b/packaging/debian_buster/ungoogled-chromium-l10n.install @@ -1 +1 @@ -out/Default/locales usr/lib/chromium +out/Release/locales usr/lib/chromium diff --git a/packaging/debian_buster/ungoogled-chromium-sandbox.lintian-overrides b/packaging/debian_buster/ungoogled-chromium-sandbox.lintian-overrides new file mode 100644 index 00000000..14218d7e --- /dev/null +++ b/packaging/debian_buster/ungoogled-chromium-sandbox.lintian-overrides @@ -0,0 +1,2 @@ +# sandbox is intentionally suid +setuid-binary usr/lib/chromium/chrome-sandbox 4755 root/root diff --git a/packaging/debian_buster/ungoogled-chromium-shell.install b/packaging/debian_buster/ungoogled-chromium-shell.install index e8256c60..37fa0909 100644 --- a/packaging/debian_buster/ungoogled-chromium-shell.install +++ b/packaging/debian_buster/ungoogled-chromium-shell.install @@ -1,6 +1,6 @@ debian/scripts/chromium-shell usr/bin -out/Default/chromium-shell usr/lib/chromium +out/Release/chromium-shell usr/lib/chromium -out/Default/content_shell.pak usr/lib/chromium -out/Default/shell_resources.pak usr/lib/chromium +out/Release/content_shell.pak usr/lib/chromium +out/Release/shell_resources.pak usr/lib/chromium diff --git a/packaging/debian_buster/ungoogled-chromium.bug-control b/packaging/debian_buster/ungoogled-chromium.bug-control new file mode 100644 index 00000000..e11618f4 --- /dev/null +++ b/packaging/debian_buster/ungoogled-chromium.bug-control @@ -0,0 +1 @@ +report-with: ungoogled-chromium-common ungoogled-chromium-driver ungoogled-chromium-sandbox diff --git a/packaging/debian_buster/ungoogled-chromium.install b/packaging/debian_buster/ungoogled-chromium.install index e1ef5842..5f483635 100644 --- a/packaging/debian_buster/ungoogled-chromium.install +++ b/packaging/debian_buster/ungoogled-chromium.install @@ -1,20 +1,18 @@ -out/Default/chromium usr/lib/chromium +out/Release/chromium usr/lib/chromium -out/Default/chrome-sandbox usr/lib/chromium +out/Release/chrome_*.pak usr/lib/chromium +out/Release/resources.pak usr/lib/chromium -out/Default/chrome_*.pak usr/lib/chromium -out/Default/resources.pak usr/lib/chromium - -out/Default/resources/en-US.pak usr/lib/chromium/locales +out/Release/resources/en-US.pak usr/lib/chromium/locales debian/presubj usr/share/bug/chromium -debian/master_preferences usr/share/chromium - debian/chromium.xml usr/share/gnome-control-center/default-apps debian/chromium.desktop usr/share/applications -debian/extensions etc/chromium.d -debian/default-flags etc/chromium.d - +debian/etc/README etc/chromium.d +debian/etc/apikeys etc/chromium.d +debian/etc/extensions etc/chromium.d +debian/etc/default-flags etc/chromium.d +debian/etc/master_preferences etc/chromium diff --git a/packaging/debian_buster/ungoogled-chromium.manpages b/packaging/debian_buster/ungoogled-chromium.manpages index fc746008..8026ed07 100644 --- a/packaging/debian_buster/ungoogled-chromium.manpages +++ b/packaging/debian_buster/ungoogled-chromium.manpages @@ -1 +1 @@ -out/Default/chromium.1 +out/Release/chromium.1 diff --git a/packaging/debian_minimal/control b/packaging/debian_minimal/control index 5960a746..4ff6e928 100644 --- a/packaging/debian_minimal/control +++ b/packaging/debian_minimal/control @@ -16,7 +16,7 @@ Build-Depends: ninja-build, python-jinja2, ca-certificates, - uuid-dev, + gsettings-desktop-schemas-dev, wget, flex, yasm, @@ -42,6 +42,7 @@ Build-Depends: libelf-dev, libpci-dev, libcap-dev, + libdrm-dev, libicu-dev, libffi-dev, libkrb5-dev, @@ -60,6 +61,7 @@ Build-Depends: libpam0g-dev, libsnappy-dev, libavutil-dev, + libavcodec-dev (>= 7), libavformat-dev, libglib2.0-dev, libasound2-dev, @@ -75,10 +77,10 @@ Build-Depends: libcups2-dev (>= 1.5.0), libevent-dev (>= 1.4.13), libjs-jquery, - libjs-excanvas, libjs-jquery-flot, libgcrypt20-dev, - libva-dev, + fonts-ipafont-gothic, + fonts-ipafont-mincho, Standards-Version: 4.1.2 Package: ungoogled-chromium @@ -89,17 +91,16 @@ Depends: ${shlibs:Depends}, ungoogled-chromium-common (= ${binary:Version}), Recommends: - libgl1-mesa-dri, - fonts-liberation, - libva1, + ungoogled-chromium-sandbox, Suggests: ungoogled-chromium-l10n, ungoogled-chromium-shell, ungoogled-chromium-driver, - ungoogled-chromium-widevine, Provides: www-browser, - gnome-www-browser, +Breaks: + chromium-lwn4chrome (<= 1.0-2), + chromium-tt-rss-notifier (<= 0.5.2-2), Conflicts: libnettle4, libsecret-1-0 (<< 0.18), @@ -153,23 +154,6 @@ Description: web browser - minimal shell This package provides a minimal version of the chromium user interface (the content shell). -Package: ungoogled-chromium-widevine -Section: contrib/web -Architecture: i386 amd64 arm64 armhf -Depends: - ${misc:Depends}, - ${shlibs:Depends}, - ungoogled-chromium (= ${binary:Version}), -Replaces: - chromium-widevine, -Breaks: - chromium-widevine, -Description: web browser - widevine content decryption support - Web browser that aims to build a safer, faster, and more stable internet - browsing experience. - . - This package provides support for the widevine content decryption module. - Package: ungoogled-chromium-driver Architecture: i386 amd64 arm64 armhf Depends: @@ -196,6 +180,13 @@ Depends: ${misc:Depends}, x11-utils, xdg-utils, +Recommends: + upower, + libu2f-udev, + libgl1-mesa-dri, + ungoogled-chromium-sandbox, + fonts-liberation, + notification-daemon, Breaks: ungoogled-chromium (<< 60.0.3112.72-1), chromium-common, @@ -208,3 +199,18 @@ Description: web browser - common resources used by ungoogled-chromium packages . This package contains resources that are in common to different ungoogled-chromium packages. + +Package: ungoogled-chromium-sandbox +Architecture: i386 amd64 arm64 armhf +Depends: + ${misc:Depends}, + ${shlibs:Depends}, +Breaks: + chromium (<< ${binary:Version}), +Replaces: + chromium (<< ${binary:Version}), +Description: web browser - setuid security sandbox for ungoogled-chromium + Web browser that aims to build a safer, faster, and more stable internet + browsing experience. + . + This package contains the setuid chromium sandbox. diff --git a/packaging/debian_minimal/scripts/unbundle b/packaging/debian_minimal/scripts/unbundle index 917d658a..c6d5d441 100755 --- a/packaging/debian_minimal/scripts/unbundle +++ b/packaging/debian_minimal/scripts/unbundle @@ -1,3 +1,3 @@ -#!/usr/bin/python3 +#!/usr/bin/python3 -B print('Unbundling is disabled') diff --git a/packaging/debian_minimal/ungoogled-chromium-common.install b/packaging/debian_minimal/ungoogled-chromium-common.install index df1489f2..2d07aff4 100644 --- a/packaging/debian_minimal/ungoogled-chromium-common.install +++ b/packaging/debian_minimal/ungoogled-chromium-common.install @@ -1,6 +1,6 @@ -out/Default/*.bin usr/lib/chromium -out/Default/icudtl.dat usr/lib/chromium -out/Default/libEGL.so usr/lib/chromium -out/Default/libGLESv2.so usr/lib/chromium -out/Default/xdg-mime usr/lib/chromium -out/Default/xdg-settings usr/lib/chromium +out/Release/*.bin usr/lib/chromium +out/Release/icudtl.dat usr/lib/chromium +out/Release/libEGL.so usr/lib/chromium +out/Release/libGLESv2.so usr/lib/chromium +out/Release/xdg-mime usr/lib/chromium +out/Release/xdg-settings usr/lib/chromium diff --git a/packaging/debian_minimal/ungoogled-chromium.install b/packaging/debian_minimal/ungoogled-chromium.install deleted file mode 100644 index c41662b7..00000000 --- a/packaging/debian_minimal/ungoogled-chromium.install +++ /dev/null @@ -1,20 +0,0 @@ -out/Default/chromium usr/lib/chromium - -out/Default/chrome-sandbox usr/lib/chromium - -out/Default/chrome_*.pak usr/lib/chromium -out/Default/resources.pak usr/lib/chromium - -out/Default/resources/en-US.pak usr/lib/chromium/locales - -debian/presubj usr/share/bug/chromium - -debian/master_preferences usr/lib/chromium - -debian/chromium.xml usr/share/gnome-control-center/default-apps - -debian/chromium.desktop usr/share/applications - -debian/extensions etc/chromium.d -debian/default-flags etc/chromium.d - diff --git a/packaging/debian_stretch/clean b/packaging/debian_stretch/clean index 0385eb2a..5e8ce958 100644 --- a/packaging/debian_stretch/clean +++ b/packaging/debian_stretch/clean @@ -24,3 +24,8 @@ third_party/fontconfig/BUILD.gn third_party/yasm/yasm_assemble.gni third_party/yasm/run_yasm.py + +tools/gn/base/numerics/safe_math_arm_impl.h +tools/gn/base/numerics/safe_conversions_arm_impl.h + +third_party/catapult/third_party/polymer/components diff --git a/packaging/debian_stretch/control b/packaging/debian_stretch/control index fa6102b3..97adab65 100644 --- a/packaging/debian_stretch/control +++ b/packaging/debian_stretch/control @@ -79,10 +79,11 @@ Build-Depends: libcups2-dev (>= 1.5.0), libevent-dev (>= 1.4.13), libjs-jquery, - libjs-excanvas, libjs-jquery-flot, libgcrypt20-dev, libva-dev, + fonts-ipafont-gothic, + fonts-ipafont-mincho, Standards-Version: 4.1.4 Package: ungoogled-chromium @@ -92,6 +93,8 @@ Depends: ${misc:Depends}, ${shlibs:Depends}, ungoogled-chromium-common (= ${binary:Version}), +Recommends: + ungoogled-chromium-sandbox, Suggests: ungoogled-chromium-l10n, ungoogled-chromium-shell, @@ -99,6 +102,9 @@ Suggests: Provides: www-browser, gnome-www-browser, +Breaks: + chromium-lwn4chrome (<= 1.0-2), + chromium-tt-rss-notifier (<= 0.5.2-2), Conflicts: libnettle4, libsecret-1-0 (<< 0.18), @@ -185,6 +191,7 @@ Recommends: libu2f-udev, libva1, libgl1-mesa-dri, + ungoogled-chromium-sandbox, fonts-liberation, notification-daemon, Breaks: @@ -199,3 +206,18 @@ Description: web browser - common resources used by ungoogled-chromium packages . This package contains resources that are in common to different ungoogled-chromium packages. + +Package: ungoogled-chromium-sandbox +Architecture: i386 amd64 arm64 armhf +Depends: + ${misc:Depends}, + ${shlibs:Depends}, +Breaks: + chromium (<< ${binary:Version}), +Replaces: + chromium (<< ${binary:Version}), +Description: web browser - setuid security sandbox for ungoogled-chromium + Web browser that aims to build a safer, faster, and more stable internet + browsing experience. + . + This package contains the setuid chromium sandbox. diff --git a/patches/debian_buster/debianization/sandbox.patch b/patches/debian_buster/debianization/sandbox.patch new file mode 100644 index 00000000..a85080c7 --- /dev/null +++ b/patches/debian_buster/debianization/sandbox.patch @@ -0,0 +1,24 @@ +description: debian specific instructions when no working sandbox is available +author: Michael Gilbert + +--- a/services/service_manager/zygote/host/zygote_host_impl_linux.cc ++++ b/services/service_manager/zygote/host/zygote_host_impl_linux.cc +@@ -113,14 +113,13 @@ void ZygoteHostImpl::Init(const base::Co + // root. + use_suid_sandbox_for_adj_oom_score_ = use_suid_sandbox_; + } else { +- LOG(FATAL) +- << "No usable sandbox! Update your kernel or see " +- "https://chromium.googlesource.com/chromium/src/+/master/" +- "docs/linux_suid_sandbox_development.md for more information on " +- "developing with the SUID sandbox. " ++ LOG(ERROR) ++ << "No usable sandbox! If this is a Debian system, please install the " ++ "chromium-sandbox package to solve this problem. " + "If you want to live dangerously and need an immediate workaround, " + "you can try using --" + << service_manager::switches::kNoSandbox << "."; ++ exit(EXIT_FAILURE); + } + } + diff --git a/patches/debian_buster/fixes/polymer.patch b/patches/debian_buster/fixes/polymer.patch new file mode 100644 index 00000000..6579794e --- /dev/null +++ b/patches/debian_buster/fixes/polymer.patch @@ -0,0 +1,18 @@ +description: use polymer from chromium's top level third_party directory +author: Michael Gilbert + +--- a/third_party/catapult/tracing/trace_viewer.gypi ++++ b/third_party/catapult/tracing/trace_viewer.gypi +@@ -18,9 +18,9 @@ + 'tracing/ui/tracks/track.css', + ], + 'tracing_js_html_files': [ +- '../third_party/polymer/components/polymer/polymer-micro.html', +- '../third_party/polymer/components/polymer/polymer-mini.html', +- '../third_party/polymer/components/polymer/polymer.html', ++ '../../polymer/v1_0/components-chromium/polymer/polymer-micro.html', ++ '../../polymer/v1_0/components-chromium/polymer/polymer-mini.html', ++ '../../polymer/v1_0/components-chromium/polymer/polymer.html', + 'tracing/base/base.html', + 'tracing/base/base64.html', + 'tracing/base/category_util.html', diff --git a/patches/debian_buster/system/harfbuzz.patch b/patches/debian_buster/system/harfbuzz.patch new file mode 100644 index 00000000..59cc60fc --- /dev/null +++ b/patches/debian_buster/system/harfbuzz.patch @@ -0,0 +1,43 @@ +description: update api to support harfbuzz 2.1 +author: Michael Gilbert + +--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc ++++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc +@@ -138,7 +138,7 @@ static hb_position_t HarfBuzzGetGlyphHor + static void HarfBuzzGetGlyphHorizontalAdvances(hb_font_t* font, + void* font_data, + unsigned count, +- hb_codepoint_t* first_glyph, ++ const hb_codepoint_t* first_glyph, + unsigned int glyph_stride, + hb_position_t* first_advance, + unsigned int advance_stride, +--- a/third_party/blink/renderer/platform/fonts/skia/skia_text_metrics.cc ++++ b/third_party/blink/renderer/platform/fonts/skia/skia_text_metrics.cc +@@ -39,13 +39,14 @@ void SkiaTextMetrics::GetGlyphWidthForHa + } + + void SkiaTextMetrics::GetGlyphWidthForHarfBuzz(unsigned count, +- hb_codepoint_t* glyphs, ++ const hb_codepoint_t* first_glyph, + unsigned glyph_stride, + hb_position_t* advances, + unsigned advance_stride) { + // Batch the call to getTextWidths because its function entry cost is not + // cheap. getTextWidths accepts multiple glyphd ID, but not from a sparse + // array that copy them to a regular array. ++ hb_codepoint_t* glyphs = const_cast(first_glyph); + Vector glyph_array(count); + for (unsigned i = 0; i < count; + i++, glyphs = advance_by_byte_size(glyphs, glyph_stride)) { +--- a/third_party/blink/renderer/platform/fonts/skia/skia_text_metrics.h ++++ b/third_party/blink/renderer/platform/fonts/skia/skia_text_metrics.h +@@ -19,7 +19,7 @@ class SkiaTextMetrics final { + + void GetGlyphWidthForHarfBuzz(hb_codepoint_t, hb_position_t* width); + void GetGlyphWidthForHarfBuzz(unsigned count, +- hb_codepoint_t* first_glyph, ++ const hb_codepoint_t* first_glyph, + unsigned glyph_stride, + hb_position_t* first_advance, + unsigned advance_stride); diff --git a/patches/ungoogled-chromium/linux/fix-old-libstdcxx-incompatibility.patch b/patches/debian_buster/warnings/explicit-constructor.patch similarity index 83% rename from patches/ungoogled-chromium/linux/fix-old-libstdcxx-incompatibility.patch rename to patches/debian_buster/warnings/explicit-constructor.patch index 284f2836..f7c300be 100644 --- a/patches/ungoogled-chromium/linux/fix-old-libstdcxx-incompatibility.patch +++ b/patches/debian_buster/warnings/explicit-constructor.patch @@ -1,4 +1,5 @@ -# Fix compatibilty with older libstdc++ libraries, such as 6.3.0 in Debian stretch +description: fix gcc explicit constructor warning +author: Michael Gilbert --- a/device/fido/hid/fido_hid_device.cc +++ b/device/fido/hid/fido_hid_device.cc diff --git a/patches/debian_stretch/arm/crashpad.patch b/patches/debian_stretch/arm/crashpad.patch index f14246f2..2b286a51 100644 --- a/patches/debian_stretch/arm/crashpad.patch +++ b/patches/debian_stretch/arm/crashpad.patch @@ -1,4 +1,4 @@ -description: Stretch binutils doesn't recognize LR on arm64 +description: stretch binutils doesn't recognize LR on arm64 author: Riku Voipio --- a/third_party/crashpad/crashpad/util/misc/capture_context_linux.S diff --git a/patches/debian_stretch/system/icu.patch b/patches/debian_stretch/system/icu.patch index fc596725..ce701e77 100644 --- a/patches/debian_stretch/system/icu.patch +++ b/patches/debian_stretch/system/icu.patch @@ -25,7 +25,7 @@ author: Michael Gilbert - char16_t* buffer = host_alt.getBuffer(-1); - for (char16_t* uc = buffer + u04cf_pos; uc < buffer + length; ++uc) { + UChar* buffer = host_alt.getBuffer(-1); -+ for (UChar* uc = buffer + u04cf_pos ; uc < buffer + length; ++uc) { ++ for (UChar* uc = buffer + u04cf_pos; uc < buffer + length; ++uc) { if (*uc == 0x4CF) *uc = 0x6C; // Lowercase L } diff --git a/patches/debian_stretch/system/openjpeg21.patch b/patches/debian_stretch/system/openjpeg21.patch index 3d4268c0..27cd11fb 100644 --- a/patches/debian_stretch/system/openjpeg21.patch +++ b/patches/debian_stretch/system/openjpeg21.patch @@ -1,28 +1,6 @@ description: maintain compatibility with openjpeg 2.1 author: chromium 57 authors ---- a/third_party/pdfium/core/fxcodec/codec/cjpx_decoder.h -+++ b/third_party/pdfium/core/fxcodec/codec/cjpx_decoder.h -@@ -13,7 +13,7 @@ - #include "core/fxcodec/codec/codec_int.h" - #include "core/fxcrt/unowned_ptr.h" - #include "third_party/base/span.h" --#include -+#include - - class CPDF_ColorSpace; - ---- a/third_party/pdfium/core/fxcodec/codec/codec_int.h -+++ b/third_party/pdfium/core/fxcodec/codec/codec_int.h -@@ -15,7 +15,7 @@ - #include - - #include "core/fxcodec/jbig2/JBig2_Context.h" --#include -+#include - - class CPDF_ColorSpace; - --- a/third_party/pdfium/core/fxcodec/codec/ccodec_jpxmodule.cpp +++ b/third_party/pdfium/core/fxcodec/codec/ccodec_jpxmodule.cpp @@ -41,20 +41,20 @@ opj_stream_t* fx_opj_stream_create_memor @@ -91,3 +69,25 @@ author: chromium 57 authors img->comps[0].data = d0; img->comps[1].data = d1; img->comps[2].data = d2; +--- a/third_party/pdfium/core/fxcodec/codec/cjpx_decoder.h ++++ b/third_party/pdfium/core/fxcodec/codec/cjpx_decoder.h +@@ -13,7 +13,7 @@ + #include "core/fxcodec/codec/codec_int.h" + #include "core/fxcrt/unowned_ptr.h" + #include "third_party/base/span.h" +-#include ++#include + + class CPDF_ColorSpace; + +--- a/third_party/pdfium/core/fxcodec/codec/codec_int.h ++++ b/third_party/pdfium/core/fxcodec/codec/codec_int.h +@@ -15,7 +15,7 @@ + #include + + #include "core/fxcodec/jbig2/JBig2_Context.h" +-#include ++#include + + class CPDF_ColorSpace; +