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

Sven Bartscher kritzefitz at moszumanska.debian.org
Mon Aug 7 23:24:16 UTC 2017


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

kritzefitz pushed a commit to branch master
in repository pkg-haskell-tools.

commit 13bab66ac04904bc6a59e12e7d2e8da8775a68ed
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 7595f4f..e5de6ac 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+pkg-haskell-tools (0.11.0) 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.5) unstable; urgency=medium
 
   * Drop upper bound on optparse-applicative.  closes: #868635.
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