On 10/01/2012 11:24 AM, Alexander Bokovoy wrote:
> Hi,
> 
> The patch attached fixes Fedora build system issue with unified samba
> package (samba/samba4 packages got merged in Fedora 18 and Rawhide
> recently) since we depend on a wbclient.h header file path to which
> included versioned directory name previously (samba-4.0/ vs samba/).
> 

I am not convinced this is a correct approach, this was failing on my Fedora 18
instance anyway:

# make rpms
...
checking for NDR... yes
checking for SAMBAUTIL... yes
checking for samba-4.0/wbclient.h... no
checking for samba/wbclient.h... no
configure: error: samba/wbclient.h not found
make: *** [bootstrap-autogen] Error 1

The problem was that samba-devel package is no longer providing wbclient.h
header file:

# rpm -qR samba-devel-4.0.0-150.fc18.rc1.x86_64 | grep wbclient.h
#

I had a discussion with Andreas (CC-ed), the root cause was a missing
libwbclient-devel package which is the new provider of the samba-4.0/wbclient.h
file. He was also not aware of /usr/include/samba-4.0/ -> /usr/include/samba/
change.

I created a new patch with recommended approach (attached). Could you please
check if it is OK? It worked for me on both Fedora 17 and 18.

Thanks,
Martin
From cc2c6be1c677a5ed8c923742d76827e1a2887470 Mon Sep 17 00:00:00 2001
From: Martin Kosek <mko...@redhat.com>
Date: Mon, 1 Oct 2012 15:32:36 +0200
Subject: [PATCH] Add support for unified samba packages

Fedora 18 and later has moved unified samba and samba4 packages. Update
Requires and BuildRequires in spec file to require correct versions.

Also require libwbclient-devel which now provides libwbclient.h instead
of samba4-devel package.
---
 freeipa.spec.in | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/freeipa.spec.in b/freeipa.spec.in
index ef9678ec25d5ab8ed064657904c17a4f52e85eac..c86c08acca0c895e858aeea3f167254536cecd83 100644
--- a/freeipa.spec.in
+++ b/freeipa.spec.in
@@ -31,8 +31,14 @@ BuildRequires:  policycoreutils >= %{POLICYCOREUTILSVER}
 %if 0%{?fedora} >= 16
 BuildRequires:  systemd-units
 %endif
+%if 0%{?fedora} >= 18
+BuildRequires:  samba-devel >= 4.0.0-150
+BuildRequires:  samba-python
+BuildRequires:  libwbclient-devel
+%else
 BuildRequires:  samba4-devel >= 4.0.0-139
 BuildRequires:  samba4-python
+%endif
 BuildRequires:  libtalloc-devel
 BuildRequires:  libtevent-devel
 %endif
@@ -214,10 +220,16 @@ Summary: Virtual package to install packages required for Active Directory trust
 Group: System Environment/Base
 Requires: %{name}-server = %version-%release
 Requires: python-crypto
+%if 0%{?fedora} >= 18
+Requires: samba-python
+Requires: samba
+Requires: samba-winbind
+%else
 Requires: samba4-python
 Requires: samba4
-Requires: libsss_idmap
 Requires: samba4-winbind
+%endif
+Requires: libsss_idmap
 
 %description server-trust-ad
 Cross-realm trusts with Active Directory in IPA require working Samba 4 installation.
@@ -748,6 +760,10 @@ fi
 %ghost %attr(0644,root,apache) %config(noreplace) %{_sysconfdir}/ipa/ca.crt
 
 %changelog
+* Mon Oct  1 2012 Martin Kosek <mko...@redhat.com> - 2.99.0-47
+- Require samba packages instead of samba4 packages obsoleted in Fedora 18 and later
+- Add libwbclient-devel BuildRequires to pick up libwbclient.h on Fedora 18 and later
+
 * Tue Sep 18 2012 Petr Viktorin <pvikt...@redhat.com> - 2.99.0-46
 - Set certmonger minimum version to 0.60 for Dogtag 10 support.
 
-- 
1.7.11.4

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to