rpm 4.4.9 overwrites config files on first installation

Bug #262985 reported by Patryk Zawadzki
4
Affects Status Importance Assigned to Milestone
PLD Linux
Won't Fix
Undecided
Arkadiusz Miśkiewicz
Nominated for Th by Patryk Zawadzki

Bug Description

When installing setup into a clean tree (no packages installed yet and a clean or no rpm database) it overwrites /etc/fstab without creating fstab.rpmnew. This breaks anaconda installations.

Jeff confirmed this as an rpm 4.4.9 bug. glen tested the same behavior on 4.5 and confirmed that it works correctly.

We could try to find the change that fixed this for 4.5 or wait until 4.5 is an option for PLD.

Tags: rpm
Revision history for this message
Elan Ruusamäe (glen666) wrote :

rpm -r rpm-4_5 branch is now prepared for ac/ti/th distro lines.

i personally use rpm 4.5 for some time in my test builder already since april 2008.

Revision history for this message
Patryk Zawadzki (patrys) wrote : Re: [Bug 262985] Re: rpm 4.4.9 overwrites config files on first installation
Revision history for this message
Elan Ruusamäe (glen666) wrote :

what about them?

those are reported against rpm 5.x ...

Revision history for this message
Patryk Zawadzki (patrys) wrote :

glen: Sorry, not enough coffee.

Arek, could you comment on rpm 4.5?

Revision history for this message
Arkadiusz Miśkiewicz (arekm) wrote :

If it's ready then we can test it on carme first. If it will be fine *then* th-test.

rpm 5.0 from HEAD also was "ready" at first, second and third look while the problems were noticed after a week or two.

Revision history for this message
Arkadiusz Miśkiewicz (arekm) wrote :

rpm-4.5, /usr being used (bad, bad)

[arekm@carme-pld ~/rpm/SPECS]$ ldd /bin/rpm |grep "/usr/lib"
        libneon.so.27 => /usr/lib64/libneon.so.27 (0x00007f5f80f02000)
        libossp-uuid.so.16 => /usr/lib64/libossp-uuid.so.16 (0x00007f5f80872000)
        libssl.so.0.9.8 => /usr/lib64/libssl.so.0.9.8 (0x00007f5f80204000)
        libcrypto.so.0.9.8 => /usr/lib64/libcrypto.so.0.9.8 (0x00007f5f7fe8e000)
        libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x00007f5f7fc61000)
        libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x00007f5f7f922000)
        libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x00007f5f7f686000)
        libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x00007f5f7f462000)
        libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 (0x00007f5f7f058000)

Revision history for this message
Arkadiusz Miśkiewicz (arekm) wrote :

rpm-4.5:

macro not expanded:
-14: __cxx @CXX@

missing support for mimetype provides
-14: __mimetype_provides %{_usrlibrpm}/mimetypedeps.sh --provides

%distribution macro seems to be missing
+-14: distribution PLD

perl.req doesn't match rpm-4.4.9 one

php.prov different, needs check

php.req - totally different

poldek (HEAD) built with rpm 4.5 fails where poldek:HEAD works fine with 4.4.9:

[arekm@carme-pld ~/rpm/RPMS]$ sudo poldek -s . --mkidxz
Creating pndir index of /home/users/arekm/rpm/RPMS/ (type=dir)...
Wczytywanie [dir]/home/users/arekm/rpm/RPMS/...
błąd: asterisk-examples-1.4.21.1-1.2.bristuff.i686.rpm: odczyt nazwy/wersji/release nie udał się
Something wrong, something not quite right with 0.30 (snap20080820.23)
Assertion 'pkg' failed, dir.c:258
Please report this bug to <email address hidden>.

zsh: abort sudo poldek -s . --mkidxz
[arekm@carme-pld ~/rpm/RPMS]$ rpm -qK asterisk-examples-1.4.21.1-1.2.bristuff.i686.rpm
asterisk-examples-1.4.21.1-1.2.bristuff.i686.rpm: sha1 md5 OK

rpm 4.5 is not ready for th... (you can play with it for now in carme th x86_64 env).

Revision history for this message
Elan Ruusamäe (glen666) wrote :

note: it fails on x86_64, but succeeds in i686 arch

Revision history for this message
Elan Ruusamäe (glen666) wrote :

megabajt, can you look on the poldek problem?

Revision history for this message
Marcin Banasiak (megabajt) wrote :

I noticed yet another problem with rpm 4.5 - repackage doesn't work:

$ sudo rpm -Uvh --replacepkgs poldek-libs-0.30-0.20080820.23.2.i686.rpm --define "%_repackage_all_erasures 1"
Preparing... ########################################### [100%]
Repackaging...
   1:poldek-libs lzma: Memory usage limit is too small for the given filter setup
########################################### [100%]
Upgrading...

... and upgrade failed, but:

$ sudo rpm -Uvh --replacepkgs poldek-libs-0.30-0.20080820.23.2.i686.rpm --define "%_repackage_all_erasures 0"
Preparing... ########################################### [100%]
   1:poldek-libs ########################################### [100%]

... works fine.

Note that repackage works with rpm 4.4.9

Revision history for this message
Marcin Banasiak (megabajt) wrote :

glen, it was propably rpm bug. There were some undefined references in librpmdb, which have been fixed by rpm-link-selinux.patch. Could you build rpm first, then poldek and test it?

Revision history for this message
Elan Ruusamäe (glen666) wrote :

patrys,

does rpm q>p reverse patch solve the discard of %config files?

more precisely rpm built with this patch applied:
  http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/rpm-rpm5-patchset-10061.patch?only_with_tag=auto-th-rpm-4_4_9-81

Revision history for this message
Elan Ruusamäe (glen666) wrote :

as of rpm-4.5-0.55.amd64

comment #6:
> rpm-4.5, /usr being used (bad, bad)
solved. neon is now default off

comment #7:
> macro not expanded: -14: __cxx @CXX@
solved

> missing support for mimetype provides -14: __mimetype_provides %{_usrlibrpm}/mimetypedeps.sh --provides
mimetype enabled by default for th

> %distribution macro seems to be missing +-14: distribution PLD
did you test from vserver? it's defined in /etc/rpm/macros which doesn't contain %distribution in vserver installs (so it's borken in 4.4.9 too)

> poldek crash...
follow megabajt notes in comment #11.

Revision history for this message
Patryk Zawadzki (patrys) wrote :

glen, I don't see any changes when telling poldek to --install-dist=/tmp/foo setup - it still overwrites /etc/fstab

Revision history for this message
Elan Ruusamäe (glen666) wrote :

megabait, about comment #10: i'm not able to reproduce the repackage bug with rpm-4.5-0.58.i686

if you're able, can you post the rpm package so i could test myself too.

Revision history for this message
Elan Ruusamäe (glen666) wrote :

arekm, please re-evaluate rpm-4.5-0.59

Revision history for this message
Arkadiusz Miśkiewicz (arekm) wrote :

carme $ poldek -s . --mkidxz
Creating pndir index of /home/users/arekm/rpm/RPMS/ (type=dir)...
Wczytywanie [dir]/home/users/arekm/rpm/RPMS/...
200..400..600..800..1000..1200..1400..1600..1800..2000..2200..2400..2600..2800..3000..3200..3400..3600..3755
uwaga: /home/users/arekm/rpm/RPMS/: usunięto 17 zdublowanych pakietów
Zapisywanie /home/users/arekm/rpm/RPMS/packages.ndir.gz...
zsh: segmentation fault poldek -s . --mkidxz

sill fails :-(

rpm-4.5-0.59.x86_64
poldek-0.30-0.20080820.23.3.x86_64

Revision history for this message
Arkadiusz Miśkiewicz (arekm) wrote :

Turns out this isn't rpm 4.5 problem because even rpm 4.4.9 from th-i686 segfaults on this rpms set (probably one of packages is broken).

Revision history for this message
Elan Ruusamäe (glen666) wrote :

note that th now includes rpm 4.5

Revision history for this message
Patryk Zawadzki (patrys) wrote :

Th now ships 4.5 so we're not likely to fix 4.4.x

Revision history for this message
Elan Ruusamäe (glen666) wrote :

Ac ships with 4.5 as well, at least since Sat Oct 1 15:25:14 2011 UTC
according to cvs tags --

http://cvs.pld-linux.org/cgi-bin/viewvc.cgi/cvs/packages/rpm/rpm.spec?r1=1.837.2.42.2.49.2.107&view=log

:)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.