This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ANN] Updated: rsync-2.5.5-2


Hi,

Lapo Luchini wrote:
3 build script updated to support digital signatures
4 source package now contains original's package detached gpg signature
by the author and detached signatures on the script itself and on the
patch, signed by me
5 signatures can be checked with "./rsync-2.5.5-2.sh checksig"
6 "./rsync-2.5.5-2.sh all" can still be used to create an unsigned
package (with only original rsync package signature)
7 "SIG=1 ./rsync-2.5.5-2.sh all" can still be used to create a
signed package (with only original rsync package signature AND
signatures on script and patch)
...
I would like a negative or positive comment on the "improved" script, too =)
I'm preparing the gnupg 1.2.1 version right now, and I like the
packaging with the signed files :-), but I found a few problems in the
script:

1. I had to put some variables in quotes, otherwise you get problems
   with "if [ ... ]" when the variable is not set. E.g without SIG=1
2. text=... is set, but never used.
3. sig has to be sigfile.

See the attached diff for more details. ( I don't want to change
your code, but that were the lines that I changed in my gnupg-1.2.1-1.sh
file. )

Bye
   Volker

--- rsync-2.5.5-2.sh	2002-10-25 11:39:58.000000000 +0200
+++ rsync-2.5.5-2.sh.mod	2002-11-10 01:27:58.000000000 +0100
@@ -140,11 +140,11 @@
 }
 spkg() {
   (mkpatch && \
-  if [ ${SIG} ]; then name=${srcinstdir}/${src_patch_name} text="PATCH" sigfile; fi && \
+  if [ "${SIG}" ]; then name=${srcinstdir}/${src_patch_name} sigfile; fi && \
   cp ${src_orig_pkg} ${srcinstdir}/${src_orig_pkg_name} && \
   if [ -e ${src_orig_pkg}.sig ]; then cp ${src_orig_pkg}.sig ${srcinstdir}/; fi && \
   cp $0 ${srcinstdir}/`basename $0` && \
-  if [ \( ${SIG} \) -a \( -e $0.sig \) ]; then cp $0.sig ${srcinstdir}/; fi && \
+  if [ \( "${SIG}" \) -a \( -e "$0.sig" \) ]; then cp $0.sig ${srcinstdir}/; fi && \
   cd ${srcinstdir} && \
   tar cvjf ${src_pkg} * )
 }
@@ -152,7 +152,7 @@
   rm -rf ${srcdir} 
 }
 sigfile() {
-  if [ \( ${SIG} \) -a \( -e $name \) -a \( \( ! -e $name.sig \) -o \( $name -nt $name.sig \) \) ]; then \
+  if [ \( "${SIG}" \) -a \( -e "$name" \) -a \( \( ! -e "$name.sig" \) -o \( "$name" -nt "$name.sig" \) \) ]; then \
     if [ -x /usr/bin/gpg ]; then \
       echo "$text signature need to be updated"; \
       /usr/bin/gpg --detach-sign $name; \
@@ -198,9 +198,9 @@
   pkg)		pkg ; STATUS=$? ;;
   mkpatch)	mkpatch ; STATUS=$? ;;
   src-package)	spkg ; STATUS=$? ;;
-  spkg)		name=$0 text="SCRIPT" sigfile; spkg ; STATUS=$? ;;
+  spkg)		name=$0 sigfile; spkg ; STATUS=$? ;;
   finish)	finish ; STATUS=$? ;;
-  sig)		sig ; STATUS=$? ;;
+  sigfile)	sigfile ; STATUS=$? ;;
   checksig)	checksig ; STATUS=$? ;;
   all)		prep && conf && build && install && \
 		strip && pkg && spkg && finish ; \

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]