diff --git a/README.rst b/README.rst index 2c95f7c4b..1b8eb0716 100644 --- a/README.rst +++ b/README.rst @@ -104,6 +104,16 @@ conditions for (2), e.g. https://github.com/hsivonen/simd/issues/25 obvious so documentation is less necessary, and dependent crates all do it correctly already.) +Changed orig tarballs +--------------------- + +Sometimes the orig.tar generated by debcargo might change e.g. if you are using +a newer version of debcargo and one of the dependencies relating to generating +the tarball was updated and its behaviour changed - compression settings, +tarball archive ordering, etc. This will cause your upload to get REJECTED by +the Debian FTP archive for having a different orig.tar. In this case, set +REUSE_EXISTING_ORIG_TARBALL=1 when running ``./release.sh``. + ITPs ---- diff --git a/build.sh b/build.sh index c4ba56f23..244733958 100755 --- a/build.sh +++ b/build.sh @@ -49,7 +49,14 @@ if shouldbuild ${DEBSRC}_${DEBVER}.dsc "$PKGNAME/debian/changelog" ]; then mv "${DEBSRC}_${UPSVER}.orig.tar.gz" "${DEBSRC}_${UPSVER}.orig.tar.gz.new" apt-get -t unstable source "${DEBSRC}" # "=${DEBVER}" # check that old tarball contains same contents as new tarball - diff -q <(zcat "${DEBSRC}_${UPSVER}.orig.tar.gz.new") <(zcat "${DEBSRC}_${UPSVER}.orig.tar.gz") + if ! diff -ru \ + --label "${DEBSRC}_${UPSVER}.orig.tar.gz.new" \ + <(zcat "${DEBSRC}_${UPSVER}.orig.tar.gz.new" | tar -tvvf-) \ + --label "${DEBSRC}_${UPSVER}.orig.tar.gz" \ + <(zcat "${DEBSRC}_${UPSVER}.orig.tar.gz" | tar -tvvf-); then + read -p "contents differ, continue with old tarball or abort? [y/N] " x + if [ "$x" != "y" ]; then exit 1; fi + fi ( cd "$PKGNAME" && dpkg-buildpackage -d -S --no-sign ) fi # sign if not UNRELEASED