From: Stefan Metzmacher Date: Wed, 30 Apr 2025 08:37:04 +0000 (+0200) Subject: gitlab-ci: add ubuntu2404 X-Git-Tag: tevent-0.17.0~207 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fb485544f8a9e240a695d4cd933af0713639f18b;p=thirdparty%2Fsamba.git gitlab-ci: add ubuntu2404 For now we don't use it as default as the autobuild server would need to be upgraded as well, but that will happen soon. We also can't remove ubuntu2004 yet, because it's needed for samba-fuzz. Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Mon May 12 20:27:24 UTC 2025 on atb-devel-224 --- diff --git a/.gitlab-ci-main.yml b/.gitlab-ci-main.yml index 5fe91a675a7..a9eb27ea6ec 100644 --- a/.gitlab-ci-main.yml +++ b/.gitlab-ci-main.yml @@ -47,7 +47,7 @@ variables: # Set this to the contents of bootstrap/sha1sum.txt # which is generated by bootstrap/template.py --render # - SAMBA_CI_CONTAINER_TAG: cc3865d5074e9898e4a7ffab6fa056ab63ee46ee + SAMBA_CI_CONTAINER_TAG: 3dc161f073e0f8ab1c8d5d59fef9e5e33630b51e # # We use the ubuntu2204 image as default as # it matches what we have on atb-devel-224 @@ -60,6 +60,7 @@ variables: # SAMBA_CI_CONTAINER_IMAGE_ubuntu2004: ubuntu2004 SAMBA_CI_CONTAINER_IMAGE_ubuntu2204: ubuntu2204 + SAMBA_CI_CONTAINER_IMAGE_ubuntu2404: ubuntu2404 SAMBA_CI_CONTAINER_IMAGE_debian11: debian11 SAMBA_CI_CONTAINER_IMAGE_debian11_32bit: debian11-32bit SAMBA_CI_CONTAINER_IMAGE_debian12: debian12 @@ -649,6 +650,11 @@ ubuntu2004-samba-o3: variables: SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_ubuntu2004} +ubuntu2404-samba-o3: + extends: .samba-o3-template + variables: + SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_ubuntu2404} + debian11-samba-o3: extends: .samba-o3-template variables: diff --git a/bootstrap/.gitlab-ci.yml b/bootstrap/.gitlab-ci.yml index 48ea3b887a0..11b973d9112 100644 --- a/bootstrap/.gitlab-ci.yml +++ b/bootstrap/.gitlab-ci.yml @@ -93,6 +93,9 @@ ubuntu2004: ubuntu2204: extends: .build_image_template +ubuntu2404: + extends: .build_image_template + debian11: extends: .build_image_template diff --git a/bootstrap/config.py b/bootstrap/config.py index 69978313645..08c12dd1793 100644 --- a/bootstrap/config.py +++ b/bootstrap/config.py @@ -53,6 +53,7 @@ COMMON = [ 'jq', 'lcov', 'make', + 'mold', 'patch', 'perl', 'psmisc', # for pstree in test @@ -77,6 +78,7 @@ PKGS = [ ('lmdb-utils', 'lmdb'), ('mingw-w64', 'mingw64-gcc'), ('zlib1g-dev', 'zlib-devel'), + ('landscape-common', ''), # for landscape/lib/os_release.py ('libbsd-dev', 'libbsd-devel'), ('liburing-dev', 'liburing-devel'), ('libarchive-dev', 'libarchive-devel'), @@ -140,7 +142,6 @@ PKGS = [ ('', 'libtirpc-devel'), # for header on fedora ('', 'rpcsvc-proto-devel'), # for header ('mawk', 'gawk'), - ('', 'mold'), ('shellcheck', 'ShellCheck'), ('', 'crypto-policies-scripts'), @@ -458,6 +459,8 @@ DEB_DISTS = { 'language-pack-en': '', # included in locales 'shfmt': '', 'cargo': '', # included cargo is broken + 'landscape-common': '', + 'mold': '', } }, 'debian11-32bit': { @@ -467,6 +470,8 @@ DEB_DISTS = { 'language-pack-en': '', # included in locales 'shfmt': '', 'cargo': '', # included cargo is broken + 'landscape-common': '', + 'mold': '', } }, 'debian12': { @@ -476,6 +481,7 @@ DEB_DISTS = { 'language-pack-en': '', # included in locales 'libtracker-sparql-2.0-dev': '', # only tracker 3.x is available 'cargo': '', # included cargo is broken + 'landscape-common': '', } }, 'debian12-32bit': { @@ -485,6 +491,7 @@ DEB_DISTS = { 'language-pack-en': '', # included in locales 'libtracker-sparql-2.0-dev': '', # only tracker 3.x is available 'cargo': '', # included cargo is broken + 'landscape-common': '', } }, 'ubuntu1804': { @@ -493,6 +500,8 @@ DEB_DISTS = { 'replace': { 'liburing-dev': '', # not available 'shfmt': '', + 'landscape-common': '', + 'mold': '', } }, 'ubuntu1804-32bit': { @@ -501,6 +510,8 @@ DEB_DISTS = { 'replace': { 'liburing-dev': '', # not available 'shfmt': '', + 'landscape-common': '', + 'mold': '', } }, 'ubuntu2004': { @@ -509,6 +520,7 @@ DEB_DISTS = { 'replace': { 'liburing-dev': '', # not available 'shfmt': '', + 'mold': '', } }, 'ubuntu2204': { @@ -517,7 +529,14 @@ DEB_DISTS = { 'replace': { 'libtracker-sparql-2.0-dev': '', # only tracker 3.x is available }, - } + }, + 'ubuntu2404': { + 'docker_image': 'ubuntu:24.04', + 'vagrant_box': 'ubuntu/noble64', + 'replace': { + 'libtracker-sparql-2.0-dev': '', # only tracker 3.x is available + }, + }, } diff --git a/bootstrap/generated-dists/Vagrantfile b/bootstrap/generated-dists/Vagrantfile index d901a3770cf..74993c9c58a 100644 --- a/bootstrap/generated-dists/Vagrantfile +++ b/bootstrap/generated-dists/Vagrantfile @@ -94,5 +94,12 @@ Vagrant.configure("2") do |config| v.vm.provision :shell, path: "ubuntu2204/locale.sh" end + config.vm.define "ubuntu2404" do |v| + v.vm.box = "ubuntu/noble64" + v.vm.hostname = "ubuntu2404" + v.vm.provision :shell, path: "ubuntu2404/bootstrap.sh" + v.vm.provision :shell, path: "ubuntu2404/locale.sh" + end + end diff --git a/bootstrap/generated-dists/debian12-32bit/bootstrap.sh b/bootstrap/generated-dists/debian12-32bit/bootstrap.sh index ba78ddddc12..6d1d7f61088 100755 --- a/bootstrap/generated-dists/debian12-32bit/bootstrap.sh +++ b/bootstrap/generated-dists/debian12-32bit/bootstrap.sh @@ -83,6 +83,7 @@ apt-get -y install \ make \ mawk \ mingw-w64 \ + mold \ patch \ perl \ perl-modules \ diff --git a/bootstrap/generated-dists/debian12-32bit/packages.yml b/bootstrap/generated-dists/debian12-32bit/packages.yml index 61058195154..56264828e9a 100644 --- a/bootstrap/generated-dists/debian12-32bit/packages.yml +++ b/bootstrap/generated-dists/debian12-32bit/packages.yml @@ -72,6 +72,7 @@ packages: - make - mawk - mingw-w64 + - mold - patch - perl - perl-modules diff --git a/bootstrap/generated-dists/debian12/bootstrap.sh b/bootstrap/generated-dists/debian12/bootstrap.sh index ba78ddddc12..6d1d7f61088 100755 --- a/bootstrap/generated-dists/debian12/bootstrap.sh +++ b/bootstrap/generated-dists/debian12/bootstrap.sh @@ -83,6 +83,7 @@ apt-get -y install \ make \ mawk \ mingw-w64 \ + mold \ patch \ perl \ perl-modules \ diff --git a/bootstrap/generated-dists/debian12/packages.yml b/bootstrap/generated-dists/debian12/packages.yml index 61058195154..56264828e9a 100644 --- a/bootstrap/generated-dists/debian12/packages.yml +++ b/bootstrap/generated-dists/debian12/packages.yml @@ -72,6 +72,7 @@ packages: - make - mawk - mingw-w64 + - mold - patch - perl - perl-modules diff --git a/bootstrap/generated-dists/ubuntu2004/bootstrap.sh b/bootstrap/generated-dists/ubuntu2004/bootstrap.sh index ac716b38593..fc2ad508b70 100755 --- a/bootstrap/generated-dists/ubuntu2004/bootstrap.sh +++ b/bootstrap/generated-dists/ubuntu2004/bootstrap.sh @@ -42,6 +42,7 @@ apt-get -y install \ krb5-config \ krb5-kdc \ krb5-user \ + landscape-common \ language-pack-en \ lcov \ libacl1-dev \ diff --git a/bootstrap/generated-dists/ubuntu2004/packages.yml b/bootstrap/generated-dists/ubuntu2004/packages.yml index eb8e7ad4053..2bdcbfa89ff 100644 --- a/bootstrap/generated-dists/ubuntu2004/packages.yml +++ b/bootstrap/generated-dists/ubuntu2004/packages.yml @@ -31,6 +31,7 @@ packages: - krb5-config - krb5-kdc - krb5-user + - landscape-common - language-pack-en - lcov - libacl1-dev diff --git a/bootstrap/generated-dists/ubuntu2204/bootstrap.sh b/bootstrap/generated-dists/ubuntu2204/bootstrap.sh index 669d53ea747..17831dfaefe 100755 --- a/bootstrap/generated-dists/ubuntu2204/bootstrap.sh +++ b/bootstrap/generated-dists/ubuntu2204/bootstrap.sh @@ -42,6 +42,7 @@ apt-get -y install \ krb5-config \ krb5-kdc \ krb5-user \ + landscape-common \ language-pack-en \ lcov \ libacl1-dev \ @@ -85,6 +86,7 @@ apt-get -y install \ make \ mawk \ mingw-w64 \ + mold \ patch \ perl \ perl-modules \ diff --git a/bootstrap/generated-dists/ubuntu2204/packages.yml b/bootstrap/generated-dists/ubuntu2204/packages.yml index 0343ebe0915..8d5d400a2ea 100644 --- a/bootstrap/generated-dists/ubuntu2204/packages.yml +++ b/bootstrap/generated-dists/ubuntu2204/packages.yml @@ -31,6 +31,7 @@ packages: - krb5-config - krb5-kdc - krb5-user + - landscape-common - language-pack-en - lcov - libacl1-dev @@ -74,6 +75,7 @@ packages: - make - mawk - mingw-w64 + - mold - patch - perl - perl-modules diff --git a/bootstrap/generated-dists/ubuntu2404/Dockerfile b/bootstrap/generated-dists/ubuntu2404/Dockerfile new file mode 100644 index 00000000000..a430d29d52b --- /dev/null +++ b/bootstrap/generated-dists/ubuntu2404/Dockerfile @@ -0,0 +1,29 @@ +# +# This file is generated by 'bootstrap/template.py --render' +# See also bootstrap/config.py +# + +FROM ubuntu:24.04 + +# pass in with --build-arg while build +ARG SHA1SUM +RUN [ -n $SHA1SUM ] && echo $SHA1SUM > /sha1sum.txt + +ADD *.sh /tmp/ +# need root permission, do it before USER samba +RUN /tmp/bootstrap.sh && /tmp/locale.sh + +# if ld.gold exists, force link it to ld +RUN set -x; ! LD_GOLD=$(which ld.gold) || { LD=$(which ld) && ln -sf $LD_GOLD $LD && test -x $LD && echo "$LD is now $LD_GOLD"; } +# if ld.mold exists, force link it to ld (prefer mold over gold! ;-) +RUN set -x; ! LD_MOLD=$(which ld.mold) || { LD=$(which ld) && ln -sf $LD_MOLD $LD && test -x $LD && echo "$LD is now $LD_MOLD"; } + +# make test can not work with root, so we have to create a new user +RUN useradd -m -U -s /bin/bash samba && \ + mkdir -p /etc/sudoers.d && \ + echo "samba ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/samba + +USER samba +WORKDIR /home/samba +# samba tests rely on this +ENV USER=samba LC_ALL=en_US.utf8 LANG=en_US.utf8 LANGUAGE=en_US \ No newline at end of file diff --git a/bootstrap/generated-dists/ubuntu2404/bootstrap.sh b/bootstrap/generated-dists/ubuntu2404/bootstrap.sh new file mode 100755 index 00000000000..17831dfaefe --- /dev/null +++ b/bootstrap/generated-dists/ubuntu2404/bootstrap.sh @@ -0,0 +1,124 @@ +#!/bin/bash + +# +# This file is generated by 'bootstrap/template.py --render' +# See also bootstrap/config.py +# + +set -xueo pipefail + +export DEBIAN_FRONTEND=noninteractive +apt-get -y update + +apt-get -y install \ + acl \ + apt-utils \ + attr \ + autoconf \ + bind9utils \ + binutils \ + bison \ + build-essential \ + cargo \ + ccache \ + chrpath \ + codespell \ + curl \ + debhelper \ + dnsutils \ + docbook-xml \ + docbook-xsl \ + flex \ + gcc \ + gdb \ + git \ + glusterfs-common \ + gnutls-bin \ + gzip \ + heimdal-multidev \ + hostname \ + htop \ + jq \ + krb5-config \ + krb5-kdc \ + krb5-user \ + landscape-common \ + language-pack-en \ + lcov \ + libacl1-dev \ + libarchive-dev \ + libattr1-dev \ + libavahi-common-dev \ + libblkid-dev \ + libbsd-dev \ + libcap-dev \ + libcephfs-dev \ + libclang-dev \ + libcups2-dev \ + libdbus-1-dev \ + libevent-dev \ + libglib2.0-dev \ + libgnutls28-dev \ + libgpgme11-dev \ + libicu-dev \ + libjansson-dev \ + libjs-jquery \ + libkeyutils-dev \ + libkrb5-dev \ + libldap2-dev \ + liblmdb-dev \ + libncurses5-dev \ + libpam0g-dev \ + libparse-yapp-perl \ + libpcap-dev \ + libpopt-dev \ + libreadline-dev \ + libssl-dev \ + libsystemd-dev \ + libtasn1-bin \ + libtasn1-dev \ + libunwind-dev \ + liburing-dev \ + libutf8proc-dev \ + lmdb-utils \ + locales \ + lsb-release \ + make \ + mawk \ + mingw-w64 \ + mold \ + patch \ + perl \ + perl-modules \ + pkg-config \ + procps \ + psmisc \ + python3 \ + python3-cryptography \ + python3-dbg \ + python3-dev \ + python3-dnspython \ + python3-gpg \ + python3-iso8601 \ + python3-markdown \ + python3-pyasn1 \ + python3-requests \ + python3-setproctitle \ + rng-tools \ + rsync \ + sed \ + shellcheck \ + shfmt \ + sudo \ + tar \ + tree \ + uuid-dev \ + wget \ + xfslibs-dev \ + xsltproc \ + xz-utils \ + zlib1g-dev + +apt-get -y autoremove +apt-get -y autoclean +apt-get -y clean \ No newline at end of file diff --git a/bootstrap/generated-dists/ubuntu2404/locale.sh b/bootstrap/generated-dists/ubuntu2404/locale.sh new file mode 100755 index 00000000000..cc64e180483 --- /dev/null +++ b/bootstrap/generated-dists/ubuntu2404/locale.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +# +# This file is generated by 'bootstrap/template.py --render' +# See also bootstrap/config.py +# + +set -xueo pipefail + +# refer to /usr/share/i18n/locales +INPUTFILE=en_US +# refer to /usr/share/i18n/charmaps +CHARMAP=UTF-8 +# locale to generate in /usr/lib/locale +# glibc/localedef will normalize UTF-8 to utf8, follow the naming style +LOCALE=$INPUTFILE.utf8 + +# if locale is already correct, exit +( locale | grep LC_ALL | grep -i $LOCALE ) && exit 0 + +# if locale not available, generate locale into /usr/lib/locale +if ! ( locale --all-locales | grep -i $LOCALE ) +then + # no-archive means create its own dir + localedef --inputfile $INPUTFILE --charmap $CHARMAP --no-archive $LOCALE +fi + +# update locale conf and global env file +# set both LC_ALL and LANG for safe + +# update conf for Debian family +FILE=/etc/default/locale +if [ -f $FILE ] +then + echo LC_ALL="$LOCALE" > $FILE + echo LANG="$LOCALE" >> $FILE +fi + +# update conf for RedHat family +FILE=/etc/locale.conf +if [ -f $FILE ] +then + # LC_ALL is not valid in this file, set LANG only + echo LANG="$LOCALE" > $FILE +fi + +# update global env file +FILE=/etc/environment +if [ -f $FILE ] +then + # append LC_ALL if not exist + grep LC_ALL $FILE || echo LC_ALL="$LOCALE" >> $FILE + # append LANG if not exist + grep LANG $FILE || echo LANG="$LOCALE" >> $FILE +fi \ No newline at end of file diff --git a/bootstrap/generated-dists/ubuntu2404/packages.yml b/bootstrap/generated-dists/ubuntu2404/packages.yml new file mode 100644 index 00000000000..8d5d400a2ea --- /dev/null +++ b/bootstrap/generated-dists/ubuntu2404/packages.yml @@ -0,0 +1,109 @@ +--- +packages: + - acl + - apt-utils + - attr + - autoconf + - bind9utils + - binutils + - bison + - build-essential + - cargo + - ccache + - chrpath + - codespell + - curl + - debhelper + - dnsutils + - docbook-xml + - docbook-xsl + - flex + - gcc + - gdb + - git + - glusterfs-common + - gnutls-bin + - gzip + - heimdal-multidev + - hostname + - htop + - jq + - krb5-config + - krb5-kdc + - krb5-user + - landscape-common + - language-pack-en + - lcov + - libacl1-dev + - libarchive-dev + - libattr1-dev + - libavahi-common-dev + - libblkid-dev + - libbsd-dev + - libcap-dev + - libcephfs-dev + - libclang-dev + - libcups2-dev + - libdbus-1-dev + - libevent-dev + - libglib2.0-dev + - libgnutls28-dev + - libgpgme11-dev + - libicu-dev + - libjansson-dev + - libjs-jquery + - libkeyutils-dev + - libkrb5-dev + - libldap2-dev + - liblmdb-dev + - libncurses5-dev + - libpam0g-dev + - libparse-yapp-perl + - libpcap-dev + - libpopt-dev + - libreadline-dev + - libssl-dev + - libsystemd-dev + - libtasn1-bin + - libtasn1-dev + - libunwind-dev + - liburing-dev + - libutf8proc-dev + - lmdb-utils + - locales + - lsb-release + - make + - mawk + - mingw-w64 + - mold + - patch + - perl + - perl-modules + - pkg-config + - procps + - psmisc + - python3 + - python3-cryptography + - python3-dbg + - python3-dev + - python3-dnspython + - python3-gpg + - python3-iso8601 + - python3-markdown + - python3-pyasn1 + - python3-requests + - python3-setproctitle + - rng-tools + - rsync + - sed + - shellcheck + - shfmt + - sudo + - tar + - tree + - uuid-dev + - wget + - xfslibs-dev + - xsltproc + - xz-utils + - zlib1g-dev \ No newline at end of file diff --git a/bootstrap/sha1sum.txt b/bootstrap/sha1sum.txt index 43732b284ca..7a8d58b5aae 100644 --- a/bootstrap/sha1sum.txt +++ b/bootstrap/sha1sum.txt @@ -1 +1 @@ -cc3865d5074e9898e4a7ffab6fa056ab63ee46ee +3dc161f073e0f8ab1c8d5d59fef9e5e33630b51e