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
Empty manpage over parallel build #12
Comments
I was trying to track down the 010_disable-manpage-generation.patch to see what it did so I could make whatever problem it was solving go away, but struggled to find it. The man page is identical to retry --help, keeping the two pages the same manually is likely to be error prone. In theory moving the manpage off into it's own target might work. In other words nothing is done for all, you would have to run "make man" or something along those lines to regenerate retry.1. Would that work? I'm trying to figure out a way to make sure cross compiling works. |
Something like this:
|
This only will create a new target for makefile. When running I suggest to create an external script (out of makefile) to create the manpage. I do it in my projects. See examples in dcfldd[2] and scrot[2]. [1] https://github.com/resurrecting-open-source-projects/dcfldd/tree/master/man |
In my first post I wrote: "Currently, this CI test fails.". Maybe this is unclear. The CI test is ok and can be merged (if you think this is a good idea). The test fails because the manpage is wrong when made via build process. |
An external script and a makefile target are largely the same thing, neither ideal. I went digging and figured out how to generate the man page extending the dist target. This means the man page will be generated when the tarball is created, but will not otherwise be touched at build time. This should solve your problem and remove the need for the patch:
|
In my tests it is OK for Debian (good!), but it will fail for the make dist (but this is a problem for the upstream side only, not affecting Debian packaging). Please, go ahead if you like this solution. Feel free for ask me for new tests. |
I've created a PR with the manpage having a proper target, and the dist hook depending on the manpage. Can you see if this makes sense: #15 I can then pull in the tests. |
I'm getting closer. The manpage build is forced at dist time, but is otherwise only rebuilt if missing. This means that as long as your deploy from a proper dist tarball, you will always get the same contents in the man page which remain unchanged. I updated the tests in the dist branch to build a dist tarball, and then attempt a build from that, twice. I have been struggling to get these two builds to be identical, it seems the RPATH buried in the binaries is different and refuses to be stripped. Stripping works on MacOS, but it doesn't appear to work in Ubuntu. |
If I set the SOURCE_DATE_EPOCH, will this give you a reproducible manpage build? |
On Debian systems, SOURCE_DATE_EPOCH is honored. My last changelog was made in 12 Jan 2023. The manpage is created using this date. IMO, the error is in txt2man command:
|
I think I have it. Building the tool twice results in identical binaries and manpages. |
In theory this should be fixed, and the manpage should "just work". Please reopen if I broke it. |
Hi @minfrin,
The last version of retry (1.0.5) fails to dynamically generate the manpage on Debian because, by default, Debian uses parallel build (-j option for make command). See an example below:
Consequently, the only content of the retry.1 is:
I will send a PR to add a CI test that includes a check of the manpage content. Currently, this CI test fails.
IMHO, it is not a good generate a manpage from each build. I suggest to release a manpage generated by hand inside of the tarball. I uploaded 1.0.5 to Debian and I am using the bootstrapped tarball available for download[1]. This tarball already has a manpage; I made a patch to exclude the end of the Makefile.am and to use the provided manpage[2].
[1] https://github.com/minfrin/retry/releases/download/retry-1.0.5/retry-1.0.5.tar.gz
[2] https://salsa.debian.org/debian/retry/-/blob/debian/master/debian/patches/010_disable-manpage-generation.patch
About my PR to create a CI test, note that was included "CLEANFILES = retry.1" to Makefile.am to allow the make command to execute a perfect clean before a new build because the manpage originally doesn't exist on source code.
Thanks for your work.
The text was updated successfully, but these errors were encountered: