Re: `make dist` fails with current git
On Wed, Oct 13, 2021, at 2:32 PM, Nick Bowler wrote: > On 2021-10-13, Zack Weinberg wrote: >> On Wed, Oct 13, 2021, at 2:11 PM, Nick Bowler wrote: >>> I think this happened because your CI system has done a shallow clone. >>> So the changelog generation failed because the git log is incomplete. >> >> I did a --single-branch clone, but not a shallow one. Shouldn't the trunk >> be self-contained? > > I think --single-branch should be fine: it seems to work for me... > > But with e.g., a "--depth 1" clone I get the exact same error you > reported (because the commit IDs mentioned in .git-log-fix are not > available). After a little more investigation, a --single-branch clone indeed works fine. I was confused by two unrelated bugs, which happen regardless of what you clone. 1. `make dist` immediately after `configure` fails due to a missing dependency somewhere: $ make dist make dist-xz dist-gzip am__post_remove_distdir='@:' make[1]: Entering directory '/home/zack/projects/gnu/B-automake' make distdir-am make[2]: Entering directory '/home/zack/projects/gnu/B-automake' make[3]: Entering directory '/home/zack/projects/gnu/B-automake' make[3]: Leaving directory '/home/zack/projects/gnu/B-automake' Updating ../automake/doc/version.texi GEN ../automake/doc/amhello-1.0.tar.gz ../automake/doc/amhello-1.0.tar.gz: recipe failed. See file '/home/zack/projects/gnu/automake/doc/amhello/amhello-output.tmp' for details make[2]: *** [Makefile:3759: ../automake/doc/amhello-1.0.tar.gz] Error 1 make[2]: Leaving directory '/home/zack/projects/gnu/B-automake' make[1]: *** [Makefile:3245: distdir] Error 2 make[1]: Leaving directory '/home/zack/projects/gnu/B-automake' make: *** [Makefile:: dist] Error 2 Running `make` first is a sufficient workaround. 2. `make dist` from a build directory that is not a subdirectory of the source directory fails during ChangeLog generation, with a different error than the one I reported earlier: make[1]: Entering directory '/home/zack/projects/gnu/B-automake' make distdir-am make[2]: Entering directory '/home/zack/projects/gnu/B-automake' GEN ChangeLog fatal: not a git repository (or any parent up to mount point /) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). gitlog-to-changelog: error closing pipe from git log --log-size '--pretty=format:%H:%ct %an <%ae>%n%n%s%n%n%b' '--since=2011-12-28 00:00:00' make[2]: *** [../automake/maintainer/maint.mk:48: ChangeLog] Error 1 make[2]: Leaving directory '/home/zack/projects/gnu/B-automake' make[1]: *** [Makefile:3245: distdir] Error 2 make[1]: Leaving directory '/home/zack/projects/gnu/B-automake' make: *** [Makefile:: dist] Error 2 I will see if I can find time to patch these. zw
Re: `make dist` fails with current git
On 2021-10-13, Zack Weinberg wrote: > On Wed, Oct 13, 2021, at 2:11 PM, Nick Bowler wrote: >> I think this happened because your CI system has done a shallow clone. >> So the changelog generation failed because the git log is incomplete. > > I did a --single-branch clone, but not a shallow one. Shouldn't the trunk > be self-contained? I think --single-branch should be fine: it seems to work for me... But with e.g., a "--depth 1" clone I get the exact same error you reported (because the commit IDs mentioned in .git-log-fix are not available). A possible workaround (only if you don't care about the resulting changelog being correct) would be to truncate .git-log-fix before running make dist. Cheers, Nick
Re: `make dist` fails with current git
On Wed, Oct 13, 2021, at 2:11 PM, Nick Bowler wrote: > I think this happened because your CI system has done a shallow clone. > So the changelog generation failed because the git log is incomplete. I did a --single-branch clone, but not a shallow one. Shouldn't the trunk be self-contained? zw
Re: `make dist` fails with current git
On 13/10/2021, Zack Weinberg wrote: > On Wed, Oct 13, 2021, at 11:54 AM, Bob Friesenhahn wrote: >> On Wed, 13 Oct 2021, Zack Weinberg wrote: >>> >>> Looks like some kind of problem with automatic ChangeLog generation? >> >> To me this appears to be the result of skipping an important step in >> what should be the process. It seems that there should be a >> requirement that 'make distcheck' succeed prior to a commit. Then >> this issue would not have happened. > > Well, yes, but how do I _fix_ it? :-) > > <.< I _may_ be investigating the possibility of setting up CI for automake > so that problems like this are at least noticed in a timely fashion. But if > the tree is broken to begin with, it's troublesome... I think this happened because your CI system has done a shallow clone. So the changelog generation failed because the git log is incomplete. I have no trouble running "make dist" from a normal git checkout. Cheers, Nick
Re: `make dist` fails with current git
On Wed, Oct 13, 2021, at 11:54 AM, Bob Friesenhahn wrote: > On Wed, 13 Oct 2021, Zack Weinberg wrote: >> >> Looks like some kind of problem with automatic ChangeLog generation? > > To me this appears to be the result of skipping an important step in > what should be the process. It seems that there should be a > requirement that 'make distcheck' succeed prior to a commit. Then > this issue would not have happened. Well, yes, but how do I _fix_ it? :-) <.< I _may_ be investigating the possibility of setting up CI for automake so that problems like this are at least noticed in a timely fashion. But if the tree is broken to begin with, it's troublesome... zw
Re: `make dist` fails with current git
On Wed, 13 Oct 2021, Zack Weinberg wrote: Looks like some kind of problem with automatic ChangeLog generation? To me this appears to be the result of skipping an important step in what should be the process. It seems that there should be a requirement that 'make distcheck' succeed prior to a commit. Then this issue would not have happened. Of course make distcheck' takes a long time, and it is possible that for Automake results depend partially on what has already been committed and not just what is in the current source tree. Bob -- Bob Friesenhahn bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer,http://www.GraphicsMagick.org/ Public Key, http://www.simplesystems.org/users/bfriesen/public-key.txt
`make dist` fails with current git
$ make V=1 dist make dist-xz dist-gzip am__post_remove_distdir='@:' make[1]: Entering directory '/home/zack/projects/gnu/autoconf/ci/b-automake' make distdir-am make[2]: Entering directory '/home/zack/projects/gnu/autoconf/ci/b-automake' set -e; set -u; \ if test -d ../s-automake/.git; then \ rm -f ChangeLog-t \ && /usr/bin/perl ../s-automake/lib/gitlog-to-changelog \ --amend=../s-automake/.git-log-fix --since='2011-12-28 00:00:00' --no-cluster --format '%s%n%n%b' >ChangeLog-t \ && chmod a-w ChangeLog-t \ && mv -f ChangeLog-t ChangeLog \ || exit 1; \ elif test ! -f ../s-automake/ChangeLog; then \ echo "Source tree is not a git checkout, and no pre-existent" \ "ChangeLog file has been found there" >&2; \ exit 1; \ fi gitlog-to-changelog:../s-automake/.git-log-fix: unused entry: 3b369e6bbe0fb6d7359398935706c87dd9375cb6 gitlog-to-changelog:../s-automake/.git-log-fix: unused entry: 22729165f6bb902daeb8a4d8e7cb06982390f327 make[2]: *** [../s-automake/maintainer/maint.mk:48: ChangeLog] Error 1 make[2]: Leaving directory '/home/zack/projects/gnu/autoconf/ci/b-automake' make[1]: *** [Makefile:3245: distdir] Error 2 make[1]: Leaving directory '/home/zack/projects/gnu/autoconf/ci/b-automake' make: *** [Makefile:: dist] Error 2 Looks like some kind of problem with automatic ChangeLog generation? The commits it's complaining about are commit 22729165f6bb902daeb8a4d8e7cb06982390f327 Author: Peter Rosin Date: Fri Feb 17 10:13:15 2012 +0100 fixup: .git-log-fix should not be executable * .fix-git-log: Set mode 644. commit 3b369e6bbe0fb6d7359398935706c87dd9375cb6 Author: Stefano Lattarini Date: Thu Feb 16 22:29:32 2012 +0100 maint: use AC_PACKAGE_BUGREPORT to avoid duplication * configure.ac: In the message reporting whether the user is about to build an alpha or beta version, use the autoconf-provided AC_PACKAGE_BUGREPORT macro instead of duplicating the bur reporting address.