mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 04:41:11 +00:00
Bug 1926289 - add ubuntu2404-test docker image. r=jmaher
Based on the ubuntu1804 test image, with the following changes: - update packages list - avoid failing gnome session start due to missing gsd-power, which requires logind - remove /run/systemd/seats (created at systemd package install), to avoid gnome-shell thinking it needs to talk to logind - stop installing node via tooltool, it should be grabbed from the toolchain task when/if necessary - stop installing psutil via pip, we can use the ubuntu package instead - remove setcap of gnome-keyring-daemon binary; it's no longer installed with the IPC_LOCK capability in newer distro versions - remove /etc/xdg/autostart/gnome-software-service.desktop (unused) Differential Revision: https://phabricator.services.mozilla.com/D226477
This commit is contained in:
parent
4bced98a4c
commit
ac8b373e96
157
taskcluster/docker/recipes/ubuntu2404-test-system-setup-base.sh
Normal file
157
taskcluster/docker/recipes/ubuntu2404-test-system-setup-base.sh
Normal file
@ -0,0 +1,157 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ve
|
||||
|
||||
test "$(whoami)" == 'root'
|
||||
|
||||
# We do want to install recommended packages.
|
||||
sed -i /APT::Install-Recommends/d /etc/apt/apt.conf.d/99taskcluster
|
||||
|
||||
# To speed up docker image build times as well as number of network/disk I/O
|
||||
# build a list of packages to be installed and call it in one go.
|
||||
apt_packages=()
|
||||
|
||||
apt_packages+=('autoconf2.13')
|
||||
apt_packages+=('bluez-cups')
|
||||
apt_packages+=('build-essential')
|
||||
apt_packages+=('ca-certificates')
|
||||
apt_packages+=('ccache')
|
||||
apt_packages+=('curl')
|
||||
apt_packages+=('dbus-x11')
|
||||
apt_packages+=('fontconfig')
|
||||
apt_packages+=('fonts-dejavu')
|
||||
apt_packages+=('fonts-kacst')
|
||||
apt_packages+=('fonts-kacst-one')
|
||||
apt_packages+=('fonts-liberation')
|
||||
apt_packages+=('fonts-stix')
|
||||
apt_packages+=('fonts-unfonts-core')
|
||||
apt_packages+=('fonts-unfonts-extra')
|
||||
apt_packages+=('fonts-vlgothic')
|
||||
apt_packages+=('g++-multilib')
|
||||
apt_packages+=('gcc-multilib')
|
||||
apt_packages+=('gir1.2-gnomebluetooth-3.0')
|
||||
apt_packages+=('gnome-icon-theme')
|
||||
apt_packages+=('gnome-keyring')
|
||||
apt_packages+=('gstreamer1.0-gtk3')
|
||||
apt_packages+=('gstreamer1.0-plugins-base')
|
||||
apt_packages+=('gstreamer1.0-plugins-good')
|
||||
apt_packages+=('gstreamer1.0-tools')
|
||||
apt_packages+=('gstreamer1.0-pulseaudio')
|
||||
apt_packages+=('language-pack-en-base')
|
||||
apt_packages+=('libc6-dbg')
|
||||
apt_packages+=('libasound2-dev')
|
||||
apt_packages+=('libavcodec-extra60')
|
||||
apt_packages+=('libcanberra-gtk3-module')
|
||||
apt_packages+=('libcanberra-pulse')
|
||||
apt_packages+=('libcurl4-openssl-dev')
|
||||
apt_packages+=('libdbus-1-dev')
|
||||
apt_packages+=('libfreetype6')
|
||||
apt_packages+=('libgstreamer-plugins-base1.0-dev')
|
||||
apt_packages+=('libgstreamer1.0-dev')
|
||||
apt_packages+=('libgtk-3-0t64')
|
||||
apt_packages+=('libiw-dev')
|
||||
apt_packages+=('libx11-xcb1')
|
||||
apt_packages+=('libxcb1')
|
||||
apt_packages+=('libxcb-render0')
|
||||
apt_packages+=('libxcb-shm0')
|
||||
apt_packages+=('libxcb-glx0')
|
||||
apt_packages+=('libxcb-shape0')
|
||||
apt_packages+=('libnotify-dev')
|
||||
apt_packages+=('libpulse0')
|
||||
apt_packages+=('libpulse-dev')
|
||||
apt_packages+=('libxt-dev')
|
||||
apt_packages+=('libxxf86vm1')
|
||||
apt_packages+=('llvm')
|
||||
apt_packages+=('llvm-dev')
|
||||
apt_packages+=('llvm-runtime')
|
||||
apt_packages+=('mesa-common-dev')
|
||||
apt_packages+=('net-tools')
|
||||
apt_packages+=('pulseaudio-utils')
|
||||
apt_packages+=('python3-pip')
|
||||
apt_packages+=('python3-pyatspi')
|
||||
apt_packages+=('qemu-system-x86')
|
||||
apt_packages+=('rlwrap')
|
||||
apt_packages+=('screen')
|
||||
apt_packages+=('software-properties-common')
|
||||
apt_packages+=('sudo')
|
||||
apt_packages+=('ubuntu-desktop')
|
||||
apt_packages+=('unzip')
|
||||
apt_packages+=('uuid')
|
||||
apt_packages+=('wget')
|
||||
apt_packages+=('xvfb')
|
||||
apt_packages+=('xwit')
|
||||
apt_packages+=('yasm')
|
||||
apt_packages+=('zip')
|
||||
|
||||
# xvinfo for test-linux.sh to monitor Xvfb startup
|
||||
apt_packages+=('x11-utils')
|
||||
|
||||
# Bug 1232407 - this allows the user to start vnc
|
||||
apt_packages+=('x11vnc')
|
||||
|
||||
# Bug 1176031 - need `xset` to disable screensavers
|
||||
apt_packages+=('x11-xserver-utils')
|
||||
|
||||
# Build a list of packages to install from the multiverse repo.
|
||||
apt_packages+=('ubuntu-restricted-extras')
|
||||
|
||||
# APT update takes very long on Ubuntu. Run it at the last possible minute.
|
||||
apt-get update
|
||||
|
||||
# Also force the cleanup after installation of packages to reduce image size.
|
||||
apt-get install --allow-downgrades "${apt_packages[@]}"
|
||||
|
||||
# gsd-power can't start without logind, but it's marked as required in the
|
||||
# gnome-session config; remove it so the session doesn't start with the fail
|
||||
# whale
|
||||
sed -i 's/org.gnome.SettingsDaemon.Power;//' /usr/share/gnome-session/sessions/ubuntu.session
|
||||
|
||||
# Enable i386 packages
|
||||
dpkg --add-architecture i386
|
||||
apt-get update
|
||||
|
||||
# Make sure we have libraries for 32-bit tests
|
||||
apt_packages=()
|
||||
apt_packages+=('libavcodec-extra60:i386')
|
||||
apt_packages+=('libpulse0:i386')
|
||||
apt_packages+=('libxt6:i386')
|
||||
apt_packages+=('libxtst6:i386')
|
||||
apt_packages+=('libsecret-1-0:i386')
|
||||
apt_packages+=('libgtk-3-0:i386')
|
||||
apt_packages+=('libx11-xcb1:i386')
|
||||
apt_packages+=('libxcb1:i386')
|
||||
apt_packages+=('libasound2:i386')
|
||||
|
||||
apt-get install --allow-downgrades "${apt_packages[@]}"
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Build a list of packages to purge from the image.
|
||||
apt_packages=()
|
||||
apt_packages+=('gnome-calendar')
|
||||
apt_packages+=('gnome-initial-setup')
|
||||
apt_packages+=('libx11-doc')
|
||||
apt_packages+=('manpages-dev')
|
||||
apt_packages+=('orca')
|
||||
apt_packages+=('rhythmbox')
|
||||
apt_packages+=('thunderbird')
|
||||
apt_packages+=('ubuntu-release-upgrader*')
|
||||
apt_packages+=('update-manager-core')
|
||||
apt_packages+=('update-manager')
|
||||
apt_packages+=('yelp')
|
||||
|
||||
# Purge unnecessary packages
|
||||
apt-get purge "${apt_packages[@]}"
|
||||
|
||||
# We don't need no docs!
|
||||
rm -rf /usr/share/help /usr/share/doc /usr/share/man
|
||||
|
||||
# Remove all locale files other than en_US.UTF-8
|
||||
rm -rf /usr/share/locale/ /usr/share/locale-langpack/ /usr/share/locales/
|
||||
|
||||
# Remove systemd tmpfiles that confuse gnome-shell into thinking it should talk to logind
|
||||
rm -rf /run/systemd/seats
|
||||
|
||||
# Further cleanup
|
||||
apt-get autoremove --purge
|
||||
|
||||
rm -f "$0"
|
10
taskcluster/docker/recipes/ubuntu2404-test-system-setup.sh
Normal file
10
taskcluster/docker/recipes/ubuntu2404-test-system-setup.sh
Normal file
@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ve
|
||||
|
||||
test "$(whoami)" == 'root'
|
||||
|
||||
# Cleanup
|
||||
cd /
|
||||
rm -rf /setup ~/.ccache ~/.cache ~/.npm
|
||||
rm -f "$0"
|
18
taskcluster/docker/ubuntu2404-test-base/Dockerfile
Normal file
18
taskcluster/docker/ubuntu2404-test-base/Dockerfile
Normal file
@ -0,0 +1,18 @@
|
||||
# This docker image only sets up packages on top of the original Ubuntu image.
|
||||
# Everything else is setup is a child docker image derived from this one, such
|
||||
# that changes to our scripts don't trigger the rebuild of this base image,
|
||||
# possibly leading to breakage. (See bug 1503756 and bug 1678451 for examples
|
||||
# of such recent breakages)
|
||||
FROM $DOCKER_IMAGE_PARENT
|
||||
|
||||
ARG TASKCLUSTER_ROOT_URL
|
||||
ARG DOCKER_IMAGE_PACKAGES
|
||||
RUN /usr/local/sbin/setup_packages.sh $TASKCLUSTER_ROOT_URL $DOCKER_IMAGE_PACKAGES
|
||||
|
||||
# %include taskcluster/docker/recipes/ubuntu2404-test-system-setup-base.sh
|
||||
ADD topsrcdir/taskcluster/docker/recipes/ubuntu2404-test-system-setup-base.sh /setup/system-setup.sh
|
||||
RUN bash /setup/system-setup.sh
|
||||
RUN /usr/local/sbin/clean_packages.sh $DOCKER_IMAGE_PACKAGES
|
||||
|
||||
# Set a default command useful for debugging
|
||||
CMD ["/bin/bash", "--login"]
|
69
taskcluster/docker/ubuntu2404-test/Dockerfile
Normal file
69
taskcluster/docker/ubuntu2404-test/Dockerfile
Normal file
@ -0,0 +1,69 @@
|
||||
FROM $DOCKER_IMAGE_PARENT
|
||||
|
||||
# Create necessary directories
|
||||
RUN mkdir -p /artifacts
|
||||
|
||||
# We need to declare all potentially cache volumes as caches. Also,
|
||||
# making high I/O paths volumes increase I/O throughput because of
|
||||
# AUFS slowness.
|
||||
VOLUME /builds/worker/.cache
|
||||
VOLUME /builds/worker/checkouts
|
||||
VOLUME /builds/worker/tooltool-cache
|
||||
VOLUME /builds/worker/workspace
|
||||
|
||||
# In test.sh we accept START_VNC to start a vnc daemon.
|
||||
# Exposing this port allows it to work.
|
||||
EXPOSE 5900
|
||||
|
||||
# Add wrapper scripts for xvfb allowing tasks to easily retry starting up xvfb
|
||||
# %include taskcluster/docker/recipes/xvfb.sh
|
||||
ADD topsrcdir/taskcluster/docker/recipes/xvfb.sh /builds/worker/scripts/xvfb.sh
|
||||
|
||||
# %include python/mozbuild/mozbuild/action/tooltool.py
|
||||
ADD topsrcdir/python/mozbuild/mozbuild/action/tooltool.py /builds/worker/scripts/tooltool.py
|
||||
|
||||
# %include taskcluster/docker/recipes/ubuntu2404-test-system-setup.sh
|
||||
ADD topsrcdir/taskcluster/docker/recipes/ubuntu2404-test-system-setup.sh /setup/system-setup.sh
|
||||
RUN bash /setup/system-setup.sh
|
||||
|
||||
# %include taskcluster/scripts/tester/test-linux.sh
|
||||
ADD topsrcdir/taskcluster/scripts/tester/test-linux.sh /builds/worker/bin/test-linux.sh
|
||||
|
||||
# Set variable normally configured at login, by the shells parent process, these
|
||||
# are taken from GNU su manual
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV LC_ALL en_US.UTF-8
|
||||
ENV PATH $PATH:/builds/worker/bin
|
||||
|
||||
# This helps not forgetting setting DISPLAY=:0 when running
|
||||
# tests outside of test.sh
|
||||
ENV DISPLAY :0
|
||||
|
||||
# Add utilities and configuration
|
||||
COPY dot-files/config /builds/worker/.config
|
||||
|
||||
# Disable apport (app crash reporter) to avoid stealing focus from test runs
|
||||
ADD apport /etc/default/apport
|
||||
|
||||
# Disable font antialiasing for now to match releng's setup
|
||||
ADD fonts.conf /builds/worker/.fonts.conf
|
||||
|
||||
# allow the worker user to access video devices
|
||||
RUN usermod -a -G video worker
|
||||
|
||||
# Set execution and ownership privileges
|
||||
RUN chmod +x bin/*; chown -R worker:worker /builds/worker
|
||||
|
||||
# Set up first-run experience for interactive mode
|
||||
ADD motd /etc/taskcluster-motd
|
||||
ADD taskcluster-interactive-shell /bin/taskcluster-interactive-shell
|
||||
RUN chmod +x /bin/taskcluster-interactive-shell
|
||||
|
||||
# Ubuntu 24.04 (or any other GNOME3 based systems) needs dbus to have various
|
||||
# test function as expected. Use entrypoint to initialize dbus as root.
|
||||
COPY dbus.sh /usr/local/bin/dbus.sh
|
||||
RUN chmod +x /usr/local/bin/dbus.sh
|
||||
ENTRYPOINT ["/usr/local/bin/dbus.sh"]
|
||||
|
||||
# Set a default command useful for debugging
|
||||
CMD ["/bin/bash", "--login"]
|
1
taskcluster/docker/ubuntu2404-test/apport
Normal file
1
taskcluster/docker/ubuntu2404-test/apport
Normal file
@ -0,0 +1 @@
|
||||
enabled=0
|
7
taskcluster/docker/ubuntu2404-test/dbus.sh
Normal file
7
taskcluster/docker/ubuntu2404-test/dbus.sh
Normal file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
/etc/init.d/dbus start 2>&1
|
||||
|
||||
exec "${@}"
|
@ -0,0 +1,15 @@
|
||||
# This file is written by xdg-user-dirs-update
|
||||
# If you want to change or add directories, just edit the line you're
|
||||
# interested in. All local changes will be retained on the next run
|
||||
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
|
||||
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
|
||||
# absolute path. No other format is supported.
|
||||
|
||||
XDG_DESKTOP_DIR="$HOME/Desktop"
|
||||
XDG_DOWNLOAD_DIR="$HOME/Downloads"
|
||||
XDG_TEMPLATES_DIR="$HOME/Templates"
|
||||
XDG_PUBLICSHARE_DIR="$HOME/Public"
|
||||
XDG_DOCUMENTS_DIR="$HOME/Documents"
|
||||
XDG_MUSIC_DIR="$HOME/Music"
|
||||
XDG_PICTURES_DIR="$HOME/Pictures"
|
||||
XDG_VIDEOS_DIR="$HOME/Videos"
|
@ -0,0 +1 @@
|
||||
en_US
|
5
taskcluster/docker/ubuntu2404-test/fonts.conf
Normal file
5
taskcluster/docker/ubuntu2404-test/fonts.conf
Normal file
@ -0,0 +1,5 @@
|
||||
<match target="font">
|
||||
<edit name="antialias" mode="assign">
|
||||
<bool>false</bool>
|
||||
</edit>
|
||||
</match>
|
6
taskcluster/docker/ubuntu2404-test/motd
Normal file
6
taskcluster/docker/ubuntu2404-test/motd
Normal file
@ -0,0 +1,6 @@
|
||||
Welcome to your taskcluster interactive shell! The regularly scheduled task
|
||||
has been paused to give you a chance to set up your debugging environment.
|
||||
|
||||
For your convenience, the exact mozharness command needed for this task can
|
||||
be invoked using the 'run-mozharness' command.
|
||||
|
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
download() {
|
||||
name=`basename $1`
|
||||
url=${GECKO_HEAD_REPOSITORY}/raw-file/${GECKO_HEAD_REV}/$1
|
||||
if ! curl --fail --silent -o ./$name --retry 10 $url; then
|
||||
fail "failed downloading $1 from ${GECKO_HEAD_REPOSITORY}"
|
||||
fi
|
||||
}
|
||||
|
||||
cd $HOME/bin;
|
||||
download taskcluster/scripts/tester/run-wizard;
|
||||
chmod +x run-wizard;
|
||||
./run-wizard;
|
||||
|
||||
SPAWN="$SHELL";
|
||||
if [ "$SHELL" = "bash" ]; then
|
||||
SPAWN="bash -li";
|
||||
fi;
|
||||
|
||||
cd $HOME;
|
||||
exec $SPAWN;
|
@ -81,7 +81,7 @@ tasks:
|
||||
symbol: I(ub22-build-python-wheels)
|
||||
parent: ubuntu2204-base
|
||||
definition: build-python-wheels
|
||||
# Neither the ubuntu1804-*raw nor the ubuntu1804-*packages images can have
|
||||
# Neither the ubuntu2004-*raw nor the ubuntu2004-*packages images can have
|
||||
# packages dependencies.
|
||||
ubuntu2004-raw:
|
||||
symbol: I(ub20-raw)
|
||||
@ -150,6 +150,12 @@ tasks:
|
||||
packages:
|
||||
- ub24-mercurial
|
||||
- ub24-python-zstandard
|
||||
ubuntu2404-test-base:
|
||||
symbol: I(ub24-test-base)
|
||||
parent: ubuntu2404-base
|
||||
ubuntu2404-test:
|
||||
symbol: I(ub24-test)
|
||||
parent: ubuntu2404-test-base
|
||||
# Neither the debian8-*raw nor the debian8-*packages images can have
|
||||
# packages dependencies.
|
||||
debian8-raw:
|
||||
|
Loading…
Reference in New Issue
Block a user