Imported Upstream version 2.6.0p1 upstream/2.6.0p1
authorBdale Garbee <bdale@gag.com>
Tue, 8 Jul 2008 09:04:09 +0000 (03:04 -0600)
committerBdale Garbee <bdale@gag.com>
Tue, 8 Jul 2008 09:04:09 +0000 (03:04 -0600)
120 files changed:
ChangeLog
NEWS
common-src/conffile.c
common-src/debug.c
common-src/file.c
common-src/genversion.h
common-src/security-util.c
common-src/svn-info.h
common-src/util.c
common-src/versuff.c
config/amanda/dumpers.m4
configure
configure.in
device-src/tape-device.c
man/amaddclient.8
man/amadmin.8
man/amaespipe.8
man/amanda-client.conf.5
man/amanda.8
man/amanda.conf.5
man/amcheck.8
man/amcheckdb.8
man/amcheckdump.8
man/amcleanup.8
man/amcrypt-ossl-asym.8
man/amcrypt-ossl.8
man/amcrypt.8
man/amcryptsimple.8
man/amdd.8
man/amdevcheck.8
man/amdump.8
man/amfetchdump.8
man/amflush.8
man/amgetconf.8
man/amgpgcrypt.8
man/amlabel.8
man/ammt.8
man/amoverview.8
man/amplot.8
man/amrecover.8
man/amreport.8
man/amrestore.8
man/amrmtape.8
man/amserverconfig.8
man/amstatus.8
man/amtape.8
man/amtapetype.8
man/amtoc.8
man/amverify.8
man/amverifyrun.8
man/xml-source/amaddclient.8.xml
man/xml-source/amadmin.8.xml
man/xml-source/amaespipe.8.xml
man/xml-source/amanda-client.conf.5.xml
man/xml-source/amanda.8.xml
man/xml-source/amanda.conf.5.xml
man/xml-source/amcheck.8.xml
man/xml-source/amcheckdb.8.xml
man/xml-source/amcheckdump.8.xml
man/xml-source/amcleanup.8.xml
man/xml-source/amcrypt-ossl-asym.8.xml
man/xml-source/amcrypt-ossl.8.xml
man/xml-source/amcrypt.8.xml
man/xml-source/amcryptsimple.8.xml
man/xml-source/amdd.8.xml
man/xml-source/amdevcheck.8.xml
man/xml-source/amdump.8.xml
man/xml-source/amfetchdump.8.xml
man/xml-source/amflush.8.xml
man/xml-source/amgetconf.8.xml
man/xml-source/amgpgcrypt.8.xml
man/xml-source/amlabel.8.xml
man/xml-source/ammt.8.xml
man/xml-source/amoverview.8.xml
man/xml-source/amplot.8.xml
man/xml-source/amrecover.8.xml
man/xml-source/amreport.8.xml
man/xml-source/amrestore.8.xml
man/xml-source/amrmtape.8.xml
man/xml-source/amserverconfig.8.xml
man/xml-source/amstatus.8.xml
man/xml-source/amtape.8.xml
man/xml-source/amtapetype.8.xml
man/xml-source/amtoc.8.xml
man/xml-source/amverify.8.xml
man/xml-source/amverifyrun.8.xml
packaging/deb/amanda-backup-client.dirs
packaging/deb/amanda-backup-server.dirs
packaging/deb/amanda-backup-server.postinst
packaging/deb/buildpkg
packaging/deb/changelog
packaging/deb/preinst
packaging/deb/rules
packaging/rpm/amanda.spec
packaging/rpm/amanda.spec.orig [new file with mode: 0644]
packaging/rpm/amanda.spec.rej
packaging/rpm/buildpkg
packaging/rpm/buildpkg.orig [new file with mode: 0755]
packaging/rpm/buildpkg.rej [new file with mode: 0644]
perl/Amanda/Cmdline.c
perl/Amanda/Cmdline.swg
perl/Amanda/Logfile.c
perl/Amanda/Logfile.pm
perl/Amanda/Logfile.swg
perl/Makefile.am
perl/Makefile.in
perl/amglue/dumpspecs.swg [new file with mode: 0644]
restore-src/amfetchdump.c
restore-src/amrestore.c
restore-src/restore.c
server-src/amadmin.c
server-src/amtrmlog.c
server-src/driver.c
server-src/dumper.c
server-src/find.c
server-src/find.h
server-src/infofile.c
server-src/planner.c
server-src/server_util.c
tape-src/tapetype.c

index c531c6d56629cd9ea37cd5e9cf6e865f0027a67b..42929cf126d5d044973e2a6e646b0e797e672493 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,115 @@
- 2008-03-31  Dan Locks <dwlocks@zmanda.com>
+2008-05-13 Dan Locks <dwlocks@zmanda.com>
+       * packaging/deb/buildpkg: modified build script to create unsigned
+         packages
+
+2008-05-12  Jean-Louis Martineau <martineau@zmanda.com>
+         Patch by Orion Poplawski
+       * server-src/planner.c: Warn about overwrite of last level 1, and
+         force backup of level 1 if overwrite on this run.
+
+2008-05-12  Dustin J. Mitchell <dustin@zmanda.com>
+       * server-src/dumper.c server-src/server_util.c
+         server-src/infofile.c server-src/amtrmlog.c common-src/debug.c
+         common-src/file.c: Always call mkpdir without the 02000 bit set,
+         as it is not needed and causes problems on MacOS X.
+
+2008-05-08  Jean-Louis Martineau <martineau@zmanda.com>
+       * packaging/deb/buildpkg packaging/rpm/buildpkg: AMVER=amanda-2.6.0p1
+       * packaging/deb/changelog: amanda (2.6.0p1-1)
+       * packaging/deb/rules: AMVER=2.6.0p1
+       * packaging/rpm/amanda.spec: amanda_version 2.6.0p1, amanda_release 1
+       * NEWS: Update for 2.6.0p1
+       * configure.in: AM_INIT_AUTOMAKE(amanda, "2.6.0p1")
+
+2008-05-08  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/conffile.c: Define default tapetype.
+
+2008-05-07  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/conffile.c: Check the tapetype is defined.
+
+2008-05-07  Jean-Louis Martineau <martineau@zmanda.com>
+       * device-src/tape-device.c: Allow user to set "read_buffer_size"
+                                   property.
+       * restore-src/amrestore.c: Don't limit blocksize to
+                                  --with-maxtapeblocksize.
+       * common-src/conffile.c: Increase readblocksize to blocksize.
+         blocksize and readblocksize can be bigger than
+         --with-maxtapeblocksize.
+
+2008-05-02 Dan Locks <dwlocks@zmanda.com>
+       * packaging/rpm/amanda.spec:  Replace ${ with %{ where applicable.
+
+2008-04-23  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/security-util.c: Typo.
+
+2008-04-23  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/driver.c: Always sent a FAILED to taper if dumper failed.
+
+2008-04-23  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/planner.c: Fix vstrextend use.
+
+2008-04-16  Dan Locks <dwlocks@zmanda.com>
+       * Fixes to debian package reported by daniel_P
+       * packaging/deb/preinst: remove spaces near ${amanda_group}
+       * packaging/deb/amanda-backup-server.dirs
+         packaging/deb/amanda-backup-client.dirs: added var/amanda and
+         usr/share/lintian/overrides
+       * packaging/deb/rules: added logic to find PERLSITELIB and append that
+         to amanda-backup-server.install, removed broken brace expansion
+       * packaging/deb/buildpkg: removed extraneous configure step
+       * packaging/deb/amanda-backup-server.postinst: added check for correct
+         permissions on /tmp/amanda
+         
+2008-04-16  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/amadmin.c: Improve message.
+       * man/xml-source/amanda.conf.5.xml: Fix man page.
+       * server-src/planner.c: Fix DS_INCRONLY and FORCE_FULL
+
+2008-04-16  Dustin J. Mitchell <dustin@zmanda.com>
+       * config/amanda/dumpers.m4: continue searching for gnutar if we
+         find a binary claiming to be gnu tar that is not.  This gets
+         around serious breakage on Ubuntu, where star is installed as
+         /bin/gnutar, but /bin/tar is actually GNU Tar.
+
+2008-04-15  Dustin J. Mitchell <dustin@zmanda.com>
+       * common-src/file.c(mk1dir): fix reversed conditional to handle 
+         a race condition
+
+2008-04-15  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/debug.c (debug_logging_handler, debug_printf): Don't print
+         msg_timestamp() to stderr.
+
+2008-04-15  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/find.c (dumps_match_dumpspecs): New function to only keep
+         dumps that match a dumpspecs, using it simplify amfetchdump.
+       * server-src/find.h (dumps_match_dumpspecs): Prototype.
+       * restore-src/amrestore.c: Add a first_restored_file to
+         search_a_tape(), to allow restore ot stop after the first image.
+       * restore-src/restore.c: Set first_restored_file, it was never set,
+         it's needed to stop after the first image.
+       * restore-src/restore.c (restore_from_tapelist): break if piping to
+         stdout.
+       * restore-src/amfetchdump.c: Use dumps_match_dumpspecs.
+       * restore-src/amfetchdump.c: If -p, the keep only one dump.
+       * perl/Amanda/Logfile.swg (dumps_match_dumpspecs): New prototype.
+       * perl/Amanda/Cmdline.swg: cmdline_parse_dumpspecs.
+       * perl/amglue/dumpspecs.swg: Map dumpspecs to perl.
+       * perl/Makefile.am (AMGLUE_SWG): Add amglue/dumpspecs.swg.
+
+2008-04-15  Jean-Louis Martineau <martineau@zmanda.com>
+       * tape-src/tapetype.c: Initialize an default config.
+
+2008-04-15  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/util.c (connect_portrange, connect_port, bind_portrange):
+         Return the latest errno reported.
+
+2008-04-04  Jean-Louis Martineau <martineau@zmanda.com>
+       * man/xml-source/*.xml: Use ulink tag to link to wiki.zmanda.com.
+
+2008-04-04  Jean-Louis Martineau <martineau@zmanda.com>
+       * restore-src/restore.c: Check last_header->type != F_UNKNOWN.
+
+2008-03-31  Dan Locks <dwlocks@zmanda.com>
        * packaging/deb/buildpkg
          packaging/rpm/buildpkg: added -p to cp to preserve file timestamps.
 
diff --git a/NEWS b/NEWS
index 02362b7ee8e241025f4b64791e056434e145d58b..88b0c32f31acc032f07a43ff2dcfcd8431c217bc 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,12 @@
+Changes in release 2.6.0p1
+
+   * Bugs fix only:
+        o amfetchdump -p
+        o amtapetype crash
+        o Fix DS_INCRONLY and FORCE_FULL
+        o planner crash 
+        o others small bugs
+
 Changes in release 2.6.0
 
    * configure --disable-shared doesn't work because perl modules require
index 2cc9cba4af08b9f56fd59bea8f0c5def55f48b60..b25484566f18790c3307973dc34e01d9560e704c 100644 (file)
@@ -1814,6 +1814,11 @@ get_tapetype(void)
               _("tapetype parameter expected"), 1, copy_tapetype);
     get_conftoken(CONF_NL);
 
+    if (tapetype_get_readblocksize(&tpcur) <
+       tapetype_get_blocksize(&tpcur)) {
+       conf_init_size(&tpcur.value[TAPETYPE_READBLOCKSIZE],
+                      tapetype_get_blocksize(&tpcur));
+    }
     save_tapetype();
 
     allow_overwrites = save_overwrites;
@@ -2918,9 +2923,6 @@ validate_blocksize(
     if(val_t__size(val) < DISK_BLOCK_KB) {
        conf_parserror(_("Tape blocksize must be at least %d KBytes"),
                  DISK_BLOCK_KB);
-    } else if(val_t__size(val) > MAX_TAPE_BLOCK_KB) {
-       conf_parserror(_("Tape blocksize must not be larger than %d KBytes"),
-                 MAX_TAPE_BLOCK_KB);
     }
 }
 
@@ -3369,6 +3371,22 @@ update_derived_values(
            val_t__int(v) = getconf_int(CNF_NETUSAGE);
            val_t__seen(v) = getconf_seen(CNF_NETUSAGE);
        }
+
+       /* Check the tapetype is defined */
+       if (lookup_tapetype(getconf_str(CNF_TAPETYPE)) == NULL) {
+           /* Create a default tapetype */
+           if (!getconf_seen(CNF_TAPETYPE) &&
+               strcmp(getconf_str(CNF_TAPETYPE), "EXABYTE") == 0 &&
+               !lookup_tapetype("EXABYTE")) {
+               init_tapetype_defaults();
+               tpcur.name = stralloc("EXABYTE");
+               tpcur.seen = -1;
+               save_tapetype();
+           } else {
+               conf_parserror(_("tapetype %s is not defined"),
+                              getconf_str(CNF_TAPETYPE));
+           }
+       }
     }
 
     /* fill in the debug_* values */
@@ -4415,7 +4433,11 @@ dump_configuration(void)
     }
 
     for(tp = tapelist; tp != NULL; tp = tp->next) {
-       g_printf("\nDEFINE TAPETYPE %s {\n", tp->name);
+       if(tp->seen == -1)
+           prefix = "#";
+       else
+           prefix = "";
+       g_printf("\n%sDEFINE TAPETYPE %s {\n", prefix, tp->name);
        for(i=0; i < TAPETYPE_TAPETYPE; i++) {
            for(np=tapetype_var; np->token != CONF_UNKNOWN; np++)
                if(np->parm == i) break;
@@ -4427,9 +4449,9 @@ dump_configuration(void)
            if(kt->token == CONF_UNKNOWN)
                error(_("tapetype bad token"));
 
-            val_t_print_token(stdout, NULL, "      %-9s ", kt, &tp->value[i]);
+            val_t_print_token(stdout, prefix, "      %-9s ", kt, &tp->value[i]);
        }
-       g_printf("}\n");
+       g_printf("%s}\n", prefix);
     }
 
     for(dp = dumplist; dp != NULL; dp = dp->next) {
index 7adbc00b241b2346c73914e6fb70d2193f4afca0..a6de4154c5efcf350f3bd7a5947649e7c8e7e06c 100644 (file)
@@ -155,7 +155,7 @@ debug_logging_handler(const gchar *log_domain G_GNUC_UNUSED,
        }
 
        if (erroutput_type & ERR_INTERACTIVE) {
-           g_fprintf(stderr, "%s: %s: %s\n", get_pname(), msg_timestamp(), message);
+           g_fprintf(stderr, "%s: %s\n", get_pname(), message);
            fflush(stderr);
        }
 
@@ -230,7 +230,7 @@ debug_setup_1(char *config, char *subdir)
        dbgdir = vstralloc(AMANDA_DBGDIR, "/", subdir, "/", NULL);
     else
        dbgdir = stralloc2(AMANDA_DBGDIR, "/");
-    if(mkpdir(dbgdir, 02700, get_client_uid(), get_client_gid()) == -1) {
+    if(mkpdir(dbgdir, 0700, get_client_uid(), get_client_gid()) == -1) {
        error(_("create debug directory \"%s\": %s"),
              dbgdir, strerror(errno));
        /*NOTREACHED*/
@@ -648,7 +648,10 @@ printf_arglist_function(void debug_printf, const char *, format)
        db_file = stderr;
     }
     if(db_file != NULL) {
-       g_fprintf(db_file, "%s: %s: ", msg_timestamp(), get_pname());
+       if (db_file != stderr)
+           g_fprintf(db_file, "%s: %s: ", msg_timestamp(), get_pname());
+       else 
+           g_fprintf(db_file, "%s: ", get_pname());
        arglist_start(argp, format);
        g_vfprintf(db_file, format, argp);
        arglist_end(argp);
index 5446391ee804c9a7ef9d34cc2085957dc7cf375a..6f2a0acc4c97ccce7803d9f7fffafe3862b81d9c 100644 (file)
@@ -47,19 +47,19 @@ static int
 mk1dir(
     const char *dir, /* directory to create */
     mode_t     mode,   /* mode for new directory */
-    uid_t      G_GNUC_UNUSED uid,      /* uid for new directory */
-    gid_t      G_GNUC_UNUSED gid)      /* gid for new directory */
+    uid_t      uid,    /* uid for new directory */
+    gid_t      gid)    /* gid for new directory */
 {
     int rc;    /* return code */
 
     rc = mkdir(dir, mode);
-    if(rc != 0) {      /* maybe someone beat us to it */
+    if(rc != 0) {
        int serrno;
 
        serrno = errno;
-       if(access(dir, F_OK) != 0)
-           rc = -1;
-       errno = serrno; /* pass back the real error */
+       if(access(dir, F_OK) == 0)
+           rc = 0; /* someone just beat us to it, so it's OK */
+       errno = serrno;
     }
 
     /* mkdir is affected by umask, so set the mode bits manually */
@@ -203,11 +203,11 @@ safe_cd(void)
     if (client_uid != (uid_t) -1) {
 #if defined(AMANDA_DBGDIR)
        d = stralloc2(AMANDA_DBGDIR, "/.");
-       (void) mkpdir(d, (mode_t)02700, client_uid, client_gid);
+       (void) mkpdir(d, (mode_t)0700, client_uid, client_gid);
        amfree(d);
 #endif
        d = stralloc2(AMANDA_TMPDIR, "/.");
-       (void) mkpdir(d, (mode_t)02700, client_uid, client_gid);
+       (void) mkpdir(d, (mode_t)0700, client_uid, client_gid);
        amfree(d);
     }
 
index 7904057d3a0e3edc0108e8a2ad014630a68ee744..b6635632303d00ccc6586b0482037f542c69fb6d 100644 (file)
@@ -1,3 +1,3 @@
 #define CC "gcc"
-#define BUILT_DATE "Mon Mar 31 20:02:23 EDT 2008"
+#define BUILT_DATE "Wed May 14 17:05:51 EDT 2008"
 #define BUILT_MACH "x86_64-unknown-linux-gnu"
index e326258d6dc208ac9633c0ef791917e9bec1f4c9..7ecb4437759c302a854e421d0f2f5e1dd01b1023 100644 (file)
@@ -2538,7 +2538,7 @@ show_stat_info(
     if (getgrgid_r(sbuf.st_gid, &gr, buf, buflen, &grptr) != 0 ||
        grptr == NULL) {
        group = alloc(NUM_STR_SIZE + 1);
-       g_snprintf(owner, NUM_STR_SIZE, "%ld", (long)sbuf.st_gid);
+       g_snprintf(group, NUM_STR_SIZE, "%ld", (long)sbuf.st_gid);
     } else {
        group = stralloc(grptr->gr_name);
     }
index 19f0d7f4a2359c13fe998dc313c0d9cc2e619279..415f16faafb45a3b2d9fadc0919151e7049f7aa5 100644 (file)
@@ -1,2 +1,2 @@
-#define BUILT_REV "933"
+#define BUILT_REV "1023"
 #define BUILT_BRANCH "amanda-260"
index 774719e5444cbfe1fdbec65b14c130aa755a8275..06c4de22911c8dcc14ff0af35d31950620894224 100644 (file)
@@ -173,6 +173,7 @@ connect_portrange(
     static in_port_t   port_in_use[1024];
     static int         nb_port_in_use = 0;
     int                        i;
+    int                        save_errno = EAGAIN;
 
     assert(first_port <= last_port);
     /* Try a port already used */
@@ -184,6 +185,8 @@ connect_portrange(
            if(s > 0) {
                return s;
            }
+           if (errno != EAGAIN && errno != EBUSY)
+               save_errno = errno;
        }
     }
 
@@ -195,12 +198,14 @@ connect_portrange(
            port_in_use[nb_port_in_use++] = port;
            return s;
        }
+       if (errno != EAGAIN && errno != EBUSY)
+           save_errno = errno;
     }
 
     dbprintf(_("connect_portrange: All ports between %d and %d are busy.\n"),
              first_port,
              last_port);
-    errno = EAGAIN;
+    errno = save_errno;
     return -1;
 }
 
@@ -227,6 +232,7 @@ connect_port(
     if (servPort != NULL && !strstr(servPort->s_name, "amanda")) {
        dbprintf(_("connect_port: Skip port %d: owned by %s.\n"),
                  port, servPort->s_name);
+       errno = EBUSY;
        return -1;
     }
 
@@ -319,6 +325,7 @@ bind_portrange(
     socklen_t socklen;
     struct servent *servPort;
     const in_port_t num_ports = (in_port_t)(last_port - first_port + 1);
+    int save_errno = EAGAIN;
 
     assert(first_port <= last_port);
 
@@ -346,6 +353,8 @@ bind_portrange(
                }
                return 0;
            }
+           if (errno != EAGAIN && errno != EBUSY)
+               save_errno = errno;
            if (servPort == NULL) {
                dbprintf(_("bind_portrange2: Try  port %d: Available - %s\n"),
                        port, strerror(errno));
@@ -363,7 +372,7 @@ bind_portrange(
     dbprintf(_("bind_portrange: all ports between %d and %d busy\n"),
                  first_port,
                  last_port);
-    errno = EAGAIN;
+    errno = save_errno;
     return -1;
 }
 
index 886d2473d1e41be0e8914cf954d7c92bcb344a64..044fe693b464bd1d0844653f5ddbeeb6060f4019 100644 (file)
 const int   VERSION_MAJOR   = 2;
 const int   VERSION_MINOR   = 6;
 const int   VERSION_PATCH   = 0;
-const char *const VERSION_COMMENT = "";
+const char *const VERSION_COMMENT = "p1";
 
 const char *
 versionsuffix(void)
 {
 #ifdef USE_VERSION_SUFFIXES
-    return "-2.6.0";
+    return "-2.6.0p1";
 #else
     return "";
 #endif
@@ -49,5 +49,5 @@ versionsuffix(void)
 const char *
 version(void)
 {
-    return "2.6.0";
+    return "2.6.0p1";
 }
index 5c3ce070e522a722eeca04bec4d25991e195cc0a..9c455c6032670001cb8df5ea0ea6ed9b2bae7260 100644 (file)
@@ -33,23 +33,27 @@ AC_DEFUN([AMANDA_PROG_GNUTAR],
        ]
     )
 
-    if test "x$GNUTAR" != "xno"; then
-       # call ac_path_progs
-       AC_PATH_PROGS(GNUTAR,gtar gnutar tar,,$LOCSYSPATH)
-    else
+    if test "x$GNUTAR" = "xno"; then
        GNUTAR=
-    fi
-
-    if test ! -z "$GNUTAR"; then
-      case "`\"$GNUTAR\" --version 2>&1`" in
-       *GNU*tar* | *Free*paxutils* ) : # OK, it is GNU tar
-                   ;;
-       *)
-                   # warning..
-                   AMANDA_MSG_WARN([$GNUTAR is not GNU tar, so it will not be used.])
-                   GNUTAR=''
-                   ;;
-      esac
+    else
+       for gnutar_name in gtar gnutar tar; do
+           AC_PATH_PROGS(GNUTAR, $gnutar_name, , $LOCSYSPATH)
+           if test -n "$GNUTAR"; then
+             case "`\"$GNUTAR\" --version 2>&1`" in
+              *GNU*tar* | *Free*paxutils* )
+                           # OK, it is GNU tar
+                           break
+                           ;;
+              *)
+                           # warning..
+                           AMANDA_MSG_WARN([$GNUTAR is not GNU tar, so it will not be used.])
+                           # reset the cache for GNUTAR so AC_PATH_PROGS will search again
+                           GNUTAR=''
+                           unset ac_cv_path_GNUTAR
+                           ;;
+             esac
+           fi
+       done
     fi
 
     if test "x$GNUTAR" != "x"; then
index 446d62378286675e85c01cad93a5a9216db166c4..a48f35d6efed7e06588aba26696ec08254f70b94 100755 (executable)
--- a/configure
+++ b/configure
@@ -2950,7 +2950,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE=amanda
- VERSION="2.6.0"
+ VERSION="2.6.0p1"
 
 
 cat >>confdefs.h <<_ACEOF
@@ -30013,9 +30013,11 @@ echo "$as_me: error: *** You must supply a full pathname to --with-gnutar" >&2;}
 fi
 
 
-    if test "x$GNUTAR" != "xno"; then
-       # call ac_path_progs
-       for ac_prog in gtar gnutar tar
+    if test "x$GNUTAR" = "xno"; then
+       GNUTAR=
+    else
+       for gnutar_name in gtar gnutar tar; do
+           for ac_prog in $gnutar_name
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
   test -n "$GNUTAR" && break
 done
 
-    else
-       GNUTAR=
-    fi
-
-    if test ! -z "$GNUTAR"; then
-      case "`\"$GNUTAR\" --version 2>&1`" in
-       *GNU*tar* | *Free*paxutils* ) : # OK, it is GNU tar
-                   ;;
-       *)
-                   # warning..
+           if test -n "$GNUTAR"; then
+             case "`\"$GNUTAR\" --version 2>&1`" in
+              *GNU*tar* | *Free*paxutils* )
+                           # OK, it is GNU tar
+                           break
+                           ;;
+              *)
+                           # warning..
 
     { echo "$as_me:$LINENO: WARNING: $GNUTAR is not GNU tar, so it will not be used." >&5
 echo "$as_me: WARNING: $GNUTAR is not GNU tar, so it will not be used." >&2;}
@@ -30080,9 +30080,13 @@ $GNUTAR is not GNU tar, so it will not be used.
 AAW_EOF
 
 
-                   GNUTAR=''
-                   ;;
-      esac
+                           # reset the cache for GNUTAR so AC_PATH_PROGS will search again
+                           GNUTAR=''
+                           unset ac_cv_path_GNUTAR
+                           ;;
+             esac
+           fi
+       done
     fi
 
     if test "x$GNUTAR" != "x"; then
@@ -32924,7 +32928,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 32927 "configure"' > conftest.$ac_ext
+  echo '#line 32931 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -35211,11 +35215,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:35214: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:35218: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:35218: \$? = $ac_status" >&5
+   echo "$as_me:35222: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -35473,11 +35477,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:35476: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:35480: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:35480: \$? = $ac_status" >&5
+   echo "$as_me:35484: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -35535,11 +35539,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:35538: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:35542: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:35542: \$? = $ac_status" >&5
+   echo "$as_me:35546: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -37764,7 +37768,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 37767 "configure"
+#line 37771 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -37862,7 +37866,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 37865 "configure"
+#line 37869 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -40161,11 +40165,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:40164: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:40168: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:40168: \$? = $ac_status" >&5
+   echo "$as_me:40172: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -40223,11 +40227,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:40226: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:40230: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:40230: \$? = $ac_status" >&5
+   echo "$as_me:40234: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -41575,7 +41579,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 41578 "configure"
+#line 41582 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -41673,7 +41677,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 41676 "configure"
+#line 41680 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -42558,11 +42562,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:42561: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:42565: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:42565: \$? = $ac_status" >&5
+   echo "$as_me:42569: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -42620,11 +42624,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:42623: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:42627: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:42627: \$? = $ac_status" >&5
+   echo "$as_me:42631: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -44767,11 +44771,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:44770: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:44774: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:44774: \$? = $ac_status" >&5
+   echo "$as_me:44778: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -45029,11 +45033,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:45032: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:45036: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:45036: \$? = $ac_status" >&5
+   echo "$as_me:45040: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -45091,11 +45095,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:45094: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:45098: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:45098: \$? = $ac_status" >&5
+   echo "$as_me:45102: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -47320,7 +47324,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 47323 "configure"
+#line 47327 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -47418,7 +47422,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 47421 "configure"
+#line 47425 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index e304e0a5f105c28ace245f365d01ac37bb363553..74bae5f9eddcc32ce6201da651dd8fd10330d2ae 100644 (file)
@@ -6,7 +6,7 @@ AC_CANONICAL_TARGET([])
 PACKAGE=amanda
 AC_SUBST(PACKAGE)
 
-AM_INIT_AUTOMAKE(amanda, "2.6.0")
+AM_INIT_AUTOMAKE(amanda, "2.6.0p1")
 AC_CONFIG_HEADERS([config/config.h])
 
 dnl Minimum Autoconf version required.
index 538c06f0d630dd9263c215c36a346418b9b3ab05..ca629bfe71688baf97b99d37b87eb76249437541 100644 (file)
@@ -847,6 +847,12 @@ tape_device_property_set (Device * d_self, DevicePropertyId id, GValue * val) {
         self->fixed_block_size = g_value_get_int(val);
         device_clear_volume_details(d_self);
         return TRUE;
+    } else if (id == PROPERTY_READ_BUFFER_SIZE) {
+        if (d_self->access_mode != ACCESS_NULL)
+            return FALSE;
+        self->read_block_size = g_value_get_uint(val);
+        device_clear_volume_details(d_self);
+        return TRUE;
     } else if (id == PROPERTY_FSF) {
         return try_set_feature(d_self->access_mode,
                                feature_request_flags,
index d38c61e292809d4642c7e62242bfb03caa14b760..c83ddcc2157f1720302959c5585c5cedc301ab74 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amaddclient
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMADDCLIENT" "8" "03/31/2008" "" ""
+.TH "AMADDCLIENT" "8" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -209,4 +209,4 @@ The tool and its documentation was written by Zmanda, Inc (http://www\.zmanda\.c
 \fBssh-keygen\fR(1)
 \fBssh-add\fR(1)
 \fBscp\fR(1)
-\fBhttp://wiki.zmanda.com\fR()
+\fI\%http://wiki.zmanda.com\fR
index a4082f1cb5da0cf963805d7879138e0b7c4854c9..cb38aec13da598f7ec7640966753c0840d043b6e 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amadmin
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMADMIN" "8" "03/31/2008" "" ""
+.TH "AMADMIN" "8" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -422,4 +422,4 @@ Stefan G\. Weichinger,
 \fBamdump\fR(8),
 \fBamrestore\fR(8),
 \fBamfetchdump\fR(8),
-\fBhttp://wiki.zmanda.com\fR()
+\fI\%http://wiki.zmanda.com\fR
index a90c65c6f3461e16337e32a9f2be14167630f46f..13dd165c3d890f4cf7c645dc38d4e4ea88ce9ffb 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amaespipe
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMAESPIPE" "8" "03/31/2008" "" ""
+.TH "AMAESPIPE" "8" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -53,4 +53,4 @@ autodects encryption type and hash function from the encrypted image\.
 \fBaespipe\fR(1),
 \fBamcrypt\fR(8),
 \fBgpg\fR(1),
-\fBhttp://wiki.zmanda.com\fR()
+\fI\%http://wiki.zmanda.com\fR
index f7ae21316235a29edaf0fe5fa8da4adefef74d50..83d9978ab824d31b4ea3611a5d506dd9002c9d74 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amanda-client.conf
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMANDA\-CLIENT\.CONF" "5" "03/31/2008" "" ""
+.TH "AMANDA\-CLIENT\.CONF" "5" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -298,4 +298,4 @@ Stefan G\. Weichinger,
 \fBamanda.conf\fR(5),
 \fBamcrypt\fR(8),
 \fBaespipe\fR(1),
-\fBhttp://wiki.zmanda.com\fR()
+\fI\%http://wiki.zmanda.com\fR
index 2bb579fa4cdcde2d3a152f7bacae05dacc9517c7..15dbba4ded98b126bd9df11c5cc1bc2aaf2e43b1 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amanda
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMANDA" "8" "03/31/2008" "" ""
+.TH "AMANDA" "8" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -1187,5 +1187,5 @@ Stefan G\. Weichinger,
 \fBamtoc\fR(8),
 \fBamcheckdump\fR(8),
 \fBamserverconfig\fR(8),
-\fBamaddclient\fR(8)
-\fBhttp://wiki.zmanda.com\fR()
+\fBamaddclient\fR(8),
+\fI\%http://wiki.zmanda.com\fR
index 0c1bfcc573cdcfcdcacfa498edf3076827a4607e..3e5ea9641cf184bda9d75601a23fec334790d27a 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amanda.conf
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMANDA\.CONF" "5" "03/31/2008" "" ""
+.TH "AMANDA\.CONF" "5" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -1482,9 +1482,7 @@ Only do incremental dumps\.
 \fBamadmin force\fR
 should be used to tell
 \fIAmanda\fR
-that a full dump has been performed off\-line, so that it resets to level 1\. It is similar to skip\-full, but with incronly full dumps may be scheduled manually\. Unfortunately, it appears that
-\fIAmanda\fR
-will perform full backups with this configuration, which is probably a bug\.
+that a full dump has been performed off\-line, so that it resets to level 1\.
 .RE
 .RE
 .PP
@@ -1768,6 +1766,6 @@ Stefan G\. Weichinger,
 \fBamanda-client.conf\fR(5),
 \fBamcrypt\fR(8),
 \fBaespipe\fR(1),
-\fBhttp://wiki.zmanda.com\fR()
+\fI\%http://wiki.zmanda.com\fR
 .PP
 An updated version of this man page may be available at http://wiki\.zmanda\.com/index\.php/Amanda\.conf\.
index 44bd6cf4cc91ce0eb47a36c947e8f783119ebbe2..e7fab67f97e6aafece523e098e043cd1122b03c8 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amcheck
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMCHECK" "8" "03/31/2008" "" ""
+.TH "AMCHECK" "8" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -692,4 +692,4 @@ Stefan G\. Weichinger,
 .PP
 \fBamanda\fR(8),
 \fBamdump\fR(8),
-\fBhttp://wiki.zmanda.com\fR()
+\fI\%http://wiki.zmanda.com\fR
index ffeeff52634fdea55e6152eac9d37aa33f8a966c..4d273e0e958cdcd8b8de824a80ce1ab22069cc97 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amcheckdb
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMCHECKDB" "8" "03/31/2008" "" ""
+.TH "AMCHECKDB" "8" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -64,4 +64,4 @@ Stefan G\. Weichinger,
 \fBamadmin\fR(8),
 \fBamrmtape\fR(8),
 \fBamanda\fR(8),
-\fBhttp://wiki.zmanda.com\fR()
+\fI\%http://wiki.zmanda.com\fR
index 8d1c7da6318d6790f45ee689bbc4f3560e029944..e9340ad02120bb8fa467956445325886ed3d043d 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amcheckdump
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMCHECKDUMP" "8" "03/31/2008" "" ""
+.TH "AMCHECKDUMP" "8" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -35,6 +35,10 @@ See the "\fBCONFIGURATION OVERRIDE\fR" section in
 for information on the
 \-o
 option\.
+.SH "SEE ALSO"
+.PP
+\fBamanda\fR(8),
+\fI\%http://wiki.zmanda.com\fR
 .SH "EXAMPLE"
 .PP
 .RS 4
index 429ba70d357afdaa1d7f1007ab82a6fa1cc31c2a..666d26a3e08442a944be03aa18d9cb2991b02b46 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amcleanup
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMCLEANUP" "8" "03/31/2008" "" ""
+.TH "AMCLEANUP" "8" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -89,4 +89,4 @@ Stefan G\. Weichinger,
 .PP
 \fBamanda\fR(8),
 \fBamdump\fR(8),
-\fBhttp://wiki.zmanda.com\fR()
+\fI\%http://wiki.zmanda.com\fR
index fa95247c84199fbc99161d319daacf7d80c1b42f..d01a04c925369058a6844e88de31d7acb565eb32 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amcrypt-ossl-asym
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMCRYPT\-OSSL\-ASYM" "8" "03/31/2008" "" ""
+.TH "AMCRYPT\-OSSL\-ASYM" "8" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -97,7 +97,7 @@ user\.
 \fBamanda.conf\fR(5),
 \fBopenssl\fR(1),
 \fBamcrypt-ossl\fR(8),
-\fBhttp://wiki.zmanda.com\fR()
+\fI\%http://wiki.zmanda.com\fR
 .SH "NOTES"
 .IP " 1." 4
 www.openssl.org
index 0e546898a4c11fa212c6a3744cc5ee41d0153547..cfa338f85b21665550617d500b47c3086a77ffa1 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amcrypt-ossl
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMCRYPT\-OSSL" "8" "03/31/2008" "" ""
+.TH "AMCRYPT\-OSSL" "8" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -54,7 +54,7 @@ user\.
 \fBamanda.conf\fR(5),
 \fBopenssl\fR(1),
 \fBamcrypt-ossl-asym\fR(8),
-\fBhttp://wiki.zmanda.com\fR()
+\fI\%http://wiki.zmanda.com\fR
 .SH "NOTES"
 .IP " 1." 4
 www.openssl.org
index 41b351234bd13f91302a9faf5a599dac7954c33b..36dae74b741f07a00e3522e13e9aeb015c20fd05 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amcrypt
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMCRYPT" "8" "03/31/2008" "" ""
+.TH "AMCRYPT" "8" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -71,4 +71,4 @@ be recovered with the correct key and passphrase\.
 \fBaespipe\fR(1),
 \fBamaespipe\fR(8),
 \fBgpg\fR(1),
-\fBhttp://wiki.zmanda.com\fR()
+\fI\%http://wiki.zmanda.com\fR
index 492af4fe5cf69a64f1a8f5f61ccd6f35afe8c484..2ca624e00c2d2e052acfb6c89d927584db999d6d 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amcryptsimple
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMCRYPTSIMPLE" "8" "03/31/2008" "" ""
+.TH "AMCRYPTSIMPLE" "8" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -63,4 +63,4 @@ The tool and its documentation was written by Zmanda, Inc (http://www\.zmanda\.c
 \fBamgpgcrypt\fR(8),
 \fBamrestore\fR(8),
 \fBgpg\fR(1),
-\fBhttp://wiki.zmanda.com\fR()
+\fI\%http://wiki.zmanda.com\fR
index 14f25fd2a768bc5c570393bcb9c5c73de6254724..545a2cdf48dd992f065ffb01e16d706903e1ee5b 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amdd
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMDD" "8" "03/31/2008" "" ""
+.TH "AMDD" "8" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -118,4 +118,4 @@ Stefan G\. Weichinger,
 .PP
 
 \fBamanda\fR(8),
-\fBhttp://wiki.zmanda.com\fR()
+\fI\%http://wiki.zmanda.com\fR
index 8e35f5762c6e15d19473408fdd2fdc36303d48b8..a0602e29cc867ac3090641016bef00c4f59f1a86 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amdevcheck
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMDEVCHECK" "8" "03/31/2008" "" ""
+.TH "AMDEVCHECK" "8" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -66,4 +66,4 @@ and others\. Authorship of this tool and its documentation was funded by Zmanda,
 
 \fBamanda\fR(8),
 \fBammt\fR(8),
-\fBhttp://wiki.zmanda.com\fR()
+\fI\%http://wiki.zmanda.com\fR
index 268a722fdd64ecfdea4ba85e6556d31a6918574d..01fa1acd18f5ebeb4367a927eccfc7250a2e29a3 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amdump
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMDUMP" "8" "03/31/2008" "" ""
+.TH "AMDUMP" "8" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -111,4 +111,4 @@ Stefan G\. Weichinger,
 \fBamrestore\fR(8),
 \fBamflush\fR(8),
 \fBcron\fR(8),
-\fBhttp://wiki.zmanda.com\fR()
+\fI\%http://wiki.zmanda.com\fR
index baa2ce2123ea6347c5966506e9bc2199eabcf87c..a2a3bc0e25372e42613e374e5f3dbb6378b1f4ee 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amfetchdump
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMFETCHDUMP" "8" "03/31/2008" "" ""
+.TH "AMFETCHDUMP" "8" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -164,4 +164,4 @@ Ian Turner,
 \fBamrestore\fR(8),
 \fBtar\fR(1),
 \fBrestore\fR(8),
-\fBhttp://wiki.zmanda.com\fR()
+\fI\%http://wiki.zmanda.com\fR
index 84bd19207c02d73a5a666c979ba2bb616cafc726..e7d665d172222a292fb5bcae6dec4023fff4d6ca 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amflush
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMFLUSH" "8" "03/31/2008" "" ""
+.TH "AMFLUSH" "8" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -142,4 +142,4 @@ Stefan G\. Weichinger,
 
 \fBamanda\fR(8),
 \fBamdump\fR(8),
-\fBhttp://wiki.zmanda.com\fR()
+\fI\%http://wiki.zmanda.com\fR
index c1c0121d5a791eb4b93db43ec5fcdddc2a0e7d1b..0c57f4f1df8da74af7f15938fd1c2e52892d81ec 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amgetconf
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMGETCONF" "8" "03/31/2008" "" ""
+.TH "AMGETCONF" "8" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -168,4 +168,4 @@ keyword)\.
 .PP
 
 \fBamanda\fR(8),
-\fBhttp://wiki.zmanda.com\fR()
+\fI\%http://wiki.zmanda.com\fR
index faafc643d2e682192a992bdac3d36eb99ce78ad4..bb71017b829b3a940ad8c757878caac76960a93e 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amgpgcrypt
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMGPGCRYPT" "8" "03/31/2008" "" ""
+.TH "AMGPGCRYPT" "8" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -154,4 +154,4 @@ The tool and its documentation was written by Zmanda, Inc (http://www\.zmanda\.c
 \fBamcrypt\fR(8),
 \fBamrestore\fR(8),
 \fBgpg\fR(1),
-\fBhttp://wiki.zmanda.com\fR()
+\fI\%http://wiki.zmanda.com\fR
index 576897a2f9c6c8861bd0322f02ed5ce5e3fb0d1e..5c738b9286e2c6c98f6a1490e248dd311034abe8 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amlabel
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMLABEL" "8" "03/31/2008" "" ""
+.TH "AMLABEL" "8" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -171,4 +171,4 @@ Stefan G\. Weichinger,
 \fBamanda\fR(8),
 \fBamdump\fR(8),
 \fBamflush\fR(8),
-\fBhttp://wiki.zmanda.com\fR()
+\fI\%http://wiki.zmanda.com\fR
index 3b1d56f70c84aa28a543626541c2c962e67d3845..a8acd7bd4757a109aeb8b259b22b54a1b76f6903 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: ammt
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMMT" "8" "03/31/2008" "" ""
+.TH "AMMT" "8" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -180,4 +180,4 @@ Stefan G\. Weichinger,
 .SH "SEE ALSO"
 .PP
 \fBamanda\fR(8),
-\fBhttp://wiki.zmanda.com\fR()
+\fI\%http://wiki.zmanda.com\fR
index 35000a3d941ee51f33f5b353664323ff7fefbbf6..18bd4b6914eabf34a79f438264cfc819c2f5f089 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amoverview
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMOVERVIEW" "8" "03/31/2008" "" ""
+.TH "AMOVERVIEW" "8" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -122,4 +122,4 @@ host2    /var                  1  1  0  1  1  1
 .PP
 \fBamadmin\fR(8),
 \fBamanda\fR(8),
-\fBhttp://wiki.zmanda.com\fR()
+\fI\%http://wiki.zmanda.com\fR
index 9cefa751bca7a3f86c338bc9c9d867620f1cd467..4b3c3796744775de767de9b14bc5395e8a4e5b99 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amplot
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMPLOT" "8" "03/31/2008" "" ""
+.TH "AMPLOT" "8" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -159,4 +159,4 @@ Reports lines it does not recognize, mainly error cases but some are legitimate
 \fBsh\fR(1),
 \fBcompress\fR(1),
 \fBgzip\fR(1),
-\fBhttp://wiki.zmanda.com\fR()
+\fI\%http://wiki.zmanda.com\fR
index 505aa872234b1ae70f3eae86266268f8bf3ee96f..ece641d62c1dc36cb8b97415819da1d28ce4acff 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amrecover
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMRECOVER" "8" "03/31/2008" "" ""
+.TH "AMRECOVER" "8" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -492,4 +492,4 @@ Stefan G\. Weichinger,
 \fBamrestore\fR(8),
 \fBamfetchdump\fR(8),
 \fBreadline\fR(3),
-\fBhttp://wiki.zmanda.com\fR()
+\fI\%http://wiki.zmanda.com\fR
index 41acffe83653fff8a294501603a1ce12119b907e..be28b5b46c0c3bf90679fd3c0186c7bcf66de108 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amreport
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMREPORT" "8" "03/31/2008" "" ""
+.TH "AMREPORT" "8" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -122,4 +122,4 @@ The 3\-ring binder type is the most generic\. It may be used to make a hardcopy
 .PP
 \fBamanda\fR(8),
 \fBamflush\fR(8),
-\fBhttp://wiki.zmanda.com\fR()
+\fI\%http://wiki.zmanda.com\fR
index f1414f2c138730d83607bacb9eb4ce2d015c2843..df874ba2e3a717ac7e4cc7b432c62c85b6beb1af 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amrestore
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMRESTORE" "8" "03/31/2008" "" ""
+.TH "AMRESTORE" "8" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -262,4 +262,4 @@ Stefan G\. Weichinger,
 \fBamflush\fR(8),
 \fBtar\fR(1),
 \fBrestore\fR(8),
-\fBhttp://wiki.zmanda.com\fR()
+\fI\%http://wiki.zmanda.com\fR
index b6c536180da5592bf895c71b8e4a81dc8d11da86..44b7b04c32c8110637a59e50af61352931832a5e 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amrmtape
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMRMTAPE" "8" "03/31/2008" "" ""
+.TH "AMRMTAPE" "8" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -77,4 +77,4 @@ Stefan G\. Weichinger,
 .PP
 \fBamadmin\fR(8),
 \fBamanda\fR(8),
-\fBhttp://wiki.zmanda.com\fR()
+\fI\%http://wiki.zmanda.com\fR
index a2285e3990379ed140cfd9a33a5e99edcd5eb0b6..df32401011f130d85e9917801e9c85e9b9318bdc 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amserverconfig
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMSERVERCONFIG" "8" "03/31/2008" "" ""
+.TH "AMSERVERCONFIG" "8" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -178,4 +178,4 @@ The tool and its documentation was written by Zmanda, Inc (http://www\.zmanda\.c
 \fBamanda\fR(8),
 \fBamanda.conf\fR(5),
 \fBamaddclient\fR(8),
-\fBhttp://wiki.zmanda.com\fR()
+\fI\%http://wiki.zmanda.com\fR
index 9cd0f4688971aac29794634e6937f05f268e9a66..6a146ec31595bfe9271c91028c7a769bd8f99582 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amstatus
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMSTATUS" "8" "03/31/2008" "" ""
+.TH "AMSTATUS" "8" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -116,4 +116,4 @@ Output the date in a locale independent format\. The format is the same executin
 \fBamdump\fR(8),
 \fBamrestore\fR(8),
 \fBamadmin\fR(8),
-\fBhttp://wiki.zmanda.com\fR()
+\fI\%http://wiki.zmanda.com\fR
index a2dc2f7891aa7ba226fa901879429237d293cd68..6f3b5bea3287fa2507998323db88153340d671ca 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amtape
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMTAPE" "8" "03/31/2008" "" ""
+.TH "AMTAPE" "8" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -169,4 +169,4 @@ Stefan G\. Weichinger,
 .SH "SEE ALSO"
 .PP
 \fBamanda\fR(8),
-\fBhttp://wiki.zmanda.com\fR()
+\fI\%http://wiki.zmanda.com\fR
index c6a9ea772158443173b8c88610dd9440cf7b0fdd..0c76c44fa606afbd461757a215d47046cd719d14 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amtapetype
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMTAPETYPE" "8" "03/31/2008" "" ""
+.TH "AMTAPETYPE" "8" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -95,4 +95,4 @@ used to sometimes report a negative file mark size if the math happened to end u
 .SH "SEE ALSO"
 .PP
 \fBamanda\fR(8),
-\fBhttp://wiki.zmanda.com\fR()
+\fI\%http://wiki.zmanda.com\fR
index ac81e4d3b4efd8fad6b1b20ecd939bb8260a7cdc..e6bc640ef346d03f34a8d9764ee2fcffb648d4bc 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amtoc
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMTOC" "8" "03/31/2008" "" ""
+.TH "AMTOC" "8" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -129,7 +129,7 @@ after an
 \fBamdump\fR(8),
 \fBamflush\fR(8),
 \fBamgetconf\fR(8), cron, perl,
-\fBhttp://wiki.zmanda.com\fR()
+\fI\%http://wiki.zmanda.com\fR
 .SH "AUTHOR"
 .PP
 Nicolas Mayencourt
index 0d0d049b0b01af0d10ec1d54674555fe4f34f1a2..a4ac08d322296bcd6d6a116b43870a1f388ebfd2 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amverify
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMVERIFY" "8" "03/31/2008" "" ""
+.TH "AMVERIFY" "8" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -61,4 +61,4 @@ Stefan G\. Weichinger,
 \fBamrestore\fR(8),
 \fBamanda\fR(8),
 \fBamverifyrun\fR(8),
-\fBhttp://wiki.zmanda.com\fR()
+\fI\%http://wiki.zmanda.com\fR
index b3fc9e6287c09bc16e319062f8d1709c93869f2f..b80c3f09360def1a6406f5288790efdcbac9ec38 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: amverifyrun
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 03/31/2008
+.\"      Date: 05/14/2008
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "AMVERIFYRUN" "8" "03/31/2008" "" ""
+.TH "AMVERIFYRUN" "8" "05/14/2008" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -27,4 +27,4 @@ with these argument\.
 .PP
 \fBamanda\fR(8),
 \fBamverify\fR(8),
-\fBhttp://wiki.zmanda.com\fR()
+\fI\%http://wiki.zmanda.com\fR
index 03d9ef42e94c4f17f1cd9dd1e78bcd03c02674de..36bb72a12344f466b5c2e52cdf1299720a9541aa 100644 (file)
@@ -279,7 +279,7 @@ On success, zero is returned.  On error, 1 is returned.
 <citerefentry><refentrytitle>ssh-keygen</refentrytitle><manvolnum>1</manvolnum></citerefentry>
 <citerefentry><refentrytitle>ssh-add</refentrytitle><manvolnum>1</manvolnum></citerefentry>
 <citerefentry><refentrytitle>scp</refentrytitle><manvolnum>1</manvolnum></citerefentry>
-<citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>
+<ulink url="http://wiki.zmanda.com"/>
 </para>
 </refsect1>
 </refentry>
index 19002d2b3c7f7590c3439d1e130f2c27ab9ee2a5..7efd5198efb4eb176dcae77b39fd06ecda36b281 100644 (file)
@@ -440,7 +440,7 @@ TOTAL      241  12412187   7316312   731631  (estimated 8 runs per dumpcycle)
 <citerefentry><refentrytitle>amdump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>amrestore</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>amfetchdump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-<citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>
+<ulink url="http://wiki.zmanda.com"/>
 </para>
 </refsect1>
 </refentry>
index ba1fadae53ac6eaa307440b309e6ce4381b9ed8b..b3c87f0829f57078f2decaa4adb0e2b0695b93ad 100755 (executable)
@@ -46,7 +46,7 @@ the encrypted image.</para>
 <citerefentry><refentrytitle>aespipe</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>amcrypt</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>gpg</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-<citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>
+<ulink url="http://wiki.zmanda.com"/>
 </para>
 </refsect1>
 </refentry>
index 5ec5de6a75c862b615ff377f5ed730fa99b14c75..d11029190c6c43dae4835b0dd7e064350e15bd5b 100644 (file)
@@ -392,7 +392,7 @@ Unreserved tcp port that will be used (bsd, bsdudp)</para>
 <citerefentry><refentrytitle>amanda.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>amcrypt</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>aespipe</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-<citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>
+<ulink url="http://wiki.zmanda.com"/>
 </para>
 </refsect1>
 </refentry>
index 677d3d8e92a15d6b8e6ad8c4d3e7d499f16d7c12..383e35a98263b1ad65951a8043453f0219772690 100644 (file)
@@ -1309,8 +1309,9 @@ amdump -otapedev=/dev/nst1 -otpchanger=''
 <citerefentry><refentrytitle>amtoc</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>amcheckdump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>amserverconfig</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-<citerefentry><refentrytitle>amaddclient</refentrytitle><manvolnum>8</manvolnum></citerefentry>
-<citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry></para>
+<citerefentry><refentrytitle>amaddclient</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+<ulink url="http://wiki.zmanda.com"/>
+</para>
 </refsect1>
 </refentry>
 
index f322c1ff3b3bfa604b45a1957632ec5e3bcec823..15747a311013c92c6bbef71a56c66a1feb785ff6 100644 (file)
@@ -1785,10 +1785,7 @@ The value should be hh*100+mm, e.g. 6:30PM (18:30) would be entered as
   <term><emphasis remap='B'>incronly</emphasis></term>
   <listitem>
   <para>Only do incremental dumps. <command>amadmin force</command> should be used to tell
-  &A; that a full dump has been performed off-line, so that it resets to level 1.
-  It is similar to skip-full, but with incronly full dumps may be scheduled manually.
-  Unfortunately, it appears that &A; will perform full backups with this configuration,
-  which is probably a bug.</para>
+  &A; that a full dump has been performed off-line, so that it resets to level 1.</para>
   </listitem>
   </varlistentry>
   </variablelist>
@@ -2132,7 +2129,7 @@ At the moment, this is of little use.</para>
 <citerefentry><refentrytitle>amanda-client.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>amcrypt</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>aespipe</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-<citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>
+<ulink url="http://wiki.zmanda.com"/>
 </para>
 
 <para>
index a34e096f1db3e0504384f5a303daa8abdeca3cf4..5bc33fd74aa5a76ff3107f6194bc0502b22c5a60 100644 (file)
@@ -870,7 +870,7 @@ was reported by the status check on
 <refsect1><title>SEE ALSO</title>
 <para><citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>amdump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-<citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>
+<ulink url="http://wiki.zmanda.com"/>
 </para>
 </refsect1>
 </refentry>
index b22ea3ee88d575211e31fcd13789982b71cfddde..7585a8ba91138783ee1c1998eef186e58a9d7a01 100644 (file)
@@ -69,7 +69,7 @@ Ready.
 <para><citerefentry><refentrytitle>amadmin</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>amrmtape</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-<citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>
+<ulink url="http://wiki.zmanda.com"/>
 </para>
 </refsect1>
 </refentry>
index 48f091f7fc5bab2aedf426ba05075accb60cb9e6..e37da3558b731e45f72e5159ce4875c693dea8d2 100644 (file)
@@ -48,6 +48,11 @@ remap='B'>CONFIGURATION OVERRIDE</emphasis>" section in
 <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>
 for information on the <literal>-o</literal> option.</para>
 </refsect1>
+ <refsect1><title>SEE ALSO</title>
+ <para><citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+ <ulink url="http://wiki.zmanda.com"/>
+ </para>
+ </refsect1> 
 
 <refsect1><title>EXAMPLE</title>
 <para><programlisting>
index 1ef49c0cbbc9f2b11737fcdda65ada709c162fbd..76c9f1d45f26179aaa907aacac2e50d125d53171 100644 (file)
@@ -98,7 +98,7 @@ amcleanup: no unprocessed logfile to clean up.
 <refsect1><title>SEE ALSO</title>
 <para><citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>amdump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-<citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>
+<ulink url="http://wiki.zmanda.com"/>
 </para>
 </refsect1>
 </refentry>
index 673cdb8fa17c620f427a98221258da69afc7b24e..3c2a9740ea2dc6baac81cd7abed7a3c09e9293cb 100644 (file)
@@ -146,7 +146,7 @@ Writing RSA key
       <refentrytitle>amcrypt-ossl</refentrytitle>
       <manvolnum>8</manvolnum>
     </citerefentry>,
-<citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>
+    <ulink url="http://wiki.zmanda.com"/>
   </para>
 </refsect1>
 
index 9594999ddfac260496f4e4631d13c5e790a66901..1b6e7a2a14d34ef9fc2aa8f68511f42136e95296 100644 (file)
@@ -87,7 +87,7 @@
       <refentrytitle>amcrypt-ossl-asym</refentrytitle>
       <manvolnum>8</manvolnum>
     </citerefentry>,
-<citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>
+    <ulink url="http://wiki.zmanda.com"/>
   </para>
 </refsect1>
 
index 26f745647c25e183e84b176664135d8e41eb5b9a..5d93ea30eca63ae9d3286af1ee433dc5817487d6 100755 (executable)
@@ -71,7 +71,7 @@ passphrase.</para>
 <citerefentry><refentrytitle>aespipe</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>amaespipe</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>gpg</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-<citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>
+<ulink url="http://wiki.zmanda.com"/>
 </para>
 </refsect1>
 </refentry>
index d45f111de3d1f1c674cba842955995c34018baf3..29151e15b96ac88de34e49033d3de07ff40fcbc2 100644 (file)
@@ -65,7 +65,7 @@ encryption uses the public key to encrypt and uses the private key to decrypt.</
 <citerefentry><refentrytitle>amgpgcrypt</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>amrestore</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>gpg</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-<citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>
+<ulink url="http://wiki.zmanda.com"/>
 </para>
 </refsect1>
 </refentry>
index eb415463c7d614f0062708c8caf95dc16400675a..02a206f25f80aa17a84dd3f17cf16531c5365b7b 100644 (file)
@@ -149,7 +149,7 @@ Default is zero.</para>
 <refsect1><title>SEE ALSO</title>
 <para>
   <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-  <citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>
+  <ulink url="http://wiki.zmanda.com"/>
 </para>
 </refsect1>
 </refentry>
index c47ca5846aef92c5759bd5a3491a8f49ea0c8bed..d4ca82df9e7c4e79a6aa47330b04b23f5585978e 100644 (file)
@@ -95,7 +95,7 @@
     <para>
       <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>ammt</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-      <citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>
+      <ulink url="http://wiki.zmanda.com"/>
     </para>
   </refsect1>
 </refentry>
index 2635c0656406c49705c7d1b7d029ff5718afb8e4..f1239d0d57d75d9506281075290cc639d05a162d 100644 (file)
@@ -136,7 +136,7 @@ and then rerun
   <citerefentry><refentrytitle>amrestore</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
   <citerefentry><refentrytitle>amflush</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
   <citerefentry><refentrytitle>cron</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-  <citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>
+  <ulink url="http://wiki.zmanda.com"/>
 </para>
 </refsect1>
 </refentry>
index e971eddfb354e8dbcd7a6d9ca37aafb4d97ff5d5..5a7d120f63a095a59079d55f34ade7bd4b2165c0 100644 (file)
@@ -216,7 +216,7 @@ instead.</para>
 <citerefentry><refentrytitle>amrestore</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>tar</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>restore</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-<citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>
+<ulink url="http://wiki.zmanda.com"/>
 </para>
 </refsect1>
 </refentry>
index e52dc96acce7034b3494408d44cc6a53ab7bd180..086f942b4fd9389d871b0bb086336e475311551a 100644 (file)
@@ -180,7 +180,7 @@ You'll get mail when amflush is finished.
 <para>
   <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
   <citerefentry><refentrytitle>amdump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-  <citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>
+  <ulink url="http://wiki.zmanda.com"/>
 </para>
 </refsect1>
 </refentry>
index d0e668bd28068afc2168b6cc2e3c8c0e79f944cf..9dab51140584b49b525b7710cbb7a271b220b368 100644 (file)
@@ -209,7 +209,7 @@ keyword).
 <refsect1><title>SEE ALSO</title>
 <para>
   <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-  <citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>
+  <ulink url="http://wiki.zmanda.com"/>
 </para>
 </refsect1>
 </refentry>
index e8ee04ba565673bdc9bc3ab0cae0a0a8334fd7c7..a2db4688d9e3066567d61e1c96bce1312800d51e 100644 (file)
@@ -165,7 +165,7 @@ mode. &amgpgcrypt; calls gpg with mdc disabled</para>
   <citerefentry><refentrytitle>amcrypt</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
   <citerefentry><refentrytitle>amrestore</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
   <citerefentry><refentrytitle>gpg</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-  <citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>
+  <ulink url="http://wiki.zmanda.com"/>
 </para>
 </refsect1>
 </refentry>
index 9c07fe7055307792325f76c58c6a753e0d24e6d3..47717a0ab606046192fdabaf74a512820e933977 100644 (file)
@@ -187,7 +187,7 @@ instead of a non-rewinding device name for
 <para><citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>amdump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>amflush</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-  <citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>
+<ulink url="http://wiki.zmanda.com"/>
 </para>
 </refsect1>
 </refentry>
index bf19fb60370868ba8b71cb96e5d1ebc43528c13f..509eef859061004252ccae5be7c5bba621e9f6af 100644 (file)
@@ -219,7 +219,7 @@ and may include:</para>
 
 <refsect1><title>SEE ALSO</title>
 <para><citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>
<ulink url="http://wiki.zmanda.com"/>
 </para>
 </refsect1>
 </refentry>
index adb5a6cf135d1bd6f3d87c5a3757a4155ae68f0b..910eded0ad83aeaeed1662ddb603ed158b684c73 100644 (file)
@@ -176,7 +176,7 @@ host2    /var                  1  1  0  1  1  1
 <refsect1><title>SEE ALSO</title>
 <para><citerefentry><refentrytitle>amadmin</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-  <citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>
+<ulink url="http://wiki.zmanda.com"/>
 </para>
 </refsect1>
 </refentry>
index 1ee92fcede8920b7e1d0967cccf0b9dfa56fe441..eac7c387d01811cc3b0e6a16a7925d99fe92d091 100644 (file)
@@ -210,7 +210,7 @@ legitimate lines the program needs to be taught about.</para>
 <citerefentry><refentrytitle>sh</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>compress</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>gzip</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-  <citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>
+<ulink url="http://wiki.zmanda.com"/>
 </para>
 </refsect1>
 </refentry>
index 2ce85ed3579d8daae2cfd8d9e842616b047b2ca9..38770b33d9649da77bc05eb93e7d1ab00637d56a 100644 (file)
@@ -590,7 +590,7 @@ but will be overridden by the -t switch.
 <citerefentry><refentrytitle>amrestore</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>amfetchdump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>readline</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
-  <citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>
+<ulink url="http://wiki.zmanda.com"/>
 </para>
 </refsect1>
 </refentry>
index 2b67d453c8a70e0c18908f0cc51d0b1ee3d9102e..e8c6ea879c926d46208c80f4a1fd866b855b6c81 100644 (file)
@@ -182,7 +182,7 @@ It may be used to make a hardcopy log of the tapes.</para>
 <refsect1><title>SEE ALSO</title>
 <para><citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>amflush</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-  <citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>
+<ulink url="http://wiki.zmanda.com"/>
 </para>
 </refsect1>
 </refentry>
index edae0d291356b6d0e81741baf5c42cf7a96cb389..009e7df18cae51c6c43e0a3ca6320cccd0e09500 100644 (file)
@@ -343,7 +343,7 @@ College Park: Original text</para>
 <citerefentry><refentrytitle>amflush</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>tar</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>restore</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-  <citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>
+<ulink url="http://wiki.zmanda.com"/>
 </para>
 </refsect1>
 </refentry>
index ff7bb13e81c8d6770035b8d7816510fcc6a76035..acdcb78dca5c02777bf0fa91923f46cc9d6c2456 100644 (file)
@@ -101,7 +101,7 @@ configuration.</para>
 <refsect1><title>SEE ALSO</title>
 <para><citerefentry><refentrytitle>amadmin</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-  <citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>
+<ulink url="http://wiki.zmanda.com"/>
 </para>
 </refsect1>
 </refentry>
index 239143a61c27d7075123c0decd9a9baccf544cb0..22a4f44473f06d1f22a1b8f33f0e29e0488b1dfd 100644 (file)
@@ -244,7 +244,7 @@ On success, zero is returned.  On error, 1 is returned.
 <para><citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>amanda.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>amaddclient</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-<citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>
+<ulink url="http://wiki.zmanda.com"/>
 </para>
 </refsect1>
 </refentry>
index ea2e2751572ae7d46e28dccd9194ff7179941189..6058f4b486d83bd57e7ba3436aafcb456c5f80ce 100644 (file)
@@ -158,7 +158,7 @@ Works only during the estimate phase.</para>
 <citerefentry><refentrytitle>amdump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>amrestore</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>amadmin</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-<citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>
+<ulink url="http://wiki.zmanda.com"/>
 </para>
 </refsect1>
 </refentry>
index c6c2d6078c7f9cc318bc2e1cd8440e22533c4ca3..0d650526369fe9b6a6a146e0547c369d166bf24c 100644 (file)
@@ -224,7 +224,7 @@ commands to not eject the loaded tape if it is the one being requested.</para>
 
 <refsect1><title>SEE ALSO</title>
 <para><citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-<citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>
+<ulink url="http://wiki.zmanda.com"/>
 </para>
 </refsect1>
 </refentry>
index be32b25a55c9aa6a3ba8b2a68ca660276c44f02c..06dbae4e8719137971d9555ddad1779725e7875e 100644 (file)
@@ -151,7 +151,7 @@ now we just report it as zero.</para>
 
 <refsect1><title>SEE ALSO</title>
 <para><citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-<citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>
+<ulink url="http://wiki.zmanda.com"/>
 </para>
 </refsect1>
 </refentry>
index b53ec9d92d22c229497fc3dfbab9286aa0c5de31..8857a967ce5aa6e66a24bbdc3cca9eb72733da1e 100644 (file)
@@ -160,7 +160,7 @@ after an
 <citerefentry><refentrytitle>amgetconf</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
 cron,
 perl,
-<citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>
+<ulink url="http://wiki.zmanda.com"/>
 </para>
 </refsect1>
 
index 723ec48d7671fd21446d156be4296cfdb3730660..f68db9042f63fafdc8792f0720620dd87d00ccb4 100644 (file)
@@ -83,7 +83,7 @@ man page for more details about Amanda.</para>
 <para><citerefentry><refentrytitle>amrestore</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>amverifyrun</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-<citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>
+<ulink url="http://wiki.zmanda.com"/>
 </para>
 </refsect1>
 </refentry>
index cd87d3e1705c48334fb44c05654c7d2dedf5d3eb..24043a6cbccfa36df6219562fcbae1a20c76cbd5 100644 (file)
@@ -39,7 +39,7 @@ with these argument.</para>
 <refsect1><title>SEE ALSO</title>
 <para><citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
 <citerefentry><refentrytitle>amverify</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-<citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>
+<ulink url="http://wiki.zmanda.com"/>
 </para>
 </refsect1>
 </refentry>
index 3c201ad2a9606ced755d776a25d345a868f70814..35eb3443088c738f31976693b4126001f1aa2e49 100644 (file)
@@ -4,6 +4,7 @@ usr/libexec/amanda
 usr/share/lintian/overrides
 usr/share/man/man5
 usr/share/man/man8
+var/amanda
 var/lib/amanda
 var/lib/amanda/gnutar-lists
 var/lib/amanda/example
index 026cce115dc9b53a1544e1aca869661c1a122763..084741f4e5e11bc1360eaff9da8ae9d571161fd3 100644 (file)
@@ -2,6 +2,7 @@ etc/amanda
 usr/share/lintian/overrides
 usr/share/man/man5
 usr/share/man/man8
+var/amanda
 var/lib/amanda
 var/lib/amanda/gnutar-lists
 var/lib/amanda/example/label-templates
index 76954d0a1798257f0b4e6e39bb875a0d32a8cc0c..260db60e1ddbd8df17ea0959c089bdab33c2b985 100755 (executable)
@@ -5,6 +5,7 @@ LOGDIR="/var/log/amanda/"
 SYSCONFDIR="/etc"
 LOCALSTATEDIR="/var"
 AMHOMEDIR="${LOCALSTATEDIR}/lib/amanda"
+AMTMP="/tmp/amanda"
 amanda_user=amandabackup
 amanda_group=disk
 xinetd_reload="restart"
@@ -33,14 +34,20 @@ echo "`date +'%b %e %Y %T'`: Installing '${LOCALSTATEDIR}/amanda/amandates'."
 if [ ! -f ${LOCALSTATEDIR}/amanda/amandates ] ; then
        touch ${LOCALSTATEDIR}/amanda/amandates || exit 1
 fi
-if [ ${ret_val} -eq 0 ]; then
-       echo "`date +'%b %e %Y %T'`: Ensuring correct permissions for '${LOCALSTATEDIR}/amanda/amandates'." 
-       chown ${amanda_user}:${amanda_group} ${LOCALSTATEDIR}/amanda/amandates || exit 1
-       chmod 0640 ${LOCALSTATEDIR}/amanda/amandates || exit 1
-       if [ -x /sbin/restorecon ] ; then
-             /sbin/restorecon ${LOCALSTATEDIR}/amanda/amandates  || exit 1
-       fi
+echo "`date +'%b %e %Y %T'`: Ensuring correct permissions for '${LOCALSTATEDIR}/amanda/amandates'." 
+chown ${amanda_user}:${amanda_group} ${LOCALSTATEDIR}/amanda/amandates || exit 1
+chmod 0640 ${LOCALSTATEDIR}/amanda/amandates || exit 1
+if [ -x /sbin/restorecon ] ; then
+      /sbin/restorecon ${LOCALSTATEDIR}/amanda/amandates  || exit 1
+fi
+
+# Check for existence of and permissions on ${AMTMP}
+if [ ! -d ${AMTMP} ]; then
+       mkdir ${AMTMP} || exit 1
 fi
+echo "`date +'%b %e %Y %T'`: Ensuring correct permissions for '${AMTMP}'." 
+chown ${amanda_user}:${amanda_group} ${AMTMP} || exit 1
+chmod 0640 ${AMTMP} || exit 1
 
 # Install .gnupg directory
 echo "`date +'%b %e %Y %T'`: Installing '${AMHOMEDIR}/.gnupg'." 
index 79d872177dbe5bf125744bbfcf6bf1b28181512a..6e41192e33b339f6083db18d88c201c746c8cb7a 100755 (executable)
@@ -49,7 +49,7 @@ fi
 
 if [ -z $AMVER ]
 then
-    AMVER=amanda-2.6.0
+    AMVER=amanda-2.6.0p1
 fi
 
 if [ -z $AMTARBALL ]
@@ -113,9 +113,8 @@ do_package() {
 
     echo "Building package"
     cd $AMVER
-    # This assumes that you have loaded zmanda's GPG key into your keyring to
-    # sign the packages.
-    dpkg-buildpackage -rfakeroot -k3C5D1C92 -tc
+    # Create unsigned packages
+    dpkg-buildpackage -rfakeroot -uc -us
 }
 
 
@@ -125,6 +124,5 @@ do_all() {
     do_package $1
 }
 
-do_build
 do_resources
 do_package
index f6d8d84db051bd9750c34335e090941f3263c8ba..63eabb3891900112437d54f8acf31a1fe3184f22 100644 (file)
@@ -1,6 +1,9 @@
-amanda (2.6.0-1) unstable; urgency=low
+amanda (2.6.0p1-1) unstable; urgency=low
 
   * Initial debian release: This package is based on Bdale Garbee's work as
     the official debian maintainer for amanda.
+  * Found by Daniel_p: Fixed typos in preinst and postrm.  Added permission
+    check for /tmp/amanda.  Fixed rules to append default perl site_lib to
+    .install file so that perl modules are installed.
 
  -- Zmanda <support@zmanda.com>  Mon, 10 Mar 2008 1:00:09 -0600
index 7b58632da8b108eeb8a2bbde1754cd88c2481273..645a6620d88ede390372137b151aaf0da660f4c1 100755 (executable)
@@ -68,14 +68,14 @@ else
        echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
        echo "`date +'%b %e %Y %T'`:  SHELL:          /bin/sh" >>${TMPFILE}
        echo "`date +'%b %e %Y %T'`:  HOME:           /var/lib/amanda" >>${TMPFILE}
-       echo "`date +'%b %e %Y %T'`:  Default group:  ${amanda_group} " >>${TMPFILE}
+       echo "`date +'%b %e %Y %T'`:  Default group:  ${amanda_group}" >>${TMPFILE}
        echo "`date +'%b %e %Y %T'`:  Verifying ${amanda_user} user parameters :" >>${TMPFILE}
        
 
-        if [ "`id -gn ${amanda_user}`" != "${amanda_group} " ] ; then
+        if [ "`id -gn ${amanda_user}`" != "${amanda_group}" ] ; then
                 echo "`date +'%b %e %Y %T'`:  !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
-                echo "`date +'%b %e %Y %T'`:  !!!  user '${amanda_user}' is not part of the ${amanda_group}  group,Pl !!!" >>${TMPFILE}
-                echo "`date +'%b %e %Y %T'`:  !!!  make sure it is corrected before start using amanda  !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!! user '${amanda_user}' is not part of the ${amanda_group} group, !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!! please make sure it is corrected before start using amanda  !!!" >>${TMPFILE}
                 echo "`date +'%b %e %Y %T'`:  !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
         else
                 echo "`date +'%b %e %Y %T'`:  Verified group name of user '${amanda_user}'" >>${TMPFILE}
@@ -87,13 +87,13 @@ fi
 if [ -d /var/lib/amanda ] ; then
        echo -n "`date +'%b %e %Y %T'`:  Checking ownership of '/var/lib/amanda'... " >>${TMPFILE}
        if [ "`ls -dl /var/lib/amanda | awk '//{split($_,x); print x[3]}'`" = "${amanda_user}" ] && \
-          [ "`ls -dl /var/lib/amanda | awk '//{split($_,x); print x[4]}'`" = "${amanda_group} " ] ; then
+          [ "`ls -dl /var/lib/amanda | awk '//{split($_,x); print x[4]}'`" = "${amanda_group}" ] ; then
                echo "correct." >>${TMPFILE}
                VARLIB_OK=0
        else
                echo "incorrect!" >>${TMPFILE}
                echo "`date +'%b %e %Y %T'`:  Please ensure that the directory '/var/lib/amanda' is owned by" >>${TMPFILE}
-               echo "`date +'%b %e %Y %T'`:  the user '${amanda_user}' and group '${amanda_group} '." >>${TMPFILE}
+               echo "`date +'%b %e %Y %T'`:  the user '${amanda_user}' and group '${amanda_group}'." >>${TMPFILE}
                VARLIB_OK=1
        fi
 else
index 4f786779e323e8f930a2d0b4fb38b68eb1be678c..511e3f71d393b49b9ef62d9a7e5e1beb1d764765 100755 (executable)
@@ -8,7 +8,7 @@
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
-AMVER=2.6.0
+AMVER=2.6.0p1
 
 # These are variables that the user can override.  They get used in various
 # places during configure, build, and install.
@@ -24,6 +24,10 @@ SYSCONFDIR=/etc
 LOCALSTATEDIR=/var
 AMHOMEDIR=$(LOCALSTATEDIR)/lib/amanda
 LOGDIR=$(LOCALSTATEDIR)/log/amanda
+# Extract the perl site_lib directory.  This is used to install amanda's perl 
+# libs. If configure finds a different install or you specify a different path using
+# --with-amperldir= make sure you change this variable as well.
+PERLSITELIB=$(shell perl -V:installsitelib|sed -e"s:installsitelib='/::;s:'\;::")
 AMANDAUSER=amandabackup
 AMANDAGROUP=disk
 WITHOUT_SERVER="False"
@@ -57,8 +61,6 @@ build-stamp: /sbin/dump /usr/bin/smbclient
                --enable-shared \
                --sysconfdir=$(SYSCONFDIR) \
                --localstatedir=$(LOCALSTATEDIR)\
-               --with-star=/bin/star \
-               --with-gnutar=/bin/tar \
                --with-gnutar-listdir=$(AMHOMEDIR)/gnutar-lists \
                --with-index-server=localhost \
                --with-tape-server=localhost \
@@ -119,26 +121,25 @@ binary-arch: build
        dh_installchangelogs -v >> $(log) 2>&1
        echo "---->dh_installdebconf: " >> $(log)
        dh_installdebconf -v >> $(log) 2>&1
-       echo `pwd` >> $(log)
-       echo "---->dh_install -v: " >> $(log)
+       # Here's how we get the perl modules installed into sitelib
+       echo $(PERLSITELIB)/* >> debian/amanda-backup-server.install
+       echo "---->dh_install -v --fail-missing: " >> $(log)
        dh_install -v --sourcedir=debian/amanda-common >> $(log) 2>&1
        echo "---->dh_strip: " >> $(log)
        dh_strip >> $(log) 2>&1
        echo "---->dh_compress: " >> $(log)
        dh_compress >> $(log) 2>&1
-       echo "---->dh_movefiles: " >> $(log)
-       dh_movefiles --sourcedir=debian/amanda-common >> $(log) 2>&1
        echo "---->dh_fixperms: " >> $(log)
        dh_fixperms -v >> $(log) 2>&1
        # fix perms manually
        chown -R $(AMANDAUSER):$(AMANDAGROUP) debian/*/var/lib/*
        #chmod -R u=rwX,g=rwX,o-rwx debian/*/var/lib/*
-       chown -R $(AMANDAUSER):$(AMANDAGROUP) $(server)/$(LOGDIR)
+       chown -R $(AMANDAUSER):$(AMANDAGROUP) $(client)/$(LOGDIR) $(server)/$(LOGDIR)
        #chmod -R u=rwX,g=rwX,o-rwx $(server)/$(LOGDIR)
-       chown -R $(AMANDAUSER):$(AMANDAGROUP) $(server)/$(SYSCONFDIR)/amanda
+       chown -R $(AMANDAUSER):$(AMANDAGROUP)  $(client)/$(SYSCONFDIR)/amanda $(server)/$(SYSCONFDIR)/amanda
        #chmod -R u=rwX,g=rwX,o-rwx $(server)/$(SYSCONFDIR)/amanda
-       chown -R $(AMANDAUSER):$(AMANDAGROUP) $(client)/$(AMHOMEDIR)/gnutar-lists
-       chmod -R u=rwX,g=rwX,o-rwx $(client)/$(AMHOMEDIR)/gnutar-lists
+       chown -R $(AMANDAUSER):$(AMANDAGROUP) $(client)/$(AMHOMEDIR)/gnutar-lists $(server)/$(AMHOMEDIR)/gnutar-lists
+       chmod -R u=rwX,g=rwX,o-rwx  $(client)/$(AMHOMEDIR)/gnutar-lists $(server)/$(AMHOMEDIR)/gnutar-lists
        # .. setuid
        chown root:disk \
                $(client)/$(AMLIBEXECDIR)/killpgrp \
@@ -174,6 +175,7 @@ binary-arch: build
                $(server)/usr/share/lintian/overrides/amanda-backup-server
        dh_makeshlibs  >> $(log) 2>&1
        dh_installdeb >> $(log) 2>&1
+       dh_perl >> $(log) 2>&1
        dh_shlibdeps -l"debian/$(r)/usr/lib:debian/$(client)/usr/lib:debian/$(server)/usr/lib" >> $(log) 2>&1
        # strip out the non-versioned amanda-common references, we need
        # the versioned ones in the control file and dupes are ugly...
index 51b87b84a6ce784b30ef866caae3f4a3ad82e49e..b71eb0cf5be2f7e176969b32086f95d9a9c9d2dd 100644 (file)
 # --- Definitions ---
 
 # Define amanda_version if it is not already defined.
-%{!?amanda_version: %define amanda_version 2.6.0}
+%{!?amanda_version: %define amanda_version 2.6.0p1}
 %{!?amanda_release: %define amanda_release 1}
 %define amanda_version_info "Amanda Community Edition - version %{amanda_version}"
 %define amanda_user amandabackup
@@ -426,7 +426,7 @@ echo "`date +'%b %e %Y %T'`: Preparing to install: %{amanda_version_info}" >${TM
 # Check for the 'amanda' user
 echo "`date +'%b %e %Y %T'`: Checking for '%{amanda_user}' user..." >>${TMPFILE}
 if [ "`id -u %{amanda_user} > /dev/null 2>&1 && echo 0 || echo 1`" != "0" ] ; then
-        useradd -c "Amanda" -M -g ${amanda_group} -d %{AMANDAHOMEDIR} -s /bin/sh %{amanda_user}
+        useradd -c "Amanda" -M -g %{amanda_group} -d %{AMANDAHOMEDIR} -s /bin/sh %{amanda_user}
         if [ %{dist} = "SuSE" ]; then
                 PASSWD_EXIT=$?
         else
@@ -791,7 +791,7 @@ echo "`date +'%b %e %Y %T'`: Preparing to install: %{amanda_version_info}" >${TM
 # Check for the 'amanda' user
 echo "`date +'%b %e %Y %T'`: Checking for '%{amanda_user}' user..." >>${TMPFILE}
 if [ "`id -u %{amanda_user} > /dev/null 2>&1 && echo 0 || echo 1`" != "0" ] ; then
-        useradd -c "Amanda" -M -g ${amanda_group} -d %{AMANDAHOMEDIR} -s /bin/sh %{amanda_user}
+        useradd -c "Amanda" -M -g %{amanda_group} -d %{AMANDAHOMEDIR} -s /bin/sh %{amanda_user}
         if [ %{dist} = "SuSE" ]; then
                 PASSWD_EXIT=$?
         else
@@ -1177,7 +1177,7 @@ echo "`date +'%b %e %Y %T'`: Preparing to install: %{amanda_version_info}" >${TM
 # Check for the 'amanda' user
 echo "`date +'%b %e %Y %T'`: Checking for '%{amanda_user}' user..." >>${TMPFILE}
 if [ "`id -u %{amanda_user} > /dev/null 2>&1 && echo 0 || echo 1`" != "0" ] ; then
-        useradd -c "Amanda" -M -g ${amanda_group} -d %{AMANDAHOMEDIR} -s /bin/sh %{amanda_user} >>${TMPFILE} 2>&1
+        useradd -c "Amanda" -M -g %{amanda_group} -d %{AMANDAHOMEDIR} -s /bin/sh %{amanda_user} >>${TMPFILE} 2>&1
         if [ %{dist} = "SuSE" ]; then
                 PASSWD_EXIT=$?
         else
@@ -1635,6 +1635,8 @@ echo "Amanda installation log can be found in '${INSTALL_LOG}' and errors (if an
 # --- ChangeLog
 
 %changelog
+* Fri May 02 2008 Dan Locks <dwlocks at zmanda dot com>
+- Changed instances of ${ to %%{ where applicable
 * Tue Mar 11 2008 Dan Locks <dwlocks at zmanda dot com>
 - fixed many rpmlint complaints
 - added --quiet to configure statements
diff --git a/packaging/rpm/amanda.spec.orig b/packaging/rpm/amanda.spec.orig
new file mode 100644 (file)
index 0000000..b71eb0c
--- /dev/null
@@ -0,0 +1,1788 @@
+#
+#                  Copyright (C) 2005 Zmanda Incorporated.
+#                            All Rights Reserved.
+#
+#  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.
+# 
+#  You should have received a copy of the GNU General Public License along
+#  with this program; if not, write to the Free Software Foundation, Inc.,
+#  59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+# 
+#  Contact information: Zmanda Inc, 505 N Mathlida Ave, Suite 120
+#  Sunnyvale, CA 94085, USA, or: http://www.zmanda.com
+#
+
+
+%define build_srpm 0
+%{?srpm_only: %define build_srpm 1}
+
+# Pkg-config sometimes needs its own path set, and we need to allow users to
+# override our guess during detection.  This macro takes care of that.
+# If no --define PKG_CONFIG_PATH was passed and env var $PKG_CONFIG_PATH is 
+# set then use the env var.
+%{!?PKG_CONFIG_PATH: %{expand:%(echo ${PKG_CONFIG_PATH:+"%%define PKG_CONFIG_PATH $PKG_CONFIG_PATH"})}}
+
+%{?PKG_CONFIG_PATH:%{echo:PKG_CONFIG_PATH = %{PKG_CONFIG_PATH}}}
+
+# Define which Distribution we are building:
+# Try to detect the distribution we are building:
+%if %{_vendor} == redhat 
+    # Fedora symlinks /etc/fedora-release to /etc/redhat-release for at least
+    # fc3-7.  So RHEL and Fedora look at the same file.  The awk trickery here
+    # forces the field to be numeric so that the spec comparison works
+    %if %(awk '{print $1}' /etc/redhat-release) == "Fedora" && %(awk '{print $4+0}' /etc/redhat-release) == 3
+        %define dist fedora
+        %define disttag fc
+        %define distver 3
+    %endif
+    %if %(awk '{print $1}' /etc/redhat-release) == "Fedora" && %(awk '{print$4+0}' /etc/redhat-release) == 4
+        %define dist fedora
+        %define disttag fc
+        %define distver 4
+    %endif
+    %if %(awk '{print $1}' /etc/redhat-release) == "Fedora" && %(awk '{print $4+0}' /etc/redhat-release) == 5
+        %define dist fedora
+        %define disttag fc
+        %define distver 5
+    %endif
+    %if %(awk '{print $1}' /etc/redhat-release) == "Fedora" && %(awk '{print $4+0}' /etc/redhat-release) == 6
+        %define dist fedora
+        %define disttag fc
+        %define distver 6
+    %endif
+    %if %(awk '{print $1}' /etc/redhat-release) == "Fedora" && %(awk '{print $3+0}' /etc/redhat-release) == 7
+        %define dist fedora
+        %define disttag fc
+        %define distver 7
+    %endif
+    %if %(awk '{print $1}' /etc/redhat-release) == "Fedora" && %(awk '{print $3+0}' /etc/redhat-release) == 8
+        %define dist fedora
+        %define disttag fc
+        %define distver 8
+        # TODO: generalize this so that any platform can cross compile
+        %if %{_host_cpu} == x86_64 && %{_target_cpu} == i686
+                # Do nothing if PKG_CONFIG_PATH was set by the user above.
+                %{!?PKG_CONFIG_PATH: %define PKG_CONFIG_PATH /usr/lib/pkgconfig}
+        %endif
+    %endif
+    %if %(awk '{print $1}' /etc/redhat-release) == "Red" && %(awk '{print $7+0}' /etc/redhat-release) == 3
+        %define dist redhat
+        %define disttag rhel
+        %define distver 3
+    %endif
+    %if %(awk '{print $1}' /etc/redhat-release) == "Red" && %(awk '{print $7+0}' /etc/redhat-release) == 4
+        %define dist redhat
+        %define disttag rhel
+        %define distver 4
+    %endif
+    %if %(awk '{print $1}' /etc/redhat-release) == "Red" && %(awk '{print $7+0}' /etc/redhat-release) == 5
+        %define dist redhat
+        %define disttag rhel
+        %define distver 5
+    %endif
+%endif
+# Detect Suse variants.  Suse gives us some nice macros in their rpms
+%if %{_vendor} == "suse"
+    %if %{suse_version} == 910
+        %define dist SuSE
+        %define disttag sles
+        %define distver 9
+    %endif
+    %if %{suse_version} == 1010
+        %define dist SuSE
+        %define disttag sles
+        %define distver 10
+    %endif
+    %if %{suse_version} == 1000
+        %define dist SuSE
+        %define disttag suse
+        %define distver 10
+    %endif
+%endif
+
+# Set options per distribution
+%if %{dist} == redhat || %{dist} == fedora
+    %define rpm_group Applications/Archiving
+    %define xinetd_reload restart
+%endif
+%if %{dist} == SuSE
+    %define rpm_group Productivity/Archiving/Backup
+    %define xinetd_reload restart
+%endif
+
+%define packer %(%{__id_u} -n)
+
+# --- Definitions ---
+
+# Define amanda_version if it is not already defined.
+%{!?amanda_version: %define amanda_version 2.6.0p1}
+%{!?amanda_release: %define amanda_release 1}
+%define amanda_version_info "Amanda Community Edition - version %{amanda_version}"
+%define amanda_user amandabackup
+%define amanda_group disk
+%define udpportrange "700,740"
+%define tcpportrange "11000,11040"
+%define low_tcpportrange "700,710"
+
+Summary: The Amanda Backup and Archiving System
+Name: amanda
+Version: %{amanda_version}
+%define rpm_release %{amanda_release}.%{disttag}%{distver}
+%if %{build_srpm}
+%define rpm_release %{amanda_release}
+%endif
+Release: %{rpm_release}
+Source: %{name}-%{version}.tar.gz
+License: http://wiki.zmanda.com/index.php/Amanda_Copyright
+Vendor: Zmanda, Inc.
+Packager: www.zmanda.com
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%{packer}-buildroot
+Group: %{rpm_group}
+# TODO - Need required versions for these:
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: binutils
+BuildRequires: bison
+BuildRequires: flex
+BuildRequires: gcc
+BuildRequires: glibc >= 2.2.0
+BuildRequires: readline
+BuildRequires: curl >= 7.10.0
+Requires: /bin/awk
+Requires: /bin/date
+Requires: /usr/bin/id
+Requires: /sbin/ldconfig
+Requires: /bin/sh
+Requires: /usr/sbin/useradd
+Requires: /usr/sbin/usermod
+Requires: fileutils
+Requires: grep
+Requires: gnuplot
+Requires: libc.so.6
+Requires: libm.so.6
+Requires: libnsl.so.1
+Requires: curl >= 7.10.0
+Requires: xinetd
+Requires: perl >= 5.6.0
+Requires: tar >= 1.15
+%if  %{dist} == redhat || %{dist}== fedora
+Requires: libtermcap.so.2
+Requires: initscripts
+%endif
+Provides: amanda-backup_client = %{amanda_version}, amanda-backup_server = %{amanda_version}
+
+%package backup_client
+Summary: The Amanda Backup and Archiving Client
+Group: %{rpm_group}
+Requires: /bin/awk
+Requires: fileutils
+Requires: grep
+%if  %{dist} == redhat || %{dist}== fedora
+Requires: libtermcap.so.2
+Requires: initscripts
+%endif
+Requires: xinetd
+Requires: libc.so.6
+Requires: libm.so.6
+Requires: libnsl.so.1
+Requires: perl >= 5.6.0
+Requires: tar >= 1.15
+Provides: amanda-backup_client = %{amanda_version}
+Provides: libamclient-%{version}.so = %{amanda_version}
+Provides: libamanda-%{version}.so = %{amanda_version}
+Conflicts: amanda-backup_server 
+
+%package backup_server
+Summary: The Amanda Backup and Archiving Server
+Group: %{rpm_group}
+Requires: /bin/awk
+Requires: fileutils
+Requires: grep
+Requires: libc.so.6
+Requires: libm.so.6
+Requires: libnsl.so.1
+%if  %{dist} == redhat || %{dist}== fedora
+Requires: libtermcap.so.2
+Requires: initscripts
+%endif
+Requires: xinetd
+Requires: perl >= 5.6.0
+Requires: tar >= 1.15
+Provides: amanda-backup_server = %{amanda_version}
+Provides: libamclient-%{version}.so = %{amanda_version}
+Provides: libamanda-%{version}.so = %{amanda_version}
+Provides: libamserver-%{version}.so = %{amanda_version}
+Provides: librestore-%{version}.so = %{amanda_version}
+Provides: libamtape-%{version}.so = %{amanda_version}
+Provides: libamdevice-%{version}.so = %{amanda_version}
+
+# --- Package descriptions ---
+
+%description
+Amanda is the leading Open-Source Backup and Archiving software.
+
+The amanda-backup_server package should be installed on the Amanda server, i.e. 
+the machine attached to backup media (such as a tape drive or disk 
+drives) where backups will be written. The amanda-backup_server package
+includes Amanda client.  The amanda-backup_client package needs 
+to be installed on every system that is being backed up.
+
+Amanda Forums is located at: http://forums.zmanda.com/
+Amanda Documentation is available at: http://wiki.zmanda.com/
+
+
+
+%description backup_server
+Amanda is the leading Open-Source Backup and Archiving software.
+
+This package contains the Amanda server.  The amanda-backup_server package 
+should be installed on the Amanda server, i.e. the machine attached 
+to backup media (such as a tape drive or disk drives) where backups 
+will be written.  The amanda-backup_server package includes Amanda client.
+
+Amanda Forums is located at: http://forums.zmanda.com/
+Amanda Documentation is available at: http://wiki.zmanda.com/
+
+
+
+%description backup_client
+Amanda is the leading Open-Source Backup and Archiving software.
+
+This package contains the Amanda client.  The amanda-backup_client package  
+needs to be installed on every system that is being backed up.
+
+Amanda Forums is located at: http://forums.zmanda.com/
+Amanda Documentation is available at: http://wiki.zmanda.com/
+
+# --- Directory setup ---
+
+# Configure directories:
+%define PREFIX          /usr
+%define EPREFIX         %{PREFIX}
+%define BINDIR          %{EPREFIX}/bin
+%define SBINDIR         %{EPREFIX}/sbin
+%define LIBEXECDIR      %{EPREFIX}/libexec
+%define AMLIBEXECDIR    %{LIBEXECDIR}/amanda
+%define DATADIR         %{PREFIX}/share
+%define SYSCONFDIR      /etc
+%define LOCALSTATEDIR   /var
+%define AMANDAHOMEDIR   %{LOCALSTATEDIR}/lib/amanda
+%ifarch x86_64
+%define LIBDIR          %{EPREFIX}/lib64
+%else
+%define LIBDIR          %{EPREFIX}/lib
+%endif
+%define AMLIBDIR        %{LIBDIR}/amanda
+%define INCLUDEDIR      %{PREFIX}/include
+%define MANDIR          %{DATADIR}/man
+%define LOGDIR          /var/log/amanda
+%define PERLSITELIB     %(eval "`perl -V:installsitelib`"; echo $installsitelib)
+
+# Installation directories:
+%define ROOT_SBINDIR            %{buildroot}/%{SBINDIR}
+%define ROOT_LIBEXECDIR         %{buildroot}/%{LIBEXECDIR}
+%define ROOT_DATADIR            %{buildroot}/%{DATADIR}
+%define ROOT_LOCALSTATEDIR      %{buildroot}/%{LOCALSTATEDIR}
+%define ROOT_SYSCONFDIR         %{buildroot}/%{SYSCONFDIR}
+%define ROOT_AMANDAHOMEDIR      %{buildroot}/%{AMANDAHOMEDIR}
+%define ROOT_LIBDIR             %{buildroot}/%{LIBDIR}
+%define ROOT_MANDIR             %{buildroot}/%{MANDIR}
+%define ROOT_LOGDIR             %{buildroot}/%{LOGDIR}
+
+# --- Unpack ---
+
+%prep
+%setup -q
+# --- Configure and compile ---
+
+%build
+%define config_user %{amanda_user}
+%define config_group %{amanda_group}
+
+%if  %{disttag} == rhel && %{distver} == 3
+./configure \
+        CFLAGS="%{optflags} -g" CXXFLAGS="%{optflags}" \
+        --quiet \
+        --prefix=%{PREFIX} \
+        --sysconfdir=%{SYSCONFDIR} \
+        --sharedstatedir=%{LOCALSTATEDIR} \
+        --localstatedir=%{LOCALSTATEDIR} \
+        --libdir=%{LIBDIR} \
+        --includedir=%{INCLUDEDIR} \
+        --with-gnuplot=/usr/bin/gnuplot \
+        --with-gnutar=/bin/tar \
+        --with-gnutar-listdir=%{AMANDAHOMEDIR}/gnutar-lists \
+        --with-index-server=localhost \
+        --with-tape-server=localhost \
+        --with-user=%{config_user} \
+        --with-group=%{config_group} \
+        --with-owner=%{packer} \
+        --with-fqdn \
+        --with-bsd-security \
+        --with-bsdtcp-security \
+        --with-bsdudp-security \
+        --with-ssh-security \
+        --with-udpportrange=%{udpportrange} \
+        --with-tcpportrange=%{tcpportrange} \
+        --with-low-tcpportrange=%{low_tcpportrange} \
+        --with-debugging=%{LOGDIR} \
+        --with-assertions \
+        --disable-installperms \
+        --without-ipv6 
+%else
+# This confusing macro results in PKG_CONFIG_PATH=some/path if some/path
+# was set on the command line, or by the platform detection bits.
+./configure \
+        %{?PKG_CONFIG_PATH: PKG_CONFIG_PATH=%PKG_CONFIG_PATH} \
+        CFLAGS="%{optflags} -g" CXXFLAGS="%{optflags}" \
+        --quiet \
+        --prefix=%{PREFIX} \
+        --sysconfdir=%{SYSCONFDIR} \
+        --sharedstatedir=%{LOCALSTATEDIR} \
+        --localstatedir=%{LOCALSTATEDIR} \
+        --libdir=%{LIBDIR} \
+        --includedir=%{INCLUDEDIR} \
+        --with-star=/usr/bin/star \
+        --with-gnuplot=/usr/bin/gnuplot \
+        --with-gnutar=/bin/tar \
+        --with-gnutar-listdir=%{AMANDAHOMEDIR}/gnutar-lists \
+        --with-index-server=localhost \
+        --with-tape-server=localhost \
+        --with-user=%{config_user} \
+        --with-group=%{config_group} \
+        --with-owner=%{packer} \
+        --with-fqdn \
+        --with-bsd-security \
+        --with-bsdtcp-security \
+        --with-bsdudp-security \
+        --with-ssh-security \
+        --with-udpportrange=%{udpportrange} \
+        --with-tcpportrange=%{tcpportrange} \
+        --with-low-tcpportrange=%{low_tcpportrange} \
+        --with-debugging=%{LOGDIR} \
+        --with-assertions \
+        --disable-installperms
+%endif
+
+make
+
+# --- Install to buildroot ---
+
+%install
+if [ "%{buildroot}" != "/" ]; then
+        if [ -d "%{buildroot}" ] ; then
+                rm -rf %{buildroot}
+        fi
+else
+        echo "BuildRoot was somehow set to / !"
+        exit -1
+fi
+
+make -j1 DESTDIR=%{buildroot} install
+
+rm -rf %{ROOT_DATADIR}/amanda
+rm -f %{ROOT_AMANDAHOMEDIR}/example/inetd.conf.amandaclient
+mkdir %{buildroot}/{etc,var/log}
+mkdir %{ROOT_LOCALSTATEDIR}/amanda 
+mkdir %{ROOT_SYSCONFDIR}/amanda
+mkdir %{ROOT_AMANDAHOMEDIR}/gnutar-lists
+mkdir %{ROOT_LOGDIR}
+
+echo "%{amanda_version_info}" >%{ROOT_AMANDAHOMEDIR}/amanda-release
+
+# --- Clean up buildroot ---
+
+%clean
+if [ "%{buildroot}" != "/" ]; then
+        if [ -d "%{buildroot}" ] ; then
+                rm -rf %{buildroot}
+        fi
+else
+        echo "BuildRoot was somehow set to / !"
+        exit -1
+fi
+
+# --- Pre/post (un)installation scripts ---
+
+%pre
+TMPFILE=`mktemp /tmp/rpm-amanda.XXXXXXXXXXX`
+if [ $? -ne 0 ]; then
+        echo "Unable to mktemp!" 1>&2
+        exit 1
+fi
+LOGDIR="%{LOGDIR}"
+INSTALL_LOG="${LOGDIR}/install.log"
+INSTALL_ERR="${LOGDIR}/install.err"
+
+echo "`date +'%b %e %Y %T'`: Preparing to install: %{amanda_version_info}" >${TMPFILE}
+
+# Check for the 'amanda' user
+echo "`date +'%b %e %Y %T'`: Checking for '%{amanda_user}' user..." >>${TMPFILE}
+if [ "`id -u %{amanda_user} > /dev/null 2>&1 && echo 0 || echo 1`" != "0" ] ; then
+        useradd -c "Amanda" -M -g %{amanda_group} -d %{AMANDAHOMEDIR} -s /bin/sh %{amanda_user}
+        if [ %{dist} = "SuSE" ]; then
+                PASSWD_EXIT=$?
+        else
+                # Lock the amanda account until admin sets password
+                passwd -l %{amanda_user} >>/dev/null
+                PASSWD_EXIT=$?
+        fi
+        if [ ${PASSWD_EXIT} -eq 0 ] ; then
+                echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  The '%{amanda_user}; user account has been successfully created." >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  Furthermore, the account has been automatically locked for you" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  for security purposes.  Once a password for the  '%{amanda_user}'" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  account has been set, the user can be unlocked by issuing" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  the following command as root.:" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  # passwd -u %{amanda_user}" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  If this is not a new installation of Amanda and you have" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  pre-existing Amanda configurations in %{SYSCONFDIR}/amanda" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  you should ensure that 'dumpuser' is set to '%{amanda_user}'" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  in those configurations.  Additionally, you should ensure" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  that %{AMANDAHOMEDIR}/.amandahosts on your client systems" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  is properly configured to allow connections for the user" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  '%{amanda_user}'." >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
+                PASSWD_OK=0
+        else
+                echo "`date +'%b %e %Y %T'`:  !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!                                                       !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!  The '%{amanda_user}' user account for this system has been   !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!  created, however the user has no password set. For   !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!  security purposes this account  is normally locked   !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!  after creation.  Unfortunately,  when locking this   !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!  account an error occurred.  To ensure the security   !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!  of your system  you should set a password  for the   !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!  user account '%{amanda_user}' immediately!  To set  such a   !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!  password, please issue the following command.:       !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!                                                       !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!   # passwd %{amanda_user}                                   !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!                                                       !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
+                PASSWD_OK=1
+        fi
+else
+        # log information about 'amanda' user parameters
+        echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
+        echo "`date +'%b %e %Y %T'`:  The Amanda backup software is configured to operate as the" >>${TMPFILE}
+        echo "`date +'%b %e %Y %T'`:  user '%{amanda_user}'.  This user exists on your system and has not" >>${TMPFILE}
+        echo "`date +'%b %e %Y %T'`:  been modified.  To ensure that Amanda functions properly," >>${TMPFILE}
+        echo "`date +'%b %e %Y %T'`:  please see that the following parameters are set for that" >>${TMPFILE}
+        echo "`date +'%b %e %Y %T'`:  user.:" >>${TMPFILE}
+        echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
+        echo "`date +'%b %e %Y %T'`:  SHELL:          /bin/sh" >>${TMPFILE}
+        echo "`date +'%b %e %Y %T'`:  HOME:           %{AMANDAHOMEDIR}" >>${TMPFILE}
+        echo "`date +'%b %e %Y %T'`:  Default group:  %{amanda_group}" >>${TMPFILE}
+        echo "`date +'%b %e %Y %T'`:  Verifying %{amanda_user} parameters :" >>${TMPFILE}
+
+        if [ "`id -gn %{amanda_user}`" != "disk" ] ; then
+                echo "`date +'%b %e %Y %T'`:  !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!  user 'amandabackup' is not part of the disk group,Pl !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!  make sure it is corrected before start using amanda  !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
+        else
+                echo "`date +'%b %e %Y %T'`:  Verified group name of user 'amandabackup'" >>${TMPFILE}
+        fi
+
+        if [ "`grep ^%{amanda_user} /etc/passwd|cut -d: -f7`" != "/bin/sh" ] ; then
+                echo "`date +'%b %e %Y %T'`:  !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!! user 'amandabackup' default shell should be set to    !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!! /bin/sh, pl correct before start using Amanda         !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
+        else
+                echo "`date +'%b %e %Y %T'`:  Verified Default shell for user 'amandabackup'" >>${TMPFILE}
+        fi
+
+        if [ "`grep ^%{amanda_user} /etc/passwd|cut -d: -f6`" != "%{AMANDAHOMEDIR}" ] ; then
+                echo "`date +'%b %e %Y %T'`:  !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!! user 'amandabackup' home directory should be set to   !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!! %{AMANDAHOMEDIR} Pl correct before using Amanda       !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
+        else
+                echo "`date +'%b %e %Y %T'`:  Verified Default home directory for user amandabackup" >>${TMPFILE}
+        fi
+        echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
+        PASSWD_OK=0
+fi
+if [ -d %{AMANDAHOMEDIR} ] ; then
+        echo -n "`date +'%b %e %Y %T'`:  Checking ownership of '%{AMANDAHOMEDIR}'... " >>${TMPFILE}
+        if [ "`ls -dl %{AMANDAHOMEDIR} | awk '//{split($_,x); print x[3]}'`" = "%{amanda_user}" ] && \
+           [ "`ls -dl %{AMANDAHOMEDIR} | awk '//{split($_,x); print x[4]}'`" = "%{amanda_group}" ] ; then
+                echo "correct." >>${TMPFILE}
+                VARLIB_OK=0
+        else
+                echo "incorrect!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  Please ensure that the directory '%{AMANDAHOMEDIR}' is owned by" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  the user '%{amanda_user}' and group '%{amanda_group}'." >>${TMPFILE}
+                VARLIB_OK=1
+        fi
+else
+        VARLIB_OK=0
+fi
+echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
+if [ ! -e ${LOGDIR} ] ; then
+        # create log directory
+        mkdir -m 0750 ${LOGDIR} >>${TMPFILE} 2>&1
+        chown %{amanda_user}:%{amanda_group} ${LOGDIR} >>${TMPFILE} 2>&1
+elif [ ! -d ${LOGDIR} ] ; then
+        mv ${LOGDIR} ${LOGDIR}.rpmsave >>${TMPFILE} 2>&1
+        mkdir -m 0750 ${LOGDIR} >>${TMPFILE} 2>&1
+        chown %{amanda_user}:%{amanda_group} ${LOGDIR} >>${TMPFILE} 2>&1
+        mv ${LOGDIR}.rpmsave ${LOGDIR}/ >>${TMPFILE} 2>&1
+fi
+
+if [ ${PASSWD_OK} -eq 1 ] || [ ${VARLIB_OK} -eq 1 ] ; then
+        cat ${TMPFILE}
+        cat ${TMPFILE} >>${INSTALL_ERR}
+        echo "Please review '${INSTALL_ERR}' to correct errors which have prevented the Amanda installaton." >&2
+        echo "Amanda installation log can be found in '${INSTALL_LOG}' and errors (if any) in '${INSTALL_ERR}'."
+        exit 1
+else
+        cat ${TMPFILE}
+        cat ${TMPFILE} >>${INSTALL_LOG}
+fi
+
+echo "`date +'%b %e %Y %T'`: === Amanda installation started. ===" >${TMPFILE}
+
+cat ${TMPFILE}
+cat ${TMPFILE} >>${INSTALL_LOG}
+if [ -f "${TMPFILE}" ]; then
+        rm -f "${TMPFILE}"
+fi
+
+%post
+TMPFILE=`mktemp /tmp/rpm-amanda.XXXXXXXXXXX
+if [ $? -ne 0 ]; then
+        echo "Unable to mktemp!" 1>&2
+        exit 1
+fi
+LOGDIR="%{LOGDIR}"
+INSTALL_LOG="${LOGDIR}/install.log"
+INSTALL_ERR="${LOGDIR}/install.err"
+
+echo -n "`date +'%b %e %Y %T'`: Updating library cache..." >${TMPFILE}
+/sbin/ldconfig >>${TMPFILE} 2>&1
+echo "done." >>${TMPFILE}
+cat ${TMPFILE}
+cat ${TMPFILE} >>${INSTALL_LOG}
+
+if [ -e /etc/xinetd.d ] && [ -d /etc/xinetd.d ] ; then
+        if [ ! -f /etc/xinetd.d/amandaserver ] ; then
+                cp %{AMANDAHOMEDIR}/example/xinetd.amandaserver /etc/xinetd.d/amandaserver
+                chmod 0644 /etc/xinetd.d/amandaserver >>${TMPFILE} 2>&1
+                if [ -f /etc/xinetd.d/amandaclient ] ; then
+                        rm /etc/xinetd.d/amandaclient
+                fi
+                echo -n "`date +'%b %e %Y %T'`: Reloading xinetd configuration..." >${TMPFILE}
+                if [ "%{xinetd_reload}" == "reload" ] ; then
+                        /etc/init.d/xinetd %{xinetd_reload} >>${TMPFILE} 2>&1
+                        ret_val=$?
+                        if [ ${ret_val} -ne 0 ] ; then
+                                echo -n "reload failed.  Attempting restart..." >>${TMPFILE}
+                                /etc/init.d/xinetd restart >>${TMPFILE} 2>&1
+                                ret_val=$?
+                        fi
+                else
+                        /etc/init.d/xinetd %{xinetd_reload} >>${TMPFILE} 2>&1
+                        ret_val=$?
+                fi
+                if [ ${ret_val} -eq 0 ] ; then
+                        echo "success." >>${TMPFILE}
+                        cat ${TMPFILE}
+                        cat ${TMPFILE} >>${INSTALL_LOG}
+                else
+                        echo "failed.  Please check your system logs." >>${TMPFILE}
+                        cat ${TMPFILE} 1>&2
+                        cat ${TMPFILE} >>${INSTALL_ERR}
+                fi
+        fi
+fi
+
+echo "`date +'%b %e %Y %T'`: Installing '%{LOCALSTATEDIR}/amanda/amandates'." >${TMPFILE}
+ret_val=0
+if [ ! -f %{LOCALSTATEDIR}/amanda/amandates ] ; then
+        touch %{LOCALSTATEDIR}/amanda/amandates >>${TMPFILE} 2>&1
+        ret_val=$?
+        if [ ${ret_val} -eq 0 ]; then
+                echo "`date +'%b %e %Y %T'`: The file '%{LOCALSTATEDIR}/amanda/amandates' has been created." >>${TMPFILE}
+        fi
+fi
+if [ ${ret_val} -eq 0 ]; then
+        echo "`date +'%b %e %Y %T'`: Ensuring correct permissions for '%{LOCALSTATEDIR}/amanda/amandates'." >>${TMPFILE}
+        chown %{amanda_user}:%{amanda_group} %{LOCALSTATEDIR}/amanda/amandates >>${TMPFILE} 2>&1
+        chmod 0640 %{LOCALSTATEDIR}/amanda/amandates >>${TMPFILE} 2>&1
+        if [ -x /sbin/restorecon ] ; then
+              /sbin/restorecon %{LOCALSTATEDIR}/amanda/amandates  >>${TMPFILE} 2>&1
+        fi
+fi
+if [ ${ret_val} -eq 0 ]; then
+        echo "`date +'%b %e %Y %T'`: '%{LOCALSTATEDIR}/amanda/amandates' Installation successful." >>${TMPFILE}
+        cat ${TMPFILE}
+        cat ${TMPFILE} >>${INSTALL_LOG}
+else
+        echo "`date +'%b %e %Y %T'`: '%{LOCALSTATEDIR}/amanda/amandates' Installation failed." >>${TMPFILE}
+        cat ${TMPFILE}
+        cat ${TMPFILE} >>${INSTALL_ERR}
+fi
+
+
+# Install .gnupg directory
+echo "`date +'%b %e %Y %T'`: Installing '%{AMANDAHOMEDIR}/.gnupg'." >${TMPFILE}
+ret_val=0
+if [ ! -d %{AMANDAHOMEDIR}/.gnupg ] ; then
+        echo "`date +'%b %e %Y %T'`: '%{AMANDAHOMEDIR}/.gnupg' will be created." >>${TMPFILE}
+        mkdir %{AMANDAHOMEDIR}/.gnupg >>${TMPFILE} 2>&1
+        ret_val=$?
+        if [ ${ret_val} -eq 0 ]; then
+                echo "`date +'%b %e %Y %T'`: The directory '%{AMANDAHOMEDIR}/.gnupg' created successfully." >>${TMPFILE}
+        else
+                echo "`date +'%b %e %Y %T'`: The directory '%{AMANDAHOMEDIR}/.gnupg' creation failed." >>${TMPFILE}
+        fi
+fi
+if [ ${ret_val} -eq 0 ]; then
+        echo "`date +'%b %e %Y %T'`: Ensuring correct permissions for '%{SYSCONFDIR}/.gnupg'." >>${TMPFILE}
+        chown %{amanda_user}:%{amanda_group} %{AMANDAHOMEDIR}/.gnupg >>${TMPFILE} 2>&1
+        ret_val=$?
+        if [ ${ret_val} -eq 0 ]; then
+                chmod 700 %{AMANDAHOMEDIR}/.gnupg >>${TMPFILE} 2>&1
+                ret_val=$?
+        fi
+fi
+if [ ${ret_val} -eq 0 ]; then
+        echo "`date +'%b %e %Y %T'`: '%{AMANDAHOMEDIR}/.gnupg' Installation successful." >>${TMPFILE}
+        cat ${TMPFILE}
+        cat ${TMPFILE} >>${INSTALL_LOG}
+else
+        echo "`date +'%b %e %Y %T'`: '%{AMANDAHOMEDIR}/.gnupg' Installation failed." >>${TMPFILE}
+        cat ${TMPFILE}
+        cat ${TMPFILE} >>${INSTALL_ERR}
+fi
+
+# Install .amandahosts
+echo "`date +'%b %e %Y %T'`: Checking '%{AMANDAHOMEDIR}/.amandahosts' file." >${TMPFILE}
+if [ ! -f %{AMANDAHOMEDIR}/.amandahosts ] ; then
+        touch %{AMANDAHOMEDIR}/.amandahosts >>${TMPFILE} 2>&1
+fi
+for host in localhost localhost.localdomain ; do
+        if [ -z "`grep \"^${host}[[:blank:]]\+root[[:blank:]]\+amindexd[[:blank:]]\+amidxtaped\" %{AMANDAHOMEDIR}/.amandahosts`" ] ; then
+                echo "${host}   root amindexd amidxtaped" >>%{AMANDAHOMEDIR}/.amandahosts
+        fi
+        if [ -z "`grep \"^${host}[[:blank:]]\+%{amanda_user}[[:blank:]]\+amdump\" %{AMANDAHOMEDIR}/.amandahosts`" ] ; then
+                echo "${host}   %{amanda_user} amdump" >>%{AMANDAHOMEDIR}/.amandahosts
+        fi
+done
+chown %{amanda_user}:%{amanda_group} %{AMANDAHOMEDIR}/.amandahosts >>${TMPFILE} 2>&1
+chmod 0600 %{AMANDAHOMEDIR}/.amandahosts >>${TMPFILE} 2>&1
+cat ${TMPFILE}
+cat ${TMPFILE} >>${INSTALL_LOG}
+
+# SSH RSA key generation for amdump
+KEYDIR="%{AMANDAHOMEDIR}/.ssh"
+KEYFILE="id_rsa_amdump"
+COMMENT="%{amanda_user}@server"
+if [ ! -d ${KEYDIR} ] ; then
+        if [ -f ${KEYDIR} ] ; then
+                echo "`date +'%b %e %Y %T'`: Directory '${KEYDIR}' exists as a file.  Renaming to '${KEYDIR}.rpmsave'." >${TMPFILE}
+                mv ${KEYDIR} ${KEYDIR}.rpmsave
+                cat ${TMPFILE}
+                cat ${TMPFILE} >>${INSTALL_LOG}
+        fi
+        echo "`date +'%b %e %Y %T'`: Creating directory '${KEYDIR}'." >${TMPFILE}
+        mkdir ${KEYDIR} >>${TMPFILE} 2>&1
+        cat ${TMPFILE}
+        cat ${TMPFILE} >>${INSTALL_LOG}
+fi
+if [ ! -f ${KEYDIR}/${KEYFILE} ] ; then
+        echo "`date +'%b %e %Y %T'`: Creating ssh RSA key in '${KEYDIR}/${KEYFILE}'" >${TMPFILE}
+        cat ${TMPFILE}
+        cat ${TMPFILE} >>${INSTALL_LOG}
+        ssh-keygen -q -C $COMMENT -t rsa -f ${KEYDIR}/${KEYFILE} -N '' >>${TMPFILE} 2>&1
+        cat ${TMPFILE}
+        cat ${TMPFILE} >>${INSTALL_LOG}
+fi
+echo "`date +'%b %e %Y %T'`: Setting ownership and permissions for '${KEYDIR}' and '${KEYDIR}/${KEYFILE}*'" >${TMPFILE}
+chown %{amanda_user}:%{amanda_group} ${KEYDIR} ${KEYDIR}/${KEYFILE}* >>${TMPFILE} 2>&1
+chmod 0750 ${KEYDIR} >>${TMPFILE} 2>&1
+chmod 0600 ${KEYDIR}/${KEYFILE}* >>${TMPFILE} 2>&1
+cat ${TMPFILE}
+cat ${TMPFILE} >>${INSTALL_LOG}
+
+# SSH RSA key generation on client for amrecover
+KEYDIR="%{AMANDAHOMEDIR}/.ssh"
+KEYFILE="id_rsa_amrecover"
+COMMENT="root@client"
+if [ ! -d ${KEYDIR} ] ; then
+        if [ -f ${KEYDIR} ] ; then
+                echo "`date +'%b %e %Y %T'`: Directory '${KEYDIR}' exists as a file.  Renaming to '${KEYDIR}.rpmsave'." >${TMPFILE}
+                mv ${KEYDIR} ${KEYDIR}.rpmsave >>${TMPFILE} 2>&1
+                cat ${TMPFILE}
+                cat ${TMPFILE} >>${INSTALL_LOG}
+        fi
+        echo "`date +'%b %e %Y %T'`: Creating directory '${KEYDIR}'." >${TMPFILE}
+        mkdir ${KEYDIR} >>${TMPFILE} 2>&1
+        cat ${TMPFILE}
+        cat ${TMPFILE} >>${INSTALL_LOG}
+fi
+if [ ! -f ${KEYDIR}/${KEYFILE} ] ; then
+        echo "`date +'%b %e %Y %T'`: Creating ssh RSA key in '${KEYDIR}/${KEYFILE}'" >${TMPFILE}
+        ssh-keygen -q -C $COMMENT -t rsa -f ${KEYDIR}/${KEYFILE} -N '' >>${TMPFILE} 2>&1
+        cat ${TMPFILE}
+        cat ${TMPFILE} >>${INSTALL_LOG}
+fi
+echo "`date +'%b %e %Y %T'`: Setting permissions for '${KEYDIR}'" >${TMPFILE}
+chown %{amanda_user}:%{amanda_group} ${KEYDIR} >>${TMPFILE} 2>&1
+chmod 0750 ${KEYDIR} >>${TMPFILE} 2>&1
+chmod 0600 ${KEYDIR}/${KEYFILE}* >>${TMPFILE} 2>&1
+cat ${TMPFILE}
+cat ${TMPFILE} >>${INSTALL_LOG}
+
+# environment variables (~amandabackup/.profile)
+echo "`date +'%b %e %Y %T'`: Checking for '%{AMANDAHOMEDIR}/.profile' and ensuring correct environment." >${TMPFILE}
+if [ ! -f %{AMANDAHOMEDIR}/.profile ] ; then
+        touch %{AMANDAHOMEDIR}/.profile >>${TMPFILE} 2>&1
+fi
+if [ -z "`grep PATH %{AMANDAHOMEDIR}/.profile | grep '%{SBINDIR}'`" ] ; then
+        echo "export PATH=\"\$PATH:%{SBINDIR}\"" >>%{AMANDAHOMEDIR}/.profile 2>>${TMPFILE}
+fi
+echo "`date +'%b %e %Y %T'`: Setting ownership and permissions for '%{AMANDAHOMEDIR}/.profile'" >>${TMPFILE}
+chown %{amanda_user}:%{amanda_group} %{AMANDAHOMEDIR}/.profile >>${TMPFILE} 2>&1
+chmod 0640 %{AMANDAHOMEDIR}/.profile >>${TMPFILE} 2>&1
+cat ${TMPFILE}
+cat ${TMPFILE} >>${INSTALL_LOG}
+
+echo "`date +'%b %e %Y %T'`: Sending anonymous distribution and version information to Zmanda" >> ${INSTALL_LOG}
+if [ -x /usr/bin/wget ]; then 
+        /usr/bin/wget -q -o /dev/null -O - --timeout=5 http://www.zmanda.com/amanda-tips.php\?version=%{amanda_version}\&os=%{disttag}%{distver}\&type=server 
+fi
+
+echo "`date +'%b %e %Y %T'`: === Amanda installation complete. ===" >${TMPFILE}
+
+cat ${TMPFILE}
+cat ${TMPFILE} >>${INSTALL_LOG}
+if [ -f "${TMPFILE}" ]; then
+        rm -f "${TMPFILE}"
+fi
+
+echo "Amanda installation log can be found in '${INSTALL_LOG}' and errors (if any) in '${INSTALL_ERR}'."
+%postun
+/sbin/ldconfig
+%pre backup_server
+TMPFILE=`mktemp /tmp/rpm-amanda.XXXXXXXXXXX`
+if [ $? -ne 0 ]; then
+        echo "Unable to mktemp!" 1>&2
+        exit 1
+fi
+
+LOGDIR="%{LOGDIR}"
+INSTALL_LOG="${LOGDIR}/install.log"
+INSTALL_ERR="${LOGDIR}/install.err"
+
+echo "`date +'%b %e %Y %T'`: Preparing to install: %{amanda_version_info}" >${TMPFILE}
+
+# Check for the 'amanda' user
+echo "`date +'%b %e %Y %T'`: Checking for '%{amanda_user}' user..." >>${TMPFILE}
+if [ "`id -u %{amanda_user} > /dev/null 2>&1 && echo 0 || echo 1`" != "0" ] ; then
+        useradd -c "Amanda" -M -g %{amanda_group} -d %{AMANDAHOMEDIR} -s /bin/sh %{amanda_user}
+        if [ %{dist} = "SuSE" ]; then
+                PASSWD_EXIT=$?
+        else
+                # Lock the amanda account until admin sets password
+                passwd -l %{amanda_user} >>/dev/null
+                PASSWD_EXIT=$?
+        fi
+        if [ ${PASSWD_EXIT} -eq 0 ] ; then
+                echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  The '%{amanda_user}; user account has been successfully created." >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  Furthermore, the account has been automatically locked for you" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  for security purposes.  Once a password for the  '%{amanda_user}'" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  account has been set, the user can be unlocked by issuing" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  the following command as root.:" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  # passwd -u %{amanda_user}" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  If this is not a new installation of Amanda and you have" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  pre-existing Amanda configurations in %{SYSCONFDIR}/amanda" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  you should ensure that 'dumpuser' is set to '%{amanda_user}'" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  in those configurations.  Additionally, you should ensure" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  that %{AMANDAHOMEDIR}/.amandahosts on your client systems" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  is properly configured to allow connections for the user" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  '%{amanda_user}'." >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
+                PASSWD_OK=0
+        else
+                echo "`date +'%b %e %Y %T'`:  !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!                                                       !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!  The '%{amanda_user}' user account for this system has been   !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!  created, however the user has no password set. For   !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!  security purposes this account  is normally locked   !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!  after creation.  Unfortunately,  when locking this   !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!  account an error occurred.  To ensure the security   !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!  of your system  you should set a password  for the   !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!  user account '%{amanda_user}' immediately!  To set  such a   !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!  password, please issue the following command.:       !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!                                                       !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!   # passwd %{amanda_user}                                     !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!                                                       !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
+                PASSWD_OK=1
+        fi
+else
+        # log information about 'amanda' user parameters
+        echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
+        echo "`date +'%b %e %Y %T'`:  The Amanda backup software is configured to operate as the" >>${TMPFILE}
+        echo "`date +'%b %e %Y %T'`:  user '%{amanda_user}'.  This user exists on your system and has not" >>${TMPFILE}
+        echo "`date +'%b %e %Y %T'`:  been modified.  To ensure that Amanda functions properly," >>${TMPFILE}
+        echo "`date +'%b %e %Y %T'`:  please see that the following parameters are set for that" >>${TMPFILE}
+        echo "`date +'%b %e %Y %T'`:  user.:" >>${TMPFILE}
+        echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
+        echo "`date +'%b %e %Y %T'`:  SHELL:          /bin/sh" >>${TMPFILE}
+        echo "`date +'%b %e %Y %T'`:  HOME:           %{AMANDAHOMEDIR}" >>${TMPFILE}
+        echo "`date +'%b %e %Y %T'`:  Default group:  %{amanda_group}" >>${TMPFILE}
+        echo "`date +'%b %e %Y %T'`:  Verifying %{amanda_user} parameters :" >>${TMPFILE}
+
+        if [ "`id -gn %{amanda_user}`" != "disk" ] ; then
+                echo "`date +'%b %e %Y %T'`:  !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!! user 'amandabackup' is not part of the disk group,Pl  !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!! make sure it is corrected before start using Amanda   !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
+        else
+                echo "`date +'%b %e %Y %T'`:  Verified group name of user 'amandabackup'" >>${TMPFILE}
+        fi
+
+        if [ "`grep ^%{amanda_user} /etc/passwd|cut -d: -f7`" != "/bin/sh" ] ; then
+                echo "`date +'%b %e %Y %T'`:  !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!! user 'amandabackup' default shell should be set to    !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!! /bin/sh, pl correct before start using Amanda         !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
+        else
+                echo "`date +'%b %e %Y %T'`:  Verified Default shell for user 'amandabackup'" >>${TMPFILE}
+        fi
+
+        if [ "`grep ^%{amanda_user} /etc/passwd|cut -d: -f6`" != "%{AMANDAHOMEDIR}" ] ; then
+                echo "`date +'%b %e %Y %T'`:  !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!! user 'amandabackup' home directory should be set to   !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!! %{AMANDAHOMEDIR} Pl correct before using Amanda       !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
+        else
+                echo "`date +'%b %e %Y %T'`:  Verified Default home directory for user amandabackup" >>${TMPFILE}
+        fi
+        echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
+        PASSWD_OK=0
+fi
+if [ -d %{AMANDAHOMEDIR} ] ; then
+        echo -n "`date +'%b %e %Y %T'`:  Checking ownership of '%{AMANDAHOMEDIR}'... " >>${TMPFILE}
+        if [ "`ls -dl %{AMANDAHOMEDIR} | awk '//{split($_,x); print x[3]}'`" = "%{amanda_user}" ] && \
+           [ "`ls -dl %{AMANDAHOMEDIR} | awk '//{split($_,x); print x[4]}'`" = "%{amanda_group}" ] ; then
+                echo "correct." >>${TMPFILE}
+                VARLIB_OK=0
+        else
+                echo "incorrect!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  Please ensure that the directory '%{AMANDAHOMEDIR}' is owned by" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  the user '%{amanda_user}' and group '%{amanda_group}'." >>${TMPFILE}
+                VARLIB_OK=1
+        fi
+else
+        VARLIB_OK=0
+fi
+echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
+
+if [ ! -e ${LOGDIR} ] ; then
+        # create log directory
+        mkdir -m 0750 ${LOGDIR} >>${TMPFILE} 2>&1
+        chown %{amanda_user}:%{amanda_group} ${LOGDIR} >>${TMPFILE} 2>&1
+elif [ ! -d ${LOGDIR} ] ; then
+        mv ${LOGDIR} ${LOGDIR}.rpmsave >>${TMPFILE} 2>&1
+        mkdir -m 0750 ${LOGDIR} >>${TMPFILE} 2>&1
+        chown %{amanda_user}:%{amanda_group} ${LOGDIR} >>${TMPFILE} 2>&1
+        mv ${LOGDIR}.rpmsave ${LOGDIR}/ >>${TMPFILE} 2>&1
+fi
+if [ ${PASSWD_OK} -eq 1 ] || [ ${VARLIB_OK} -eq 1 ] ; then
+        cat ${TMPFILE}
+        cat ${TMPFILE} >>${INSTALL_ERR}
+        echo "Please review '${INSTALL_ERR}' to correct errors which have prevented the Amanda installaton." >&2
+        echo "Amanda installation log can be found in '${INSTALL_LOG}' and errors (if any) in '${INSTALL_ERR}'."
+        exit 1
+else
+        cat ${TMPFILE}
+        cat ${TMPFILE} >>${INSTALL_LOG}
+fi
+
+echo "`date +'%b %e %Y %T'`: === Amanda backup server installation started. ===" >${TMPFILE}
+
+cat ${TMPFILE}
+cat ${TMPFILE} >>${INSTALL_LOG}
+if [ -f "${TMPFILE}" ]; then
+        rm -f "${TMPFILE}"
+fi
+%post backup_server
+TMPFILE=`mktemp /tmp/rpm-amanda.XXXXXXXXXXX`
+if [ $? -ne 0 ]; then
+        echo "Unable to mktemp!" 1>&2
+        exit 1
+fi
+LOGDIR="%{LOGDIR}"
+INSTALL_LOG="${LOGDIR}/install.log"
+INSTALL_ERR="${LOGDIR}/install.err"
+
+echo -n "`date +'%b %e %Y %T'`: Updating system library cache..." >${TMPFILE}
+/sbin/ldconfig
+echo "done." >>${TMPFILE}
+cat ${TMPFILE}
+cat ${TMPFILE} >>${INSTALL_LOG}
+
+if [ -e /etc/xinetd.d ] && [ -d /etc/xinetd.d ] ; then
+        if [ ! -f /etc/xinetd.d/amandaserver ] ; then
+                cp %{AMANDAHOMEDIR}/example/xinetd.amandaserver /etc/xinetd.d/amandaserver
+                chmod 0644 /etc/xinetd.d/amandaserver >>${TMPFILE} 2>&1
+                if [ -f /etc/xinetd.d/amandaclient ] ; then
+                        rm /etc/xinetd.d/amandaclient
+                fi
+
+                echo -n "`date +'%b %e %Y %T'`: Reloading xinetd configuration..." >${TMPFILE}
+                if [ "%{xinetd_reload}" == "reload" ] ; then
+                        /etc/init.d/xinetd %{xinetd_reload} >>${TMPFILE} 2>&1
+                        ret_val=$?
+                        if [ ${ret_val} -ne 0 ] ; then
+                                echo -n "reload failed.  Attempting restart..." >>${TMPFILE}
+                                /etc/init.d/xinetd restart >>${TMPFILE} 2>&1
+                                ret_val=$?
+                        fi
+                else
+                        /etc/init.d/xinetd %{xinetd_reload} >>${TMPFILE} 2>&1
+                        ret_val=$?
+                fi
+                if [ ${ret_val} -eq 0 ] ; then
+                        echo "success." >>${TMPFILE}
+                        cat ${TMPFILE}
+                        cat ${TMPFILE} >>${INSTALL_LOG}
+                else
+                        echo "failed.  Please check your system logs." >>${TMPFILE}
+                        cat ${TMPFILE} 1>&2
+                        cat ${TMPFILE} >>${INSTALL_ERR}
+                fi
+        fi
+fi
+
+echo "`date +'%b %e %Y %T'`: Installing '%{LOCALSTATEDIR}/amanda/amandates'." >${TMPFILE}
+ret_val=0
+if [ ! -f %{LOCALSTATEDIR}/amanda/amandates ] ; then
+        touch %{LOCALSTATEDIR}/amanda/amandates >>${TMPFILE} 2>&1
+        ret_val=$?
+        if [ ${ret_val} -eq 0 ]; then
+                echo "`date +'%b %e %Y %T'`: The file '%{LOCALSTATEDIR}/amanda/amandates' has been created." >>${TMPFILE}
+        fi
+fi
+if [ ${ret_val} -eq 0 ]; then
+        echo "`date +'%b %e %Y %T'`: Ensuring correct permissions for '%{LOCALSTATEDIR}/amanda/amandates'." >>${TMPFILE}
+        chown %{amanda_user}:%{amanda_group} %{LOCALSTATEDIR}/amanda/amandates >>${TMPFILE} 2>&1
+        chmod 0640 %{LOCALSTATEDIR}/amanda/amandates >>${TMPFILE} 2>&1
+fi
+if [ ${ret_val} -eq 0 ]; then
+        echo "`date +'%b %e %Y %T'`: '%{LOCALSTATEDIR}/amanda/amandates' Installation successful." >>${TMPFILE}
+        cat ${TMPFILE}
+        cat ${TMPFILE} >>${INSTALL_LOG}
+else
+        echo "`date +'%b %e %Y %T'`: '%{LOCALSTATEDIR}/amanda/amandates' Installation failed." >>${TMPFILE}
+        cat ${TMPFILE}
+        cat ${TMPFILE} >>${INSTALL_ERR}
+fi
+
+# Install .amandahosts to server
+echo "`date +'%b %e %Y %T'`: Checking '%{AMANDAHOMEDIR}/.amandahosts' file." >${TMPFILE}
+if [ ! -f %{AMANDAHOMEDIR}/.amandahosts ] ; then
+        touch %{AMANDAHOMEDIR}/.amandahosts >>${TMPFILE} 2>&1
+fi
+for host in localhost localhost.localdomain ; do
+        if [ -z "`grep \"^${host}[[:blank:]]\+root[[:blank:]]\+amindexd[[:blank:]]\+amidxtaped\" %{AMANDAHOMEDIR}/.amandahosts`" ] ; then
+                echo "${host}   root amindexd amidxtaped" >>%{AMANDAHOMEDIR}/.amandahosts
+        fi
+        if [ -z "`grep \"^${host}[[:blank:]]\+%{amanda_user}[[:blank:]]\+amdump\" %{AMANDAHOMEDIR}/.amandahosts`" ] ; then
+                echo "${host}   %{amanda_user} amdump" >>%{AMANDAHOMEDIR}/.amandahosts
+        fi
+done
+chown %{amanda_user}:%{amanda_group} %{AMANDAHOMEDIR}/.amandahosts >>${TMPFILE} 2>&1
+chmod 0600 %{AMANDAHOMEDIR}/.amandahosts >>${TMPFILE} 2>&1
+cat ${TMPFILE}
+cat ${TMPFILE} >>${INSTALL_LOG}
+
+# Install amanda client configuration file
+echo "`date +'%b %e %Y %T'`: Checking '%{SYSCONFDIR}/amanda/amanda-client.conf' file." >${TMPFILE}
+if [ ! -f %{SYSCONFDIR}/amanda/amanda-client.conf ] ; then
+        cp %{AMANDAHOMEDIR}/example/amanda-client.conf %{SYSCONFDIR}/amanda/amanda-client.conf >>${TMPFILE} 2>&1
+fi
+chown %{amanda_user}:%{amanda_group} %{SYSCONFDIR}/amanda/amanda-client.conf >>${TMPFILE} 2>&1
+chmod 0600 %{SYSCONFDIR}/amanda/amanda-client.conf >>${TMPFILE} 2>&1
+cat ${TMPFILE}
+cat ${TMPFILE} >>${INSTALL_LOG}
+
+# install am_passphrase file to server
+echo "`date +'%b %e %Y %T'`: Checking '%{AMANDAHOMEDIR}/.am_passphrase' file." >${TMPFILE}
+if [ ! -f %{AMANDAHOMEDIR}/.am_passphrase ] ; then
+        echo "`date +'%b %e %Y %T'`: Create '%{AMANDAHOMEDIR}/.am_passphrase' file." >${TMPFILE}
+        touch %{AMANDAHOMEDIR}/.am_passphrase >>${TMPFILE} 2>&1
+        phrase=`echo "amandabackup" | md5sum | awk '{print $1}'`
+        echo ${phrase} >>%{AMANDAHOMEDIR}/.am_passphrase
+
+        chown %{amanda_user}:%{amanda_group} %{AMANDAHOMEDIR}/.am_passphrase >>${TMPFILE} 2>&1
+        chmod 0700 %{AMANDAHOMEDIR}/.am_passphrase >>${TMPFILE} 2>&1
+fi
+cat ${TMPFILE}
+cat ${TMPFILE} >>${INSTALL_LOG}
+
+# Install .gnupg directory
+echo "`date +'%b %e %Y %T'`: Installing '%{AMANDAHOMEDIR}/.gnupg'." >${TMPFILE}
+ret_val=0
+if [ ! -d %{AMANDAHOMEDIR}/.gnupg ] ; then
+        echo "`date +'%b %e %Y %T'`: '%{AMANDAHOMEDIR}/.gnupg' will be created." >>${TMPFILE}
+        mkdir %{AMANDAHOMEDIR}/.gnupg >>${TMPFILE} 2>&1
+        ret_val=$?
+        if [ ${ret_val} -eq 0 ]; then
+                echo "`date +'%b %e %Y %T'`: The directory '%{AMANDAHOMEDIR}/.gnupg' created successfully." >>${TMPFILE}
+        else
+                echo "`date +'%b %e %Y %T'`: The directory '%{AMANDAHOMEDIR}/.gnupg' creation failed." >>${TMPFILE}
+        fi
+fi
+if [ ${ret_val} -eq 0 ]; then
+        echo "`date +'%b %e %Y %T'`: Ensuring correct permissions for '%{SYSCONFDIR}/.gnupg'." >>${TMPFILE}
+        chown %{amanda_user}:%{amanda_group} %{AMANDAHOMEDIR}/.gnupg >>${TMPFILE} 2>&1
+        ret_val=$?
+        if [ ${ret_val} -eq 0 ]; then
+                chmod 700 %{AMANDAHOMEDIR}/.gnupg >>${TMPFILE} 2>&1
+                ret_val=$?
+        fi
+fi
+if [ ${ret_val} -eq 0 ]; then
+        echo "`date +'%b %e %Y %T'`: '%{AMANDAHOMEDIR}/.gnupg' Installation successful." >>${TMPFILE}
+        cat ${TMPFILE}
+        cat ${TMPFILE} >>${INSTALL_LOG}
+else
+        echo "`date +'%b %e %Y %T'`: '%{AMANDAHOMEDIR}/.gnupg' Installation failed." >>${TMPFILE}
+        cat ${TMPFILE}
+        cat ${TMPFILE} >>${INSTALL_ERR}
+fi
+
+# SSH RSA key generation on server for amdump
+KEYDIR="%{AMANDAHOMEDIR}/.ssh"
+KEYFILE="id_rsa_amdump"
+COMMENT="%{amanda_user}@server"
+if [ ! -d ${KEYDIR} ] ; then
+        if [ -f ${KEYDIR} ] ; then
+                echo "`date +'%b %e %Y %T'`: Directory '${KEYDIR}' exists as a file.  Renaming to '${KEYDIR}.rpmsave'." >${TMPFILE}
+                mv ${KEYDIR} ${KEYDIR}.rpmsave >>${TMPFILE} 2>&1
+                cat ${TMPFILE}
+                cat ${TMPFILE} >>${INSTALL_LOG}
+        fi
+        echo "`date +'%b %e %Y %T'`: Creating directory '${KEYDIR}'." >${TMPFILE}
+        mkdir ${KEYDIR} >>${TMPFILE} 2>&1
+        cat ${TMPFILE}
+        cat ${TMPFILE} >>${INSTALL_LOG}
+fi
+if [ ! -f ${KEYDIR}/${KEYFILE} ] ; then
+        echo "`date +'%b %e %Y %T'`: Creating ssh RSA key in '${KEYDIR}/${KEYFILE}'" >${TMPFILE}
+        ssh-keygen -q -C $COMMENT -t rsa -f ${KEYDIR}/${KEYFILE} -N '' >>${TMPFILE} 2>&1
+        cat ${TMPFILE}
+        cat ${TMPFILE} >>${INSTALL_LOG}
+fi
+echo "`date +'%b %e %Y %T'`: Setting ownership and permissions for '${KEYDIR}' and '${KEYDIR}/${KEYFILE}*'" >${TMPFILE}
+chown %{amanda_user}:%{amanda_group} ${KEYDIR} ${KEYDIR}/${KEYFILE}* >>${TMPFILE} 2>&1
+chmod 0750 ${KEYDIR} >>${TMPFILE} 2>&1
+chmod 0600 ${KEYDIR}/${KEYFILE}* >>${TMPFILE} 2>&1
+cat ${TMPFILE}
+cat ${TMPFILE} >>${INSTALL_LOG}
+
+# SSH RSA key generation on client for amrecover
+KEYDIR="%{AMANDAHOMEDIR}/.ssh"
+KEYFILE="id_rsa_amrecover"
+COMMENT="root@client"
+if [ ! -d ${KEYDIR} ] ; then
+        if [ -f ${KEYDIR} ] ; then
+                echo "`date +'%b %e %Y %T'`: Directory '${KEYDIR}' exists as a file.  Renaming to '${KEYDIR}.rpmsave'." >${TMPFILE}
+                mv ${KEYDIR} ${KEYDIR}.rpmsave >>${TMPFILE} 2>&1
+                cat ${TMPFILE}
+                cat ${TMPFILE} >>${INSTALL_LOG}
+        fi
+        echo "`date +'%b %e %Y %T'`: Creating directory '${KEYDIR}'." >${TMPFILE}
+        mkdir ${KEYDIR} >>${TMPFILE} 2>&1
+        cat ${TMPFILE}
+        cat ${TMPFILE} >>${INSTALL_LOG}
+fi
+if [ ! -f ${KEYDIR}/${KEYFILE} ] ; then
+        echo "`date +'%b %e %Y %T'`: Creating ssh RSA key in '${KEYDIR}/${KEYFILE}'" >${TMPFILE}
+        ssh-keygen -q -C $COMMENT -t rsa -f ${KEYDIR}/${KEYFILE} -N '' >>${TMPFILE} 2>&1
+        cat ${TMPFILE}
+        cat ${TMPFILE} >>${INSTALL_LOG}
+fi
+echo "`date +'%b %e %Y %T'`: Setting ownership and permissions for '${KEYDIR}'" >${TMPFILE}
+chown %{amanda_user}:%{amanda_group} ${KEYDIR} >>${TMPFILE} 2>&1
+chmod 0750 ${KEYDIR} >>${TMPFILE} 2>&1
+chmod 0600 ${KEYDIR}/${KEYFILE}* >>${TMPFILE} 2>&1
+cat ${TMPFILE}
+cat ${TMPFILE} >>${INSTALL_LOG}
+
+# environment variables (~amandabackup/.profile)
+echo "`date +'%b %e %Y %T'`: Checking for '%{AMANDAHOMEDIR}/.profile' and ensuring correct environment." >${TMPFILE}
+if [ ! -f %{AMANDAHOMEDIR}/.profile ] ; then
+        touch %{AMANDAHOMEDIR}/.profile >>${TMPFILE} 2>&1
+fi
+if [ -z "`grep PATH %{AMANDAHOMEDIR}/.profile | grep '%{SBINDIR}'`" ] ; then
+        echo "export PATH=\"\$PATH:%{SBINDIR}\"" >>%{AMANDAHOMEDIR}/.profile 2>>${TMPFILE}
+fi
+cat ${TMPFILE}
+cat ${TMPFILE} >>${INSTALL_LOG}
+
+echo "`date +'%b %e %Y %T'`: Setting ownership and permissions for '%{AMANDAHOMEDIR}/.profile'" >${TMPFILE}
+chown %{amanda_user}:%{amanda_group} %{AMANDAHOMEDIR}/.profile >>${TMPFILE} 2>&1
+chmod 0640 %{AMANDAHOMEDIR}/.profile >>${TMPFILE} 2>&1
+cat ${TMPFILE}
+cat ${TMPFILE} >>${INSTALL_LOG}
+
+echo "`date +'%b %e %Y %T'`: Sending anonymous distribution and version information to Zmanda" >> ${INSTALL_LOG}
+if [ -x /usr/bin/wget ]; then 
+        /usr/bin/wget -q -o /dev/null -O - --timeout=5 http://www.zmanda.com/amanda-tips.php\?version=%{amanda_version}\&os=%{disttag}%{distver}\&type=server 
+fi
+
+echo "`date +'%b %e %Y %T'`: === Amanda backup server installation complete. ===" >${TMPFILE}
+
+cat ${TMPFILE}
+cat ${TMPFILE} >>${INSTALL_LOG}
+
+if [ -f "${TMPFILE}" ]; then
+        rm -f "${TMPFILE}" >>${TMPFILE} 2>&1
+fi
+
+echo "Amanda installation log can be found in '${INSTALL_LOG}' and errors (if any) in '${INSTALL_ERR}'."
+%postun backup_server
+/sbin/ldconfig
+%pre backup_client
+TMPFILE=`mktemp /tmp/rpm-amanda.XXXXXXXXXXX`
+if [ $? -ne 0 ]; then
+        echo "Unable to mktemp!" 1>&2
+        exit 1
+fi
+LOGDIR="%{LOGDIR}"
+INSTALL_LOG="${LOGDIR}/install.log"
+INSTALL_ERR="${LOGDIR}/install.err"
+
+echo "`date +'%b %e %Y %T'`: Preparing to install: %{amanda_version_info}" >${TMPFILE}
+
+# Check for the 'amanda' user
+echo "`date +'%b %e %Y %T'`: Checking for '%{amanda_user}' user..." >>${TMPFILE}
+if [ "`id -u %{amanda_user} > /dev/null 2>&1 && echo 0 || echo 1`" != "0" ] ; then
+        useradd -c "Amanda" -M -g %{amanda_group} -d %{AMANDAHOMEDIR} -s /bin/sh %{amanda_user} >>${TMPFILE} 2>&1
+        if [ %{dist} = "SuSE" ]; then
+                PASSWD_EXIT=$?
+        else
+                # Lock the amanda account until admin sets password
+                passwd -l %{amanda_user} >>/dev/null
+                PASSWD_EXIT=$?
+        fi
+        if [ ${PASSWD_EXIT} -eq 0 ] ; then
+                echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  The '%{amanda_user}; user account has been successfully created." >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  Furthermore, the account has been automatically locked for you" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  for security purposes.  Once a password for the  '%{amanda_user}'" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  account has been set, the user can be unlocked by issuing" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  the following command as root.:" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  # passwd -u %{amanda_user}" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  If this is not a new installation of Amanda and you have" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  pre-existing Amanda configurations in %{SYSCONFDIR}/amanda" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  you should ensure that 'dumpuser' is set to '%{amanda_user}'" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  in those configurations.  Additionally, you should ensure" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  that %{AMANDAHOMEDIR}/.amandahosts on your client systems" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  is properly configured to allow connections for the user" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  '%{amanda_user}'." >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
+                PASSWD_OK=0
+        else
+                echo "`date +'%b %e %Y %T'`:  !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!                                                       !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!  The '%{amanda_user}' user account for this system has been   !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!  created, however the user has no password set. For   !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!  security purposes this account  is normally locked   !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!  after creation.  Unfortunately,  when locking this   !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!  account an error occurred.  To ensure the security   !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!  of your system  you should set a password  for the   !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!  user account '%{amanda_user}' immediately!  To set  such a   !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!  password, please issue the following command.:       !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!                                                       !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!   # passwd %{amanda_user}                                     !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!!                                                       !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
+                PASSWD_OK=1
+        fi
+else
+        # log information about 'amanda' user parameters
+        echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
+        echo "`date +'%b %e %Y %T'`:  The Amanda backup software is configured to operate as the" >>${TMPFILE}
+        echo "`date +'%b %e %Y %T'`:  user '%{amanda_user}'.  This user exists on your system and has not" >>${TMPFILE}
+        echo "`date +'%b %e %Y %T'`:  been modified.  To ensure that Amanda functions properly," >>${TMPFILE}
+        echo "`date +'%b %e %Y %T'`:  please see that the following parameters are set for that" >>${TMPFILE}
+        echo "`date +'%b %e %Y %T'`:  user.:" >>${TMPFILE}
+        echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
+        echo "`date +'%b %e %Y %T'`:  SHELL:          /bin/sh" >>${TMPFILE}
+        echo "`date +'%b %e %Y %T'`:  HOME:           %{AMANDAHOMEDIR}" >>${TMPFILE}
+        echo "`date +'%b %e %Y %T'`:  Default group:  %{amanda_group}" >>${TMPFILE}
+        echo "`date +'%b %e %Y %T'`:  Verifying %{amanda_user} parameters :" >>${TMPFILE}
+
+        if [ "`id -gn %{amanda_user}`" != "disk" ] ; then
+                echo "`date +'%b %e %Y %T'`:  !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!! user 'amandabackup' is not part of the disk group,Pl  !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!! make sure it is corrected before start using Amanda   !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
+        else
+                echo "`date +'%b %e %Y %T'`:  Verified group name of user 'amandabackup'" >>${TMPFILE}
+        fi
+
+        if [ "`grep ^%{amanda_user} /etc/passwd|cut -d: -f7`" != "/bin/sh" ] ; then
+                echo "`date +'%b %e %Y %T'`:  !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!! user 'amandabackup' default shell should be set to    !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!! /bin/sh, pl correct before start using Amanda         !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
+        else
+                echo "`date +'%b %e %Y %T'`:  Verified Default shell for user 'amandabackup'" >>${TMPFILE}
+        fi
+
+        if [ "`grep ^%{amanda_user} /etc/passwd|cut -d: -f6`" != "%{AMANDAHOMEDIR}" ] ; then
+                echo "`date +'%b %e %Y %T'`:  !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!! user 'amandabackup' home directory should be set to   !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!! %{AMANDAHOMEDIR} Pl correct before using Amanda       !!!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
+        else
+                echo "`date +'%b %e %Y %T'`:  Verified Default home directory for user amandabackup" >>${TMPFILE}
+        fi
+        echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
+        PASSWD_OK=0
+fi
+if [ -d %{AMANDAHOMEDIR} ] ; then
+        echo -n "`date +'%b %e %Y %T'`:  Checking ownership of '%{AMANDAHOMEDIR}'... " >>${TMPFILE}
+        if [ "`ls -dl %{AMANDAHOMEDIR} | awk '//{split($_,x); print x[3]}'`" = "%{amanda_user}" ] && \
+           [ "`ls -dl %{AMANDAHOMEDIR} | awk '//{split($_,x); print x[4]}'`" = "%{amanda_group}" ] ; then
+                echo "correct." >>${TMPFILE}
+                VARLIB_OK=0
+        else
+                echo "incorrect!" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  Please ensure that the directory '%{AMANDAHOMEDIR}' is owned by" >>${TMPFILE}
+                echo "`date +'%b %e %Y %T'`:  the user '%{amanda_user}' and group '%{amanda_group}'." >>${TMPFILE}
+                VARLIB_OK=1
+        fi
+else
+        VARLIB_OK=0
+fi
+echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
+
+if [ ! -e ${LOGDIR} ] ; then
+        # create log directory
+        mkdir -m 0750 ${LOGDIR} >>${TMPFILE} 2>&1
+        chown %{amanda_user}:%{amanda_group} ${LOGDIR} >>${TMPFILE} 2>&1
+elif [ ! -d ${LOGDIR} ] ; then
+        mv ${LOGDIR} ${LOGDIR}.rpmsave >>${TMPFILE} 2>&1
+        mkdir -m 0750 ${LOGDIR} >>${TMPFILE} 2>&1
+        chown %{amanda_user}:%{amanda_group} ${LOGDIR} >>${TMPFILE} 2>&1
+        mv ${LOGDIR}.rpmsave ${LOGDIR}/ >>${TMPFILE} 2>&1
+fi
+if [ ${PASSWD_OK} -eq 1 ] || [ ${VARLIB_OK} -eq 1 ] ; then
+        cat ${TMPFILE}
+        cat ${TMPFILE} >>${INSTALL_ERR}
+        echo "Please review '${INSTALL_ERR}' to correct errors which have prevented the Amanda installaton." >&2
+        echo "Amanda installation log can be found in '${INSTALL_LOG}' and errors (if any) in '${INSTALL_ERR}'."
+        exit 1
+else
+        cat ${TMPFILE}
+        cat ${TMPFILE} >>${INSTALL_LOG}
+fi
+
+echo "`date +'%b %e %Y %T'`: === Amanda backup client installation started. ===" >${TMPFILE}
+
+cat ${TMPFILE}
+cat ${TMPFILE} >>${INSTALL_LOG}
+
+if [ -f "${TMPFILE}" ]; then
+        rm -f "${TMPFILE}"
+fi
+
+%post backup_client
+TMPFILE=`mktemp /tmp/rpm-amanda.XXXXXXXXXXX`
+if [ $? -ne 0 ]; then
+        echo "Unable to mktemp!" 1>&2
+        exit 1
+fi
+LOGDIR="%{LOGDIR}"
+INSTALL_LOG="${LOGDIR}/install.log"
+INSTALL_ERR="${LOGDIR}/install.err"
+
+echo -n "`date +'%b %e %Y %T'`: Updating system library cache..." >${TMPFILE}
+/sbin/ldconfig
+echo "done." >>${TMPFILE}
+cat ${TMPFILE}
+cat ${TMPFILE} >>${INSTALL_LOG}
+
+if [ -e /etc/xinetd.d ] && [ -d /etc/xinetd.d ] ; then
+        if [ ! -f /etc/xinetd.d/amandaclient ] ; then
+                cp %{AMANDAHOMEDIR}/example/xinetd.amandaclient /etc/xinetd.d/amandaclient
+
+                echo -n "`date +'%b %e %Y %T'`: Reloading xinetd configuration..." >${TMPFILE}
+                if [ "%{xinetd_reload}" == "reload" ] ; then
+                        /etc/init.d/xinetd %{xinetd_reload} >>${TMPFILE} 2>&1
+                        ret_val=$?
+                        if [ ${ret_val} -ne 0 ] ; then
+                                echo -n "reload failed.  Attempting restart..." >>${TMPFILE}
+                                /etc/init.d/xinetd restart >>${TMPFILE} 2>&1
+                                ret_val=$?
+                        fi
+                else
+                        /etc/init.d/xinetd %{xinetd_reload} >>${TMPFILE} 2>&1
+                        ret_val=$?
+                fi
+                if [ ${ret_val} -eq 0 ] ; then
+                        echo "success." >>${TMPFILE}
+                        cat ${TMPFILE}
+                        cat ${TMPFILE} >>${INSTALL_LOG}
+                else
+                        echo "failed.  Please check your system logs." >>${TMPFILE}
+                        cat ${TMPFILE}
+                        cat ${TMPFILE} >>${INSTALL_LOG}
+                fi
+        fi
+fi
+
+echo "`date +'%b %e %Y %T'`: Installing '%{LOCALSTATEDIR}/amanda/amandates'." >${TMPFILE}
+ret_val=0
+if [ ! -f %{LOCALSTATEDIR}/amanda/amandates ] ; then
+        touch %{LOCALSTATEDIR}/amanda/amandates >>${TMPFILE} 2>&1
+        ret_val=$?
+        if [ ${ret_val} -eq 0 ]; then
+                echo "`date +'%b %e %Y %T'`: The file '%{LOCALSTATEDIR}/amanda/amandates' has been created." >>${TMPFILE}
+        fi
+fi
+if [ ${ret_val} -eq 0 ]; then
+        echo "`date +'%b %e %Y %T'`: Ensuring correct permissions for '%{LOCALSTATEDIR}/amanda/amandates'." >>${TMPFILE}
+        chown %{amanda_user}:%{amanda_group} %{LOCALSTATEDIR}/amanda/amandates >>${TMPFILE} 2>&1
+        chmod 0640 %{LOCALSTATEDIR}/amanda/amandates >>${TMPFILE} 2>&1
+fi
+if [ ${ret_val} -eq 0 ]; then
+        echo "`date +'%b %e %Y %T'`: '%{LOCALSTATEDIR}/amanda/amandates' Installation successful." >>${TMPFILE}
+        cat ${TMPFILE}
+        cat ${TMPFILE} >>${INSTALL_LOG}
+else
+        echo "`date +'%b %e %Y %T'`: '%{LOCALSTATEDIR}/amanda/amandates' Installation failed." >>${TMPFILE}
+        cat ${TMPFILE}
+        cat ${TMPFILE} >>${INSTALL_ERR}
+fi
+
+# Install .amandahosts to client
+echo "`date +'%b %e %Y %T'`: Checking '%{AMANDAHOMEDIR}/.amandahosts' file." >${TMPFILE}
+if [ ! -f %{AMANDAHOMEDIR}/.amandahosts ] ; then
+        touch %{AMANDAHOMEDIR}/.amandahosts >>${TMPFILE} 2>&1
+fi
+for host in localhost localhost.localdomain ; do
+                if [ -z "`grep \"^${host}[[:blank:]]\+\" %{AMANDAHOMEDIR}/.amandahosts | grep \"[[:blank:]]\+%{amanda_user}[[:blank:]]\+amdump\"`" ] ; then
+                        echo "${host}   %{amanda_user} amdump" >>%{AMANDAHOMEDIR}/.amandahosts
+                fi
+done
+chown %{amanda_user}:%{amanda_group} %{AMANDAHOMEDIR}/.amandahosts >>${TMPFILE} 2>&1
+chmod 0600 %{AMANDAHOMEDIR}/.amandahosts >>${TMPFILE} 2>&1
+cat ${TMPFILE}
+cat ${TMPFILE} >>${INSTALL_LOG}
+
+# Install amanda client configuration file
+echo "`date +'%b %e %Y %T'`: Checking '%{SYSCONFDIR}/amanda/amanda-client.conf' file." >${TMPFILE}
+if [ ! -f %{SYSCONFDIR}/amanda/amanda-client.conf ] ; then
+        cp %{AMANDAHOMEDIR}/example/amanda-client.conf %{SYSCONFDIR}/amanda/amanda-client.conf >>${TMPFILE} 2>&1
+fi
+chown %{amanda_user}:%{amanda_group} %{SYSCONFDIR}/amanda/amanda-client.conf >>${TMPFILE} 2>&1
+chmod 0600 %{SYSCONFDIR}/amanda/amanda-client.conf >>${TMPFILE} 2>&1
+cat ${TMPFILE}
+cat ${TMPFILE} >>${INSTALL_LOG}
+
+# Install .gnupg directory
+echo "`date +'%b %e %Y %T'`: Installing '%{AMANDAHOMEDIR}/.gnupg'." >${TMPFILE}
+ret_val=0
+if [ ! -d %{AMANDAHOMEDIR}/.gnupg ] ; then
+        echo "`date +'%b %e %Y %T'`: '%{AMANDAHOMEDIR}/.gnupg' will be created." >>${TMPFILE}
+        mkdir %{AMANDAHOMEDIR}/.gnupg >>${TMPFILE} 2>&1
+        ret_val=$?
+        if [ ${ret_val} -eq 0 ]; then
+                echo "`date +'%b %e %Y %T'`: The directory '%{AMANDAHOMEDIR}/.gnupg' created successfully." >>${TMPFILE}
+        else
+                echo "`date +'%b %e %Y %T'`: The directory '%{AMANDAHOMEDIR}/.gnupg' creation failed." >>${TMPFILE}
+        fi
+fi
+if [ ${ret_val} -eq 0 ]; then
+        echo "`date +'%b %e %Y %T'`: Ensuring correct permissions for '%{SYSCONFDIR}/.gnupg'." >>${TMPFILE}
+        chown %{amanda_user}:%{amanda_group} %{AMANDAHOMEDIR}/.gnupg >>${TMPFILE} 2>&1
+        ret_val=$?
+        if [ ${ret_val} -eq 0 ]; then
+                chmod 700 %{AMANDAHOMEDIR}/.gnupg >>${TMPFILE} 2>&1
+                ret_val=$?
+        fi
+fi
+if [ ${ret_val} -eq 0 ]; then
+        echo "`date +'%b %e %Y %T'`: '%{AMANDAHOMEDIR}/.gnupg' Installation successful." >>${TMPFILE}
+        cat ${TMPFILE}
+        cat ${TMPFILE} >>${INSTALL_LOG}
+else
+        echo "`date +'%b %e %Y %T'`: '%{AMANDAHOMEDIR}/.gnupg' Installation failed." >>${TMPFILE}
+        cat ${TMPFILE}
+        cat ${TMPFILE} >>${INSTALL_ERR}
+fi
+
+# SSH RSA key generation on client for amrecover
+KEYDIR="%{AMANDAHOMEDIR}/.ssh"
+KEYFILE="id_rsa_amrecover"
+COMMENT="root@client"
+if [ ! -d ${KEYDIR} ] ; then
+        if [ -f ${KEYDIR} ] ; then
+                echo "`date +'%b %e %Y %T'`: Directory '${KEYDIR}' exists as a file.  Renaming to '${KEYDIR}.rpmsave'." >${TMPFILE}
+                mv ${KEYDIR} ${KEYDIR}.rpmsave >>${TMPFILE} 2>&1
+                cat ${TMPFILE}
+                cat ${TMPFILE} >>${INSTALL_LOG}
+        fi
+        echo "`date +'%b %e %Y %T'`: Creating directory '${KEYDIR}'." >${TMPFILE}
+        mkdir ${KEYDIR} >>${TMPFILE} 2>&1
+        cat ${TMPFILE}
+        cat ${TMPFILE} >>${INSTALL_LOG}
+fi
+if [ ! -f ${KEYDIR}/${KEYFILE} ] ; then
+        echo "`date +'%b %e %Y %T'`: Creating ssh RSA key in '${KEYDIR}/${KEYFILE}'" >${TMPFILE}
+        ssh-keygen -q -C $COMMENT -t rsa -f ${KEYDIR}/${KEYFILE} -N '' >>${TMPFILE} 2>&1
+        cat ${TMPFILE}
+        cat ${TMPFILE} >>${INSTALL_LOG}
+fi
+echo "`date +'%b %e %Y %T'`: Setting permissions for '${KEYDIR}' and '${KEYDIR}/${KEYFILE}*'" >${TMPFILE}
+chown %{amanda_user}:%{amanda_group} ${KEYDIR} >>${TMPFILE} 2>&1
+chmod 0750 ${KEYDIR} >>${TMPFILE} 2>&1
+chmod 0600 ${KEYDIR}/${KEYFILE}* >>${TMPFILE} 2>&1
+cat ${TMPFILE}
+cat ${TMPFILE} >>${INSTALL_LOG}
+
+# environment variables (~amandabackup/.profile)
+echo "`date +'%b %e %Y %T'`: Checking for '%{AMANDAHOMEDIR}/.profile' and ensuring correct environment." >${TMPFILE}
+if [ ! -f %{AMANDAHOMEDIR}/.profile ] ; then
+        touch %{AMANDAHOMEDIR}/.profile >>${TMPFILE} 2>&1
+fi
+if [ -z "`grep PATH %{AMANDAHOMEDIR}/.profile | grep '%{SBINDIR}'`" ] ; then
+        echo "export PATH=\"\$PATH:%{SBINDIR}\"" >>%{AMANDAHOMEDIR}/.profile 2>>${TMPFILE}
+fi
+cat ${TMPFILE}
+cat ${TMPFILE} >>${INSTALL_LOG}
+echo "`date +'%b %e %Y %T'`: Setting ownership and permissions for '%{AMANDAHOMEDIR}/.profile'" >${TMPFILE}
+chown %{amanda_user}:%{amanda_group} %{AMANDAHOMEDIR}/.profile >>${TMPFILE} 2>&1
+chmod 0640 %{AMANDAHOMEDIR}/.profile >>${TMPFILE} 2>&1
+cat ${TMPFILE}
+cat ${TMPFILE} >>${INSTALL_LOG}
+
+echo "`date +'%b %e %Y %T'`: Sending anonymous distribution and version information to Zmanda" >> ${INSTALL_LOG}
+if [ -x /usr/bin/wget ]; then 
+        /usr/bin/wget -q -o /dev/null -O - --timeout=5 http://www.zmanda.com/amanda-tips.php\?version=%{amanda_version}\&os=%{disttag}%{distver}\&type=client 
+fi
+
+echo "`date +'%b %e %Y %T'`: === Amanda backup client installation complete. ===" >>${TMPFILE}
+cat ${TMPFILE}
+cat ${TMPFILE} >>${INSTALL_LOG}
+
+if [ -f "${TMPFILE}" ]; then
+        rm -f "${TMPFILE}"
+fi
+
+echo "Amanda installation log can be found in '${INSTALL_LOG}' and errors (if any) in '${INSTALL_ERR}'."
+%postun backup_client
+/sbin/ldconfig
+
+# --- Files to install ---
+
+%files backup_client
+%defattr(0755,%{amanda_user},%{amanda_group})
+%{SYSCONFDIR}/amanda
+%{AMANDAHOMEDIR}
+%{AMLIBEXECDIR}
+%{AMLIBDIR}
+%{AMLIBEXECDIR}/amanda-sh-lib.sh
+%{LOCALSTATEDIR}/amanda
+%defattr(4750,root,disk)
+%{AMLIBEXECDIR}/calcsize
+%{AMLIBEXECDIR}/killpgrp
+%{AMLIBEXECDIR}/rundump
+%{AMLIBEXECDIR}/runtar
+%defattr(0750,%{amanda_user},%{amanda_group})
+%{LOGDIR}
+%{SBINDIR}/amaespipe
+%{SBINDIR}/amcryp*
+%{SBINDIR}/amgpgcrypt
+%{SBINDIR}/amoldrecover
+%{SBINDIR}/amrecover
+%defattr(0644,%{amanda_user},%{amanda_group})
+%docdir %{MANDIR}
+%{MANDIR}/man5/amanda.conf.5.gz
+%{MANDIR}/man5/amanda-client.conf.5.gz
+%{MANDIR}/man8/amanda.8.gz
+%{MANDIR}/man8/amcheckdump.8.gz
+%{MANDIR}/man8/amrecover.8.gz
+%{AMLIBEXECDIR}/amcat.awk
+%{AMANDAHOMEDIR}/amanda-release
+%{AMANDAHOMEDIR}/example/xinetd.amandaclient
+%{AMANDAHOMEDIR}/example/amanda-client.conf
+
+%files backup_server
+%defattr(0755,%{amanda_user},%{amanda_group})
+%{SYSCONFDIR}/amanda
+%{AMLIBEXECDIR}
+%{AMLIBDIR}
+%{PERLSITELIB}/Amanda
+%{PERLSITELIB}/auto/Amanda
+%{AMANDAHOMEDIR}
+%{LOCALSTATEDIR}/amanda
+%{SBINDIR}/amaddclient
+%{SBINDIR}/amadmin
+%{SBINDIR}/amcheckdb
+%{SBINDIR}/amcheckdump
+%{SBINDIR}/amcleanup
+%{SBINDIR}/amdd
+%{SBINDIR}/amdevcheck
+%{SBINDIR}/amdump
+%{SBINDIR}/amfetchdump
+%{SBINDIR}/amflush
+%{SBINDIR}/amgetconf
+%{SBINDIR}/amlabel
+%{SBINDIR}/ammt
+%{SBINDIR}/amoverview
+%{SBINDIR}/amplot
+%{SBINDIR}/amreport
+%{SBINDIR}/amrestore
+%{SBINDIR}/amrmtape
+%{SBINDIR}/amserverconfig
+%{SBINDIR}/amstatus
+%{SBINDIR}/amtape
+%{SBINDIR}/amtapetype
+%{SBINDIR}/amtoc
+%{SBINDIR}/amverify
+%{SBINDIR}/amverifyrun
+%{AMLIBEXECDIR}/amanda-sh-lib.sh
+%defattr(4750,root,disk)
+%{AMLIBEXECDIR}/calcsize
+%{AMLIBEXECDIR}/killpgrp
+%{AMLIBEXECDIR}/rundump
+%{AMLIBEXECDIR}/runtar
+%{AMLIBEXECDIR}/dumper
+%{AMLIBEXECDIR}/planner
+%{SBINDIR}/amcheck
+%defattr(0750,%{amanda_user},%{amanda_group})
+%{LOGDIR}
+%{SBINDIR}/amaespipe
+%{SBINDIR}/amcrypt
+%{SBINDIR}/amcrypt-ossl
+%{SBINDIR}/amcrypt-ossl-asym
+%{SBINDIR}/amcryptsimple
+%{SBINDIR}/amgpgcrypt
+%{SBINDIR}/amoldrecover
+%{SBINDIR}/amrecover
+%defattr(0644,%{amanda_user},%{amanda_group})
+%{AMLIBEXECDIR}/amcat.awk
+%{AMLIBEXECDIR}/amplot.awk
+%{AMLIBEXECDIR}/amplot.g
+%{AMLIBEXECDIR}/amplot.gp
+%docdir %{MANDIR}
+%{MANDIR}/man5/amanda.conf.5.gz
+%{MANDIR}/man5/amanda-client.conf.5.gz
+%{MANDIR}/man8/amaddclient.8.gz
+%{MANDIR}/man8/amadmin.8.gz
+%{MANDIR}/man8/amanda.8.gz
+%{MANDIR}/man8/amcheck.8.gz
+%{MANDIR}/man8/amcheckdb.8.gz
+%{MANDIR}/man8/amcheckdump.8.gz
+%{MANDIR}/man8/amcleanup.8.gz
+%{MANDIR}/man8/amdd.8.gz
+%{MANDIR}/man8/amdump.8.gz
+%{MANDIR}/man8/amfetchdump.8.gz
+%{MANDIR}/man8/amflush.8.gz
+%{MANDIR}/man8/amgetconf.8.gz
+%{MANDIR}/man8/amlabel.8.gz
+%{MANDIR}/man8/ammt.8.gz
+%{MANDIR}/man8/amoverview.8.gz
+%{MANDIR}/man8/amplot.8.gz
+%{MANDIR}/man8/amrecover.8.gz
+%{MANDIR}/man8/amreport.8.gz
+%{MANDIR}/man8/amrestore.8.gz
+%{MANDIR}/man8/amrmtape.8.gz
+%{MANDIR}/man8/amserverconfig.8.gz
+%{MANDIR}/man8/amstatus.8.gz
+%{MANDIR}/man8/amtape.8.gz
+%{MANDIR}/man8/amtapetype.8.gz
+%{MANDIR}/man8/amtoc.8.gz
+%{MANDIR}/man8/amverify.8.gz
+%{MANDIR}/man8/amverifyrun.8.gz
+%{MANDIR}/man8/amcrypt.8.gz
+%{MANDIR}/man8/amcrypt-ossl.8.gz
+%{MANDIR}/man8/amcrypt-ossl-asym.8.gz
+%{MANDIR}/man8/amcryptsimple.8.gz
+%{MANDIR}/man8/amgpgcrypt.8.gz
+%{MANDIR}/man8/amaespipe.8.gz
+%{MANDIR}/man8/amdevcheck.8.gz
+%{AMANDAHOMEDIR}/amanda-release
+%{AMANDAHOMEDIR}/example/amanda-client.conf
+%{AMANDAHOMEDIR}/example/xinetd.amandaserver
+
+# --- ChangeLog
+
+%changelog
+* Fri May 02 2008 Dan Locks <dwlocks at zmanda dot com>
+- Changed instances of ${ to %%{ where applicable
+* Tue Mar 11 2008 Dan Locks <dwlocks at zmanda dot com>
+- fixed many rpmlint complaints
+- added --quiet to configure statements
+- moved PERLSITELIB to definitions section
+* Wed Feb 13 2008 Dan Locks <dwlocks at zmanda dot com>
+- added an environment check for PKG_CONFIG_PATH
+- added PKG_CONFIG_PATH conditional to handle cross comp on FC8 (environment 
+  var is used if provided)
+* Fri Feb 01 2008 Dan Locks <dwlocks at zmanda dot com>
+- Removed amplot executable and manpages from client installation
+- Added amcheckdump.8 manpage
+- Fixed %%{LOCALSTATEDIR}/amanda dir creation.
+* Wed Jan 23 2008  Dan Locks <dwlocks at zmanda dot com>
+- Change %%{SYSCONFDIR}/amanda/amandates to %%{LOCALSTATEDIR}/amanda/amandates,
+  and added %%{LOCALSTATEDIR}/amanda to the files lists.
+* Mon Jan 14 2008  Dan Locks <dwlocks at zmanda dot com>
+- Updates for perlified amanda, file location moves, gpg setup.
+* Tue Nov  13 2007 Paddy Sreenivasan <paddy at zmanda dot com>
+- Added SYSCONFDIR to client rpm
+- Set xinetd and amanda-client.conf configuration files as part of postinstall
+* Thu Nov  8 2007 Dan Locks <dwlocks at zmanda dot com>
+- Added Linux distribution detection
+* Wed Nov 7 2007 Paddy Sreenivasan <paddy at zmanda dot com>
+- Added amserverconfig, amaddclient, amgpgcrypt, amcryptsimple and libamdevice.
+- Added amanda configuration template files
+* Fri Sep 21 2007 Paddy Sreenivasan <paddy at zmanda dot com>
+- Remove libamserver, libamtape from client rpm
+* Wed Sep 19 2007 Paddy Sreenivasan <paddy at zmanda dot com>
+- Added Fedora 7
+* Tue Jun 26 2007 Kevin Till <ktill at zmanda dot com>
+- set debug log to /var/log/amanda
+* Fri Jan 12 2007 Paddy Sreenivasan <paddy at zmanda dot com>
+- Added label templates
+* Thu Dec 07 2006 Paddy Sreenivasan <paddy at zmanda dot com>
+- Application API changes
+* Fri Jun 16 2006 Kevin Till <ktill at zmanda dot com>
+- make install will install necessary example files. 
+  No need to "cp"
+* Wed Jun 07 2006 Paddy Sreenivasan <paddy at zmanda dot com> -
+- Added amoldrecover and amanda-client.conf man page.
+* Thu Jun 01 2006 Kevin Till <ktill at zmanda dot com> -
+- Added amcrypt-ossl, amcrypt-ossl-asym by Ben Slusky.
+* Thu May 18 2006 Paddy Sreenivasan <paddy at zmanda dot com> -
+- Added SLES10, RHEL3 build options.
+* Tue May 09 2006 Chris Lee <cmlee at zmanda dot com> -
+- Added amanda-release file to amandabackup home directory.
+- Installation message logging cleanup.
+* Thu Apr 27 2006 Paddy Sreenivasan <paddy at zmanda dot com> -
+- Removed dependency on tar version.
+- Moved log directory creation after backup user creation.
+* Wed Apr 19 2006 Chris Lee <cmlee at zmanda dot com> -
+- Added informative message to note the location of pre- and post-
+- install script logs files.
+* Mon Apr 17 2006 Chris Lee <cmlee at zmanda dot com> -
+- Reworked installation message logging and reporting.
+* Fri Apr 14 2006 Chris Lee <cmlee at zmanda dot com> -
+- Changed behavior for creating required localhost entries in the
+- amandahosts file to check for these entries even when the file
+- already exists.
+* Wed Apr 12 2006 Chris Lee <cmlee at zmanda dot com> -
+- Removed pre-install check for "disk" group.  This group should exist
+- by default on almost all modern distributions.
+* Tue Apr 11 2006 Chris Lee <cmlee at zmanda dot com> -
+- Added amandahosts entry for "localhost" without domain.
+* Fri Apr 07 2006 Chris Lee <cmlee at zmanda dot com> -
+- Changed default entries in .amandahosts to use "localdomain" instead
+- of "localnet".
+- Updated amanda_version and release.
+* Mon Apr 03 2006 Chris Lee <cmlee at zmanda dot com> -
+- Added example amanda.conf to files.
+* Thu Mar 16 2006 Chris Lee <cmlee at zmanda dot com> -
+- Corrected an issue with pre-install scripts wrt bug #218.
+- Corrected an issue with post-install scripts and added testing .profile 
+- in amandabackup's home directory for setting environment variables wrt
+- bug #220.
+* Mon Mar 13 2006 Chris Lee <cmlee at zmanda dot com> -
+- Corrected a syntactical error with setting ownership of amandates file
+- wrt bug #216.
+* Wed Mar 08 2006 Chris Lee <cmlee at zmanda dot com> -
+- Added pre-install scripts to verify proper ownership of
+- amandabackup home directory.
+* Thu Feb 2 2006 Paddy Sreenivasan <paddy at zmanda dot com> -
+- Require xinetd. Require termcap and initscripts for Fedora and Redhat.
+* Mon Jan 09 2006 Chris Lee <cmlee at zmanda dot com> -
+- Pre/post install scripts updated:
+- o Resolved an issue where an empty amandates file was installed
+-   even if the file already existed on the system.
+- o If .amandahosts does not exist a default is now created.
+- The Amanda user account has been changed to 'amandabackup' for
+- additional security.
+* Tue Jan 03 2006 Paddy Sreenivasan <paddy at zmanda dot com> -
+- Removed amandates from files list.
+* Thu Dec 29 2005 Chris Lee <cmlee at zmanda dot com> -
+- Corrected dependency for awk to "/bin/awk".
+* Thu Dec 29 2005 Kevin Till <ktill at zmanda dot com> -
+- add man pages for amcrypt and amaespipe
+* Thu Dec 29 2005 Chris Lee <cmlee at zmanda dot com> -
+- Updated dependancy info to depend on tar >= 1.15.
+- Included dependancies from top-level package in backup_client and
+- backup_server packages.
+- Reorganized files lists for readability (alphabetically).
+- Updated backup_client files list to include some missing files per
+- bug #129.
+- Updated pre- and post-install to handle potential issue when
+- /var/log/amanda exists and is a file rather than a directory.
+- Corrected permissions for /var/log/amanda in pre-install scripts
+- per bug #78 and 13 December change.
+* Thu Dec 22 2005 Paddy Sreenivasan <paddy at zmanda dot com> -
+- Added amaespipe and amcrypt
+- Added sles9 build definitions
+* Tue Dec 13 2005 Chris Lee <cmlee at zmanda dot com> -
+- Changed permissions for /var/log/amanda, removing set group id bit.
+- Added /etc/amandates to backup_client package.
+* Thu Dec 08 2005 Chris Lee <cmlee at zmanda dot com> -
+- Corrected an issue with detection of existing 'amanda' user account.
+- Corrected ownership of setuid executables per Bug #66.
+- Moved the gnutar and noop files to the backup_client package (where
+- they sould be).
+- Removed amqde from files list.
+- Added logging features to pre- and post-install scripts.
+* Wed Dec 07 2005 Chris Lee <cmlee at zmanda dot com> -
+- Changed a number of directory and file permissions from amanda:root
+- to amanda:disk in response to Bug #57.
+* Fri Dec 02 2005 Chris Lee <cmlee at zmanda dot com> -
+- Corrected SYSCONFDIR path definition.  Closes Bug #58.
+* Mon Nov 28 2005 Chris Lee <cmlee at zmanda dot com> -
+- Really fixed user creation preinstall scripts.
+* Wed Nov 23 2005 Paddy Sreenivasan <paddy at zmanda dot com> -
+- Updated package description.
+- Changed Group for packages.
+* Tue Nov 22 2005 Chris Lee <cmlee at zmanda dot com> -
+- Corrected dependancy packaging issue with amanda libraries.
+- Fixed creation of amanda user on systems which it does not exist.
+- Corrected Group definition for SuSE.
+- Updated descriptions to include amanda-libs package.
+- Updated release number to 2.
+* Tue Nov 08 2005 Chris Lee <cmlee at zmanda dot com> -
+- Permissions changes: now using user=amanda, group=disk
+* Sun Oct 30 2005 Chris Lee <cmlee at zmanda dot com> -
+- Parameters to configure options --with-user and --with-group changed
+- such that when test_build is set to '1' the username of the user who
+- runs rpmbuild is used for both values.  If test_build is set to '0'
+- then root is used for both values.
+- The release field was also changed to automatically reflect the
+- distribution and distribution release version for which the RPM was
+- built.
+* Tue Oct 18 2005 Chris Lee <cmlee at zmanda dot com> - 
+- Initial RPM SPEC file created.
+
index 2b549e51229e90317648a608137a676705fa49cf..3bcd64070b513f6d759b0ea96150bbc91d724e11 100644 (file)
@@ -1,16 +1,17 @@
 ***************
-*** 1514,1519 ****
-  %{AMLIBEXECDIR}
-  %{AMLIBEXECDIR}/application
-  %{AMLIBDIR}
-  %{LOCALSTATEDIR}/amanda
-  %defattr(4750,root,disk)
-  %{AMLIBEXECDIR}/calcsize
---- 1517,1523 ----
-  %{AMLIBEXECDIR}
-  %{AMLIBEXECDIR}/application
-  %{AMLIBDIR}
-+ %{PERLSITELIB}
-  %{LOCALSTATEDIR}/amanda
-  %defattr(4750,root,disk)
-  %{AMLIBEXECDIR}/calcsize
+*** 122,128 ****
+  # --- Definitions ---
+  
+  # Define amanda_version if it is not already defined.
+- %{!?amanda_version: %define amanda_version 2.6.0}
+  %{!?amanda_release: %define amanda_release 2}
+  %define amanda_version_info "Amanda Community Edition - version %{amanda_version}"
+  %define amanda_user amandabackup
+--- 122,128 ----
+  # --- Definitions ---
+  
+  # Define amanda_version if it is not already defined.
++ %{!?amanda_version: %define amanda_version 2.6.0p1}
+  %{!?amanda_release: %define amanda_release 2}
+  %define amanda_version_info "Amanda Community Edition - version %{amanda_version}"
+  %define amanda_user amandabackup
index e76367cba9caf96b0577b0f801cac881f0b08385..ec5010dc5e0a65f1ce16a0ed367c0ac1c607b799 100755 (executable)
@@ -6,7 +6,7 @@ set -x
 # Buildbot exports some useful env variables.
 # Check for $AMVER.  I couldn't come up with a good way to detect it.
 if [ -z $AMVER ]; then
-    AMVER=amanda-2.6.0
+    AMVER=amanda-2.6.0p1
 fi
 # Check for AMTARBALL variable.
 if [ -z $AMTARBALL ]; then 
diff --git a/packaging/rpm/buildpkg.orig b/packaging/rpm/buildpkg.orig
new file mode 100755 (executable)
index 0000000..ec5010d
--- /dev/null
@@ -0,0 +1,50 @@
+#!/bin/bash
+# Buildpkg script for producing RPM packages. Does not require root access.
+
+# This is useful for debugging
+set -x
+# Buildbot exports some useful env variables.
+# Check for $AMVER.  I couldn't come up with a good way to detect it.
+if [ -z $AMVER ]; then
+    AMVER=amanda-2.6.0p1
+fi
+# Check for AMTARBALL variable.
+if [ -z $AMTARBALL ]; then 
+    AMTARBALL=$AMVER.tar.gz
+fi
+
+# Check for AMTARBALL file, if it's not there, create it.
+if [ ! -f ${AMTARBALL} ]; then
+    mkdir ${AMVER}
+    cp -Rfp * ${AMVER}/
+    tar -cf ${AMTARBALL} -z ${AMVER}
+    rm -rf ${AMVER}
+fi
+
+# Check for the packaging dirs.
+if [ -z $AMPKGDIR ]; then
+    AMPKGDIR=${PWD}
+fi
+if [ ! -d ${AMPKGDIR} ]; then
+    mkdir ${AMPKGDIR}
+fi
+cd ${AMPKGDIR}
+
+if [ -d rpm ]; then
+    rm -rf rpm
+fi
+mkdir rpm
+mkdir rpm/SOURCES
+mkdir rpm/SRPMS
+mkdir rpm/SPECS
+mkdir rpm/BUILD
+mkdir rpm/RPMS
+
+# Make a copy of the tarball with the name that rpmbuild expects
+cp ${AMTARBALL} rpm/SOURCES/${AMVER}.tar.gz
+cp packaging/rpm/amanda.spec rpm/SPECS/amanda.spec
+# Rpmbuild requires absolute paths.  annoying.  If you need to change the 
+# default value of some rpm.spec variable, just pass extra --define options.
+# this is useful for changing %amanda_release or %amanda_version
+rpmbuild -ba --define "_topdir ${AMPKGDIR}/rpm" \
+             ${AMPKGDIR}/rpm/SPECS/amanda.spec 
diff --git a/packaging/rpm/buildpkg.rej b/packaging/rpm/buildpkg.rej
new file mode 100644 (file)
index 0000000..be33dd1
--- /dev/null
@@ -0,0 +1,17 @@
+***************
+*** 6,12 ****
+  # Buildbot exports some useful env variables.
+  # Check for $AMVER.  I couldn't come up with a good way to detect it.
+  if [ -z $AMVER ]; then
+-     AMVER=amanda-2.6.0
+  fi
+  # Check for AMTARBALL variable.
+  if [ -z $AMTARBALL ]; then 
+--- 6,12 ----
+  # Buildbot exports some useful env variables.
+  # Check for $AMVER.  I couldn't come up with a good way to detect it.
+  if [ -z $AMVER ]; then
++     AMVER=amanda-2.6.0p1
+  fi
+  # Check for AMTARBALL variable.
+  if [ -z $AMTARBALL ]; then 
index 1badc660b7d9a420726f720b44578384e08594a4..d23c52a686865e46dfc1c62e58b3b6cc5b584ff0 100644 (file)
@@ -1423,15 +1423,16 @@ SWIG_Perl_SetModule(swig_module_info *module) {
 
 /* -------- TYPES TABLE (BEGIN) -------- */
 
-#define SWIGTYPE_p_char swig_types[0]
-#define SWIGTYPE_p_double swig_types[1]
-#define SWIGTYPE_p_dumpspec_t swig_types[2]
-#define SWIGTYPE_p_float swig_types[3]
-#define SWIGTYPE_p_int swig_types[4]
-#define SWIGTYPE_p_p_char swig_types[5]
-#define SWIGTYPE_p_unsigned_char swig_types[6]
-static swig_type_info *swig_types[8];
-static swig_module_info swig_module = {swig_types, 7, 0, 0, 0, 0};
+#define SWIGTYPE_p_GSList swig_types[0]
+#define SWIGTYPE_p_char swig_types[1]
+#define SWIGTYPE_p_double swig_types[2]
+#define SWIGTYPE_p_dumpspec_t swig_types[3]
+#define SWIGTYPE_p_float swig_types[4]
+#define SWIGTYPE_p_int swig_types[5]
+#define SWIGTYPE_p_p_char swig_types[6]
+#define SWIGTYPE_p_unsigned_char swig_types[7]
+static swig_type_info *swig_types[9];
+static swig_module_info swig_module = {swig_types, 8, 0, 0, 0, 0};
 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
 
@@ -1473,6 +1474,12 @@ SWIGEXPORT void SWIG_init (CV *cv, CPerlObj *);
 #include "amglue.h"
 
 
+#include "cmdline.h"
+
+
+typedef GSList amglue_dumpspec_list;
+
+
 #include <glib.h>
 #include "cmdline.h"
 
@@ -2027,7 +2034,7 @@ XS(_wrap_parse_dumpspecs) {
     int arg1 ;
     char **arg2 = (char **) 0 ;
     int arg3 ;
-    GSList *result = 0 ;
+    amglue_dumpspec_list *result = 0 ;
     int argvi = 0;
     dXSARGS;
     
@@ -2066,7 +2073,7 @@ XS(_wrap_parse_dumpspecs) {
         g_critical("Unexpected signed int >64 bits?"); /* should be optimized out unless sizeof(signed int) > 8 */
       }
     }
-    result = (GSList *)cmdline_parse_dumpspecs(arg1,arg2,arg3);
+    result = (amglue_dumpspec_list *)cmdline_parse_dumpspecs(arg1,arg2,arg3);
     {
       if (result) {
         GSList *iter;
@@ -2102,6 +2109,7 @@ XS(_wrap_parse_dumpspecs) {
 
 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
 
+static swig_type_info _swigt__p_GSList = {"_p_GSList", "amglue_dumpspec_list *|GSList *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_char = {"_p_char", "gchar *|char *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_double = {"_p_double", "double *|gdouble *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_dumpspec_t = {"_p_dumpspec_t", "struct dumpspec_t *|dumpspec_t *", 0, 0, (void*)"Amanda::Cmdline::dumpspec_t", 0};
@@ -2111,6 +2119,7 @@ static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0
 static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "guchar *|unsigned char *", 0, 0, (void*)0, 0};
 
 static swig_type_info *swig_type_initial[] = {
+  &_swigt__p_GSList,
   &_swigt__p_char,
   &_swigt__p_double,
   &_swigt__p_dumpspec_t,
@@ -2120,6 +2129,7 @@ static swig_type_info *swig_type_initial[] = {
   &_swigt__p_unsigned_char,
 };
 
+static swig_cast_info _swigc__p_GSList[] = {  {&_swigt__p_GSList, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_dumpspec_t[] = {  {&_swigt__p_dumpspec_t, 0, 0, 0},{0, 0, 0, 0}};
@@ -2129,6 +2139,7 @@ static swig_cast_info _swigc__p_p_char[] = {  {&_swigt__p_p_char, 0, 0, 0},{0, 0
 static swig_cast_info _swigc__p_unsigned_char[] = {  {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
 
 static swig_cast_info *swig_cast_initial[] = {
+  _swigc__p_GSList,
   _swigc__p_char,
   _swigc__p_double,
   _swigc__p_dumpspec_t,
index 0f878c1d46fb9f16ab01ab67f9782c36466d9f57..b6dec0266eb5eb28eab5fd5529479fcc08ce9a1c 100644 (file)
@@ -21,6 +21,7 @@
 %module "Amanda::Cmdline"
 %include "amglue/amglue.swg"
 %include "exception.i"
+%include "amglue/dumpspecs.swg"
 
 %{
 #include <glib.h>
@@ -126,29 +127,6 @@ typedef struct dumpspec_t {
 %rename(format_dumpspec_components) cmdline_format_dumpspec_components;
 char *cmdline_format_dumpspec_components(char *host, char *disk, char *datestamp, char *level);
 
-/* Typemap to convert the GSList that cmdline_parse_dumpspecs will
- * return into an array of dumpspec_t's.  This uses some SWIG trickery
- * to manage to convert the GSList itself to an array, while leaving the
- * dumpspecs as C objects.
- */
-%typemap(out) GSList * {
-    if ($1) {
-       GSList *iter;
-       EXTEND(SP, g_slist_length($1)); /* make room for return values */
-
-       iter = $1;
-       while (iter) {
-           /* Let SWIG take ownership of the object; we'll free the GSList momentarily */
-           $result = SWIG_NewPointerObj(iter->data, $descriptor(dumpspec_t*), SWIG_OWNER | SWIG_SHADOW);
-           argvi++;
-           iter = iter->next;
-       }
-
-       /* Now free the GSList, but *not* its contents (which are now "owned" by SWIG) */
-       g_slist_free($1);
-    }
-}
-
 /* Typemap to convert a perl list of strings to the strv that 
  * cmdline_parse_dumpspecs expects.
  */
@@ -183,11 +161,11 @@ amglue_add_constant(CMDLINE_PARSE_LEVEL, cmdline_parse_dumpspecs_flags);
 amglue_add_constant(CMDLINE_EMPTY_TO_WILDCARD, cmdline_parse_dumpspecs_flags);
 
 %rename(parse_dumpspecs) cmdline_parse_dumpspecs;
-GSList *cmdline_parse_dumpspecs(int argc, char **argv, int flags);
+amglue_dumpspec_list *cmdline_parse_dumpspecs(int argc, char **argv, int flags);
 
 /* TODO:
  * convert AV back to GSList as input, convert resulting GSList into an AV of strings
  * on output
  */
-/* GSList * cmdline_match_holding(GSList *dumpspec_list); */
+/* amglue_dumpspec_list * cmdline_match_holding(amglue_dumpspec_list *dumpspec_list); */
 
index 7f9743a56649aff11a56bb96f920881fc4539b59..a022c0f7985edcabb3ad4b7f383862bb699e65f4 100644 (file)
@@ -1424,14 +1424,16 @@ SWIG_Perl_SetModule(swig_module_info *module) {
 /* -------- TYPES TABLE (BEGIN) -------- */
 
 #define SWIGTYPE_p_FILE swig_types[0]
-#define SWIGTYPE_p_char swig_types[1]
-#define SWIGTYPE_p_double swig_types[2]
-#define SWIGTYPE_p_find_result_t swig_types[3]
-#define SWIGTYPE_p_float swig_types[4]
-#define SWIGTYPE_p_int swig_types[5]
-#define SWIGTYPE_p_unsigned_char swig_types[6]
-static swig_type_info *swig_types[8];
-static swig_module_info swig_module = {swig_types, 7, 0, 0, 0, 0};
+#define SWIGTYPE_p_GSList swig_types[1]
+#define SWIGTYPE_p_char swig_types[2]
+#define SWIGTYPE_p_double swig_types[3]
+#define SWIGTYPE_p_dumpspec_t swig_types[4]
+#define SWIGTYPE_p_find_result_t swig_types[5]
+#define SWIGTYPE_p_float swig_types[6]
+#define SWIGTYPE_p_int swig_types[7]
+#define SWIGTYPE_p_unsigned_char swig_types[8]
+static swig_type_info *swig_types[10];
+static swig_module_info swig_module = {swig_types, 9, 0, 0, 0, 0};
 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
 
@@ -1473,6 +1475,12 @@ SWIGEXPORT void SWIG_init (CV *cv, CPerlObj *);
 #include "amglue.h"
 
 
+#include "cmdline.h"
+
+
+typedef GSList amglue_dumpspec_list;
+
+
 #include <glib.h>
 #include "logfile.h"
 #include "find.h"
@@ -2397,21 +2405,164 @@ XS(_wrap_dumps_match) {
 }
 
 
+XS(_wrap_dumps_match_dumpspecs) {
+  {
+    find_result_t *arg1 = (find_result_t *) 0 ;
+    amglue_dumpspec_list *arg2 = (amglue_dumpspec_list *) 0 ;
+    gboolean arg3 ;
+    find_result_t *result = 0 ;
+    int argvi = 0;
+    dXSARGS;
+    
+    if ((items < 3) || (items > 3)) {
+      SWIG_croak("Usage: dumps_match_dumpspecs(output_find,dumpspecs,ok);");
+    }
+    {
+      AV *av;
+      I32 len, i;
+      find_result_t *head = NULL, *tail = NULL;
+      
+      if (!SvROK(ST(0)) || SvTYPE(SvRV(ST(0))) != SVt_PVAV) {
+        SWIG_exception(SWIG_TypeError, "expected an arrayref of find_result_t's");
+      }
+      
+      av = (AV *)SvRV(ST(0));
+      len = av_len(av) + 1;
+      
+      for (i = 0; i < len; i++) {
+        SV **val = av_fetch(av, i, 0);
+        find_result_t *r;
+        
+        if (!val || SWIG_ConvertPtr(*val, (void **)&r, SWIGTYPE_p_find_result_t, 0) == -1) {
+          SWIG_exception(SWIG_TypeError, "array member is not a find_result_t");
+        }
+        
+        if (!head) {
+          head = tail = r;
+        } else {
+          tail->next = r;
+          tail = r;
+        }
+        
+        tail->next = NULL;
+      }
+      
+      /* point to the head of that list */
+      arg1 = head;
+    }
+    {
+      AV *av;
+      int len;
+      int i;
+      
+      if (!SvROK(ST(1)) || SvTYPE(SvRV(ST(1))) != SVt_PVAV) {
+        SWIG_exception_fail(SWIG_TypeError, "Expected an arrayref of dumpspecs");
+      }
+      av = (AV *)SvRV(ST(1));
+      
+      len = av_len(av)+1;
+      arg2 = NULL;
+      for (i = 0; i < len; i++) {
+        dumpspec_t *ds = NULL;
+        SV **elt = av_fetch(av, i, 0);
+        if (elt)
+        SWIG_ConvertPtr(*elt, (void **)&ds, SWIGTYPE_p_dumpspec_t, 0);
+        if (!ds)
+        SWIG_exception_fail(SWIG_TypeError, "Expected an arrayref of dumpspecs");
+        arg2 = g_slist_append(arg2, ds);
+      }
+    }
+    {
+      if (sizeof(signed int) == 1) {
+        arg3 = amglue_SvI8(ST(2));
+      } else if (sizeof(signed int) == 2) {
+        arg3 = amglue_SvI16(ST(2));
+      } else if (sizeof(signed int) == 4) {
+        arg3 = amglue_SvI32(ST(2));
+      } else if (sizeof(signed int) == 8) {
+        arg3 = amglue_SvI64(ST(2));
+      } else {
+        g_critical("Unexpected signed int >64 bits?"); /* should be optimized out unless sizeof(signed int) > 8 */
+      }
+    }
+    result = (find_result_t *)dumps_match_dumpspecs(arg1,arg2,arg3);
+    {
+      find_result_t *iter;
+      int len;
+      
+      /* measure the list and make room on the perl stack */
+      for (len=0, iter=result; iter; iter=iter->next) len++;
+      EXTEND(SP, len);
+      
+      iter = result;
+      while (iter) {
+        find_result_t *next;
+        /* Let SWIG take ownership of the object */
+        ST(argvi) = SWIG_NewPointerObj(iter, SWIGTYPE_p_find_result_t, SWIG_OWNER | SWIG_SHADOW);
+        argvi++;
+        
+        /* null out the 'next' field */
+        next = iter->next;
+        iter->next = NULL;
+        iter = next;
+      }
+    }
+    {
+      find_result_t *iter = arg1, *next;
+      
+      /* undo all the links we added earlier */
+      while (iter) {
+        next = iter->next;
+        iter->next = NULL;
+        iter = next;
+      }
+    }
+    {
+      /* Free the GSList, but not its contents (which are still owned by SWIG) */
+      g_slist_free(arg2);
+    }
+    
+    XSRETURN(argvi);
+  fail:
+    {
+      find_result_t *iter = arg1, *next;
+      
+      /* undo all the links we added earlier */
+      while (iter) {
+        next = iter->next;
+        iter->next = NULL;
+        iter = next;
+      }
+    }
+    {
+      /* Free the GSList, but not its contents (which are still owned by SWIG) */
+      g_slist_free(arg2);
+    }
+    
+    SWIG_croak_null();
+  }
+}
+
+
 
 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
 
 static swig_type_info _swigt__p_FILE = {"_p_FILE", "FILE *|loghandle *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_GSList = {"_p_GSList", "amglue_dumpspec_list *|GSList *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_char = {"_p_char", "gchar *|char *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_double = {"_p_double", "double *|gdouble *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_dumpspec_t = {"_p_dumpspec_t", "struct dumpspec_t *|dumpspec_t *", 0, 0, (void*)"Amanda::Cmdline::dumpspec_t", 0};
 static swig_type_info _swigt__p_find_result_t = {"_p_find_result_t", "find_result_t *", 0, 0, (void*)"Amanda::Logfile::find_result_t", 0};
 static swig_type_info _swigt__p_float = {"_p_float", "float *|gfloat *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_int = {"_p_int", "int *|logtype_t *|program_t *|gboolean *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_int = {"_p_int", "int *|logtype_t *|program_t *|gboolean *|cmdline_parse_dumpspecs_flags *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "guchar *|unsigned char *", 0, 0, (void*)0, 0};
 
 static swig_type_info *swig_type_initial[] = {
   &_swigt__p_FILE,
+  &_swigt__p_GSList,
   &_swigt__p_char,
   &_swigt__p_double,
+  &_swigt__p_dumpspec_t,
   &_swigt__p_find_result_t,
   &_swigt__p_float,
   &_swigt__p_int,
@@ -2419,8 +2570,10 @@ static swig_type_info *swig_type_initial[] = {
 };
 
 static swig_cast_info _swigc__p_FILE[] = {  {&_swigt__p_FILE, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_GSList[] = {  {&_swigt__p_GSList, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_dumpspec_t[] = {  {&_swigt__p_dumpspec_t, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_find_result_t[] = {  {&_swigt__p_find_result_t, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_float[] = {  {&_swigt__p_float, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
@@ -2428,8 +2581,10 @@ static swig_cast_info _swigc__p_unsigned_char[] = {  {&_swigt__p_unsigned_char,
 
 static swig_cast_info *swig_cast_initial[] = {
   _swigc__p_FILE,
+  _swigc__p_GSList,
   _swigc__p_char,
   _swigc__p_double,
+  _swigc__p_dumpspec_t,
   _swigc__p_find_result_t,
   _swigc__p_float,
   _swigc__p_int,
@@ -2465,6 +2620,7 @@ static swig_command_info swig_commands[] = {
 {"Amanda::Logfilec::find_log", _wrap_find_log},
 {"Amanda::Logfilec::search_logfile", _wrap_search_logfile},
 {"Amanda::Logfilec::dumps_match", _wrap_dumps_match},
+{"Amanda::Logfilec::dumps_match_dumpspecs", _wrap_dumps_match_dumpspecs},
 {0,0}
 };
 /* -----------------------------------------------------------------------------
index 8f03f2472c9298ef7c93f73bcf29464117f76b05..ebea270aaf48d7a556479ec0538743774e97cf24 100644 (file)
@@ -7,6 +7,7 @@ package Amanda::Logfile;
 require Exporter;
 require DynaLoader;
 @ISA = qw(Exporter DynaLoader);
+require Amanda::Cmdline;
 package Amanda::Logfilec;
 bootstrap Amanda::Logfile;
 package Amanda::Logfile;
@@ -55,6 +56,7 @@ package Amanda::Logfile;
 *find_log = *Amanda::Logfilec::find_log;
 *search_logfile = *Amanda::Logfilec::search_logfile;
 *dumps_match = *Amanda::Logfilec::dumps_match;
+*dumps_match_dumpspecs = *Amanda::Logfilec::dumps_match_dumpspecs;
 
 ############# Class : Amanda::Logfile::find_result_t ##############
 
index ea621e4b56475b2c0f834417d515b98be3e64fe2..be5c14515fdb6ee9f52f675332ac3622633ddce6 100644 (file)
@@ -21,6 +21,8 @@
 %module "Amanda::Logfile"
 %include "amglue/amglue.swg"
 %include "exception.i"
+%include "amglue/dumpspecs.swg"
+%import "Amanda/Cmdline.swg"
 
 %{
 #include <glib.h>
@@ -362,3 +364,7 @@ find_result_t *search_logfile_wrap(char *label, char *datestamp,
 
 find_result_t *dumps_match(find_result_t *output_find, char *hostname,
                           char *diskname, char *datestamp, char *level, int ok);
+
+find_result_t *dumps_match_dumpspecs(find_result_t *output_find,
+    amglue_dumpspec_list *dumpspecs,
+    gboolean ok);
index 701ae473f61e22cd979ee2959a3ab38c31854bcb..a4da56c51b0c8b31ac2676423c0357c51eaebf2a 100644 (file)
@@ -66,6 +66,7 @@ PERL_EXT_LDFLAGS += $(PERLEXTLIBS)
 AMGLUE_SWG = amglue/amglue.swg \
        amglue/amglue.swg \
        amglue/constants.swg \
+       amglue/dumpspecs.swg \
        amglue/exports.swg \
        amglue/glib.swg \
        amglue/integers.swg
index 84273597cf3afcfd921ea0ba2770911b28509952..e4ad8bd4dd0af14a312c44a512edc63117144bf3 100644 (file)
@@ -280,8 +280,8 @@ LTLIBRARIES = $(amlib_LTLIBRARIES) $(libCmdline_LTLIBRARIES) \
 @WANT_SERVER_TRUE@     $(top_builddir)/server-src/libamserver.la \
 @WANT_SERVER_TRUE@     $(top_builddir)/common-src/libamanda.la
 am__libCmdline_la_SOURCES_DIST = Amanda/Cmdline.c amglue/amglue.swg \
-       amglue/constants.swg amglue/exports.swg amglue/glib.swg \
-       amglue/integers.swg
+       amglue/constants.swg amglue/dumpspecs.swg amglue/exports.swg \
+       amglue/glib.swg amglue/integers.swg
 am__objects_1 =
 @WANT_SERVER_TRUE@am_libCmdline_la_OBJECTS = Cmdline.lo \
 @WANT_SERVER_TRUE@     $(am__objects_1)
@@ -308,8 +308,8 @@ libDebug_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
 @WANT_SERVER_TRUE@     $(top_builddir)/device-src/libamdevice.la \
 @WANT_SERVER_TRUE@     $(top_builddir)/common-src/libamanda.la
 am__libDevice_la_SOURCES_DIST = Amanda/Device.c amglue/amglue.swg \
-       amglue/constants.swg amglue/exports.swg amglue/glib.swg \
-       amglue/integers.swg
+       amglue/constants.swg amglue/dumpspecs.swg amglue/exports.swg \
+       amglue/glib.swg amglue/integers.swg
 @WANT_SERVER_TRUE@am_libDevice_la_OBJECTS = Device.lo $(am__objects_1)
 libDevice_la_OBJECTS = $(am_libDevice_la_OBJECTS)
 libDevice_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
@@ -320,8 +320,8 @@ libDevice_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
 @WANT_SERVER_TRUE@     $(top_builddir)/server-src/libamserver.la \
 @WANT_SERVER_TRUE@     $(top_builddir)/common-src/libamanda.la
 am__libLogfile_la_SOURCES_DIST = Amanda/Logfile.c amglue/amglue.swg \
-       amglue/constants.swg amglue/exports.swg amglue/glib.swg \
-       amglue/integers.swg
+       amglue/constants.swg amglue/dumpspecs.swg amglue/exports.swg \
+       amglue/glib.swg amglue/integers.swg
 @WANT_SERVER_TRUE@am_libLogfile_la_OBJECTS = Logfile.lo \
 @WANT_SERVER_TRUE@     $(am__objects_1)
 libLogfile_la_OBJECTS = $(am_libLogfile_la_OBJECTS)
@@ -333,8 +333,8 @@ libLogfile_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
 @WANT_SERVER_TRUE@     $(top_builddir)/server-src/libamserver.la \
 @WANT_SERVER_TRUE@     $(top_builddir)/common-src/libamanda.la
 am__libTapefile_la_SOURCES_DIST = Amanda/Tapefile.c amglue/amglue.swg \
-       amglue/constants.swg amglue/exports.swg amglue/glib.swg \
-       amglue/integers.swg
+       amglue/constants.swg amglue/dumpspecs.swg amglue/exports.swg \
+       amglue/glib.swg amglue/integers.swg
 @WANT_SERVER_TRUE@am_libTapefile_la_OBJECTS = Tapefile.lo \
 @WANT_SERVER_TRUE@     $(am__objects_1)
 libTapefile_la_OBJECTS = $(am_libTapefile_la_OBJECTS)
@@ -844,6 +844,7 @@ PERL_EXT_LDFLAGS = -avoid-version $(PERLEXTLIBS)
 AMGLUE_SWG = amglue/amglue.swg \
        amglue/amglue.swg \
        amglue/constants.swg \
+       amglue/dumpspecs.swg \
        amglue/exports.swg \
        amglue/glib.swg \
        amglue/integers.swg
diff --git a/perl/amglue/dumpspecs.swg b/perl/amglue/dumpspecs.swg
new file mode 100644 (file)
index 0000000..772a43a
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) Zmanda, Inc.  All Rights Reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License version 2.1
+ * as published by the Free Software Foundation.
+ *
+ * This library 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 Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA.
+ *
+ * Contact information: Zmanda Inc., 465 S Mathlida Ave, Suite 300
+ * Sunnyvale, CA 94086, USA, or: http://www.zmanda.com
+ */
+
+%{
+#include "cmdline.h"
+%}
+
+/*
+ * Typemaps for lists of dumpspecs
+ *
+ * To use:
+ *   %include "amglue/dumpspecs.swg"
+ *   %import "Amanda/Logfile.swg"
+ * and declare functions as either taking or returning "amglue_dumpspec_list *".
+ */
+
+%inline %{
+typedef GSList amglue_dumpspec_list;
+%}
+
+/* Typemap to convert a GSList of dumpspec_t's into an array of same. This uses
+ * some SWIG trickery to manage to convert the GSList itself to an array, while
+ * leaving the dumpspecs as C objects.
+ */
+%types(dumpspec_t *);
+%typemap(out) amglue_dumpspec_list * {
+    if ($1) {
+       GSList *iter;
+       EXTEND(SP, g_slist_length($1)); /* make room for return values */
+
+       iter = $1;
+       while (iter) {
+           /* Let SWIG take ownership of the object; we'll free the GSList momentarily */
+           $result = SWIG_NewPointerObj(iter->data, $descriptor(dumpspec_t*), SWIG_OWNER | SWIG_SHADOW);
+           argvi++;
+           iter = iter->next;
+       }
+
+       /* Now free the GSList, but *not* its contents (which are now "owned" by SWIG) */
+       g_slist_free($1);
+    }
+}
+
+/* Typemap to convert an arrayref of dumpspecs into a GSList of same.  This assumes
+ * that the dumpspecs are all C objects.  This borrows references to the underlying
+ * dumpspec objects, which remain owned by SWIG.
+ */
+%typemap(in) amglue_dumpspec_list * {
+    AV *av;
+    int len;
+    int i;
+
+    if (!SvROK($input) || SvTYPE(SvRV($input)) != SVt_PVAV) {
+       SWIG_exception_fail(SWIG_TypeError, "Expected an arrayref of dumpspecs");
+    }
+    av = (AV *)SvRV($input);
+
+    len = av_len(av)+1;
+    $1 = NULL;
+    for (i = 0; i < len; i++) {
+       dumpspec_t *ds = NULL;
+       SV **elt = av_fetch(av, i, 0);
+       if (elt)
+           SWIG_ConvertPtr(*elt, (void **)&ds, $descriptor(dumpspec_t *), 0);
+       if (!ds)
+           SWIG_exception_fail(SWIG_TypeError, "Expected an arrayref of dumpspecs");
+       $1 = g_slist_append($1, ds);
+    }
+}
+
+%typemap(freearg) amglue_dumpspec_list * {
+    /* Free the GSList, but not its contents (which are still owned by SWIG) */
+    g_slist_free($1);
+}
index d33d56d132cac6e0dc72ea66c6c0d42c17db0fb4..bdeb114c50fe28e21c3311d84a8babb9b9efeda6 100644 (file)
@@ -56,7 +56,7 @@ typedef struct needed_tapes_s {
 
 /* local functions */
 
-tapelist_t *list_needed_tapes(GSList *dumpspecs);
+tapelist_t *list_needed_tapes(GSList *dumpspecs, int only_one);
 void usage(void);
 int main(int argc, char **argv);
 
@@ -98,12 +98,14 @@ usage(void)
  */
 tapelist_t *
 list_needed_tapes(
-    GSList *   dumpspecs)
+    GSList *   dumpspecs,
+    int                only_one)
 {
     needed_tape_t *needed_tapes = NULL, *curtape = NULL;
     disklist_t diskqp;
-    dumpspec_t *ds = NULL;
     find_result_t *alldumps = NULL;
+    find_result_t *curmatch = NULL;
+    find_result_t *matches = NULL;
     tapelist_t *tapes = NULL;
     int numtapes = 0;
     char *conf_diskfile, *conf_tapelist;
@@ -130,100 +132,104 @@ list_needed_tapes(
         g_fprintf(stderr, _("No dump records found\n"));
         exit(1);
     }
-
+    
     /* Compare all known dumps to our match list, note what we'll need */
-    while (dumpspecs) {
-       find_result_t *curmatch = NULL; 
-       find_result_t *matches = NULL;  
-       ds = (dumpspec_t *)dumpspecs->data;
-
-       matches = dumps_match(alldumps, ds->host, ds->disk,
-                                ds->datestamp, ds->level, 1);
-       sort_find_result("Dhklp", &matches);
-       for(curmatch = matches; curmatch; curmatch = curmatch->next){
-           int havetape = 0;
-           int have_part = 0;
-           if(strcmp("OK", curmatch->status)){
-               g_fprintf(stderr,_("Dump %s %s %s %d had status '%s', skipping\n"),
-                                curmatch->timestamp, curmatch->hostname,
-                                curmatch->diskname, curmatch->level,
-                                curmatch->status);
-               continue;
-           }
-           /* check if we already have that part */
-           for(curtape = needed_tapes; curtape; curtape = curtape->next) {
-               find_result_t *rsttemp = NULL;
-               for(rsttemp = curtape->files;
-                   rsttemp;
-                   rsttemp=rsttemp->next) {
-                   if (strcmp(rsttemp->partnum, curmatch->partnum) == 0)
-                       have_part = 1;
+    matches = dumps_match_dumpspecs(alldumps, dumpspecs, 1);
+    sort_find_result("Dhklp", &matches);
+    for(curmatch = matches; curmatch; curmatch = curmatch->next) {
+       int havetape = 0;
+       int have_part = 0;
+
+       /* keep only first dump if only_one */
+       if (only_one &&
+           curmatch != matches &&
+           (strcmp(curmatch->hostname, matches->hostname) ||
+            strcmp(curmatch->diskname, matches->diskname) ||
+            strcmp(curmatch->timestamp, matches->timestamp) ||
+            curmatch->level != matches->level)) {
+           continue;
+       }
+       if(strcmp("OK", curmatch->status)){
+           g_fprintf(stderr,_("Dump %s %s %s %d had status '%s', skipping\n"),
+                            curmatch->timestamp, curmatch->hostname,
+                            curmatch->diskname, curmatch->level,
+                            curmatch->status);
+           continue;
+       }
+       /* check if we already have that part */
+       for(curtape = needed_tapes; curtape; curtape = curtape->next) {
+           find_result_t *rsttemp = NULL;
+           for(rsttemp = curtape->files;
+               rsttemp;
+               rsttemp=rsttemp->next) {
+               if (!strcmp(rsttemp->partnum, curmatch->partnum) &&
+                   !strcmp(rsttemp->hostname, curmatch->hostname) &&
+                   !strcmp(rsttemp->diskname, curmatch->diskname) &&
+                   !strcmp(rsttemp->timestamp, curmatch->timestamp) &&
+                   rsttemp->level == curmatch->level) {
+                   have_part = 1;
                }
            }
-           if (have_part)
-               continue;
-           for(curtape = needed_tapes; curtape; curtape = curtape->next) {
-               if(!strcmp(curtape->label, curmatch->label)){
-                   find_result_t *rsttemp = NULL;
-                   find_result_t *rstfile = alloc(SIZEOF(find_result_t));
-                   int keep = 1;
+       }
+       if (have_part)
+           continue;
 
-                   memcpy(rstfile, curmatch, SIZEOF(find_result_t));
+       for(curtape = needed_tapes; curtape; curtape = curtape->next) {
+           if (!strcmp(curtape->label, curmatch->label)) {
+               find_result_t *rsttemp = NULL;
+               find_result_t *rstfile;
+               int keep = 1;
 
-                   havetape = 1;
+               havetape = 1;
 
-                   for(rsttemp = curtape->files;
+               for(rsttemp = curtape->files;
                            rsttemp;
                            rsttemp=rsttemp->next){
-                       if(rstfile->filenum == rsttemp->filenum){
-                           g_fprintf(stderr, _("Seeing multiple entries for tape "
+                   if(curmatch->filenum == rsttemp->filenum){
+                       g_fprintf(stderr, _("Seeing multiple entries for tape "
                                   "%s file %lld, using most recent\n"),
                                    curtape->label,
-                                   (long long)rstfile->filenum);
-                           keep = 0;
-                       }
-                   }
-                   if(!keep){
-                       amfree(rstfile);
-                       break;
+                                   (long long)curmatch->filenum);
+                       keep = 0;
                    }
-                   rstfile->next = curtape->files;
-
-                   if(curmatch->filenum < 1) curtape->isafile = 1;
-                   else curtape->isafile = 0;
-                   curtape->files = rstfile;
+               }
+               if(!keep){
                    break;
                }
-           }
-           if(!havetape){
-               find_result_t *rstfile = alloc(SIZEOF(find_result_t));
-               needed_tape_t *newtape =
-                                         alloc(SIZEOF(needed_tape_t));
+
+               rstfile = alloc(SIZEOF(find_result_t));
                memcpy(rstfile, curmatch, SIZEOF(find_result_t));
-               rstfile->next = NULL;
-               newtape->files = rstfile;
-               if(curmatch->filenum < 1) newtape->isafile = 1;
-               else newtape->isafile = 0;
-               newtape->label = curmatch->label;
-               if(needed_tapes){
-                   needed_tapes->prev->next = newtape;
-                   newtape->prev = needed_tapes->prev;
-                   needed_tapes->prev = newtape;
-               }
-               else{
-                   needed_tapes = newtape;
-                   needed_tapes->prev = needed_tapes;
-               }
-               newtape->next = NULL;
-               numtapes++;
-#if 0
-//             free_find_result(rstfile);
-#endif
-           } /* if(!havetape) */
+               rstfile->next = curtape->files;
+
+               if (curmatch->filenum < 1)
+                   curtape->isafile = 1;
+               else curtape->isafile = 0;
+               curtape->files = rstfile;
+               break;
+           }
+       }
+       if (!havetape) {
+           find_result_t *rstfile = alloc(SIZEOF(find_result_t));
+           needed_tape_t *newtape = alloc(SIZEOF(needed_tape_t));
+           memcpy(rstfile, curmatch, SIZEOF(find_result_t));
+           rstfile->next = NULL;
+           newtape->files = rstfile;
+           if(curmatch->filenum < 1) newtape->isafile = 1;
+           else newtape->isafile = 0;
+           newtape->label = curmatch->label;
+           if (needed_tapes){
+               needed_tapes->prev->next = newtape;
+               newtape->prev = needed_tapes->prev;
+               needed_tapes->prev = newtape;
+           } else {
+               needed_tapes = newtape;
+               needed_tapes->prev = needed_tapes;
+           }
+           newtape->next = NULL;
+           numtapes++;
+       } /* if(!havetape) */
 
-       } /* for(curmatch = matches ... */
-       dumpspecs = dumpspecs->next;
-    } /* while (dumpspecs) */
+    } /* for(curmatch = matches ... */
 
     if(numtapes == 0){
       g_fprintf(stderr, _("No matching dumps found\n"));
@@ -397,7 +403,8 @@ main(
 
 
     /* Decide what tapes we'll need */
-    needed_tapes = list_needed_tapes(dumpspecs);
+    needed_tapes = list_needed_tapes(dumpspecs,
+                                    rst_flags->pipe_to_fd == STDOUT_FILENO);
 
     parent_pid = getpid();
     atexit(cleanup);
index d9f285bce6474b4e8020d8a9a07be00a5f87a818..0e1b4b6cb4a242939aac6658d8958a0fd2c9860e 100644 (file)
@@ -98,7 +98,11 @@ static void handle_tape_restore(char * device_name, rst_flags_t * flags,
     Device * device;
     ReadLabelStatusFlags read_label_status;
 
+    dumpfile_t first_restored_file;
+
     device_api_init();
+
+    fh_init(&first_restored_file);
     
     device = device_open(device_name);
     if (device == NULL) {
@@ -128,7 +132,7 @@ static void handle_tape_restore(char * device_name, rst_flags_t * flags,
     }
 
     search_a_tape(device, stderr, flags, NULL, NULL, dumpspecs,
-                  NULL, NULL, 0, NULL);
+                  NULL, &first_restored_file, 0, NULL);
 }
 
 /*
@@ -188,19 +192,13 @@ main(
            } else if(*e == 'm' || *e == 'M') {
                rst_flags->blocksize *= 1024 * 1024;
            } else if(*e != '\0') {
-               error(_("invalid rst_flags->blocksize value \"%s\""), optarg);
+               error(_("invalid blocksize value \"%s\""), optarg);
                /*NOTREACHED*/
            }
            if(rst_flags->blocksize < DISK_BLOCK_BYTES) {
                error(_("minimum block size is %dk"), DISK_BLOCK_BYTES / 1024);
                /*NOTREACHED*/
            }
-           if(rst_flags->blocksize > MAX_TAPE_BLOCK_KB * 1024) {
-               g_fprintf(stderr,_("maximum block size is %dk, using it\n"),
-                       MAX_TAPE_BLOCK_KB);
-               rst_flags->blocksize = MAX_TAPE_BLOCK_KB * 1024;
-               /*NOTREACHED*/
-           }
            break;
        case 'c': rst_flags->compress = 1; break;
        case 'o':
index a12b5f52bc6ca5a5b11ff0f04b570a97d0b96cbf..130d08ef844fa2cfad50a788a00ec613806cce07 100644 (file)
@@ -1534,6 +1534,9 @@ try_restore_single_file(Device * device, int file_num, int* next_file,
     }
     record_seen_dump(tape_seen, source.header);
     restore(&source, flags);
+    if (first_restored_file) {
+       memcpy(first_restored_file, source.header, sizeof(dumpfile_t));
+    }
     return RESTORE_STATUS_NEXT_FILE;
 }
 
@@ -1736,6 +1739,7 @@ gboolean restore_holding_disk(FILE * prompt_out,
 
     if (last_header != NULL && !flags->amidxtaped &&
        flags->pipe_to_fd == STDOUT_FILENO &&
+       last_header->type != F_UNKNOWN &&
         !headers_equal(last_header, source.header, 1)) {
         return FALSE;
     } else if (this_header != NULL) {
@@ -1812,6 +1816,9 @@ restore_from_tapelist(FILE * prompt_out,
                                      cur_volume, &seentapes,
                                      NULL, &first_restored_file, NULL);
             }
+           if (flags->pipe_to_fd == fileno(stdout)) {
+               break;
+           }
         } else {
             Device * device = NULL;
             if (use_changer) {
@@ -1847,7 +1854,7 @@ restore_from_tapelist(FILE * prompt_out,
                                cur_volume, dumpspecs, &seentapes,
                                &first_restored_file, 0, logstream)) {
                 g_object_unref(device);
-                break;;
+                break;
             }
             g_object_unref(device);
         }            
@@ -1876,6 +1883,8 @@ restore_without_tapelist(FILE * prompt_out,
     int tape_count = 0;
     dumpfile_t first_restored_file;
 
+    fh_init(&first_restored_file);
+
     /* This loop also aborts if we run out of manual tapes, or
        encounter a changer error. */
     for (;;) {
index 40da5b5f16990671efbc2c33271fc6eb33cf9b6f..10d8dea4c342454568b41579646d1a8a73ba7f0f 100644 (file)
@@ -345,8 +345,13 @@ force_one(
               get_pname(), hostname, diskname);
     }
     if(put_info(hostname, diskname, &info) == 0) {
-       g_printf(_("%s: %s:%s is set to a forced level 0 at next run.\n"),
-              get_pname(), hostname, diskname);
+       if (dp->strategy == DS_INCRONLY) {
+           g_printf(_("%s: %s:%s, full dump done offline, next dump will be at level 1.\n"),
+                    get_pname(), hostname, diskname);
+       } else {
+           g_printf(_("%s: %s:%s is set to a forced level 0 at next run.\n"),
+                    get_pname(), hostname, diskname);
+       }
     } else {
        g_fprintf(stderr, _("%s: %s:%s could not be forced.\n"),
                get_pname(), hostname, diskname);
index 0c389234ea39452ec2e2ccc7ed6572ca0a73c080..460a354fcb25ee0ce415e2a968d186bd67b3289b 100644 (file)
@@ -138,11 +138,11 @@ main(
 
     conf_logdir = config_dir_relative(getconf_str(CNF_LOGDIR));
     olddir = vstralloc(conf_logdir, "/oldlog", NULL);
-    if (mkpdir(olddir, 02700, (uid_t)-1, (gid_t)-1) != 0) {
+    if (mkpdir(olddir, 0700, (uid_t)-1, (gid_t)-1) != 0) {
        error(_("could not create parents of %s: %s"), olddir, strerror(errno));
        /*NOTREACHED*/
     }
-    if (mkdir(olddir, 02700) != 0 && errno != EEXIST) {
+    if (mkdir(olddir, 0700) != 0 && errno != EEXIST) {
        error(_("could not create %s: %s"), olddir, strerror(errno));
        /*NOTREACHED*/
     }
index 0a5c2c580377b7b9d0ac3b352dc185b8f110d245..ef877f3fa22eef37016fd1b5ea98f11ffefc5c6e 100644 (file)
@@ -1382,7 +1382,11 @@ handle_taper_result(
            if (taper_dumper->result == LAST_TOK) {
                taper_sendresult = 1;
            } else {
-               taper_cmd(taper_dumper->result, NULL, NULL, 0, NULL);
+               if( taper_dumper->result == DONE) {
+                   taper_cmd(DONE, NULL, NULL, 0, NULL);
+               } else {
+                   taper_cmd(FAILED, NULL, NULL, 0, NULL);
+               }
            }
            break;
 
index 6d20b8a4adbe5b43fcd5df6d9eb1c7a4c108a2b6..18384c738394b4f117b9b4381fb5efe1b915b918 100644 (file)
@@ -1047,7 +1047,7 @@ do_dump(
        indexfile_real = getindexfname(hostname, diskname, dumper_timestamp, level);
        indexfile_tmp = stralloc2(indexfile_real, ".tmp");
 
-       if (mkpdir(indexfile_tmp, 02755, (uid_t)-1, (gid_t)-1) == -1) {
+       if (mkpdir(indexfile_tmp, 0755, (uid_t)-1, (gid_t)-1) == -1) {
           errstr = newvstrallocf(errstr,
                                 _("err create %s: %s"),
                                 indexfile_tmp,
index e430bf3abaf7f1a2922de2018bf1aa9069c835ad..3ff744e69c16a93cc954036e6556e9e309d92e6b 100644 (file)
@@ -35,6 +35,7 @@
 #include "logfile.h"
 #include "holding.h"
 #include "find.h"
+#include "cmdline.h"
 
 int find_match(char *host, char *disk);
 void search_holding_disk(find_result_t **output_find);
@@ -947,6 +948,59 @@ dumps_match(
     return(matches);
 }
 
+/*
+ * Return the set of dumps that match one or more of the given dumpspecs,
+ * If 'ok' is true, only dumps with a SUCCESS status will be matched.
+ * 
+ * Returns a newly allocated list of results, where all strings are also newly
+ * allocated.  Apparently some part of Amanda leaks under this condition.
+ */
+find_result_t *
+dumps_match_dumpspecs(
+    find_result_t *output_find,
+    GSList        *dumpspecs,
+    int ok)
+{
+    find_result_t *cur_result;
+    find_result_t *matches = NULL;
+    GSList        *dumpspec;
+    dumpspec_t    *ds;
+
+    for(cur_result=output_find;
+       cur_result;
+       cur_result=cur_result->next) {
+       char level_str[NUM_STR_SIZE];
+       g_snprintf(level_str, SIZEOF(level_str), "%d", cur_result->level);
+       for (dumpspec = dumpspecs; dumpspec; dumpspec = dumpspec->next) {
+           ds = (dumpspec_t *)dumpspec->data;
+           if((!ds->host || *ds->host == '\0' || match_host(ds->host, cur_result->hostname)) &&
+              (!ds->disk || *ds->disk == '\0' || match_disk(ds->disk, cur_result->diskname)) &&
+              (!ds->datestamp || *ds->datestamp== '\0' || match_datestamp(ds->datestamp, cur_result->timestamp)) &&
+              (!ds->level || *ds->level== '\0' || match_level(ds->level, level_str)) &&
+              (!ok || !strcmp(cur_result->status, "OK"))){
+
+               find_result_t *curmatch = alloc(SIZEOF(find_result_t));
+               memcpy(curmatch, cur_result, SIZEOF(find_result_t));
+
+               curmatch->timestamp = stralloc(cur_result->timestamp);
+               curmatch->hostname = stralloc(cur_result->hostname);
+               curmatch->diskname = stralloc(cur_result->diskname);
+               curmatch->level = cur_result->level;
+               curmatch->label = stralloc(cur_result->label);
+               curmatch->filenum = cur_result->filenum;
+               curmatch->status = stralloc(cur_result->status);
+               curmatch->partnum = stralloc(cur_result->partnum);
+
+               curmatch->next = matches;
+               matches = curmatch;
+               break;
+           }
+       }
+    }
+
+    return(matches);
+}
+
 find_result_t *
 dump_exist(
     find_result_t *output_find,
index 2fd5ed673c518ecf5eedad0ca4130a132e63f800..bcd8469ca3b1733da0d0449ed001db250c86bc7a 100644 (file)
@@ -40,6 +40,9 @@ find_result_t *dump_exist(find_result_t *output_find, char *hostname,
 find_result_t *dumps_match(find_result_t *output_find, char *hostname,
                            char *diskname, char *datestamp, char *level,
                            int ok);
+find_result_t *dumps_match_dumpspecs(find_result_t *output_find,
+                                    GSList *dumpspecs,
+                                    int ok);
 
 /* This function looks in a particular log.xxx file for dumps. Returns TRUE
  * if something was found. This function also skips dumps whose disklist
index 43c652182f1efedf2aafb6fed1bcae55b8ca9d4a..b7db7a89472eea3f835281c00c305fd9027906de 100644 (file)
@@ -75,7 +75,7 @@ open_txinfofile(
 
     /* create the directory structure if in write mode */
     if (writing) {
-        if (mkpdir(infofile, 02755, (uid_t)-1, (gid_t)-1) == -1) {
+        if (mkpdir(infofile, 0755, (uid_t)-1, (gid_t)-1) == -1) {
            amfree(infofile);
            return NULL;
        }
index a36fc6cf9a6abe9fdc5a217d26d87bcb1fba3578..1c612e4f53e73146d587991403f5aa30aa74efe5 100644 (file)
@@ -766,6 +766,23 @@ setup_estimate(
        }
     }
 
+    /* warn if last level 1 will be overwritten */
+    if (ep->last_level > 1 && strlen(info.inf[1].label) > 0) {
+       overwrite_runs = when_overwrite(info.inf[1].label);
+       if(overwrite_runs == 0) {
+           log_add(L_WARNING, _("Last level 1 dump of %s:%s "
+                   "on tape %s overwritten on this run, resetting to level 1"),
+                   dp->host->hostname, qname, info.inf[1].label);
+           ep->last_level = 0;
+       } else if(overwrite_runs <= RUNS_REDZONE) {
+           log_add(L_WARNING,
+                   plural(_("Last level 1 dump of %s:%s on tape %s overwritten in %d run."),
+                          _("Last level 1 dump of %s:%s on tape %s overwritten in %d runs."), overwrite_runs),
+                   dp->host->hostname, qname, info.inf[1].label,
+                   overwrite_runs);
+       }
+    }
+
     if(ep->next_level0 < 0) {
        g_fprintf(stderr,plural(_("%s:%s overdue %d day for level 0\n"),
                              _("%s:%s overdue %d days for level 0\n"),
@@ -905,7 +922,7 @@ setup_estimate(
 
        case DS_INCRONLY:
            if (ISSET(info.command, FORCE_FULL))
-               askfor(ep, i++, 0, &info);
+               ep->last_level = 0;
            break;
        }
     }
@@ -2558,7 +2575,7 @@ arglist_function1(
     }
     strappend(errstr, "]");
     qerrstr = quote_string(errstr);
-    vstrextend(&bi->errstr, " ", qerrstr);
+    vstrextend(&bi->errstr, " ", qerrstr, NULL);
     amfree(errstr);
     amfree(qerrstr);
     arglist_end(argp);
index 7c6c3231c83ee993e144a4f4ba992bf6fa2a16f4..dc58d8daa2a767985d8829cf6f8356a16c79f587 100644 (file)
@@ -176,7 +176,7 @@ int check_infofile(
                    }
                }
                if (other_dle_match == 0) {
-                   if(mkpdir(infofile, (mode_t)02755, (uid_t)-1,
+                   if(mkpdir(infofile, (mode_t)0755, (uid_t)-1,
                              (gid_t)-1) == -1)  {
                        *errmsg = vstralloc("Can't create directory for ",
                                            infofile, NULL);
index 26077b1d90f156af2dd4e2bb99dedd8ee519ca6b..012840117e0ba92d22ce244966666afebfd50d30 100644 (file)
@@ -30,6 +30,7 @@
  * tests a tape in a given tape unit and prints a tapetype entry for
  * it.  */
 #include "amanda.h"
+#include "conffile.h"
 
 #include "tapeio.h"
 
@@ -387,6 +388,8 @@ main(
   setlocale(LC_MESSAGES, "C");
   textdomain("amanda"); 
 
+  config_init(0, NULL);
+
   if ((sProgName = strrchr(*argv, '/')) == NULL) {
     sProgName = *argv;
   } else {