Add a note about non-deterministic tarballs

This commit is contained in:
Ximin Luo 2019-05-31 23:00:29 -07:00
parent 1a8fae5481
commit a0c73b1a8c
2 changed files with 18 additions and 1 deletions

View File

@ -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
----

View File

@ -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