dist: fix reproducible build from release tarball

Make it possible to rebuild an identical copy from a release tarball. It
was previously only possible from a checked out git repository.

- add release-tools.sh to dist
- keep Makefile.dist around to include it in dist
- regenerate tool_huge.c with the new version in dist
- fix the dist CI job to not do make clean like before

Closes #14336
This commit is contained in:
Daniel Stenberg 2024-08-01 13:51:43 +02:00
parent c73b80a3cd
commit 754acd1a9d
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
5 changed files with 26 additions and 17 deletions

View file

@ -24,7 +24,7 @@
EXTRA_DIST = coverage.sh completion.pl firefox-db2pem.sh checksrc.pl \
mk-ca-bundle.pl schemetable.c cd2nroff nroff2cd cdall cd2cd managen \
dmaketgz
dmaketgz release-tools.sh
ZSH_FUNCTIONS_DIR = @ZSH_FUNCTIONS_DIR@
FISH_FUNCTIONS_DIR = @FISH_FUNCTIONS_DIR@

View file

@ -1205,14 +1205,20 @@ elsif($cmd eq "-c") {
my @files = @ARGV; # the rest are the files
open(INC, "<$include/curl/curlver.h");
while(<INC>) {
if($_ =~ /^#define LIBCURL_VERSION \"([0-9.]*)/) {
$version = $1;
last;
}
# can be overriden for releases
if($ENV{'CURL_MAKETGZ_VERSION'}) {
$version = $ENV{'CURL_MAKETGZ_VERSION'};
}
else {
open(INC, "<$include/curl/curlver.h");
while(<INC>) {
if($_ =~ /^#define LIBCURL_VERSION \"([0-9.]*)/) {
$version = $1;
last;
}
}
close(INC);
}
close(INC);
# learn all existing options
indexoptions($dir, @files);