mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 12:23:31 +08:00
Add ability to create reproducible source tarballs.
* src-release.sh: Add "-r <date>" option to create reproducible tarballs based upon a fixed timestamp of <date>. * binutils/README-how-to-make-a-release: Add a line showing how to use -r <date> when creating a binutils release.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2022-10-10 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
* src-release.sh: Add "-r <date>" option to create reproducible
|
||||||
|
tarballs based upon a fixed timestamp of <date>.
|
||||||
|
* binutils/README-how-to-make-a-release: Add a line showing how to
|
||||||
|
use -r <date> when creating a binutils release.
|
||||||
|
|
||||||
2022-10-04 Nick Clifton <nickc@redhat.com>
|
2022-10-04 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
* README-maintainer-mode: Add a minimum version of dejagnu
|
* README-maintainer-mode: Add a minimum version of dejagnu
|
||||||
|
@ -251,6 +251,10 @@ When the time comes to actually make the release....
|
|||||||
|
|
||||||
./src-release.sh -b -g -l -x binutils
|
./src-release.sh -b -g -l -x binutils
|
||||||
|
|
||||||
|
OR ... for a more reproducible tarball:
|
||||||
|
|
||||||
|
./src-release.sh -b -g -l -x -r `git log -1 --format=%cd --date=format:%F bfd/version.m4` binutils
|
||||||
|
|
||||||
24. Check that the files in the tarballs have the correct
|
24. Check that the files in the tarballs have the correct
|
||||||
permissions.
|
permissions.
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ SHA256PROG=sha256sum
|
|||||||
MAKE=make
|
MAKE=make
|
||||||
CC=gcc
|
CC=gcc
|
||||||
CXX=g++
|
CXX=g++
|
||||||
|
release_date=
|
||||||
|
|
||||||
# Default to avoid splitting info files by setting the threshold high.
|
# Default to avoid splitting info files by setting the threshold high.
|
||||||
MAKEINFOFLAGS=--split-size=5000000
|
MAKEINFOFLAGS=--split-size=5000000
|
||||||
@ -184,9 +185,17 @@ do_tar()
|
|||||||
ver=$2
|
ver=$2
|
||||||
echo "==> Making $package-$ver.tar"
|
echo "==> Making $package-$ver.tar"
|
||||||
rm -f $package-$ver.tar
|
rm -f $package-$ver.tar
|
||||||
find $package-$ver -follow \( $CVS_NAMES \) -prune \
|
if test x$release_date == "x" ; then
|
||||||
-o -type f -print \
|
find $package-$ver -follow \( $CVS_NAMES \) -prune -o -type f -print \
|
||||||
| tar cTfh - $package-$ver.tar
|
| tar cTfh - $package-$ver.tar
|
||||||
|
else
|
||||||
|
# Attempt to create a consistent, reproducible tarball using the
|
||||||
|
# specified date.
|
||||||
|
find $package-$ver -follow \( $CVS_NAMES \) -prune -o -type f -print \
|
||||||
|
| LC_ALL=C sort \
|
||||||
|
| tar cTfh - $package-$ver.tar \
|
||||||
|
--mtime=$release_date --group=0 --owner=0
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Compress the output with bzip2
|
# Compress the output with bzip2
|
||||||
@ -340,6 +349,7 @@ usage()
|
|||||||
echo " -g: Compress with gzip"
|
echo " -g: Compress with gzip"
|
||||||
echo " -l: Compress with lzip"
|
echo " -l: Compress with lzip"
|
||||||
echo " -x: Compress with xz"
|
echo " -x: Compress with xz"
|
||||||
|
echo " -r <date>: Create a reproducible tarball using <date> as the mtime"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -363,7 +373,7 @@ build_release()
|
|||||||
|
|
||||||
compressors=""
|
compressors=""
|
||||||
|
|
||||||
while getopts ":bglx" opt; do
|
while getopts ":bglr:x" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
b)
|
b)
|
||||||
compressors="$compressors bz2";;
|
compressors="$compressors bz2";;
|
||||||
@ -371,6 +381,8 @@ while getopts ":bglx" opt; do
|
|||||||
compressors="$compressors gz";;
|
compressors="$compressors gz";;
|
||||||
l)
|
l)
|
||||||
compressors="$compressors lz";;
|
compressors="$compressors lz";;
|
||||||
|
r)
|
||||||
|
release_date=$OPTARG;;
|
||||||
x)
|
x)
|
||||||
compressors="$compressors xz";;
|
compressors="$compressors xz";;
|
||||||
\?)
|
\?)
|
||||||
|
Reference in New Issue
Block a user