Bug 128704

Summary: "rpmbuild -bb samba.spec" overwrites /sbin/mount.smbfs symlink
Product: Red Hat Enterprise Linux 3 Reporter: Juanjo Villaplana <villapla>
Component: sambaAssignee: Jay Fenlason <fenlason>
Status: CLOSED ERRATA QA Contact: David Lawrence <dkl>
Severity: low Docs Contact:
Priority: medium    
Version: 3.0CC: jfeeney
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: 3.0.4-7.3E Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-10-20 15:49:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
installbin.sh patch none

Description Juanjo Villaplana 2004-07-28 12:39:54 UTC
Description of problem:

Rebuilding samba source RPM has the side effect of overwriting
/sbin/mount.smbfs:

lrwxrwxrwx    1 root     root           42 Jul 27 12:44
/sbin/mount.smbfs -> /var/tmp/samba-3.0.4-root/usr/bin/smbmount

Version-Release number of selected component (if applicable):

Observed in 3.0.4-6.3E

How reproducible:

Always.

Steps to Reproduce:
1. Install samba source rpm.
2. Run "rpmbuild -bb /usr/src/redhat/SPECS/samba.spec"
3.
  
Actual results:

/sbin/mount.smbfs symlink changes from /usr/bin/smbmount to
/var/tmp/samba-3.0.4-root/usr/bin/smbmount.

Expected results:

No system file has to be modified during the rebuild process.

Additional info:

The samba source file:

  samba-3.0.4/source/script/installbin.sh

considers "smbmount" as a special case during the install process, and
crates a symlink for "mount.smbfs":

  ln -sf $BINDIR/$p2 $DESTDIR/sbin/mount.smbfs

since redhat's spec file doesn't use "DESTDIR" in %makeinstall, this
variable is empty and /sbin/mount.smbfs is overwriten.

Given that the correct symlink is created in the spec section "#
Install other stuff". This problem could be solved if installbin.sh
doesn't consider smbmount as a special case (see attached patch).

Comment 1 Juanjo Villaplana 2004-07-28 12:41:04 UTC
Created attachment 102245 [details]
installbin.sh patch

Comment 2 David Lawrence 2004-07-29 07:56:36 UTC
Verified bug on rebuild of errata srpm on stable 3AS box.

.qa.[root@bender SPECS]# ls -al /sbin/mount.smb*
lrwxrwxrwx    1 root     root           19 Jul 25 05:39
/sbin/mount.smb -> ../usr/bin/smbmount
lrwxrwxrwx    1 root     root           42 Jul 29 03:52
/sbin/mount.smbfs -> /var/tmp/samba-3.0.4-root/usr/bin/smbmount