Import Upstream version 0.7.2 upstream/0.7.2
authorSteve McIntyre <steve@einval.com>
Thu, 24 Oct 2019 10:34:58 +0000 (11:34 +0100)
committerSteve McIntyre <steve@einval.com>
Thu, 24 Oct 2019 10:34:58 +0000 (11:34 +0100)
152 files changed:
.cvsignore
Makefile.in
README
changelog
configure
configure.ac
deb/control
deb/copyright
deb/install-build-deps.sh [new file with mode: 0755]
doc/BuildOnWindows.txt
doc/Hacking.txt
doc/README-bindist.txt
doc/README-windist.txt
doc/TechDetails.txt
doc/debian-jigdo-mini-howto.html
doc/debian-jigdo-mini-howto.sgml
doc/jigdo-file.1
doc/jigdo-file.html
doc/jigdo-file.sgml
doc/jigdo-lite.1
doc/jigdo-lite.html
doc/jigdo-lite.sgml
doc/jigdo-mirror.1
doc/jigdo-mirror.html
doc/jigdo.1
doc/jigdo.html
jigdo.glade
jigdo.spec
po/de.gmo
po/de.po
po/jigdo.pot
scripts/debian-mirrors.jigdo
scripts/depend.awk
scripts/glade-filter.awk
scripts/jigdo-lite
scripts/win-lib-install.sh [new file with mode: 0644]
src/.cvsignore
src/Doxyfile [new file with mode: 0644]
src/Makedeps
src/Makefile.in
src/cachefile.cc
src/cachefile.hh
src/compat.cc
src/compat.hh
src/config.h.in
src/dirent.hh
src/glibcurl/Makefile [new file with mode: 0644]
src/glibcurl/glibcurl-example.c [new file with mode: 0644]
src/glibcurl/glibcurl.c [new file with mode: 0644]
src/glibcurl/glibcurl.h [new file with mode: 0644]
src/gtk/gtk-makeimage.cc
src/gtk/gtk-makeimage.hh
src/gtk/gtk-single-url.cc
src/gtk/gtk-single-url.hh
src/gtk/gui.cc
src/gtk/gui.hh
src/gtk/interface.cc
src/gtk/interface.hh
src/gtk/jigdo.cc
src/gtk/jobline.cc
src/gtk/jobline.hh
src/gtk/joblist.cc
src/gtk/joblist.hh
src/gtk/messagebox.hh
src/gtk/support.cc
src/gtk/treeiter.hh
src/jigdo-file-cmd.cc
src/jigdo-file-cmd.hh
src/jigdo-file.cc
src/jigdoconfig-test.cc
src/jigdoconfig.cc
src/jigdoconfig.hh
src/job/cached-url.cc
src/job/cached-url.hh
src/job/datasource.cc
src/job/datasource.hh
src/job/jigdo-io-test.cc
src/job/jigdo-io.cc
src/job/jigdo-io.hh
src/job/jigdodownload.cc
src/job/jigdodownload.hh
src/job/job.hh
src/job/makeimage.hh
src/job/makeimagedl-info-test.cc
src/job/makeimagedl.cc
src/job/makeimagedl.hh
src/job/single-url.cc
src/job/single-url.hh
src/job/url-mapping-test.cc [new file with mode: 0644]
src/job/url-mapping.cc [new file with mode: 0644]
src/job/url-mapping.fh [new file with mode: 0644]
src/job/url-mapping.hh [new file with mode: 0644]
src/mkimage.cc
src/mkimage.hh
src/mkjigdo.cc
src/mktemplate-funcs.sh [new file with mode: 0644]
src/mktemplate-test1.sh [new file with mode: 0644]
src/mktemplate-test2.sh [new file with mode: 0644]
src/mktemplate-test3.sh [new file with mode: 0644]
src/mktemplate.cc
src/mktemplate.hh
src/net/download-test.cc [new file with mode: 0644]
src/net/download.cc
src/net/download.hh
src/net/proxyguess-test.cc
src/net/proxyguess.cc
src/net/proxyguess.hh
src/net/uri-test.cc [new file with mode: 0644]
src/net/uri.cc [new file with mode: 0644]
src/net/uri.hh [new file with mode: 0644]
src/partialmatch.hh
src/recursedir.cc
src/recursedir.hh
src/scan.cc
src/scan.hh
src/serialize.hh
src/torture.cc
src/util/autonullptr-test.cc [new file with mode: 0644]
src/util/autonullptr.hh [new file with mode: 0644]
src/util/autoptr.hh
src/util/bstream-counted.hh
src/util/bstream.cc
src/util/bstream.hh
src/util/configfile.hh
src/util/debug.cc
src/util/debug.hh
src/util/glibc-getopt.c
src/util/glibc-md5.cc
src/util/gunzip-test.cc
src/util/gunzip.hh
src/util/ilist.hh
src/util/log.hh
src/util/md5sum.hh
src/util/mimestream.hh
src/util/nocopy.hh
src/util/progress.hh
src/util/random.cc [new file with mode: 0644]
src/util/rsyncsum-test.cc
src/util/rsyncsum.hh
src/util/smartptr.hh
src/util/status.hh
src/util/string-utf.cc
src/util/string-utf.hh
src/util/string.cc
src/util/string.hh
src/util/unistd-jigdo.h [new file with mode: 0644]
src/zstream-bz.cc [new file with mode: 0644]
src/zstream-bz.hh [new file with mode: 0644]
src/zstream-gz.cc [new file with mode: 0644]
src/zstream-gz.hh [new file with mode: 0644]
src/zstream.cc
src/zstream.hh

index 56d191e..05a9a2c 100644 (file)
@@ -1,30 +1,32 @@
+2
+2s
+2u
+3
+3.4
+3g
+3u
+4g
 Makefile
+TODO
+autom4te.cache
 config.cache
 config.log
 config.status
 configure
-cvs
 copying
-readme
-version
-jigdo-*.tar.bz2
-jigdo-*.tar.gz
-jigdo_*.dsc
-jigdo_*.deb
-jigdo_*.changes
+cvs
 debian
+debian-mirrors.jigdo
 debian.lnk
-2
-2g
-3
-2u
-3u
+go
 jigdo
-tmp
-autom4te.cache
-debian-mirrors.jigdo
+jigdo-*.tar.bz2
+jigdo-*.tar.gz
+jigdo_*.changes
+jigdo_*.deb
+jigdo_*.dsc
+readme
 stable
-TODO
-go
 tar
-2s
+tmp
+version
index 4a5acb5..9dd0670 100644 (file)
@@ -30,13 +30,14 @@ catalogs =  @CATALOGS@
                install-jigdo-file install-jigdo-lite install-jigdo \
                install-po
 # "gfx" symlink is needed for the pixmaps to be found by jigdo
-all doc mostlyclean dep depend check: Makefile
+all doc mostlyclean dep depend: Makefile
                -test -h gfx -o -d gfx || ln -s "$(srcdir)/gfx" gfx
                cd src && $(MAKE) $@
                cd doc && $(MAKE) $@
                cd po  && $(MAKE) $@
-test:
-               @echo "You mean \`make check'. Try again... ;-)"
+check test: Makefile
+               -test -h gfx -o -d gfx || ln -s "$(srcdir)/gfx" gfx
+               cd src && $(MAKE) $@
 clean:         Makefile
                cd src && $(MAKE) $@
                cd doc && $(MAKE) $@
@@ -221,10 +222,12 @@ cvsdist:  Makefile
                cp src/Makedeps jigdo/src
                cp src/gtk/interface.cc src/gtk/interface.hh jigdo/src/gtk
                cd jigdo/po && $(MAKE) -f ../../po/Makefile update-gmo
-               jdir=jigdo-`read a b v <"$(srcdir)/jigdo.spec" && echo $$v`; \
-                   mv jigdo "$$jdir"; \
-                   find "$$jdir" -type f | sort \
+               v=`read a b v <"$(srcdir)/jigdo.spec" && echo $$v`; \
+                   mv jigdo "jigdo-$$v"; \
+                   find "jigdo-$$v" -type f | sort \
                    | tar --exclude=CVS --exclude=autom4te.cache -T - -cf \
-                          "$$jdir.tar"; \
-                   bzip2 -f -9 "$$jdir.tar"; \
-                   rm -rf "$$jdir"
+                          "jigdo-$$v.tar"; \
+                   test -d ~/deb/my && gzip -9 -c \
+                       <"jigdo-$$v.tar" >~/deb/my/"jigdo_$$v.orig.tar.gz"; \
+                   bzip2 -f -9 "jigdo-$$v.tar"; \
+                   rm -rf "jigdo-$$v"
diff --git a/README b/README
index 223df5f..16f4f29 100644 (file)
--- a/README
+++ b/README
@@ -53,6 +53,10 @@ Other contributors:
 
 - Paul Bolle made the jigdo.spec (based on an earlier version by Alexander
   Skwar)
+- Peter Jay Salzman <p dirac.org> maintains the Debian jigdo mini HOWTO
+- Jochen Hepp <jochen.hepp gmx.de>: jigdo-file patches
+- Anne Bezemer <J.A.Bezemer opensourcepartners.nl>:
+  Some code snippets in the jigdo-lite script
 
 jigdo uses some code written by other people:
 
@@ -63,12 +67,10 @@ jigdo uses some code written by other people:
 - Damon Chaplin <damon at helixcode.com> and
   Martijn van Beers <martijn at earthling.net>:
   Support code for the GUI, generated by Glade. [File: gtk-support.cc]
-- Anne Bezemer <J.A.Bezemer at opensourcepartners.nl>:
-  Some code snippets in the jigdo-lite script
 
 ----------------------------------------------------------------------
 
-Copyright (C) 2001-2003  |  richard@
+Copyright (C) 2001-2005  |  richard@
 Richard Atterer          |  atterer.net
 
   This program is free software; you can redistribute it and/or modify
index b2cb7d1..ccbb81b 100644 (file)
--- a/changelog
+++ b/changelog
@@ -1,6 +1,29 @@
 Changelog for Jigsaw Download                               -*- Text -*-
 ------------------------------------------------------------------------
 
+Current CVS version
+
+  - jigdo-file: Added support for bzip2 (de)compression in .template
+    files, as an alternative to zlib compression. Bzip2 is disabled by
+    default (but may become the default in the future). Use --bzip and
+    --gzip to switch between the two.
+  - Patch by Jochen Hepp: New switch --scan-whole-file for "jigdo-file
+    scan" command: Scan whole file instead of only first block
+  - Patch by Jochen Hepp: New switch --no-greedy-matching for
+    "jigdo-file make-template" prevents small matches from cancelling
+    pending larger matches.
+  - jigdo: Switched over from libwww to libcurl for downloads
+  - jigdo-lite: Fixed regular expressions so they work with sed 4.1
+    and non-GNU sed
+  - jigdo-lite: --noask switch to allow running jigdo-lite from cron
+    jobs (Silas Bennett)
+  - jigdo-file: Bugfix for the code which deduces missing --image/
+    --jigdo/--template arguments. Broken in 0.7.1, would deduce
+    /x.iso.template from /x.iso, instead of /x.template (Adrian Bunk)
+  - Fix for compilation on 64 bit architectures
+  - Fixed "compiler recent enough" check in configure.ac for GCC 3.5+
+  - Fixes for GCC 4.0
+
 jigdo 0.7.1 -- Richard Atterer, 20 Jun 2004
 
   - Workaround for problems with big files (DVD images) when compiling
index 6b5a392..48cf621 100755 (executable)
--- a/configure
+++ b/configure
@@ -309,7 +309,7 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS JIGDO_VERSION AWK CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX IF_GXX2 IF_NOGXX2 INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CXXCPP EGREP exe IF_WINDOWS IF_UNIX have_wget IF_DEBUG IF_NODEBUG PKGCONFIG IF_GUI GTKCFLAGS GTKLIBS LIBWWWCFLAGS LIBWWWLIBS USE_NLS CATALOGS IF_LIBWWW_HACKS LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS JIGDO_VERSION AWK CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX IF_GXX2 IFNOT_GXX2 INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CXXCPP EGREP exe IF_WINDOWS IF_UNIX have_wget IF_DEBUG IFNOT_DEBUG PKGCONFIG IF_GUI GTKCFLAGS GTKLIBS GLIBLIBS CURLCFLAGS CURLLIBS have_glade USE_NLS CATALOGS IF_CROSSCOMPILING IFNOT_CROSSCOMPILING LIBOBJS LTLIBOBJS'
 ac_subst_files='SRC_MAKEDEPS'
 
 # Initialize some variables set by options.
@@ -850,16 +850,14 @@ Optional Features:
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --enable-debug          Compile in lots of additional debugging code
   --disable-nls           Disable multi-language support
-  --disable-libwww-hacks  Don't compile fixed versions of some libwww
-                          code (Try this if you see link errors/crashes)
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-pkg-config-prefix=PATH  When cross-compiling, specify prefix of
+                      libraries/headers for target architecture none
   --without-libdb         Don't use libdb (it's necessary for jigdo-file's cache)
   --with-gui              Build the jigdo GTK+ GUI application auto
-  --with-pkg-config-prefix=PATH  When cross-compiling, specify prefix of
-                          libraries/headers for target architecture none
   --with-uint64=TYPE      Specify unsigned type of at least 64 bits auto
                           (Replace spaces with underscores in TYPE)
 
@@ -2319,53 +2317,6 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-ORIG_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -Wno-unused-parameter" # GCC >=3.0
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-int x = 0
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-CFLAGS="$ORIG_CFLAGS"
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 ac_ext=cc
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2726,7 +2677,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 CFLAGS=`echo "$CFLAGS" | sed 's/\(^\| \)-g\( \|$\)/ /'`
 CXXFLAGS=`echo "$CXXFLAGS" | sed 's/\(^\| \)-g\( \|$\)/ /'`
 IF_GXX2="#"
-IF_NOGXX2=""
+IFNOT_GXX2=""
 if test "$GXX" = yes; then
     echo "$as_me:$LINENO: checking for GCC version" >&5
 echo $ECHO_N "checking for GCC version... $ECHO_C" >&6
@@ -2736,7 +2687,7 @@ echo "${ECHO_T}$gccver" >&6;
     case "$gccver" in
         2.*)
             IF_GXX2=""
-            IF_NOGXX2="#";;
+            IFNOT_GXX2="#";;
         3.0|3.0.*|3.1|3.1.*|3.3|3.3.*)
         #AC_MSG_RESULT([   * Big file support may be broken in GCC 3.2 and])
         #AC_MSG_RESULT([   * 3.3! If you compile jigdo on Linux (and maybe])
@@ -3672,6 +3623,15 @@ fi
 
 
 
+if test "$is_windows" = "yes"; then
+    if test "$ac_cv_prog_cc_g" = "yes"; then
+        CFLAGS="$CFLAGS -mms-bitfields -march=pentium"
+    fi
+    if test "$ac_cv_prog_cxx_g" = "yes"; then
+        CXXFLAGS="$CXXFLAGS -mms-bitfields -march=pentium"
+    fi
+fi
+
 echo "$as_me:$LINENO: checking whether the C++ compiler is recent enough" >&5
 echo $ECHO_N "checking whether the C++ compiler is recent enough... $ECHO_C" >&6
 if test "${jigdo_cv_prog_cxx_recent+set}" = set; then
@@ -3689,8 +3649,9 @@ cat >>conftest.$ac_ext <<_ACEOF
         template<typename T = double> struct X {
           template<class U> void function(T* t, U* u);
         };
+        template<> struct X<void> { void function(void* t, int* u); };
       }
-      template<> void B::X<void>::function(void* t, int* u);
+      void B::X<void>::function(void*, int*) { }
     }
 int
 main ()
@@ -3873,6 +3834,7 @@ _ACEOF
 
 fi
 
+
 # Extract the first word of "wget", so it can be a program name with args.
 set dummy wget; ac_word=$2
 echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -3929,7 +3891,7 @@ echo "$as_me:$LINENO: result: \"$jigdo_debug\"" >&5
 echo "${ECHO_T}\"$jigdo_debug\"" >&6
 if test "$jigdo_debug" = "yes"; then
     IF_DEBUG=""
-    IF_NODEBUG="#"
+    IFNOT_DEBUG="#"
     cat >>confdefs.h <<\_ACEOF
 #define DEBUG 1
 _ACEOF
@@ -3942,7 +3904,7 @@ echo "$as_me: error: Invalid argument to --enable-debug option" >&2;}
    { (exit 1); exit 1; }; }
 else
     IF_DEBUG="#"
-    IF_NODEBUG=""
+    IFNOT_DEBUG=""
     cat >>confdefs.h <<\_ACEOF
 #define DEBUG 0
 _ACEOF
@@ -3951,6 +3913,33 @@ fi
 
 
 
+echo "$as_me:$LINENO: checking for value of --with-pkg-config-prefix" >&5
+echo $ECHO_N "checking for value of --with-pkg-config-prefix... $ECHO_C" >&6
+
+# Check whether --with-pkg-config-prefix or --without-pkg-config-prefix was given.
+if test "${with_pkg_config_prefix+set}" = set; then
+  withval="$with_pkg_config_prefix"
+  jigdo_pkg_config_prefix="$withval"
+else
+  jigdo_pkg_config_prefix=""
+fi;
+if test "$jigdo_pkg_config_prefix" = ""; then
+    echo "$as_me:$LINENO: result: not set" >&5
+echo "${ECHO_T}not set" >&6
+    jigdo_pkg_config_switch=""
+else
+    echo "$as_me:$LINENO: result: \"$jigdo_pkg_config_prefix\"" >&5
+echo "${ECHO_T}\"$jigdo_pkg_config_prefix\"" >&6
+    if test "$GXX" = "yes"; then
+        CFLAGS="$CFLAGS -I$jigdo_pkg_config_prefix/include -L$jigdo_pkg_config_prefix/lib"
+        CXXFLAGS="$CXXFLAGS -I$jigdo_pkg_config_prefix/include -L$jigdo_pkg_config_prefix/lib"
+        CPPFLAGS="$CPPFLAGS -I$jigdo_pkg_config_prefix/include"
+        LDFLAGS="$LDFLAGS -L$jigdo_pkg_config_prefix/lib"
+    fi
+    export PKG_CONFIG_PATH="$jigdo_pkg_config_prefix/lib/pkgconfig"
+    jigdo_pkg_config_prefix="--define-variable=prefix=$jigdo_pkg_config_prefix"
+fi
+
 
 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
@@ -4562,44 +4551,38 @@ fi
 if test "$have_zlib" != "no"; then LIBS="$have_zlib $LIBS"; fi
 
 
-echo "$as_me:$LINENO: checking for value of --with-libdb" >&5
-echo $ECHO_N "checking for value of --with-libdb... $ECHO_C" >&6
-
-# Check whether --with-libdb or --without-libdb was given.
-if test "${with_libdb+set}" = set; then
-  withval="$with_libdb"
-  #'
-    jigdo_libdb="$withval"
-else
-  jigdo_libdb="yes"
-fi;
-echo "$as_me:$LINENO: result: \"$jigdo_libdb\"" >&5
-echo "${ECHO_T}\"$jigdo_libdb\"" >&6
-if test "$jigdo_libdb" = "yes"; then
-    if test "${ac_cv_header_db_h+set}" = set; then
-  echo "$as_me:$LINENO: checking for db.h" >&5
-echo $ECHO_N "checking for db.h... $ECHO_C" >&6
-if test "${ac_cv_header_db_h+set}" = set; then
+echo "$as_me:$LINENO: checking for BZ2_bzCompressInit in -lbz2" >&5
+echo $ECHO_N "checking for BZ2_bzCompressInit in -lbz2... $ECHO_C" >&6
+if test "${ac_cv_lib_bz2_BZ2_bzCompressInit+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
-echo "${ECHO_T}$ac_cv_header_db_h" >&6
 else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking db.h usability" >&5
-echo $ECHO_N "checking db.h usability... $ECHO_C" >&6
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbz2  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$ac_includes_default
-#include <db.h>
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char BZ2_bzCompressInit ();
+int
+main ()
+{
+BZ2_bzCompressInit ();
+  ;
+  return 0;
+}
 _ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -4612,144 +4595,112 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
+        { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_header_compiler=yes
+  ac_cv_lib_bz2_BZ2_bzCompressInit=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_header_compiler=no
+ac_cv_lib_bz2_BZ2_bzCompressInit=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_bz2_BZ2_bzCompressInit" >&5
+echo "${ECHO_T}$ac_cv_lib_bz2_BZ2_bzCompressInit" >&6
+if test $ac_cv_lib_bz2_BZ2_bzCompressInit = yes; then
+  have_bzlib="-lbz2"
+else
+  have_bzlib="no"
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
 
-# Is the header present?
-echo "$as_me:$LINENO: checking db.h presence" >&5
-echo $ECHO_N "checking db.h presence... $ECHO_C" >&6
+if test "$is_windows" = yes; then
+        echo "$as_me:$LINENO: checking for main in -lbz2" >&5
+echo $ECHO_N "checking for main in -lbz2... $ECHO_C" >&6
+if test "${ac_cv_lib_bz2_main+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbz2  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <db.h>
+
+
+int
+main ()
+{
+main ();
+  ;
+  return 0;
+}
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_cxx_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_bz2_main=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: db.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: db.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: db.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: db.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: db.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: db.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: db.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: db.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: db.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: db.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: db.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: db.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: db.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: db.h: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists.  ##
-## ------------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-echo "$as_me:$LINENO: checking for db.h" >&5
-echo $ECHO_N "checking for db.h... $ECHO_C" >&6
-if test "${ac_cv_header_db_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_header_db_h=$ac_header_preproc
+ac_cv_lib_bz2_main=no
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
-echo "${ECHO_T}$ac_cv_header_db_h" >&6
-
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-if test $ac_cv_header_db_h = yes; then
-  have_db_h="yes"
-else
-  have_db_h="no"
+echo "$as_me:$LINENO: result: $ac_cv_lib_bz2_main" >&5
+echo "${ECHO_T}$ac_cv_lib_bz2_main" >&6
+if test $ac_cv_lib_bz2_main = yes; then
+  have_bzlib="-lbz2"
 fi
 
-
-    echo "$as_me:$LINENO: checking for libdb version in db.h" >&5
-echo $ECHO_N "checking for libdb version in db.h... $ECHO_C" >&6
-    printf "#include <db.h>\nDB_VERSION_MAJOR DB_VERSION_MINOR\n" >conftest.c
-    set `eval $ac_cpp conftest.c | egrep '^ *[0-9] *'`; v="$1"; vv="$2"
-    echo "$as_me:$LINENO: result: $v.$vv" >&5
-echo "${ECHO_T}$v.$vv" >&6
-    if test "$v" -ne 3 -a "$v" -ne 4; then
-        echo "$as_me:$LINENO: result:    * Warning: jigdo is only known to work with libdb" >&5
-echo "${ECHO_T}   * Warning: jigdo is only known to work with libdb" >&6
-        echo "$as_me:$LINENO: result:    * version 3 or 4 - maybe you should up/downgrade." >&5
-echo "${ECHO_T}   * version 3 or 4 - maybe you should up/downgrade." >&6
-        installDevel "libdb4.2" "libdb4"
-    fi
-    for db in "db-$v.$vv" "db$v.$vv" "db-$v" "db$v" "db"; do
-#       Doesn't work: db.h does a "#define db_create db_create_4002"
-#       AC_CHECK_LIB($db, db_create, have_libdb="$db", have_libdb="no")
-        echo "$as_me:$LINENO: checking for db_create in lib$db" >&5
-echo $ECHO_N "checking for db_create in lib$db... $ECHO_C" >&6
-        oldLIBS="$LIBS"
-        LIBS="$LIBS -l$db"
-        cat >conftest.$ac_ext <<_ACEOF
+    echo "$as_me:$LINENO: checking for main in -lbz2.dll" >&5
+echo $ECHO_N "checking for main in -lbz2.dll... $ECHO_C" >&6
+if test "${ac_cv_lib_bz2_dll_main+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbz2.dll  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <db.h>
+
+
 int
 main ()
 {
-db_create(0, 0, 0)
+main ();
   ;
   return 0;
 }
@@ -4775,16 +4726,400 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  have_libdb="yes"
+  ac_cv_lib_bz2_dll_main=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-have_libdb="no"
+ac_cv_lib_bz2_dll_main=no
 fi
 rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
-        echo "$as_me:$LINENO: result: $have_libdb" >&5
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_bz2_dll_main" >&5
+echo "${ECHO_T}$ac_cv_lib_bz2_dll_main" >&6
+if test $ac_cv_lib_bz2_dll_main = yes; then
+  have_bzlib="-lbz2.dll"
+fi
+
+fi
+if test "${ac_cv_header_bzlib_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for bzlib.h" >&5
+echo $ECHO_N "checking for bzlib.h... $ECHO_C" >&6
+if test "${ac_cv_header_bzlib_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_bzlib_h" >&5
+echo "${ECHO_T}$ac_cv_header_bzlib_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking bzlib.h usability" >&5
+echo $ECHO_N "checking bzlib.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <bzlib.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking bzlib.h presence" >&5
+echo $ECHO_N "checking bzlib.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <bzlib.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: bzlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: bzlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: bzlib.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: bzlib.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: bzlib.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: bzlib.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: bzlib.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: bzlib.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: bzlib.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: bzlib.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: bzlib.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: bzlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: bzlib.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: bzlib.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: bzlib.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: bzlib.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for bzlib.h" >&5
+echo $ECHO_N "checking for bzlib.h... $ECHO_C" >&6
+if test "${ac_cv_header_bzlib_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_bzlib_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_bzlib_h" >&5
+echo "${ECHO_T}$ac_cv_header_bzlib_h" >&6
+
+fi
+if test $ac_cv_header_bzlib_h = yes; then
+  have_bzlib_h="yes"
+else
+  have_bzlib_h="no"
+fi
+
+
+if test "$have_bzlib" = "no" -o "$have_bzlib_h" = "no"; then
+    echo "$as_me:$LINENO: result:    * Please install libbz2, it is needed by all of the" >&5
+echo "${ECHO_T}   * Please install libbz2, it is needed by all of the" >&6
+    echo "$as_me:$LINENO: result:    * programs." >&5
+echo "${ECHO_T}   * programs." >&6
+    installDevel "libbz2" "libbz2"
+fi
+if test "$have_bzlib" != "no"; then LIBS="$have_bzlib $LIBS"; fi
+
+
+echo "$as_me:$LINENO: checking for value of --with-libdb" >&5
+echo $ECHO_N "checking for value of --with-libdb... $ECHO_C" >&6
+
+# Check whether --with-libdb or --without-libdb was given.
+if test "${with_libdb+set}" = set; then
+  withval="$with_libdb"
+  #'
+    jigdo_libdb="$withval"
+else
+  jigdo_libdb="yes"
+fi;
+echo "$as_me:$LINENO: result: \"$jigdo_libdb\"" >&5
+echo "${ECHO_T}\"$jigdo_libdb\"" >&6
+if test "$jigdo_libdb" = "yes"; then
+    if test "${ac_cv_header_db_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for db.h" >&5
+echo $ECHO_N "checking for db.h... $ECHO_C" >&6
+if test "${ac_cv_header_db_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
+echo "${ECHO_T}$ac_cv_header_db_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking db.h usability" >&5
+echo $ECHO_N "checking db.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <db.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking db.h presence" >&5
+echo $ECHO_N "checking db.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <db.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: db.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: db.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: db.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: db.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: db.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: db.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: db.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: db.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: db.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: db.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: db.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: db.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: db.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: db.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for db.h" >&5
+echo $ECHO_N "checking for db.h... $ECHO_C" >&6
+if test "${ac_cv_header_db_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_db_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
+echo "${ECHO_T}$ac_cv_header_db_h" >&6
+
+fi
+if test $ac_cv_header_db_h = yes; then
+  have_db_h="yes"
+else
+  have_db_h="no"
+fi
+
+
+    echo "$as_me:$LINENO: checking for libdb version in db.h" >&5
+echo $ECHO_N "checking for libdb version in db.h... $ECHO_C" >&6
+    printf "#include <db.h>\nDB_VERSION_MAJOR DB_VERSION_MINOR\n" >conftest.c
+    set x `eval $ac_cpp conftest.c | egrep '^ *[0-9] *'`; v="$2"; vv="$3"
+    echo "$as_me:$LINENO: result: $v.$vv" >&5
+echo "${ECHO_T}$v.$vv" >&6
+    if test "$v" -ne 3 -a "$v" -ne 4; then
+        echo "$as_me:$LINENO: result:    * Warning: jigdo is only known to work with libdb" >&5
+echo "${ECHO_T}   * Warning: jigdo is only known to work with libdb" >&6
+        echo "$as_me:$LINENO: result:    * version 3 or 4 - maybe you should up/downgrade." >&5
+echo "${ECHO_T}   * version 3 or 4 - maybe you should up/downgrade." >&6
+        installDevel "libdb4.2" "libdb4"
+    fi
+    for db in "db-$v.$vv" "db$v.$vv" "db-$v" "db$v" "db"; do
+#       Doesn't work: db.h does a "#define db_create db_create_4002"
+#       AC_CHECK_LIB($db, db_create, have_libdb="$db", have_libdb="no")
+        echo "$as_me:$LINENO: checking for db_create in lib$db" >&5
+echo $ECHO_N "checking for db_create in lib$db... $ECHO_C" >&6
+        oldLIBS="$LIBS"
+        LIBS="$LIBS -l$db"
+        cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <db.h>
+int
+main ()
+{
+db_create(0, 0, 0)
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  have_libdb="yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+have_libdb="no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+        echo "$as_me:$LINENO: result: $have_libdb" >&5
 echo "${ECHO_T}$have_libdb" >&6
         if test "$have_libdb" != "no"; then break; fi
         LIBS="$oldLIBS"
@@ -4895,104 +5230,221 @@ echo "${ECHO_T}   * \$PATH. Please install GTK+ 2." >&6
 fi
 GTKCFLAGS="# GUI application disabled by configure script"
 GTKLIBS="$GTKCFLAGS"
-LIBWWWCFLAGS="$GTKCFLAGS"
-LIBWWWLIBS="$GTKCFLAGS"
+GLIBLIBS="$GTKCFLAGS"
+CURLCFLAGS="$GTKCFLAGS"
+CURLLIBS="$GTKCFLAGS"
 if test "$jigdo_gui" = "yes"; then
-    echo "$as_me:$LINENO: checking for value of --with-pkg-config-prefix" >&5
-echo $ECHO_N "checking for value of --with-pkg-config-prefix... $ECHO_C" >&6
-
-# Check whether --with-pkg-config-prefix or --without-pkg-config-prefix was given.
-if test "${with_pkg_config_prefix+set}" = set; then
-  withval="$with_pkg_config_prefix"
-  jigdo_pkg_config_prefix="$withval"
-else
-  jigdo_pkg_config_prefix=""
-fi;
-    if test "$jigdo_pkg_config_prefix" = ""; then
-        echo "$as_me:$LINENO: result: not set" >&5
-echo "${ECHO_T}not set" >&6
-    else
-        echo "$as_me:$LINENO: result: \"$jigdo_pkg_config_prefix\"" >&5
-echo "${ECHO_T}\"$jigdo_pkg_config_prefix\"" >&6
-        jigdo_pkg_config_prefix="--define-variable=prefix=$jigdo_pkg_config_prefix"
-    fi
-
-    echo "$as_me:$LINENO: checking for GTK+ 2.0.6 or later" >&5
-echo $ECHO_N "checking for GTK+ 2.0.6 or later... $ECHO_C" >&6
+    echo "$as_me:$LINENO: checking for GTK+ 2.4.0 or later" >&5
+echo $ECHO_N "checking for GTK+ 2.4.0 or later... $ECHO_C" >&6
     gtk_ver="`pkg-config $jigdo_pkg_config_prefix gtk+-2.0 --modversion`"
     echo "$as_me:$LINENO: result: $gtk_ver" >&5
 echo "${ECHO_T}$gtk_ver" >&6
-    if pkg-config gtk+-2.0 --atleast-version=2.0.6; then true; else
+    if pkg-config gtk+-2.0 --atleast-version=2.4.0; then true; else
         echo "$as_me:$LINENO: result:    * Installed version of GTK+ is too old" >&5
 echo "${ECHO_T}   * Installed version of GTK+ is too old" >&6
         jigdo_gui_failed
     fi
-    GTKCFLAGS="`pkg-config $jigdo_pkg_config_prefix gtk+-2.0 --cflags 2>/dev/null`"
-    GTKLIBS="`pkg-config $jigdo_pkg_config_prefix gtk+-2.0 --libs 2>/dev/null`"
+    if test "$is_windows" = yes; then gth="gthread-2.0"; else gth=""; fi
+    GTKCFLAGS="`pkg-config $jigdo_pkg_config_prefix gtk+-2.0 $gth --cflags 2>/dev/null`"
+    GTKLIBS="`pkg-config $jigdo_pkg_config_prefix gtk+-2.0 $gth --libs 2>/dev/null`"
+    GLIBLIBS="`pkg-config $jigdo_pkg_config_prefix glib-2.0 $gth --libs 2>/dev/null`"
 fi
 
 if test "$jigdo_gui" = "yes"; then
-    echo "$as_me:$LINENO: checking for libwww 5.3.2 or later" >&5
-echo $ECHO_N "checking for libwww 5.3.2 or later... $ECHO_C" >&6
-    jigdo_libwwwver="`libwww-config --version 2>&1`"
-    echo "$as_me:$LINENO: result: $jigdo_libwwwver" >&5
-echo "${ECHO_T}$jigdo_libwwwver" >&6
-    case "$jigdo_libwwwver" in
-                [6-9]*|5.[4-9]*|5.[1-9][0-9]*|5.3.[2-9]*|5.3.[1-9][0-9]*)
-            LIBWWWCFLAGS="`libwww-config --cflags 2>/dev/null`"
-            LIBWWWLIBS="`libwww-config --libs 2>/dev/null`"
-                                                LIBWWWCFLAGS=`echo " $LIBWWWCFLAGS " | sed -e 's% -I/usr/include/* % %'`
-                                                            case "$is_windows $LIBS " in
-                yes*"-lzdll "*)
-                    LIBWWWLIBS=`echo " $LIBWWWLIBS " | sed -e 's% -lz % -lzdll %'`
-            esac
+  if test "$is_windows" = "no"; then
+    echo "$as_me:$LINENO: checking for libcurl 7.11.0 or later" >&5
+echo $ECHO_N "checking for libcurl 7.11.0 or later... $ECHO_C" >&6
+    set x `curl-config --version 2>&1`
+    shift
+    case "$1" in [0-9]*) ;; *) shift;; esac
+    jigdo_curlver="$1"
+    echo "$as_me:$LINENO: result: $jigdo_curlver" >&5
+echo "${ECHO_T}$jigdo_curlver" >&6
+    case "$jigdo_curlver" in
+        [1-9][0-9].*|[8-9].*|7.1[1-9]*|7.[2-9][0-9]*)
+            CURLCFLAGS="`curl-config --cflags 2>/dev/null`"
+            CURLLIBS="`curl-config --libs 2>/dev/null`"
             ;;
         *)
-        echo "$as_me:$LINENO: result:    * libwww not installed, or the installed version" >&5
-echo "${ECHO_T}   * libwww not installed, or the installed version" >&6
-        echo "$as_me:$LINENO: result:    * is too old, or libwww-config is not in \$PATH." >&5
-echo "${ECHO_T}   * is too old, or libwww-config is not in \$PATH." >&6
-        echo "$as_me:$LINENO: result:    * Please install libwww 5.3.2 or later, it is" >&5
-echo "${ECHO_T}   * Please install libwww 5.3.2 or later, it is" >&6
+        echo "$as_me:$LINENO: result:    * libcurl not installed, or the installed version" >&5
+echo "${ECHO_T}   * libcurl not installed, or the installed version" >&6
+        echo "$as_me:$LINENO: result:    * is too old, or curl-config is not in \$PATH." >&5
+echo "${ECHO_T}   * is too old, or curl-config is not in \$PATH." >&6
+        echo "$as_me:$LINENO: result:    * Please install libcurl 7.11.0 or later, it is" >&5
+echo "${ECHO_T}   * Please install libcurl 7.11.0 or later, it is" >&6
         echo "$as_me:$LINENO: result:    * needed by the jigdo GUI application." >&5
 echo "${ECHO_T}   * needed by the jigdo GUI application." >&6
-        installDevel "libwww" "w3c-libwww-devel/libopenssl0"
-        jigdo_gui_failed
+        installDevel "libcurl2" "libcurl2"
     esac
-fi
-
-if test "$jigdo_gui" = "yes"; then IF_GUI=""; else IF_GUI="#"; fi
+  else
+    echo "$as_me:$LINENO: checking for curl_global_init in -lcurl" >&5
+echo $ECHO_N "checking for curl_global_init in -lcurl... $ECHO_C" >&6
+if test "${ac_cv_lib_curl_curl_global_init+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcurl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char curl_global_init ();
+int
+main ()
+{
+curl_global_init ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_curl_curl_global_init=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+ac_cv_lib_curl_curl_global_init=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_curl_curl_global_init" >&5
+echo "${ECHO_T}$ac_cv_lib_curl_curl_global_init" >&6
+if test $ac_cv_lib_curl_curl_global_init = yes; then
+  have_libcurl="-lcurl"
+else
+  have_libcurl="no"
+fi
 
+    echo "$as_me:$LINENO: checking for curl_global_init in -lcurldll" >&5
+echo $ECHO_N "checking for curl_global_init in -lcurldll... $ECHO_C" >&6
+if test "${ac_cv_lib_curldll_curl_global_init+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcurldll  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char curl_global_init ();
+int
+main ()
+{
+curl_global_init ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_curldll_curl_global_init=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+ac_cv_lib_curldll_curl_global_init=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_curldll_curl_global_init" >&5
+echo "${ECHO_T}$ac_cv_lib_curldll_curl_global_init" >&6
+if test $ac_cv_lib_curldll_curl_global_init = yes; then
+  have_libcurl="-lcurldll"
+fi
 
-dirent_hack="no"
-if test "$is_windows" = yes; then
-    CPPFLAGS_orig="$CPPFLAGS"
-    CPPFLAGS="$CPPFLAGS $GTKCFLAGS"
-    echo "$as_me:$LINENO: checking for conflicting 'struct dirent' in dirent.h and glib.h" >&5
-echo $ECHO_N "checking for conflicting 'struct dirent' in dirent.h and glib.h... $ECHO_C" >&6
-    cat >conftest.$ac_ext <<_ACEOF
+    echo "$as_me:$LINENO: checking for curl_global_init in -llibcurl" >&5
+echo $ECHO_N "checking for curl_global_init in -llibcurl... $ECHO_C" >&6
+if test "${ac_cv_lib_libcurl_curl_global_init+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-llibcurl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <dirent.h>
-                    #include <glib.h>
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char curl_global_init ();
 int
 main ()
 {
-
+curl_global_init ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -5005,38 +5457,49 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
+        { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  dirent_hack="no"
+  ac_cv_lib_libcurl_curl_global_init=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-dirent_hack="yes"
+ac_cv_lib_libcurl_curl_global_init=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-    if test "$dirent_hack" = "yes"; then
-        cat >conftest.$ac_ext <<_ACEOF
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_libcurl_curl_global_init" >&5
+echo "${ECHO_T}$ac_cv_lib_libcurl_curl_global_init" >&6
+if test $ac_cv_lib_libcurl_curl_global_init = yes; then
+  have_libcurl="-llibcurl"
+fi
+
+    if test "${ac_cv_header_curl_curl_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for curl/curl.h" >&5
+echo $ECHO_N "checking for curl/curl.h... $ECHO_C" >&6
+if test "${ac_cv_header_curl_curl_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_curl_curl_h" >&5
+echo "${ECHO_T}$ac_cv_header_curl_curl_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking curl/curl.h usability" >&5
+echo $ECHO_N "checking curl/curl.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <dirent.h>
-                        #define dirent other_dirent
-                        #define DIR other_DIR
-                        #include <glib.h>
-int
-main ()
-{
-
-  ;
-  return 0;
-}
+$ac_includes_default
+#include <curl/curl.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -5059,29 +5522,172 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  :
+  ac_header_compiler=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-dirent_hack="no"
+ac_header_compiler=no
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking curl/curl.h presence" >&5
+echo $ECHO_N "checking curl/curl.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <curl/curl.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: curl/curl.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: curl/curl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: curl/curl.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: curl/curl.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: curl/curl.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: curl/curl.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: curl/curl.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: curl/curl.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: curl/curl.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: curl/curl.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: curl/curl.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: curl/curl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: curl/curl.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: curl/curl.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: curl/curl.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: curl/curl.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for curl/curl.h" >&5
+echo $ECHO_N "checking for curl/curl.h... $ECHO_C" >&6
+if test "${ac_cv_header_curl_curl_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_curl_curl_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_curl_curl_h" >&5
+echo "${ECHO_T}$ac_cv_header_curl_curl_h" >&6
+
+fi
+if test $ac_cv_header_curl_curl_h = yes; then
+  have_curl_h="yes"
+else
+  have_curl_h="no"
+fi
+
+
+    if test "$have_libcurl" = "no" -o "$have_curl_h" = "no"; then
+        echo "$as_me:$LINENO: result:    * Please install libcurl 7.11.0 or later, it is" >&5
+echo "${ECHO_T}   * Please install libcurl 7.11.0 or later, it is" >&6
+        echo "$as_me:$LINENO: result:    * needed by the jigdo GUI application." >&5
+echo "${ECHO_T}   * needed by the jigdo GUI application." >&6
+    else
+        CURLCFLAGS=""
+       CURLLIBS="$have_libcurl"
     fi
-    echo "$as_me:$LINENO: result: $dirent_hack" >&5
-echo "${ECHO_T}$dirent_hack" >&6
-    CPPFLAGS="$CPPFLAGS_orig"
+  fi
 fi
-if test "$dirent_hack" = "yes"; then
-    cat >>confdefs.h <<\_ACEOF
-#define DIRENT_HACK 1
-_ACEOF
 
+if test "$jigdo_gui" = "yes"; then IF_GUI=""; else IF_GUI="#"; fi
+
+
+
+
+
+
+
+if test "$jigdo_gui" = "yes" && test ! -e "$srcdir/src/gtk/interface.hh"; then
+  # Extract the first word of "glade-2", so it can be a program name with args.
+set dummy glade-2; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_have_glade+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-    cat >>confdefs.h <<\_ACEOF
-#define DIRENT_HACK 0
-_ACEOF
+  if test -n "$have_glade"; then
+  ac_cv_prog_have_glade="$have_glade" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_have_glade="yes"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_have_glade" && ac_cv_prog_have_glade="no"
+fi
+fi
+have_glade=$ac_cv_prog_have_glade
+if test -n "$have_glade"; then
+  echo "$as_me:$LINENO: result: $have_glade" >&5
+echo "${ECHO_T}$have_glade" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
 
+  if test "$have_glade" = "no"; then
+    echo "$as_me:$LINENO: result:    * glade-2 was not found on your system. Please install" >&5
+echo "${ECHO_T}   * glade-2 was not found on your system. Please install" >&6
+    echo "$as_me:$LINENO: result:    * it, it is needed to compile the jigdo GUI (actually," >&5
+echo "${ECHO_T}   * it, it is needed to compile the jigdo GUI (actually," >&6
+    echo "$as_me:$LINENO: result:    * to create the file src/gtk/interface.hh)" >&5
+echo "${ECHO_T}   * to create the file src/gtk/interface.hh)" >&6
+  fi
 fi
 
 echo "$as_me:$LINENO: checking for value of --with-uint64" >&5
@@ -6618,31 +7224,20 @@ echo "${ECHO_T}\"$USE_NLS\"" >&6
 
 CATALOGS=""
 if test "$USE_NLS" = "yes"; then
-    echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
-echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
-if test "${ac_cv_lib_intl_dgettext+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+    oldLIBS="$LIBS"
+    echo "$as_me:$LINENO: checking for dgettext in <libintl.h> and libc" >&5
+echo $ECHO_N "checking for dgettext in <libintl.h> and libc... $ECHO_C" >&6
+    cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char dgettext ();
+#include <libintl.h>
 int
 main ()
 {
-dgettext ();
+dgettext(0, 0)
   ;
   return 0;
 }
@@ -6668,102 +7263,22 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_intl_dgettext=yes
+  have_intl="yes"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_intl_dgettext=no
+have_intl="no"
 fi
 rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
-echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
-if test $ac_cv_lib_intl_dgettext = yes; then
-  x="yes"
-else
-  x="no"
-fi
-
-    if test "$x" = "yes"; then
+      conftest$ac_exeext conftest.$ac_ext;
+    echo "$as_me:$LINENO: result: $have_intl" >&5
+echo "${ECHO_T}$have_intl" >&6
+    if test "$have_intl" = "no"; then
         LIBS="$LIBS -lintl";
-        echo "$as_me:$LINENO: checking for iconv in -liconv" >&5
-echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6
-if test "${ac_cv_lib_iconv_iconv+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-liconv  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char iconv ();
-int
-main ()
-{
-iconv ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_iconv_iconv=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_iconv_iconv=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv" >&5
-echo "${ECHO_T}$ac_cv_lib_iconv_iconv" >&6
-if test $ac_cv_lib_iconv_iconv = yes; then
-  LIBS="$LIBS -liconv"
-fi
-
-    fi
-
-    echo "$as_me:$LINENO: checking whether dgettext() works" >&5
-echo $ECHO_N "checking whether dgettext() works... $ECHO_C" >&6
-if test "${jigdo_cv_func_dgettext+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
+        echo "$as_me:$LINENO: checking for dgettext in <libintl.h> and -lintl" >&5
+echo $ECHO_N "checking for dgettext in <libintl.h> and -lintl... $ECHO_C" >&6
+        cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -6773,7 +7288,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 int
 main ()
 {
-dgettext("", "")
+dgettext(0, 0)
   ;
   return 0;
 }
@@ -6799,20 +7314,19 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  jigdo_cv_func_dgettext="yes"
+  have_intl="yes"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-jigdo_cv_func_dgettext="no"
+have_intl="no"
 fi
 rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-
-fi
-echo "$as_me:$LINENO: result: $jigdo_cv_func_dgettext" >&5
-echo "${ECHO_T}$jigdo_cv_func_dgettext" >&6
-    if test "$jigdo_cv_func_dgettext" = "no"; then
+      conftest$ac_exeext conftest.$ac_ext;
+        echo "$as_me:$LINENO: result: $have_intl" >&5
+echo "${ECHO_T}$have_intl" >&6
+    fi
+    if test "$have_intl" = "no"; then
         echo "$as_me:$LINENO: result:    * Disabling gettext support - jigdo will not be" >&5
 echo "${ECHO_T}   * Disabling gettext support - jigdo will not be" >&6
         echo "$as_me:$LINENO: result:    * able to display translated status/error" >&5
@@ -6820,6 +7334,7 @@ echo "${ECHO_T}   * able to display translated status/error" >&6
         echo "$as_me:$LINENO: result:    * messages instead of the default English ones." >&5
 echo "${ECHO_T}   * messages instead of the default English ones." >&6
         USE_NLS="no"
+        LIBS="$oldLIBS"
     fi
 fi
 if test "$USE_NLS" = "yes"; then
@@ -6860,43 +7375,40 @@ fi
 
 
 
-echo "$as_me:$LINENO: checking for value of --enable-libwww-hacks" >&5
-echo $ECHO_N "checking for value of --enable-libwww-hacks... $ECHO_C" >&6
-# Check whether --enable-libwww-hacks or --disable-libwww-hacks was given.
-if test "${enable_libwww_hacks+set}" = set; then
-  enableval="$enable_libwww_hacks"
-  jigdo_libwww_hacks=$enableval
-else
-  jigdo_libwww_hacks=yes
-fi;
-echo "$as_me:$LINENO: result: \"$jigdo_libwww_hacks\"" >&5
-echo "${ECHO_T}\"$jigdo_libwww_hacks\"" >&6
-if test "$jigdo_libwww_hacks" = yes; then
-    IF_LIBWWW_HACKS="" # enable hacks
-elif test "$jigdo_libwww_hacks" != no; then
-    { { echo "$as_me:$LINENO: error: Invalid argument to --enable-libwww-hacks option" >&5
-echo "$as_me: error: Invalid argument to --enable-libwww-hacks option" >&2;}
-   { (exit 1); exit 1; }; }
-else
-    IF_LIBWWW_HACKS="#" # disable hacks, by commenting out Makefile line
-fi
-
 
-if test "$jigdo_debug" = "yes"; then
-    #if test "$GCC" = yes; then CFLAGS="$CFLAGS -Werror"; fi
-    if test "$GXX" = yes; then CXXFLAGS="$CXXFLAGS -Werror"; fi
-fi
 if test "$GXX" = "yes"; then
     CFLAGS="-Wall $CFLAGS -W"
     CXXFLAGS="$CXXFLAGS -Wall -W -Wpointer-arith -Wconversion -Woverloaded-virtual"
 fi
 
+if test "$cross_compiling" = yes; then
+  IF_CROSSCOMPILING=""
+  IFNOT_CROSSCOMPILING="#"
+else
+  IF_CROSSCOMPILING="#"
+  IFNOT_CROSSCOMPILING=""
+fi
+
+
+
 touch "$srcdir/src/TAGS"
 
+SUBDIRS="glibcurl gtk job net util"
 SRC_MAKEDEPS="$srcdir/src/Makedeps"
+if test -e "$SRC_MAKEDEPS"; then true; else
+  echo "$as_me:$LINENO: result: Creating $SRC_MAKEDEPS" >&5
+echo "${ECHO_T}Creating $SRC_MAKEDEPS" >&6
+  touch "$SRC_MAKEDEPS"
+  echo >"$srcdir/src/gtk/interface.hh"
+  (cd "$srcdir/src"
+   find . -type f '(' -name '*.cc' -o -name '*.c' ')' \
+   | xargs "$ac_cv_prog_AWK" -f ../scripts/depend.awk "$srcdir" $SUBDIRS -
+  )
+  rm -f "$SRC_MAKEDEPS.bak" "$srcdir/src/gtk/interface.hh"
+fi
 
 
-for dir in "" gtk job net util; do
+for dir in "" $SUBDIRS; do
     test ! -d "src/$dir" && mkdir "src/$dir"
 done
                                         ac_config_files="$ac_config_files Makefile doc/Makefile src/Makefile po/Makefile"
@@ -7527,7 +8039,7 @@ s,@CXX@,$CXX,;t t
 s,@CXXFLAGS@,$CXXFLAGS,;t t
 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
 s,@IF_GXX2@,$IF_GXX2,;t t
-s,@IF_NOGXX2@,$IF_NOGXX2,;t t
+s,@IFNOT_GXX2@,$IFNOT_GXX2,;t t
 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
@@ -7538,16 +8050,19 @@ s,@IF_WINDOWS@,$IF_WINDOWS,;t t
 s,@IF_UNIX@,$IF_UNIX,;t t
 s,@have_wget@,$have_wget,;t t
 s,@IF_DEBUG@,$IF_DEBUG,;t t
-s,@IF_NODEBUG@,$IF_NODEBUG,;t t
+s,@IFNOT_DEBUG@,$IFNOT_DEBUG,;t t
 s,@PKGCONFIG@,$PKGCONFIG,;t t
 s,@IF_GUI@,$IF_GUI,;t t
 s,@GTKCFLAGS@,$GTKCFLAGS,;t t
 s,@GTKLIBS@,$GTKLIBS,;t t
-s,@LIBWWWCFLAGS@,$LIBWWWCFLAGS,;t t
-s,@LIBWWWLIBS@,$LIBWWWLIBS,;t t
+s,@GLIBLIBS@,$GLIBLIBS,;t t
+s,@CURLCFLAGS@,$CURLCFLAGS,;t t
+s,@CURLLIBS@,$CURLLIBS,;t t
+s,@have_glade@,$have_glade,;t t
 s,@USE_NLS@,$USE_NLS,;t t
 s,@CATALOGS@,$CATALOGS,;t t
-s,@IF_LIBWWW_HACKS@,$IF_LIBWWW_HACKS,;t t
+s,@IF_CROSSCOMPILING@,$IF_CROSSCOMPILING,;t t
+s,@IFNOT_CROSSCOMPILING@,$IFNOT_CROSSCOMPILING,;t t
 s,@LIBOBJS@,$LIBOBJS,;t t
 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
 /@SRC_MAKEDEPS@/r $SRC_MAKEDEPS
index f51a1dc..4298572 100644 (file)
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-dnl $Id: configure.ac,v 1.2 2004/06/20 16:17:32 atterer Exp $
+dnl $Id: configure.ac,v 1.23 2005/07/09 22:21:33 atterer Exp $
 AC_INIT(src/jigdo-file.cc)
 AC_CONFIG_HEADER(src/config.h)
 dnl ______________________________________________________________________
@@ -37,15 +37,15 @@ AC_PROG_AWK
 AC_LANG_C
 AC_PROG_CC
 dnl Add -Wno-unused-parameter to CFLAGS if supported
-ORIG_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -Wno-unused-parameter" # GCC >=3.0
-AC_TRY_COMPILE(, int x = 0, , CFLAGS="$ORIG_CFLAGS")
+dnl ORIG_CFLAGS="$CFLAGS"
+dnl CFLAGS="$CFLAGS -Wno-unused-parameter" # GCC >=3.0
+dnl AC_TRY_COMPILE(, int x = 0, , CFLAGS="$ORIG_CFLAGS")
 AC_LANG_CPLUSPLUS
 AC_PROG_CXX
 CFLAGS=`echo "$CFLAGS" | sed 's/\(^\| \)-g\( \|$\)/ /'`
 CXXFLAGS=`echo "$CXXFLAGS" | sed 's/\(^\| \)-g\( \|$\)/ /'`
 IF_GXX2="#"
-IF_NOGXX2=""
+IFNOT_GXX2=""
 if test "$GXX" = yes; then
     AC_MSG_CHECKING(for GCC version)
     gccver=`$CXX -dumpversion`
@@ -53,7 +53,7 @@ if test "$GXX" = yes; then
     case "$gccver" in
         2.*)
             IF_GXX2=""
-            IF_NOGXX2="#";;
+            IFNOT_GXX2="#";;
         3.0|3.0.*|3.1|3.1.*|3.3|3.3.*)
         #AC_MSG_RESULT([   * Big file support may be broken in GCC 3.2 and])
         #AC_MSG_RESULT([   * 3.3! If you compile jigdo on Linux (and maybe])
@@ -63,7 +63,7 @@ if test "$GXX" = yes; then
     esac
 fi
 AC_SUBST(IF_GXX2)
-AC_SUBST(IF_NOGXX2)
+AC_SUBST(IFNOT_GXX2)
 AC_PROG_INSTALL
 dnl ____________________
 
@@ -91,6 +91,15 @@ fi
 AC_SUBST(exe)
 AC_SUBST(IF_WINDOWS)
 AC_SUBST(IF_UNIX)
+
+if test "$is_windows" = "yes"; then
+    if test "$ac_cv_prog_cc_g" = "yes"; then
+        CFLAGS="$CFLAGS -mms-bitfields -march=pentium"
+    fi
+    if test "$ac_cv_prog_cxx_g" = "yes"; then
+        CXXFLAGS="$CXXFLAGS -mms-bitfields -march=pentium"
+    fi
+fi
 dnl ____________________
 
 AC_CACHE_CHECK(whether the C++ compiler is recent enough,
@@ -102,8 +111,9 @@ AC_CACHE_CHECK(whether the C++ compiler is recent enough,
         template<typename T = double> struct X {
           template<class U> void function(T* t, U* u);
         };
+        template<> struct X<void> { void function(void* t, int* u); };
       }
-      template<> void B::X<void>::function(void* t, int* u);
+      void B::X<void>::function(void*, int*) { }
     },, jigdo_cv_prog_cxx_recent="yes", jigdo_cv_prog_cxx_recent="no")
 )
 if test "$jigdo_cv_prog_cxx_recent" = "no"; then
@@ -138,6 +148,19 @@ else
 fi
 dnl ________________________________________
 
+dnl Doesn't work
+dnl AC_CACHE_CHECK([whether C++ supports accessing files larger than 4 GB],
+dnl                jigdo_cv_prog_cxx_lfs,
+dnl     AC_TRY_COMPILE([#include <fstream>],
+dnl         [using namespace std; ifstream i; i.seekg(0x100000000, ios::beg);],
+dnl         jigdo_cv_prog_cxx_lfs="yes", jigdo_cv_prog_cxx_lfs="no")
+dnl )
+dnl if test "$jigdo_cv_prog_cxx_lfs" = "no"; then
+dnl     AC_MSG_RESULT([   * There is a problem accessing large files.])
+dnl     AC_MSG_RESULT([   * jigdo may be unable to work with DVD-sized images.])
+dnl fi
+dnl ________________________________________
+
 AC_CHECK_PROG(have_wget, wget, yes, no)
 if test "$have_wget" = "no"; then
     AC_MSG_RESULT([   * wget was not found on your system. Please install])
@@ -152,7 +175,7 @@ AC_ARG_ENABLE(debug,
 AC_MSG_RESULT(\"$jigdo_debug\")
 if test "$jigdo_debug" = "yes"; then
     IF_DEBUG=""
-    IF_NODEBUG="#"
+    IFNOT_DEBUG="#"
     AC_DEFINE(DEBUG, 1)
     if test "$ac_cv_prog_cc_g" = "yes"; then CFLAGS="$CFLAGS -g"; fi
     if test "$ac_cv_prog_cxx_g" = "yes"; then CXXFLAGS="$CXXFLAGS -g"; fi
@@ -160,11 +183,31 @@ elif test "$jigdo_debug" != "no"; then
     AC_MSG_ERROR(Invalid argument to --enable-debug option)
 else
     IF_DEBUG="#"
-    IF_NODEBUG=""
+    IFNOT_DEBUG=""
     AC_DEFINE(DEBUG, 0)
 fi
 AC_SUBST(IF_DEBUG)
-AC_SUBST(IF_NODEBUG)
+AC_SUBST(IFNOT_DEBUG)
+
+AC_MSG_CHECKING(for value of --with-pkg-config-prefix)
+AC_ARG_WITH(pkg-config-prefix,
+[  --with-pkg-config-prefix=PATH  When cross-compiling, specify prefix of
+                      libraries/headers for target architecture [none]],
+    jigdo_pkg_config_prefix="$withval", jigdo_pkg_config_prefix="")
+if test "$jigdo_pkg_config_prefix" = ""; then
+    AC_MSG_RESULT(not set)
+    jigdo_pkg_config_switch=""
+else
+    AC_MSG_RESULT(\"$jigdo_pkg_config_prefix\")
+    if test "$GXX" = "yes"; then
+        CFLAGS="$CFLAGS -I$jigdo_pkg_config_prefix/include -L$jigdo_pkg_config_prefix/lib"
+        CXXFLAGS="$CXXFLAGS -I$jigdo_pkg_config_prefix/include -L$jigdo_pkg_config_prefix/lib"
+        CPPFLAGS="$CPPFLAGS -I$jigdo_pkg_config_prefix/include"
+        LDFLAGS="$LDFLAGS -L$jigdo_pkg_config_prefix/lib"
+    fi
+    export PKG_CONFIG_PATH="$jigdo_pkg_config_prefix/lib/pkgconfig"
+    jigdo_pkg_config_prefix="--define-variable=prefix=$jigdo_pkg_config_prefix"
+fi
 
 dnl dnl cppunit
 dnl CPPUNITCFLAGS='# `cppunit-config --cflags`'
@@ -225,6 +268,21 @@ fi
 if test "$have_zlib" != "no"; then LIBS="$have_zlib $LIBS"; fi
 
 
+AC_CHECK_LIB(bz2, BZ2_bzCompressInit, have_bzlib="-lbz2", have_bzlib="no")
+if test "$is_windows" = yes; then
+    dnl For some reason, can't check for BZ2_bzCompressInit without #include <bzlib.h>
+    AC_CHECK_LIB(bz2, main, have_bzlib="-lbz2", )
+    AC_CHECK_LIB(bz2.dll, main, have_bzlib="-lbz2.dll", )
+fi
+AC_CHECK_HEADER(bzlib.h, have_bzlib_h="yes", have_bzlib_h="no")
+if test "$have_bzlib" = "no" -o "$have_bzlib_h" = "no"; then
+    AC_MSG_RESULT([   * Please install libbz2, it is needed by all of the])
+    AC_MSG_RESULT([   * programs.])
+    installDevel "libbz2" "libbz2"
+fi
+if test "$have_bzlib" != "no"; then LIBS="$have_bzlib $LIBS"; fi
+
+
 AC_MSG_CHECKING(for value of --with-libdb)
 AC_ARG_WITH(libdb,
     [  --without-libdb         Don't use libdb (it's necessary for jigdo-file's cache)], #'
@@ -234,7 +292,7 @@ if test "$jigdo_libdb" = "yes"; then
     AC_CHECK_HEADER(db.h, have_db_h="yes", have_db_h="no")
     AC_MSG_CHECKING(for libdb version in db.h)
     printf "#include <db.h>\nDB_VERSION_MAJOR DB_VERSION_MINOR\n" >conftest.c
-    set `eval $ac_cpp conftest.c | egrep '^ *[[0-9]] *'`; v="$1"; vv="$2"
+    set x `eval $ac_cpp conftest.c | egrep '^ *[[0-9]] *'`; v="$2"; vv="$3"
     AC_MSG_RESULT($v.$vv)
     if test "$v" -ne 3 -a "$v" -ne 4; then
         AC_MSG_RESULT([   * Warning: jigdo is only known to work with libdb])
@@ -301,99 +359,82 @@ if test "$jigdo_gui" = "yes"; then
 fi
 GTKCFLAGS="# GUI application disabled by configure script"
 GTKLIBS="$GTKCFLAGS"
-LIBWWWCFLAGS="$GTKCFLAGS"
-LIBWWWLIBS="$GTKCFLAGS"
+GLIBLIBS="$GTKCFLAGS"
+dnl LIBWWWCFLAGS="$GTKCFLAGS"
+dnl LIBWWWLIBS="$GTKCFLAGS"
+CURLCFLAGS="$GTKCFLAGS"
+CURLLIBS="$GTKCFLAGS"
 dnl The following adds flags for GTK+ and glib
 if test "$jigdo_gui" = "yes"; then
-    AC_MSG_CHECKING(for value of --with-pkg-config-prefix)
-    AC_ARG_WITH(pkg-config-prefix,
-    [  --with-pkg-config-prefix=PATH  When cross-compiling, specify prefix of
-                          libraries/headers for target architecture [none]],
-        jigdo_pkg_config_prefix="$withval", jigdo_pkg_config_prefix="")
-    if test "$jigdo_pkg_config_prefix" = ""; then
-        AC_MSG_RESULT(not set)
-    else
-        AC_MSG_RESULT(\"$jigdo_pkg_config_prefix\")
-        jigdo_pkg_config_prefix="--define-variable=prefix=$jigdo_pkg_config_prefix"
-    fi
-
-    AC_MSG_CHECKING(for GTK+ 2.0.6 or later)
+    AC_MSG_CHECKING(for GTK+ 2.4.0 or later)
     gtk_ver="`pkg-config $jigdo_pkg_config_prefix gtk+-2.0 --modversion`"
     AC_MSG_RESULT($gtk_ver)
-    if pkg-config gtk+-2.0 --atleast-version=2.0.6; then true; else
+    if pkg-config gtk+-2.0 --atleast-version=2.4.0; then true; else
         AC_MSG_RESULT([   * Installed version of GTK+ is too old])
         jigdo_gui_failed
     fi
-    GTKCFLAGS="`pkg-config $jigdo_pkg_config_prefix gtk+-2.0 --cflags 2>/dev/null`"
-    GTKLIBS="`pkg-config $jigdo_pkg_config_prefix gtk+-2.0 --libs 2>/dev/null`"
+    if test "$is_windows" = yes; then gth="gthread-2.0"; else gth=""; fi
+    GTKCFLAGS="`pkg-config $jigdo_pkg_config_prefix gtk+-2.0 $gth --cflags 2>/dev/null`"
+    GTKLIBS="`pkg-config $jigdo_pkg_config_prefix gtk+-2.0 $gth --libs 2>/dev/null`"
+    GLIBLIBS="`pkg-config $jigdo_pkg_config_prefix glib-2.0 $gth --libs 2>/dev/null`"
 fi
+dnl ____________________
 
-dnl The following adds flags for libwww
+dnl The following adds flags for libcurl
+dnl On Windows, no curl-config is supplied
 if test "$jigdo_gui" = "yes"; then
-    AC_MSG_CHECKING(for libwww 5.3.2 or later)
-    jigdo_libwwwver="`libwww-config --version 2>&1`"
-    AC_MSG_RESULT($jigdo_libwwwver)
-    case "$jigdo_libwwwver" in
-        dnl Extra [] around [0-9] style wildcards, or M4 swallows them
-        [[6-9]*|5.[4-9]*|5.[1-9][0-9]*|5.3.[2-9]*|5.3.[1-9][0-9]*])
-            LIBWWWCFLAGS="`libwww-config --cflags 2>/dev/null`"
-            LIBWWWLIBS="`libwww-config --libs 2>/dev/null`"
-            dnl Some versions of libwww-config include "-I/usr/include" in
-            dnl their --cflags output, which completely upsets some versions
-            dnl of GCC.
-            LIBWWWCFLAGS=`echo " $LIBWWWCFLAGS " | sed -e 's% -I/usr/include/* % %'`
-            dnl If we are cross-compiling for Windows and the wrong
-            dnl (ie host system's) libwww-config was executed above, we
-            dnl may need to turn -lz from its output into -lzdll. Yuk,
-            dnl that's hacky, but then it'll save people some trouble
-            case "$is_windows $LIBS " in
-                yes*"-lzdll "*)
-                    LIBWWWLIBS=`echo " $LIBWWWLIBS " | sed -e 's% -lz % -lzdll %'`
-            esac
+  if test "$is_windows" = "no"; then
+    AC_MSG_CHECKING(for libcurl 7.11.0 or later)
+    set x `curl-config --version 2>&1`
+    shift
+    case "$1" in [[0-9]*]) ;; *) shift;; esac
+    jigdo_curlver="$1"
+    AC_MSG_RESULT($jigdo_curlver)
+    case "$jigdo_curlver" in
+        [[1-9][0-9].*|[8-9].*|7.1[1-9]*|7.[2-9][0-9]*])
+            CURLCFLAGS="`curl-config --cflags 2>/dev/null`"
+            CURLLIBS="`curl-config --libs 2>/dev/null`"
             ;;
         *)
-        AC_MSG_RESULT([   * libwww not installed, or the installed version])
-        AC_MSG_RESULT([   * is too old, or libwww-config is not in \$PATH.])
-        AC_MSG_RESULT([   * Please install libwww 5.3.2 or later, it is])
+        AC_MSG_RESULT([   * libcurl not installed, or the installed version])
+        AC_MSG_RESULT([   * is too old, or curl-config is not in \$PATH.])
+        AC_MSG_RESULT([   * Please install libcurl 7.11.0 or later, it is])
         AC_MSG_RESULT([   * needed by the jigdo GUI application.])
-        installDevel "libwww" "w3c-libwww-devel/libopenssl0"
-        jigdo_gui_failed
+        installDevel "libcurl2" "libcurl2"
     esac
+  else
+    AC_CHECK_LIB(curl, curl_global_init, have_libcurl="-lcurl", have_libcurl="no")
+    AC_CHECK_LIB(curldll, curl_global_init, have_libcurl="-lcurldll", )
+    AC_CHECK_LIB(libcurl, curl_global_init, have_libcurl="-llibcurl", )
+    AC_CHECK_HEADER(curl/curl.h, have_curl_h="yes", have_curl_h="no")
+    if test "$have_libcurl" = "no" -o "$have_curl_h" = "no"; then
+        AC_MSG_RESULT([   * Please install libcurl 7.11.0 or later, it is])
+        AC_MSG_RESULT([   * needed by the jigdo GUI application.])
+    else
+        CURLCFLAGS=""
+       CURLLIBS="$have_libcurl"
+    fi
+  fi
 fi
 
 if test "$jigdo_gui" = "yes"; then IF_GUI=""; else IF_GUI="#"; fi
 AC_SUBST(IF_GUI)
 AC_SUBST(GTKCFLAGS)
 AC_SUBST(GTKLIBS)
-AC_SUBST(LIBWWWCFLAGS)
-AC_SUBST(LIBWWWLIBS)
+AC_SUBST(GLIBLIBS)
+dnl AC_SUBST(LIBWWWCFLAGS)
+dnl AC_SUBST(LIBWWWLIBS)
+AC_SUBST(CURLCFLAGS)
+AC_SUBST(CURLLIBS)
 dnl ____________________
 
-dnl Both MinGW32 and glib declare 'struct dirent' and 'struct DIR'. If
-dnl there are problems using the relevant headers together, do some
-dnl really dirty things with the preprocessor to disable the glib
-dnl declaration.
-dnl Update: Only happens with old versions, can probably remove this.
-dirent_hack="no"
-if test "$is_windows" = yes; then
-    CPPFLAGS_orig="$CPPFLAGS"
-    CPPFLAGS="$CPPFLAGS $GTKCFLAGS"
-    AC_MSG_CHECKING(for conflicting 'struct dirent' in dirent.h and glib.h)
-    AC_TRY_COMPILE([#include <dirent.h>
-                    #include <glib.h>], , dirent_hack="no",dirent_hack="yes")
-    if test "$dirent_hack" = "yes"; then
-        AC_TRY_COMPILE([#include <dirent.h>
-                        #define dirent other_dirent
-                        #define DIR other_DIR
-                        #include <glib.h>], , , dirent_hack="no")
-    fi
-    AC_MSG_RESULT($dirent_hack)
-    CPPFLAGS="$CPPFLAGS_orig"
-fi
-if test "$dirent_hack" = "yes"; then
-    AC_DEFINE(DIRENT_HACK, 1)
-else
-    AC_DEFINE(DIRENT_HACK, 0)
+if test "$jigdo_gui" = "yes" && test ! -e "$srcdir/src/gtk/interface.hh"; then
+  AC_CHECK_PROG(have_glade, glade-2, yes, no)
+  if test "$have_glade" = "no"; then
+    AC_MSG_RESULT([   * glade-2 was not found on your system. Please install])
+    AC_MSG_RESULT([   * it, it is needed to compile the jigdo GUI (actually,])
+    AC_MSG_RESULT([   * to create the file src/gtk/interface.hh)])
+  fi
 fi
 dnl ____________________
 
@@ -570,22 +611,24 @@ AC_MSG_RESULT(\"$USE_NLS\")
 AC_SUBST(USE_NLS)
 CATALOGS=""
 if test "$USE_NLS" = "yes"; then
-    AC_CHECK_LIB(intl, dgettext, x="yes", x="no")
-    if test "$x" = "yes"; then
+    oldLIBS="$LIBS"
+    AC_MSG_CHECKING(for dgettext in <libintl.h> and libc)
+    AC_TRY_LINK([#include <libintl.h>], dgettext(0, 0),
+                have_intl="yes", have_intl="no");
+    AC_MSG_RESULT($have_intl)
+    if test "$have_intl" = "no"; then
         LIBS="$LIBS -lintl";
-        AC_CHECK_LIB(iconv, iconv, LIBS="$LIBS -liconv")
+        AC_MSG_CHECKING(for dgettext in <libintl.h> and -lintl)
+        AC_TRY_LINK([#include <libintl.h>], dgettext(0, 0),
+                    have_intl="yes", have_intl="no");
+        AC_MSG_RESULT($have_intl)
     fi
-
-    AC_CACHE_CHECK([whether dgettext() works],
-                   jigdo_cv_func_dgettext,
-        AC_TRY_LINK([#include <libintl.h>], [dgettext("", "")],
-                    jigdo_cv_func_dgettext="yes",jigdo_cv_func_dgettext="no")
-    )
-    if test "$jigdo_cv_func_dgettext" = "no"; then
+    if test "$have_intl" = "no"; then
         AC_MSG_RESULT([   * Disabling gettext support - jigdo will not be])
         AC_MSG_RESULT([   * able to display translated status/error])
         AC_MSG_RESULT([   * messages instead of the default English ones.])
         USE_NLS="no"
+        LIBS="$oldLIBS"
     fi
 fi
 if test "$USE_NLS" = "yes"; then
@@ -619,45 +662,69 @@ dnl ______________________________________________________________________
 
 dnl Checks for other --enable-xxx, --with-xxx switches
 
-AC_MSG_CHECKING(for value of --enable-libwww-hacks)
-AC_ARG_ENABLE(libwww-hacks,
-    [  --disable-libwww-hacks  Don't compile fixed versions of some libwww
-                          code (Try this if you see link errors/crashes)],
-    jigdo_libwww_hacks=$enableval, jigdo_libwww_hacks=yes)
-AC_MSG_RESULT(\"$jigdo_libwww_hacks\")
-if test "$jigdo_libwww_hacks" = yes; then
-    IF_LIBWWW_HACKS="" # enable hacks
-elif test "$jigdo_libwww_hacks" != no; then
-    AC_MSG_ERROR(Invalid argument to --enable-libwww-hacks option)
-else
-    IF_LIBWWW_HACKS="#" # disable hacks, by commenting out Makefile line
-fi
-AC_SUBST(IF_LIBWWW_HACKS)
+dnl AC_MSG_CHECKING(for value of --enable-libwww-hacks)
+dnl AC_ARG_ENABLE(libwww-hacks,
+dnl     [  --disable-libwww-hacks  Don't compile fixed versions of some libwww
+dnl                           code (Try this if you see link errors/crashes)],
+dnl     jigdo_libwww_hacks=$enableval, jigdo_libwww_hacks=yes)
+dnl AC_MSG_RESULT(\"$jigdo_libwww_hacks\")
+dnl if test "$jigdo_libwww_hacks" = yes; then
+dnl     IF_LIBWWW_HACKS="" # enable hacks
+dnl elif test "$jigdo_libwww_hacks" != no; then
+dnl     AC_MSG_ERROR(Invalid argument to --enable-libwww-hacks option)
+dnl else
+dnl     IF_LIBWWW_HACKS="#" # disable hacks, by commenting out Makefile line
+dnl fi
+dnl AC_SUBST(IF_LIBWWW_HACKS)
 dnl ______________________________________________________________________
 
 dnl Do this at end in order not to influence other compile tests which
 dnl might return warnings. Turning the warnings into errors would make
 dnl the tests fail.
-if test "$jigdo_debug" = "yes"; then
-    #if test "$GCC" = yes; then CFLAGS="$CFLAGS -Werror"; fi
-    if test "$GXX" = yes; then CXXFLAGS="$CXXFLAGS -Werror"; fi
-fi
+dnl if test "$jigdo_debug" = "yes"; then
+dnl     #if test "$GCC" = yes; then CFLAGS="$CFLAGS -Werror"; fi
+dnl     if test "$GXX" = yes; then CXXFLAGS="$CXXFLAGS -Werror"; fi
+dnl fi
 if test "$GXX" = "yes"; then
     CFLAGS="-Wall $CFLAGS -W"
     CXXFLAGS="$CXXFLAGS -Wall -W -Wpointer-arith -Wconversion -Woverloaded-virtual"
 fi
 dnl ______________________________________________________________________
 
+if test "$cross_compiling" = yes; then
+  IF_CROSSCOMPILING=""
+  IFNOT_CROSSCOMPILING="#"
+else
+  IF_CROSSCOMPILING="#"
+  IFNOT_CROSSCOMPILING=""
+fi
+AC_SUBST(IF_CROSSCOMPILING)
+AC_SUBST(IFNOT_CROSSCOMPILING)
+dnl ______________________________________________________________________
+
 dnl Touch TAGS to prevent it from being recreated when a normal user
 dnl builds the program. TAGS should only be updated once changes are
 dnl made to the source.
 touch "$srcdir/src/TAGS"
 
+SUBDIRS="glibcurl gtk job net util"
 SRC_MAKEDEPS="$srcdir/src/Makedeps"
+dnl When bootstrapping from CVS, we need to make sure that correct
+dnl dependencies cause gtk/interface.hh to be created
+if test -e "$SRC_MAKEDEPS"; then true; else
+  AC_MSG_RESULT(Creating $SRC_MAKEDEPS)
+  touch "$SRC_MAKEDEPS"
+  echo >"$srcdir/src/gtk/interface.hh"
+  (cd "$srcdir/src"
+   find . -type f '(' -name '*.cc' -o -name '*.c' ')' \
+   | xargs "$ac_cv_prog_AWK" -f ../scripts/depend.awk "$srcdir" $SUBDIRS -
+  )
+  rm -f "$SRC_MAKEDEPS.bak" "$srcdir/src/gtk/interface.hh"
+fi
 AC_SUBST_FILE(SRC_MAKEDEPS)
 
 dnl Create subdirs in src directory
-for dir in "" gtk job net util; do
+for dir in "" $SUBDIRS; do
     test ! -d "src/$dir" && mkdir "src/$dir"
 done
 AC_OUTPUT(Makefile doc/Makefile src/Makefile po/Makefile)
index 0ed4da8..2cb496d 100644 (file)
@@ -2,7 +2,7 @@ Source: jigdo
 Section: utils
 Priority: extra
 Maintainer: Richard Atterer <jigdo.atterer.net>
-Build-Depends: debhelper (>= 4), zlib1g-dev, libdb4.2-dev || libdb4.3-dev || libdb4-dev, libgtk2.0-dev, libwww-dev || libwww-ssl-dev
+Build-Depends: debhelper (>= 4), zlib1g-dev, libbz2-dev, libdb4.3-dev || libdb4.2-dev || libdb4-dev, libgtk2.0-dev, libcurl3-dev || libcurl2-dev
 Standards-Version: 3.5.6
 
 Package: jigdo
index 344ce88..f563982 100644 (file)
@@ -1,4 +1,4 @@
-Copyright (C) 2001-2003  |  richard@
+Copyright (C) 2001-2005  |  richard@
 Richard Atterer          |  atterer.net
 
   This program is free software; you can redistribute it and/or modify
diff --git a/deb/install-build-deps.sh b/deb/install-build-deps.sh
new file mode 100755 (executable)
index 0000000..dbb3990
--- /dev/null
@@ -0,0 +1,11 @@
+#! /bin/sh
+
+cmd() { echo "$@"; "$@"; }
+
+cmd apt-get install \
+  debhelper \
+  zlib1g-dev \
+  libbz2-dev \
+  libdb4.2-dev \
+  libgtk2.0-dev \
+  libcurl3-dev
index 78307a3..f3c597d 100644 (file)
 
-There are many different ways of building jigdo for Windows:
+There are several different ways of building jigdo for Windows:
 
 Recommended:
- - On Linux, cross-compiling for Windows. Most comfortable in the long
-   run, recommended! Described in detail below.
+
+A) On Linux, cross-compiling for Windows. Most comfortable in the
+   long run, recommended! Described below.
+
+B) On Windows, using MinGW + MSYS. Described below.
+
+Should work, but not tested:
+
  - On Windows, using Cygwin, but actually calling the MinGW gcc/g++.
-   This has the advantage that the final binary will not need the
-   Cygwin DLL. Described in detail in the second half of this file.
-
-Not recommended:
- - On Windows, using Cygwin. Never tested, but might work out of the
-   box. Not recommended "for production releases", since the resulting
-   binaries depend on the Cygwin DLL and use Unix filename conventions.
- - On Windows, using minimal MinGW + MSYS setup, with "make
-   -f Makefile.mingw". Hasn't been tested in a long while, probably
-   broken.
+   Possible, but I do not see the point - these days, MSYS has enough
+   features to execute the configure script.
+
  - On Windows, using Cygwin, and instructing it (with -mms-bitfields)
    to generate code which does not use the Cygwin DLL. Never tried,
-   was allegedly broken in the past.
+   might work.
 
+----------------------------------------------------------------------
 
-NOTE: configure.in sets up @MWINDOWS@ in such a way that a console
-window ("DOS window") will open alongside the jigdo window if you
-compile jigdo with --enable-debug. Otherwise, the console window will
-not appear.
-
-
-
-Cross-compiling jigdo on Linux for Windows
-==========================================
-
-All the following steps happen on the build machine, i.e. under Linux.
-
-- Get a MinGW cross-compiler. Under Debian, this is as easy as
-  "apt-get install mingw32 mingw32-binutils mingw32-runtime", for
-  other distros you might be able to find some RPMs somewhere.
-  Building your own cross-compiler is not that easy, if you really
-  want to go that way, look on the net for cross-compile guides. Maybe
-  have a look at my own "build-cross-gcc" script.
-  <http://atterer.net/debian/>
-- Get GTK+ 2.x for Windows from
-  <http://www.gimp.org/~tml/gimp/win32/downloads.html>. You need
-  everything except the sources and the older GTK+ 1.2 binaries.
-- Unpack everything in a directory which I'll refer to as $GTKWIN from
-  now on. There will be subdirectories $GTKWIN/include, $GTKWIN/lib
-  etc. (unzip might ask whether to overwrite some files which are
-  present in >1 of the archives - your answer doesn't matter.)
-- If the zlib distribution does not ship with a lib/libzdll.a file or
-  similar for mingw, generate it as suggested in its USAGE.txt, with a
-  command like this from within the $GTKWIN directory:
-  i586-mingw32msvc-dlltool -D zlib1.dll -d lib/zlib.def -l lib/libzdll.a
-- Install libwww. The easy way to do this is to get a binary package
-  from the jigdo homepage <http://atterer.net/jigdo/>. Unpack into a
-  dir $LIBWWW (can be the same as $GTKWIN, doesn't matter), then edit
-  $LIBWWW/bin/libwww-config and set the value of prefix near the start
-  of the script to $LIBWWW.
-- Set some environment vars:
-  CC="i586-mingw32msvc-gcc -mms-bitfields -march=pentium -I$GTKWIN/include -L$GTKWIN/lib"
-  CXX="i586-mingw32msvc-c++ -mms-bitfields -march=pentium -I$GTKWIN/include -L$GTKWIN/lib"
-  PATH=$LIBWWW/bin:$PATH
-  PKG_CONFIG_PATH=$GTKWIN/lib/pkgconfig
-- configure jigdo --without-libdb --with-pkg-config-prefix=$GTKWIN
-  --with-uint64=unsigned_long_long --disable-nls
-
-In order for Windows to pick up the DLLs that the compiled .exe files
-depend on, the easiest way is to copy (or symlink) the .exe to
-$GTKWIN/bin, and to run it from there. Depending on your zlib
-distribution, you may also have to move zlib1.dll from $GTKWIN to
-$GTKWIN/bin.
+Getting the Windows versions of the libraries (applies to A and B)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+These days, jigdo depends on a quite large number of libraries. An
+incomplete list is: zlib, libbzip2, libcurl + OpenSSL, GTK+.
+
+Tracking down, downloading and installing all the Windows versions of
+these libraries, together with heade files, DLLs etc is quite a bit of
+work. For this reason, I have put together a script which does all
+this work for you.
+
+"scripts/win-lib-install.sh" only needs to be given destination
+directories for the downloaded .zip files (variable "dl" near the top
+of the script) and the unpacked software (variable "inst").
+
+Executing this script is possible either under Linux or Windows (MSYS,
+to be exact).
+
+----------------------------------------------------------------------
+
+A) Build On Linux, cross-compiling for Windows
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+If you have the choice between building on Linux and Windows, choose
+Linux! MinGW/MSYS is really quite slow, compiling natively is not a
+lot of fun.
+
+To cross-compile jigdo:
+
+ - Get a cross-compiler which runs on Linux and produces code for
+   Windows. MinGW <http://mingw.org/>, a special x86 version of GCC,
+   is the right choice. You can build the cross-compiler yourself from
+   the GCC/MinGW sources or search for precompiled versions - see
+   <http://mingw.org/mingwfaq.shtml#faq-cross>. For Debian Linux, it
+   is much simpler: Execute
+   "apt-get install mingw32 mingw32-binutils mingw32-runtime"
+   to install the Debian mingw cross-compiler package. The
+   cross-compiler programs must be installed in a directory which is
+   in your PATH, so that you can invoke them as
+   "i586-mingw32msvc-gcc", "i586-mingw32msvc-g++" etc.
+
+ - Get Windows versions of all the libraries that jigdo needs, by
+   executing "scripts/win-lib-install.sh".
+
+ - Now run the configure script as follows:
+
+   ./configure --host i586-mingw32msvc --with-pkg-config-prefix=/inst --without-libdb
+
+   Instead of "/inst", substitute the value the "inst" variable that
+   you chose. The value must be an absolute path. The
+   --with-pkg-config-prefix switch is a speciality of jigdo's
+   configure script, it is not supported by other projects. Also, it
+   only works if the detected compiler is GCC.
+
+   The configure script automatically adds the necessary
+   -mms-bitfields switch for GCC, and -march=pentium to optimize for
+   Pentium and later processors.
+
+ - Type "make" and hope for the best! :-)
 
 Using samba, I export the directory with the cross-compiled binaries
 to another machine running Windows - very useful because tests are
 possible immediately after compilation. By the way, another very
-useful tool in this situation is "Synergy", it allows you to share a
-keyboard and mouse between the Linux and Windows machines.
-
-
-Building jigdo-file and jigdo under Windows
-===========================================
-
-SLIGHTLY OUTDATED, refers to GTK+ 1.2 for Windows, but jigdo now uses
-GTK+ 2.x. Still, most of this should still apply:
-
-- Download Cygwin from <http://www.cygwin.com/>, install in C:\cygwin.
-- Download MinGW32 (minimal GNU for Windows) from
-  <http://www.mingw.org/>. MinGW is similar to Cygwin, but creates
-  binaries that do not depend on the huge Cygwin DLL. Create directory
-  C:\mingw, unpack MinGW-x.y.tar.gz there.
-  Cygwin actually includes mingw as one of the installable components.
-  I have never tried that, though it probably works... better don't
-  use Cygwin's toolchain with the -mno-cygwin switch, apparently this
-  causes problems sometimes.
-- Download GTK+ for Windows from
-  <http://www.gimp.org/~tml/gimp/win32/>. You need libiconv,
-  libiconv-dev, libintl, glib, glib-dev, gtk+, gtk+-dev and zlib.
-  Unpack in C:\mingw\local - this should create new directories
-  C:\mingw\local\bin, C:\mingw\local\lib, C:\mingw\local\include etc.
-- For the mingw binaries, C:\mingw is accessible as /mingw. For Cygwin
-  binaries, that is not the case ("/" in Cygwin is mapped to
-  C:\cygwin). To fix this, execute from within Cygwin:
-  ln -s /cygdrive/c/mingw /mingw
-- Make the mingw compiler available from within Cygwin; add /mingw/bin
-  to the front of PATH. You may also want to add to PATH any
-  directories in /mingw/local that contain DLLs, because at runtime
-  PATH is searched for any DLLs which are not in the same directory as
-  the executable.
-- Should you experience weird problems during compilation later on,
-  remove or rename the mingw version of make, e.g. with
-  mv /mingw/bin/make.exe /mingw/bin/make-mingw.exe
-  In other words, use the Cygwin version. I have encountered a number
-  of bizarre problems with the mingw make when compiling libwww.
-- Install libwww. The easy way to do this is to get a binary package
-  from the jigdo homepage <http://atterer.net/jigdo/> and to unpack it
-  in /mingw/local.
-  Alternatively, get the sources from
-  <http://www.w3.org/Library/Distribution/> and compile it yourself.
-  As of version 5.4.0, my patch for mingw support was included, so it
-  should compile cleanly. Configure libwww as follows:
-  ./configure i586-pc-mingw32 --prefix=/mingw/local --with-zlib=/mingw/local/lib/libz.a --without-regex --without-ssl --without-expat
-- Edit the gtk-config and libwww-config scripts (probably in
-  /mingw/local/bin) and adjust the paths, library versions etc. to
-  match those of your installation. (In practice, you'll want to try
-  compiling jigdo first, then whenever any header or lib isn't found
-  adjust the scripts and rerun jigdo's configure script.) If no
-  gtk-config script comes with the GTK+ release, use the one supplied
-  with my binary libwww package or get it from the jigdo homepage.
-- Set some environment vars:
-  CC=gcc -march=pentium -fnative-struct
-  CXX=c++ -march=pentium -fnative-struct
-  MACHTYPE=i586-pc-mingw32
-  For GCC 3.1, the -fnative-struct switch was renamed to -mms-bitfields
-- configure jigdo --without-libdb
+useful tool in this situation is "Synergy"
+<http://synergy2.sourceforge.net/>, it allows you to share a keyboard
+and mouse between the Linux and Windows machines.
+
+When you double-click jigdo.exe or jigdo-file.exe under Windows,
+you'll likely get a message about missing DLLs. To fix this, either
+copy all the required DLLs from $inst/bin to the same directory as the
+.exe, or write a small jigdo.bat file which adds the directory with
+the DLLs to PATH:
+
+path Y:\inst\bin;%PATH%
+jigdo.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
+
+NOTE: configure.in sets up @MWINDOWS@ in such a way that a console
+window ("DOS window") will open alongside the jigdo window if you
+compile jigdo.exe with --enable-debug. Otherwise, the console window
+will not appear. The -mwindows switch to the g++ link command prevents
+the window from opening.
+
+----------------------------------------------------------------------
+
+B) Build on Windows, using MinGW + MSYS
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+MinGW GCC is the special version of GCC which can create Windows .exe
+files. MSYS is an environment which provides you with a Unix command
+line environment based on MinGW; a shell and all the utilities you
+need to execute configure scripts.
+
+To compile jigdo under Windows:
+
+ - Download and install the following files from
+   <http://mingw.org/download.shtml#hdr2>:
+   msysDTK-x.x.x.exe  (MSYS developer toolkit)
+   MSYS-x.x.x.exe     (MSYS; shell and many Unix utilities)
+   MinGW-x.x.x.exe    (gcc, g++, binutils)
+
+ - Before win-lib-install.sh can run successfully under MSYS, you need
+   to download and install
+   unzip.exe: http://www.info-zip.org/UnZip.html#Win32
+   wget.exe: http://gnuwin32.sourceforge.net/packages/wget.htm
+   Copy the binaries into your PATH, e.g. into /bin under MSYS.
+
+ - Set up the "inst" and "dl" variables in win-lib-install.sh and run
+   it to install the libraries.
+
+ - "./configure --without-libdb" and "make"
+   The configure script automatically adds the necessary
+   -mms-bitfields switch for GCC, and -march=pentium to optimize for
+   Pentium and later processors.
 
 In the future, jigdo on Win might use the NSIS installer from
 <http://www.nullsoft.com/free/nsis/>.
@@ -144,6 +146,35 @@ In case you want to install software in a different location than
 CPLUS_INCLUDE_PATH, note that with mingw, the path separator is not
 ':', but ';'
 
+----------------------------------------------------------------------
+
+Misc notes from older versions of this file, may or may not apply:
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ - If the zlib distribution does not ship with a lib/libzdll.a file or
+   similar for mingw, generate it as suggested in its USAGE.txt, with
+   a command like this from within the $GTKWIN directory:
+   i586-mingw32msvc-dlltool -D zlib1.dll -d lib/zlib.def -l
+   lib/libzdll.a
+
+ - Cygwin actually includes mingw as one of the installable
+   components.  I have never tried that, though it probably
+   works... better don't use Cygwin's toolchain with the -mno-cygwin
+   switch, apparently this causes problems sometimes.
+
+ - For the mingw binaries, C:\mingw is accessible as /mingw. For
+   Cygwin binaries, that is not the case ("/" in Cygwin is mapped to
+   C:\cygwin). To fix this, execute from within Cygwin:
+   ln -s /cygdrive/c/mingw /mingw
+
+ - Should you experience weird problems during compilation later on,
+   remove or rename the mingw version of make, e.g. with mv
+   /mingw/bin/make.exe /mingw/bin/make-mingw.exe In other words, use
+   the Cygwin version. I have encountered a number of bizarre problems
+   with the mingw make when compiling libwww.
+   [The same applies to MSYS; prefer the MSYS make over the MinGW
+   one. Luckily, the slightly broken MinGW make is called
+   "mingw-make.exe" (or something like that) today.]
 
 The following script may be useful to you. I put it in my .bashrc
 under Cygwin, then just entering "mingw" will set up all environment
index 84e5fd4..c24dc33 100644 (file)
@@ -65,7 +65,7 @@ pretty open to all ideas, though, especially if they save me some
 work. :)
 
 ATM, GCC 2.95 is still supported, so contributed code should compile
-with GCC 2.95 as well as the latest GCC 3.x. See compat.hh for a few
+with GCC 2.95 as well as the latest GCC 4.x. See compat.hh for a few
 replacements for things which GCC 2.95 doesn't have.
 
 
@@ -76,11 +76,17 @@ There are some things I'd *love* to see done by somebody else:
 Windows/Solaris/BSD/MacOS porting:
 
   ATM, I test and build jigdo on Linux and Windows, and occasionally
-  on Solaris/BSD. Especially maintaining the Windows port is a bit of
-  work...
+  on Solaris/BSD. Especially maintaining the Windows port is quite a
+  lot of work...
 
   It'd also be nice if someone ensured that it builds on
-  Redhat/SuSE/Mandrake, and maintained the jigdo.spec file.
+  Redhat/SuSE/Mandrake, and maintained the jigdo.spec file. Paul Bolle
+  <jigdo-rpm atterer.net> has been doing this, get in touch with him
+  if you want to improve the .spec file.
+
+  Andrew Mathieson has started maintaining a Mac OS X port - the Fink
+  port of jigdo had become rather neglected. See
+  <http://jigdoosx.berlios.de/>
 
 Non-interactive frontend for jigdo:
 
@@ -94,6 +100,9 @@ Non-interactive frontend for jigdo:
 
 CGI-like program for on-the-fly creation from .jigdo/.template files:
 
+  NOTE: Steve McIntyre has implemented something like this as part of
+  JTE, see <http://www.einval.com/~steve/software/JTE/>
+
   With Debian, we have lots of mirror admins who have the bandwidth to
   host CD images, but not the disc space. They'd like a CGI-like
   program which generates a pseudo dirlisting with .iso links in it,
@@ -156,21 +165,13 @@ src:
 
 src/net: Low-level network access.
 
-    I'm not entirely happy with libwww and have vague plans to switch
-    away from it once something better is available, so all code
-    accessing libwww should be in this dir *only*, to make it
-    easier to rip out.
-
-    The "something better", BTW, would ideally be the Mozilla HTTP
-    code, but ATM this isn't available as a separate library; you'd
-    have to hack Mozilla to extract it.
-
-    Required features for any replacement for libwww are HTTP/1.1
-    support (both pipelining and ranges), multiple simultaneous
-    connections (either multi-threaded or single-threaded with
-    select()) and portability to Windows. [libcurl has all of these
-    except pipelining.]
+    This used to use libwww for the actual net access. I switched over
+    to libcurl between 0.7.1 and 0.7.2 and haven't looked back! The
+    only disadvantage of libcurl over libwww is that it doesn't
+    support HTTP pipelining, but libwww really is very difficult to
+    work with.
 
+    All code accessing libcurl should be isolated in this dir *only*.
     Files in this dir may make calls to glib, but not gtk.
 
 src/job: Application logic
@@ -234,7 +235,6 @@ file which tests the code. If the name of the file is "foo-test.cc"
 (with a "-"), depend.awk will automatically generate a simple Makefile
 entry. If that entry is not sufficient, call the file "footest.cc" and
 manually add a Makefile rule.
-[Maybe I should switch to cppunit sometime...]
 
 Lines must not be longer than 77 characters. To format comments to
 exactly that width, and also never to use tabs for indentation, use
@@ -355,9 +355,10 @@ to create and destroy top-level jobs. Any job created by a "master"
 MakeImageDl can only be deleted by the same MakeImageDl. This means
 that the GUI code which handles SingleURL GTK+ visualization must
 distinguish between a "child mode" (we don't own the SingleUrl) and
-"non-child mode" (we created and own the SingleUrl). It might even be
-advisable to have two classes for the two cases; ATM the GTK+ frontend
-doesn't.
+"non-child mode" (we created and own the SingleUrl; this will only be
+the case if the UI also allows single-file downloads). It might even
+be advisable to have two classes for the two cases; ATM the GTK+
+frontend doesn't.
 
 
 MakeImageDl
@@ -367,36 +368,48 @@ the frontend in gtk/ is decoupled from the application logic in job/
 and other dirs.
 
 Basic idea: In the object that makes data available (e.g. SingleUrl in
-the case of a HTTP/FTP download), maintain a pointer to an IO object.
-SingleUrl::IO is an abstract class, to be implemented by the
-"consumer" of the data. This consumer is fed the data via calls to
-virtual methods like SingleUrl::IO::singleUrl_data(). There are many
-IO classes; Job::IO is their base (see job.hh). Implementers of
-SingleUrl::IO include GtkSingleUrl (GTK+ frontend) and JigdoIO
-(decompression/parsing of .jigdo data.)
-
-Often, there is more than one consumer, resulting in chains or even
-trees of consumers. For example, when downloading .jigdo data, the
-SingleUrl creates the data (more accurately its Download does) and
-writes it to disc. Next, the MakeImageDl wants to have a look at the
-data and interpret the sections inside the .jigdo, which it does by
-registering a JigdoIO with the SingleUrl. In order to notify the
-frontend of any news, the JigdoIO in turn forwards the calls to
-another IO, e.g. a GtkSingleUrl, which will modify GTK+ widgets as
-necessary. (The IO objects of the frontend are always at the end of
-the chains.)
+the case of a HTTP/FTP download), maintain a pointer to an IO
+object. This pointer is stored inside a public IOSource member
+(e.g. SingleUrl::io). SingleUrl::IO is an abstract class, to be
+implemented by the "consumer" of the data. This consumer is fed the
+data via calls to virtual methods like
+SingleUrl::IO::singleUrl_data(). There are many IO classes; Job::IO is
+their base (see job.hh). Implementers of SingleUrl::IO include
+GtkSingleUrl (GTK+ frontend) and JigdoIO (decompression/parsing of
+.jigdo data.) The consumer registers its IO-implementing object using
+IOSource::addListener().
+
+There were *lots* of problems with dangling pointers with early
+versions of the producer-consumer mechanism: Typically, the frontend
+object would be deleted because of some user intervention, but the
+pointer to its producer would still be dereferenced to make one last
+"hey frontend, you are deleting me" (aka job_deleted()) call. This was
+not un-fixable, but difficult to maintain. So with the current code,
+all IO implementers are automatically deregistered from their IOSource
+when they are destroyed.
+
+Often, there is more than one consumer. For example, when downloading
+.jigdo data, a SingleUrl creates the data (more accurately its
+Download does) and writes it to disc. The MakeImageDl which owns that
+SingleUrl wants to have a look at the data and interpret the sections
+inside the .jigdo, which it does by registering a JigdoIO with
+SingleUrl::io in MakeImageDl::createJigdoDownload() ("io" member
+inherited from DataSource). In order to get notified of any news, the
+GtkSingleUrl frontend also registers itself with the SingleUrl in
+GtkSingleUrl::openOutputAndRun().
 
 In the most complicated scenario, the downloaded data must also be
 decompressed by the JigdoIO, resulting in the following flow of data -
 the "->" can be interpreted both as "an IO* points this way" and
 "information flows this way":
-                                     -> JigdoIO
-  Download -> SingleUrl -> JigdoIO -|
-                                     -> GtkSingleUrl
+
+  Download -> SingleUrl -+-> JigdoIO -> JigdoIO
+                         +-> GtkSingleUrl
 
 It might be confusing that JigdoIO appears twice; this is because the
 same JigdoIO object has a double role as consumer of the SingleUrl
-data and as consumer of the uncompressed data of the Gunzip it owns.
+data and as consumer of the uncompressed data of the Gunzip it
+owns. IOW, it implements both DataSource::IO and Gunzip::IO.
 
 
 MakeImageDl's job is to start downloads as necessary and to pump their
index f748657..ceb591d 100644 (file)
@@ -64,7 +64,7 @@ updated/added/deleted jigdo files are detected. See
 
 ----------------------------------------------------------------------
 
-Copyright (C) 2001-2004  |  richard@
+Copyright (C) 2001-2005  |  richard@
 Richard Atterer          |  atterer.net
 
   This program is free software; you can redistribute it and/or modify
index 9953386..4ff6f20 100644 (file)
@@ -1,66 +1,66 @@
-\r
-Jigsaw Download (jigdo) for Windows\r
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r
-Jigsaw Download homepage:   <http://atterer.net/jigdo/>\r
-Debian CD images via jigdo: <http://www.debian.org/CD/jigdo-cd/>\r
-                            <richard@\r
-Written by Richard Atterer:  atterer.net>\r
-\r
-jigdo-lite\r
-~~~~~~~~~~\r
-This program enables you to retrieve big files (for example, CD\r
-images) that someone offers for download in the form of ".jigdo"\r
-files.\r
-\r
-First, locate a site which offers such files with a ".jigdo" extension\r
-- see <http://www.debian.org/CD/jigdo-cd/> for CD and DVD images of\r
-Debian Linux in jigdo format. Next, download the image as follows:\r
-\r
- - Double-click on the "jigdo-lite.bat" file.\r
- - The script will ask for the URL of a ".jigdo" file - enter the URL\r
-   of your choice.\r
- - Follow the instructions printed by jigdo-lite - hopefully they will\r
-   be self-explanatory.\r
-\r
-Making jigdo-lite use your proxy\r
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r
-To make jigdo-lite use your proxy for its downloads, first\r
-double-click on "jigdo-lite.bat" to start the program. As soon as the\r
-input prompt has appeared, abort the program again and close the\r
-command window.\r
-\r
-You will find that jigdo-lite has created a file called\r
-"jigdo-lite-settings.txt" in the same directory as this README.txt\r
-file. Load this into an editor and find the line that starts with\r
-"wgetOpts". The following switches can be added to the line:\r
-\r
--e ftp_proxy=http://LOCAL-PROXY:PORT/\r
--e http_proxy=http://LOCAL-PROXY:PORT/\r
---proxy-user=USER\r
---proxy-passwd=PASSWORD\r
-\r
-Of course, you only need --proxy-user/password if your proxy requires\r
-authentication. The switches need to be added to the end of the\r
-wgetOpts line *before* the final ' character. All options must be on\r
-one line.\r
-\r
-----------------------------------------------------------------------\r
-\r
-Copyright (C) 2001-2004  |  richard@\r
-Richard Atterer          |  atterer.net\r
-\r
-  This program is free software; you can redistribute it and/or modify\r
-  it under the terms of the GNU General Public License, version 2, as\r
-  published by the Free Software Foundation.\r
-\r
-  This program is distributed in the hope that it will be useful,\r
-  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-  GNU General Public License for more details.\r
-\r
-Please note: The copyright notice in the file COPYING only applies to\r
-the text of the GNU General Public License; the copyright of the\r
-individual source files is as specified at the top of each file and\r
-above. Also note that the code is licensed under GPL _version_2_ and\r
-no other version. Special licensing for my (RA's) code is available on\r
-request.\r
+
+Jigsaw Download (jigdo) for Windows
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Jigsaw Download homepage:   <http://atterer.net/jigdo/>
+Debian CD images via jigdo: <http://www.debian.org/CD/jigdo-cd/>
+                            <richard@
+Written by Richard Atterer:  atterer.net>
+
+jigdo-lite
+~~~~~~~~~~
+This program enables you to retrieve big files (for example, CD
+images) that someone offers for download in the form of ".jigdo"
+files.
+
+First, locate a site which offers such files with a ".jigdo" extension
+- see <http://www.debian.org/CD/jigdo-cd/> for CD and DVD images of
+Debian Linux in jigdo format. Next, download the image as follows:
+
+ - Double-click on the "jigdo-lite.bat" file.
+ - The script will ask for the URL of a ".jigdo" file - enter the URL
+   of your choice.
+ - Follow the instructions printed by jigdo-lite - hopefully they will
+   be self-explanatory.
+
+Making jigdo-lite use your proxy
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+To make jigdo-lite use your proxy for its downloads, first
+double-click on "jigdo-lite.bat" to start the program. As soon as the
+input prompt has appeared, abort the program again and close the
+command window.
+
+You will find that jigdo-lite has created a file called
+"jigdo-lite-settings.txt" in the same directory as this README.txt
+file. Load this into an editor and find the line that starts with
+"wgetOpts". The following switches can be added to the line:
+
+-e ftp_proxy=http://LOCAL-PROXY:PORT/
+-e http_proxy=http://LOCAL-PROXY:PORT/
+--proxy-user=USER
+--proxy-passwd=PASSWORD
+
+Of course, you only need --proxy-user/password if your proxy requires
+authentication. The switches need to be added to the end of the
+wgetOpts line *before* the final ' character. All options must be on
+one line.
+
+----------------------------------------------------------------------
+
+Copyright (C) 2001-2005  |  richard@
+Richard Atterer          |  atterer.net
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License, version 2, as
+  published by the Free Software Foundation.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+Please note: The copyright notice in the file COPYING only applies to
+the text of the GNU General Public License; the copyright of the
+individual source files is as specified at the top of each file and
+above. Also note that the code is licensed under GPL _version_2_ and
+no other version. Special licensing for my (RA's) code is available on
+request.
index dee9f3f..e7d0063 100644 (file)
@@ -81,7 +81,8 @@ The image template files consist of three types of parts:
 
 After the header of a template file, one or more raw data parts and
 one description part follow. Each part consists of a 4-byte ID ("DATA"
-or "DESC"), followed by 6 bytes of length. The length values are
+or "BZIP" for the zlib/bzip2-compressed data parts, "DESC" for the
+description), followed by 6 bytes of length. The length values are
 little-endian (i.e. least-significant byte first) because that *is*
 the proper end to open an egg. The length includes the ID and length
 field itself, so for an empty part (containing just the ID and the
@@ -190,7 +191,8 @@ written to the image.
 Raw data
 --------
 
-Binary data, a stream compressed with zlib (see RFC1950).
+Binary data, a stream compressed with zlib (see RFC1950) for "DATA" or
+libbz2 for "BZIP".
 
 For each type==2 entry in the description data, the uncompressed
 stream contains skipLen bytes of data. This is data that did not match
@@ -205,18 +207,24 @@ contains no type==2 entries.
 
 #Bytes     Value   Description
 ----------------------------------------------------------------------
- 4         dataID  "ID for the part: 'DATA' = the hex bytes 44 41 54 41"
+ 4         dataID  "ID for the part: 'DATA' = the hex bytes 44 41 54 41
+                                  or 'BZIP' = the hex bytes 42 5a 49 50"
  6         dataLen "Length of part, i.e. length of compressed data + 16"
  6         dataUnc "Number of bytes of *uncompressed* data of this part"
 dataLen-16         "Compressed data"
 ----------------------------------------------------------------------
 
-jigdo-file always takes care to subdivide the complete raw data into
-parts which are not larger than about 256kB each compressed. This is
-done to support certain applications of jigdo where seeking in the
+gzip: jigdo-file always takes care to subdivide the complete raw data
+into parts which are not larger than about 256kB each compressed. This
+is done to support certain applications of jigdo where seeking in the
 image is necessary. (Additionally, this allows jigdo-file to write the
 final template file to a non-seekable output, e.g. to stdout.)
 
+bzip2: The data is subdivided into chunks whose uncompressed size is
+almost exactly the size of the bzip2 chunk for that compression
+setting. For example, with the -9 switch, each chunk is about 900000
+bytes long uncompressed. (More accurately, it is 899950 bytes long.)
+
 Example for an application which needs to seek: A CGI program which
 creates an image on the fly as it is being sent to a browser will need
 to seek to certain offsets in the image if it is to support HTTP 1.1
@@ -232,3 +240,6 @@ File format version history
 1.0 (jigdo-file/0.5.0): Initial format
 1.1 (jigdo-file/0.6.3): Format change in template files: New type 5
     obsoletes type 1. New type 6 obsoletes type 3.
+1.2 (jigdo-file/0.7.2): Format change in template files: In addition
+    to raw data that is gzipped ("DATA"), allow bzip2 ("BZIP") raw
+    data.
index e0dbf5d..b5b84c0 100644 (file)
@@ -1,8 +1,9 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
+Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
 <HTML>
  <HEAD>
   <TITLE>Debian Jigdo mini-HOWTO</TITLE><META NAME="GENERATOR"
-  CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD>
+  CONTENT="Modular DocBook HTML Stylesheet Version 1.79"></HEAD>
  <BODY CLASS="ARTICLE" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF"
   VLINK="#840084" ALINK="#0000FF">
   <DIV>
@@ -14,7 +15,7 @@
       <P><CODE>&#60;<A HREF="mailto:p@dirac.org">p@dirac.org</A
        >&#62;</CODE></P></DIV></DIV>
     <P>Copyright &copy; 2001 Peter Jay Salzman</P>
-    <P>2004-01-08 ver 1.1<BR></P>
+    <P>2005-06-13 ver 1.5a<BR></P>
     <DIV>
      <DIV><A NAME="AEN21"></A>
       <P><B>Abstract</B></P>
      <DT>6. <A HREF="#FAQ">Frequently Asked Questions</A></DT>
      <DD>
       <DL>
-       <DT>6.1. <A HREF="#USEPROXY">How do I make jigdo use my proxy?</A
+       <DT>6.1. <A HREF="#JIGDOASKSTWICE">Why does jidgo ask <SPAN><I
+        >twice</I></SPAN> for scanning for existing files? Is it enough to
+        say yes once ?</A></DT>
+       <DT>6.2. <A HREF="#PROBLEMFILES">Jigdo Seems To Have Problems
+        Downloading Certain Filenames.</A></DT>
+       <DT>6.3. <A HREF="#USEPROXY">How do I make jigdo use my proxy?</A
         ></DT>
-       <DT>6.2. <A HREF="#AEN312">Jigdo-lite fails with an error - have I
+       <DT>6.4. <A HREF="#AEN330">Jigdo-lite fails with an error - have I
         downloaded all those MBs in vain?</A></DT>
-       <DT>6.3. <A HREF="#DISACKNOWLEDGEMENTS">[11 Aug 2002]: Why aren't
+       <DT>6.5. <A HREF="#DISACKNOWLEDGEMENTS">[11 Aug 2002]: Why aren't
         the translations of this HOWTO on LDP?</A></DT>
-       <DT>6.4. <A HREF="#AEN347">jigdo takes a bit long to download the
+       <DT>6.6. <A HREF="#AEN365">jigdo takes a bit long to download the
         files because wget keeps disconnecting and then reconnecting to the
         FTP server for each file. Is there a way to make it faster?</A
         ></DT>
-       <DT>6.5. <A HREF="#INTERRUPTED">What do I do if my jigdo download
+       <DT>6.7. <A HREF="#INTERRUPTED">What do I do if my jigdo download
         gets interrupted?</A></DT>
-       <DT>6.6. <A HREF="#AEN354">My jigdo download won't complete because
+       <DT>6.8. <A HREF="#AEN372">My jigdo download won't complete because
         the .jigdo file is broken. When I download a new, fixed .jigdo
         file, do I need to download all the data over again?</A></DT>
-       <DT>6.7. <A HREF="#AEN362">Can I use jigdo to download images for
-        DVD?</A></DT>
-       <DT>6.8. <A HREF="#AEN367">Can I burn the <TT>.iso.tmp</TT> file to
+       <DT>6.9. <A HREF="#DVDSIZEDIMAGES">Can I use jigdo to download
+        images for DVD?</A></DT>
+       <DT>6.10. <A HREF="#AEN388">Can I burn the <TT>.iso.tmp</TT> file to
         CD?</A></DT>
-       <DT>6.9. <A HREF="#AEN374">Why doesn't jigdo work? It downloads some
-        packages and deletes them. I know it doesn't write them to the <TT
-        >iso.tmp</TT> file because the file size doesn't change!</A></DT>
-       <DT>6.10. <A HREF="#TROUBLEWITHJIGDOEASY">I'm having trouble getting
+       <DT>6.11. <A HREF="#AEN395">Why doesn't jigdo work? It downloads
+        some packages and deletes them. I know it doesn't write them to the
+        <TT>iso.tmp</TT> file because the file size doesn't change!</A
+        ></DT>
+       <DT>6.12. <A HREF="#TROUBLEWITHJIGDOEASY">I'm having trouble getting
         jigdo-easy to work.</A></DT>
-       <DT>6.11. <A HREF="#NEEDTOUPGRADE">[10 Feb 2003]: I'm having trouble
+       <DT>6.13. <A HREF="#NEEDTOUPGRADE">[10 Feb 2003]: I'm having trouble
         getting jigdo to download Sarge or Sid.</A></DT>
-       <DT>6.12. <A HREF="#WGETOPTIONS">Jigdo-lite is too verbose. How can
+       <DT>6.14. <A HREF="#SCANMULTIPLEIMAGES">For image updates, I want
+        jigdo-lite to scan 14 loop-mounted images in one go. How can I do
+        this?</A></DT>
+       <DT>6.15. <A HREF="#WGETOPTIONS">Jigdo-lite is too verbose. How can
         I supress some or all of its messages?</A></DT>
-       <DT>6.13. <A HREF="#OTHERPLATFORMS">Can I use jigdo on platforms
+       <DT>6.16. <A HREF="#OTHERPLATFORMS">Can I use jigdo on platforms
         other than Linux?</A></DT>
-       <DT>6.14. <A HREF="#AEN405">On MS Windows, why do I get a "<VAR>No
-        such file or directory</VAR>" error message?</A></DT>
-       <DT>6.15. <A HREF="#AEN411">On MS Windows, why won't my image grow
-        larger than 2GB?</A></DT></DL></DD>
+       <DT>6.17. <A HREF="#AEN442">On MS Windows, why do I get a "<TT>No
+        such file or directory</TT>" error message?</A></DT>
+       <DT>6.18. <A HREF="#AEN448">On MS Windows, why won't my image grow
+        larger than 2GB?</A></DT>
+       <DT>6.19. <A HREF="#AEN453">On MS Windows, <TT>jigdo-lite.bat</TT>
+        fails with an error message saying "sh" was not found.</A></DT
+       ></DL></DD>
      <DT>7. <A HREF="#ERRATA">Errata</A></DT>
      <DD>
       <DL>
        <DT>7.1. <A HREF="#JIGDO-EASY">jigdo-easy</A></DT>
-       <DT>7.2. <A HREF="#AEN422">GUI Interface</A></DT>
+       <DT>7.2. <A HREF="#AEN473">GUI Interface</A></DT>
        <DT>7.3. <A HREF="#JIGDO-FILE-CACHE">jigdo-file-cache.db</A></DT>
        <DT>7.4. <A HREF="#LINKS">Resources</A></DT></DL></DD></DL></DIV>
    <DIV>
       and <TT>file-3</TT> were contained in the ISO image. It removed the
       contents of the these files and replaced them with each file's md5
       checksum (the <TT>md5-0</TT>, <TT>md5-1</TT>, etc).</P>
-     <P>The "<VAR>x</VAR>" data (directory information, zero padding, etc)
+     <P>The "<TT>x</TT>" data (directory information, zero padding, etc)
       within the ISO image is compressed and written to the .template file.
       Finally, any files within the ISO image that weren't supplied as
       loose files (like <TT>file-2</TT>) are also compressed and written to
-      the .template file. This is shown as "<VAR>c</VAR>" data in the
+      the .template file. This is shown as "<TT>c</TT>" data in the
       .template file visualization.</P>
      <P>Loose files which were supplied to jigdo-file that aren't found in
       the ISO image (like <TT>file-4</TT>) are ignored.</P></DIV>
       the examples of this HOWTO.</P>
      <P>Note to Woody users: The version of jigdo-lite which comes with
       Woody (rev 1) is not capable of downloading Sarge or Sid. See <A
-      HREF="#NEEDTOUPGRADE">Section 6.11</A>. A bugfixed version of jigdo
+      HREF="#NEEDTOUPGRADE">Section 6.13</A>. A bugfixed version of jigdo
       0.6.5 was submitted for the future release of r2.</P></DIV>
     <DIV><HR>
      <H3><A NAME="DOWNLOADTHE.TEMPLATEAND.JIGDOFILES">4.2. Download The
       Merging parts from `file:' URIs, if any...
       Found 0 of the 826 files required by the template
       Will not create image or temporary file - try again with different input files
-      --09:35:12--  http://linux.csua.berkeley.edu/debian/pool/main/p/pack/pack_3.10-1_i386.deb
-          =&#62; `sarge-i386-1.iso.tmpdir/linux.csua.berkeley.edu/debian/pool/main/p/pack/pack_3.10-1_i386.deb
+      --09:35:12--  http://mirror/debian/pool/main/p/pack/pack_3.10-1_i386.deb
+          =&#62; `sarge-i386-1.iso.tmpdir/mirror/debian/pool/main/p/pack/pack_3.10-1_i386.deb
       Resolving linux.csua.berkeley.edu... done.
       Connecting to linux.csua.berkeley.edu[128.32.112.231]:80... connected.
       HTTP request sent, awaiting response... 200 OK
       19% [======&#62;                              ] 378,304      149.87K/s    ETA 00:09
       </PRE>
      <P>There'll be a lot of messages flying across your screen; if this is
-      confusing to you, see <A HREF="#WGETOPTIONS">Section 6.12</A>. While
+      confusing to you, see <A HREF="#WGETOPTIONS">Section 6.15</A>. While
       jigdo-lite is downloading the packages, switch to another console (or
       open another xterm) and do an <B>ls</B> in the directory you're
       running jigdo-lite in. Now there should be 6 files in the
       >sarge-i386-1.iso.tmp</TT> won't appear until the first time <TT
       >sarge-i386-1.iso.tmpdir/</TT> gets flushed.</P>
      <P><TT>jigdo-file-cache.db</TT> is a Berekeley DB file containing
-      md5sums of any files read in when you specify a directory at the <VAR
-      >Files to scan:</VAR> prompt. It's described in <A
+      md5sums of any files read in when you specify a directory at the <TT
+      >Files to scan:</TT> prompt. It's described in <A
       HREF="#JIGDO-FILE-CACHE">Section 7.3</A>.</P>
      <P>At this point, go play some Quake III because this will take some
       time (you may want to play on a different machine because jigdo is
     <P>jigdo-lite is asking us to give it the location of your mounted CD
      (if you're updating a CD) or your loop mounted ISO file (if you're
      using the ISO file). I'm using an ISO file loop mounted on <TT
-     >/mnt</TT>, so I'll enter <VAR>/mnt</VAR>. If you're updating a CD,
-     enter the mount directory of your CD, which is most likely <VAR
-     >/cdrom</VAR>. In either case, jigdo-lite will scan the directory of
+     >/mnt</TT>, so I'll enter <TT>/mnt</TT>. If you're updating a CD,
+     enter the mount directory of your CD, which is most likely <TT
+     >/cdrom</TT>. In either case, jigdo-lite will scan the directory of
      your mounted media, determine which files need updating and re-use the
      files which don't need updating. You may see something like:</P><PRE>      Files to scan: /mnt/other
       
      Jigdo-lite wants to generate a file called <TT>woody-i386-1.iso</TT>
      but there's already a file by that name in the current directory (the
      outdated image). Jigdo-lite doesn't want to destroy that file, so it
-     bails and lets me know that I can either delete that file or use <VAR
-     >--force</VAR> to overwrite the file. You could also rename or move
-     the file too, but I guess jigdo-lite assumes we already know this.
-     &nbsp; :-)</P>
+     bails and lets me know that I can either delete that file or use <TT
+     >--force</TT> to overwrite the file. You could also rename or move the
+     file too, but I guess jigdo-lite assumes we already know this. &nbsp;
+     :-)</P>
     <P>Don't be timid about moving or renaming the image file just because
      it's loop mounted. The filesystem uses inodes under the hood, and even
      if you move or rename the file, the inode stays the same. You won't
       Found 1200 of the 1224 files required by the template                          
       ...</PRE>
     <P>jigdo-lite remembers that I wanted to scan <TT>/mnt</TT> and tells
-     me I can either type <VAR>1</VAR> to scan that directory or type the
+     me I can either type <TT>1</TT> to scan that directory or type the
      directory in again. Since I'm a perverse person, I type the name of
      the directory again.</P>
     <P>The ellipsis represent some text that changes rapidly. The first
      please <A HREF="mailto:p@dirac.org" TARGET="_top">contact me</A> and
      let me know so I can remove the question from the mini-HOWTO.</P>
     <DIV><HR>
-     <H3><A NAME="USEPROXY">6.1. How do I make jigdo use my proxy?</A></H3
+     <H3><A NAME="JIGDOASKSTWICE">6.1. Why does jidgo ask <SPAN><I
+      >twice</I></SPAN> for scanning for existing files? Is it enough to
+      say yes once ?</A></H3>
+     <P>It keeps asking this as long as you enter a path to scan. The idea
+      is that you may want to scan several old CDs, so you can insert one
+      after the other into the drive and keep supplying the path "<TT
+      >D:\</TT>" (or whatever). </P></DIV>
+    <DIV><HR>
+     <H3><A NAME="PROBLEMFILES">6.2. Jigdo Seems To Have Problems
+      Downloading Certain Filenames.</A></H3>
+     <P>When downloading Debian images under Windows, jigdo-lite may appear
+      to have trouble downloading one or more of the following files:</P><PRE>      libbusiness-onlinepayment-bankofamerica-perl_xxx_all.deb
+      libbusiness-onlinepayment-authorizenet-perl_xxx_all.deb
+      libbusiness-onlinepayment-payconnect-perl_xxx_all.deb
+      libmasonx-request-withapachesession-perl_xxx_all.deb
+      libtemplate-plugin-calendar-simple-perl_xxx_all.deb
+      </PRE>
+     <P>Move the jigdo download directory up by as many directories as
+      possible, closer to the drives's root directory.</P>
+     <P>The NTFS filesystem has a 255 character limit on a file's pathname.
+      When jigdo-lite downloads files from the internet, it makes a copy of
+      the server directory structure in its download directory. With their
+      very long names, the above Debian packages may exceed the allowed
+      path length, which leads to error messages like "<TT>Cannot write to
+      `[very long pathname]' (No such file or directory)</TT>".</P>
+     <P>Some people may now wonder: Why does jigdo-lite use wget's "<TT
+      >--force-directories</TT>" switch, which creates these problematic
+      directory hierarchies?</P>
+     <P>Early versions of jigdo-lite did not use it, but then some folks
+      requested that jigdo-lite always use the "<TT>--continue</TT>" switch
+      to avoid half-downloaded .deb files being ignored and deleted when
+      you interrupt and restart jigdo-lite.</P>
+     <P>Unfortunately, it turned out that this led to problems: The Debian
+      servers contained several identically named files (e.g. "<TT
+      >root.bin</TT>") in different directories, and if you interrupted
+      jigdo-lite at roughly the right time during the download, the chances
+      were high that the resumed download would append data to the wrong
+      half-downloaded file, corrupting it and making the entire jigdo
+      download fail.</P></DIV>
+    <DIV><HR>
+     <H3><A NAME="USEPROXY">6.3. How do I make jigdo use my proxy?</A></H3
      >
      <P>Load the file <TT>~/.jigdo-lite</TT> (or <TT
       >jigdo-lite-settings.txt</TT> for the Microsoft Windows version) into
-      a text editor and find the line that starts with "<VAR>wgetOpts</VAR
+      a text editor and find the line that starts with "<TT>wgetOpts</TT
       >". The following switches can be added to the line:</P><PRE>      -e ftp_proxy=http://LOCAL-PROXY:PORT/
       -e http_proxy=http://LOCAL-PROXY:PORT/
       --proxy-user=USER
      <P>Of course, substitute the correct values for your proxy server. The
       last two options are only necessary if your proxy uses password
       authentication. The switches need to be added to the end of the
-      wgetOpts line before the final <VAR>'</VAR> character. All options
-      must be on one line.</P>
-     <P>Alternatively, under Linux you can also set up the <VAR
-      >ftp_proxy</VAR> and <VAR>http_proxy</VAR> environment variables, for
-      example in the file <TT>/etc/environment</TT> or <TT>~/.bashrc</TT
-      >.</P></DIV>
+      wgetOpts line before the final <TT>'</TT> character. All options must
+      be on one line.</P>
+     <P>Alternatively, under Linux you can also set up the <CODE
+      >ftp_proxy</CODE> and <CODE>http_proxy</CODE> environment variables,
+      for example in the file <TT>/etc/environment</TT> or <TT
+      >~/.bashrc</TT>.</P></DIV>
     <DIV><HR>
-     <H3><A NAME="AEN312">6.2. Jigdo-lite fails with an error - have I
+     <H3><A NAME="AEN330">6.4. Jigdo-lite fails with an error - have I
       downloaded all those MBs in vain?</A></H3>
      <P>Of course this Should Not Happen(tm), but for various reasons you
-      may end up in a state where a large "<VAR>.iso.tmp</VAR>" file has
+      may end up in a state where a large "<TT>.iso.tmp</TT>" file has
       already been generated and jigdo-lite appears to have problems,
       telling you repeatedly to try restarting the download. There are
       several possible things to try in this case:</P>
       TARGET="_top">testing</A> images, then determine the correct path and
       filename. Directory listings can be obtained with commands like <B
       >rsync rsync://cdimage.debian.org/debian-cd/</B>.</P>
-     <P>Next, remove the "<VAR>.tmp</VAR>" extension from jigdo-lite's
+     <P>Next, remove the "<TT>.tmp</TT>" extension from jigdo-lite's
       temporary file by renaming it, and pass both the remote URL and the
       local filename to rsync: <B>rsync
       rsync://server.org/path/binary-i386-1.iso binary-i386-1.iso</B> You
-      may want to use rsync's <VAR>--verbose</VAR> and <VAR
-      >--progress</VAR> switches to get status messages, and <VAR
-      >--block-size=8192</VAR> to increase its speed.</P></LI><LI>
+      may want to use rsync's <TT>--verbose</TT> and <TT>--progress</TT>
+      switches to get status messages, and <TT>--block-size=8192</TT> to
+      increase its speed.</P></LI><LI>
      <P>If all else fails, your downloaded data is still not lost. Under
-      Linux, you can loop-mount the <VAR>.tmp</VAR> file to access the
+      Linux, you can loop-mount the <TT>.tmp</TT> file to access the
       packages that were already downloaded, and reuse them for generating
       an image from a newer jigdo file (such as the latest daily testing
       snapshot if your failed download was also a testing snapshot). To do
       and enter the path of the mnt directory at the "Files to scan"
       prompt.</P></LI></UL></DIV>
     <DIV><HR>
-     <H3><A NAME="DISACKNOWLEDGEMENTS">6.3. [11 Aug 2002]: Why aren't the
+     <H3><A NAME="DISACKNOWLEDGEMENTS">6.5. [11 Aug 2002]: Why aren't the
       translations of this HOWTO on LDP?</A></H3>
      <P>I've been having trouble getting the translations of this HOWTO
       submitted to the non-English LDP editors.</P>
       HREF="http://www.dirac.org/linux/debian/jigdo" TARGET="_top"
       >http://www.dirac.org/linux/debian/jigdo</A>.</P></DIV>
     <DIV><HR>
-     <H3><A NAME="AEN347">6.4. jigdo takes a bit long to download the files
+     <H3><A NAME="AEN365">6.6. jigdo takes a bit long to download the files
       because wget keeps disconnecting and then reconnecting to the FTP
       server for each file. Is there a way to make it faster?</A></H3>
      <P>The download speed can be increased by using an HTTP instead of an
       speeds can only be achieved with HTTP pipelining - the jigdo GUI
       application will support pipelining.</P></DIV>
     <DIV><HR>
-     <H3><A NAME="INTERRUPTED">6.5. What do I do if my jigdo download gets
+     <H3><A NAME="INTERRUPTED">6.7. What do I do if my jigdo download gets
       interrupted?</A></H3>
      <P>If your download gets interrupted, all you need to do is restart
       jigdo-lite and hit &lt;ENTER&gt; at all the question prompts.
       Jigdo-lite will pick up where it left off.</P></DIV>
     <DIV><HR>
-     <H3><A NAME="AEN354">6.6. My jigdo download won't complete because the
+     <H3><A NAME="AEN372">6.8. My jigdo download won't complete because the
       .jigdo file is broken. When I download a new, fixed .jigdo file, do I
       need to download all the data over again?</A></H3>
      <P>You may find that the .jigdo file you downloaded is broken. It's
       .iso.tmp file so it doesn't interfere with jigdo-lite which will want
       to create a new .iso.tmp file.</P></DIV>
     <DIV><HR>
-     <H3><A NAME="AEN362">6.7. Can I use jigdo to download images for
-      DVD?</A></H3>
+     <H3><A NAME="DVDSIZEDIMAGES">6.9. Can I use jigdo to download images
+      for DVD?</A></H3>
      <P>Absolutely; the process is identical to downloading CD images. The
       only thing you need to do differently is to download the .jigdo and
       .template files for DVDs instead of CDs. You can find the DVD .jigdo
       and .template files at <A HREF="http://www.debian.org/CD/jigdo-cd/"
       TARGET="_top">http://www.debian.org/CD/jigdo-cd/</A>.</P>
-     <P>Note that you need Linux 2.4 or later to create DVD-sized files.
-      Under Windows, DVD-sized images can't be created at all at the moment
-      because the C++ library of the mingw gcc port doesn't have big file
-      support yet.</P></DIV>
+     <P>On Linux, you need kernel 2.4 or later to create DVD-sized
+      files.</P>
+     <P>Under MS Windows, you need to use <TT>jigdo-win-0.7.1a</TT>
+      (released 21 July 2004) or later to create DVD-sized images. This is
+      because of a bug in the large file support of Mingw32, the compiler
+      used to create the MS Windows executables. The bug got fixed on this
+      date, and <TT>jigdo-win-0.7.1a</TT> was released.</P></DIV>
     <DIV><HR>
-     <H3><A NAME="AEN367">6.8. Can I burn the <TT>.iso.tmp</TT> file to
+     <H3><A NAME="AEN388">6.10. Can I burn the <TT>.iso.tmp</TT> file to
       CD?</A></H3>
      <P>Thanks to Gordon Huff and David Anselmi, we now know the answer is
       "yes you can". But more importantly, Gordon gave a good reason why
       you'd want to do this in the first place. Paraphrasing Gordon:</P><A
-     NAME="AEN371"></A><BLOCKQUOTE>
+     NAME="AEN392"></A><BLOCKQUOTE>
      <P>My friend's Win98 has a *nice* cable connection. I arrive in the
       morning, start jigdo (more than one, actually) and then we go to the
       store, tie back the kiwi plant, put up the Christmas lights and
       get home, I use the iso's that didn't finish to update my jigdo setup
       at home which is a dial-up.</P></BLOCKQUOTE></DIV>
     <DIV><HR>
-     <H3><A NAME="AEN374">6.9. Why doesn't jigdo work? It downloads some
+     <H3><A NAME="AEN395">6.11. Why doesn't jigdo work? It downloads some
       packages and deletes them. I know it doesn't write them to the <TT
       >iso.tmp</TT> file because the file size doesn't change!</A></H3>
      <P>Jigdo works just fine - the .iso.tmp file is created at the
       beginning with its final size, but filled with zero bytes. Later,
       parts of it are overwritten with the downloaded data.</P>
      <P>You can tell that jigdo is making progress by looking at the
-      messages "<VAR>Found X of the Y files required by the template</VAR
-      >" that are printed from time to time. The second value "<VAR>Y</VAR
-      >" should decrease. When it reaches zero, the download is
+      messages "<TT>Found X of the Y files required by the template</TT>"
+      that are printed from time to time. The first value "<TT>X</TT>"
+      should increase. When <TT>X</TT> equals <TT>Y</TT>, the download is
       finished.</P></DIV>
     <DIV><HR>
-     <H3><A NAME="TROUBLEWITHJIGDOEASY">6.10. I'm having trouble getting
+     <H3><A NAME="TROUBLEWITHJIGDOEASY">6.12. I'm having trouble getting
       jigdo-easy to work.</A></H3>
      <P>See <A HREF="#JIGDO-EASY">Section 7.1</A>.</P></DIV>
     <DIV><HR>
-     <H3><A NAME="NEEDTOUPGRADE">6.11. [10 Feb 2003]: I'm having trouble
+     <H3><A NAME="NEEDTOUPGRADE">6.13. [10 Feb 2003]: I'm having trouble
       getting jigdo to download Sarge or Sid.</A></H3>
      <P>If you're using Potato or Woody: because of a change in jigdo, the
       version of jigdo-lite that comes with Potato and Woody (r0 and r1)
       your problem, you should send them a request for help (<A
       HREF="#LINKS">Section 7.4</A>).</P></DIV>
     <DIV><HR>
-     <H3><A NAME="WGETOPTIONS">6.12. Jigdo-lite is too verbose. How can I
+     <H3><A NAME="SCANMULTIPLEIMAGES">6.14. For image updates, I want
+      jigdo-lite to scan 14 loop-mounted images in one go. How can I do
+      this?</A></H3>
+     <P>When updating CD images, it's tiresome to keep loop-mounting and
+      unmounting images. However, by default the Linux kernel only supports
+      eight loop devices, and jigdo-lite's menu of previously entered paths
+      only has five entries.</P>
+     <P>To scan many loop-mounted images, you must first tell the Linux
+      kernel to support more than the default eight devices. This is done
+      by giving the "<TT>max_loop</TT>" parameter to the module when
+      loading it, e.g. with "<TT>modprobe loop max_loop=16</TT>" on the
+      command line or by adding the line "<TT>options loop max_loop=16</TT
+      >" to <TT>/etc/modules.conf</TT>. In Debian, you must put this line
+      into a file named e.g. <TT>/etc/modutils/local-loop</TT> and then run
+      <B>update-modules</B> because direct changes to <TT
+      >/etc/modules.conf</TT> will be overwritten.</P>
+     <P>Having mounted the individual images, you can pass the parent
+      directory of their mount points to jigdo-lite for scanning. For
+      example, if the images are mounted under <TT
+      >/mnt/myloopmounts/image1/</TT> etc., pass "<TT
+      >/mnt/myloopmounts</TT>" as the path to scan. If passing the parent
+      directory is inconvenient, you can also create a directory and fill
+      it with symlinks to the mount points.</P></DIV>
+    <DIV><HR>
+     <H3><A NAME="WGETOPTIONS">6.15. Jigdo-lite is too verbose. How can I
       supress some or all of its messages?</A></H3>
      <P>Jigdo-lite uses wget, and wget's output can be quite verbose. If
-      this is unsettling, you can make wget more quiet by adding <VAR
-      >--non-verbose</VAR> to the <VAR>wgetOpts</VAR> switch in your <TT
+      this is unsettling, you can make wget more quiet by adding <TT
+      >--non-verbose</TT> to the <TT>wgetOpts</TT> switch in your <TT
       >~/.jigdo-lite</TT> file. If you want wget to print no messages at
-      all, use <VAR>--quiet</VAR> in the <VAR>wgetOpts</VAR> switch.</P
-     ></DIV>
+      all, use <TT>--quiet</TT> in the <TT>wgetOpts</TT> switch.</P></DIV>
     <DIV><HR>
-     <H3><A NAME="OTHERPLATFORMS">6.13. Can I use jigdo on platforms other
+     <H3><A NAME="OTHERPLATFORMS">6.16. Can I use jigdo on platforms other
       than Linux?</A></H3>
      <P>Certainly. If you're interested in Potato or Woody under Microsoft
       Windows, old SunOS, HP-UX and IRIX you can use jigdo-easy. See <A
       downloaded from the main jigdo site (<A HREF="#LINKS">Section 7.4</A
       >).</P></DIV>
     <DIV><HR>
-     <H3><A NAME="AEN405">6.14. On MS Windows, why do I get a "<VAR>No such
-      file or directory</VAR>" error message?</A></H3>
+     <H3><A NAME="AEN442">6.17. On MS Windows, why do I get a "<TT>No such
+      file or directory</TT>" error message?</A></H3>
      <P>You might find that under MS Windows, jigdo-lite will download some
-      files but then fail to read their contents, which will produce a
-      "<VAR>No such file or directory</VAR>" error message. </P>
+      files but then fail to read their contents, which will produce a "<TT
+      >No such file or directory</TT>" error message. </P>
      <P>It seems that this occurs if the length of the filenames that jigdo
       processes exceeds a certain limit. The solution is to move the
       half-finished download up in the directory hierarchy, closer to the
       top-level directory of the drive.</P></DIV>
     <DIV><HR>
-     <H3><A NAME="AEN411">6.15. On MS Windows, why won't my image grow
+     <H3><A NAME="AEN448">6.18. On MS Windows, why won't my image grow
       larger than 2GB?</A></H3>
-     <P>When creating DVD images under Microsoft Windows with jigdo-win,
-      you should be aware that there's a 2GB filesize limit. This is due to
-      the C++ library of mingw32 compiler which is used to compile
-      jigdo-win. Apparently, the library doesn't have big file support due
-      to some oversight of its developers. This means the 2GB filesize
-      limit exists even under NTFS.</P>
-     <P>It's hoped that this limitation will be corrected with a future
-      release of ming32.</P></DIV></DIV>
+     <P>You're using an old version of jigdo. Please upgrade to <TT
+      >jigdo-win-0.7.1a </TT> or newer. See <A HREF="#DVDSIZEDIMAGES"
+      >Section 6.9</A>.</P></DIV>
+    <DIV><HR>
+     <H3><A NAME="AEN453">6.19. On MS Windows, <TT>jigdo-lite.bat</TT>
+      fails with an error message saying "sh" was not found.</A></H3>
+     <P>This means that the <TT>PATH</TT> command in the <TT>.bat</TT> file
+      failed. For some reason, this is the case if you unpacked jigdo on a
+      Windows network share using a path like "<TT
+      >\\SomeServer\Files\jigdo</TT>". Solution: Use "<B>Map network
+      drive</B>" (in the explorer "tools" menu) to assign a drive letter
+      like "<TT>Z:</TT>", then double-click on the <TT>.bat</TT> file
+      inside "<TT>Z:\jigdo</TT>". Alternatively, a workaround is to move
+      everything in the <TT>jigdo-bin</TT> subdirectory up to where the <TT
+      >.bat</TT> file is.</P></DIV></DIV>
    <DIV><HR>
     <H2><A NAME="ERRATA">7. Errata</A></H2>
     <DIV>
       but because of changes made to Jigdo, will only work with Potato and
       Woody. Jigdo-easy will not be able to download Sarge and Sid. See <A
       HREF="#LINKS">Section 7.4</A> and <A HREF="#OTHERPLATFORMS">Section
-      6.13</A>.</P></DIV>
+      6.16</A>.</P></DIV>
     <DIV><HR>
-     <H3><A NAME="AEN422">7.2. GUI Interface</A></H3>
+     <H3><A NAME="AEN473">7.2. GUI Interface</A></H3>
      <P>A GTK+ interface to jigdo is currently being worked on. It's not
       fully functional yet, but will be available at some point. There will
       be a Linux as well as a Windows GUI client.</P></DIV>
     <DIV><HR>
      <H3><A NAME="JIGDO-FILE-CACHE">7.3. jigdo-file-cache.db</A></H3>
      <P>The cache contains the md5sums of files read when you supply a
-      directory at the <VAR>Files to scan:</VAR> prompt. If you have
+      directory at the <TT>Files to scan:</TT> prompt. If you have
       jigdo-file scan the same directory a second time, the scan will be
       very fast.</P>
      <P>This could be useful in the following case: rev0 gets updated to
       rev1. With the rev1 CD images, some packages may have been pushed
-      from CD <VAR>n</VAR> to CD <VAR>n+1</VAR>, or vice versa. If you had
-      particularly slow link (e.g. modem), you'd try to avoid downloading
+      from CD <TT>n</TT> to CD <TT>n+1</TT>, or vice versa. If you had a
+      particularly slow link (e.g. modem), you'd try to avoid downloading
       these packages again. For this reason, when downloading the new
-      version of CD <VAR>n</VAR>, you'd let jigdo-lite scan the three CDs
-      <VAR>n-1</VAR>, <VAR>n</VAR> and <VAR>n+1</VAR> (or even all 8 CDs if
-      you want to be 100% sure).</P>
+      version of CD <TT>n</TT>, you'd let jigdo-lite scan the three CDs <TT
+      >n-1</TT>, <TT>n</TT> and <TT>n+1</TT> (or even all 8 CDs if you want
+      to be 100% sure).</P>
      <P>If you have jigdo-lite scan the same CDs over and over again while
       updating each of the 8 CD images, the cache will prevent all the data
       on the CDs from being read multiple times.</P>
         >http://packages.debian.org/testing/utils/jigdo-file.html</A></DT>
        <DD>
         <P>If you're using Potato or Woody, please upgrade jigdo-file to
-         version <VAR>0.7.0-2</VAR>, which comes with testing or unstable
-         (<A HREF="#NEEDTOUPGRADE">Section 6.11</A>).</P></DD>
+         version <TT>0.7.0-2</TT>, which comes with testing or unstable (<A
+          HREF="#NEEDTOUPGRADE">Section 6.13</A>).</P></DD>
        <DT><A HREF="http://lists.debian.org/search.html" TARGET="_top"
         >http://lists.debian.org/search.html</A></DT>
        <DD>
index 71eb472..5802809 100644 (file)
@@ -21,7 +21,7 @@
        </author>
 
        <!--     year-month-day            -->
-       <pubdate>2004-01-08 ver 1.1</pubdate>
+       <pubdate>2005-06-13 ver 1.5a</pubdate>
 
        <copyright>
                <year>2001</year>
       Merging parts from `file:' URIs, if any...
       Found 0 of the 826 files required by the template
       Will not create image or temporary file - try again with different input files
-      --09:35:12--  http://linux.csua.berkeley.edu/debian/pool/main/p/pack/pack_3.10-1_i386.deb
-          => `sarge-i386-1.iso.tmpdir/linux.csua.berkeley.edu/debian/pool/main/p/pack/pack_3.10-1_i386.deb
+      --09:35:12--  http://mirror/debian/pool/main/p/pack/pack_3.10-1_i386.deb
+          => `sarge-i386-1.iso.tmpdir/mirror/debian/pool/main/p/pack/pack_3.10-1_i386.deb
       Resolving linux.csua.berkeley.edu... done.
       Connecting to linux.csua.berkeley.edu[128.32.112.231]:80... connected.
       HTTP request sent, awaiting response... 200 OK
 
 
 
+
 <sect1 id="faq"><title>Frequently Asked Questions</title>
 
   <para>Questions prepended with a date indicate a time sensitive question (a question that relates
   so I can remove the question from the mini-HOWTO.</para>
 
 
+    <sect2 id="jigdoaskstwice"><title>Why does jidgo ask <emphasis>twice</emphasis> for scanning
+    for existing files?  Is it enough to say yes once ?</title>
+
+      <para>It keeps asking this as long as you enter a path to scan. The idea is that you may want
+      to scan several old CDs, so you can insert one after the other into the drive and keep
+      supplying the path "<literal>D:\</literal>" (or whatever).
+
+    </sect2>
+
+
+
+    <sect2 id="problemfiles"><title>Jigdo Seems To Have Problems Downloading Certain Filenames.</title>
+
+      <para>When downloading Debian images under Windows, jigdo-lite may appear to have trouble
+      downloading one or more of the following files:</para>
+
+      <screen>
+      libbusiness-onlinepayment-bankofamerica-perl_xxx_all.deb
+      libbusiness-onlinepayment-authorizenet-perl_xxx_all.deb
+      libbusiness-onlinepayment-payconnect-perl_xxx_all.deb
+      libmasonx-request-withapachesession-perl_xxx_all.deb
+      libtemplate-plugin-calendar-simple-perl_xxx_all.deb
+      </screen>
+
+      <para>Move the jigdo download directory up by as many directories as possible, closer to the
+      drives's root directory.</para>
+
+      <para>The NTFS filesystem has a 255 character limit on a file's pathname.  When jigdo-lite
+      downloads files from the internet, it makes a copy of the server directory structure in its
+      download directory.  With their very long names, the above Debian packages may exceed the
+      allowed path length, which leads to error messages like "<literal>Cannot write to `[very long
+      pathname]' (No such file or directory)</literal>".</para>
+
+
+      <para>Some people may now wonder: Why does jigdo-lite use wget's
+      "<literal>--force-directories</literal>" switch, which creates these problematic directory
+      hierarchies?</para>
+
+      <para>Early versions of jigdo-lite did not use it, but then some folks requested that
+      jigdo-lite always use the "<literal>--continue</literal>" switch to avoid half-downloaded
+      .deb files being ignored and deleted when you interrupt and restart jigdo-lite.</para>
+
+      <para>Unfortunately, it turned out that this led to problems: The Debian servers contained
+      several identically named files (e.g. "<literal>root.bin</literal>") in different directories,
+      and if you interrupted jigdo-lite at roughly the right time during the download, the chances
+      were high that the resumed download would append data to the wrong half-downloaded file,
+      corrupting it and making the entire jigdo download fail.</para>
+
+    </sect2>
+
+
 
     <sect2 id="useproxy"><title>How do I make jigdo use my proxy?</title>
 
 
 
 
-               <sect2><title>Can I use jigdo to download images for DVD?</title>
+               <sect2 id="dvdsizedimages"><title>Can I use jigdo to download images for DVD?</title>
 
       <para>Absolutely; the process is identical to downloading CD images.  The only thing you need
       to do differently is to download the .jigdo and .template files for DVDs instead of CDs.  You
       can find the DVD .jigdo and .template files at <ulink
       url="http://www.debian.org/CD/jigdo-cd/">http://www.debian.org/CD/jigdo-cd/</ulink>.</para>
 
-      <para>Note that you need Linux 2.4 or later to create DVD-sized files.  Under Windows,
-      DVD-sized images can't be created at all at the moment because the C++ library of the mingw
-      gcc port doesn't have big file support yet.</para>
+      <para>On Linux, you need kernel 2.4 or later to create DVD-sized files.</para>
+      
+      <para>Under MS Windows, you need to use <literal>jigdo-win-0.7.1a</literal> (released 21 July
+      2004) or later to create DVD-sized images.  This is because of a bug in the large file support
+      of Mingw32, the compiler used to create the MS Windows executables.  The bug got fixed on this
+      date, and <literal>jigdo-win-0.7.1a</literal> was released.</para>
 
                </sect2>
 
 
       <para>You can tell that jigdo is making progress by looking at the messages "<literal>Found X
       of the Y files required by the template</literal>" that are printed from time to time.  The
-      second value "<literal>Y</literal>" should decrease.  When it reaches zero, the download is
-      finished.</para>
+      first value "<literal>X</literal>" should increase.  When <literal>X</literal> equals
+      <literal>Y</literal>, the download is finished.</para>
 
                </sect2>
 
 
 
 
+    <sect2 id="scanmultipleimages"><title>For image updates, I want jigdo-lite to scan 14
+    loop-mounted images in one go.  How can I do this?</title>
+
+      <para>When updating CD images, it's tiresome to keep loop-mounting and unmounting images.
+      However, by default the Linux kernel only supports eight loop devices, and jigdo-lite's menu
+      of previously entered paths only has five entries.</para>
+
+      <para>To scan many loop-mounted images, you must first tell the Linux kernel to support more
+      than the default eight devices.  This is done by giving the "<literal>max_loop</literal>"
+      parameter to the module when loading it, e.g. with "<literal>modprobe loop
+      max_loop=16</literal>" on the command line or by adding the line "<literal>options loop
+      max_loop=16</literal>" to <filename>/etc/modules.conf</filename>.  In Debian, you must put
+      this line into a file named e.g. <filename>/etc/modutils/local-loop</filename> and then run
+      <command>update-modules</command> because direct changes to
+      <filename>/etc/modules.conf</filename> will be overwritten.</para>
+
+      <para>Having mounted the individual images, you can pass the parent directory of their mount
+      points to jigdo-lite for scanning.  For example, if the images are mounted under <filename
+      role="directory">/mnt/myloopmounts/image1/</filename> etc., pass "<filename
+      role="directory">/mnt/myloopmounts</filename>" as the path to scan.  If passing the parent
+      directory is inconvenient, you can also create a directory and fill it with symlinks to the
+      mount points.</para>
+
+    </sect2>
+
+
+
                <sect2 id="wgetoptions"><title>Jigdo-lite is too verbose.  How can I supress some or all of its messages?</title>
 
       <para>Jigdo-lite uses wget, and wget's output can be quite verbose.  If this is unsettling,
 
     <sect2><title>On MS Windows, why won't my image grow larger than 2GB?</title>
 
-      <para>When creating DVD images under Microsoft Windows with jigdo-win, you should be aware
-      that there's a 2GB filesize limit.  This is due to the C++ library of mingw32 compiler which
-      is used to compile jigdo-win.  Apparently, the library doesn't have big file support due to
-      some oversight of its developers.  This means the 2GB filesize limit exists even under
-      NTFS.</para>
+      <para>You're using an old version of jigdo.  Please upgrade to
+      <literal>jigdo-win-0.7.1a </literal> or newer.  See <xref linkend="dvdsizedimages">.</para>
+
+    </sect2>
+
 
-      <para>It's hoped that this limitation will be corrected with a future release of ming32.</para>
+    <sect2><title>On MS Windows, <filename>jigdo-lite.bat</filename> fails with an error message
+    saying "sh" was not found.</title>
+
+      <para>This means that the <literal>PATH</literal> command in the <literal>.bat</literal> file failed.  For some
+      reason, this is the case if you unpacked jigdo on a Windows network share using a path like
+      "<filename role="directory">\\SomeServer\Files\jigdo</filename>".  Solution: Use "<command>Map
+      network drive</command>" (in the explorer "tools" menu) to assign a drive letter like
+      "<literal>Z:</literal>", then double-click on the <literal>.bat</literal> file inside
+      "<literal>Z:\jigdo</literal>".  Alternatively, a workaround is to move
+      everything in the <filename role="directory">jigdo-bin</filename> subdirectory up to where the
+      <literal>.bat</literal> file is.</para>
 
     </sect2>
 
 
+
 </sect1>
 
 
index 4369eed..93a723d 100644 (file)
@@ -3,7 +3,7 @@
 .\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
 .\" Please send any bug reports, improvements, comments, patches, 
 .\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "JIGDO-FILE" "1" "20 June 2004" "" ""
+.TH "JIGDO-FILE" "1" "10 July 2005" "" ""
 
 .SH NAME
 jigdo-file \- Prepare files for Jigsaw Download (distribution of huge files, e.g. CD images).
@@ -27,7 +27,7 @@ jigdo tries to ensure that the large file (always called
 \fIimage\fR from now on) is downloaded in small
 parts which can be stored on different servers. People who want to
 download the image do so by telling the \fBjigdo\fR(1) \fB(NOT IMPLEMENTED YET)\fR
-download tool to process one `\fI.jigdo\fR' file;
+download tool to process one `\fI\&.jigdo\fR\&' file;
 using it, \fBjigdo\fR downloads the parts and
 reassembles the image. \fBjigdo-file\fR is used to
 prepare the files for download.
@@ -54,7 +54,7 @@ directories on different servers (e.g. because of
 storage/bandwidth constraints), but this is invisible to the
 people downloading your image. The information about available
 servers only needs to be added to the
-`\fI.jigdo\fR' file by you before distributing
+`\fI\&.jigdo\fR\&' file by you before distributing
 it.
 .PP
 The `DETAILS' section below contains technical details on
@@ -114,21 +114,21 @@ of \fB-i\fR \fB-j\fR
 deduced from the one you specify. This is done by first
 stripping any extension from the supplied name and then
 appending nothing (if deducing \fB--image\fR),
-`\fI.jigdo\fR' or
-`\fI.template\fR'.
+`\fI\&.jigdo\fR\&' or
+`\fI\&.template\fR\&'.
 .TP
 \fB-r --report=default|noprogress|quiet|grep\fR
 Control how verbose the program is, and what format
 the output has: \fBnoprogress\fR is the same as
 \fBdefault\fR except that no `x%
-done' progress messages are printed.
+done\&' progress messages are printed.
 \fBquiet\fR restricts the output to what is
 absolutely necessary, mostly error messages.
 \fBgrep\fR is only different from
 \fBdefault\fR for the
 \fBmake-template\fR command: It enables output
 in a simple `\fI<offset>
-<file>\fR' format which is useful when
+<file>\fR\&' format which is useful when
 searching for binary files in other binary files.
 .TP
 \fB-f --force\fR
@@ -185,7 +185,7 @@ reading from the file.
 
 \fBfind\fR(1) is a powerful tool for generating file
 lists, but make sure to use `\fBfind -type
-f\fR' if possible - otherwise, if you instruct
+f\fR\&' if possible - otherwise, if you instruct
 \fBfind\fR to output both a filename and a
 symlink to that filename, \fBjigdo-file\fR will
 read the file contents twice.
@@ -194,10 +194,10 @@ read the file contents twice.
 Output checksums in hexadecimal instead of Base64-like
 format. This should not be used with the
 \fBmake-template\fR command, because the
-resulting `\fI.jigdo\fR' file violates the
-`\fI.jigdo\fR' file format. Its intended use
+resulting `\fI\&.jigdo\fR\&' file violates the
+`\fI\&.jigdo\fR\&' file format. Its intended use
 is to make \fBjigdo-file\fR more interoperable
-with other Unix shell utilities like \fBmd5sum\fR(1).
+with other Unix shell utilities like \fBmd5sum\fR(1)\&.
 .TP
 \fB--no-hex\fR
 \fBThis is the default.\fR Use jigdo's
@@ -230,7 +230,7 @@ stands for a file whose name is a single hyphen.
 .SH "COMMANDS"
 .PP
 The command name is the first non-option argument passed to
-\fBjigdo-file\fR. Most commands have short
+\fBjigdo-file\fR\&. Most commands have short
 abbreviations as well as long names. \fBThe short command
 names should not be used in scripts - there may be incompatible
 changes to them in the future!\fR
@@ -238,12 +238,12 @@ changes to them in the future!\fR
 .PP
 Reads \fIimage\fR and
 \fIFILES\fR, creates
-`\fI.jigdo\fR' and
-`\fI.template\fR'. This is the main functionality
-of \fBjigdo-file\fR.
+`\fI\&.jigdo\fR\&' and
+`\fI\&.template\fR\&'. This is the main functionality
+of \fBjigdo-file\fR\&.
 .PP
 It is possible to specify both \fB--image=-\fR
-and \fB--files-from=-\fR. In this case, first the
+and \fB--files-from=-\fR\&. In this case, first the
 list of files is read from standard input until an empty line is
 encountered. Everything following it is assumed to be the image
 data. This can be useful if you use \fBmkisofs\fR(1) or similar programs that can output the complete
@@ -251,18 +251,18 @@ image on their standard output, because there is no need to
 store the image on disc temporarily.
 .PP
 If a \fIFILES\fR argument contains
-the characters `//' (Unix) or
-`\\.\\' (Windows), this has special meaning. In
+the characters `//\&' (Unix) or
+`\\.\\\&' (Windows), this has special meaning. In
 the final jigdo file that users will download, each of the parts
-is referenced in the `[Parts]' section with a
+is referenced in the `[Parts]\&' section with a
 URI of the form `Label:some/filename'. (See `FORMAT OF .JIGDO
 FILES' below for a detailed description.) The
-`[Servers]' section gives a mapping of labels
+`[Servers]\&' section gives a mapping of labels
 to servers on the internet, with lines like
 `Label=http://myserver.org/jigdofiles/'. Using this information,
 \fBjigdo\fR will create the final download URI for
 the part, `http://myserver.org/jigdofiles/some/filename'.
-Specifying `//' (or `\\.\\')
+Specifying `//\&' (or `\\.\\\&')
 in a file or directory name serves to `cut off' the names at the
 right directory level. For example, if the Unix path of one of
 your \fIFILES\fR is `/path/some/filename',
@@ -275,7 +275,7 @@ possible.
 \fB--label \fILabel=/path\fB\fR
 Specify a name to use as the label name for a path
 on disc. (Influences the output jigdo file.) If you used
-`//' in the
+`//\&' in the
 \fIFILES\fR arguments as described
 above, \fBjigdo-file\fR will by default pick
 label names automatically (`A', `B' etc.). With this
@@ -292,18 +292,18 @@ names like `http', `ftp'.
 By default, using \fB--label\fR as
 described above will cause lines of the form
 `Label=file:/path/' to be written to the
-`[Servers]' section of the output jigdo
+`[Servers]\&' section of the output jigdo
 file. If you want to override the `file:' URI so that the
 line reads `Label=http://some.server.org/', you can do so
 by specifying \fB--uri\fR along with
-\fB--label\fR. Giving just \fB--uri
+\fB--label\fR\&. Giving just \fB--uri
 \fILabel=...\fB\fR without the
 corresponding \fB--label
 \fILabel=...\fB\fR has no
 effect, and even if you specify both, an entry is only
-added to the `[Servers]' section if the
+added to the `[Servers]\&' section if the
 label is referenced by at least one
-`[Parts]' entry.
+`[Parts]\&' entry.
 
 The supplied value is not quoted by the program; if
 it contains characters such as space or any of the
@@ -318,24 +318,30 @@ option is ignored if it is already present in the output
 jigdo file.
 
 Users of the Windows version may notice that the
-`\\' directory separators are converted
-into `/' in the `file:' URIs that are
+`\\\&' directory separators are converted
+into `/\&' in the `file:' URIs that are
 generated by default. This is done to increase
 cross-platform compatibility of `file:' - the
 \fBprint-missing\fR command of the Windows
 version will automatically re-convert the characters when
 it prints the URIs. In case you supply your own `file:'
 URIs under Windows using \fB--uri\fR, you must
-also exchange `/' and
-`\\'.
+also exchange `/\&' and
+`\\\&'.
 .TP
 \fB-0 to -9\fR
 Set amount of compression in the output template
 file, from \fB-0\fR (no compression) to
 \fB-9\fR (maximum compression). The default is
 \fB-9\fR, which can make the template
-generation quite slow. The compression algorithm used is
-the same as for \fBgzip\fR(1).
+generation quite slow. By default, the compression
+algorithm used is the same as for \fBgzip\fR(1)\&.
+.TP
+\fB--gzip and --bzip2\fR
+Choose between the gzip and bzip2 compression
+algorithms. The default is gzip. Bzip2 usually gives
+a better compression ratio, but compression is
+significantly slower than with gzip.
 .TP
 \fB--min-length=\fIBYTES\fB\fR
 Set minimum length of a part for
@@ -346,7 +352,7 @@ template file. The search algorithm used requires such a
 minimum length, otherwise template generation could become
 extremely slow. If you know for sure that all your
 \fIFILES\fR are larger than a certain
-amount, you can increase \fBjigdo-file\fR's
+amount, you can increase \fBjigdo-file\fR\&'s
 speed slightly by specifying the amount with this option.
 There is a hard-wired absolute minimum of 256 bytes -
 anything lower will silently be set to 256.
@@ -354,15 +360,15 @@ anything lower will silently be set to 256.
 \fB--merge=\fIFILE\fB\fR
 Include the contents of
 \fIFILE\fR in the output
-`\fI.jigdo\fR' file. The file can contain
+`\fI\&.jigdo\fR\&' file. The file can contain
 data which you want added to the output (for example, a
-`[Servers]' section with a list of your
+`[Servers]\&' section with a list of your
 servers as entries), or it can be the jigdo file output by
-an earlier run of \fBjigdo-file\fR.
+an earlier run of \fBjigdo-file\fR\&.
 
 It is possible to specify the same file for input
 with \fB--merge\fR and for output with
-\fB--jigdo\fR. However, you will also need to
+\fB--jigdo\fR\&. However, you will also need to
 use \fB--force\fR to make the program overwrite
 the old version of the jigdo file with the new one.
 \fIFILE\fR can be `-' for standard
@@ -370,62 +376,62 @@ input.
 
 When \fBadding\fR new information to
 the supplied file, \fBjigdo-file\fR will not
-insert new lines into the `[Parts]'
+insert new lines into the `[Parts]\&'
 section if an entry for the same MD5 checksum (but not
 necessarily with the same URI!) already exists, and it
 will not insert new lines into the
-`[Servers]' section if a completely
+`[Servers]\&' section if a completely
 identical entry already exists.
 
 When \fBreading in\fR the existing
 \fIFILE\fR, the behaviour is slightly
 different: The program \fBpreserves\fR
-entries in the `[Parts]' section with
+entries in the `[Parts]\&' section with
 identical checksum, but different URIs. For completely
 identical entries (same checksum and URI), only one entry
 is preserved and the duplicates are removed. The
-`[Servers]' section is left
+`[Servers]\&' section is left
 untouched.
 .TP
 \fB--image-section\fR
 \fBThis is the default.\fR Causes
 \fBjigdo-file\fR to add an
-`[Image]' section to the
-`\fI.jigdo\fR' file.
+`[Image]\&' section to the
+`\fI\&.jigdo\fR\&' file.
 
-As an exception, a new `[Image]'
+As an exception, a new `[Image]\&'
 section is \fBnot\fR added if you use
 \fB--merge\fR and the file to merge contains an
-`[Image]' section with a line which
-reads `Template-MD5Sum=' (end of line
+`[Image]\&' section with a line which
+reads `Template-MD5Sum=\&' (end of line
 after the `='). In this case, the generated template
 data's MD5 checksum value is just added after the `=' of
 the first line of this form in the file - no whole new
-`[Image]' section is appended. This
+`[Image]\&' section is appended. This
 behaviour is useful because it allows you to pass via
-\fB--merge\fR an `[Image]'
+\fB--merge\fR an `[Image]\&'
 section with arbitrary content and then have the MD5
 checksum automatically added by
-\fBjigdo-file\fR. The section `FORMAT OF
-\&.JIGDO FILES' below explains the
-`[Image]' section contents in greater
+\fBjigdo-file\fR\&. The section `FORMAT OF
+.JIGDO FILES' below explains the
+`[Image]\&' section contents in greater
 detail.
 .TP
 \fB--no-image-section\fR
 Do \fBnot\fR include an
-`[Image]' section in the
-`\fI.jigdo\fR' file. You need to add one
+`[Image]\&' section in the
+`\fI\&.jigdo\fR\&' file. You need to add one
 yourself if you use this option. However, doing that is
 not easy (you also need to add a
-`Template-MD5Sum' line with the correct
+`Template-MD5Sum\&' line with the correct
 checksum, or \fBjigdo\fR will complain), so
 use of this option is discouraged.
 .TP
 \fB--servers-section\fR
 \fBThis is the default.\fR Causes
 \fBjigdo-file\fR to add a
-`[Servers]' section to the
-`\fI.jigdo\fR' file. This default section
+`[Servers]\&' section to the
+`\fI\&.jigdo\fR\&' file. This default section
 uses `file:' URIs, which allows for immediate reassembly
 of the image from the local filesystem, and is also useful
 if you want to edit the file manually and replace the
@@ -433,8 +439,8 @@ if you want to edit the file manually and replace the
 .TP
 \fB--no-servers-section\fR
 Do \fBnot\fR add a
-`[Servers]' section at the end of the
-`\fI.jigdo\fR' file. Useful e.g. if you are
+`[Servers]\&' section at the end of the
+`\fI\&.jigdo\fR\&' file. Useful e.g. if you are
 going to append the section with a script.
 .TP
 \fB--match-exec=\fISHELLCOMMAND\fB\fR
@@ -443,15 +449,15 @@ supplied command string by passing it to a shell.
 \fBjigdo-file\fR sets up a number of
 environment variables with information about the file
 match. For example, if the file
-`\fI/path//a/b/file\fR' was found in the
+`\fI/path//a/b/file\fR\&' was found in the
 image and `Label:a/b/file' is going to be written to the
-`\fI.jigdo\fR' file:
+`\fI\&.jigdo\fR\&' file:
 .RS
 .TP 0.2i
 \(bu
 \fBLABEL\fR="Label" - Name of the label for the file. The example assumes
 that `\fB--label\fR
-Label=/path' was specified by you.
+Label=/path\&' was specified by you.
 In the absence of such an option, \fBLABEL\fR
 will be set but empty.
 .TP 0.2i
@@ -459,8 +465,8 @@ will be set but empty.
 \fBLABELPATH\fR="/path/" - The path corresponding to the label,
 or in other words, the prefix of the matched file's
 path that will \fBnot\fR appear in the
-output `\fI.jigdo\fR' file. Is set even
-without any `\fB--label\fR' option present.
+output `\fI\&.jigdo\fR\&' file. Is set even
+without any `\fB--label\fR\&' option present.
 Ends with a slash.
 .TP 0.2i
 \(bu
@@ -479,7 +485,7 @@ matched file, in Base64-like format.
 \(bu
 \fBFILE\fR="/path//a/b/file" - For convenience, the
 complete path of the file. The variable is always set
-to $LABELPATH$MATCHPATH$LEAF.
+to $LABELPATH$MATCHPATH$LEAF\&.
 .RE
 
 Please be careful to correctly quote the string
@@ -493,25 +499,50 @@ files, use the following option:
 By default, no command is executed. Use
 --match-exec="" to remove a command string which was set
 with an earlier use of this option.
+.TP
+\fB--greedy-matching\fR
+\fBThis is the default.\fR Imagine
+that your image contains a \fI\&.tar\fR file
+which in turn contains another file
+\fIx\fR, and that you provide both the
+\fI\&.tar\fR and the files inside it on the
+command line. When \fBjigdo-file\fR scans the
+image, it encounters the beginning of the
+\fI\&.tar\fR file, and then the file
+\fIx\fR\&.
+
+At this point, a decision must be made: Should the
+smaller file \fIx\fR be recorded as
+matched, or should it be ignored in favour of the larger
+(and thus better) match of the \fI\&.tar\fR
+file? Unfortunately, at this point it is not clear
+whether there will actually be a full match of the
+\fI\&.tar\fR, so by default, the program
+prefers the small match.
+.TP
+\fB--no-greedy-matching\fR
+In the case where a large partial match is present
+and a shorter match has been confirmed, ignore the small
+match. (See the option above.)
 .SS "MAKE-IMAGE, MI"
 .PP
-Reads `\fI.template\fR' and
+Reads `\fI\&.template\fR\&' and
 \fIFILES\fR, creates
 \fIimage\fR (or
-`\fIimagename.tmp\fR'). Provides a rudimentary
+`\fIimagename.tmp\fR\&'). Provides a rudimentary
 way of reassembling images - \fBjigdo\fR is usually
 better suited for this task. However, in contrast to
-\fBjigdo\fR, no `\fI.jigdo\fR' file
+\fBjigdo\fR, no `\fI\&.jigdo\fR\&' file
 is required.
 .PP
 If the image is to be written to a file (and not to
 standard output), it is possible to create the image in several
 steps, with several invocations of `\fBjigdo-file
-make-image\fR', as follows: You first invoke
+make-image\fR\&', as follows: You first invoke
 \fBjigdo-file\fR, specifying as many files as are
 available at this time. The program scans the files, and those
 that are contained in the image are copied to a temporary file,
-whose name is formed by appending `\fI.tmp\fR' to
+whose name is formed by appending `\fI\&.tmp\fR\&' to
 the image filename.
 .PP
 For all further files which could be parts of the image,
@@ -546,9 +577,9 @@ checked later with the \fBverify\fR
 command.
 .SS "PRINT-MISSING, PM"
 .PP
-Reads `\fI.jigdo\fR',
-`\fI.template\fR' and (if present)
-`\fIimagename.tmp\fR', outputs a list of URIs
+Reads `\fI\&.jigdo\fR\&',
+`\fI\&.template\fR\&' and (if present)
+`\fIimagename.tmp\fR\&', outputs a list of URIs
 still needed to completely reassemble the image.
 .PP
 Together with the \fBmake-image\fR command,
@@ -557,27 +588,27 @@ this provides most of the functionality of
 .PP
 For each part that is not yet present in the temporary
 image file, the file checksum is looked up in the
-`[Parts]' section of the jigdo file. Any
+`[Parts]\&' section of the jigdo file. Any
 label in the corresponding entry is then expanded according to
-the label definitions in the `[Servers]'
+the label definitions in the `[Servers]\&'
 section and printed on standard output. \fBjigdo\fR
 allows you to specify several alternative locations for each
 label in this section, but \fBprint-missing\fR will
 only output the first one for each missing part.
 .PP
 If the checksum cannot be found in the
-`[Parts]' section (this Should Not Happen
+`[Parts]\&' section (this Should Not Happen
 unless you deleted that section), a lookup is instead made for
-`MD5Sum:\fI<checksum>\fR', just like
-with \fBjigdo\fR. (Thus, if you want to get rid of
-the `[Parts]' section, you can do so if you
+`MD5Sum:\fI<checksum>\fR\&', just like
+with \fBjigdo\fR\&. (Thus, if you want to get rid of
+the `[Parts]\&' section, you can do so if you
 rename each part to its own checksum.)
 .TP
 \fB--uri \fILabel=http://some.server.org/\fB\fR
 Override the entries in the
-`\fI.jigdo\fR' file for any label with a
+`\fI\&.jigdo\fR\&' file for any label with a
 URI of your choice. With the example above, a
-`[Parts]' entry of
+`[Parts]\&' entry of
 `Label:some/filename' will cause the line
 `http://some.server.org/some/filename' to be
 printed.
@@ -597,12 +628,12 @@ image. However, \fBall\fR alternative download
 locations are printed instead of just one. In the output, the
 URIs for a file are separated from other files' URIs with blank
 lines. The \fB--uri\fR option has the same effect as
-for \fBprint-missing\fR.
+for \fBprint-missing\fR\&.
 .SS "VERIFY, VER"
 .PP
 Reads \fIimage\fR (presumably
 generated with \fBmake-image\fR) and
-`\fI.template\fR', checks for correct checksum of
+`\fI\&.template\fR\&', checks for correct checksum of
 image.
 .PP
 The template data does not only contain checksums of the
@@ -616,13 +647,25 @@ Reads all the \fIFILES\fR and enters
 them into the cache, unless they are already cached. The
 \fB--cache\fR option must be present for this
 command.
+.TP
+\fB--no-scan-whole-file\fR
+\fBThis is the default.\fR This only
+causes the first \fB--md5-block-size\fR bytes
+of each file to be read. If the cache is used later by
+\fBjigdo-file make-image\fR, the rest of the
+file will be read once these first bytes are recognized in
+the input image.
+.TP
+\fB--scan-whole-file\fR
+Immediately read the entire file contents and store
+them in the cache.
 .SS "MD5SUM, MD5"
 .PP
 Reads all the \fIFILES\fR and prints
 out MD5 checksums of their contents. This command is quite
 similar to \fBmd5sum\fR(1), except that the checksum is output in the
 Base64-like encoding which is also used elsewhere by
-\fBjigdo-file\fR.
+\fBjigdo-file\fR\&.
 .PP
 The \fIFILES\fR arguments are
 processed in the same way as with the other commands, which
@@ -632,13 +675,13 @@ except when the file(s) they point to are not reachable
 directly.
 .PP
 In the checksum list printed on standard output, only the
-part of the filename following any `//' (or
-`\\.\\' on Windows) is printed. Any
+part of the filename following any `//\&' (or
+`\\.\\\&' on Windows) is printed. Any
 \fB--cache\fR will be used for querying files' MD5
 checksums and/or writing the checksums of scanned files.
 .SS "LIST-TEMPLATE, LS"
 .PP
-Reads a `\fI.template\fR' file and outputs
+Reads a `\fI\&.template\fR\&' file and outputs
 low-level information about the image and all parts contained in
 it, including offset, length and checksum.
 .PP
@@ -651,7 +694,7 @@ to the image and parts that haven't.
 The exact output format may change incompatibly between
 different jigdo releases. The following different types of lines
 can be output. `have-file' only occurs for
-`\fI.tmp\fR' files, indicating a file that has
+`\fI\&.tmp\fR\&' files, indicating a file that has
 already been successfully written to the temporary file:
 
 .nf
@@ -676,8 +719,8 @@ parts.
 When \fBjigdo-file\fR is given a number of
 files that might be contained in an image, it detects whether any
 of the files are present using a `rolling checksum' inspired by
-the one used by \fBrsync\fR(1). The resulting data is
-written to the `\fI.template\fR' file: If a section
+the one used by \fBrsync\fR(1)\&. The resulting data is
+written to the `\fI\&.template\fR\&' file: If a section
 of the image could not be matched (e.g. it was directory
 information), the data is compressed and written directly to the
 template. However, if a matching file was found, its data is
@@ -687,7 +730,7 @@ checksum of the file) is inserted in the template.
 Note that the template data only contains binary data, it
 does not contain any filenames or URIs, since it cannot be easily
 edited in case any of these values need to be changed. All that
-information is stored in the `\fI.jigdo\fR' file, a
+information is stored in the `\fI\&.jigdo\fR\&' file, a
 text file to which you can add URLs for your server(s). The jigdo
 file provides a mapping for each MD5 checksum to one or more
 alternative download locations for the corresponding part.
@@ -696,53 +739,58 @@ Apart from the mapping of MD5 sums to URIs, the jigdo file
 also contains an URI pointing to a download location for the
 template file. This way, the \fBjigdo\fR download
 tool only needs to be given one URI (that of the
-`\fI.jigdo\fR' file) to be able to download and
+`\fI\&.jigdo\fR\&' file) to be able to download and
 reassemble the complete image.
 .SH "FORMAT OF .JIGDO FILES"
 .PP
-The overall format of `\fI.jigdo\fR' files
-follows that of `\fI.ini\fR' files, as also used by
+The overall format of `\fI\&.jigdo\fR\&' files
+follows that of `\fI\&.ini\fR\&' files, as also used by
 the Gnome and KDE projects for some data. The file is organized
 into sections, each of which is preceded by a line reading
-`[Sectionname]'. Within each section, lines
+`[Sectionname]\&'. Within each section, lines
 have the form `Label=Value'. Such lines are also called `entries'
-below. All `\fI.jigdo\fR' files use UTF-8 as their
+below. All `\fI\&.jigdo\fR\&' files use UTF-8 as their
 character encoding.
 .PP
-Comments are introduced with the `#'
+Comments are introduced with the `#\&'
 character and extend to the end of the line. Whitespace is ignored
 at line start and end as well as to the left and right of section
-names and the `=' in entries. Furthermore, the
+names and the `=\&' in entries. Furthermore, the
 jigdo utilities split up the text of the entry value (i.e. the
-part after the `=') into whitespace-separated
-words, much like the Unix shell. Single '' and
+part after the `=\&') into whitespace-separated
+words, much like the Unix shell. Single \&'' and
 double "" quotes can be used to prevent that
 e.g. URIs containing whitespace are split apart. Similarly,
 characters with special meaning (the characters
 \&'"#\\ and space/tab) must be quoted with
 \\ to appear in the value. As with the shell,
-there is a difference between '\~' and
-"\~": Within '\~',
+there is a difference between \&'\~\&' and
+"\~": Within \&'\~\&',
 the characters "#\\ and whitespace lose their
 special meaning and become ordinary characters, whereas within
 "\~", only the characters
 \&'# and whitespace lose their special meaning -
 in other words, backslash escapes still work inside
 "\~", but not
-\&'\~'.
+\&'\~\&'\&.
 .PP
-`\fI.jigdo\fR' files can optionally be
-compressed with \fBgzip\fR(1). \fBjigdo-file\fR always outputs
-uncompressed files, which you can compress yourself. 
+`\fI\&.jigdo\fR\&' files can optionally be
+compressed with \fBgzip\fR(1)\&. \fBjigdo-file\fR always outputs
+uncompressed files, which you can compress yourself.
 \fBjigdo-lite\fR supports single uncompressed and
-compressed files. \fBjigdo\fR additionally supports
+compressed files.
+.PP
+(Behaviour which may change in the future and which should
+not be relied upon: \fBjigdo\fR additionally supports
 any number of concatenated plaintext and gzipped parts in the
 files - for example, you can compress a
-`\fI.jigdo\fR' file and then add a couple of lines
-of uncompressed data to the end. In all cases, the
-`\fI.gz\fR' extension should be removed from the
-filename - the tools will determine automatically from the file
-contents whether a file is compressed or not.
+`\fI\&.jigdo\fR\&' file and then add a couple of lines
+of uncompressed data to the end.)
+.PP
+In all cases, the `\fI\&.gz\fR\&' extension
+should be removed from the filename - the tools will determine
+automatically from the file contents whether a file is compressed
+or not.
 .PP
 Below is a description of the individual section names used
 by jigdo.
@@ -756,7 +804,7 @@ Generator=jigdo-file/1.0.0
 .PP
 Information about the version of the jigdo file format
 used, and the program that generated it. There should be one
-such section per `\fI.jigdo\fR' file.
+such section per `\fI\&.jigdo\fR\&' file.
 .SS "IMAGE SECTION"
 
 .nf
@@ -770,22 +818,22 @@ Info=\fIlong description (5000 characters max.)\fR
 .PP
 The value for the `Template' entry can be either an URL
 (absolute or relative to the URL of the jigdo file) or a string
-of the form `\fILabel\fR:\fIpathname\fR' (\fBUNIMPLEMENTED\fR),
+of the form `\fILabel\fR:\fIpathname\fR\&' (\fBUNIMPLEMENTED\fR),
 as described below.
 .PP
 The `Template-MD5Sum' entry is added by
 \fBjigdo-file\fR and specifies the MD5 checksum of
-the generated `\fI.template\fR' file. It is used
+the generated `\fI\&.template\fR\&' file. It is used
 by \fBjigdo\fR to detect cases where the downloaded
 template data is corrupted or belongs to a different
 image.
 .PP
 Unlike other entry values, the values of the
-`ShortInfo' and `Info'
+`ShortInfo\&' and `Info\&'
 entries are \fBnot\fR split up into words,
 instead all quoting is preserved.
 .PP
-The value of the `Info' entry is
+The value of the `Info\&' entry is
 special in that \fBjigdo\fR(1) can optionally parse XML markup it contains. If
 the markup has errors such as unbalanced/unsupported tags, the
 string is displayed literally, without XML parsing. Supported
@@ -796,19 +844,19 @@ tags are <b></b> (bold),
 <big></big> (larger font),
 <small></small> (smaller font)
 and <br/> (linebreak). Supported
-entities include &lt; (`<'),
-&gt; (`>') and
-&amp; (`&'). Note that the whole
-`Info' entry must be on one line in the jigdo
+entities include &lt; (`<\&'),
+&gt; (`>\&') and
+&amp; (`&\&'). Note that the whole
+`Info\&' entry must be on one line in the jigdo
 file.
 .PP
 This section may occur multiple times, but all except the
 first one will be ignored. This is useful e.g. when creating a
-`\fI.jigdo\fR' file for a DVD image when you
-already have `\fI.jigdo\fR' files for CDs with
-the same content: You can simply `[Include]'
+`\fI\&.jigdo\fR\&' file for a DVD image when you
+already have `\fI\&.jigdo\fR\&' files for CDs with
+the same content: You can simply `[Include]\&'
 (see below) the CDs' jigdo files at the end of the DVD jigdo
-file, after its `[Image]' section.
+file, after its `[Image]\&' section.
 .SS "PARTS SECTION"
 
 .nf
@@ -821,34 +869,34 @@ kyfebwu6clbYqqWUdFIyaw=LabelB:some/path/part2
 .PP
 All lines in the section, which provides the mapping from
 MD5 checksums to URIs, have the same format: On the left side of
-the `=' the checksum (encoded with a
+the `=\&' the checksum (encoded with a
 Base64-like encoding) is given, and on the right a string
 corresponding to the part with this checksum; either a complete
-URI or a string of the form `\fILabel\fR:\fIpathname\fR', which is expanded into
+URI or a string of the form `\fILabel\fR:\fIpathname\fR\&', which is expanded into
 one or more URIs by looking up the definition(s) for the
 \fILabel\fR in the
-`[Servers]' section.
+`[Servers]\&' section.
 .PP
 In case a particular MD5 checksum cannot be found in any
-`[Parts]' section by
+`[Parts]\&' section by
 \fBjigdo\fR, the program will perform a lookup for
-`MD5Sum:\fI<checksum>\fR', e.g. for
-`MD5Sum:xJNkjrq8NYMraeGavUpllw' if you
+`MD5Sum:\fI<checksum>\fR\&', e.g. for
+`MD5Sum:xJNkjrq8NYMraeGavUpllw\&' if you
 deleted the line for `part0' above.
 .PP
 A checksum appearing multiple times in this section
 indicates alternative download locations for the part.
 .PP
-There may be any number of `[Parts]'
+There may be any number of `[Parts]\&'
 sections in the file; they are all considered when looking up
 MD5 checksums.
 .PP
 \fBjigdo-file\fR always puts the
-`[Parts]' section at the end of the file, and
+`[Parts]\&' section at the end of the file, and
 it even rearranges any file specified with
 \fB--merge\fR to have only one such section at the
 end. This is done to allow \fBjigdo\fR to display
-the information from the `[Image]' section
+the information from the `[Image]\&' section
 while the rest of that file is still being downloaded.
 .SS "SERVERS SECTION"
 
@@ -862,27 +910,27 @@ LabelC=http://some.where.com/jigdo/
 .PP
 All lines in the section, which provides the mapping from
 server labels to server locations, have the same format: On the
-left side of the `=' the label name is given,
+left side of the `=\&' the label name is given,
 and on the right the value to expand the label name to.
 .PP
 A label name appearing multiple times in this section
 indicates alternative download locations for the parts that use
-the label in the `[Parts]' section. This
+the label in the `[Parts]\&' section. This
 notation makes it very easy to add mirrors to the jigdo
 file.
 .PP
 As shown by the example above, the label values may
 themselves reference other labels. In this case, the entry
-`LabelB:some/path/part2' in the `[Parts]'
+`LabelB:some/path/part2' in the `[Parts]\&'
 section will expand to
 `http://some.where.com/jigdo/subdirectory/some/path/part2'.
 Loops in the label definitions result in undefined behaviour and
 must be avoided.
 .PP
-There may be any number of `[Servers]'
+There may be any number of `[Servers]\&'
 sections in the file; they are all considered when looking up
-labels. Either of `[Parts]' or
-`[Servers]', but not both, can be omitted
+labels. Either of `[Parts]\&' or
+`[Servers]\&', but not both, can be omitted
 from the jigdo file.
 .SS "COMMENT SECTION"
 
@@ -891,8 +939,8 @@ from the jigdo file.
 Any text, except that lines must not begin with `['.
 .fi
 .PP
-All text following a `[Comment]' or
-`[comment]' line is ignored, up to the next
+All text following a `[Comment]\&' or
+`[comment]\&' line is ignored, up to the next
 line with a section label.
 .SS "INCLUDE DIRECTIVE"
 
@@ -903,45 +951,48 @@ line with a section label.
 Lines of this form cause the content of the specified
 jigdo file to be downloaded and parsed just like the main jigdo
 file. The effect will be the same as copying the included file's
-contents into the file which contains the include directive.
+contents into the file which contains the include
+directive. (Exception: Any relative URLs are always resolved
+using the URL of the `\fI\&.jigdo\fR\&' file that
+contains that relative URL.)
 .PP
 The URL argument can be an absolute or relative URL. 
 Relative URLs are assumed to be relative to the URL of the jigdo
 file which contains the include directive. Includes can be
 nested, but it is an error to create a loop of include
 directives. It is \fBnot\fR possible to use URLs
-of the form `\fILabel\fR:\fIpathname\fR'.
+of the form `\fILabel\fR:\fIpathname\fR\&'.
 .PP
 The URL cannot be quoted with "". Any
-`]' characters in the argument must be
-escaped as `%5D', and any spaces as
-`%20'.
+`]\&' characters in the argument must be
+escaped as `%5D\&', and any spaces as
+`%20\&'.
 .PP
 Include directives are only supported by
 \fBjigdo\fR, they are ignored by
-\fBjigdo-lite\fR.
+\fBjigdo-lite\fR\&.
 .PP
 An include directive terminates any previous section, but
 it does not start a new one. In other words, a new section must
 always be started after the include line,
 \fBjigdo\fR does not allow normal entries to appear
-below the `[Include]'.
+below the `[Include]\&'.
 .SH "CACHE FILES"
 .PP
 Any file specified with the \fB--cache\fR option
 is used to store information about the
 \fIFILES\fR presented to
-\fBjigdo-file\fR. When querying the cache, a file is
+\fBjigdo-file\fR\&. When querying the cache, a file is
 considered unchanged (and the cached data is used) only if
 filename, file size and last modification time (mtime) match
 exactly. For the filename match, not the entire file name is used,
-but only the part following any `//', so that
-any changes to the part before the `//' will
+but only the part following any `//\&', so that
+any changes to the part before the `//\&' will
 not invalidate the cache.
 .PP
 Old cache entries are removed from the cache if they have
 not been read from or written to for the amount of time specified
-with \fB--cache-expiry\fR. Entries are
+with \fB--cache-expiry\fR\&. Entries are
 \fBnot\fR immediately removed from the cache if the
 file they refer to no longer exists - this makes it possible to
 cache information about files on removable media.
@@ -963,7 +1014,7 @@ everything will have to be regenerated) or use the utilities
 accompanying libdb3 to dump and restore the database, with a
 command like `\fBdb3_dump
 \fIold-cache.db\fB | db3_load
-\fInew-cache.db\fB\fR'. For Debian, these programs are supplied in the
+\fInew-cache.db\fB\fR\&'. For Debian, these programs are supplied in the
 package `libdb3-util'.
 .PP
 If a different \fB--md5-block-size\fR is
@@ -975,8 +1026,8 @@ re-read.
 .SS "PREPARING YOUR CD IMAGE FOR DISTRIBUTION"
 .PP
 You have created a CD image
-`\fIimage.iso\fR' from some of the files stored
-in the directory `\fI/home/ftp\fR' on your
+`\fIimage.iso\fR\&' from some of the files stored
+in the directory `\fI/home/ftp\fR\&' on your
 harddisc, which is also available online as `ftp://mysite.org'.
 As you don't want to waste space by effectively hosting the same
 data twice (once as files on the FTP server, once inside the
@@ -1003,29 +1054,29 @@ template file needs to be accessible as
 .PP
 Note that nothing prevents you from doing the same for an
 FTP server that isn't administrated by you - in that case, you
-only need to host the `\fI.jigdo\fR' and
-`\fI.template\fR' files on your own
+only need to host the `\fI\&.jigdo\fR\&' and
+`\fI\&.template\fR\&' files on your own
 server/homepage.
 .SS "PREPARING AN ARBITRARY LARGE FILE FOR DISTRIBUTION"
 .PP
 We assume that you have a large file that is not a
-filesystem, e.g. `\fImovie.mpeg\fR'. Because of
+filesystem, e.g. `\fImovie.mpeg\fR\&'. Because of
 space problems, you want to distribute the data on two
 servers.
 .PP
 In this case, the parts of the image need to be generated
 artificially with the \fBsplit\fR command. For
 example, to create chunks of 4MB each, use `\fBsplit -b 4m
-movie.mpeg part\fR'. Copy the resulting files
-`\fIpartXX\fR' into
-two directories `\fI1\fR' and
-`\fI2\fR' that you create, according to how you
+movie.mpeg part\fR\&'. Copy the resulting files
+`\fIpartXX\fR\&' into
+two directories `\fI1\fR\&' and
+`\fI2\fR\&' that you create, according to how you
 want the files distributed between the servers. Next, create the
 jigdo and template files with `\fBjigdo-file make-template
---image=movie.mpeg 1// 2//\fR'. You will need to edit the
-`\fI.jigdo\fR' file and provide the right URIs
+--image=movie.mpeg 1// 2//\fR\&'. You will need to edit the
+`\fI\&.jigdo\fR\&' file and provide the right URIs
 for the two servers that you are going to upload the
-`\fIpartXX\fR' files
+`\fIpartXX\fR\&' files
 to.
 .SS "CUSTOMIZED VERSIONS OF IMAGES"
 .PP
@@ -1034,12 +1085,12 @@ part of an image if necessary, jigdo is very flexible. Only one
 example is the possibility of customized versions of images:
 Suppose that someone is distributing a CD image, and that you
 want to make a few small changes to it and redistribute your own
-version. You download the `\fIofficial.iso\fR' CD
+version. You download the `\fIofficial.iso\fR\&' CD
 image with \fBjigdo\fR (passing it the URL of
-`\fIofficial.jigdo\fR'), write it to CD-R, make
+`\fIofficial.jigdo\fR\&'), write it to CD-R, make
 your changes (say, adding files from the
-`\fImyfiles\fR' directory on your harddisc) and
-produce your own version, `\fImyversion.iso\fR'.
+`\fImyfiles\fR\&' directory on your harddisc) and
+produce your own version, `\fImyversion.iso\fR\&'.
 Next, you instruct \fBjigdo-file\fR to create the
 jigdo and template files for your modified image, using the
 command
@@ -1051,23 +1102,23 @@ command
 My=myfiles/ --uri My=http://my.homepage.net/
 --merge=official.jigdo\fR
 .RE
-while `\fIofficial.iso\fR' is mounted under
-`\fI/mnt/cdrom\fR'. By using
+while `\fIofficial.iso\fR\&' is mounted under
+`\fI/mnt/cdrom\fR\&'. By using
 \fB--merge\fR, you have told
 \fBjigdo-file\fR to take the contents of
-`\fIofficial.jigdo\fR', add to it a new
-`[Image]' section for
-`\fImyversion.iso\fR' and write the resulting
-jigdo file to `\fImyversion.jigdo\fR' - so now
-`\fImyversion.jigdo\fR' offers two images for
+`\fIofficial.jigdo\fR\&', add to it a new
+`[Image]\&' section for
+`\fImyversion.iso\fR\&' and write the resulting
+jigdo file to `\fImyversion.jigdo\fR\&' - so now
+`\fImyversion.jigdo\fR\&' offers two images for
 download, the original version and your modified version. (If
 you do not want it to offer the official version, edit it and
-remove the `[Image]' section that lists
-`\fIofficial.iso\fR'.)
+remove the `[Image]\&' section that lists
+`\fIofficial.iso\fR\&'.)
 .PP
-Now you can upload the `\fI.jigdo\fR' file,
-the `\fI.template\fR' file and also the files in
-`\fImyfiles\fR' to `http://my.homepage.net/'.
+Now you can upload the `\fI\&.jigdo\fR\&' file,
+the `\fI\&.template\fR\&' file and also the files in
+`\fImyfiles\fR\&' to `http://my.homepage.net/'.
 Thus, for people to download your modified image, you do
 \fBnot\fR need to upload the complete image
 contents to your web space, but only the changes you
@@ -1101,20 +1152,20 @@ restriction cannot be avoided because the program could become
 very slow otherwise. If you use the \fB--debug\fR
 option, all instances of \fBjigdo-file\fR discarding
 possible matches are indicated by lines containing the word
-`DROPPED'.
+`DROPPED\&'.
 .PP
 In fact, not only all-zeroes files trigger this behaviour,
 but also files which contain at their start a long sequence of
 short identical strings. For example, both a file containing only
-`a' characters and one containing
-`abcabcabcabc...' are problematic.
+`a\&' characters and one containing
+`abcabcabcabc\&...' are problematic.
 .SH "SEE ALSO"
 .PP
 \fBjigdo\fR(1) (NOT YET IMPLEMENTED),
 \fBjigdo-lite\fR(1),
 \fBjigdo-mirror\fR(1),
-\fBsplit\fR(1) (or `\fBinfo split\fR'),
-\fBfind\fR(1) (or `\fBinfo find\fR'),
+\fBsplit\fR(1) (or `\fBinfo split\fR\&'),
+\fBfind\fR(1) (or `\fBinfo find\fR\&'),
 \fBmkisofs\fR(1),
 \fBmd5sum\fR(1)
 .SH "AUTHOR"
index 2d381a5..c0ab729 100644 (file)
@@ -1,8 +1,9 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
+Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
 <HTML>
  <HEAD>
   <TITLE>jigdo-file</TITLE><META NAME="GENERATOR" CONTENT="Modular DocBook
-  HTML Stylesheet Version 1.7"></HEAD>
+  HTML Stylesheet Version 1.79"></HEAD>
  <BODY CLASS="REFENTRY" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF"
   VLINK="#840084" ALINK="#0000FF">
   <H1><A NAME="AEN1"></A>jigdo-file</H1>
    (distribution of huge files, e.g. CD images).</DIV>
   <DIV><A NAME="AEN17"></A>
    <H2>Synopsis</H2>
-   <P><B>jigdo-file</B> { <VAR> COMMAND</VAR> } [<VAR>--image=<VAR
-    >cdrom.iso</VAR></VAR>] [<VAR>--jigdo=<VAR>cdrom.jigdo</VAR></VAR>]
-    [<VAR>--template=<VAR>cdrom.template</VAR></VAR>] [<VAR>--force</VAR>]
-    [MORE OPTIONS] [<VAR>FILES</VAR> | <VAR>--files-from=<VAR>f</VAR></VAR
-    >]<BR> Common COMMANDs: make-template, make-image, verify </P></DIV>
+   <P><B>jigdo-file</B> { <TT><I> COMMAND</I></TT> } [<CODE>--image=<TT><I
+    >cdrom.iso</I></TT></CODE>] [<CODE>--jigdo=<TT><I>cdrom.jigdo</I></TT
+    ></CODE>] [<CODE>--template=<TT><I>cdrom.template</I></TT></CODE>]
+    [<CODE>--force</CODE>] [MORE OPTIONS] [<TT><I>FILES</I></TT> | <CODE
+    >--files-from=<TT><I>f</I></TT></CODE>]<BR> Common COMMANDs:
+    make-template, make-image, verify </P></DIV>
   <DIV><A NAME="DESCRIPTION"></A>
    <H2>DESCRIPTION</H2>
    <P>Jigsaw Download, or short jigdo, is a scheme developed primarily to
     may help you to get an idea of what jigdo is useful for.</P></DIV>
   <DIV><A NAME="OPTIONS"></A>
    <H2>OPTIONS</H2>
-   <P>Many options are specific to a particular <VAR>COMMAND</VAR>; the
-    ones below are general or used by several commands. Further options are
-    listed below with the individual commands. All options are silently
-    ignored if they are not applicable to the current command. For any <VAR
-    >BYTES</VAR> parameters to options, you can append one of the letters
-    `k', `M' or `G' to the amount you specify, to indicate kilobytes,
-    megabytes or gigabytes.</P>
+   <P>Many options are specific to a particular <TT><I>COMMAND</I></TT>;
+    the ones below are general or used by several commands. Further options
+    are listed below with the individual commands. All options are silently
+    ignored if they are not applicable to the current command. For any <TT
+    ><I>BYTES</I></TT> parameters to options, you can append one of the
+    letters `k', `M' or `G' to the amount you specify, to indicate
+    kilobytes, megabytes or gigabytes.</P>
    <P></P>
    <DIV>
     <DL>
-     <DT><VAR>-h</VAR> <VAR>--help</VAR></DT>
+     <DT><CODE>-h</CODE> <CODE>--help</CODE></DT>
      <DD>
       <P>Output short summary of commands and options.</P></DD>
-     <DT><VAR>-H</VAR> <VAR>--help-all</VAR></DT>
+     <DT><CODE>-H</CODE> <CODE>--help-all</CODE></DT>
      <DD>
       <P>Output complete summary of commands and options.</P></DD>
-     <DT><VAR>-v</VAR> <VAR>--version</VAR></DT>
+     <DT><CODE>-v</CODE> <CODE>--version</CODE></DT>
      <DD>
       <P>Output program version.</P></DD>
-     <DT><VAR>-i</VAR> <VAR>--image=<VAR>cdrom.iso</VAR></VAR></DT>
+     <DT><CODE>-i</CODE> <CODE>--image=<TT><I>cdrom.iso</I></TT></CODE
+      ></DT>
      <DD>
       <P>Specify location of the file containing the image. The image is
        the large file that you want to distribute.</P></DD>
-     <DT><VAR>-j</VAR> <VAR>--jigdo=<VAR>cdrom.jigdo</VAR></VAR></DT>
+     <DT><CODE>-j</CODE> <CODE>--jigdo=<TT><I>cdrom.jigdo</I></TT></CODE
+      ></DT>
      <DD>
       <P>Specify location of the Jigsaw Download description file. The
        jigdo file is a human-readable file generated by <B>jigdo-file</B>,
        to which you add information about all the servers you are going to
        upload the files to. <B>jigdo</B> will download this file as the
        first step of retrieving the image.</P></DD>
-     <DT><VAR>-t</VAR> <VAR>--template=<VAR>cdrom.template</VAR></VAR></DT
-     >
+     <DT><CODE>-t</CODE> <CODE>--template=<TT><I>cdrom.template</I></TT
+      ></CODE></DT>
      <DD>
       <P>Specify location of the image `template' file. The template file
        is a binary file generated by <B>jigdo-file</B>, it contains
       <P>Depending on the command, each of these three files is used
        sometimes for input, sometimes for output. If the file is to be used
        for output for a particular command and the output file already
-       exists, <B>jigdo-file</B> exits with an error, unless <VAR
-       >--force</VAR> is present.</P>
-      <P>In most cases, you will only need to specify one out of <VAR
-       >-i</VAR> <VAR>-j</VAR> <VAR>-t</VAR>, because any missing filenames
-       will be deduced from the one you specify. This is done by first
-       stripping any extension from the supplied name and then appending
-       nothing (if deducing <VAR>--image</VAR>), `<TT>.jigdo</TT>' or `<TT
-       >.template</TT>'.</P></DD>
-     <DT><VAR>-r</VAR> <VAR>--report=default|noprogress|quiet|grep</VAR
-      ></DT>
+       exists, <B>jigdo-file</B> exits with an error, unless <CODE
+       >--force</CODE> is present.</P>
+      <P>In most cases, you will only need to specify one out of <CODE
+       >-i</CODE> <CODE>-j</CODE> <CODE>-t</CODE>, because any missing
+       filenames will be deduced from the one you specify. This is done by
+       first stripping any extension from the supplied name and then
+       appending nothing (if deducing <CODE>--image</CODE>), `<TT
+       >.jigdo</TT>' or `<TT>.template</TT>'.</P></DD>
+     <DT><CODE>-r</CODE> <CODE
+      >--report=default|noprogress|quiet|grep</CODE></DT>
      <DD>
       <P>Control how verbose the program is, and what format the output
-       has: <VAR>noprogress</VAR> is the same as <VAR>default</VAR> except
-       that no `<SAMP>x% done</SAMP>' progress messages are printed. <VAR
-       >quiet</VAR> restricts the output to what is absolutely necessary,
-       mostly error messages. <VAR>grep</VAR> is only different from <VAR
-       >default</VAR> for the <B>make-template</B> command: It enables
-       output in a simple `<VAR>&lt;offset&gt; &lt;file&gt;</VAR>' format
-       which is useful when searching for binary files in other binary
-       files.</P></DD>
-     <DT><VAR>-f</VAR> <VAR>--force</VAR></DT>
+       has: <CODE>noprogress</CODE> is the same as <CODE>default</CODE>
+       except that no `<SAMP>x% done</SAMP>' progress messages are printed.
+       <CODE>quiet</CODE> restricts the output to what is absolutely
+       necessary, mostly error messages. <CODE>grep</CODE> is only
+       different from <CODE>default</CODE> for the <B>make-template</B>
+       command: It enables output in a simple `<TT><I>&lt;offset&gt;
+       &lt;file&gt;</I></TT>' format which is useful when searching for
+       binary files in other binary files.</P></DD>
+     <DT><CODE>-f</CODE> <CODE>--force</CODE></DT>
      <DD>
       <P>Overwrite existent output files without complaining.</P></DD>
-     <DT><VAR>--no-force</VAR></DT>
+     <DT><CODE>--no-force</CODE></DT>
      <DD>
       <P><SPAN><I>This is the default.</I></SPAN> Refuse to overwrite
        existent output files.</P></DD>
-     <DT><VAR>-c</VAR> <VAR>--cache=<VAR>jigdo-cache.db</VAR></VAR></DT>
+     <DT><CODE>-c</CODE> <CODE>--cache=<TT><I>jigdo-cache.db</I></TT
+      ></CODE></DT>
      <DD>
       <P><B>jigdo-file</B> usually needs to read the entire contents of all
-       the <VAR>FILES</VAR> you specify. If you use it repeatedly (e.g.
-       because you make a new CD image available daily), caching the file
-       information will increase the program's speed significantly. The
-       cache file is automatically created if it is not yet present. Data
-       is usually both read from and written to it.</P></DD>
-     <DT><VAR>--no-cache</VAR></DT>
+       the <TT><I>FILES</I></TT> you specify. If you use it repeatedly
+       (e.g. because you make a new CD image available daily), caching the
+       file information will increase the program's speed significantly.
+       The cache file is automatically created if it is not yet present.
+       Data is usually both read from and written to it.</P></DD>
+     <DT><CODE>--no-cache</CODE></DT>
      <DD>
       <P><SPAN><I>This is the default.</I></SPAN> Do not use a cache.</P
       ></DD>
-     <DT><VAR>--cache-expiry=<VAR>SECONDS</VAR></VAR></DT>
+     <DT><CODE>--cache-expiry=<TT><I>SECONDS</I></TT></CODE></DT>
      <DD>
       <P>Set maximum age of cache entries. Any entries older than this will
        be removed from the cache. The default is 30 days. You can append
        weeks, months or years, respectively. A value of `0' or `off'
        disables expiry, so that all entries will stay in the cache forever.
        See the section `CACHE FILES' below for more information.</P></DD>
-     <DT><VAR>--readbuffer=<VAR>BYTES</VAR></VAR></DT>
+     <DT><CODE>--readbuffer=<TT><I>BYTES</I></TT></CODE></DT>
      <DD>
       <P>Set size of internal buffers. The default is 128k - if you have a
        fast disc, increasing this value may make <B>jigdo-file</B> faster,
        but in general, changing it is not necessary.</P></DD>
-     <DT><VAR>--md5-block-size=<VAR>BYTES</VAR></VAR></DT>
+     <DT><CODE>--md5-block-size=<TT><I>BYTES</I></TT></CODE></DT>
      <DD>
       <P><SPAN><I>Uninteresting internal parameter.</I></SPAN> Set size of
        blocks into which files are subdivided. The default is 128k. If you
        change it, any cache file will have to be regenerated. Internally,
        <B>jigdo-file</B> may choose to use a slightly larger or smaller
        value.</P></DD>
-     <DT><VAR>-T</VAR> <VAR>--files-from=<VAR>file</VAR></VAR></DT>
+     <DT><CODE>-T</CODE> <CODE>--files-from=<TT><I>file</I></TT></CODE
+      ></DT>
      <DD>
-      <P>Read file and directory names from the specified file. If <VAR
-       >file</VAR> is `-', read names from standard input. Each line in the
-       file is taken as a name, so the names may contain spaces, but not
-       newline characters. An empty line causes <B>jigdo-file</B> to stop
-       reading from the file.</P>
+      <P>Read file and directory names from the specified file. If <TT><I
+       >file</I></TT> is `-', read names from standard input. Each line in
+       the file is taken as a name, so the names may contain spaces, but
+       not newline characters. An empty line causes <B>jigdo-file</B> to
+       stop reading from the file.</P>
       <P><SPAN><SPAN>find</SPAN>(1)</SPAN> is a powerful tool for
        generating file lists, but make sure to use `<B>find -type f</B>' if
        possible - otherwise, if you instruct <B>find</B> to output both a
        filename and a symlink to that filename, <B>jigdo-file</B> will read
        the file contents twice.</P></DD>
-     <DT><VAR>--hex</VAR></DT>
+     <DT><CODE>--hex</CODE></DT>
      <DD>
       <P>Output checksums in hexadecimal instead of Base64-like format.
        This should not be used with the <B>make-template</B> command,
        >.jigdo</TT>' file format. Its intended use is to make <B
        >jigdo-file</B> more interoperable with other Unix shell utilities
        like <SPAN><SPAN>md5sum</SPAN>(1)</SPAN>.</P></DD>
-     <DT><VAR>--no-hex</VAR></DT>
+     <DT><CODE>--no-hex</CODE></DT>
      <DD>
       <P><SPAN><I>This is the default.</I></SPAN> Use jigdo's own
        Base64-like encoding of checksums.</P></DD>
-     <DT><VAR>--debug</VAR>[<SPAN>=<VAR>help</VAR>|=<VAR>all</VAR>|=<VAR
-      >UNIT,~UNIT...</VAR> </SPAN>]</DT>
+     <DT><CODE>--debug</CODE>[<SPAN>=<TT>help</TT>|=<TT>all</TT>|=<TT><I
+      >UNIT,~UNIT...</I></TT> </SPAN>]</DT>
      <DD>
       <P>Switch on or off debugging output. Just `--debug' is equivalent to
        `--debug=all'. The argument is a comma-separated list of unit names
        debugging can be switched on depends on whether jigdo was compiled
        with debugging support - the list can be printed with
        `--debug=help'.</P></DD>
-     <DT><VAR>FILES</VAR></DT>
+     <DT><TT><I>FILES</I></TT></DT>
      <DD>
       <P>Names of files or directories to use as input. These are the parts
        that are contained in the image. In case one of the names is a
    >
    <DIV><A NAME="MAKE-TEMPLATE"></A>
     <H3><B>make-template</B>, <B>mt</B></H3>
-    <P>Reads <VAR>image</VAR> and <VAR>FILES</VAR>, creates `<TT
+    <P>Reads <TT><I>image</I></TT> and <TT><I>FILES</I></TT>, creates `<TT
      >.jigdo</TT>' and `<TT>.template</TT>'. This is the main functionality
      of <B>jigdo-file</B>.</P>
-    <P>It is possible to specify both <VAR>--image=-</VAR> and <VAR
-     >--files-from=-</VAR>. In this case, first the list of files is read
+    <P>It is possible to specify both <CODE>--image=-</CODE> and <CODE
+     >--files-from=-</CODE>. In this case, first the list of files is read
      from standard input until an empty line is encountered. Everything
      following it is assumed to be the image data. This can be useful if
      you use <SPAN><SPAN>mkisofs</SPAN>(1)</SPAN> or similar programs that
      can output the complete image on their standard output, because there
      is no need to store the image on disc temporarily.</P>
-    <P>If a <VAR>FILES</VAR> argument contains the characters `<VAR
-     >//</VAR>' (Unix) or `<VAR>\.\</VAR>' (Windows), this has special
+    <P>If a <TT><I>FILES</I></TT> argument contains the characters `<TT
+     >//</TT>' (Unix) or `<TT>\.\</TT>' (Windows), this has special
      meaning. In the final jigdo file that users will download, each of the
-     parts is referenced in the `<VAR>[Parts]</VAR>' section with a URI of
+     parts is referenced in the `<TT>[Parts]</TT>' section with a URI of
      the form `Label:some/filename'. (See `FORMAT OF .JIGDO FILES' below
-     for a detailed description.) The `<VAR>[Servers]</VAR>' section gives
-     mapping of labels to servers on the internet, with lines like
+     for a detailed description.) The `<TT>[Servers]</TT>' section gives a
+     mapping of labels to servers on the internet, with lines like
      `Label=http://myserver.org/jigdofiles/'. Using this information, <B
      >jigdo</B> will create the final download URI for the part,
-     `http://myserver.org/jigdofiles/some/filename'. Specifying `<VAR
-     >//</VAR>' (or `<VAR>\.\</VAR>') in a file or directory name serves to
+     `http://myserver.org/jigdofiles/some/filename'. Specifying `<TT
+     >//</TT>' (or `<TT>\.\</TT>') in a file or directory name serves to
      `cut off' the names at the right directory level. For example, if the
-     Unix path of one of your <VAR>FILES</VAR> is `/path/some/filename',
-     you can tell <B>jigdo-file</B> to cut off after the `/path' by passing
-     it the argument `/path//some/filename', or `/path//' if you want the
-     whole directory scanned. The path names need not be absolute;
-     `somedirectory//' is also possible.</P>
+     Unix path of one of your <TT><I>FILES</I></TT> is
+     `/path/some/filename', you can tell <B>jigdo-file</B> to cut off after
+     the `/path' by passing it the argument `/path//some/filename', or
+     `/path//' if you want the whole directory scanned. The path names need
+     not be absolute; `somedirectory//' is also possible.</P>
     <P></P>
     <DIV>
      <DL>
-      <DT><VAR>--label <VAR>Label=/path</VAR></VAR></DT>
+      <DT><CODE>--label <TT><I>Label=/path</I></TT></CODE></DT>
       <DD>
        <P>Specify a name to use as the label name for a path on disc.
-        (Influences the output jigdo file.) If you used `<VAR>//</VAR>' in
-        the <VAR>FILES</VAR> arguments as described above, <B
+        (Influences the output jigdo file.) If you used `<TT>//</TT>' in
+        the <TT><I>FILES</I></TT> arguments as described above, <B
         >jigdo-file</B> will by default pick label names automatically
         (`A', `B' etc.). With this option, you can give labels more
         meaningful names. Note that the label name will only be used if one
-        or more <VAR>FILES</VAR> begin with `/path//'.</P>
+        or more <TT><I>FILES</I></TT> begin with `/path//'.</P>
        <P>Try to use label names that start with uppercase characters, to
         disambiguate them clearly from protocol names like `http',
         `ftp'.</P></DD>
-      <DT><VAR>--uri <VAR>Label=http://some.server.org/</VAR></VAR></DT>
+      <DT><CODE>--uri <TT><I>Label=http://some.server.org/</I></TT></CODE
+       ></DT>
       <DD>
-       <P>By default, using <VAR>--label</VAR> as described above will
+       <P>By default, using <CODE>--label</CODE> as described above will
         cause lines of the form `Label=file:/path/' to be written to the
-        `<VAR>[Servers]</VAR>' section of the output jigdo file. If you
-        want to override the `file:' URI so that the line reads
-        `Label=http://some.server.org/', you can do so by specifying <VAR
-        >--uri</VAR> along with <VAR>--label</VAR>. Giving just <VAR>--uri
-        <VAR>Label=...</VAR></VAR> without the corresponding <VAR>--label
-        <VAR>Label=...</VAR></VAR> has no effect, and even if you specify
-        both, an entry is only added to the `<VAR>[Servers]</VAR>' section
-        if the label is referenced by at least one `<VAR>[Parts]</VAR>'
-        entry.</P>
+        `<TT>[Servers]</TT>' section of the output jigdo file. If you want
+        to override the `file:' URI so that the line reads
+        `Label=http://some.server.org/', you can do so by specifying <CODE
+        >--uri</CODE> along with <CODE>--label</CODE>. Giving just <CODE
+        >--uri <TT><I>Label=...</I></TT></CODE> without the corresponding
+        <CODE>--label <TT><I>Label=...</I></TT></CODE> has no effect, and
+        even if you specify both, an entry is only added to the `<TT
+        >[Servers]</TT>' section if the label is referenced by at least one
+        `<TT>[Parts]</TT>' entry.</P>
        <P>The supplied value is not quoted by the program; if it contains
-        characters such as space or any of the characters <VAR>#"'\</VAR>
+        characters such as space or any of the characters <TT>#"'\</TT>
         then you must quote it. (Under Unix, you may need to quote the
-        value twice to also protect it from the shell, e.g. <VAR>\\\\</VAR
-        > or <VAR>'\\'</VAR> to get a single backslash in the URI.)</P>
-       <P>The mapping specified with an <VAR>--uri</VAR> option is ignored
-        if it is already present in the output jigdo file.</P>
-       <P>Users of the Windows version may notice that the `<VAR>\</VAR>'
-        directory separators are converted into `<VAR>/</VAR>' in the
-        `file:' URIs that are generated by default. This is done to
-        increase cross-platform compatibility of `file:' - the <B
-        >print-missing</B> command of the Windows version will
-        automatically re-convert the characters when it prints the URIs. In
-        case you supply your own `file:' URIs under Windows using <VAR
-        >--uri</VAR>, you must also exchange `<VAR>/</VAR>' and `<VAR
-        >\</VAR>'.</P></DD>
-      <DT><VAR>-0</VAR> to <VAR>-9</VAR></DT>
+        value twice to also protect it from the shell, e.g. <TT>\\\\</TT>
+        or <TT>'\\'</TT> to get a single backslash in the URI.)</P>
+       <P>The mapping specified with an <CODE>--uri</CODE> option is
+        ignored if it is already present in the output jigdo file.</P>
+       <P>Users of the Windows version may notice that the `<TT>\</TT>'
+        directory separators are converted into `<TT>/</TT>' in the `file:'
+        URIs that are generated by default. This is done to increase
+        cross-platform compatibility of `file:' - the <B>print-missing</B>
+        command of the Windows version will automatically re-convert the
+        characters when it prints the URIs. In case you supply your own
+        `file:' URIs under Windows using <CODE>--uri</CODE>, you must also
+        exchange `<TT>/</TT>' and `<TT>\</TT>'.</P></DD>
+      <DT><CODE>-0</CODE> to <CODE>-9</CODE></DT>
       <DD>
-       <P>Set amount of compression in the output template file, from <VAR
-        >-0</VAR> (no compression) to <VAR>-9</VAR> (maximum compression).
-        The default is <VAR>-9</VAR>, which can make the template
-        generation quite slow. The compression algorithm used is the same
-        as for <SPAN><SPAN>gzip</SPAN>(1)</SPAN>.</P></DD>
-      <DT><VAR>--min-length=<VAR>BYTES</VAR></VAR></DT>
+       <P>Set amount of compression in the output template file, from <CODE
+        >-0</CODE> (no compression) to <CODE>-9</CODE> (maximum
+        compression). The default is <CODE>-9</CODE>, which can make the
+        template generation quite slow. By default, the compression
+        algorithm used is the same as for <SPAN><SPAN>gzip</SPAN>(1)</SPAN
+        >.</P></DD>
+      <DT><CODE>--gzip</CODE> and <CODE>--bzip2</CODE></DT>
+      <DD>
+       <P>Choose between the gzip and bzip2 compression algorithms. The
+        default is gzip. Bzip2 usually gives a better compression ratio,
+        but compression is significantly slower than with gzip.</P></DD>
+      <DT><CODE>--min-length=<TT><I>BYTES</I></TT></CODE></DT>
       <DD>
        <P>Set minimum length of a part for <B>jigdo-file</B> to look for it
         in the image. The default is 1k. Parts smaller than this will never
         be found in the image, so their data will be included in the
         template file. The search algorithm used requires such a minimum
         length, otherwise template generation could become extremely slow.
-        If you know for sure that all your <VAR>FILES</VAR> are larger than
-        a certain amount, you can increase <B>jigdo-file</B>'s speed
+        If you know for sure that all your <TT><I>FILES</I></TT> are larger
+        than a certain amount, you can increase <B>jigdo-file</B>'s speed
         slightly by specifying the amount with this option. There is a
         hard-wired absolute minimum of 256 bytes - anything lower will
         silently be set to 256.</P></DD>
-      <DT><VAR>--merge=<VAR>FILE</VAR></VAR></DT>
+      <DT><CODE>--merge=<TT><I>FILE</I></TT></CODE></DT>
       <DD>
-       <P>Include the contents of <VAR>FILE</VAR> in the output `<TT
+       <P>Include the contents of <TT><I>FILE</I></TT> in the output `<TT
         >.jigdo</TT>' file. The file can contain data which you want added
-        to the output (for example, a `<VAR>[Servers]</VAR>' section with a
+        to the output (for example, a `<TT>[Servers]</TT>' section with a
         list of your servers as entries), or it can be the jigdo file
         output by an earlier run of <B>jigdo-file</B>.</P>
-       <P>It is possible to specify the same file for input with <VAR
-        >--merge</VAR> and for output with <VAR>--jigdo</VAR>. However, you
-        will also need to use <VAR>--force</VAR> to make the program
-        overwrite the old version of the jigdo file with the new one. <VAR
-        >FILE</VAR> can be `-' for standard input.</P>
+       <P>It is possible to specify the same file for input with <CODE
+        >--merge</CODE> and for output with <CODE>--jigdo</CODE>. However,
+        you will also need to use <CODE>--force</CODE> to make the program
+        overwrite the old version of the jigdo file with the new one. <TT
+        ><I>FILE</I></TT> can be `-' for standard input.</P>
        <P>When <SPAN><I>adding</I></SPAN> new information to the supplied
-        file, <B>jigdo-file</B> will not insert new lines into the `<VAR
-        >[Parts]</VAR>' section if an entry for the same MD5 checksum (but
+        file, <B>jigdo-file</B> will not insert new lines into the `<TT
+        >[Parts]</TT>' section if an entry for the same MD5 checksum (but
         not necessarily with the same URI!) already exists, and it will not
-        insert new lines into the `<VAR>[Servers]</VAR>' section if a
+        insert new lines into the `<TT>[Servers]</TT>' section if a
         completely identical entry already exists.</P>
-       <P>When <SPAN><I>reading in</I></SPAN> the existing <VAR>FILE</VAR
-        >, the behaviour is slightly different: The program <SPAN><I
-        >preserves</I></SPAN> entries in the `<VAR>[Parts]</VAR>' section
+       <P>When <SPAN><I>reading in</I></SPAN> the existing <TT><I>FILE</I
+        ></TT>, the behaviour is slightly different: The program <SPAN><I
+        >preserves</I></SPAN> entries in the `<TT>[Parts]</TT>' section
         with identical checksum, but different URIs. For completely
         identical entries (same checksum and URI), only one entry is
-        preserved and the duplicates are removed. The `<VAR>[Servers]</VAR
-        >' section is left untouched.</P></DD>
-      <DT><VAR>--image-section</VAR></DT>
+        preserved and the duplicates are removed. The `<TT>[Servers]</TT>'
+        section is left untouched.</P></DD>
+      <DT><CODE>--image-section</CODE></DT>
       <DD>
        <P><SPAN><I>This is the default.</I></SPAN> Causes <B>jigdo-file</B
-        > to add an `<VAR>[Image]</VAR>' section to the `<TT>.jigdo</TT>'
+        > to add an `<TT>[Image]</TT>' section to the `<TT>.jigdo</TT>'
         file.</P>
-       <P>As an exception, a new `<VAR>[Image]</VAR>' section is <SPAN><I
-        >not</I></SPAN> added if you use <VAR>--merge</VAR> and the file to
-        merge contains an `<VAR>[Image]</VAR>' section with a line which
-        reads `<VAR>Template-MD5Sum=</VAR>' (end of line after the `='). In
+       <P>As an exception, a new `<TT>[Image]</TT>' section is <SPAN><I
+        >not</I></SPAN> added if you use <CODE>--merge</CODE> and the file
+        to merge contains an `<TT>[Image]</TT>' section with a line which
+        reads `<TT>Template-MD5Sum=</TT>' (end of line after the `='). In
         this case, the generated template data's MD5 checksum value is just
         added after the `=' of the first line of this form in the file - no
-        whole new `<VAR>[Image]</VAR>' section is appended. This behaviour
-        is useful because it allows you to pass via <VAR>--merge</VAR> an
-        `<VAR>[Image]</VAR>' section with arbitrary content and then have
-        the MD5 checksum automatically added by <B>jigdo-file</B>. The
-        section `FORMAT OF .JIGDO FILES' below explains the `<VAR
-        >[Image]</VAR>' section contents in greater detail.</P></DD>
-      <DT><VAR>--no-image-section</VAR></DT>
+        whole new `<TT>[Image]</TT>' section is appended. This behaviour is
+        useful because it allows you to pass via <CODE>--merge</CODE> an
+        `<TT>[Image]</TT>' section with arbitrary content and then have the
+        MD5 checksum automatically added by <B>jigdo-file</B>. The section
+        `FORMAT OF .JIGDO FILES' below explains the `<TT>[Image]</TT>'
+        section contents in greater detail.</P></DD>
+      <DT><CODE>--no-image-section</CODE></DT>
       <DD>
-       <P>Do <SPAN><I>not</I></SPAN> include an `<VAR>[Image]</VAR>'
-        section in the `<TT>.jigdo</TT>' file. You need to add one yourself
-        if you use this option. However, doing that is not easy (you also
-        need to add a `<VAR>Template-MD5Sum</VAR>' line with the correct
-        checksum, or <B>jigdo</B> will complain), so use of this option is
+       <P>Do <SPAN><I>not</I></SPAN> include an `<TT>[Image]</TT>' section
+        in the `<TT>.jigdo</TT>' file. You need to add one yourself if you
+        use this option. However, doing that is not easy (you also need to
+        add a `<TT>Template-MD5Sum</TT>' line with the correct checksum, or
+        <B>jigdo</B> will complain), so use of this option is
         discouraged.</P></DD>
-      <DT><VAR>--servers-section</VAR></DT>
+      <DT><CODE>--servers-section</CODE></DT>
       <DD>
        <P><SPAN><I>This is the default.</I></SPAN> Causes <B>jigdo-file</B
-        > to add a `<VAR>[Servers]</VAR>' section to the `<TT>.jigdo</TT>'
+        > to add a `<TT>[Servers]</TT>' section to the `<TT>.jigdo</TT>'
         file. This default section uses `file:' URIs, which allows for
         immediate reassembly of the image from the local filesystem, and is
         also useful if you want to edit the file manually and replace the
         `file:' URIs with other URIs.</P></DD>
-      <DT><VAR>--no-servers-section</VAR></DT>
+      <DT><CODE>--no-servers-section</CODE></DT>
       <DD>
-       <P>Do <SPAN><I>not</I></SPAN> add a `<VAR>[Servers]</VAR>' section
-        at the end of the `<TT>.jigdo</TT>' file. Useful e.g. if you are
-        going to append the section with a script.</P></DD>
-      <DT><VAR>--match-exec=<VAR>SHELLCOMMAND</VAR></VAR></DT>
+       <P>Do <SPAN><I>not</I></SPAN> add a `<TT>[Servers]</TT>' section at
+        the end of the `<TT>.jigdo</TT>' file. Useful e.g. if you are going
+        to append the section with a script.</P></DD>
+      <DT><CODE>--match-exec=<TT><I>SHELLCOMMAND</I></TT></CODE></DT>
       <DD>
        <P>Whenever a file is found in the image, execute the supplied
         command string by passing it to a shell. <B>jigdo-file</B> sets up
         found in the image and `Label:a/b/file' is going to be written to
         the `<TT>.jigdo</TT>' file:
         <P></P><UL><LI>
-        <P><VAR>LABEL</VAR>="<VAR>Label</VAR>" - Name of the label for the
-         file. The example assumes that `<VAR>--label</VAR> <VAR
-         >Label=/path</VAR>' was specified by you. In the absence of such
-         an option, <VAR>LABEL</VAR> will be set but empty.</P></LI><LI>
-        <P><VAR>LABELPATH</VAR>="<VAR>/path/</VAR>" - The path
+        <P><CODE>LABEL</CODE>="<TT>Label</TT>" - Name of the label for the
+         file. The example assumes that `<CODE>--label</CODE> <TT
+         >Label=/path</TT>' was specified by you. In the absence of such an
+         option, <CODE>LABEL</CODE> will be set but empty.</P></LI><LI>
+        <P><CODE>LABELPATH</CODE>="<TT>/path/</TT>" - The path
          corresponding to the label, or in other words, the prefix of the
          matched file's path that will <SPAN><I>not</I></SPAN> appear in
-         the output `<TT>.jigdo</TT>' file. Is set even without any `<VAR
-         >--label</VAR>' option present. Ends with a slash.</P></LI><LI>
-        <P><VAR>MATCHPATH</VAR>="<VAR>a/b/</VAR>" - The rest of the path,
+         the output `<TT>.jigdo</TT>' file. Is set even without any `<CODE
+         >--label</CODE>' option present. Ends with a slash.</P></LI><LI>
+        <P><CODE>MATCHPATH</CODE>="<TT>a/b/</TT>" - The rest of the path,
          without the leafname of the matched file. Is either empty or ends
          with a slash.</P></LI><LI>
-        <P><VAR>LEAF</VAR>="<VAR>file</VAR>" - The leafname of the matched
+        <P><CODE>LEAF</CODE>="<TT>file</TT>" - The leafname of the matched
          file.</P></LI><LI>
-        <P><VAR>MD5SUM</VAR>="<VAR>lNVdUSqbo2yqm33webrhnw</VAR>" - The
+        <P><CODE>MD5SUM</CODE>="<TT>lNVdUSqbo2yqm33webrhnw</TT>" - The
          md5sum of the matched file, in Base64-like format.</P></LI><LI>
-        <P><VAR>FILE</VAR>="<VAR>/path//a/b/file</VAR>" - For convenience,
-         the complete path of the file. The variable is always set to <VAR
-         >$LABELPATH$MATCHPATH$LEAF</VAR>.</P></LI></UL> </P>
+        <P><CODE>FILE</CODE>="<TT>/path//a/b/file</TT>" - For convenience,
+         the complete path of the file. The variable is always set to <TT
+         >$LABELPATH$MATCHPATH$LEAF</TT>.</P></LI></UL> </P>
        <P>Please be careful to correctly quote the string passed to this
         option, otherwise your supplied command will not work with
         filenames that contain spaces. As an example, to create a backup of
-        hard links to the matched files, use the following option: <VAR
+        hard links to the matched files, use the following option: <TT
         >--match-exec='mkdir -p "${LABEL:-.}/$MATCHPATH" &#38;&#38; ln -f
-        "$FILE" "${LABEL:-.}/$MATCHPATH$LEAF"'</VAR> </P>
+        "$FILE" "${LABEL:-.}/$MATCHPATH$LEAF"'</TT> </P>
        <P>By default, no command is executed. Use --match-exec="" to remove
         a command string which was set with an earlier use of this
-        option.</P></DD></DL></DIV></DIV>
+        option.</P></DD>
+      <DT><CODE>--greedy-matching</CODE></DT>
+      <DD>
+       <P><SPAN><I>This is the default.</I></SPAN> Imagine that your image
+        contains a <TT>.tar</TT> file which in turn contains another file
+        <TT>x</TT>, and that you provide both the <TT>.tar</TT> and the
+        files inside it on the command line. When <B>jigdo-file</B> scans
+        the image, it encounters the beginning of the <TT>.tar</TT> file,
+        and then the file <TT>x</TT>.</P>
+       <P>At this point, a decision must be made: Should the smaller file
+        <TT>x</TT> be recorded as matched, or should it be ignored in
+        favour of the larger (and thus better) match of the <TT>.tar</TT>
+        file? Unfortunately, at this point it is not clear whether there
+        will actually be a full match of the <TT>.tar</TT>, so by default,
+        the program prefers the small match.</P></DD>
+      <DT><CODE>--no-greedy-matching</CODE></DT>
+      <DD>
+       <P>In the case where a large partial match is present and a shorter
+        match has been confirmed, ignore the small match. (See the option
+        above.)</P></DD></DL></DIV></DIV>
    <DIV><A NAME="MAKE-IMAGE"></A>
     <H3><B>make-image</B>, <B>mi</B></H3>
-    <P>Reads `<TT>.template</TT>' and <VAR>FILES</VAR>, creates <VAR
-     >image</VAR> (or `<TT>imagename.tmp</TT>'). Provides a rudimentary way
-     of reassembling images - <B>jigdo</B> is usually better suited for
-     this task. However, in contrast to <B>jigdo</B>, no `<TT>.jigdo</TT>'
-     file is required.</P>
+    <P>Reads `<TT>.template</TT>' and <TT><I>FILES</I></TT>, creates <TT
+     ><I>image</I></TT> (or `<TT>imagename.tmp</TT>'). Provides a
+     rudimentary way of reassembling images - <B>jigdo</B> is usually
+     better suited for this task. However, in contrast to <B>jigdo</B>, no
+     `<TT>.jigdo</TT>' file is required.</P>
     <P>If the image is to be written to a file (and not to standard
      output), it is possible to create the image in several steps, with
      several invocations of `<B>jigdo-file make-image</B>', as follows: You
     <P></P>
     <DIV>
      <DL>
-      <DT><VAR>--check-files</VAR></DT>
+      <DT><CODE>--check-files</CODE></DT>
       <DD>
        <P><SPAN><I>This is the default.</I></SPAN> Whenever any part is
         copied to the image, re-check its checksum against the checksum
         stored in the template. It is recommended that you leave this
         switched on, even if it slows down image creation a bit.</P></DD>
-      <DT><VAR>--no-check-files</VAR></DT>
+      <DT><CODE>--no-check-files</CODE></DT>
       <DD>
        <P>Do not check files' checksums when copying them to the image.
         This can be safely used when no cache file is used (which means
     <P>Together with the <B>make-image</B> command, this provides most of
      the functionality of <B>jigdo</B> on the command line.</P>
     <P>For each part that is not yet present in the temporary image file,
-     the file checksum is looked up in the `<VAR>[Parts]</VAR>' section of
+     the file checksum is looked up in the `<TT>[Parts]</TT>' section of
      the jigdo file. Any label in the corresponding entry is then expanded
-     according to the label definitions in the `<VAR>[Servers]</VAR>'
-     section and printed on standard output. <B>jigdo</B> allows you to
-     specify several alternative locations for each label in this section,
-     but <B>print-missing</B> will only output the first one for each
-     missing part.</P>
-    <P>If the checksum cannot be found in the `<VAR>[Parts]</VAR>' section
+     according to the label definitions in the `<TT>[Servers]</TT>' section
+     and printed on standard output. <B>jigdo</B> allows you to specify
+     several alternative locations for each label in this section, but <B
+     >print-missing</B> will only output the first one for each missing
+     part.</P>
+    <P>If the checksum cannot be found in the `<TT>[Parts]</TT>' section
      (this Should Not Happen unless you deleted that section), a lookup is
-     instead made for `MD5Sum:<VAR>&lt;checksum&gt;</VAR>', just like with
-     <B>jigdo</B>. (Thus, if you want to get rid of the `<VAR>[Parts]</VAR
-     >' section, you can do so if you rename each part to its own
-     checksum.)</P>
+     instead made for `MD5Sum:<TT><I>&lt;checksum&gt;</I></TT>', just like
+     with <B>jigdo</B>. (Thus, if you want to get rid of the `<TT
+     >[Parts]</TT>' section, you can do so if you rename each part to its
+     own checksum.)</P>
     <P></P>
     <DIV>
      <DL>
-      <DT><VAR>--uri <VAR>Label=http://some.server.org/</VAR></VAR></DT>
+      <DT><CODE>--uri <TT><I>Label=http://some.server.org/</I></TT></CODE
+       ></DT>
       <DD>
        <P>Override the entries in the `<TT>.jigdo</TT>' file for any label
-        with a URI of your choice. With the example above, a `<VAR
-        >[Parts]</VAR>' entry of `Label:some/filename' will cause the line
+        with a URI of your choice. With the example above, a `<TT
+        >[Parts]</TT>' entry of `Label:some/filename' will cause the line
         `http://some.server.org/some/filename' to be printed.</P>
        <P>The supplied value is not quoted by the program; if it contains
-        characters such as space or any of the characters <VAR>#"'\</VAR>
+        characters such as space or any of the characters <TT>#"'\</TT>
         then you must quote it. (Under Unix, you may need to quote the
-        value twice to also protect it from the shell, e.g. <VAR>\\\\</VAR
-        > or <VAR>'\\'</VAR> to get a single backslash in the URI.)</P
-       ></DD></DL></DIV></DIV>
+        value twice to also protect it from the shell, e.g. <TT>\\\\</TT>
+        or <TT>'\\'</TT> to get a single backslash in the URI.)</P></DD
+      ></DL></DIV></DIV>
    <DIV><A NAME="PRINT-MISSING-ALL"></A>
     <H3><B>print-missing-all</B>, <B>pma</B></H3>
     <P>Just like <B>print-missing</B>, this command outputs a list of URIs
      still needed to completely reassemble the image. However, <SPAN><I
      >all</I></SPAN> alternative download locations are printed instead of
      just one. In the output, the URIs for a file are separated from other
-     files' URIs with blank lines. The <VAR>--uri</VAR> option has the same
-     effect as for <B>print-missing</B>.</P></DIV>
+     files' URIs with blank lines. The <CODE>--uri</CODE> option has the
+     same effect as for <B>print-missing</B>.</P></DIV>
    <DIV><A NAME="VERIFY"></A>
     <H3><B>verify</B>, <B>ver</B></H3>
-    <P>Reads <VAR>image</VAR> (presumably generated with <B>make-image</B
-     >) and `<TT>.template</TT>', checks for correct checksum of image.</P
-    >
+    <P>Reads <TT><I>image</I></TT> (presumably generated with <B
+     >make-image</B>) and `<TT>.template</TT>', checks for correct checksum
+     of image.</P>
     <P>The template data does not only contain checksums of the individual
      parts, but also of the image as a whole. <B>make-image</B> already
      performs a number of internal checks, but if you like, you can
      additionally check the image with this command.</P></DIV>
    <DIV><A NAME="SCAN"></A>
     <H3><B>scan</B>, <B>sc</B></H3>
-    <P>Reads all the <VAR>FILES</VAR> and enters them into the cache,
-     unless they are already cached. The <VAR>--cache</VAR> option must be
-     present for this command.</P></DIV>
+    <P>Reads all the <TT><I>FILES</I></TT> and enters them into the cache,
+     unless they are already cached. The <CODE>--cache</CODE> option must
+     be present for this command.</P>
+    <P></P>
+    <DIV>
+     <DL>
+      <DT><CODE>--no-scan-whole-file</CODE></DT>
+      <DD>
+       <P><SPAN><I>This is the default.</I></SPAN> This only causes the
+        first <CODE>--md5-block-size</CODE> bytes of each file to be read.
+        If the cache is used later by <B>jigdo-file make-image</B>, the
+        rest of the file will be read once these first bytes are recognized
+        in the input image.</P></DD>
+      <DT><CODE>--scan-whole-file</CODE></DT>
+      <DD>
+       <P>Immediately read the entire file contents and store them in the
+        cache.</P></DD></DL></DIV></DIV>
    <DIV><A NAME="MD5SUM"></A>
     <H3><B>md5sum</B>, <B>md5</B></H3>
-    <P>Reads all the <VAR>FILES</VAR> and prints out MD5 checksums of their
-     contents. This command is quite similar to <SPAN><SPAN>md5sum</SPAN
-     >(1)</SPAN>, except that the checksum is output in the Base64-like
-     encoding which is also used elsewhere by <B>jigdo-file</B>.</P>
-    <P>The <VAR>FILES</VAR> arguments are processed in the same way as with
-     the other commands, which means that recursion automatically takes
-     place for any arguments that are directories, and that symbolic links
-     are not listed except when the file(s) they point to are not reachable
-     directly.</P>
+    <P>Reads all the <TT><I>FILES</I></TT> and prints out MD5 checksums of
+     their contents. This command is quite similar to <SPAN><SPAN
+     >md5sum</SPAN>(1)</SPAN>, except that the checksum is output in the
+     Base64-like encoding which is also used elsewhere by <B>jigdo-file</B
+     >.</P>
+    <P>The <TT><I>FILES</I></TT> arguments are processed in the same way as
+     with the other commands, which means that recursion automatically
+     takes place for any arguments that are directories, and that symbolic
+     links are not listed except when the file(s) they point to are not
+     reachable directly.</P>
     <P>In the checksum list printed on standard output, only the part of
-     the filename following any `<VAR>//</VAR>' (or `<VAR>\.\</VAR>' on
-     Windows) is printed. Any <VAR>--cache</VAR> will be used for querying
-     files' MD5 checksums and/or writing the checksums of scanned files.</P
-    ></DIV>
+     the filename following any `<TT>//</TT>' (or `<TT>\.\</TT>' on
+     Windows) is printed. Any <CODE>--cache</CODE> will be used for
+     querying files' MD5 checksums and/or writing the checksums of scanned
+     files.</P></DIV>
    <DIV><A NAME="LIST-TEMPLATE"></A>
     <H3><B>list-template</B>, <B>ls</B></H3>
     <P>Reads a `<TT>.template</TT>' file and outputs low-level information
      about the image and all parts contained in it, including offset,
      length and checksum.</P>
     <P>You can also use this command with temporary image files (by
-     specifying something like <VAR>--template=imagename.tmp</VAR>) - in
+     specifying something like <CODE>--template=imagename.tmp</CODE>) - in
      that case, the output also distinguishes between parts that have been
      written to the image and parts that haven't.</P>
     <P>The exact output format may change incompatibly between different
      jigdo releases. The following different types of lines can be output.
      `have-file' only occurs for `<TT>.tmp</TT>' files, indicating a file
-     that has already been successfully written to the temporary file:</P><PRE>in-template  <VAR>offset-in-image  length</VAR
+     that has already been successfully written to the temporary file:</P><PRE>in-template  <TT><I
+>offset-in-image  length</I
+></TT
 >
-need-file    <VAR>offset-in-image  length  file-md5sum  filestart-rsyncsum</VAR
+need-file    <TT><I
+>offset-in-image  length  file-md5sum  filestart-rsyncsum</I
+></TT
 >
-have-file    <VAR>offset-in-image  length  file-md5sum  filestart-rsyncsum</VAR
+have-file    <TT><I
+>offset-in-image  length  file-md5sum  filestart-rsyncsum</I
+></TT
 >
-image-info   <VAR>image-length  image-md5sum  rsyncsum-size</VAR
+image-info   <TT><I
+>image-length  image-md5sum  rsyncsum-size</I
+></TT
 ></PRE></DIV></DIV>
   <DIV><A NAME="DETAILS"></A>
    <H2>DETAILS</H2>
@@ -573,35 +628,36 @@ image-info   <VAR>image-length  image-md5sum  rsyncsum-size</VAR
    <P>The overall format of `<TT>.jigdo</TT>' files follows that of `<TT
     >.ini</TT>' files, as also used by the Gnome and KDE projects for some
     data. The file is organized into sections, each of which is preceded by
-    a line reading `<VAR>[Sectionname]</VAR>'. Within each section, lines
+    a line reading `<TT>[Sectionname]</TT>'. Within each section, lines
     have the form `Label=Value'. Such lines are also called `entries'
     below. All `<TT>.jigdo</TT>' files use UTF-8 as their character
     encoding.</P>
-   <P>Comments are introduced with the `<VAR>#</VAR>' character and extend
-    to the end of the line. Whitespace is ignored at line start and end as
-    well as to the left and right of section names and the `<VAR>=</VAR>'
-    in entries. Furthermore, the jigdo utilities split up the text of the
-    entry value (i.e. the part after the `<VAR>=</VAR>') into
-    whitespace-separated words, much like the Unix shell. Single <VAR
-    >''</VAR> and double <VAR>""</VAR> quotes can be used to prevent that
-    e.g. URIs containing whitespace are split apart. Similarly, characters
-    with special meaning (the characters <VAR>'"#\</VAR> and space/tab)
-    must be quoted with <VAR>\</VAR> to appear in the value. As with the
-    shell, there is a difference between <VAR>'&nbsp;'</VAR> and <VAR
-    >"&nbsp;"</VAR>: Within <VAR>'&nbsp;'</VAR>, the characters <VAR
-    >"#\</VAR> and whitespace lose their special meaning and become
-    ordinary characters, whereas within <VAR>"&nbsp;"</VAR>, only the
-    characters <VAR>'#</VAR> and whitespace lose their special meaning - in
-    other words, backslash escapes still work inside <VAR>"&nbsp;"</VAR>,
-    but not <VAR>'&nbsp;'</VAR>.</P>
+   <P>Comments are introduced with the `<TT>#</TT>' character and extend to
+    the end of the line. Whitespace is ignored at line start and end as
+    well as to the left and right of section names and the `<TT>=</TT>' in
+    entries. Furthermore, the jigdo utilities split up the text of the
+    entry value (i.e. the part after the `<TT>=</TT>') into
+    whitespace-separated words, much like the Unix shell. Single <TT
+    >''</TT> and double <TT>""</TT> quotes can be used to prevent that e.g.
+    URIs containing whitespace are split apart. Similarly, characters with
+    special meaning (the characters <TT>'"#\</TT> and space/tab) must be
+    quoted with <TT>\</TT> to appear in the value. As with the shell, there
+    is a difference between <TT>'&nbsp;'</TT> and <TT>"&nbsp;"</TT>: Within
+    <TT>'&nbsp;'</TT>, the characters <TT>"#\</TT> and whitespace lose
+    their special meaning and become ordinary characters, whereas within
+    <TT>"&nbsp;"</TT>, only the characters <TT>'#</TT> and whitespace lose
+    their special meaning - in other words, backslash escapes still work
+    inside <TT>"&nbsp;"</TT>, but not <TT>'&nbsp;'</TT>.</P>
    <P>`<TT>.jigdo</TT>' files can optionally be compressed with <SPAN
     ><SPAN>gzip</SPAN>(1)</SPAN>. <B>jigdo-file</B> always outputs
     uncompressed files, which you can compress yourself. <B>jigdo-lite</B>
-    supports single uncompressed and compressed files. <B>jigdo</B>
-    additionally supports any number of concatenated plaintext and gzipped
-    parts in the files - for example, you can compress a `<TT>.jigdo</TT>'
-    file and then add a couple of lines of uncompressed data to the end. In
-    all cases, the `<TT>.gz</TT>' extension should be removed from the
+    supports single uncompressed and compressed files.</P>
+   <P>(Behaviour which may change in the future and which should not be
+    relied upon: <B>jigdo</B> additionally supports any number of
+    concatenated plaintext and gzipped parts in the files - for example,
+    you can compress a `<TT>.jigdo</TT>' file and then add a couple of
+    lines of uncompressed data to the end.)</P>
+   <P>In all cases, the `<TT>.gz</TT>' extension should be removed from the
     filename - the tools will determine automatically from the file
     contents whether a file is compressed or not.</P>
    <P>Below is a description of the individual section names used by
@@ -615,45 +671,53 @@ Generator=jigdo-file/1.0.0</PRE>
      >.jigdo</TT>' file.</P></DIV>
    <DIV><A NAME="IMAGE-SECTION"></A>
     <H3>Image section</H3><PRE>[Image]
-Filename=<VAR>"filename for saving on user's disc"</VAR
+Filename=<TT><I
+>"filename for saving on user's disc"</I
+></TT
 >
-Template=<VAR>"URI where to fetch template file"</VAR
+Template=<TT><I
+>"URI where to fetch template file"</I
+></TT
 >
 Template-MD5Sum=OQ8riqT1BuyzsrT9964A7g
-ShortInfo=<VAR>single-line description of the image (200 characters max.)</VAR
+ShortInfo=<TT><I
+>single-line description of the image (200 characters max.)</I
+></TT
 >
-Info=<VAR>long description (5000 characters max.)</VAR
+Info=<TT><I
+>long description (5000 characters max.)</I
+></TT
 ></PRE>
     <P>The value for the `Template' entry can be either an URL (absolute or
-     relative to the URL of the jigdo file) or a string of the form `<VAR
-     >Label</VAR>:<VAR>pathname</VAR>' (<SPAN><I>UNIMPLEMENTED</I></SPAN
-     >), as described below.</P>
+     relative to the URL of the jigdo file) or a string of the form `<TT
+     ><I>Label</I></TT>:<TT><I>pathname</I></TT>' (<SPAN><I
+     >UNIMPLEMENTED</I></SPAN>), as described below.</P>
     <P>The `Template-MD5Sum' entry is added by <B>jigdo-file</B> and
      specifies the MD5 checksum of the generated `<TT>.template</TT>' file.
      It is used by <B>jigdo</B> to detect cases where the downloaded
      template data is corrupted or belongs to a different image.</P>
-    <P>Unlike other entry values, the values of the `<VAR>ShortInfo</VAR>'
-     and `<VAR>Info</VAR>' entries are <SPAN><I>not</I></SPAN> split up
-     into words, instead all quoting is preserved.</P>
-    <P>The value of the `<VAR>Info</VAR>' entry is special in that <SPAN
+    <P>Unlike other entry values, the values of the `<TT>ShortInfo</TT>'
+     and `<TT>Info</TT>' entries are <SPAN><I>not</I></SPAN> split up into
+     words, instead all quoting is preserved.</P>
+    <P>The value of the `<TT>Info</TT>' entry is special in that <SPAN
      ><SPAN>jigdo</SPAN>(1)</SPAN> can optionally parse XML markup it
      contains. If the markup has errors such as unbalanced/unsupported
      tags, the string is displayed literally, without XML parsing.
-     Supported tags are <VAR>&lt;b&gt;&lt;/b&gt;</VAR> (bold), <VAR
-     >&lt;i&gt;&lt;/i&gt;</VAR> (italic), <VAR>&lt;tt&gt;&lt;/tt&gt;</VAR>
-     (typewriter font), <VAR>&lt;u&gt;&lt;/u&gt;</VAR> (underline), <VAR
-     >&lt;big&gt;&lt;/big&gt;</VAR> (larger font), <VAR
-     >&lt;small&gt;&lt;/small&gt;</VAR> (smaller font) and <VAR
-     >&lt;br/&gt;</VAR> (linebreak). Supported entities include <VAR
-     >&amp;lt;</VAR> (`&lt;'), <VAR>&amp;gt;</VAR> (`&gt;') and <VAR
-     >&amp;amp;</VAR> (`&amp;'). Note that the whole `<VAR>Info</VAR>'
-     entry must be on one line in the jigdo file.</P>
+     Supported tags are <TT>&lt;b&gt;&lt;/b&gt;</TT> (bold), <TT
+     >&lt;i&gt;&lt;/i&gt;</TT> (italic), <TT>&lt;tt&gt;&lt;/tt&gt;</TT>
+     (typewriter font), <TT>&lt;u&gt;&lt;/u&gt;</TT> (underline), <TT
+     >&lt;big&gt;&lt;/big&gt;</TT> (larger font), <TT
+     >&lt;small&gt;&lt;/small&gt;</TT> (smaller font) and <TT
+     >&lt;br/&gt;</TT> (linebreak). Supported entities include <TT
+     >&amp;lt;</TT> (`&lt;'), <TT>&amp;gt;</TT> (`&gt;') and <TT
+     >&amp;amp;</TT> (`&amp;'). Note that the whole `<TT>Info</TT>' entry
+     must be on one line in the jigdo file.</P>
     <P>This section may occur multiple times, but all except the first one
      will be ignored. This is useful e.g. when creating a `<TT>.jigdo</TT
      >' file for a DVD image when you already have `<TT>.jigdo</TT>' files
-     for CDs with the same content: You can simply `<VAR>[Include]</VAR>'
+     for CDs with the same content: You can simply `<TT>[Include]</TT>'
      (see below) the CDs' jigdo files at the end of the DVD jigdo file,
-     after its `<VAR>[Image]</VAR>' section.</P></DIV>
+     after its `<TT>[Image]</TT>' section.</P></DIV>
    <DIV><A NAME="PARTS-SECTION"></A>
     <H3>Parts section</H3><PRE>[Parts]
 xJNkjrq8NYMraeGavUpllw=LabelA:part0
@@ -661,27 +725,27 @@ GoTResP2EC6Lb_2wTsqOoQ=LabelA:part1
 kyfebwu6clbYqqWUdFIyaw=LabelB:some/path/part2
 -J9UAimo0Bqg9c0oOXI1mQ=http://some.where.com/part3</PRE>
     <P>All lines in the section, which provides the mapping from MD5
-     checksums to URIs, have the same format: On the left side of the `<VAR
-     >=</VAR>' the checksum (encoded with a Base64-like encoding) is given,
+     checksums to URIs, have the same format: On the left side of the `<TT
+     >=</TT>' the checksum (encoded with a Base64-like encoding) is given,
      and on the right a string corresponding to the part with this
-     checksum; either a complete URI or a string of the form `<VAR
-     >Label</VAR>:<VAR>pathname</VAR>', which is expanded into one or more
-     URIs by looking up the definition(s) for the <VAR>Label</VAR> in the
-     `<VAR>[Servers]</VAR>' section.</P>
-    <P>In case a particular MD5 checksum cannot be found in any `<VAR
-     >[Parts]</VAR>' section by <B>jigdo</B>, the program will perform a
-     lookup for `<VAR>MD5Sum:</VAR><VAR>&lt;checksum&gt;</VAR>', e.g. for
-     `<VAR>MD5Sum:xJNkjrq8NYMraeGavUpllw</VAR>' if you deleted the line for
-     `part0' above.</P>
+     checksum; either a complete URI or a string of the form `<TT><I
+     >Label</I></TT>:<TT><I>pathname</I></TT>', which is expanded into one
+     or more URIs by looking up the definition(s) for the <TT><I>Label</I
+     ></TT> in the `<TT>[Servers]</TT>' section.</P>
+    <P>In case a particular MD5 checksum cannot be found in any `<TT
+     >[Parts]</TT>' section by <B>jigdo</B>, the program will perform a
+     lookup for `<TT>MD5Sum:</TT><TT><I>&lt;checksum&gt;</I></TT>', e.g.
+     for `<TT>MD5Sum:xJNkjrq8NYMraeGavUpllw</TT>' if you deleted the line
+     for `part0' above.</P>
     <P>A checksum appearing multiple times in this section indicates
      alternative download locations for the part.</P>
-    <P>There may be any number of `<VAR>[Parts]</VAR>' sections in the
-     file; they are all considered when looking up MD5 checksums.</P>
-    <P><B>jigdo-file</B> always puts the `<VAR>[Parts]</VAR>' section at
-     the end of the file, and it even rearranges any file specified with
-     <VAR>--merge</VAR> to have only one such section at the end. This is
-     done to allow <B>jigdo</B> to display the information from the `<VAR
-     >[Image]</VAR>' section while the rest of that file is still being
+    <P>There may be any number of `<TT>[Parts]</TT>' sections in the file;
+     they are all considered when looking up MD5 checksums.</P>
+    <P><B>jigdo-file</B> always puts the `<TT>[Parts]</TT>' section at the
+     end of the file, and it even rearranges any file specified with <CODE
+     >--merge</CODE> to have only one such section at the end. This is done
+     to allow <B>jigdo</B> to display the information from the `<TT
+     >[Image]</TT>' section while the rest of that file is still being
      downloaded.</P></DIV>
    <DIV><A NAME="SERVERS-SECTION"></A>
     <H3>Servers section</H3><PRE>[Servers]
@@ -691,63 +755,64 @@ LabelB=LabelC:subdirectory/
 LabelC=http://some.where.com/jigdo/</PRE>
     <P>All lines in the section, which provides the mapping from server
      labels to server locations, have the same format: On the left side of
-     the `<VAR>=</VAR>' the label name is given, and on the right the value
+     the `<TT>=</TT>' the label name is given, and on the right the value
      to expand the label name to.</P>
     <P>A label name appearing multiple times in this section indicates
      alternative download locations for the parts that use the label in the
-     `<VAR>[Parts]</VAR>' section. This notation makes it very easy to add
+     `<TT>[Parts]</TT>' section. This notation makes it very easy to add
      mirrors to the jigdo file.</P>
     <P>As shown by the example above, the label values may themselves
      reference other labels. In this case, the entry
-     `LabelB:some/path/part2' in the `<VAR>[Parts]</VAR>' section will
-     expand to `http://some.where.com/jigdo/subdirectory/some/path/part2'.
-     Loops in the label definitions result in undefined behaviour and must
-     be avoided.</P>
-    <P>There may be any number of `<VAR>[Servers]</VAR>' sections in the
-     file; they are all considered when looking up labels. Either of `<VAR
-     >[Parts]</VAR>' or `<VAR>[Servers]</VAR>', but not both, can be
-     omitted from the jigdo file.</P></DIV>
+     `LabelB:some/path/part2' in the `<TT>[Parts]</TT>' section will expand
+     to `http://some.where.com/jigdo/subdirectory/some/path/part2'. Loops
+     in the label definitions result in undefined behaviour and must be
+     avoided.</P>
+    <P>There may be any number of `<TT>[Servers]</TT>' sections in the
+     file; they are all considered when looking up labels. Either of `<TT
+     >[Parts]</TT>' or `<TT>[Servers]</TT>', but not both, can be omitted
+     from the jigdo file.</P></DIV>
    <DIV><A NAME="COMMENT-SECTION"></A>
     <H3>Comment section</H3><PRE>[Comment]
 Any text, except that lines must not begin with `['.</PRE>
-    <P>All text following a `<VAR>[Comment]</VAR>' or `<VAR>[comment]</VAR
-     >' line is ignored, up to the next line with a section label.</P
-    ></DIV>
+    <P>All text following a `<TT>[Comment]</TT>' or `<TT>[comment]</TT>'
+     line is ignored, up to the next line with a section label.</P></DIV>
    <DIV><A NAME="INCLUDE"></A>
     <H3>Include directive</H3><PRE>[Include http://some.url/file.jigdo]</PRE
     >
     <P>Lines of this form cause the content of the specified jigdo file to
      be downloaded and parsed just like the main jigdo file. The effect
      will be the same as copying the included file's contents into the file
-     which contains the include directive.</P>
+     which contains the include directive. (Exception: Any relative URLs
+     are always resolved using the URL of the `<TT>.jigdo</TT>' file that
+     contains that relative URL.)</P>
     <P>The URL argument can be an absolute or relative URL. Relative URLs
      are assumed to be relative to the URL of the jigdo file which contains
      the include directive. Includes can be nested, but it is an error to
      create a loop of include directives. It is <SPAN><I>not</I></SPAN>
-     possible to use URLs of the form `<VAR>Label</VAR>:<VAR>pathname</VAR
-     >'.</P>
-    <P>The URL cannot be quoted with "". Any `<VAR>]</VAR>' characters in
-     the argument must be escaped as `<VAR>%5D</VAR>', and any spaces as
-     `<VAR>%20</VAR>'.</P>
+     possible to use URLs of the form `<TT><I>Label</I></TT>:<TT><I
+     >pathname</I></TT>'.</P>
+    <P>The URL cannot be quoted with "". Any `<TT>]</TT>' characters in the
+     argument must be escaped as `<TT>%5D</TT>', and any spaces as `<TT
+     >%20</TT>'.</P>
     <P>Include directives are only supported by <B>jigdo</B>, they are
      ignored by <B>jigdo-lite</B>.</P>
     <P>An include directive terminates any previous section, but it does
      not start a new one. In other words, a new section must always be
      started after the include line, <B>jigdo</B> does not allow normal
-     entries to appear below the `<VAR>[Include]</VAR>'.</P></DIV></DIV>
+     entries to appear below the `<TT>[Include]</TT>'.</P></DIV></DIV>
   <DIV><A NAME="CACHE-FILES"></A>
    <H2>CACHE FILES</H2>
-   <P>Any file specified with the <VAR>--cache</VAR> option is used to
-    store information about the <VAR>FILES</VAR> presented to <B
+   <P>Any file specified with the <CODE>--cache</CODE> option is used to
+    store information about the <TT><I>FILES</I></TT> presented to <B
     >jigdo-file</B>. When querying the cache, a file is considered
     unchanged (and the cached data is used) only if filename, file size and
     last modification time (mtime) match exactly. For the filename match,
-    not the entire file name is used, but only the part following any `<VAR
-    >//</VAR>', so that any changes to the part before the `<VAR>//</VAR>'
+    not the entire file name is used, but only the part following any `<TT
+    >//</TT>', so that any changes to the part before the `<TT>//</TT>'
     will not invalidate the cache.</P>
    <P>Old cache entries are removed from the cache if they have not been
-    read from or written to for the amount of time specified with <VAR
-    >--cache-expiry</VAR>. Entries are <SPAN><I>not</I></SPAN> immediately
+    read from or written to for the amount of time specified with <CODE
+    >--cache-expiry</CODE>. Entries are <SPAN><I>not</I></SPAN> immediately
     removed from the cache if the file they refer to no longer exists -
     this makes it possible to cache information about files on removable
     media.</P>
@@ -764,14 +829,14 @@ Any text, except that lines must not begin with `['.</PRE>
     was expired from your cache file and you want it to shrink, you can
     either just delete it (of course then everything will have to be
     regenerated) or use the utilities accompanying libdb3 to dump and
-    restore the database, with a command like `<B>db3_dump <VAR
-    >old-cache.db</VAR> | db3_load <VAR>new-cache.db</VAR></B>'. <SPAN
-    ><SPAN>For Debian, these programs are supplied in the package
+    restore the database, with a command like `<B>db3_dump <TT><I
+    >old-cache.db</I></TT> | db3_load <TT><I>new-cache.db</I></TT></B>'.
+    <SPAN><SPAN>For Debian, these programs are supplied in the package
     `libdb3-util'.</SPAN></SPAN></P>
-   <P>If a different <VAR>--md5-block-size</VAR> is specified, the entire
-    file needs to be re-read to update its cache entry. If a different <VAR
-    >--min-length</VAR> is specified, only the first `md5-block-size' bytes
-    of the file need to be re-read.</P></DIV>
+   <P>If a different <CODE>--md5-block-size</CODE> is specified, the entire
+    file needs to be re-read to update its cache entry. If a different
+    <CODE>--min-length</CODE> is specified, only the first `md5-block-size'
+    bytes of the file need to be re-read.</P></DIV>
   <DIV><A NAME="EXAMPLES"></A>
    <H2>EXAMPLES</H2>
    <DIV><A NAME="EX-CDIMAGE"></A>
@@ -784,7 +849,7 @@ Any text, except that lines must not begin with `['.</PRE>
      with users' downloads aborting after 200MB and their restarting the
      download dozens of times, you decide to use jigdo. How do you prepare
      the image for download?</P>
-    <P>In fact, only one command is necessary: <A NAME="AEN755"></A
+    <P>In fact, only one command is necessary: <A NAME="AEN799"></A
      ><BLOCKQUOTE>
      <P><B>jigdo-file make-template --image=image.iso
       --jigdo=/home/ftp/image.jigdo --template=/home/ftp/image.template
@@ -805,13 +870,14 @@ Any text, except that lines must not begin with `['.</PRE>
     <P>In this case, the parts of the image need to be generated
      artificially with the <B>split</B> command. For example, to create
      chunks of 4MB each, use `<B>split -b 4m movie.mpeg part</B>'. Copy the
-     resulting files `<TT>part<VAR>XX</VAR></TT>' into two directories `<TT
-     >1</TT>' and `<TT>2</TT>' that you create, according to how you want
-     the files distributed between the servers. Next, create the jigdo and
-     template files with `<B>jigdo-file make-template --image=movie.mpeg
-     1// 2//</B>'. You will need to edit the `<TT>.jigdo</TT>' file and
-     provide the right URIs for the two servers that you are going to
-     upload the `<TT>part<VAR>XX</VAR></TT>' files to.</P></DIV>
+     resulting files `<TT>part<TT><I>XX</I></TT></TT>' into two directories
+     `<TT>1</TT>' and `<TT>2</TT>' that you create, according to how you
+     want the files distributed between the servers. Next, create the jigdo
+     and template files with `<B>jigdo-file make-template
+     --image=movie.mpeg 1// 2//</B>'. You will need to edit the `<TT
+     >.jigdo</TT>' file and provide the right URIs for the two servers that
+     you are going to upload the `<TT>part<TT><I>XX</I></TT></TT>' files
+     to.</P></DIV>
    <DIV><A NAME="EX-CUSTOMIZE"></A>
     <H3>Customized versions of images</H3>
     <P>Because it is possible to assign a different URI for each part of an
@@ -824,19 +890,19 @@ Any text, except that lines must not begin with `['.</PRE>
      adding files from the `<TT>myfiles</TT>' directory on your harddisc)
      and produce your own version, `<TT>myversion.iso</TT>'. Next, you
      instruct <B>jigdo-file</B> to create the jigdo and template files for
-     your modified image, using the command <A NAME="AEN787"></A
+     your modified image, using the command <A NAME="AEN831"></A
      ><BLOCKQUOTE>
      <P><B>jigdo-file make-template --image=myversion.iso /mnt/cdrom/
       myfiles// --label My=myfiles/ --uri My=http://my.homepage.net/
       --merge=official.jigdo</B></P></BLOCKQUOTE> while `<TT
      >official.iso</TT>' is mounted under `<TT>/mnt/cdrom</TT>'. By using
-     <VAR>--merge</VAR>, you have told <B>jigdo-file</B> to take the
-     contents of `<TT>official.jigdo</TT>', add to it a new `<VAR
-     >[Image]</VAR>' section for `<TT>myversion.iso</TT>' and write the
+     <CODE>--merge</CODE>, you have told <B>jigdo-file</B> to take the
+     contents of `<TT>official.jigdo</TT>', add to it a new `<TT
+     >[Image]</TT>' section for `<TT>myversion.iso</TT>' and write the
      resulting jigdo file to `<TT>myversion.jigdo</TT>' - so now `<TT
      >myversion.jigdo</TT>' offers two images for download, the original
      version and your modified version. (If you do not want it to offer the
-     official version, edit it and remove the `<VAR>[Image]</VAR>' section
+     official version, edit it and remove the `<TT>[Image]</TT>' section
      that lists `<TT>official.iso</TT>'.)</P>
     <P>Now you can upload the `<TT>.jigdo</TT>' file, the `<TT
      >.template</TT>' file and also the files in `<TT>myfiles</TT>' to
@@ -860,17 +926,18 @@ Any text, except that lines must not begin with `['.</PRE>
   <DIV><A NAME="BUGS"></A>
    <H2>BUGS</H2>
    <P>For certain contents of one of the input files, most notably a
-    sequence of zero bytes longer than <VAR>--min-length</VAR> at the start
-    of the file and an area of zeros preceding the file data in the image,
-    <B>jigdo-file make-template</B> may fail to find the file in the image.
-    Unfortunately, this restriction cannot be avoided because the program
-    could become very slow otherwise. If you use the <VAR>--debug</VAR>
-    option, all instances of <B>jigdo-file</B> discarding possible matches
-    are indicated by lines containing the word `<VAR>DROPPED</VAR>'.</P>
+    sequence of zero bytes longer than <CODE>--min-length</CODE> at the
+    start of the file and an area of zeros preceding the file data in the
+    image, <B>jigdo-file make-template</B> may fail to find the file in the
+    image. Unfortunately, this restriction cannot be avoided because the
+    program could become very slow otherwise. If you use the <CODE
+    >--debug</CODE> option, all instances of <B>jigdo-file</B> discarding
+    possible matches are indicated by lines containing the word `<TT
+    >DROPPED</TT>'.</P>
    <P>In fact, not only all-zeroes files trigger this behaviour, but also
     files which contain at their start a long sequence of short identical
-    strings. For example, both a file containing only `<VAR>a</VAR>'
-    characters and one containing `<VAR>abcabcabcabc</VAR>...' are
+    strings. For example, both a file containing only `<TT>a</TT>'
+    characters and one containing `<TT>abcabcabcabc</TT>...' are
     problematic.</P></DIV>
   <DIV><A NAME="SEEALSO"></A>
    <H2>SEE ALSO</H2>
index bfafbf0..d3a51b6 100644 (file)
@@ -7,9 +7,9 @@
       <firstname>Richard</firstname><surname>Atterer</surname>
     </author>
     <copyright>
-      <year>2001-2003</year><holder>Richard Atterer</holder>
+      <year>2001-2005</year><holder>Richard Atterer</holder>
     </copyright>
-    <date>Sep 13, 2003</date>
+    <date>Jul 2, 2005</date>
   </refentryinfo>
   <refmeta>
     <refentrytitle>jigdo-file</refentrytitle>
             file, from <option>-0</option> (no compression) to
             <option>-9</option> (maximum compression). The default is
             <option>-9</option>, which can make the template
-            generation quite slow. The compression algorithm used is
-            the same as for <citerefentry>
+            generation quite slow. By default, the compression
+            algorithm used is the same as for <citerefentry>
             <refentrytitle>gzip</refentrytitle><manvolnum>1</manvolnum>
             </citerefentry>.</para>
           </listitem>
         </varlistentry>
 
+        <varlistentry>
+          <term><option>--gzip</option> and <option>--bzip2</option></term>
+          <listitem>
+            <para>Choose between the gzip and bzip2 compression
+            algorithms. The default is gzip. Bzip2 usually gives
+            a better compression ratio, but compression is
+            significantly slower than with gzip.</para>
+          </listitem>
+        </varlistentry>
+
         <varlistentry>
           <term><option>--min-length=<replaceable
             >BYTES</replaceable></option></term>
             with an earlier use of this option.</para>
           </listitem>
         </varlistentry>
+
+        <varlistentry>
+          <term><option>--greedy-matching</option></term>
+          <listitem>
+            <para><emphasis>This is the default.</emphasis> Imagine
+            that your image contains a <filename>.tar</filename> file
+            which in turn contains another file
+            <filename>x</filename>, and that you provide both the
+            <filename>.tar</filename> and the files inside it on the
+            command line. When <command>jigdo-file</command> scans the
+            image, it encounters the beginning of the
+            <filename>.tar</filename> file, and then the file
+            <filename>x</filename>.</para>
+
+           <para>At this point, a decision must be made: Should the
+           smaller file <filename>x</filename> be recorded as
+           matched, or should it be ignored in favour of the larger
+           (and thus better) match of the <filename>.tar</filename>
+           file?  Unfortunately, at this point it is not clear
+           whether there will actually be a full match of the
+           <filename>.tar</filename>, so by default, the program
+           prefers the small match.</para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term><option>--no-greedy-matching</option></term>
+          <listitem>
+            <para>In the case where a large partial match is present
+            and a shorter match has been confirmed, ignore the small
+            match. (See the option above.)</para>
+          </listitem>
+        </varlistentry>
+
       </variablelist>
 
     </refsect2>
       <option>--cache</option> option must be present for this
       command.</para>
 
+      <variablelist>
+        <varlistentry>
+          <term><option>--no-scan-whole-file</option></term>
+          <listitem>
+
+            <para><emphasis>This is the default.</emphasis> This only
+            causes the first <option>--md5-block-size</option> bytes
+            of each file to be read. If the cache is used later by
+            <command>jigdo-file make-image</command>, the rest of the
+            file will be read once these first bytes are recognized in
+            the input image.</para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term><option>--scan-whole-file</option></term>
+          <listitem>
+            <para>Immediately read the entire file contents and store
+            them in the cache.</para>
+          </listitem>
+        </varlistentry>
+      </variablelist>
+
     </refsect2>
     <!-- ========================================= -->
     <refsect2 id="md5sum">
@@ -987,18 +1054,23 @@ image-info   <replaceable>image-length  image-md5sum  rsyncsum-size</replaceable
 
     <para>`<filename>.jigdo</filename>' files can optionally be
     compressed with <citerefentry>
-       <refentrytitle>gzip</refentrytitle><manvolnum>1</manvolnum>
+    <refentrytitle>gzip</refentrytitle><manvolnum>1</manvolnum>
     </citerefentry>. <command>jigdo-file</command> always outputs
-    uncompressed files, which you can compress yourself. 
+    uncompressed files, which you can compress yourself.
     <command>jigdo-lite</command> supports single uncompressed and
-    compressed files. <command>jigdo</command> additionally supports
+    compressed files.</para>
+
+    <para>(Behaviour which may change in the future and which should
+    not be relied upon: <command>jigdo</command> additionally supports
     any number of concatenated plaintext and gzipped parts in the
     files - for example, you can compress a
     `<filename>.jigdo</filename>' file and then add a couple of lines
-    of uncompressed data to the end. In all cases, the
-    `<filename>.gz</filename>' extension should be removed from the
-    filename - the tools will determine automatically from the file
-    contents whether a file is compressed or not.</para>
+    of uncompressed data to the end.)</para>
+
+    <para>In all cases, the `<filename>.gz</filename>' extension
+    should be removed from the filename - the tools will determine
+    automatically from the file contents whether a file is compressed
+    or not.</para>
 
     <para>Below is a description of the individual section names used
     by jigdo.</para>
@@ -1174,7 +1246,10 @@ Any text, except that lines must not begin with `['.</screen>
       <para>Lines of this form cause the content of the specified
       jigdo file to be downloaded and parsed just like the main jigdo
       file. The effect will be the same as copying the included file's
-      contents into the file which contains the include directive.</para>
+      contents into the file which contains the include
+      directive. (Exception: Any relative URLs are always resolved
+      using the URL of the `<filename>.jigdo</filename>' file that
+      contains that relative URL.)</para>
 
       <para>The URL argument can be an absolute or relative URL. 
       Relative URLs are assumed to be relative to the URL of the jigdo
index 44ea6d9..31402bd 100644 (file)
@@ -3,7 +3,7 @@
 .\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
 .\" Please send any bug reports, improvements, comments, patches, 
 .\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "JIGDO-LITE" "1" "20 June 2004" "" ""
+.TH "JIGDO-LITE" "1" "10 July 2005" "" ""
 
 .SH NAME
 jigdo-lite \- Download jigdo files using wget
@@ -16,33 +16,49 @@ jigdo-lite \- Download jigdo files using wget
 See \fBjigdo-file\fR(1) for an introduction to
 Jigsaw Download.
 .PP
-Given the URL of a `\fI.jigdo\fR' file,
+Given the URL of a `\fI\&.jigdo\fR\&' file,
 \fBjigdo-lite\fR downloads the large file (e.g. a CD
 image) that has been made available through that URL.
 \fBwget\fR(1) is used to download the necessary
 pieces of administrative data (contained in the
-`\fI.jigdo\fR' file and a corresponding
-`\fI.template\fR' file) as well as the many pieces
+`\fI\&.jigdo\fR\&' file and a corresponding
+`\fI\&.template\fR\&' file) as well as the many pieces
 that the large file is made from. The
 \fBjigdo-file\fR(1) utility is used to reconstruct the
 large file from the pieces.
 .PP
-`\fI.jigdo\fR' files that contain references
+`\fI\&.jigdo\fR\&' files that contain references
 to Debian mirrors are treated specially: When such a file is
 recognized, you are asked to select one mirror out of a list of
 all Debian mirrors.
 .PP
 If \fBURL\fR is not given on the command line,
 the script prompts for a location to download the
-`\fI.jigdo\fR' file from.
+`\fI\&.jigdo\fR\&' file from. The following command
+line options are recognized:
+.TP
+\fB-h --help\fR
+Output short summary of command syntax.
+.TP
+\fB-v --version\fR
+Output version number.
+.TP
+\fB--scan \fIFILES\fB\fR
+Do not ask for "Files to scan", use this path.
+.TP
+\fB--noask\fR
+Do not ask any questions, instead behave as if the
+user had pressed Return at all prompts. This can be useful
+when running \fBjigdo-lite\fR from cron jobs or
+in other non-interactive environments.
 .SH "SEE ALSO"
 .PP
 \fBjigdo-file\fR(1),
 \fBjigdo-mirror\fR(1),
-\fBwget\fR(1) (or `\fBinfo wget\fR')
+\fBwget\fR(1) (or `\fBinfo wget\fR\&')
 .PP
 CD images for Debian Linux can be downloaded with
-jigdo <URL:http://www.debian.org/CD/jigdo-cd/>.
+jigdo <URL:http://www.debian.org/CD/jigdo-cd/>\&.
 .SH "AUTHOR"
 .PP
 Jigsaw
index 35e5cdf..194bb2c 100644 (file)
@@ -1,8 +1,9 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
+Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
 <HTML>
  <HEAD>
   <TITLE>jigdo-lite</TITLE><META NAME="GENERATOR" CONTENT="Modular DocBook
-  HTML Stylesheet Version 1.7"></HEAD>
+  HTML Stylesheet Version 1.79"></HEAD>
  <BODY CLASS="REFENTRY" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF"
   VLINK="#840084" ALINK="#0000FF">
   <H1><A NAME="AEN1"></A>jigdo-lite</H1>
    <P>`<TT>.jigdo</TT>' files that contain references to Debian mirrors are
     treated specially: When such a file is recognized, you are asked to
     select one mirror out of a list of all Debian mirrors.</P>
-   <P>If <VAR>URL</VAR> is not given on the command line, the script
-    prompts for a location to download the `<TT>.jigdo</TT>' file from.</P
-   ></DIV>
+   <P>If <CODE>URL</CODE> is not given on the command line, the script
+    prompts for a location to download the `<TT>.jigdo</TT>' file from. The
+    following command line options are recognized:</P>
+   <P></P>
+   <DIV>
+    <DL>
+     <DT><CODE>-h</CODE> <CODE>--help</CODE></DT>
+     <DD>
+      <P>Output short summary of command syntax.</P></DD>
+     <DT><CODE>-v</CODE> <CODE>--version</CODE></DT>
+     <DD>
+      <P>Output version number.</P></DD>
+     <DT><CODE>--scan</CODE> <TT><I>FILES</I></TT></DT>
+     <DD>
+      <P>Do not ask for "Files to scan", use this path.</P></DD>
+     <DT><CODE>--noask</CODE></DT>
+     <DD>
+      <P>Do not ask any questions, instead behave as if the user had
+       pressed Return at all prompts. This can be useful when running <B
+       >jigdo-lite</B> from cron jobs or in other non-interactive
+       environments.</P></DD></DL></DIV></DIV>
   <DIV><A NAME="SEEALSO"></A>
    <H2>SEE ALSO</H2>
    <P> <SPAN><SPAN>jigdo-file</SPAN>(1)</SPAN>, <SPAN><SPAN
index ca02375..facbfbd 100644 (file)
 
     <para>If <option>URL</option> is not given on the command line,
     the script prompts for a location to download the
-    `<filename>.jigdo</filename>' file from.</para>
+    `<filename>.jigdo</filename>' file from. The following command
+    line options are recognized:</para>
+
+    <variablelist>
+
+      <varlistentry>
+        <term><option>-h</option> <option>--help</option></term>
+        <listitem>
+          <para>Output short summary of command syntax.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-v</option> <option>--version</option></term>
+        <listitem>
+          <para>Output version number.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>--scan</option> <replaceable>FILES</replaceable></term>
+        <listitem>
+          <para>Do not ask for "Files to scan", use this path.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>--noask</option></term>
+        <listitem>
+          <para>Do not ask any questions, instead behave as if the
+          user had pressed Return at all prompts. This can be useful
+          when running <command>jigdo-lite</command> from cron jobs or
+          in other non-interactive environments.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
 
   </refsect1>
   <!-- ============================================================= -->
index 394c225..c965466 100644 (file)
@@ -3,7 +3,7 @@
 .\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
 .\" Please send any bug reports, improvements, comments, patches, 
 .\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "JIGDO-MIRROR" "1" "20 June 2004" "" ""
+.TH "JIGDO-MIRROR" "1" "10 July 2005" "" ""
 
 .SH NAME
 jigdo-mirror \- Maintain a mirror of images offered with jigdo
@@ -22,18 +22,18 @@ which only the jigdo and template files are available.
 .PP
 As the first step of using \fBjigdo-mirror\fR,
 you need to set up normal HTTP/FTP/rsync mirroring both of the
-`\fI.jigdo\fR'/`\fI.template\fR'
+`\fI\&.jigdo\fR\&'/`\fI\&.template\fR\&'
 files and of the parts that are needed for the reconstruction of
 the images. For example, in the case that you want to mirror
 Debian CD images with \fBjigdo-mirror\fR, you need a
 mirror of the
-`\fI.jigdo\fR'/`\fI.template\fR'
+`\fI\&.jigdo\fR\&'/`\fI\&.template\fR\&'
 files and a Debian mirror on the local machine.
 .PP
 At regular intervals (preferably immediately after the
 normal mirroring has finished), schedule a run of
-\fBjigdo-mirror\fR. It will search through a given
-directory for any `\fI.jigdo\fR' files and attempt
+\fBjigdo-mirror\fR\&. It will search through a given
+directory for any `\fI\&.jigdo\fR\&' files and attempt
 to create all images offered by each file.
 .PP
 The script requires you to set a number of variables -
@@ -44,7 +44,7 @@ will be overwritten whenever you upgrade
 \fBjigdo-mirror\fR, it is highly recommended
 \fBnot\fR to change the settings directly in this
 script. Instead, personal settings should be saved in a file
-called \fI.jigdo-mirror\fR in your home directory,
+called \fI\&.jigdo-mirror\fR in your home directory,
 or in a different file whose name is then passed to the script as
 its first (and only) command line argument.
 .SH "SEE ALSO"
@@ -53,7 +53,7 @@ its first (and only) command line argument.
 \fBjigdo-lite\fR(1)
 .PP
 CD images for Debian Linux can be downloaded with
-jigdo <URL:http://www.debian.org/CD/jigdo-cd/>.
+jigdo <URL:http://www.debian.org/CD/jigdo-cd/>\&.
 .SH "AUTHOR"
 .PP
 Jigsaw
index 6932a84..c8f3725 100644 (file)
@@ -1,8 +1,9 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
+Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
 <HTML>
  <HEAD>
   <TITLE>jigdo-mirror</TITLE><META NAME="GENERATOR" CONTENT="Modular
-  DocBook HTML Stylesheet Version 1.7"></HEAD>
+  DocBook HTML Stylesheet Version 1.79"></HEAD>
  <BODY CLASS="REFENTRY" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF"
   VLINK="#840084" ALINK="#0000FF">
   <H1><A NAME="AEN1"></A>jigdo-mirror</H1>
index f502253..23eb602 100644 (file)
@@ -3,7 +3,7 @@
 .\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
 .\" Please send any bug reports, improvements, comments, patches, 
 .\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "JIGDO" "1" "20 June 2004" "" ""
+.TH "JIGDO" "1" "10 July 2005" "" ""
 
 .SH NAME
 jigdo \- GTK+ download manager.
@@ -16,7 +16,7 @@ jigdo \- GTK+ download manager.
 BETA version of the jigdo download manager.
 .PP
 This version is not yet capable of processing
-`\fI.jigdo\fR' files - use \fBjigdo-lite\fR(1) for that.
+`\fI\&.jigdo\fR\&' files - use \fBjigdo-lite\fR(1) for that.
 .PP
 \fBjigdo\fR is a GTK+ download manager with FTP
 and HTTP 1.1 pipelining support, pausing, continuing and resuming
index 763e77a..67c132d 100644 (file)
@@ -1,8 +1,9 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
+Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
 <HTML>
  <HEAD>
   <TITLE>jigdo</TITLE><META NAME="GENERATOR" CONTENT="Modular DocBook HTML
-  Stylesheet Version 1.7"></HEAD>
+  Stylesheet Version 1.79"></HEAD>
  <BODY CLASS="REFENTRY" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF"
   VLINK="#840084" ALINK="#0000FF">
   <H1><A NAME="AEN1"></A>jigdo</H1>
index 5c5c937..82d43d0 100644 (file)
   <property name="window_position">GTK_WIN_POS_NONE</property>
   <property name="modal">False</property>
   <property name="default_width">640</property>
-  <property name="default_height">430</property>
+  <property name="default_height">480</property>
   <property name="resizable">True</property>
   <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
   <signal name="delete_event" handler="on_window_delete_event"/>
 
   <child>
              <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
              <property name="toolbar_style">GTK_TOOLBAR_BOTH</property>
              <property name="tooltips">True</property>
+             <property name="show_arrow">True</property>
 
              <child>
-               <widget class="button" id="toolbarOpen">
+               <widget class="GtkToolButton" id="toolbarOpen">
                  <property name="border_width">1</property>
                  <property name="visible">True</property>
                  <property name="sensitive">False</property>
                  <property name="tooltip" translatable="yes">Open new .jigdo file or URL</property>
-                 <property name="label">gtk-new</property>
-                 <property name="use_stock">True</property>
+                 <property name="can_focus">True</property>
+                 <property name="stock_id">gtk-new</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
                  <signal name="clicked" handler="setNotebookPage" object="pageOpen" last_modification_time="Sun, 02 Feb 2003 19:57:12 GMT"/>
                </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
              </child>
 
              <child>
-               <widget class="button" id="toolbarReuse">
+               <widget class="GtkToolButton" id="toolbarReuse">
                  <property name="border_width">1</property>
                  <property name="sensitive">False</property>
                  <property name="tooltip" translatable="yes">Scan local filesystems for data needed by jigsaw downloads - useful when &quot;upgrading&quot; e.g. a CD image to a newer version</property>
+                 <property name="can_focus">True</property>
                  <property name="label" translatable="yes">Reuse files</property>
                  <property name="use_underline">True</property>
-                 <property name="stock_pixmap">gtk-refresh</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
                  <signal name="clicked" handler="setNotebookPage" object="pageReuse"/>
                </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
              </child>
 
              <child>
-               <widget class="button" id="toolbarSettings">
+               <widget class="GtkSeparatorToolItem" id="separatortoolitem1">
+                 <property name="visible">True</property>
+                 <property name="draw">True</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">False</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkToolButton" id="toolbarSettings">
                  <property name="border_width">1</property>
                  <property name="sensitive">False</property>
                  <property name="tooltip" translatable="yes">Change preferences</property>
-                 <property name="label">gtk-properties</property>
-                 <property name="use_stock">True</property>
-                 <property name="new_group">True</property>
+                 <property name="can_focus">True</property>
+                 <property name="stock_id">gtk-properties</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
                </widget>
                <packing>
-                 <property name="new_group">True</property>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
                </packing>
              </child>
 
              <child>
-               <widget class="button" id="toolbarExit">
+               <widget class="GtkToolButton" id="toolbarExit">
                  <property name="border_width">1</property>
                  <property name="visible">True</property>
                  <property name="tooltip" translatable="yes">Exit from Jigsaw Download</property>
-                 <property name="label">gtk-quit</property>
-                 <property name="use_stock">True</property>
+                 <property name="can_focus">True</property>
+                 <property name="stock_id">gtk-quit</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
                  <signal name="clicked" handler="on_toolbarExit_clicked"/>
-                 <accelerator key="Q" modifiers="GDK_MOD1_MASK" signal="clicked"/>
                </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
              </child>
            </widget>
          </child>
                      <child>
                        <widget class="GtkEventBox" id="aboutBgnd">
                          <property name="visible">True</property>
+                         <property name="visible_window">True</property>
+                         <property name="above_child">False</property>
 
                          <child>
                            <widget class="GtkVBox" id="vbox9">
                                <widget class="GtkButton" id="aboutJigdoButton">
                                  <property name="visible">True</property>
                                  <property name="relief">GTK_RELIEF_NONE</property>
+                                 <property name="focus_on_click">True</property>
                                  <signal name="clicked" handler="on_aboutJigdoButton_clicked"/>
 
                                  <child>
                                      <property name="yalign">0.5</property>
                                      <property name="xscale">1</property>
                                      <property name="yscale">1</property>
+                                     <property name="top_padding">0</property>
+                                     <property name="bottom_padding">0</property>
+                                     <property name="left_padding">0</property>
+                                     <property name="right_padding">0</property>
 
                                      <child>
                                        <widget class="GtkLabel" id="aboutJigdoButtonLabel">
                            <widget class="GtkButton" id="openButton">
                              <property name="visible">True</property>
                              <property name="can_default">True</property>
+                             <property name="has_default">True</property>
                              <property name="can_focus">True</property>
+                             <property name="has_focus">True</property>
                              <property name="relief">GTK_RELIEF_NORMAL</property>
+                             <property name="focus_on_click">True</property>
                              <signal name="clicked" handler="on_openButton_clicked" last_modification_time="Wed, 05 Feb 2003 15:19:59 GMT"/>
 
                              <child>
                                  <property name="yalign">0.5</property>
                                  <property name="xscale">0</property>
                                  <property name="yscale">0</property>
+                                 <property name="top_padding">0</property>
+                                 <property name="bottom_padding">0</property>
+                                 <property name="left_padding">0</property>
+                                 <property name="right_padding">0</property>
 
                                  <child>
                                    <widget class="GtkHBox" id="hbox95">
                              <property name="max_length">0</property>
                              <property name="text" translatable="yes"></property>
                              <property name="has_frame">True</property>
-                             <property name="invisible_char" translatable="yes">*</property>
+                             <property name="invisible_char">*</property>
                              <property name="activates_default">False</property>
                              <signal name="activate" handler="on_openButton_clicked"/>
                            </widget>
                              <property name="max_length">0</property>
                              <property name="text" translatable="yes"></property>
                              <property name="has_frame">True</property>
-                             <property name="invisible_char" translatable="yes">*</property>
+                             <property name="invisible_char">*</property>
                              <property name="activates_default">False</property>
                              <signal name="activate" handler="on_openButton_clicked"/>
                            </widget>
                              <property name="label" translatable="yes">Browse...</property>
                              <property name="use_underline">True</property>
                              <property name="relief">GTK_RELIEF_NORMAL</property>
+                             <property name="focus_on_click">True</property>
                            </widget>
                            <packing>
                              <property name="left_attach">2</property>
                              <property name="label" translatable="yes">Browse...</property>
                              <property name="use_underline">True</property>
                              <property name="relief">GTK_RELIEF_NORMAL</property>
+                             <property name="focus_on_click">True</property>
                            </widget>
                            <packing>
                              <property name="left_attach">2</property>
@@ -590,7 +648,7 @@ Note that any directory to be scanned must contain single files which would othe
                          <property name="max_length">0</property>
                          <property name="text" translatable="yes"></property>
                          <property name="has_frame">True</property>
-                         <property name="invisible_char" translatable="yes">*</property>
+                         <property name="invisible_char">*</property>
                          <property name="activates_default">False</property>
                        </widget>
                        <packing>
@@ -607,6 +665,7 @@ Note that any directory to be scanned must contain single files which would othe
                          <property name="label" translatable="yes">Browse...</property>
                          <property name="use_underline">True</property>
                          <property name="relief">GTK_RELIEF_NORMAL</property>
+                         <property name="focus_on_click">True</property>
                        </widget>
                        <packing>
                          <property name="padding">0</property>
@@ -634,6 +693,7 @@ Note that any directory to be scanned must contain single files which would othe
                          <property name="can_default">True</property>
                          <property name="can_focus">True</property>
                          <property name="relief">GTK_RELIEF_NORMAL</property>
+                         <property name="focus_on_click">True</property>
 
                          <child>
                            <widget class="GtkHBox" id="hbox59">
@@ -684,6 +744,7 @@ Note that any directory to be scanned must contain single files which would othe
                          <property name="label" translatable="yes">Clear cache</property>
                          <property name="use_underline">True</property>
                          <property name="relief">GTK_RELIEF_NORMAL</property>
+                         <property name="focus_on_click">True</property>
                        </widget>
                        <packing>
                          <property name="padding">0</property>
@@ -797,6 +858,7 @@ Note that any directory to be scanned must contain single files which would othe
                                  <property name="visible">True</property>
                                  <property name="can_focus">True</property>
                                  <property name="relief">GTK_RELIEF_NORMAL</property>
+                                 <property name="focus_on_click">True</property>
                                  <signal name="enter" handler="on_download_closeButton_enter" last_modification_time="Tue, 25 Feb 2003 22:09:53 GMT"/>
                                  <signal name="leave" handler="on_download_button_leave" last_modification_time="Tue, 25 Feb 2003 22:10:02 GMT"/>
                                  <signal name="clicked" handler="on_download_closeButton_clicked" last_modification_time="Tue, 25 Feb 2003 23:11:45 GMT"/>
@@ -825,6 +887,7 @@ Note that any directory to be scanned must contain single files which would othe
                                  <property name="visible">True</property>
                                  <property name="can_focus">True</property>
                                  <property name="relief">GTK_RELIEF_NORMAL</property>
+                                 <property name="focus_on_click">True</property>
                                  <signal name="enter" handler="on_download_restartButton_enter" last_modification_time="Mon, 03 Mar 2003 16:05:10 GMT"/>
                                  <signal name="leave" handler="on_download_button_leave" last_modification_time="Tue, 25 Feb 2003 22:09:46 GMT"/>
                                  <signal name="clicked" handler="on_download_restartButton_clicked" last_modification_time="Mon, 03 Mar 2003 16:05:21 GMT"/>
@@ -875,6 +938,7 @@ Note that any directory to be scanned must contain single files which would othe
                                  <property name="visible">True</property>
                                  <property name="can_focus">True</property>
                                  <property name="relief">GTK_RELIEF_NORMAL</property>
+                                 <property name="focus_on_click">True</property>
                                  <signal name="enter" handler="on_download_stopButton_enter" last_modification_time="Tue, 25 Feb 2003 22:09:15 GMT"/>
                                  <signal name="leave" handler="on_download_button_leave" last_modification_time="Tue, 25 Feb 2003 22:09:26 GMT"/>
                                  <signal name="clicked" handler="on_download_stopButton_clicked" last_modification_time="Tue, 25 Feb 2003 23:11:33 GMT"/>
@@ -903,6 +967,7 @@ Note that any directory to be scanned must contain single files which would othe
                                  <property name="visible">True</property>
                                  <property name="can_focus">True</property>
                                  <property name="relief">GTK_RELIEF_NORMAL</property>
+                                 <property name="focus_on_click">True</property>
                                  <signal name="enter" handler="on_download_pauseButton_enter" last_modification_time="Tue, 25 Feb 2003 18:23:27 GMT"/>
                                  <signal name="leave" handler="on_download_button_leave" last_modification_time="Tue, 25 Feb 2003 18:23:57 GMT"/>
                                  <signal name="clicked" handler="on_download_pauseButton_clicked" last_modification_time="Tue, 25 Feb 2003 23:11:22 GMT"/>
@@ -931,6 +996,7 @@ Note that any directory to be scanned must contain single files which would othe
                                  <property name="visible">True</property>
                                  <property name="can_focus">True</property>
                                  <property name="relief">GTK_RELIEF_NORMAL</property>
+                                 <property name="focus_on_click">True</property>
                                  <signal name="enter" handler="on_download_startButton_enter" last_modification_time="Tue, 25 Feb 2003 22:08:55 GMT"/>
                                  <signal name="leave" handler="on_download_button_leave" last_modification_time="Tue, 25 Feb 2003 22:09:06 GMT"/>
                                  <signal name="clicked" handler="on_download_startButton_clicked" last_modification_time="Tue, 25 Feb 2003 23:10:43 GMT"/>
@@ -1315,7 +1381,7 @@ need to complete step 2 before the actual file download can start!&lt;/b&gt;</pr
                                      <property name="justify">GTK_JUSTIFY_LEFT</property>
                                      <property name="wrap">False</property>
                                      <property name="selectable">True</property>
-                                     <property name="xalign">7.45058e-09</property>
+                                     <property name="xalign">7.45058015283e-09</property>
                                      <property name="yalign">0.5</property>
                                      <property name="xpad">0</property>
                                      <property name="ypad">0</property>
@@ -1375,6 +1441,7 @@ x</property>
                              <property name="can_default">True</property>
                              <property name="can_focus">True</property>
                              <property name="relief">GTK_RELIEF_NORMAL</property>
+                             <property name="focus_on_click">True</property>
 
                              <child>
                                <widget class="GtkAlignment" id="alignment3">
@@ -1383,6 +1450,10 @@ x</property>
                                  <property name="yalign">0.5</property>
                                  <property name="xscale">0</property>
                                  <property name="yscale">0</property>
+                                 <property name="top_padding">0</property>
+                                 <property name="bottom_padding">0</property>
+                                 <property name="left_padding">0</property>
+                                 <property name="right_padding">0</property>
 
                                  <child>
                                    <widget class="GtkHBox" id="hbox85">
@@ -1488,7 +1559,7 @@ x</property>
                              <property name="justify">GTK_JUSTIFY_LEFT</property>
                              <property name="wrap">False</property>
                              <property name="selectable">False</property>
-                             <property name="xalign">7.45058e-09</property>
+                             <property name="xalign">7.45058015283e-09</property>
                              <property name="yalign">0.5</property>
                              <property name="xpad">0</property>
                              <property name="ypad">0</property>
@@ -1545,7 +1616,7 @@ just click Next...</property>
                              <property name="max_length">0</property>