Bug 4355 - rpm -U samba* removes existing /etc/smb.conf
rpm -U samba* removes existing /etc/smb.conf
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
6.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
:
: 4548 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-08-04 14:43 EDT by stanonik
Modified: 2008-05-01 11:37 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-08-16 18:49:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description stanonik 1999-08-04 14:43:12 EDT
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 14:54:59 EDT
Yes, it is.

It's marked as %config(noreplace) in both packages, so it shouldn't
happen.
Comment 2 stanonik 1999-08-05 15:10:59 EDT
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 13:28:59 EDT
*** 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 18:49:59 EDT
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.