[Midnight Commander] #2692: Date not set properly in manpage

5 views
Skip to first unread message

Ticket System

unread,
Dec 16, 2011, 10:25:26 AM12/16/11
to egm...@gmail.com, mc-...@googlegroups.com
#2692: Date not set properly in manpage
-------------------------------+--------------------------------
Reporter: egmont | Owner:
Type: defect | Status: new
Priority: major | Milestone: Future Releases
Component: mc-core | Version: 4.8.1
Keywords: | Blocked By:
Blocking: | Branch state: no branch
Votes for changeset: |
-------------------------------+--------------------------------
After installing mc-4.8.1 the footer of the manpage says:

MC Version 4.8.1 @DATE_OF_MAN_PAGE@ MC(1)

Running just the configure script (and no make) already generates mc.1
from mc.1.in (and similarly for all other manpages) and substitutes all
the varibables (like version number, path prefixes) except for the date.

Running make in that directory would substitute the version number too,
but the target file is already more recent than the source, so this step
is not executed. If you remove mc.1 or touch it back in time, then a make
generates mc.1 with a proper date.

I don't know what the desired solution would be, but it seems currently
that configure and make are working against each other, they both try to
do the same thing (and do it differently). It should be the responsibility
of one of them to generate the manpages from the corresponding *.in files.

Also note (moving here from ticket #2689) that the code that updates the
date in the manpage uses "stat -c" and "date -d", both are apparently
GNU/Linux stuff, not supported on Mac or probably on *BSD.

As a partial solution, maybe the best solution would be to substitute the
version number and date when the dist tarball is created (as part of
running autoconf/automake), so the user gets these ready. This way
creating a tarball or compiling from git probably still wouldn't work on
Mac, but at least compiling a tarball would go fine. (I'm wondering, I
don't know: is there a best practice for this in other free software?)

I'll try to find the proper cross-OS command to print the timestamp of a
file.

--
Ticket URL: <www.midnight-commander.org/ticket/2692>
Midnight Commander <http://www.midnight-commander.org>
Midnight Development Center

Ticket System

unread,
Dec 16, 2011, 11:06:12 AM12/16/11
to egm...@gmail.com, mc-...@googlegroups.com
#2692: Date not set properly in manpage
--------------------------+---------------------------------------
Reporter: egmont | Owner:
Type: defect | Status: new
Priority: major | Milestone: Future Releases
Component: mc-core | Version: 4.8.1
Resolution: | Keywords:
Blocked By: | Blocking:
Branch state: no branch | Votes for changeset:
--------------------------+---------------------------------------

Comment (by angel_il):

>I'll try to find the proper cross-OS command to print the timestamp of a
file.

perl

--
Ticket URL: <www.midnight-commander.org/ticket/2692#comment:1>

Ticket System

unread,
Dec 16, 2011, 11:52:23 AM12/16/11
to egm...@gmail.com, mc-...@googlegroups.com
#2692: Date not set properly in manpage
--------------------------+---------------------------------------
Reporter: egmont | Owner:
Type: defect | Status: new
Priority: major | Milestone: Future Releases
Component: mc-core | Version: 4.8.1
Resolution: | Keywords:
Blocked By: | Blocking:
Branch state: no branch | Votes for changeset:
--------------------------+---------------------------------------

Comment (by egmont):

Yep I was just gonna figure out if perl was already used or ask if it's
acceptable. Seems I'll go for that. BSD's stat and date are just
ridiculously stupid.

--
Ticket URL: <www.midnight-commander.org/ticket/2692#comment:2>

Ticket System

unread,
Dec 16, 2011, 3:02:27 PM12/16/11
to egm...@gmail.com, mc-...@googlegroups.com
#2692: Date not set properly in manpage
--------------------------+---------------------------------------
Reporter: egmont | Owner:
Type: defect | Status: new
Priority: major | Milestone: Future Releases
Component: mc-core | Version: 4.8.1
Resolution: | Keywords:
Blocked By: | Blocking:
Branch state: no branch | Votes for changeset:
--------------------------+---------------------------------------

Comment (by angel_il):

{{{
if `perl -v > /dev/null 2>&1` ; then
"echo perl found!"
fi

}}}

--
Ticket URL: <www.midnight-commander.org/ticket/2692#comment:3>

Ticket System

unread,
Mar 22, 2012, 12:01:47 PM3/22/12
to egm...@gmail.com, slava...@gmail.com, mc-...@googlegroups.com
#2692: Date not set properly in manpage
--------------------------+---------------------------------------
Reporter: egmont | Owner: slavazanko
Type: defect | Status: accepted
Priority: major | Milestone: Future Releases
Component: mc-core | Version: 4.8.1
Resolution: | Keywords:
Blocked By: | Blocking:
Branch state: no branch | Votes for changeset:
--------------------------+---------------------------------------
Changes (by slavazanko):

* owner: => slavazanko
* status: new => accepted


--
Ticket URL: <http://www.midnight-commander.org/ticket/2692#comment:4>

Ticket System

unread,
Mar 22, 2012, 1:16:32 PM3/22/12
to egm...@gmail.com, slava...@gmail.com, mc-...@googlegroups.com
#2692: Date not set properly in manpage
--------------------------+---------------------------------------
Reporter: egmont | Owner: slavazanko
Type: defect | Status: accepted
Priority: major | Milestone: Future Releases
Component: mc-core | Version: 4.8.1
Resolution: | Keywords:
Blocked By: | Blocking:
Branch state: on review | Votes for changeset:
--------------------------+---------------------------------------
Changes (by slavazanko):

* branch_state: no branch => on review


Comment:

Created branch [changeset:6b8d17831de22ba2734d3a9ab4b88327885984a7
2692_manpage_broken_date]

Review, please.

--
Ticket URL: <http://www.midnight-commander.org/ticket/2692#comment:5>

Ticket System

unread,
Mar 22, 2012, 1:31:46 PM3/22/12
to egm...@gmail.com, slava...@gmail.com, mc-...@googlegroups.com
#2692: Date not set properly in manpage
--------------------------+----------------------------------------
Reporter: egmont | Owner: slavazanko
Type: defect | Status: accepted
Priority: major | Milestone: Future Releases
Component: mc-core | Version: 4.8.1
Resolution: | Keywords: stable-candidate
Blocked By: | Blocking:
Branch state: on review | Votes for changeset:
--------------------------+----------------------------------------
Changes (by andrew_b):

* keywords: => stable-candidate


--
Ticket URL: <http://www.midnight-commander.org/ticket/2692#comment:6>

Ticket System

unread,
Mar 22, 2012, 3:02:23 PM3/22/12
to egm...@gmail.com, slava...@gmail.com, mc-...@googlegroups.com
#2692: Date not set properly in manpage
--------------------------+----------------------------------------
Reporter: egmont | Owner: slavazanko
Type: defect | Status: accepted
Priority: major | Milestone: 4.8.3
Component: mc-core | Version: 4.8.1
Resolution: | Keywords: stable-candidate
Blocked By: | Blocking:
Branch state: on review | Votes for changeset:
--------------------------+----------------------------------------
Changes (by slavazanko):

* milestone: Future Releases => 4.8.3


--
Ticket URL: <http://www.midnight-commander.org/ticket/2692#comment:7>

Ticket System

unread,
Mar 23, 2012, 11:10:53 AM3/23/12
to egm...@gmail.com, slava...@gmail.com, mc-...@googlegroups.com
#2692: Date not set properly in manpage
--------------------------+----------------------------------------
Reporter: egmont | Owner: slavazanko
Type: defect | Status: accepted
Priority: major | Milestone: 4.8.3
Component: mc-core | Version: 4.8.1
Resolution: | Keywords: stable-candidate
Blocked By: | Blocking:
Branch state: on review | Votes for changeset:
--------------------------+----------------------------------------

Comment (by egmont):

I'm afraid this change would break compilation on Mac, since that has that
braindamaged 'date' and 'stat' commands. I don't have my Mac with me right
now to verify this.

The solution could be to replace the date and stat commands with a perl
script, as mentioned above; or to move the substitution of date (and maybe
version number too) from the normal configure&&make phase to the autogen
phase (which would still break on Mac for git version, but would keep
tarballs working).

I'd be happy to write the perl program in a couple of days, just please
hold on your current change until then ;)

--
Ticket URL: <http://www.midnight-commander.org/ticket/2692#comment:8>

Ticket System

unread,
Mar 23, 2012, 11:15:11 AM3/23/12
to egm...@gmail.com, slava...@gmail.com, mc-...@googlegroups.com
#2692: Date not set properly in manpage
--------------------------+----------------------------------------
Reporter: egmont | Owner: slavazanko
Type: defect | Status: accepted
Priority: major | Milestone: 4.8.3
Component: mc-core | Version: 4.8.1
Resolution: | Keywords: stable-candidate
Blocked By: | Blocking:
Branch state: on review | Votes for changeset:
--------------------------+----------------------------------------

Comment (by egmont):

Oh wait... apparently you did get rid of date and stat??? You rock!
Anyway, I'll double check on Mac and get back to you with the results.

--
Ticket URL: <http://www.midnight-commander.org/ticket/2692#comment:9>

Ticket System

unread,
Mar 25, 2012, 9:51:25 AM3/25/12
to egm...@gmail.com, slava...@gmail.com, mc-...@googlegroups.com
#2692: Date not set properly in manpage
--------------------------+----------------------------------------
Reporter: egmont | Owner: slavazanko
Type: defect | Status: accepted
Priority: major | Milestone: 4.8.3
Component: mc-core | Version: 4.8.1
Resolution: | Keywords: stable-candidate
Blocked By: | Blocking:
Branch state: on review | Votes for changeset:
--------------------------+----------------------------------------

Comment (by slavazanko):

> Anyway, I'll double check on Mac and get back to you with the results.

Okay, we awaiting.

--
Ticket URL: <http://www.midnight-commander.org/ticket/2692#comment:10>

Ticket System

unread,
Mar 26, 2012, 8:31:56 AM3/26/12
to egm...@gmail.com, slava...@gmail.com, mc-...@googlegroups.com
#2692: Date not set properly in manpage
--------------------------+----------------------------------------
Reporter: egmont | Owner: slavazanko
Type: defect | Status: accepted
Priority: major | Milestone: 4.8.3
Component: mc-core | Version: 4.8.1
Resolution: | Keywords: stable-candidate
Blocked By: | Blocking:
Branch state: on review | Votes for changeset:
--------------------------+----------------------------------------

Comment (by egmont):

Here's what I'm trying to do, since I cannot run ./autogen on my Mac:

on Linux:
git clone ...
git checkout 2692_manpage_broken_date
create tarball as written here https://www.midnight-
commander.org/wiki/ReleaseGuidelines , skipping the .po files part.

copy the tarball over to Mac

on Mac:
./configure && make && make install

Here's where it goes wrong:

The tarball does not contain the manpages - I guess this was broken by
this branch; the tarball created from the main git branch is okay.

--
Ticket URL: <http://www.midnight-commander.org/ticket/2692#comment:11>

Ticket System

unread,
Mar 27, 2012, 4:57:50 AM3/27/12
to egm...@gmail.com, slava...@gmail.com, mc-...@googlegroups.com
#2692: Date not set properly in manpage
--------------------------+----------------------------------------
Reporter: egmont | Owner: slavazanko
Type: defect | Status: accepted
Priority: major | Milestone: 4.8.3
Component: mc-core | Version: 4.8.1
Resolution: | Keywords: stable-candidate
Blocked By: | Blocking:
Branch state: on review | Votes for changeset:
--------------------------+----------------------------------------

Comment (by slavazanko):

Wow, no man-files in tarball, really. This my fail. Egmont, thanks for
this good testing. I'll fix it as soon.

--
Ticket URL: <http://www.midnight-commander.org/ticket/2692#comment:12>

Ticket System

unread,
Mar 27, 2012, 5:45:38 AM3/27/12
to egm...@gmail.com, slava...@gmail.com, mc-...@googlegroups.com
#2692: Date not set properly in manpage
--------------------------+----------------------------------------
Reporter: egmont | Owner: slavazanko
Type: defect | Status: accepted
Priority: major | Milestone: 4.8.3
Component: mc-core | Version: 4.8.1
Resolution: | Keywords: stable-candidate
Blocked By: | Blocking:
Branch state: on review | Votes for changeset:
--------------------------+----------------------------------------

Comment (by slavazanko):

Fixed in latest commit of branch. review, please.

--
Ticket URL: <http://www.midnight-commander.org/ticket/2692#comment:13>

Ticket System

unread,
Mar 27, 2012, 6:38:58 AM3/27/12
to egm...@gmail.com, slava...@gmail.com, mc-...@googlegroups.com
#2692: Date not set properly in manpage
--------------------------+----------------------------------------
Reporter: egmont | Owner: slavazanko
Type: defect | Status: accepted
Priority: major | Milestone: 4.8.3
Component: mc-core | Version: 4.8.1
Resolution: | Keywords: stable-candidate
Blocked By: | Blocking:
Branch state: on review | Votes for changeset:
--------------------------+----------------------------------------

Comment (by egmont):

"awk: calling undefined function strftime"
I'm sorry that Mac sucks so much :( Seems perl is the only tool we can
trust.

Two more notes:

date-of-man-include.am sets LC_TIME, but this can be overridden by LC_ALL
if the user has that set, leading to incorrect language and even to
incorrect charset. I think date-of-man-include.am should override LC_ALL
instead.

For Hungarian (hu), the date format should be like "2012. március", that
is,
DATE_FORMAT=%Y. %B
Could you please fix this as well?

Thanks!

--
Ticket URL: <http://www.midnight-commander.org/ticket/2692#comment:14>

Ticket System

unread,
Mar 28, 2012, 7:17:51 AM3/28/12
to egm...@gmail.com, slava...@gmail.com, mc-...@googlegroups.com
#2692: Date not set properly in manpage
--------------------------+----------------------------------------
Reporter: egmont | Owner: slavazanko
Type: defect | Status: accepted
Priority: major | Milestone: 4.8.3
Component: mc-core | Version: 4.8.1
Resolution: | Keywords: stable-candidate
Blocked By: | Blocking:
Branch state: on review | Votes for changeset:
--------------------------+----------------------------------------

Comment (by slavazanko):

Egmont, try to check the latest changes in branch on MacOS. Now used just
perl for setting the dates on man-pages.


> For Hungarian (hu), the date format should be like "2012. március", that
is,
> DATE_FORMAT=%Y. %B
> Could you please fix this as well?

Done.

--
Ticket URL: <http://www.midnight-commander.org/ticket/2692#comment:15>

Ticket System

unread,
Mar 28, 2012, 7:54:36 AM3/28/12
to egm...@gmail.com, slava...@gmail.com, mc-...@googlegroups.com
#2692: Date not set properly in manpage
--------------------------+----------------------------------------
Reporter: egmont | Owner: slavazanko
Type: defect | Status: accepted
Priority: major | Milestone: 4.8.3
Component: mc-core | Version: 4.8.1
Resolution: | Keywords: stable-candidate
Blocked By: | Blocking:
Branch state: on review | Votes for changeset:
--------------------------+----------------------------------------

Comment (by egmont):

Date substitution now works great :)

"make install" puts the i18n manpages into ${prefix}/share/man/hu_HU/man1
and similar, instead of ${prefix}/share/man/hu/man1 - I guess this might
cause problems with various man readers.

Also, could you please consider overriding LC_ALL instead of LC_TIME, as
per the previous comment?

thanks!

--
Ticket URL: <http://www.midnight-commander.org/ticket/2692#comment:16>

Ticket System

unread,
Mar 28, 2012, 8:11:06 AM3/28/12
to egm...@gmail.com, slava...@gmail.com, mc-...@googlegroups.com
#2692: Date not set properly in manpage
--------------------------+----------------------------------------
Reporter: egmont | Owner: slavazanko
Type: defect | Status: accepted
Priority: major | Milestone: 4.8.3
Component: mc-core | Version: 4.8.1
Resolution: | Keywords: stable-candidate
Blocked By: | Blocking:
Branch state: on review | Votes for changeset:
--------------------------+----------------------------------------

Comment (by slavazanko):

> "make install" puts the i18n manpages into
${prefix}/share/man/hu_HU/man1 and similar, instead of
${prefix}/share/man/hu/man1 - I guess this might cause problems with
various man readers.

Oh, my fail. I errorneusly changed LANG variable. Fixed


> Also, could you please consider overriding LC_ALL instead of LC_TIME, as
per the previous comment?

Done. Thanks for testing!

--
Ticket URL: <http://www.midnight-commander.org/ticket/2692#comment:17>

Ticket System

unread,
Mar 28, 2012, 9:36:57 AM3/28/12
to egm...@gmail.com, slava...@gmail.com, mc-...@googlegroups.com
#2692: Date not set properly in manpage
--------------------------+----------------------------------------
Reporter: egmont | Owner: slavazanko
Type: defect | Status: accepted
Priority: major | Milestone: 4.8.3
Component: mc-core | Version: 4.8.1
Resolution: | Keywords: stable-candidate
Blocked By: | Blocking:
Branch state: on review | Votes for changeset:
--------------------------+----------------------------------------

Comment (by egmont):

Perfect! Thanks sooo much! :)

--
Ticket URL: <http://www.midnight-commander.org/ticket/2692#comment:18>

Ticket System

unread,
Mar 29, 2012, 6:26:45 AM3/29/12
to egm...@gmail.com, slava...@gmail.com, mc-...@googlegroups.com
#2692: Date not set properly in manpage
--------------------------+----------------------------------------
Reporter: egmont | Owner: slavazanko
Type: defect | Status: accepted
Priority: major | Milestone: 4.8.3
Component: mc-core | Version: 4.8.1
Resolution: | Keywords: stable-candidate
Blocked By: | Blocking:
Branch state: on review | Votes for changeset: andrew_b
--------------------------+----------------------------------------
Changes (by andrew_b):

* votes: => andrew_b


--
Ticket URL: <http://www.midnight-commander.org/ticket/2692#comment:19>

Ticket System

unread,
Apr 2, 2012, 5:58:22 AM4/2/12
to egm...@gmail.com, slava...@gmail.com, mc-...@googlegroups.com
#2692: Date not set properly in manpage
-------------------------+-----------------------------------------
Reporter: egmont | Owner: slavazanko
Type: defect | Status: accepted
Priority: major | Milestone: 4.8.3
Component: mc-core | Version: 4.8.1
Resolution: | Keywords: stable-candidate
Blocked By: | Blocking:
Branch state: approved | Votes for changeset: andrew_b angel_il
-------------------------+-----------------------------------------
Changes (by angel_il):

* votes: andrew_b => andrew_b angel_il
* branch_state: on review => approved


--
Ticket URL: <http://www.midnight-commander.org/ticket/2692#comment:20>

Ticket System

unread,
Apr 2, 2012, 6:50:30 AM4/2/12
to egm...@gmail.com, slava...@gmail.com, mc-...@googlegroups.com
#2692: Date not set properly in manpage
------------------------+----------------------------------------
Reporter: egmont | Owner: slavazanko
Type: defect | Status: testing
Priority: major | Milestone: 4.8.3
Component: mc-core | Version: 4.8.1
Resolution: fixed | Keywords: stable-candidate
Blocked By: | Blocking:
Branch state: merged | Votes for changeset: committed-master
------------------------+----------------------------------------
Changes (by slavazanko):

* status: accepted => testing
* votes: andrew_b angel_il => committed-master
* resolution: => fixed
* branch_state: approved => merged


Comment:

merged to master:
{{{
git log --pretty=oneline ea82ca4..cd1f777
}}}

--
Ticket URL: <http://www.midnight-commander.org/ticket/2692#comment:21>

Ticket System

unread,
Apr 2, 2012, 6:55:17 AM4/2/12
to egm...@gmail.com, slava...@gmail.com, mc-...@googlegroups.com
#2692: Date not set properly in manpage
-------------------------------------+-------------------------------------
Reporter: egmont | Owner: slavazanko
Type: defect | Status: closed
Priority: major | Milestone: 4.8.3
Component: mc-core | Version: 4.8.1
Resolution: fixed | Keywords:
Blocked By: | Blocking:
Branch state: merged | Votes for changeset: committed-
| master committed-stable
-------------------------------------+-------------------------------------
Changes (by slavazanko):

* keywords: stable-candidate =>
* status: testing => closed
* votes: committed-master => committed-master committed-stable


Comment:

merged to stable:
{{{
git log --pretty=oneline b7eb59e..344130d
}}}

--
Ticket URL: <http://www.midnight-commander.org/ticket/2692#comment:22>

Reply all
Reply to author
Forward
0 new messages