Bug 18401 - should require the new chrooted
Summary: should require the new chrooted
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: libnss-mdns (show other bugs)
Version: unstable
Hardware: all Linux
: P2 normal
Assignee: Fr. Br. George
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks: 18407 21949
  Show dependency tree
 
Reported: 2008-12-30 03:42 MSK by Ivan Zakharyaschev
Modified: 2009-10-15 17:37 MSD (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Zakharyaschev 2008-12-30 03:42:21 MSK
libnss-mdns-0.10-alt2

libnss-mdns makes use of update_chrooted in install-time scripts:

$ rpm -q libnss-mdns --scripts 
postinstall scriptlet (through /bin/sh):
grep -q '^hosts:[[:blank:]].\+mdns' /etc/nsswitch.conf || \
sed -i.rpmorig 's/^\(hosts:[[:blank:]].\+\)\(dns\)$/\1mdns4_minimal [NOTFOUND=return] \2 mdns4/' /etc/nsswitch.conf
update_chrooted all
postuninstall scriptlet (through /bin/sh):
sed -i -e 's/ mdns4_minimal \[NOTFOUND=return\]//' -e 's/ mdns4//' /etc/nsswitch.conf
update_chrooted all
$ 

but will not be effective:

[ivan@dell ~]$ resolve dell.local 
IP address of dell.local: 169.254.178.30
[ivan@dell ~]$ ping dell.local 
ping: unknown host dell.local
[ivan@dell ~]$ rpm -qf /sbin/update_chrooted 
chrooted-0.3.4-alt1
[ivan@dell ~]$ 

unless a new version of chrooted is there:

* Fri Aug 24 2007 Sergey Bolshakov <sbolshakov@altlinux.ru> 0.3.5-alt1
- updated to play well with nss_mdns

This is not reflected in the formal deps of the package:

$ rpm -q libnss-mdns --requires 
avahi-daemon  
/bin/sh  
/bin/sh  
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1
libc.so.6(GLIBC_2.0)  
libc.so.6(GLIBC_2.1)  
libc.so.6(GLIBC_2.1.3)  
libc.so.6(GLIBC_2.3.4)  
libc.so.6(GLIBC_2.4)  
rtld(GNU_HASH)  
grep  
sed  
chrooted  
sed  
chrooted  
rpmlib(PayloadIsLzma) <= 4.4.2-1
$ 

Please >= 0.3.5-alt1 dependency to allow smooth apt-get-install's.
Comment 1 Sergey Bolshakov 2008-12-30 13:29:11 MSK
well, libnss-mdns contains Requires(pre): chrooted >= 0.3.5-alt1,
same for (postun). Should be enough, isn't ?
Comment 2 Ivan Zakharyaschev 2008-12-30 19:17:31 MSK
(In reply to comment #1)
> well, libnss-mdns contains Requires(pre): chrooted >= 0.3.5-alt1,
> same for (postun). Should be enough, isn't ?

Yes, I would also think so! It's strange that "rpm -q" (and "rpm -i" obviously) don't see/understand this: I installed it on a system with an old chrooted without any warnings. 

I'll invistigate it more.
Comment 3 Ivan Zakharyaschev 2008-12-30 19:41:29 MSK
(In reply to comment #1)
> well, libnss-mdns contains Requires(pre): chrooted >= 0.3.5-alt1,
> same for (postun). Should be enough, isn't ?
 
The mistake is that these Requires are not in the subsection for the lib* subpackage.
Comment 4 Sergey Bolshakov 2008-12-30 20:07:33 MSK
OH SHI~
indeed
Comment 5 Sergey Bolshakov 2008-12-30 22:43:13 MSK
fixed in libnss-mdns-0.10-alt3