[Gpg4win-commits] r79 - in trunk: . packages src

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Tue Nov 29 11:44:17 CET 2005


Author: werner
Date: 2005-11-29 11:44:16 +0100 (Tue, 29 Nov 2005)
New Revision: 79

Added:
   trunk/packages/packages.current
   trunk/packages/packages.keys
Modified:
   trunk/ChangeLog
   trunk/TODO
   trunk/packages/Makefile.am
   trunk/packages/download.sh
   trunk/src/inst-sections.nsi
Log:
Reworked the download script.  The actual list of packages is now taken from
the server.


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2005-11-28 19:06:11 UTC (rev 78)
+++ trunk/ChangeLog	2005-11-29 10:44:16 UTC (rev 79)
@@ -1,3 +1,13 @@
+2005-11-29  Werner Koch  <wk at g10code.com>
+
+	* packages/packages.current: New.  This is more or less a
+	template; the version on the server may be updated without syncing
+	it to this version.
+	* packages/packages.keys: New.
+	* packages/download.sh: Rewritten.
+
+	* src/inst-sections.nsi (.onInstFailed, .onInstSuccess): New.
+
 2005-11-28  Werner Koch  <wk at g10code.com>
 
 	Released 0.2.1.

Modified: trunk/TODO
===================================================================
--- trunk/TODO	2005-11-28 19:06:11 UTC (rev 78)
+++ trunk/TODO	2005-11-29 10:44:16 UTC (rev 79)
@@ -2,11 +2,6 @@
 
 * Missing stuff
 ** WinPT signature file should better be named .sig
-** System.dll is unsuable under DLL.
-    We solved this by our g4wihelp DLL.
-    This can also do the check for existing versions
-    of GnuPG etc.  And maybe to display a jpeg splash screen and to
-    play continuesly an ogg encoded tune.
 
 * Build system
 ** Some versions of strip don't work.

Modified: trunk/packages/Makefile.am
===================================================================
--- trunk/packages/Makefile.am	2005-11-28 19:06:11 UTC (rev 78)
+++ trunk/packages/Makefile.am	2005-11-29 10:44:16 UTC (rev 79)
@@ -17,4 +17,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
 
-EXTRA_DIST = download.sh
+# Note, that we don't distribute the packages.current template file
+# from the repository.
+EXTRA_DIST = download.sh packages.keys
+

Modified: trunk/packages/download.sh
===================================================================
--- trunk/packages/download.sh	2005-11-28 19:06:11 UTC (rev 78)
+++ trunk/packages/download.sh	2005-11-29 10:44:16 UTC (rev 79)
@@ -18,116 +18,66 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
 
-WGET=wget
-
-
-# GNU
-
-server_gnu=ftp://ftp.cs.tu-berlin.de/pub/gnu
-
-${WGET} -c ${server_gnu}/gettext/gettext-runtime-0.13.1.bin.woe32.zip
-${WGET} -c ${server_gnu}/gettext/gettext-runtime-0.13.1.bin.woe32.zip.sig
-${WGET} -c ${server_gnu}/gettext/gettext-0.13.1.tar.gz
-${WGET} -c ${server_gnu}/gettext/gettext-0.13.1.tar.gz.sig
-
-${WGET} -c ${server_gnu}/libiconv/libiconv-1.9.1.bin.woe32.zip
-${WGET} -c ${server_gnu}/libiconv/libiconv-1.9.1.bin.woe32.zip.sig
-${WGET} -c ${server_gnu}/libiconv/libiconv-1.9.1.tar.gz
-# No signature for the source package.
-
-
-# http://gnuwin32.sourceforge.net/
-# Note:  Mesh, Duesseldorf does not work reliable anymore.
-server_gnuwin32=http://kent.dl.sourceforge.net/sourceforge/gnuwin32
-
-${WGET} -c ${server_gnuwin32}/zlib-1.2.3-bin.zip
-${WGET} -c ${server_gnuwin32}/zlib-1.2.3-lib.zip
-${WGET} -c ${server_gnuwin32}/zlib-1.2.3-src.zip
-
-${WGET} -c ${server_gnuwin32}/libpng-1.2.8-bin.zip
-${WGET} -c ${server_gnuwin32}/libpng-1.2.8-lib.zip
-${WGET} -c ${server_gnuwin32}/libpng-1.2.8-src.zip
-
-${WGET} -c ${server_gnuwin32}/crypt-2.2.5-lib.zip
-${WGET} -c ${server_gnuwin32}/crypt-2.2.5-src.zip
-
-${WGET} -c ${server_gnuwin32}/regex-0.12-lib.zip
-${WGET} -c ${server_gnuwin32}/regex-0.12-src.zip
-
-
-# RedHat
-
-server_redhat=ftp://sources.redhat.com/pub/
-
-${WGET} -c ${server_redhat}/pthreads-win32/pthreads-w32-2-7-0-release.tar.gz
-
-
-# http://www.gimp.org/~tml/gimp/win32/downloads.html
-
-server_gtk=ftp://ftp.gtk.org/pub/gtk/v2.6
-server_gimp=http://www.gimp.org/~tml/gimp/win32
-
-${WGET} -c ${server_gtk}/win32/glib-2.6.6.zip
-${WGET} -c ${server_gtk}/win32/glib-dev-2.6.6.zip
-${WGET} -c ${server_gtk}/glib-2.6.6.tar.bz2
-
-${WGET} -c ${server_gtk}/win32/atk-1.9.0.zip
-${WGET} -c ${server_gtk}/win32/atk-dev-1.9.0.zip
-${WGET} -c ${server_gtk}/atk-1.9.0.tar.bz2
-
-${WGET} -c ${server_gtk}/win32/pango-1.8.2.zip
-${WGET} -c ${server_gtk}/win32/pango-dev-1.8.2.zip
-${WGET} -c ${server_gtk}/pango-1.8.2.tar.bz2
-
-${WGET} -c ${server_gtk}/win32/gtk+-2.6.9.zip
-${WGET} -c ${server_gtk}/win32/gtk+-dev-2.6.9.zip
-${WGET} -c ${server_gtk}/gtk+-2.6.6.tar.bz2
-
-${WGET} -c ${server_gimp}/pkgconfig-0.15.zip
-${WGET} -c ${server_gimp}/pkgconfig-0.15.0.tar.gz
-
-# WinPT
-
-#server_winpt="http://wald.intevation.org/frs/download.php"
+# Syntax of the packages.current file:
 #
-#${WGET} -c ${server_winpt}/59/winpt-0.11.1.tar.bz2
-#${WGET} -c ${server_winpt}/60/winpt-0.11.1.tar.bz2.sig
-# A recent CVS version is needed and no release is available
-# yet, so the scratch dir is temporary used.
-${WGET} -c "ftp://ftp.g10code.com/g10code/scratch/winpt-0.11.2-cvs2.tar.bz2"
-${WGET} -c "ftp://ftp.g10code.com/g10code/scratch/winpt-0.11.2-cvs2.tar.bz2.sig"
+# If the first non whitespace character of a line is #, the line is
+# considered a comment.  If the first word of a line is "server", the
+# rest of the line will be taken as the base URL for following file
+# commands.  If the first word of a line is "file" the rest of the
+# line will be appended to the current base URL (with a / as
+# delimiter).  Example:
+#
+#    # GnuPG stuff. 
+#    server ftp://ftp.gnupg.org/gcrypt
+#    
+#    file gnupg/gnupg-1.4.2.tar.gz
+#    file gnupg/gnupg-1.4.2.tar.gz.sig
+#    
 
-# GPGee
-# Note: This is a temporary location
+WGET=wget
 
-server_gpgee="ftp://ftp.g10code.com/g10code/scratch"
+${WGET} -N ftp://ftp.gpw4win.org/gpg4win/packages.current{,.sig}
 
-${WGET} -c ${server_gpgee}/gpgee-1.2.2-bin.zip
-${WGET} -c ${server_gpgee}/gpgee-1.2.2-src.zip
+if ! gpgv --keyring ./packages.keys packages.current.sig packages.current
+  then
+    echo "list of packages is not usable." >&2
+    exit 1
+fi
 
 
-# GnuPG stuff. 
-
-server_gnupg=http://ftp.gnupg.org/gcrypt
-
-${WGET} -c ${server_gnupg}/gnupg/gnupg-1.4.2.tar.gz
-${WGET} -c ${server_gnupg}/gnupg/gnupg-1.4.2.tar.gz.sig
-
-#${WGET} -c ${server_gnupg}/gpgme/gpgme-1.1.0.tar.gz
-#${WGET} -c ${server_gnupg}/gpgme/gpgme-1.1.0.tar.gz.sig
-
-# libgpg-error, GPA and GPGol currently come from manually crafted
-# packages.  However, we make them available at a scratch location
-
-server_g10code="ftp://ftp.g10code.com/g10code/scratch"
-
-${WGET} -c ${server_g10code}/libgpg-error-1.2-cvs.tar.bz2
-${WGET} -c ${server_g10code}/gpgme-1.2.0-cvs.tar.bz2
-${WGET} -c ${server_g10code}/gpa-0.7.1-cvs.tar.bz2
-${WGET} -c ${server_g10code}/gpgol-0.9.4-cvs.tar.bz2
-${WGET} -c ${server_g10code}/sylpheed-claws-1.9.99cvs5-wk1.tar.bz2
-
-# Dummy manual pages
-${WGET} -c ${server_g10code}/man_novice_de-0.0.0-cvs.tar.gz
-${WGET} -c ${server_g10code}/man_advanced_de-0.0.0-cvs.tar.gz
-${WGET} -c ${server_g10code}/eudoragpg-0.0.0-cvs.tar.gz
+lnr=0
+[ -f '.#download.failed' ] && rm '.#download.failed'
+cat packages.current | \
+while read key value ; do
+    (( lnr++ ))
+    [ -z "$key" ] && continue
+    case "$key" in
+     \#*)    ;;
+    server) 
+       server="$value" 
+       ;;
+    file)
+       if [ -z "$value" ]; then
+           echo "syntax error in file statement" >&2
+           exit 1
+       fi
+       if [ -z "$server" ]; then
+           echo "no server location available for file \`$value'" >&2
+           exit 1
+       fi
+       url="$server/$value"
+       echo "downloading \`$url'."
+       if ! ${WGET} -c -q "$url" ; then
+           echo "download of \`$url' failed." >&2
+           echo "$url" >> '.#download.failed'
+       fi
+       ;;
+     *)
+       echo "syntax error in packages.current, line $lnr." >&2
+       exit 1
+     esac
+done
+if [ -f '.#download.failed' ]; then
+  echo "some files failed to download" 2>&1
+  exit 1
+fi

Added: trunk/packages/packages.current
===================================================================
--- trunk/packages/packages.current	2005-11-28 19:06:11 UTC (rev 78)
+++ trunk/packages/packages.current	2005-11-29 10:44:16 UTC (rev 79)
@@ -0,0 +1,129 @@
+# packages.current - list of current packages for use with gpg4win -*- sh -*-
+#
+#
+# This list as well as its corresponding signature file are intended
+# to be downloaded by the download.sh script of gpg4win.  The download
+# script will then process the statements here to actually download
+# the packages.  The syntax is trivial:
+#
+# If the first non whitespace character of a line is #, the line is
+# considered a comment.  If the first word of a line is "server", the
+# rest of the line will be taken as the base URL for following file
+# commands.  If the first word of a line is "file" the rest of the
+# line will be appended to the current base URL (with a / as
+# delimiter).
+
+
+# GNU
+
+server ftp://ftp.cs.tu-berlin.de/pub/gnu
+
+file gettext/gettext-runtime-0.13.1.bin.woe32.zip
+file gettext/gettext-runtime-0.13.1.bin.woe32.zip.sig
+file gettext/gettext-0.13.1.tar.gz
+file gettext/gettext-0.13.1.tar.gz.sig
+
+file libiconv/libiconv-1.9.1.bin.woe32.zip
+file libiconv/libiconv-1.9.1.bin.woe32.zip.sig
+file libiconv/libiconv-1.9.1.tar.gz
+# No signature for the source package.
+
+
+# Sourceforge
+server http://kent.dl.sourceforge.net/sourceforge/gnuwin32
+
+file zlib-1.2.3-bin.zip
+file zlib-1.2.3-lib.zip
+file zlib-1.2.3-src.zip
+
+file libpng-1.2.8-bin.zip
+file libpng-1.2.8-lib.zip
+file libpng-1.2.8-src.zip
+
+file crypt-2.2.5-lib.zip
+file crypt-2.2.5-src.zip
+
+file regex-0.12-lib.zip
+file regex-0.12-src.zip
+
+
+# RedHat
+
+server ftp://sources.redhat.com/pub
+
+file pthreads-win32/pthreads-w32-2-7-0-release.tar.gz
+
+
+# GTK+ stuff
+# http://www.gimp.org/~tml/gimp/win32/downloads.html
+
+server ftp://ftp.gtk.org/pub/gtk/v2.6
+
+file win32/glib-2.6.6.zip
+file win32/glib-dev-2.6.6.zip
+file glib-2.6.6.tar.bz2
+
+file win32/atk-1.9.0.zip
+file win32/atk-dev-1.9.0.zip
+file atk-1.9.0.tar.bz2
+
+file win32/pango-1.8.2.zip
+file win32/pango-dev-1.8.2.zip
+file pango-1.8.2.tar.bz2
+
+file win32/gtk+-2.6.9.zip
+file win32/gtk+-dev-2.6.9.zip
+file gtk+-2.6.6.tar.bz2
+
+
+# GIMP stuff for W32
+server http://www.gimp.org/~tml/gimp/win32
+
+file pkgconfig-0.15.zip
+file pkgconfig-0.15.0.tar.gz
+
+
+# WinPT
+
+#server http://wald.intevation.org/frs/download.php
+#
+#file 59/winpt-0.11.1.tar.bz2
+#file 60/winpt-0.11.1.tar.bz2.sig
+server ftp://ftp.g10code.com/g10code/scratch
+
+file winpt-0.11.2-cvs2.tar.bz2
+file winpt-0.11.2-cvs2.tar.bz2.sig
+
+
+# GPGee
+# Note: This is a temporary location
+
+server ftp://ftp.g10code.com/g10code/scratch
+
+file gpgee-1.2.2-bin.zip
+file gpgee-1.2.2-src.zip
+
+
+# GnuPG stuff. 
+
+server ftp://ftp.gnupg.org/gcrypt
+
+file gnupg/gnupg-1.4.2.tar.gz
+file gnupg/gnupg-1.4.2.tar.gz.sig
+
+
+# libgpg-error, GPA and GPGol currently come from manually crafted
+# packages.  However, we make them available at a scratch location
+
+server ftp://ftp.g10code.com/g10code/scratch
+
+file libgpg-error-1.2-cvs.tar.bz2
+file gpgme-1.2.0-cvs.tar.bz2
+file gpa-0.7.1-cvs.tar.bz2
+file gpgol-0.9.4-cvs.tar.bz2
+file sylpheed-claws-1.9.99cvs5-wk1.tar.bz2
+file man_novice_de-0.0.0-cvs.tar.gz
+file man_advanced_de-0.0.0-cvs.tar.gz
+file eudoragpg-0.0.0-cvs.tar.gz
+
+

Added: trunk/packages/packages.keys
===================================================================
(Binary files differ)


Property changes on: trunk/packages/packages.keys
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: trunk/src/inst-sections.nsi
===================================================================
--- trunk/src/inst-sections.nsi	2005-11-28 19:06:11 UTC (rev 78)
+++ trunk/src/inst-sections.nsi	2005-11-29 10:44:16 UTC (rev 79)
@@ -361,13 +361,21 @@
   g4wihelp::playsound $TEMP\gpgspltmp.wav
   g4wihelp::showsplash 3000 $TEMP\gpgspltmp.bmp
 
-  #FIXME: Ned to delete the WAV later.
-  #Delete $TEMP\gpgspltmp.wav
   Delete $TEMP\gpgspltmp.bmp
+  ; Note that we delete gpgspltmp.wav in .onInst{Failed,Success}
 
   Call CalcDepends
 FunctionEnd
 
+
+Function .onInstFailed
+  Delete $TEMP\gpgspltmp.wav
+FunctionEnd
+
+Function .onInstSuccess
+  Delete $TEMP\gpgspltmp.wav
+FunctionEnd
+
 Function .onSelChange
   Call CalcDepends
 FunctionEnd



More information about the Gpg4win-commits mailing list