[pkg-haskell-tools] 01/01: dht upload: don't default to ssh-upload; -h option

Sean Whitton spw-guest at moszumanska.debian.org
Thu Aug 11 02:41:25 UTC 2016


This is an automated email from the git hooks/post-receive script.

spw-guest pushed a commit to branch dput
in repository pkg-haskell-tools.

commit 745bcaac1b696d5f9d575e5719c7ba821ca48429
Author: Sean Whitton <spwhitton at spwhitton.name>
Date:   Wed Aug 10 19:40:58 2016 -0700

    dht upload: don't default to ssh-upload; -h option
---
 debian/changelog |  8 ++++++++
 scripts/upload   | 27 ++++++++++++++++++++++-----
 2 files changed, 30 insertions(+), 5 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 1ec070f..4a32ae3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+pkg-haskell-tools (0.10.5) UNRELEASED; urgency=medium
+
+  * dht upload: New -h option to select the dput upload host.
+  * dht upload: Defaults to the dput default_host, not ssh-upload.
+  * dht upload: Documentation recommends using ssh-upload host.
+
+ -- Sean Whitton <spwhitton at spwhitton.name>  Wed, 10 Aug 2016 19:39:26 -0700
+
 pkg-haskell-tools (0.10.4) unstable; urgency=medium
 
   [ Joachim Breitner ]
diff --git a/scripts/upload b/scripts/upload
index d532934..f86442e 100755
--- a/scripts/upload
+++ b/scripts/upload
@@ -6,11 +6,15 @@ if [ "$1" = "--help" ]
 then
   echo "upload - Uploads, tags and pushes"
   echo
-  echo "Usage: dht upload [foo.changes]"
+  echo "Usage: dht upload [-h HOST] [foo.changes]"
   echo
   echo "Signs the .changes file and the corresponding .dsc file in a temporary"
   echo "location (to avoid touching the original files), uploads them to the archive"
-  echo "using \"dput ssh-upload\" and tags them in the repository and pushes the tag."
+  echo "using \"dput\", tags them in the repository and pushes the tag."
+  echo
+  echo "If the -h parameter is specified, upload to HOST, rather than the dput"
+  echo "\"default_host\".  If mass-uploading, it is suggested to use \"ssh-upload\" for"
+  echo "robustness (see the discussion in #833536)."
   echo
   echo "If no changes file is given, but the script is run in a debian source package,"
   echo "it checks the parent directory for an appropriately named changes file, just"
@@ -26,11 +30,15 @@ fi
 if [ "$1" = "--manpage" ]
 then
 cat <<'__END__'
-Usage: dht upload foo.changes
+Usage: dht upload [-h HOST] [foo.changes]
 
 Signs the `.changes` file and the corresponding `.dsc` file in a temporary
 location (to avoid touching the original files), uploads them to the archive
-using `dput ssh-upload` and tags them in the repository and pushes the tag.
+using `dput`, tags them in the repository and pushes the tag.
+
+If the -h parameter is specified, upload to HOST, rather than the dput
+`default_host`.  If mass-uploading, it is suggested to use `ssh-upload`
+for robustness (see the discussion in #833536).
 
 If no changes file is given, but the script is run in a debian source package,
 it checks the parent directory for an appropriately named changes file, just
@@ -42,6 +50,15 @@ __END__
 	exit 0;
 fi
 
+if [ "$1" = "-h" ]
+then
+	host="$2"
+	shift
+	shift
+else
+	host=""
+fi
+
 changes="$@"
 
 if [ -z "$changes" -a -r "debian/changelog" ]
@@ -92,7 +109,7 @@ do
 	msg="Tagging $src version $ver, targetted for $dist"
 	dcmd cp --reflink=auto -v "$c" "$tmpdir"
 	debsign --re-sign "$tmpdir"/"$(basename "$c")"
-	dput ssh-upload "$tmpdir"/"$(basename "$c")"
+	dput "$host" "$tmpdir"/"$(basename "$c")"
 	git -C "$dir" tag -a -m "$msg" "$tag" "$rev"
 done
 git push --tags

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-haskell/pkg-haskell-tools.git



More information about the Pkg-haskell-commits mailing list