#16 Cleanup spec file and support `rpmbuild --rebuils --with testsuite samba.src.rpm` again
Merged 3 years ago by abbra. Opened 3 years ago by asn.
rpms/ asn/samba master-fix-ok  into  master

Fix running --with testsuite
Andreas Schneider • 3 years ago  
Update internal resolv_wrapper to 1.1.7
Andreas Schneider • 3 years ago  
Fixed dbcheck running in a release tarball
Andreas Schneider • 3 years ago  
Do not use %make_build
Andreas Schneider • 3 years ago  
Use %global instead of %define for variables
Andreas Schneider • 3 years ago  
Update comment for the testsuite
Andreas Schneider • 3 years ago  
Use %bcond_without for vfs_io_uring
Andreas Schneider • 3 years ago  
Move %bcond_without winexe further up
Andreas Schneider • 3 years ago  
Use %bcond_without for AD DC
Andreas Schneider • 3 years ago  
Use %bcond_without for vfs_glusterfs
Andreas Schneider • 3 years ago  
Use %bcond_without for vfs_cephfs
Andreas Schneider • 3 years ago  
Use %bcond_without for libwbclient
Andreas Schneider • 3 years ago  
Use %bcond_without for libsmbclient
Andreas Schneider • 3 years ago  
Always build with profiling support
Andreas Schneider • 3 years ago  
file added
+66
@@ -0,0 +1,66 @@ 

+ From e3629a3924107507be9ddb2c001f9843854ddf3b Mon Sep 17 00:00:00 2001

+ From: Andreas Schneider <asn@samba.org>

+ Date: Tue, 25 Aug 2020 17:39:18 +0200

+ Subject: [PATCH] third_party: Update resolv_wrapper to version 1.1.7

+ 

+ This fixes some Samba tests which redirect stderr to stdout and then get

+ more messages than expected.

+ 

+ Signed-off-by: Andreas Schneider <asn@samba.org>

+ ---

+  buildtools/wafsamba/samba_third_party.py    | 2 +-

+  third_party/resolv_wrapper/resolv_wrapper.c | 4 ++--

+  third_party/resolv_wrapper/wscript          | 2 +-

+  3 files changed, 4 insertions(+), 4 deletions(-)

+ 

+ diff --git a/buildtools/wafsamba/samba_third_party.py b/buildtools/wafsamba/samba_third_party.py

+ index 318da4f4eff..bc2b21f2a55 100644

+ --- a/buildtools/wafsamba/samba_third_party.py

+ +++ b/buildtools/wafsamba/samba_third_party.py

+ @@ -34,7 +34,7 @@ Build.BuildContext.CHECK_NSS_WRAPPER = CHECK_NSS_WRAPPER

+  

+  @conf

+  def CHECK_RESOLV_WRAPPER(conf):

+ -    return conf.CHECK_BUNDLED_SYSTEM_PKG('resolv_wrapper', minversion='1.1.6')

+ +    return conf.CHECK_BUNDLED_SYSTEM_PKG('resolv_wrapper', minversion='1.1.7')

+  Build.BuildContext.CHECK_RESOLV_WRAPPER = CHECK_RESOLV_WRAPPER

+  

+  @conf

+ diff --git a/third_party/resolv_wrapper/resolv_wrapper.c b/third_party/resolv_wrapper/resolv_wrapper.c

+ index 0d3f34ce591..b69a55a80e0 100644

+ --- a/third_party/resolv_wrapper/resolv_wrapper.c

+ +++ b/third_party/resolv_wrapper/resolv_wrapper.c

+ @@ -1844,7 +1844,7 @@ static int rwrap_parse_resolv_conf(struct __res_state *state,

+  

+  	fp = fopen(resolv_conf, "r");

+  	if (fp == NULL) {

+ -		RWRAP_LOG(RWRAP_LOG_ERROR,

+ +		RWRAP_LOG(RWRAP_LOG_WARN,

+  			  "Opening %s failed: %s",

+  			  resolv_conf, strerror(errno));

+  		return -1;

+ @@ -1930,7 +1930,7 @@ static int rwrap_parse_resolv_conf(struct __res_state *state,

+  	fclose(fp);

+  

+  	if (nserv == 0) {

+ -		RWRAP_LOG(RWRAP_LOG_ERROR,

+ +		RWRAP_LOG(RWRAP_LOG_WARN,

+  			  "No usable nameservers found in %s",

+  			  resolv_conf);

+  		errno = ESRCH;

+ diff --git a/third_party/resolv_wrapper/wscript b/third_party/resolv_wrapper/wscript

+ index ea3df498a6e..a7f18389b0f 100644

+ --- a/third_party/resolv_wrapper/wscript

+ +++ b/third_party/resolv_wrapper/wscript

+ @@ -2,7 +2,7 @@

+  

+  import os

+  

+ -VERSION="1.1.6"

+ +VERSION="1.1.7"

+  

+  def configure(conf):

+      if conf.CHECK_RESOLV_WRAPPER():

+ -- 

+ GitLab

+ 

file added
+1389
The added file is too large to be shown here, see it at: 1624.patch
file added
+197
@@ -0,0 +1,197 @@ 

+ From 0daa6a2bc688146f4e1d7b5604a6fe231f6d069e Mon Sep 17 00:00:00 2001

+ From: Andreas Schneider <asn@samba.org>

+ Date: Thu, 22 Oct 2020 11:08:19 +0200

+ Subject: [PATCH 1/5] s3:script: Fix test_dfree_quota.sh

+ 

+ source3/script/tests/test_dfree_quota.sh: line 200: [: missing `]'

+ 

+ BUG: https://bugzilla.samba.org/show_bug.cgi?id=14550

+ 

+ Signed-off-by: Andreas Schneider <asn@samba.org>

+ ---

+  source3/script/tests/test_dfree_quota.sh | 2 +-

+  1 file changed, 1 insertion(+), 1 deletion(-)

+ 

+ diff --git a/source3/script/tests/test_dfree_quota.sh b/source3/script/tests/test_dfree_quota.sh

+ index e86d431180a..a1403a8c4ba 100755

+ --- a/source3/script/tests/test_dfree_quota.sh

+ +++ b/source3/script/tests/test_dfree_quota.sh

+ @@ -197,7 +197,7 @@ test_smbcquotas() {

+  	return $status

+  }

+  

+ -if [ $protocol != "SMB3" -a $protocol != "NT1"]; then

+ +if [ $protocol != "SMB3" ] && [ $protocol != "NT1" ]; then

+  	echo "unsupported protocol $protocol" | subunit_fail_test "Test dfree quota"

+  	failed=`expr $failed + 1`

+  fi

+ -- 

+ GitLab

+ 

+ 

+ From 4867cafe766fa8aa69ce005dc5c4f05a4af676c8 Mon Sep 17 00:00:00 2001

+ From: Andreas Schneider <asn@samba.org>

+ Date: Thu, 22 Oct 2020 17:40:01 +0200

+ Subject: [PATCH 2/5] buildtools: Do not install binaries which are for

+  selftest

+ 

+ BUG: https://bugzilla.samba.org/show_bug.cgi?id=14550

+ 

+ Signed-off-by: Andreas Schneider <asn@samba.org>

+ ---

+  buildtools/wafsamba/wafsamba.py | 6 ++++--

+  1 file changed, 4 insertions(+), 2 deletions(-)

+ 

+ diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py

+ index 9f6ee4f5c7f..9dd6d05b91b 100644

+ --- a/buildtools/wafsamba/wafsamba.py

+ +++ b/buildtools/wafsamba/wafsamba.py

+ @@ -365,8 +365,10 @@ def SAMBA_BINARY(bld, binname, source,

+                   for_selftest=False):

+      '''define a Samba binary'''

+  

+ -    if for_selftest and not bld.CONFIG_GET('ENABLE_SELFTEST'):

+ -        enabled=False

+ +    if for_selftest:

+ +        install=False

+ +        if not bld.CONFIG_GET('ENABLE_SELFTEST'):

+ +            enabled=False

+  

+      if not enabled:

+          SET_TARGET_TYPE(bld, binname, 'DISABLED')

+ -- 

+ GitLab

+ 

+ 

+ From a4d5a21880b1cc8adfcbebd6940d06e2fdab3f14 Mon Sep 17 00:00:00 2001

+ From: Andreas Schneider <asn@samba.org>

+ Date: Thu, 22 Oct 2020 17:41:01 +0200

+ Subject: [PATCH 3/5] unittests: Mark test binaries for selftest

+ 

+ BUG: https://bugzilla.samba.org/show_bug.cgi?id=14550

+ 

+ Signed-off-by: Andreas Schneider <asn@samba.org>

+ ---

+  testsuite/unittests/wscript | 6 +++---

+  1 file changed, 3 insertions(+), 3 deletions(-)

+ 

+ diff --git a/testsuite/unittests/wscript b/testsuite/unittests/wscript

+ index 40fcb01ad57..2b4b37b92de 100644

+ --- a/testsuite/unittests/wscript

+ +++ b/testsuite/unittests/wscript

+ @@ -9,7 +9,7 @@ def build(bld):

+      bld.SAMBA_BINARY('test_krb5samba',

+                       source='test_krb5_samba.c',

+                       deps='krb5samba cmocka',

+ -                     install=False)

+ +                     for_selftest=True)

+  

+      bld.SAMBA_BINARY('test_sambafs_srv_pipe',

+                       source='test_sambafs_srv_pipe.c',

+ @@ -18,7 +18,7 @@ def build(bld):

+                            RPC_SAMR

+                            cmocka

+                            ''',

+ -                     install=False)

+ +                     for_selftest=True)

+  

+      bld.SAMBA_BINARY('test_lib_util_modules',

+                       source='test_lib_util_modules.c',

+ @@ -26,7 +26,7 @@ def build(bld):

+                            samba-modules

+                            cmocka

+                            ''',

+ -                     install=False)

+ +                     for_selftest=True)

+  

+      bld.SAMBA_MODULE('rpc_test_dummy_module',

+                       source='rpc_test_dummy_module.c',

+ -- 

+ GitLab

+ 

+ 

+ From d399761e8261a4de5ce9449f97ade61388e8a1e2 Mon Sep 17 00:00:00 2001

+ From: Andreas Schneider <asn@samba.org>

+ Date: Fri, 23 Oct 2020 08:53:43 +0200

+ Subject: [PATCH 4/5] s3:modules: Do not install vfs modules only used for

+  testing

+ 

+ BUG: https://bugzilla.samba.org/show_bug.cgi?id=14550

+ 

+ Signed-off-by: Andreas Schneider <asn@samba.org>

+ ---

+  source3/modules/wscript_build | 12 ++++++++----

+  1 file changed, 8 insertions(+), 4 deletions(-)

+ 

+ diff --git a/source3/modules/wscript_build b/source3/modules/wscript_build

+ index c4f3db22296..36b047ef79b 100644

+ --- a/source3/modules/wscript_build

+ +++ b/source3/modules/wscript_build

+ @@ -114,7 +114,8 @@ bld.SAMBA3_MODULE('vfs_fake_acls',

+                   deps='samba-util',

+                   init_function='',

+                   internal_module=bld.SAMBA3_IS_STATIC_MODULE('vfs_fake_acls'),

+ -                 enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_fake_acls'))

+ +                 enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_fake_acls'),

+ +                 install=False)

+  

+  bld.SAMBA3_MODULE('vfs_recycle',

+                   subsystem='vfs',

+ @@ -622,21 +623,24 @@ bld.SAMBA3_MODULE('vfs_fake_dfq',

+                   source='vfs_fake_dfq.c',

+                   init_function='',

+                   internal_module=bld.SAMBA3_IS_STATIC_MODULE('vfs_fake_dfq'),

+ -                 enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_fake_dfq'))

+ +                 enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_fake_dfq'),

+ +                 install=False)

+  

+  bld.SAMBA3_MODULE('vfs_error_inject',

+                   subsystem='vfs',

+                   source='vfs_error_inject.c',

+                   init_function='',

+                   internal_module=bld.SAMBA3_IS_STATIC_MODULE('vfs_error_inject'),

+ -                 enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_error_inject'))

+ +                 enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_error_inject'),

+ +                 install=False)

+  

+  bld.SAMBA3_MODULE('vfs_delay_inject',

+                   subsystem='vfs',

+                   source='vfs_delay_inject.c',

+                   init_function='',

+                   internal_module=bld.SAMBA3_IS_STATIC_MODULE('vfs_delay_inject'),

+ -                 enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_delay_inject'))

+ +                 enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_delay_inject'),

+ +                 install=False)

+  

+  bld.SAMBA3_MODULE('vfs_widelinks',

+                   subsystem='vfs',

+ -- 

+ GitLab

+ 

+ 

+ From 58e412ac6d9822aa65639d7c1171a2723ca3ee8a Mon Sep 17 00:00:00 2001

+ From: Andreas Schneider <asn@samba.org>

+ Date: Fri, 23 Oct 2020 08:57:12 +0200

+ Subject: [PATCH 5/5] examples:auth: Do not install example plugin

+ 

+ BUG: https://bugzilla.samba.org/show_bug.cgi?id=14550

+ 

+ Signed-off-by: Andreas Schneider <asn@samba.org>

+ ---

+  examples/auth/wscript_build | 3 ++-

+  1 file changed, 2 insertions(+), 1 deletion(-)

+ 

+ diff --git a/examples/auth/wscript_build b/examples/auth/wscript_build

+ index 91f5302918b..03221238e5f 100644

+ --- a/examples/auth/wscript_build

+ +++ b/examples/auth/wscript_build

+ @@ -6,4 +6,5 @@ bld.SAMBA3_MODULE('auth_skel',

+                   deps='samba-util',

+                   init_function='',

+                   internal_module=bld.SAMBA3_IS_STATIC_MODULE('auth_skel'),

+ -                 enabled=bld.SAMBA3_IS_ENABLED_MODULE('auth_skel'))

+ +                 enabled=bld.SAMBA3_IS_ENABLED_MODULE('auth_skel'),

+ +                 install=False)

+ -- 

+ GitLab

+ 

file modified
+299 -159
@@ -1,100 +1,116 @@ 

- # rpmbuild --rebuild --with testsuite --without clustering samba.src.rpm

+ # The testsuite is disabled by default.

+ #

+ # To build and run the tests use:

+ #

+ # rpmbuild --rebuild --with testsuite samba.src.rpm

  #

- # The testsuite is disabled by default. Set --with testsuite or bcond_without

- # to run the Samba torture testsuite.

  %bcond_with testsuite

- # ctdb is enabled by default, you can disable it with: --without clustering

- %bcond_without clustering

  

- %define samba_requires_eq()  %(LC_ALL="C" echo '%*' | xargs -r rpm -q --qf 'Requires: %%{name} = %%{epoch}:%%{version}\\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not")

- 

- %define main_release 13

+ # Build with internal talloc, tevent, tdb and ldb.

+ #

+ # rpmbuild --rebuild --with=testsuite --with=includelibs samba.src.rpm

+ #

+ %bcond_with includelibs

  

- %define samba_version 4.13.0

- %define talloc_version 2.3.1

- %define tdb_version 1.4.3

- %define tevent_version 0.10.2

- %define ldb_version 2.2.0

- # This should be rc1 or nil

- %define pre_release %nil

+ # ctdb is enabled by default, you can disable it with: --without clustering

+ %bcond_without clustering

  

- %if "x%{?pre_release}" != "x"

- %define samba_release 0.%{main_release}.%{pre_release}%{?dist}

+ # Build with Active Directory Domain Controller support by default on Fedora

+ %if 0%{?fedora}

+ %bcond_without dc

  %else

- %define samba_release %{main_release}%{?dist}

+ %bcond_with dc

  %endif

  

- # This is a network daemon, do a hardened build

- # Enables PIE and full RELRO protection

- %global _hardened_build 1

- # Samba cannot be linked with -Wl,-z,defs (from hardened build config)

- # For exmple the samba-cluster-support library is marked to allow undefined

- # symbols in the samba build.

- #

- # https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/master/f/buildflags.md

- %undefine _strict_symbol_defs_build

+ # Build a libsmbclient package by default

+ %bcond_without libsmbclient

  

- %global with_libsmbclient 1

- %global with_libwbclient 1

+ # Build a libwbclient package by default

+ %bcond_without libwbclient

  

- %global with_profiling 1

+ # Build with winexe by default

+ %bcond_without winexe

  

- %global with_vfs_cephfs 0

+ # Build vfs_ceph module by default on 64bit Fedora

  %if 0%{?fedora}

+ 

  %ifarch aarch64 ppc64le s390x x86_64

- %global with_vfs_cephfs 1

+ %bcond_without vfs_cephfs

+ %else

+ %bcond_with vfs_cephfs

  #endifarch

  %endif

+ 

+ %else

+ %bcond_with vfs_cephfs

  #endif fedora

  %endif

  

- %global with_vfs_glusterfs 1

- %if 0%{?rhel}

- %global with_vfs_glusterfs 0

- # Only enable on x86_64

- %ifarch x86_64

- %global with_vfs_glusterfs 1

- #endif arch

- %endif

- #endif rhel

+ # Build vfs_gluster module by default on 64bit Fedora

+ %if 0%{?fedora}

+ 

+ %ifarch aarch64 ppc64le s390x x86_64

+ %bcond_without vfs_glusterfs

+ %else

+ %bcond_with vfs_glusterfs

+ #endifarch

  %endif

  

- %global libwbc_alternatives_version 0.15

- %global libwbc_alternatives_suffix %nil

- %if 0%{?__isa_bits} == 64

- %global libwbc_alternatives_suffix -64

+ %else

+ %bcond_with vfs_glusterfs

+ #endif fedora

  %endif

  

- %global with_dc 1

+ # Build vfs_io_uring module by default on 64bit Fedora

+ %if 0%{?fedora}

  

- %if 0%{?rhel}

- %global with_dc 0

+ %ifarch aarch64 ppc64le s390x x86_64

+ %bcond_without vfs_io_uring

+ %else

+ %bcond_with vfs_io_uring

+ #endifarch

  %endif

  

- %if %{with testsuite}

- %global with_dc 1

+ %else

+ %bcond_with vfs_io_uring

+ #endif fedora

  %endif

  

- %global required_mit_krb5 1.18

+ %define samba_requires_eq()  %(LC_ALL="C" echo '%*' | xargs -r rpm -q --qf 'Requires: %%{name} = %%{epoch}:%%{version}\\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not")

  

- %global with_clustering_support 0

+ %global main_release 14

  

- %if %{with clustering}

- %global with_clustering_support 1

+ %global samba_version 4.13.0

+ %global talloc_version 2.3.1

+ %global tdb_version 1.4.3

+ %global tevent_version 0.10.2

+ %global ldb_version 2.2.0

+ # This should be rc1 or nil

+ %global pre_release %nil

+ 

+ %global samba_release %{main_release}%{?dist}

+ %if "x%{?pre_release}" != "x"

+ %global samba_release 0.%{main_release}.%{pre_release}%{?dist}

  %endif

  

- # Enable winexe by default

- %bcond_without winexe

+ # This is a network daemon, do a hardened build

+ # Enables PIE and full RELRO protection

+ %global _hardened_build 1

+ # Samba cannot be linked with -Wl,-z,defs (from hardened build config)

+ # For exmple the samba-cluster-support library is marked to allow undefined

+ # symbols in the samba build.

+ #

+ # https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/master/f/buildflags.md

+ %undefine _strict_symbol_defs_build

  

- %global with_vfs_io_uring 0

- # We need liburing >= 0.4 which is not available in RHEL yet

- %if 0%{?fedora}

- %ifarch aarch64 ppc64le s390x x86_64 i686

- %global with_vfs_io_uring 1

- %endif

- # /fedora

+ %global libwbc_alternatives_version 0.15

+ %global libwbc_alternatives_suffix %nil

+ %if 0%{?__isa_bits} == 64

+ %global libwbc_alternatives_suffix -64

  %endif

  

+ %global required_mit_krb5 1.18

+ 

  %global _systemd_extra "Environment=KRB5CCNAME=FILE:/run/samba/krb5cc_samba"

  

  Name:           samba
@@ -108,9 +124,9 @@ 

  %endif

  

  %if 0%{?epoch} > 0

- %define samba_depver %{epoch}:%{version}-%{release}

+ %global samba_depver %{epoch}:%{version}-%{release}

  %else

- %define samba_depver %{version}-%{release}

+ %global samba_depver %{version}-%{release}

  %endif

  

  Summary:        Server and Client software to interoperate with Windows machines
@@ -135,6 +151,13 @@ 

  Patch3:         samba-dnspython-2.0.0-v4.13.patch

  Patch4:         samba-systemd-notification.patch

  

+ # Fix `make test` in release tarballs

+ Patch5:         https://gitlab.com/samba-team/samba/-/merge_requests/1624.patch

+ # Update resolv_wrapper to version 1.1.7

+ Patch6:         https://gitlab.com/samba-team/samba/-/merge_requests/1528.patch

+ # Do not install test binaries for selftest

+ Patch7:         https://gitlab.com/samba-team/samba/-/merge_requests/1635.patch

+ 

  Requires(pre): /usr/sbin/groupadd

  Requires(post): systemd

  Requires(preun): systemd
@@ -146,7 +169,7 @@ 

  Requires: %{name}-common-tools = %{samba_depver}

  Requires: %{name}-client-libs = %{samba_depver}

  Requires: %{name}-libs = %{samba_depver}

- %if %with_libwbclient

+ %if %{with libwbclient}

  Requires: libwbclient = %{samba_depver}

  %endif

  
@@ -224,27 +247,27 @@ 

  

  BuildRequires: pkgconfig(libsystemd)

  

- %if %{with_vfs_glusterfs}

+ %if %{with vfs_glusterfs}

  BuildRequires: glusterfs-api-devel >= 3.4.0.16

  BuildRequires: glusterfs-devel >= 3.4.0.16

  %endif

  

- %if %{with_vfs_cephfs}

+ %if %{with vfs_cephfs}

  BuildRequires: libcephfs-devel

  %endif

  

- %if %{with_vfs_io_uring}

+ %if %{with vfs_io_uring}

  BuildRequires: liburing-devel >= 0.4

  %endif

  

- %if %{with_dc}

+ %if %{with dc} || %{with testsuite}

  # Add python3-iso8601 to avoid that the

  # version in Samba is being packaged

  BuildRequires: python3-iso8601

  

  BuildRequires: bind

  BuildRequires: krb5-server >= %{required_mit_krb5}

- #endif with_dc

+ #endif with dc

  %endif

  

  # pidl requirements
@@ -252,6 +275,7 @@ 

  BuildRequires: perl(FindBin)

  BuildRequires: perl(Parse::Yapp)

  

+ %if %{without testsuite}

  BuildRequires: libtalloc-devel >= %{talloc_version}

  BuildRequires: python3-talloc-devel >= %{talloc_version}

  
@@ -263,17 +287,18 @@ 

  

  BuildRequires: libldb-devel >= %{ldb_version}

  BuildRequires: python3-ldb-devel >= %{ldb_version}

+ %else

+ BuildRequires: lmdb-devel

+ #endif without testsuite

+ %endif

  

- %if %{with testsuite} || %{with_dc}

+ %if %{with dc} || %{with testsuite}

+ BuildRequires: bind

+ BuildRequires: krb5-server >= %{required_mit_krb5}

  BuildRequires: ldb-tools

- BuildRequires: tdb-tools

  BuildRequires: python3-gpg

  BuildRequires: python3-markdown

- %endif

- 

- %if %{with_dc}

- BuildRequires: krb5-server >= %{required_mit_krb5}

- BuildRequires: bind

+ BuildRequires: tdb-tools

  %endif

  

  # filter out perl requirements pulled in from examples in the docdir.
@@ -292,10 +317,10 @@ 

  Requires: %{name}-common = %{samba_depver}

  Requires: %{name}-common-libs = %{samba_depver}

  Requires: %{name}-client-libs = %{samba_depver}

- %if %with_libsmbclient

+ %if %{with libsmbclient}

  Requires: libsmbclient = %{samba_depver}

  %endif

- %if %with_libwbclient

+ %if %{with libwbclient}

  Requires: libwbclient = %{samba_depver}

  %endif

  
@@ -316,7 +341,7 @@ 

  Requires(pre): %{name}-common = %{samba_depver}

  Requires: %{name}-common = %{samba_depver}

  Requires: %{name}-common-libs = %{samba_depver}

- %if %with_libwbclient

+ %if %{with libwbclient}

  Requires: libwbclient = %{samba_depver}

  %endif

  Requires: krb5-libs >= %{required_mit_krb5}
@@ -336,7 +361,7 @@ 

  Provides: samba4-common = %{samba_depver}

  Obsoletes: samba4-common < %{samba_depver}

  

- %if ! %{with_dc}

+ %if %{with dc} || %{with testsuite}

  Obsoletes: samba-dc < %{samba_depver}

  Obsoletes: samba-dc-libs < %{samba_depver}

  Obsoletes: samba-dc-bind-dlz < %{samba_depver}
@@ -352,7 +377,7 @@ 

  Requires(pre): samba-common = %{samba_depver}

  Requires: samba-common = %{samba_depver}

  Requires: %{name}-client-libs = %{samba_depver}

- %if %with_libwbclient

+ %if %{with libwbclient}

  Requires: libwbclient = %{samba_depver}

  %endif

  
@@ -366,7 +391,7 @@ 

  Requires: samba-common-libs = %{samba_depver}

  Requires: samba-client-libs = %{samba_depver}

  Requires: samba-libs = %{samba_depver}

- %if %with_libwbclient

+ %if %{with libwbclient}

  Requires: libwbclient = %{samba_depver}

  %endif

  
@@ -375,7 +400,7 @@ 

  SMB/CIFS clients.

  

  ### DC

- %if %{with_dc}

+ %if %{with dc} || %{with testsuite}

  %package dc

  Summary: Samba AD Domain Controller

  Requires: %{name} = %{samba_depver}
@@ -435,7 +460,7 @@ 

  %description dc-bind-dlz

  The %{name}-dc-bind-dlz package contains the libraries for bind to manage all

  name server related details of Samba AD.

- #endif with_dc

+ #endif with dc

  %endif

  

  ### DEVEL
@@ -453,7 +478,7 @@ 

  libraries in the Samba suite.

  

  ### CEPH

- %if %{with_vfs_cephfs}

+ %if %{with vfs_cephfs}

  %package vfs-cephfs

  Summary: Samba VFS module for Ceph distributed storage system

  Requires: %{name} = %{samba_depver}
@@ -461,11 +486,11 @@ 

  

  %description vfs-cephfs

  Samba VFS module for Ceph distributed storage system integration.

- #endif with_vfs_cephfs

+ #endif with vfs_cephfs

  %endif

  

  ### GLUSTER

- %if %{with_vfs_glusterfs}

+ %if %{with vfs_glusterfs}

  %package vfs-glusterfs

  Summary: Samba VFS module for GlusterFS

  Requires: glusterfs-api >= 3.4.0.16
@@ -474,7 +499,7 @@ 

  Requires: %{name}-common-libs = %{samba_depver}

  Requires: %{name}-client-libs = %{samba_depver}

  Requires: %{name}-libs = %{samba_depver}

- %if %with_libwbclient

+ %if %{with libwbclient}

  Requires: libwbclient = %{samba_depver}

  %endif

  
@@ -505,7 +530,7 @@ 

  Summary: Samba libraries

  Requires: %{name}-common-libs = %{samba_depver}

  Requires: %{name}-client-libs = %{samba_depver}

- %if %with_libwbclient

+ %if %{with libwbclient}

  Requires: libwbclient = %{samba_depver}

  %endif

  
@@ -517,14 +542,14 @@ 

  against the SMB, RPC and other protocols provided by the Samba suite.

  

  ### LIBSMBCLIENT

- %if %with_libsmbclient

+ %if %{with libsmbclient}

  %package -n libsmbclient

  Summary: The SMB client library

  Requires(pre): %{name}-common = %{samba_depver}

  Requires: %{name}-common = %{samba_depver}

  Requires: %{name}-common-libs = %{samba_depver}

  Requires: %{name}-client-libs = %{samba_depver}

- %if %with_libwbclient

+ %if %{with libwbclient}

  Requires: libwbclient = %{samba_depver}

  %endif

  
@@ -539,11 +564,11 @@ 

  The libsmbclient-devel package contains the header files and libraries needed

  to develop programs that link against the SMB client library in the Samba

  suite.

- #endif with_libsmbclient

+ #endif {with libsmbclient}

  %endif

  

  ### LIBWBCLIENT

- %if %with_libwbclient

+ %if %{with libwbclient}

  %package -n libwbclient

  Summary: The winbind client library

  Requires: %{name}-client-libs = %{samba_depver}
@@ -562,7 +587,7 @@ 

  %description -n libwbclient-devel

  The libwbclient-devel package provides developer tools for the wbclient

  library.

- #endif with_libwbclient

+ #endif {with libwbclient}

  %endif

  

  ### PYTHON3
@@ -577,10 +602,10 @@ 

  Requires: python3-tdb

  Requires: python3-ldb

  Requires: python3-dns

- %if %with_libsmbclient

+ %if %{with libsmbclient}

  Requires: libsmbclient = %{samba_depver}

  %endif

- %if %with_libwbclient

+ %if %{with libwbclient}

  Requires: libwbclient = %{samba_depver}

  %endif

  
@@ -598,7 +623,7 @@ 

  The python3-%{name}-test package contains the Python libraries used by the test suite of Samba.

  If you want to run full set of Samba tests, you need to install this package.

  

- %if %{with_dc}

+ %if %{with dc} || %{with testsuite}

  %package -n python3-samba-dc

  Summary: Samba Python libraries for Samba AD

  Requires: python3-%{name} = %{samba_depver}
@@ -635,14 +660,14 @@ 

  Requires: %{name}-client-libs = %{samba_depver}

  Requires: %{name}-libs = %{samba_depver}

  Requires: %{name}-test-libs = %{samba_depver}

- %if %with_dc

+ %if %{with dc} || %{with testsuite}

  Requires: %{name}-dc-libs = %{samba_depver}

  %endif

  Requires: %{name}-libs = %{samba_depver}

- %if %with_libsmbclient

+ %if %{with libsmbclient}

  Requires: libsmbclient = %{samba_depver}

  %endif

- %if %with_libwbclient

+ %if %{with libwbclient}

  Requires: libwbclient = %{samba_depver}

  %endif

  Requires: python3-%{name} = %{samba_depver}
@@ -661,7 +686,7 @@ 

  Requires: %{name}-common-libs = %{samba_depver}

  Requires: %{name}-client-libs = %{samba_depver}

  Requires: %{name}-libs = %{samba_depver}

- %if %with_libwbclient

+ %if %{with libwbclient}

  Requires: libwbclient = %{samba_depver}

  %endif

  
@@ -702,7 +727,7 @@ 

  Requires: %{name}-client-libs = %{samba_depver}

  Requires: %{name}-libs = %{samba_depver}

  Requires: %{name}-winbind = %{samba_depver}

- %if %with_libwbclient

+ %if %{with libwbclient}

  Requires: libwbclient = %{samba_depver}

  %endif

  
@@ -716,7 +741,7 @@ 

  ### WINBIND-KRB5-LOCATOR

  %package winbind-krb5-locator

  Summary: Samba winbind krb5 locator

- %if %with_libwbclient

+ %if %{with libwbclient}

  Requires: libwbclient = %{samba_depver}

  Requires: %{name}-winbind = %{samba_depver}

  %else
@@ -745,7 +770,7 @@ 

  Summary: Samba winbind modules

  Requires: %{name}-client-libs = %{samba_depver}

  Requires: %{name}-libs = %{samba_depver}

- %if %with_libwbclient

+ %if %{with libwbclient}

  Requires: libwbclient = %{samba_depver}

  %endif

  Requires: pam
@@ -765,7 +790,7 @@ 

  %endif

  

  ### CTDB

- %if %with_clustering_support

+ %if %{with clustering}

  %package -n ctdb

  Summary: A Clustered Database based on Samba's Trivial Database (TDB)

  
@@ -818,7 +843,7 @@ 

  projects to store temporary data. If an application is already using TDB for

  temporary data it is very easy to convert that application to be cluster aware

  and use CTDB instead.

- #endif with_clustering_support

+ #endif with clustering

  %endif

  

  
@@ -828,33 +853,42 @@ 

  %autosetup -n samba-%{version}%{pre_release} -p1

  

  %build

+ %if %{with includelibs}

  %global _talloc_lib ,talloc,pytalloc,pytalloc-util

  %global _tevent_lib ,tevent,pytevent

  %global _tdb_lib ,tdb,pytdb

  %global _ldb_lib ,ldb,pyldb,pyldb-util

- 

+ %else

  %global _talloc_lib ,!talloc,!pytalloc,!pytalloc-util

  %global _tevent_lib ,!tevent,!pytevent

  %global _tdb_lib ,!tdb,!pytdb

  %global _ldb_lib ,!ldb,!pyldb,!pyldb-util

+ #endif with includelibs

+ %endif

  

  %global _samba_libraries !zlib,!popt%{_talloc_lib}%{_tevent_lib}%{_tdb_lib}%{_ldb_lib}

  

  %global _samba_idmap_modules idmap_ad,idmap_rid,idmap_ldap,idmap_hash,idmap_tdb2

  %global _samba_pdb_modules pdb_tdbsam,pdb_ldap,pdb_smbpasswd,pdb_wbc_sam,pdb_samba4

+ 

+ %if %{with testsuite}

+ %global _samba_auth_modules auth_wbc,auth_unix,auth_server,auth_samba4,auth_skel

+ %global _samba_vfs_modules vfs_dfs_samba4,vfs_fake_dfq

+ %else

  %global _samba_auth_modules auth_wbc,auth_unix,auth_server,auth_samba4

  %global _samba_vfs_modules vfs_dfs_samba4

+ %endif

  

  %global _samba_modules %{_samba_idmap_modules},%{_samba_pdb_modules},%{_samba_auth_modules},%{_samba_vfs_modules}

  

  %global _libsmbclient %nil

  %global _libwbclient %nil

  

- %if ! %with_libsmbclient

+ %if %{without libsmbclient}

  %global _libsmbclient smbclient,

  %endif

  

- %if ! %with_libwbclient

+ %if %{without libwbclient}

  %global _libwbclient wbclient,

  %endif

  
@@ -882,23 +916,20 @@ 

          --with-pie \

          --with-relro \

          --without-fam \

- %if (! %with_libsmbclient) || (! %with_libwbclient)

+ %if (%{without libsmbclient}) || (%{without libwbclient})

          --private-libraries=%{_samba_private_libraries} \

  %endif

          --with-system-mitkrb5 \

          --with-experimental-mit-ad-dc \

- %if ! %with_dc

+ %if %{without dc} && %{without testsuite}

          --without-ad-dc \

  %endif

- %if ! %with_vfs_glusterfs

+ %if %{without vfs_glusterfs}

          --disable-glusterfs \

  %endif

- %if %with_clustering_support

+ %if %{with clustering}

          --with-cluster-support \

  %endif

- %if %with_profiling

-         --with-profiling-data \

- %endif

  %if %{with testsuite}

          --enable-selftest \

  %endif
@@ -910,7 +941,8 @@ 

          --systemd-winbind-extra=%{_systemd_extra} \

          --systemd-samba-extra=%{_systemd_extra}

  

- %make_build

+ # Do not use %%make_build, make is just a wrapper around waf in Samba!

+ %{__make} %{?_smp_mflags} %{_make_verbose}

  

  pushd pidl

  %__perl Makefile.PL PREFIX=%{_prefix}
@@ -975,13 +1007,13 @@ 

  install -d -m 0755 %{buildroot}%{_tmpfilesdir}

  # Create /run/samba.

  echo "d /run/samba  755 root root" > %{buildroot}%{_tmpfilesdir}/samba.conf

- %if %with_clustering_support

+ %if %{with clustering}

  echo "d /run/ctdb 755 root root" > %{buildroot}%{_tmpfilesdir}/ctdb.conf

  %endif

  

  install -d -m 0755 %{buildroot}%{_sysconfdir}/sysconfig

  install -m 0644 packaging/systemd/samba.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/samba

- %if %with_clustering_support

+ %if %{with clustering}

  cat > %{buildroot}%{_sysconfdir}/sysconfig/ctdb <<EOF

  # CTDB configuration is now in %%{_sysconfdir}/ctdb/ctdb.conf

  EOF
@@ -992,7 +1024,7 @@ 

  

  install -m 0644 %{SOURCE201} packaging/README.downgrade

  

- %if %with_clustering_support

+ %if %{with clustering}

  install -m 0644 ctdb/config/ctdb.service %{buildroot}%{_unitdir}

  %endif

  
@@ -1005,7 +1037,7 @@ 

  install -d -m 0755 %{buildroot}%{_libdir}/krb5/plugins/libkrb5

  touch %{buildroot}%{_libdir}/krb5/plugins/libkrb5/winbind_krb5_locator.so

  

- %if ! %with_dc

+ %if %{without dc} && %{without testsuite}

  for i in \

      %{_libdir}/samba/libdfs-server-ad-samba4.so \

      %{_libdir}/samba/libdnsserver-common-samba4.so \
@@ -1071,11 +1103,11 @@ 

  done

  %endif

  

- %if ! %{with_vfs_glusterfs}

+ %if %{without vfs_glusterfs}

  rm -f %{buildroot}%{_mandir}/man8/vfs_glusterfs.8*

  %endif

  

- %if ! %{with_vfs_cephfs}

+ %if %{without vfs_cephfs}

  rm -f %{buildroot}%{_mandir}/man8/vfs_ceph.8*

  rm -f %{buildroot}%{_mandir}/man8/vfs_ceph_snapshots.8*

  %endif
@@ -1084,14 +1116,19 @@ 

  # the ldconfig-created links be recorded in the RPM.

  /sbin/ldconfig -N -n %{buildroot}%{_libdir}

  

- %if ! %with_dc

+ %if %{without dc} && %{without testsuite}

  for f in samba/libsamba-net-samba4.so \

           samba/libsamba-python-samba4.so \

           libsamba-policy.so* \

           pkgconfig/samba-policy.pc ; do

      rm -f %{buildroot}%{_libdir}/$f

  done

- #endif ! with_dc

+ #endif without dc

+ %endif

+ 

+ %if %{with testsuite}

+ rm -f %{buildroot}%{_mandir}/man8/vfs_nfs4acl_xattr.8*

+ #endif with testsuite

  %endif

  

  pushd pidl
@@ -1106,7 +1143,26 @@ 

  

  %if %{with testsuite}

  %check

- TDB_NO_FSYNC=1 %make_build test FAIL_IMMEDIATELY=1

+ #

+ # samba3.smb2.timestamps.*:

+ #

+ # The test fails on ext4 as it uses two high-order bits

+ # in the timestamp so the year 2038 problem is deferred till 2446.

+ # https://bugzilla.samba.org/show_bug.cgi?id=14546

+ #

+ for t in samba3.smb2.timestamps.time_t_15032385535 \

+          samba3.smb2.timestamps.time_t_10000000000 \

+          samba3.smb2.timestamps.time_t_4294967295 \

+          ; do

+     echo "^$t" >> selftest/knownfail.d/fedora.%{dist}

+ done

+ cat selftest/knownfail.d/fedora.%{dist}

+ 

+ export TDB_NO_FSYNC=1

+ export NMBD_DONT_LOG_STDOUT=1

+ export SMBD_DONT_LOG_STDOUT=1

+ export WINBINDD_DONT_LOG_STDOUT=1

+ make %{?_smp_mflags} test FAIL_IMMEDIATELY=1

  #endif with testsuite

  %endif

  
@@ -1149,7 +1205,7 @@ 

  

  %ldconfig_scriptlets common-libs

  

- %if %{with_dc}

+ %if %{with dc} || %{with testsuite}

  %ldconfig_scriptlets dc-libs

  

  %post dc
@@ -1160,7 +1216,7 @@ 

  

  %postun dc

  %systemd_postun_with_restart samba.service

- #endif with_dc

+ #endif with dc

  %endif

  

  %post krb5-printing
@@ -1175,11 +1231,11 @@ 

  

  %ldconfig_scriptlets libs

  

- %if %with_libsmbclient

+ %if %{with libsmbclient}

  %ldconfig_scriptlets -n libsmbclient

  %endif

  

- %if %with_libwbclient

+ %if %{with libwbclient}

  %posttrans -n libwbclient

  # It has to be posttrans here to make sure all files of a previous version

  # without alternatives support are removed
@@ -1226,7 +1282,7 @@ 

      fi

  fi

  

- #endif with_libwbclient

+ #endif {with libwbclient}

  %endif

  

  %ldconfig_scriptlets test
@@ -1261,7 +1317,7 @@ 

  

  %ldconfig_scriptlets winbind-modules

  

- %if %with_clustering_support

+ %if %{with clustering}

  %post -n ctdb

  /usr/bin/systemd-tmpfiles --create %{_tmpfilesdir}/ctdb.conf

  %systemd_post ctdb.service
@@ -1285,7 +1341,7 @@ 

  %{_sbindir}/eventlogadm

  %{_sbindir}/nmbd

  %{_sbindir}/smbd

- %if %{with_dc}

+ %if %{with dc} || %{with testsuite}

  # This is only used by vfs_dfs_samba4

  %{_libdir}/samba/libdfs-server-ad-samba4.so

  %endif
@@ -1303,7 +1359,7 @@ 

  %{_libdir}/samba/vfs/commit.so

  %{_libdir}/samba/vfs/crossrename.so

  %{_libdir}/samba/vfs/default_quota.so

- %if %{with_dc}

+ %if %{with dc} || %{with testsuite}

  %{_libdir}/samba/vfs/dfs_samba4.so

  %endif

  %{_libdir}/samba/vfs/dirsort.so
@@ -1315,7 +1371,7 @@ 

  %{_libdir}/samba/vfs/full_audit.so

  %{_libdir}/samba/vfs/gpfs.so

  %{_libdir}/samba/vfs/glusterfs_fuse.so

- %if %{with_vfs_io_uring}

+ %if %{with vfs_io_uring}

  %{_libdir}/samba/vfs/io_uring.so

  %endif

  %{_libdir}/samba/vfs/linux_xfs_sgid.so
@@ -1339,6 +1395,10 @@ 

  %{_libdir}/samba/vfs/worm.so

  %{_libdir}/samba/vfs/xattr_tdb.so

  

+ %if %{with testsuite}

+ %{_libdir}/samba/vfs/nfs4acl_xattr.so

+ %endif

+ 

  %dir %{_datadir}/samba

  %dir %{_datadir}/samba/mdssvc

  %{_datadir}/samba/mdssvc/elasticsearch_mappings.json
@@ -1372,7 +1432,7 @@ 

  %{_mandir}/man8/vfs_full_audit.8*

  %{_mandir}/man8/vfs_gpfs.8*

  %{_mandir}/man8/vfs_glusterfs_fuse.8*

- %if %{with_vfs_io_uring}

+ %if %{with vfs_io_uring}

  %{_mandir}/man8/vfs_io_uring.8*

  %endif

  %{_mandir}/man8/vfs_linux_xfs_sgid.8*
@@ -1452,6 +1512,31 @@ 

  %{_mandir}/man8/samba-regedit.8*

  %{_mandir}/man8/smbspool.8*

  

+ %if %{with includelibs}

+ %{_bindir}/ldbadd

+ %{_bindir}/ldbdel

+ %{_bindir}/ldbedit

+ %{_bindir}/ldbmodify

+ %{_bindir}/ldbrename

+ %{_bindir}/ldbsearch

+ %{_bindir}/tdbbackup

+ %{_bindir}/tdbdump

+ %{_bindir}/tdbrestore

+ %{_bindir}/tdbtool

+ 

+ %{_mandir}/man1/ldbadd.1.gz

+ %{_mandir}/man1/ldbdel.1.gz

+ %{_mandir}/man1/ldbedit.1.gz

+ %{_mandir}/man1/ldbmodify.1.gz

+ %{_mandir}/man1/ldbrename.1.gz

+ %{_mandir}/man1/ldbsearch.1.gz

+ %{_mandir}/man8/tdbbackup.8.gz

+ %{_mandir}/man8/tdbdump.8.gz

+ %{_mandir}/man8/tdbrestore.8.gz

+ %{_mandir}/man8/tdbtool.8.gz

+ #endif with includelibs

+ %endif

+ 

  ### CLIENT-LIBS

  %files client-libs

  %{_libdir}/libdcerpc-binding.so.*
@@ -1554,16 +1639,28 @@ 

  %{_libdir}/samba/libutil-setid-samba4.so

  %{_libdir}/samba/libutil-tdb-samba4.so

  

- %if ! %with_libwbclient

+ %if %{without libwbclient}

  %{_libdir}/samba/libwbclient.so.*

  %{_libdir}/samba/libwinbind-client-samba4.so

- #endif ! with_libwbclient

+ #endif without libwbclient

  %endif

  

- %if ! %with_libsmbclient

+ %if %{without libsmbclient}

  %{_libdir}/samba/libsmbclient.so.*

  %{_mandir}/man7/libsmbclient.7*

- #endif ! with_libsmbclient

+ #endif without libsmbclient

+ %endif

+ 

+ %if %{with includelibs}

+ %{_libdir}/samba/libldb-*.so

+ %{_libdir}/samba/libldb.so.*

+ %{_libdir}/samba/libtalloc.so.*

+ %{_libdir}/samba/libtdb.so.*

+ %{_libdir}/samba/libtevent.so.*

+ 

+ %{_mandir}/man3/ldb.3.gz

+ %{_mandir}/man3/talloc.3.gz

+ #endif with includelibs

  %endif

  

  ### COMMON
@@ -1616,7 +1713,7 @@ 

  %{_mandir}/man8/smbpasswd.8*

  

  ### DC

- %if %{with_dc}

+ %if %{with dc} || %{with testsuite}

  %files dc

  %{_unitdir}/samba.service

  %{_bindir}/samba-tool
@@ -1681,6 +1778,20 @@ 

  %{_libdir}/samba/ldb/update_keytab.so

  %{_libdir}/samba/ldb/vlv.so

  %{_libdir}/samba/ldb/wins_ldb.so

+ 

+ %if %{with includelibs}

+ %{_libdir}/samba/ldb/asq.so

+ %{_libdir}/samba/ldb/ldb.so

+ %{_libdir}/samba/ldb/mdb.so

+ %{_libdir}/samba/ldb/paged_searches.so

+ %{_libdir}/samba/ldb/rdn_name.so

+ %{_libdir}/samba/ldb/sample.so

+ %{_libdir}/samba/ldb/server_sort.so

+ %{_libdir}/samba/ldb/skel.so

+ %{_libdir}/samba/ldb/tdb.so

+ #endif with includelibs

+ %endif

+ 

  %{_libdir}/samba/vfs/posix_eadb.so

  %dir /var/lib/samba/sysvol

  %{_mandir}/man8/samba.8*
@@ -1701,6 +1812,11 @@ 

  %{_libdir}/samba/libdb-glue-samba4.so

  %{_libdir}/samba/libprocess-model-samba4.so

  %{_libdir}/samba/libservice-samba4.so

+ 

+ %if %{with testsuite}

+ %{_libdir}/samba/libntvfs-samba4.so

+ %endif

+ 

  %dir %{_libdir}/samba/process_model

  %{_libdir}/samba/process_model/prefork.so

  %{_libdir}/samba/process_model/standard.so
@@ -1718,6 +1834,11 @@ 

  %{_libdir}/samba/service/s3fs.so

  %{_libdir}/samba/service/winbindd.so

  %{_libdir}/samba/service/wrepl.so

+ 

+ %if %{with testsuite}

+ %{_libdir}/samba/service/smb.so

+ %endif

+ 

  %{_libdir}/libdcerpc-server.so.*

  %{_libdir}/samba/libdnsserver-common-samba4.so

  %{_libdir}/samba/libdsdb-module-samba4.so
@@ -1733,7 +1854,7 @@ 

  %{_libdir}/samba/bind9/dlz_bind9_10.so

  %{_libdir}/samba/bind9/dlz_bind9_11.so

  %{_libdir}/samba/bind9/dlz_bind9_12.so

- #endif with_dc

+ #endif with dc

  %endif

  

  ### DEVEL
@@ -1850,24 +1971,24 @@ 

  %{_libdir}/libsamba-passdb.so

  %{_libdir}/libsmbldap.so

  

- %if %with_dc

+ %if %{with dc} || %{with testsuite}

  %{_includedir}/samba-4.0/dcerpc_server.h

  %{_libdir}/libdcerpc-server.so

  %{_libdir}/pkgconfig/dcerpc_server.pc

  %endif

  

- %if ! %with_libsmbclient

+ %if %{without libsmbclient}

  %{_includedir}/samba-4.0/libsmbclient.h

- #endif ! with_libsmbclient

+ #endif without libsmbclient

  %endif

  

- %if ! %with_libwbclient

+ %if %{without libwbclient}

  %{_includedir}/samba-4.0/wbclient.h

- #endif ! with_libwbclient

+ #endif without libwbclient

  %endif

  

  ### VFS-CEPHFS

- %if %{with_vfs_cephfs}

+ %if %{with vfs_cephfs}

  %files vfs-cephfs

  %{_libdir}/samba/vfs/ceph.so

  %{_libdir}/samba/vfs/ceph_snapshots.so
@@ -1876,7 +1997,7 @@ 

  %endif

  

  ### VFS-GLUSTERFS

- %if %{with_vfs_glusterfs}

+ %if %{with vfs_glusterfs}

  %files vfs-glusterfs

  %{_libdir}/samba/vfs/glusterfs.so

  %{_mandir}/man8/vfs_glusterfs.8*
@@ -1901,7 +2022,7 @@ 

  %{_libdir}/samba/libxattr-tdb-samba4.so

  

  ### LIBSMBCLIENT

- %if %with_libsmbclient

+ %if %{with libsmbclient}

  %files -n libsmbclient

  %{_libdir}/libsmbclient.so.*

  
@@ -1911,11 +2032,11 @@ 

  %{_libdir}/libsmbclient.so

  %{_libdir}/pkgconfig/smbclient.pc

  %{_mandir}/man7/libsmbclient.7*

- #endif with_libsmbclient

+ #endif {with libsmbclient}

  %endif

  

  ### LIBWBCLIENT

- %if %with_libwbclient

+ %if %{with libwbclient}

  %files -n libwbclient

  %{_libdir}/samba/wbclient/libwbclient.so.*

  %{_libdir}/samba/libwinbind-client-samba4.so
@@ -1925,7 +2046,7 @@ 

  %{_includedir}/samba-4.0/wbclient.h

  %{_libdir}/samba/wbclient/libwbclient.so

  %{_libdir}/pkgconfig/wbclient.pc

- #endif with_libwbclient

+ #endif {with libwbclient}

  %endif

  

  ### PIDL
@@ -2217,7 +2338,22 @@ 

  %{_libdir}/samba/libsamba-net.*-samba4.so

  %{_libdir}/samba/libsamba-python.*-samba4.so

  

- %if %{with_dc}

+ %if %{with testsuite}

+ %{_libdir}/samba/libpyldb-util.*.so.*

+ 

+ %{python3_sitearch}/__pycache__/_ldb_text*.pyc

+ %{python3_sitearch}/__pycache__/_tdb_text*.pyc

+ %{python3_sitearch}/__pycache__/tevent*.pyc

+ %{python3_sitearch}/_ldb_text.py

+ %{python3_sitearch}/_tdb_text.py

+ %{python3_sitearch}/_tevent.cpython*.so

+ %{python3_sitearch}/ldb.cpython*.so

+ %{python3_sitearch}/tdb.cpython*.so

+ %{python3_sitearch}/tevent.py

+ #endif with testsuite

+ %endif

+ 

+ %if %{with dc} || %{with testsuite}

  %files -n python3-%{name}-dc

  %{python3_sitearch}/samba/samdb.py

  %{python3_sitearch}/samba/schema.py
@@ -2684,7 +2820,7 @@ 

  

  ### TEST-LIBS

  %files test-libs

- %if %with_dc

+ %if %{with dc} || %{with testsuite}

  %{_libdir}/samba/libdlz-bind9-for-torture-samba4.so

  %else

  %{_libdir}/samba/libdsdb-module-samba4.so
@@ -2728,7 +2864,7 @@ 

  %{_mandir}/man5/pam_winbind.conf.5*

  %{_mandir}/man8/pam_winbind.8*

  

- %if %with_clustering_support

+ %if %{with clustering}

  %files -n ctdb

  %doc ctdb/README

  %doc ctdb/doc/examples
@@ -3614,7 +3750,7 @@ 

  %dir %{_datadir}/ctdb/tests/UNIT/tool/scripts

  %{_datadir}/ctdb/tests/UNIT/tool/scripts/local.sh

  

- #endif with_clustering_support

+ #endif with clustering

  %endif

  

  %if %{with winexe}
@@ -3625,6 +3761,10 @@ 

  %endif

  

  %changelog

+ * Mon Oct 26 2020 Andreas Schneider <asn@redhat.com> - 4.13.0-14

+ - Fixed dbcheck running in a release tarball

+ - Updated internal resolv_wrapper copy to verison 1.1.7

+ 

  * Sun Oct 25 2020 Alexander Bokovoy <abokovoy@redhat.com> - 4.13.0-13

  - Report 'samba' daemon status back to systemd

  - Support dnspython 2.0.0 or later in samba_dnsupdate

This cleans up the spec file and brings back rpmbuild --rebuils --with testsuite samba.src.rpm support. However there are still failing tests. The investigation why they fail will take a bit longer.

Metadata Update from @asn:
- Request assigned

3 years ago

15 new commits added

  • Fix running --with testsuite
  • Update internal resolv_wrapper to 1.1.7
  • Fixed dbcheck running in a release tarball
  • Do not use %make_build
  • Use %global instead of %define for variables
  • Update comment for the testsuite
  • Use %bcond_without for vfs_io_uring
  • Move %bcond_without winexe further up
  • Remove unneeded with_clustering_support define
  • Use %bcond_without for AD DC
  • Use %bcond_without for vfs_glusterfs
  • Use %bcond_without for vfs_cephfs
  • Use %bcond_without for libwbclient
  • Use %bcond_without for libsmbclient
  • Always build with profiling support
3 years ago

Pull-Request has been merged by abbra

3 years ago