Bug 32387 - rpm -i creates files with wrong names sometimes (/var/lib/ldap/dev/log symlink)
: rpm -i creates files with wrong names sometimes (/var/lib/ldap/dev/log symlink)
Status: NEW
: Sisyphus
(All bugs in Sisyphus/rpm)
: unstable
: all Linux
: P3 major
Assigned To:
:
: https://lists.altlinux.org/pipermail/...
:
:
: 32388
  Show dependency tree
 
Reported: 2016-08-18 01:32 by
Modified: 2017-12-23 00:43 (History)


Attachments


Note

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


Description From 2016-08-18 01:32:18
rpm-4.0.4-alt100.94

rpm -i creates files with wrong names sometimes. Example: /var/lib/ldap/dev/log

https://lists.altlinux.org/pipermail/sisyphus-incominger/2009-October/238900.html
:

x86_64: alterator-squid=1.1-alt2 post-install unowned files:
/etc/caterva
/etc/caterva/squid
/usr/lib/alterator/hooks/firsttime.d
/usr/share/alterator-browser-qt
/usr/share/alterator-browser-qt/design
/usr/share/alterator/design/scripts
/usr/share/alterator/interfaces/guile/backend
/usr/share/alterator/interfaces/guile/type
/usr/share/alterator/interfaces/jquery
/usr/share/snmp
/var/lib/ldap/dev/log;4adde46e
/var/lib/ldap/dev/urandom

https://lists.altlinux.org/pipermail/sisyphus-incominger/2016-August/441603.html
:

x86_64: openldap-servers=2.4.42-alt4 post-install unowned files:
/var/lib/ldap/dev/log;57b4ccdb

Here is how this happens:

strace -e trace=file -fF rpm -Uhv openldap-servers....
.....
open("/etc/sysconfig/ldap;57b4db0e", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 10
lstat("/etc/sysconfig/ldap", 0x7fffdc7e8960) = -1 ENOENT (No such file or
directory)
rename("/etc/sysconfig/ldap;57b4db0e", "/etc/sysconfig/ldap") = 0
chown("/etc/sysconfig/ldap", 0, 0)      = 0
chmod("/etc/sysconfig/ldap", 0644)      = 0
utime("/etc/sysconfig/ldap", [2016/06/08-16:07:19, 2016/06/08-16:07:19]) = 0
lstat("/etc/syslog.d/ldap;57b4db0e", 0x654270) = -1 ENOENT (No such file or
directory)
symlink("/var/lib/ldap/dev/log", "/etc/syslog.d/ldap;57b4db0e") = 0
....
lstat("/var/lib/ldap/dev/log;57b4db0e", 0x654270) = -1 ENOENT (No such file or
directory)
mknod("/var/lib/ldap/dev/log;57b4db0e", S_IFSOCK) = 0
....

..and there are no more mentions of /dev/log*

So, normally, as we can see from this log, rpm creates the file with a
temporary name, and then renames it (as in the case of /etc/sysconfig/ldap ).

But such rename is not done after:

mknod("/var/lib/ldap/dev/log;57b4db0e", S_IFSOCK) = 0

$ rpm -qp
/ALT/Sisyphus/x86_64/RPMS.classic/openldap-servers-2.4.42-alt4.x86_64.rpm -lv |
fgrep /log
lrwxrwxrwx    1 root    root               21 Aug 17 22:40 /etc/syslog.d/ldap
-> /var/lib/ldap/dev/log
srwxrwxr-x    1 root    ldap                0 Aug 17 22:40
/var/lib/ldap/dev/log
------- Comment #1 From 2016-08-18 22:53:10 -------
Here are some similar packages in older branches of Sisyphus. (They may be
useful for testing older versions of rpm -- from that branches.)

(Note the template openldap*-servers for non-identical package names.)

$ for f in /ALT/*/x86_64/RPMS.classic/openldap*-servers-[0-9]*.x86_64.rpm; do
echo "$f:"; rpm -qp "$f" -lv | fgrep /log; done
/ALT/5.1/x86_64/RPMS.classic/openldap2.4-servers-2.4.23-alt0.M50P.1.x86_64.rpm:
lrwxrwxrwx    1 root    root               21 Jul  1  2010 /etc/syslog.d/ldap
-> /var/lib/ldap/dev/log
srwxrwxr-x    1 root    ldap                0 Jul  1  2010
/var/lib/ldap/dev/log
/ALT/Sisyphus/x86_64/RPMS.classic/openldap-servers-2.4.42-alt4.x86_64.rpm:
lrwxrwxrwx    1 root    root               21 Aug 17 22:40 /etc/syslog.d/ldap
-> /var/lib/ldap/dev/log
srwxrwxr-x    1 root    ldap                0 Aug 17 22:40
/var/lib/ldap/dev/log
/ALT/c6/x86_64/RPMS.classic/openldap2.4-servers-2.4.42-alt0.M60C.1.x86_64.rpm:
lrwxrwxrwx    1 root    root               21 Dec 25  2015 /etc/syslog.d/ldap
-> /var/lib/ldap/dev/log
srwxrwxr-x    1 root    ldap                0 Dec 25  2015
/var/lib/ldap/dev/log
/ALT/c7/x86_64/RPMS.classic/openldap-servers-2.4.42-alt0.M70C.2.x86_64.rpm:
lrwxrwxrwx    1 root    root               21 Mar 21 17:39 /etc/syslog.d/ldap
-> /var/lib/ldap/dev/log
srwxrwxr-x    1 root    ldap                0 Mar 21 17:39
/var/lib/ldap/dev/log
/ALT/p5/x86_64/RPMS.classic/openldap2.4-servers-2.4.23-alt0.M50P.1.x86_64.rpm:
lrwxrwxrwx    1 root    root               21 Jul  1  2010 /etc/syslog.d/ldap
-> /var/lib/ldap/dev/log
srwxrwxr-x    1 root    ldap                0 Jul  1  2010
/var/lib/ldap/dev/log
/ALT/p6/x86_64/RPMS.classic/openldap2.4-servers-2.4.24-alt5.x86_64.rpm:
lrwxrwxrwx    1 root    root               21 Mar 25  2011 /etc/syslog.d/ldap
-> /var/lib/ldap/dev/log
srwxrwxr-x    1 root    ldap                0 Mar 25  2011
/var/lib/ldap/dev/log
/ALT/p7/x86_64/RPMS.classic/openldap-servers-2.4.42-alt0.M70P.1.x86_64.rpm:
lrwxrwxrwx    1 root    root               21 Sep 30  2015 /etc/syslog.d/ldap
-> /var/lib/ldap/dev/log
srwxrwxr-x    1 root    ldap                0 Sep 30  2015
/var/lib/ldap/dev/log
/ALT/p8/x86_64/RPMS.classic/openldap-servers-2.4.42-alt3.x86_64.rpm:
lrwxrwxrwx    1 root    root               21 Jun  8 17:11 /etc/syslog.d/ldap
-> /var/lib/ldap/dev/log
srwxrwxr-x    1 root    ldap                0 Jun  8 17:11
/var/lib/ldap/dev/log
$
------- Comment #2 From 2016-12-19 17:17:05 -------
А на rpm 4.13?
------- Comment #3 From 2017-12-23 00:43:01 -------
(In reply to comment #2)
> А на rpm 4.13?

Если в Sisyphus нет этой проблемы, надо будет на p8 перевесить...