]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
dmaketgz: release tarball generation using docker
authorDaniel Stenberg <daniel@haxx.se>
Tue, 16 Apr 2024 14:56:03 +0000 (16:56 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 16 Apr 2024 21:38:55 +0000 (23:38 +0200)
For easier reproducibility.

Mention using this script in RELEASE-PROCEDURE

Closes #13388

docs/RELEASE-PROCEDURE.md
scripts/Makefile.am
scripts/dmaketgz [new file with mode: 0755]

index 20b6cfc11c037a99968579feea9e607533712e74..03db8ae2f0b53d5dddf20f60e6c8b5012b00fd06 100644 (file)
@@ -23,9 +23,7 @@ in the source code repo
   tag and we use underscores instead of dots in the version number. Make sure
   the tag is GPG signed (using -s).
 
-- run `./maketgz 7.34.0` to build the release tarballs. It is important that
-  you run this on a machine with the correct set of autotools etc installed as
-  this is what is shipped and used by most users on \*nix like systems.
+- run `./scripts/dmaketgz 7.34.0` to build the release tarballs.
 
 - push the git commits and the new tag
 
index ad48771942d2bbda37c8b08f16422559f9632500..772c7bd8dac456d6ee9c255258707fc8f83605eb 100644 (file)
@@ -23,7 +23,8 @@
 ###########################################################################
 
 EXTRA_DIST = coverage.sh completion.pl firefox-db2pem.sh checksrc.pl    \
- mk-ca-bundle.pl schemetable.c cd2nroff nroff2cd cdall cd2cd managen
+ mk-ca-bundle.pl schemetable.c cd2nroff nroff2cd cdall cd2cd managen \
+ dmaketgz
 
 ZSH_FUNCTIONS_DIR = @ZSH_FUNCTIONS_DIR@
 FISH_FUNCTIONS_DIR = @FISH_FUNCTIONS_DIR@
diff --git a/scripts/dmaketgz b/scripts/dmaketgz
new file mode 100755 (executable)
index 0000000..e361d35
--- /dev/null
@@ -0,0 +1,52 @@
+#!/bin/sh
+# docker-maketgz
+#
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
+#
+# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at https://curl.se/docs/copyright.html.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the COPYING file.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+# SPDX-License-Identifier: curl
+#
+###########################################################################
+
+version="${1:-}"
+
+if [ -z "$version" ]; then
+  echo "Specify a version number!"
+  exit
+fi
+
+make distclean
+docker build \
+       --build-arg SOURCE_DATE_EPOCH="$(date -u +%s)" \
+       --build-arg UID="$(id -u)" \
+       --build-arg GID="$(id -g)" \
+       -t curl/curl .
+
+run="run --rm -it -u $(id -u):$(id -g) -v $(pwd):/usr/src -w /usr/src curl/curl"
+
+# shellcheck disable=SC2086
+# "Double quote to prevent globbing and word splitting" on the $run use below
+docker $run autoreconf -fi
+# shellcheck disable=SC2086
+docker $run ./configure --without-ssl --without-libpsl
+# shellcheck disable=SC2086
+docker $run make -sj8
+# shellcheck disable=SC2086
+docker $run ./maketgz $version