From 3d32fa047ddd7fc7b021aac6ce7125d484fb7eca Mon Sep 17 00:00:00 2001 From: Ximin Luo Date: Wed, 25 Oct 2017 22:45:13 +0200 Subject: [PATCH] Update scripts for beta versions --- debian/README.source | 6 +++--- debian/check-orig-suspicious.sh | 10 ++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/debian/README.source b/debian/README.source index 385066df3d..c23d5a3520 100644 --- a/debian/README.source +++ b/debian/README.source @@ -148,10 +148,10 @@ Import of a new upstream version -------------------------------- $ uscan --verbose -$ ver=UPDATE-ME # whatever it is, X.YY.0 probably -$ tar xf ../rustc-$ver-src.tar.gz && ( cd rustc-$ver-src/ && ../debian/prune-unused-deps ) && rm -rf rustc-$ver-src/ +$ ver=UPDATE-ME # whatever it is, X.YY.0 or X.YY.0~beta probably +$ tar xf ../rustc-${ver/\~/-}-src.tar.gz && ( cd rustc-${ver/*~*/beta}-src/ && ../debian/prune-unused-deps ) && rm -rf rustc-${ver/*~*/beta}-src/ # ^ If this fails, you probably need to refresh patches or edit debian/prune-unused-deps -$ git commit -m "Update Files-Excluded for new upstream version $ver" debian/copyright +$ git commit -m "Update Files-Excluded for new upstream version ${ver/\~/-}" debian/copyright $ uscan --verbose # yes, again, to pick up the new Files-Excluded stuff # Keep running this and follow its instructions, until it gives no output: diff --git a/debian/check-orig-suspicious.sh b/debian/check-orig-suspicious.sh index da009465fc..b4f2cc2c8e 100755 --- a/debian/check-orig-suspicious.sh +++ b/debian/check-orig-suspicious.sh @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -set -x +set -ex ver="$1" test -n "$ver" || exit 2 @@ -8,9 +8,11 @@ test -n "$ver" || exit 2 FILTER="Files-Excluded: in debian/copyright and run a repack." SUS_WHITELIST=$(find "${PWD}" -name upstream-tarball-unsuspicious.txt -type f) -rm -rf rustc-$ver-src/ -tar xf ../rustc_$ver+dfsg1.orig.tar.xz && cd rustc-$ver-src/ +rm -rf rustc-${ver/*~*/beta}-src/ +tar xf ../rustc_$ver+dfsg1.orig.tar.xz && cd rustc-${ver/*~*/beta}-src/ +# Remove tiny files 4 bytes or less +find . -size -4c -delete # Remove non-suspicious files, warning on patterns that match nothing grep -v '^#' ${SUS_WHITELIST} | xargs -I% sh -c 'rm -r ./% || true' echo "Checking for suspicious files..."