fi
if [ ! -d "$PKGDIR/debian" ]; then
mkdir -p "$PKGDIR/debian"
- echo 'overlay = "."' > "$PKGCFG"
+ cat <<-eof > "$PKGCFG"
+ overlay = "."
+ uploaders = ["$DEBFULLNAME <$DEBEMAIL>"]
+ eof
git add "$PKGDIR"
fi
if [ ! -f "$PKGDIR/debian/copyright" ]; then
cat <<-eof > "$PKGDIR/debian/copyright"
FIXME fill me in using ./copyright.debcargo.hint as a guide
-
- You may find the following useful too:
-
- Files: debian/*
- Copyright:
- 2018 Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
- 2018 $DEBFULLNAME <$DEBEMAIL>
-
- The reason we don't put this in debian/copyright.debcargo.hint itself is
- documented here: https://salsa.debian.org/rust-team/debcargo-conf/issues/5
eof
fi
if [ -n "$VER" -a "$(sed -ne 's/^semver_suffix\s*=\s*//p' "$PKGCFG")" != "true" ]; then
fi
fi
+if ! grep -q uploaders "$PKGCFG"; then
+ # try to auto-fill in uploaders if debcargo.toml doesn't have it
+ uploader="$(egrep -A1 "[0-9][0-9]*( Debian)? Rust Maintainers" "$PKGDIR/debian/copyright" | tail -n1 | sed -re 's/^\s*[0-9]+\s*//g')"
+ sed -i -e 's/^\(overlay.*\)$/\1\nuploaders = ["'"$uploader"'"]/' "$PKGCFG"
+ if [ "$uploader" != "$DEBFULLNAME <$DEBEMAIL>" ]; then
+ echo >&2 "$0: Auto-added $uploader to uploaders in debcargo.toml, based on d/copyright"
+ read >&2 -p "$0: You may also want to add yourself; ctrl-c if you want to do that, or press enter to continue... " x
+ fi
+fi
+
run_debcargo
+git add -N "$PKGDIR"
if ! git diff --quiet -- "$PKGDIR_REL"; then
read -p "Update wrote some changes to $PKGDIR_REL, press enter to git diff..." x || true
you're not a Debian Developer and are unable to upload, please don't run that
script or else you will need to revert the changes that it makes to your git.
eof
+if [ -n "$VER" ]; then
+cat >&2 <<eof
+
+You are packaging an older version of a crate. Please document why it's needed,
+by adding comments to src/$PKGNAME/debian/debcargo.toml. For example because it
+is a dependency of other crate(s), and it is not possible to update them to use
+the latest version of $CRATE. Please also mention the names of these crate(s).
+eof
+fi