Bug 1223818
| Summary: | /etc/gai.conf is owned by glibc not glibc-common and misses attributes | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Paulo Andrade <pandrade> | ||||
| Component: | glibc | Assignee: | Florian Weimer <fweimer> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Arjun Shankar <ashankar> | ||||
| Severity: | low | Docs Contact: | Marc Muehlfeld <mmuehlfe> | ||||
| Priority: | low | ||||||
| Version: | 6.5 | CC: | apetrova, ashankar, codonell, cww, fweimer, mcermak, mmuehlfe, mnewsome, pandrade, pfrankli | ||||
| Target Milestone: | rc | Keywords: | Patch | ||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | glibc-2.12-1.181.el6 | Doc Type: | Release Note | ||||
| Doc Text: |
`/etc/gai.conf` no longer listed as belonging to the _glibc-common_ package
Previously, the `/etc/gai.conf` configuration file could be flagged as modified when the "rpm -V" command was used to check the _glibc-common_ package, even though that package did not own that file. This update removes the erroneous file entry from _glibc-common_. As a result "rpm -V glibc-common" no longer lists the `/etc/gai.conf` configuration file as modified.
|
Story Points: | --- | ||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2016-05-10 21:27:04 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 1172231, 1271375 | ||||||
| Attachments: |
|
||||||
(In reply to Paulo Andrade from comment #0) > The problem does not happen in rhel7, where rpm apparently > works around the bug in the glibc spec. > > The problem is that if one customizes /etc/gai.conf, > running something like: > > $ /bin/rpm -V glibc glibc-common --nodigest --nosignature --nolinkto > --nosize --nouser --nogroup --nomtime --nordev --nocaps --nomode > > will output: > > ..5...... /etc/gai.conf > > The pseudo patch for glibc.spec is: > > ---8<--- > # rpm does not handle %lang() tagged files hardlinked together accross > # languages very well, temporarily disable > LIB_LANG='' > sed -e "$LIB_LANG" -e "$SHARE_LANG" \ > - -e > '\,/etc/\(localtime\|nsswitch.conf\|ld\.so\.conf\|ld\.so\.cache\|default\), > d' \ > + -e > '\,/etc/\(localtime\|nsswitch.conf\|gai.conf\|ld\.so\.conf\|ld\.so\. > cache\|default\),d' \ > -e '\,/%{_lib}/lib\(pcprofile\|memusage\)\.so,d' \ > -e '\,bin/\(memusage\|mtrace\|xtrace\|pcprofiledump\),d' > } | sort > rpm.filelist > ---8<--- The gai.conf file is installed with the following attributes: %attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/gai.conf Given "not md5 size mtime", the rpm verification should not print "5" at all. This looks like an rpm bug? I think I see what you're trying to say. In that the gai.conf is double listed in glibc and glibc-common. Let me verify. (In reply to Carlos O'Donell from comment #2) > I think I see what you're trying to say. In that the gai.conf is double > listed in glibc and glibc-common. Let me verify. OK, I verified the spec file and I still don't see a problem. glibc owns /etc/gai.conf and has attributes for it that should properly account for it being a conf file, just like it owns /etc/ld.so.conf and /etc/nsswitch.conf. If you still see a problem please specify it in more detail. Please test on rhel6, there it will show the problem. Note that the pseudo-patch is to remove the file gai.conf from rpm.filelist, so that it will be owned by glibc-common. The example in the original bug report is that the problem does not happen if one customizes nsswitch.conf. Created attachment 1028251 [details]
01448083.spec
This simple spec tries to show the point :)
Just build and install it, then add some contents to
/etc/gai.conf.01448083
and sample test:
[pcpa@rhel-6-6-x86-64 rpmbuild]$ /bin/rpm -V 01448083 --nodigest --nosignature --nolinkto --nosize --nouser --nogroup --nomtime --nordev --nocaps --nomode
..5...... /etc/gai.conf.01448083
[pcpa@rhel-6-6-x86-64 rpmbuild]$ /bin/rpm -V 01448083-common --nodigest --nosignature --nolinkto --nosize --nouser --nogroup --nomtime --nordev --nocaps --nomode
[pcpa@rhel-6-6-x86-64 rpmbuild]$ rpm -qf /etc/gai.conf
glibc-2.12-1.164.el6.x86_64
glibc-common-2.12-1.164.el6.x86_64
glibc-2.12-1.164.el6.i686
[pcpa@rhel-6-6-x86-64 rpmbuild]$ rpm -qf /etc/gai.conf.01448083
01448083-1-1.el6.x86_64
01448083-common-1-1.el6.x86_64
A minor change I forgot to do "in the last minute"
to the sample is:
-%files -f rpm.filelist
-/etc/%{name}
-/etc/gai.conf.%{name}
+%files -f rpm.filelist
But it will show the problem either way. Just that
the latter would better mimic glibc.spec.
Why not make rhel-6 match rhel-7?
diff --git a/glibc.spec b/glibc.spec
index 2f301bb..a639e0a 100644
--- a/glibc.spec
+++ b/glibc.spec
@@ -1353,6 +1353,7 @@ rm -f *.filelist*
%dir %attr(0700,root,root) /var/cache/ldconfig
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/cache/ldconfig/aux-cache
%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/ld.so.cache
+%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/gai.conf
%doc README NEWS INSTALL FAQ BUGS NOTES PROJECTS CONFORMANCE
%doc COPYING COPYING.LIB README.libm LICENSES
%doc hesiod/README.hesiod
@@ -1372,7 +1373,6 @@ rm -f *.filelist*
%dir %attr(755,root,root) /etc/default
%verify(not md5 size mtime) %config(noreplace) /etc/default/nss
%attr(4711,root,root) %{_prefix}/libexec/pt_chown
-%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/gai.conf
%doc documentation/*
%files -f devel.filelist devel
That is fine as well. But I still suggest adding gai.conf after nsswitch.conf in the regex that remove config files from rpm.filelist. Otherwise, it is kind of relying on undefined behavior. i.e. file listed twice, once as a normal file, and once as a "special" file. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2016-0834.html |
The problem does not happen in rhel7, where rpm apparently works around the bug in the glibc spec. The problem is that if one customizes /etc/gai.conf, running something like: $ /bin/rpm -V glibc glibc-common --nodigest --nosignature --nolinkto --nosize --nouser --nogroup --nomtime --nordev --nocaps --nomode will output: ..5...... /etc/gai.conf The pseudo patch for glibc.spec is: ---8<--- # rpm does not handle %lang() tagged files hardlinked together accross # languages very well, temporarily disable LIB_LANG='' sed -e "$LIB_LANG" -e "$SHARE_LANG" \ - -e '\,/etc/\(localtime\|nsswitch.conf\|ld\.so\.conf\|ld\.so\.cache\|default\),d' \ + -e '\,/etc/\(localtime\|nsswitch.conf\|gai.conf\|ld\.so\.conf\|ld\.so\.cache\|default\),d' \ -e '\,/%{_lib}/lib\(pcprofile\|memusage\)\.so,d' \ -e '\,bin/\(memusage\|mtrace\|xtrace\|pcprofiledump\),d' } | sort > rpm.filelist ---8<---