diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:03:05 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:03:05 +0000 |
commit | 217d9223a5aa75daf9f286fd1fc06dae379b5dbc (patch) | |
tree | b43bedae234ad56894a82934ee57e3619f3374d5 /debian/make_orig-stage0_tarball.sh | |
parent | Adding upstream version 1.64.0+dfsg1. (diff) | |
download | rustc-217d9223a5aa75daf9f286fd1fc06dae379b5dbc.tar.xz rustc-217d9223a5aa75daf9f286fd1fc06dae379b5dbc.zip |
Adding debian version 1.64.0+dfsg1-1.debian/1.64.0+dfsg1-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | debian/make_orig-stage0_tarball.sh | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/debian/make_orig-stage0_tarball.sh b/debian/make_orig-stage0_tarball.sh new file mode 100755 index 000000000..c6593f25b --- /dev/null +++ b/debian/make_orig-stage0_tarball.sh @@ -0,0 +1,48 @@ +#!/bin/sh +# See README.Debian "Bootstrapping" for details. +# +# You may want to use `debian/rules source_orig-stage0` instead of calling this +# directly. + +set -e + +upstream_version="$(dpkg-parsechangelog -SVersion | sed -e 's/\(.*\)-.*/\1/g')" +upstream_bootstrap_arch="${upstream_bootstrap_arch:-amd64 arm64 armhf i386 mips64 mips64el powerpc ppc64 ppc64el s390x}" + +rm -f stage0/*/*.sha256 +mkdir -p stage0 build && ln -sf ../stage0 build/cache +if [ -n "$(find stage0/ -type f)" ]; then + echo >&2 "$0: NOTE: extra artifacts in stage0/ will be included:" + find stage0/ -type f +fi +for deb_host_arch in $upstream_bootstrap_arch; do + make -s --no-print-directory -f debian/architecture-test.mk "rust-for-deb_${deb_host_arch}" | { + read deb_host_arch rust_triplet + PYTHONPATH=src/bootstrap debian/get-stage0.py "${rust_triplet}" + rm -rf "${rust_triplet}" + } +done + +echo >&2 "building stage0 tar file now, this will take a while..." +stamp=@${SOURCE_DATE_EPOCH:-$(date +%s)} +touch --date="$stamp" stage0/dpkg-source-dont-rename-parent-directory +tar --mtime="$stamp" --clamp-mtime \ + --owner=root --group=root \ + -cJf "../rustc_${upstream_version}.orig-stage0.tar.xz" \ + --transform "s/^stage0\///" \ + stage0/* + +rm -f src/bootstrap/bootstrap.pyc + +cat <<eof +================================================================================ +orig-stage0 bootstrapping tarball created in ../rustc_${upstream_version}.orig-stage0.tar.xz +containing the upstream compilers for $upstream_bootstrap_arch + +You *probably* now want to do the following steps: + +1. Add [$(echo $upstream_bootstrap_arch | sed -e 's/\S*/!\0/g')] to the rustc/cargo Build-Depends in d/control +2. Update d/changelog +3. Run \`dpkg-source -b .\` to generate a .dsc that includes this tarball. +================================================================================ +eof |