Re: `make dist` fails with current git

2021-10-14 Thread Zack Weinberg
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

2021-10-13 Thread Nick Bowler
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

2021-10-13 Thread Zack Weinberg
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

2021-10-13 Thread Nick Bowler
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

2021-10-13 Thread Zack Weinberg
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

2021-10-13 Thread Bob Friesenhahn

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