Bug 3440 - SRPM fails to build on Fedora Core x86_64
SRPM fails to build on Fedora Core x86_64
Status: RESOLVED FIXED
Product: Samba 3.0
Classification: Unclassified
Component: Packaging
3.0.21a
x64 Linux
: P3 normal
: none
Assigned To: Gerald (Jerry) Carter
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-01-24 08:44 UTC by Diego Remolina
Modified: 2006-01-25 05:55 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Remolina 2006-01-24 08:44:01 UTC
My ultimate goal is to use this SRPM for RHEL4 and CentOS.  When it failed building on those OSs, then I tried on Fedora Core 4 which also failed.

After comparing the samba.spec from samba.org and the one that comes with the samba-3.0.10 srpm on RHEL, I have adjusted a few things that seem to make things right.

I initially only modified the make install section; however, after only modifying that section, I found problems with some dat files that samba wanted to find in /usr/lib/samba rather than in /usr/lib64/samba by simply installing the rpms and running testparm.  I went ahead and also modified the configure section, rebuilt the rpms and now testparm does not complain about the dat files which means it is finding them in /usr/lib64/samba.

Further testing of the rpms is still required to make sure things will work correctly.  On My first try with the rpms made after having only modified the make install section of the srpm, the server would not allow users to access the shares (user/password combinations would fail), so I rolled back to the old version. I will try and test the new rpms and report back.

This is the patch for the original samba.spec file.

-------------------begin patch----------------------------
--- samba.spec.orig     2006-01-23 14:00:39.000000000 -0500
+++ samba.spec  2006-01-24 10:33:31.000000000 -0500
@@ -109,7 +109,14 @@ CFLAGS="$RPM_OPT_FLAGS" ./configure \
        --prefix=%{_prefix} \
        --localstatedir=/var \
        --sysconfdir=/etc \
+       --with-libdir=%{_libdir}/samba \
+       --with-lockdir=/var/cache/samba \
+       --with-logfilebase=/var/log/samba \
+       --with-mandir=%{_mandir} \
+       --with-piddir=/var/run \
        --with-privatedir=%{_sysconfdir}/samba \
+       --with-sambabook=%{_datadir}/swat/using_samba \
+       --with-swatdir=%{_datadir}/swat \
        --with-fhs \
        --with-quotas \
        --with-smbmount \
@@ -117,10 +124,9 @@ CFLAGS="$RPM_OPT_FLAGS" ./configure \
        --with-pam_smbpass \
        --with-syslog \
        --with-utmp \
-       --with-sambabook=%{_datadir}/swat/using_samba \
-       --with-swatdir=%{_datadir}/swat \
        --with-libsmbclient \
        --with-acl-support \
+       --with-automount \
        --with-shared-modules=idmap_rid \
        --enable-cups=yes
 make showlayout
@@ -145,8 +151,21 @@ mkdir -p $RPM_BUILD_ROOT/%{_datadir}/sam

 cd source

-make DESTDIR=$RPM_BUILD_ROOT \
-       install
+%makeinstall \
+        BINDIR=$RPM_BUILD_ROOT%{_bindir} \
+        BASEDIR=$RPM_BUILD_ROOT%{_prefix} \
+        SBINDIR=$RPM_BUILD_ROOT%{_sbindir} \
+        DATADIR=$RPM_BUILD_ROOT%{_datadir} \
+        LOCKDIR=$RPM_BUILD_ROOT/var/cache/samba \
+        PRIVATEDIR=$RPM_BUILD_ROOT%{_sysconfdir}/samba \
+        LIBDIR=$RPM_BUILD_ROOT%{_libdir}/samba \
+        CONFIGDIR=$RPM_BUILD_ROOT%{_sysconfdir}/samba \
+        MANDIR=$RPM_BUILD_ROOT%{_mandir} \
+        VARDIR=$RPM_BUILD_ROOT/var/log/samba \
+        CODEPAGEDIR=$RPM_BUILD_ROOT%{_datadir}/samba/codepages \
+        SWATDIR=$RPM_BUILD_ROOT%{_datadir}/swat \
+        SAMBABOOK=$RPM_BUILD_ROOT%{_datadir}/swat/using_samba \
+        PIDDIR=$RPM_BUILD_ROOT/var/run

 cd ..

@@ -403,8 +422,11 @@ fi
 %{_mandir}/man8/winbindd.8*

 %changelog
+* Tue Jan 24 2006 Diego Remolina <dijuremo@ibb.gatech.edu>
+- Adjusted the configure and make install sections to include
+  paths for things like %{_libdir} so that the srpm builds
+  correctly on x86_64 systems in which things should go under
+  /usr/lib64 rather than /usr/lib.
+
 * Fri Jan 16 2004 Gerald (Jerry) Carter <jerry@samba,org>
 - Removed ChangeLog entries since they are kept in CVS
-
-
-
--------------------end patch-----------------------------
Comment 1 Gerald (Jerry) Carter 2006-01-25 05:55:45 UTC
Thanks Deigo.  I already ahve pending patches for this.
Should be cleaned up in 3.0.21b