Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 4355 - rpm -U samba* removes existing /etc/smb.conf
Summary: rpm -U samba* removes existing /etc/smb.conf
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 6.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
: 4548 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-08-04 18:43 UTC by stanonik
Modified: 2008-05-01 15:37 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1999-08-16 22:49:47 UTC


Attachments (Terms of Use)

Description stanonik 1999-08-04 18:43:12 UTC
Updating samba using
samba-2.0.5a-1.i386.rpm  samba-client-2.0.5a-1.i386.rpm

rpm -U samba* removes the existing /etc/smb.conf

but

rpm -U samba-2.0.5a-1.i386.rpm
rpm -U samba-client-2.0.5a-1.i386.rpm

doesn't remove the existing /etc/smb.conf

Hmm, maybe this is an rpm bug?

Comment 1 Bill Nottingham 1999-08-04 18:54:59 UTC
Yes, it is.

It's marked as %config(noreplace) in both packages, so it shouldn't
happen.

Comment 2 stanonik 1999-08-05 19:10:59 UTC
Here's a simple spec file which demonstrates the problem.
Removing the noreplace prevents the problem.

rpm -bb arf.spec
echo  hello > /tmp/hello
rpm -U arf*
The original /tmp/hello was lost

Summary: arf summary
Name: arf
Version: 1.0
Release: 0
Copyright: GPL
Group: Games
Source: ftp://cogsci.ucsd.edu/arf-%{version}.tar.gz
BuildRoot: /var/tmp/arf

%description
testing rpm bug
  echo hello > /tmp/hello; rpm -U arf*
  original /tmp/hello is gone
now try
  echo hello > /tmp/hello; rpm -U arf: rpm -U arf-client
  original /tmp/hello was saved
finally try
  edit arf.spec and remove (noreplace) from both %files
  echo hello > /tmp/hello; rpm -U arf*
  original /tmp/hello was saved
%package client
Summary: arf client summarg
Group: Games

%description client
arf client description

%install
rm -rf $RPM_BUILD_ROOT
mkdir $RPM_BUILD_ROOT
mkdir $RPM_BUILD_ROOT/tmp
echo goodbye > $RPM_BUILD_ROOT/tmp/hello

%files
%config(noreplace) /tmp/hello
#%config /tmp/hello

%files client
%config(noreplace) /tmp/hello
#%config /tmp/hello

Comment 3 Bill Nottingham 1999-08-16 17:28:59 UTC
*** Bug 4548 has been marked as a duplicate of this bug. ***

I did the following to upgrade my old samba installation
(after downloading):

[root@triton /tmp]# rpm --test -Uhv samba-*
[root@triton /tmp]# /etc/rc.d/init.d/smb stop
Shutting down SMB services:
[  OK  ]
Shutting down NMB services:
[  OK  ]
[root@triton /tmp]# rpm  -Uhv samba-*
warning: /etc/smb.conf created as /etc/smb.conf.rpmnew
samba
##################################################
samba-client
##################################################

I then discovered that my old smb.conf had gone:

[root@triton /tmp]# diff /etc/smb.conf /etc/smb.conf.rpmnew
[root@triton /tmp]# ll /etc/smb*
-rw-r--r--   1 root     root        10731 Jul 22 17:40
/etc/smb.conf
-rw-r--r--   1 root     root        10731 Jul 22 17:40
/etc/smb.conf.rpmnew
-rw-r--r--   1 root     root           97 Jul 22 17:40
/etc/smbusers

Oliver

Comment 4 Jeff Johnson 1999-08-16 22:49:59 UTC
Fixed in rpm-3.0.3-0.15. Thanks *very* much for the test spec
file that reproduced this problem!


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