gitlab-ci: Update Fedora to version 38
authorAndreas Schneider <asn@samba.org>
Thu, 20 Apr 2023 06:25:31 +0000 (08:25 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 27 Apr 2023 08:22:58 +0000 (08:22 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Apr 27 08:22:58 UTC 2023 on atb-devel-224

15 files changed:
.gitlab-ci-main.yml
bootstrap/.gitlab-ci.yml
bootstrap/config.py
bootstrap/generated-dists/Vagrantfile
bootstrap/generated-dists/centos7/bootstrap.sh
bootstrap/generated-dists/centos7/packages.yml
bootstrap/generated-dists/centos8s/bootstrap.sh
bootstrap/generated-dists/centos8s/packages.yml
bootstrap/generated-dists/fedora38/Dockerfile [new file with mode: 0644]
bootstrap/generated-dists/fedora38/bootstrap.sh [new file with mode: 0755]
bootstrap/generated-dists/fedora38/locale.sh [new file with mode: 0755]
bootstrap/generated-dists/fedora38/packages.yml [new file with mode: 0644]
bootstrap/generated-dists/opensuse154/bootstrap.sh
bootstrap/generated-dists/opensuse154/packages.yml
bootstrap/sha1sum.txt

index e725bfd07756818f59aff4542ce4c28411b0f03b..4208cbcc104564a63cdc291312b91082350c4978 100644 (file)
@@ -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: 790c229c42a67336099420d137fa9dc9974a133a
+  SAMBA_CI_CONTAINER_TAG: cfddaa8d36c3f512827bd96fe05c30f7f8337f4b
   #
   # We use the ubuntu2204 image as default as
   # it matches what we have on atb-devel-224
@@ -64,8 +64,7 @@ variables:
   SAMBA_CI_CONTAINER_IMAGE_ubuntu2204: ubuntu2204
   SAMBA_CI_CONTAINER_IMAGE_debian11: debian11
   SAMBA_CI_CONTAINER_IMAGE_opensuse154: opensuse154
-  SAMBA_CI_CONTAINER_IMAGE_fedora37: fedora37
-  SAMBA_CI_CONTAINER_IMAGE_f37mit120: f37mit120
+  SAMBA_CI_CONTAINER_IMAGE_fedora38: fedora38
   SAMBA_CI_CONTAINER_IMAGE_centos7: centos7
   SAMBA_CI_CONTAINER_IMAGE_centos8s: centos8s
 
@@ -263,33 +262,18 @@ samba-def-build:
 samba-mit-build:
   extends: .shared_template_build_only
   variables:
-    SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora37}
-  stage: build_first
-
-samba-mit120-build:
-  extends: .shared_template_build_only
-  variables:
-    AUTOBUILD_JOB_NAME: samba-mit-build
-    SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_f37mit120}
+    SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora38}
   stage: build_first
 
 .needs_samba-mit-build:
   extends: .shared_template_test_only
   variables:
-    SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora37}
+    SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora38}
   needs:
     - job: samba-mit-build
       artifacts: true
     - job: samba-shellcheck
 
-.needs_samba-mit120-build:
-  extends: .shared_template_test_only
-  variables:
-    SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_f37mit120}
-  needs:
-    - job: samba-mit120-build
-      artifacts: true
-
 samba-h5l-build:
   extends: .shared_template_build_only
 
@@ -332,7 +316,7 @@ samba:
 samba-mitkrb5:
   extends: .shared_template
   variables:
-    SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora37}
+    SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora38}
 
 samba-minimal-smbd:
   extends: .shared_template
@@ -402,13 +386,13 @@ samba-addc-mit-4b:
 samba-fips:
   extends: .shared_template
   variables:
-    SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora37}
+    SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora38}
 
 samba-shellcheck:
   extends: .shared_template
   needs:
   variables:
-    SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora37}
+    SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora38}
   stage: build_first
 
 .private_test_only:
@@ -435,11 +419,6 @@ samba-shellcheck:
     - .needs_samba-mit-build
     - .private_test_only
 
-.needs_samba-mit120-build-private:
-  extends:
-    - .needs_samba-mit120-build
-    - .private_test_only
-
 .needs_samba-h5l-build-private:
   extends:
     - .needs_samba-h5l-build
@@ -482,11 +461,6 @@ samba-nt4:
 samba-addc-mit-1:
   extends: .needs_samba-mit-build-private
 
-samba-addc-mit120:
-  extends: .needs_samba-mit120-build-private
-  variables:
-    AUTOBUILD_JOB_NAME: samba-addc-mit-1
-
 samba-no-opath1:
   extends: .needs_samba-no-opath-build-private
 
@@ -662,10 +636,10 @@ centos8s-samba-o3:
   variables:
     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_centos8s}
 
-fedora37-samba-o3:
+fedora38-samba-o3:
   extends: .samba-o3-template
   variables:
-    SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora37}
+    SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora38}
 
 #
 # Keep the samba-o3 sections at the end ...
index be1e14b4b14ed4fbe88562e7be0b3ff808ac96ea..ef72d1538f1b43c705ccf25b672a6b371d57425a 100644 (file)
@@ -105,10 +105,7 @@ ubuntu2204:
 debian11:
   extends: .build_image_template
 
-fedora37:
-  extends: .build_image_template
-
-f37mit120:
+fedora38:
   extends: .build_image_template
 
 centos8s:
index d2ad4503430faf8cd7278ac0eafd471915a9470d..fd1753fb3e178460cb541d01601e3afb2c3376da 100644 (file)
@@ -135,6 +135,7 @@ PKGS = [
     ('', 'mold'),
     ('', 'ShellCheck'),
     ('', 'shfmt'),
+    ('', 'crypto-policies-scripts'),
 
     ('python3', 'python3'),
     ('python3-cryptography', 'python3-cryptography'), # for krb5 tests
@@ -268,6 +269,8 @@ dnf install -y \
     {pkgs}
 
 dnf clean all
+
+update-crypto-policies --set DEFAULT:AD-SUPPORT
 """
 
 DNF_BOOTSTRAP_MIT = r"""
@@ -508,9 +511,9 @@ RPM_DISTS = {
             'shfmt': '',
         }
     },
-    'fedora37': {
-        'docker_image': 'quay.io/fedora/fedora:37',
-        'vagrant_box': 'fedora/37-cloud-base',
+    'fedora38': {
+        'docker_image': 'quay.io/fedora/fedora:38',
+        'vagrant_box': 'fedora/38-cloud-base',
         'bootstrap': DNF_BOOTSTRAP,
         'replace': {
             'lsb-release': 'redhat-lsb',
@@ -519,17 +522,6 @@ RPM_DISTS = {
             'libtracker-sparql-2.0-dev': '',  # only tracker 3.x is available
         }
     },
-    'f37mit120': {
-        'docker_image': 'quay.io/fedora/fedora:37',
-        'vagrant_box': 'fedora/37-cloud-base',
-        'bootstrap': DNF_BOOTSTRAP_MIT,
-        'replace': {
-            'lsb-release': 'redhat-lsb',
-            'perl-FindBin': '',
-            'python3-iso8601': 'python3-dateutil',
-            'libtracker-sparql-2.0-dev': '',  # only tracker 3.x is available
-        }
-    },
     'opensuse154': {
         'docker_image': 'opensuse/leap:15.4',
         'vagrant_box': 'opensuse/openSUSE-15.4-x86_64',
index d67db745c8d2befec9aac54d17bda5892a0c35a1..e744511d36032cd86c13063b68e7086faa4e9b77 100644 (file)
@@ -31,18 +31,11 @@ Vagrant.configure("2") do |config|
         v.vm.provision :shell, path: "debian11/locale.sh"
     end
 
-    config.vm.define "f37mit120" do |v|
-        v.vm.box = "fedora/37-cloud-base"
-        v.vm.hostname = "f37mit120"
-        v.vm.provision :shell, path: "f37mit120/bootstrap.sh"
-        v.vm.provision :shell, path: "f37mit120/locale.sh"
-    end
-
-    config.vm.define "fedora37" do |v|
-        v.vm.box = "fedora/37-cloud-base"
-        v.vm.hostname = "fedora37"
-        v.vm.provision :shell, path: "fedora37/bootstrap.sh"
-        v.vm.provision :shell, path: "fedora37/locale.sh"
+    config.vm.define "fedora38" do |v|
+        v.vm.box = "fedora/38-cloud-base"
+        v.vm.hostname = "fedora38"
+        v.vm.provision :shell, path: "fedora38/bootstrap.sh"
+        v.vm.provision :shell, path: "fedora38/locale.sh"
     end
 
     config.vm.define "opensuse154" do |v|
index ad8488b596feef119b45f400cd1dad93f5e55a7a..c8bbd9d62f10a73b235796196fc132e129d7f26d 100755 (executable)
@@ -25,6 +25,7 @@ yum install -y \
     ccache \
     chrpath \
     compat-gnutls37-devel \
+    crypto-policies-scripts \
     cups-devel \
     curl \
     dbus-devel \
index 09b3d4b3f0697a9b678d3fcb93151bf2cf8095cd..9b0f5285f19900cf6074b21207504262caa1853b 100644 (file)
@@ -11,6 +11,7 @@ packages:
   - ccache
   - chrpath
   - compat-gnutls37-devel
+  - crypto-policies-scripts
   - cups-devel
   - curl
   - dbus-devel
index 0dc04a843ddb99a2d2d49dd77c2c2a2e3432bb3e..6a1df119535db5dae002a2f9af9d042fb103bf63 100755 (executable)
@@ -28,6 +28,7 @@ yum install -y \
     bison \
     ccache \
     chrpath \
+    crypto-policies-scripts \
     cups-devel \
     curl \
     dbus-devel \
index 5da7f2ac0d98a66a0a139a90b88fcfe118b67a34..0bae860437b188cc63133083587db717da9fb537 100644 (file)
@@ -10,6 +10,7 @@ packages:
   - bison
   - ccache
   - chrpath
+  - crypto-policies-scripts
   - cups-devel
   - curl
   - dbus-devel
diff --git a/bootstrap/generated-dists/fedora38/Dockerfile b/bootstrap/generated-dists/fedora38/Dockerfile
new file mode 100644 (file)
index 0000000..1000277
--- /dev/null
@@ -0,0 +1,29 @@
+#
+# This file is generated by 'bootstrap/template.py --render'
+# See also bootstrap/config.py
+#
+
+FROM quay.io/fedora/fedora:38
+
+# 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
\ No newline at end of file
diff --git a/bootstrap/generated-dists/fedora38/bootstrap.sh b/bootstrap/generated-dists/fedora38/bootstrap.sh
new file mode 100755 (executable)
index 0000000..1e76edb
--- /dev/null
@@ -0,0 +1,126 @@
+#!/bin/bash
+
+#
+# This file is generated by 'bootstrap/template.py --render'
+# See also bootstrap/config.py
+#
+
+set -xueo pipefail
+
+dnf update -y
+
+dnf install -y \
+    --setopt=install_weak_deps=False \
+    @development-tools \
+    ShellCheck \
+    acl \
+    attr \
+    autoconf \
+    avahi-devel \
+    bind-utils \
+    binutils \
+    bison \
+    ccache \
+    chrpath \
+    crypto-policies-scripts \
+    cups-devel \
+    curl \
+    dbus-devel \
+    docbook-dtds \
+    docbook-style-xsl \
+    flex \
+    gawk \
+    gcc \
+    gdb \
+    git \
+    glib2-devel \
+    glibc-common \
+    glibc-langpack-en \
+    glusterfs-api-devel \
+    glusterfs-devel \
+    gnutls-devel \
+    gpgme-devel \
+    gzip \
+    hostname \
+    htop \
+    jansson-devel \
+    jq \
+    keyutils-libs-devel \
+    krb5-devel \
+    krb5-server \
+    krb5-workstation \
+    lcov \
+    libacl-devel \
+    libarchive-devel \
+    libattr-devel \
+    libblkid-devel \
+    libbsd-devel \
+    libcap-devel \
+    libcephfs-devel \
+    libicu-devel \
+    libpcap-devel \
+    libtasn1-devel \
+    libtasn1-tools \
+    libtirpc-devel \
+    libunwind-devel \
+    liburing-devel \
+    libuuid-devel \
+    libxslt \
+    lmdb \
+    lmdb-devel \
+    make \
+    mingw64-gcc \
+    mold \
+    ncurses-devel \
+    openldap-devel \
+    pam-devel \
+    patch \
+    perl \
+    perl-Archive-Tar \
+    perl-ExtUtils-MakeMaker \
+    perl-JSON \
+    perl-JSON-Parse \
+    perl-Parse-Yapp \
+    perl-Test-Base \
+    perl-generators \
+    perl-interpreter \
+    pkgconfig \
+    popt-devel \
+    procps-ng \
+    psmisc \
+    python3 \
+    python3-cryptography \
+    python3-dateutil \
+    python3-devel \
+    python3-dns \
+    python3-gpg \
+    python3-libsemanage \
+    python3-markdown \
+    python3-policycoreutils \
+    python3-pyasn1 \
+    python3-requests \
+    python3-setproctitle \
+    quota-devel \
+    readline-devel \
+    redhat-lsb \
+    rng-tools \
+    rpcgen \
+    rpcsvc-proto-devel \
+    rsync \
+    sed \
+    shfmt \
+    sudo \
+    systemd-devel \
+    tar \
+    tracker-devel \
+    tree \
+    wget \
+    which \
+    xfsprogs-devel \
+    xz \
+    yum-utils \
+    zlib-devel
+
+dnf clean all
+
+update-crypto-policies --set DEFAULT:AD-SUPPORT
\ No newline at end of file
diff --git a/bootstrap/generated-dists/fedora38/locale.sh b/bootstrap/generated-dists/fedora38/locale.sh
new file mode 100755 (executable)
index 0000000..cc64e18
--- /dev/null
@@ -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/fedora38/packages.yml b/bootstrap/generated-dists/fedora38/packages.yml
new file mode 100644 (file)
index 0000000..3b4d6fb
--- /dev/null
@@ -0,0 +1,111 @@
+---
+packages:
+  - @development-tools
+  - ShellCheck
+  - acl
+  - attr
+  - autoconf
+  - avahi-devel
+  - bind-utils
+  - binutils
+  - bison
+  - ccache
+  - chrpath
+  - crypto-policies-scripts
+  - cups-devel
+  - curl
+  - dbus-devel
+  - docbook-dtds
+  - docbook-style-xsl
+  - flex
+  - gawk
+  - gcc
+  - gdb
+  - git
+  - glib2-devel
+  - glibc-common
+  - glibc-langpack-en
+  - glusterfs-api-devel
+  - glusterfs-devel
+  - gnutls-devel
+  - gpgme-devel
+  - gzip
+  - hostname
+  - htop
+  - jansson-devel
+  - jq
+  - keyutils-libs-devel
+  - krb5-devel
+  - krb5-server
+  - krb5-workstation
+  - lcov
+  - libacl-devel
+  - libarchive-devel
+  - libattr-devel
+  - libblkid-devel
+  - libbsd-devel
+  - libcap-devel
+  - libcephfs-devel
+  - libicu-devel
+  - libpcap-devel
+  - libtasn1-devel
+  - libtasn1-tools
+  - libtirpc-devel
+  - libunwind-devel
+  - liburing-devel
+  - libuuid-devel
+  - libxslt
+  - lmdb
+  - lmdb-devel
+  - make
+  - mingw64-gcc
+  - mold
+  - ncurses-devel
+  - openldap-devel
+  - pam-devel
+  - patch
+  - perl
+  - perl-Archive-Tar
+  - perl-ExtUtils-MakeMaker
+  - perl-JSON
+  - perl-JSON-Parse
+  - perl-Parse-Yapp
+  - perl-Test-Base
+  - perl-generators
+  - perl-interpreter
+  - pkgconfig
+  - popt-devel
+  - procps-ng
+  - psmisc
+  - python3
+  - python3-cryptography
+  - python3-dateutil
+  - python3-devel
+  - python3-dns
+  - python3-gpg
+  - python3-libsemanage
+  - python3-markdown
+  - python3-policycoreutils
+  - python3-pyasn1
+  - python3-requests
+  - python3-setproctitle
+  - quota-devel
+  - readline-devel
+  - redhat-lsb
+  - rng-tools
+  - rpcgen
+  - rpcsvc-proto-devel
+  - rsync
+  - sed
+  - shfmt
+  - sudo
+  - systemd-devel
+  - tar
+  - tracker-devel
+  - tree
+  - wget
+  - which
+  - xfsprogs-devel
+  - xz
+  - yum-utils
+  - zlib-devel
\ No newline at end of file
index 33f46c412843ede17d9f02c0e36dbe674306c78b..721f7a67a76923804152885eee88094ddb49f011 100755 (executable)
@@ -22,6 +22,7 @@ zypper --non-interactive install \
     bison \
     ccache \
     chrpath \
+    crypto-policies-scripts \
     cups-devel \
     curl \
     dbus-1-devel \
index ddb2d37c4b702a1b7ef1044fde0520879d927dd8..18921cf07518442ee2f781e7d8662ba819399eb1 100644 (file)
@@ -10,6 +10,7 @@ packages:
   - bison
   - ccache
   - chrpath
+  - crypto-policies-scripts
   - cups-devel
   - curl
   - dbus-1-devel
index 733069047b7d23e614a84ca311c1dadae456455b..3a6671d4fb875e29cbfbf5c320d48d27363aab29 100644 (file)
@@ -1 +1 @@
-790c229c42a67336099420d137fa9dc9974a133a
+cfddaa8d36c3f512827bd96fe05c30f7f8337f4b