From 3a5bea23edf654df476b3acec47e2a677e34b652 Mon Sep 17 00:00:00 2001 From: Riyad Preukschas Date: Mon, 26 Nov 2018 16:10:32 +0100 Subject: [PATCH] ubuntu_cosmic: add packaging type --- config_bundles/ubuntu_cosmic/bundlemeta.ini | 3 + config_bundles/ubuntu_cosmic/gn_flags.map | 1 + config_bundles/ubuntu_cosmic/patch_order.list | 11 + docs/building.md | 3 +- packaging/pkgmeta.ini | 3 + packaging/ubuntu_cosmic/changelog.ungoogin | 5 + packaging/ubuntu_cosmic/clean | 32 +++ packaging/ubuntu_cosmic/control | 221 ++++++++++++++++++ packaging/ubuntu_cosmic/scripts/unbundle | 58 +++++ .../ubuntu_cosmic/ungoogled-config-bundle | 1 + 10 files changed, 337 insertions(+), 1 deletion(-) create mode 100644 config_bundles/ubuntu_cosmic/bundlemeta.ini create mode 100644 config_bundles/ubuntu_cosmic/gn_flags.map create mode 100644 config_bundles/ubuntu_cosmic/patch_order.list create mode 100644 packaging/ubuntu_cosmic/changelog.ungoogin create mode 100644 packaging/ubuntu_cosmic/clean create mode 100644 packaging/ubuntu_cosmic/control create mode 100755 packaging/ubuntu_cosmic/scripts/unbundle create mode 100644 packaging/ubuntu_cosmic/ungoogled-config-bundle diff --git a/config_bundles/ubuntu_cosmic/bundlemeta.ini b/config_bundles/ubuntu_cosmic/bundlemeta.ini new file mode 100644 index 00000000..7594d021 --- /dev/null +++ b/config_bundles/ubuntu_cosmic/bundlemeta.ini @@ -0,0 +1,3 @@ +[bundle] +display_name = Ubuntu 18.10 (cosmic) +depends = linux_rooted diff --git a/config_bundles/ubuntu_cosmic/gn_flags.map b/config_bundles/ubuntu_cosmic/gn_flags.map new file mode 100644 index 00000000..ed46f136 --- /dev/null +++ b/config_bundles/ubuntu_cosmic/gn_flags.map @@ -0,0 +1 @@ +use_system_harfbuzz=false diff --git a/config_bundles/ubuntu_cosmic/patch_order.list b/config_bundles/ubuntu_cosmic/patch_order.list new file mode 100644 index 00000000..eaf4cb4d --- /dev/null +++ b/config_bundles/ubuntu_cosmic/patch_order.list @@ -0,0 +1,11 @@ +debian_buster/disable/openh264.patch + +debian_buster/system/ffmpeg34.patch +debian_buster/system/openjpeg.patch +debian_buster/system/convertutf.patch + +debian_buster/debianization/sandbox.patch +debian_buster/debianization/master-preferences.patch + +ungoogled-chromium/linux/fix-nullptr-t-namespace.patch +ungoogled-chromium/linux/manpage.patch diff --git a/docs/building.md b/docs/building.md index 441ba0d3..62789116 100644 --- a/docs/building.md +++ b/docs/building.md @@ -46,7 +46,8 @@ Packaging types are identified by a short string. The following is a list of all * `debian_stretch` for Debian 9 (stretch) * `debian_buster` for Debian 10 (buster) -* `ubuntu_bionic` for Ubuntu 18.04 (bionic) +* `ubuntu_bionic` for Ubuntu 18.04 LTS (bionic) +* `ubuntu_cosmic` for Ubuntu 18.10 (cosmic) * `debian_minimal` for any other Debian-based system that isn't based on one of the above versions. All Debian-based packaging types require LLVM 7, except `debian_minimal`. `debian_minimal` requires LLVM 8. diff --git a/packaging/pkgmeta.ini b/packaging/pkgmeta.ini index 06799536..e935d1fc 100644 --- a/packaging/pkgmeta.ini +++ b/packaging/pkgmeta.ini @@ -16,6 +16,9 @@ depends = debian_buster [ubuntu_bionic] depends = debian_buster +[ubuntu_cosmic] +depends = debian_buster + [debian_minimal] depends = debian_stretch diff --git a/packaging/ubuntu_cosmic/changelog.ungoogin b/packaging/ubuntu_cosmic/changelog.ungoogin new file mode 100644 index 00000000..13a6ab78 --- /dev/null +++ b/packaging/ubuntu_cosmic/changelog.ungoogin @@ -0,0 +1,5 @@ +ungoogled-chromium-browser ($ungoog{chromium_version}-$ungoog{release_revision}~cosmic) cosmic; urgency=medium + + * Built against $ungoog{current_commit_or_tag} + + -- ungoogled-chromium Authors Sun, 29 Jul 2018 00:00:00 +0000 diff --git a/packaging/ubuntu_cosmic/clean b/packaging/ubuntu_cosmic/clean new file mode 100644 index 00000000..3f03a9ed --- /dev/null +++ b/packaging/ubuntu_cosmic/clean @@ -0,0 +1,32 @@ +debian/files + +Makefile +third_party/flot/*.js + +base/third_party/libevent/BUILD.gn +build/secondary/third_party/libjpeg_turbo/BUILD.gn + +third_party/re2/BUILD.gn +third_party/icu/BUILD.gn +third_party/flac/BUILD.gn +third_party/zlib/BUILD.gn +third_party/opus/BUILD.gn +third_party/snappy/BUILD.gn +third_party/ffmpeg/BUILD.gn +third_party/libxml/BUILD.gn +third_party/libdrm/BUILD.gn +third_party/libpng/BUILD.gn +third_party/libvpx/BUILD.gn +third_party/libwebp/BUILD.gn +third_party/libjpeg/BUILD.gn +third_party/libxslt/BUILD.gn +third_party/freetype/BUILD.gn +third_party/fontconfig/BUILD.gn +third_party/yasm/yasm_assemble.gni + +build/config/freetype/freetype.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 diff --git a/packaging/ubuntu_cosmic/control b/packaging/ubuntu_cosmic/control new file mode 100644 index 00000000..15735ec9 --- /dev/null +++ b/packaging/ubuntu_cosmic/control @@ -0,0 +1,221 @@ +Source: ungoogled-chromium-browser +Section: web +Priority: optional +Maintainer: ungoogled-chromium Maintainers +Vcs-Git: https://github.com/Eloston/ungoogled-chromium.git +Vcs-Browser: https://github.com/Eloston/ungoogled-chromium +Homepage: https://github.com/Eloston/ungoogled-chromium +Rules-Requires-Root: no +Build-Depends: + debhelper (>= 11), + clang-7, + lld-7, + llvm-7-dev, + python, + python3, + pkg-config, + ninja-build, + python-jinja2, + ca-certificates, + gsettings-desktop-schemas-dev, + wget, + flex, + yasm, + xvfb, + wdiff, + gperf, + bison, + valgrind, + xz-utils, + x11-apps, + xfonts-base, + libglew-dev, + libgl1-mesa-dev, + libglu1-mesa-dev, + libegl1-mesa-dev, + libgles2-mesa-dev, + mesa-common-dev, + libxt-dev, + libre2-dev, + libgbm-dev, + libpng-dev, + libxss-dev, + libelf-dev, + libvpx-dev (>= 1.7.0), + libpci-dev, + libcap-dev, + libdrm-dev, + libicu-dev, + libffi-dev, + libkrb5-dev, + libexif-dev, + libflac-dev, + libudev-dev, + libopus-dev, + libwebp-dev, + libxtst-dev, + libsrtp-dev, + libjpeg-dev, + libxml2-dev, + libgtk-3-dev, + libxslt1-dev, + liblcms2-dev, + libpulse-dev, + libpam0g-dev, + libsnappy-dev, + libavutil-dev, + libavcodec-dev (>= 7), + libavformat-dev, + libglib2.0-dev, + libasound2-dev, + libjsoncpp-dev, + libspeechd-dev (>= 0.8.3), + libminizip-dev, + libhunspell-dev, + libusb-1.0-0-dev, + libopenjp2-7-dev, + libmodpbase64-dev, + libnss3-dev (>= 3.12.3), + libnspr4-dev (>= 2:4.9), + libcups2-dev (>= 1.5.0), + libevent-dev (>= 1.4.13), + libjs-jquery, + libjs-jquery-flot, + libgcrypt20-dev, + libva-dev, + fonts-ipafont-gothic, + fonts-ipafont-mincho, +Standards-Version: 4.2.1 + +Package: ungoogled-chromium +Architecture: i386 amd64 arm64 armhf +Built-Using: ${Built-Using} +Depends: + ${misc:Depends}, + ${shlibs:Depends}, + ungoogled-chromium-common (= ${binary:Version}), +Recommends: + ungoogled-chromium-sandbox, +Suggests: + ungoogled-chromium-l10n, + ungoogled-chromium-shell, + ungoogled-chromium-driver, +Provides: + www-browser, + gnome-www-browser, +Breaks: + chromium-lwn4chrome (<= 1.0-2), + chromium-tt-rss-notifier (<= 0.5.2-2), + chromium, + chromium-browser, +Conflicts: + libnettle4, + libsecret-1-0 (<< 0.18), + libgl1-mesa-swx11, +Replaces: + chromium, + chromium-browser, +Description: web browser + Web browser that aims to build a safer, faster, and more stable internet + browsing experience. + . + This package contains the web browser component. + +Package: ungoogled-chromium-l10n +Architecture: all +Section: localization +Depends: + ${misc:Depends}, + ungoogled-chromium (>= ${source:Version}), + ungoogled-chromium (<< ${source:Version}.1~), +Replaces: + chromium-l10n, +Breaks: + chromium-l10n, +Description: web browser - language packs + Web browser that aims to build a safer, faster, and more stable internet + browsing experience. + . + This package contains language packages for: + am, ar, bg, bn, ca, cs, da, de, el, en-GB, es-419, es, et, fi, fil, fr, gu, he, + hi, hr, hu, id, it, ja, kn, ko, lt, lv, ml, mr, nb, nl, pl, pt-BR, pt-PT, + ro, ru, sk, sl, sr, sv, sw, ta, te, th, tr, uk, vi, zh-CN, zh-TW + +Package: ungoogled-chromium-shell +Architecture: i386 amd64 arm64 armhf +Depends: + ${misc:Depends}, + ${shlibs:Depends}, + ungoogled-chromium-common (= ${binary:Version}), +Replaces: + chromium-shell, +Breaks: + chromium-shell, +Description: web browser - minimal shell + Web browser that aims to build a safer, faster, and more stable internet + browsing experience. + . + This package provides a minimal version of the chromium user interface + (the content shell). + +Package: ungoogled-chromium-driver +Architecture: i386 amd64 arm64 armhf +Depends: + ${misc:Depends}, + ${shlibs:Depends}, + ungoogled-chromium (= ${binary:Version}), +Replaces: + chromedriver, + chromium-driver, +Breaks: + chromium-driver, +Description: web browser - WebDriver support + Web browser that aims to build a safer, faster, and more stable internet + browsing experience. + . + This package provides a bridge between the browser component and the selenium + automatic webdriver. + . + See http://code.google.com/p/selenium/wiki/ChromeDriver for details. + +Package: ungoogled-chromium-common +Architecture: i386 amd64 arm64 armhf +Depends: + ${misc:Depends}, + x11-utils, + xdg-utils, +Recommends: + upower, + libu2f-udev, + libva1, + libgl1-mesa-dri, + ungoogled-chromium-sandbox, + fonts-liberation, + notification-daemon, +Breaks: + ungoogled-chromium (<< 60.0.3112.72-1), + chromium-common, +Replaces: + ungoogled-chromium (<< 60.0.3112.72-1), + chromium-common, +Description: web browser - common resources used by ungoogled-chromium packages + Web browser that aims to build a safer, faster, and more stable internet + browsing experience. + . + 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/ubuntu_cosmic/scripts/unbundle b/packaging/ubuntu_cosmic/scripts/unbundle new file mode 100755 index 00000000..4ff59760 --- /dev/null +++ b/packaging/ubuntu_cosmic/scripts/unbundle @@ -0,0 +1,58 @@ +#!/usr/bin/python3 -B + +import os +import sys +import shutil + +sys.path.append("build/linux/unbundle") + +import replace_gn_files + +def strip(path): + if os.path.exists(path): + for filename in os.listdir(path): + remove = True + for extension in ('.py','.gn','.gni','google','chromium'): + if filename.endswith(extension): + remove = False + if remove: + removal=os.path.join(path,filename) + print('removing: %s'%removal) + if os.path.isdir(removal): + shutil.rmtree(removal) + else: + os.remove(removal) + +keepers = ('openh264', 'harfbuzz-ng', 'libjpeg') + +# strip out regenerating files in each build +def remove_file(path): + if os.path.exists(path): os.remove(path) +remove_file('base/third_party/libevent/BUILD.gn') +remove_file('build/config/freetype/freetype.gni') + +for lib,rule in replace_gn_files.REPLACEMENTS.items(): + if lib not in keepers: + libdir = os.path.join('third_party',lib) + if os.path.exists(libdir): + # remove conflicting embedded third party source files + strip(libdir) + strip(os.path.dirname(rule)) + # remove the gn file that builds the embedded library + if os.path.lexists(rule): + print('removing: %s'%rule) + os.remove(rule) + # create a symlink to the unbundle gn file + symlink = "ln -s " + path = os.path.split(rule) + if not os.path.exists(path[0]): + os.mkdir(path[0]) + while path[0] != '': + path = os.path.split(path[0]) + symlink += '../' + symlink += "build/linux/unbundle/%s.gn %s"%(lib,rule) + if os.system(symlink): + raise RuntimeError("error creating symlink",symlink) + +# libjpeg_turbo is unlike all the others, so clean it manually here +strip('third_party/libjpeg_turbo') diff --git a/packaging/ubuntu_cosmic/ungoogled-config-bundle b/packaging/ubuntu_cosmic/ungoogled-config-bundle new file mode 100644 index 00000000..b601a65d --- /dev/null +++ b/packaging/ubuntu_cosmic/ungoogled-config-bundle @@ -0,0 +1 @@ +ubuntu_cosmic