Bug 6479 - RHEL makerpms.sh failed
Summary: RHEL makerpms.sh failed
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Packaging (show other bugs)
Version: 3.0.34
Hardware: x86 Linux
: P3 normal
Target Milestone: none
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
: 6501 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-06-16 08:27 UTC by Markus Kahle
Modified: 2009-12-11 05:03 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Kahle 2009-06-16 08:27:02 UTC
Tried to create the rpm-packages of samba 3.0.34 as usual, but when executing packaging/RHEL/makerpms.sh, it quits with the following error:

-------------
/usr/src/redhat/BUILD/samba-3.0.34/source/client/mount.cifs.c:1404: undefined reference to `unlock_mtab'
/tmp/ccVAsBLG.o(.text+0x2674):/usr/src/redhat/BUILD/samba-3.0.34/source/client/mount.cifs.c:1405: undefined reference to `lock_mtab'
/tmp/ccVAsBLG.o(.text+0x27d8):/usr/src/redhat/BUILD/samba-3.0.34/source/client/mount.cifs.c:1451: undefined reference to `unlock_mtab'
/tmp/ccVAsBLG.o(.text+0x2907):/usr/src/redhat/BUILD/samba-3.0.34/source/client/mount.cifs.c:1413: undefined reference to `unlock_mtab'
collect2: ld returned 1 exit status
Fehler: Bad exit status from /var/tmp/rpm-tmp.80117 (%build
-------------

After searching the net, i came to the following solution (build seems to work now, but haven't installed the 3.0.34 yet.

Patch / Diff for packaging/RHEL/samba.spec:
-------------

--- samba.spec.orig     2009-01-19 11:40:51.000000000 +0100
+++ samba.spec  2009-06-16 14:47:53.000000000 +0200
@@ -139,7 +139,8 @@
         --with-acl-support \
        --with-ads \
         --with-automount \
-        --with-fhs \
+        --with-cifsmount \
+       --with-fhs \
        --with-pam_smbpass \
        --with-libsmbclient \
        --with-libsmbsharemodes \
@@ -170,12 +171,6 @@
 make CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE" %{?_smp_mflags} \
        all modules pam_smbpass

-## build the cifs fs mount helper
-cd client
-gcc  -o mount.cifs $RPM_OPT_FLAGS  -D_GNU_SOURCE -Wall -D_GNU_SOURCE -D_LARGEFILE64_SOURCE mount.cifs.c
-gcc  -o umount.cifs $RPM_OPT_FLAGS  -D_GNU_SOURCE -Wall -D_GNU_SOURCE -D_LARGEFILE64_SOURCE umount.cifs.c
-cd ..
-
 # Remove some permission bits to avoid to many dependencies
 cd ..
 find examples docs -type f | xargs -r chmod -x
@@ -265,8 +260,8 @@
 install -m755 setup/smbprint $RPM_BUILD_ROOT%{_bindir}
 install -m644 setup/smbusers $RPM_BUILD_ROOT%{_sysconfdir}/samba/smbusers
 install -m644 setup/smb.conf $RPM_BUILD_ROOT%{_sysconfdir}/samba/smb.conf
-install -m755 source/client/mount.cifs $RPM_BUILD_ROOT/sbin/mount.cifs
-install -m755 source/client/umount.cifs $RPM_BUILD_ROOT/sbin/umount.cifs
+install -m755 source/bin/mount.cifs $RPM_BUILD_ROOT/sbin/mount.cifs
+install -m755 source/bin/umount.cifs $RPM_BUILD_ROOT/sbin/umount.cifs
 install -m755 source/script/mksmbpasswd.sh $RPM_BUILD_ROOT%{_bindir}

 /bin/rm $RPM_BUILD_ROOT%{_sbindir}/*mount.cifs
@@ -393,7 +388,7 @@
 %{_mandir}/man1/wbinfo.1*
 %{_mandir}/man8/vfs_*.8*
 %{_mandir}/man8/idmap_*.8*
-
+%{_mandir}/man8/cifs.*.8.*

 ##########

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

It seems to be a problem with the single gcc build command of mount.cifs and umount.cifs. So I deleted those lines and inserted --with-cifsmount as a build-option. Some paths need to be altered also and a cifs.* man page was created additionally , which I added to the standard samba rpm package.

Maybe this changes need to be done to the samba 3.2 and samba 3.3 RHEL packaging-script also ?
Comment 1 Karolin Seeger 2009-06-24 02:11:25 UTC
*** Bug 6501 has been marked as a duplicate of this bug. ***
Comment 2 Karolin Seeger 2009-12-11 05:03:28 UTC
Works for me in current v3-4-test branch.
Closing out bug report.
Please reopen if it's still an issue.

Thanks for reporting!