[SCM] Samba Shared Repository - branch master updated

Andreas Schneider asn at samba.org
Wed Jul 21 12:19:01 UTC 2021


The branch, master has been updated
       via  ee9dfff617a bootstrap: Install python3-dateutil instead of python3-iso8601 on RPM distros
       via  e51e9d01459 python:waf: Correctly check for python-dateutil
      from  84b9f58616e s3:tests: Add smbclient kerberos tests for ad_dc and ad_dc_fips

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit ee9dfff617ad21d81369d7ef2ea35d7caab82fec
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Jul 21 09:32:42 2021 +0200

    bootstrap: Install python3-dateutil instead of python3-iso8601 on RPM distros
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Alexander Bokovoy <ab at samba.org>
    
    Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
    Autobuild-Date(master): Wed Jul 21 12:18:30 UTC 2021 on sn-devel-184

commit e51e9d014598241e1cb8b525cce9e9c6b9e4e98f
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Jul 21 09:17:31 2021 +0200

    python:waf: Correctly check for python-dateutil
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Alexander Bokovoy <ab at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 .gitlab-ci-main.yml                                |  2 +-
 bootstrap/config.py                                |  3 +++
 bootstrap/generated-dists/fedora33/bootstrap.sh    |  2 +-
 bootstrap/generated-dists/fedora33/packages.yml    |  2 +-
 bootstrap/generated-dists/fedora34/bootstrap.sh    |  2 +-
 bootstrap/generated-dists/fedora34/packages.yml    |  2 +-
 bootstrap/generated-dists/opensuse152/bootstrap.sh |  2 +-
 bootstrap/generated-dists/opensuse152/packages.yml |  2 +-
 bootstrap/sha1sum.txt                              |  2 +-
 python/wscript                                     | 23 +++++++++++++++++++---
 10 files changed, 31 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/.gitlab-ci-main.yml b/.gitlab-ci-main.yml
index 84cb9f0ba4e..9ea3a3f5606 100644
--- a/.gitlab-ci-main.yml
+++ b/.gitlab-ci-main.yml
@@ -42,7 +42,7 @@ variables:
   # Set this to the contents of bootstrap/sha1sum.txt
   # which is generated by bootstrap/template.py --render
   #
-  SAMBA_CI_CONTAINER_TAG: 11d550c08430787a5b0eb8dc847977ffffe12bbe
+  SAMBA_CI_CONTAINER_TAG: b5333a93306e20ba549f5fac3c6c74e0b103c1d6
   #
   # We use the ubuntu1804 image as default as
   # it matches what we have on sn-devel-184.
diff --git a/bootstrap/config.py b/bootstrap/config.py
index b02ce4cf566..821ce3d5cc2 100644
--- a/bootstrap/config.py
+++ b/bootstrap/config.py
@@ -485,6 +485,7 @@ RPM_DISTS = {
             'lsb-release': 'redhat-lsb',
             'libsemanage-python': 'python3-libsemanage',
             'policycoreutils-python': 'python3-policycoreutils',
+            'python3-iso8601': 'python3-dateutil',
         }
     },
     'fedora34': {
@@ -496,6 +497,7 @@ RPM_DISTS = {
             'libsemanage-python': 'python3-libsemanage',
             'policycoreutils-python': 'python3-policycoreutils',
             'perl-FindBin': '',
+            'python3-iso8601': 'python3-dateutil',
             'libtracker-sparql-2.0-dev': '', # only tracker 3.x is available
         }
     },
@@ -552,6 +554,7 @@ RPM_DISTS = {
             'perl-interpreter': '',
             'perl-FindBin': '',
             'procps-ng': 'procps',
+            'python3-iso8601': 'python3-python-dateutil',
             'python3-dns': 'python3-dnspython',
             'python3-markdown': 'python3-Markdown',
             'quota-devel': '',
diff --git a/bootstrap/generated-dists/fedora33/bootstrap.sh b/bootstrap/generated-dists/fedora33/bootstrap.sh
index 22b968e9ae2..52e199f6b88 100755
--- a/bootstrap/generated-dists/fedora33/bootstrap.sh
+++ b/bootstrap/generated-dists/fedora33/bootstrap.sh
@@ -87,10 +87,10 @@ dnf install -y \
     psmisc \
     python3 \
     python3-cryptography \
+    python3-dateutil \
     python3-devel \
     python3-dns \
     python3-gpg \
-    python3-iso8601 \
     python3-libsemanage \
     python3-markdown \
     python3-policycoreutils \
diff --git a/bootstrap/generated-dists/fedora33/packages.yml b/bootstrap/generated-dists/fedora33/packages.yml
index 7c61da3c53a..d9cbfbd80db 100644
--- a/bootstrap/generated-dists/fedora33/packages.yml
+++ b/bootstrap/generated-dists/fedora33/packages.yml
@@ -76,10 +76,10 @@ packages:
   - psmisc
   - python3
   - python3-cryptography
+  - python3-dateutil
   - python3-devel
   - python3-dns
   - python3-gpg
-  - python3-iso8601
   - python3-libsemanage
   - python3-markdown
   - python3-policycoreutils
diff --git a/bootstrap/generated-dists/fedora34/bootstrap.sh b/bootstrap/generated-dists/fedora34/bootstrap.sh
index d5fea5c008a..de5a9670601 100755
--- a/bootstrap/generated-dists/fedora34/bootstrap.sh
+++ b/bootstrap/generated-dists/fedora34/bootstrap.sh
@@ -86,10 +86,10 @@ dnf install -y \
     psmisc \
     python3 \
     python3-cryptography \
+    python3-dateutil \
     python3-devel \
     python3-dns \
     python3-gpg \
-    python3-iso8601 \
     python3-libsemanage \
     python3-markdown \
     python3-policycoreutils \
diff --git a/bootstrap/generated-dists/fedora34/packages.yml b/bootstrap/generated-dists/fedora34/packages.yml
index db12fdb5486..749f30dfc0e 100644
--- a/bootstrap/generated-dists/fedora34/packages.yml
+++ b/bootstrap/generated-dists/fedora34/packages.yml
@@ -75,10 +75,10 @@ packages:
   - psmisc
   - python3
   - python3-cryptography
+  - python3-dateutil
   - python3-devel
   - python3-dns
   - python3-gpg
-  - python3-iso8601
   - python3-libsemanage
   - python3-markdown
   - python3-policycoreutils
diff --git a/bootstrap/generated-dists/opensuse152/bootstrap.sh b/bootstrap/generated-dists/opensuse152/bootstrap.sh
index bdfb121b345..534ff66896f 100755
--- a/bootstrap/generated-dists/opensuse152/bootstrap.sh
+++ b/bootstrap/generated-dists/opensuse152/bootstrap.sh
@@ -88,8 +88,8 @@ zypper --non-interactive install \
     python3-devel \
     python3-dnspython \
     python3-gpg \
-    python3-iso8601 \
     python3-pyasn1 \
+    python3-python-dateutil \
     python3-setproctitle \
     readline-devel \
     rng-tools \
diff --git a/bootstrap/generated-dists/opensuse152/packages.yml b/bootstrap/generated-dists/opensuse152/packages.yml
index 75a37074791..05b3779a2fd 100644
--- a/bootstrap/generated-dists/opensuse152/packages.yml
+++ b/bootstrap/generated-dists/opensuse152/packages.yml
@@ -76,8 +76,8 @@ packages:
   - python3-devel
   - python3-dnspython
   - python3-gpg
-  - python3-iso8601
   - python3-pyasn1
+  - python3-python-dateutil
   - python3-setproctitle
   - readline-devel
   - rng-tools
diff --git a/bootstrap/sha1sum.txt b/bootstrap/sha1sum.txt
index 0e70f1937b9..e7de92cc504 100644
--- a/bootstrap/sha1sum.txt
+++ b/bootstrap/sha1sum.txt
@@ -1 +1 @@
-11d550c08430787a5b0eb8dc847977ffffe12bbe
+b5333a93306e20ba549f5fac3c6c74e0b103c1d6
diff --git a/python/wscript b/python/wscript
index b33200e41d9..9815e816d35 100644
--- a/python/wscript
+++ b/python/wscript
@@ -5,7 +5,6 @@ from waflib import Options, Errors
 
 # work out what python external libraries we need to be successful
 selftest_pkgs = {
-    'iso8601': 'python3-iso8601',
     'cryptography': 'python3-cryptography',
     'pyasn1': 'python3-pyasn1'
 }
@@ -16,12 +15,14 @@ ad_dc_pkgs = {
 }
 
 
-def find_third_party_module(conf, module, package):
+def find_third_party_module(conf, module, package, required=True):
     conf.COMPOUND_START("Checking for system installation of Python module %s" % module)
     try:
         __import__(module)
     except ImportError:
         conf.COMPOUND_END(False)
+        if not required:
+            return False
         raise Errors.WafError("""\
         Unable to find Python module '%s'. Please install the system package: %s'.
 """ % (module, package))
@@ -29,6 +30,8 @@ def find_third_party_module(conf, module, package):
         # Installed on the system
         conf.COMPOUND_END("system")
 
+    return True
+
 
 def configure(conf):
     if conf.env.disable_python:
@@ -73,6 +76,20 @@ def configure(conf):
         for module, package in selftest_pkgs.items():
             find_third_party_module(conf, module, package)
 
+        # Prefer dateutil.parser which is much more widely used.
+        if not find_third_party_module(conf,
+                                       'dateutil.parser',
+                                       'python3-dateutilis',
+                                       required=False):
+            if not find_third_party_module(conf,
+                                           'iso8601',
+                                           'python3-iso8601',
+                                           required=False):
+                raise Errors.WafError("Could not find Python package "
+                                      "'python3-dateutils' nor "
+                                      "'python3-iso8601'. Please install "
+                                      "one of the packages.")
+
     if not Options.options.without_ad_dc:
         for module, package in ad_dc_pkgs.items():
             find_third_party_module(conf, module, package)
@@ -117,5 +134,5 @@ def build(bld):
         bld.SAMBA_SCRIPT('samba_python_files',
                          pattern='samba/**/*.py',
                          installdir='python')
-        
+
         bld.INSTALL_WILDCARD('${PYTHONARCHDIR}', 'samba/**/*.py', flat=False)


-- 
Samba Shared Repository



More information about the samba-cvs mailing list