Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

less is not reproducible when built from git #583

Open
bbhtt opened this issue Oct 26, 2024 · 6 comments
Open

less is not reproducible when built from git #583

bbhtt opened this issue Oct 26, 2024 · 6 comments

Comments

@bbhtt
Copy link

bbhtt commented Oct 26, 2024

It's generating timestamps that cause the issue.

See

  1. less/mkhelp.pl

    Lines 10 to 12 in e77e117

    my ($sec,$min,$hour,$mday,$mon,$year) = gmtime();
    printf "/* This file was generated by mkhelp.pl from less.hlp at %d:%02d on %d/%d/%d */\n",
    $hour, $min, $year+1900, $mon+1, $mday;
  2. less/mkhelp.py

    Lines 6 to 9 in e77e117

    time = time.gmtime()
    print("/* This file was generated by mkhelp.py from less.hlp at "\
    "%d:%02d GMT on %d/%d/%d */\n" %
    (time.tm_hour, time.tm_min, time.tm_year, time.tm_mon, time.tm_mday))
  3. less/Makefile.aut

    Lines 92 to 98 in e77e117

    REPLACE_VERSION = \
    DT=`date '+%d %h %Y'`; \
    echo "Stuffing version number ${REL} into $@"; \
    rm -f $@; \
    sed \
    -e "s;@@VERSION@@;${REL};" \
    -e "s;@@DATE@@;$$DT;" >$@

Diffoscope:

image

I temporarily patched it to remove timestamp generation https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/merge_requests/22374, I don't think manpages need them.

@gwsw
Copy link
Owner

gwsw commented Oct 26, 2024

I think this is the same issue as #567. That was fixed in c02f755. But that fix doesn't remove timestamps from the man pages. It seems to me that most man pages do have timestamps. On my Fedora system I looked at 1277 man pages, and 987of them have a timestamp in the last line. It doesn't seem like a good idea for less's man page to be different from most of the others in this respect. But perhaps that timestamp could be changed to be baed on SOURCE_DATE_EPOCH as well.

@bbhtt
Copy link
Author

bbhtt commented Oct 26, 2024

The fix is not on master so I didn't notice it but yea using that for man pages too is probably also fine.

@avih
Copy link
Contributor

avih commented Oct 26, 2024

On my Fedora system I looked at 1277 man pages, and 987of them have a timestamp in the last line. It doesn't seem like a good idea for less's man page to be different from most of the others in this respect.

Agreed, but someone which needs a reproducible build have other priorities.

But perhaps that timestamp could be changed to be baed on SOURCE_DATE_EPOCH as well.

Yeah, sounds good to me too.

@bbhtt
Copy link
Author

bbhtt commented Oct 26, 2024

Any idea if these fixes will go in master or later in release tags? I can't tell if the pos659 branch has a special significance.

@gwsw
Copy link
Owner

gwsw commented Oct 26, 2024

post659 was a development branch while the 668 bug fix release was being developed in master. Now that 668 is released, post659 will be merged back into master, probably in a week or so.

gwsw added a commit that referenced this issue Oct 26, 2024
Expand c02f755 to use the
SOURCE_DATE_EPOCH environment variable to create the timestamps
in the .nro man page files.
Also change mkhelp.py to use SOURCE_DATE_EPOCH like mkhelp.pl.

Related to #583.
@gwsw
Copy link
Owner

gwsw commented Oct 26, 2024

Fixed in 98d5fd4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants