Bug 67430

Summary: Weird files appear on root after rpm use.
Product: [Retired] Red Hat Raw Hide Reporter: Petri Koistinen <pkoistin>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-06-26 21:44:09 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
Packages file found on root.
none
Providename file found on root
none
demo of rpm-bug, which I can repeat. none

Description Petri Koistinen 2002-06-25 02:09:59 UTC
From Bugzilla Helper:
User-Agent: Borgzilla/9.11 [en] (X11; U; Linux 2.4.19-rc1 i686; Nav)

Description of problem:
After use of rpm I sometimes find following files appered on root:

/Packages
/Providename
/__db.001
/__db.002
/__db.003

Is this normal? I don't think so.

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


How reproducible:
Sometimes

Steps to Reproduce:
1. download some new rawhide packages.
2. install them one by one and check "ls /" after every install.
3. weird files appers.
	

Expected Results:  No weirdos on root.

Additional info:

rpm-4.1-0.31
rawhide-release-20020622-1

Comment 1 Jeff Johnson 2002-06-25 13:34:18 UTC
These are components of an rpm database,
normally resident in /var/lib/rpm.

You appear to be running rpm without the
macro %_dbpath configured.

What does 
	rpm --showrc | grep dbpath
say?

Comment 2 Petri Koistinen 2002-06-25 15:23:35 UTC
[petri@dsl-hkigw4l83 petri]$ rpm --showrc | grep dbpath
-14: _dbpath    %{_var}/lib/rpm
-14: _dbpath_rebuild    %{_dbpath}
[petri@dsl-hkigw4l83 petri]$

Comment 3 Jeff Johnson 2002-06-25 15:38:46 UTC
That looks "normal".

How did you invoke rpm? Did you use --rcfile?

Comment 4 Petri Koistinen 2002-06-25 16:21:09 UTC
I do nothing special just install or upgrade packages.
For example I just installed vim with following line:

[root@dsl-hkigw4l83 petri]# rpm -ivh /tmp/vim-minimal-6.1-4.i386.rpm
/tmp/vim-common-6.1-4.i386.rpm

and then files /Packages and /Providename appeared. I removed those files and
removed vim-packages and installed them again, and there where no new files on
root directory.

Actually I also wrote little script to install packages and remove them:
[root@dsl-hkigw4l83 tmp]# cat testing 
#!/bin/sh
rpm -ivh /tmp/vim-minimal-6.1-4.i386.rpm /tmp/vim-common-6.1-4.i386.rpm
rpm -e vim-common vim-minimal
ls -a /
./testing

but there where no extra files on root. I guess there is some nasty bug lurking
in rpm that doesn't show every time.


Comment 5 Jeff Johnson 2002-06-25 17:21:04 UTC
I can't reproduce this problem, have never seen
this behavior, so I'm gonna close. Reopen if you
can reproduce the problem on demand.

Comment 6 Petri Koistinen 2002-06-25 19:51:57 UTC
Created attachment 62584 [details]
Packages file found on root.

Comment 7 Petri Koistinen 2002-06-25 19:52:44 UTC
Created attachment 62585 [details]
Providename file found on root

Comment 8 Petri Koistinen 2002-06-25 19:59:18 UTC
OK, as you wish. I installed more packages and there them where again. It
happens again randomly. Only hint I can give is that when this happened I was
installing new packages that haven't never been before installed. (i.e. once
installed and got removed later.)


Comment 9 Jeff Johnson 2002-06-25 20:15:55 UTC
My guess is that there's something different about
your particular machine, so I need to know exactly
what you are doing on the command line, and how you
are configured.

For starters, what does
	rpm -V rpm
say?

And what is in these files
	/etc/rpm/macros
	~/.rpmmacros


Comment 10 Petri Koistinen 2002-06-25 20:21:42 UTC
[petri@dsl-hkigw4l83 petri]$ rpm -V rpm
....L...   /usr/lib/rpm/athlon-linux
....L...   /usr/lib/rpm/i386-linux
S.5.....   /usr/lib/rpm/i386-linux/macros
....L...   /usr/lib/rpm/i486-linux
....L...   /usr/lib/rpm/i586-linux
....L...   /usr/lib/rpm/i686-linux
....L...   /usr/lib/rpm/noarch-linux
[petri@dsl-hkigw4l83 petri]$ su   
Password: 
[root@dsl-hkigw4l83 petri]# rpm -V rpm
....L...   /usr/lib/rpm/athlon-linux
....L...   /usr/lib/rpm/i386-linux
S.5.....   /usr/lib/rpm/i386-linux/macros
....L...   /usr/lib/rpm/i486-linux
....L...   /usr/lib/rpm/i586-linux
....L...   /usr/lib/rpm/i686-linux
....L...   /usr/lib/rpm/noarch-linux
.....UG. c /var/lib/rpm/__db.001
.....UG. c /var/lib/rpm/__db.002
.....UG. c /var/lib/rpm/__db.003
[root@dsl-hkigw4l83 petri]# cat /etc/rpm/macros 
%_arch                  i686
%_build_arch            i686

%optflags               -Os
[root@dsl-hkigw4l83 petri]# cat /root/.rpmmacros
cat: /root/.rpmmacros: No such file or directory
[root@dsl-hkigw4l83 petri]# cat /home/petri/.rpmmacros
cat: /home/petri/.rpmmacros: No such file or directory
[root@dsl-hkigw4l83 petri]# 


Comment 11 Jeff Johnson 2002-06-25 20:51:54 UTC
The 5 here
	S.5.....   /usr/lib/rpm/i386-linux/macros
indicates that the file has been changed.

Can you save a copy of the file and reinstall
rpm (to get a clean copy) in order to
tell what has changed on your system?

Comment 12 Petri Koistinen 2002-06-26 00:12:57 UTC
I saved the old file and remove it from /usr/lib/rpm/i386-linux/macros and
installed rpm-4.1-1.31 package. Diff says there is no diffrence.

Comment 13 Petri Koistinen 2002-06-26 00:57:36 UTC
Created attachment 62646 [details]
demo of rpm-bug, which I can repeat.

Comment 14 Petri Koistinen 2002-06-26 00:59:20 UTC
Now I can even repeat times bug. Much more convincing?

Comment 15 Jeronimo Alaminos 2002-06-26 08:24:46 UTC
With rpm-4.1-0.30, the files Packages and Providename appears on / whenever i
try to update a package and there is an unsatisfied dependency. For example,it
can be reproduced with rpm -Fvh samba-* to update from samba-2.2.4-5 to samba
2.2.5-2 that fails because of perl(Net::LDAP). I hope it can help.

Comment 16 Jeff Johnson 2002-06-26 17:26:41 UTC
Hmmm, there should have been a difference in the files
marked with '5'. <shrug>

Ah, the reproducible iff unsatisifed dependency is
what I needed to know.

Could you install the (actually any) rpmdb-redhat package and try
to reproduce?

Comment 17 Jeff Johnson 2002-06-26 21:44:04 UTC
Reproduced, installing rpmdb-redhat will make problem
disappear, better fix soonish.

Comment 18 Jeff Johnson 2002-06-27 16:40:21 UTC
There's a better fix in rpm-4.1-0.33.

Comment 19 Petri Koistinen 2002-07-01 11:01:25 UTC
Yes, it seems that this bug is now fixed. Thanks!