bootstrap: Add Fedora 31
[metze/samba-autobuild/.git] / bootstrap / config.py
index d8bb7cf9654fc7760d388235fac8f6c67b62ea99..82234388963ce54efdd767289c586c1da816b2d5 100644 (file)
@@ -44,6 +44,7 @@ COMMON = [
     'gzip',
     'hostname',
     'htop',
+    'lcov',
     'make',
     'patch',
     'perl',
@@ -64,6 +65,7 @@ COMMON = [
 PKGS = [
     # NAME1-dev, NAME2-devel
     ('lmdb-utils', 'lmdb'),
+    ('mingw-w64', 'mingw64-gcc'),
     ('nettle-dev', 'nettle-devel'),
     ('zlib1g-dev', 'zlib-devel'),
     ('libbsd-dev', 'libbsd-devel'),
@@ -89,7 +91,7 @@ PKGS = [
     ('libgpgme11-dev', 'gpgme-devel'),
     # NOTE: Debian 8+ and Ubuntu 14.04+
     ('libgnutls28-dev', 'gnutls-devel'),
-    ('libtasn1-bin', ''),
+    ('libtasn1-bin', 'libtasn1-tools'),
     ('libtasn1-dev', 'libtasn1-devel'),
     ('', 'quota-devel'),
     ('uuid-dev', 'libuuid-devel'),
@@ -113,7 +115,7 @@ PKGS = [
     ('xsltproc', 'libxslt'),
     ('krb5-user', ''),
     ('krb5-config', ''),
-    ('', 'krb5-server'),
+    ('krb5-kdc', 'krb5-server'),
     ('apt-utils', 'yum-utils'),
     ('pkg-config', 'pkgconfig'),
     ('procps', 'procps-ng'),  # required for the free cmd in tests
@@ -122,18 +124,10 @@ PKGS = [
     # refer: https://fedoraproject.org/wiki/Changes/SunRPCRemoval
     ('', 'libtirpc-devel'),  # for <rpc/rpc.h> header on fedora
     ('', 'libnsl2-devel'),  # for <rpcsvc/yp_prot.h> header on fedora
+    ('', 'rpcsvc-proto-devel'), # for <rpcsvc/rquota.h> header
     ('mawk', 'gawk'),
 
-    # python
-    ('python-dev', 'python-devel'),
-    ('python-dbg', ''),
-    ('python-iso8601', ''),
-    ('python-gpg', 'python2-gpg'),  # defaults to ubuntu/fedora latest
-    ('python-crypto', 'python-crypto'),
-    ('python-markdown', 'python-markdown'),
-    ('python-dnspython', 'python-dns'),
-    ('python-pexpect', ''),  # for wintest only
-
+    ('python3', 'python3'),
     ('python3-dev', 'python3-devel'),
     ('python3-dbg', ''),
     ('python3-iso8601', ''),
@@ -157,6 +151,12 @@ PKGS = [
     ('', 'perl-generators'),
     ('', 'perl-interpreter'),
 
+    # fs
+    ('xfslibs-dev', 'xfsprogs-devel'), # for xfs quota support
+    ('', 'glusterfs-api-devel'),
+    ('glusterfs-common', 'glusterfs-devel'),
+    ('libcephfs-dev', 'libcephfs-devel'),
+
     # misc
     # @ means group for rpm, use fedora as rpm default
     ('build-essential', '@development-tools'),
@@ -202,25 +202,49 @@ YUM_BOOTSTRAP = r"""
 {GENERATED_MARKER}
 set -xueo pipefail
 
-yum -y -q update
-yum -y -q install epel-release
-yum -y -q update
+yum update -y
+yum install -y epel-release
+yum install -y yum-plugin-copr
+yum copr enable -y sergiomb/SambaAD
+yum update -y
 
-yum -y -q --verbose install \
+yum install -y \
     {pkgs}
 
 yum clean all
+
+if [ ! -f /usr/bin/python3 ]; then
+    ln -sf /usr/bin/python3.6 /usr/bin/python3
+fi
 """
 
+CENTOS8_YUM_BOOTSTRAP = r"""
+#!/bin/bash
+{GENERATED_MARKER}
+set -xueo pipefail
+
+yum update -y
+yum install -y dnf-plugins-core
+yum install -y epel-release
+yum config-manager --set-enabled PowerTools -y
+yum update -y
+
+yum install -y \
+    --setopt=install_weak_deps=False \
+    {pkgs}
+
+yum clean all
+"""
 
 DNF_BOOTSTRAP = r"""
 #!/bin/bash
 {GENERATED_MARKER}
 set -xueo pipefail
 
-dnf -y -q update
+dnf update -y
 
-dnf -y -q --verbose install \
+dnf install -y \
+    --setopt=install_weak_deps=False \
     {pkgs}
 
 dnf clean all
@@ -234,8 +258,9 @@ set -xueo pipefail
 zypper --non-interactive refresh
 zypper --non-interactive update
 zypper --non-interactive install \
-    {pkgs} \
-    system-user-nobody
+    --no-recommends \
+    system-user-nobody \
+    {pkgs}
 
 zypper --non-interactive clean
 
@@ -389,6 +414,8 @@ DEB_DISTS = {
             'lmdb-utils': 'lmdb-utils/trusty-backports',
             'liblmdb-dev': 'liblmdb-dev/trusty-backports',
             'libunwind-dev': 'libunwind8-dev',
+            'glusterfs-common': '',
+            'libcephfs-dev': '',
         }
     },
     'ubuntu1604': {
@@ -397,6 +424,8 @@ DEB_DISTS = {
         'replace': {
             'python-gpg': 'python-gpgme',
             'python3-gpg': 'python3-gpgme',
+            'glusterfs-common': '',
+            'libcephfs-dev': '',
         }
     },
     'ubuntu1804': {
@@ -413,7 +442,8 @@ RPM_DISTS = {
         'bootstrap': YUM_BOOTSTRAP,
         'replace': {
             'lsb-release': 'redhat-lsb',
-            'python3-devel': 'python34-devel',
+            'python3': 'python36',
+            'python3-devel': 'python36-devel',
             'python2-gpg': 'pygpgme',
             'python3-gpg': '',  # no python3-gpg yet
             '@development-tools': '"@Development Tools"',  # add quotes
@@ -423,6 +453,10 @@ RPM_DISTS = {
             # update perl core modules on centos
             # fix: Can't locate Archive/Tar.pm in @INC
             'perl': 'perl-core',
+            'rpcsvc-proto-devel': '',
+            'glusterfs-api-devel': '',
+            'glusterfs-devel': '',
+            'libcephfs-devel': '',
         }
     },
     'centos7': {
@@ -431,10 +465,16 @@ RPM_DISTS = {
         'bootstrap': YUM_BOOTSTRAP,
         'replace': {
             'lsb-release': 'redhat-lsb',
-            'python3-devel': 'python34-devel',
+            'python3': 'python36',
+            'python3-crypto': 'python36-crypto',
+            'python3-devel': 'python36-devel',
+            'python3-dns': 'python36-dns',
+            'python3-gpg': 'python36-gpg',
+            'python3-iso8601' : 'python36-iso8601',
+            'python3-markdown': 'python36-markdown',
             # although python36-devel is available
             # after epel-release installed
-            # however, all other python3 pkgs are still python34-ish
+            # however, all other python3 pkgs are still python36-ish
             'python2-gpg': 'pygpgme',
             'python3-gpg': '',  # no python3-gpg yet
             '@development-tools': '"@Development Tools"',  # add quotes
@@ -443,14 +483,27 @@ RPM_DISTS = {
             # update perl core modules on centos
             # fix: Can't locate Archive/Tar.pm in @INC
             'perl': 'perl-core',
+            'rpcsvc-proto-devel': '',
+            'glusterfs-api-devel': '',
+            'glusterfs-devel': '',
+            'libcephfs-devel': '',
+            'gnutls-devel': 'compat-gnutls34-devel',
         }
     },
-    'fedora28': {
-        'docker_image': 'fedora:28',
-        'vagrant_box': 'fedora/28-cloud-base',
-        'bootstrap': DNF_BOOTSTRAP,
+    'centos8': {
+        'docker_image': 'centos:8',
+        'vagrant_box': 'centos/8',
+        'bootstrap': CENTOS8_YUM_BOOTSTRAP,
         'replace': {
             'lsb-release': 'redhat-lsb',
+            '@development-tools': '"@Development Tools"',  # add quotes
+            'libsemanage-python': 'python3-libsemanage',
+            'lcov': '', # does not exist
+            'perl-JSON-Parse': '', # does not exist?
+            'perl-Test-Base': 'perl-Test-Simple',
+            'policycoreutils-python': 'python3-policycoreutils',
+            'python3-crypto': '',
+            'quota-devel': '', # FIXME: Add me back, once available!
         }
     },
     'fedora29': {
@@ -461,6 +514,24 @@ RPM_DISTS = {
             'lsb-release': 'redhat-lsb',
         }
     },
+    'fedora30': {
+        'docker_image': 'fedora:30',
+        'vagrant_box': 'fedora/30-cloud-base',
+        'bootstrap': DNF_BOOTSTRAP,
+        'replace': {
+            'lsb-release': 'redhat-lsb',
+        }
+    },
+    'fedora31': {
+        'docker_image': 'fedora:31',
+        'vagrant_box': 'fedora/31-cloud-base',
+        'bootstrap': DNF_BOOTSTRAP,
+        'replace': {
+            'lsb-release': 'redhat-lsb',
+            'libsemanage-python': 'python3-libsemanage',
+            'policycoreutils-python': 'python3-policycoreutils',
+        }
+    },
     'opensuse150': {
         'docker_image': 'opensuse/leap:15.0',
         'vagrant_box': 'opensuse/openSUSE-15.0-x86_64',
@@ -489,6 +560,42 @@ RPM_DISTS = {
             'python3-dns': 'python3-dnspython',
             'python3-markdown': 'python3-Markdown',
             'quota-devel': '',
+            'glusterfs-api-devel': '',
+            'libtasn1-tools': '', # asn1Parser is part of libtasn1
+            'mingw64-gcc': '', # doesn't exist
+        }
+    },
+    'opensuse151': {
+        'docker_image': 'opensuse/leap:15.1',
+        'vagrant_box': 'opensuse/openSUSE-15.1-x86_64',
+        'bootstrap': ZYPPER_BOOTSTRAP,
+        'replace': {
+            '@development-tools': '',
+            'dbus-devel': 'dbus-1-devel',
+            'docbook-style-xsl': 'docbook-xsl-stylesheets',
+            'glibc-common': 'glibc-locale',
+            'glibc-locale-source': 'glibc-i18ndata',
+            'glibc-langpack-en': '',
+            'jansson-devel': 'libjansson-devel',
+            'keyutils-libs-devel': 'keyutils-devel',
+            'krb5-workstation': 'krb5-client',
+            'libnsl2-devel': 'libnsl-devel',
+            'libsemanage-python': 'python2-semanage',
+            'nettle-devel': 'libnettle-devel',
+            'openldap-devel': 'openldap2-devel',
+            'perl-Archive-Tar': 'perl-Archive-Tar-Wrapper',
+            'perl-JSON-Parse': 'perl-JSON-XS',
+            'perl-generators': '',
+            'perl-interpreter': '',
+            'procps-ng': 'procps',
+            'python-dns': 'python2-dnspython',
+            'python3-crypto': 'python3-pycrypto',
+            'python3-dns': 'python3-dnspython',
+            'python3-markdown': 'python3-Markdown',
+            'quota-devel': '',
+            'glusterfs-api-devel': '',
+            'libtasn1-tools': '', # asn1Parser is part of libtasn1
+            'mingw64-gcc': '', # doesn't exist
         }
     }
 }