| Summary: | Upgrade process breaks compressed man pages support (.xz) | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | Daniel Osmari <danielosmari> |
| Component: | RPM Packages | Assignee: | QA Team <qa-bugs> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Normal | CC: | davidwhodgins, marja11, oliver.bgr, pterjan, qa-bugs, sysadmin-bugs, thierry.vignaud, tmb |
| Version: | 1 | Keywords: | validated_update |
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Source RPM: | man | CVE: | |
| Status comment: | |||
|
Description
Daniel Osmari
2011-10-18 21:16:59 CEST
This means your /etc/man.config had been modified. Overwriting it will lose the local modifications CC:
(none) =>
pterjan I never touched that file. In fact, I only learned about its existence after 3 different machines with Mandriva 2010.2 had the same problem. Either something in the previous system altered it, or the modification detection is not working as expected. Well i am sure the modification detection works as expected (the content of the file has changed), but yes it can have been modified by something before the update.
Manuel Hiebel
2011-10-26 18:33:30 CEST
Component:
Installer =>
RPM Packages Couldn't the default behavior for a system upgrade be replace the original files? At least the files in the package are supposed to work with the new version, while the old files might not. Or maybe a post-upgrade step, where all .rpmnew files created during upgrade are presented to the user like in a normal install. (In reply to comment #4) > Couldn't the default behavior for a system upgrade be replace the original > files? At least the files in the package are supposed to work with the new > version, while the old files might not. No If you replace /etc/fstab, or other important configuration files, your system will no longer even boot. > Or maybe a post-upgrade step, where all .rpmnew files created during upgrade > are presented to the user like in a normal install. That can be a solution, but most users will have no idea what to do about it :/ MageiaUpdate does this. You can run "rpmdrake --merge-all-rpmnew" to manually forces it. However in this case, man could simplye be %config() instead of %config(noreplace) so that old conf file is saved as .rpmsave instead CC:
(none) =>
thierry.vignaud Assigning to maintainer We don't have the slightest idea how many people upgrade from Mdv 2010.x to Mageia 1 atm, do we? But then, I did see some new users who are switching (or consider switching) from Mdv to Mga in the forum and/or on IRC this month. CC:
(none) =>
marja11 Replaced %config(noreplace) by %config in spec. ----- This update fixes Bug #3100 On migrating from Mdv to Mga support for xz compressed man pages was broken, because the old Mandriva man.config file was not replaced. ----- Status:
NEW =>
ASSIGNED For testing, I uninstalled man, and installed the Mandriva version. Then ...
tail /etc/man.config
# Decompress with given decompressor when input file has given extension
# The command given must act as a filter.
#
.gz /bin/gunzip -c
.bz2 /usr/bin/bzip2 -c -d
.lzma /usr/bin/unlzma -c -d
.z
.Z /bin/zcat
.F
.Y
[root@hodgins /]# urpmi man
http://twiska.zarb.org/mageia/distrib/1/i586/media/core/updates_testing/man-1.6g-2.2.mga1.i586.rpm
installing man-1.6g-2.2.mga1.i586.rpm from /var/cache/urpmi/rpms
Preparing... ################################################################################
1/1: man ################################################################################
[root@hodgins /]# tail /etc/man.config
# The command given must act as a filter.
#
.gz /bin/gunzip -c
.bz2 /usr/bin/bzip2 -c -d
.lzma /usr/bin/unlzma -c -d
.z
.Z /bin/zcat
.F
.Y
.xz /usr/bin/unxz -c
[root@hodgins /]# ll /etc/man.*
-rw-r--r-- 1 root root 4819 Feb 18 12:21 /etc/man.config
I expected the old man.config would have been saved as man.config.rpmsave
Is it correct for the file to just be replaced?CC:
(none) =>
davidwhodgins I'll have a look. Testing x86_64
Confirmed with mdv man rpm
# rpm -e --nodeps man
# rpm -q man
package man is not installed
# urpmi ./man-1.6f-1mdv2010.1.x86_64.rpm
installing man-1.6f-1mdv2010.1.x86_64.rpm from .
Preparing... ###############################################
1/1: man ###############################################
# tail /etc/man.config
# Decompress with given decompressor when input file has given extension
# The command given must act as a filter.
#
.gz /bin/gunzip -c
.bz2 /usr/bin/bzip2 -c -d
.lzma /usr/bin/unlzma -c -d
.z
.Z /bin/zcat
.F
.Y
# urpmi.update --ignore "Core Updates Testing"
# urpmi man
ftp://ftp.linuxcabal.org/pub/mirrors/Mageia/distrib/1/x86_64/media/core/updates/man-1.6g-2.1.mga1.x86_64.rpm
installing man-1.6g-2.1.mga1.x86_64.rpm from /var/cache/urpmi/rpms
Preparing... ###############################################
1/1: man ###############################################
# tail /etc/man.config
# The command given must act as a filter.
#
.gz /bin/gunzip -c
.bz2 /usr/bin/bzip2 -c -d
.lzma /usr/bin/unlzma -c -d
.z
.Z /bin/zcat
.F
.Y
.xz /usr/bin/unxz -c
So with mga1 version from Core Updates xz is already added.
I'll test again with release version to see if this was already fixed by the previous update from December ( bug 1622 ).
# rpm -e --nodeps man
# urpmi ./man-1.6f-1mdv2010.1.x86_64.rpm
installing man-1.6f-1mdv2010.1.x86_64.rpm from .
Preparing... ###############################################
1/1: man ###############################################
# ll /etc/man.*
-rw-r--r-- 1 root root 4801 Feb 21 2010 /etc/man.config
# tail /etc/man.config
# Decompress with given decompressor when input file has given extension
# The command given must act as a filter.
#
.gz /bin/gunzip -c
.bz2 /usr/bin/bzip2 -c -d
.lzma /usr/bin/unlzma -c -d
.z
.Z /bin/zcat
.F
.Y
# urpmi --media Release man
ftp://ftp.linuxcabal.org/pub/mirrors/Mageia/distrib/1/x86_64/media/core/release/man-1.6g-2.mga1.x86_64.rpm
installing man-1.6g-2.mga1.x86_64.rpm from /var/cache/urpmi/rpms
Preparing... ###############################################
1/1: man ###############################################
# ll /etc/man.*
-rw-r--r-- 1 root root 4819 Jan 10 2011 /etc/man.config
# tail /etc/man.config
# The command given must act as a filter.
#
.gz /bin/gunzip -c
.bz2 /usr/bin/bzip2 -c -d
.lzma /usr/bin/unlzma -c -d
.z
.Z /bin/zcat
.F
.Y
.xz /usr/bin/unxz -c
Using urpmi has already overwritten the config file with the Release version.
If I remove the xz line and install the update..
# nano /etc/man.config
# tail /etc/man.config
# The command given must act as a filter.
#
.gz /bin/gunzip -c
.bz2 /usr/bin/bzip2 -c -d
.lzma /usr/bin/unlzma -c -d
.z
.Z /bin/zcat
.F
.Y
# urpmi man
ftp://ftp.linuxcabal.org/pub/mirrors/Mageia/distrib/1/x86_64/media/core/updates/man-1.6g-2.1.mga1.x86_64.rpm
installing man-1.6g-2.1.mga1.x86_64.rpm from /var/cache/urpmi/rpms
Preparing... ###############################################
1/1: man ###############################################
[root@mega ~]# ll /etc/man.*
-rw-r--r-- 1 root root 4796 Mar 2 15:17 /etc/man.config
[root@mega ~]# tail /etc/man.config
# The command given must act as a filter.
#
.gz /bin/gunzip -c
.bz2 /usr/bin/bzip2 -c -d
.lzma /usr/bin/unlzma -c -d
.z
.Z /bin/zcat
.F
.Y
It is still missing xz support and there is no rpmsave/rpmnew.
Updating to update candidate from updates_testing...
# urpmi.update --no-ignore "Core Updates Testing"
# urpmi man
ftp://ftp.linuxcabal.org/pub/mirrors/Mageia/distrib/1/x86_64/media/core/updates_testing/man-1.6g-2.2.mga1.x86_64.rpm
installing man-1.6g-2.2.mga1.x86_64.rpm from /var/cache/urpmi/rpms
Preparing... ###############################################
1/1: man ###############################################
# tail /etc/man.config
# The command given must act as a filter.
#
.gz /bin/gunzip -c
.bz2 /usr/bin/bzip2 -c -d
.lzma /usr/bin/unlzma -c -d
.z
.Z /bin/zcat
.F
.Y
# ll /etc/man.*
-rw-r--r-- 1 root root 4796 Mar 2 15:17 /etc/man.config
Xz is still missing and no rmpsave/rpmnew, so I'm not noticing any difference with the update_candidate.
Assigning Oliver. Please reassign to QA when you've had a chance to look. Thanks! CC:
(none) =>
qa-bugs If I understand it correctly, a file marked as %config in the spec is replaced, if the file was changed on the disk AND the file between the original rpm and the update are different So I added a dummy change to /etc/man.config I hope, this does the trick. Please test with new release of man. Assignee:
oliver.bgr =>
qa-bugs Testing complete on i586 for the srpm man-1.6g-2.3.mga1.src.rpm diff /etc/man.config /var/mnt/magtest/etc/man.config 152d151 < # The /var/mnt/magtest is a clean mageia 1 install + updates, excluding updates testing. The line .xz /usr/bin/unxz -c is present in both. This test shows the file will get replaced, wether that line is present or not. It will not as shown in Comment #13 and in my own tests. When the file was not changed on the file system, it will be replaced without creating an .rpmsave file. When it was changed on the file system, it will not be replaced, when the file from the update rpm is not different from the original one. When it was changed on the file system and the file from the update rpm is different from the original one, it will be replaced and a .rpmsave file will be created. If I should be totally wrong here, please someone with more knowledge of rpm's internals correct me. The testing procedure thus would be, to install the original Mga1 man rpm, change the man.config file there and then install the update_testing package. It should install the man.config file from the package and create an .rpmsave file. Tested on i586 using the procedure described in Comment #17 Everything works as expected. We still need retesting on x86-64 for the srpm man-1.6g-2.3.mga1.src.rpm x86_64
# rpm -e --nodeps man
warning: /etc/man.config saved as /etc/man.config.rpmsave
So that version did save the config when being removed, just not when installed.
# rm -f /etc/man.config
# rm -f /etc/man.config.rpmsave
# urpmi --media Release man
ftp://ftp.linuxcabal.org/pub/mirrors/Mageia/distrib/1/x86_64/media/core/release/man-1.6g-2.mga1.x86_64.rpm
installing man-1.6g-2.mga1.x86_64.rpm from /var/cache/urpmi/rpms
Preparing... ###############################################
1/1: man ###############################################
# tail /etc/man.config
# The command given must act as a filter.
#
.gz /bin/gunzip -c
.bz2 /usr/bin/bzip2 -c -d
.lzma /usr/bin/unlzma -c -d
.z
.Z /bin/zcat
.F
.Y
.xz /usr/bin/unxz -c
Removing xz support.
# nano /etc/man.config
# tail /etc/man.config
# Decompress with given decompressor when input file has given extension
# The command given must act as a filter.
#
.gz /bin/gunzip -c
.bz2 /usr/bin/bzip2 -c -d
.lzma /usr/bin/unlzma -c -d
.z
.Z /bin/zcat
.F
.Y
# urpmi.update --no-ignore "Core Updates Testing"
# urpmi man
ftp://ftp.linuxcabal.org/pub/mirrors/Mageia/distrib/1/x86_64/media/core/updates_testing/man-1.6g-2.3.mga1.x86_64.rpm
installing man-1.6g-2.3.mga1.x86_64.rpm from /var/cache/urpmi/rpms
Preparing... ###############################################
1/1: man warning: /etc/man.config saved as /etc/man.config.rpmsave
# ll /etc/man.config*
-rw-r--r-- 1 root root 4821 Mar 10 22:01 /etc/man.config
-rw-r--r-- 1 root root 4797 Mar 20 12:28 /etc/man.config.rpmsave
# tail /etc/man.config
#
.gz /bin/gunzip -c
.bz2 /usr/bin/bzip2 -c -d
.lzma /usr/bin/unlzma -c -d
.z
.Z /bin/zcat
.F
.Y
.xz /usr/bin/unxz -c
#
# tail /etc/man.config.rpmsave
# Decompress with given decompressor when input file has given extension
# The command given must act as a filter.
#
.gz /bin/gunzip -c
.bz2 /usr/bin/bzip2 -c -d
.lzma /usr/bin/unlzma -c -d
.z
.Z /bin/zcat
.F
.Y
So it is now adding xz support and saving an rpmsave when it is updated as it should.
Validating Advisory ----------- This update corrects an issue where /etc/man.config was not being overwritten on upgrade from Mandriva. The upgraded version would be saved as /etc/man.config.rpmnew, meaning man would be missing support for xz compressed man pages until the config was manually replaced by the rpmnew. With this update /etc/man.config will be automatically overwritten if different and the older version backed up as /etc/man.conf.rpmsave. Man will now support xz compressed pages as it should. ----------- SRPM: man-1.6g-2.3.mga1.src.rpm Could sysadmin please push from core/updates_testing to core/updates Thankyou! Keywords:
(none) =>
validated_update Updated Advisory (config not conf) ----------- This update corrects an issue where /etc/man.config was not being overwritten on upgrade from Mandriva. The upgraded version would be saved as /etc/man.config.rpmnew, meaning man would be missing support for xz compressed man pages until the config was manually replaced by the rpmnew. With this update /etc/man.config will be automatically overwritten if different and the older version backed up as /etc/man.config.rpmsave. Man will now support xz compressed pages as it should. ----------- Update pushed Status:
ASSIGNED =>
RESOLVED |