summaryrefslogtreecommitdiffstats
path: root/taskcluster/docker/debian-repackage/Dockerfile
blob: f068731b58a635a8d24605617e741c303a954695 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM $DOCKER_IMAGE_PARENT
MAINTAINER Mozilla Releng <release@mozilla.com>

VOLUME /builds/worker/workspace

# At the moment the Firefox build sysroot for i386 and amd64 use jessie and arm64 uses buster.
# To generate Firefox Debian packages we bootstrap jessie and buster sysroots.
# We use these sysroots to generate shared library dependencies for
# i386 (jessie), amd64 (jessie), and arm64 (buster) packages.
# To keep the build and repackage enviroments consistent the Debian distributions used by the sysroots
# created here should match the distributions used by the sysroots created in taskcluster/scripts/misc/build-sysroot.sh
ARG TASKCLUSTER_ROOT_URL
ARG DOCKER_IMAGE_PACKAGES
RUN /usr/local/sbin/setup_packages.sh $TASKCLUSTER_ROOT_URL $DOCKER_IMAGE_PACKAGES && \
    dpkg --add-architecture arm64 && \
    apt-get update && \
    apt-get install debootstrap && set -xe && \
    for arch in i386 amd64; do \
        debootstrap \
        --arch=$arch \
        --variant=buildd \
        --include=debhelper,libasound2,libgtk-3-0,libx11-xcb1,libxtst6 \
        --keyring=/usr/share/keyrings/debian-archive-removed-keys.gpg \
        --verbose \
        jessie \
        /srv/jessie-$arch \
        https://archive.debian.org/debian || (echo "Debootstrap failed, outputting log:" && cat /srv/jessie-$arch/debootstrap/debootstrap.log && exit 1); \
    done && \
    # bootstrap a buster/amd64 root to generate an arm64 .deb package.
    debootstrap \
    --arch=amd64 \
    --variant=buildd \
    --include=debhelper,binutils-multiarch,binutils-aarch64-linux-gnu \
    --keyring=/usr/share/keyrings/debian-archive-buster-stable.gpg \
    --verbose \
    buster \
    /srv/buster-amd64 \
    http://deb.debian.org/debian || (echo "Debootstrap failed, outputting log:" && cat /srv/buster-amd64/debootstrap/debootstrap.log && exit 1) && \
    chroot /srv/buster-amd64 /bin/bash -c "\
        dpkg --add-architecture arm64 && \
        apt-get update && \
        apt-get install -y libasound2:arm64 libgtk-3-0:arm64 libx11-xcb1:arm64 libxtst6:arm64" && \
    /usr/local/sbin/clean_packages.sh $DOCKER_IMAGE_PACKAGES