bootstrap: Add OpenSUSE 15.1 image
[samba.git] / bootstrap / config.py
index e56fb30f88789d70864686ac7d9ccb17e74a62c9..9126961fc9354c6e82736c9c672dac4b30dddb77 100644 (file)
@@ -26,7 +26,7 @@ import os
 from os.path import abspath, dirname, join
 HERE = abspath(dirname(__file__))
 # output dir for rendered files
-OUT = join(HERE, 'dists')
+OUT = join(HERE, 'generated-dists')
 
 
 # pkgs with same name in all packaging systems
@@ -37,12 +37,14 @@ COMMON = [
     'binutils',
     'bison',
     'curl',
+    'flex',
     'gcc',
     'gdb',
     'git',
     'gzip',
     'hostname',
     'htop',
+    'lcov',
     'make',
     'patch',
     'perl',
@@ -63,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'),
@@ -88,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'),
@@ -112,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
@@ -121,6 +124,7 @@ 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
@@ -133,6 +137,7 @@ PKGS = [
     ('python-dnspython', 'python-dns'),
     ('python-pexpect', ''),  # for wintest only
 
+    ('python3', 'python3'),
     ('python3-dev', 'python3-devel'),
     ('python3-dbg', ''),
     ('python3-iso8601', ''),
@@ -156,6 +161,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'),
@@ -163,7 +174,6 @@ PKGS = [
     # rpm has no pkg for docbook-xml
     ('docbook-xml', 'docbook-dtds'),
     ('docbook-xsl', 'docbook-style-xsl'),
-    ('flex', ''),
     ('', 'keyutils-libs-devel'),
     ('', 'which'),
 ]
@@ -202,14 +212,18 @@ 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 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
 """
 
 
@@ -218,9 +232,10 @@ DNF_BOOTSTRAP = r"""
 {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 +249,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 +405,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 +415,8 @@ DEB_DISTS = {
         'replace': {
             'python-gpg': 'python-gpgme',
             'python3-gpg': 'python3-gpgme',
+            'glusterfs-common': '',
+            'libcephfs-dev': '',
         }
     },
     'ubuntu1804': {
@@ -413,7 +433,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 +444,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 +456,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,6 +474,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': '',
         }
     },
     'fedora28': {
@@ -461,6 +496,14 @@ 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',
+        }
+    },
     'opensuse150': {
         'docker_image': 'opensuse/leap:15.0',
         'vagrant_box': 'opensuse/openSUSE-15.0-x86_64',
@@ -489,6 +532,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
         }
     }
 }