ClusterLabs/libqb

[HEAD/1.9.0] Release tarballs contain (and will contain) empty configure.ac

hartwork opened this issue · 7 comments

I'm aware that configure — not configure.ac — is important to build but an empty configure.ac — unlike in Git — in the release archive seems weird and not ideal to me:

# wget -O- https://github.com/ClusterLabs/libqb/releases/download/1.9.0/libqb-1.9.0.tar.xz 2>/dev/null | tar -tJv | fgrep configure.ac
-rw-rw-r-- 500/500           0 2019-12-12 14:27 libqb-1.9.0/configure.ac
                            ^^^

Git master still has this problem so the next release off master will be affected:

# git clone https://github.com/ClusterLabs/libqb.git
# cd libqb
# ./autogen.sh && ./configure && make dist
# tar tvf libqb-1.9.0.tar.gz | fgrep configure.ac
-rw-r--r-- 1000/1000         0 2020-01-02 20:56 libqb-1.9.0/configure.ac
                            ^^^

From what I can see, this code is at fault:

libqb/Makefile.am

Lines 127 to 134 in 51a03aa

# untaint configure.ac when modified upon obtaining the "yanked" snapshot form
dist-hook: gen-ChangeLog
echo $(VERSION) | tee $(distdir)/.tarball-version | grep -Eqv '\-yank' \
|| sed "s/\(.*git-version-gen[^']*[']\)[^']*/\1\$$Format:%h??%D\$$/" \
$(distdir)/configure.ac > $(builddir)/configure.ac-t
touch -r $(distdir)/configure.ac $(builddir)/configure.ac-t
chmod u+w $(distdir)/configure.ac
mv $(builddir)/configure.ac-t $(distdir)/configure.ac

Line 131 only generates $(builddir)/configure.ac-t in some cases.
Line 132 steps in to create the file empty otherwise — that's our case — using touch.
On a side note, line 133 seems to also target the wrong file.

What do you think?

It's definitely wrong and needs fixing, thanks for letting us know. I'll look at it in more detail when I get through the 'back to work' backlog !

should be fixed by #376

should be fixed by #376

👍 With latest master things look better now:

# tar tvf libqb-*.tar.gz | fgrep configure.ac
-rw-r--r-- 1000/1000     26148 2020-01-06 17:59 libqb-1.9.0.1-0f67/configure.ac

The chmod line still applies to the wrong file, if I'm not mistaken:

chmod u+w $(distdir)/configure.ac-t; \

I'd expect $(builddir) not $(distdir) here.

Yes you are right. My bad. I´ll open another PR.

#377

there and thanks for spotting it.

Thanks for the report, it seems that the state after all these
changes were indeed meant originally, but I guess I missed that
for make distcheck generally working, IIRC, so it was really
just a matter of being attentive to detail -- thanks @hartwork
for that.

That was quick — thank you! 👍