RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1296427 - Old timestamp of docs/modifyrepo.1 causes caching the old version
Summary: Old timestamp of docs/modifyrepo.1 causes caching the old version
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: man
Version: 6.8
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: Nikola Forró
QA Contact: Jakub Heger
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-07 09:03 UTC by Stanislav Zidek
Modified: 2017-03-21 10:04 UTC (History)
5 users (show)

Fixed In Version: man-1.6f-38.el6
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-21 10:04:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Update cat file timestamps (1.48 KB, patch)
2016-01-08 14:40 UTC, Nikola Forró
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0645 0 normal SHIPPED_LIVE man bug fix update 2017-03-21 12:32:05 UTC

Description Stanislav Zidek 2016-01-07 09:03:33 UTC
Description of problem:
After updating from createrepo-0.9.9-22.el6 to createrepo-0.9.9-24.el6, old manpage of modifyrepo is displayed under some circumstances.

Version-Release number of selected component (if applicable):
createrepo-0.9.9-24.el6

How reproducible:
always

Steps to Reproduce:
1. ... install createrepo-0.9.9-22.el6 if not present
2. MANWIDTH=80 man modifyrepo >modifyrepo.before (causes /var/cache/man/cat1/modifyrepo.1.lzma to be created)
3. ... update to createrepo-0.9.9-24.el6
4. MANWIDTH=80 man modifyrepo >modifyrepo.after
5. diff -u modifyrepo.before modifyrepo.after

Actual results:
--- modifyrepo.before	2016-01-07 03:35:58.665998692 -0500
+++ modifyrepo.after	2016-01-07 03:36:31.360000001 -0500
@@ -31,10 +31,6 @@
               used by default.
 
 
-       --no-compress
-              Do not compress the new repodata before adding it to the repo.
-
-
        --compress-type <compress-type>
               Specify which compression type to use: compat (default), xz (may
               not be available), gz, bz2.


Expected results:
(empty output)

Additional info:
This problem is caused by old timestamp of manpage during update (Jan 26  2011), which is preserved during installation - "install -p --verbose" in docs/Makefile.

Comment 1 Stanislav Zidek 2016-01-07 09:18:24 UTC
Correction: actual result is empty output (man page that is shown is same as in old version although it changed) and expected result is the difference shown.

Comment 2 Karel Srot 2016-01-07 11:08:55 UTC
I think this is rather confusing behaviour of the man itself.
Even though I cannot reproduce the issue with exactly your commands (seems that there is a bit difference in my and your sessions when it comes to man output forwarding) below are my observations:

# rpm -q createrepo
createrepo-0.9.9-22.el6.noarch
# find /var/cache/man -name '*modify*'
# man modifyrepo
# # double-check that --no-compress option is listed
# find /var/cache/man -name '*modify*'
# # see, no cache was created
# MANWIDTH=80 man modifyrepo 
Formatting page, please wait...
# 
# find /var/cache/man -name '*modify*'
/var/cache/man/cat1/modifyrepo.1.lzma
# # wow, now we have a cache
# ls -l /var/cache/man/cat1/modifyrepo.1.lzma
-r--r--r--. 1 root root 1104 Jan  7 06:03 /var/cache/man/cat1/modifyrepo.1.lzma
# 
# rpm -Uvh http://download.devel.redhat.com/brewroot/packages/createrepo/0.9.9/24.el6/noarch/createrepo-0.9.9-24.el6.noarch.rpm
Retrieving http://download.devel.redhat.com/brewroot/packages/createrepo/0.9.9/24.el6/noarch/createrepo-0.9.9-24.el6.noarch.rpm
Preparing...                ########################################### [100%]
   1:createrepo             ########################################### [100%]
# man modifyrepo
# # no-compress option is not listed anymore, this is correct
# MANWIDTH=80 man modifyrepo 
# # this time no-compress option is listed as the cache was used


# # btw
# man modifyrepo > a
# MANWIDTH=80 man modifyrepo > b
# diff a b
# # surprisingly, there is not difference, let's check those files
# less a
# less b
# # nope, non of them contained the no-compress option (i.e. new man page version was listed)

Comment 3 Karel Srot 2016-01-07 11:11:54 UTC
Just for completeness, man version was man-1.6f-32.el6.x86_64.

Comment 4 Nikola Forró 2016-01-08 11:10:46 UTC
(In reply to Karel Srot from comment #2)
> I think this is rather confusing behaviour of the man itself.
Maybe it is confusing, but man only creates and uses cached cat files if output device is 80 columns wide TTY.

So the original problem is reproducible if output is not redirected to files:

Steps to Reproduce:
1. ... install createrepo-0.9.9-22.el6 if not present
2. MANWIDTH=80 man modifyrepo (causes /var/cache/man/cat1/modifyrepo.1.lzma to be created)
3. --no-compress option is listed
4. ... update to createrepo-0.9.9-24.el6
5. MANWIDTH=80 man modifyrepo
6. --no-compress option is still listed

Comment 5 Stanislav Zidek 2016-01-08 11:49:05 UTC
Sorry about the confusion, it's true that you cannot see the problem while redirecting the output of "man modifyrepo".

I think that Karel was suggesting that the current way of caching is not correct (only comparing mtime in is_newer function). I am however not sure if this can be reasonably done in some other way (like storing the precise mtime of the manpage from which was the cache made..?).

The issue can be also solved by not preserving the mtime of the man page of rpm during install (install -p in createrepo doc/Makefile). I am not sure what is the best practice here; is it said somewhere (in packaging guidelines maybe?) that the preserving of the mtime (install -p) should not be done?

Comment 6 Nikola Forró 2016-01-08 12:51:28 UTC
You are right, this should be resolved in man. The same issue can manifest itself with any updated package containing man pages.

man-db seems to avoid this by updating mtime of the newly created cat file to match mtime of the original man page. We could use the same approach in man.

Comment 7 Nikola Forró 2016-01-08 14:40:47 UTC
Created attachment 1112894 [details]
Update cat file timestamps

Comment 14 errata-xmlrpc 2017-03-21 10:04:29 UTC
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-2017-0645.html


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