#7 rpcgen, rpcsvc-proto-devel, and libnsl2-devel are all provided by glibc on rhel 7 and are not in the repos
Closed 5 years ago by dstathis. Opened 5 years ago by dstathis.
rpms/ dstathis/samba master  into  master

file modified
+36 -10
@@ -32,6 +32,7 @@ 

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

  %undefine _strict_symbol_defs_build

  

+ 

  %global with_libsmbclient 1

  %global with_libwbclient 1

  
@@ -45,13 +46,6 @@ 

  %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

- %endif

  

  %global with_intel_aes_accel 0

  %ifarch x86_64
@@ -66,9 +60,18 @@ 

  

  %global with_mitkrb5 1

  %global with_dc 1

+ %global with_python3 1

+ %global new_libs 1

  

- %if 0%{?rhel}

+ %if ! ( 0%{?fedora} || 0%{?rhel} > 7 )

+ %global with_python3 0

+ %global new_libs 0

  %global with_dc 0

+ %global with_vfs_glusterfs 0

+ # Only enable on x86_64

+ %ifarch x86_64

+ %global with_vfs_glusterfs 1

+ %endif

  %endif

  

  %if %{with testsuite}
@@ -176,7 +179,6 @@ 

  BuildRequires: libattr-devel

  BuildRequires: libcap-devel

  BuildRequires: libcmocka-devel

- BuildRequires: libnsl2-devel

  BuildRequires: libtirpc-devel

  BuildRequires: libuuid-devel

  BuildRequires: libxslt
@@ -189,7 +191,9 @@ 

  BuildRequires: perl(Parse::Yapp)

  BuildRequires: popt-devel

  BuildRequires: python2-devel

+ %if %{with_python3}

  BuildRequires: python3-devel

+ %endif

  %if %{with_dc}

  BuildRequires: python2-dns

  # Add python2-iso8601 to avoid that the
@@ -201,8 +205,14 @@ 

  %endif # with_dc

  BuildRequires: quota-devel

  BuildRequires: readline-devel

+ %if 0%{?new_libs}

  BuildRequires: rpcgen

  BuildRequires: rpcsvc-proto-devel

+ BuildRequires: libnsl2-devel

+ %else

+ BuildRequires: glibc-common

+ BuildRequires: glibc-headers

+ %endif

  BuildRequires: sed

  BuildRequires: xfsprogs-devel

  BuildRequires: xz
@@ -234,28 +244,38 @@ 

  

  BuildRequires: libtalloc-devel >= %{talloc_version}

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

+ %if %{with_python3}

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

+ %endif

  

  BuildRequires: libtevent-devel >= %{tevent_version}

  BuildRequires: python2-tevent >= %{tevent_version}

+ %if %{with_python3}

  BuildRequires: python3-tevent >= %{tevent_version}

+ %endif

  

  BuildRequires: libtdb-devel >= %{tdb_version}

  BuildRequires: python2-tdb >= %{tdb_version}

+ %if %{with_python3}

  BuildRequires: python3-tdb >= %{tdb_version}

+ %endif

  

  BuildRequires: libldb-devel >= %{ldb_version}

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

+ %if %{with_python3}

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

+ %endif

  

  %if %{with testsuite}

  BuildRequires: ldb-tools

  BuildRequires: tdb-tools

  BuildRequires: python2-pygpgme

  BuildRequires: python2-markdown

+ %if %{with_python3}

  BuildRequires: python3-pygpgme

  BuildRequires: python3-markdown

  %endif

+ %endif

  

  %if %{with_dc}

  BuildRequires: krb5-server >= %{required_mit_krb5}
@@ -567,6 +587,7 @@ 

  to manage Samba AD.

  %endif

  

+ %if %{with_python3}

  ### PYTHON3

  %package -n python3-%{name}

  Summary: Samba Python3 libraries
@@ -603,6 +624,7 @@ 

  The python3-%{name}-dc package contains the Python libraries needed by programs

  to manage Samba AD.

  %endif

+ %endif

  

  ### PIDL

  %package pidl
@@ -922,6 +944,7 @@ 

      tests/dcerpc/integer.py

      tests/dcerpc/unix.py

  ")

+ %if %{with_python3}

  for file in $filenames; do

      filename="%{buildroot}/%{python3_sitearch}/samba/$file"

      if python3 -c "with open('$filename') as f: compile(f.read(), '$file', 'exec')"; then
@@ -932,6 +955,7 @@ 

          rm "$filename"

      fi

  done

+ %endif

  

  install -d -m 0755 %{buildroot}/usr/{sbin,bin}

  install -d -m 0755 %{buildroot}%{_libdir}/security
@@ -2300,8 +2324,9 @@ 

  %{python2_sitearch}/samba/tests/upgradeprovision.py*

  %{python2_sitearch}/samba/tests/upgradeprovisionneeddc.py*

  %{python2_sitearch}/samba/tests/xattr.py*

- %endif # rhel

+ %endif # with_dc

  

+ %if %{with_python3}

  ### PYTHON3

  %files -n python3-%{name}

  %dir %{python3_sitearch}/samba/
@@ -2870,6 +2895,7 @@ 

  %{python3_sitearch}/samba/xattr.py

  %{python3_sitearch}/samba/xattr_native.*.so

  %{python3_sitearch}/samba/xattr_tdb.*.so

+ %endif # with_python3

  

  ### TEST

  %files test

Fix build dependencies when building on rhel.

This will probably not be the right way to do it. Please use:

if 0%{?fedora} || 0%{?rhel} > 7

That's how I would have done it but the spec seems to be using %if 0%{?rhel}

Would it be helpful for me to change all of those?

1 new commit added

  • check for rhel 7 the correct way
5 years ago

1 new commit added

  • use with_python3 macro
5 years ago

Wait on this. More to come

I looked in to this more and the line "Recommends: nc" just can't be in the spec for rhel 7. I am going to do a new pull request with an el7 branch.

Pull-Request has been closed by dstathis

5 years ago