Author: myon
Date: 2008-08-23 14:03:53 +0000 (Sat, 23 Aug 2008)
New Revision: 1596

Modified:
   trunk/debian/changelog
   trunk/scripts/debsign.1
   trunk/scripts/debsign.sh
Log:
debsign: Fix debsign -r dir/*.changes, and do some QA on the manpage.
Continue with next file if an already existing signature is kept.

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2008-08-16 20:42:28 UTC (rev 1595)
+++ trunk/debian/changelog      2008-08-23 14:03:53 UTC (rev 1596)
@@ -38,8 +38,12 @@
   * uscan: Correct the <base ...> regex to be case-insensitive.  (Closes:
     #495265)
 
- -- Patrick Schoenfeld <[EMAIL PROTECTED]>  Thu, 14 Aug 2008 22:22:40 +0200
+  [ Christoph Berg ]
+  * debsign: Fix debsign -r dir/*.changes, and do some QA on the manpage.
+    Continue with next file if an already existing signature is kept.
 
+ -- Christoph Berg <[EMAIL PROTECTED]>  Sat, 23 Aug 2008 16:01:52 +0200
+
 devscripts (2.10.35) unstable; urgency=low
 
   * checkbashisms: Only flag "local x y" and "local foo=bar" when --posix is

Modified: trunk/scripts/debsign.1
===================================================================
--- trunk/scripts/debsign.1     2008-08-16 20:42:28 UTC (rev 1595)
+++ trunk/scripts/debsign.1     2008-08-23 14:03:53 UTC (rev 1596)
@@ -2,7 +2,7 @@
 .SH NAME
 debsign \- sign a Debian changes and dsc file pair using GPG/PGP
 .SH SYNOPSIS
-\fBdebsign\fR [options] [\fIchanges-file\fR|\fIdsc-file\fR|\fIcommands-file\fR]
+\fBdebsign\fR [options] [\fIchanges-file\fR|\fIdsc-file\fR|\fIcommands-file\fR 
...]
 .SH DESCRIPTION
 \fBdebsign\fR mimics the signing aspects (and bugs) of
 \fBdpkg-buildpackage\fR(1).  It takes either an unsigned \fI.dsc\fR
@@ -28,9 +28,9 @@
 the small \fI.dsc\fR and \fI.changes\fR files to a safe machine and
 then use the \fBdebsign\fR program to sign them before
 transferring them back.  This process can be automated in two ways.
-If the files to be signed live on the remote machine, the \fB\-r\fR
+If the files to be signed live on the \fBremote\fR machine, the \fB\-r\fR
 option may be used to copy them to the local machine and back again
-after signing.  If the files live on the local machine, then they may
+after signing.  If the files live on the \fBlocal\fR machine, then they may
 be transferred to the remote machine for signing using
 \fBdebrsign\fR(1).
 .PP
@@ -42,9 +42,9 @@
 The \fI.changes\fR and \fI.dsc\fR files live on the specified remote
 host.  In this case, a \fI.changes\fR file must be explicitly named,
 with an absolute directory or one relative to the remote home
-directory.  SSH will be used for the copying.  The
+directory.  \fBscp\fR will be used for the copying.  The
 [EMAIL PROTECTED]:\fIchanges\fR syntax is
-permitted as an alternative.
+permitted as an alternative.  Wildcards (\fB*\fR etc.) are allowed.
 .TP
 .B \-p\fIprogname\fR
 \fIprogname\fR is one of \fBpgp\fR or \fBgpg\fR, and specifies which
@@ -82,7 +82,7 @@
 name of the \fI.changes\fR file.
 .TP
 \fB\-\-multi\fR
-Multiarch changes mode: This signifies that \fBdebrsign\fR should
+Multiarch changes mode: This signifies that \fBdebsign\fR should
 use the most recent file with the name pattern
 \fIpackage_version_*+*.changes\fR as the changes file, allowing for the
 changes files produced by \fBdpkg-cross\fR.
@@ -124,7 +124,8 @@
 .BR sha1sum (1),
 .BR sha256sum (1),
 .BR gpg (1),
-.BR pgp (1)
+.BR pgp (1),
+.BR scp (1)
 and
 .BR devscripts.conf (5).
 .SH AUTHOR

Modified: trunk/scripts/debsign.sh
===================================================================
--- trunk/scripts/debsign.sh    2008-08-16 20:42:28 UTC (rev 1595)
+++ trunk/scripts/debsign.sh    2008-08-23 14:03:53 UTC (rev 1596)
@@ -364,12 +364,12 @@
        else withecho scp "$remotehost:$remotecommands" "$commands"
        fi
 
-       if [ -n "$changes" ] && echo "$changes" | grep -q "\*"
+       if [ -n "$changes" ] && echo "$changes" | grep -q "[\*\?\[\]]"
        then
            for changes in $changes
            do
                printf "\n"
-               dsc=`echo $changes | \
+               dsc=`echo "${remotedir+$remotedir/}$changes" | \
                    perl -pe 's/\.changes$/.dsc/; 
s/(.*)_(.*)_(.*)\.dsc/\1_\2.dsc/'`
                dosigning;
            done
@@ -387,7 +387,7 @@
 
        check_already_signed "$changes" "changes" && {
           echo "Leaving current signature unchanged." >&2
-           exit 0
+          return
        }
        if [ -n "$maint" ]
        then maintainer="$maint"
@@ -480,7 +480,7 @@
 
            if [ -n "$remotehost" ]
            then
-               withecho scp "$changes" "$remotehost:$remotechanges"
+               withecho scp "$changes" "$remotehost:$remotedir"
                PRECIOUS_FILES=$(($PRECIOUS_FILES - 1))
            fi
 
@@ -496,7 +496,7 @@
 
        check_already_signed "$commands" commands && {
            echo "Leaving current signature unchanged." >&2
-           exit 0
+           return
        }
     
     
@@ -563,7 +563,7 @@
 
        check_already_signed "$dsc" dsc && {
            echo "Leaving current signature unchanged." >&2
-           exit 0
+           return
        }
        if [ -n "$maint" ]
        then maintainer="$maint"



-- 
To unsubscribe, send mail to [EMAIL PROTECTED]

Reply via email to