Bug 128704 - "rpmbuild -bb samba.spec" overwrites /sbin/mount.smbfs symlink
Summary: "rpmbuild -bb samba.spec" overwrites /sbin/mount.smbfs symlink
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: samba
Version: 3.0
Hardware: i386
OS: Linux
medium
low
Target Milestone: ---
Assignee: Jay Fenlason
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-07-28 12:39 UTC by Juanjo Villaplana
Modified: 2014-08-31 23:26 UTC (History)
1 user (show)

Fixed In Version: 3.0.4-7.3E
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-10-20 15:49:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
installbin.sh patch (475 bytes, text/plain)
2004-07-28 12:41 UTC, Juanjo Villaplana
no flags Details

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



Note You need to log in before you can comment on or make changes to this bug.