add a debian specific UnpackTBZ for when we don't want to embed a browser

This commit is contained in:
idk
2020-09-09 21:02:10 -04:00
parent d799f84952
commit 8e9ef71ba7
33 changed files with 348 additions and 0 deletions

1
.dockerignore Normal file
View File

@ -0,0 +1 @@
gnuzilla

6
Dockerfile.linux Normal file
View File

@ -0,0 +1,6 @@
FROM ubuntu:18.04
RUN apt-get update && apt-get install -y git golang-go make
COPY . /src/GingerShrew
WORKDIR /src/GingerShrew
RUN make deps
CMD make

110
Makefile-windows Normal file
View File

@ -0,0 +1,110 @@
export GO111MODULE=on
GO111MODULE=on
VERSION=0.75
LAUNCH_VERSION=$(VERSION).09
GINGERSHREW_VERSION=68
GINGERSHREW_REVISION=9
GO_COMPILER_OPTS = -a -tags netgo -ldflags '-w -extldflags "-static"'
export CCACHE_DIR=$(PWD)/ccache
export CCACHE_COMPRESS=""
build: gingershrew gen
sums:
sha256sum gingershrew-68.9.0.en-US.linux-x86_64.tar.bz2
sha256sum import/gingershrew-68.9.0.en-US.linux-x86_64.tar.bz2
xxd:
xxd -c 120 gingershrew-68.9.0.en-US.linux-x86_64.tar.bz2 import/gingershrew-68.9.0.en-US.linux-x86_64.tar.bz2
ccache:
echo "$CCACHE_DIR $CCACHE_COMPRESS"
ccache --max-size 25G
deps:
sudo apt-get install gcc g++ make patch perl python unzip zip autoconf automake build-essential checkinstall debhelper devscripts dpkg-dev fakeroot gdb-minimal libc6 libc6-dev libtool intltool pbuilder pkg-config ccache cdbs locales debhelper autotools-dev autoconf2.13 zip libx11-dev libx11-xcb-dev libxt-dev libxext-dev libgtk2.0-dev libgtk-3-dev libglib2.0-dev libpango1.0-dev libfontconfig1-dev libfreetype6-dev libstartup-notification0-dev libasound2-dev libcurl4-openssl-dev libdbus-glib-1-dev lsb-release libiw-dev mesa-common-dev libnotify-dev libxrender-dev libpulse-dev nasm yasm unzip dbus-x11 xvfb python python3 clang llvm cargo rustc nodejs
gnuzilla:
git clone --depth=1 "https://git.savannah.gnu.org/git/gnuzilla.git" -b $(GINGERSHREW_VERSION); true
icecat-setup: gnuzilla gnuzilla-version gnuzilla/output
gnuzilla-version:
cd gnuzilla && git checkout $(GINGERSHREW_VERSION)
gnuzilla/output:
make gnuzilla gnuzilla-version rhz
cd gnuzilla && ./makeicecat
gingershrew: gnuzilla/output gingershrew-linux-workdir gingershrew-linux-configure gingershrew-linux-build gingershrew-linux-package
gingershrew-windows: gnuzilla/output gingershrew-windows-workdir #gingershrew-windows-configure gingershrew-windows-build #gingershrew-windows-pkg
copy-linux:
rm -rf gingershrew
find gnuzilla -name gingershrew-$(GINGERSHREW_VERSION).$(GINGERSHREW_REVISION).0.en-US.linux-x86_64.tar.bz2 -exec cp {} ./ \;
#find . -name gingershrew-$(GINGERSHREW_VERSION).$(GINGERSHREW_REVISION).0.en-US.linux-x86_64.tar.bz2 -exec tar xjf {} \;
#find . -name gingershrew-$(GINGERSHREW_VERSION).$(GINGERSHREW_REVISION).0.en-US.linux-x86_64.tar.bz2 -exec cp {} ./gingershrew/ \;
gingershrew-linux-workdir:
rm -rf gnuzilla/output/src
cp -rv gnuzilla/output/gingershrew-$(GINGERSHREW_VERSION).$(GINGERSHREW_REVISION).0 gnuzilla/output/src
cp -v gnuzilla.browser.components.migration.moz.build \
gnuzilla/output/src/browser/components/migration/moz.build
# cp -v gnuzilla.devtools.client.netmonitor.src.connector.moz.build \
# gnuzilla/output/src/devtools/client/netmonitor/src/connector/moz.build
gingershrew-linux-configure:
mkdir -p gnuzilla/output/src/obj && cd gnuzilla/output/src/obj && ../configure
gingershrew-linux-build:
mkdir -p gnuzilla/output/src/obj && cd gnuzilla/output/src/obj && ../mach build
gingershrew-linux-package:
mkdir -p gnuzilla/output/src/obj && cd gnuzilla/output/src/obj && ../mach package
gingershrew-linux-run:
mkdir -p gnuzilla/output/src/obj && cd gnuzilla/output/src/obj && ../mach run
rhz:
find ./gnuzilla/data -type f -exec sed -i 's|icecat|gingershrew|g' {} \;
find ./gnuzilla/data -type f -exec sed -i 's|IceCat|GingerShrew|g' {} \;
find ./gnuzilla/data -type f -exec sed -i 's|IceCat|GingerShrew|g' {} \;
find ./gnuzilla/data -type f -exec sed -i 's|ICECAT|GINGERSHREW|g' {} \;
find ./gnuzilla/tools -type f -exec sed -i 's|icecat|gingershrew|g' {} \;
find ./gnuzilla/tools -type f -exec sed -i 's|IceCat|GingerShrew|g' {} \;
find ./gnuzilla/tools -type f -exec sed -i 's|IceCat|GingerShrew|g' {} \;
find ./gnuzilla/tools -type f -exec sed -i 's|ICECAT|GINGERSHREW|g' {} \;
sed -i 's|ICECAT|GINGERSHREW|g' ./gnuzilla/makeicecat
sed -i 's|IceCat|GingerShrew|g' ./gnuzilla/makeicecat
sed -i 's|Icecat|GingerShrew|g' ./gnuzilla/makeicecat
sed -i 's|icecat|gingershrew|g' ./gnuzilla/makeicecat
mv -f gnuzilla/data/branding/icecat gnuzilla/data/branding/gingershrew || echo "Already moved"
mv -f gnuzilla/data/branding/icecatmobile gnuzilla/data/branding/gingershrewmobile || echo "Already moved"
./rewrite
find ./gnuzilla/ -type f -exec sed -i 's|GNU GingerShrew|Free GingerShrew|g' {} \;
sed -i 's|GNU GingerShrew|Free GingerShrew|g' gnuzilla/makeicecat
find ./gnuzilla/ -type f -exec sed -i 's|From GNU|From A Tiny Rodent|g' {} \;
sed -i 's|From GNU|From A Tiny Rodent|g' gnuzilla/makeicecat
find ./gnuzilla/ -type f -exec sed -i 's|GNU Foundation|No Foundation|g' {} \;
sed -i 's|GNU Foundation|No Foundation|g' gnuzilla/makeicecat
find ./gnuzilla/ -type f -exec sed -i 's|No Corporation|No Corporation|g' {} \;
sed -i 's|No Corporation|No Corporation|g' gnuzilla/makeicecat
sed -i 's|\\>GNU\\|\\>No\\|g' gnuzilla/makeicecat
clean:
rm -rf gnuzilla \
gingershrew*.tar.bz2*
gen: copy-linux
go run --tags generate gen.go
test:
cd import && GO111MODULE=off go test
fmt:
find import -name '*.go' -exec gofmt -w -s {} \;
gofmt -w -s *.go

11
cross-windows.Dockerfile Normal file
View File

@ -0,0 +1,11 @@
FROM debian:stable-backports
RUN sed 's|deb |deb-src |g' /etc/apt/sources.list | tee /etc/apt/sources.list.d/sources.list
RUN apt-get update && apt-get dist-upgrade && apt-get build-dep firefox-esr -y && apt-get install -y wget curl make git
RUN adduser --disabled-password --gecos 'user,,,,' user
COPY . /home/user/gnuzilla/
WORKDIR /home/user/gnuzilla/
RUN make deps
# wget -O /builds/worker/workspace/build/src/nsis.tar.gz https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/gecko.cache.level-3.toolchains.v3.linux64-mingw32-nsis.latest/artifacts/public/build/nsis.tar.xz
# cd /builds/worker/workspace/build/src/ &&
# tar xvzf nsis.tar.gz

69
dotmozconfig Normal file
View File

@ -0,0 +1,69 @@
. "$topsrcdir/build/mozconfig.win-common"
# MinGW does not have (or need) makecab
unset MAKECAB
unset DUMP_SYMS
# Sets:
# build/mozconfig.common
# AUTOCLOBBER=1
# --enable-crashreporter
# --enable-release
# LLVM_CONFIG
# MOZ_ADDON_SIGNING
# MOZ_REQUIRE_SIGNING
# --enable-js-shell
# build/mozconfig.automation
# MOZ_AUTOMATION_ flags
# build/mozconfig.rust
# TOOLTOOL_DIR
# RUSTC
# CARGO
. "$topsrcdir/browser/config/mozconfigs/common"
export MOZ_PACKAGE_JSSHELL=1
# MinGW Stuff
ac_add_options --target=x86_64-w64-mingw32
ac_add_options --with-toolchain-prefix=x86_64-w64-mingw32-
ac_add_options --disable-warnings-as-errors
MOZ_COPY_PDBS=1
mk_add_options "export WIDL_TIME_OVERRIDE=0"
# This replicates Tor's configuration
ac_add_options --enable-proxy-bypass-protection
# These aren't supported on mingw at this time
ac_add_options --disable-webrtc # Bug 1393901
ac_add_options --disable-geckodriver # Bug 1489320
ac_add_options --disable-update-agent # Bug 1561797
# Find our toolchain
HOST_CC="$MOZ_FETCHES_DIR/clang/bin/clang"
HOST_CXX="$MOZ_FETCHES_DIR/clang/bin/clang++"
CC="$MOZ_FETCHES_DIR/clang/bin/x86_64-w64-mingw32-clang"
CXX="$MOZ_FETCHES_DIR/clang/bin/x86_64-w64-mingw32-clang++"
ac_add_options --with-clang-path="$CC"
ac_add_options --with-libclang-path="$MOZ_FETCHES_DIR/clang/lib"
CXXFLAGS="-fms-extensions"
AR=llvm-ar
RANLIB=llvm-ranlib
# For Stylo
BINDGEN_CFLAGS="-I$MOZ_FETCHES_DIR/clang/x86_64-w64-mingw32/include/c++/v1 -I$MOZ_FETCHES_DIR/clang/x86_64-w64-mingw32/include"
# We want to make sure we use binutils and other binaries in the tooltool
# package.
mk_add_options "export PATH=$MOZ_FETCHES_DIR/clang/bin:$MOZ_FETCHES_DIR/mingw32/bin:$MOZ_FETCHES_DIR/wine/bin:$MOZ_FETCHES_DIR/upx/bin:$MOZ_FETCHES_DIR/fxc2/bin:$MOZ_FETCHES_DIR/binutils/bin:$PATH"
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$MOZ_FETCHES_DIR/mingw32/lib64:$MOZ_FETCHES_DIR/clang/lib
mk_add_options "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
# Do not include the visual studio related mozconfigs of course
ac_add_options --with-branding=browser/branding/nightly
. "$topsrcdir/build/mozconfig.common.override"

View File

@ -0,0 +1,7 @@
// +build debian
package gingershrew
func UnpackTBZ(destinationDirectory string) error {
return nil
}

BIN
import/libs.tar.xz Normal file

Binary file not shown.

BIN
libc6-dev_2.31-3_amd64.deb Normal file

Binary file not shown.

BIN
libc6_2.31-3_amd64.deb Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
libffi7_3.3-4_amd64.deb Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

33
libs Normal file
View File

@ -0,0 +1,33 @@
Package: firefox
Version: 80.0-1
Installed-Size: 200991
Maintainer: Maintainers of Mozilla-related packages <team+pkg-mozilla@tracker.debian.org>
Architecture: amd64
Provides: gnome-www-browser, www-browser
Depends: libatk1.0-0 (>= 1.12.4), libc6 (>= 2.29), libcairo-gobject2 (>= 1.10.0), libcairo2 (>= 1.10.0), libdbus-1-3 (>= 1.9.14), libdbus-glib-1-2 (>= 0.78), libevent-2.1-7 (>= 2.1.8-stable), libffi7 (>= 3.3~20180313), libfontconfig1 (>= 2.12.6), libfreetype6 (>= 2.10.1), libgcc-s1 (>= 4.0), libgdk-pixbuf2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.37.3), libgtk-3-0 (>= 3.0.0), libnspr4 (>= 2:4.26~), libnss3 (>= 2:3.55), libpango-1.0-0 (>= 1.14.0), libstdc++6 (>= 9), libvpx6 (>= 1.8.0), libx11-6, libx11-xcb1 (>= 2:1.6.10), libxcb-shm0, libxcb1, libxcomposite1 (>= 1:0.4.5), libxdamage1 (>= 1:1.1), libxext6, libxfixes3, libxrender1, zlib1g (>= 1:1.2.11.dfsg), fontconfig, procps, debianutils (>= 1.16)
Recommends: libavcodec58 | libavcodec-extra58 | libavcodec57 | libavcodec-extra57 | libavcodec56 | libavcodec-extra56 | libavcodec55 | libavcodec-extra55 | libavcodec54 | libavcodec-extra54 | libavcodec53 | libavcodec-extra53
Suggests: fonts-stix | otf-stix, fonts-lmodern, libgssapi-krb5-2 | libkrb53, libcanberra0, libgtk2.0-0, pulseaudio
Breaks: xul-ext-torbutton
Description-en: Mozilla Firefox web browser
Firefox is a powerful, extensible web browser with support for modern
web application technologies.
Description-md5: db906cb3e7e2e51d91545c75d7ce940a
Tag: devel::interpreter, devel::lang:ecmascript, implemented-in::c++,
interface::graphical, interface::x11, network::client, protocol::ftp,
protocol::http, protocol::ip, protocol::ipv6, protocol::ssl,
role::program, scope::application, suite::mozilla, uitoolkit::gtk,
use::browsing, use::downloading, web::browser, works-with-format::TODO,
works-with-format::gif, works-with-format::html,
works-with-format::jpg, works-with-format::pdf,
works-with-format::plaintext, works-with-format::png,
works-with-format::svg, works-with-format::xml,
works-with-format::xml:rss, works-with-format::xml:xslt,
works-with::image, works-with::image:raster, works-with::text,
x11::application
Section: web
Priority: optional
Filename: pool/main/f/firefox/firefox_80.0-1_amd64.deb
Size: 56079012
MD5sum: dc96f007e093f9c2bffa158e08156210
SHA256: 275cabdce5b32a32206a1f8ce84c55c84bfa68e48d7271d403d7af1a88ed3e08

BIN
libs.tar.gz Normal file

Binary file not shown.

BIN
libs.tar.xz Normal file

Binary file not shown.

71
mozconfig Normal file
View File

@ -0,0 +1,71 @@
# Sets:
# MOZ_AUTOMATION flags
# SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE - shouldn't be used?
# TOOLTOOL_DIR
# MAKECAB - shouldn't be used?
. "$topsrcdir/build/mozconfig.win-common"
# MinGW does not have (or need) makecab
unset MAKECAB
# Sets:
# build/mozconfig.common
# AUTOCLOBBER=1
# --enable-crashreporter
# --enable-release
# LLVM_CONFIG
# MOZ_ADDON_SIGNING
# MOZ_REQUIRE_SIGNING
# --enable-js-shell
# build/mozconfig.automation
# MOZ_AUTOMATION_ flags
# build/mozconfig.rust
# TOOLTOOL_DIR
# RUSTC
# CARGO
. "$topsrcdir/browser/config/mozconfigs/common"
export MOZ_PACKAGE_JSSHELL=1
# MinGW Stuff
ac_add_options --target=i686-w64-mingw32
ac_add_options --with-toolchain-prefix=i686-w64-mingw32-
ac_add_options --disable-warnings-as-errors
MOZ_COPY_PDBS=1
# This replicates Tor's configuration
ac_add_options --enable-proxy-bypass-protection
# These aren't supported on mingw at this time
ac_add_options --disable-maintenance-service
ac_add_options --disable-webrtc # Bug 1393901
ac_add_options --disable-geckodriver # Bug 1489320
# Find our toolchain
HOST_CC="$TOOLTOOL_DIR/clang/bin/clang"
HOST_CXX="$TOOLTOOL_DIR/clang/bin/clang++"
CC="$TOOLTOOL_DIR/clang/bin/i686-w64-mingw32-clang"
CXX="$TOOLTOOL_DIR/clang/bin/i686-w64-mingw32-clang++"
ac_add_options --with-clang-path="$CC"
ac_add_options --with-libclang-path="$TOOLTOOL_DIR/clang/lib"
CXXFLAGS="-fms-extensions"
AR=llvm-ar
RANLIB=llvm-ranlib
# For Stylo
BINDGEN_CFLAGS="-I$TOOLTOOL_DIR/clang/i686-w64-mingw32/include/c++/v1 -I$TOOLTOOL_DIR/clang/i686-w64-mingw32/include"
# We want to make sure we use binutils and other binaries in the tooltool
# package.
mk_add_options "export PATH=$TOOLTOOL_DIR/clang/bin:$TOOLTOOL_DIR/mingw32/bin:$TOOLTOOL_DIR/wine/bin:$TOOLTOOL_DIR/upx/bin:$TOOLTOOL_DIR/fxc2/bin:$PATH"
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$TOOLTOOL_DIR/mingw32/lib64:$TOOLTOOL_DIR/clang/lib
mk_add_options "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
# Do not include the visual studio related mozconfigs of course
ac_add_options --with-branding=browser/branding/nightly
. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"

40
tmp.sh Normal file
View File

@ -0,0 +1,40 @@
dpkg -x libc6_2.31-3_amd64.deb ./lib
dpkg -x libc6-dev_2.31-3_amd64.deb ./lib
dpkg -x libcairo2-dev_1.16.0-4_amd64.deb ./lib
dpkg -x libcairo-gobject2_1.16.0-4_amd64.deb ./lib
dpkg -x libffi7_3.3-4_amd64.deb ./lib
dpkg -x libfontconfig1_2.13.1-4.2_amd64.deb ./lib
dpkg -x libfontconfig1-dev_2.13.1-4.2_amd64.deb ./lib
dpkg -x libfreetype6_2.10.2+dfsg-3_amd64.deb ./lib
dpkg -x libfreetype6-dev_2.10.2+dfsg-3_amd64.deb ./lib
dpkg -x libglib2.0-0_2.64.4-1_amd64.deb ./lib
dpkg -x libglib2.0-dev_2.64.4-1_amd64.deb ./lib
dpkg -x libgtk-3-0_3.24.22-1_amd64.deb ./lib
dpkg -x libgtk-3-dev_3.24.22-1_amd64.deb ./lib
dpkg -x libnspr4_2%3a4.27-1_amd64.deb ./lib
dpkg -x libnspr4-dev_2%3a4.27-1_amd64.deb ./lib
dpkg -x libnss3_2%3a3.55-1_amd64.deb ./lib
dpkg -x libnss3-dev_2%3a3.55-1_amd64.deb ./lib
dpkg -x libpango-1.0-0_1.46.1-1_amd64.deb ./lib
dpkg -x libpango1.0-dev_1.46.1-1_amd64.deb ./lib
dpkg -x libc6_2.31-3_amd64.deb ./lib
dpkg -x libc6-dev_2.31-3_amd64.deb ./lib
dpkg -x libcairo2-dev_1.16.0-4_amd64.deb ./lib
dpkg -x libcairo-gobject2_1.16.0-4_amd64.deb ./lib
dpkg -x libffi7_3.3-4_amd64.deb ./lib
dpkg -x libfontconfig1_2.13.1-4.2_amd64.deb ./lib
dpkg -x libfontconfig1-dev_2.13.1-4.2_amd64.deb ./lib
dpkg -x libfreetype6_2.10.2+dfsg-3_amd64.deb ./lib
dpkg -x libfreetype6-dev_2.10.2+dfsg-3_amd64.deb ./lib
dpkg -x libglib2.0-0_2.64.4-1_amd64.deb ./lib
dpkg -x libglib2.0-dev_2.64.4-1_amd64.deb ./lib
dpkg -x libgtk-3-0_3.24.22-1_amd64.deb ./lib
dpkg -x libgtk-3-dev_3.24.22-1_amd64.deb ./lib
dpkg -x libnspr4_2%3a4.27-1_amd64.deb ./lib
dpkg -x libnspr4-dev_2%3a4.27-1_amd64.deb ./lib
dpkg -x libnss3_2%3a3.55-1_amd64.deb ./lib
dpkg -x libnss3-dev_2%3a3.55-1_amd64.deb ./lib
dpkg -x libpango-1.0-0_1.46.1-1_amd64.deb ./lib
dpkg -x libpango1.0-dev_1.46.1-1_amd64.deb ./lib
dpkg -x zlib1g_1%3a1.2.11.dfsg-2_amd64.deb ./lib
dpkg -x zlib1g-dev_1%3a1.2.11.dfsg-2_amd64.deb ./lib

Binary file not shown.

Binary file not shown.