From d28952249e392eb31bc8eecc53f6c477f30c617b Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Wed, 20 Feb 2013 10:36:33 -0700 Subject: [PATCH] Imported Upstream version 3.3.3 --- COPYRIGHT | 1 + ChangeLog | 477 +++++++++++++++++ FULL_VERSION | 2 +- Makefile.in | 116 +++-- NEWS | 20 + README | 1 + ReleaseNotes | 21 + VERSION | 2 +- aclocal.m4 | 72 ++- amandad-src/Makefile.in | 67 ++- amandad-src/amandad.c | 19 +- amandad-src/amandad.h | 1 + amandad-src/amandad_util.c | 1 + amar-src/Makefile.in | 82 ++- amar-src/amar-test.c | 1 + amar-src/amar.c | 7 +- amar-src/amar.h | 7 +- amar-src/amarchiver.c | 14 +- amplot/Makefile.in | 80 ++- amplot/amplot.awk | 1 + amplot/amplot.g | 1 + amplot/amplot.sh | 1 + application-src/Makefile.in | 87 +++- application-src/amgtar.c | 6 +- application-src/amlog-script.pl | 7 +- application-src/ampgsql.pl | 7 +- application-src/amraw.pl | 7 +- application-src/amsamba.pl | 15 +- application-src/amstar.c | 1 + application-src/amsuntar.pl | 7 +- application-src/amzfs-sendrecv.pl | 7 +- application-src/amzfs-snapshot.pl | 7 +- application-src/script-email.pl | 7 +- application-src/teecount.c | 1 + changer-src/Makefile.in | 80 ++- changer-src/chg-disk.sh | 1 + changer-src/chg-multi.sh | 1 + client-src/Makefile.in | 108 ++-- client-src/amandates.c | 1 + client-src/amandates.h | 1 + client-src/amdump_client.pl | 7 +- client-src/calcsize.c | 1 + client-src/client_util.c | 52 +- client-src/client_util.h | 1 + client-src/findpass.c | 1 + client-src/findpass.h | 1 + client-src/getfsent.c | 1 + client-src/getfsent.h | 1 + client-src/killpgrp.c | 1 + client-src/noop.c | 1 + client-src/rundump.c | 1 + client-src/runtar.c | 1 + client-src/selfcheck.c | 6 +- client-src/sendbackup-dump.c | 1 + client-src/sendbackup-gnutar.c | 1 + client-src/sendbackup.c | 1 + client-src/sendbackup.h | 1 + client-src/sendsize.c | 1 + common-src/Makefile.in | 138 +++-- common-src/alloc.c | 1 + common-src/am_sl.c | 1 + common-src/am_sl.h | 1 + common-src/amaespipe.sh | 7 +- common-src/amanda.h | 1 + common-src/amcryptsimple.pl | 9 +- common-src/amfeatures.c | 1 + common-src/amfeatures.h | 1 + common-src/amflock-flock.c | 1 + common-src/amflock-lnlock.c | 1 + common-src/amflock-lockf.c | 1 + common-src/amflock-posix.c | 1 + common-src/amflock-test.c | 1 + common-src/amflock.c | 1 + common-src/amflock.h | 3 +- common-src/amgetconf.pl | 7 +- common-src/amgpgcrypt.pl | 7 +- common-src/amsemaphore-test.c | 7 +- common-src/amsemaphore.c | 7 +- common-src/amsemaphore.h | 7 +- common-src/amservice.c | 9 +- common-src/amxml.c | 2 + common-src/amxml.h | 1 + common-src/arglist.h | 1 + common-src/bsd-security.c | 15 +- common-src/bsdudp-security.c | 1 + common-src/clock.c | 1 + common-src/clock.h | 1 + common-src/columnar.c | 1 + common-src/columnar.h | 1 + common-src/conffile.c | 23 +- common-src/conffile.h | 3 + common-src/debug.c | 4 + common-src/debug.h | 1 + common-src/dgram.c | 1 + common-src/dgram.h | 1 + common-src/directtcp.h | 7 +- common-src/event-test.c | 7 +- common-src/event.c | 75 ++- common-src/event.h | 3 + common-src/file.c | 1 + common-src/file.h | 1 + common-src/fileheader-test.c | 7 +- common-src/fileheader.c | 1 + common-src/fileheader.h | 1 + common-src/genversion.c | 3 +- common-src/glib-util.c | 7 +- common-src/glib-util.h | 7 +- common-src/hexencode-test.c | 7 +- common-src/ipc-binary-test.c | 1 + common-src/ipc-binary.c | 7 +- common-src/ipc-binary.h | 7 +- common-src/match-test.c | 7 +- common-src/match.c | 16 + common-src/match.h | 7 +- common-src/packet.c | 1 + common-src/packet.h | 1 + common-src/protocol.c | 1 + common-src/protocol.h | 1 + common-src/quoting-test.c | 7 +- common-src/security-util.c | 7 +- common-src/security.c | 1 + common-src/security.h | 1 + common-src/simpleprng.c | 7 +- common-src/simpleprng.h | 7 +- common-src/sockaddr-util.c | 7 +- common-src/sockaddr-util.h | 7 +- common-src/stream.c | 1 + common-src/stream.h | 1 + common-src/svn-info.h | 4 +- common-src/tapelist.c | 1 + common-src/tapelist.h | 1 + common-src/testutils.c | 7 +- common-src/testutils.h | 7 +- common-src/timestamp.c | 1 + common-src/timestamp.h | 1 + common-src/util.c | 44 +- common-src/util.h | 4 + common-src/version.h | 1 + config/Makefile.in | 48 +- config/amanda/flags.m4 | 2 +- config/amanda/libs.m4 | 5 + config/automake/scripts.am | 7 +- config/automake/vars.am | 7 +- config/macro-archive/docbook-dtd.m4 | 7 +- config/macro-archive/docbook-xslt-min.m4 | 7 +- config/macro-archive/docbook-xslt.m4 | 7 +- config/macro-archive/xsltproc.m4 | 7 +- configure | 72 ++- device-src/Makefile.in | 105 ++-- device-src/amdevcheck.pl | 7 +- device-src/amtapetype.pl | 7 +- device-src/device.c | 102 ++-- device-src/device.h | 55 +- device-src/directtcp-connection.c | 7 +- device-src/directtcp-connection.h | 11 +- device-src/dvdrw-device.c | 1 + device-src/ndmp-device.c | 490 +++++++----------- device-src/null-device.c | 11 +- device-src/property.c | 7 +- device-src/property.h | 7 +- device-src/rait-device.c | 7 +- device-src/s3-device.c | 114 +++- device-src/s3-util.c | 7 +- device-src/s3-util.h | 7 +- device-src/s3.c | 128 ++++- device-src/s3.h | 14 +- device-src/tape-device.c | 10 +- device-src/vfs-device.c | 7 +- device-src/vfs-device.h | 7 +- device-src/xfer-dest-device.c | 7 +- device-src/xfer-dest-taper-cacher.c | 7 +- device-src/xfer-dest-taper-directtcp.c | 38 +- device-src/xfer-dest-taper-splitter.c | 9 +- device-src/xfer-dest-taper.c | 7 +- device-src/xfer-dest-taper.h | 7 +- device-src/xfer-device.h | 7 +- device-src/xfer-source-device.c | 7 +- device-src/xfer-source-recovery.c | 43 +- example/Makefile.in | 91 +++- gnulib/Makefile.in | 54 +- installcheck/=setupcache.pl | 7 +- installcheck/Amanda_Archive.pl | 7 +- installcheck/Amanda_Changer.pl | 7 +- installcheck/Amanda_Changer_compat.pl | 7 +- installcheck/Amanda_Changer_disk.pl | 7 +- installcheck/Amanda_Changer_multi.pl | 7 +- installcheck/Amanda_Changer_ndmp.pl | 15 +- installcheck/Amanda_Changer_null.pl | 7 +- installcheck/Amanda_Changer_rait.pl | 7 +- installcheck/Amanda_Changer_robot.pl | 25 +- installcheck/Amanda_Changer_single.pl | 7 +- installcheck/Amanda_ClientService.pl | 7 +- installcheck/Amanda_Cmdline.pl | 30 +- installcheck/Amanda_Config.pl | 9 +- installcheck/Amanda_Config_FoldingHash.pl | 7 +- installcheck/Amanda_Curinfo.pl | 7 +- installcheck/Amanda_DB_Catalog.pl | 16 +- installcheck/Amanda_Debug.pl | 7 +- installcheck/Amanda_Device.pl | 376 +------------- installcheck/Amanda_Disklist.pl | 7 +- installcheck/Amanda_Feature.pl | 7 +- installcheck/Amanda_Header.pl | 7 +- installcheck/Amanda_Holding.pl | 7 +- installcheck/Amanda_IPC_Binary.pl | 7 +- installcheck/Amanda_IPC_LineProtocol.pl | 7 +- installcheck/Amanda_Logfile.pl | 7 +- installcheck/Amanda_MainLoop.pl | 7 +- installcheck/Amanda_NDMP.pl | 7 +- installcheck/Amanda_Process.pl | 7 +- installcheck/Amanda_Recovery_Clerk.pl | 7 +- installcheck/Amanda_Recovery_Planner.pl | 7 +- installcheck/Amanda_Recovery_Scan.pl | 7 +- installcheck/Amanda_Report.pl | 7 +- installcheck/Amanda_Tapelist.pl | 43 +- installcheck/Amanda_Taper_Scan.pl | 8 +- installcheck/Amanda_Taper_Scan_lexical.pl | 7 +- installcheck/Amanda_Taper_Scan_oldest.pl | 7 +- installcheck/Amanda_Taper_Scan_traditional.pl | 7 +- installcheck/Amanda_Taper_Scribe.pl | 7 +- installcheck/Amanda_Util.pl | 7 +- installcheck/Amanda_Xfer.pl | 9 +- installcheck/Installcheck.pm | 7 +- installcheck/Installcheck/Application.pm | 7 +- installcheck/Installcheck/Catalogs.pm | 7 +- installcheck/Installcheck/Changer.pm | 7 +- installcheck/Installcheck/ClientService.pm | 7 +- installcheck/Installcheck/Config.pm | 11 +- installcheck/Installcheck/Dumpcache.pm | 7 +- installcheck/Installcheck/Mock.pm | 7 +- installcheck/Installcheck/Run.pm | 7 +- installcheck/Makefile.am | 11 +- installcheck/Makefile.in | 67 ++- installcheck/amadmin.pl | 32 +- installcheck/amarchiver.pl | 7 +- installcheck/amcheck-device.pl | 7 +- installcheck/amcheck.pl | 7 +- installcheck/amcheckdump.pl | 7 +- installcheck/amdevcheck.pl | 11 +- installcheck/amdump.pl | 7 +- installcheck/amdump_client.pl | 7 +- installcheck/amfetchdump.pl | 7 +- installcheck/amflush.pl | 7 +- installcheck/amgetconf.pl | 7 +- installcheck/amgtar.pl | 7 +- installcheck/amidxtaped.pl | 7 +- installcheck/amlabel.pl | 7 +- installcheck/amoverview.pl | 7 +- installcheck/ampgsql.pl | 7 +- installcheck/amraw.pl | 7 +- installcheck/amrecover.pl | 7 +- installcheck/amreport.pl | 7 +- installcheck/amrestore.pl | 7 +- installcheck/amrmtape.pl | 7 +- installcheck/amserverconfig.pl | 7 +- installcheck/amservice.pl | 7 +- installcheck/amstatus.pl | 22 +- installcheck/amtape.pl | 7 +- installcheck/amtapetype.pl | 7 +- installcheck/amvault.pl | 7 +- installcheck/bigint.pl | 7 +- installcheck/catalogs/amflush.cat | 6 +- installcheck/catalogs/bigdb.cat | 7 +- .../catalogs/taper-parallel-write.cat | 266 ++++++++++ installcheck/chunker.pl | 7 +- installcheck/example.pl | 7 +- installcheck/gnutar.pl | 10 +- installcheck/mock/lpr.pl | 7 +- installcheck/mock/mail.pl | 7 +- installcheck/mock/mtx.pl | 7 +- installcheck/mock_mtx.pl | 7 +- installcheck/noop.pl | 7 +- installcheck/pp-scripts.pl | 7 +- installcheck/run-ndmp.pl | 7 +- installcheck/taper.pl | 58 ++- man/Makefile.in | 110 ++-- man/amaddclient.8 | 6 +- man/amadmin.8 | 15 +- man/amaespipe.8 | 6 +- man/amanda-applications.7 | 6 +- man/amanda-archive-format.5 | 6 +- man/amanda-auth.7 | 6 +- man/amanda-changers.7 | 37 +- man/amanda-client.conf.5 | 6 +- man/amanda-compatibility.7 | 6 +- man/amanda-devices.7 | 10 +- man/amanda-interactivity.7 | 6 +- man/amanda-match.7 | 10 +- man/amanda-scripts.7 | 6 +- man/amanda-taperscan.7 | 6 +- man/amanda.8 | 6 +- man/amanda.conf.5 | 32 +- man/amarchiver.8 | 6 +- man/amcheck.8 | 13 +- man/amcheckdb.8 | 6 +- man/amcheckdump.8 | 6 +- man/amcleanup.8 | 6 +- man/amcleanupdisk.8 | 6 +- man/amcrypt-ossl-asym.8 | 6 +- man/amcrypt-ossl.8 | 6 +- man/amcrypt.8 | 6 +- man/amcryptsimple.8 | 6 +- man/amdevcheck.8 | 6 +- man/amdump.8 | 13 +- man/amdump_client.8 | 6 +- man/amfetchdump.8 | 41 +- man/amflush.8 | 13 +- man/amgetconf.8 | 6 +- man/amgpgcrypt.8 | 6 +- man/amgtar.8 | 6 +- man/amlabel.8 | 6 +- man/amoverview.8 | 6 +- man/ampgsql.8 | 6 +- man/amplot.8 | 6 +- man/amraw.8 | 6 +- man/amrecover.8 | 6 +- man/amreport.8 | 6 +- man/amrestore.8 | 13 +- man/amrmtape.8 | 6 +- man/amsamba.8 | 6 +- man/amserverconfig.8 | 6 +- man/amservice.8 | 6 +- man/amstar.8 | 6 +- man/amstatus.8 | 6 +- man/amsuntar.8 | 6 +- man/amtape.8 | 6 +- man/amtapetype.8 | 6 +- man/amtoc.8 | 6 +- man/amvault.8 | 13 +- man/amzfs-sendrecv.8 | 6 +- man/amzfs-snapshot.8 | 6 +- man/disklist.5 | 6 +- man/script-email.8 | 6 +- man/tapelist.5 | 10 +- man/xml-source/amadmin.8.xml | 7 +- man/xml-source/amanda-changers.7.xml | 26 + man/xml-source/amanda-devices.7.xml | 4 +- man/xml-source/amanda-match.7.xml | 3 + man/xml-source/amanda.conf.5.xml | 33 +- man/xml-source/amcheck.8.xml | 8 + man/xml-source/amdump.8.xml | 10 +- man/xml-source/amfetchdump.8.xml | 47 ++ man/xml-source/amflush.8.xml | 8 + man/xml-source/amrestore.8.xml | 8 + man/xml-source/amvault.8.xml | 8 + man/xml-source/tapelist.5.xml | 3 +- ndmp-src/Makefile.in | 71 ++- ndmp-src/ndmjob_args.c | 4 +- ndmp-src/ndmpconnobj.c | 126 +++-- ndmp-src/ndmpconnobj.h | 12 +- oldrecover-src/Makefile.in | 70 ++- oldrecover-src/amrecover.c | 6 +- oldrecover-src/amrecover.h | 1 + oldrecover-src/display_commands.c | 1 + oldrecover-src/extract_list.c | 1 + oldrecover-src/help.c | 1 + oldrecover-src/set_commands.c | 1 + oldrecover-src/uparse.c | 84 +-- oldrecover-src/uparse.h | 2 +- oldrecover-src/uparse.y | 1 + oldrecover-src/uscan.c | 95 ++-- oldrecover-src/uscan.l | 1 + packaging/Makefile.in | 41 +- packaging/common/common_functions.sh | 31 +- packaging/common/post_inst_functions.sh | 129 ++++- packaging/common/post_rm_functions.sh | 2 +- packaging/common/pre_inst_functions.sh | 8 + packaging/common/substitute.pl | 62 ++- packaging/common/test_sh_libs.sh | 150 +++++- packaging/deb/control | 14 +- packaging/deb/postinst.src | 12 +- packaging/deb/postrm.src | 16 +- packaging/rpm/amanda.spec.src | 141 +++-- packaging/sun-pkg/client/copyright | 1 + packaging/sun-pkg/client/postinstall.src | 21 +- packaging/sun-pkg/server/copyright | 1 + perl/Amanda/Application.pod | 7 +- perl/Amanda/Application.swg | 7 +- perl/Amanda/Application/Zfs.pm | 7 +- perl/Amanda/Archive.pod | 7 +- perl/Amanda/Archive.swg | 7 +- perl/Amanda/BigIntCompat.pm | 7 +- perl/Amanda/Changer.pm | 21 +- perl/Amanda/Changer/aggregate.pm | 9 +- perl/Amanda/Changer/compat.pm | 7 +- perl/Amanda/Changer/disk.pm | 25 +- perl/Amanda/Changer/multi.pm | 13 +- perl/Amanda/Changer/ndmp.pm | 7 +- perl/Amanda/Changer/null.pm | 7 +- perl/Amanda/Changer/rait.pm | 7 +- perl/Amanda/Changer/robot.pm | 155 ++++-- perl/Amanda/Changer/single.pm | 7 +- perl/Amanda/ClientService.pm | 7 +- perl/Amanda/Cmdline.c | 5 + perl/Amanda/Cmdline.pm | 6 + perl/Amanda/Cmdline.pod | 7 +- perl/Amanda/Cmdline.swg | 8 +- perl/Amanda/Config.c | 10 + perl/Amanda/Config.pm | 10 +- perl/Amanda/Config.pod | 7 +- perl/Amanda/Config.swg | 11 +- perl/Amanda/Constants.pm.in | 7 +- perl/Amanda/Curinfo.pm | 7 +- perl/Amanda/Curinfo/Info.pm | 7 +- perl/Amanda/DB/Catalog.pm | 7 +- perl/Amanda/Debug.pod | 7 +- perl/Amanda/Debug.swg | 7 +- perl/Amanda/Device.c | 462 +---------------- perl/Amanda/Device.pm | 6 - perl/Amanda/Device.pod | 7 +- perl/Amanda/Device.swg | 88 +--- perl/Amanda/Disklist.pod | 7 +- perl/Amanda/Disklist.swg | 7 +- perl/Amanda/Extract.pm | 130 +++++ perl/Amanda/Feature.pod | 7 +- perl/Amanda/Feature.swg | 7 +- perl/Amanda/Header.pod | 7 +- perl/Amanda/Header.swg | 7 +- perl/Amanda/Holding.pm | 7 +- perl/Amanda/IPC/Binary.pod | 7 +- perl/Amanda/IPC/Binary.swg | 7 +- perl/Amanda/IPC/LineProtocol.pm | 7 +- perl/Amanda/Interactivity.pm | 7 +- perl/Amanda/Interactivity/email.pm | 7 +- perl/Amanda/Interactivity/stdin.pm | 7 +- perl/Amanda/Interactivity/tty.pm | 7 +- perl/Amanda/Interactivity/tty_email.pm | 7 +- perl/Amanda/Logfile.pod | 7 +- perl/Amanda/Logfile.swg | 7 +- perl/Amanda/MainLoop.pod | 7 +- perl/Amanda/MainLoop.swg | 7 +- perl/Amanda/NDMP.pod | 7 +- perl/Amanda/NDMP.swg | 7 +- perl/Amanda/Paths.pm.in | 7 +- perl/Amanda/Process.pm | 7 +- perl/Amanda/Recovery/Clerk.pm | 9 +- perl/Amanda/Recovery/Planner.pm | 7 +- perl/Amanda/Recovery/Scan.pm | 7 +- perl/Amanda/Report.pm | 7 +- perl/Amanda/Report/human.pm | 135 +++-- perl/Amanda/Report/postscript.pm | 7 +- perl/Amanda/Report/xml.pm | 7 +- perl/Amanda/ScanInventory.pm | 8 +- perl/Amanda/Script.pm | 7 +- perl/Amanda/Script_App.pm | 7 +- perl/Amanda/Tapelist.pm | 8 +- perl/Amanda/Tapelist.pod | 7 +- perl/Amanda/Tapelist.swg | 15 +- perl/Amanda/Taper/Controller.pm | 9 +- perl/Amanda/Taper/Protocol.pm | 7 +- perl/Amanda/Taper/Scan.pm | 8 +- perl/Amanda/Taper/Scan/lexical.pm | 21 +- perl/Amanda/Taper/Scan/oldest.pm | 21 +- perl/Amanda/Taper/Scan/traditional.pm | 9 +- perl/Amanda/Taper/Scribe.pm | 69 ++- perl/Amanda/Taper/Worker.pm | 63 ++- perl/Amanda/Tests.pod | 7 +- perl/Amanda/Tests.swg | 7 +- perl/Amanda/Util.pod | 7 +- perl/Amanda/Util.swg | 7 +- perl/Amanda/Xfer.pod | 7 +- perl/Amanda/Xfer.swg | 7 +- perl/Amanda/XferServer.pod | 7 +- perl/Amanda/XferServer.swg | 7 +- perl/Makefile.am | 3 + perl/Makefile.in | 281 ++++++---- perl/amglue/Makefile.in | 67 ++- perl/amglue/amglue.h | 7 +- perl/amglue/amglue.swg | 7 +- perl/amglue/bigint.c | 7 +- perl/amglue/constants.swg | 7 +- perl/amglue/directtcp.swg | 7 +- perl/amglue/dumpspecs.swg | 7 +- perl/amglue/exports.swg | 7 +- perl/amglue/filehandles.swg | 7 +- perl/amglue/gerror.c | 7 +- perl/amglue/ghashtable.c | 7 +- perl/amglue/glib.swg | 7 +- perl/amglue/integers.swg | 7 +- perl/amglue/objwrap.c | 7 +- perl/amglue/source.c | 7 +- perl/amglue/xferwrap.c | 7 +- po/Makefile.in | 41 +- recover-src/Makefile.in | 70 ++- recover-src/amrecover.c | 1 + recover-src/amrecover.h | 1 + recover-src/display_commands.c | 1 + recover-src/extract_list.c | 9 +- recover-src/help.c | 1 + recover-src/set_commands.c | 4 +- recover-src/uparse.c | 202 ++++---- recover-src/uparse.h | 2 +- recover-src/uparse.y | 1 + recover-src/uscan.c | 103 ++-- recover-src/uscan.l | 1 + server-src/Makefile.in | 119 +++-- server-src/amaddclient.pl | 7 +- server-src/amadmin.c | 24 +- server-src/amcheck-device.pl | 21 +- server-src/amcheck.c | 9 +- server-src/amcheckdump.pl | 9 +- server-src/amcleanup.pl | 7 +- server-src/amcleanupdisk.pl | 7 +- server-src/amdump.pl | 40 +- server-src/amdumpd.pl | 7 +- server-src/amfetchdump.pl | 245 ++++++++- server-src/amflush.c | 27 +- server-src/amidxtaped.pl | 7 +- server-src/amindex.c | 1 + server-src/amindex.h | 1 + server-src/amindexd.c | 1 + server-src/amlabel.pl | 7 +- server-src/amlogroll.pl | 7 +- server-src/amoverview.pl | 7 +- server-src/amreport.pl | 7 +- server-src/amrestore.pl | 17 +- server-src/amrmtape.pl | 62 +-- server-src/amserverconfig.pl | 7 +- server-src/amstatus.pl | 205 ++++++-- server-src/amtape.pl | 35 +- server-src/amtrmidx.c | 1 + server-src/amtrmlog.c | 1 + server-src/amvault.pl | 16 +- server-src/chunker.c | 1 + server-src/cmdline.c | 14 +- server-src/cmdline.h | 11 +- server-src/disk_history.c | 1 + server-src/disk_history.h | 1 + server-src/diskfile.c | 26 +- server-src/diskfile.h | 7 +- server-src/driver.c | 166 ++++-- server-src/driverio.c | 1 + server-src/driverio.h | 1 + server-src/dumper.c | 49 +- server-src/find.c | 1 + server-src/holding.c | 1 + server-src/holding.h | 1 + server-src/infofile.c | 1 + server-src/infofile.h | 1 + server-src/list_dir.c | 1 + server-src/list_dir.h | 1 + server-src/logfile.c | 43 +- server-src/logfile.h | 1 + server-src/planner.c | 24 +- server-src/server_util.c | 1 + server-src/server_util.h | 1 + server-src/tapefile.c | 5 + server-src/tapefile.h | 1 + server-src/taper.pl | 7 +- server-src/xfer-server.h | 7 +- server-src/xfer-source-holding.c | 7 +- xfer-src/Makefile.in | 75 ++- xfer-src/amxfer.h | 7 +- xfer-src/dest-buffer.c | 7 +- xfer-src/dest-directtcp-connect.c | 7 +- xfer-src/dest-directtcp-listen.c | 7 +- xfer-src/dest-fd.c | 7 +- xfer-src/dest-null.c | 7 +- xfer-src/element-glue.c | 7 +- xfer-src/element-glue.h | 7 +- xfer-src/filter-process.c | 7 +- xfer-src/filter-xor.c | 7 +- xfer-src/source-directtcp-connect.c | 7 +- xfer-src/source-directtcp-listen.c | 7 +- xfer-src/source-fd.c | 7 +- xfer-src/source-pattern.c | 7 +- xfer-src/source-random.c | 7 +- xfer-src/xfer-element.c | 7 +- xfer-src/xfer-element.h | 7 +- xfer-src/xfer-test.c | 7 +- xfer-src/xfer.c | 7 +- xfer-src/xfer.h | 7 +- xfer-src/xmsg.c | 7 +- xfer-src/xmsg.h | 7 +- 573 files changed, 7083 insertions(+), 4058 deletions(-) create mode 100644 installcheck/catalogs/taper-parallel-write.cat create mode 100644 perl/Amanda/Extract.pm diff --git a/COPYRIGHT b/COPYRIGHT index cea671e..88a2b4c 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/ChangeLog b/ChangeLog index 743f563..d24082f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,480 @@ +2013-01-08 Jean-Louis Martineau + * VERSION: 3.3.3 + +2013-01-08 Jean-Louis Martineau + * ndmp-src/ndmjob_args.c: Handle more than 1000 arguments. + +2013-01-04 Jean-Louis Martineau + * perl/Amanda/Taper/Scan.pm (oldest_reusable_volume): Check the + labelstr. + * installcheck/Amanda_Taper_Scan.pl: Test it. + +2013-01-04 Jean-Louis Martineau + * server-src/amrmtape.pl: Do not check the 'log' file. + +2012-12-27 Jean-Louis Martineau + * server-src/amrmtape.pl: Add the pid on the temporary filename. + +2012-12-27 Jean-Louis Martineau + * common-src/util.c (make_amanda_tmpdir): New function to create the + AMANDA_TMPDIR directory. + * common-src/util.h (make_amanda_tmpdir): Add prototype. + * common-src/debug.c (debug_open): Call make_amanda_tmpdir(). + +2012-12-24 Jean-Louis Martineau + * server-src/driver.c (tape_action): Do not count free tape space if + exceed max-dle-by-volume. + +2012-12-18 Jean-Louis Martineau + * NEWS, ReleaseNotes: Changes in 3.3.3 + +2012-12-18 Jean-Louis Martineau + * perl/Amanda/Taper/Worker.pm: Ignore duplicate DONE/FAILED messages. + +2012-12-13 Dan Locks + * packaging/common/post_inst_functions.sh: revoke rw permissions for + group and other + * packaging/common/post_rm_functions.sh: fix function name to match + usage. + * packaging/common/test_sh_libs.sh: update test. + +2012-12-13 Jean-Louis Martineau + * server-src/amrmtape.pl: Die if opening CURINFO for writing fail. + +2012-12-12 Dan Locks + * packaging/common/post_inst_functions.sh: don't use uuencode -m for + solaris 8 compatibility. + +2012-12-11 Jean-Louis Martineau + * perl/Amanda/Changer/multi.pm, server-src/amcheck-device.pl: Fix perl + warning. + +2012-12-10 Jean-Louis Martineau + * server-src/logfile.c (log_rename): Donot abort if the log do not + exists. + +2012-12-10 Jean-Louis Martineau + * man/xml-source/amanda-devices.7.xml: Typo, s/SWITF/SWIFT/. + +2012-12-10 Jean-Louis Martineau + * server-src/amstatus.pl: No src-ip in PORT-DUMP. + +2012-12-10 Jean-Louis Martineau + * perl/Amanda/Taper/Scribe.pm: Log FAILED if nothing is written to + tape. + * server-src/amstatus.pl: Check ntape is defined. + +2012-12-07 Dan Locks + * packaging/common/post_inst_functions.sh: use amandausers's .gnupg/ + instead of installing user's, and suppress warnings about + permissions. + +2012-12-07 Dan Locks + * common_z/post_inst_functions.sh: head and tail invocation may only + use "-#", not "-n #" for solaris 8 compatibility + +2012-12-07 Jean-Louis Martineau + * contrib/convert-zd-mtx-to-robot.sh: set tpchanger instead of + tapedev. + +2012-12-07 Jean-Louis Martineau + * server-src/driver.c: Fix 32 bits overflow. + +2012-12-06 Dan Locks + * packaging/common/post_inst_functions.sh: use --passphrase-fd to + support older versions of gpg. + +2012-12-06 Jean-Louis Martineau + * server-src/amstatus.pl: Parse new PORT-DUMP format + +2012-12-05 Jean-Louis Martineau + * server-src/amstatus.pl: Fix exit status. + * installcheck/amstatus.pl: Fix for previous patch. + +2012-12-05 Jean-Louis Martineau + * server-src/amstatus.pl: Show taping status after dump failure. + +2012-12-05 Jean-Louis Martineau + * installcheck/taper.pl: Add check for previous patch. + +2012-12-05 Jean-Louis Martineau + * perl/Amanda/Taper/Worker.pm: Do it at the right place. + +2012-12-05 Jean-Louis Martineau + * perl/Amanda/Taper/Worker.pm: Use header is_partial to get dump + status for FILE-WRITE. + +2012-12-04 Jean-Louis Martineau + * client-src/client_util.c: print script output for backup with the + "| " prefix. + +2012-12-04 Jean-Louis Martineau + * server-src/amvault.pl: Missing return statement. + +2012-12-03 Dan Locks + * packaging/common/post_inst_functions.sh: add get_random_lines() and + use it to generate random passwords + * packaging/common/test_sh_libs.sh: test and use get_random_lines(), + use static log file name, enforce order on tests using + (get_random_lines, create_gnupg, create_ampassphrase, and + create_amkey. + * packaging/deb/postinst.src, packaging/rpm/amanda.spec.src, + packaging/sun-pkg/client/postinstall.src: use command -v instead of + unportable which. + +2012-12-03 Jean-Louis Martineau + * server-src/logfile.c (get_logline): Parse each line separately. + +2012-11-28 Jean-Louis Martineau + * device-src/s3.c: Force new connection after RequestTimeout. + +2012-11-24 Dan Locks + * packaging/rpm/amanda.spec.src: fix comparison operator + +2012-11-23 Jean-Louis Martineau + * installcheck/Amanda_Config.pl, installcheck/Amanda_DB_Catalog.pl, + installcheck/Installcheck/Config.pm, perl/Amanda/Report/human.pm, + perl/Amanda/Taper/Worker.pm, server-src/amtape.pl: Fix perl warning. + +2012-11-23 Dan Locks + * packaging/rpm/amanda.spec.src: fix awk SuSE detection syntax + +2012-11-23 Dan Locks + * common_z/post_inst_functions.sh: add --no-use-agent option to gpg + invocation to avoid problems with uninitialized gpg keyrings. + +2012-11-23 Jean-Louis Martineau + * device-src/null-device.c: Return DEVICE_STATUS_VOLUME_UNLABELED | + DEVICE_STATUS_VOLUME_ERROR on open for reading. + * installcheck/amdevcheck.pl: Fix. + +2012-11-22 Jean-Louis Martineau + * config/amanda/flags.m4: Swig is always compiled with + -Wno-deprecated-declarations + * common-src/amflock.h: s/file_lock_/file_lock/ + * device-src/directtcp-connection.h: + s/DirectTCPConnection_/DirectTCPConnection/ + * ndmp-src/ndmpconnobj.h: s/NDMPConnection_/NDMPConnection/ + * server-src/cmdline.h: s/dumpspec_s/dumpspec_t/ + +2012-11-22 Jean-Louis Martineau + * perl/Amanda/Cmdline.swg: Undo previous patch. + +2012-11-22 Jean-Louis Martineau + * config/amanda/libs.m4: remove deprecated warning for glib > 2.34.0 + * perl/Amanda/Cmdline.swg: s/dumpspec_t/dumpspec_s/ + +2012-11-22 Jean-Louis Martineau + * perl/Amanda/Changer/robot.pm: return 'all slots are empty'. + * perl/Amanda/Taper/Scan/traditional.pm: Call _user_msg on error. + +2012-11-22 Jean-Louis Martineau + * perl/Amanda/Changer/robot.pm: Keep a different current_slot for each + config. + +2012-11-21 Jean-Louis Martineau + * common-src/bsd-security.c (stream_read_callback): Do not cancel the + event in case of successful read. + * common-src/security-util.c: Typo. + +2012-11-15 Jean-Louis Martineau + * perl/Amanda/Changer/aggregate.pm, perl/Amanda/Changer/disk.pm, + perl/Amanda/Changer/multi.pm, + perl/Amanda/Changer/robot.pm: Add LOCK-TIMEOUT property. + * perl/Amanda/Changer.pm: Handle lock-timeout property. + * man/xml-source/amanda-changers.7.xml: Document new LOCK-TIMEOUT + properties. + +2012-11-14 Jean-Louis Martineau + * application-src/amsamba.pl: Password can be encoded. + +2012-11-14 Jean-Louis Martineau + * perl/Amanda/Report/human.pm: Do not print failure for config + setting. + * perl/Amanda/Taper/Worker.pm: Send TAPE-CONFIG. + * server-src/amflush.c: Do not add L_DISK if nothing to flush. + * server-src/amstatus.pl: Parse TAPE-CONFIG and print appropriate + message. + * server-src/driver.c: Parse TAPE-CONFIG. + * installcheck/taper.pl: Check new TAPE-CONFIG in protocol. + * installcheck/catalogs/amflush.cat: Fix for new format. + +2012-11-05 Jean-Louis Martineau + * man/xml-source/amanda-devices.7.xml: Add 'OAUTH2' and 'CASTOR' for + value of the storage-api property. + +2012-10-25 Jean-Louis Martineau + * common-src/event.c: Disable -Wmissing-field-initializers when using + G_STATIC_MUTEX_INIT because of warning with glib-2.32. + +2012-10-25 Jean-Louis Martineau + * man/xml-source/amfetchdump.8.xml: Document --extract, --directory, + --data-path and --application-property. + +2012-10-25 Jean-Louis Martineau + * common-src/event.c: Use a GStaticMutex. + +2012-10-25 Jean-Louis Martineau + * ndmp-src/ndmpconnobj.c: Use a GStaticMutex. + +2012-10-24 Jean-Louis Martineau + * installcheck/Amanda_Device.pl: Fix count. + +2012-10-23 Jean-Louis Martineau + * ndmp-src/ndmpconnobj.c: Use event_create and event_activate. + Create static notify_data_t. + +2012-10-23 Jean-Louis Martineau + * common-src/event.c (event_create, event_activate): New function, it + split event_register in two. + * common-src/event.h (event_create, event_activate): New prototype. + +2012-10-22 Jean-Louis Martineau + * device-src/device.c (device_accept, device_connect, + device_write_from_connection, device_read_to_connection): They take + (int *, GMutex *, GCond *) new arguments to be able to interupt + them. + * device-src/device.h: Change prototype. + * device-src/ndmp-device.c: Implement new functionnality. + * device-src/xfer-dest-taper-directtcp.c, + device-src/xfer-source-recovery.c: Use the new API. + * installcheck/Amanda_Device.pl: Remove directtcp test. + * ndmp-src/ndmpconnobj.c (ndmp_connection_wait_for_notify_with_cond): + Allow to be cancelled. + * ndmp-src/ndmpconnobj.h: Change prototype. + * perl/Amanda/Device.swg: Remove accept, connect, + write_from_connection and read-to_connection. + +2012-10-22 Jean-Louis Martineau + * perl/Amanda/Taper/Scribe.pm (abort_setup): New method. + * perl/Amanda/Taper/Scribe.pm (_dump_done): Return if $dump_cb is not + set. + * perl/Amanda/Taper/Worker.pm: Call abort_setup if setup failed. + +2012-10-22 Jean-Louis Martineau + * server-src/amfetchdump.pl: typo, remove '.' in argv. + +2012-10-22 Jean-Louis Martineau + * server-src/dumper.c (do_dump): Make the header file only + HEADER_DONE. + +2012-10-22 Jean-Louis Martineau + * perl/Amanda/Taper/Controller.pm: Reverse taper/driver in log. + +2012-10-22 Jean-Louis Martineau + * ndmp-src/ndmjob_args.c (handle_long_option): Close the fd. + +2012-10-22 Jean-Louis Martineau + * common-src/event.c: Make the code thread safe. + +2012-10-19 Jean-Louis Martineau + * common-src/match.c: Handle '=' as first characters of expression. + * man/xml-source/amanda-match.7.xml: Document new '=' as first + character of expression. + * man/xml-source/amadmin.8.xml, man/xml-source/amcheck.8.xml, + * man/xml-source/amdump.8.xml, man/xml-source/amfetchdump.8.xml, + * man/xml-source/amflush.8.xml, man/xml-source/amrestore.8.xml, + * man/xml-source/amvault.8.xml: Document new '--exact-match' argument. + * perl/Amanda/Cmdline.swg: Add CMDLINE_EXACT_MATCH + * server-src/diskfile.c (match_disklist, match_dumpfile): + New exact_match argument. + * server-src/diskfile.h (match_disklist, match_dumpfile): + Change prototype. + * server-src/cmdline.c (cmdline_parse_dumpspecs): CMDLINE_EXACT_MATCH. + * server-src/cmdline.h: New CMDLINE_EXACT_MATCH. + * server-src/amadmin.c, server-src/amcheck.c, + server-src/amdump.pl, server-src/amfetchdump.pl, + server-src/amflush.c, server-src/amrestore.pl, + server-src/amvault.pl, server-src/planner.c: Add --exact-match + argument. + * installcheck/Amanda_Cmdline.pl: Check '='. + * installcheck/amadmin.pl: Check --exact-match and '='. + +2012-10-19 Jean-Louis Martineau + * server-src/amfetchdump.pl: Fix for compressed dump. + +2012-10-19 Jean-Louis Martineau + * server-src/amfetchdump.pl: Add [--extract --directory directory + [--data-path (amanda|directtcp)] + [--application-property='NAME=VALUE']*] + * man/xml-source/amfetchdump.8.xml: Document them. + * perl/Amanda/Extract.pm: New utilities torun application from perl. + * perl/Makefile.am: Add Amanda/Extract.pm + * perl/Amanda/Recovery/Clerk.pm: Small fix. + +2012-10-18 Jean-Louis Martineau + * All files: Change Zmanda licensing to GPLv2+ and LGPLv2+, Add Zmanda + copyright to files modified by Zmanda. + +2012-10-15 Jean-Louis Martineau + * common-src/conffile.c: New REPORT-USE-MEDIA and REPORT-NEXT-MEDIA. + * common-src/conffile.h: And CNF_REPORT_USE_MEDIA and + CNF_REPORT_NEXT_MEDIA + * man/xml-source/amanda.conf.5.xml: Document REPORT-USE-MEDIA and + REPORT-NEXT-MEDIA. + * perl/Amanda/Config.swg: Add CNF_REPORT_USE_MEDIA and + CNF_REPORT_NEXT_MEDIA. + * perl/Amanda/Report/human.pm: Use them. + +2012-10-12 Jean-Louis Martineau + * server-src/amstatus.pl (showtime): Use calandar days. + +2012-10-12 Jean-Louis Martineau + * perl/Amanda/Taper/Worker.pm: Add data_path to %splitting_args. + * perl/Amanda/Taper/Scribe.pm: Correctly set part_* for DIRECTTCP + data_path. + +2012-10-11 Jean-Louis Martineau + * amandad-src/amandad.c: Add a timeout. + * common-src/event.c: List all event in debug mode. + * common-src/security-util.c: Call the accept_fn on connection close. + +2012-10-11 Jean-Louis Martineau + * common-src/amcryptsimple.pl: Add '-z 0' to gpg argument when + encrypting. + +2012-10-09 Jean-Louis Martineau + * oldrecover-src/amrecover.c: Solaris do not have sa_restorer. + +2012-10-09 Jean-Louis Martineau + * amar-src/amarchiver.c, client-src/selfcheck.c, + common-src/bsd-security.c, common-src/util.c, + device-src/device.c, device-src/ndmp-device.c, + common-src/util.c, device-src/tape-device.c, + oldrecover-src/amrecover.c, recover-src/extract_list.c, + recover-src/set_commands.c, server-src/diskfile.c, + server-src/driver.c: Fix bug found by Coverity. + +2012-10-09 Jean-Louis Martineau + * example/Makefile.am: Build amanda-CAStor.conf from + amanda-CAStor.conf.in + * example/template.d/amanda-CAStor.conf: Remove + * example/template.d/amanda-CAStor.conf.in: New file. + +2012-10-05 Jean-Louis Martineau + * common-src/security-util.c: Change the security_stream_read callback + to not release the event if the read succeed. + * amandad-src/amandad.c, common-src/amservice.c, + recover-src/extract_list.c, server-src/dumper.c: Do not restart + security_stream_read if the read succeeded. + * server-src/dumper.c: Handle timeout without starting too much event. + +2012-10-05 Jean-Louis Martineau + * server-src/driver.c (tape_action): Fix handling of + taper-parallel-write. + * server-src/driver.c: Go in degraded mode only after all taper failed. + +2012-10-05 Jean-Louis Martineau + * server-src/amstatus.pl: Fix for TAKE-SCRIBE-FROM command, handle + multiple taper status files. + +2012-10-02 Jean-Louis Martineau + * server-src/amstatus.pl: Fix for (eof) from dumper/chunker or taper. + +2012-09-27 Jean-Louis Martineau + * device-src/s3-device.c: Fix reps and reps_bucket name. + +2012-09-26 Jean-Louis Martineau + * common-src/conffile.c (get_multiplier): Fix for for CONF_END. + +2012-09-25 Jean-Louis Martineau + * device-src/xfer-dest-taper-splitter.c: Do not increase partnum if + the size is 0. + * installcheck/Amanda_Xfer.pl: Fix partnum check. + * perl/Amanda/Taper/Scribe.pm: Improve debugging. + +2012-09-25 Jean-Louis Martineau + * perl/Amanda/Taper/Scan/lexical.pm, + perl/Amanda/Taper/Scan/oldest.pm: Fix perl warning. + +2012-09-24 Jean-Louis Martineau + * perl/Amanda/Changer/robot.pm: Fix for header not read. + +2012-09-24 Jean-Louis Martineau + * man/xml-source/amanda.conf.5.xml (part-size): Improve documentation. + +2012-09-24 Jean-Louis Martineau + * perl/Amanda/Taper/Scribe.pm (device_started): Can get non-numeric + result. + +2012-09-21 Jean-Louis Martineau + * man/xml-source/tapelist.5.xml: Add BLOCKSIZE. + +2012-09-21 Jean-Louis Martineau + * perl/Amanda/Tapelist.swg: die() if tapelist is not valid. + * server-src/tapefile.c: exit if tapelist is not valid. + * installcheck/Amanda_Tapelist.pl: Add more check. + * perl/Amanda/Changer.pm: Add $err->device + * perl/Amanda/Changer/robot.pm: Return error if barcode do not match + with tapelist. + * server-src/amtape.pl (inventory): Print if barcode do not match. + +2012-09-21 Jean-Louis Martineau + * installcheck/Makefile.am (catalogs): Add + catalogs/taper-parallel-write.cat. + +2012-09-21 Jean-Louis Martineau + * device-src/s3.c: Fix date_sync_regex. + +2012-09-20 Jean-Louis Martineau + * server-src/amstatus.pl: Fix for taper-parallel-write > 1. + * installcheck/amstatus.pl: Checkit. + * installcheck/catalogs/taper-parallel-write.cat: New catalog. + +2012-09-19 Jean-Louis Martineau + * device-src/s3.c: Castor require libcurl 7.19.1. + +2012-09-18 Jean-Louis Martineau + * device-src/s3-device.c, device-src/s3.c: Castor require libcurl + 7.19.1. + +2012-09-17 Jean-Louis Martineau + * device-src/s3-device.c, device-src/s3.c + device-src/s3.h: Add CASTOR S3_API. + * example/template.d/amanda-CAStor.conf: Example + config for castor. + +2012-09-17 Jean-Louis Martineau + * application-src/amgtar.c: Set gnutar_listdir after the config for + the backup set is read. + +2012-09-17 Jean-Louis Martineau + * common-src/amxml.c (amstart_element): Set data_user->dle->property. + +2012-09-05 Jean-Louis Martineau + * server-src/amcheckdump.pl: s/correclty/correctly/g + +2012-08-24 Jean-Louis Martineau + * perl/Amanda/Changer/robot.pm: Correctly set f_type and device_error + in state. + * perl/Amanda/ScanInventory.pm (volume_is_labelable): Set labelstr for + does_not_match_labelstr. + * perl/Amanda/Taper/Scan/lexical.pm, + perl/Amanda/Taper/Scan/oldest.pm (analyze): Check label match + labelstr. + * server-src/amcheck-device.pl (_user_msg_fn): print message when res + is not set. + * server-src/amtape.pl: Fix for device returning empty error. + * installcheck/Amanda_Changer_ndmp.pl, + installcheck/Amanda_Changer_robot.pl: Fix for f_type set. + +2012-08-24 Jean-Louis Martineau + * installcheck/gnutar.pl: fc17 gnutar is like fc15. + +2012-08-24 Jean-Louis Martineau + * installcheck/Amanda_Device.pl: Print error if nc, nc6 or netcat is + not installed. + +2012-08-23 Jean-Louis Martineau + * perl/Amanda/Changer/disk.pm: Use the changerfile for the statefile. + +2012-08-22 Jean-Louis Martineau + * server-src/amdump.pl: Create amdump., amdump and amdump.1 + are maintained as symlink. + +2012-08-21 Jean-Louis Martineau + * server-src/planner.c (handle_result): Correctly log some error. + 2012-07-24 Jean-Louis Martineau * device-src/s3-device.c: New REUSE-CONNECTION property. * device-src/s3.c: Do not reuse connection if REUSE-CONNECTION is diff --git a/FULL_VERSION b/FULL_VERSION index 4772543..619b537 100644 --- a/FULL_VERSION +++ b/FULL_VERSION @@ -1 +1 @@ -3.3.2 +3.3.3 diff --git a/Makefile.in b/Makefile.in index f6defc6..9a3cd3a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -18,9 +18,10 @@ # vim:ft=automake # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -87,6 +88,23 @@ # in this file at all, due to limitations of Automake. VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -280,6 +298,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -301,6 +324,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkgdatadir)" DATA = $(pkgdata_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ @@ -318,9 +347,11 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ - { test ! -d "$(distdir)" \ - || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr "$(distdir)"; }; } + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ @@ -349,6 +380,8 @@ am__relativize = \ DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AIX_BACKUP = @AIX_BACKUP@ @@ -1252,7 +1285,7 @@ all: $(BUILT_SOURCES) .SUFFIXES: .SUFFIXES: -am--refresh: +am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/installperms.am $(am__configure_deps) @for dep in $?; do \ @@ -1277,6 +1310,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; +$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/installperms.am: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck @@ -1297,8 +1331,11 @@ distclean-libtool: -rm -f libtool config.lt install-pkgdataDATA: $(pkgdata_DATA) @$(NORMAL_INSTALL) - test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" @list='$(pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgdatadir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -1312,9 +1349,7 @@ uninstall-pkgdataDATA: @$(NORMAL_UNINSTALL) @list='$(pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(pkgdatadir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(pkgdatadir)" && rm -f $$files + dir='$(DESTDIR)$(pkgdatadir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -1485,13 +1520,10 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -1526,7 +1558,11 @@ dist-gzip: distdir $(am__remove_distdir) dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__remove_distdir) dist-lzma: distdir @@ -1534,7 +1570,7 @@ dist-lzma: distdir $(am__remove_distdir) dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir @@ -1565,6 +1601,8 @@ distcheck: dist bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ @@ -1574,7 +1612,7 @@ distcheck: dist *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod a+w $(distdir) + chmod -R a-w $(distdir); chmod u+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) @@ -1584,6 +1622,7 @@ distcheck: dist && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ @@ -1612,8 +1651,16 @@ distcheck: dist list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ @@ -1649,10 +1696,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) @@ -1748,8 +1800,8 @@ uninstall-am: uninstall-pkgdataDATA .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ - dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-xz \ - dist-zip distcheck distclean distclean-generic \ + dist-gzip dist-hook dist-lzip dist-lzma dist-shar dist-tarZ \ + dist-xz dist-zip distcheck distclean distclean-generic \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ diff --git a/NEWS b/NEWS index 5f5c570..f9861a0 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,23 @@ +Changes in release 3.3.3 + + * amdump.X log files use timestamp instead of number, amdump and amdump.1 + are maintained as symlink. + * chg-disk + o Use the changerfile for the statefile. + * s3 device + o support CASTOR storage + * amanda.conf + o New REPORT-USE-MEDIA and REPORT-NEXT-MEDIA. + * amfetchdump + o new --extract, --directory, --data-path and --application-property + arguments. It allow to do the extraction on the server. + * --exact-match argument to many command, and '=' prefix to expression. + o It diable use of expression for host, disk, level and datestamp on + command line argument. + * All changer scripts. + o Add LOCK-TIMEOUT property. + * Many bug fix + Changes in release 3.3.2 * amgtar diff --git a/README b/README index 612c67c..3b88446 100644 --- a/README +++ b/README @@ -2,6 +2,7 @@ Amanda (The Advanced Maryland Automatic Network Disk Archiver) Backup Software Copyright (c) 1991-1998 University of Maryland at College Park +Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. All Rights Reserved. PLEASE NOTE: THIS SOFTWARE IS BEING MADE AVAILABLE "AS-IS". We make diff --git a/ReleaseNotes b/ReleaseNotes index d3286fd..45b425b 100644 --- a/ReleaseNotes +++ b/ReleaseNotes @@ -1,3 +1,24 @@ + Release Notes for amanda-3.3.3 + +* amdump.X log files use timestamp instead of number, amdump and amdump.1 + are maintained as symlink. +* chg-disk + o Use the changerfile for the statefile. +* s3 device + o support CASTOR storage +* amanda.conf + o New REPORT-USE-MEDIA and REPORT-NEXT-MEDIA. +* amfetchdump + o new --extract, --directory, --data-path and --application-property + arguments. It allow to do the extraction on the server. +* --exact-match argument to many command, and '=' prefix to expression. + o It diable use of expression for host, disk, level and datestamp on + command line argument. +* All changer scripts. + o Add LOCK-TIMEOUT property. +* Many bug fix. + + Release Notes for amanda-3.3.2 * amgtar diff --git a/VERSION b/VERSION index 4772543..619b537 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.3.2 +3.3.3 diff --git a/aclocal.m4 b/aclocal.m4 index 258a742..e8badce 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,7 +1,8 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- +# generated automatically by aclocal 1.11.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, +# Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -389,12 +390,15 @@ else fi[]dnl ])# PKG_CHECK_MODULES -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software +# Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been @@ -404,7 +408,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.1], [], +m4_if([$1], [1.11.6], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -420,19 +424,21 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.1])dnl +[AM_AUTOMAKE_VERSION([1.11.6])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. @@ -514,14 +520,14 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 -# Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, +# 2010, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 10 +# serial 12 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, @@ -561,6 +567,7 @@ AC_CACHE_CHECK([dependency style of $depcc], # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -625,7 +632,7 @@ AC_CACHE_CHECK([dependency style of $depcc], break fi ;; - msvisualcpp | msvcmsys) + msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. @@ -690,10 +697,13 @@ AC_DEFUN([AM_DEP_TRACK], if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- @@ -915,12 +925,15 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, +# Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. @@ -1108,12 +1121,15 @@ else fi ]) -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, +# Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. @@ -1136,13 +1152,14 @@ esac # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software +# Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 +# serial 5 # _AM_MANGLE_OPTION(NAME) # ----------------------- @@ -1150,13 +1167,13 @@ AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) -# ------------------------------ +# -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- +# ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) @@ -1167,12 +1184,14 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. @@ -1249,12 +1268,14 @@ Check your system clock]) fi AC_MSG_RESULT(yes)]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't @@ -1277,13 +1298,13 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006, 2008 Free Software Foundation, Inc. +# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 +# serial 3 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- @@ -1292,13 +1313,13 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])]) AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- +# -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1320,10 +1341,11 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) diff --git a/amandad-src/Makefile.in b/amandad-src/Makefile.in index f57f64f..0d105ca 100644 --- a/amandad-src/Makefile.in +++ b/amandad-src/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -20,9 +20,10 @@ # vim:ft=automake # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -93,6 +94,23 @@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -297,6 +315,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(amlibdir)" "$(DESTDIR)$(amlibexecdir)" LTLIBRARIES = $(amlib_LTLIBRARIES) libamandad_la_DEPENDENCIES = ../common-src/libamanda.la @@ -326,6 +350,11 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libamandad_la_SOURCES) amandad.c DIST_SOURCES = $(libamandad_la_SOURCES) amandad.c +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags @@ -1229,6 +1258,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; +$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/installperms.am $(top_srcdir)/config/automake/precompile.am: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -1240,7 +1270,6 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-amlibLTLIBRARIES: $(amlib_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(amlibdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibdir)" @list='$(amlib_LTLIBRARIES)'; test -n "$(amlibdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -1248,6 +1277,8 @@ install-amlibLTLIBRARIES: $(amlib_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(amlibdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(amlibdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(amlibdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(amlibdir)"; \ } @@ -1269,12 +1300,15 @@ clean-amlibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libamandad.la: $(libamandad_la_OBJECTS) $(libamandad_la_DEPENDENCIES) +libamandad.la: $(libamandad_la_OBJECTS) $(libamandad_la_DEPENDENCIES) $(EXTRA_libamandad_la_DEPENDENCIES) $(libamandad_la_LINK) -rpath $(amlibdir) $(libamandad_la_OBJECTS) $(libamandad_la_LIBADD) $(LIBS) install-amlibexecPROGRAMS: $(amlibexec_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(amlibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)" @list='$(amlibexec_PROGRAMS)'; test -n "$(amlibexecdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(amlibexecdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ @@ -1314,7 +1348,7 @@ clean-amlibexecPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -amandad$(EXEEXT): $(amandad_OBJECTS) $(amandad_DEPENDENCIES) +amandad$(EXEEXT): $(amandad_OBJECTS) $(amandad_DEPENDENCIES) $(EXTRA_amandad_DEPENDENCIES) @rm -f amandad$(EXEEXT) $(LINK) $(amandad_OBJECTS) $(amandad_LDADD) $(LIBS) @@ -1455,10 +1489,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) diff --git a/amandad-src/amandad.c b/amandad-src/amandad.c index 11009d8..d864c3f 100644 --- a/amandad-src/amandad.c +++ b/amandad-src/amandad.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1999 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -151,7 +152,7 @@ struct active_service { */ GSList *serviceq = NULL; -static int wait_30s = 1; +static event_handle_t *exit_event; static int exit_on_qlength = 1; static char *auth = NULL; static kencrypt_type amandad_kencrypt = KENCRYPT_NONE; @@ -451,7 +452,6 @@ main( strcasecmp(auth, "ssh") == 0 || strcasecmp(auth, "local") == 0 || strcasecmp(auth, "bsdtcp") == 0) { - wait_30s = 0; exit_on_qlength = 1; } @@ -504,8 +504,7 @@ main( * Schedule an event that will try to exit every 30 seconds if there * are no requests outstanding. */ - if(wait_30s) - (void)event_register((event_id_t)30, EV_TIME, exit_check, &no_exit); + exit_event = event_register((event_id_t)30, EV_TIME, exit_check, &no_exit); /* * Call event_loop() with an arg of 0, telling it to block until all @@ -544,6 +543,7 @@ exit_check( if (no_exit) return; + g_debug("timeout exit"); dbclose(); exit(0); } @@ -571,7 +571,12 @@ protocol_accept( /* * If handle is NULL, then the connection is closed. */ - if(handle == NULL) { + if (handle == NULL) { + if (exit_on_qlength && exit_event) { + /* remove the timeout, we will exit once the service terminate */ + event_release(exit_event); + exit_event = NULL; + } return; } @@ -1481,9 +1486,7 @@ process_writenetfd( dbprintf(_("process_writenetfd: dh->fd_write <= 0\n")); } else if (size > 0) { full_write(dh->fd_write, buf, (size_t)size); - security_stream_read(dh->netfd, process_writenetfd, dh); - } - else { + } else { aclose(dh->fd_write); } } diff --git a/amandad-src/amandad.h b/amandad-src/amandad.h index 2bbf727..d99106a 100644 --- a/amandad-src/amandad.h +++ b/amandad-src/amandad.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/amandad-src/amandad_util.c b/amandad-src/amandad_util.c index 1721a32..3bc5ab2 100644 --- a/amandad-src/amandad_util.c +++ b/amandad-src/amandad_util.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/amar-src/Makefile.in b/amar-src/Makefile.in index e508a17..a22167d 100644 --- a/amar-src/Makefile.in +++ b/amar-src/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -20,9 +20,10 @@ # vim:ft=automake # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -93,6 +94,23 @@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -299,6 +317,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(amlibdir)" "$(DESTDIR)$(sbindir)" LTLIBRARIES = $(amlib_LTLIBRARIES) libamar_la_DEPENDENCIES = ../common-src/libamanda.la @@ -332,6 +356,11 @@ SOURCES = $(libamar_la_SOURCES) $(amar_test_SOURCES) \ $(amarchiver_SOURCES) DIST_SOURCES = $(libamar_la_SOURCES) $(amar_test_SOURCES) \ $(amarchiver_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags @@ -1233,6 +1262,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; +$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/installperms.am $(top_srcdir)/config/automake/precompile.am: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -1244,7 +1274,6 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-amlibLTLIBRARIES: $(amlib_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(amlibdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibdir)" @list='$(amlib_LTLIBRARIES)'; test -n "$(amlibdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -1252,6 +1281,8 @@ install-amlibLTLIBRARIES: $(amlib_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(amlibdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(amlibdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(amlibdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(amlibdir)"; \ } @@ -1273,7 +1304,7 @@ clean-amlibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libamar.la: $(libamar_la_OBJECTS) $(libamar_la_DEPENDENCIES) +libamar.la: $(libamar_la_OBJECTS) $(libamar_la_DEPENDENCIES) $(EXTRA_libamar_la_DEPENDENCIES) $(libamar_la_LINK) -rpath $(amlibdir) $(libamar_la_OBJECTS) $(libamar_la_LIBADD) $(LIBS) clean-noinstPROGRAMS: @@ -1286,8 +1317,11 @@ clean-noinstPROGRAMS: rm -f $$list install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ @@ -1327,10 +1361,10 @@ clean-sbinPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -amar-test$(EXEEXT): $(amar_test_OBJECTS) $(amar_test_DEPENDENCIES) +amar-test$(EXEEXT): $(amar_test_OBJECTS) $(amar_test_DEPENDENCIES) $(EXTRA_amar_test_DEPENDENCIES) @rm -f amar-test$(EXEEXT) $(LINK) $(amar_test_OBJECTS) $(amar_test_LDADD) $(LIBS) -amarchiver$(EXEEXT): $(amarchiver_OBJECTS) $(amarchiver_DEPENDENCIES) +amarchiver$(EXEEXT): $(amarchiver_OBJECTS) $(amarchiver_DEPENDENCIES) $(EXTRA_amarchiver_DEPENDENCIES) @rm -f amarchiver$(EXEEXT) $(LINK) $(amarchiver_OBJECTS) $(amarchiver_LDADD) $(LIBS) @@ -1504,14 +1538,15 @@ check-TESTS: $(TESTS) fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ - echo "$$grn$$dashes"; \ + col="$$grn"; \ else \ - echo "$$red$$dashes"; \ + col="$$red"; \ fi; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes$$std"; \ + echo "$${col}$$dashes$${std}"; \ + echo "$${col}$$banner$${std}"; \ + test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ + test -z "$$report" || echo "$${col}$$report$${std}"; \ + echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi @@ -1565,10 +1600,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) diff --git a/amar-src/amar-test.c b/amar-src/amar-test.c index 21e8673..ae5e4ce 100644 --- a/amar-src/amar-test.c +++ b/amar-src/amar-test.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/amar-src/amar.c b/amar-src/amar.c index f237fe5..76650a3 100644 --- a/amar-src/amar.c +++ b/amar-src/amar.c @@ -1,9 +1,10 @@ /* * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/amar-src/amar.h b/amar-src/amar.h index 9ba1c7c..051cbfa 100644 --- a/amar-src/amar.h +++ b/amar-src/amar.h @@ -1,9 +1,10 @@ /* * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/amar-src/amarchiver.c b/amar-src/amarchiver.c index 71821e7..481f911 100644 --- a/amar-src/amarchiver.c +++ b/amar-src/amarchiver.c @@ -1,9 +1,10 @@ /* * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -37,6 +38,7 @@ usage(void) { printf("Usage: amarchiver [--version|--create|--list|--extract] [--verbose]* [--file file]\n"); printf(" [filename]*\n"); + exit(1); } static void @@ -340,12 +342,6 @@ int main( g_fprintf(stderr,"Only one of --create, --list or --extract must be provided\n"); usage(); } - if (opt_list > 1) { - if (argc) { - g_fprintf(stderr, "--list does not take any additional filenames\n"); - usage(); - } - } if (opt_create > 0) do_create(opt_file, opt_verbose, argc, argv); diff --git a/amplot/Makefile.in b/amplot/Makefile.in index 914cd1c..22a0815 100644 --- a/amplot/Makefile.in +++ b/amplot/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -20,9 +20,10 @@ # vim:ft=automake # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -42,9 +43,10 @@ # vim:ft=automake # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -163,6 +165,23 @@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -366,10 +385,21 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(amplotdir)" SCRIPTS = $(sbin_SCRIPTS) SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac DATA = $(amplot_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ @@ -1256,6 +1286,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; +$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/scripts.am $(top_srcdir)/config/automake/installperms.am $(top_srcdir)/config/automake/precompile.am: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -1267,8 +1298,11 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-sbinSCRIPTS: $(sbin_SCRIPTS) @$(NORMAL_INSTALL) - test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ @@ -1296,9 +1330,7 @@ uninstall-sbinSCRIPTS: @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(sbindir)" && rm -f $$files + dir='$(DESTDIR)$(sbindir)'; $(am__uninstall_files_from_dir) mostlyclean-libtool: -rm -f *.lo @@ -1307,8 +1339,11 @@ clean-libtool: -rm -rf .libs _libs install-amplotDATA: $(amplot_DATA) @$(NORMAL_INSTALL) - test -z "$(amplotdir)" || $(MKDIR_P) "$(DESTDIR)$(amplotdir)" @list='$(amplot_DATA)'; test -n "$(amplotdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(amplotdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(amplotdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -1322,9 +1357,7 @@ uninstall-amplotDATA: @$(NORMAL_UNINSTALL) @list='$(amplot_DATA)'; test -n "$(amplotdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(amplotdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(amplotdir)" && rm -f $$files + dir='$(DESTDIR)$(amplotdir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: @@ -1386,10 +1419,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) diff --git a/amplot/amplot.awk b/amplot/amplot.awk index f385dae..48429e9 100644 --- a/amplot/amplot.awk +++ b/amplot/amplot.awk @@ -1,6 +1,7 @@ # # Amanda, The Advanced Maryland Automatic Network Disk Archiver # Copyright (c) 1992-1998, 2000 University of Maryland at College Park +# Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. # All Rights Reserved. # # Permission to use, copy, modify, distribute, and sell this software and its diff --git a/amplot/amplot.g b/amplot/amplot.g index f280144..cbe90ce 100644 --- a/amplot/amplot.g +++ b/amplot/amplot.g @@ -1,6 +1,7 @@ # # Amanda, The Advanced Maryland Automatic Network Disk Archiver # Copyright (c) 1992,1993.1994-1998 University of Maryland at College Park +# Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. # All Rights Reserved. # # Permission to use, copy, modify, distribute, and sell this software and its diff --git a/amplot/amplot.sh b/amplot/amplot.sh index fe47bcc..b8f0eb6 100644 --- a/amplot/amplot.sh +++ b/amplot/amplot.sh @@ -1,6 +1,7 @@ #!@SHELL@ # Amanda, The Advanced Maryland Automatic Network Disk Archiver # Copyright (c) 1992-1998 University of Maryland at College Park +# Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. # All Rights Reserved. # # Permission to use, copy, modify, distribute, and sell this software and its diff --git a/application-src/Makefile.in b/application-src/Makefile.in index fa34068..b7c3fdc 100644 --- a/application-src/Makefile.in +++ b/application-src/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -20,9 +20,10 @@ # vim:ft=automake # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -42,9 +43,10 @@ # vim:ft=automake # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -163,6 +165,23 @@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -390,6 +409,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } SCRIPTS = $(applicationexec_SCRIPTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config depcomp = $(SHELL) $(top_srcdir)/config/depcomp @@ -406,6 +431,11 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ $(LDFLAGS) -o $@ SOURCES = amgtar.c amstar.c teecount.c DIST_SOURCES = amgtar.c amstar.c teecount.c +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -1328,6 +1358,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; +$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/scripts.am $(top_srcdir)/config/automake/installperms.am $(top_srcdir)/config/automake/precompile.am: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -1339,8 +1370,11 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-amlibexecPROGRAMS: $(amlibexec_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(amlibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)" @list='$(amlibexec_PROGRAMS)'; test -n "$(amlibexecdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(amlibexecdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ @@ -1382,8 +1416,11 @@ clean-amlibexecPROGRAMS: rm -f $$list install-applicationexecPROGRAMS: $(applicationexec_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(applicationexecdir)" || $(MKDIR_P) "$(DESTDIR)$(applicationexecdir)" @list='$(applicationexec_PROGRAMS)'; test -n "$(applicationexecdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(applicationexecdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(applicationexecdir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ @@ -1423,19 +1460,22 @@ clean-applicationexecPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -amgtar$(EXEEXT): $(amgtar_OBJECTS) $(amgtar_DEPENDENCIES) +amgtar$(EXEEXT): $(amgtar_OBJECTS) $(amgtar_DEPENDENCIES) $(EXTRA_amgtar_DEPENDENCIES) @rm -f amgtar$(EXEEXT) $(LINK) $(amgtar_OBJECTS) $(amgtar_LDADD) $(LIBS) -amstar$(EXEEXT): $(amstar_OBJECTS) $(amstar_DEPENDENCIES) +amstar$(EXEEXT): $(amstar_OBJECTS) $(amstar_DEPENDENCIES) $(EXTRA_amstar_DEPENDENCIES) @rm -f amstar$(EXEEXT) $(LINK) $(amstar_OBJECTS) $(amstar_LDADD) $(LIBS) -teecount$(EXEEXT): $(teecount_OBJECTS) $(teecount_DEPENDENCIES) +teecount$(EXEEXT): $(teecount_OBJECTS) $(teecount_DEPENDENCIES) $(EXTRA_teecount_DEPENDENCIES) @rm -f teecount$(EXEEXT) $(LINK) $(teecount_OBJECTS) $(teecount_LDADD) $(LIBS) install-applicationexecSCRIPTS: $(applicationexec_SCRIPTS) @$(NORMAL_INSTALL) - test -z "$(applicationexecdir)" || $(MKDIR_P) "$(DESTDIR)$(applicationexecdir)" @list='$(applicationexec_SCRIPTS)'; test -n "$(applicationexecdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(applicationexecdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(applicationexecdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ @@ -1463,9 +1503,7 @@ uninstall-applicationexecSCRIPTS: @list='$(applicationexec_SCRIPTS)'; test -n "$(applicationexecdir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(applicationexecdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(applicationexecdir)" && rm -f $$files + dir='$(DESTDIR)$(applicationexecdir)'; $(am__uninstall_files_from_dir) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -1610,10 +1648,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) diff --git a/application-src/amgtar.c b/application-src/amgtar.c index 47103ad..285b05c 100644 --- a/application-src/amgtar.c +++ b/application-src/amgtar.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -361,7 +362,6 @@ main( /* parse argument */ command = argv[1]; - gnutar_listdir = stralloc(getconf_str(CNF_GNUTAR_LIST_DIR)); argument.config = NULL; argument.host = NULL; argument.message = 0; @@ -532,6 +532,10 @@ main( g_critical(_("errors processing config file")); } + if (!gnutar_listdir) { + gnutar_listdir = g_strdup(getconf_str(CNF_GNUTAR_LIST_DIR)); + } + re_table = build_re_table(init_re_table, normal_message, ignore_message, strange_message); diff --git a/application-src/amlog-script.pl b/application-src/amlog-script.pl index eaf2a6d..015e3df 100644 --- a/application-src/amlog-script.pl +++ b/application-src/amlog-script.pl @@ -1,9 +1,10 @@ #!@PERL@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/application-src/ampgsql.pl b/application-src/ampgsql.pl index 652345f..765308b 100644 --- a/application-src/ampgsql.pl +++ b/application-src/ampgsql.pl @@ -1,9 +1,10 @@ #!@PERL@ # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/application-src/amraw.pl b/application-src/amraw.pl index 1987586..2653883 100644 --- a/application-src/amraw.pl +++ b/application-src/amraw.pl @@ -1,9 +1,10 @@ #!@PERL@ # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/application-src/amsamba.pl b/application-src/amsamba.pl index 7a6ffd8..db5c475 100644 --- a/application-src/amsamba.pl +++ b/application-src/amsamba.pl @@ -1,9 +1,10 @@ #!@PERL@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -31,6 +32,7 @@ use IPC::Open3; use Sys::Hostname; use Symbol; use IO::Handle; +use MIME::Base64 (); use Amanda::Constants; use Amanda::Config qw( :init :getconf config_dir_relative ); use Amanda::Debug qw( :logging ); @@ -298,6 +300,10 @@ sub findpass { $self->{domain} = $domain if defined $domain && $domain ne ""; my ($username, $password) = split('%', $userpasswd, 2); $self->{username} = $username; + if ($password =~ /^6G\!dr(.*)/) { + my $base64 = $1; + $password = MIME::Base64::decode($base64); + } $self->{password} = $password; $self->{password} = undef if (defined $password && $password eq ""); } else { @@ -347,7 +353,8 @@ sub command_support { sub command_selfcheck { my $self = shift; - $self->print_to_server("disk " . quote_string($self->{disk})); + $self->print_to_server("disk " . quote_string($self->{disk}), + $Amanda::Script_App::GOOD); $self->print_to_server("amsamba version " . $Amanda::Constants::VERSION, $Amanda::Script_App::GOOD); diff --git a/application-src/amstar.c b/application-src/amstar.c index c351d2c..c208321 100644 --- a/application-src/amstar.c +++ b/application-src/amstar.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/application-src/amsuntar.pl b/application-src/amsuntar.pl index 96917d1..6cf0cf1 100755 --- a/application-src/amsuntar.pl +++ b/application-src/amsuntar.pl @@ -1,9 +1,10 @@ #!@PERL@ # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/application-src/amzfs-sendrecv.pl b/application-src/amzfs-sendrecv.pl index 7e6b457..a1ff832 100644 --- a/application-src/amzfs-sendrecv.pl +++ b/application-src/amzfs-sendrecv.pl @@ -1,9 +1,10 @@ #!@PERL@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/application-src/amzfs-snapshot.pl b/application-src/amzfs-snapshot.pl index 9deee6c..535eeee 100644 --- a/application-src/amzfs-snapshot.pl +++ b/application-src/amzfs-snapshot.pl @@ -1,9 +1,10 @@ #!@PERL@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/application-src/script-email.pl b/application-src/script-email.pl index 14ed1ad..7bda56d 100644 --- a/application-src/script-email.pl +++ b/application-src/script-email.pl @@ -1,9 +1,10 @@ #!@PERL@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/application-src/teecount.c b/application-src/teecount.c index fc0c4c0..335e153 100644 --- a/application-src/teecount.c +++ b/application-src/teecount.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/changer-src/Makefile.in b/changer-src/Makefile.in index 226ff6e..25323b2 100644 --- a/changer-src/Makefile.in +++ b/changer-src/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -20,9 +20,10 @@ # vim:ft=automake # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -42,9 +43,10 @@ # vim:ft=automake # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -161,6 +163,23 @@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -363,11 +382,22 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(amlibexecdir)" \ "$(DESTDIR)$(amlibexecdir)" SCRIPTS = $(amlibexec_SCRIPTS) SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac DATA = $(amlibexec_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ @@ -1260,6 +1290,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; +$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/scripts.am $(top_srcdir)/config/automake/installperms.am: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -1271,8 +1302,11 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-amlibexecSCRIPTS: $(amlibexec_SCRIPTS) @$(NORMAL_INSTALL) - test -z "$(amlibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)" @list='$(amlibexec_SCRIPTS)'; test -n "$(amlibexecdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(amlibexecdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ @@ -1300,9 +1334,7 @@ uninstall-amlibexecSCRIPTS: @list='$(amlibexec_SCRIPTS)'; test -n "$(amlibexecdir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(amlibexecdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(amlibexecdir)" && rm -f $$files + dir='$(DESTDIR)$(amlibexecdir)'; $(am__uninstall_files_from_dir) mostlyclean-libtool: -rm -f *.lo @@ -1311,8 +1343,11 @@ clean-libtool: -rm -rf .libs _libs install-amlibexecDATA: $(amlibexec_DATA) @$(NORMAL_INSTALL) - test -z "$(amlibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)" @list='$(amlibexec_DATA)'; test -n "$(amlibexecdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(amlibexecdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -1326,9 +1361,7 @@ uninstall-amlibexecDATA: @$(NORMAL_UNINSTALL) @list='$(amlibexec_DATA)'; test -n "$(amlibexecdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(amlibexecdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(amlibexecdir)" && rm -f $$files + dir='$(DESTDIR)$(amlibexecdir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: @@ -1390,10 +1423,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) diff --git a/changer-src/chg-disk.sh b/changer-src/chg-disk.sh index d87a317..d8489d8 100644 --- a/changer-src/chg-disk.sh +++ b/changer-src/chg-disk.sh @@ -2,6 +2,7 @@ # # Amanda, The Advanced Maryland Automatic Network Disk Archiver # Copyright (c) 1991-1999 University of Maryland at College Park +# Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. # All Rights Reserved. # # Permission to use, copy, modify, distribute, and sell this software and its diff --git a/changer-src/chg-multi.sh b/changer-src/chg-multi.sh index 19ffb41..f3ca6c7 100644 --- a/changer-src/chg-multi.sh +++ b/changer-src/chg-multi.sh @@ -2,6 +2,7 @@ # # Amanda, The Advanced Maryland Automatic Network Disk Archiver # Copyright (c) 1991-1999 University of Maryland at College Park +# Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. # All Rights Reserved. # # Permission to use, copy, modify, distribute, and sell this software and its diff --git a/client-src/Makefile.in b/client-src/Makefile.in index aff1a68..7e3ce88 100644 --- a/client-src/Makefile.in +++ b/client-src/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -20,9 +20,10 @@ # vim:ft=automake # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -42,9 +43,10 @@ # vim:ft=automake # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -165,6 +167,23 @@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -374,6 +393,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(amlibdir)" "$(DESTDIR)$(amlibexecdir)" \ "$(DESTDIR)$(amlibexecdir)" "$(DESTDIR)$(sbindir)" LTLIBRARIES = $(amlib_LTLIBRARIES) @@ -464,6 +489,11 @@ SOURCES = $(libamclient_la_SOURCES) calcsize.c $(getfsent_SOURCES) \ DIST_SOURCES = $(am__libamclient_la_SOURCES_DIST) calcsize.c \ $(getfsent_SOURCES) killpgrp.c noop.c rundump.c runtar.c \ selfcheck.c $(sendbackup_SOURCES) sendsize.c +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags @@ -1393,6 +1423,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; +$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/scripts.am $(top_srcdir)/config/automake/installperms.am $(top_srcdir)/config/automake/precompile.am: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -1404,7 +1435,6 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-amlibLTLIBRARIES: $(amlib_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(amlibdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibdir)" @list='$(amlib_LTLIBRARIES)'; test -n "$(amlibdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -1412,6 +1442,8 @@ install-amlibLTLIBRARIES: $(amlib_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(amlibdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(amlibdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(amlibdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(amlibdir)"; \ } @@ -1433,12 +1465,15 @@ clean-amlibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libamclient.la: $(libamclient_la_OBJECTS) $(libamclient_la_DEPENDENCIES) +libamclient.la: $(libamclient_la_OBJECTS) $(libamclient_la_DEPENDENCIES) $(EXTRA_libamclient_la_DEPENDENCIES) $(libamclient_la_LINK) -rpath $(amlibdir) $(libamclient_la_OBJECTS) $(libamclient_la_LIBADD) $(LIBS) install-amlibexecPROGRAMS: $(amlibexec_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(amlibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)" @list='$(amlibexec_PROGRAMS)'; test -n "$(amlibexecdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(amlibexecdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ @@ -1478,37 +1513,40 @@ clean-amlibexecPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -calcsize$(EXEEXT): $(calcsize_OBJECTS) $(calcsize_DEPENDENCIES) +calcsize$(EXEEXT): $(calcsize_OBJECTS) $(calcsize_DEPENDENCIES) $(EXTRA_calcsize_DEPENDENCIES) @rm -f calcsize$(EXEEXT) $(LINK) $(calcsize_OBJECTS) $(calcsize_LDADD) $(LIBS) -getfsent$(EXEEXT): $(getfsent_OBJECTS) $(getfsent_DEPENDENCIES) +getfsent$(EXEEXT): $(getfsent_OBJECTS) $(getfsent_DEPENDENCIES) $(EXTRA_getfsent_DEPENDENCIES) @rm -f getfsent$(EXEEXT) $(LINK) $(getfsent_OBJECTS) $(getfsent_LDADD) $(LIBS) -killpgrp$(EXEEXT): $(killpgrp_OBJECTS) $(killpgrp_DEPENDENCIES) +killpgrp$(EXEEXT): $(killpgrp_OBJECTS) $(killpgrp_DEPENDENCIES) $(EXTRA_killpgrp_DEPENDENCIES) @rm -f killpgrp$(EXEEXT) $(LINK) $(killpgrp_OBJECTS) $(killpgrp_LDADD) $(LIBS) -noop$(EXEEXT): $(noop_OBJECTS) $(noop_DEPENDENCIES) +noop$(EXEEXT): $(noop_OBJECTS) $(noop_DEPENDENCIES) $(EXTRA_noop_DEPENDENCIES) @rm -f noop$(EXEEXT) $(LINK) $(noop_OBJECTS) $(noop_LDADD) $(LIBS) -rundump$(EXEEXT): $(rundump_OBJECTS) $(rundump_DEPENDENCIES) +rundump$(EXEEXT): $(rundump_OBJECTS) $(rundump_DEPENDENCIES) $(EXTRA_rundump_DEPENDENCIES) @rm -f rundump$(EXEEXT) $(LINK) $(rundump_OBJECTS) $(rundump_LDADD) $(LIBS) -runtar$(EXEEXT): $(runtar_OBJECTS) $(runtar_DEPENDENCIES) +runtar$(EXEEXT): $(runtar_OBJECTS) $(runtar_DEPENDENCIES) $(EXTRA_runtar_DEPENDENCIES) @rm -f runtar$(EXEEXT) $(LINK) $(runtar_OBJECTS) $(runtar_LDADD) $(LIBS) -selfcheck$(EXEEXT): $(selfcheck_OBJECTS) $(selfcheck_DEPENDENCIES) +selfcheck$(EXEEXT): $(selfcheck_OBJECTS) $(selfcheck_DEPENDENCIES) $(EXTRA_selfcheck_DEPENDENCIES) @rm -f selfcheck$(EXEEXT) $(LINK) $(selfcheck_OBJECTS) $(selfcheck_LDADD) $(LIBS) -sendbackup$(EXEEXT): $(sendbackup_OBJECTS) $(sendbackup_DEPENDENCIES) +sendbackup$(EXEEXT): $(sendbackup_OBJECTS) $(sendbackup_DEPENDENCIES) $(EXTRA_sendbackup_DEPENDENCIES) @rm -f sendbackup$(EXEEXT) $(LINK) $(sendbackup_OBJECTS) $(sendbackup_LDADD) $(LIBS) -sendsize$(EXEEXT): $(sendsize_OBJECTS) $(sendsize_DEPENDENCIES) +sendsize$(EXEEXT): $(sendsize_OBJECTS) $(sendsize_DEPENDENCIES) $(EXTRA_sendsize_DEPENDENCIES) @rm -f sendsize$(EXEEXT) $(LINK) $(sendsize_OBJECTS) $(sendsize_LDADD) $(LIBS) install-amlibexecSCRIPTS: $(amlibexec_SCRIPTS) @$(NORMAL_INSTALL) - test -z "$(amlibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)" @list='$(amlibexec_SCRIPTS)'; test -n "$(amlibexecdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(amlibexecdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ @@ -1536,13 +1574,14 @@ uninstall-amlibexecSCRIPTS: @list='$(amlibexec_SCRIPTS)'; test -n "$(amlibexecdir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(amlibexecdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(amlibexecdir)" && rm -f $$files + dir='$(DESTDIR)$(amlibexecdir)'; $(am__uninstall_files_from_dir) install-sbinSCRIPTS: $(sbin_SCRIPTS) @$(NORMAL_INSTALL) - test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ @@ -1570,9 +1609,7 @@ uninstall-sbinSCRIPTS: @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(sbindir)" && rm -f $$files + dir='$(DESTDIR)$(sbindir)'; $(am__uninstall_files_from_dir) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -1730,10 +1767,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) diff --git a/client-src/amandates.c b/client-src/amandates.c index c16b246..f7a3c64 100644 --- a/client-src/amandates.c +++ b/client-src/amandates.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/client-src/amandates.h b/client-src/amandates.h index ff95de9..e245c91 100644 --- a/client-src/amandates.h +++ b/client-src/amandates.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/client-src/amdump_client.pl b/client-src/amdump_client.pl index f0fd0bb..4320e09 100644 --- a/client-src/amdump_client.pl +++ b/client-src/amdump_client.pl @@ -1,9 +1,10 @@ #! @PERL@ # Copyright (c) 2010-2012 Zmanda Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/client-src/calcsize.c b/client-src/calcsize.c index 9b23647..08e8d05 100644 --- a/client-src/calcsize.c +++ b/client-src/calcsize.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/client-src/client_util.c b/client-src/client_util.c index 27694a6..bbd94b5 100644 --- a/client-src/client_util.c +++ b/client-src/client_util.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -1258,6 +1259,7 @@ run_client_script( } void run_client_script_output(gpointer data, gpointer user_data); +void run_client_script_output_backup(gpointer data, gpointer user_data); void run_client_script_err_amcheck(gpointer data, gpointer user_data); void run_client_script_err_estimate(gpointer data, gpointer user_data); void run_client_script_err_backup(gpointer data, gpointer user_data); @@ -1281,6 +1283,19 @@ run_client_script_output( } } +void +run_client_script_output_backup( + gpointer data, + gpointer user_data) +{ + char *line = data; + script_output_t *so = user_data; + + if (line && so->stream) { + g_fprintf(so->stream, "| %s\n", line); + } +} + void run_client_script_err_amcheck( gpointer data, @@ -1345,31 +1360,27 @@ run_client_scripts( GSList *scriptlist; script_t *script; GFunc client_script_err = NULL; + GFunc client_script_out = NULL; script_output_t so = { streamout, dle }; for (scriptlist = dle->scriptlist; scriptlist != NULL; scriptlist = scriptlist->next) { script = (script_t *)scriptlist->data; run_client_script(script, execute_on, g_options, dle); - if (script->result && script->result->output) { - g_ptr_array_foreach(script->result->output, - run_client_script_output, - &so); - g_ptr_array_free(script->result->output, TRUE); - script->result->output = NULL; - } - if (script->result && script->result->err) { + if (script->result) { switch (execute_on) { case EXECUTE_ON_PRE_DLE_AMCHECK: case EXECUTE_ON_PRE_HOST_AMCHECK: case EXECUTE_ON_POST_DLE_AMCHECK: case EXECUTE_ON_POST_HOST_AMCHECK: + client_script_out = run_client_script_output; client_script_err = run_client_script_err_amcheck; break; case EXECUTE_ON_PRE_DLE_ESTIMATE: case EXECUTE_ON_PRE_HOST_ESTIMATE: case EXECUTE_ON_POST_DLE_ESTIMATE: case EXECUTE_ON_POST_HOST_ESTIMATE: + client_script_out = run_client_script_output; if (am_has_feature(g_options->features, fe_sendsize_rep_warning)) { client_script_err = run_client_script_err_estimate; @@ -1379,6 +1390,7 @@ run_client_scripts( case EXECUTE_ON_PRE_HOST_BACKUP: case EXECUTE_ON_POST_DLE_BACKUP: case EXECUTE_ON_POST_HOST_BACKUP: + client_script_out = run_client_script_output_backup; client_script_err = run_client_script_err_backup; break; case EXECUTE_ON_PRE_RECOVER: @@ -1386,15 +1398,27 @@ run_client_scripts( case EXECUTE_ON_PRE_LEVEL_RECOVER: case EXECUTE_ON_POST_LEVEL_RECOVER: case EXECUTE_ON_INTER_LEVEL_RECOVER: + client_script_out = run_client_script_output; client_script_err = run_client_script_err_recover; } - if (client_script_err != NULL) { - g_ptr_array_foreach(script->result->err, - client_script_err, - &so); + if (script->result->output) { + if (client_script_out) { + g_ptr_array_foreach(script->result->output, + client_script_out, + &so); + } + g_ptr_array_free(script->result->output, TRUE); + script->result->output = NULL; + } + if (script->result->err) { + if (client_script_err != NULL) { + g_ptr_array_foreach(script->result->err, + client_script_err, + &so); + } + g_ptr_array_free(script->result->err, TRUE); + script->result->err = NULL; } - g_ptr_array_free(script->result->err, TRUE); - script->result->err = NULL; } } } diff --git a/client-src/client_util.h b/client-src/client_util.h index b714d8c..eae215c 100644 --- a/client-src/client_util.h +++ b/client-src/client_util.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/client-src/findpass.c b/client-src/findpass.c index d33e64f..37c358b 100644 --- a/client-src/findpass.c +++ b/client-src/findpass.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/client-src/findpass.h b/client-src/findpass.h index 3b5b907..367e4fd 100644 --- a/client-src/findpass.h +++ b/client-src/findpass.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/client-src/getfsent.c b/client-src/getfsent.c index 473868c..2c8a7e1 100644 --- a/client-src/getfsent.c +++ b/client-src/getfsent.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998, 2001 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/client-src/getfsent.h b/client-src/getfsent.h index 6b857bf..d4f7721 100644 --- a/client-src/getfsent.h +++ b/client-src/getfsent.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/client-src/killpgrp.c b/client-src/killpgrp.c index 49f51b7..ad257ae 100644 --- a/client-src/killpgrp.c +++ b/client-src/killpgrp.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/client-src/noop.c b/client-src/noop.c index 856fd15..76f1b26 100644 --- a/client-src/noop.c +++ b/client-src/noop.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1999 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/client-src/rundump.c b/client-src/rundump.c index ab10516..9788e97 100644 --- a/client-src/rundump.c +++ b/client-src/rundump.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/client-src/runtar.c b/client-src/runtar.c index 1ab9ab7..194a00a 100644 --- a/client-src/runtar.c +++ b/client-src/runtar.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/client-src/selfcheck.c b/client-src/selfcheck.c index 8cd7b53..7716c89 100644 --- a/client-src/selfcheck.c +++ b/client-src/selfcheck.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -1232,8 +1233,7 @@ print_platform(void) FILE *release = fopen("/etc/lsb-release", "r"); distro = "Ubuntu"; if (release) { - char *result; - while ((result = fgets(line, 1024, release))) { + while (fgets(line, 1024, release)) { if (strstr(line, "DESCRIPTION")) { platform = strchr(line, '='); if (platform) platform++; @@ -1280,8 +1280,8 @@ print_platform(void) if (result) { platform = line; } + fclose(release); } - fclose(release); } amfree(uname); } diff --git a/client-src/sendbackup-dump.c b/client-src/sendbackup-dump.c index 14fd27e..254d86b 100644 --- a/client-src/sendbackup-dump.c +++ b/client-src/sendbackup-dump.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1999 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/client-src/sendbackup-gnutar.c b/client-src/sendbackup-gnutar.c index 1aeb399..52ca5d2 100644 --- a/client-src/sendbackup-gnutar.c +++ b/client-src/sendbackup-gnutar.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1999 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/client-src/sendbackup.c b/client-src/sendbackup.c index 5b9b7e9..71f017e 100644 --- a/client-src/sendbackup.c +++ b/client-src/sendbackup.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1999 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/client-src/sendbackup.h b/client-src/sendbackup.h index 15f237d..56edd1b 100644 --- a/client-src/sendbackup.h +++ b/client-src/sendbackup.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/client-src/sendsize.c b/client-src/sendsize.c index a82637c..d005fe0 100644 --- a/client-src/sendsize.c +++ b/client-src/sendsize.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/Makefile.in b/common-src/Makefile.in index 9d35e45..f32146b 100644 --- a/common-src/Makefile.in +++ b/common-src/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -20,9 +20,10 @@ # vim:ft=automake # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -42,9 +43,10 @@ # vim:ft=automake # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -166,6 +168,23 @@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -387,6 +406,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(amlibdir)" "$(DESTDIR)$(sbindir)" \ "$(DESTDIR)$(amlibexecdir)" "$(DESTDIR)$(sbindir)" \ "$(DESTDIR)$(amlibexecdir)" @@ -503,6 +528,11 @@ DIST_SOURCES = $(am__libamanda_la_SOURCES_DIST) \ $(fileheader_test_SOURCES) $(genversion_SOURCES) \ $(hexencode_test_SOURCES) $(ipc_binary_test_SOURCES) \ $(match_test_SOURCES) $(quoting_test_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac DATA = $(amlibexec_DATA) HEADERS = $(noinst_HEADERS) ETAGS = etags @@ -1547,6 +1577,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; +$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/scripts.am $(top_srcdir)/config/automake/installperms.am $(top_srcdir)/config/automake/precompile.am: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -1558,7 +1589,6 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-amlibLTLIBRARIES: $(amlib_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(amlibdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibdir)" @list='$(amlib_LTLIBRARIES)'; test -n "$(amlibdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -1566,6 +1596,8 @@ install-amlibLTLIBRARIES: $(amlib_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(amlibdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(amlibdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(amlibdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(amlibdir)"; \ } @@ -1596,9 +1628,9 @@ clean-noinstLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libamanda.la: $(libamanda_la_OBJECTS) $(libamanda_la_DEPENDENCIES) +libamanda.la: $(libamanda_la_OBJECTS) $(libamanda_la_DEPENDENCIES) $(EXTRA_libamanda_la_DEPENDENCIES) $(libamanda_la_LINK) -rpath $(amlibdir) $(libamanda_la_OBJECTS) $(libamanda_la_LIBADD) $(LIBS) -libtestutils.la: $(libtestutils_la_OBJECTS) $(libtestutils_la_DEPENDENCIES) +libtestutils.la: $(libtestutils_la_OBJECTS) $(libtestutils_la_DEPENDENCIES) $(EXTRA_libtestutils_la_DEPENDENCIES) $(LINK) $(libtestutils_la_OBJECTS) $(libtestutils_la_LIBADD) $(LIBS) clean-noinstPROGRAMS: @@ -1611,8 +1643,11 @@ clean-noinstPROGRAMS: rm -f $$list install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ @@ -1652,46 +1687,49 @@ clean-sbinPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -amflock-test$(EXEEXT): $(amflock_test_OBJECTS) $(amflock_test_DEPENDENCIES) +amflock-test$(EXEEXT): $(amflock_test_OBJECTS) $(amflock_test_DEPENDENCIES) $(EXTRA_amflock_test_DEPENDENCIES) @rm -f amflock-test$(EXEEXT) $(LINK) $(amflock_test_OBJECTS) $(amflock_test_LDADD) $(LIBS) -amsemaphore-test$(EXEEXT): $(amsemaphore_test_OBJECTS) $(amsemaphore_test_DEPENDENCIES) +amsemaphore-test$(EXEEXT): $(amsemaphore_test_OBJECTS) $(amsemaphore_test_DEPENDENCIES) $(EXTRA_amsemaphore_test_DEPENDENCIES) @rm -f amsemaphore-test$(EXEEXT) $(LINK) $(amsemaphore_test_OBJECTS) $(amsemaphore_test_LDADD) $(LIBS) -amservice$(EXEEXT): $(amservice_OBJECTS) $(amservice_DEPENDENCIES) +amservice$(EXEEXT): $(amservice_OBJECTS) $(amservice_DEPENDENCIES) $(EXTRA_amservice_DEPENDENCIES) @rm -f amservice$(EXEEXT) $(LINK) $(amservice_OBJECTS) $(amservice_LDADD) $(LIBS) -bsdsecurity$(EXEEXT): $(bsdsecurity_OBJECTS) $(bsdsecurity_DEPENDENCIES) +bsdsecurity$(EXEEXT): $(bsdsecurity_OBJECTS) $(bsdsecurity_DEPENDENCIES) $(EXTRA_bsdsecurity_DEPENDENCIES) @rm -f bsdsecurity$(EXEEXT) $(LINK) $(bsdsecurity_OBJECTS) $(bsdsecurity_LDADD) $(LIBS) -event-test$(EXEEXT): $(event_test_OBJECTS) $(event_test_DEPENDENCIES) +event-test$(EXEEXT): $(event_test_OBJECTS) $(event_test_DEPENDENCIES) $(EXTRA_event_test_DEPENDENCIES) @rm -f event-test$(EXEEXT) $(LINK) $(event_test_OBJECTS) $(event_test_LDADD) $(LIBS) -file$(EXEEXT): $(file_OBJECTS) $(file_DEPENDENCIES) +file$(EXEEXT): $(file_OBJECTS) $(file_DEPENDENCIES) $(EXTRA_file_DEPENDENCIES) @rm -f file$(EXEEXT) $(LINK) $(file_OBJECTS) $(file_LDADD) $(LIBS) -fileheader-test$(EXEEXT): $(fileheader_test_OBJECTS) $(fileheader_test_DEPENDENCIES) +fileheader-test$(EXEEXT): $(fileheader_test_OBJECTS) $(fileheader_test_DEPENDENCIES) $(EXTRA_fileheader_test_DEPENDENCIES) @rm -f fileheader-test$(EXEEXT) $(LINK) $(fileheader_test_OBJECTS) $(fileheader_test_LDADD) $(LIBS) -genversion$(EXEEXT): $(genversion_OBJECTS) $(genversion_DEPENDENCIES) +genversion$(EXEEXT): $(genversion_OBJECTS) $(genversion_DEPENDENCIES) $(EXTRA_genversion_DEPENDENCIES) @rm -f genversion$(EXEEXT) $(LINK) $(genversion_OBJECTS) $(genversion_LDADD) $(LIBS) -hexencode-test$(EXEEXT): $(hexencode_test_OBJECTS) $(hexencode_test_DEPENDENCIES) +hexencode-test$(EXEEXT): $(hexencode_test_OBJECTS) $(hexencode_test_DEPENDENCIES) $(EXTRA_hexencode_test_DEPENDENCIES) @rm -f hexencode-test$(EXEEXT) $(LINK) $(hexencode_test_OBJECTS) $(hexencode_test_LDADD) $(LIBS) -ipc-binary-test$(EXEEXT): $(ipc_binary_test_OBJECTS) $(ipc_binary_test_DEPENDENCIES) +ipc-binary-test$(EXEEXT): $(ipc_binary_test_OBJECTS) $(ipc_binary_test_DEPENDENCIES) $(EXTRA_ipc_binary_test_DEPENDENCIES) @rm -f ipc-binary-test$(EXEEXT) $(LINK) $(ipc_binary_test_OBJECTS) $(ipc_binary_test_LDADD) $(LIBS) -match-test$(EXEEXT): $(match_test_OBJECTS) $(match_test_DEPENDENCIES) +match-test$(EXEEXT): $(match_test_OBJECTS) $(match_test_DEPENDENCIES) $(EXTRA_match_test_DEPENDENCIES) @rm -f match-test$(EXEEXT) $(LINK) $(match_test_OBJECTS) $(match_test_LDADD) $(LIBS) -quoting-test$(EXEEXT): $(quoting_test_OBJECTS) $(quoting_test_DEPENDENCIES) +quoting-test$(EXEEXT): $(quoting_test_OBJECTS) $(quoting_test_DEPENDENCIES) $(EXTRA_quoting_test_DEPENDENCIES) @rm -f quoting-test$(EXEEXT) $(LINK) $(quoting_test_OBJECTS) $(quoting_test_LDADD) $(LIBS) install-amlibexecSCRIPTS: $(amlibexec_SCRIPTS) @$(NORMAL_INSTALL) - test -z "$(amlibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)" @list='$(amlibexec_SCRIPTS)'; test -n "$(amlibexecdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(amlibexecdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ @@ -1719,13 +1757,14 @@ uninstall-amlibexecSCRIPTS: @list='$(amlibexec_SCRIPTS)'; test -n "$(amlibexecdir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(amlibexecdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(amlibexecdir)" && rm -f $$files + dir='$(DESTDIR)$(amlibexecdir)'; $(am__uninstall_files_from_dir) install-sbinSCRIPTS: $(sbin_SCRIPTS) @$(NORMAL_INSTALL) - test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ @@ -1753,9 +1792,7 @@ uninstall-sbinSCRIPTS: @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(sbindir)" && rm -f $$files + dir='$(DESTDIR)$(sbindir)'; $(am__uninstall_files_from_dir) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -1845,8 +1882,11 @@ clean-libtool: -rm -rf .libs _libs install-amlibexecDATA: $(amlibexec_DATA) @$(NORMAL_INSTALL) - test -z "$(amlibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)" @list='$(amlibexec_DATA)'; test -n "$(amlibexecdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(amlibexecdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -1860,9 +1900,7 @@ uninstall-amlibexecDATA: @$(NORMAL_UNINSTALL) @list='$(amlibexec_DATA)'; test -n "$(amlibexecdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(amlibexecdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(amlibexecdir)" && rm -f $$files + dir='$(DESTDIR)$(amlibexecdir)'; $(am__uninstall_files_from_dir) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ @@ -1997,14 +2035,15 @@ check-TESTS: $(TESTS) fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ - echo "$$grn$$dashes"; \ + col="$$grn"; \ else \ - echo "$$red$$dashes"; \ + col="$$red"; \ fi; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes$$std"; \ + echo "$${col}$$dashes$${std}"; \ + echo "$${col}$$banner$${std}"; \ + test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ + test -z "$$report" || echo "$${col}$$report$${std}"; \ + echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi @@ -2063,10 +2102,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) diff --git a/common-src/alloc.c b/common-src/alloc.c index c470b9d..384d3fd 100644 --- a/common-src/alloc.c +++ b/common-src/alloc.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1999 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/am_sl.c b/common-src/am_sl.c index e20c310..92b397c 100644 --- a/common-src/am_sl.c +++ b/common-src/am_sl.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/am_sl.h b/common-src/am_sl.h index ecdd5e6..176ebd8 100644 --- a/common-src/am_sl.h +++ b/common-src/am_sl.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/amaespipe.sh b/common-src/amaespipe.sh index ac14eea..2320e4c 100755 --- a/common-src/amaespipe.sh +++ b/common-src/amaespipe.sh @@ -2,9 +2,10 @@ # # Copyright (c) 2007-2012 Zmanda Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/common-src/amanda.h b/common-src/amanda.h index 0958790..d44a765 100644 --- a/common-src/amanda.h +++ b/common-src/amanda.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1999 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/amcryptsimple.pl b/common-src/amcryptsimple.pl index dd8760f..f21db2b 100755 --- a/common-src/amcryptsimple.pl +++ b/common-src/amcryptsimple.pl @@ -2,9 +2,10 @@ # # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -77,7 +78,7 @@ sub which_gpg() { sub encrypt() { my $gpg_agent_cmd = do_gpg_agent(); my $gpg = which_gpg(); - system "$gpg_agent_cmd $gpg --batch --no-secmem-warning --disable-mdc --symmetric --cipher-algo AES256 --passphrase-fd 3 3<$AM_PASS"; + system "$gpg_agent_cmd $gpg --batch -z 0 --no-secmem-warning --disable-mdc --symmetric --cipher-algo AES256 --passphrase-fd 3 3<$AM_PASS"; if ($? == -1) { print STDERR "failed to execute gpg: $!\n"; exit (1); diff --git a/common-src/amfeatures.c b/common-src/amfeatures.c index 78bf0d4..e15667a 100644 --- a/common-src/amfeatures.c +++ b/common-src/amfeatures.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/amfeatures.h b/common-src/amfeatures.h index f0d7559..74a23ff 100644 --- a/common-src/amfeatures.h +++ b/common-src/amfeatures.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/amflock-flock.c b/common-src/amflock-flock.c index 82001c3..ddc3b1e 100644 --- a/common-src/amflock-flock.c +++ b/common-src/amflock-flock.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/amflock-lnlock.c b/common-src/amflock-lnlock.c index 142aea3..ecbd986 100644 --- a/common-src/amflock-lnlock.c +++ b/common-src/amflock-lnlock.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/amflock-lockf.c b/common-src/amflock-lockf.c index 90af1ff..88621c7 100644 --- a/common-src/amflock-lockf.c +++ b/common-src/amflock-lockf.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/amflock-posix.c b/common-src/amflock-posix.c index 4e2af7b..7679f58 100644 --- a/common-src/amflock-posix.c +++ b/common-src/amflock-posix.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/amflock-test.c b/common-src/amflock-test.c index 0e160e0..8345621 100644 --- a/common-src/amflock-test.c +++ b/common-src/amflock-test.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/amflock.c b/common-src/amflock.c index 20fad47..b3f1fc1 100644 --- a/common-src/amflock.c +++ b/common-src/amflock.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/amflock.h b/common-src/amflock.h index 649cdf2..5f917e2 100644 --- a/common-src/amflock.h +++ b/common-src/amflock.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1999 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -30,7 +31,7 @@ * New interface */ -typedef struct file_lock_ { +typedef struct file_lock { /* the entire contents of the locked file */ char *data; size_t len; diff --git a/common-src/amgetconf.pl b/common-src/amgetconf.pl index b35cf20..0a8b1a5 100644 --- a/common-src/amgetconf.pl +++ b/common-src/amgetconf.pl @@ -1,9 +1,10 @@ #! @PERL@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/common-src/amgpgcrypt.pl b/common-src/amgpgcrypt.pl index 50db13a..8795dd5 100755 --- a/common-src/amgpgcrypt.pl +++ b/common-src/amgpgcrypt.pl @@ -2,9 +2,10 @@ # # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/common-src/amsemaphore-test.c b/common-src/amsemaphore-test.c index eb4c915..4804e3c 100644 --- a/common-src/amsemaphore-test.c +++ b/common-src/amsemaphore-test.c @@ -1,9 +1,10 @@ /* * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/common-src/amsemaphore.c b/common-src/amsemaphore.c index 52cf869..638eca4 100644 --- a/common-src/amsemaphore.c +++ b/common-src/amsemaphore.c @@ -1,9 +1,10 @@ /* * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/common-src/amsemaphore.h b/common-src/amsemaphore.h index 9b7a3ac..8e226a7 100644 --- a/common-src/amsemaphore.h +++ b/common-src/amsemaphore.h @@ -1,9 +1,10 @@ /* * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/common-src/amservice.c b/common-src/amservice.c index b5346a1..8b8c50a 100644 --- a/common-src/amservice.c +++ b/common-src/amservice.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-2000 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -321,18 +322,17 @@ read_in( void *cookie G_GNUC_UNUSED) { size_t nread; - char buf[1024]; + char buf[1025]; - event_release(event_in); nread = read(0, buf, 1024); - if (nread == 0) { + if (nread <= 0) { + event_release(event_in); security_stream_close(fd); return; } buf[nread] = '\0'; security_stream_write(fd, buf, nread); - event_in = event_register((event_id_t)0, EV_READFD, read_in, NULL); } static void @@ -351,7 +351,6 @@ read_server( if (errno > 0) { g_debug("failed to write to stdout: %s", strerror(errno)); } - security_stream_read(fd, read_server, NULL); break; } } diff --git a/common-src/amxml.c b/common-src/amxml.c index 6f1e7a6..ba7f951 100644 --- a/common-src/amxml.c +++ b/common-src/amxml.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -257,6 +258,7 @@ amstart_element( g_hash_table_new_full(g_str_hash, g_str_equal, &g_free, &free_property_t); data_user->script = NULL; data_user->alevel = NULL; + data_user->dle->property = data_user->property; data_user->encoding = NULL; data_user->raw = NULL; } else if(strcmp(element_name, "disk" ) == 0 || diff --git a/common-src/amxml.h b/common-src/amxml.h index 063fb11..04d45ed 100644 --- a/common-src/amxml.h +++ b/common-src/amxml.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/arglist.h b/common-src/arglist.h index a3d572d..7628f68 100644 --- a/common-src/arglist.h +++ b/common-src/arglist.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/bsd-security.c b/common-src/bsd-security.c index 2d4304e..82348ed 100644 --- a/common-src/bsd-security.c +++ b/common-src/bsd-security.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1999 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -601,8 +602,12 @@ stream_read_sync_callback( security_stream_seterror(&bs->secstr, "%s", strerror(errno)); bs->len = n; sync_pktlen = bs->len; - sync_pkt = malloc(sync_pktlen); - memcpy(sync_pkt, bs->databuf, sync_pktlen); + if (sync_pktlen > 0) { + sync_pkt = malloc(sync_pktlen); + memcpy(sync_pkt, bs->databuf, sync_pktlen); + } else { + sync_pkt = NULL; + } } /* @@ -634,14 +639,12 @@ stream_read_callback( assert(bs != NULL); - /* - * Remove the event first, in case they reschedule it in the callback. - */ - bsd_stream_read_cancel(bs); do { n = read(bs->fd, bs->databuf, SIZEOF(bs->databuf)); } while ((n < 0) && ((errno == EINTR) || (errno == EAGAIN))); + if (n <= 0) + bsd_stream_read_cancel(bs); if (n < 0) security_stream_seterror(&bs->secstr, "%s", strerror(errno)); diff --git a/common-src/bsdudp-security.c b/common-src/bsdudp-security.c index a4715ff..fe6988f 100644 --- a/common-src/bsdudp-security.c +++ b/common-src/bsdudp-security.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1999 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/clock.c b/common-src/clock.c index 33bcaba..c495813 100644 --- a/common-src/clock.c +++ b/common-src/clock.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/clock.h b/common-src/clock.h index 764df90..0a66170 100644 --- a/common-src/clock.h +++ b/common-src/clock.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/columnar.c b/common-src/columnar.c index 8be10e6..f3fcfc8 100644 --- a/common-src/columnar.c +++ b/common-src/columnar.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-2000 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/columnar.h b/common-src/columnar.h index a9f54b8..b8f0bd5 100644 --- a/common-src/columnar.h +++ b/common-src/columnar.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-2000 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/conffile.c b/common-src/conffile.c index 4d48220..ae50db9 100644 --- a/common-src/conffile.c +++ b/common-src/conffile.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-2000 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -92,6 +93,7 @@ typedef enum { CONF_DATA_PATH, CONF_AMANDA, CONF_DIRECTTCP, CONF_TAPER_PARALLEL_WRITE, CONF_INTERACTIVITY, CONF_TAPERSCAN, CONF_MAX_DLE_BY_VOLUME, CONF_EJECT_VOLUME, CONF_TMPDIR, + CONF_REPORT_USE_MEDIA, CONF_REPORT_NEXT_MEDIA, /* execute on */ CONF_PRE_AMCHECK, CONF_POST_AMCHECK, @@ -1054,6 +1056,8 @@ keytab_t server_keytab[] = { { "RECORD", CONF_RECORD }, { "RECOVERY_LIMIT", CONF_RECOVERY_LIMIT }, { "REP_TRIES", CONF_REP_TRIES }, + { "REPORT_USE_MEDIA", CONF_REPORT_USE_MEDIA }, + { "REPORT_NEXT_MEDIA", CONF_REPORT_NEXT_MEDIA }, { "REQ_TRIES", CONF_REQ_TRIES }, { "REQUIRED", CONF_REQUIRED }, { "RESERVE", CONF_RESERVE }, @@ -1319,6 +1323,8 @@ conf_var_t server_var [] = { { CONF_RECOVERY_LIMIT , CONFTYPE_HOST_LIMIT, read_host_limit , CNF_RECOVERY_LIMIT , NULL }, { CONF_INTERACTIVITY , CONFTYPE_STR , read_dinteractivity, CNF_INTERACTIVITY , NULL }, { CONF_TAPERSCAN , CONFTYPE_STR , read_dtaperscan , CNF_TAPERSCAN , NULL }, + { CONF_REPORT_USE_MEDIA , CONFTYPE_BOOLEAN , read_bool , CNF_REPORT_USE_MEDIA , NULL }, + { CONF_REPORT_NEXT_MEDIA , CONFTYPE_BOOLEAN , read_bool , CNF_REPORT_NEXT_MEDIA , NULL }, { CONF_UNKNOWN , CONFTYPE_INT , NULL , CNF_CNF , NULL } }; @@ -4523,9 +4529,11 @@ get_multiplier( /* get multiplier, if any */ get_conftoken(CONF_ANY); - if (tok == CONF_MULT1 && unit == CONF_UNIT_K) { + if (tok == CONF_NL || tok == CONF_END) { /* no multiplier */ + val = val; + } else if (tok == CONF_MULT1 && unit == CONF_UNIT_K) { val /= 1024; - } else if (tok == CONF_NL || tok == CONF_MULT1 || + } else if (tok == CONF_MULT1 || (tok == CONF_MULT1K && unit == CONF_UNIT_K)) { val *= 1; /* multiply by one */ } else if (tok == CONF_MULT7) { @@ -5269,6 +5277,8 @@ init_defaults( conf_init_str (&conf_data[CNF_KRB5PRINCIPAL] , "service/amanda"); conf_init_str (&conf_data[CNF_LABEL_NEW_TAPES] , ""); conf_init_bool (&conf_data[CNF_EJECT_VOLUME] , 0); + conf_init_bool (&conf_data[CNF_REPORT_USE_MEDIA] , TRUE); + conf_init_bool (&conf_data[CNF_REPORT_NEXT_MEDIA] , TRUE); conf_init_str (&conf_data[CNF_TMPDIR] , ""); conf_init_bool (&conf_data[CNF_USETIMESTAMPS] , 1); conf_init_int (&conf_data[CNF_CONNECT_TRIES] , CONF_UNIT_NONE, 3); @@ -5512,6 +5522,15 @@ update_derived_values( autolabel->autolabel = AL_VOLUME_ERROR | AL_EMPTY; } } + + if (!getconf_seen(CNF_REPORT_USE_MEDIA) && + getconf_seen(CNF_MAX_DLE_BY_VOLUME)) { + conf_init_bool(&conf_data[CNF_REPORT_USE_MEDIA], FALSE); + } + if (!getconf_seen(CNF_REPORT_NEXT_MEDIA) && + getconf_seen(CNF_MAX_DLE_BY_VOLUME)) { + conf_init_bool(&conf_data[CNF_REPORT_NEXT_MEDIA], FALSE); + } } /* fill in the debug_* values */ diff --git a/common-src/conffile.h b/common-src/conffile.h index a9a6504..efb7253 100644 --- a/common-src/conffile.h +++ b/common-src/conffile.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-2000 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -497,6 +498,8 @@ typedef enum { CNF_MAX_DLE_BY_VOLUME, CNF_EJECT_VOLUME, CNF_TMPDIR, + CNF_REPORT_USE_MEDIA, + CNF_REPORT_NEXT_MEDIA, CNF_CNF /* sentinel */ } confparm_key; diff --git a/common-src/debug.c b/common-src/debug.c index 82a5664..cb3bdd5 100644 --- a/common-src/debug.c +++ b/common-src/debug.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -536,6 +537,9 @@ debug_open(char *subdir) char *s = NULL; mode_t mask; + /* create AMANDA_TMPDIR */ + make_amanda_tmpdir(); + /* set up logging while we're here */ debug_setup_logging(); diff --git a/common-src/debug.h b/common-src/debug.h index f2a79cc..6800341 100644 --- a/common-src/debug.h +++ b/common-src/debug.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1999 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/dgram.c b/common-src/dgram.c index 99ccdc5..7f04bec 100644 --- a/common-src/dgram.c +++ b/common-src/dgram.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1999 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/dgram.h b/common-src/dgram.h index 84277b8..d791b9a 100644 --- a/common-src/dgram.h +++ b/common-src/dgram.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1999 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/directtcp.h b/common-src/directtcp.h index 33c4577..6b01c38 100644 --- a/common-src/directtcp.h +++ b/common-src/directtcp.h @@ -2,9 +2,10 @@ * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/common-src/event-test.c b/common-src/event-test.c index 832147e..f9627b7 100644 --- a/common-src/event-test.c +++ b/common-src/event-test.c @@ -1,9 +1,10 @@ /* * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/common-src/event.c b/common-src/event.c index 218d638..436c85b 100644 --- a/common-src/event.c +++ b/common-src/event.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1999 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -73,7 +74,16 @@ struct event_handle { /* A list of all extant event_handle objects, used for searching for particular * events and for deleting dead events */ -GSList *all_events; +GSList *all_events = NULL; + +#if (GLIB_MAJOR_VERSION > 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 31)) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wmissing-field-initializers" +#endif +GStaticMutex event_mutex = G_STATIC_MUTEX_INIT; +#if (GLIB_MAJOR_VERSION > 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 31)) +# pragma GCC diagnostic pop +#endif /* * Utility functions @@ -118,7 +128,22 @@ event_register( void *arg) { event_handle_t *handle; - GIOCondition cond; + + handle = event_create(data, type, fn, arg); + event_activate(handle); + return handle; +} + +event_handle_t * +event_create( + event_id_t data, + event_type_t type, + event_fn_t fn, + void *arg) +{ + event_handle_t *handle; + + g_static_mutex_lock(&event_mutex); /* sanity-checking */ if ((type == EV_READFD) || (type == EV_WRITEFD)) { @@ -143,21 +168,34 @@ event_register( event_debug(1, _("event: register: %p->data=%jd, type=%s\n"), handle, handle->data, event_type2str(handle->type)); + g_static_mutex_unlock(&event_mutex); + return handle; +} + +void +event_activate( + event_handle_t *handle) +{ + GIOCondition cond; + assert(handle != NULL); + + g_static_mutex_lock(&event_mutex); + /* add to the list of events */ all_events = g_slist_prepend(all_events, (gpointer)handle); /* and set up the GSource for this event */ - switch (type) { + switch (handle->type) { case EV_READFD: case EV_WRITEFD: /* create a new source */ - if (type == EV_READFD) { + if (handle->type == EV_READFD) { cond = G_IO_IN | G_IO_HUP | G_IO_ERR; } else { cond = G_IO_OUT | G_IO_ERR; } - handle->source = new_fdsource(data, cond); + handle->source = new_fdsource(handle->data, cond); /* attach it to the default GMainLoop */ g_source_attach(handle->source, NULL); @@ -175,7 +213,7 @@ event_register( case EV_TIME: /* Glib provides a nice shortcut for timeouts. The *1000 converts * seconds to milliseconds. */ - handle->source_id = g_timeout_add(data * 1000, event_handle_callback, + handle->source_id = g_timeout_add(handle->data * 1000, event_handle_callback, (gpointer)handle); /* But it doesn't give us the source directly.. */ @@ -189,12 +227,14 @@ event_register( break; default: - error(_("Unknown event type %s"), event_type2str(type)); + error(_("Unknown event type %s"), event_type2str(handle->type)); } - return handle; + g_static_mutex_unlock(&event_mutex); + return; } + /* * Mark an event to be released. Because we may be traversing the queue * when this is called, we must wait until later to actually remove @@ -206,6 +246,7 @@ event_release( { assert(handle != NULL); + g_static_mutex_lock(&event_mutex); event_debug(1, _("event: release (mark): %p data=%jd, type=%s\n"), handle, handle->data, event_type2str(handle->type)); @@ -213,6 +254,7 @@ event_release( /* Mark it as dead and leave it for the event_loop to remove */ handle->is_dead = TRUE; + g_static_mutex_unlock(&event_mutex); } /* @@ -226,6 +268,7 @@ event_wakeup( GSList *tofire = NULL; int nwaken = 0; + g_static_mutex_lock(&event_mutex); event_debug(1, _("event: wakeup: enter (%jd)\n"), id); /* search for any and all matching events, and record them. This way @@ -243,7 +286,10 @@ event_wakeup( event_handle_t *eh = (event_handle_t *)iter->data; if (eh->type == EV_WAIT && eh->data == id && !eh->is_dead) { event_debug(1, _("A: event: wakeup triggering: %p id=%jd\n"), eh, id); + /* The lcok must be release before running the event */ + g_static_mutex_unlock(&event_mutex); fire(eh); + g_static_mutex_lock(&event_mutex); nwaken++; } } @@ -251,6 +297,7 @@ event_wakeup( /* and free the temporary list */ g_slist_free(tofire); + g_static_mutex_unlock(&event_mutex); return (nwaken); } @@ -308,15 +355,16 @@ static gboolean any_mainloop_events(void) { GSList *iter; + gboolean ret = FALSE; for (iter = all_events; iter != NULL; iter = g_slist_next(iter)) { event_handle_t *hdl = (event_handle_t *)iter->data; event_debug(2, _("list %p: %s/%jd\n"), hdl, event_type2str((hdl)->type), (hdl)->data); if (hdl->type != EV_WAIT) - return TRUE; + ret = TRUE; } - return FALSE; + return ret; } static void @@ -324,6 +372,7 @@ event_loop_wait( event_handle_t *wait_eh, int nonblock) { + g_static_mutex_lock(&event_mutex); event_debug(1, _("event: loop: enter: nonblockg=%d, eh=%p\n"), nonblock, wait_eh); /* If we're waiting for a specific event, then reset its has_fired flag */ @@ -342,8 +391,11 @@ event_loop_wait( if (!any_mainloop_events()) break; - /* Do an interation */ + /* Do an iteration */ + /* Relese the lock before running an iteration */ + g_static_mutex_unlock(&event_mutex); g_main_context_iteration(NULL, !nonblock); + g_static_mutex_lock(&event_mutex); /* If the event we've been waiting for has fired or been released, as * appropriate, we're done. See the comments for event_wait in event.h @@ -361,6 +413,7 @@ event_loop_wait( * has been released. */ flush_dead_events(NULL); + g_static_mutex_unlock(&event_mutex); } GMainLoop * diff --git a/common-src/event.h b/common-src/event.h index ed97ad9..e2059d8 100644 --- a/common-src/event.h +++ b/common-src/event.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1999 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -85,6 +86,8 @@ typedef void (*event_fn_t)(void *); * caller calling event_loop() often enough. */ event_handle_t *event_register(event_id_t, event_type_t, event_fn_t, void *); +event_handle_t *event_create(event_id_t, event_type_t, event_fn_t, void *); +void event_activate(event_handle_t *); /* * Release an event handler. diff --git a/common-src/file.c b/common-src/file.c index c5179e4..b9e9788 100644 --- a/common-src/file.c +++ b/common-src/file.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1997-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/file.h b/common-src/file.h index 98e6f2b..15b798a 100644 --- a/common-src/file.h +++ b/common-src/file.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1997-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/fileheader-test.c b/common-src/fileheader-test.c index 589f5ca..2259905 100644 --- a/common-src/fileheader-test.c +++ b/common-src/fileheader-test.c @@ -1,9 +1,10 @@ /* * Copyright (c) 2010-2012 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/common-src/fileheader.c b/common-src/fileheader.c index 381c40d..7bd5a35 100644 --- a/common-src/fileheader.c +++ b/common-src/fileheader.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1999 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/fileheader.h b/common-src/fileheader.h index edc33c8..936b7c8 100644 --- a/common-src/fileheader.h +++ b/common-src/fileheader.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1999 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/genversion.c b/common-src/genversion.c index d3c28ff..e9680b3 100644 --- a/common-src/genversion.c +++ b/common-src/genversion.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1999 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -24,7 +25,7 @@ * file named AUTHORS, in the root directory of this distribution. */ /* - * $Id: genversion.c 2031 2009-07-09 14:44:32Z djmitche $ + * $Id: genversion.c 4946 2012-10-18 11:15:16Z martinea $ * * dump the current Amanda version info */ diff --git a/common-src/glib-util.c b/common-src/glib-util.c index 9fd8ced..d0506ac 100644 --- a/common-src/glib-util.c +++ b/common-src/glib-util.c @@ -1,9 +1,10 @@ /* * Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/common-src/glib-util.h b/common-src/glib-util.h index a9b24ee..89909f5 100644 --- a/common-src/glib-util.h +++ b/common-src/glib-util.h @@ -1,9 +1,10 @@ /* * Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/common-src/hexencode-test.c b/common-src/hexencode-test.c index 4aeab43..2d19ae8 100644 --- a/common-src/hexencode-test.c +++ b/common-src/hexencode-test.c @@ -1,9 +1,10 @@ /* * 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/common-src/ipc-binary-test.c b/common-src/ipc-binary-test.c index 7361e6e..7e77d1a 100644 --- a/common-src/ipc-binary-test.c +++ b/common-src/ipc-binary-test.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/ipc-binary.c b/common-src/ipc-binary.c index 9925164..84b32a4 100644 --- a/common-src/ipc-binary.c +++ b/common-src/ipc-binary.c @@ -2,9 +2,10 @@ * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/common-src/ipc-binary.h b/common-src/ipc-binary.h index 3d8b54b..fa6d387 100644 --- a/common-src/ipc-binary.h +++ b/common-src/ipc-binary.h @@ -2,9 +2,10 @@ * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/common-src/match-test.c b/common-src/match-test.c index 30f21b2..eecf78c 100644 --- a/common-src/match-test.c +++ b/common-src/match-test.c @@ -1,9 +1,10 @@ /* * Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/common-src/match.c b/common-src/match.c index cd363e4..328097c 100644 --- a/common-src/match.c +++ b/common-src/match.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -869,6 +870,9 @@ int match_host(const char *glob, const char *host) char *lglob, *lhost; int ret; + if (*glob == '=') { + return strcmp(glob+1, host) == 0; + } lglob = g_ascii_strdown(glob, -1); lhost = g_ascii_strdown(host, -1); @@ -937,6 +941,10 @@ int match_disk(const char *glob, const char *disk) gboolean windows_share = !(strncmp(disk, "\\\\", 2) || strchr(disk, '/')); + if (*glob == '=') { + return strcmp(glob+1, disk) == 0; + } + if (windows_share) { glob2 = convert_winglob_to_unix(glob); disk2 = convert_unc_to_unix(disk); @@ -986,6 +994,10 @@ match_datestamp( goto illegal; } + if (*dateexp == '=') { + return strcmp(dateexp+1, datestamp) == 0; + } + /* strip and ignore an initial "^" */ if(dateexp[0] == '^') { strncpy(mydateexp, dateexp+1, sizeof(mydateexp)-1); @@ -1068,6 +1080,10 @@ match_level( /*NOTREACHED*/ } + if (*levelexp == '=') { + return strcmp(levelexp+1, level) == 0; + } + if(levelexp[0] == '^') { strncpy(mylevelexp, levelexp+1, strlen(levelexp)-1); mylevelexp[strlen(levelexp)-1] = '\0'; diff --git a/common-src/match.h b/common-src/match.h index 97adac0..5a2e7dd 100644 --- a/common-src/match.h +++ b/common-src/match.h @@ -1,9 +1,10 @@ /* * Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/common-src/packet.c b/common-src/packet.c index c161f95..bbeb781 100644 --- a/common-src/packet.c +++ b/common-src/packet.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1999 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/packet.h b/common-src/packet.h index cc117f6..9babbdc 100644 --- a/common-src/packet.h +++ b/common-src/packet.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1999 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/protocol.c b/common-src/protocol.c index 932cfc3..96d552d 100644 --- a/common-src/protocol.c +++ b/common-src/protocol.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1999 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/protocol.h b/common-src/protocol.h index 215d35b..228382a 100644 --- a/common-src/protocol.h +++ b/common-src/protocol.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/quoting-test.c b/common-src/quoting-test.c index 9edac6c..5469677 100644 --- a/common-src/quoting-test.c +++ b/common-src/quoting-test.c @@ -1,9 +1,10 @@ /* * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/common-src/security-util.c b/common-src/security-util.c index e3942e6..cda59ba 100644 --- a/common-src/security-util.c +++ b/common-src/security-util.c @@ -1411,7 +1411,7 @@ udp_netfd_read_callback( * If no accept handler was setup, then just return. */ if (udp->accept_fn == NULL) { - dbprintf(_("Receive packet from unknown source")); + g_debug(_("Receive packet from unknown source")); return; } @@ -1739,10 +1739,10 @@ stream_read_callback( * We remove it first because we don't want to get in their * way if they reschedule it. */ - tcpm_stream_read_cancel(rs); if (rs->rc->pktlen <= 0) { auth_debug(1, _("sec: stream_read_callback: %s\n"), rs->rc->errmsg); + tcpm_stream_read_cancel(rs); security_stream_seterror(&rs->secstr, "%s", rs->rc->errmsg); if(rs->closed_by_me == 0 && rs->closed_by_network == 0) sec_tcp_conn_put(rs->rc); @@ -1773,7 +1773,7 @@ sec_tcp_conn_read_callback( assert(cookie != NULL); - auth_debug(1, _("sec: conn_read_callback\n")); + auth_debug(1, _("sec: conn_read_callback %d %d\n"), (int)rc->event_id, rc->read); /* Read the data off the wire. If we get errors, shut down. */ rval = tcpm_recv_token(rc, rc->read, &rc->handle, &rc->errmsg, &rc->pkt, @@ -1793,6 +1793,7 @@ sec_tcp_conn_read_callback( revent); /* delete our 'accept' reference */ if (rc->accept_fn != NULL) { + (*rc->accept_fn)(NULL, NULL); if(rc->refcnt != 1) { dbprintf(_("STRANGE, rc->refcnt should be 1, it is %d\n"), rc->refcnt); diff --git a/common-src/security.c b/common-src/security.c index 183b836..6038133 100644 --- a/common-src/security.c +++ b/common-src/security.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1999 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/security.h b/common-src/security.h index 3e9bfd1..d97ad0f 100644 --- a/common-src/security.h +++ b/common-src/security.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1999 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/simpleprng.c b/common-src/simpleprng.c index c988a6d..e9cccaf 100644 --- a/common-src/simpleprng.c +++ b/common-src/simpleprng.c @@ -1,9 +1,10 @@ /* * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/common-src/simpleprng.h b/common-src/simpleprng.h index e6e5950..3aa94ac 100644 --- a/common-src/simpleprng.h +++ b/common-src/simpleprng.h @@ -1,9 +1,10 @@ /* * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/common-src/sockaddr-util.c b/common-src/sockaddr-util.c index 1cf79da..28da531 100644 --- a/common-src/sockaddr-util.c +++ b/common-src/sockaddr-util.c @@ -1,9 +1,10 @@ /* * Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/common-src/sockaddr-util.h b/common-src/sockaddr-util.h index 5277742..d9cf647 100644 --- a/common-src/sockaddr-util.h +++ b/common-src/sockaddr-util.h @@ -1,9 +1,10 @@ /* * Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/common-src/stream.c b/common-src/stream.c index d02798f..e45d27d 100644 --- a/common-src/stream.c +++ b/common-src/stream.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/stream.h b/common-src/stream.h index 0eaa4b8..ed8f006 100644 --- a/common-src/stream.h +++ b/common-src/stream.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/svn-info.h b/common-src/svn-info.h index da674f6..958fb5e 100644 --- a/common-src/svn-info.h +++ b/common-src/svn-info.h @@ -1,2 +1,2 @@ -#define BUILT_REV "4847" -#define BUILT_BRANCH "community_3_3_2" +#define BUILT_REV "5099" +#define BUILT_BRANCH "community_3_3_3" diff --git a/common-src/tapelist.c b/common-src/tapelist.c index 803ea68..929f900 100644 --- a/common-src/tapelist.c +++ b/common-src/tapelist.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/tapelist.h b/common-src/tapelist.h index c025046..97758e3 100644 --- a/common-src/tapelist.h +++ b/common-src/tapelist.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/testutils.c b/common-src/testutils.c index 3d642af..1d0a970 100644 --- a/common-src/testutils.c +++ b/common-src/testutils.c @@ -1,9 +1,10 @@ /* * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/common-src/testutils.h b/common-src/testutils.h index 288d34e..6421b95 100644 --- a/common-src/testutils.h +++ b/common-src/testutils.h @@ -1,9 +1,10 @@ /* * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/common-src/timestamp.c b/common-src/timestamp.c index 8589b9a..4699a84 100644 --- a/common-src/timestamp.c +++ b/common-src/timestamp.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1999 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/timestamp.h b/common-src/timestamp.h index 702828e..5985e99 100644 --- a/common-src/timestamp.h +++ b/common-src/timestamp.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1999 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/common-src/util.c b/common-src/util.c index eed9d98..9d5ffca 100644 --- a/common-src/util.c +++ b/common-src/util.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1999 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -1059,7 +1060,7 @@ int copy_file( { int infd, outfd; int save_errno; - size_t nb; + ssize_t nb; char buf[32768]; char *quoted; @@ -1083,7 +1084,7 @@ int copy_file( } while((nb=read(infd, &buf, SIZEOF(buf))) > 0) { - if(full_write(outfd,&buf,nb) < nb) { + if(full_write(outfd,&buf,nb) < (size_t)nb) { save_errno = errno; quoted = quote_string(dst); *errmsg = vstrallocf(_("Error writing to '%s': %s"), @@ -1678,15 +1679,44 @@ get_first_line( out = fdopen(outpipe[0],"r"); err = fdopen(errpipe[0],"r"); - output_string = agets(out); - if (!output_string) - output_string = agets(err); + if (out) { + output_string = agets(out); + fclose(out); + } - fclose(out); - fclose(err); + if (err) { + if (!output_string) + output_string = agets(err); + fclose(err); + } waitpid(pid, NULL, 0); return output_string; } +gboolean +make_amanda_tmpdir(void) +{ + struct stat stat_buf; + + if (stat(AMANDA_TMPDIR, &stat_buf) != 0) { + if (errno != ENOENT) { + g_debug("Error doing a stat of AMANDA_TMPDIR (%s): %s", AMANDA_TMPDIR, strerror(errno)); + return FALSE; + } + /* create it */ + if (mkdir(AMANDA_TMPDIR,0700) != 0) { + g_debug("Error mkdir of AMANDA_TMPDIR (%s): %s", AMANDA_TMPDIR, strerror(errno)); + return FALSE; + } + if (chown(AMANDA_TMPDIR, (int)get_client_uid(), (int)get_client_gid()) < 0) { + g_debug("Error chown of AMANDA_TMPDIR (%s): %s", AMANDA_TMPDIR, strerror(errno)); + return FALSE; + } + return TRUE; + } else { + /* check permission */ + return TRUE; + } +} diff --git a/common-src/util.h b/common-src/util.h index fe951b5..0e35bb8 100644 --- a/common-src/util.h +++ b/common-src/util.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1999 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -393,4 +394,7 @@ void debug_executing(GPtrArray *argv_ptr); /* execute the program and get the first line from stdout ot stderr */ char *get_first_line(GPtrArray *argv_ptr); + +gboolean make_amanda_tmpdir(void); + #endif /* UTIL_H */ diff --git a/common-src/version.h b/common-src/version.h index 20aada0..33453f0 100644 --- a/common-src/version.h +++ b/common-src/version.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1999 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/config/Makefile.in b/config/Makefile.in index de1f943..ed9d2e4 100644 --- a/config/Makefile.in +++ b/config/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,6 +15,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -199,6 +216,11 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AIX_BACKUP = @AIX_BACKUP@ @@ -1100,6 +1122,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; +$(srcdir)/amanda/file-list $(srcdir)/gettext-macros/file-list $(srcdir)/gnulib/file-list $(srcdir)/macro-archive/file-list $(srcdir)/automake/file-list: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -1111,10 +1134,8 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ - else :; fi + @if test ! -f $@; then rm -f stamp-h1; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -1183,10 +1204,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/config/amanda/flags.m4 b/config/amanda/flags.m4 index c7e3b05..ad1f03c 100644 --- a/config/amanda/flags.m4 +++ b/config/amanda/flags.m4 @@ -176,7 +176,7 @@ AC_DEFUN([AMANDA_SWIG_ERROR], [ case "$enableval" in "" | y | ye | yes) - AMANDA_SWIG_PERL_CFLAGS=-Werror + AMANDA_SWIG_PERL_CFLAGS=-Werror -Wno-deprecated-declarations ;; *n | no) AMANDA_SWIG_PERL_CFLAGS= diff --git a/config/amanda/libs.m4 b/config/amanda/libs.m4 index e6acb04..50b7f75 100644 --- a/config/amanda/libs.m4 +++ b/config/amanda/libs.m4 @@ -147,6 +147,11 @@ AC_DEFUN([AMANDA_CHECK_GLIB], [ fi fi + # remove deprecated warning for newer version + if $PKG_CONFIG --atleast-version 2.30.0 glib-2.0; then + AMANDA_DISABLE_GCC_WARNING(deprecated-declarations) + fi + # GLIB_CPPFLAGS is not set by autoconf, yet GLIB_CFLAGS contains what GLIB_CPPFLAGS should contain. AMANDA_ADD_CPPFLAGS($GLIB_CFLAGS) AMANDA_ADD_LIBS($GLIB_LIBS) diff --git a/config/automake/scripts.am b/config/automake/scripts.am index 3997189..ab79958 100644 --- a/config/automake/scripts.am +++ b/config/automake/scripts.am @@ -1,9 +1,10 @@ # vim:ft=automake # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/config/automake/vars.am b/config/automake/vars.am index 00d24e8..6a533d3 100644 --- a/config/automake/vars.am +++ b/config/automake/vars.am @@ -1,9 +1,10 @@ # vim:ft=automake # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/config/macro-archive/docbook-dtd.m4 b/config/macro-archive/docbook-dtd.m4 index db6eae4..fa15e0c 100644 --- a/config/macro-archive/docbook-dtd.m4 +++ b/config/macro-archive/docbook-dtd.m4 @@ -34,9 +34,10 @@ # # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/config/macro-archive/docbook-xslt-min.m4 b/config/macro-archive/docbook-xslt-min.m4 index 5ac1b08..ac30b64 100644 --- a/config/macro-archive/docbook-xslt-min.m4 +++ b/config/macro-archive/docbook-xslt-min.m4 @@ -29,9 +29,10 @@ # # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/config/macro-archive/docbook-xslt.m4 b/config/macro-archive/docbook-xslt.m4 index 4c3f4df..49e2289 100644 --- a/config/macro-archive/docbook-xslt.m4 +++ b/config/macro-archive/docbook-xslt.m4 @@ -34,9 +34,10 @@ # # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/config/macro-archive/xsltproc.m4 b/config/macro-archive/xsltproc.m4 index 386a34c..c91e739 100644 --- a/config/macro-archive/xsltproc.m4 +++ b/config/macro-archive/xsltproc.m4 @@ -29,9 +29,10 @@ # # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/configure b/configure index c0e7761..9576e59 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for amanda 3.3.2. +# Generated by GNU Autoconf 2.68 for amanda 3.3.3. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='amanda' PACKAGE_TARNAME='amanda' -PACKAGE_VERSION='3.3.2' -PACKAGE_STRING='amanda 3.3.2' +PACKAGE_VERSION='3.3.3' +PACKAGE_STRING='amanda 3.3.3' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1391,6 +1391,7 @@ RANLIB am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE +am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE @@ -2149,7 +2150,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures amanda 3.3.2 to adapt to many kinds of systems. +\`configure' configures amanda 3.3.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -2219,7 +2220,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of amanda 3.3.2:";; + short | recursive ) echo "Configuration of amanda 3.3.3:";; esac cat <<\_ACEOF @@ -2495,7 +2496,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -amanda configure 3.3.2 +amanda configure 3.3.3 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -3195,7 +3196,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by amanda $as_me 3.3.2, which was +It was created by amanda $as_me 3.3.3, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -4330,7 +4331,7 @@ fi # Define the identity of the package. PACKAGE='amanda' - VERSION='3.3.2' + VERSION='3.3.3' cat >>confdefs.h <<_ACEOF @@ -4360,9 +4361,9 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. -# Always define AMTAR for backward compatibility. - -AMTAR=${AMTAR-"${am_missing_run}tar"} +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 @@ -5374,6 +5375,7 @@ fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= @@ -5398,6 +5400,7 @@ else # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -5457,7 +5460,7 @@ else break fi ;; - msvisualcpp | msvcmsys) + msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. @@ -29448,7 +29451,7 @@ if test "${enable_swig_error+set}" = set; then : enableval=$enable_swig_error; case "$enableval" in "" | y | ye | yes) - AMANDA_SWIG_PERL_CFLAGS=-Werror + AMANDA_SWIG_PERL_CFLAGS=-Werror -Wno-deprecated-declarations ;; *n | no) AMANDA_SWIG_PERL_CFLAGS= @@ -38261,6 +38264,45 @@ rm -f core conftest.err conftest.$ac_objext \ fi fi + # remove deprecated warning for newer version + if $PKG_CONFIG --atleast-version 2.30.0 glib-2.0; then + + # test for -W'warning', then add the 'no-' version. + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc flag -Wdeprecated-declarations" >&5 +$as_echo_n "checking for gcc flag -Wdeprecated-declarations... " >&6; } + if test "x$GCC" = "xyes"; then + (gcc --help={target,optimizers,warnings,undocumented,params,c} 2>&1 || + $CC -v --help 2>&1) | + $EGREP -- '[^[:alnum:]]-Wdeprecated-declarations[^[:alnum:]-]' 2>&1 > /dev/null + if test $? -eq 0; then + found_warning=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + found_warning=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + else + found_warning=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (not using gcc)" >&5 +$as_echo "no (not using gcc)" >&6; } + fi + + if test x"$found_warning" = x"yes"; then + AMANDA_WARNING_CFLAGS="$AMANDA_WARNING_CFLAGS -Wno-deprecated-declarations" + + + else + : + fi + + + fi + # GLIB_CPPFLAGS is not set by autoconf, yet GLIB_CFLAGS contains what GLIB_CPPFLAGS should contain. CPPFLAGS="$CPPFLAGS $GLIB_CFLAGS" @@ -45737,7 +45779,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by amanda $as_me 3.3.2, which was +This file was extended by amanda $as_me 3.3.3, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -45803,7 +45845,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -amanda config.status 3.3.2 +amanda config.status 3.3.3 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/device-src/Makefile.in b/device-src/Makefile.in index 1e2d68d..f69defb 100644 --- a/device-src/Makefile.in +++ b/device-src/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -20,9 +20,10 @@ # vim:ft=automake # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -42,9 +43,10 @@ # vim:ft=automake # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -116,6 +118,23 @@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -329,6 +348,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(amlibdir)" "$(DESTDIR)$(sbindir)" \ "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(amincludedir)" LTLIBRARIES = $(amlib_LTLIBRARIES) @@ -382,6 +407,11 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ SOURCES = $(libamdevice_la_SOURCES) $(activate_devpay_SOURCES) DIST_SOURCES = $(am__libamdevice_la_SOURCES_DIST) \ $(am__activate_devpay_SOURCES_DIST) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac HEADERS = $(aminclude_HEADERS) $(noinst_HEADERS) ETAGS = etags CTAGS = ctags @@ -1269,6 +1299,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; +$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/scripts.am $(top_srcdir)/config/automake/precompile.am: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -1280,7 +1311,6 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-amlibLTLIBRARIES: $(amlib_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(amlibdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibdir)" @list='$(amlib_LTLIBRARIES)'; test -n "$(amlibdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -1288,6 +1318,8 @@ install-amlibLTLIBRARIES: $(amlib_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(amlibdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(amlibdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(amlibdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(amlibdir)"; \ } @@ -1309,7 +1341,7 @@ clean-amlibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libamdevice.la: $(libamdevice_la_OBJECTS) $(libamdevice_la_DEPENDENCIES) +libamdevice.la: $(libamdevice_la_OBJECTS) $(libamdevice_la_DEPENDENCIES) $(EXTRA_libamdevice_la_DEPENDENCIES) $(libamdevice_la_LINK) -rpath $(amlibdir) $(libamdevice_la_OBJECTS) $(libamdevice_la_LIBADD) $(LIBS) clean-noinstPROGRAMS: @@ -1322,8 +1354,11 @@ clean-noinstPROGRAMS: rm -f $$list install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ @@ -1363,13 +1398,16 @@ clean-sbinPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -activate-devpay$(EXEEXT): $(activate_devpay_OBJECTS) $(activate_devpay_DEPENDENCIES) +activate-devpay$(EXEEXT): $(activate_devpay_OBJECTS) $(activate_devpay_DEPENDENCIES) $(EXTRA_activate_devpay_DEPENDENCIES) @rm -f activate-devpay$(EXEEXT) $(LINK) $(activate_devpay_OBJECTS) $(activate_devpay_LDADD) $(LIBS) install-sbinSCRIPTS: $(sbin_SCRIPTS) @$(NORMAL_INSTALL) - test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ @@ -1397,9 +1435,7 @@ uninstall-sbinSCRIPTS: @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(sbindir)" && rm -f $$files + dir='$(DESTDIR)$(sbindir)'; $(am__uninstall_files_from_dir) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -1456,8 +1492,11 @@ clean-libtool: -rm -rf .libs _libs install-amincludeHEADERS: $(aminclude_HEADERS) @$(NORMAL_INSTALL) - test -z "$(amincludedir)" || $(MKDIR_P) "$(DESTDIR)$(amincludedir)" @list='$(aminclude_HEADERS)'; test -n "$(amincludedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(amincludedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(amincludedir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -1471,9 +1510,7 @@ uninstall-amincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(aminclude_HEADERS)'; test -n "$(amincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(amincludedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(amincludedir)" && rm -f $$files + dir='$(DESTDIR)$(amincludedir)'; $(am__uninstall_files_from_dir) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ @@ -1608,14 +1645,15 @@ check-TESTS: $(TESTS) fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ - echo "$$grn$$dashes"; \ + col="$$grn"; \ else \ - echo "$$red$$dashes"; \ + col="$$red"; \ fi; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes$$std"; \ + echo "$${col}$$dashes$${std}"; \ + echo "$${col}$$banner$${std}"; \ + test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ + test -z "$$report" || echo "$${col}$$report$${std}"; \ + echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi @@ -1673,10 +1711,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) diff --git a/device-src/amdevcheck.pl b/device-src/amdevcheck.pl index 43cfa98..8047701 100644 --- a/device-src/amdevcheck.pl +++ b/device-src/amdevcheck.pl @@ -1,9 +1,10 @@ #! @PERL@ # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/device-src/amtapetype.pl b/device-src/amtapetype.pl index 8e38957..1a817b4 100644 --- a/device-src/amtapetype.pl +++ b/device-src/amtapetype.pl @@ -1,9 +1,10 @@ #! @PERL@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/device-src/device.c b/device-src/device.c index 2413dfc..6eed523 100644 --- a/device-src/device.c +++ b/device-src/device.c @@ -1,9 +1,10 @@ /* * Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -649,8 +650,8 @@ dumpfile_t * make_tapestart_header(Device * self, char * label, } else { self->volume_time = g_strdup(timestamp); } - strncpy(rval->datestamp, self->volume_time, sizeof(rval->datestamp)); - strncpy(rval->name, label, sizeof(rval->name)); + g_strlcpy(rval->datestamp, self->volume_time, sizeof(rval->datestamp)); + g_strlcpy(rval->name, label, sizeof(rval->name)); return rval; } @@ -662,7 +663,7 @@ dumpfile_t * make_tapeend_header(void) { rval = malloc(sizeof(*rval)); rval->type = F_TAPEEND; timestamp = get_timestamp_from_time(time(NULL)); - strncpy(rval->datestamp, timestamp, sizeof(rval->datestamp)); + g_strlcpy(rval->datestamp, timestamp, sizeof(rval->datestamp)); amfree(timestamp); return rval; } @@ -1413,95 +1414,60 @@ device_listen( } } -gboolean +int device_accept( Device *self, DirectTCPConnection **conn, - ProlongProc prolong, - gpointer prolong_data) -{ - DeviceClass *klass; - - klass = DEVICE_GET_CLASS(self); - if(klass->accept) { - return (klass->accept)(self, conn, prolong, prolong_data); - } else { - device_set_error(self, - stralloc(_("Unimplemented method")), - DEVICE_STATUS_DEVICE_ERROR); - return FALSE; - } -} - -gboolean -device_accept_with_cond( - Device *self, - DirectTCPConnection **conn, + int *cancelled, GMutex *abort_mutex, - GCond *abort_cond) + GCond *abort_cond) { DeviceClass *klass; klass = DEVICE_GET_CLASS(self); - if(klass->accept_with_cond) { - return (klass->accept_with_cond)(self, conn, abort_mutex, abort_cond); + if(klass->accept) { + return (klass->accept)(self, conn, cancelled, abort_mutex, abort_cond); } else { device_set_error(self, g_strdup(_("Unimplemented method")), DEVICE_STATUS_DEVICE_ERROR); - return FALSE; + return 1; } } -gboolean -device_connect( - Device *self, - gboolean for_writing, - DirectTCPAddr *addrs, - DirectTCPConnection **conn, - ProlongProc prolong, - gpointer prolong_data) -{ - DeviceClass *klass; - - klass = DEVICE_GET_CLASS(self); - if(klass->connect) { - return (klass->connect)(self, for_writing, addrs, conn, prolong, prolong_data); - } else { - device_set_error(self, - stralloc(_("Unimplemented method")), - DEVICE_STATUS_DEVICE_ERROR); - return FALSE; - } -} -gboolean -device_connect_with_cond( +int +device_connect( Device *self, gboolean for_writing, DirectTCPAddr *addrs, DirectTCPConnection **conn, + int *cancelled, GMutex *abort_mutex, - GCond *abort_cond) + GCond *abort_cond) { DeviceClass *klass; klass = DEVICE_GET_CLASS(self); if(klass->connect) { - return (klass->connect_with_cond)(self, for_writing, addrs, conn, abort_mutex, abort_cond); + return (klass->connect)(self, for_writing, addrs, conn, cancelled, + abort_mutex, abort_cond); } else { device_set_error(self, g_strdup(_("Unimplemented method")), DEVICE_STATUS_DEVICE_ERROR); - return FALSE; + return 1; } } -gboolean +int device_write_from_connection( Device *self, guint64 size, - guint64 *actual_size) + guint64 *actual_size, + int *cancelled, + GMutex *abort_mutex, + GCond *abort_cond) { DeviceClass *klass; @@ -1511,20 +1477,25 @@ device_write_from_connection( g_assert(IS_WRITABLE_ACCESS_MODE(self->access_mode)); if(klass->write_from_connection) { - return (klass->write_from_connection)(self, size, actual_size); + return (klass->write_from_connection)(self, size, actual_size, + cancelled, + abort_mutex, abort_cond); } else { device_set_error(self, stralloc(_("Unimplemented method")), DEVICE_STATUS_DEVICE_ERROR); - return FALSE; + return 1; } } -gboolean +int device_read_to_connection( Device *self, guint64 size, - guint64 *actual_size) + guint64 *actual_size, + int *cancelled, + GMutex *abort_mutex, + GCond *abort_cond) { DeviceClass *klass; @@ -1533,12 +1504,13 @@ device_read_to_connection( klass = DEVICE_GET_CLASS(self); if(klass->read_to_connection) { - return (klass->read_to_connection)(self, size, actual_size); + return (klass->read_to_connection)(self, size, actual_size, + cancelled, abort_mutex, abort_cond); } else { device_set_error(self, stralloc(_("Unimplemented method")), DEVICE_STATUS_DEVICE_ERROR); - return FALSE; + return 1; } } diff --git a/device-src/device.h b/device-src/device.h index 0945b0b..f53ca00 100644 --- a/device-src/device.h +++ b/device-src/device.h @@ -1,9 +1,10 @@ /* * Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -205,18 +206,26 @@ struct _DeviceClass { guint64 (* get_bytes_written) (Device * self); gboolean (* listen)(Device *self, gboolean for_writing, DirectTCPAddr **addrs); - gboolean (* accept)(Device *self, DirectTCPConnection **conn, - ProlongProc prolong, gpointer prolong_data); - int (* accept_with_cond)(Device *self, DirectTCPConnection **conn, - GMutex *abort_mutex, GCond *abort_cond); - gboolean (* connect)(Device *self, gboolean for_writing, DirectTCPAddr *addrs, - DirectTCPConnection **conn, ProlongProc prolong, - gpointer prolong_data); - gboolean (* connect_with_cond)(Device *self, gboolean for_writing, + /* The MainLoop must be running, but the following 4 methods must not be + * called from an event. they must be called from a different thread. + * They return: + * 0 - success + * 1 - failed + * 2 - interupted + */ + int (* accept)(Device *self, DirectTCPConnection **conn, + int *cancelled, GMutex *abort_mutex, GCond *abort_cond); + int (* connect)(Device *self, gboolean for_writing, DirectTCPAddr *addrs, DirectTCPConnection **conn, + int *cancelled, GMutex *abort_mutex, GCond *abort_cond); - gboolean (* write_from_connection)(Device *self, guint64 size, guint64 *actual_size); - gboolean (* read_to_connection)(Device *self, guint64 size, guint64 *actual_size); + int (* write_from_connection)(Device *self, guint64 size, + guint64 *actual_size, int *cancelled, + GMutex *abort_mutex, GCond *abort_cond); + int (* read_to_connection)(Device *self, guint64 size, + guint64 *actual_size, int *cancelled, + GMutex *abort_mutex, GCond *abort_cond); + gboolean (* use_connection)(Device *self, DirectTCPConnection *conn); /* array of DeviceProperty objects for this class, keyed by ID */ @@ -346,18 +355,18 @@ gboolean device_eject (Device * self); #define device_directtcp_supported(self) (DEVICE_GET_CLASS((self))->directtcp_supported) gboolean device_listen(Device *self, gboolean for_writing, DirectTCPAddr **addrs); -gboolean device_accept(Device *self, DirectTCPConnection **conn, - ProlongProc prolong, gpointer prolong_data); -int device_accept_with_cond(Device *self, DirectTCPConnection **conn, - GMutex *abort_mutex, GCond *abort_cond); -gboolean device_connect(Device *self, gboolean for_writing, DirectTCPAddr *addrs, - DirectTCPConnection **conn, ProlongProc prolong, - gpointer prolong_data); -gboolean device_connect_with_cond(Device *self, gboolean for_writing, +int device_accept(Device *self, DirectTCPConnection **conn, + int *cancelled, GMutex *abort_mutex, GCond *abort_cond); +int device_connect(Device *self, gboolean for_writing, DirectTCPAddr *addrs, DirectTCPConnection **conn, + int *cancelled, + GMutex *abort_mutex, GCond *abort_cond); +int device_write_from_connection(Device *self, guint64 size, + guint64 *actual_size, int *cancelled, + GMutex *abort_mutex, GCond *abort_cond); +int device_read_to_connection(Device *self, guint64 size, + guint64 *actual_size, int *cancelled, GMutex *abort_mutex, GCond *abort_cond); -gboolean device_write_from_connection(Device *self, guint64 size, guint64 *actual_size); -gboolean device_read_to_connection(Device *self, guint64 size, guint64 *actual_size); gboolean device_use_connection(Device *self, DirectTCPConnection *conn); /* Protected methods. Don't call these except in subclass implementations. */ diff --git a/device-src/directtcp-connection.c b/device-src/directtcp-connection.c index 442fd8a..9375f0c 100644 --- a/device-src/directtcp-connection.c +++ b/device-src/directtcp-connection.c @@ -1,9 +1,10 @@ /* * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/device-src/directtcp-connection.h b/device-src/directtcp-connection.h index 8961626..551b50f 100644 --- a/device-src/directtcp-connection.h +++ b/device-src/directtcp-connection.h @@ -1,9 +1,10 @@ /* * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -34,7 +35,7 @@ GType directtcp_connection_get_type (void); * Parent class for connections */ -typedef struct DirectTCPConnection_ { +typedef struct DirectTCPConnection { GObject __parent__; gboolean closed; @@ -59,7 +60,7 @@ typedef struct DirectTCPConnectionClass_ { * @returns: error message on error, NULL for no error (caller should * free the error message) */ - char *(* close)(struct DirectTCPConnection_ *self); + char *(* close)(struct DirectTCPConnection *self); } DirectTCPConnectionClass; /* Method Stubs */ diff --git a/device-src/dvdrw-device.c b/device-src/dvdrw-device.c index 5bc0fc1..7525bbf 100644 --- a/device-src/dvdrw-device.c +++ b/device-src/dvdrw-device.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 2009 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/device-src/ndmp-device.c b/device-src/ndmp-device.c index 865f740..d8c816a 100644 --- a/device-src/ndmp-device.c +++ b/device-src/ndmp-device.c @@ -1,9 +1,10 @@ /* * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -72,6 +73,11 @@ struct NdmpDevice_ { gchar *ndmp_auth; gboolean verbose; gsize read_block_size; + + GMutex *abort_mutex; + GCond *abort_cond; + gboolean cancel; + int *cancelled; }; /* @@ -574,8 +580,6 @@ ndmp_device_start( dumpfile_t *header; char *header_buf; - self = NDMP_DEVICE(dself); - if (device_in_error(self)) return FALSE; if (!open_tape_agent(self)) { @@ -1119,151 +1123,74 @@ listen_impl( return TRUE; } -static gboolean -accept_impl( - Device *dself, - DirectTCPConnection **dtcpconn, - ProlongProc prolong, - gpointer prolong_data) +static gpointer +accept_wait_cond( + gpointer data) { - NdmpDevice *self = NDMP_DEVICE(dself); + NdmpDevice *self = NDMP_DEVICE(data); + ndmp9_mover_state state; guint64 bytes_moved; - ndmp9_mover_mode mode; - ndmp9_mover_pause_reason reason; - guint64 seek_position; - - if (device_in_error(self)) return FALSE; - - g_assert(self->listen_addrs); - - *dtcpconn = NULL; - - /* TODO: support aborting this operation - maybe just always poll? */ - prolong = prolong; - prolong_data = prolong_data; - if (!self->for_writing) { - /* when reading, we don't get any kind of notification that the - * connection has been established, but we can't call NDMP_MOVER_READ - * until the mover is active. So we have to poll, waiting for ACTIVE. - * This is ugly. */ - gulong backoff = G_USEC_PER_SEC/20; /* 5 msec */ - while (1) { - if (!ndmp_connection_mover_get_state(self->ndmp, + gulong backoff = G_USEC_PER_SEC/20; /* 5 msec */ + g_mutex_lock(self->abort_mutex); + while (1) { + g_mutex_unlock(self->abort_mutex); + if (!ndmp_connection_mover_get_state(self->ndmp, &state, &bytes_moved, NULL, NULL)) { - set_error_from_ndmp(self); - return FALSE; - } - - if (state != NDMP9_MOVER_STATE_LISTEN) - break; - - /* back off a little bit to give the other side time to breathe, - * but not more than one second */ - g_usleep(backoff); - backoff *= 2; - if (backoff > G_USEC_PER_SEC) - backoff = G_USEC_PER_SEC; - } - - /* double-check state */ - if (state != NDMP9_MOVER_STATE_ACTIVE) { - device_set_error(DEVICE(self), - g_strdup("mover did not enter the ACTIVE state as expected"), - DEVICE_STATUS_DEVICE_ERROR); - return FALSE; - } - - /* now, we need to get this into the PAUSED state, since right now we - * aren't allowed to perform any tape movement commands. So we issue a - * MOVER_READ request for the whole darn image stream after setting the - * usual empty window. Note that this means the whole dump will be read - * in one MOVER_READ operation, even if it does not begin at the - * beginning of a part. */ - if (!ndmp_connection_mover_read(self->ndmp, 0, G_MAXUINT64)) { + g_mutex_lock(self->abort_mutex); set_error_from_ndmp(self); - return FALSE; - } - - /* now we should expect a notice that the mover has paused */ - } else { - /* when writing, the mover will pause as soon as the first byte comes - * in, so there's no need to do anything to trigger the pause. - * - * Well, sometimes it won't - specifically, when it does not allow a - * zero-byte mover window, which means we've set up IndirectTCP. But in - * that case, there's nothing interesting to do here.*/ - } - - if (self->indirecttcp_sock == -1) { - /* NDMJOB sends NDMP9_MOVER_PAUSE_SEEK to indicate that it wants to write - * outside the window, while the standard specifies .._EOW, instead. When - * reading to a connection, we get the appropriate .._SEEK. It's easy - * enough to handle both. */ - - if (!ndmp_connection_wait_for_notify(self->ndmp, - NULL, - NULL, - &reason, &seek_position)) { - set_error_from_ndmp(self); - return FALSE; - } - - if (reason != NDMP9_MOVER_PAUSE_SEEK && reason != NDMP9_MOVER_PAUSE_EOW) { - device_set_error(DEVICE(self), - g_strdup_printf("got NOTIFY_MOVER_PAUSED, but not because of EOW or SEEK"), - DEVICE_STATUS_DEVICE_ERROR); - return FALSE; + state = 0; + break; } - } + g_mutex_lock(self->abort_mutex); - /* at this point, if we're doing directtcp, the mover is paused and ready - * to go, and the listen addrs are no longer required; if we're doing - * indirecttcp, then the other end may not even know of our listen_addrs - * yet, so we can't free them. - */ + if (state != NDMP9_MOVER_STATE_LISTEN) + break; - if (self->indirecttcp_sock == -1) { - g_free(self->listen_addrs); - self->listen_addrs = NULL; + /* back off a little bit to give the other side time to breathe, + * but not more than one second */ + g_mutex_unlock(self->abort_mutex); + g_usleep(backoff); + g_mutex_lock(self->abort_mutex); + if (self->cancel) + break; + backoff *= 2; + if (backoff > G_USEC_PER_SEC) + backoff = G_USEC_PER_SEC; } - if (self->for_writing) - mode = NDMP9_MOVER_MODE_READ; - else - mode = NDMP9_MOVER_MODE_WRITE; - - /* set up the new directtcp connection */ - if (self->directtcp_conn) - g_object_unref(self->directtcp_conn); - self->directtcp_conn = - directtcp_connection_ndmp_new(self->ndmp, mode); - *dtcpconn = DIRECTTCP_CONNECTION(self->directtcp_conn); - - /* reference it for the caller */ - g_object_ref(*dtcpconn); - - return TRUE; + self->cancel = TRUE; + g_cond_broadcast(self->abort_cond); + g_mutex_unlock(self->abort_mutex); + return GINT_TO_POINTER(state); } static int -accept_with_cond_impl( +accept_impl( Device *dself, DirectTCPConnection **dtcpconn, + gboolean *cancelled, GMutex *abort_mutex, GCond *abort_cond) { NdmpDevice *self = NDMP_DEVICE(dself); ndmp9_mover_state state; - guint64 bytes_moved; ndmp9_mover_mode mode; - ndmp9_mover_pause_reason reason; + ndmp9_mover_halt_reason mover_halt_reason = NDMP9_MOVER_HALT_NA; + ndmp9_mover_pause_reason mover_pause_reason = NDMP9_MOVER_PAUSE_NA; guint64 seek_position; - int result; + GThread *wait_thread; + int result; + char *err; if (device_in_error(self)) return 1; + self->abort_mutex = abort_mutex; + self->abort_cond = abort_cond; + self->cancelled = cancelled; + self->cancel = FALSE; + g_assert(self->listen_addrs); *dtcpconn = NULL; @@ -1273,23 +1200,18 @@ accept_with_cond_impl( * connection has been established, but we can't call NDMP_MOVER_READ * until the mover is active. So we have to poll, waiting for ACTIVE. * This is ugly. */ - gulong backoff = G_USEC_PER_SEC/20; /* 5 msec */ - while (1) { - if (!ndmp_connection_mover_get_state(self->ndmp, - &state, &bytes_moved, NULL, NULL)) { - set_error_from_ndmp(self); - return 1; - } - if (state != NDMP9_MOVER_STATE_LISTEN) - break; + wait_thread = g_thread_create(accept_wait_cond, (gpointer)self, TRUE, + NULL); + while (!*cancelled && !self->cancel) { + g_cond_wait(self->abort_cond, self->abort_mutex); + } + self->cancel = TRUE; + state = GPOINTER_TO_INT(g_thread_join(wait_thread)); - /* back off a little bit to give the other side time to breathe, - * but not more than one second */ - g_usleep(backoff); - backoff *= 2; - if (backoff > G_USEC_PER_SEC) - backoff = G_USEC_PER_SEC; + if (*cancelled) { + result = 2; + goto accept_failed; } /* double-check state */ @@ -1297,7 +1219,8 @@ accept_with_cond_impl( device_set_error(DEVICE(self), g_strdup("mover did not enter the ACTIVE state as expected"), DEVICE_STATUS_DEVICE_ERROR); - return 1; + result = 1; + goto accept_failed; } /* now, we need to get this into the PAUSED state, since right now we @@ -1308,7 +1231,8 @@ accept_with_cond_impl( * beginning of a part. */ if (!ndmp_connection_mover_read(self->ndmp, 0, G_MAXUINT64)) { set_error_from_ndmp(self); - return 1; + result = 1; + goto accept_failed; } /* now we should expect a notice that the mover has paused */ @@ -1324,24 +1248,39 @@ accept_with_cond_impl( * .._SEEK. It's easy enough to handle both. */ result = ndmp_connection_wait_for_notify_with_cond(self->ndmp, NULL, - NULL, - &reason, &seek_position, + &mover_halt_reason, + &mover_pause_reason, &seek_position, + cancelled, abort_mutex, abort_cond); if (result == 1) { set_error_from_ndmp(self); - return 1; + goto accept_failed; } else if (result == 2) { - return 2; + goto accept_failed; + } + + err = NULL; + if (mover_pause_reason) { + switch (mover_pause_reason) { + case NDMP9_MOVER_PAUSE_SEEK: + case NDMP9_MOVER_PAUSE_EOW: + break; + default: + err = "got NOTIFY_MOVER_PAUSED, but not because of EOW or SEEK"; + break; + } + } else if (mover_halt_reason) { + err = "unexpected NOTIFY_MOVER_HALT"; } - if (reason != NDMP9_MOVER_PAUSE_SEEK && - reason != NDMP9_MOVER_PAUSE_EOW) { + if (err) { device_set_error(DEVICE(self), - g_strdup_printf( - "got NOTIFY_MOVER_PAUSED, but not because of EOW or SEEK"), + g_strdup_printf("waiting NDMP_MOVER_PAUSE_SEEK: %s", err), DEVICE_STATUS_DEVICE_ERROR); - return FALSE; + result = 1; + goto accept_failed; + } } @@ -1371,127 +1310,30 @@ accept_with_cond_impl( g_object_ref(*dtcpconn); return 0; -} - -static gboolean -connect_impl( - Device *dself, - gboolean for_writing, - DirectTCPAddr *addrs, - DirectTCPConnection **dtcpconn, - ProlongProc prolong, - gpointer prolong_data) -{ - NdmpDevice *self = NDMP_DEVICE(dself); - ndmp9_mover_mode mode; - ndmp9_mover_pause_reason reason; - guint64 seek_position; - - g_assert(!self->listen_addrs); - - *dtcpconn = NULL; - self->for_writing = for_writing; - - /* TODO: support aborting this operation - maybe just always poll? */ - prolong = prolong; - prolong_data = prolong_data; - - if (!open_tape_agent(self)) { - /* error message was set by open_tape_agent */ - return FALSE; - } - - /* first, set the window to an empty span so that the mover doesn't start - * reading or writing data immediately. NDMJOB tends to reset the record - * size periodically (in direct contradiction to the spec), so we reset it - * here as well. */ - if (!ndmp_connection_mover_set_record_size(self->ndmp, - DEVICE(self)->block_size)) { - set_error_from_ndmp(self); - return FALSE; - } - - if (!ndmp_connection_mover_set_window(self->ndmp, 0, 0)) { - set_error_from_ndmp(self); - return FALSE; - } - - if (self->for_writing) - mode = NDMP9_MOVER_MODE_READ; - else - mode = NDMP9_MOVER_MODE_WRITE; - if (!ndmp_connection_mover_connect(self->ndmp, mode, addrs)) { - set_error_from_ndmp(self); - return FALSE; - } - - if (!self->for_writing) { - /* The agent is in the ACTIVE state, and will remain so until we tell - * it to do something else. The thing we want to is for it to start - * reading data from the tape, which will immediately trigger an EOW or - * SEEK pause. */ - if (!ndmp_connection_mover_read(self->ndmp, 0, G_MAXUINT64)) { - set_error_from_ndmp(self); - return FALSE; - } - - /* now we should expect a notice that the mover has paused */ - } else { - /* when writing, the mover will pause as soon as the first byte comes - * in, so there's no need to do anything to trigger the pause. */ - } - - /* NDMJOB sends NDMP9_MOVER_PAUSE_SEEK to indicate that it wants to write - * outside the window, while the standard specifies .._EOW, instead. When - * reading to a connection, we get the appropriate .._SEEK. It's easy - * enough to handle both. */ - - if (!ndmp_connection_wait_for_notify(self->ndmp, - NULL, - NULL, - &reason, &seek_position)) { - set_error_from_ndmp(self); - return FALSE; - } - - if (reason != NDMP9_MOVER_PAUSE_SEEK && reason != NDMP9_MOVER_PAUSE_EOW) { - device_set_error(DEVICE(self), - g_strdup_printf("got NOTIFY_MOVER_PAUSED, but not because of EOW or SEEK"), - DEVICE_STATUS_DEVICE_ERROR); - return FALSE; - } - - if (self->listen_addrs) { - g_free(self->listen_addrs); - self->listen_addrs = NULL; +accept_failed: + if (self->indirecttcp_sock == -1) { + g_free(self->listen_addrs); + self->listen_addrs = NULL; } - - /* set up the new directtcp connection */ - if (self->directtcp_conn) - g_object_unref(self->directtcp_conn); - self->directtcp_conn = - directtcp_connection_ndmp_new(self->ndmp, mode); - *dtcpconn = DIRECTTCP_CONNECTION(self->directtcp_conn); - - /* reference it for the caller */ - g_object_ref(*dtcpconn); - - return TRUE; + return result; } -static gboolean -connect_with_cond_impl( + +static int +connect_impl( Device *dself, gboolean for_writing, DirectTCPAddr *addrs, DirectTCPConnection **dtcpconn, + int *cancelled, GMutex *abort_mutex, - GCond *abort_cond) + GCond *abort_cond) { NdmpDevice *self = NDMP_DEVICE(dself); ndmp9_mover_mode mode; - ndmp9_mover_pause_reason reason; + ndmp9_mover_halt_reason mover_halt_reason = NDMP9_MOVER_HALT_NA; + ndmp9_mover_pause_reason mover_pause_reason = NDMP9_MOVER_PAUSE_NA; guint64 seek_position; int result; @@ -1553,8 +1395,9 @@ connect_with_cond_impl( result = ndmp_connection_wait_for_notify_with_cond(self->ndmp, NULL, - NULL, - &reason, &seek_position, + &mover_halt_reason, + &mover_pause_reason, &seek_position, + cancelled, abort_mutex, abort_cond); if (result == 1) { @@ -1564,7 +1407,14 @@ connect_with_cond_impl( return 2; } - if (reason != NDMP9_MOVER_PAUSE_SEEK && reason != NDMP9_MOVER_PAUSE_EOW) { + if (mover_halt_reason != NDMP9_MOVER_HALT_NA) { + device_set_error(DEVICE(self), + g_strdup_printf("got NDMP9_MOVER_HALT"), + DEVICE_STATUS_DEVICE_ERROR); + return 1; + } + if (mover_pause_reason != NDMP9_MOVER_PAUSE_SEEK && + mover_pause_reason != NDMP9_MOVER_PAUSE_EOW) { device_set_error(DEVICE(self), g_strdup_printf("got NOTIFY_MOVER_PAUSED, but not because of EOW or SEEK"), DEVICE_STATUS_DEVICE_ERROR); @@ -1629,11 +1479,11 @@ indirecttcp_start_writing( const char *addr; char *addrspec; - addr = inet_ntop(AF_INET, &iter->sin.sin_addr.s_addr, inet, 40); + addr = inet_ntop(AF_INET, &iter->sin.sin_addr.s_addr, inet, INET_ADDRSTRLEN); addrspec = g_strdup_printf("%s:%d%s", addr, SU_GET_PORT(iter), SU_GET_FAMILY(iter+1) !=0? " ":""); - g_debug("indirecttcp_start_writing, send %s", addrspec); + g_debug("indirecttcp_start_writing, send %s", addrspec); if (full_write(conn_sock, addrspec, strlen(addrspec)) < strlen(addrspec)) { device_set_error(DEVICE(self), g_strdup_printf("writing to indirecttcp socket: %s", strerror(errno)), @@ -1665,20 +1515,24 @@ indirecttcp_start_writing( return TRUE; } -static gboolean +static int write_from_connection_impl( - Device *dself, - guint64 size, - guint64 *actual_size) + Device *dself, + guint64 size, + guint64 *actual_size, + int *cancelled, + GMutex *abort_mutex, + GCond *abort_cond) { NdmpDevice *self = NDMP_DEVICE(dself); DirectTCPConnectionNDMP *nconn = self->directtcp_conn; gboolean eom = FALSE, eof = FALSE, eow = FALSE; ndmp9_mover_state mover_state; - ndmp9_mover_halt_reason halt_reason; - ndmp9_mover_pause_reason pause_reason; + ndmp9_mover_halt_reason mover_halt_reason = NDMP9_MOVER_HALT_NA; + ndmp9_mover_pause_reason mover_pause_reason = NDMP9_MOVER_PAUSE_NA; guint64 bytes_moved_before, bytes_moved_after; gchar *err; + int result; if (device_in_error(self)) return FALSE; @@ -1694,7 +1548,7 @@ write_from_connection_impl( if (!ndmp_connection_mover_get_state(self->ndmp, &mover_state, &bytes_moved_before, NULL, NULL)) { set_error_from_ndmp(self); - return FALSE; + return 1; } if (self->indirecttcp_sock != -1) { @@ -1715,33 +1569,37 @@ write_from_connection_impl( nconn->offset, size? size : G_MAXUINT64 - nconn->offset)) { set_error_from_ndmp(self); - return FALSE; + return 1; } /* for DirectTCP, we just tell the mover to continue; IndirectTCP is more complicated. */ if (self->indirecttcp_sock != -1) { if (!indirecttcp_start_writing(self)) { - return FALSE; + return 1; } } else { if (!ndmp_connection_mover_continue(self->ndmp)) { set_error_from_ndmp(self); - return FALSE; + return 1; } } /* now wait for the mover to pause itself again, or halt on EOF or an error */ - if (!ndmp_connection_wait_for_notify(self->ndmp, - NULL, - &halt_reason, - &pause_reason, NULL)) { + result = ndmp_connection_wait_for_notify_with_cond(self->ndmp, + NULL, + &mover_halt_reason, + &mover_pause_reason, NULL, + cancelled, abort_mutex, abort_cond); + if (result == 1) { set_error_from_ndmp(self); - return FALSE; + return 1; + } else if (result == 2) { + return 2; } err = NULL; - if (pause_reason) { - switch (pause_reason) { + if (mover_pause_reason) { + switch (mover_pause_reason) { case NDMP9_MOVER_PAUSE_EOM: eom = TRUE; break; @@ -1757,8 +1615,8 @@ write_from_connection_impl( err = "got NOTIFY_MOVER_PAUSED, but not because of EOW or SEEK"; break; } - } else if (halt_reason) { - switch (halt_reason) { + } else if (mover_halt_reason) { + switch (mover_halt_reason) { case NDMP9_MOVER_HALT_CONNECT_CLOSED: eof = TRUE; break; @@ -1777,7 +1635,7 @@ write_from_connection_impl( device_set_error(DEVICE(self), g_strdup_printf("waiting for accept: %s", err), DEVICE_STATUS_DEVICE_ERROR); - return FALSE; + return 1; } /* no error, so the mover stopped due to one of EOM (volume out of space), @@ -1787,7 +1645,7 @@ write_from_connection_impl( if (!ndmp_connection_mover_get_state(self->ndmp, &mover_state, &bytes_moved_after, NULL, NULL)) { set_error_from_ndmp(self); - return FALSE; + return 1; } size = bytes_moved_after - bytes_moved_before; nconn->offset += size; @@ -1805,31 +1663,36 @@ write_from_connection_impl( * we do need to figure out the actual size */ DEVICE(self)->is_eom = TRUE; } else { + g_assert_not_reached(); error("not reached"); } - return TRUE; + return 0; } -static gboolean +static int read_to_connection_impl( Device *dself, guint64 size, - guint64 *actual_size) + guint64 *actual_size, + int *cancelled, + GMutex *abort_mutex, + GCond *abort_cond) { NdmpDevice *self = NDMP_DEVICE(dself); DirectTCPConnectionNDMP *nconn = self->directtcp_conn; gboolean eom = FALSE, eof = FALSE, eow = FALSE; ndmp9_mover_state mover_state; - ndmp9_mover_halt_reason halt_reason; - ndmp9_mover_pause_reason pause_reason; + ndmp9_mover_halt_reason mover_halt_reason = NDMP9_MOVER_HALT_NA; + ndmp9_mover_pause_reason mover_pause_reason = NDMP9_MOVER_PAUSE_NA; guint64 bytes_moved_before, bytes_moved_after; gchar *err; + int result; if (actual_size) *actual_size = 0; - if (device_in_error(self)) return FALSE; + if (device_in_error(self)) return 1; /* read_to_connection does not support IndirectTCP */ g_assert(self->indirecttcp_sock == -1); @@ -1842,7 +1705,7 @@ read_to_connection_impl( if (!ndmp_connection_mover_get_state(self->ndmp, &mover_state, &bytes_moved_before, NULL, NULL)) { set_error_from_ndmp(self); - return FALSE; + return 1; } /* the mover had best be PAUSED right now */ @@ -1852,26 +1715,30 @@ read_to_connection_impl( nconn->offset, size? size : G_MAXUINT64 - nconn->offset)) { set_error_from_ndmp(self); - return FALSE; + return 1; } if (!ndmp_connection_mover_continue(self->ndmp)) { set_error_from_ndmp(self); - return FALSE; + return 1; } /* now wait for the mover to pause itself again, or halt on EOF or an error */ - if (!ndmp_connection_wait_for_notify(self->ndmp, - NULL, - &halt_reason, - &pause_reason, NULL)) { + result = ndmp_connection_wait_for_notify_with_cond(self->ndmp, + NULL, + &mover_halt_reason, + &mover_pause_reason, NULL, + cancelled, abort_mutex, abort_cond); + if (result == 1) { set_error_from_ndmp(self); - return FALSE; + return 1; + } else if (result == 2) { + return 2; } err = NULL; - if (pause_reason) { - switch (pause_reason) { + if (mover_pause_reason) { + switch (mover_pause_reason) { case NDMP9_MOVER_PAUSE_EOF: eof = TRUE; break; @@ -1887,8 +1754,8 @@ read_to_connection_impl( err = "got NOTIFY_MOVER_PAUSED, but not because of EOW or SEEK"; break; } - } else if (halt_reason) { - switch (halt_reason) { + } else if (mover_halt_reason) { + switch (mover_halt_reason) { case NDMP9_MOVER_HALT_CONNECT_CLOSED: eof = TRUE; break; @@ -1907,7 +1774,7 @@ read_to_connection_impl( device_set_error(DEVICE(self), g_strdup_printf("waiting for accept: %s", err), DEVICE_STATUS_DEVICE_ERROR); - return FALSE; + return 1; } /* no error, so the mover stopped due to one of EOM (volume out of space), @@ -1917,7 +1784,7 @@ read_to_connection_impl( if (!ndmp_connection_mover_get_state(self->ndmp, &mover_state, &bytes_moved_after, NULL, NULL)) { set_error_from_ndmp(self); - return FALSE; + return 1; } size = bytes_moved_after - bytes_moved_before; nconn->offset += size; @@ -1935,10 +1802,11 @@ read_to_connection_impl( * we do need to figure out the actual size */ DEVICE(self)->is_eom = TRUE; } else { + g_assert_not_reached(); error("not reached"); } - return TRUE; + return 0; } static gboolean @@ -2105,10 +1973,8 @@ ndmp_device_class_init(NdmpDeviceClass * c G_GNUC_UNUSED) device_class->directtcp_supported = TRUE; device_class->listen = listen_impl; - device_class->accept = accept_impl; - device_class->accept_with_cond = accept_with_cond_impl; - device_class->connect = connect_impl; - device_class->connect_with_cond = connect_with_cond_impl; + device_class->accept= accept_impl; + device_class->connect= connect_impl; device_class->write_from_connection = write_from_connection_impl; device_class->read_to_connection = read_to_connection_impl; device_class->use_connection = use_connection_impl; @@ -2316,7 +2182,7 @@ directtcp_connection_ndmp_close(DirectTCPConnection *dself) char *rv = NULL; ndmp9_mover_state state; guint64 bytes_moved; - ndmp9_mover_halt_reason reason; + ndmp9_mover_halt_reason mover_halt_reason; gboolean expect_notif = FALSE; /* based on the current state, we may need to abort or stop the @@ -2354,7 +2220,7 @@ directtcp_connection_ndmp_close(DirectTCPConnection *dself) if (expect_notif) { if (!ndmp_connection_wait_for_notify(self->ndmp, NULL, - &reason, /* value is ignored.. */ + &mover_halt_reason, /* value is ignored.. */ NULL, NULL)) { goto error; } diff --git a/device-src/null-device.c b/device-src/null-device.c index d5f7106..0814dfb 100644 --- a/device-src/null-device.c +++ b/device-src/null-device.c @@ -1,9 +1,10 @@ /* * Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -210,7 +211,7 @@ null_device_read_label(Device * dself) { device_set_error(dself, stralloc(_("Can't open NULL device for reading or appending.")), - DEVICE_STATUS_DEVICE_ERROR); + DEVICE_STATUS_VOLUME_UNLABELED | DEVICE_STATUS_VOLUME_ERROR); return FALSE; } @@ -248,7 +249,7 @@ null_device_start (Device * pself, DeviceAccessMode mode, } else { device_set_error(pself, stralloc(_("Can't open NULL device for reading or appending.")), - DEVICE_STATUS_DEVICE_ERROR); + DEVICE_STATUS_VOLUME_UNLABELED | DEVICE_STATUS_VOLUME_ERROR); return FALSE; } } diff --git a/device-src/property.c b/device-src/property.c index c951724..2aff6db 100644 --- a/device-src/property.c +++ b/device-src/property.c @@ -1,9 +1,10 @@ /* * Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/device-src/property.h b/device-src/property.h index 15b3440..a9d9737 100644 --- a/device-src/property.h +++ b/device-src/property.h @@ -1,9 +1,10 @@ /* * Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/device-src/rait-device.c b/device-src/rait-device.c index fa17458..3acf81f 100644 --- a/device-src/rait-device.c +++ b/device-src/rait-device.c @@ -1,9 +1,10 @@ /* * Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/device-src/s3-device.c b/device-src/s3-device.c index 8c545c3..fe95ccc 100644 --- a/device-src/s3-device.c +++ b/device-src/s3-device.c @@ -1,9 +1,10 @@ /* * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -165,6 +166,10 @@ struct _S3Device { char *project_id; gboolean reuse_connection; + + /* CAStor */ + char *reps; + char *reps_bucket; }; /* @@ -311,6 +316,14 @@ static DevicePropertyBase device_property_project_id; static DevicePropertyBase device_property_create_bucket; #define PROPERTY_CREATE_BUCKET (device_property_create_bucket.ID) +/* CAStor replication values for objects and buckets */ +static DevicePropertyBase device_property_s3_reps; +#define PROPERTY_S3_REPS (device_property_s3_reps.ID) +#define S3_DEVICE_REPS_DEFAULT "2" +static DevicePropertyBase device_property_s3_reps_bucket; +#define PROPERTY_S3_REPS_BUCKET (device_property_s3_reps_bucket.ID) +#define S3_DEVICE_REPS_BUCKET_DEFAULT "4" + /* * prototypes */ @@ -559,6 +572,14 @@ static gboolean s3_device_set_project_id_fn(Device *p_self, DevicePropertyBase *base, GValue *val, PropertySurety surety, PropertySource source); +static gboolean s3_device_set_reps_fn(Device *self, + DevicePropertyBase *base, GValue *val, + PropertySurety surety, PropertySource source); + +static gboolean s3_device_set_reps_bucket_fn(Device *self, + DevicePropertyBase *base, GValue *val, + PropertySurety surety, PropertySource source); + static void s3_thread_read_block(gpointer thread_data, gpointer data); static void s3_thread_write_block(gpointer thread_data, @@ -1135,6 +1156,12 @@ s3_device_register(void) device_property_fill_and_register(&device_property_s3_multi_delete, G_TYPE_BOOLEAN, "s3_multi_delete", "Whether to use multi-delete"); + device_property_fill_and_register(&device_property_s3_reps, + G_TYPE_STRING, "reps", + "Number of replicas for data objects in CAStor"); + device_property_fill_and_register(&device_property_s3_reps_bucket, + G_TYPE_STRING, "reps_bucket", + "Number of replicas for automatically created buckets in CAStor"); /* register the device itself */ register_device(s3_device_factory, device_prefix_list); @@ -1187,6 +1214,8 @@ s3_device_init(S3Device * self) self->thread_idle_cond = NULL; self->thread_idle_mutex = NULL; self->use_s3_multi_delete = 1; + self->reps = NULL; + self->reps_bucket = NULL; /* Register property values * Note: Some aren't added until s3_device_open_device() @@ -1464,6 +1493,16 @@ s3_device_class_init(S3DeviceClass * c G_GNUC_UNUSED) PROPERTY_ACCESS_GET_MASK | PROPERTY_ACCESS_SET_BEFORE_START, device_simple_property_get_fn, s3_device_set_project_id_fn); + + device_class_register_property(device_class, PROPERTY_S3_REPS, + PROPERTY_ACCESS_GET_MASK | PROPERTY_ACCESS_SET_BEFORE_START, + device_simple_property_get_fn, + s3_device_set_reps_fn); + + device_class_register_property(device_class, PROPERTY_S3_REPS_BUCKET, + PROPERTY_ACCESS_GET_MASK | PROPERTY_ACCESS_SET_BEFORE_START, + device_simple_property_get_fn, + s3_device_set_reps_bucket_fn); } static gboolean @@ -1755,6 +1794,27 @@ s3_device_set_storage_api(Device *p_self, DevicePropertyBase *base, self->s3_api = S3_API_SWIFT_2; } else if (g_str_equal(storage_api, "OAUTH2")) { self->s3_api = S3_API_OAUTH2; + } else if (g_str_equal(storage_api, "CASTOR")) { +#if LIBCURL_VERSION_NUM >= 0x071301 + curl_version_info_data *info; + /* check the runtime version too */ + info = curl_version_info(CURLVERSION_NOW); + if (info->version_num >= 0x071301) { + self->s3_api = S3_API_CASTOR; + } else { + device_set_error(p_self, g_strdup_printf(_( + "Error setting STORAGE-API to castor " + "(You must install libcurl 7.19.1 or newer)")), + DEVICE_STATUS_DEVICE_ERROR); + return FALSE; + } +#else + device_set_error(p_self, g_strdup_printf(_( + "Error setting STORAGE-API to castor " + "This amanda is compiled with a too old libcurl, you must compile with libcurl 7.19.1 or newer")), + DEVICE_STATUS_DEVICE_ERROR); + return FALSE; +#endif } else { g_debug("Invalid STORAGE_API, using \"S3\"."); self->s3_api = S3_API_S3; @@ -2016,6 +2076,32 @@ s3_device_set_project_id_fn(Device *p_self, return device_simple_property_set_fn(p_self, base, val, surety, source); } +static gboolean +s3_device_set_reps_fn(Device *p_self, DevicePropertyBase *base, + GValue *val, PropertySurety surety, PropertySource source) +{ + S3Device *self = S3_DEVICE(p_self); + + amfree(self->reps); + self->reps = g_value_dup_string(val); + device_clear_volume_details(p_self); + + return device_simple_property_set_fn(p_self, base, val, surety, source); +} + +static gboolean +s3_device_set_reps_bucket_fn(Device *p_self, DevicePropertyBase *base, + GValue *val, PropertySurety surety, PropertySource source) +{ + S3Device *self = S3_DEVICE(p_self); + + amfree(self->reps_bucket); + self->reps_bucket = g_value_dup_string(val); + device_clear_volume_details(p_self); + + return device_simple_property_set_fn(p_self, base, val, surety, source); +} + static Device* s3_device_factory(char * device_name, char * device_type, char * device_node) { @@ -2063,6 +2149,14 @@ s3_device_open_device(Device *pself, char *device_name, return; } + if (self->reps == NULL) { + self->reps = g_strdup(S3_DEVICE_REPS_DEFAULT); + } + + if (self->reps_bucket == NULL) { + self->reps_bucket = g_strdup(S3_DEVICE_REPS_BUCKET_DEFAULT); + } + g_debug(_("S3 driver using bucket '%s', prefix '%s'"), self->bucket, self->prefix); /* default values */ @@ -2151,6 +2245,8 @@ static void s3_device_finalize(GObject * obj_self) { if(self->server_side_encryption) g_free(self->server_side_encryption); if(self->proxy) g_free(self->proxy); if(self->ca_info) g_free(self->ca_info); + if(self->reps) g_free(self->reps); + if(self->reps_bucket) g_free(self->reps_bucket); } static gboolean setup_handle(S3Device * self) { @@ -2229,7 +2325,14 @@ static gboolean setup_handle(S3Device * self) { DEVICE_STATUS_DEVICE_ERROR); return FALSE; } - } + } else if (self->s3_api == S3_API_CASTOR) { + self->use_s3_multi_delete = 0; + self->use_subdomain = FALSE; + if(self->service_path) { + g_free(self->service_path); + self->service_path = NULL; + } + } self->s3t = g_new0(S3_by_thread, self->nb_threads); if (self->s3t == NULL) { @@ -2269,7 +2372,8 @@ static gboolean setup_handle(S3Device * self) { self->client_id, self->client_secret, self->refresh_token, - self->reuse_connection); + self->reuse_connection, + self->reps, self->reps_bucket); if (self->s3t[thread].s3 == NULL) { device_set_error(d_self, stralloc(_("Internal error creating S3 handle")), diff --git a/device-src/s3-util.c b/device-src/s3-util.c index a17a506..377dea9 100644 --- a/device-src/s3-util.c +++ b/device-src/s3-util.c @@ -1,9 +1,10 @@ /* * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/device-src/s3-util.h b/device-src/s3-util.h index 5f20b88..6c1b910 100644 --- a/device-src/s3-util.h +++ b/device-src/s3-util.h @@ -1,9 +1,10 @@ /* * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/device-src/s3.c b/device-src/s3.c index a3c030b..453fabc 100644 --- a/device-src/s3.c +++ b/device-src/s3.c @@ -1,9 +1,10 @@ /* * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -186,6 +187,10 @@ struct S3Handle { char *content_type; gboolean reuse_connection; + + /* CAStor */ + char *reps; + char *reps_bucket; }; typedef struct { @@ -761,7 +766,7 @@ build_url( } /* query string */ - if (subresource || query) + if (subresource || query || (hdl->s3_api == S3_API_CASTOR && hdl->tenant_name)) g_string_append(url, "?"); if (subresource) @@ -773,6 +778,14 @@ build_url( if (query) g_string_append(url, query); + /* add CAStor tenant domain override query arg */ + if (hdl->s3_api == S3_API_CASTOR && hdl->tenant_name) { + if (subresource || query) { + g_string_append(url, "&"); + } + g_string_append_printf(url, "domain=%s", hdl->tenant_name); + } + cleanup: return g_string_free(url, FALSE); @@ -799,6 +812,7 @@ authenticate_request(S3Handle *hdl, struct curl_slist *headers = NULL; char *esc_bucket = NULL, *esc_key = NULL; GString *auth_string = NULL; + char *reps = NULL; /* From RFC 2616 */ static const char *wkday[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}; @@ -850,6 +864,23 @@ authenticate_request(S3Handle *hdl, headers = curl_slist_append(headers, buf); g_free(buf); } + } else if (hdl->s3_api == S3_API_CASTOR) { + if (g_str_equal(verb, "PUT") || g_str_equal(verb, "POST")) { + if (key) { + buf = g_strdup("CAStor-Application: Amanda"); + headers = curl_slist_append(headers, buf); + g_free(buf); + reps = g_strdup(hdl->reps); /* object replication level */ + } else { + reps = g_strdup(hdl->reps_bucket); /* bucket replication level */ + } + + /* set object replicas in lifepoint */ + buf = g_strdup_printf("lifepoint: [] reps=%s", reps); + headers = curl_slist_append(headers, buf); + g_free(buf); + g_free(reps); + } } else { /* Build the string to sign, per the S3 spec. * See: "Authenticating REST Requests" - API Version 2006-03-01 pg 58 @@ -1249,8 +1280,9 @@ interpret_response(S3Handle *hdl, curl_easy_getinfo(hdl->curl, CURLINFO_RESPONSE_CODE, &response_code); hdl->last_response_code = response_code; - /* check ETag, if present */ - if (etag && content_md5 && 200 == response_code) { + /* check ETag, if present and not CAStor */ + if (etag && content_md5 && 200 == response_code && + hdl->s3_api != S3_API_CASTOR) { if (etag && g_ascii_strcasecmp(etag, content_md5)) hdl->last_message = g_strdup("S3 Error: Possible data corruption (ETag returned by Amazon did not match the MD5 hash of the data sent)"); else @@ -1357,6 +1389,10 @@ interpret_response(S3Handle *hdl, g_free(details); g_free(body_copy); return FALSE; + } else if (hdl->s3_api == S3_API_CASTOR) { + /* The error mesage is the body */ + hdl->last_message = g_strndup(body, body_len); + return FALSE; } else if (!hdl->content_type || !g_str_equal(hdl->content_type, "application/xml")) { return FALSE; @@ -1700,7 +1736,8 @@ perform_request(S3Handle *hdl, /* Set S3Internal Data */ S3InternalData int_writedata = {{NULL, 0, 0, MAX_ERROR_RESPONSE_LEN}, NULL, NULL, NULL, FALSE, FALSE, NULL, hdl}; gboolean should_retry; - guint retries = 0; + gint retries = 0; + gint retry_after_close = 0; gulong backoff = EXPONENTIAL_BACKOFF_START_USEC; /* corresponds to PUT, HEAD, GET, and POST */ int curlopt_upload = 0, curlopt_nobody = 0, curlopt_httpget = 0, curlopt_post = 0; @@ -1898,7 +1935,7 @@ perform_request(S3Handle *hdl, } if ((curl_code = curl_easy_setopt(hdl->curl, CURLOPT_FRESH_CONNECT, - (long)(hdl->reuse_connection? 0 : 1)))) { + (long)(hdl->reuse_connection && retry_after_close == 0 ? 0 : 1)))) { goto curl_error; } if ((curl_code = curl_easy_setopt(hdl->curl, CURLOPT_FORBID_REUSE, @@ -1930,6 +1967,13 @@ perform_request(S3Handle *hdl, break; } + if (retries >= EXPONENTIAL_BACKOFF_MAX_RETRIES && + retry_after_close < 3 && + hdl->last_s3_error_code == S3_ERROR_RequestTimeout) { + retries = -1; + retry_after_close++; + g_debug("Retry on a new connection"); + } if (retries >= EXPONENTIAL_BACKOFF_MAX_RETRIES) { /* we're out of retries, so annotate hdl->last_message appropriately and bail * out. */ @@ -2079,7 +2123,7 @@ compile_regexes(void) {"[[:space:]]*([^<]*)[[:space:]]*", REG_EXTENDED | REG_ICASE, &message_regex}, {"^[a-z0-9](-*[a-z0-9]){2,62}$", REG_EXTENDED | REG_NOSUB, &subdomain_regex}, {"(/>)|(>([^<]*))", REG_EXTENDED | REG_ICASE, &location_con_regex}, - {"^Date:(.*)\r",REG_EXTENDED | REG_ICASE | REG_NEWLINE, &date_sync_regex}, + {"^Date:(.*)$",REG_EXTENDED | REG_ICASE | REG_NEWLINE, &date_sync_regex}, {"\"access_token\" : \"([^\"]*)\",", REG_EXTENDED | REG_ICASE | REG_NEWLINE, &access_token_regex}, {"\"expires_in\" : (.*)", REG_EXTENDED | REG_ICASE | REG_NEWLINE, &expires_in_regex}, {"\"details\": \"([^\"]*)\",", REG_EXTENDED | REG_ICASE | REG_NEWLINE, &details_regex}, @@ -2125,7 +2169,7 @@ compile_regexes(void) {"(/>)|(>([^<]*))", G_REGEX_CASELESS, &location_con_regex}, - {"^Date:(.*)\\r", + {"^Date:(.*)$", G_REGEX_OPTIMIZE | G_REGEX_CASELESS, &date_sync_regex}, {"\"access_token\" : \"([^\"]*)\"", @@ -2289,7 +2333,9 @@ s3_open(const char *access_key, const char *client_id, const char *client_secret, const char *refresh_token, - const gboolean reuse_connection) + const gboolean reuse_connection, + const char *reps, + const char *reps_bucket) { S3Handle *hdl; @@ -2323,6 +2369,12 @@ s3_open(const char *access_key, hdl->client_id = g_strdup(client_id); hdl->client_secret = g_strdup(client_secret); hdl->refresh_token = g_strdup(refresh_token); + } else if (s3_api == S3_API_CASTOR) { + hdl->username = g_strdup(username); + hdl->password = g_strdup(password); + hdl->tenant_name = g_strdup(tenant_name); + hdl->reps = g_strdup(reps); + hdl->reps_bucket = g_strdup(reps_bucket); } /* NULL is okay */ @@ -2372,6 +2424,29 @@ s3_open(const char *access_key, hdl->curl = curl_easy_init(); if (!hdl->curl) goto error; + /* Set HTTP handling options for CAStor */ + if (s3_api == S3_API_CASTOR) { +#if LIBCURL_VERSION_NUM >= 0x071301 + curl_version_info_data *info; + /* check the runtime version too */ + info = curl_version_info(CURLVERSION_NOW); + if (info->version_num >= 0x071301) { + curl_easy_setopt(hdl->curl, CURLOPT_FOLLOWLOCATION, 1); + curl_easy_setopt(hdl->curl, CURLOPT_UNRESTRICTED_AUTH, 1); + curl_easy_setopt(hdl->curl, CURLOPT_MAXREDIRS, 5); + curl_easy_setopt(hdl->curl, CURLOPT_POSTREDIR, CURL_REDIR_POST_ALL); + curl_easy_setopt(hdl->curl, CURLOPT_HTTP_VERSION, + CURL_HTTP_VERSION_1_1); + if (hdl->username) + curl_easy_setopt(hdl->curl, CURLOPT_USERNAME, hdl->username); + if (hdl->password) + curl_easy_setopt(hdl->curl, CURLOPT_PASSWORD, hdl->password); + curl_easy_setopt(hdl->curl, CURLOPT_HTTPAUTH, + (CURLAUTH_BASIC | CURLAUTH_DIGEST)); + } +#endif + } + return hdl; error: @@ -2585,10 +2660,17 @@ s3_upload(S3Handle *hdl, RESULT_HANDLING_ALWAYS_RETRY, { 0, 0, 0, /* default: */ S3_RESULT_FAIL } }; + char *verb = "PUT"; + char *content_type = NULL; g_assert(hdl != NULL); - result = perform_request(hdl, "PUT", bucket, key, NULL, NULL, NULL, NULL, + if (hdl->s3_api == S3_API_CASTOR) { + verb = "POST"; + content_type = "application/x-amanda-backup-data"; + } + + result = perform_request(hdl, verb, bucket, key, NULL, NULL, content_type, NULL, read_func, reset_func, size_func, md5_func, read_data, NULL, NULL, NULL, progress_func, progress_data, result_handling); @@ -2749,12 +2831,17 @@ list_fetch(S3Handle *hdl, hdl->s3_api == S3_API_SWIFT_2) && strcmp(keyword, "max-keys") == 0) { keyword = "limit"; - } + } else if ((hdl->s3_api == S3_API_CASTOR) && + strcmp(keyword, "max-keys") == 0) { + keyword = "size"; + } g_string_append_printf(query, "%s=%s", keyword, esc_value); curl_free(esc_value); } } - if (hdl->s3_api == S3_API_SWIFT_1 || hdl->s3_api == S3_API_SWIFT_2) { + if (hdl->s3_api == S3_API_SWIFT_1 || + hdl->s3_api == S3_API_SWIFT_2 || + hdl->s3_api == S3_API_CASTOR) { if (have_prev_part) g_string_append(query, "&"); g_string_append(query, "format=xml"); @@ -2896,6 +2983,7 @@ s3_delete(S3Handle *hdl, { s3_result_t result = S3_RESULT_FAIL; static result_handling_t result_handling[] = { + { 200, 0, 0, S3_RESULT_OK }, { 204, 0, 0, S3_RESULT_OK }, { 404, 0, 0, S3_RESULT_OK }, { 404, S3_ERROR_NoSuchBucket, 0, S3_RESULT_OK }, @@ -2975,6 +3063,8 @@ s3_make_bucket(S3Handle *hdl, const char *project_id) { char *body = NULL; + char *verb = "PUT"; + char *content_type = NULL; s3_result_t result = S3_RESULT_FAIL; static result_handling_t result_handling[] = { { 200, 0, 0, S3_RESULT_OK }, @@ -3019,7 +3109,12 @@ s3_make_bucket(S3Handle *hdl, } } - result = perform_request(hdl, "PUT", bucket, NULL, NULL, NULL, NULL, + if (hdl->s3_api == S3_API_CASTOR) { + verb = "POST"; + content_type = "application/castorcontext"; + } + + result = perform_request(hdl, verb, bucket, NULL, NULL, NULL, content_type, project_id, read_func, reset_func, size_func, md5_func, ptr, NULL, NULL, NULL, NULL, NULL, result_handling); @@ -3044,7 +3139,6 @@ s3_make_bucket(S3Handle *hdl, /* return to the default state of failure */ result = S3_RESULT_FAIL; - if (body) g_free(body); /* use strndup to get a null-terminated string */ body = g_strndup(hdl->last_response_body, hdl->last_response_body_size); if (!body) { @@ -3171,6 +3265,8 @@ s3_is_bucket_exists(S3Handle *hdl, if (hdl->s3_api == S3_API_SWIFT_1 || hdl->s3_api == S3_API_SWIFT_2) { query = "limit=1"; + } else if (hdl->s3_api == S3_API_CASTOR) { + query = "format=xml&size=0"; } else { query = "max-keys=1"; } diff --git a/device-src/s3.h b/device-src/s3.h index e8fd74d..49cb00a 100644 --- a/device-src/s3.h +++ b/device-src/s3.h @@ -1,9 +1,10 @@ /* * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -31,7 +32,8 @@ typedef enum { S3_API_S3, S3_API_SWIFT_1, S3_API_SWIFT_2, - S3_API_OAUTH2 + S3_API_OAUTH2, + S3_API_CASTOR } S3_api; /* An opaque handle. S3Handles should only be accessed from a single @@ -262,7 +264,9 @@ s3_open(const char * access_key, const char *secret_key, const char *client_id, const char *client_secret, const char *refresh_token, - const gboolean reuse_connection); + const gboolean reuse_connection, + const char *reps, + const char *reps_bucket); /* latest step of setting up the S3Handle. * diff --git a/device-src/tape-device.c b/device-src/tape-device.c index 0c7fe24..d8139dd 100644 --- a/device-src/tape-device.c +++ b/device-src/tape-device.c @@ -1,9 +1,10 @@ /* * Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -605,11 +606,12 @@ tape_device_set_read_block_size_fn(Device *p_self, DevicePropertyBase *base G_GN if (read_block_size != 0 && ((gsize)read_block_size < p_self->block_size || - (gsize)read_block_size > p_self->max_block_size)) + (gsize)read_block_size > p_self->max_block_size)) { device_set_error(p_self, g_strdup_printf("Error setting READ-BLOCk-SIZE property to '%u', it must be between %zu and %zu", read_block_size, p_self->block_size, p_self->max_block_size), DEVICE_STATUS_DEVICE_ERROR); return FALSE; + } self->private->read_block_size = read_block_size; diff --git a/device-src/vfs-device.c b/device-src/vfs-device.c index 5733995..9952c39 100644 --- a/device-src/vfs-device.c +++ b/device-src/vfs-device.c @@ -1,9 +1,10 @@ /* * Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/device-src/vfs-device.h b/device-src/vfs-device.h index e37346f..109f6cc 100644 --- a/device-src/vfs-device.h +++ b/device-src/vfs-device.h @@ -1,9 +1,10 @@ /* * Copyright (c) 2005-2012 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/device-src/xfer-dest-device.c b/device-src/xfer-dest-device.c index 7836f56..38e7a70 100644 --- a/device-src/xfer-dest-device.c +++ b/device-src/xfer-dest-device.c @@ -2,9 +2,10 @@ * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/device-src/xfer-dest-taper-cacher.c b/device-src/xfer-dest-taper-cacher.c index 0bf02cd..faf8309 100644 --- a/device-src/xfer-dest-taper-cacher.c +++ b/device-src/xfer-dest-taper-cacher.c @@ -2,9 +2,10 @@ * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/device-src/xfer-dest-taper-directtcp.c b/device-src/xfer-dest-taper-directtcp.c index 91738d0..9257538 100644 --- a/device-src/xfer-dest-taper-directtcp.c +++ b/device-src/xfer-dest-taper-directtcp.c @@ -2,9 +2,10 @@ * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -74,7 +75,7 @@ typedef struct XferDestTaperDirectTCP { * corresponding condition variable. */ volatile gboolean paused; GCond *paused_cond; - GCond *abort_accept_cond; /* condition to trigger to abort an accept */ + GCond *abort_cond; /* condition to trigger to abort an NDMP command */ } XferDestTaperDirectTCP; @@ -126,18 +127,19 @@ worker_thread( /* first, accept a new connection from the device */ DBG(2, "accepting DirectTCP connection on device %s", self->device->device_name); - result = device_accept_with_cond(self->device, &self->conn, - self->state_mutex, - self->abort_accept_cond); - if (result == 2) { + result = device_accept(self->device, &self->conn, &elt->cancelled, + self->state_mutex, self->abort_cond); + if (result == 1 && !elt->cancelled) { xfer_cancel_with_error(XFER_ELEMENT(self), "accepting DirectTCP connection: %s", device_error_or_status(self->device)); g_mutex_unlock(self->state_mutex); - return NULL; - } else if (result == 1) { + wait_until_xfer_cancelled(elt->xfer); + goto send_xmsg_done; + } else if (result == 2 || elt->cancelled) { g_mutex_unlock(self->state_mutex); - return NULL; + wait_until_xfer_cancelled(elt->xfer); + goto send_xmsg_done; } DBG(2, "connection accepted; sending XMSG_READY"); @@ -187,14 +189,18 @@ worker_thread( /* write the part */ g_timer_start(timer); - if (!device_write_from_connection(self->device, - self->part_size, &size)) { + result = device_write_from_connection(self->device, + self->part_size, &size, &elt->cancelled, + self->state_mutex, self->abort_cond); + if (result == 1 && !elt->cancelled) { /* even if this is just a physical EOM, we may have lost data, so * the whole transfer is dead. */ xfer_cancel_with_error(XFER_ELEMENT(self), "Error writing from DirectTCP connection: %s", device_error_or_status(self->device)); goto cancelled; + } else if (result == 2 || elt->cancelled) { + goto cancelled; } g_timer_stop(timer); @@ -335,7 +341,7 @@ cancel_impl( * longer paused */ g_mutex_lock(self->state_mutex); g_cond_broadcast(self->paused_cond); - g_cond_broadcast(self->abort_accept_cond); + g_cond_broadcast(self->abort_cond); g_mutex_unlock(self->state_mutex); return rv; @@ -427,7 +433,7 @@ instance_init( self->conn = NULL; self->state_mutex = g_mutex_new(); self->paused_cond = g_cond_new(); - self->abort_accept_cond = g_cond_new(); + self->abort_cond = g_cond_new(); } static void @@ -450,7 +456,7 @@ finalize_impl( g_mutex_free(self->state_mutex); g_cond_free(self->paused_cond); - g_cond_free(self->abort_accept_cond); + g_cond_free(self->abort_cond); if (self->part_header) dumpfile_free(self->part_header); diff --git a/device-src/xfer-dest-taper-splitter.c b/device-src/xfer-dest-taper-splitter.c index 081e9b8..8b09d7e 100644 --- a/device-src/xfer-dest-taper-splitter.c +++ b/device-src/xfer-dest-taper-splitter.c @@ -2,9 +2,10 @@ * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -565,7 +566,7 @@ part_done: /* time runs backward on some test boxes, so make sure this is positive */ if (msg->duration < 0) msg->duration = 0; - if (msg->successful) + if (msg->successful && msg->size > 0) self->partnum++; self->no_more_parts = msg->eof || (!msg->successful && !self->expect_cache_inform); diff --git a/device-src/xfer-dest-taper.c b/device-src/xfer-dest-taper.c index 4b7a481..187ad83 100644 --- a/device-src/xfer-dest-taper.c +++ b/device-src/xfer-dest-taper.c @@ -2,9 +2,10 @@ * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/device-src/xfer-dest-taper.h b/device-src/xfer-dest-taper.h index c157a19..4dee6de 100644 --- a/device-src/xfer-dest-taper.h +++ b/device-src/xfer-dest-taper.h @@ -2,9 +2,10 @@ * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/device-src/xfer-device.h b/device-src/xfer-device.h index cad34d0..71f30e2 100644 --- a/device-src/xfer-device.h +++ b/device-src/xfer-device.h @@ -2,9 +2,10 @@ * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/device-src/xfer-source-device.c b/device-src/xfer-source-device.c index e89a72a..7eae046 100644 --- a/device-src/xfer-source-device.c +++ b/device-src/xfer-source-device.c @@ -2,9 +2,10 @@ * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/device-src/xfer-source-recovery.c b/device-src/xfer-source-recovery.c index f305f0c..112301c 100644 --- a/device-src/xfer-source-recovery.c +++ b/device-src/xfer-source-recovery.c @@ -2,9 +2,10 @@ * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -55,7 +56,7 @@ typedef struct XferSourceRecovery { GThread *thread; /* this mutex in this condition variable governs all variables below */ - GCond *start_part_cond; + GCond *start_part_cond; GMutex *start_part_mutex; /* is this device currently paused and awaiting a new part? */ @@ -87,6 +88,8 @@ typedef struct XferSourceRecovery { GTimer *part_timer; gint64 size; + + GCond *abort_cond; /* condition to trigger to abort ndmp command */ } XferSourceRecovery; /* @@ -135,6 +138,7 @@ directtcp_common_thread( { XferElement *elt = XFER_ELEMENT(self); char *errmsg = NULL; + int result; /* send XMSG_READY to indicate it's OK to call start_part now */ DBG(2, "sending XMSG_READY"); @@ -165,11 +169,17 @@ directtcp_common_thread( while (1) { DBG(2, "reading part from %s", self->device->device_name); - if (!device_read_to_connection(self->device, G_MAXUINT64, &actual_size)) { + result = device_read_to_connection(self->device, G_MAXUINT64, + &actual_size, &elt->cancelled, + self->start_part_mutex, self->abort_cond); + if (result == 1 && !elt->cancelled) { xfer_cancel_with_error(elt, _("error reading from device: %s"), device_error_or_status(self->device)); g_mutex_unlock(self->start_part_mutex); goto close_conn_and_send_done; + } else if (result == 2 || elt->cancelled) { + g_mutex_unlock(self->start_part_mutex); + goto close_conn_and_send_done; } /* break on EOF; otherwise do another read_to_connection */ @@ -223,6 +233,7 @@ directtcp_connect_thread( { XferSourceRecovery *self = XFER_SOURCE_RECOVERY(data); XferElement *elt = XFER_ELEMENT(self); + int result; DBG(1, "(this is directtcp_connect_thread)") @@ -241,13 +252,18 @@ directtcp_connect_thread( g_assert(self->listen_ok); DBG(2, "accepting DirectTCP connection on device %s", self->device->device_name); - if (!device_accept(self->device, &self->conn, NULL, NULL)) { + result = device_accept(self->device, &self->conn, &elt->cancelled, + self->start_part_mutex, self->abort_cond); + if (result == 1 && !elt->cancelled) { xfer_cancel_with_error(elt, _("error accepting DirectTCP connection: %s"), device_error_or_status(self->device)); g_mutex_unlock(self->start_part_mutex); wait_until_xfer_cancelled(elt->xfer); goto send_done; + } else if (result == 2 || elt->cancelled) { + g_mutex_unlock(self->start_part_mutex); + goto send_done; } DBG(2, "DirectTCP connection accepted"); @@ -264,6 +280,7 @@ directtcp_listen_thread( { XferSourceRecovery *self = XFER_SOURCE_RECOVERY(data); XferElement *elt = XFER_ELEMENT(self); + int result; DBG(1, "(this is directtcp_listen_thread)"); @@ -281,14 +298,21 @@ directtcp_listen_thread( g_assert(elt->downstream->input_listen_addrs != NULL); /* downstream listening */ DBG(2, "making DirectTCP connection on device %s", self->device->device_name); - if (!device_connect(self->device, FALSE, elt->downstream->input_listen_addrs, - &self->conn, NULL, NULL)) { + result = device_connect(self->device, FALSE, + elt->downstream->input_listen_addrs, + &self->conn, &elt->cancelled, + self->start_part_mutex, self->abort_cond); + if (result == 1 && !elt->cancelled) { xfer_cancel_with_error(elt, _("error making DirectTCP connection: %s"), device_error_or_status(self->device)); g_mutex_unlock(self->start_part_mutex); wait_until_xfer_cancelled(elt->xfer); goto send_done; + } else if (result == 2 || elt->cancelled) { + g_mutex_unlock(self->start_part_mutex); + wait_until_xfer_cancelled(elt->xfer); + goto send_done; } DBG(2, "DirectTCP connect succeeded"); @@ -484,6 +508,7 @@ cancel_impl( /* trigger the condition variable, in case the thread is waiting on it */ g_mutex_lock(self->start_part_mutex); g_cond_broadcast(self->start_part_cond); + g_cond_broadcast(self->abort_cond); g_mutex_unlock(self->start_part_mutex); return TRUE; @@ -600,6 +625,7 @@ finalize_impl( g_object_unref(self->device); g_cond_free(self->start_part_cond); + g_cond_free(self->abort_cond); g_mutex_free(self->start_part_mutex); } @@ -611,6 +637,7 @@ instance_init( self->paused = TRUE; self->start_part_cond = g_cond_new(); + self->abort_cond = g_cond_new(); self->start_part_mutex = g_mutex_new(); } diff --git a/example/Makefile.in b/example/Makefile.in index 9827d7a..8911277 100644 --- a/example/Makefile.in +++ b/example/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -20,9 +20,10 @@ # vim:ft=automake # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -89,6 +90,23 @@ # in this file at all, due to limitations of Automake. VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -271,6 +289,11 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -292,6 +315,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(client_exampledir)" \ "$(DESTDIR)$(lbltempldir)" "$(DESTDIR)$(server_exampledir)" \ "$(DESTDIR)$(templatedir)" @@ -1228,6 +1257,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; +$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/installperms.am: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -1245,8 +1275,11 @@ clean-libtool: -rm -rf .libs _libs install-client_exampleDATA: $(client_example_DATA) @$(NORMAL_INSTALL) - test -z "$(client_exampledir)" || $(MKDIR_P) "$(DESTDIR)$(client_exampledir)" @list='$(client_example_DATA)'; test -n "$(client_exampledir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(client_exampledir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(client_exampledir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -1260,13 +1293,14 @@ uninstall-client_exampleDATA: @$(NORMAL_UNINSTALL) @list='$(client_example_DATA)'; test -n "$(client_exampledir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(client_exampledir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(client_exampledir)" && rm -f $$files + dir='$(DESTDIR)$(client_exampledir)'; $(am__uninstall_files_from_dir) install-lbltemplDATA: $(lbltempl_DATA) @$(NORMAL_INSTALL) - test -z "$(lbltempldir)" || $(MKDIR_P) "$(DESTDIR)$(lbltempldir)" @list='$(lbltempl_DATA)'; test -n "$(lbltempldir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(lbltempldir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(lbltempldir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -1280,13 +1314,14 @@ uninstall-lbltemplDATA: @$(NORMAL_UNINSTALL) @list='$(lbltempl_DATA)'; test -n "$(lbltempldir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(lbltempldir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(lbltempldir)" && rm -f $$files + dir='$(DESTDIR)$(lbltempldir)'; $(am__uninstall_files_from_dir) install-server_exampleDATA: $(server_example_DATA) @$(NORMAL_INSTALL) - test -z "$(server_exampledir)" || $(MKDIR_P) "$(DESTDIR)$(server_exampledir)" @list='$(server_example_DATA)'; test -n "$(server_exampledir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(server_exampledir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(server_exampledir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -1300,13 +1335,14 @@ uninstall-server_exampleDATA: @$(NORMAL_UNINSTALL) @list='$(server_example_DATA)'; test -n "$(server_exampledir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(server_exampledir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(server_exampledir)" && rm -f $$files + dir='$(DESTDIR)$(server_exampledir)'; $(am__uninstall_files_from_dir) install-templateDATA: $(template_DATA) @$(NORMAL_INSTALL) - test -z "$(templatedir)" || $(MKDIR_P) "$(DESTDIR)$(templatedir)" @list='$(template_DATA)'; test -n "$(templatedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(templatedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(templatedir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -1320,9 +1356,7 @@ uninstall-templateDATA: @$(NORMAL_UNINSTALL) @list='$(template_DATA)'; test -n "$(templatedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(templatedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(templatedir)" && rm -f $$files + dir='$(DESTDIR)$(templatedir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: @@ -1379,10 +1413,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) diff --git a/gnulib/Makefile.in b/gnulib/Makefile.in index cfd6f9b..c4505bf 100644 --- a/gnulib/Makefile.in +++ b/gnulib/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -29,6 +29,23 @@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -239,6 +256,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac HEADERS = $(noinst_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive @@ -1218,7 +1240,7 @@ glthread/lock.lo: glthread/$(am__dirstamp) \ glthread/$(DEPDIR)/$(am__dirstamp) glthread/threadlib.lo: glthread/$(am__dirstamp) \ glthread/$(DEPDIR)/$(am__dirstamp) -libgnu.la: $(libgnu_la_OBJECTS) $(libgnu_la_DEPENDENCIES) +libgnu.la: $(libgnu_la_OBJECTS) $(libgnu_la_DEPENDENCIES) $(EXTRA_libgnu_la_DEPENDENCIES) $(libgnu_la_LINK) $(libgnu_la_OBJECTS) $(libgnu_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -1474,13 +1496,10 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -1517,10 +1536,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) diff --git a/installcheck/=setupcache.pl b/installcheck/=setupcache.pl index 09c8c1e..721c2a6 100644 --- a/installcheck/=setupcache.pl +++ b/installcheck/=setupcache.pl @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Amanda_Archive.pl b/installcheck/Amanda_Archive.pl index 8bfa704..d713910 100644 --- a/installcheck/Amanda_Archive.pl +++ b/installcheck/Amanda_Archive.pl @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Amanda_Changer.pl b/installcheck/Amanda_Changer.pl index 4165865..22b099d 100644 --- a/installcheck/Amanda_Changer.pl +++ b/installcheck/Amanda_Changer.pl @@ -1,8 +1,9 @@ # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Amanda_Changer_compat.pl b/installcheck/Amanda_Changer_compat.pl index 29c6952..8997e91 100644 --- a/installcheck/Amanda_Changer_compat.pl +++ b/installcheck/Amanda_Changer_compat.pl @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Amanda_Changer_disk.pl b/installcheck/Amanda_Changer_disk.pl index e88d214..a5e29ee 100644 --- a/installcheck/Amanda_Changer_disk.pl +++ b/installcheck/Amanda_Changer_disk.pl @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Amanda_Changer_multi.pl b/installcheck/Amanda_Changer_multi.pl index dfcc99f..fa77969 100644 --- a/installcheck/Amanda_Changer_multi.pl +++ b/installcheck/Amanda_Changer_multi.pl @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Amanda_Changer_ndmp.pl b/installcheck/Amanda_Changer_ndmp.pl index 70a9eed..a5943bf 100644 --- a/installcheck/Amanda_Changer_ndmp.pl +++ b/installcheck/Amanda_Changer_ndmp.pl @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 Zmanda Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -465,13 +466,13 @@ sub test_changer { barcode => 'PTAG00XX', reserved => 1, loaded_in => 0, current => 1, device_status => $DEVICE_STATUS_VOLUME_UNLABELED, - device_error => undef, - f_type => undef, label => undef }, + device_error => 'no tape label found', + f_type => $Amanda::Header::F_EMPTY, label => undef }, { slot => 4, state => Amanda::Changer::SLOT_FULL, barcode => 'PTAG01XX', reserved => 1, loaded_in => 1, device_status => $DEVICE_STATUS_VOLUME_UNLABELED, - device_error => undef, - f_type => undef, label => undef }, + device_error => 'no tape label found', + f_type => $Amanda::Header::F_EMPTY, label => undef }, { slot => 5, state => Amanda::Changer::SLOT_FULL, barcode => 'PTAG02XX', device_status => undef, device_error => undef, diff --git a/installcheck/Amanda_Changer_null.pl b/installcheck/Amanda_Changer_null.pl index eccca06..d1ff0da 100644 --- a/installcheck/Amanda_Changer_null.pl +++ b/installcheck/Amanda_Changer_null.pl @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Amanda_Changer_rait.pl b/installcheck/Amanda_Changer_rait.pl index c0cb966..1526ad3 100644 --- a/installcheck/Amanda_Changer_rait.pl +++ b/installcheck/Amanda_Changer_rait.pl @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Amanda_Changer_robot.pl b/installcheck/Amanda_Changer_robot.pl index d7ddb60..953ec2a 100644 --- a/installcheck/Amanda_Changer_robot.pl +++ b/installcheck/Amanda_Changer_robot.pl @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 Zmanda Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -562,13 +563,13 @@ sub test_changer { { slot => 1, state => Amanda::Changer::SLOT_FULL, barcode => '11111', reserved => 1, loaded_in => 0, current => 1, device_status => $DEVICE_STATUS_VOLUME_UNLABELED, - device_error => undef, - f_type => undef, label => undef }, + device_error => "File 0 not found", + f_type => $Amanda::Header::F_EMPTY, label => undef }, { slot => 2, state => Amanda::Changer::SLOT_FULL, barcode => '22222', reserved => 1, loaded_in => 1, device_status => $DEVICE_STATUS_VOLUME_UNLABELED, - device_error => undef, - f_type => undef, label => undef }, + device_error => "File 0 not found", + f_type => $Amanda::Header::F_EMPTY, label => undef }, { slot => 3, state => Amanda::Changer::SLOT_FULL, barcode => '33333', device_status => undef, device_error => undef, @@ -1137,7 +1138,7 @@ sub test_changer { barcode => '33333', loaded_in => 1, device_status => $DEVICE_STATUS_SUCCESS, device_error => undef, - f_type => undef, label => 'TAPE-3' }, + f_type => $Amanda::Header::F_TAPESTART, label => 'TAPE-3' }, { slot => 4, state => Amanda::Changer::SLOT_FULL, barcode => '44444', loaded_in => 0, current => 1, device_status => $DEVICE_STATUS_SUCCESS, @@ -1241,7 +1242,7 @@ sub test_changer { barcode => '33333', loaded_in => 1, device_status => $DEVICE_STATUS_SUCCESS, device_error => undef, - f_type => undef, label => 'TAPE-3' }, + f_type => $Amanda::Header::F_TAPESTART, label => 'TAPE-3' }, { slot => 4, state => Amanda::Changer::SLOT_FULL, barcode => '22222', current => 1, device_status => $DEVICE_STATUS_SUCCESS, @@ -1308,7 +1309,7 @@ sub test_changer { barcode => '33333', loaded_in => 0, device_status => $DEVICE_STATUS_SUCCESS, device_error => undef, - f_type => undef, label => 'TAPE-3' }, + f_type => $Amanda::Header::F_TAPESTART, label => 'TAPE-3' }, { slot => 4, state => Amanda::Changer::SLOT_FULL, barcode => '22222', current => 1, device_status => $DEVICE_STATUS_SUCCESS, @@ -1344,7 +1345,7 @@ sub test_changer { barcode => '33333', loaded_in => 0, device_status => $DEVICE_STATUS_SUCCESS, device_error => undef, - f_type => undef, label => 'TAPE-3' }, + f_type => $Amanda::Header::F_TAPESTART, label => 'TAPE-3' }, { slot => 4, state => Amanda::Changer::SLOT_FULL, barcode => '22222', current => 1, device_status => $DEVICE_STATUS_SUCCESS, @@ -1355,7 +1356,7 @@ sub test_changer { device_status => $DEVICE_STATUS_SUCCESS, device_error => undef, f_type => $Amanda::Header::F_TAPESTART, label => 'TAPE-4' }, - ], "$pfx: inventory reflects updates with unknown state with barcodes"); + ], "$pfx: inventory reflects updates wrcodesith unknown state with barcodes"); } else { check_inventory($chg, $mtx_config->{'barcodes'} > 0, $steps->{'quit'}, [ { slot => 1, state => Amanda::Changer::SLOT_FULL, diff --git a/installcheck/Amanda_Changer_single.pl b/installcheck/Amanda_Changer_single.pl index e95c837..606cffb 100644 --- a/installcheck/Amanda_Changer_single.pl +++ b/installcheck/Amanda_Changer_single.pl @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Amanda_ClientService.pl b/installcheck/Amanda_ClientService.pl index 5aa7127..5896c20 100644 --- a/installcheck/Amanda_ClientService.pl +++ b/installcheck/Amanda_ClientService.pl @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Amanda_Cmdline.pl b/installcheck/Amanda_Cmdline.pl index d8f412d..240c238 100644 --- a/installcheck/Amanda_Cmdline.pl +++ b/installcheck/Amanda_Cmdline.pl @@ -1,8 +1,9 @@ # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -16,7 +17,7 @@ # Contact information: Zmanda Inc, 465 S. Mathilda Ave., Suite 300 # Sunnyvale, CA 94086, USA, or: http://www.zmanda.com -use Test::More tests => 43; +use Test::More tests => 54; use strict; use warnings; @@ -67,22 +68,43 @@ is(@specs, 2, "parse of four elements with no flags yields 2 specs"); is_deeply([ ds2av($specs[0]) ], [ "h1", "d1", undef, undef, undef ], "..first spec is correct"); is_deeply([ ds2av($specs[1]) ], [ "h2", "d2", undef, undef, undef ], "..second spec is correct"); +@specs = Amanda::Cmdline::parse_dumpspecs(["h1", "d1", "h2", "d2"], $Amanda::Cmdline::CMDLINE_EXACT_MATCH); +is(@specs, 2, "parse of four elements with CMDLINE_EXACT_MATCH yields 2 specs"); +is_deeply([ ds2av($specs[0]) ], [ "=h1", "=d1", undef, undef, undef ], "..first spec is correct"); +is_deeply([ ds2av($specs[1]) ], [ "=h2", "=d2", undef, undef, undef ], "..second spec is correct"); + @specs = Amanda::Cmdline::parse_dumpspecs(["h1", "d1", "ds1", "h2", "d2", "ds2" ], $Amanda::Cmdline::CMDLINE_PARSE_DATESTAMP); is(@specs, 2, "parse of six elements with CMDLINE_PARSE_DATESTAMP yields 2 specs"); is_deeply([ ds2av($specs[0]) ], [ "h1", "d1", "ds1", undef, undef ], "..first spec is correct"); is_deeply([ ds2av($specs[1]) ], [ "h2", "d2", "ds2", undef, undef ], "..second spec is correct"); +@specs = Amanda::Cmdline::parse_dumpspecs(["h1", "d1", "ds1", "h2", "d2", "ds2" ], $Amanda::Cmdline::CMDLINE_PARSE_DATESTAMP | $Amanda::Cmdline::CMDLINE_EXACT_MATCH); +is(@specs, 2, "parse of six elements with CMDLINE_PARSE_DATESTAMP and CMDLINE_EXACT_MATCH yields 2 specs"); +is_deeply([ ds2av($specs[0]) ], [ "=h1", "=d1", "=ds1", undef, undef ], "..first spec is correct"); +is_deeply([ ds2av($specs[1]) ], [ "=h2", "=d2", "=ds2", undef, undef ], "..second spec is correct"); + @specs = Amanda::Cmdline::parse_dumpspecs(["h1", "d1", "ds1", "lv1", "h2", "d2", "ds2", "lv2" ], $Amanda::Cmdline::CMDLINE_PARSE_DATESTAMP | $Amanda::Cmdline::CMDLINE_PARSE_LEVEL); is(@specs, 2, "parse of eight elements with CMDLINE_PARSE_DATESTAMP and CMDLINE_PARSE_LEVEL yields 2 specs"); is_deeply([ ds2av($specs[0]) ], [ "h1", "d1", "ds1", "lv1", undef ], "..first spec is correct"); is_deeply([ ds2av($specs[1]) ], [ "h2", "d2", "ds2", "lv2", undef ], "..second spec is correct"); +@specs = Amanda::Cmdline::parse_dumpspecs(["h1", "d1", "ds1", "lv1", "h2", "d2", "ds2", "lv2" ], + $Amanda::Cmdline::CMDLINE_PARSE_DATESTAMP | $Amanda::Cmdline::CMDLINE_PARSE_LEVEL | $Amanda::Cmdline::CMDLINE_EXACT_MATCH); +is(@specs, 2, "parse of eight elements with CMDLINE_PARSE_DATESTAMP, CMDLINE_PARSE_LEVEL and CMDLINE_EXACT_MATCH yields 2 specs"); +is_deeply([ ds2av($specs[0]) ], [ "=h1", "=d1", "=ds1", "=lv1", undef ], "..first spec is correct"); +is_deeply([ ds2av($specs[1]) ], [ "=h2", "=d2", "=ds2", "=lv2", undef ], "..second spec is correct"); + @specs = Amanda::Cmdline::parse_dumpspecs(["h1", "d1", "ds1", "lv1" ], $Amanda::Cmdline::CMDLINE_PARSE_DATESTAMP | $Amanda::Cmdline::CMDLINE_PARSE_LEVEL); is(@specs, 1, "parse of four elements with CMDLINE_PARSE_DATESTAMP and CMDLINE_PARSE_LEVEL yields one spec"); is_deeply([ ds2av($specs[0]) ], [ "h1", "d1", "ds1", "lv1", undef ], "..which is correct"); +@specs = Amanda::Cmdline::parse_dumpspecs(["h1", "d1", "ds1", "lv1" ], + $Amanda::Cmdline::CMDLINE_PARSE_DATESTAMP | $Amanda::Cmdline::CMDLINE_PARSE_LEVEL | $Amanda::Cmdline::CMDLINE_EXACT_MATCH); +is(@specs, 1, "parse of four elements with CMDLINE_PARSE_DATESTAMP, CMDLINE_PARSE_LEVEL and CMDLINE_EXACT_MATCH yields one spec"); +is_deeply([ ds2av($specs[0]) ], [ "=h1", "=d1", "=ds1", "=lv1", undef ], "..which is correct"); + @specs = Amanda::Cmdline::parse_dumpspecs(["h1", "d1", "ds1" ], $Amanda::Cmdline::CMDLINE_PARSE_DATESTAMP | $Amanda::Cmdline::CMDLINE_PARSE_LEVEL); is(@specs, 1, "parse of three elements with CMDLINE_PARSE_DATESTAMP and CMDLINE_PARSE_LEVEL yields one spec"); diff --git a/installcheck/Amanda_Config.pl b/installcheck/Amanda_Config.pl index 362dcb5..db6e122 100644 --- a/installcheck/Amanda_Config.pl +++ b/installcheck/Amanda_Config.pl @@ -1,8 +1,9 @@ # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -1134,7 +1135,7 @@ my $properties = getconf($CNF_PROPERTY); ); for my $pn (@prop_names) { - is_deeply($properties->{$pn->{'val'}}->{values}, [ "VALUE" ]); + is_deeply($properties->{$pn->{'val'}}->{values}, [ "VALUE" ], "property $pn->{'val'}"); } $testconf = Installcheck::Config->new(); diff --git a/installcheck/Amanda_Config_FoldingHash.pl b/installcheck/Amanda_Config_FoldingHash.pl index 50648e6..64b2f4e 100644 --- a/installcheck/Amanda_Config_FoldingHash.pl +++ b/installcheck/Amanda_Config_FoldingHash.pl @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Amanda_Curinfo.pl b/installcheck/Amanda_Curinfo.pl index e377043..f8336af 100644 --- a/installcheck/Amanda_Curinfo.pl +++ b/installcheck/Amanda_Curinfo.pl @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Amanda_DB_Catalog.pl b/installcheck/Amanda_DB_Catalog.pl index 4a87c7b..ee6d32b 100644 --- a/installcheck/Amanda_DB_Catalog.pl +++ b/installcheck/Amanda_DB_Catalog.pl @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -145,7 +146,8 @@ sub sortparts { map { # convert bigints to strings and on to integers so is_deeply doesn't get confused $_->{'dump'}->{'level'} = "$_->{dump}->{level}" + 0; - $_->{'dump'}->{'bytes'} = "$_->{dump}->{bytes}" + 0; + $_->{'dump'}->{'bytes'} = 0; + $_->{'dump'}->{'bytes'} = "$_->{dump}->{bytes}" + 0 if defined $_->{dump}->{bytes}; $_->{'dump'}->{'kb'} = "$_->{dump}->{kb}" + 0; $_->{'dump'}->{'orig_kb'} = "$_->{dump}->{orig_kb}" + 0; if (!defined $_->{filenum}) { @@ -239,9 +241,11 @@ sub sortdumps { map { # convert bigints to strings and on to integers so is_deeply doesn't get confused $_->{'level'} = "$_->{level}" + 0; - $_->{'bytes'} = "$_->{bytes}" + 0; + $_->{'bytes'} = 0; + $_->{'bytes'} = "$_->{bytes}" + 0 if defined $_->{bytes}; $_->{'kb'} = "$_->{kb}" + 0; - $_->{'orig_kb'} = "$_->{orig_kb}" + 0; + $_->{'orig_kb'} = 0; + $_->{'orig_kb'} = "$_->{orig_kb}" + 0 if defined $_->{orig_kb}; $_->{'nparts'} = "$_->{nparts}" + 0; $_; } sort { diff --git a/installcheck/Amanda_Debug.pl b/installcheck/Amanda_Debug.pl index 98f6345..20d3e81 100644 --- a/installcheck/Amanda_Debug.pl +++ b/installcheck/Amanda_Debug.pl @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Amanda_Device.pl b/installcheck/Amanda_Device.pl index 92ab162..2b5fcb6 100644 --- a/installcheck/Amanda_Device.pl +++ b/installcheck/Amanda_Device.pl @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -16,7 +17,7 @@ # Contact information: Zmanda Inc, 465 S. Mathilda Ave., Suite 300 # Sunnyvale, CA 94086, USA, or: http://www.zmanda.com -use Test::More tests => 609; +use Test::More tests => 541; use File::Path qw( mkpath rmtree ); use Sys::Hostname; use Carp; @@ -1313,7 +1314,7 @@ SKIP: { } SKIP: { - skip "not built with ndmp and server", 94 unless + skip "not built with ndmp and server", 26 unless Amanda::Util::built_with_component("ndmp") and Amanda::Util::built_with_component("server"); @@ -1455,371 +1456,6 @@ SKIP: { "finish device") or diag $dev->error_or_status(); - # - # test the directtcp-target implementation - # - - ok($dev->directtcp_supported(), "is a directtcp target"); - for my $dev_use ('initiator', 'listener') { - my ($xfer, $addrs, $dest_elt); - if ($dev_use eq 'listener') { - $addrs = $dev->listen(1); - ok($addrs, "listen returns successfully") or die($dev->error_or_status()); - - # set up an xfer to write to the device - $dest_elt = Amanda::Xfer::Dest::DirectTCPConnect->new($addrs); - } else { - # set up an xfer to write to the device - $dest_elt = Amanda::Xfer::Dest::DirectTCPListen->new(); - } - $xfer = Amanda::Xfer->new([ - Amanda::Xfer::Source::Random->new(32768*34, 0xB00), - $dest_elt, - ]); - - my @messages; - $xfer->start(make_cb(xmsg_cb => sub { - my ($src, $msg, $xfer) = @_; - if ($msg->{'type'} == $XMSG_ERROR) { - die $msg->{'elt'} . " failed: " . $msg->{'message'}; - } elsif ($msg->{'type'} == $XMSG_DONE) { - Amanda::MainLoop::quit(); - } - })); - - # write files from the connection until EOF - my $num_files; - my $conn; - my ($finish_connection, $start_device, $write_file_cb); - - - $finish_connection = make_cb(finish_connection => sub { - if ($dev_use eq 'listener') { - $conn = $dev->accept(); - } else { - $addrs = $dest_elt->get_addrs(); - $conn = $dev->connect(1, $addrs); - } - Amanda::MainLoop::call_later($start_device); - }); - - - $start_device = make_cb(start_device => sub { - ok($dev->start($ACCESS_WRITE, "TEST2", "20090915000000"), - "start device in write mode") - or diag $dev->error_or_status(); - - Amanda::MainLoop::call_later($write_file_cb); - }); - - $write_file_cb = make_cb(write_file_cb => sub { - ++$num_files < 20 or die "I seem to be in a loop!"; - - ok($dev->start_file($hdr), "start file $num_files for writing"); - is($dev->file, $num_files, "..file number is correct"); - - my ($ok, $size) = $dev->write_from_connection(32768*15); - push @messages, sprintf("WRITE-%s-%d-%s-%s", - $ok?"OK":"ERR", $size, - $dev->is_eof()? "EOF":"!eof", - $dev->is_eom()? "EOM":"!eom"); - ok($ok, "..write from connection succeeds"); - my $eof = $dev->is_eof(); - - ok($dev->finish_file(), "..finish file after writing"); - - if (!$eof) { - Amanda::MainLoop::call_later($write_file_cb); - } - }); - - Amanda::MainLoop::call_later($finish_connection); - Amanda::MainLoop::run(); - is_deeply([@messages], [ - 'WRITE-OK-491520-!eof-!eom', - 'WRITE-OK-491520-!eof-!eom', - 'WRITE-OK-131072-EOF-!eom', - ], - "a sequence of write_from_connection calls works correctly"); - - $dev->finish(); - - if (my $err = $conn->close()) { - die $err; - } - } - - # - # Test indirecttcp - # - - { - ok($dev->directtcp_supported(), "is a directtcp target"); - - $dev->property_set("indirect", 1); - - my $addrs = $dev->listen(1); - ok($addrs, "listen returns successfully") or die($dev->error_or_status()); - - # fork off to evaluate the indirecttcp addresses and then set up an - # xfer to write to the device - if (POSIX::fork() == 0) { - # allow other process to start listening. - sleep 1; - my $nc = $Amanda::Constants::NC; - $nc = $Amanda::Constants::NC6 if !$nc; - $nc = $Amanda::Constants::NETCAT if !$nc; - my $sockresult = `$nc localhost $addrs->[0][1] < /dev/null`; - - my @sockresult = map { [ split(/:/, $_) ] } split(/ /, $sockresult); - $addrs = [ map { $_->[1] = 0 + $_->[1]; $_ } @sockresult ]; - - my $xfer = Amanda::Xfer->new([ - Amanda::Xfer::Source::Random->new(32768*34, 0xB00), - Amanda::Xfer::Dest::DirectTCPConnect->new($addrs) ]); - - $xfer->start(make_cb(xmsg_cb => sub { - my ($src, $msg, $xfer) = @_; - if ($msg->{'type'} == $XMSG_ERROR) { - die $msg->{'elt'} . " failed: " . $msg->{'message'}; - } elsif ($msg->{'type'} == $XMSG_DONE) { - Amanda::MainLoop::quit(); - } - })); - - Amanda::MainLoop::run(); - exit(0); - } - - # write files from the connection until EOF - my @messages; - my $num_files; - my $conn; - my ($call_accept, $start_device, $write_file_cb); - - $call_accept = make_cb(call_accept => sub { - $conn = $dev->accept(); - Amanda::MainLoop::call_later($start_device); - }); - - $start_device = make_cb(start_device => sub { - ok($dev->start($ACCESS_WRITE, "TEST2", "20090915000000"), - "start device in write mode") - or diag $dev->error_or_status(); - - Amanda::MainLoop::call_later($write_file_cb); - }); - - $write_file_cb = make_cb(write_file_cb => sub { - ++$num_files < 20 or die "I seem to be in a loop!"; - - ok($dev->start_file($hdr), "start file $num_files for writing"); - is($dev->file, $num_files, "..file number is correct"); - - my ($ok, $size) = $dev->write_from_connection(32768*15); - push @messages, sprintf("WRITE-%s-%d-%s-%s", - $ok?"OK":"ERR", $size, - $dev->is_eof()? "EOF":"!eof", - $dev->is_eom()? "EOM":"!eom"); - ok($ok, "..write from connection succeeds"); - my $eof = $dev->is_eof(); - - ok($dev->finish_file(), "..finish file after writing"); - - if (!$eof) { - Amanda::MainLoop::call_later($write_file_cb); - } else { - Amanda::MainLoop::quit(); - } - }); - - Amanda::MainLoop::call_later($call_accept); - Amanda::MainLoop::run(); - is_deeply([@messages], [ - 'WRITE-OK-491520-!eof-!eom', - 'WRITE-OK-491520-!eof-!eom', - 'WRITE-OK-131072-EOF-!eom', - ], - "a sequence of write_from_connection calls works correctly"); - - $dev->finish(); - - if (my $err = $conn->close()) { - die $err; - } - } - - # now try reading that back piece by piece - - { - my $filename = "$Installcheck::TMP/Amanda_Device_ndmp.tmp"; - open(my $dest_fh, ">", $filename); - - ok($dev->start($ACCESS_READ, undef, undef), - "start device in read mode") - or diag $dev->error_or_status(); - - my $file; - for ($file = 1; $file <= 3; $file++) { - ok($dev->seek_file($file), - "seek_file $file"); - is($dev->file, $file, "..file num is correct"); - is($dev->block, 0, "..block num is correct"); - - # read the file, writing to our temp file. We'll check that the byte - # sequence is correct later - my $xfer = Amanda::Xfer->new([ - Amanda::Xfer::Source::Device->new($dev), - Amanda::Xfer::Dest::Fd->new($dest_fh) ]); - - $xfer->start(make_cb(xmsg_cb => sub { - my ($src, $msg, $xfer) = @_; - if ($msg->{'type'} == $XMSG_ERROR) { - die $msg->{'elt'} . " failed: " . $msg->{'message'}; - } elsif ($msg->{'type'} == $XMSG_DONE) { - Amanda::MainLoop::quit(); - } - })); - Amanda::MainLoop::run(); - - pass("read back file " . $file); - } - - $dev->finish(); - close $dest_fh; - - # now read back and verify that file - open(my $src_fh, "<", $filename); - my $xfer = Amanda::Xfer->new([ - Amanda::Xfer::Source::Fd->new($src_fh), - Amanda::Xfer::Dest::Null->new(0xB00) ]); - - $xfer->start(make_cb(xmsg_cb => sub { - my ($src, $msg, $xfer) = @_; - if ($msg->{'type'} == $XMSG_ERROR) { - die $msg->{'elt'} . " failed: " . $msg->{'message'}; - } elsif ($msg->{'type'} == $XMSG_DONE) { - Amanda::MainLoop::quit(); - } - })); - Amanda::MainLoop::run(); - - pass("data in the three parts is correct"); - unlink $filename; - } - - #### - # Test read_to_connection - # - # This requires something that can connect to a device and read from - # it; the XFA does not have an XFER_MECH_DIRECTTCP_CONNECT, so we fake - # it by manually connecting and then setting up an xfer with a regular - # XferSourceFd. This works because the NDMP server will accept an - # incoming connection before the Device API accept() method is called; - # this trick may not work with other DirectTCP-capable devices. Also, - # this doesn't work so well if there's an error in the xfer (e.g., a - # random value mismatch). But tests are supposed to succeed! - - sub test_read2conn { - my ($finished_cb) = @_; - my @events; - my $file = 1; - my ($conn, $sock); - - my $steps = define_steps - cb_ref => \$finished_cb; - - step setup => sub { - my $addrs = $dev->listen(0); - - # now connect to that - $sock = IO::Socket::INET->new( - Proto => "tcp", - PeerHost => $addrs->[0][0], - PeerPort => $addrs->[0][1], - Blocking => 1, - ); - - # and set up a transfer to read from that socket - my $xfer = Amanda::Xfer->new([ - Amanda::Xfer::Source::Fd->new($sock), - Amanda::Xfer::Dest::Null->new(0xB00) ]); - - $xfer->start(make_cb(xmsg_cb => sub { - my ($src, $msg, $xfer) = @_; - if ($msg->{'type'} == $XMSG_ERROR) { - die $msg->{'elt'} . " failed: " . $msg->{'message'}; - } - if ($msg->{'type'} == $XMSG_DONE) { - push @events, "DONE"; - $steps->{'quit'}->(); - } - })); - - $steps->{'accept'}->(); - }; - - step accept => sub { - $conn = $dev->accept(); - die $dev->error_or_status() unless ($conn); - - Amanda::MainLoop::call_later($steps->{'start_dev'}); - }; - - step start_dev => sub { - ok($dev->start($ACCESS_READ, undef, undef), - "start device in read mode") - or diag $dev->error_or_status(); - - Amanda::MainLoop::call_later($steps->{'read_part_cb'}); - }; - - step read_part_cb => sub { - my $hdr = $dev->seek_file($file); - die $dev->error_or_status() unless ($hdr); - my $size = $dev->read_to_connection(0); - push @events, "READ-$size"; - - if (++$file <= 3) { - Amanda::MainLoop::call_later($steps->{'read_part_cb'}); - } else { - # close the connection, which will end the xfer, which will - # result in a call to finished_cb. So there. - push @events, "CLOSE"; - $conn->close(); - } - }; - - step quit => sub { - close $sock or die "close: $!"; - - is_deeply([@events], - [ "READ-491520", "READ-491520", "READ-131072", "CLOSE", "DONE" ], - "sequential read_to_connection operations read the right amounts " . - "and bytestream matches"); - - $finished_cb->(); - }; - } - test_read2conn(\&Amanda::MainLoop::quit); - Amanda::MainLoop::run(); - - # try two seek_file's in a row - $hdr = $dev->seek_file(2); - is($hdr? $hdr->{'type'} : -1, $Amanda::Header::F_DUMPFILE, "seek_file the first time"); - $hdr = $dev->seek_file(2); - is($hdr? $hdr->{'type'} : -1, $Amanda::Header::F_DUMPFILE, "seek_file the second time"); - - ## test seek_file's handling of EOM - - $hdr = $dev->seek_file(3); - is($hdr->{type}, $Amanda::Header::F_DUMPFILE, "file 3 is a dumpfile"); - $hdr = $dev->seek_file(4); - is($hdr->{type}, $Amanda::Header::F_TAPEEND, "file 4 is tapeend"); - $hdr = $dev->seek_file(5); - is($hdr, undef, "file 5 is an error"); - $hdr = $dev->seek_file(6); - is($hdr, undef, "file 6 is an error"); $ndmp->cleanup(); } diff --git a/installcheck/Amanda_Disklist.pl b/installcheck/Amanda_Disklist.pl index da3a59e..560ff7f 100644 --- a/installcheck/Amanda_Disklist.pl +++ b/installcheck/Amanda_Disklist.pl @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Amanda_Feature.pl b/installcheck/Amanda_Feature.pl index 89288bb..00a0152 100644 --- a/installcheck/Amanda_Feature.pl +++ b/installcheck/Amanda_Feature.pl @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Amanda_Header.pl b/installcheck/Amanda_Header.pl index 3deca30..0e1d770 100644 --- a/installcheck/Amanda_Header.pl +++ b/installcheck/Amanda_Header.pl @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Amanda_Holding.pl b/installcheck/Amanda_Holding.pl index 6497637..2cf8c5b 100644 --- a/installcheck/Amanda_Holding.pl +++ b/installcheck/Amanda_Holding.pl @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Amanda_IPC_Binary.pl b/installcheck/Amanda_IPC_Binary.pl index ee3d6ff..231b8fd 100644 --- a/installcheck/Amanda_IPC_Binary.pl +++ b/installcheck/Amanda_IPC_Binary.pl @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Amanda_IPC_LineProtocol.pl b/installcheck/Amanda_IPC_LineProtocol.pl index b1f1484..3d8d3fe 100644 --- a/installcheck/Amanda_IPC_LineProtocol.pl +++ b/installcheck/Amanda_IPC_LineProtocol.pl @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Amanda_Logfile.pl b/installcheck/Amanda_Logfile.pl index deec0e5..cf2c654 100644 --- a/installcheck/Amanda_Logfile.pl +++ b/installcheck/Amanda_Logfile.pl @@ -1,8 +1,9 @@ # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Amanda_MainLoop.pl b/installcheck/Amanda_MainLoop.pl index 13abc47..ba378ac 100644 --- a/installcheck/Amanda_MainLoop.pl +++ b/installcheck/Amanda_MainLoop.pl @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Amanda_NDMP.pl b/installcheck/Amanda_NDMP.pl index 0456d69..1b29f5e 100644 --- a/installcheck/Amanda_NDMP.pl +++ b/installcheck/Amanda_NDMP.pl @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Amanda_Process.pl b/installcheck/Amanda_Process.pl index b82ac35..b78950a 100644 --- a/installcheck/Amanda_Process.pl +++ b/installcheck/Amanda_Process.pl @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Amanda_Recovery_Clerk.pl b/installcheck/Amanda_Recovery_Clerk.pl index 5a14d1b..9c3bfb8 100644 --- a/installcheck/Amanda_Recovery_Clerk.pl +++ b/installcheck/Amanda_Recovery_Clerk.pl @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 Zmanda Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Amanda_Recovery_Planner.pl b/installcheck/Amanda_Recovery_Planner.pl index 61a5985..6318c74 100644 --- a/installcheck/Amanda_Recovery_Planner.pl +++ b/installcheck/Amanda_Recovery_Planner.pl @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 Zmanda Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Amanda_Recovery_Scan.pl b/installcheck/Amanda_Recovery_Scan.pl index 354d0f9..6506642 100644 --- a/installcheck/Amanda_Recovery_Scan.pl +++ b/installcheck/Amanda_Recovery_Scan.pl @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Amanda_Report.pl b/installcheck/Amanda_Report.pl index ebfd095..b980c02 100755 --- a/installcheck/Amanda_Report.pl +++ b/installcheck/Amanda_Report.pl @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Amanda_Tapelist.pl b/installcheck/Amanda_Tapelist.pl index 37dac01..f22d555 100644 --- a/installcheck/Amanda_Tapelist.pl +++ b/installcheck/Amanda_Tapelist.pl @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -67,6 +68,9 @@ sub readtapelist { "20071110010002 TESTCONF003 reuse BARCODE:BAR-003 BLOCKSIZE:32\n", "20071109010002 TESTCONF002 reuse BARCODE:BAR-002 META:META2 BLOCKSIZE:64 #comment 2\n", "20071108010001 TESTCONF001 no-reuse #comment 1\n", + "20071107110002 TESTCONF015\n", + "20071107010002 TESTCONF006 no-reuse\n", + "20071106010002 TESTCONF005 reuse\n", ); mktapelist($tapelist, @lines); @@ -87,6 +91,15 @@ $tl_ok = is_deeply($tl, { { 'datestamp' => '20071108010001', 'label' => 'TESTCONF001', 'reuse' => '', 'position' => 4, 'blocksize' => undef, 'barcode' => undef, 'meta' => undef, 'comment' => 'comment 1' }, + { 'datestamp' => '20071107110002', 'label' => 'TESTCONF015', + 'reuse' => 1, 'position' => 5, 'blocksize' => undef, + 'barcode' => undef, 'meta' => undef, 'comment' => undef }, + { 'datestamp' => '20071107010002', 'label' => 'TESTCONF006', + 'reuse' => '', 'position' => 6, 'blocksize' => undef, + 'barcode' => undef, 'meta' => undef, 'comment' => undef }, + { 'datestamp' => '20071106010002', 'label' => 'TESTCONF005', + 'reuse' => 1, 'position' => 7, 'blocksize' => undef, + 'barcode' => undef, 'meta' => undef, 'comment' => undef }, ] }, "A simple tapelist is parsed correctly"); SKIP: { @@ -96,6 +109,8 @@ SKIP: { # now try writing it out and check that the results are the same $tl->write("$tapelist-new"); my @reread_lines = readtapelist("$tapelist-new"); + chomp($lines[4]); + $lines[4] .= " reuse\n"; #'reuse' is automatically written is_deeply(\@reread_lines, \@lines, "Lines of freshly written tapelist match the original"); is_deeply($tl->lookup_tapelabel('TESTCONF002'), @@ -127,7 +142,7 @@ SKIP: { # try some edits $tl->add_tapelabel("20080112010203", "TESTCONF007", "seven", 1, 'META3', 'BAR-007'); - is(scalar @{$tl->{'tles'}}, 5, "add_tapelabel adds a new element to the tapelist"); + is(scalar @{$tl->{'tles'}}, 8, "add_tapelabel adds a new element to the tapelist"); is_deeply($tl->lookup_tapepos(1), { 'datestamp' => '20080112010203', 'label' => 'TESTCONF007', @@ -149,7 +164,7 @@ SKIP: { # try some edits $tl->add_tapelabel("20080112010204", "TESTCONF008", "eight", 0, undef, undef, 128); - is(scalar @{$tl->{'tles'}}, 6, "add_tapelabel adds a new element to the tapelist no-reuse"); + is(scalar @{$tl->{'tles'}}, 9, "add_tapelabel adds a new element to the tapelist no-reuse"); is_deeply($tl->lookup_tapelabel("TESTCONF008"), { 'datestamp' => '20080112010204', 'label' => 'TESTCONF008', @@ -158,10 +173,10 @@ SKIP: { ".. lookup_tapelabel finds it no-reuse"); $tl->remove_tapelabel("TESTCONF008"); - is(scalar @{$tl->{'tles'}}, 5, "remove_tapelabel removes an element from the tapelist, no-reuse"); + is(scalar @{$tl->{'tles'}}, 8, "remove_tapelabel removes an element from the tapelist, no-reuse"); $tl->remove_tapelabel("TESTCONF002"); - is(scalar @{$tl->{'tles'}}, 4, "remove_tapelabel removes an element from the tapelist"); + is(scalar @{$tl->{'tles'}}, 7, "remove_tapelabel removes an element from the tapelist"); is_deeply($tl->lookup_tapepos(4), # used to be in position 5 { 'datestamp' => '20071108010001', 'label' => 'TESTCONF001', @@ -199,20 +214,20 @@ SKIP: { or die("config_init failed"); is( Amanda::Tapelist::get_last_reusable_tape_label(0), - 'TESTCONF002', ".. get_last_reusable_tape_labe for skip=0" ); + 'TESTCONF005', ".. get_last_reusable_tape_labe for skip=0" ); is( Amanda::Tapelist::get_last_reusable_tape_label(2), - 'TESTCONF004', ".. get_last_reusable_tape_labe for skip=2" ); + 'TESTCONF002', ".. get_last_reusable_tape_labe for skip=2" ); } # try parsing various invalid lines @lines = ( "2006123456 FOO reuse\n", # valid - "TESTCONF003 290385098 reuse\n", # invalid - "20071109010002 TESTCONF002 re-use\n", # invalid - "20071108010001 TESTCONF001\n", # invalid - "20071108010001 TESTCONF001 #comment\n", # invalid - "#comment\n", # invalid +# "TESTCONF003 290385098 reuse\n", # invalid +# "20071109010002 TESTCONF002 re-use\n", # invalid +# "20071108010001 TESTCONF001\n", # invalid +# "20071108010001 TESTCONF001 #comment\n", # invalid +# "#comment\n", # invalid ); mktapelist($tapelist, @lines); diff --git a/installcheck/Amanda_Taper_Scan.pl b/installcheck/Amanda_Taper_Scan.pl index a2d9609..8d37aa6 100644 --- a/installcheck/Amanda_Taper_Scan.pl +++ b/installcheck/Amanda_Taper_Scan.pl @@ -1,8 +1,9 @@ # Copyright (c) Zmanda Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -66,6 +67,7 @@ set_tapelist(<read_tapelist(); diff --git a/installcheck/Amanda_Taper_Scan_lexical.pl b/installcheck/Amanda_Taper_Scan_lexical.pl index ad853ef..0df3a6d 100644 --- a/installcheck/Amanda_Taper_Scan_lexical.pl +++ b/installcheck/Amanda_Taper_Scan_lexical.pl @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 Zmanda Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Amanda_Taper_Scan_oldest.pl b/installcheck/Amanda_Taper_Scan_oldest.pl index 2b38b66..cde55ac 100644 --- a/installcheck/Amanda_Taper_Scan_oldest.pl +++ b/installcheck/Amanda_Taper_Scan_oldest.pl @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 Zmanda Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Amanda_Taper_Scan_traditional.pl b/installcheck/Amanda_Taper_Scan_traditional.pl index 4e51bf6..7c9424b 100644 --- a/installcheck/Amanda_Taper_Scan_traditional.pl +++ b/installcheck/Amanda_Taper_Scan_traditional.pl @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 Zmanda Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Amanda_Taper_Scribe.pl b/installcheck/Amanda_Taper_Scribe.pl index 630334a..07dc4c3 100644 --- a/installcheck/Amanda_Taper_Scribe.pl +++ b/installcheck/Amanda_Taper_Scribe.pl @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 Zmanda Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Amanda_Util.pl b/installcheck/Amanda_Util.pl index 0a83d0d..33b2bb3 100644 --- a/installcheck/Amanda_Util.pl +++ b/installcheck/Amanda_Util.pl @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Amanda_Xfer.pl b/installcheck/Amanda_Xfer.pl index 5e86e12..ffa454d 100644 --- a/installcheck/Amanda_Xfer.pl +++ b/installcheck/Amanda_Xfer.pl @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -759,7 +760,7 @@ SKIP: { 2368*1024, 0); }, [ "PART-1-OK", "PART-2-OK", "EOM", - "PART-3-OK", + "PART-2-OK", "DONE" ], "Amanda::Xfer::Dest::Taper::Splitter - LEOM hits in file 2 header"); test_recovery_source( diff --git a/installcheck/Installcheck.pm b/installcheck/Installcheck.pm index ff5eb55..60fcf55 100644 --- a/installcheck/Installcheck.pm +++ b/installcheck/Installcheck.pm @@ -1,9 +1,10 @@ # vim:ft=perl # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Installcheck/Application.pm b/installcheck/Installcheck/Application.pm index daaef5b..4466a10 100644 --- a/installcheck/Installcheck/Application.pm +++ b/installcheck/Installcheck/Application.pm @@ -1,9 +1,10 @@ # vim:ft=perl # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Installcheck/Catalogs.pm b/installcheck/Installcheck/Catalogs.pm index 6c8fe5a..84c5e45 100644 --- a/installcheck/Installcheck/Catalogs.pm +++ b/installcheck/Installcheck/Catalogs.pm @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Installcheck/Changer.pm b/installcheck/Installcheck/Changer.pm index 8c4432d..93a162c 100644 --- a/installcheck/Installcheck/Changer.pm +++ b/installcheck/Installcheck/Changer.pm @@ -1,9 +1,10 @@ # vim:ft=perl # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Installcheck/ClientService.pm b/installcheck/Installcheck/ClientService.pm index e77b659..6de91ea 100644 --- a/installcheck/Installcheck/ClientService.pm +++ b/installcheck/Installcheck/ClientService.pm @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Installcheck/Config.pm b/installcheck/Installcheck/Config.pm index cf69801..d9b4a7d 100644 --- a/installcheck/Installcheck/Config.pm +++ b/installcheck/Installcheck/Config.pm @@ -1,9 +1,10 @@ # vim:ft=perl # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -435,8 +436,10 @@ sub _write_amanda_conf_subsection { $value = shift @values; if ($param eq "inherit") { print $amanda_conf "$value\n"; - } else { + } elsif (defined $value) { print $amanda_conf "$param $value\n"; + } else { + print $amanda_conf "$param\n"; } } print $amanda_conf "}\n"; diff --git a/installcheck/Installcheck/Dumpcache.pm b/installcheck/Installcheck/Dumpcache.pm index 7358428..ce2189a 100644 --- a/installcheck/Installcheck/Dumpcache.pm +++ b/installcheck/Installcheck/Dumpcache.pm @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Installcheck/Mock.pm b/installcheck/Installcheck/Mock.pm index 631b117..6139252 100644 --- a/installcheck/Installcheck/Mock.pm +++ b/installcheck/Installcheck/Mock.pm @@ -1,9 +1,10 @@ # vim:ft=perl # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Installcheck/Run.pm b/installcheck/Installcheck/Run.pm index e3e29c3..9235aaf 100644 --- a/installcheck/Installcheck/Run.pm +++ b/installcheck/Installcheck/Run.pm @@ -1,9 +1,10 @@ # vim:ft=perl # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/Makefile.am b/installcheck/Makefile.am index 7914cda..3192c51 100644 --- a/installcheck/Makefile.am +++ b/installcheck/Makefile.am @@ -192,7 +192,8 @@ catalogs = \ catalogs/skipped.cat \ catalogs/spanned.cat \ catalogs/strontium.cat \ - catalogs/taperr.cat + catalogs/taperr.cat \ + catalogs/taper-parallel-write.cat EXTRA_DIST += $(catalogs) @@ -216,12 +217,12 @@ clobber_my_config_is_ok: echo "'make installcheck' is a dangerous tool. It will overwrite your"; \ echo "amanda-client.conf and amandates, and (if it triggers an as-yet undetected"; \ echo "bug) may do other unexpected things. You are strongly encouraged"; \ - echo " - not to run installchecks on a production install"; \ - echo " - not to run installchecks as root"; \ + echo " - not to run installchecks on a production install"; \ + echo " - not to run installchecks as root"; \ echo "See http://wiki.zmanda.com/index.php/Testing for instructions on setting up a"; \ echo "test environment in which potential damage is limited by your filesystem's"; \ echo "permissions. To actually run the installchecks, invoke make as follows:"; \ - echo " $(MAKE) CLOBBER_MY_CONFIG=OK installcheck"; \ + echo " $(MAKE) CLOBBER_MY_CONFIG=OK installcheck"; \ exit 1; \ fi @@ -232,7 +233,7 @@ installcheck-local: clobber_my_config_is_ok $(SCRIPTS_PERL) $(mkdir_p) "$(AMANDA_TMPDIR)/installchecks" @if test -f "$(CONFIG_DIR)/amanda-client.conf" -a ! -f "$(CONFIG_DIR)/amanda-client.conf.install-backup"; then \ cp "$(CONFIG_DIR)/amanda-client.conf" "$(CONFIG_DIR)/amanda-client.conf.install-backup"; \ - fi + fi for f in $(tests); do chmod a-x $$f; done srcdir="$(srcdir)" $(PERL) -I$(srcdir) -I. -e 'use Test::Harness qw(&runtests); runtests(sort @ARGV);' $(tests) rm -rf "$(CONFIG_DIR)/TESTCONF" diff --git a/installcheck/Makefile.in b/installcheck/Makefile.in index 4388a2f..0bfb149 100644 --- a/installcheck/Makefile.in +++ b/installcheck/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -18,9 +18,10 @@ # vim:ft=automake # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -40,9 +41,10 @@ # vim:ft=automake # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -109,6 +111,23 @@ # configure.in VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -310,6 +329,11 @@ CONFIG_CLEAN_VPATH_FILES = SCRIPTS = $(noinst_SCRIPTS) SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AIX_BACKUP = @AIX_BACKUP@ @@ -1279,7 +1303,8 @@ catalogs = \ catalogs/skipped.cat \ catalogs/spanned.cat \ catalogs/strontium.cat \ - catalogs/taperr.cat + catalogs/taperr.cat \ + catalogs/taper-parallel-write.cat # and finally some development utilities @@ -1318,6 +1343,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; +$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/scripts.am: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -1391,10 +1417,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) @@ -1604,12 +1635,12 @@ clobber_my_config_is_ok: echo "'make installcheck' is a dangerous tool. It will overwrite your"; \ echo "amanda-client.conf and amandates, and (if it triggers an as-yet undetected"; \ echo "bug) may do other unexpected things. You are strongly encouraged"; \ - echo " - not to run installchecks on a production install"; \ - echo " - not to run installchecks as root"; \ + echo " - not to run installchecks on a production install"; \ + echo " - not to run installchecks as root"; \ echo "See http://wiki.zmanda.com/index.php/Testing for instructions on setting up a"; \ echo "test environment in which potential damage is limited by your filesystem's"; \ echo "permissions. To actually run the installchecks, invoke make as follows:"; \ - echo " $(MAKE) CLOBBER_MY_CONFIG=OK installcheck"; \ + echo " $(MAKE) CLOBBER_MY_CONFIG=OK installcheck"; \ exit 1; \ fi @@ -1620,7 +1651,7 @@ installcheck-local: clobber_my_config_is_ok $(SCRIPTS_PERL) $(mkdir_p) "$(AMANDA_TMPDIR)/installchecks" @if test -f "$(CONFIG_DIR)/amanda-client.conf" -a ! -f "$(CONFIG_DIR)/amanda-client.conf.install-backup"; then \ cp "$(CONFIG_DIR)/amanda-client.conf" "$(CONFIG_DIR)/amanda-client.conf.install-backup"; \ - fi + fi for f in $(tests); do chmod a-x $$f; done srcdir="$(srcdir)" $(PERL) -I$(srcdir) -I. -e 'use Test::Harness qw(&runtests); runtests(sort @ARGV);' $(tests) rm -rf "$(CONFIG_DIR)/TESTCONF" diff --git a/installcheck/amadmin.pl b/installcheck/amadmin.pl index 657c460..2e4cdd1 100644 --- a/installcheck/amadmin.pl +++ b/installcheck/amadmin.pl @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -16,7 +17,7 @@ # Contact information: Zmanda Inc, 465 S Mathilda Ave, Suite 300 # Sunnyvale, CA 94086, USA, or: http://www.zmanda.com -use Test::More tests => 18; +use Test::More tests => 23; use strict; use warnings; @@ -123,4 +124,25 @@ like(run_get('amadmin TESTCONF force localhost share-a share-a'), like(run_get('amadmin TESTCONF balance --days 12'), qr/No data to report on yet.$/, - "shell 13"); + "shell 14"); + +like(run_get('amadmin TESTCONF force =localhost share-a'), + qr/^amadmin: localhost:\\\\windows\\share-a is set to a forced level 0 at next run.$/, + "shell 15"); + +like(run_get('amadmin TESTCONF force =localhost =share-a'), + qr/^Argument '=share-a' matches neither a host nor a disk.$/, + "shell 16"); + +like(run_get('amadmin --exact-match TESTCONF force localhost share-a'), + qr/^Argument '=share-a' matches neither a host nor a disk.$/, + "shell 17"); + +like(run_get('amadmin TESTCONF force =localhost \'=\\\\windows\\share-a\''), + qr/^amadmin: localhost:\\\\windows\\share-a is set to a forced level 0 at next run.$/, + "shell 18"); + +like(run_get('amadmin --exact-match TESTCONF force localhost \'\\\\windows\\share-a\''), + qr/^amadmin: localhost:\\\\windows\\share-a is set to a forced level 0 at next run.$/, + "shell 19"); + diff --git a/installcheck/amarchiver.pl b/installcheck/amarchiver.pl index c0c6dff..8c719f0 100644 --- a/installcheck/amarchiver.pl +++ b/installcheck/amarchiver.pl @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/amcheck-device.pl b/installcheck/amcheck-device.pl index 45caa2f..27fe499 100644 --- a/installcheck/amcheck-device.pl +++ b/installcheck/amcheck-device.pl @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/amcheck.pl b/installcheck/amcheck.pl index c9214c6..1de6321 100644 --- a/installcheck/amcheck.pl +++ b/installcheck/amcheck.pl @@ -1,8 +1,9 @@ # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/amcheckdump.pl b/installcheck/amcheckdump.pl index 7e7d97a..875cf0d 100644 --- a/installcheck/amcheckdump.pl +++ b/installcheck/amcheckdump.pl @@ -1,8 +1,9 @@ # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/amdevcheck.pl b/installcheck/amdevcheck.pl index d8423a5..25de41b 100644 --- a/installcheck/amdevcheck.pl +++ b/installcheck/amdevcheck.pl @@ -1,8 +1,9 @@ # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -50,7 +51,7 @@ $testconf->write(); # test some defaults ok(run('amdevcheck', 'TESTCONF'), "run succeeds with a null tapedev"); is_deeply([ sort split "\n", $Installcheck::Run::stdout], - [ sort "MESSAGE Can't open NULL device for reading or appending.", "DEVICE_ERROR"], + [ sort "MESSAGE Can't open NULL device for reading or appending.", "VOLUME_UNLABELED", "VOLUME_ERROR"], "Fail with correct message for a null tapedev"); ## @@ -92,7 +93,7 @@ is_deeply([ sort split "\n", $Installcheck::Run::stdout], ok(run('amdevcheck', 'TESTCONF', 'null:null'), "can override device on the command line"); is_deeply([ sort split "\n", $Installcheck::Run::stdout], - [ sort "MESSAGE Can't open NULL device for reading or appending.", "DEVICE_ERROR"], + [ sort "MESSAGE Can't open NULL device for reading or appending.", "VOLUME_UNLABELED", "VOLUME_ERROR"], ".. and produce a corresponding error message"); Installcheck::Dumpcache::load("basic"); diff --git a/installcheck/amdump.pl b/installcheck/amdump.pl index 5c7e9fe..e6dc1a9 100644 --- a/installcheck/amdump.pl +++ b/installcheck/amdump.pl @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/amdump_client.pl b/installcheck/amdump_client.pl index f938367..9426a27 100644 --- a/installcheck/amdump_client.pl +++ b/installcheck/amdump_client.pl @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/amfetchdump.pl b/installcheck/amfetchdump.pl index a1adf9a..97ebf50 100644 --- a/installcheck/amfetchdump.pl +++ b/installcheck/amfetchdump.pl @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/amflush.pl b/installcheck/amflush.pl index 009b207..3df69e2 100644 --- a/installcheck/amflush.pl +++ b/installcheck/amflush.pl @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/amgetconf.pl b/installcheck/amgetconf.pl index 2854d20..eb0a869 100644 --- a/installcheck/amgetconf.pl +++ b/installcheck/amgetconf.pl @@ -1,8 +1,9 @@ # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/amgtar.pl b/installcheck/amgtar.pl index 14bdb42..9652754 100644 --- a/installcheck/amgtar.pl +++ b/installcheck/amgtar.pl @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/amidxtaped.pl b/installcheck/amidxtaped.pl index b29ac6f..57d6856 100644 --- a/installcheck/amidxtaped.pl +++ b/installcheck/amidxtaped.pl @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/amlabel.pl b/installcheck/amlabel.pl index dea6ea3..8d8024e 100644 --- a/installcheck/amlabel.pl +++ b/installcheck/amlabel.pl @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/amoverview.pl b/installcheck/amoverview.pl index 65d6ceb..a23cf97 100644 --- a/installcheck/amoverview.pl +++ b/installcheck/amoverview.pl @@ -1,8 +1,9 @@ # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/ampgsql.pl b/installcheck/ampgsql.pl index 4c21d86..f4c9c08 100644 --- a/installcheck/ampgsql.pl +++ b/installcheck/ampgsql.pl @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/amraw.pl b/installcheck/amraw.pl index c8eb5aa..f5c8342 100644 --- a/installcheck/amraw.pl +++ b/installcheck/amraw.pl @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/amrecover.pl b/installcheck/amrecover.pl index f7bedcc..341ce66 100644 --- a/installcheck/amrecover.pl +++ b/installcheck/amrecover.pl @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/amreport.pl b/installcheck/amreport.pl index d8532d5..0d27adf 100644 --- a/installcheck/amreport.pl +++ b/installcheck/amreport.pl @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/amrestore.pl b/installcheck/amrestore.pl index 032c9a6..e53192c 100644 --- a/installcheck/amrestore.pl +++ b/installcheck/amrestore.pl @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/amrmtape.pl b/installcheck/amrmtape.pl index 1ddfa89..7b080c6 100644 --- a/installcheck/amrmtape.pl +++ b/installcheck/amrmtape.pl @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/amserverconfig.pl b/installcheck/amserverconfig.pl index 8c1567d..e273745 100644 --- a/installcheck/amserverconfig.pl +++ b/installcheck/amserverconfig.pl @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/amservice.pl b/installcheck/amservice.pl index 9a93bc7..11bf994 100644 --- a/installcheck/amservice.pl +++ b/installcheck/amservice.pl @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/amstatus.pl b/installcheck/amstatus.pl index 1b71d9f..f36d9cf 100644 --- a/installcheck/amstatus.pl +++ b/installcheck/amstatus.pl @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -16,7 +17,7 @@ # Contact information: Zmanda Inc, 465 S. Mathilda Ave., Suite 300 # Sunnyvale, CA 94086, USA, or: http://www.zmanda.com -use Test::More tests => 10; +use Test::More tests => 12; use strict; use warnings; @@ -73,5 +74,16 @@ ok(!run('amstatus', 'TESTCONF'), is($Installcheck::Run::exit_code, 4, "correct exit code for chunker partial"); like($Installcheck::Run::stdout, - qr{localhost:/etc 0 backup failed: dumper: \[/usr/sbin/tar returned error\] \(7:49:23\)}, + qr{localhost:/etc 0\s*80917k dump failed: dumper: \[/usr/sbin/tar returned error\], finished \(7:49:53\)}, + "output is correct"); + +## now test a taper-parallel-write > 1 + +$cat = Installcheck::Catalogs::load('taper-parallel-write'); +$cat->install(); + +ok(run('amstatus', 'TESTCONF'), + "amstatus with taper-parallel-write runs without error"); +like($Installcheck::Run::stdout, + qr{\s*tape 3\s*:\s*1\s*142336k\s*142336k \( 5.82\%\) amstatus_test_3-AA-003 \(1 chunks\)}, "output is correct"); diff --git a/installcheck/amtape.pl b/installcheck/amtape.pl index 9601b51..3f2f63a 100644 --- a/installcheck/amtape.pl +++ b/installcheck/amtape.pl @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/amtapetype.pl b/installcheck/amtapetype.pl index 38b70cc..27ce981 100644 --- a/installcheck/amtapetype.pl +++ b/installcheck/amtapetype.pl @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/amvault.pl b/installcheck/amvault.pl index 917d6b4..b5f966e 100644 --- a/installcheck/amvault.pl +++ b/installcheck/amvault.pl @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/bigint.pl b/installcheck/bigint.pl index 011ac76..7f67afd 100644 --- a/installcheck/bigint.pl +++ b/installcheck/bigint.pl @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/catalogs/amflush.cat b/installcheck/catalogs/amflush.cat index 783ff7f..959bc94 100644 --- a/installcheck/catalogs/amflush.cat +++ b/installcheck/catalogs/amflush.cat @@ -61,10 +61,10 @@ DUMP SUMMARY: DUMPER STATS TAPER STATS HOSTNAME DISK L ORIG-kB OUT-kB COMP% MMM:SS KB/s MMM:SS KB/s -------------------------- ------------------------------------- -------------- -localhost /home NO FILE TO FLUSH ----------------------------------- -localhost /opt NO FILE TO FLUSH ----------------------------------- +localhost /home NOT FLUSHED +localhost /opt NOT FLUSHED localhost /usr/lib 1 309 -- FLUSH 0:02 184.6 -localhost /usr/local NO FILE TO FLUSH ----------------------------------- +localhost /usr/local NOT FLUSHED localhost /var/mysql 1 36980 -- FLUSH 0:03 14766.5 (brought to you by Amanda version x.y.z) diff --git a/installcheck/catalogs/bigdb.cat b/installcheck/catalogs/bigdb.cat index 41351b7..e98449c 100644 --- a/installcheck/catalogs/bigdb.cat +++ b/installcheck/catalogs/bigdb.cat @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/catalogs/taper-parallel-write.cat b/installcheck/catalogs/taper-parallel-write.cat new file mode 100644 index 0000000..e2a6f91 --- /dev/null +++ b/installcheck/catalogs/taper-parallel-write.cat @@ -0,0 +1,266 @@ +# an amdump logfile to check amstatus's display of taper-parallel-write > 1 + +%F log/amdump +amdump: start at Wed Sep 19 14:35:30 PDT 2012 +amdump: datestamp 20120919 +amdump: starttime 20120919143530 +amdump: starttime-locale-independent 2012-09-19 14:35:30 PDT +planner: pid 5286 executable /usr/lib/amanda/planner version 3.3.2 +planner: build: VERSION="Amanda-3.3.2" +planner: BUILT_DATE="Tue Jul 24 13:28:42 PDT 2012" BUILT_MACH="" +planner: BUILT_REV="4847" BUILT_BRANCH="zmanda_3_3_2" +planner: CC="i486-linux-gnu-gcc" +planner: paths: bindir="/usr/bin" sbindir="/usr/sbin" +planner: libexecdir="/usr/lib" amlibexecdir="/usr/lib/amanda" +planner: mandir="/usr/share/man" AMANDA_TMPDIR="/tmp/amanda" +planner: AMANDA_DBGDIR="/var/log/amanda" CONFIG_DIR="/etc/amanda" +planner: DEV_PREFIX="/dev/" RDEV_PREFIX="/dev/" DUMP="/sbin/dump" +planner: RESTORE="/sbin/restore" VDUMP=UNDEF VRESTORE=UNDEF +planner: XFSDUMP="/sbin/xfsdump" XFSRESTORE="/sbin/xfsrestore" +planner: VXDUMP=UNDEF VXRESTORE=UNDEF +planner: SAMBA_CLIENT="/usr/bin/smbclient" GNUTAR="/bin/tar" +planner: COMPRESS_PATH="/bin/gzip" UNCOMPRESS_PATH="/bin/gzip" +planner: LPRCMD=UNDEF MAILER=UNDEF +planner: listed_incr_dir="/var/lib/amanda/gnutar-lists" +planner: defs: DEFAULT_SERVER="localhost" DEFAULT_CONFIG="DailySet1" +planner: DEFAULT_TAPE_SERVER="localhost" DEFAULT_TAPE_DEVICE="" +planner: NEED_STRSTR AMFLOCK_POSIX AMFLOCK_FLOCK AMFLOCK_LOCKF +planner: AMFLOCK_LNLOCK SETPGRP_VOID ASSERTIONS AMANDA_DEBUG_DAYS=4 +planner: BSD_SECURITY USE_AMANDAHOSTS CLIENT_LOGIN="amandabackup" +planner: CHECK_USERID HAVE_GZIP COMPRESS_SUFFIX=".gz" +planner: COMPRESS_FAST_OPT="--fast" COMPRESS_BEST_OPT="--best" +planner: UNCOMPRESS_OPT="-dc" +READING CONF INFO... +planner: timestamp 20120919143530 +planner: tape_length is set from tape length (2445312 KB) * runtapes (1000) == 2445312000 KB +planner: time 0.000: startup took 0.000 secs + +SENDING FLUSHES... +ENDFLUSH + +SETTING UP FOR ESTIMATES... +planner: time 0.000: setting up estimates for localhost:/root/testfile/732mb +localhost:/root/testfile/732mb overdue 15603 days for level 0 +setup_estimate: localhost:/root/testfile/732mb: command 0, options: none last_level -1 next_level0 -15603 level_days 0 getting estimates 0 (-3) -1 (-3) -1 (-3) +planner: time 0.000: setting up estimates for centos6-43-client:/root/testfile/36mb +centos6-43-client:/root/testfile/36mb overdue 15603 days for level 0 +setup_estimate: centos6-43-client:/root/testfile/36mb: command 0, options: none last_level -1 next_level0 -15603 level_days 0 getting estimates 0 (-3) -1 (-3) -1 (-3) +planner: time 0.001: setting up estimates for qa-debian6-x64-anuj:/root/testfile/146mb +qa-debian6-x64-anuj:/root/testfile/146mb overdue 15603 days for level 0 +setup_estimate: qa-debian6-x64-anuj:/root/testfile/146mb: command 0, options: none last_level -1 next_level0 -15603 level_days 0 getting estimates 0 (-3) -1 (-3) -1 (-3) +planner: time 0.001: setting up estimates took 0.000 secs + +GETTING ESTIMATES... +driver: pid 5287 executable /usr/lib/amanda/driver version 3.3.2 +driver: tape size 2445312 +reserving 0 out of 0 for degraded-mode dumps +driver: started dumper0 pid 5290 +driver: send-cmd time 0.027 to dumper0: START 20120919143530 +driver: started dumper1 pid 5292 +driver: send-cmd time 0.048 to dumper1: START 20120919143530 +driver: send-cmd time 0.049 to taper: START-TAPER worker0 20120919143530 +driver: start time 0.049 inparallel 2 bandwidth 2000000 diskspace 0 dir OBSOLETE datestamp 20120919143530 driver: drain-ends tapeq LARGEST big-dumpers sS +driver: state time 0.049 free kps: 2000000 space: 0 taper: idle idle-dumpers: 2 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: not-idle +driver: interface-state time 0.049 if default: free 2000000 +driver: hdisk-state time 0.049 +dumper: pid 5292 executable dumper1 version 3.3.2 +dumper: pid 5290 executable dumper0 version 3.3.2 +planner time 1.062: got result for host qa-debian6-x64-anuj disk /root/testfile/146mb: 0 -> 1000000K, -1 -> -3K, -1 -> -3K +planner time 1.079: got result for host centos6-43-client disk /root/testfile/36mb: 0 -> 1000000K, -1 -> -3K, -1 -> -3K +planner: time 1.143: got partial result for host qa-debian6-x64-anuj disk /root/testfile/146mb: 0 -> 1000000K, -1 -> -3K, -1 -> -3K +planner: time 1.163: got partial result for host centos6-43-client disk /root/testfile/36mb: 0 -> 1000000K, -1 -> -3K, -1 -> -3K +planner time 1.175: got result for host localhost disk /root/testfile/732mb: 0 -> 1000000K, -1 -> -3K, -1 -> -3K +planner: time 1.228: got partial result for host localhost disk /root/testfile/732mb: 0 -> 1000000K, -1 -> -3K, -1 -> -3K +planner: time 1.266: got partial result for host qa-debian6-x64-anuj disk /root/testfile/146mb: 0 -> 142298K, -1 -> -3K, -1 -> -3K +driver: state time 1.292 free kps: 2000000 space: 0 taper: idle idle-dumpers: 2 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: not-idle +driver: interface-state time 1.292 if default: free 2000000 +driver: hdisk-state time 1.292 +driver: result time 1.292 from taper: TAPER-OK worker0 +planner: time 1.375: got partial result for host centos6-43-client disk /root/testfile/36mb: 0 -> 35576K, -1 -> -3K, -1 -> -3K +planner: time 1.383: got partial result for host localhost disk /root/testfile/732mb: 0 -> 715055K, -1 -> -3K, -1 -> -3K +planner: time 2.270: got result for host qa-debian6-x64-anuj disk /root/testfile/146mb: 0 -> 142298K, -1 -> -3K, -1 -> -3K +planner: time 2.379: got result for host centos6-43-client disk /root/testfile/36mb: 0 -> 35576K, -1 -> -3K, -1 -> -3K +planner: time 2.385: got result for host localhost disk /root/testfile/732mb: 0 -> 715055K, -1 -> -3K, -1 -> -3K +planner: time 2.386: getting estimates took 2.384 secs +FAILED QUEUE: empty +DONE QUEUE: + 0: qa-debian6-x64-anuj /root/testfile/146mb + 1: centos6-43-client /root/testfile/36mb + 2: localhost /root/testfile/732mb + +ANALYZING ESTIMATES... +pondering qa-debian6-x64-anuj:/root/testfile/146mb... next_level0 -15603 last_level -1 (due for level 0) (new disk, can't switch to degraded mode) + curr level 0 nsize 142298 csize 142298 total size 142397 total_lev0 142298 balanced-lev0size 28459 +pondering centos6-43-client:/root/testfile/36mb... next_level0 -15603 last_level -1 (due for level 0) (new disk, can't switch to degraded mode) + curr level 0 nsize 35576 csize 35576 total size 178006 total_lev0 177874 balanced-lev0size 35574 +pondering localhost:/root/testfile/732mb... next_level0 -15603 last_level -1 (due for level 0) (new disk, can't switch to degraded mode) + curr level 0 nsize 715055 csize 715055 total size 893094 total_lev0 892929 balanced-lev0size 178585 +INITIAL SCHEDULE (size 893094): + localhost /root/testfile/732mb pri 15604 lev 0 nsize 715055 csize 715055 + qa-debian6-x64-anuj /root/testfile/146mb pri 15604 lev 0 nsize 142298 csize 142298 + centos6-43-client /root/testfile/36mb pri 15604 lev 0 nsize 35576 csize 35576 + +DELAYING DUMPS IF NEEDED, total_size 893094, tape length 2445312000 mark 1 + delay: Total size now 893094. + +PROMOTING DUMPS IF NEEDED, total_lev0 892929, balanced_size 178585... +planner: time 2.386: analysis took 0.000 secs + +GENERATING SCHEDULE: +-------- +DUMP localhost ffffffff9efefbffffffffff1f /root/testfile/732mb 20120919143530 15604 0 1970:1:1:0:0:0 715055 715055 698 1024 "Skipping: new disk can't be dumped in degraded mode" +DUMP qa-debian6-x64-anuj ffffffff9efefbffffffffff1f /root/testfile/146mb 20120919143530 15604 0 1970:1:1:0:0:0 142298 142298 138 1024 "Skipping: new disk can't be dumped in degraded mode" +DUMP centos6-43-client ffffffff9efefbffffffffff1f /root/testfile/36mb 20120919143530 15604 0 1970:1:1:0:0:0 35576 35576 34 1024 "Skipping: new disk can't be dumped in degraded mode" +-------- +driver: flush size 0 +find diskspace: not enough diskspace. Left with 715104 K +find diskspace: not enough diskspace. Left with 142336 K +find diskspace: not enough diskspace. Left with 35616 K +driver: send-cmd time 2.399 to taper: PORT-WRITE worker0 00-00001 localhost /root/testfile/732mb 0 20120919143530 "" "" "" 0 "" "" "" "" AMANDA +driver: state time 2.399 free kps: 1998976 space: 0 taper: writing idle-dumpers: 1 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-diskspace +driver: interface-state time 2.399 if default: free 1998976 +driver: hdisk-state time 2.399 +driver: state time 2.412 free kps: 1998976 space: 0 taper: writing idle-dumpers: 1 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-diskspace +driver: interface-state time 2.412 if default: free 1998976 +driver: hdisk-state time 2.412 +driver: result time 2.412 from taper: PORT worker0 00-00001 55940 "127.0.0.1:43682" +driver: send-cmd time 2.413 to dumper1: PORT-DUMP 00-00001 55940 localhost ffffffff9efefbffffffffff1f /root/testfile/732mb /root/testfile/732mb 0 1970:1:1:0:0:0 amgtar "" "" "" "" bsdtcp AMANDA 127.0.0.1:43682 20 |" bsdtcp\n YES\n YES\n AMANDA\n \n zmc-show-advanced\n off\n \n \n zmc-amanda-app\n gtar\n \n \n zmc-amcheck-version\n 3.3.2\n \n \n zmc-disklist\n amstatus_test_3\n \n \n zmc-amcheck-app\n 1.23\n \n \n zmc-version\n 3\n \n \n last-modified-time\n 2012-09-19_14:28:48\n \n \n zmc-type\n unix\n \n \n last-modified-by\n admin\n \n \n zmc-amcheck-platform\n 6.0.5\n \n \n creation-time\n 2012-09-19_14:28:48\n \n \n zmc-amcheck-date\n 20120919142848\n \n \n zmc-occ\n 80901283870\n \n \n amgtar\n \n sparse\n yes\n \n \n one-file-system\n yes\n \n \n check-device\n no\n \n \n xattrs\n no\n \n \n acls\n no\n \n \n selinux\n no\n \n \n atime-preserve\n no\n \n \n tar-blocksize\n 128\n \n \n" +taper: status file localhost /root/testfile/732mb:/tmp/amanda/taper_status_file_T2sTK0 +driver: state time 2.577 free kps: 1998976 space: 0 taper: writing idle-dumpers: 1 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers +driver: interface-state time 2.577 if default: free 1998976 +driver: hdisk-state time 2.577 +driver: result time 2.577 from taper: REQUEST-NEW-TAPE 00-00001 +driver: send-cmd time 2.577 to taper: START-SCAN worker0 00-00001 +driver: send-cmd time 2.577 to taper: NEW-TAPE worker0 00-00001 +taper: wrote label 'amstatus_test_3-AA-001' +driver: state time 2.605 free kps: 1998976 space: 0 taper: writing idle-dumpers: 1 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers +driver: interface-state time 2.605 if default: free 1998976 +driver: hdisk-state time 2.605 +driver: result time 2.605 from taper: NEW-TAPE 00-00001 amstatus_test_3-AA-001 +driver: send-cmd time 2.605 to taper: START-TAPER worker1 20120919143530 +driver: state time 2.638 free kps: 1998976 space: 0 taper: writing idle-dumpers: 1 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers +driver: interface-state time 2.638 if default: free 1998976 +driver: hdisk-state time 2.638 +driver: result time 2.638 from taper: TAPER-OK worker1 +driver: send-cmd time 2.638 to taper: PORT-WRITE worker1 01-00002 centos6-43-client /root/testfile/36mb 0 20120919143530 "" "" "" 0 "" "" "" "" AMANDA +driver: state time 2.638 free kps: 1997952 space: 0 taper: writing idle-dumpers: 0 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers +driver: interface-state time 2.638 if default: free 1997952 +driver: hdisk-state time 2.638 +driver: state time 2.646 free kps: 1997952 space: 0 taper: writing idle-dumpers: 0 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers +driver: interface-state time 2.646 if default: free 1997952 +driver: hdisk-state time 2.646 +driver: result time 2.646 from taper: PORT worker1 01-00002 51317 "127.0.0.1:35712" +driver: send-cmd time 2.646 to dumper0: PORT-DUMP 01-00002 51317 centos6-43-client ffffffff9efefbffffffffff1f /root/testfile/36mb /root/testfile/36mb 0 1970:1:1:0:0:0 amgtar "" "" "" "" bsdtcp AMANDA 127.0.0.1:35712 20 |" bsdtcp\n YES\n YES\n AMANDA\n \n zmc-show-advanced\n off\n \n \n zmc-amanda-app\n gtar\n \n \n zmc-amcheck-version\n 3.3.2\n \n \n zmc-disklist\n amstatus_test_3\n \n \n zmc-amcheck-app\n 1.23\n \n \n zmc-version\n 3\n \n \n last-modified-time\n 2012-09-19_14:29:21\n \n \n zmc-type\n unix\n \n \n last-modified-by\n admin\n \n \n zmc-amcheck-platform\n CentOS__6.3_(Final)\n \n \n creation-time\n 2012-09-19_14:29:21\n \n \n zmc-amcheck-date\n 20120919142922\n \n \n zmc-occ\n 80901619884\n \n \n amgtar\n \n sparse\n yes\n \n \n one-file-system\n yes\n \n \n check-device\n no\n \n \n xattrs\n no\n \n \n acls\n no\n \n \n selinux\n no\n \n \n atime-preserve\n no\n \n \n tar-blocksize\n 128\n \n \n" +taper: status file centos6-43-client /root/testfile/36mb:/tmp/amanda/taper_status_file_EIIMMc +driver: state time 2.797 free kps: 1997952 space: 0 taper: writing idle-dumpers: 0 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers +driver: interface-state time 2.797 if default: free 1997952 +driver: hdisk-state time 2.797 +driver: result time 2.797 from taper: REQUEST-NEW-TAPE 01-00002 +driver: send-cmd time 2.797 to taper: START-SCAN worker1 01-00002 +driver: send-cmd time 2.797 to taper: NEW-TAPE worker1 01-00002 +taper: wrote label 'amstatus_test_3-AA-002' +driver: state time 2.876 free kps: 1997952 space: 0 taper: writing idle-dumpers: 0 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers +driver: interface-state time 2.876 if default: free 1997952 +driver: hdisk-state time 2.876 +driver: result time 2.876 from taper: NEW-TAPE 01-00002 amstatus_test_3-AA-002 +driver: state time 6.224 free kps: 1997952 space: 0 taper: writing idle-dumpers: 0 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers +driver: interface-state time 6.224 if default: free 1997952 +driver: hdisk-state time 6.224 +driver: result time 6.224 from taper: PARTDONE 01-00002 amstatus_test_3-AA-002 1 35584 "[sec 3.338940 bytes 36438016 kps 10657.274046]" +driver: state time 6.226 free kps: 1997952 space: 0 taper: writing idle-dumpers: 0 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers +driver: interface-state time 6.226 if default: free 1997952 +driver: hdisk-state time 6.226 +driver: result time 6.226 from dumper0: DONE 01-00002 35584 35584 4 "[sec 3.505 kb 35584 kps 10150.8 orig-kb 35584]" +driver: finished-cmd time 6.226 dumper0 dumped centos6-43-client:/root/testfile/36mb +driver: send-cmd time 6.226 to taper: DONE worker1 01-00002 35584 +driver: state time 6.240 free kps: 1997952 space: 0 taper: writing idle-dumpers: 0 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers +driver: interface-state time 6.240 if default: free 1997952 +driver: hdisk-state time 6.240 +driver: result time 6.240 from taper: DUMPER-STATUS 01-00002 +driver: send-cmd time 6.240 to taper: DONE worker1 01-00002 35584 +driver: state time 6.243 free kps: 1997952 space: 0 taper: writing idle-dumpers: 0 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers +driver: interface-state time 6.243 if default: free 1997952 +driver: hdisk-state time 6.243 +driver: result time 6.243 from taper: DONE 01-00002 INPUT-GOOD TAPE-GOOD "[sec 4.000000 bytes 36438016 kps 8896.000000 orig-kb 35584]" "" "" +driver: finished-cmd time 6.243 taper wrote centos6-43-client:/root/testfile/36mb +driver: send-cmd time 6.243 to taper: CLOSE-VOLUME worker1 +driver: send-cmd time 6.244 to taper: PORT-WRITE worker1 01-00003 qa-debian6-x64-anuj /root/testfile/146mb 0 20120919143530 "" "" "" 0 "" "" "" "" AMANDA +driver: state time 6.244 free kps: 1997952 space: 0 taper: writing idle-dumpers: 0 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers +driver: interface-state time 6.244 if default: free 1997952 +driver: hdisk-state time 6.244 +driver: state time 6.263 free kps: 1997952 space: 0 taper: writing idle-dumpers: 0 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers +driver: interface-state time 6.263 if default: free 1997952 +driver: hdisk-state time 6.263 +driver: result time 6.263 from taper: PORT worker1 01-00003 35040 "127.0.0.1:54910" +driver: send-cmd time 6.263 to dumper0: PORT-DUMP 01-00003 35040 qa-debian6-x64-anuj ffffffff9efefbffffffffff1f /root/testfile/146mb /root/testfile/146mb 0 1970:1:1:0:0:0 amgtar "" "" "" "" bsdtcp AMANDA 127.0.0.1:54910 20 |" bsdtcp\n YES\n YES\n AMANDA\n \n zmc-show-advanced\n off\n \n \n zmc-amanda-app\n gtar\n \n \n zmc-amcheck-version\n 3.3.2\n \n \n zmc-disklist\n amstatus_test_3\n \n \n zmc-amcheck-app\n 1.23\n \n \n zmc-version\n 3\n \n \n last-modified-time\n 2012-09-19_14:29:52\n \n \n zmc-type\n unix\n \n \n last-modified-by\n admin\n \n \n zmc-amcheck-platform\n 6.0.5\n \n \n creation-time\n 2012-09-19_14:29:52\n \n \n zmc-amcheck-date\n 20120919143206\n \n \n zmc-occ\n 80901928569\n \n \n amgtar\n \n sparse\n yes\n \n \n one-file-system\n yes\n \n \n check-device\n no\n \n \n xattrs\n no\n \n \n acls\n no\n \n \n selinux\n no\n \n \n atime-preserve\n no\n \n \n tar-blocksize\n 128\n \n \n" +taper: status file qa-debian6-x64-anuj /root/testfile/146mb:/tmp/amanda/taper_status_file_R4zzdU +driver: state time 10.772 free kps: 1997952 space: 0 taper: writing idle-dumpers: 0 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers +driver: interface-state time 10.772 if default: free 1997952 +driver: hdisk-state time 10.772 +driver: result time 10.772 from taper: REQUEST-NEW-TAPE 01-00003 +driver: state time 42.899 free kps: 1997952 space: 0 taper: writing idle-dumpers: 0 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers +driver: interface-state time 42.899 if default: free 1997952 +driver: hdisk-state time 42.899 +driver: result time 42.900 from dumper1: DONE 00-00001 715072 715072 40 "[sec 40.387 kb 715072 kps 17705.5 orig-kb 715072]" +driver: finished-cmd time 42.900 dumper1 dumped localhost:/root/testfile/732mb +driver: send-cmd time 42.900 to taper: DONE worker0 00-00001 715072 +driver: state time 42.903 free kps: 1997952 space: 0 taper: writing idle-dumpers: 0 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers +driver: interface-state time 42.903 if default: free 1997952 +driver: hdisk-state time 42.903 +driver: result time 42.903 from taper: PARTDONE 00-00001 amstatus_test_3-AA-001 1 715072 "[sec 40.253966 bytes 732233728 kps 17764.013439]" +driver: state time 42.928 free kps: 1997952 space: 0 taper: writing idle-dumpers: 0 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers +driver: interface-state time 42.928 if default: free 1997952 +driver: hdisk-state time 42.928 +driver: result time 42.928 from taper: DUMPER-STATUS 00-00001 +driver: send-cmd time 42.928 to taper: DONE worker0 00-00001 715072 +driver: state time 42.944 free kps: 1997952 space: 0 taper: writing idle-dumpers: 0 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers +driver: interface-state time 42.944 if default: free 1997952 +driver: hdisk-state time 42.944 +driver: result time 42.944 from taper: DONE 00-00001 INPUT-GOOD TAPE-GOOD "[sec 41.000000 bytes 732233728 kps 17440.780488 orig-kb 715072]" "" "" +driver: finished-cmd time 42.944 taper wrote localhost:/root/testfile/732mb +driver: send-cmd time 42.944 to taper: CLOSE-VOLUME worker0 +driver: send-cmd time 42.947 to taper: TAKE-SCRIBE-FROM worker1 01-00003 worker0 +driver: state time 42.947 free kps: 1998976 space: 0 taper: writing idle-dumpers: 1 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers +driver: interface-state time 42.947 if default: free 1998976 +driver: hdisk-state time 42.947 +driver: state time 42.966 free kps: 1998976 space: 0 taper: writing idle-dumpers: 1 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers +driver: interface-state time 42.966 if default: free 1998976 +driver: hdisk-state time 42.966 +driver: result time 42.966 from taper: REQUEST-NEW-TAPE 01-00003 +driver: send-cmd time 42.966 to taper: START-SCAN worker1 01-00003 +driver: send-cmd time 42.966 to taper: NEW-TAPE worker1 01-00003 +taper: wrote label 'amstatus_test_3-AA-003' +driver: state time 43.011 free kps: 1998976 space: 0 taper: writing idle-dumpers: 1 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers +driver: interface-state time 43.011 if default: free 1998976 +driver: hdisk-state time 43.011 +driver: result time 43.011 from taper: NEW-TAPE 01-00003 amstatus_test_3-AA-003 +driver: send-cmd time 43.011 to taper: START-TAPER worker0 20120919143530 +driver: state time 43.064 free kps: 1998976 space: 0 taper: writing idle-dumpers: 1 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers +driver: interface-state time 43.064 if default: free 1998976 +driver: hdisk-state time 43.064 +driver: result time 43.064 from taper: TAPER-OK worker0 +driver: state time 82.686 free kps: 1998976 space: 0 taper: writing idle-dumpers: 1 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers +driver: interface-state time 82.686 if default: free 1998976 +driver: hdisk-state time 82.686 +driver: result time 82.686 from taper: PARTDONE 01-00003 amstatus_test_3-AA-003 1 142336 "[sec 39.671814 bytes 145752064 kps 3587.836922]" +driver: state time 82.692 free kps: 1998976 space: 0 taper: writing idle-dumpers: 1 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers +driver: interface-state time 82.692 if default: free 1998976 +driver: hdisk-state time 82.692 +driver: result time 82.692 from dumper0: DONE 01-00003 142336 142336 73 "[sec 72.703 kb 142336 kps 1957.8 orig-kb 142336]" +driver: finished-cmd time 82.692 dumper0 dumped qa-debian6-x64-anuj:/root/testfile/146mb +driver: send-cmd time 82.692 to taper: DONE worker1 01-00003 142336 +driver: state time 82.694 free kps: 1998976 space: 0 taper: writing idle-dumpers: 1 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers +driver: interface-state time 82.694 if default: free 1998976 +driver: hdisk-state time 82.694 +driver: result time 82.694 from taper: DONE 01-00003 INPUT-GOOD TAPE-GOOD "[sec 72.000000 bytes 145752064 kps 1976.888889]" "" "" +driver: finished-cmd time 82.694 taper wrote qa-debian6-x64-anuj:/root/testfile/146mb +driver: send-cmd time 82.694 to taper: CLOSE-VOLUME worker1 +driver: state time 82.695 free kps: 2000000 space: 0 taper: idle idle-dumpers: 2 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers +driver: interface-state time 82.695 if default: free 2000000 +driver: hdisk-state time 82.695 +driver: QUITTING time 82.695 telling children to quit +driver: send-cmd time 82.695 to dumper0: QUIT "" +driver: send-cmd time 82.695 to dumper1: QUIT "" +driver: send-cmd time 82.698 to taper: QUIT +driver: FINISHED time 83.698 +amdump: end at Wed Sep 19 14:36:53 PDT 2012 diff --git a/installcheck/chunker.pl b/installcheck/chunker.pl index 540492b..8b256c3 100644 --- a/installcheck/chunker.pl +++ b/installcheck/chunker.pl @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/example.pl b/installcheck/example.pl index 3e889e7..c5e9b56 100644 --- a/installcheck/example.pl +++ b/installcheck/example.pl @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/gnutar.pl b/installcheck/gnutar.pl index d54617a..ac1b654 100644 --- a/installcheck/gnutar.pl +++ b/installcheck/gnutar.pl @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -91,6 +92,9 @@ my ($fc14, $fc15); if ($uname =~ /\.fc16\./) { #like fc15 $fc15 = 1; } + if ($uname =~ /\.fc17\./) { #like fc15 + $fc15 = 1; + } } # see if the default for --wildcards during inclusion has been changed diff --git a/installcheck/mock/lpr.pl b/installcheck/mock/lpr.pl index 438f9ee..ddb6ebd 100644 --- a/installcheck/mock/lpr.pl +++ b/installcheck/mock/lpr.pl @@ -1,9 +1,10 @@ #! @PERL@ # Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/mock/mail.pl b/installcheck/mock/mail.pl index dd88a1a..208476b 100644 --- a/installcheck/mock/mail.pl +++ b/installcheck/mock/mail.pl @@ -1,9 +1,10 @@ #! @PERL@ # Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/mock/mtx.pl b/installcheck/mock/mtx.pl index 6d154e7..35c19f6 100644 --- a/installcheck/mock/mtx.pl +++ b/installcheck/mock/mtx.pl @@ -1,9 +1,10 @@ #! @PERL@ # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/mock_mtx.pl b/installcheck/mock_mtx.pl index ffc81f6..60d9d71 100644 --- a/installcheck/mock_mtx.pl +++ b/installcheck/mock_mtx.pl @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/noop.pl b/installcheck/noop.pl index 9e1318b..dab1ade 100644 --- a/installcheck/noop.pl +++ b/installcheck/noop.pl @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/pp-scripts.pl b/installcheck/pp-scripts.pl index 6451a93..1e13355 100644 --- a/installcheck/pp-scripts.pl +++ b/installcheck/pp-scripts.pl @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/run-ndmp.pl b/installcheck/run-ndmp.pl index 6b76e09..0a96d02 100644 --- a/installcheck/run-ndmp.pl +++ b/installcheck/run-ndmp.pl @@ -1,9 +1,10 @@ #! @PERL@ # Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/installcheck/taper.pl b/installcheck/taper.pl index 9e56234..310b4ed 100644 --- a/installcheck/taper.pl +++ b/installcheck/taper.pl @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -16,7 +17,7 @@ # Contact information: Zmanda Inc, 465 S. Mathilda Ave., Suite 300 # Sunnyvale, CA 94086, USA, or: http://www.zmanda.com -use Test::More tests => 269; +use Test::More tests => 277; use strict; use warnings; @@ -222,7 +223,7 @@ sub cleanup_log { # functions to create dumpfiles sub write_dumpfile_header_to { - my ($fh, $size, $hostname, $disk, $expect_failure) = @_; + my ($fh, $size, $hostname, $disk, $is_partial) = @_; my $hdr = Amanda::Header->new(); $hdr->{'type'} = $Amanda::Header::F_DUMPFILE; @@ -232,6 +233,7 @@ sub write_dumpfile_header_to { $hdr->{'comp_suffix'} = ".foo"; $hdr->{'name'} = $hostname; $hdr->{'disk'} = $disk; + $hdr->{'is_partial'} = 1 if defined $is_partial; $hdr->{'program'} = "INSTALLCHECK"; $hdr = $hdr->to_string(32768,32768); @@ -258,9 +260,9 @@ sub write_dumpfile_data_to { # make a new holding-like file in test_filename sub make_holding_file { - my ($size, $hostname, $disk) = @_; + my ($size, $hostname, $disk, $is_partial) = @_; open(my $fh, ">", $test_filename); - write_dumpfile_header_to($fh, $size, $hostname, $disk); + write_dumpfile_header_to($fh, $size, $hostname, $disk, $is_partial); write_dumpfile_data_to($fh, $size, $hostname, $disk); } @@ -281,7 +283,7 @@ sub write_to_port { ReuseAddr => 1, ); - write_dumpfile_header_to($sock, $size, $hostname, $disk, $expect_error); + write_dumpfile_header_to($sock, $size, $hostname, $disk); close $sock; $sock = IO::Socket::INET->new( @@ -395,6 +397,40 @@ check_logs([ }, "header on file 4 is correct"); } +## +# A multipart FILE-WRITE partial dump. + +$handle = '11-22223'; +$datestamp = "20070102030406"; +run_taper(4096, "multipart partial FILE-WRITE"); +like(taper_reply, qr/^TAPER-OK worker0$/, + "got TAPER-OK") or die; +make_holding_file(1024*1024, "localhost", "/usr", 1); +taper_cmd("FILE-WRITE worker0 $handle \"$test_filename\" localhost /usr 0 $datestamp 524288 \"\" \"\" 1 \"\" \"\" \"\" \"\" 512"); +like(taper_reply, qr/^REQUEST-NEW-TAPE $handle$/, + "got REQUEST-NEW-TAPE worker0 $handle") or die; +taper_cmd("START-SCAN worker0 $handle"); +taper_cmd("NEW-TAPE worker0 $handle"); +like(taper_reply, qr/^NEW-TAPE $handle TESTCONF01$/, + "got proper NEW-TAPE worker0 $handle") or die; +like(taper_reply, qr/^PARTDONE $handle TESTCONF01 1 512 "\[sec [\d.]+ bytes 524288 kps [\d.]+ orig-kb 512\]"$/, + "got PARTDONE for filenum 1") or die; +like(taper_reply, qr/^PARTDONE $handle TESTCONF01 2 512 "\[sec [\d.]+ bytes 524288 kps [\d.]+ orig-kb 512\]"$/, + "got PARTDONE for filenum 2") or die; +like(taper_reply, qr/^DONE $handle INPUT-GOOD TAPE-GOOD "\[sec [\d.]+ bytes 1048576 kps [\d.]+ orig-kb 512\]" "" ""$/, + "got DONE") or die; +taper_cmd("QUIT"); +wait_for_exit(); + +check_logs([ + qr(^INFO taper Slot 1 without label can be labeled$), + qr(^START taper datestamp $datestamp label TESTCONF01 tape 1$), + qr(^PART taper TESTCONF01 1 localhost /usr $datestamp 1/-1 0 \[sec [\d.]+ bytes 524288 kps [\d.]+ orig-kb 512\]$), + qr(^PART taper TESTCONF01 2 localhost /usr $datestamp 2/-1 0 \[sec [\d.]+ bytes 524288 kps [\d.]+ orig-kb 512\]$), + qr(^PARTIAL taper localhost /usr $datestamp 2 0 \[sec [\d.]+ bytes 1048576 kps [\d.]+ orig-kb 512\]$), + qr(^INFO taper tape TESTCONF01 kb 1024 fm 3 \[OK\]$), +], "multi-part partial dump logged correctly"); + ## # A PORT-WRITE with no disk buffer @@ -459,7 +495,7 @@ taper_cmd("FILE-WRITE worker0 $handle \"$test_filename\" localhost /home 0 $date like(taper_reply, qr/^REQUEST-NEW-TAPE $handle$/, "got REQUEST-NEW-TAPE worker0 $handle") or die; taper_cmd("NO-NEW-TAPE worker0 $handle sorry"); -like(taper_reply, qr/^FAILED $handle INPUT-GOOD TAPE-ERROR "" "?sorry"?.*$/, +like(taper_reply, qr/^FAILED $handle INPUT-GOOD TAPE-CONFIG "" "?sorry"?.*$/, "got FAILED") or die; taper_cmd("QUIT"); wait_for_exit(); @@ -701,7 +737,7 @@ like(taper_reply, qr/^PARTDONE $handle TESTCONF01 1 256 "\[sec [\d.]+ bytes 2621 like(taper_reply, qr/^REQUEST-NEW-TAPE $handle$/, "got REQUEST-NEW-TAPE worker0 $handle") or die; taper_cmd("NO-NEW-TAPE worker0 $handle \"that's enough\""); -like(taper_reply, qr/^PARTIAL $handle INPUT-GOOD TAPE-ERROR "\[sec [\d.]+ bytes 262144 kps [\d.]+ orig-kb 1312\]" "" "that's enough"$/, +like(taper_reply, qr/^PARTIAL $handle INPUT-GOOD TAPE-CONFIG "\[sec [\d.]+ bytes 262144 kps [\d.]+ orig-kb 1312\]" "" "that's enough"$/, "got PARTIAL") or die; taper_cmd("QUIT"); wait_for_exit(); @@ -906,7 +942,7 @@ chmod(0755, Installcheck::Run::vtape_dir(2)); like(taper_reply, qr/^REQUEST-NEW-TAPE $handle$/, "got REQUEST-NEW-TAPE worker0 $handle") or die; taper_cmd("NO-NEW-TAPE worker0 $handle \"sorry\""); -like(taper_reply, qr/^FAILED $handle INPUT-GOOD TAPE-ERROR "" "?sorry"?.*$/, +like(taper_reply, qr/^FAILED $handle INPUT-GOOD TAPE-CONFIG "" "?sorry"?.*$/, "got FAILED") or die; taper_cmd("QUIT"); wait_for_exit(); diff --git a/man/Makefile.in b/man/Makefile.in index 854aa64..71caf54 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,6 +17,23 @@ # Makefile for amanda man-pages VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -200,6 +217,11 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -221,6 +243,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } man5dir = $(mandir)/man5 am__installdirs = "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man7dir)" \ "$(DESTDIR)$(man8dir)" @@ -1167,11 +1195,18 @@ clean-libtool: -rm -rf .libs _libs install-man5: $(man_MANS) @$(NORMAL_INSTALL) - test -z "$(man5dir)" || $(MKDIR_P) "$(DESTDIR)$(man5dir)" - @list=''; test -n "$(man5dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.5[a-z]*$$/p'; \ + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man5dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man5dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man5dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.5[a-z]*$$/p'; \ + fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ @@ -1200,16 +1235,21 @@ uninstall-man5: sed -n '/\.5[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man5dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man5dir)" && rm -f $$files; } + dir='$(DESTDIR)$(man5dir)'; $(am__uninstall_files_from_dir) install-man7: $(man_MANS) @$(NORMAL_INSTALL) - test -z "$(man7dir)" || $(MKDIR_P) "$(DESTDIR)$(man7dir)" - @list=''; test -n "$(man7dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.7[a-z]*$$/p'; \ + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man7dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man7dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man7dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.7[a-z]*$$/p'; \ + fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ @@ -1238,16 +1278,21 @@ uninstall-man7: sed -n '/\.7[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^7][0-9a-z]*$$,7,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man7dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man7dir)" && rm -f $$files; } + dir='$(DESTDIR)$(man7dir)'; $(am__uninstall_files_from_dir) install-man8: $(man_MANS) @$(NORMAL_INSTALL) - test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)" - @list=''; test -n "$(man8dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.8[a-z]*$$/p'; \ + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man8dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.8[a-z]*$$/p'; \ + fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ @@ -1276,9 +1321,7 @@ uninstall-man8: sed -n '/\.8[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man8dir)" && rm -f $$files; } + dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: @@ -1349,10 +1392,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) diff --git a/man/amaddclient.8 b/man/amaddclient.8 index 775c21c..b275950 100644 --- a/man/amaddclient.8 +++ b/man/amaddclient.8 @@ -2,12 +2,12 @@ .\" Title: amaddclient .\" Author: Kevin Till .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMADDCLIENT" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMADDCLIENT" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amadmin.8 b/man/amadmin.8 index 5e82985..d304887 100644 --- a/man/amadmin.8 +++ b/man/amadmin.8 @@ -2,12 +2,12 @@ .\" Title: amadmin .\" Author: James da Silva .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMADMIN" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMADMIN" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -31,7 +31,7 @@ amadmin \- administrative interface to control Amanda backups .SH "SYNOPSIS" .HP \w'\fBamadmin\fR\ 'u -\fBamadmin\fR [\-\-version] [\-\-no\-default] [\-\-print\-source] [\fB\-o\fR\ \fIconfigoption\fR...] \fIconfig\fR \fIcommand\fR [\fIcommand_options\fR...] +\fBamadmin\fR [\-\-version] [\-\-no\-default] [\-\-print\-source] [\-\-exact\-match] [\fB\-o\fR\ \fIconfigoption\fR...] \fIconfig\fR \fIcommand\fR [\fIcommand_options\fR...] .SH "DESCRIPTION" .PP \fBAmadmin\fR @@ -60,12 +60,17 @@ commands\&. .PP \fB\-\-print\-source\fR .RS 4 -Print where a value is definedi for +Print where a value is defined for \fBconfig\fR and \fBdisklist\fR commands\&. .RE +.PP +\fB\-\-exact\-match\fR +.RS 4 +The host and disk are parsed as exact values +.RE .SH "COMMANDS" .PP Commands that take a diff --git a/man/amaespipe.8 b/man/amaespipe.8 index 36f9e89..7a13fbb 100644 --- a/man/amaespipe.8 +++ b/man/amaespipe.8 @@ -2,12 +2,12 @@ .\" Title: amaespipe .\" Author: Kevin Till .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMAESPIPE" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMAESPIPE" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amanda-applications.7 b/man/amanda-applications.7 index a52a711..736abb2 100644 --- a/man/amanda-applications.7 +++ b/man/amanda-applications.7 @@ -2,12 +2,12 @@ .\" Title: amanda-applications .\" Author: Jean-Louis Martineau .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: Miscellanea -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMANDA\-APPLICATIONS" "7" "07/25/2012" "Amanda 3\&.3\&.2" "Miscellanea" +.TH "AMANDA\-APPLICATIONS" "7" "01/10/2013" "Amanda 3\&.3\&.3" "Miscellanea" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amanda-archive-format.5 b/man/amanda-archive-format.5 index 19cfe80..9b7c6bf 100644 --- a/man/amanda-archive-format.5 +++ b/man/amanda-archive-format.5 @@ -2,12 +2,12 @@ .\" Title: amanda-archive-format .\" Author: Dustin J. Mitchell .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: File formats and conventions -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMANDA\-ARCHIVE\-FOR" "5" "07/25/2012" "Amanda 3\&.3\&.2" "File formats and conventions" +.TH "AMANDA\-ARCHIVE\-FOR" "5" "01/10/2013" "Amanda 3\&.3\&.3" "File formats and conventions" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amanda-auth.7 b/man/amanda-auth.7 index c4d9db1..818e593 100644 --- a/man/amanda-auth.7 +++ b/man/amanda-auth.7 @@ -2,12 +2,12 @@ .\" Title: amanda-auth .\" Author: Jean-Louis Martineau .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: Miscellanea -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMANDA\-AUTH" "7" "07/25/2012" "Amanda 3\&.3\&.2" "Miscellanea" +.TH "AMANDA\-AUTH" "7" "01/10/2013" "Amanda 3\&.3\&.3" "Miscellanea" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amanda-changers.7 b/man/amanda-changers.7 index 1cef29e..05b0712 100644 --- a/man/amanda-changers.7 +++ b/man/amanda-changers.7 @@ -2,12 +2,12 @@ .\" Title: amanda-changers .\" Author: Dustin J. Mitchell .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: Miscellanea -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMANDA\-CHANGERS" "7" "07/25/2012" "Amanda 3\&.3\&.2" "Miscellanea" +.TH "AMANDA\-CHANGERS" "7" "01/10/2013" "Amanda 3\&.3\&.3" "Miscellanea" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -134,6 +134,19 @@ tpchanger "aggregate" .fi .PP This changer driver allow to use two or more changers or standalone drive in sequence\&. +.SS "Properties" +.PP +LOCK\-TIMEOUT +.RS 4 + +The time in seconds amanda wait to lock the statefile (default:1000) +.RE +.PP +STATE_FILENAME +.RS 4 + +The name of the state file (default: "$CONFIG_DIR/$changer_name\&.state"\&. +.RE .SS "chg\-disk:VTAPEROOT (new)" .nf tpchanger "chg\-disk:/var/mnt/vtapes" @@ -164,6 +177,12 @@ AUTO\-CREATE\-SLOT If a slotN directory in the range 1 to NUM\-SLOT does not already exist, and this property is true, then the changer will create the directory\&. .RE .PP +LOCK\-TIMEOUT +.RS 4 + +The time in seconds amanda wait to lock the statefile (default:1000) +.RE +.PP MOUNT .RS 4 @@ -248,6 +267,12 @@ FIRST\-SLOT This property gives the number of the first slot\&. The default value is "1"\&. .RE +.PP +LOCK\-TIMEOUT +.RS 4 + +The time in seconds amanda wait to lock the statefile (default:1000) +.RE .SS "Special Operations" .PP A number of special operations are available for @@ -598,6 +623,12 @@ The default value is \fB"0s poll 3s until 2m"\fR\&. .RE .PP +LOCK\-TIMEOUT +.RS 4 + +The time in seconds amanda wait to lock the statefile (default:1000) +.RE +.PP MTX .RS 4 diff --git a/man/amanda-client.conf.5 b/man/amanda-client.conf.5 index b040bd3..7e8f537 100644 --- a/man/amanda-client.conf.5 +++ b/man/amanda-client.conf.5 @@ -2,12 +2,12 @@ .\" Title: amanda-client.conf .\" Author: James da Silva .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: File formats and conventions -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMANDA\-CLIENT\&.CON" "5" "07/25/2012" "Amanda 3\&.3\&.2" "File formats and conventions" +.TH "AMANDA\-CLIENT\&.CON" "5" "01/10/2013" "Amanda 3\&.3\&.3" "File formats and conventions" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amanda-compatibility.7 b/man/amanda-compatibility.7 index afea373..0b84709 100644 --- a/man/amanda-compatibility.7 +++ b/man/amanda-compatibility.7 @@ -2,12 +2,12 @@ .\" Title: amanda-compatibility .\" Author: Dustin J. Mitchell .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: Miscellanea -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMANDA\-COMPATIBILIT" "7" "07/25/2012" "Amanda 3\&.3\&.2" "Miscellanea" +.TH "AMANDA\-COMPATIBILIT" "7" "01/10/2013" "Amanda 3\&.3\&.3" "Miscellanea" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amanda-devices.7 b/man/amanda-devices.7 index 3248c19..f929176 100644 --- a/man/amanda-devices.7 +++ b/man/amanda-devices.7 @@ -2,12 +2,12 @@ .\" Title: amanda-devices .\" Author: Ian Turner .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: Miscellanea -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMANDA\-DEVICES" "7" "07/25/2012" "Amanda 3\&.3\&.2" "Miscellanea" +.TH "AMANDA\-DEVICES" "7" "01/10/2013" "Amanda 3\&.3\&.3" "Miscellanea" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -573,8 +573,10 @@ STORAGE_API (read\-write) Which API to use for the cloud: .nf S3 Amanzon S3 api - SWITF\-1\&.0 Openstack swift v1\&.0 + SWIFT\-1\&.0 Openstack swift v1\&.0 SWIFT\-2\&.0 Openstack swift v2\&.0 + OAUTH2 Google + CASTOR Caringo CAStor .fi .RE .PP diff --git a/man/amanda-interactivity.7 b/man/amanda-interactivity.7 index c3e8019..27464a4 100644 --- a/man/amanda-interactivity.7 +++ b/man/amanda-interactivity.7 @@ -2,12 +2,12 @@ .\" Title: amanda-interactivity .\" Author: Jean-Louis Martineau .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: Miscellanea -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMANDA\-INTERACTIVIT" "7" "07/25/2012" "Amanda 3\&.3\&.2" "Miscellanea" +.TH "AMANDA\-INTERACTIVIT" "7" "01/10/2013" "Amanda 3\&.3\&.3" "Miscellanea" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amanda-match.7 b/man/amanda-match.7 index 5777aec..3ce3142 100644 --- a/man/amanda-match.7 +++ b/man/amanda-match.7 @@ -2,12 +2,12 @@ .\" Title: amanda-match .\" Author: Dustin J. Mitchell .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: Miscellanea -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMANDA\-MATCH" "7" "07/25/2012" "Amanda 3\&.3\&.2" "Miscellanea" +.TH "AMANDA\-MATCH" "7" "01/10/2013" "Amanda 3\&.3\&.3" "Miscellanea" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -34,6 +34,10 @@ amanda-match \- Common Amanda Match Expression Several Amanda commands allow the user to specify dumps using "match expressions"\&. This manual page describes the syntax of these expressions\&. .PP In some places, only certain match expressions are allowed\&. However, several commands take a dump specification ("dumpspec") consisting of a sequence of several expressions intended to match particular dumps in the catalog\&. Other applications take a DLE specification which indicates a set of DLEs to be operated on\&. These formats are described below\&. +.PP +An expression can be disabled be preceding it with the \*(Aq=\*(Aq character, in that case, an exact match is used\&. +.PP +Many program have an \*(Aq\-\-exact\-match\*(Aq argument that disable expression and exact match are used\&. .SH "HOST & DISK EXPRESSIONS" .PP The hosts and disks match by word\&. Each word is a glob expression, and words are separated by the character \*(Aq\&.\*(Aq for host expressions and \*(Aq/\*(Aq for disk expressions\&. You can anchor the expression on the left with a \*(Aq^\*(Aq or on the right with a \*(Aq$\*(Aq\&. The matcher is case insensitive for hosts but case sensitive for disks\&. A match succeeds if all words in the expression match contiguous words in the host or disk\&. diff --git a/man/amanda-scripts.7 b/man/amanda-scripts.7 index 62e5d1a..8ec1620 100644 --- a/man/amanda-scripts.7 +++ b/man/amanda-scripts.7 @@ -2,12 +2,12 @@ .\" Title: amanda-scripts .\" Author: Jean-Louis Martineau .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: Miscellanea -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMANDA\-SCRIPTS" "7" "07/25/2012" "Amanda 3\&.3\&.2" "Miscellanea" +.TH "AMANDA\-SCRIPTS" "7" "01/10/2013" "Amanda 3\&.3\&.3" "Miscellanea" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amanda-taperscan.7 b/man/amanda-taperscan.7 index e0da8fd..f26b4cf 100644 --- a/man/amanda-taperscan.7 +++ b/man/amanda-taperscan.7 @@ -2,12 +2,12 @@ .\" Title: amanda-taperscan .\" Author: Dustin J. Mitchell .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: Miscellanea -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMANDA\-TAPERSCAN" "7" "07/25/2012" "Amanda 3\&.3\&.2" "Miscellanea" +.TH "AMANDA\-TAPERSCAN" "7" "01/10/2013" "Amanda 3\&.3\&.3" "Miscellanea" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amanda.8 b/man/amanda.8 index d18764d..f1a3428 100644 --- a/man/amanda.8 +++ b/man/amanda.8 @@ -2,12 +2,12 @@ .\" Title: amanda .\" Author: James da Silva .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMANDA" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMANDA" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amanda.conf.5 b/man/amanda.conf.5 index d71edae..d26aab2 100644 --- a/man/amanda.conf.5 +++ b/man/amanda.conf.5 @@ -2,12 +2,12 @@ .\" Title: amanda.conf .\" Author: James da Silva .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: File formats and conventions -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMANDA\&.CONF" "5" "07/25/2012" "Amanda 3\&.3\&.2" "File formats and conventions" +.TH "AMANDA\&.CONF" "5" "01/10/2013" "Amanda 3\&.3\&.3" "File formats and conventions" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -287,6 +287,28 @@ Never send an email\&. .RE .RE .PP +\fBreport\-use\-media\fR \fIboolean\fR +.RS 4 +Default: +\fITrue\fR +if +\fBmax\-dle\-by\-volume\fR +is not set, +\fIFalse\fR +if it is set\&. If the reporter must print the list of media used in the run\&. +.RE +.PP +\fBreport\-next\-media\fR \fIboolean\fR +.RS 4 +Default: +\fITrue\fR +if +\fBmax\-dle\-by\-volume\fR +is not set, +\fIFalse\fR +if it is set\&. If the reporter must print the list of media expected for the next run\&. +.RE +.PP \fBmax\-dle\-by\-volume\fR \fIint\fR .RS 4 Default: @@ -1967,9 +1989,7 @@ The default unit is Kbytes if it is not specified\&. .PP \fBpart\-size\fR \fIint\fR .RS 4 -Default: none\&. This is the size (in KB if no units are specified) of each split part written to the volume\&. It is reduced to -\fBpart\-cache\-max\-size\fR -when part caching is required\&. If this is set to zero, then no splitting will take place; in this case, some devices can span dumps from volume to volume, while others will cause the entire dump to fail if they encounter end\-of\-medium before the dump is complete\&. See "Dump Splitting Configuration" below\&. +If this is set to zero (default), then no splitting will take place, and the entire dump will fail, if end\-of\-medium is encountered before the dump is complete, unless the device property LEOM is true, and the device can detect EOM\&. See "Dump Splitting Configuration" below\&. .RE .PP \fBpart\-cache\-type\fR [ \fBnone\fR | \fBdisk\fR | \fBmemory\fR ] diff --git a/man/amarchiver.8 b/man/amarchiver.8 index 460de8a..68dea23 100644 --- a/man/amarchiver.8 +++ b/man/amarchiver.8 @@ -2,12 +2,12 @@ .\" Title: amarchiver .\" Author: Dustin J. Mitchell .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMARCHIVER" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMARCHIVER" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amcheck.8 b/man/amcheck.8 index 717690f..253a0c1 100644 --- a/man/amcheck.8 +++ b/man/amcheck.8 @@ -2,12 +2,12 @@ .\" Title: amcheck .\" Author: James da Silva .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMCHECK" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMCHECK" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -31,7 +31,7 @@ amcheck \- run Amanda self\-checks .SH "SYNOPSIS" .HP \w'\fBamcheck\fR\ 'u -\fBamcheck\fR [\-am] [\-w] [\-sclt] [\-M\ \fIaddress\fR] [\-\-client\-verbose] [\fB\-o\fR\ \fIconfigoption\fR...] \fIconfig\fR [\fIhost\fR\ [\fIdisk\fR...]...] +\fBamcheck\fR [\-am] [\-w] [\-sclt] [\-M\ \fIaddress\fR] [\-\-client\-verbose] [\-\-exact\-match] [\fB\-o\fR\ \fIconfigoption\fR...] \fIconfig\fR [\fIhost\fR\ [\fIdisk\fR...]...] .SH "DESCRIPTION" .PP \fBAmcheck\fR @@ -119,6 +119,11 @@ value from Print all client messages\&. .RE .PP +\fB\-\-exact\-match\fR +.RS 4 +The host and disk are parsed as exact values +.RE +.PP \fIhost\fR [\fIdisk\fR]* .RS 4 Specify the host and disk on which the command will work\&. diff --git a/man/amcheckdb.8 b/man/amcheckdb.8 index faa3586..4538793 100644 --- a/man/amcheckdb.8 +++ b/man/amcheckdb.8 @@ -2,12 +2,12 @@ .\" Title: amcheckdb .\" Author: Adrian T. Filipi-Martin .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMCHECKDB" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMCHECKDB" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amcheckdump.8 b/man/amcheckdump.8 index 0879e84..433c7e4 100644 --- a/man/amcheckdump.8 +++ b/man/amcheckdump.8 @@ -2,12 +2,12 @@ .\" Title: amcheckdump .\" Author: Ian Turner .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMCHECKDUMP" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMCHECKDUMP" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amcleanup.8 b/man/amcleanup.8 index 5f6376d..a45e340 100644 --- a/man/amcleanup.8 +++ b/man/amcleanup.8 @@ -2,12 +2,12 @@ .\" Title: amcleanup .\" Author: James da Silva .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMCLEANUP" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMCLEANUP" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amcleanupdisk.8 b/man/amcleanupdisk.8 index 80568c9..87391a3 100644 --- a/man/amcleanupdisk.8 +++ b/man/amcleanupdisk.8 @@ -2,12 +2,12 @@ .\" Title: amcleanupdisk .\" Author: James da Silva .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMCLEANUPDISK" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMCLEANUPDISK" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amcrypt-ossl-asym.8 b/man/amcrypt-ossl-asym.8 index 1f53dec..128421a 100644 --- a/man/amcrypt-ossl-asym.8 +++ b/man/amcrypt-ossl-asym.8 @@ -2,12 +2,12 @@ .\" Title: amcrypt-ossl-asym .\" Author: Kevin Till .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMCRYPT\-OSSL\-ASYM" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMCRYPT\-OSSL\-ASYM" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amcrypt-ossl.8 b/man/amcrypt-ossl.8 index 598913e..d2be3cd 100644 --- a/man/amcrypt-ossl.8 +++ b/man/amcrypt-ossl.8 @@ -2,12 +2,12 @@ .\" Title: amcrypt-ossl .\" Author: Kevin Till .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMCRYPT\-OSSL" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMCRYPT\-OSSL" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amcrypt.8 b/man/amcrypt.8 index 294a3c6..f0f201f 100644 --- a/man/amcrypt.8 +++ b/man/amcrypt.8 @@ -2,12 +2,12 @@ .\" Title: amcrypt .\" Author: Kevin Till .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMCRYPT" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMCRYPT" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amcryptsimple.8 b/man/amcryptsimple.8 index 60ac4d7..86c50f3 100644 --- a/man/amcryptsimple.8 +++ b/man/amcryptsimple.8 @@ -2,12 +2,12 @@ .\" Title: amcryptsimple .\" Author: Kevin Till .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMCRYPTSIMPLE" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMCRYPTSIMPLE" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amdevcheck.8 b/man/amdevcheck.8 index c3c4fc4..30797f0 100644 --- a/man/amdevcheck.8 +++ b/man/amdevcheck.8 @@ -2,12 +2,12 @@ .\" Title: amdevcheck .\" Author: Ian Turner .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMDEVCHECK" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMDEVCHECK" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amdump.8 b/man/amdump.8 index 4736555..5bf47a7 100644 --- a/man/amdump.8 +++ b/man/amdump.8 @@ -2,12 +2,12 @@ .\" Title: amdump .\" Author: James da Silva .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMDUMP" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMDUMP" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -31,7 +31,7 @@ amdump \- back up all disks in an Amanda configuration .SH "SYNOPSIS" .HP \w'\fBamdump\fR\ 'u -\fBamdump\fR [\fB\-\-no\-taper\fR] [\fB\-o\fR\ \fIconfigoption\fR...] \fIconfig\fR [\fIhost\fR\ [\fIdisk\fR...]...] +\fBamdump\fR [\-\-no\-taper] [\-\-exact\-match] [\fB\-o\fR\ \fIconfigoption\fR...] \fIconfig\fR [\fIhost\fR\ [\fIdisk\fR...]...] .SH "DESCRIPTION" .PP \fBAmdump\fR @@ -67,6 +67,11 @@ Specify the host and disk on which the command will work \-\- see the descriptio \fBamanda-match\fR(7)\&. .RE .PP +\fB\-\-exact\-match\fR +.RS 4 +The host and disk are parsed as exact values +.RE +.PP \fB\-o \fR\fB\fIconfigoption\fR\fR .RS 4 See the "CONFIGURATION OVERRIDE" section in diff --git a/man/amdump_client.8 b/man/amdump_client.8 index 05dab6f..516881d 100644 --- a/man/amdump_client.8 +++ b/man/amdump_client.8 @@ -2,12 +2,12 @@ .\" Title: amdump_client .\" Author: Jean-Louis Martineau .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMDUMP_CLIENT" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMDUMP_CLIENT" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amfetchdump.8 b/man/amfetchdump.8 index b039c37..10fe5eb 100644 --- a/man/amfetchdump.8 +++ b/man/amfetchdump.8 @@ -2,12 +2,12 @@ .\" Title: amfetchdump .\" Author: John Stange .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMFETCHDUMP" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMFETCHDUMP" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -31,7 +31,7 @@ amfetchdump \- extract backup images from multiple Amanda tapes\&. .SH "SYNOPSIS" .HP \w'\fBamfetchdump\fR\ 'u -\fBamfetchdump\fR [\-c | \-C | \-l] [\-p | \-n] [\-a] [\-O\ \fIdirectory\fR] [\-d\ \fIdevice\fR] [\-h | \-\-header\-file\ \fIfilename\fR | \-\-header\-fd\ \fIfd\fR] [\-\-decompress | \-\-no\-decompress | \-\-server\-decompress | \-\-client\-decompress] [\-\-decrypt | \-\-no\-decrypt | \-\-server\-decrypt | \-\-client\-decrypt] [\fB\-o\fR\ \fIconfigoption\fR...] \fIconfig\fR \fIhostname\fR [\fIdisk\fR\ [\ \fIdate\fR\ [\ \fIlevel\fR\ [\ \fIhostname\fR\ [\&.\&.\&.]\ ]\ ]\ ]] +\fBamfetchdump\fR [\-c | \-C | \-l] [\-p | \-n] [\-a] [\-O\ \fIdirectory\fR] [\-d\ \fIdevice\fR] [\-h | \-\-header\-file\ \fIfilename\fR | \-\-header\-fd\ \fIfd\fR] [\-\-decompress | \-\-no\-decompress | \-\-server\-decompress | \-\-client\-decompress] [\-\-extract\ \-\-directory\fI\ directory\fR\ [\-\-data\-path\fI\ amanda|directtcp\fR]\ [\-\-application\-property\ \fINAME=VALUE\fR]*] [\-\-decrypt | \-\-no\-decrypt | \-\-server\-decrypt | \-\-client\-decrypt] [\-\-exact_match] [\fB\-o\fR\ \fIconfigoption\fR...] \fIconfig\fR \fIhostname\fR [\fIdisk\fR\ [\ \fIdate\fR\ [\ \fIlevel\fR\ [\ \fIhostname\fR\ [\&.\&.\&.]\ ]\ ]\ ]] .SH "DESCRIPTION" .PP \fBAmfetchdump\fR @@ -145,6 +145,39 @@ Do the decryption only if the encryption was done on the server\&. Do the decryption only if the encryption was done on the client\&. .RE .PP +\fB\-\-exact\-match\fR +.RS 4 +The host and disk are parsed as exact values +.RE +.PP +\fB\-\-extract\fR +.RS 4 +Extract the backup on the server in the +\fIdirectory\fR +directory\&. +.RE +.PP +\fB\-\-directory\fR \fIdirectory\fR +.RS 4 +Where to extract the backup with the +\fB\-\-extract\fR +option\&. +.sp +Warning: All files in that directory can be removed\&. +.RE +.PP +\fB\-\-data\-path\fR amanda|directtcp +.RS 4 +The data path to use with +\fB\-\-extract\fR, the default is to use the fatest data path\&. +.RE +.PP +\fB\-\-application\-property\fR \fINAME=VALUE\fR +.RS 4 +Application property to send to the application with +\fB\-\-extract\&.\fR +.RE +.PP \fB\-l\fR .RS 4 Leave dumps in the compressed/uncompressed and encrypted/unencrypted state in which they were found on tape\&. It is a synonym for diff --git a/man/amflush.8 b/man/amflush.8 index d37d063..08ebb46 100644 --- a/man/amflush.8 +++ b/man/amflush.8 @@ -2,12 +2,12 @@ .\" Title: amflush .\" Author: James da Silva .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMFLUSH" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMFLUSH" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -31,7 +31,7 @@ amflush \- flush Amanda backup files from holding disk to tape .SH "SYNOPSIS" .HP \w'\fBamflush\fR\ 'u -\fBamflush\fR [\-b] [\-f] [\-s] [\-D\ \fIdatestamp\fR] [\fB\-o\fR\ \fIconfigoption\fR...] \fIconfig\fR [\fIhost\fR\ [\fIdisk\fR...]...] +\fBamflush\fR [\-b] [\-f] [\-\-exact\-match] [\-s] [\-D\ \fIdatestamp\fR] [\fB\-o\fR\ \fIconfigoption\fR...] \fIconfig\fR [\fIhost\fR\ [\fIdisk\fR...]...] .SH "DESCRIPTION" .PP \fBAmflush\fR @@ -85,6 +85,11 @@ for details on the format of this expression\&. will flush all dumps from 25 december 2000 to 27 december 2000\&. .RE .PP +\fB\-\-exact\-match\fR +.RS 4 +The host and disk are parsed as exact values +.RE +.PP \fIhost\fR [\fIdisk\fR]* .RS 4 Specify the host and disk on which the command will work \-\- see the description of DLE specifications in diff --git a/man/amgetconf.8 b/man/amgetconf.8 index fe77723..c23972b 100644 --- a/man/amgetconf.8 +++ b/man/amgetconf.8 @@ -2,12 +2,12 @@ .\" Title: amgetconf .\" Author: Jean-Louis Martineau .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMGETCONF" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMGETCONF" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amgpgcrypt.8 b/man/amgpgcrypt.8 index 6489a6d..3b7fdb1 100644 --- a/man/amgpgcrypt.8 +++ b/man/amgpgcrypt.8 @@ -2,12 +2,12 @@ .\" Title: amgpgcrypt .\" Author: Kevin Till .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMGPGCRYPT" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMGPGCRYPT" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amgtar.8 b/man/amgtar.8 index 9cc2abd..714df98 100644 --- a/man/amgtar.8 +++ b/man/amgtar.8 @@ -2,12 +2,12 @@ .\" Title: amgtar .\" Author: Jean-Louis Martineau .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMGTAR" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMGTAR" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amlabel.8 b/man/amlabel.8 index 0d8203c..d35fa6e 100644 --- a/man/amlabel.8 +++ b/man/amlabel.8 @@ -2,12 +2,12 @@ .\" Title: amlabel .\" Author: James da Silva .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMLABEL" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMLABEL" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amoverview.8 b/man/amoverview.8 index dc93d12..d6e3233 100644 --- a/man/amoverview.8 +++ b/man/amoverview.8 @@ -2,12 +2,12 @@ .\" Title: amoverview .\" Author: Stefan G. Weichinger .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMOVERVIEW" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMOVERVIEW" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ampgsql.8 b/man/ampgsql.8 index a51fbf3..52dc77d 100644 --- a/man/ampgsql.8 +++ b/man/ampgsql.8 @@ -2,12 +2,12 @@ .\" Title: ampgsql .\" Author: Nikolas Coukouma .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMPGSQL" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMPGSQL" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amplot.8 b/man/amplot.8 index 5b8b4e8..747ccf6 100644 --- a/man/amplot.8 +++ b/man/amplot.8 @@ -2,12 +2,12 @@ .\" Title: amplot .\" Author: Olafur Gudmundsson .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMPLOT" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMPLOT" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amraw.8 b/man/amraw.8 index 81e9894..67d8911 100644 --- a/man/amraw.8 +++ b/man/amraw.8 @@ -2,12 +2,12 @@ .\" Title: amraw .\" Author: Jean-Louis Martineau .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMRAW" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMRAW" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amrecover.8 b/man/amrecover.8 index c52e765..5e26872 100644 --- a/man/amrecover.8 +++ b/man/amrecover.8 @@ -2,12 +2,12 @@ .\" Title: amrecover .\" Author: Alan M. McIvor .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMRECOVER" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMRECOVER" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amreport.8 b/man/amreport.8 index dd3ccda..9d71223 100644 --- a/man/amreport.8 +++ b/man/amreport.8 @@ -2,12 +2,12 @@ .\" Title: amreport .\" Author: Stefan G. Weichinger .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMREPORT" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMREPORT" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amrestore.8 b/man/amrestore.8 index 2dfb3b5..0d52b75 100644 --- a/man/amrestore.8 +++ b/man/amrestore.8 @@ -2,12 +2,12 @@ .\" Title: amrestore .\" Author: James da Silva .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMRESTORE" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMRESTORE" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -31,7 +31,7 @@ amrestore \- low\-level data\-extraction from Amanda volumes .SH "SYNOPSIS" .HP \w'\fBamrestore\fR\ 'u -\fBamrestore\fR [\-\-config\ \fIconfig\fR] [\-r | \-c | \-C] [\-b\ \fIblocksize\fR] [\-f\ \fIfilenum\fR] [\-l\ \fIlabel\fR] [\-p] [\-h] [\fB\-o\fR\ \fIconfigoption\fR...] [{\fIchangerspec\fR} | {[\-\-holding]\ \fIholdingfile\fR}] [\fIhostname\fR\ [\ \fIdiskname\fR\ [\ \fIdatestamp\fR\ [\ \fIhostname\fR\ [\ \fIdiskname\fR\ [\ \fIdatestamp\fR\ \&.\&.\&.\ ]\ ]\ ]\ ]\ ]] +\fBamrestore\fR [\-\-config\ \fIconfig\fR] [\-r | \-c | \-C] [\-b\ \fIblocksize\fR] [\-f\ \fIfilenum\fR] [\-l\ \fIlabel\fR] [\-p] [\-h] [\-\-exact\-match] [\fB\-o\fR\ \fIconfigoption\fR...] [{\fIchangerspec\fR} | {[\-\-holding]\ \fIholdingfile\fR}] [\fIhostname\fR\ [\ \fIdiskname\fR\ [\ \fIdatestamp\fR\ [\ \fIhostname\fR\ [\ \fIdiskname\fR\ [\ \fIdatestamp\fR\ \&.\&.\&.\ ]\ ]\ ]\ ]\ ]] .PP Note that this is the only Amanda command which does not take a configuration name as its first argument\&. .SH "DESCRIPTION" @@ -116,6 +116,11 @@ Output raw files\&. This is similar to extension\&. .RE .PP +\fB\-\-exact\-match\fR +.RS 4 +The host and disk are parsed as exact values +.RE +.PP \fB\-o \fR\fB\fIconfigoption\fR\fR .RS 4 See the "CONFIGURATION OVERRIDE" section in diff --git a/man/amrmtape.8 b/man/amrmtape.8 index 18c67e4..e27b47b 100644 --- a/man/amrmtape.8 +++ b/man/amrmtape.8 @@ -2,12 +2,12 @@ .\" Title: amrmtape .\" Author: Adrian T. Filipi-Martin .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMRMTAPE" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMRMTAPE" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amsamba.8 b/man/amsamba.8 index afd7ae4..dd2c00b 100644 --- a/man/amsamba.8 +++ b/man/amsamba.8 @@ -2,12 +2,12 @@ .\" Title: amsamba .\" Author: Jean-Louis Martineau .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMSAMBA" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMSAMBA" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amserverconfig.8 b/man/amserverconfig.8 index fb5607d..06b3715 100644 --- a/man/amserverconfig.8 +++ b/man/amserverconfig.8 @@ -2,12 +2,12 @@ .\" Title: amserverconfig .\" Author: Kevin Till .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMSERVERCONFIG" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMSERVERCONFIG" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amservice.8 b/man/amservice.8 index f68ce63..d08bb04 100644 --- a/man/amservice.8 +++ b/man/amservice.8 @@ -2,12 +2,12 @@ .\" Title: amservice .\" Author: Jean-Louis Martineau .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMSERVICE" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMSERVICE" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amstar.8 b/man/amstar.8 index 854757c..a871386 100644 --- a/man/amstar.8 +++ b/man/amstar.8 @@ -2,12 +2,12 @@ .\" Title: amstar .\" Author: Jean-Louis Martineau .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMSTAR" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMSTAR" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amstatus.8 b/man/amstatus.8 index cf2716c..cc00965 100644 --- a/man/amstatus.8 +++ b/man/amstatus.8 @@ -2,12 +2,12 @@ .\" Title: amstatus .\" Author: Stefan G. Weichinger .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMSTATUS" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMSTATUS" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amsuntar.8 b/man/amsuntar.8 index 6e10904..67d79e5 100644 --- a/man/amsuntar.8 +++ b/man/amsuntar.8 @@ -2,12 +2,12 @@ .\" Title: amsuntar .\" Author: Satya Ganga .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMSUNTAR" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMSUNTAR" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amtape.8 b/man/amtape.8 index 3c68fab..956306a 100644 --- a/man/amtape.8 +++ b/man/amtape.8 @@ -2,12 +2,12 @@ .\" Title: amtape .\" Author: Dustin J. Mitchell .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMTAPE" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMTAPE" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amtapetype.8 b/man/amtapetype.8 index 174dcd0..a01a8b5 100644 --- a/man/amtapetype.8 +++ b/man/amtapetype.8 @@ -2,12 +2,12 @@ .\" Title: amtapetype .\" Author: Dustin J. Mitchell .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMTAPETYPE" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMTAPETYPE" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amtoc.8 b/man/amtoc.8 index 25df1ec..c593ba5 100644 --- a/man/amtoc.8 +++ b/man/amtoc.8 @@ -2,12 +2,12 @@ .\" Title: amtoc .\" Author: Nicolas Mayencourt .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMTOC" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMTOC" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amvault.8 b/man/amvault.8 index 8e211a3..2d23cc6 100644 --- a/man/amvault.8 +++ b/man/amvault.8 @@ -2,12 +2,12 @@ .\" Title: amvault .\" Author: Dustin J. Mitchell .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMVAULT" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMVAULT" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -31,7 +31,7 @@ amvault \- Copy Amanda dumps from one volume to another .SH "SYNOPSIS" .HP \w'\fBamvault\fR\ 'u -\fBamvault\fR [\fB\-o\fR\ \fIconfigoption\fR...] [\-\-dry\-run | \-n] [\-\-quiet | \-q] [\-\-fulls\-only] [\-\-export] [\fB\-\-src\-timestamp\fR\ \fIsrc\-timestamp\fR] +\fBamvault\fR [\fB\-o\fR\ \fIconfigoption\fR...] [\-\-dry\-run | \-n] [\-\-quiet | \-q] [\-\-fulls\-only] [\-\-exact\-match] [\-\-export] [\fB\-\-src\-timestamp\fR\ \fIsrc\-timestamp\fR] .br \fB\-\-label\-template\fR\ \fIlabel\-template\fR \fB\-\-dst\-changer\fR\ \fIdst\-changer\fR [\fB\-\-autolabel\fR\ \fIautolabel\-arg\fR...] .br @@ -121,6 +121,11 @@ define changer vaulting_tape { Cause amvault to print the dumps it would vault, but not actually perform any vaulting operations\&. .RE .PP +\fB\-\-exact\-match\fR +.RS 4 +The host and disk are parsed as exact values +.RE +.PP \fB\-\-export\fR .RS 4 Cause amvault to attempt to move completed tertiary volumes to import/export slots, where they can be more easily removed by an operator\&. diff --git a/man/amzfs-sendrecv.8 b/man/amzfs-sendrecv.8 index bef01fb..2181db1 100644 --- a/man/amzfs-sendrecv.8 +++ b/man/amzfs-sendrecv.8 @@ -2,12 +2,12 @@ .\" Title: amzfs-sendrecv .\" Author: Jean-Louis Martineau .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMZFS\-SENDRECV" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMZFS\-SENDRECV" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/amzfs-snapshot.8 b/man/amzfs-snapshot.8 index acdc3f2..40fa29c 100644 --- a/man/amzfs-snapshot.8 +++ b/man/amzfs-snapshot.8 @@ -2,12 +2,12 @@ .\" Title: amzfs-snapshot .\" Author: Jean-Louis Martineau .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "AMZFS\-SNAPSHOT" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "AMZFS\-SNAPSHOT" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/disklist.5 b/man/disklist.5 index 83d9687..b33b9d0 100644 --- a/man/disklist.5 +++ b/man/disklist.5 @@ -2,12 +2,12 @@ .\" Title: disklist .\" Author: James da Silva .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: File formats and conventions -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "DISKLIST" "5" "07/25/2012" "Amanda 3\&.3\&.2" "File formats and conventions" +.TH "DISKLIST" "5" "01/10/2013" "Amanda 3\&.3\&.3" "File formats and conventions" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/script-email.8 b/man/script-email.8 index 4681668..a9cc2df 100644 --- a/man/script-email.8 +++ b/man/script-email.8 @@ -2,12 +2,12 @@ .\" Title: script-email .\" Author: Jean-Louis Martineau .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: System Administration Commands -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "SCRIPT\-EMAIL" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands" +.TH "SCRIPT\-EMAIL" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/tapelist.5 b/man/tapelist.5 index eed93ba..a4de173 100644 --- a/man/tapelist.5 +++ b/man/tapelist.5 @@ -2,12 +2,12 @@ .\" Title: tapelist .\" Author: James da Silva .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/25/2012 +.\" Date: 01/10/2013 .\" Manual: File formats and conventions -.\" Source: Amanda 3.3.2 +.\" Source: Amanda 3.3.3 .\" Language: English .\" -.TH "TAPELIST" "5" "07/25/2012" "Amanda 3\&.3\&.2" "File formats and conventions" +.TH "TAPELIST" "5" "01/10/2013" "Amanda 3\&.3\&.3" "File formats and conventions" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -36,7 +36,7 @@ The file contains the list of tapes in active use\&. This file is not ordinarily ordinarily edited or examined manually\&. Its format may change, or it may be removed altogether, in future versions of Amanda\&. It contains lines of the form: .PP .nf -YYYYMMDD label flags [BARCODE:barcode] [META:meta] [#comment] +YYYYMMDD label flags [BARCODE:barcode] [META:meta] [BLOCKSIZE:blocksize] [#comment] .fi .PP Where @@ -52,7 +52,7 @@ is one of "reuse" or "no\-reuse" and tells Amanda whether the tape may be reused dumps\&. See the \fBreuse\fR options of -\fBamadmin\fR(8)\&. The optional barcode is prefixed with \*(AqBARCODE\*(Aq if the volume have a barcode\&. The optional meta label is prefixed with \*(AqMETA\*(Aq if the volume is on a meta volume\&. The optional comment is prefixed with a \*(Aq#\*(Aq and continues to the end of the line\&. Amanda will maintain this comment until the tape is overwritten\&. Note that comments are not allowed on blank lines\&. +\fBamadmin\fR(8)\&. The optional barcode is prefixed with \*(AqBARCODE\*(Aq if the volume have a barcode\&. The optional meta label is prefixed with \*(AqMETA\*(Aq if the volume is on a meta volume\&. The optional blocksize is prefixed with \*(AqBLOCKSIZE\*(Aq\&. The optional comment is prefixed with a \*(Aq#\*(Aq and continues to the end of the line\&. Amanda will maintain this comment until the tape is overwritten\&. Note that comments are not allowed on blank lines\&. .PP The file is sorted such that the most\-recently used tape appears on the first line, and the oldest tape appears on the last line\&. .PP diff --git a/man/xml-source/amadmin.8.xml b/man/xml-source/amadmin.8.xml index 4b4aafd..c4261bd 100644 --- a/man/xml-source/amadmin.8.xml +++ b/man/xml-source/amadmin.8.xml @@ -33,6 +33,7 @@ --version --no-default --print-source + --exact-match &configoverride.synopsis; config command @@ -65,9 +66,13 @@ and disklist commands. -Print where a value is definedi for config +Print where a value is defined for config and disklist commands. + + +The host and disk are parsed as exact values + diff --git a/man/xml-source/amanda-changers.7.xml b/man/xml-source/amanda-changers.7.xml index 0a69b1a..cfdd629 100644 --- a/man/xml-source/amanda-changers.7.xml +++ b/man/xml-source/amanda-changers.7.xml @@ -158,6 +158,20 @@ tpchanger "aggregate" This changer driver allow to use two or more changers or standalone drive in sequence. +Properties + + + + +LOCK-TIMEOUT +The time in seconds amanda wait to lock the statefile (default:1000) + + +STATE_FILENAME +The name of the state file (default: "$CONFIG_DIR/$changer_name.state". + + + chg-disk:VTAPEROOT (new) @@ -191,6 +205,10 @@ name="amrestore" vol="8" /> command line. If a slotN directory in the range 1 to NUM-SLOT does not already exist, and this property is true, then the changer will create the directory. +LOCK-TIMEOUT +The time in seconds amanda wait to lock the statefile (default:1000) + + MOUNT If this property is true, the changer try to mount the removable disk if nothing is mounted. The system must be configured to allow the amanda user to mount it. @@ -274,6 +292,10 @@ tpchanger "chg-multi:s3:mycompany-backups/tape-{001..100}" This property gives the number of the first slot. The default value is "1". +LOCK-TIMEOUT +The time in seconds amanda wait to lock the statefile (default:1000) + + @@ -627,6 +649,10 @@ The default value is "0s poll 3s until 2m". +LOCK-TIMEOUT +The time in seconds amanda wait to lock the statefile (default:1000) + + MTX The path to the 'mtx' binary. The default value is defined at compile time. diff --git a/man/xml-source/amanda-devices.7.xml b/man/xml-source/amanda-devices.7.xml index f122e98..fa9987f 100644 --- a/man/xml-source/amanda-devices.7.xml +++ b/man/xml-source/amanda-devices.7.xml @@ -550,8 +550,10 @@ for the most up-to-date list. (read-write) Which API to use for the cloud: S3 Amanzon S3 api - SWITF-1.0 Openstack swift v1.0 + SWIFT-1.0 Openstack swift v1.0 SWIFT-2.0 Openstack swift v2.0 + OAUTH2 Google + CASTOR Caringo CAStor diff --git a/man/xml-source/amanda-match.7.xml b/man/xml-source/amanda-match.7.xml index fe6ecce..121d293 100644 --- a/man/xml-source/amanda-match.7.xml +++ b/man/xml-source/amanda-match.7.xml @@ -37,6 +37,9 @@ sequence of several expressions intended to match particular dumps in the catalog. Other applications take a DLE specification which indicates a set of DLEs to be operated on. These formats are described below. +An expression can be disabled be preceding it with the '=' character, +in that case, an exact match is used. +Many program have an '--exact-match' argument that disable expression and exact match are used. HOST & DISK EXPRESSIONS diff --git a/man/xml-source/amanda.conf.5.xml b/man/xml-source/amanda.conf.5.xml index e8d1fc0..c6ab2ec 100644 --- a/man/xml-source/amanda.conf.5.xml +++ b/man/xml-source/amanda.conf.5.xml @@ -349,6 +349,28 @@ Specify which types of messages will trigger an email from amreport. amreport is + + report-use-media boolean + +Default: +True if max-dle-by-volume +is not set, +False if it is set. +If the reporter must print the list of media used in the run. + + + + + report-next-media boolean + +Default: +True if max-dle-by-volume +is not set, +False if it is set. +If the reporter must print the list of media expected for the next run. + + + max-dle-by-volume int @@ -2506,13 +2528,10 @@ tape devices. part-size int -Default: none. This is the size (in KB if no units are specified) of -each split part written to the volume. It is reduced to -part-cache-max-size when part caching is required. -If this is set to zero, then no splitting will take place; in this case, -some devices can span dumps from volume to volume, while others will cause -the entire dump to fail if they encounter end-of-medium before the dump is -complete. See "Dump Splitting Configuration" below. +If this is set to zero (default), then no splitting will take place, +and the entire dump will fail, if end-of-medium is encountered before +the dump is complete, unless the device property LEOM is true, and the +device can detect EOM. See "Dump Splitting Configuration" below. diff --git a/man/xml-source/amcheck.8.xml b/man/xml-source/amcheck.8.xml index ac8dc45..148b6f5 100644 --- a/man/xml-source/amcheck.8.xml +++ b/man/xml-source/amcheck.8.xml @@ -34,6 +34,7 @@ -sclt -M address --client-verbose + --exact-match &configoverride.synopsis; config @@ -157,6 +158,13 @@ Implies + + + +The host and disk are parsed as exact values + + + host [disk]* diff --git a/man/xml-source/amdump.8.xml b/man/xml-source/amdump.8.xml index bf170da..ceb12f3 100644 --- a/man/xml-source/amdump.8.xml +++ b/man/xml-source/amdump.8.xml @@ -29,7 +29,8 @@ amdump - + --no-taper + --exact-match &configoverride.synopsis; config @@ -84,6 +85,13 @@ man page for more details about Amanda. + + + +The host and disk are parsed as exact values + + + &configoverride.varlistentry; diff --git a/man/xml-source/amfetchdump.8.xml b/man/xml-source/amfetchdump.8.xml index b934b2d..5b443a0 100644 --- a/man/xml-source/amfetchdump.8.xml +++ b/man/xml-source/amfetchdump.8.xml @@ -51,12 +51,19 @@ --server-decompress --client-decompress + + --extract + --directory directory + --data-path amanda|directtcp + --application-property NAME=VALUE* + --decrypt --no-decrypt --server-decrypt --client-decrypt + --exact_match &configoverride.synopsis; config hostname @@ -190,6 +197,46 @@ the server. Do the decryption only if the encryption was done on the client. + + + + +The host and disk are parsed as exact values + + + + + + +Extract the backup on the server in the +directory directory. + + + + + directory + +Where to extract the backup with the option. +Warning: All files in that directory can be removed. + + + + + amanda|directtcp + +The data path to use with , the default is + to use the fatest data path. + + + + + NAME=VALUE + +Application property to send to the application with + + + + Leave dumps in the compressed/uncompressed and diff --git a/man/xml-source/amflush.8.xml b/man/xml-source/amflush.8.xml index e406111..e3b1360 100644 --- a/man/xml-source/amflush.8.xml +++ b/man/xml-source/amflush.8.xml @@ -31,6 +31,7 @@ amflush -b -f + --exact-match -s -D datestamp &configoverride.synopsis; @@ -110,6 +111,13 @@ will flush all dumps from 25 december 2000 to 27 december 2000. + + + +The host and disk are parsed as exact values + + + host [disk]* diff --git a/man/xml-source/amrestore.8.xml b/man/xml-source/amrestore.8.xml index 73a266a..099d6a8 100644 --- a/man/xml-source/amrestore.8.xml +++ b/man/xml-source/amrestore.8.xml @@ -37,6 +37,7 @@ -l label -p -h + --exact-match &configoverride.synopsis; changerspec @@ -167,6 +168,13 @@ header can be read by another application or utility (see disables any automatic decompression. Output file names will have a .RAW extension. + + + + + +The host and disk are parsed as exact values + &configoverride.varlistentry; diff --git a/man/xml-source/amvault.8.xml b/man/xml-source/amvault.8.xml index a2e1414..510b2cb 100644 --- a/man/xml-source/amvault.8.xml +++ b/man/xml-source/amvault.8.xml @@ -30,6 +30,7 @@ --dry-run-n --quiet-q --fulls-only + --exact-match --export src-timestamp @@ -171,6 +172,13 @@ perform any vaulting operations. + + + +The host and disk are parsed as exact values + + + diff --git a/man/xml-source/tapelist.5.xml b/man/xml-source/tapelist.5.xml index d7b5617..40d3cfb 100644 --- a/man/xml-source/tapelist.5.xml +++ b/man/xml-source/tapelist.5.xml @@ -35,7 +35,7 @@ manually. Its format may change, or it may be removed altogether, in future versions of Amanda. It contains lines of the form: -YYYYMMDD label flags [BARCODE:barcode] [META:meta] [#comment] +YYYYMMDD label flags [BARCODE:barcode] [META:meta] [BLOCKSIZE:blocksize] [#comment] Where @@ -54,6 +54,7 @@ options of . The optional barcode is prefixed with 'BARCODE' if the volume have a barcode. The optional meta label is prefixed with 'META' if the volume is on a meta volume. +The optional blocksize is prefixed with 'BLOCKSIZE'. The optional comment is prefixed with a '#' and continues to the end of the line. Amanda will maintain this comment until the tape is overwritten. Note that comments are not allowed on blank lines. diff --git a/ndmp-src/Makefile.in b/ndmp-src/Makefile.in index f75e3ad..bf0c3e8 100644 --- a/ndmp-src/Makefile.in +++ b/ndmp-src/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -84,9 +84,10 @@ # vim:ft=automake # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -157,6 +158,23 @@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -361,6 +379,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(amlibdir)" "$(DESTDIR)$(amlibexecdir)" LTLIBRARIES = $(amlib_LTLIBRARIES) libndmjob_la_DEPENDENCIES = libndmlib.la @@ -429,6 +453,11 @@ SOURCES = $(libndmjob_la_SOURCES) $(libndmlib_la_SOURCES) \ $(amndmjob_SOURCES) $(ndmjob_SOURCES) DIST_SOURCES = $(libndmjob_la_SOURCES) $(libndmlib_la_SOURCES) \ $(amndmjob_SOURCES) $(ndmjob_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags @@ -1453,6 +1482,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; +$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/installperms.am $(top_srcdir)/config/automake/precompile.am: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -1464,7 +1494,6 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-amlibLTLIBRARIES: $(amlib_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(amlibdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibdir)" @list='$(amlib_LTLIBRARIES)'; test -n "$(amlibdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -1472,6 +1501,8 @@ install-amlibLTLIBRARIES: $(amlib_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(amlibdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(amlibdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(amlibdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(amlibdir)"; \ } @@ -1493,14 +1524,17 @@ clean-amlibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libndmjob.la: $(libndmjob_la_OBJECTS) $(libndmjob_la_DEPENDENCIES) +libndmjob.la: $(libndmjob_la_OBJECTS) $(libndmjob_la_DEPENDENCIES) $(EXTRA_libndmjob_la_DEPENDENCIES) $(libndmjob_la_LINK) -rpath $(amlibdir) $(libndmjob_la_OBJECTS) $(libndmjob_la_LIBADD) $(LIBS) -libndmlib.la: $(libndmlib_la_OBJECTS) $(libndmlib_la_DEPENDENCIES) +libndmlib.la: $(libndmlib_la_OBJECTS) $(libndmlib_la_DEPENDENCIES) $(EXTRA_libndmlib_la_DEPENDENCIES) $(libndmlib_la_LINK) -rpath $(amlibdir) $(libndmlib_la_OBJECTS) $(libndmlib_la_LIBADD) $(LIBS) install-amlibexecPROGRAMS: $(amlibexec_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(amlibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)" @list='$(amlibexec_PROGRAMS)'; test -n "$(amlibexecdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(amlibexecdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ @@ -1540,10 +1574,10 @@ clean-amlibexecPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -amndmjob$(EXEEXT): $(amndmjob_OBJECTS) $(amndmjob_DEPENDENCIES) +amndmjob$(EXEEXT): $(amndmjob_OBJECTS) $(amndmjob_DEPENDENCIES) $(EXTRA_amndmjob_DEPENDENCIES) @rm -f amndmjob$(EXEEXT) $(LINK) $(amndmjob_OBJECTS) $(amndmjob_LDADD) $(LIBS) -ndmjob$(EXEEXT): $(ndmjob_OBJECTS) $(ndmjob_DEPENDENCIES) +ndmjob$(EXEEXT): $(ndmjob_OBJECTS) $(ndmjob_DEPENDENCIES) $(EXTRA_ndmjob_DEPENDENCIES) @rm -f ndmjob$(EXEEXT) $(LINK) $(ndmjob_OBJECTS) $(ndmjob_LDADD) $(LIBS) @@ -1763,10 +1797,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) diff --git a/ndmp-src/ndmjob_args.c b/ndmp-src/ndmjob_args.c index f31f597..ca73b46 100644 --- a/ndmp-src/ndmjob_args.c +++ b/ndmp-src/ndmjob_args.c @@ -150,10 +150,11 @@ process_args (int argc, char *argv[]) char ** pp; char * p; char * op; - char * av[1000]; + char ** av; int ac = 0; progname = argv[0]; + av = malloc((argc+1000) * sizeof(char *)); if (argc == 2 && strcmp (argv[1], "-help") == 0) { help(); @@ -674,6 +675,7 @@ handle_long_option (char *str) d_agent[size] = '\0'; if (size > 0 && d_agent[size-1] == '\n') d_agent[size-1] = '\0'; + close(fd); if (ndmagent_from_str (&D_data_agent, d_agent)) { error_byebye ("bad -D-agent-fd argument"); } diff --git a/ndmp-src/ndmpconnobj.c b/ndmp-src/ndmpconnobj.c index 41d14ed..ef4de85 100644 --- a/ndmp-src/ndmpconnobj.c +++ b/ndmp-src/ndmpconnobj.c @@ -1,9 +1,10 @@ /* * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -737,7 +738,7 @@ ndmp_connection_wait_for_notify( } } -typedef struct notify_data { +typedef struct notify_data_s { NDMPConnection *self; ndmp9_data_halt_reason *data_halt_reason; ndmp9_mover_halt_reason *mover_halt_reason; @@ -746,11 +747,15 @@ typedef struct notify_data { GMutex *abort_mutex; GCond *abort_cond; int status; + int in_use; event_handle_t *read_event; -} notify_data; +} notify_data_t; static void handle_notify(void *cookie); +static GStaticMutex notify_mutex = G_STATIC_MUTEX_INIT; +static notify_data_t **notify_data = NULL; +static int nb_notify_data = 0; int ndmp_connection_wait_for_notify_with_cond( NDMPConnection *self, @@ -758,21 +763,53 @@ ndmp_connection_wait_for_notify_with_cond( ndmp9_mover_halt_reason *mover_halt_reason, ndmp9_mover_pause_reason *mover_pause_reason, guint64 *mover_pause_seek_position, + int *cancelled, GMutex *abort_mutex, GCond *abort_cond) { struct ndmp_msg_buf nmb; - notify_data ndata; + notify_data_t *ndata; gboolean found = FALSE; - - ndata.self = self; - ndata.data_halt_reason= data_halt_reason; - ndata.mover_halt_reason= mover_halt_reason; - ndata.mover_pause_reason= mover_pause_reason; - ndata.mover_pause_seek_position = mover_pause_seek_position; - ndata.abort_mutex = abort_mutex; - ndata.abort_cond = abort_cond; - ndata.status = 2; + int status; + int i; + + g_static_mutex_lock(¬ify_mutex); + if (notify_data == NULL) { + glib_init(); + nb_notify_data = 10; + notify_data = g_new0(notify_data_t *, nb_notify_data); + for (i=0;iin_use > 0) { + i++; + } + if (i == nb_notify_data) { + int new_nb_notify_data = nb_notify_data * 2; + int j; + notify_data = g_realloc(notify_data, + sizeof(notify_data_t *) * new_nb_notify_data); + for (j=nb_notify_data; jself = self; + ndata->data_halt_reason= data_halt_reason; + ndata->mover_halt_reason= mover_halt_reason; + ndata->mover_pause_reason= mover_pause_reason; + ndata->mover_pause_seek_position = mover_pause_seek_position; + ndata->abort_mutex = abort_mutex; + ndata->abort_cond = abort_cond; + ndata->status = 2; + ndata->in_use = 1; + g_static_mutex_unlock(¬ify_mutex); g_assert(!self->startup_err); @@ -818,33 +855,43 @@ ndmp_connection_wait_for_notify_with_cond( * outside of the ndmlib_mutex critical section. This will also be * useful to allow the wait to be aborted. */ - ndata.read_event = event_register(self->conn->chan.fd, - EV_READFD, handle_notify, &ndata); + /* handle_notify can be executed before the register exit */ + ndata->read_event = event_create(self->conn->chan.fd, + EV_READFD, handle_notify, ndata); + event_activate(ndata->read_event); - g_cond_wait(abort_cond, abort_mutex); + while (!*cancelled && ndata->status == 2) { + g_cond_wait(abort_cond, abort_mutex); + } + g_static_mutex_lock(¬ify_mutex); - if (ndata.read_event) { - event_release(ndata.read_event); + if (ndata->read_event) { + event_release(ndata->read_event); + ndata->read_event = NULL; } - if (ndata.status == 2) { + if (ndata->status == 2) { ndmp_connection_mover_abort(self); ndmp_connection_mover_stop(self); } - return ndata.status; + status = ndata->status; + ndata->in_use++; + if (ndata->in_use == 3) + ndata->in_use = 0; + g_static_mutex_unlock(¬ify_mutex); + return status; } static void handle_notify(void *cookie) { - notify_data *ndata = cookie; + notify_data_t *ndata = cookie; struct ndmp_msg_buf nmb; gboolean found = FALSE; + GCond *abort_cond = ndata->abort_cond; + GMutex *abort_mutex = ndata->abort_mutex; - g_mutex_lock(ndata->abort_mutex); - - event_release(ndata->read_event); - ndata->read_event = NULL; + g_mutex_lock(abort_mutex); g_static_mutex_lock(&ndmlib_mutex); NDMOS_MACRO_ZEROFILL(&nmb); @@ -885,16 +932,31 @@ handle_notify(void *cookie) } if (!found) { - ndata->read_event = event_register(ndata->self->conn->chan.fd, - EV_READFD, handle_notify, ndata); - g_mutex_unlock(ndata->abort_mutex); + g_static_mutex_lock(¬ify_mutex); + if (ndata->in_use == 2) { + goto notify_done_locked; + } + g_static_mutex_unlock(¬ify_mutex); + + g_mutex_unlock(abort_mutex); return; } ndata->status = 0; notify_done: - g_cond_broadcast(ndata->abort_cond); - g_mutex_unlock(ndata->abort_mutex); + g_static_mutex_lock(¬ify_mutex); +notify_done_locked: + if (ndata->read_event) { + event_release(ndata->read_event); + ndata->read_event = NULL; + } + ndata->in_use++; + if (ndata->in_use == 3) + ndata->in_use = 0; + g_static_mutex_unlock(¬ify_mutex); + + g_cond_broadcast(abort_cond); + g_mutex_unlock(abort_mutex); } /* * Class Mechanics diff --git a/ndmp-src/ndmpconnobj.h b/ndmp-src/ndmpconnobj.h index f34577b..f2c7ffb 100644 --- a/ndmp-src/ndmpconnobj.h +++ b/ndmp-src/ndmpconnobj.h @@ -1,9 +1,10 @@ /* * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -38,7 +39,7 @@ GType ndmp_connection_get_type (void); * Parent class for connections */ -typedef struct NDMPConnection_ { +typedef struct NDMPConnection { GObject __parent__; /* the ndmconn - interface to ndmlib */ @@ -226,7 +227,7 @@ gboolean ndmp_connection_wait_for_notify( /* Synchronous notification interface. This handles all types of notification, * returning the result in the appropriate output parameter. */ -gboolean ndmp_connection_wait_for_notify_with_cond( +int ndmp_connection_wait_for_notify_with_cond( NDMPConnection *self, /* NDMP_NOTIFY_DATA_HALTED */ ndmp9_data_halt_reason *data_halt_reason, @@ -235,6 +236,7 @@ gboolean ndmp_connection_wait_for_notify_with_cond( /* NDMP_NOTIFY_MOVER_PAUSED */ ndmp9_mover_pause_reason *mover_pause_reason, guint64 *mover_pause_seek_position, + int *cancelled, GMutex *abort_mutex, GCond *abort_cond); diff --git a/oldrecover-src/Makefile.in b/oldrecover-src/Makefile.in index b2750e6..d154184 100644 --- a/oldrecover-src/Makefile.in +++ b/oldrecover-src/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -20,9 +20,10 @@ # vim:ft=automake # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -92,6 +93,23 @@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -301,15 +319,20 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS) +LEXCOMPILE = $(LEX) $(AM_LFLAGS) $(LFLAGS) LTLEXCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS) + --mode=compile $(LEX) $(AM_LFLAGS) $(LFLAGS) YLWRAP = $(top_srcdir)/config/ylwrap -YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS) +YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS) LTYACCCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(YACC) $(YFLAGS) $(AM_YFLAGS) + --mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS) SOURCES = $(amoldrecover_SOURCES) DIST_SOURCES = $(amoldrecover_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags @@ -1217,6 +1240,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; +$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/installperms.am $(top_srcdir)/config/automake/precompile.am: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -1228,8 +1252,11 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ @@ -1270,11 +1297,9 @@ clean-sbinPROGRAMS: echo " rm -f" $$list; \ rm -f $$list uparse.h: uparse.c - @if test ! -f $@; then \ - rm -f uparse.c; \ - $(MAKE) $(AM_MAKEFLAGS) uparse.c; \ - else :; fi -amoldrecover$(EXEEXT): $(amoldrecover_OBJECTS) $(amoldrecover_DEPENDENCIES) + @if test ! -f $@; then rm -f uparse.c; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) uparse.c; else :; fi +amoldrecover$(EXEEXT): $(amoldrecover_OBJECTS) $(amoldrecover_DEPENDENCIES) $(EXTRA_amoldrecover_DEPENDENCIES) @rm -f amoldrecover$(EXEEXT) $(LINK) $(amoldrecover_OBJECTS) $(amoldrecover_LDADD) $(LIBS) @@ -1426,10 +1451,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) diff --git a/oldrecover-src/amrecover.c b/oldrecover-src/amrecover.c index 3ca040d..39bc3c2 100644 --- a/oldrecover-src/amrecover.c +++ b/oldrecover-src/amrecover.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998, 2000 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -523,6 +524,9 @@ main( act.sa_handler = sigint_handler; sigemptyset(&act.sa_mask); act.sa_flags = 0; +#ifdef SA_RESTORER + act.sa_restorer = NULL; +#endif if (sigaction(SIGINT, &act, &oact) != 0) { error(_("error setting signal handler: %s"), strerror(errno)); /*NOTREACHED*/ @@ -531,7 +535,7 @@ main( service_name = stralloc2("amandaidx", SERVICE_SUFFIX); g_printf(_("AMRECOVER Version %s. Contacting server on %s ...\n"), - VERSION, server_name); + VERSION, server_name); if ((sp = getservbyname(service_name, "tcp")) == NULL) { error(_("%s/tcp unknown protocol"), service_name); /*NOTREACHED*/ diff --git a/oldrecover-src/amrecover.h b/oldrecover-src/amrecover.h index 54a975b..5e1d9a5 100644 --- a/oldrecover-src/amrecover.h +++ b/oldrecover-src/amrecover.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998, 2000 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/oldrecover-src/display_commands.c b/oldrecover-src/display_commands.c index 2cb4f0a..62418bc 100644 --- a/oldrecover-src/display_commands.c +++ b/oldrecover-src/display_commands.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/oldrecover-src/extract_list.c b/oldrecover-src/extract_list.c index 4c36eb2..43971d7 100644 --- a/oldrecover-src/extract_list.c +++ b/oldrecover-src/extract_list.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998, 2000 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/oldrecover-src/help.c b/oldrecover-src/help.c index bdb3525..88fbb63 100644 --- a/oldrecover-src/help.c +++ b/oldrecover-src/help.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998, 2000 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/oldrecover-src/set_commands.c b/oldrecover-src/set_commands.c index 7a52122..9ee0448 100644 --- a/oldrecover-src/set_commands.c +++ b/oldrecover-src/set_commands.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998, 2000 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/oldrecover-src/uparse.c b/oldrecover-src/uparse.c index 9db3d70..45caecb 100644 --- a/oldrecover-src/uparse.c +++ b/oldrecover-src/uparse.c @@ -66,7 +66,7 @@ /* Copy the first part of user declarations. */ /* Line 268 of yacc.c */ -#line 31 "uparse.y" +#line 32 "uparse.y" #include "amanda.h" #include "amrecover.h" @@ -173,7 +173,7 @@ typedef union YYSTYPE { /* Line 293 of yacc.c */ -#line 42 "uparse.y" +#line 43 "uparse.y" int intval; double floatval; @@ -498,11 +498,11 @@ static const yytype_int8 yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint8 yyrline[] = { - 0, 65, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, 84, 85, 86, 87, 88, 89, 90, - 91, 92, 93, 94, 95, 100, 108, 109, 110, 111, - 112, 113, 114, 118, 122, 126, 127, 131, 135, 136, - 140, 144, 145, 149, 153, 154, 158, 159, 166, 170 + 0, 66, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 101, 109, 110, 111, 112, + 113, 114, 115, 119, 123, 127, 128, 132, 136, 137, + 141, 145, 146, 150, 154, 155, 159, 160, 167, 171 }; #endif @@ -1471,7 +1471,7 @@ yyreduce: case 12: /* Line 1806 of yacc.c */ -#line 75 "uparse.y" +#line 76 "uparse.y" { char * errstr = vstralloc("Invalid command: ", yytext, NULL); yyerror(errstr); @@ -1483,84 +1483,84 @@ yyreduce: case 13: /* Line 1806 of yacc.c */ -#line 84 "uparse.y" +#line 85 "uparse.y" { list_host(); } break; case 14: /* Line 1806 of yacc.c */ -#line 85 "uparse.y" +#line 86 "uparse.y" { list_disk((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); } break; case 15: /* Line 1806 of yacc.c */ -#line 86 "uparse.y" +#line 87 "uparse.y" { list_disk(NULL); } break; case 16: /* Line 1806 of yacc.c */ -#line 87 "uparse.y" +#line 88 "uparse.y" { set_date((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); } break; case 17: /* Line 1806 of yacc.c */ -#line 88 "uparse.y" +#line 89 "uparse.y" { set_host((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); } break; case 18: /* Line 1806 of yacc.c */ -#line 89 "uparse.y" +#line 90 "uparse.y" { set_disk((yyvsp[(2) - (3)].strval), (yyvsp[(3) - (3)].strval)); amfree((yyvsp[(2) - (3)].strval)); amfree((yyvsp[(3) - (3)].strval)); } break; case 19: /* Line 1806 of yacc.c */ -#line 90 "uparse.y" +#line 91 "uparse.y" { set_disk((yyvsp[(2) - (2)].strval), NULL); amfree((yyvsp[(2) - (2)].strval)); } break; case 20: /* Line 1806 of yacc.c */ -#line 91 "uparse.y" +#line 92 "uparse.y" { set_tape((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); } break; case 21: /* Line 1806 of yacc.c */ -#line 92 "uparse.y" +#line 93 "uparse.y" { set_tape(""); } break; case 22: /* Line 1806 of yacc.c */ -#line 93 "uparse.y" +#line 94 "uparse.y" { cd_glob((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); } break; case 23: /* Line 1806 of yacc.c */ -#line 94 "uparse.y" +#line 95 "uparse.y" { cd_regex((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); } break; case 24: /* Line 1806 of yacc.c */ -#line 95 "uparse.y" +#line 96 "uparse.y" { #ifdef SAMBA_CLIENT set_mode(SAMBA_SMBCLIENT); @@ -1571,7 +1571,7 @@ yyreduce: case 25: /* Line 1806 of yacc.c */ -#line 100 "uparse.y" +#line 101 "uparse.y" { #ifdef SAMBA_CLIENT set_mode(SAMBA_TAR); @@ -1582,126 +1582,126 @@ yyreduce: case 26: /* Line 1806 of yacc.c */ -#line 108 "uparse.y" +#line 109 "uparse.y" { list_disk_history(); } break; case 27: /* Line 1806 of yacc.c */ -#line 109 "uparse.y" +#line 110 "uparse.y" { list_directory(); } break; case 28: /* Line 1806 of yacc.c */ -#line 110 "uparse.y" +#line 111 "uparse.y" { display_extract_list((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); } break; case 29: /* Line 1806 of yacc.c */ -#line 111 "uparse.y" +#line 112 "uparse.y" { display_extract_list(NULL); } break; case 30: /* Line 1806 of yacc.c */ -#line 112 "uparse.y" +#line 113 "uparse.y" { show_directory(); } break; case 31: /* Line 1806 of yacc.c */ -#line 113 "uparse.y" +#line 114 "uparse.y" { clear_extract_list(); } break; case 32: /* Line 1806 of yacc.c */ -#line 114 "uparse.y" +#line 115 "uparse.y" { show_mode (); } break; case 33: /* Line 1806 of yacc.c */ -#line 118 "uparse.y" +#line 119 "uparse.y" { quit(); } break; case 35: /* Line 1806 of yacc.c */ -#line 126 "uparse.y" +#line 127 "uparse.y" { add_glob((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); } break; case 36: /* Line 1806 of yacc.c */ -#line 127 "uparse.y" +#line 128 "uparse.y" { add_glob((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); } break; case 38: /* Line 1806 of yacc.c */ -#line 135 "uparse.y" +#line 136 "uparse.y" { add_regex((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); } break; case 39: /* Line 1806 of yacc.c */ -#line 136 "uparse.y" +#line 137 "uparse.y" { add_regex((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); } break; case 41: /* Line 1806 of yacc.c */ -#line 144 "uparse.y" +#line 145 "uparse.y" { delete_glob((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); } break; case 42: /* Line 1806 of yacc.c */ -#line 145 "uparse.y" +#line 146 "uparse.y" { delete_glob((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); } break; case 44: /* Line 1806 of yacc.c */ -#line 153 "uparse.y" +#line 154 "uparse.y" { delete_regex((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); } break; case 45: /* Line 1806 of yacc.c */ -#line 154 "uparse.y" +#line 155 "uparse.y" { delete_regex((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); } break; case 46: /* Line 1806 of yacc.c */ -#line 158 "uparse.y" +#line 159 "uparse.y" { char buf[STR_SIZE]; puts(getcwd(buf, sizeof(buf))); } break; case 47: /* Line 1806 of yacc.c */ -#line 159 "uparse.y" +#line 160 "uparse.y" { local_cd((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); @@ -1711,14 +1711,14 @@ yyreduce: case 48: /* Line 1806 of yacc.c */ -#line 166 "uparse.y" +#line 167 "uparse.y" { help_list(); } break; case 49: /* Line 1806 of yacc.c */ -#line 170 "uparse.y" +#line 171 "uparse.y" { extract_files(); } break; @@ -1956,7 +1956,7 @@ yyreturn: /* Line 2067 of yacc.c */ -#line 174 "uparse.y" +#line 175 "uparse.y" void diff --git a/oldrecover-src/uparse.h b/oldrecover-src/uparse.h index 6507174..b3e1dd2 100644 --- a/oldrecover-src/uparse.h +++ b/oldrecover-src/uparse.h @@ -105,7 +105,7 @@ typedef union YYSTYPE { /* Line 2068 of yacc.c */ -#line 42 "uparse.y" +#line 43 "uparse.y" int intval; double floatval; diff --git a/oldrecover-src/uparse.y b/oldrecover-src/uparse.y index 6166db2..824a772 100644 --- a/oldrecover-src/uparse.y +++ b/oldrecover-src/uparse.y @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998, 2000 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/oldrecover-src/uscan.c b/oldrecover-src/uscan.c index 6e02e62..d53a9e6 100644 --- a/oldrecover-src/uscan.c +++ b/oldrecover-src/uscan.c @@ -533,6 +533,7 @@ char *yytext; /* * amanda, the advanced maryland automatic network disk archiver * Copyright (c) 1991-2000 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -560,7 +561,7 @@ char *yytext; * * lexer for amrecover interactive language */ -#line 32 "uscan.l" +#line 33 "uscan.l" #include "amanda.h" #include "uparse.h" @@ -587,9 +588,9 @@ extern int yyparse(void); static int ll_parse_date(int type, char *text); int process_line(char *line); -#line 62 "uscan.l" +#line 63 "uscan.l" static char *string_buf = NULL; -#line 593 "uscan.c" +#line 594 "uscan.c" #define INITIAL 0 #define quotedpath 1 @@ -772,14 +773,14 @@ YY_DECL register char *yy_cp, *yy_bp; register int yy_act; -#line 65 "uscan.l" +#line 66 "uscan.l" /* literal keyword tokens */ -#line 783 "uscan.c" +#line 784 "uscan.c" if ( !(yy_init) ) { @@ -864,142 +865,142 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 71 "uscan.l" +#line 72 "uscan.l" { return LISTHOST; } YY_BREAK case 2: YY_RULE_SETUP -#line 72 "uscan.l" +#line 73 "uscan.l" { return LISTDISK; } YY_BREAK case 3: YY_RULE_SETUP -#line 73 "uscan.l" +#line 74 "uscan.l" { return SETHOST; } YY_BREAK case 4: YY_RULE_SETUP -#line 74 "uscan.l" +#line 75 "uscan.l" { return SETDISK; } YY_BREAK case 5: YY_RULE_SETUP -#line 75 "uscan.l" +#line 76 "uscan.l" { return SETDATE; } YY_BREAK case 6: YY_RULE_SETUP -#line 76 "uscan.l" +#line 77 "uscan.l" { return SETMODE; } YY_BREAK case 7: YY_RULE_SETUP -#line 77 "uscan.l" +#line 78 "uscan.l" { return SETTAPE; } YY_BREAK case 8: YY_RULE_SETUP -#line 78 "uscan.l" +#line 79 "uscan.l" { return CD; } YY_BREAK case 9: YY_RULE_SETUP -#line 79 "uscan.l" +#line 80 "uscan.l" { return CDX; } YY_BREAK case 10: YY_RULE_SETUP -#line 80 "uscan.l" +#line 81 "uscan.l" { return QUIT; } YY_BREAK case 11: YY_RULE_SETUP -#line 81 "uscan.l" +#line 82 "uscan.l" { return QUIT; } YY_BREAK case 12: YY_RULE_SETUP -#line 82 "uscan.l" +#line 83 "uscan.l" { return DHIST; } YY_BREAK case 13: YY_RULE_SETUP -#line 83 "uscan.l" +#line 84 "uscan.l" { return LS; } YY_BREAK case 14: YY_RULE_SETUP -#line 84 "uscan.l" +#line 85 "uscan.l" { return ADD; } YY_BREAK case 15: YY_RULE_SETUP -#line 85 "uscan.l" +#line 86 "uscan.l" { return ADDX; } YY_BREAK case 16: YY_RULE_SETUP -#line 86 "uscan.l" +#line 87 "uscan.l" { return LIST; } YY_BREAK case 17: YY_RULE_SETUP -#line 87 "uscan.l" +#line 88 "uscan.l" { return DELETE; } YY_BREAK case 18: YY_RULE_SETUP -#line 88 "uscan.l" +#line 89 "uscan.l" { return DELETEX; } YY_BREAK case 19: YY_RULE_SETUP -#line 89 "uscan.l" +#line 90 "uscan.l" { return PWD; } YY_BREAK case 20: YY_RULE_SETUP -#line 90 "uscan.l" +#line 91 "uscan.l" { return CLEAR; } YY_BREAK case 21: YY_RULE_SETUP -#line 91 "uscan.l" +#line 92 "uscan.l" { return HELP; } YY_BREAK case 22: YY_RULE_SETUP -#line 92 "uscan.l" +#line 93 "uscan.l" { return HELP; } YY_BREAK case 23: YY_RULE_SETUP -#line 93 "uscan.l" +#line 94 "uscan.l" { return LCD; } YY_BREAK case 24: YY_RULE_SETUP -#line 94 "uscan.l" +#line 95 "uscan.l" { return LPWD; } YY_BREAK case 25: YY_RULE_SETUP -#line 95 "uscan.l" +#line 96 "uscan.l" { return EXTRACT; } YY_BREAK case 26: YY_RULE_SETUP -#line 96 "uscan.l" +#line 97 "uscan.l" { return SMB; } YY_BREAK case 27: YY_RULE_SETUP -#line 97 "uscan.l" +#line 98 "uscan.l" { return TAR; } YY_BREAK case 28: YY_RULE_SETUP -#line 98 "uscan.l" +#line 99 "uscan.l" { return MODE; } YY_BREAK @@ -1007,27 +1008,27 @@ YY_RULE_SETUP case 29: YY_RULE_SETUP -#line 104 "uscan.l" +#line 105 "uscan.l" { return ll_parse_date(1, yytext); } YY_BREAK case 30: YY_RULE_SETUP -#line 105 "uscan.l" +#line 106 "uscan.l" { return ll_parse_date(2, yytext); } YY_BREAK case 31: YY_RULE_SETUP -#line 106 "uscan.l" +#line 107 "uscan.l" { return ll_parse_date(3, yytext); } YY_BREAK case 32: YY_RULE_SETUP -#line 107 "uscan.l" +#line 108 "uscan.l" { return ll_parse_date(4, yytext); } YY_BREAK case 33: YY_RULE_SETUP -#line 108 "uscan.l" +#line 109 "uscan.l" { return ll_parse_date(5, yytext); } YY_BREAK @@ -1035,7 +1036,7 @@ YY_RULE_SETUP case 34: YY_RULE_SETUP -#line 114 "uscan.l" +#line 115 "uscan.l" { if(string_buf != NULL) { g_printf("ERROR:string_buf != NULL: %s\n",string_buf); @@ -1047,14 +1048,14 @@ YY_RULE_SETUP case 35: /* rule 35 can match eol */ YY_RULE_SETUP -#line 122 "uscan.l" +#line 123 "uscan.l" { strappend(string_buf, yytext); } YY_BREAK case 36: YY_RULE_SETUP -#line 126 "uscan.l" +#line 127 "uscan.l" { /* escaped character (including quote) */ strappend(string_buf, yytext); @@ -1062,7 +1063,7 @@ YY_RULE_SETUP YY_BREAK case 37: YY_RULE_SETUP -#line 131 "uscan.l" +#line 132 "uscan.l" { /* saw closing quote - all done */ strappend(string_buf, yytext); yylval.strval = string_buf; @@ -1076,7 +1077,7 @@ YY_RULE_SETUP case 38: YY_RULE_SETUP -#line 143 "uscan.l" +#line 144 "uscan.l" { yylval.strval = stralloc(yytext); return PATH; @@ -1088,7 +1089,7 @@ YY_RULE_SETUP case 39: /* rule 39 can match eol */ YY_RULE_SETUP -#line 152 "uscan.l" +#line 153 "uscan.l" ; /* whitespace */ YY_BREAK @@ -1102,10 +1103,10 @@ YY_RULE_SETUP case 40: YY_RULE_SETUP -#line 165 "uscan.l" +#line 166 "uscan.l" ECHO; YY_BREAK -#line 1109 "uscan.c" +#line 1110 "uscan.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(quotedpath): yyterminate(); @@ -2104,7 +2105,7 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 165 "uscan.l" +#line 166 "uscan.l" diff --git a/oldrecover-src/uscan.l b/oldrecover-src/uscan.l index e5d7fdd..41fd478 100644 --- a/oldrecover-src/uscan.l +++ b/oldrecover-src/uscan.l @@ -1,6 +1,7 @@ /* * amanda, the advanced maryland automatic network disk archiver * Copyright (c) 1991-2000 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/packaging/Makefile.in b/packaging/Makefile.in index cf72676..8f0a5a7 100644 --- a/packaging/Makefile.in +++ b/packaging/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,6 +15,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -194,6 +211,11 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AIX_BACKUP = @AIX_BACKUP@ @@ -1101,10 +1123,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/packaging/common/common_functions.sh b/packaging/common/common_functions.sh index 788d15c..15c9dd1 100644 --- a/packaging/common/common_functions.sh +++ b/packaging/common/common_functions.sh @@ -10,7 +10,7 @@ logger() { # A non-annoying way to log stuff # ${@} is all the parameters, also known as the message. Quoting the input # preserves whitespace. - msg="`date +'%b %e %Y %T'`: ${@}" + msg="`date +'%b %d %Y %T'`: ${@}" echo "${msg}" >> ${LOGFILE} } @@ -210,27 +210,26 @@ install_smf() { reload_xinetd() { # Default action is to try reload. - if [ "x$1" = "x" ]; then - action="reload" - elif [ "$1" = "reload" ] || [ "$1" = "restart" ]; then - action="$1" - else - logger "WARNING: bad argument to reload_xinetd: $1" - return 1 - fi + case $1 in + reload|restart|start) action=$1 ;; + "") action=reload ;; + *) logger "WARNING: bad argument to reload_xinetd: $1" + return 1 + ;; + esac + if [ "$action" = "reload" ] ; then logger "Reloading xinetd configuration..." log_output_of ${SYSCONFDIR}/init.d/xinetd $action # Don't exit! if [ $? -ne 0 ] ; then logger "xinetd reload failed. Attempting restart..." - log_output_of ${SYSCONFDIR}/init.d/xinetd restart || \ - { logger "WARNING: restart failed." ; return 1; } + action=restart fi - else - # Must be restart... - logger "Restarting xinetd." - log_output_of ${SYSCONFDIR}/init.d/xinetd $1 || \ - { logger "WARNING: ${1} failed." ; return 1; } + fi + if [ "$action" = "restart" ] || [ "$action" = "start" ]; then + logger "${action}ing xinetd." + log_output_of ${SYSCONFDIR}/init.d/xinetd $action || \ + { logger "WARNING: $action failed." ; return 1; } fi } diff --git a/packaging/common/post_inst_functions.sh b/packaging/common/post_inst_functions.sh index 23a20ba..a410db9 100644 --- a/packaging/common/post_inst_functions.sh +++ b/packaging/common/post_inst_functions.sh @@ -11,6 +11,7 @@ # os: Linux, Mac, Solaris, etc... # SYSCONFDIR: location of system config files (ie, /etc) # LOGDIR: logging directory for amanda +# encoder: either base64 or uuencode depending on the default for this platform #TODO: gnutar-lists dir for solaris?? @@ -59,12 +60,111 @@ create_gnupg() { fi } +get_random_lines() { + # Print $1 lines of random strings to stdout. + + [ "$1" ] && [ $1 -gt 0 ] || \ + { logger "Error: '$1' not valid number of lines" ; return 1 ; } + lines=$1 + [ -f "${encoder}" ] || \ + { logger "Warning: Encoder '${encoder}' was not found. Random passwords cannot be generated." ; return 1; } + case ${encoder} in + # "foo" is a required parameter that we throw away. + *uuencode*) enc_cmd="${encoder} foo" ;; + *base64*) enc_cmd="${encoder}" ;; + esac + # Uuencode leaves a header (and footer) line, but base64 does not. + # So we pad output with an extra line, and strip any trailing lines over + # $lines + pad_lines=`expr $lines + 1` + # Increasing bs= is substantially faster than increasing count=. + # The number of bytes needed to start line wrapping is implementation + # specific. base64. 60b > 1 base64 encoded line for all versions tested. + block_size=`expr $pad_lines \* 60` + # Head -c is not portable. + dd bs=${block_size} count=1 if=/dev/urandom 2>/dev/null | \ + ${enc_cmd} | \ + head -$pad_lines | \ + tail -$lines || \ + { logger "Warning: Error generating random passphrase."; return 1; } +} + +create_ampassphrase() { + # install am_passphrase file to server + logger "Checking '${AMANDAHOMEDIR}/.am_passphrase' file." + if [ ! -f ${AMANDAHOMEDIR}/.am_passphrase ] ; then + # Separate file creation from password creation to ease debugging. + logger "Creating '${AMANDAHOMEDIR}/.am_passphrase' file." + log_output_of touch ${AMANDAHOMEDIR}/.am_passphrase || \ + { logger "WARNING: Could not create .am_passphrase." ; return 1; } + phrase=`get_random_lines 1` || return 1 # Error already logged + echo ${phrase} >>${AMANDAHOMEDIR}/.am_passphrase + else + logger "Info: ${AMANDAHOMEDIR}/.am_passphrase already exists." + fi + # Fix permissions for both new or existing installations. + log_output_of chown ${amanda_user}:${amanda_group} ${AMANDAHOMEDIR}/.am_passphrase || \ + { logger "WARNING: Could not chown .am_passphrase" ; return 1; } + log_output_of chmod 0600 ${AMANDAHOMEDIR}/.am_passphrase || \ + { logger "WARNING: Could not fix permissions on .am_passphrase" ; return 1; } +} + +create_amkey() { + [ -f ${AMANDAHOMEDIR}/.am_passphrase ] || \ + { logger "Error: ${AMANDAHOMEDIR}/.am_passphrase is missing, can't create amcrypt key."; return 1; } + logger "Creating encryption key for amcrypt" + if [ ! -f ${AMANDAHOMEDIR}/.gnupg/am_key.gpg ]; then + # TODO: don't write this stuff to disk! + get_random_lines 50 >${AMANDAHOMEDIR}/.gnupg/am_key || return 1 + exec 3<${AMANDAHOMEDIR}/.am_passphrase + # setting homedir prevents some errors, but creates a permissions + # warning. perms are fixed in check_gnupg. + log_output_of gpg --homedir ${AMANDAHOMEDIR}/.gnupg \ + --no-permission-warning \ + --no-use-agent \ + --armor \ + --batch \ + --symmetric \ + --passphrase-fd 3 \ + --output ${AMANDAHOMEDIR}/.gnupg/am_key.gpg \ + ${AMANDAHOMEDIR}/.gnupg/am_key || \ + { logger "WARNING: Error encrypting keys." ; + rm ${AMANDAHOMEDIR}/.gnupg/am_key; + return 1; } + # Be nice and clean up. + exec 3<&- + else + logger "Info: Encryption key '${AMANDAHOMEDIR}/.gnupg/am_key.gpg' already exists." + fi + # Always try to delete unencrypted keys + rm -f ${AMANDAHOMEDIR}/.gnupg/am_key +} + check_gnupg() { - logger "Ensuring correct permissions for '${AMANDAHOMEDIR}/.gnupg'." - log_output_of chown ${amanda_user}:${amanda_group} ${AMANDAHOMEDIR}/.gnupg || \ - { logger "WARNING: Could not chown .gnupg dir." ; return 1; } - log_output_of chmod 700 ${AMANDAHOMEDIR}/.gnupg || \ - { logger "WARNING: Could not set permissions on .gnupg dir." ; return 1; } + logger "Ensuring correct permissions for '${AMANDAHOMEDIR}/.gnupg'." + log_output_of chown -R ${amanda_user}:${amanda_group} ${AMANDAHOMEDIR}/.gnupg || \ + { logger "WARNING: Could not chown .gnupg dir." ; return 1; } + log_output_of chmod -R u=rwX,go= ${AMANDAHOMEDIR}/.gnupg || \ + { logger "WARNING: Could not set permissions on .gnupg dir." ; return 1; } + # If am_key.gpg and .am_passphrase already existed, we should check + # if they match! + if [ -f ${AMANDAHOMEDIR}/.gnupg/am_key.gpg ] && [ -f ${AMANDAHOMEDIR}/.am_passphrase ]; then + exec 3<${AMANDAHOMEDIR}/.am_passphrase + # Perms warning will persist because we are not running as ${amanda_user} + log_output_of gpg --homedir ${AMANDAHOMEDIR}/.gnupg \ + --no-permission-warning \ + --no-use-agent\ + --batch \ + --decrypt \ + --passphrase-fd 3 \ + --output /dev/null \ + ${AMANDAHOMEDIR}/.gnupg/am_key.gpg || \ + { logger "WARNING: .am_passphrase does not decrypt .gnupg/am_key.gpg."; + return 1; + } + # Be nice and clean up. + exec 3<&- + fi } create_amandahosts() { @@ -198,25 +298,6 @@ install_client_conf() { fi } -create_ampassphrase() { - # install am_passphrase file to server - logger "Checking '${AMANDAHOMEDIR}/.am_passphrase' file." - if [ ! -f ${AMANDAHOMEDIR}/.am_passphrase ] ; then - logger "Create '${AMANDAHOMEDIR}/.am_passphrase' file." - log_output_of touch ${AMANDAHOMEDIR}/.am_passphrase || \ - { logger "WARNING: Could not create .am_passphrase." ; return 1; } - phrase=`echo $RANDOM | md5sum | awk '{print $1}'` || \ - { logger "WARNING: Error creating pseudo random passphrase." ; return 1; } - echo ${phrase} >>${AMANDAHOMEDIR}/.am_passphrase - - log_output_of chown ${amanda_user}:${amanda_group} ${AMANDAHOMEDIR}/.am_passphrase || \ - { logger "WARNING: Could not chown .am_passphrase" ; return 1; } - log_output_of chmod 0600 ${AMANDAHOMEDIR}/.am_passphrase || \ - { logger "WARNING: Could not fix permissions on .am_passphrase" ; return 1; } - fi - -} - create_amtmp() { # Check for existence of and permissions on ${AMTMP} logger "Checking for '${AMTMP}' dir." diff --git a/packaging/common/post_rm_functions.sh b/packaging/common/post_rm_functions.sh index 3833644..daf6f63 100644 --- a/packaging/common/post_rm_functions.sh +++ b/packaging/common/post_rm_functions.sh @@ -16,7 +16,7 @@ rm_inetd() { log_output_of sed -i "/^amanda .* amandad/d" } -remove_smf() { +rm_smf() { # Remove the amanda service from solaris style service framework. ret=0; export ret logger "Removing amanda's smf entry" diff --git a/packaging/common/pre_inst_functions.sh b/packaging/common/pre_inst_functions.sh index c2aecac..95ac2be 100644 --- a/packaging/common/pre_inst_functions.sh +++ b/packaging/common/pre_inst_functions.sh @@ -73,6 +73,14 @@ create_user() { esac } +add_profiles() { + # Solaris only: Add a comma separated list of rights profiles to the + # $amanda_user. Replaces any existing profiles listed on the account. + log_output_of usermod -P "\"$*\"" ${amanda_user} || { + logger "Warning: Rights profiles were not added. Some types of backup may not work until these rights profiles are givent to ${amanda_backup}: '$*'" + return 1; } +} + add_group() { # First, try to add the group, detect via return code if it # already exists. Then add ${amanda_user} to the group without diff --git a/packaging/common/substitute.pl b/packaging/common/substitute.pl index 680d4ac..7cc7750 100755 --- a/packaging/common/substitute.pl +++ b/packaging/common/substitute.pl @@ -17,9 +17,9 @@ if ( not -e "packaging/common/substitute.pl" ) { sub get_date { my $date; - # Set the date using date -r - open(my $DATE_PIPE, "-|", "/bin/date '+%a, %d %b %Y %T %z'"); - [ $? == 0 ] or die "could not read output of date '+%a, %d %b %Y %T %z'"; + # First parameter should be a date format string. + open(my $DATE_PIPE, "-|", "/bin/date $_[0]"); + [ $? == 0 ] or die "could not read output of date $_[0]"; chomp($date = <$DATE_PIPE>); close($DATE_PIPE); return $date; @@ -104,16 +104,18 @@ my %replacement_strings_deb = ( "%%DISTRO%%" => "", # Used in changelog "%%DEB_REL%%" => "", - "%%DATE%%" => "", - # Used in rules + "%%DATE%%" => "'+%a, %d %b %Y %T %z'", + # Used in server rules "%%PERL%%" => "", ); my %replacement_strings_rpm = ( + "%%DATE%%" => "'+%a %b %d %Y'", ); my %replacement_strings_sun = ( "%%ARCH%%" => "", + "%%DATE%%" => "'+%a, %d %b %Y %T %z'", ); my %replacement_strings; @@ -123,29 +125,32 @@ if ( $pkg_type eq "deb" ) { $replacement_strings{"%%PKG_REV%%"} = fix_pkg_rev($replacement_strings{"%%PKG_REV%%"}, "deb"); # Let's determine the distro: - # Ubuntu has /etc/lsb-release, debian does not - open(my $LSB_RELEASE, "<", "/etc/lsb-release") or - $replacement_strings{"%%DISTRO%%"} = "Debian"; - my $line; - if ( $replacement_strings{"%%DISTRO%%"} ne "Debian" ) { - $replacement_strings{"%%DISTRO%%"} = "Ubuntu"; - # We want the 2nd line - <$LSB_RELEASE>; - my @line = split /=/, <$LSB_RELEASE>; - chomp($line[1]); - $line[1] =~ s/\.//; - $replacement_strings{"%%DEB_REL%%"} = $line[1]; - close($LSB_RELEASE); - } else { - open(my $DEB_RELEASE, "<", "/etc/debian_version") or die "could not read \"/etc/debian_version\": $!"; - chomp($line = <$DEB_RELEASE>); - # Releases can have 3 fields. we want the first 2. - $line =~ s/(\d+)\.(\d+).*/$1$2/; - $replacement_strings{"%%DEB_REL%%"} = $line; - close($DEB_RELEASE); + my $release; + if ( -e "/usr/bin/lsb_release" ) { + # Yay! it's easy. + my $distro_id = `/usr/bin/lsb_release --id --short` or die "Could not run lsb_release!"; + chomp ($replacement_strings{"%%DISTRO%%"} = $distro_id); + + chomp($release = `/usr/bin/lsb_release --release --short`); + } + if ( $replacement_strings{"%%DISTRO%%"} eq "" ) { + # Let's hope it's debian. + open(my $DEB_RELEASE, "<", "/etc/debian_version") or die "Could not read \"/etc/debian_version\": $!"; + # Whew! + $replacement_strings{"%%DISTRO%%"} = "Debian"; + chomp($release = <$DEB_RELEASE>); + close($DEB_RELEASE); } - $replacement_strings{"%%DATE%%"} = get_date(); - # 32bit should use bitrock perl, while 64bit should use builtin. we + # Fix the release version string. + if ( $replacement_strings{"%%DISTRO%%"} eq "Ubuntu" ) { + $release =~ s/\.//; + } else { + # Releases can have 3 fields on Debian. we want the first 2. + $release =~ s/(\d+)\.(\d+).*/$1$2/; + } + $replacement_strings{"%%DEB_REL%%"} = $release; + $replacement_strings{"%%DATE%%"} = get_date($replacement_strings{"%%DATE%%"}); + # 32bit should use bitrock perl, while 64bit should use builtin. we # live on the edge and assume it's there. my $arch = get_arch(); if ( $arch eq "x86_64" ) { @@ -160,13 +165,14 @@ elsif ( $pkg_type eq "rpm" ){ %replacement_strings_common ); $replacement_strings{"%%PKG_REV%%"} = fix_pkg_rev($replacement_strings{"%%PKG_REV%%"}, "rpm"); + $replacement_strings{"%%DATE%%"} = get_date($replacement_strings{"%%DATE%%"}); } else { %replacement_strings = ( %replacement_strings_sun, %replacement_strings_common ); $replacement_strings{"%%PKG_REV%%"} = fix_pkg_rev($replacement_strings{"%%PKG_REV%%"}, "sun"); - $replacement_strings{"%%DATE%%"} = get_date(); + $replacement_strings{"%%DATE%%"} = get_date($replacement_strings{"%%DATE%%"}); my $arch = get_arch(); if ( $arch eq "sun4u" ) { $replacement_strings{"%%ARCH%%"} = "sparc"; diff --git a/packaging/common/test_sh_libs.sh b/packaging/common/test_sh_libs.sh index 22c4fb6..265fb06 100755 --- a/packaging/common/test_sh_libs.sh +++ b/packaging/common/test_sh_libs.sh @@ -15,11 +15,20 @@ # SHUNIT_* and SHU_* are shunit2 variables # test_* should only be used by test functions. # All other variables will probably be used by pre/post/common functions. - -# shunit2 assumes _inc is, but we might run from a separate builddir. So try to -# use srcdir, as defined by automake, or otherwise `pwd`. +case $1 in + DEBUG) DEBUG=True + shift + ;; + *) DEBUG= ;; +esac +export DEBUG + +ex_from=`dirname $0` + +# shunit2 assumes shunit_inc, but we might run from a separate +# builddir. So try to use srcdir, as defined by automake, or +# otherwise `pwd`. SHUNIT_INC="${srcdir=`pwd`}/packaging/common"; export SHUNIT_INC - TMPDIR=`pwd`/shunit-test; export TMPDIR amanda_user=test_amandabackup; export amanda_user amanda_group=test_disk; export amanda_group @@ -31,6 +40,7 @@ wanted_shell='/bin/false'; export wanted_shell dist=Fedora; export dist SYSCONFDIR=$TMPDIR/etc; export SYSCONFDIR SBINDIR=$TMPDIR/sbin; export SBINDIR +encoder=`{ command -v base64 2>/dev/null; } || { command -v uuencode 2>/dev/null; }` # Don't potentially conflict with a real value... deb_uid=63000; export deb_uid @@ -42,16 +52,11 @@ test_cleanup_files="$TMPDIR"; export test_cleanup_files # shunit2 is sourced. mkdir -p ${TMPDIR} || exit 1 { - LOGFILE=` - (umask 077 && mktemp "$TMPDIR/test-log.XXXX") 2> /dev/null - ` && - test -f "$LOGFILE" + LOGFILE="$TMPDIR/test_sh_libs.log" + (umask 077 && touch $LOGFILE) } || { - LOGFILE=$TMPDIR/test-log.$$.$RANDOM - (umask 077 && touch "$LOGFILE") -} || { - echo "Unable to create log file!" - exit 1 + echo "Unable to create log file!" + exit 1 } export LOGFILE @@ -79,7 +84,7 @@ oneTimeSetUp() { } oneTimeTearDown() { - if [ ${__shunit_assertsFailed} -eq 0 ]; then + if [ ${__shunit_assertsFailed} -eq 0 ] && [ ! "${DEBUG}" ]; then rm -rf $test_cleanup_files else echo "Check ${test_cleanup_files} for logs and error info." @@ -114,6 +119,12 @@ fi # Source our mock utils. . ${SHUNIT_INC}/mock_utils.sh +log_tail_no_stamp() { + # This strips the date off of a log line so only the message is + # compared. + LOG_TAIL=`tail -1 ${LOGFILE}|cut -d " " -f 5-` +} + ###################################### # Common functions @@ -122,13 +133,13 @@ fi test___logger() { # Write a line to the log, test that it got there. TEST_MSG="test___logger message" - LOG_LINE="`date +'%b %e %Y %T'`: ${TEST_MSG}" + LOG_LINE="`date +'%b %d %Y %T'`: ${TEST_MSG}" # It's important for the log messages to be quoted, or funny stuff happens. logger "${TEST_MSG}" assertEquals "logger() return code" 0 $? - LOG_TAIL=`tail -1 ${LOGFILE}` + log_tail_no_stamp assertEquals "logger() did not write <${LOG_LINE}> " \ - "${LOG_LINE}" "${LOG_TAIL}" + "${TEST_MSG}" "${LOG_TAIL}" # Leave this outside the unit test framework. if the logger is # broken we must exit. if [ ! `grep -c "${LOG_LINE}" ${LOGFILE}` = "1" ]; then @@ -142,6 +153,10 @@ test__log_output_of() { TEST_MSG="test__log_output_of message" log_output_of echo "${TEST_MSG}" assertEquals "log_output_of()" 0 $? + LOG_LINE="echo: ${TEST_MSG}" + log_tail_no_stamp + assertEquals "log_output_of() message should be: " \ + "${LOG_LINE}" "${LOG_TAIL}" COUNT=`grep -c "${TEST_MSG}" ${LOGFILE}` assertEquals "log_output_of(): incorrect content in log" \ 1 ${COUNT} @@ -272,7 +287,7 @@ test_reload_xinetd() { # Might need init script. if [ "$IAmRoot" ]; then startSkipping - echo "test_install_smf: skipped" + echo "test_reload_xinetd: skipped" return elif [ ! -f "${SYSCONFDIR}/init.d/xinetd" ]; then mv ${MOCKDIR}/xinetd ${SYSCONFDIR}/init.d @@ -284,6 +299,12 @@ test_reload_xinetd() { touch ${MOCKDIR}/success reload_xinetd "reload" assertEquals "reload_xinetd" 0 $? + # Test no argument + reload_xinetd + assertEquals "reload_xinetd should attempt to reload" 0 $? + flags=`cat ${mock_xinetd_flags}` + assertEquals "xinetd_flags should contain: " \ + "xinetd args: reload" "${flags}" # Test failure rm ${MOCKDIR}/success reload_xinetd "reload" @@ -292,7 +313,7 @@ test_reload_xinetd() { assertEquals "reload_xinetd should try to restart." 0 $? reload_xinetd "restart" assertEquals "restart should fail." 1 $? - tail -3 ${LOGFILE}|grep "Restarting xinetd" >/dev/null + tail -3 ${LOGFILE}|grep "restarting xinetd" >/dev/null assertEquals "Should log attempt to restart" 0 $? } @@ -339,7 +360,7 @@ test_check_user_group_missing() { echo $os > ${MOCKDIR}/id_os check_user_group "abracadabra" assertNotEquals "'check_user group abracadabra' should not be found:" 0 $? - LOG_TAIL=`tail -1 ${LOGFILE}|cut -d " " -f 5-` + log_tail_no_stamp assertEquals "check_user_group should write" \ "User's primary group 'abracadabra' does not exist" \ "${LOG_TAIL}" @@ -467,6 +488,20 @@ test_create_user() { assertEquals "create_user()" 0 $? } +test_add_profiles() { + # Solaris only, but testing using mock usermod will run if not root + # on any system. + logger "test_add_profiles" + [ "$IAmRoot" ] && startSkipping + add_profiles "Profile foo,Profile bar" + assertEquals "add_profiles should succeed" 0 $? + flags=`cat ${mock_usermod_flags}` + assertEquals "usermod_flags should contain:" \ + "usermod args: -P \"Profile foo,Profile bar\" ${amanda_user}" \ + "${flags}" + +} + test_add_group_check_parameters_logs() { rm -f ${MOCKDIR}/groupadd_rc ${MOCKDIR}/num_groups # Return codes are integers. @@ -474,7 +509,7 @@ test_add_group_check_parameters_logs() { # Test that first parameter is required. add_group assertEquals "add_group without a group should fail." 1 $? - LOG_TAIL=`tail -1 ${LOGFILE}|cut -d " " -f 5-` + log_tail_no_stamp assertEquals "add_group should write" \ "Error: first argument was not a group to add." \ "${LOG_TAIL}" @@ -582,23 +617,86 @@ test_check_amandates() { "`cat $mock_chmod_flags`" } -test_create_gnupg() { +test_a_create_gnupg() { + # We need to impose some order on a few tests because some functions + # rely on others. Tests are sorted alphabetically. Insert a letter after + # "test_" to impose order on particular tests logger "test_create_gnupg" create_gnupg assertEquals "create_gnupg" 0 $? assertTrue "[ -d ${AMANDAHOMEDIR}/.gnupg ]" + # Dir exists + create_gnupg + assertEquals "create_gnupg dir existing" 0 $? +} + +test_a_get_random_lines() { + logger "test_get_random_lines" + get_random_lines > ${TMPDIR}/lines + assertEquals "get_random_lines" 1 $? + get_random_lines 1 > ${TMPDIR}/lines + assertEquals "get_random_lines 1" 0 $? + assertEquals "get_random_lines 1 output" 1 "`sed -n '$=' ${TMPDIR}/lines`" + get_random_lines 20 > ${TMPDIR}/lines + assertEquals "get_random_lines 20 output" 20 "`sed -n '$=' ${TMPDIR}/lines`" +} + +test_b_create_ampassphrase() { + rm -f ${AMANDAHOMEDIR}/.am_passphrase + logger "test_create_ampassphrase" + create_ampassphrase + assertEquals "create_ampassphrase" 0 $? + assertSame \ + "chown args: ${amanda_user}:${amanda_group} ${AMANDAHOMEDIR}/.am_passphrase" \ + "`cat $mock_chown_flags`" + assertSame \ + "chmod args: 0600 ${AMANDAHOMEDIR}/.am_passphrase" \ + "`cat $mock_chmod_flags`" + # When .am_passphrase exists. + create_ampassphrase + log_tail_no_stamp + assertSame \ + "Info: ${AMANDAHOMEDIR}/.am_passphrase already exists." \ + "${LOG_TAIL}" + rm ${AMANDAHOMEDIR}/.am_passphrase +} + +test_b_create_amkey() { + logger "test_create_amkey" + # Missing .am_passphrase + [ -f ${AMANDAHOMEDIR}/.am_passphrase ] && rm ${AMANDAHOMEDIR}/.am_passphrase + create_amkey + assertEquals "create_amkey" 1 $? + log_tail_no_stamp + assertSame \ + "Error: ${AMANDAHOMEDIR}/.am_passphrase is missing, can't create amcrypt key." \ + "${LOG_TAIL}" + # Need .am_passphrase. Ignore these test errors if get_random_lines or + # create_gnupg tests failed. + get_random_lines 1 > ${AMANDAHOMEDIR}/.am_passphrase + create_amkey + assertEquals "create_amkey" 0 $? + # Test with existing key + create_amkey + assertEquals "create_amkey" 0 $? + log_tail_no_stamp + assertSame \ + "Info: Encryption key '${AMANDAHOMEDIR}/.gnupg/am_key.gpg' already exists." \ + "${LOG_TAIL}" + # make sure unencrypted am_key is not hanging around + assertFalse "[ -f ${AMANDAHOMEDIR}/.gnupg/am_key ]" + } test_check_gnupg() { logger "test_check_gnupg" check_gnupg assertEquals "check_gnupg" 0 $? - [ "$IAmRoot" ] && { startSkipping; echo "test_check_gnupg: skipped"; } assertSame \ - "chown args: ${amanda_user}:${amanda_group} ${AMANDAHOMEDIR}/.gnupg" \ + "chown args: -R ${amanda_user}:${amanda_group} ${AMANDAHOMEDIR}/.gnupg" \ "`cat $mock_chown_flags`" assertSame \ - "chmod args: 700 ${AMANDAHOMEDIR}/.gnupg" \ + "chmod args: -R u=rwX,go= ${AMANDAHOMEDIR}/.gnupg" \ "`cat $mock_chmod_flags`" } @@ -704,7 +802,7 @@ test_install_client_conf() { esac } -#TODO: create_ampassphrase, create_amtmp +#TODO: create_amtmp ###################################### #TODO: post_rm_functions diff --git a/packaging/deb/control b/packaging/deb/control index 5d25b48..1bcc650 100644 --- a/packaging/deb/control +++ b/packaging/deb/control @@ -2,16 +2,16 @@ Source: amanda Section: utils Priority: optional Maintainer: Zmanda Inc -Build-Depends: debhelper, dump, fakeroot, flex, gnuplot-nox|gnuplot, libtool, - mailx|bsd-mailx, mtx, perl (>=5.6.0), procps, smbclient, libcurl-dev, - libglib2.0-dev, libncurses5-dev, libreadline5-dev|libreadline-dev, - libssl-dev +Build-Depends: debhelper, dump, fakeroot, flex, gettext, gnuplot-nox|gnuplot, + libtool, mailx|bsd-mailx, mtx, perl (>=5.6.0), procps, + smbclient, libcurl-dev, libglib2.0-dev, libncurses5-dev, + libreadline5-dev|libreadline-dev, libssl-dev Standards-Version: 3.6.1 Package: amanda-backup-server Architecture: any -Depends: ca-certificates, xinetd, perl (>=5.6.0), mailx|bsd-mailx, - tar (>=1.15), ${shlibs:Depends}, ${perl:Depends} +Depends: ca-certificates, xinetd, perl (>=5.6.0), gettext, mailx|bsd-mailx, + ${shlibs:Depends}, ${perl:Depends} Suggests: gnuplot-nox|gnuplot Conflicts: amanda-client, amanda-common, amanda-server, amanda-backup-client Description: Amanda Network Backup and Archiving software @@ -28,7 +28,7 @@ Description: Amanda Network Backup and Archiving software Package: amanda-backup-client Architecture: any -Depends: ca-certificates, xinetd, perl (>=5.6.0), grep, ${shlibs:Depends}, +Depends: ca-certificates, xinetd, perl (>=5.6.0), gettext, ${shlibs:Depends}, ${perl:Depends} Conflicts: amanda-backup-server, amanda-client, amanda-common, amanda-server Description: Amanda Network Backup and Archiving software diff --git a/packaging/deb/postinst.src b/packaging/deb/postinst.src index 2497257..7054b67 100644 --- a/packaging/deb/postinst.src +++ b/packaging/deb/postinst.src @@ -21,6 +21,7 @@ SBINDIR=/usr/sbin AMTMP="/tmp/amanda" AMANDATES=${SYSCONFDIR}/amandates +encoder=`{ command -v base64 2>/dev/null; } || { command -v uuencode 2>/dev/null; }` # ---------- Common functions ------------ %%COMMON_FUNCTIONS%% @@ -47,10 +48,18 @@ case $? in 0) backup_xinetd "amanda${other_pkg_type}" ;; esac -reload_xinetd +check_superserver_running "xinetd" +[ "$?" = "0" ] && action=restart || action=start +reload_xinetd $action create_amandates check_amandates +create_ampassphrase || \ + logger "Info: amcryptsimple and amcrpyt will not work until .am_passphrase is created" create_gnupg +create_amkey || \ + logger "Info: amcrypt will not work until keys are created." +# Checks permissions, but only tries decrypting if both .am_passphrase +# and .gnupg/am_key.gpg exist. check_gnupg create_amandahosts check_amandahosts_entry root amindexd amidxtaped @@ -63,7 +72,6 @@ fi create_profile check_profile install_client_conf -create_ampassphrase create_amtmp logger "Amanda ${pkg_type} installation complete." diff --git a/packaging/deb/postrm.src b/packaging/deb/postrm.src index 20150a4..64ad83a 100755 --- a/packaging/deb/postrm.src +++ b/packaging/deb/postrm.src @@ -11,7 +11,6 @@ amanda_group=disk AMANDAHOMEDIR=%%AMANDAHOMEDIR%% os=Linux dist=%%DISTRO%% - LOGDIR=%%LOGDIR%% SYSCONFDIR=/etc @@ -26,9 +25,13 @@ remove() { rm_xinetd "amanda${pkg_type}" || { \ logger "Warning: Did not successfully remove amanda${pkg_type} from xinetd."; exit 1; } - reload_xinetd + check_superserver_running "xinetd" && reload_xinetd + fi + # Check for and remove existing inetd configs + if check_inetd "amanda${pkg_type}"; then + rm_inetd "amanda${pkg_type}" + check_superserver_running "inetd" && reload_inetd fi - } purge() { @@ -40,9 +43,8 @@ purge() { logger "Removing ${LOGDIR}..." rm -rf ${LOGDIR} fi - if [ -d ${AMANDAHOMEDIR} ]; then - logger "Removing ${AMANDAHOMEDIR}..." - rm -rf ${AMANDAHOMEDIR} + if ! rmdir $AMANDAHOMEDIR; then + logger "Message: $AMANDAHOMEDIR was not empty, and was not deleted: Contents are often backupsets. " fi if [ -f ${SYSCONFDIR}/amandates ]; then logger "Removing ${SYSCONFDIR}/amandates..." @@ -71,7 +73,7 @@ case "$1" in remove ;; - failed-upgrade) + failed-upgrade|abort-upgrade) check_xinetd "amanda${pkg_type}" if [ $? -eq 1 ] ; then install_xinetd diff --git a/packaging/rpm/amanda.spec.src b/packaging/rpm/amanda.spec.src index 4e59570..7994255 100644 --- a/packaging/rpm/amanda.spec.src +++ b/packaging/rpm/amanda.spec.src @@ -2,9 +2,10 @@ # Copyright (C) 2005-2012 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -29,7 +30,7 @@ # 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}}} +%{?PKG_CONFIG_PATH:%{echo:PKG_CONFIG_PATH = %{PKG_CONFIG_PATH}\n}} # LDFLAGS: newer gnu linkers can use "-Wl,--as-needed", while older ones, # like rhel3 and sles9 can't. @@ -37,50 +38,21 @@ # Define which Distribution we are building: # Try to detect the distribution we are building: -%if %{_vendor} == redhat +%if %{_vendor} == redhat # Fedora symlinks /etc/fedora-release to /etc/redhat-release for at least # fc3-8. So RHEL and Fedora look at the same file. Different versions have - # different numbers of spaces; hence the use if $3 vs. $4.. - %if %(awk '$1 == "Fedora" && $4 ~ /3.*/ { exit 1; }' /etc/redhat-release; echo $?) + # different numbers of spaces; hence the use of $3 vs. $4.. + %if %(awk '$1 == "Fedora" { exit 1; }' /etc/redhat-release; echo $?) %define dist fedora %define disttag fc - %define distver 3 - %define requires_libtermcap Requires: libtermcap.so.2 - %define curl curl - %endif - %if %(awk '$1 == "Fedora" && $4 ~ /4.*/ { exit 1; }' /etc/redhat-release; echo $?) - %define dist fedora - %define disttag fc - %define distver 4 - %define requires_libtermcap Requires: libtermcap.so.2 - %define curl curl - %endif - %if %(awk '$1 == "Fedora" && $4 ~ /5.*/ { exit 1; }' /etc/redhat-release; echo $?) - %define dist fedora - %define disttag fc - %define distver 5 - %define requires_libtermcap Requires: libtermcap.so.2 - %define curl curl - %endif - %if %(awk '$1 == "Fedora" && $4 ~ /6.*/ { exit 1; }' /etc/redhat-release; echo $?) - %define dist fedora - %define disttag fc - %define distver 6 - %define requires_libtermcap Requires: libtermcap.so.2 - %define curl curl - %endif - %if %(awk '$1 == "Fedora" && $3 ~ /7.*/ { exit 1; }' /etc/redhat-release; echo $?) - %define dist fedora - %define disttag fc - %define distver 7 - %define requires_libtermcap Requires: libtermcap.so.2 - %define curl curl + %define distver %(awk '{print $4}' /etc/redhat-release) %endif # if macro cannot have an empty test and we're just testing the existance %if %{?fedora:yes}%{!?fedora:no} == yes - %define dist fedora - %define disttag fc + # In theory this should be more reliable than awking for distver. %define distver %{fedora} + %endif + %if "%{dist}" == "fedora" %if %{distver} <= 8 %define requires_libtermcap Requires: libtermcap.so.2 %define curl curl @@ -101,6 +73,8 @@ %define requires_libtermcap Requires: libtermcap.so.2 %define curl curl %define without_ipv6 --without-ipv6 + %undefine enable_as_needed + %define prereq_sharutils PreReq: sharutils %endif %if %(awk '$1 == "Red" && $7 ~ /4.*/ { exit 1; }' /etc/redhat-release; echo $?) %define dist redhat @@ -109,6 +83,7 @@ %define tarver 1.14 %define requires_libtermcap Requires: libtermcap.so.2 %define curl curl + %define prereq_sharutils PreReq: sharutils %endif %if %(awk '$1 == "CentOS" && $3 ~ /4.*/ { exit 1; }' /etc/redhat-release; echo $?) %define dist redhat @@ -117,6 +92,7 @@ %define tarver 1.14 %define requires_libtermcap Requires: libtermcap.so.2 %define curl curl + %define prereq_sharutils PreReq: sharutils %endif %if %(awk '$1 == "Red" && $7 ~ /5.*/ { exit 1; }' /etc/redhat-release; echo $?) %define dist redhat @@ -140,34 +116,28 @@ # If dist is undefined, we didn't detect. %{!?dist:%define dist unknown} %endif -# Detect Suse variants. +# Detect Suse variants. %if %{_vendor} == "suse" %define dist SuSE - %if %(awk '$1 == "openSUSE" { exit 1; }' /etc/SuSE-release; echo $?) - %define disttag suse - %define distver %(awk '$1=="openSUSE" {print $2}' /etc/SuSE-release) + %define disttag %(awk '$1=="openSUSE" { print "suse"; } $1=="SUSE" {$3=="Enterprise" ? TAG="sles" : TAG="suse" ; print TAG}' /etc/SuSE-release) + # use printf to be sure rpm gets a number type + %define distver %(awk '$1=="openSUSE" { printf("%d", $2); } $1=="SUSE" {$3=="Enterprise" ? VER=$5 : VER=$3 ; printf("%d", VER)}' /etc/SuSE-release) + %define curl curl + %if %{distver} == 9 + %undefine enable_as_needed %endif - %if %(awk '$1 == "SUSE" { exit 1; }' /etc/SuSE-release; echo $?) - %define disttag %(awk '$1=="SUSE" {$3=="Enterprise" ? TAG="sles" : TAG="suse" ; print TAG}' /etc/SuSE-release) - %define distver %(awk '$1=="SUSE" {$3=="Enterprise" ? VER=$5 : VER=$3 ; print VER}' /etc/SuSE-release) - # Always use quotes in rpm comparisons if values could be interpreted - # as integers. - %define curl curl - %if "%{distver}" == "9" - %undefine enable_as_needed - %endif + %if %{distver} < 11 + %define prereq_sharutils PreReq: sharutils %endif %endif # Set options per distribution %if %{dist} == redhat || %{dist} == fedora %define rpm_group Applications/Archiving - %define xinetd_reload restart %define requires_initscripts Requires: initscripts %endif %if %{dist} == SuSE %define rpm_group Productivity/Archiving/Backup - %define xinetd_reload restart %endif # Let's die if we haven't detected the distro. This might save some frustration. @@ -176,6 +146,9 @@ # Set minimum tar version if it wasn't set in the per-distro section %{!?tarver: %define tarver 1.15} +# Define the native binary data encoder (for create_amkey) +%define encoder %({ command -v base64 2>/dev/null; } || { command -v uuencode 2>/dev/null; }) + %define packer %(%{__id_u} -n) # --- Definitions --- @@ -211,6 +184,7 @@ BuildRequires: flex BuildRequires: gcc BuildRequires: glib2 >= 2.2.0 BuildRequires: glib2-devel +BuildRequires: gettext BuildRequires: readline # Note: newer distros have changed most *-devel to lib*-devel, and added a # provides tag for backwards compat. @@ -220,6 +194,7 @@ BuildRequires: %{curl}-devel >= 7.10.0 BuildRequires: openssl BuildRequires: openssl-devel BuildRequires: perl(ExtUtils::Embed) +%{?prereq_sharutils} Requires: /bin/awk Requires: /bin/date Requires: /usr/bin/id @@ -228,6 +203,7 @@ Requires: /bin/sh Requires: /usr/sbin/useradd Requires: /usr/sbin/usermod Requires: fileutils +Requires: gettext Requires: grep Requires: gnuplot Requires: %{curl} >= 7.10.0 @@ -385,7 +361,6 @@ Amanda Documentation is available at: http://wiki.zmanda.com/ --mandir=%{MANDIR} \ --with-amdatadir=%{AMDATADIR} \ --with-gnuplot=/usr/bin/gnuplot \ - --with-gnutar=/bin/tar \ --with-gnutar-listdir=%{AMANDAHOMEDIR}/gnutar-lists \ --with-index-server=localhost \ --with-tape-server=localhost \ @@ -443,7 +418,7 @@ fi # Define script variables # Some versions of rpmbuild do not like multi-line macros in spec files. ugly. -%define script_vars amanda_user=%{amanda_user}; amanda_group=%{amanda_group}; AMANDAHOMEDIR=%{AMANDAHOMEDIR}; os=Linux; wanted_shell=/bin/bash; dist=%{dist}; LOGDIR=%{LOGDIR}; INSTALL_LOG=$LOGDIR/install.log; SYSCONFDIR=%{SYSCONFDIR}; SBINDIR=%{SBINDIR}; +%define script_vars amanda_user=%{amanda_user}; amanda_group=%{amanda_group}; AMANDAHOMEDIR=%{AMANDAHOMEDIR}; os=Linux; wanted_shell=/bin/bash; dist=%{dist}; LOGDIR=%{LOGDIR}; INSTALL_LOG=$LOGDIR/install.log; SYSCONFDIR=%{SYSCONFDIR}; SBINDIR=%{SBINDIR}; encoder=%{encoder}; # --- Pre/post (un)installation scripts --- %pre backup_server @@ -508,10 +483,18 @@ case $? in 0) backup_xinetd "amandaclient" ;; esac -reload_xinetd +check_superserver_running "xinetd" +[ "$?" = "0" ] && action=restart || action=start +reload_xinetd $action create_amandates check_amandates +create_ampassphrase || \ + logger "Info: amcryptsimple and amcrpyt will not work until .am_passphrase is created" create_gnupg +create_amkey || \ + logger "Info: amcrypt will not work until keys are created." +# Checks permissions, but only tries decrypting if both .am_passphrase +# and .gnupg/am_key.gpg exist. check_gnupg create_amandahosts check_amandahosts_entry root amindexd amidxtaped @@ -522,7 +505,6 @@ create_ssh_key client create_profile check_profile install_client_conf -create_ampassphrase logger "Amanda installation complete." cat $LOGFILE >> $INSTALL_LOG && { @@ -562,25 +544,23 @@ if [ "$action" = "uninstall" ]; then check_xinetd "amandaserver" if [ $? -eq 0 ] ; then rm_xinetd "amandaserver" - reload_xinetd + check_superserver_running "xinetd" && reload_xinetd fi check_inetd "amandaserver" if [ $? -eq 0 ] ; then rm_inetd "amandaserver" - reload_inetd - fi - if [ -d ${SYSCONFDIR}/amanda ]; then - logger "Removing ${SYSCONFDIR}/amanda if empty..." - rmdir ${SYSCONFDIR}/amanda 2> /dev/null || true - fi - if [ -d ${AMANDAHOMEDIR} ]; then - logger "Removing ${AMANDAHOMEDIR}..." - rm -rf ${AMANDAHOMEDIR} + check_superserver_running "inetd" && reload_inetd fi if [ -f ${SYSCONFDIR}/amandates ]; then logger "Removing ${SYSCONFDIR}/amandates..." rm -rf ${SYSCONFDIR}/amandates fi + if [ -d ${SYSCONFDIR}/amanda ]; then + logger "Removing ${SYSCONFDIR}/amanda if empty..." + rmdir ${SYSCONFDIR}/amanda 2> /dev/null || true + fi + if [ -d /var/lib/amanda/gnutar-lists ]; then + rm -rf /var/lib/amanda/gnutar-lists # Remove ${amanda_user} from sensitive groups. if which deluser >/dev/null 2>&1 ; then for group in tape; do @@ -593,10 +573,9 @@ if [ "$action" = "uninstall" ]; then fi done fi - + echo "Amanda removal log can be found in '$LOGFILE'." fi -echo "Amanda removal log can be found in '$LOGFILE'." %pre backup_client ########################################## @@ -660,7 +639,13 @@ esac reload_xinetd create_amandates check_amandates +create_ampassphrase || \ + logger "Info: amcryptsimple and amcrpyt will not work until .am_passphrase is created" create_gnupg +create_amkey || \ + logger "Info: amcrypt will not work until keys are created." +# Checks permissions, but only tries decrypting if both .am_passphrase +# and .gnupg/am_key.gpg exist. check_gnupg create_amandahosts check_amandahosts_entry ${amanda_user} amdump @@ -722,6 +707,10 @@ if [ "$action" = "uninstall" ]; then rm_inetd "amandaclient" reload_inetd fi + if [ -f ${SYSCONFDIR}/amandates ]; then + logger "Removing ${SYSCONFDIR}/amandates..." + rm -rf ${SYSCONFDIR}/amandates + fi if [ -d ${SYSCONFDIR}/amanda ]; then logger "Removing ${SYSCONFDIR}/amanda if empty..." rmdir ${SYSCONFDIR}/amanda 2> /dev/null || true @@ -730,10 +719,6 @@ if [ "$action" = "uninstall" ]; then logger "Removing ${AMANDAHOMEDIR}..." rm -rf ${AMANDAHOMEDIR} fi - if [ -f ${SYSCONFDIR}/amandates ]; then - logger "Removing ${SYSCONFDIR}/amandates..." - rm -rf ${SYSCONFDIR}/amandates - fi # Remove ${amanda_user} from sensitive groups. if which deluser >/dev/null 2>&1 ; then for group in tape; do @@ -746,9 +731,9 @@ if [ "$action" = "uninstall" ]; then fi done fi + echo "Amanda removal log can be found in '$LOGFILE'." fi -echo "Amanda removal log can be found in '$LOGFILE'." %files backup_client # --- Files to install --- @@ -853,7 +838,9 @@ echo "Amanda removal log can be found in '$LOGFILE'." # --- ChangeLog %changelog +* %%DATE%% Dan Locks %{version} +- Package created * Fri Aug 20 2010 Dan Locks 3.2.0alpha -- use %%VERSION%% macro instead of reading a file. error reported by ssgelm +- use %%VERSION% macro instead of reading a file. error reported by ssgelm * Thu Aug 19 2010 Dan Locks 3.2.0alpha - Added detection of openSuSE 11 as suggested by ssgelm diff --git a/packaging/sun-pkg/client/copyright b/packaging/sun-pkg/client/copyright index cea671e..88a2b4c 100644 --- a/packaging/sun-pkg/client/copyright +++ b/packaging/sun-pkg/client/copyright @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/packaging/sun-pkg/client/postinstall.src b/packaging/sun-pkg/client/postinstall.src index e6ef6eb..67bc0d4 100755 --- a/packaging/sun-pkg/client/postinstall.src +++ b/packaging/sun-pkg/client/postinstall.src @@ -20,8 +20,8 @@ SBINDIR="${basedir}/usr/sbin"; export SBINDIR AMTMP="/tmp/amanda" AMANDATES=${SYSCONFDIR}/amandates; export AMANDATES - -exit_msg="Amanda installation log can be found in '${INSTALL_LOG}'." +# uuencode is still standard on sol10, but haven't checked sol 11. +encoder=`{ command -v base64 2>/dev/null; } || { command -v uuencode 2>/dev/null; }` # ---------- Common functions ------------ %%COMMON_FUNCTIONS%% @@ -61,9 +61,16 @@ fi create_amandates check_amandates +create_ampassphrase || \ + logger "Info: amcryptsimple and amcrpyt will not work until .am_passphrase is created" create_gnupg +create_amkey || \ + logger "Info: amcrypt will not work until keys are created." +# Checks permissions, but only tries decrypting if both .am_passphrase +# and .gnupg/am_key.gpg exist. check_gnupg create_amandahosts +check_amandahosts_entry root amindexd amidxtaped check_amandahosts_entry ${amanda_user} amdump check_amandahosts_perms create_ssh_key client @@ -73,7 +80,9 @@ install_client_conf create_amtmp logger "Amanda installation complete." -cat $LOGFILE >> $INSTALL_LOG -rm $LOGFILE - -echo "${exit_msg}" +exit_msg="Amanda installation log can be found in '${INSTALL_LOG}'." +cat $LOGFILE >> $INSTALL_LOG && { + rm $LOGFILE + echo "${exit_msg} '${INSTALL_LOG}'." +} || \ + echo "${exit_msg} $LOGFILE." diff --git a/packaging/sun-pkg/server/copyright b/packaging/sun-pkg/server/copyright index cea671e..88a2b4c 100644 --- a/packaging/sun-pkg/server/copyright +++ b/packaging/sun-pkg/server/copyright @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/perl/Amanda/Application.pod b/perl/Amanda/Application.pod index 5af1d3c..80f5e38 100644 --- a/perl/Amanda/Application.pod +++ b/perl/Amanda/Application.pod @@ -1,9 +1,10 @@ /* * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Application.swg b/perl/Amanda/Application.swg index a73a77d..912569e 100644 --- a/perl/Amanda/Application.swg +++ b/perl/Amanda/Application.swg @@ -1,9 +1,10 @@ /* * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Application/Zfs.pm b/perl/Amanda/Application/Zfs.pm index 26bd6bf..ecd9b13 100644 --- a/perl/Amanda/Application/Zfs.pm +++ b/perl/Amanda/Application/Zfs.pm @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Archive.pod b/perl/Amanda/Archive.pod index e7b2b26..c132365 100644 --- a/perl/Amanda/Archive.pod +++ b/perl/Amanda/Archive.pod @@ -1,9 +1,10 @@ /* * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Archive.swg b/perl/Amanda/Archive.swg index a3fd2e0..5c48cf0 100644 --- a/perl/Amanda/Archive.swg +++ b/perl/Amanda/Archive.swg @@ -1,9 +1,10 @@ /* * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/BigIntCompat.pm b/perl/Amanda/BigIntCompat.pm index 18e6b88..40b2d51 100644 --- a/perl/Amanda/BigIntCompat.pm +++ b/perl/Amanda/BigIntCompat.pm @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Changer.pm b/perl/Amanda/Changer.pm index 419c1a0..8f284fc 100644 --- a/perl/Amanda/Changer.pm +++ b/perl/Amanda/Changer.pm @@ -1,8 +1,9 @@ # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -186,6 +187,7 @@ has one of the following values: driveinuse All drives are in use unknown Unknown reason empty The slot is empty + device Failed to set up the device Like types, checks for particular reasons should use the methods, to avoid undetected typos: @@ -1176,6 +1178,13 @@ sub with_locked_state { my ($statefile, $cb, $sub) = @_; my ($filelock, $STATE); my $poll = 0; # first delay will be 0.1s; see below + my $time; + + if (defined $self->{'lock-timeout'}) { + $time = time() + $self->{'lock-timeout'}; + } else { + $time = time() + 1000; + } my $steps = define_steps cb_ref => \$cb; @@ -1188,10 +1197,13 @@ sub with_locked_state { step lock => sub { my $rv = $filelock->lock(); - if ($rv == 1) { + if ($rv == 1 && time() < $time) { # loop until we get the lock, increasing $poll to 10s $poll += 100 unless $poll >= 10000; return Amanda::MainLoop::call_after($poll, $steps->{'lock'}); + } elsif ($rv == 1) { + return $self->make_error("fatal", $cb, + message => "Timeout trying to lock '$statefile'"); } elsif ($rv == -1) { return $self->make_error("fatal", $cb, message => "Error locking '$statefile'"); @@ -1509,6 +1521,7 @@ sub driveinuse { $_[0]->failed && $_[0]->{'reason'} eq 'driveinuse'; } sub volinuse { $_[0]->failed && $_[0]->{'reason'} eq 'volinuse'; } sub unknown { $_[0]->failed && $_[0]->{'reason'} eq 'unknown'; } sub empty { $_[0]->failed && $_[0]->{'reason'} eq 'empty'; } +sub device { $_[0]->failed && $_[0]->{'reason'} eq 'device'; } # slot accessor sub slot { $_[0]->{'slot'}; } diff --git a/perl/Amanda/Changer/aggregate.pm b/perl/Amanda/Changer/aggregate.pm index 4f59be3..fa0fd89 100644 --- a/perl/Amanda/Changer/aggregate.pm +++ b/perl/Amanda/Changer/aggregate.pm @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -92,6 +93,7 @@ sub new { my $state_filename; my $state_filename_prop = $config->{'properties'}->{'state_filename'}; + my $lock_timeout = $config->{'properties'}->{'lock-timeout'}; if (defined $state_filename_prop) { $state_filename = $state_filename_prop->{'values'}[0]; @@ -107,6 +109,7 @@ sub new { num_children => scalar @children, current_slot => undef, state_filename => $state_filename, + 'lock-timeout' => $lock_timeout, }; bless ($self, $class); return $self; diff --git a/perl/Amanda/Changer/compat.pm b/perl/Amanda/Changer/compat.pm index 4f57d5c..caa3a1a 100644 --- a/perl/Amanda/Changer/compat.pm +++ b/perl/Amanda/Changer/compat.pm @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Changer/disk.pm b/perl/Amanda/Changer/disk.pm index 8c18e65..3ff28b6 100644 --- a/perl/Amanda/Changer/disk.pm +++ b/perl/Amanda/Changer/disk.pm @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -101,6 +102,11 @@ sub new { bless ($self, $class); + if ($config->{'changerfile'}) { + $self->{'state_filename'} = Amanda::Config::config_dir_relative($config->{'changerfile'}); + } + $self->{'lock-timeout'} = $config->get_property('lock-timeout'); + $self->{'num-slot'} = $config->get_property('num-slot'); $self->{'auto-create-slot'} = $config->get_boolean_property( 'auto-create-slot', 0); @@ -647,6 +653,14 @@ sub try_lock { my $self = shift; my $cb = shift; my $poll = 0; # first delay will be 0.1s; see below + my $time; + + if (defined $self->{'lock-timeout'}) { + $time = time() + $self->{'lock-timeout'}; + } else { + $time = time() + 1000; + } + my $steps = define_steps cb_ref => \$cb; @@ -661,10 +675,13 @@ sub try_lock { step lock => sub { my $rv = $self->{'fl'}->lock_rd(); - if ($rv == 1) { + if ($rv == 1 && time() < $time) { # loop until we get the lock, increasing $poll to 10s $poll += 100 unless $poll >= 10000; return Amanda::MainLoop::call_after($poll, $steps->{'lock'}); + } elsif ($rv == 1) { + return $self->make_error("fatal", $cb, + message => "Timeout trying to lock '$self->{'umount_lockfile'}'"); } elsif ($rv == -1) { return $self->make_error("fatal", $cb, message => "Error locking '$self->{'umount_lockfile'}'"); diff --git a/perl/Amanda/Changer/multi.pm b/perl/Amanda/Changer/multi.pm index 85de8fd..7a087b5 100644 --- a/perl/Amanda/Changer/multi.pm +++ b/perl/Amanda/Changer/multi.pm @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -111,6 +112,7 @@ sub new { } my $state_filename = Amanda::Config::config_dir_relative($config->{'changerfile'}); + my $lock_timeout = $config->{'lock-timeout'}; Amanda::Debug::debug("Using state file: $state_filename"); my $self = { @@ -122,6 +124,7 @@ sub new { state_filename => $state_filename, first_slot => $first_slot, last_slot => $last_slot, + 'lock-timeout' => $lock_timeout, }; bless ($self, $class); @@ -623,7 +626,9 @@ sub _get_current { if (defined $state->{current_slot}) { my $slot = $self->{number}->{$state->{current_slot}}; # return the slot if it exist. - return $slot if $slot >= $self->{'first_slot'} && $slot < $self->{'last_slot'}; + return $slot if defined $slot and + $slot >= $self->{'first_slot'} and + $slot < $self->{'last_slot'}; Amanda::Debug::debug("statefile current_slot is not configured"); } # return the first slot diff --git a/perl/Amanda/Changer/ndmp.pm b/perl/Amanda/Changer/ndmp.pm index 0314d32..dab9a7f 100644 --- a/perl/Amanda/Changer/ndmp.pm +++ b/perl/Amanda/Changer/ndmp.pm @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +#* License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Changer/null.pm b/perl/Amanda/Changer/null.pm index 7fb2eaf..fe5c94c 100644 --- a/perl/Amanda/Changer/null.pm +++ b/perl/Amanda/Changer/null.pm @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Changer/rait.pm b/perl/Amanda/Changer/rait.pm index d387c84..5741c77 100644 --- a/perl/Amanda/Changer/rait.pm +++ b/perl/Amanda/Changer/rait.pm @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Changer/robot.pm b/perl/Amanda/Changer/robot.pm index dae6af0..9ba2a58 100644 --- a/perl/Amanda/Changer/robot.pm +++ b/perl/Amanda/Changer/robot.pm @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +#* License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -27,6 +28,7 @@ use vars qw( @ISA ); use Data::Dumper; use File::Path; use Amanda::Paths; +use Amanda::Config qw( :init ); use Amanda::MainLoop qw( :GIOCondition make_cb define_steps step ); use Amanda::Config qw( :getconf ); use Amanda::Debug qw( debug warning ); @@ -59,7 +61,7 @@ See the amanda-changers(7) manpage for usage information. # drives - see below # drive_lru - recently used drives, least recent first # bc2lb - hash mapping known barcodes to known labels -# current_slot - the current slot +# current_slot - hash of the current slot # last_operation_time - time the last operation finished # last_operation_delay - required delay for that operation # last_status - last time a 'status' command finished @@ -83,7 +85,10 @@ See the amanda-changers(7) manpage for usage information. # label - volume label # barcode - volume barcode # orig_slot - slot from which this tape was loaded - +# +## The 'current_slot' key is also a hash by config name, the values of +# which are the current slot for the config. +# # # LOCKING # # This package uses Amanda::Changer's with_locked_state to lock a statefile and @@ -130,6 +135,7 @@ sub new { # set below from properties statefile => undef, + 'lock-timeout' => undef, drive2device => {}, # { drive => device name } driveorder => [], # order of tape-device properties drive_choice => 'lru', @@ -161,7 +167,7 @@ sub new { $self->{'statefile'} = "$localstatedir/amanda/$safe_filename"; } $self->_debug("using statefile '$self->{statefile}'"); - + $self->{'lock-timeout'} = $config->{'lock-timeout'}; # figure out the drive number to device name mapping if (exists $config->{'tapedev'} and $config->{'tapedev'} ne '' @@ -337,24 +343,32 @@ sub load_unlocked { if (exists $params{'relative_slot'}) { if ($params{'relative_slot'} eq "next") { if (exists $params{'slot'}) { - $slot = $self->_get_next_slot($state, $params{'slot'}); - $self->_debug("loading next relative to $params{slot}: $slot"); + $slot = $self->_get_next_slot($state, $params{'slot'}, $params{'except_slots'}); + if (defined $slot) { + $self->_debug("loading next relative to $params{slot}: $slot"); + } else { + $self->_debug("no next slot relative to $params{slot}"); + } } else { - $slot = $self->_get_next_slot($state, $state->{'current_slot'}); - $self->_debug("loading next relative to current slot: $slot"); + $slot = $self->_get_next_slot($state, $state->{'current_slot'}{get_config_name()}, $params{'except_slots'}); + if (defined $slot) { + $self->_debug("loading next relative to current slot: $slot"); + } else { + $self->_debug("no next relative to current slot"); + } } - if ($slot == -1) { + if (defined $slot && $slot == -1) { return $self->make_error("failed", $params{'res_cb'}, reason => "invalid", message => "could not find next slot"); } } elsif ($params{'relative_slot'} eq "current") { - $slot = $state->{'current_slot'}; - if ($slot == -1) { + $slot = $state->{'current_slot'}{get_config_name()}; + if (defined $slot && $slot == -1) { # seek to the first slot - $slot = $self->_get_next_slot($state, $state->{'current_slot'}); + $slot = $self->_get_next_slot($state, $state->{'current_slot'}{get_config_name()}, $params{'except_slots'}); } - if ($slot == -1) { + if (defined $slot && $slot == -1) { return $self->make_error("failed", $params{'res_cb'}, reason => "invalid", message => "no current slot"); @@ -396,6 +410,30 @@ sub load_unlocked { message => "no 'slot' or 'label' specified to load()"); } + if (defined $slot and !exists $state->{'slots'}->{$slot}) { + return $self->make_error("failed", $params{'res_cb'}, + reason => "invalid", + message => "invalid slot '$slot'"); + } + + if (!defined $slot) { + my $all_empty = 1; + if (exists $params{'except_slots'}) { + for my $xslot (keys %{ $params{'except_slots'} }) { + if ($state->{'slots'}->{$xslot}->{'state'} ne Amanda::Changer::SLOT_EMPTY) { + $all_empty = 0; + } + } + if ($all_empty) { + return $self->make_error("failed", $params{'res_cb'}, + reason => "notfound", + message => "all slots are empty"); + } + } + return $self->make_error("failed", $params{'res_cb'}, + reason => "notfound", + message => "all slots have been loaded"); + } if (!$self->_is_slot_allowed($slot)) { if (exists $params{'label'}) { return $self->make_error("failed", $params{'res_cb'}, @@ -410,14 +448,28 @@ sub load_unlocked { } if (exists $params{'except_slots'} and exists $params{'except_slots'}->{$slot}) { - return $self->make_error("failed", $params{'res_cb'}, - reason => "notfound", - message => "all slots have been loaded"); + # if all slots in except_slots are EMPTY + my $all_empty = 1; + for my $xslot (keys %{ $params{'except_slots'} }) { + if ($state->{'slots'}->{$xslot}->{'state'} ne Amanda::Changer::SLOT_EMPTY) { + $all_empty = 0; + } + } + if ($all_empty) { + return $self->make_error("failed", $params{'res_cb'}, + reason => "notfound", + message => "all slots are empty"); + } else { + return $self->make_error("failed", $params{'res_cb'}, + reason => "notfound", + message => "all slots have been loaded"); + } } if ($state->{'slots'}->{$slot}->{'state'} eq Amanda::Changer::SLOT_EMPTY) { return $self->make_error("failed", $params{'res_cb'}, reason => "empty", + slot => $slot, message => "slot $slot is empty"); } @@ -636,9 +688,13 @@ sub load_unlocked { # update metadata with this new information $state->{'slots'}->{$slot}->{'state'} = Amanda::Changer::SLOT_FULL; $state->{'slots'}->{$slot}->{'device_status'} = $device->status; - $state->{'slots'}->{$slot}->{'device_error'} = $device->error; - if (defined $device->{'volume_header'}) { - $state->{'slots'}->{$slot}->{'f_type'} = $device->{'volume_header'}->{type}; + if ($device->status == $DEVICE_STATUS_SUCCESS) { + $state->{'slots'}->{$slot}->{'device_error'} = undef; + } else { + $state->{'slots'}->{$slot}->{'device_error'} = $device->error; + } + if (defined $device->volume_header) { + $state->{'slots'}->{$slot}->{'f_type'} = $device->volume_header->{type}; } else { $state->{'slots'}->{$slot}->{'f_type'} = undef; } @@ -665,9 +721,13 @@ sub load_unlocked { # update metadata with this new information $state->{'slots'}->{$slot}->{'state'} = Amanda::Changer::SLOT_FULL; $state->{'slots'}->{$slot}->{'device_status'} = $device->status; - $state->{'slots'}->{$slot}->{'device_error'} = $device->error; - if (defined $device->{'volume_header'}) { - $state->{'slots'}->{$slot}->{'f_type'} = $device->{'volume_header'}->{type}; + if ($device->status == $DEVICE_STATUS_SUCCESS) { + $state->{'slots'}->{$slot}->{'device_error'} = undef; + } else { + $state->{'slots'}->{$slot}->{'device_error'} = $device->error; + } + if (defined $device->volume_header) { + $state->{'slots'}->{$slot}->{'f_type'} = $device->volume_header->{type}; } else { $state->{'slots'}->{$slot}->{'f_type'} = undef; } @@ -681,6 +741,16 @@ sub load_unlocked { message => "Found unlabeled tape while looking for '$params{label}'"); } + if (defined $self->{'tapelist'}) { + my $tle = $self->{'tapelist'}->lookup_tapelabel($label); + if (defined $tle and defined $tle->{'barcode'} and + defined $state->{'slots'}->{$slot}->{'barcode'} and + $state->{'slots'}->{$slot}->{'barcode'} ne $tle->{'barcode'}) { + return $self->make_error("failed", $params{'res_cb'}, + reason => "device", + message => "Slot $slot, label '$label', mismatch barcode between changer '$state->{'slots'}->{$slot}->{'barcode'}' and tapelist file '$tle->{'barcode'}'"); + } + } my $res = Amanda::Changer::robot::Reservation->new($self, $slot, $drive, $device, $state->{'slots'}->{$slot}->{'barcode'}); @@ -695,6 +765,16 @@ sub load_unlocked { $state->{'drives'}->{$drive}->{'state'} = Amanda::Changer::SLOT_FULL; $state->{'drives'}->{$drive}->{'barcode'} = $state->{'slots'}->{$slot}->{'barcode'}; $state->{'slots'}->{$slot}->{'device_status'} = $device->status; + if ($device->status == $DEVICE_STATUS_SUCCESS) { + $state->{'slots'}->{$slot}->{'device_error'} = undef; + } else { + $state->{'slots'}->{$slot}->{'device_error'} = $device->error; + } + if (defined $device->volume_header) { + $state->{'slots'}->{$slot}->{'f_type'} = $device->volume_header->{type}; + } else { + $state->{'slots'}->{$slot}->{'f_type'} = undef; + } my $barcode = $state->{'slots'}->{$slot}->{'barcode'}; if ($label and $barcode) { my $old_label = $state->{'bc2lb'}->{$barcode}; @@ -706,7 +786,7 @@ sub load_unlocked { } if ($params{'set_current'}) { $self->_debug("setting current slot to $slot"); - $state->{'current_slot'} = $slot; + $state->{'current_slot'}{get_config_name()} = $slot; } return $params{'res_cb'}->(undef, $res); @@ -804,13 +884,13 @@ sub get_device { # (overridden by subclasses) my $device = Amanda::Device->new($device_name); if ($device->status != $DEVICE_STATUS_SUCCESS) { return Amanda::Changer->make_error("fatal", undef, - reason => "unknown", + reason => "device", message => "opening '$device_name': " . $device->error_or_status()); } if (my $err = $self->{'config'}->configure_device($device)) { return Amanda::Changer->make_error("fatal", undef, - reason => "unknown", + reason => "device", message => $err); } @@ -920,7 +1000,7 @@ sub reset_unlocked { my %params = @_; my $state = $params{'state'}; - $state->{'current_slot'} = $self->_get_next_slot($state, -1); + $state->{'current_slot'}{get_config_name()} = $self->_get_next_slot($state, -1); $params{'finished_cb'}->(); } @@ -1270,7 +1350,7 @@ sub inventory_unlocked { if $slot->{'ie'}; $i->{'current'} = 1 - if $slot_name eq $state->{'current_slot'}; + if $slot_name eq $state->{'current_slot'}{get_config_name()}; push @inv, $i; } @@ -1387,11 +1467,12 @@ sub move_unlocked { # the changer status has been updated) sub _get_next_slot { my $self = shift; - my ($state, $slot) = @_; + my ($state, $slot, $except_slots) = @_; my @nonempty = sort { $a <=> $b } grep { $state->{'slots'}->{$_}->{'state'} == Amanda::Changer::SLOT_FULL and $self->_is_slot_allowed($_) + and (!$except_slots || !$except_slots->{$_}) } keys(%{$state->{'slots'}}); my @higher = grep { $_ > $slot } @nonempty; @@ -1418,7 +1499,6 @@ sub _is_slot_allowed { return 0; } -# add a prefix and call Amanda::Debug::debug sub _debug { my $self = shift; my ($msg) = @_; @@ -1502,7 +1582,13 @@ sub _with_updated_state { $state->{'drives'} = {}; $state->{'drive_lru'} = []; $state->{'bc2lb'} = {}; - $state->{'current_slot'} = -1; + $state->{'current_slot'}{get_config_name()} = -1; + } + + if (defined $state->{'current_slot'} && + ref(\$state->{'current_slot'}) eq "SCALAR") { + my $current_slot = $state->{'current_slot'}; + $state->{'current_slot'} = {get_config_name() => $current_slot}; } # this is for testing ONLY! @@ -1698,8 +1784,9 @@ sub _with_updated_state { } } - if ($state->{'current_slot'} == -1) { - $state->{'current_slot'} = $self->_get_next_slot($state, -1); + if (!defined $state->{'current_slot'}{get_config_name()} || + $state->{'current_slot'}{get_config_name()} == -1) { + $state->{'current_slot'}{get_config_name()} = $self->_get_next_slot($state, -1); } $steps->{'done'}->(); diff --git a/perl/Amanda/Changer/single.pm b/perl/Amanda/Changer/single.pm index 06a15e2..8417d02 100644 --- a/perl/Amanda/Changer/single.pm +++ b/perl/Amanda/Changer/single.pm @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/ClientService.pm b/perl/Amanda/ClientService.pm index 8d59382..199b5f1 100644 --- a/perl/Amanda/ClientService.pm +++ b/perl/Amanda/ClientService.pm @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Cmdline.c b/perl/Amanda/Cmdline.c index e572b98..5a8d2ef 100644 --- a/perl/Amanda/Cmdline.c +++ b/perl/Amanda/Cmdline.c @@ -2720,6 +2720,11 @@ XS(SWIG_init) { sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(CMDLINE_EMPTY_TO_WILDCARD))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "CMDLINE_EXACT_MATCH", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(CMDLINE_EXACT_MATCH))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; ST(0) = &PL_sv_yes; XSRETURN(1); } diff --git a/perl/Amanda/Cmdline.pm b/perl/Amanda/Cmdline.pm index c7853b0..5fe6871 100644 --- a/perl/Amanda/Cmdline.pm +++ b/perl/Amanda/Cmdline.pm @@ -108,6 +108,7 @@ package Amanda::Cmdline; *CMDLINE_PARSE_DATESTAMP = *Amanda::Cmdlinec::CMDLINE_PARSE_DATESTAMP; *CMDLINE_PARSE_LEVEL = *Amanda::Cmdlinec::CMDLINE_PARSE_LEVEL; *CMDLINE_EMPTY_TO_WILDCARD = *Amanda::Cmdlinec::CMDLINE_EMPTY_TO_WILDCARD; +*CMDLINE_EXACT_MATCH = *Amanda::Cmdlinec::CMDLINE_EXACT_MATCH; @EXPORT_OK = (); %EXPORT_TAGS = (); @@ -257,6 +258,11 @@ push @{$EXPORT_TAGS{"cmdline_parse_dumpspecs_flags"}}, qw($CMDLINE_EMPTY_TO_WILD $_cmdline_parse_dumpspecs_flags_VALUES{"CMDLINE_EMPTY_TO_WILDCARD"} = $CMDLINE_EMPTY_TO_WILDCARD; +push @EXPORT_OK, qw($CMDLINE_EXACT_MATCH); +push @{$EXPORT_TAGS{"cmdline_parse_dumpspecs_flags"}}, qw($CMDLINE_EXACT_MATCH); + +$_cmdline_parse_dumpspecs_flags_VALUES{"CMDLINE_EXACT_MATCH"} = $CMDLINE_EXACT_MATCH; + #copy symbols in cmdline_parse_dumpspecs_flags to constants push @{$EXPORT_TAGS{"constants"}}, @{$EXPORT_TAGS{"cmdline_parse_dumpspecs_flags"}}; diff --git a/perl/Amanda/Cmdline.pod b/perl/Amanda/Cmdline.pod index 1051b23..b94fa1a 100644 --- a/perl/Amanda/Cmdline.pod +++ b/perl/Amanda/Cmdline.pod @@ -1,9 +1,10 @@ /* * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Cmdline.swg b/perl/Amanda/Cmdline.swg index e31d766..1ce9656 100644 --- a/perl/Amanda/Cmdline.swg +++ b/perl/Amanda/Cmdline.swg @@ -1,9 +1,10 @@ /* * Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -94,6 +95,7 @@ amglue_add_flag_tag_fns(cmdline_parse_dumpspecs_flags); amglue_add_constant(CMDLINE_PARSE_DATESTAMP, cmdline_parse_dumpspecs_flags); amglue_add_constant(CMDLINE_PARSE_LEVEL, cmdline_parse_dumpspecs_flags); amglue_add_constant(CMDLINE_EMPTY_TO_WILDCARD, cmdline_parse_dumpspecs_flags); +amglue_add_constant(CMDLINE_EXACT_MATCH, cmdline_parse_dumpspecs_flags); amglue_copy_to_tag(cmdline_parse_dumpspecs_flags, constants); %rename(parse_dumpspecs) cmdline_parse_dumpspecs; diff --git a/perl/Amanda/Config.c b/perl/Amanda/Config.c index 6a585e6..e8e53e0 100644 --- a/perl/Amanda/Config.c +++ b/perl/Amanda/Config.c @@ -5952,6 +5952,16 @@ XS(SWIG_init) { sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(CNF_TMPDIR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "CNF_REPORT_USE_MEDIA", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(CNF_REPORT_USE_MEDIA))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "CNF_REPORT_NEXT_MEDIA", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(CNF_REPORT_NEXT_MEDIA))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "TAPETYPE_COMMENT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(TAPETYPE_COMMENT))); diff --git a/perl/Amanda/Config.pm b/perl/Amanda/Config.pm index bcd636c..910ffa0 100644 --- a/perl/Amanda/Config.pm +++ b/perl/Amanda/Config.pm @@ -218,6 +218,8 @@ package Amanda::Config; *CNF_TAPERSCAN = *Amanda::Configc::CNF_TAPERSCAN; *CNF_EJECT_VOLUME = *Amanda::Configc::CNF_EJECT_VOLUME; *CNF_TMPDIR = *Amanda::Configc::CNF_TMPDIR; +*CNF_REPORT_USE_MEDIA = *Amanda::Configc::CNF_REPORT_USE_MEDIA; +*CNF_REPORT_NEXT_MEDIA = *Amanda::Configc::CNF_REPORT_NEXT_MEDIA; *TAPETYPE_COMMENT = *Amanda::Configc::TAPETYPE_COMMENT; *TAPETYPE_LBL_TEMPL = *Amanda::Configc::TAPETYPE_LBL_TEMPL; *TAPETYPE_BLOCKSIZE = *Amanda::Configc::TAPETYPE_BLOCKSIZE; @@ -740,9 +742,9 @@ sub confparm_key_to_string { return $enumval; } -push @EXPORT_OK, qw( $CNF_ORG $CNF_CONF $CNF_AMDUMP_SERVER $CNF_INDEX_SERVER $CNF_TAPE_SERVER $CNF_AUTH $CNF_SSH_KEYS $CNF_AMANDAD_PATH $CNF_CLIENT_USERNAME $CNF_CLIENT_PORT $CNF_GNUTAR_LIST_DIR $CNF_AMANDATES $CNF_MAILER $CNF_MAILTO $CNF_DUMPUSER $CNF_TAPEDEV $CNF_DEVICE_PROPERTY $CNF_PROPERTY $CNF_CHANGERDEV $CNF_CHANGERFILE $CNF_LABELSTR $CNF_AUTOLABEL $CNF_META_AUTOLABEL $CNF_TAPELIST $CNF_DISKFILE $CNF_INFOFILE $CNF_LOGDIR $CNF_INDEXDIR $CNF_TAPETYPE $CNF_DUMPCYCLE $CNF_RUNSPERCYCLE $CNF_TAPECYCLE $CNF_NETUSAGE $CNF_INPARALLEL $CNF_DUMPORDER $CNF_BUMPPERCENT $CNF_BUMPSIZE $CNF_BUMPMULT $CNF_BUMPDAYS $CNF_TPCHANGER $CNF_RUNTAPES $CNF_MAX_DLE_BY_VOLUME $CNF_MAXDUMPS $CNF_ETIMEOUT $CNF_DTIMEOUT $CNF_CTIMEOUT $CNF_DEVICE_OUTPUT_BUFFER_SIZE $CNF_PRINTER $CNF_AUTOFLUSH $CNF_RESERVE $CNF_MAXDUMPSIZE $CNF_COLUMNSPEC $CNF_AMRECOVER_DO_FSF $CNF_AMRECOVER_CHECK_LABEL $CNF_AMRECOVER_CHANGER $CNF_TAPERALGO $CNF_FLUSH_THRESHOLD_DUMPED $CNF_FLUSH_THRESHOLD_SCHEDULED $CNF_TAPERFLUSH $CNF_DISPLAYUNIT $CNF_KRB5KEYTAB $CNF_KRB5PRINCIPAL $CNF_LABEL_NEW_TAPES $CNF_USETIMESTAMPS $CNF_REP_TRIES $CNF_CONNECT_TRIES $CNF_REQ_TRIES $CNF_DEBUG_AMANDAD $CNF_DEBUG_RECOVERY $CNF_DEBUG_AMIDXTAPED $CNF_DEBUG_AMINDEXD $CNF_DEBUG_AMRECOVER $CNF_DEBUG_AUTH $CNF_DEBUG_EVENT $CNF_DEBUG_HOLDING $CNF_DEBUG_PROTOCOL $CNF_DEBUG_PLANNER $CNF_DEBUG_DRIVER $CNF_DEBUG_DUMPER $CNF_DEBUG_CHUNKER $CNF_DEBUG_TAPER $CNF_DEBUG_SELFCHECK $CNF_DEBUG_SENDSIZE $CNF_DEBUG_SENDBACKUP $CNF_RESERVED_UDP_PORT $CNF_RESERVED_TCP_PORT $CNF_UNRESERVED_TCP_PORT $CNF_HOLDINGDISK $CNF_SEND_AMREPORT_ON $CNF_TAPER_PARALLEL_WRITE $CNF_RECOVERY_LIMIT $CNF_INTERACTIVITY $CNF_TAPERSCAN $CNF_EJECT_VOLUME $CNF_TMPDIR); -push @{$EXPORT_TAGS{"confparm_key"}}, qw( $CNF_ORG $CNF_CONF $CNF_AMDUMP_SERVER $CNF_INDEX_SERVER $CNF_TAPE_SERVER $CNF_AUTH $CNF_SSH_KEYS $CNF_AMANDAD_PATH $CNF_CLIENT_USERNAME $CNF_CLIENT_PORT $CNF_GNUTAR_LIST_DIR $CNF_AMANDATES $CNF_MAILER $CNF_MAILTO $CNF_DUMPUSER $CNF_TAPEDEV $CNF_DEVICE_PROPERTY $CNF_PROPERTY $CNF_CHANGERDEV $CNF_CHANGERFILE $CNF_LABELSTR $CNF_AUTOLABEL $CNF_META_AUTOLABEL $CNF_TAPELIST $CNF_DISKFILE $CNF_INFOFILE $CNF_LOGDIR $CNF_INDEXDIR $CNF_TAPETYPE $CNF_DUMPCYCLE $CNF_RUNSPERCYCLE $CNF_TAPECYCLE $CNF_NETUSAGE $CNF_INPARALLEL $CNF_DUMPORDER $CNF_BUMPPERCENT $CNF_BUMPSIZE $CNF_BUMPMULT $CNF_BUMPDAYS $CNF_TPCHANGER $CNF_RUNTAPES $CNF_MAX_DLE_BY_VOLUME $CNF_MAXDUMPS $CNF_ETIMEOUT $CNF_DTIMEOUT $CNF_CTIMEOUT $CNF_DEVICE_OUTPUT_BUFFER_SIZE $CNF_PRINTER $CNF_AUTOFLUSH $CNF_RESERVE $CNF_MAXDUMPSIZE $CNF_COLUMNSPEC $CNF_AMRECOVER_DO_FSF $CNF_AMRECOVER_CHECK_LABEL $CNF_AMRECOVER_CHANGER $CNF_TAPERALGO $CNF_FLUSH_THRESHOLD_DUMPED $CNF_FLUSH_THRESHOLD_SCHEDULED $CNF_TAPERFLUSH $CNF_DISPLAYUNIT $CNF_KRB5KEYTAB $CNF_KRB5PRINCIPAL $CNF_LABEL_NEW_TAPES $CNF_USETIMESTAMPS $CNF_REP_TRIES $CNF_CONNECT_TRIES $CNF_REQ_TRIES $CNF_DEBUG_AMANDAD $CNF_DEBUG_RECOVERY $CNF_DEBUG_AMIDXTAPED $CNF_DEBUG_AMINDEXD $CNF_DEBUG_AMRECOVER $CNF_DEBUG_AUTH $CNF_DEBUG_EVENT $CNF_DEBUG_HOLDING $CNF_DEBUG_PROTOCOL $CNF_DEBUG_PLANNER $CNF_DEBUG_DRIVER $CNF_DEBUG_DUMPER $CNF_DEBUG_CHUNKER $CNF_DEBUG_TAPER $CNF_DEBUG_SELFCHECK $CNF_DEBUG_SENDSIZE $CNF_DEBUG_SENDBACKUP $CNF_RESERVED_UDP_PORT $CNF_RESERVED_TCP_PORT $CNF_UNRESERVED_TCP_PORT $CNF_HOLDINGDISK $CNF_SEND_AMREPORT_ON $CNF_TAPER_PARALLEL_WRITE $CNF_RECOVERY_LIMIT $CNF_INTERACTIVITY $CNF_TAPERSCAN $CNF_EJECT_VOLUME $CNF_TMPDIR); - foreach (qw( CNF_ORG CNF_CONF CNF_AMDUMP_SERVER CNF_INDEX_SERVER CNF_TAPE_SERVER CNF_AUTH CNF_SSH_KEYS CNF_AMANDAD_PATH CNF_CLIENT_USERNAME CNF_CLIENT_PORT CNF_GNUTAR_LIST_DIR CNF_AMANDATES CNF_MAILER CNF_MAILTO CNF_DUMPUSER CNF_TAPEDEV CNF_DEVICE_PROPERTY CNF_PROPERTY CNF_CHANGERDEV CNF_CHANGERFILE CNF_LABELSTR CNF_AUTOLABEL CNF_META_AUTOLABEL CNF_TAPELIST CNF_DISKFILE CNF_INFOFILE CNF_LOGDIR CNF_INDEXDIR CNF_TAPETYPE CNF_DUMPCYCLE CNF_RUNSPERCYCLE CNF_TAPECYCLE CNF_NETUSAGE CNF_INPARALLEL CNF_DUMPORDER CNF_BUMPPERCENT CNF_BUMPSIZE CNF_BUMPMULT CNF_BUMPDAYS CNF_TPCHANGER CNF_RUNTAPES CNF_MAX_DLE_BY_VOLUME CNF_MAXDUMPS CNF_ETIMEOUT CNF_DTIMEOUT CNF_CTIMEOUT CNF_DEVICE_OUTPUT_BUFFER_SIZE CNF_PRINTER CNF_AUTOFLUSH CNF_RESERVE CNF_MAXDUMPSIZE CNF_COLUMNSPEC CNF_AMRECOVER_DO_FSF CNF_AMRECOVER_CHECK_LABEL CNF_AMRECOVER_CHANGER CNF_TAPERALGO CNF_FLUSH_THRESHOLD_DUMPED CNF_FLUSH_THRESHOLD_SCHEDULED CNF_TAPERFLUSH CNF_DISPLAYUNIT CNF_KRB5KEYTAB CNF_KRB5PRINCIPAL CNF_LABEL_NEW_TAPES CNF_USETIMESTAMPS CNF_REP_TRIES CNF_CONNECT_TRIES CNF_REQ_TRIES CNF_DEBUG_AMANDAD CNF_DEBUG_RECOVERY CNF_DEBUG_AMIDXTAPED CNF_DEBUG_AMINDEXD CNF_DEBUG_AMRECOVER CNF_DEBUG_AUTH CNF_DEBUG_EVENT CNF_DEBUG_HOLDING CNF_DEBUG_PROTOCOL CNF_DEBUG_PLANNER CNF_DEBUG_DRIVER CNF_DEBUG_DUMPER CNF_DEBUG_CHUNKER CNF_DEBUG_TAPER CNF_DEBUG_SELFCHECK CNF_DEBUG_SENDSIZE CNF_DEBUG_SENDBACKUP CNF_RESERVED_UDP_PORT CNF_RESERVED_TCP_PORT CNF_UNRESERVED_TCP_PORT CNF_HOLDINGDISK CNF_SEND_AMREPORT_ON CNF_TAPER_PARALLEL_WRITE CNF_RECOVERY_LIMIT CNF_INTERACTIVITY CNF_TAPERSCAN CNF_EJECT_VOLUME CNF_TMPDIR)) { $_confparm_key_VALUES{$_} = $$_; } +push @EXPORT_OK, qw( $CNF_ORG $CNF_CONF $CNF_AMDUMP_SERVER $CNF_INDEX_SERVER $CNF_TAPE_SERVER $CNF_AUTH $CNF_SSH_KEYS $CNF_AMANDAD_PATH $CNF_CLIENT_USERNAME $CNF_CLIENT_PORT $CNF_GNUTAR_LIST_DIR $CNF_AMANDATES $CNF_MAILER $CNF_MAILTO $CNF_DUMPUSER $CNF_TAPEDEV $CNF_DEVICE_PROPERTY $CNF_PROPERTY $CNF_CHANGERDEV $CNF_CHANGERFILE $CNF_LABELSTR $CNF_AUTOLABEL $CNF_META_AUTOLABEL $CNF_TAPELIST $CNF_DISKFILE $CNF_INFOFILE $CNF_LOGDIR $CNF_INDEXDIR $CNF_TAPETYPE $CNF_DUMPCYCLE $CNF_RUNSPERCYCLE $CNF_TAPECYCLE $CNF_NETUSAGE $CNF_INPARALLEL $CNF_DUMPORDER $CNF_BUMPPERCENT $CNF_BUMPSIZE $CNF_BUMPMULT $CNF_BUMPDAYS $CNF_TPCHANGER $CNF_RUNTAPES $CNF_MAX_DLE_BY_VOLUME $CNF_MAXDUMPS $CNF_ETIMEOUT $CNF_DTIMEOUT $CNF_CTIMEOUT $CNF_DEVICE_OUTPUT_BUFFER_SIZE $CNF_PRINTER $CNF_AUTOFLUSH $CNF_RESERVE $CNF_MAXDUMPSIZE $CNF_COLUMNSPEC $CNF_AMRECOVER_DO_FSF $CNF_AMRECOVER_CHECK_LABEL $CNF_AMRECOVER_CHANGER $CNF_TAPERALGO $CNF_FLUSH_THRESHOLD_DUMPED $CNF_FLUSH_THRESHOLD_SCHEDULED $CNF_TAPERFLUSH $CNF_DISPLAYUNIT $CNF_KRB5KEYTAB $CNF_KRB5PRINCIPAL $CNF_LABEL_NEW_TAPES $CNF_USETIMESTAMPS $CNF_REP_TRIES $CNF_CONNECT_TRIES $CNF_REQ_TRIES $CNF_DEBUG_AMANDAD $CNF_DEBUG_RECOVERY $CNF_DEBUG_AMIDXTAPED $CNF_DEBUG_AMINDEXD $CNF_DEBUG_AMRECOVER $CNF_DEBUG_AUTH $CNF_DEBUG_EVENT $CNF_DEBUG_HOLDING $CNF_DEBUG_PROTOCOL $CNF_DEBUG_PLANNER $CNF_DEBUG_DRIVER $CNF_DEBUG_DUMPER $CNF_DEBUG_CHUNKER $CNF_DEBUG_TAPER $CNF_DEBUG_SELFCHECK $CNF_DEBUG_SENDSIZE $CNF_DEBUG_SENDBACKUP $CNF_RESERVED_UDP_PORT $CNF_RESERVED_TCP_PORT $CNF_UNRESERVED_TCP_PORT $CNF_HOLDINGDISK $CNF_SEND_AMREPORT_ON $CNF_TAPER_PARALLEL_WRITE $CNF_RECOVERY_LIMIT $CNF_INTERACTIVITY $CNF_TAPERSCAN $CNF_EJECT_VOLUME $CNF_TMPDIR $CNF_REPORT_USE_MEDIA $CNF_REPORT_NEXT_MEDIA); +push @{$EXPORT_TAGS{"confparm_key"}}, qw( $CNF_ORG $CNF_CONF $CNF_AMDUMP_SERVER $CNF_INDEX_SERVER $CNF_TAPE_SERVER $CNF_AUTH $CNF_SSH_KEYS $CNF_AMANDAD_PATH $CNF_CLIENT_USERNAME $CNF_CLIENT_PORT $CNF_GNUTAR_LIST_DIR $CNF_AMANDATES $CNF_MAILER $CNF_MAILTO $CNF_DUMPUSER $CNF_TAPEDEV $CNF_DEVICE_PROPERTY $CNF_PROPERTY $CNF_CHANGERDEV $CNF_CHANGERFILE $CNF_LABELSTR $CNF_AUTOLABEL $CNF_META_AUTOLABEL $CNF_TAPELIST $CNF_DISKFILE $CNF_INFOFILE $CNF_LOGDIR $CNF_INDEXDIR $CNF_TAPETYPE $CNF_DUMPCYCLE $CNF_RUNSPERCYCLE $CNF_TAPECYCLE $CNF_NETUSAGE $CNF_INPARALLEL $CNF_DUMPORDER $CNF_BUMPPERCENT $CNF_BUMPSIZE $CNF_BUMPMULT $CNF_BUMPDAYS $CNF_TPCHANGER $CNF_RUNTAPES $CNF_MAX_DLE_BY_VOLUME $CNF_MAXDUMPS $CNF_ETIMEOUT $CNF_DTIMEOUT $CNF_CTIMEOUT $CNF_DEVICE_OUTPUT_BUFFER_SIZE $CNF_PRINTER $CNF_AUTOFLUSH $CNF_RESERVE $CNF_MAXDUMPSIZE $CNF_COLUMNSPEC $CNF_AMRECOVER_DO_FSF $CNF_AMRECOVER_CHECK_LABEL $CNF_AMRECOVER_CHANGER $CNF_TAPERALGO $CNF_FLUSH_THRESHOLD_DUMPED $CNF_FLUSH_THRESHOLD_SCHEDULED $CNF_TAPERFLUSH $CNF_DISPLAYUNIT $CNF_KRB5KEYTAB $CNF_KRB5PRINCIPAL $CNF_LABEL_NEW_TAPES $CNF_USETIMESTAMPS $CNF_REP_TRIES $CNF_CONNECT_TRIES $CNF_REQ_TRIES $CNF_DEBUG_AMANDAD $CNF_DEBUG_RECOVERY $CNF_DEBUG_AMIDXTAPED $CNF_DEBUG_AMINDEXD $CNF_DEBUG_AMRECOVER $CNF_DEBUG_AUTH $CNF_DEBUG_EVENT $CNF_DEBUG_HOLDING $CNF_DEBUG_PROTOCOL $CNF_DEBUG_PLANNER $CNF_DEBUG_DRIVER $CNF_DEBUG_DUMPER $CNF_DEBUG_CHUNKER $CNF_DEBUG_TAPER $CNF_DEBUG_SELFCHECK $CNF_DEBUG_SENDSIZE $CNF_DEBUG_SENDBACKUP $CNF_RESERVED_UDP_PORT $CNF_RESERVED_TCP_PORT $CNF_UNRESERVED_TCP_PORT $CNF_HOLDINGDISK $CNF_SEND_AMREPORT_ON $CNF_TAPER_PARALLEL_WRITE $CNF_RECOVERY_LIMIT $CNF_INTERACTIVITY $CNF_TAPERSCAN $CNF_EJECT_VOLUME $CNF_TMPDIR $CNF_REPORT_USE_MEDIA $CNF_REPORT_NEXT_MEDIA); + foreach (qw( CNF_ORG CNF_CONF CNF_AMDUMP_SERVER CNF_INDEX_SERVER CNF_TAPE_SERVER CNF_AUTH CNF_SSH_KEYS CNF_AMANDAD_PATH CNF_CLIENT_USERNAME CNF_CLIENT_PORT CNF_GNUTAR_LIST_DIR CNF_AMANDATES CNF_MAILER CNF_MAILTO CNF_DUMPUSER CNF_TAPEDEV CNF_DEVICE_PROPERTY CNF_PROPERTY CNF_CHANGERDEV CNF_CHANGERFILE CNF_LABELSTR CNF_AUTOLABEL CNF_META_AUTOLABEL CNF_TAPELIST CNF_DISKFILE CNF_INFOFILE CNF_LOGDIR CNF_INDEXDIR CNF_TAPETYPE CNF_DUMPCYCLE CNF_RUNSPERCYCLE CNF_TAPECYCLE CNF_NETUSAGE CNF_INPARALLEL CNF_DUMPORDER CNF_BUMPPERCENT CNF_BUMPSIZE CNF_BUMPMULT CNF_BUMPDAYS CNF_TPCHANGER CNF_RUNTAPES CNF_MAX_DLE_BY_VOLUME CNF_MAXDUMPS CNF_ETIMEOUT CNF_DTIMEOUT CNF_CTIMEOUT CNF_DEVICE_OUTPUT_BUFFER_SIZE CNF_PRINTER CNF_AUTOFLUSH CNF_RESERVE CNF_MAXDUMPSIZE CNF_COLUMNSPEC CNF_AMRECOVER_DO_FSF CNF_AMRECOVER_CHECK_LABEL CNF_AMRECOVER_CHANGER CNF_TAPERALGO CNF_FLUSH_THRESHOLD_DUMPED CNF_FLUSH_THRESHOLD_SCHEDULED CNF_TAPERFLUSH CNF_DISPLAYUNIT CNF_KRB5KEYTAB CNF_KRB5PRINCIPAL CNF_LABEL_NEW_TAPES CNF_USETIMESTAMPS CNF_REP_TRIES CNF_CONNECT_TRIES CNF_REQ_TRIES CNF_DEBUG_AMANDAD CNF_DEBUG_RECOVERY CNF_DEBUG_AMIDXTAPED CNF_DEBUG_AMINDEXD CNF_DEBUG_AMRECOVER CNF_DEBUG_AUTH CNF_DEBUG_EVENT CNF_DEBUG_HOLDING CNF_DEBUG_PROTOCOL CNF_DEBUG_PLANNER CNF_DEBUG_DRIVER CNF_DEBUG_DUMPER CNF_DEBUG_CHUNKER CNF_DEBUG_TAPER CNF_DEBUG_SELFCHECK CNF_DEBUG_SENDSIZE CNF_DEBUG_SENDBACKUP CNF_RESERVED_UDP_PORT CNF_RESERVED_TCP_PORT CNF_UNRESERVED_TCP_PORT CNF_HOLDINGDISK CNF_SEND_AMREPORT_ON CNF_TAPER_PARALLEL_WRITE CNF_RECOVERY_LIMIT CNF_INTERACTIVITY CNF_TAPERSCAN CNF_EJECT_VOLUME CNF_TMPDIR CNF_REPORT_USE_MEDIA CNF_REPORT_NEXT_MEDIA)) { $_confparm_key_VALUES{$_} = $$_; } #copy symbols in confparm_key to getconf push @{$EXPORT_TAGS{"getconf"}}, @{$EXPORT_TAGS{"confparm_key"}}; @@ -751,7 +753,7 @@ use Amanda::Config::FoldingHash; =pod -Global Parameters: C<$CNF_ORG> C<$CNF_CONF> C<$CNF_AMDUMP_SERVER> C<$CNF_INDEX_SERVER> C<$CNF_TAPE_SERVER> C<$CNF_AUTH> C<$CNF_SSH_KEYS> C<$CNF_AMANDAD_PATH> C<$CNF_CLIENT_USERNAME> C<$CNF_CLIENT_PORT> C<$CNF_GNUTAR_LIST_DIR> C<$CNF_AMANDATES> C<$CNF_MAILER> C<$CNF_MAILTO> C<$CNF_DUMPUSER> C<$CNF_TAPEDEV> C<$CNF_DEVICE_PROPERTY> C<$CNF_PROPERTY> C<$CNF_CHANGERDEV> C<$CNF_CHANGERFILE> C<$CNF_LABELSTR> C<$CNF_AUTOLABEL> C<$CNF_META_AUTOLABEL> C<$CNF_TAPELIST> C<$CNF_DISKFILE> C<$CNF_INFOFILE> C<$CNF_LOGDIR> C<$CNF_INDEXDIR> C<$CNF_TAPETYPE> C<$CNF_DUMPCYCLE> C<$CNF_RUNSPERCYCLE> C<$CNF_TAPECYCLE> C<$CNF_NETUSAGE> C<$CNF_INPARALLEL> C<$CNF_DUMPORDER> C<$CNF_BUMPPERCENT> C<$CNF_BUMPSIZE> C<$CNF_BUMPMULT> C<$CNF_BUMPDAYS> C<$CNF_TPCHANGER> C<$CNF_RUNTAPES> C<$CNF_MAX_DLE_BY_VOLUME> C<$CNF_MAXDUMPS> C<$CNF_ETIMEOUT> C<$CNF_DTIMEOUT> C<$CNF_CTIMEOUT> C<$CNF_DEVICE_OUTPUT_BUFFER_SIZE> C<$CNF_PRINTER> C<$CNF_AUTOFLUSH> C<$CNF_RESERVE> C<$CNF_MAXDUMPSIZE> C<$CNF_COLUMNSPEC> C<$CNF_AMRECOVER_DO_FSF> C<$CNF_AMRECOVER_CHECK_LABEL> C<$CNF_AMRECOVER_CHANGER> C<$CNF_TAPERALGO> C<$CNF_FLUSH_THRESHOLD_DUMPED> C<$CNF_FLUSH_THRESHOLD_SCHEDULED> C<$CNF_TAPERFLUSH> C<$CNF_DISPLAYUNIT> C<$CNF_KRB5KEYTAB> C<$CNF_KRB5PRINCIPAL> C<$CNF_LABEL_NEW_TAPES> C<$CNF_USETIMESTAMPS> C<$CNF_REP_TRIES> C<$CNF_CONNECT_TRIES> C<$CNF_REQ_TRIES> C<$CNF_DEBUG_AMANDAD> C<$CNF_DEBUG_RECOVERY> C<$CNF_DEBUG_AMIDXTAPED> C<$CNF_DEBUG_AMINDEXD> C<$CNF_DEBUG_AMRECOVER> C<$CNF_DEBUG_AUTH> C<$CNF_DEBUG_EVENT> C<$CNF_DEBUG_HOLDING> C<$CNF_DEBUG_PROTOCOL> C<$CNF_DEBUG_PLANNER> C<$CNF_DEBUG_DRIVER> C<$CNF_DEBUG_DUMPER> C<$CNF_DEBUG_CHUNKER> C<$CNF_DEBUG_TAPER> C<$CNF_DEBUG_SELFCHECK> C<$CNF_DEBUG_SENDSIZE> C<$CNF_DEBUG_SENDBACKUP> C<$CNF_RESERVED_UDP_PORT> C<$CNF_RESERVED_TCP_PORT> C<$CNF_UNRESERVED_TCP_PORT> C<$CNF_HOLDINGDISK> C<$CNF_SEND_AMREPORT_ON> C<$CNF_TAPER_PARALLEL_WRITE> C<$CNF_RECOVERY_LIMIT> C<$CNF_INTERACTIVITY> C<$CNF_TAPERSCAN> C<$CNF_EJECT_VOLUME> C<$CNF_TMPDIR> +Global Parameters: C<$CNF_ORG> C<$CNF_CONF> C<$CNF_AMDUMP_SERVER> C<$CNF_INDEX_SERVER> C<$CNF_TAPE_SERVER> C<$CNF_AUTH> C<$CNF_SSH_KEYS> C<$CNF_AMANDAD_PATH> C<$CNF_CLIENT_USERNAME> C<$CNF_CLIENT_PORT> C<$CNF_GNUTAR_LIST_DIR> C<$CNF_AMANDATES> C<$CNF_MAILER> C<$CNF_MAILTO> C<$CNF_DUMPUSER> C<$CNF_TAPEDEV> C<$CNF_DEVICE_PROPERTY> C<$CNF_PROPERTY> C<$CNF_CHANGERDEV> C<$CNF_CHANGERFILE> C<$CNF_LABELSTR> C<$CNF_AUTOLABEL> C<$CNF_META_AUTOLABEL> C<$CNF_TAPELIST> C<$CNF_DISKFILE> C<$CNF_INFOFILE> C<$CNF_LOGDIR> C<$CNF_INDEXDIR> C<$CNF_TAPETYPE> C<$CNF_DUMPCYCLE> C<$CNF_RUNSPERCYCLE> C<$CNF_TAPECYCLE> C<$CNF_NETUSAGE> C<$CNF_INPARALLEL> C<$CNF_DUMPORDER> C<$CNF_BUMPPERCENT> C<$CNF_BUMPSIZE> C<$CNF_BUMPMULT> C<$CNF_BUMPDAYS> C<$CNF_TPCHANGER> C<$CNF_RUNTAPES> C<$CNF_MAX_DLE_BY_VOLUME> C<$CNF_MAXDUMPS> C<$CNF_ETIMEOUT> C<$CNF_DTIMEOUT> C<$CNF_CTIMEOUT> C<$CNF_DEVICE_OUTPUT_BUFFER_SIZE> C<$CNF_PRINTER> C<$CNF_AUTOFLUSH> C<$CNF_RESERVE> C<$CNF_MAXDUMPSIZE> C<$CNF_COLUMNSPEC> C<$CNF_AMRECOVER_DO_FSF> C<$CNF_AMRECOVER_CHECK_LABEL> C<$CNF_AMRECOVER_CHANGER> C<$CNF_TAPERALGO> C<$CNF_FLUSH_THRESHOLD_DUMPED> C<$CNF_FLUSH_THRESHOLD_SCHEDULED> C<$CNF_TAPERFLUSH> C<$CNF_DISPLAYUNIT> C<$CNF_KRB5KEYTAB> C<$CNF_KRB5PRINCIPAL> C<$CNF_LABEL_NEW_TAPES> C<$CNF_USETIMESTAMPS> C<$CNF_REP_TRIES> C<$CNF_CONNECT_TRIES> C<$CNF_REQ_TRIES> C<$CNF_DEBUG_AMANDAD> C<$CNF_DEBUG_RECOVERY> C<$CNF_DEBUG_AMIDXTAPED> C<$CNF_DEBUG_AMINDEXD> C<$CNF_DEBUG_AMRECOVER> C<$CNF_DEBUG_AUTH> C<$CNF_DEBUG_EVENT> C<$CNF_DEBUG_HOLDING> C<$CNF_DEBUG_PROTOCOL> C<$CNF_DEBUG_PLANNER> C<$CNF_DEBUG_DRIVER> C<$CNF_DEBUG_DUMPER> C<$CNF_DEBUG_CHUNKER> C<$CNF_DEBUG_TAPER> C<$CNF_DEBUG_SELFCHECK> C<$CNF_DEBUG_SENDSIZE> C<$CNF_DEBUG_SENDBACKUP> C<$CNF_RESERVED_UDP_PORT> C<$CNF_RESERVED_TCP_PORT> C<$CNF_UNRESERVED_TCP_PORT> C<$CNF_HOLDINGDISK> C<$CNF_SEND_AMREPORT_ON> C<$CNF_TAPER_PARALLEL_WRITE> C<$CNF_RECOVERY_LIMIT> C<$CNF_INTERACTIVITY> C<$CNF_TAPERSCAN> C<$CNF_EJECT_VOLUME> C<$CNF_TMPDIR> C<$CNF_REPORT_USE_MEDIA> C<$CNF_REPORT_NEXT_MEDIA> =cut diff --git a/perl/Amanda/Config.pod b/perl/Amanda/Config.pod index e101eff..104cdd1 100644 --- a/perl/Amanda/Config.pod +++ b/perl/Amanda/Config.pod @@ -1,9 +1,10 @@ /* * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Config.swg b/perl/Amanda/Config.swg index f3481a8..16e08f9 100644 --- a/perl/Amanda/Config.swg +++ b/perl/Amanda/Config.swg @@ -1,9 +1,10 @@ /* * Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -146,7 +147,9 @@ APPLY(CNF_RECOVERY_LIMIT) \ APPLY(CNF_INTERACTIVITY) \ APPLY(CNF_TAPERSCAN) \ APPLY(CNF_EJECT_VOLUME) \ -APPLY(CNF_TMPDIR) +APPLY(CNF_TMPDIR) \ +APPLY(CNF_REPORT_USE_MEDIA) \ +APPLY(CNF_REPORT_NEXT_MEDIA) amglue_add_enum_tag_fns(confparm_key); amglue_add_constants(FOR_ALL_CONFPARM_KEY, confparm_key); diff --git a/perl/Amanda/Constants.pm.in b/perl/Amanda/Constants.pm.in index 0b8294a..113f10d 100644 --- a/perl/Amanda/Constants.pm.in +++ b/perl/Amanda/Constants.pm.in @@ -1,9 +1,10 @@ # vim:ft=perl # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Curinfo.pm b/perl/Amanda/Curinfo.pm index 062c3a3..f05e347 100644 --- a/perl/Amanda/Curinfo.pm +++ b/perl/Amanda/Curinfo.pm @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Curinfo/Info.pm b/perl/Amanda/Curinfo/Info.pm index 1cd8e78..4d1fdeb 100644 --- a/perl/Amanda/Curinfo/Info.pm +++ b/perl/Amanda/Curinfo/Info.pm @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/DB/Catalog.pm b/perl/Amanda/DB/Catalog.pm index dc849da..1d50025 100644 --- a/perl/Amanda/DB/Catalog.pm +++ b/perl/Amanda/DB/Catalog.pm @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Debug.pod b/perl/Amanda/Debug.pod index f6e432c..c48bd62 100644 --- a/perl/Amanda/Debug.pod +++ b/perl/Amanda/Debug.pod @@ -1,9 +1,10 @@ /* * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Debug.swg b/perl/Amanda/Debug.swg index 852965d..f3402c0 100644 --- a/perl/Amanda/Debug.swg +++ b/perl/Amanda/Debug.swg @@ -1,9 +1,10 @@ /* * Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Device.c b/perl/Amanda/Device.c index 395ffeb..b8efee6 100644 --- a/perl/Amanda/Device.c +++ b/perl/Amanda/Device.c @@ -1508,25 +1508,22 @@ SWIG_Perl_SetModule(swig_module_info *module) { #define SWIGTYPE_p_Device swig_types[0] #define SWIGTYPE_p_DevicePropertyBase swig_types[1] -#define SWIGTYPE_p_DirectTCPAddr swig_types[2] -#define SWIGTYPE_p_DirectTCPConnection swig_types[3] -#define SWIGTYPE_p_GCond swig_types[4] -#define SWIGTYPE_p_GMutex swig_types[5] -#define SWIGTYPE_p_GSList swig_types[6] -#define SWIGTYPE_p_GValue swig_types[7] -#define SWIGTYPE_p_a_STRMAX__char swig_types[8] -#define SWIGTYPE_p_char swig_types[9] -#define SWIGTYPE_p_double swig_types[10] -#define SWIGTYPE_p_dumpfile_t swig_types[11] -#define SWIGTYPE_p_float swig_types[12] -#define SWIGTYPE_p_guint swig_types[13] -#define SWIGTYPE_p_guint32 swig_types[14] -#define SWIGTYPE_p_guint64 swig_types[15] -#define SWIGTYPE_p_int swig_types[16] -#define SWIGTYPE_p_p_DirectTCPAddr swig_types[17] -#define SWIGTYPE_p_unsigned_char swig_types[18] -static swig_type_info *swig_types[20]; -static swig_module_info swig_module = {swig_types, 19, 0, 0, 0, 0}; +#define SWIGTYPE_p_DirectTCPConnection swig_types[2] +#define SWIGTYPE_p_GSList swig_types[3] +#define SWIGTYPE_p_GValue swig_types[4] +#define SWIGTYPE_p_a_STRMAX__char swig_types[5] +#define SWIGTYPE_p_char swig_types[6] +#define SWIGTYPE_p_double swig_types[7] +#define SWIGTYPE_p_dumpfile_t swig_types[8] +#define SWIGTYPE_p_float swig_types[9] +#define SWIGTYPE_p_guint swig_types[10] +#define SWIGTYPE_p_guint32 swig_types[11] +#define SWIGTYPE_p_guint64 swig_types[12] +#define SWIGTYPE_p_int swig_types[13] +#define SWIGTYPE_p_p_DirectTCPAddr swig_types[14] +#define SWIGTYPE_p_unsigned_char swig_types[15] +static swig_type_info *swig_types[17]; +static swig_module_info swig_module = {swig_types, 16, 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) @@ -2025,64 +2022,9 @@ SWIGINTERN void Device_listen(Device *self,gboolean for_writing,DirectTCPAddr ** if (!device_listen(self, for_writing, addrs)) *addrs = NULL; } -SWIGINTERN DirectTCPConnection *Device_accept(Device *self){ - DirectTCPConnection *conn = NULL; - gboolean rv; - - rv = device_accept(self, &conn, NULL, NULL); - if (!rv && conn) { - /* conn is ref'd for our convenience, but we don't want it */ - g_object_unref(conn); - conn = NULL; - } - return conn; - } -SWIGINTERN DirectTCPConnection *Device_accept_with_cond(Device *self,GMutex *abort_mutex,GCond *abort_cond){ - DirectTCPConnection *conn = NULL; - gboolean rv; - - rv = device_accept_with_cond(self, &conn, abort_mutex, abort_cond); - if (!rv && conn) { - /* conn is ref'd for our convenience, but we don't want it */ - g_object_unref(conn); - conn = NULL; - } - return conn; - } -SWIGINTERN DirectTCPConnection *Device_connect(Device *self,gboolean for_writing,DirectTCPAddr *addrs){ - DirectTCPConnection *conn = NULL; - gboolean rv; - - rv = device_connect(self, for_writing, addrs, &conn, NULL, NULL); - if (!rv && conn) { - /* conn is ref'd for our convenience, but we don't want it */ - g_object_unref(conn); - conn = NULL; - } - return conn; - } -SWIGINTERN DirectTCPConnection *Device_connect_with_cond(Device *self,gboolean for_writing,DirectTCPAddr *addrs,GMutex *abort_mutex,GCond *abort_cond){ - DirectTCPConnection *conn = NULL; - gboolean rv; - - rv = device_connect_with_cond(self, for_writing, addrs, &conn, - abort_mutex, abort_cond); - if (!rv && conn) { - /* conn is ref'd for our convenience, but we don't want it */ - g_object_unref(conn); - conn = NULL; - } - return conn; - } SWIGINTERN gboolean Device_use_connection(Device *self,DirectTCPConnection *conn){ return device_use_connection(self, conn); } -SWIGINTERN gboolean Device_write_from_connection(Device *self,guint64 size,guint64 *actual_size){ - return device_write_from_connection(self, size, actual_size); - } -SWIGINTERN gboolean Device_read_to_connection(Device *self,guint64 size,guint64 *actual_size){ - return device_read_to_connection(self, size, actual_size); - } SWIGINTERN GSList const *Device_property_list(Device *self){ return device_property_get_list(self); } @@ -3241,258 +3183,6 @@ XS(_wrap_Device_listen) { - SWIG_croak_null(); - } -} - - -XS(_wrap_Device_accept) { - { - Device *arg1 = (Device *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int argvi = 0; - DirectTCPConnection *result = 0 ; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: Device_accept(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_accept" "', argument " "1"" of type '" "Device *""'"); - } - arg1 = (Device *)(argp1); - result = (DirectTCPConnection *)Device_accept(arg1); - ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DirectTCPConnection, SWIG_OWNER | SWIG_SHADOW); argvi++ ; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } -} - - -XS(_wrap_Device_accept_with_cond) { - { - Device *arg1 = (Device *) 0 ; - GMutex *arg2 = (GMutex *) 0 ; - GCond *arg3 = (GCond *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - int argvi = 0; - DirectTCPConnection *result = 0 ; - dXSARGS; - - if ((items < 3) || (items > 3)) { - SWIG_croak("Usage: Device_accept_with_cond(self,abort_mutex,abort_cond);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_accept_with_cond" "', argument " "1"" of type '" "Device *""'"); - } - arg1 = (Device *)(argp1); - res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_GMutex, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Device_accept_with_cond" "', argument " "2"" of type '" "GMutex *""'"); - } - arg2 = (GMutex *)(argp2); - res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_GCond, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Device_accept_with_cond" "', argument " "3"" of type '" "GCond *""'"); - } - arg3 = (GCond *)(argp3); - result = (DirectTCPConnection *)Device_accept_with_cond(arg1,arg2,arg3); - ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DirectTCPConnection, SWIG_OWNER | SWIG_SHADOW); argvi++ ; - - - - XSRETURN(argvi); - fail: - - - - SWIG_croak_null(); - } -} - - -XS(_wrap_Device_connect) { - { - Device *arg1 = (Device *) 0 ; - gboolean arg2 ; - DirectTCPAddr *arg3 = (DirectTCPAddr *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int argvi = 0; - DirectTCPConnection *result = 0 ; - dXSARGS; - - if ((items < 3) || (items > 3)) { - SWIG_croak("Usage: Device_connect(self,for_writing,addrs);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_connect" "', argument " "1"" of type '" "Device *""'"); - } - arg1 = (Device *)(argp1); - { - arg2 = SvTRUE(ST(1)); - } - { - AV *addrs_av; - int num_addrs, i; - - if (!SvROK(ST(2)) || SvTYPE(SvRV(ST(2))) != SVt_PVAV) { - SWIG_exception_fail(SWIG_TypeError, "must provide an arrayref of DirectTCPAddrs"); - } - addrs_av = (AV *)SvRV(ST(2)); - num_addrs = av_len(addrs_av)+1; - - arg3 = g_new0(DirectTCPAddr, num_addrs+1); - - for (i = 0; i < num_addrs; i++) { - SV **svp = av_fetch(addrs_av, i, 0); - AV *addr_av; - sockaddr_union addr; - IV port; - - if (!svp || !SvROK(*svp) || SvTYPE(SvRV(*svp)) != SVt_PVAV - || av_len((AV *)SvRV(*svp))+1 != 2) { - SWIG_exception_fail(SWIG_TypeError, "each DirectTCPAddr must be a 2-element arrayref"); - } - - addr_av = (AV *)SvRV(*svp); - - /* get address */ - svp = av_fetch(addr_av, 0, 0); - if (!svp || !SvPOK(*svp) || !str_to_sockaddr(SvPV_nolen(*svp), &addr)) { - SWIG_exception_fail(SWIG_TypeError, "invalid IPv4 addr in address"); - } - - /* get port */ - svp = av_fetch(addr_av, 1, 0); - if (!svp || !SvIOK(*svp) || (port = SvIV(*svp)) <= 0 || port >= 65536) { - SWIG_exception_fail(SWIG_TypeError, "invalid port in address"); - } - SU_SET_PORT(&addr, port); - - copy_sockaddr(arg3, &addr); - } - } - result = (DirectTCPConnection *)Device_connect(arg1,arg2,arg3); - ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DirectTCPConnection, SWIG_OWNER | SWIG_SHADOW); argvi++ ; - - - - XSRETURN(argvi); - fail: - - - - SWIG_croak_null(); - } -} - - -XS(_wrap_Device_connect_with_cond) { - { - Device *arg1 = (Device *) 0 ; - gboolean arg2 ; - DirectTCPAddr *arg3 = (DirectTCPAddr *) 0 ; - GMutex *arg4 = (GMutex *) 0 ; - GCond *arg5 = (GCond *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - void *argp5 = 0 ; - int res5 = 0 ; - int argvi = 0; - DirectTCPConnection *result = 0 ; - dXSARGS; - - if ((items < 5) || (items > 5)) { - SWIG_croak("Usage: Device_connect_with_cond(self,for_writing,addrs,abort_mutex,abort_cond);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_connect_with_cond" "', argument " "1"" of type '" "Device *""'"); - } - arg1 = (Device *)(argp1); - { - arg2 = SvTRUE(ST(1)); - } - { - AV *addrs_av; - int num_addrs, i; - - if (!SvROK(ST(2)) || SvTYPE(SvRV(ST(2))) != SVt_PVAV) { - SWIG_exception_fail(SWIG_TypeError, "must provide an arrayref of DirectTCPAddrs"); - } - addrs_av = (AV *)SvRV(ST(2)); - num_addrs = av_len(addrs_av)+1; - - arg3 = g_new0(DirectTCPAddr, num_addrs+1); - - for (i = 0; i < num_addrs; i++) { - SV **svp = av_fetch(addrs_av, i, 0); - AV *addr_av; - sockaddr_union addr; - IV port; - - if (!svp || !SvROK(*svp) || SvTYPE(SvRV(*svp)) != SVt_PVAV - || av_len((AV *)SvRV(*svp))+1 != 2) { - SWIG_exception_fail(SWIG_TypeError, "each DirectTCPAddr must be a 2-element arrayref"); - } - - addr_av = (AV *)SvRV(*svp); - - /* get address */ - svp = av_fetch(addr_av, 0, 0); - if (!svp || !SvPOK(*svp) || !str_to_sockaddr(SvPV_nolen(*svp), &addr)) { - SWIG_exception_fail(SWIG_TypeError, "invalid IPv4 addr in address"); - } - - /* get port */ - svp = av_fetch(addr_av, 1, 0); - if (!svp || !SvIOK(*svp) || (port = SvIV(*svp)) <= 0 || port >= 65536) { - SWIG_exception_fail(SWIG_TypeError, "invalid port in address"); - } - SU_SET_PORT(&addr, port); - - copy_sockaddr(arg3, &addr); - } - } - res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_GMutex, 0 | 0 ); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Device_connect_with_cond" "', argument " "4"" of type '" "GMutex *""'"); - } - arg4 = (GMutex *)(argp4); - res5 = SWIG_ConvertPtr(ST(4), &argp5,SWIGTYPE_p_GCond, 0 | 0 ); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Device_connect_with_cond" "', argument " "5"" of type '" "GCond *""'"); - } - arg5 = (GCond *)(argp5); - result = (DirectTCPConnection *)Device_connect_with_cond(arg1,arg2,arg3,arg4,arg5); - ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DirectTCPConnection, SWIG_OWNER | SWIG_SHADOW); argvi++ ; - - - - - - XSRETURN(argvi); - fail: - - - - - SWIG_croak_null(); } } @@ -3542,108 +3232,6 @@ XS(_wrap_Device_use_connection) { } -XS(_wrap_Device_write_from_connection) { - { - Device *arg1 = (Device *) 0 ; - guint64 arg2 ; - guint64 *arg3 = (guint64 *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - guint64 sz3 ; - int argvi = 0; - gboolean result; - dXSARGS; - - { - sz3 = 0; - arg3 = &sz3; - } - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: Device_write_from_connection(self,size);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_write_from_connection" "', argument " "1"" of type '" "Device *""'"); - } - arg1 = (Device *)(argp1); - { - arg2 = amglue_SvU64(ST(1)); - } - result = (gboolean)Device_write_from_connection(arg1,arg2,arg3); - { - if (result) - ST(argvi) = &PL_sv_yes; - else - ST(argvi) = &PL_sv_no; - argvi++; - } - { - SP += argvi; PUTBACK; - ST(argvi) = sv_2mortal(amglue_newSVu64(*arg3)); - SPAGAIN; SP -= argvi; argvi++; - } - - - XSRETURN(argvi); - fail: - - - SWIG_croak_null(); - } -} - - -XS(_wrap_Device_read_to_connection) { - { - Device *arg1 = (Device *) 0 ; - guint64 arg2 ; - guint64 *arg3 = (guint64 *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - guint64 sz3 ; - int argvi = 0; - gboolean result; - dXSARGS; - - { - sz3 = 0; - arg3 = &sz3; - } - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: Device_read_to_connection(self,size);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_read_to_connection" "', argument " "1"" of type '" "Device *""'"); - } - arg1 = (Device *)(argp1); - { - arg2 = amglue_SvU64(ST(1)); - } - result = (gboolean)Device_read_to_connection(arg1,arg2,arg3); - { - if (result) - ST(argvi) = &PL_sv_yes; - else - ST(argvi) = &PL_sv_no; - argvi++; - } - { - SP += argvi; PUTBACK; - ST(argvi) = sv_2mortal(amglue_newSVu64(*arg3)); - SPAGAIN; SP -= argvi; argvi++; - } - - - XSRETURN(argvi); - fail: - - - SWIG_croak_null(); - } -} - - XS(_wrap_Device_property_list) { { Device *arg1 = (Device *) 0 ; @@ -4656,10 +4244,7 @@ XS(_wrap_IS_WRITABLE_ACCESS_MODE) { static swig_type_info _swigt__p_Device = {"_p_Device", "struct Device *|Device *", 0, 0, (void*)"Amanda::Device::Device", 0}; static swig_type_info _swigt__p_DevicePropertyBase = {"_p_DevicePropertyBase", "DevicePropertyBase *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_DirectTCPAddr = {"_p_DirectTCPAddr", "DirectTCPAddr *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_DirectTCPConnection = {"_p_DirectTCPConnection", "struct DirectTCPConnection *|DirectTCPConnection *", 0, 0, (void*)"Amanda::Device::DirectTCPConnection", 0}; -static swig_type_info _swigt__p_GCond = {"_p_GCond", "GCond *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_GMutex = {"_p_GMutex", "GMutex *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_GSList = {"_p_GSList", "GSList *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_GValue = {"_p_GValue", "GValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_a_STRMAX__char = {"_p_a_STRMAX__char", "char (*)[STRMAX]|string_t *", 0, 0, (void*)0, 0}; @@ -4677,10 +4262,7 @@ static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "guchar *|u static swig_type_info *swig_type_initial[] = { &_swigt__p_Device, &_swigt__p_DevicePropertyBase, - &_swigt__p_DirectTCPAddr, &_swigt__p_DirectTCPConnection, - &_swigt__p_GCond, - &_swigt__p_GMutex, &_swigt__p_GSList, &_swigt__p_GValue, &_swigt__p_a_STRMAX__char, @@ -4698,10 +4280,7 @@ static swig_type_info *swig_type_initial[] = { static swig_cast_info _swigc__p_Device[] = { {&_swigt__p_Device, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_DevicePropertyBase[] = { {&_swigt__p_DevicePropertyBase, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_DirectTCPAddr[] = { {&_swigt__p_DirectTCPAddr, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_DirectTCPConnection[] = { {&_swigt__p_DirectTCPConnection, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_GCond[] = { {&_swigt__p_GCond, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_GMutex[] = { {&_swigt__p_GMutex, 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_GValue[] = { {&_swigt__p_GValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_a_STRMAX__char[] = { {&_swigt__p_a_STRMAX__char, 0, 0, 0},{0, 0, 0, 0}}; @@ -4719,10 +4298,7 @@ static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, static swig_cast_info *swig_cast_initial[] = { _swigc__p_Device, _swigc__p_DevicePropertyBase, - _swigc__p_DirectTCPAddr, _swigc__p_DirectTCPConnection, - _swigc__p_GCond, - _swigc__p_GMutex, _swigc__p_GSList, _swigc__p_GValue, _swigc__p_a_STRMAX__char, @@ -4776,13 +4352,7 @@ static swig_command_info swig_commands[] = { {"Amanda::Devicec::Device_eject", _wrap_Device_eject}, {"Amanda::Devicec::Device_directtcp_supported", _wrap_Device_directtcp_supported}, {"Amanda::Devicec::Device_listen", _wrap_Device_listen}, -{"Amanda::Devicec::Device_accept", _wrap_Device_accept}, -{"Amanda::Devicec::Device_accept_with_cond", _wrap_Device_accept_with_cond}, -{"Amanda::Devicec::Device_connect", _wrap_Device_connect}, -{"Amanda::Devicec::Device_connect_with_cond", _wrap_Device_connect_with_cond}, {"Amanda::Devicec::Device_use_connection", _wrap_Device_use_connection}, -{"Amanda::Devicec::Device_write_from_connection", _wrap_Device_write_from_connection}, -{"Amanda::Devicec::Device_read_to_connection", _wrap_Device_read_to_connection}, {"Amanda::Devicec::Device_property_list", _wrap_Device_property_list}, {"Amanda::Devicec::Device_property_get", _wrap_Device_property_get}, {"Amanda::Devicec::Device_property_set", _wrap_Device_property_set}, diff --git a/perl/Amanda/Device.pm b/perl/Amanda/Device.pm index e6b49c8..129d5c0 100644 --- a/perl/Amanda/Device.pm +++ b/perl/Amanda/Device.pm @@ -137,13 +137,7 @@ sub DESTROY { *eject = *Amanda::Devicec::Device_eject; *directtcp_supported = *Amanda::Devicec::Device_directtcp_supported; *listen = *Amanda::Devicec::Device_listen; -*accept = *Amanda::Devicec::Device_accept; -*accept_with_cond = *Amanda::Devicec::Device_accept_with_cond; -*connect = *Amanda::Devicec::Device_connect; -*connect_with_cond = *Amanda::Devicec::Device_connect_with_cond; *use_connection = *Amanda::Devicec::Device_use_connection; -*write_from_connection = *Amanda::Devicec::Device_write_from_connection; -*read_to_connection = *Amanda::Devicec::Device_read_to_connection; *property_list = *Amanda::Devicec::Device_property_list; *property_get = *Amanda::Devicec::Device_property_get; *property_set = *Amanda::Devicec::Device_property_set; diff --git a/perl/Amanda/Device.pod b/perl/Amanda/Device.pod index 3c8be7e..c4c4993 100644 --- a/perl/Amanda/Device.pod +++ b/perl/Amanda/Device.pod @@ -1,9 +1,10 @@ /* * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Device.swg b/perl/Amanda/Device.swg index ea46300..6feadf3 100644 --- a/perl/Amanda/Device.swg +++ b/perl/Amanda/Device.swg @@ -1,9 +1,10 @@ /* * Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -346,92 +347,11 @@ typedef struct Device { *addrs = NULL; } - %newobject accept; /* connection is already ref'd, so we own it */ - DirectTCPConnection * - accept() { - DirectTCPConnection *conn = NULL; - gboolean rv; - - rv = device_accept(self, &conn, NULL, NULL); - if (!rv && conn) { - /* conn is ref'd for our convenience, but we don't want it */ - g_object_unref(conn); - conn = NULL; - } - return conn; - } - - %newobject accept_with_cond; /* connection is already ref'd, so we own it */ - DirectTCPConnection * - accept_with_cond(GMutex *abort_mutex, GCond *abort_cond) { - DirectTCPConnection *conn = NULL; - gboolean rv; - - rv = device_accept_with_cond(self, &conn, abort_mutex, abort_cond); - if (!rv && conn) { - /* conn is ref'd for our convenience, but we don't want it */ - g_object_unref(conn); - conn = NULL; - } - return conn; - } - - %newobject connect; /* connection is already ref'd, so we own it */ - DirectTCPConnection * - connect(gboolean for_writing, DirectTCPAddr *addrs) { - DirectTCPConnection *conn = NULL; - gboolean rv; - - rv = device_connect(self, for_writing, addrs, &conn, NULL, NULL); - if (!rv && conn) { - /* conn is ref'd for our convenience, but we don't want it */ - g_object_unref(conn); - conn = NULL; - } - return conn; - } - - %newobject connect_with_cond; /* connection is already ref'd, so we own it */ - DirectTCPConnection * - connect_with_cond(gboolean for_writing, DirectTCPAddr *addrs, - GMutex *abort_mutex, GCond *abort_cond) { - DirectTCPConnection *conn = NULL; - gboolean rv; - - rv = device_connect_with_cond(self, for_writing, addrs, &conn, - abort_mutex, abort_cond); - if (!rv && conn) { - /* conn is ref'd for our convenience, but we don't want it */ - g_object_unref(conn); - conn = NULL; - } - return conn; - } - gboolean use_connection(DirectTCPConnection *conn) { return device_use_connection(self, conn); } - %typemap(in,numinputs=0) guint64 *actual_size (guint64 sz) { - sz = 0; - $1 = &sz; - } - %typemap(argout) guint64 *actual_size { - SP += argvi; PUTBACK; - $result = sv_2mortal(amglue_newSVu64(*$1)); - SPAGAIN; SP -= argvi; argvi++; - } - gboolean - write_from_connection(guint64 size, guint64 *actual_size) { - return device_write_from_connection(self, size, actual_size); - } - - gboolean - read_to_connection(guint64 size, guint64 *actual_size) { - return device_read_to_connection(self, size, actual_size); - } - %typemap(out) const GSList * { GSList *iter; diff --git a/perl/Amanda/Disklist.pod b/perl/Amanda/Disklist.pod index f80cc6e..5270c5d 100644 --- a/perl/Amanda/Disklist.pod +++ b/perl/Amanda/Disklist.pod @@ -1,9 +1,10 @@ /* * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Disklist.swg b/perl/Amanda/Disklist.swg index da65ae5..d66a469 100644 --- a/perl/Amanda/Disklist.swg +++ b/perl/Amanda/Disklist.swg @@ -1,9 +1,10 @@ /* * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Extract.pm b/perl/Amanda/Extract.pm new file mode 100644 index 0000000..390f31f --- /dev/null +++ b/perl/Amanda/Extract.pm @@ -0,0 +1,130 @@ +# vim:ft=perl +# Copyright (c) 2008-2012 Zmanda, Inc. 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, 465 S. Mathilda Ave., Suite 300 +# Sunnyvale, CA 94086, USA, or: http://www.zmanda.com + +package Amanda::Extract; + +use strict; +use warnings; +use IPC::Open3; + +use Amanda::Debug qw( :logging ); +use Amanda::Paths; + +=head1 NAME + +Amanda::Extract - perl utilities to run scripts and applications + +=head1 SYNOPSIS + + use Amanda::Extract; + + my (@bsu, @err)= Amanda::Extract::BSU(application => $application, + config => $config, + host => $host, + disk => $disk, + device => $device); + my (@bsu, @err)= Amanda::Extract::Run($application_name, \@g_options, + $hdr, @properties); + +=cut + +sub BSU { + my (%params) = @_; + + my %bsu; + my @err; + my @command; + + push @command, $Amanda::Paths::APPLICATION_DIR . '/' . $params{'application'}; + push @command, "support"; + push @command, "--config", $params{'config'} if $params{'config'}; + push @command, "--host" , $params{'host'} if $params{'host'}; + push @command, "--disk" , $params{'disk'} if $params{'disk'}; + push @command, "--device", $params{'device'} if $params{'device'}; + debug("Running: " . join(' ', @command)); + + my $in; + my $out; + my $err = Symbol::gensym; + my $pid = open3($in, $out, $err, @command); + + close($in); + while (my $line = <$out>) { + chomp $line; + debug("support: $line"); + my ($name, $value) = split ' ', $line; + + $name = lc($name); + + if ($name eq 'config' || + $name eq 'host' || + $name eq 'disk' || + $name eq 'index-line' || + $name eq 'index-xml' || + $name eq 'message-line' || + $name eq 'message-xml' || + $name eq 'record' || + $name eq 'include-file' || + $name eq 'include-list' || + $name eq 'include-list-glob' || + $name eq 'include-optional' || + $name eq 'exclude-file' || + $name eq 'exclude-list' || + $name eq 'exclude-list-glob' || + $name eq 'exclude-optional' || + $name eq 'collection' || + $name eq 'caclsize' || + $name eq 'client-estimate' || + $name eq 'multi-estimate' || + $name eq 'amfeatures') { + $bsu{$name} = ($value eq "YES"); + } elsif ($name eq 'max-level') { + $bsu{$name} = $value; + } elsif ($name eq 'recover-mode') { + $bsu{'smb-recover-mode'} = $value eq 'SMB'; + } elsif ($name eq 'recover-path') { + $bsu{'recover-path-cwd'} = $value eq 'CWD'; + $bsu{'recover-path-remote'} = $value eq 'REMOTE'; + } elsif ($name eq 'data-path') { + if ($value eq 'AMANDA') { + $bsu{'data-path-amanda'} = 1; + } elsif ($value eq 'DIRECTTCP') { + $bsu{'data-path-directtcp'} = 1; + } + } + } + close($out); + + while (my $line = <$err>) { + chomp($line); + next if $line == ''; + push @err, $line; + } + close($err); + + waitpid($pid, 0); + my $child_exit_status = $? >> 8; + + if ($child_exit_status != 0) { + push @err, "exited with status $child_exit_status"; + } + return (\%bsu, \@err); +} + +1; diff --git a/perl/Amanda/Feature.pod b/perl/Amanda/Feature.pod index c22e2a9..038d985 100644 --- a/perl/Amanda/Feature.pod +++ b/perl/Amanda/Feature.pod @@ -1,9 +1,10 @@ /* * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Feature.swg b/perl/Amanda/Feature.swg index e21c1e0..5a6303c 100644 --- a/perl/Amanda/Feature.swg +++ b/perl/Amanda/Feature.swg @@ -1,9 +1,10 @@ /* * Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Header.pod b/perl/Amanda/Header.pod index 8d4569f..5260b7d 100644 --- a/perl/Amanda/Header.pod +++ b/perl/Amanda/Header.pod @@ -1,9 +1,10 @@ /* * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Header.swg b/perl/Amanda/Header.swg index f249d86..81087dc 100644 --- a/perl/Amanda/Header.swg +++ b/perl/Amanda/Header.swg @@ -1,9 +1,10 @@ /* * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Holding.pm b/perl/Amanda/Holding.pm index d29345d..be4e461 100644 --- a/perl/Amanda/Holding.pm +++ b/perl/Amanda/Holding.pm @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/IPC/Binary.pod b/perl/Amanda/IPC/Binary.pod index 945cffe..663df35 100644 --- a/perl/Amanda/IPC/Binary.pod +++ b/perl/Amanda/IPC/Binary.pod @@ -1,9 +1,10 @@ /* * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/IPC/Binary.swg b/perl/Amanda/IPC/Binary.swg index 49459c0..db13811 100644 --- a/perl/Amanda/IPC/Binary.swg +++ b/perl/Amanda/IPC/Binary.swg @@ -1,9 +1,10 @@ /* * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/IPC/LineProtocol.pm b/perl/Amanda/IPC/LineProtocol.pm index 358501e..ae8345b 100644 --- a/perl/Amanda/IPC/LineProtocol.pm +++ b/perl/Amanda/IPC/LineProtocol.pm @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Interactivity.pm b/perl/Amanda/Interactivity.pm index 23a2341..1aab337 100644 --- a/perl/Amanda/Interactivity.pm +++ b/perl/Amanda/Interactivity.pm @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Interactivity/email.pm b/perl/Amanda/Interactivity/email.pm index f7b70aa..4da094d 100644 --- a/perl/Amanda/Interactivity/email.pm +++ b/perl/Amanda/Interactivity/email.pm @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Interactivity/stdin.pm b/perl/Amanda/Interactivity/stdin.pm index 33a273f..532a58c 100644 --- a/perl/Amanda/Interactivity/stdin.pm +++ b/perl/Amanda/Interactivity/stdin.pm @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Interactivity/tty.pm b/perl/Amanda/Interactivity/tty.pm index 2ba81a7..6fa3b85 100644 --- a/perl/Amanda/Interactivity/tty.pm +++ b/perl/Amanda/Interactivity/tty.pm @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Interactivity/tty_email.pm b/perl/Amanda/Interactivity/tty_email.pm index 21e2ecc..53f09f1 100644 --- a/perl/Amanda/Interactivity/tty_email.pm +++ b/perl/Amanda/Interactivity/tty_email.pm @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Logfile.pod b/perl/Amanda/Logfile.pod index 450d5a4..01f6fe5 100644 --- a/perl/Amanda/Logfile.pod +++ b/perl/Amanda/Logfile.pod @@ -1,9 +1,10 @@ /* * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Logfile.swg b/perl/Amanda/Logfile.swg index 8d62870..a461adb 100644 --- a/perl/Amanda/Logfile.swg +++ b/perl/Amanda/Logfile.swg @@ -1,9 +1,10 @@ /* * Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/MainLoop.pod b/perl/Amanda/MainLoop.pod index 3504f2b..cae73ff 100644 --- a/perl/Amanda/MainLoop.pod +++ b/perl/Amanda/MainLoop.pod @@ -1,9 +1,10 @@ /* * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/MainLoop.swg b/perl/Amanda/MainLoop.swg index 457ff09..4b598d9 100644 --- a/perl/Amanda/MainLoop.swg +++ b/perl/Amanda/MainLoop.swg @@ -1,9 +1,10 @@ /* * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/NDMP.pod b/perl/Amanda/NDMP.pod index 0efed0f..6f6964b 100644 --- a/perl/Amanda/NDMP.pod +++ b/perl/Amanda/NDMP.pod @@ -1,9 +1,10 @@ /* * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/NDMP.swg b/perl/Amanda/NDMP.swg index da63d4e..3fc1485 100644 --- a/perl/Amanda/NDMP.swg +++ b/perl/Amanda/NDMP.swg @@ -1,9 +1,10 @@ /* * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Paths.pm.in b/perl/Amanda/Paths.pm.in index a3e0248..a6ffb63 100644 --- a/perl/Amanda/Paths.pm.in +++ b/perl/Amanda/Paths.pm.in @@ -1,9 +1,10 @@ # vim:ft=perl # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Process.pm b/perl/Amanda/Process.pm index 01c6a7b..93f07b5 100644 --- a/perl/Amanda/Process.pm +++ b/perl/Amanda/Process.pm @@ -1,8 +1,9 @@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Recovery/Clerk.pm b/perl/Amanda/Recovery/Clerk.pm index 39b3c20..c40d40f 100644 --- a/perl/Amanda/Recovery/Clerk.pm +++ b/perl/Amanda/Recovery/Clerk.pm @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +#* License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -303,7 +304,7 @@ sub quit { my $finished_cb = $params{'finished_cb'}; confess "Cannot quit a Clerk while a transfer is in progress" - if $self->{'xfer_state'}; + if $self->{'xfer_state'} and $self->{'xfer_state'}->{'xfer'}; my $steps = define_steps cb_ref => \$finished_cb, diff --git a/perl/Amanda/Recovery/Planner.pm b/perl/Amanda/Recovery/Planner.pm index 22809be..b8c8b98 100644 --- a/perl/Amanda/Recovery/Planner.pm +++ b/perl/Amanda/Recovery/Planner.pm @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +#* License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Recovery/Scan.pm b/perl/Amanda/Recovery/Scan.pm index 96ec8cf..a568281 100644 --- a/perl/Amanda/Recovery/Scan.pm +++ b/perl/Amanda/Recovery/Scan.pm @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Report.pm b/perl/Amanda/Report.pm index 8c51461..8490c94 100644 --- a/perl/Amanda/Report.pm +++ b/perl/Amanda/Report.pm @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Report/human.pm b/perl/Amanda/Report/human.pm index 1726fa1..a88cb29 100644 --- a/perl/Amanda/Report/human.pm +++ b/perl/Amanda/Report/human.pm @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -397,7 +398,7 @@ sub output_tapeinfo my %incr_stats = %{ $self->{incr_stats} }; my %total_stats = %{ $self->{total_stats} }; - if (@$tape_labels > 0) { + if (getconf($CNF_REPORT_USE_MEDIA) and @$tape_labels > 0) { # slightly different sentence depending on the run type my $tapelist_str; @@ -458,47 +459,49 @@ sub output_tapeinfo } } - my $nb_new_tape = 0; - my $run_tapes = getconf($CNF_RUNTAPES); + if (getconf($CNF_REPORT_NEXT_MEDIA)) { + my $nb_new_tape = 0; + my $run_tapes = getconf($CNF_RUNTAPES); - if ($run_tapes) { - ($run_tapes > 1) + if ($run_tapes) { + ($run_tapes > 1) ? print $fh "The next $run_tapes tapes Amanda expects to use are: " : print $fh "The next tape Amanda expects to use is: "; - } + } + + my $first = 1; + foreach my $i ( 0 .. ( $run_tapes - 1 ) ) { - my $first = 1; - foreach my $i ( 0 .. ( $run_tapes - 1 ) ) { + if ( my $tape_label = + Amanda::Tapelist::get_last_reusable_tape_label($i) ) { - if ( my $tape_label = - Amanda::Tapelist::get_last_reusable_tape_label($i) ) { + if ($nb_new_tape) { + print $fh ", " if !$first; + print $fh "$nb_new_tape new tape" + . ( $nb_new_tape > 1 ? "s" : "" ); + $nb_new_tape = 0; + $first = 0; + } - if ($nb_new_tape) { - print $fh ", " if !$first; - print $fh "$nb_new_tape new tape" - . ( $nb_new_tape > 1 ? "s" : "" ); - $nb_new_tape = 0; + print $fh + $first ? "" : ", ", + $tape_label; $first = 0; - } + } else { + $nb_new_tape++; + } + } - print $fh - $first ? "" : ", ", - $tape_label; - $first = 0; - } else { - $nb_new_tape++; - } - } + if ($nb_new_tape) { + print $fh ", " if !$first; + print $fh "$nb_new_tape new tape" + . ( $nb_new_tape > 1 ? "s" : "" ); + } + print $fh ".\n"; - if ($nb_new_tape) { - print $fh ", " if !$first; - print $fh "$nb_new_tape new tape" - . ( $nb_new_tape > 1 ? "s" : "" ); + my $new_tapes = Amanda::Tapelist::list_new_tapes(getconf($CNF_RUNTAPES)); + print $fh "$new_tapes\n" if $new_tapes; } - print $fh ".\n"; - - my $new_tapes = Amanda::Tapelist::list_new_tapes(getconf($CNF_RUNTAPES)); - print $fh "$new_tapes\n" if $new_tapes; return; } @@ -1047,6 +1050,7 @@ sub output_summary my $nodump_PARTIAL_format = get_summary_format($col_spec, 'nodump-PARTIAL', @summary_linedata); my $nodump_FAILED_format = get_summary_format($col_spec, 'nodump-FAILED', @summary_linedata); my $nodump_FLUSH_format = get_summary_format($col_spec, 'nodump-FLUSH', @summary_linedata); + my $nodump_NOT_FLUSHED_format = get_summary_format($col_spec, 'nodump-NOT FLUSHED', @summary_linedata); my $skipped_format = get_summary_format($col_spec, 'skipped', @summary_linedata); ## print the header names @@ -1106,6 +1110,10 @@ sub output_summary print $fh sprintf($nodump_FAILED_format, @data); } elsif ($type eq 'nodump-FLUSH') { print $fh sprintf($nodump_FLUSH_format, @data); + } elsif ($type eq 'nodump-NOT FLUSHED') { +debug("nodump_NOT_FLUSHED_format; $nodump_NOT_FLUSHED_format"); +debug("data: " . Data::Dumper::Dumper(\@data)); + print $fh sprintf($nodump_NOT_FLUSHED_format, @data); } elsif ($type eq 'missing') { print $fh sprintf($missing_format, @data[0..2]); } elsif ($type eq 'noflush') { @@ -1127,7 +1135,7 @@ sub output_summary ## ('missing', host, disk, '' ..) # MISSING ----- ## ('noflush', host, disk, '' ..) # NO FILE TO FLUSH ------ ## ('nodump-$msg', host, disk, level, '', out, '--', '', -## '', tapetime, taperate, taperpartial) # ... {FLUSH|FAILED|PARTIAL} ... +## '', tapetime, taperate, taperpartial) # ... {FLUSH|NOT FLUSHED|FAILED|PARTIAL} ... ## ('skipped', host, disk, '' ..) # SKIPPED ----- ## ## the taperpartial column is not covered by the columnspec, and "hangs off" @@ -1193,10 +1201,10 @@ sub get_summary_info push @rvs, [@rv]; } elsif (keys %{$alldumps} == 0) { my @rv; - push @rv, $report->get_flag("amflush_run")? 'noflush' : 'missing'; + push @rv, $report->get_flag("amflush_run")? 'nodump-NOT FLUSHED' : 'missing'; push @rv, $hostname; push @rv, $disk_out; - push @rv, ("",) x 8; + push @rv, ("",) x 9; push @rvs, [@rv]; } @@ -1224,6 +1232,7 @@ sub get_summary_info if defined $dumper; my ( $out_size, $dump_time, $dump_rate, $tape_time, $tape_rate ) = (0) x 5; + my $tape_failure_from = ''; my ($dumper_status) = ""; my $saw_dumper = 0; # no dumper will mean this was a flush my $taper_partial = 0; # was the last taper run partial? @@ -1243,6 +1252,7 @@ sub get_summary_info $out_size = $try->{taper}{kb}; $tape_time = $try->{taper}{sec}; $tape_rate = $try->{taper}{kps}; + $tape_failure_from = $try->{taper}{failure_from}; } elsif ( exists $try->{taper} && ( $try->{taper}{status} eq "partial" ) ) { @@ -1251,9 +1261,11 @@ sub get_summary_info $out_size = $try->{taper}{kb}; $tape_time = $try->{taper}{sec} if !$tape_time; $tape_rate = $try->{taper}{kps} if !$tape_rate; + $tape_failure_from = $try->{taper}{failure_from}; } elsif (exists $try->{taper} && ( $try->{taper}{status} eq "fail")) { $tape_time = undef; $tape_rate = undef; + $tape_failure_from = $try->{taper}{failure_from}; } if (!$out_size && @@ -1319,7 +1331,7 @@ sub get_summary_info my @rv; - if ( !$orig_size && !$out_size && (!defined($tape_time) || !$tape_time)) { + if ( !$orig_size && !$out_size && ((!defined($tape_time) || !$tape_time) && !defined($tape_failure_from))) { push @rv, $report->get_flag("amflush_run")? 'noflush' : 'missing'; push @rv, $hostname; push @rv, $disk_out; @@ -1334,20 +1346,27 @@ sub get_summary_info push @rv, $compression; push @rv, $dump_time ? $fmt_col_field->(6, mnsc($dump_time)) : "PARTIAL"; push @rv, $dump_rate ? $fmt_col_field->(7, $dump_rate) : ""; - push @rv, $fmt_col_field->(8, + if (defined $tape_failure_from and $tape_failure_from eq 'config') { + push @rv, $format_space->(8,""); + push @rv, $format_space->(9,""); + } else { + push @rv, $fmt_col_field->(8, (defined $tape_time) ? $tape_time ? mnsc($tape_time) : "" : "FAILED"); - push @rv, (defined $tape_rate) ? - $tape_rate ? - $fmt_col_field->(9, $tape_rate) - : $format_space->(9, "") - : $format_space->(9, "FAILED"); + push @rv, (defined $tape_rate) ? + $tape_rate ? + $fmt_col_field->(9, $tape_rate) + : $format_space->(9, "") + : $format_space->(9, "FAILED"); + } push @rv, $taper_partial? " PARTIAL" : ""; # column 10 } else { my $message = $saw_dumper? ($dumper_status eq 'failed') ? 'FAILED' : 'PARTIAL' - : 'FLUSH'; + : (defined $tape_failure_from and + $tape_failure_from eq 'config') ? 'NOT FLUSHED' + : 'FLUSH'; push @rv, "nodump-$message"; push @rv, $hostname; push @rv, $disk_out; @@ -1357,15 +1376,21 @@ sub get_summary_info push @rv, $compression; push @rv, ''; push @rv, ''; - push @rv, $fmt_col_field->(8, - (defined $tape_time) ? - $tape_time ? mnsc($tape_time) : "" - : "FAILED"); - push @rv, (defined $tape_rate) ? - $tape_rate ? - $fmt_col_field->(9, $tape_rate) - : $format_space->(9, "") - : $format_space->(9, "FAILED"); + if (defined $tape_failure_from and $tape_failure_from eq 'config') { + push @rv, $format_space->(8,""); + push @rv, $format_space->(9,""); + next if !$report->get_flag("amflush_run"); # do not print a line for flush with config error + } else { + push @rv, $fmt_col_field->(8, + (defined $tape_time) ? + $tape_time ? mnsc($tape_time) : "" + : "FAILED"); + push @rv, (defined $tape_rate) ? + $tape_rate ? + $fmt_col_field->(9, $tape_rate) + : $format_space->(9, "") + : $format_space->(9, "FAILED"); + } push @rv, $taper_partial? " PARTIAL" : ""; } push @rvs, [@rv]; diff --git a/perl/Amanda/Report/postscript.pm b/perl/Amanda/Report/postscript.pm index f7c1555..c897cd8 100644 --- a/perl/Amanda/Report/postscript.pm +++ b/perl/Amanda/Report/postscript.pm @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Report/xml.pm b/perl/Amanda/Report/xml.pm index 51b1eac..012d650 100644 --- a/perl/Amanda/Report/xml.pm +++ b/perl/Amanda/Report/xml.pm @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/ScanInventory.pm b/perl/Amanda/ScanInventory.pm index f5d4d7b..235d2fb 100644 --- a/perl/Amanda/ScanInventory.pm +++ b/perl/Amanda/ScanInventory.pm @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -575,6 +576,7 @@ sub volume_is_labelable { if (!$autolabel->{'other_config'}) { $self->_user_msg(slot_result => 1, label => $label, + labelstr => $self->{'labelstr'}, does_not_match_labelstr => 1, slot => $slot); return 0; diff --git a/perl/Amanda/Script.pm b/perl/Amanda/Script.pm index addd6f0..9d88393 100644 --- a/perl/Amanda/Script.pm +++ b/perl/Amanda/Script.pm @@ -1,9 +1,10 @@ # vim:ft=perl # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Script_App.pm b/perl/Amanda/Script_App.pm index f0ce349..63b7f3c 100644 --- a/perl/Amanda/Script_App.pm +++ b/perl/Amanda/Script_App.pm @@ -1,9 +1,10 @@ # vim:ft=perl # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Tapelist.pm b/perl/Amanda/Tapelist.pm index 2680311..6bc5fbd 100644 --- a/perl/Amanda/Tapelist.pm +++ b/perl/Amanda/Tapelist.pm @@ -413,12 +413,14 @@ sub _read_tapelist { open(my $fh, "<", $self->{'filename'}) or return $self; while (my $line = <$fh>) { my ($datestamp, $label, $reuse, $barcode, $meta, $blocksize, $comment) - = $line =~ m/^([0-9]*)\s([^\s]*)\s(reuse|no-reuse)\s*(?:BARCODE:([^\s]*))?\s*(?:META:([^\s]*))?\s*(?:BLOCKSIZE:([^\s]*))?\s*(?:\#(.*))?$/mx; - next if !defined $datestamp; # silently filter out bogus lines + = $line =~ m/^([0-9]+)\s*([^\s]*)\s*(?:(reuse|no-reuse))?\s*(?:BARCODE:([^\s]*))?\s*(?:META:([^\s]*))?\s*(?:BLOCKSIZE:([^\s]*))?\s*(?:\#(.*))?$/mx; + if (!defined $datestamp) { + Amanda::Debug::critical("Bogus line in the tapelist ($self->{'filename'}) file: $line"); + } push @tles, { 'datestamp' => $datestamp, 'label' => $label, - 'reuse' => ($reuse eq 'reuse'), + 'reuse' => (!defined $reuse || $reuse eq 'reuse'), 'barcode' => $barcode, 'meta' => $meta, 'blocksize' => $blocksize, diff --git a/perl/Amanda/Tapelist.pod b/perl/Amanda/Tapelist.pod index b696808..4cd0824 100644 --- a/perl/Amanda/Tapelist.pod +++ b/perl/Amanda/Tapelist.pod @@ -1,9 +1,10 @@ /* * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Tapelist.swg b/perl/Amanda/Tapelist.swg index 0ce1987..dff9b86 100644 --- a/perl/Amanda/Tapelist.swg +++ b/perl/Amanda/Tapelist.swg @@ -1,9 +1,10 @@ /* * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -228,12 +229,14 @@ sub _read_tapelist { open(my $fh, "<", $self->{'filename'}) or return $self; while (my $line = <$fh>) { my ($datestamp, $label, $reuse, $barcode, $meta, $blocksize, $comment) - = $line =~ m/^([0-9]*)\s([^\s]*)\s(reuse|no-reuse)\s*(?:BARCODE:([^\s]*))?\s*(?:META:([^\s]*))?\s*(?:BLOCKSIZE:([^\s]*))?\s*(?:\#(.*))?$/mx; - next if !defined $datestamp; # silently filter out bogus lines + = $line =~ m/^([0-9]+)\s*([^\s]*)\s*(?:(reuse|no-reuse))?\s*(?:BARCODE:([^\s]*))?\s*(?:META:([^\s]*))?\s*(?:BLOCKSIZE:([^\s]*))?\s*(?:\#(.*))?$/mx; + if (!defined $datestamp) { + Amanda::Debug::critical("Bogus line in the tapelist ($self->{'filename'}) file: $line"); + } push @tles, { 'datestamp' => $datestamp, 'label' => $label, - 'reuse' => ($reuse eq 'reuse'), + 'reuse' => (!defined $reuse || $reuse eq 'reuse'), 'barcode' => $barcode, 'meta' => $meta, 'blocksize' => $blocksize, diff --git a/perl/Amanda/Taper/Controller.pm b/perl/Amanda/Taper/Controller.pm index a1a6c09..1518f35 100644 --- a/perl/Amanda/Taper/Controller.pm +++ b/perl/Amanda/Taper/Controller.pm @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 Zmanda Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -114,7 +115,7 @@ sub start { tx_fh => *STDOUT, message_cb => $message_cb, message_obj => $self, - debug => $Amanda::Config::debug_taper?'driver/taper':'', + debug => $Amanda::Config::debug_taper?'taper/driver':'', ); my $changer = Amanda::Changer->new(undef, tapelist => $self->{'tapelist'}); diff --git a/perl/Amanda/Taper/Protocol.pm b/perl/Amanda/Taper/Protocol.pm index 0475171..ebc3e48 100644 --- a/perl/Amanda/Taper/Protocol.pm +++ b/perl/Amanda/Taper/Protocol.pm @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 Zmanda Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Taper/Scan.pm b/perl/Amanda/Taper/Scan.pm index d8d7a41..7d05c73 100644 --- a/perl/Amanda/Taper/Scan.pm +++ b/perl/Amanda/Taper/Scan.pm @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +#* License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -337,6 +338,7 @@ sub oldest_reusable_volume { for my $tle (@{$self->{'tapelist'}->{'tles'}}) { next unless $tle->{'reuse'}; next if $tle->{'datestamp'} eq '0' and !$params{'new_label_ok'}; + next if $tle->{'label'} !~ $self->{'labelstr'}; $num_acceptable++; $best = $tle; } diff --git a/perl/Amanda/Taper/Scan/lexical.pm b/perl/Amanda/Taper/Scan/lexical.pm index 44c2b0e..dfd2bab 100644 --- a/perl/Amanda/Taper/Scan/lexical.pm +++ b/perl/Amanda/Taper/Scan/lexical.pm @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -149,17 +150,25 @@ sub analyze { push @reusable, $sl; } else { my $vol_tle = $self->{'tapelist'}->lookup_tapelabel($sl->{'label'}); - if ($vol_tle) { + if ($vol_tle && $sl->{'label'} =~ /$self->{'labelstr'}/) { if ($vol_tle->{'datestamp'} eq '0') { push @new_labeled, $sl; } } elsif ($self->volume_is_labelable($sl)) { + $sl->{'label'} = $self->{'chg'}->make_new_tape_label( + barcode => $sl->{'barcode'}, + slot => $sl->{'slot'}, + meta => $sl->{'meta'}); $first_new_volume = $sl if !$first_new_volume; $new_volume = $sl if $current && !$new_volume; push @new_volume, $sl; } } } elsif ($self->volume_is_labelable($sl)) { + $sl->{'label'} = $self->{'chg'}->make_new_tape_label( + barcode => $sl->{'barcode'}, + slot => $sl->{'slot'}, + meta => $sl->{'meta'}); $first_new_volume = $sl if !$first_new_volume; $new_volume = $sl if $current && !$new_volume; push @new_volume, $sl; @@ -203,10 +212,6 @@ sub analyze { } for my $sl (@new_volume) { - $sl->{'label'} = $self->{'chg'}->make_new_tape_label( - barcode => $sl->{'barcode'}, - slot => $sl->{'slot'}, - meta => $sl->{'meta'}); $new_volume = $sl if defined $last_label and $new_volume->{'label'} ne $sl->{'label'} and (($sl->{'label'} gt $last_label and diff --git a/perl/Amanda/Taper/Scan/oldest.pm b/perl/Amanda/Taper/Scan/oldest.pm index c2bcb6d..f27d451 100644 --- a/perl/Amanda/Taper/Scan/oldest.pm +++ b/perl/Amanda/Taper/Scan/oldest.pm @@ -1,8 +1,9 @@ # Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -127,17 +128,25 @@ sub analyze { push @reusable, $sl; } else { my $vol_tle = $self->{'tapelist'}->lookup_tapelabel($sl->{'label'}); - if ($vol_tle) { + if ($vol_tle && $sl->{'label'} =~ /$self->{'labelstr'}/) { if ($vol_tle->{'datestamp'} eq '0') { push @new_labeled, $sl; } } elsif ($self->volume_is_labelable($sl)) { + $sl->{'label'} = $self->{'chg'}->make_new_tape_label( + barcode => $sl->{'barcode'}, + slot => $sl->{'slot'}, + meta => $sl->{'meta'}); $first_new_volume = $sl if !$first_new_volume; $new_volume = $sl if $current && !$new_volume; push @new_volume, $sl; } } } elsif ($self->volume_is_labelable($sl)) { + $sl->{'label'} = $self->{'chg'}->make_new_tape_label( + barcode => $sl->{'barcode'}, + slot => $sl->{'slot'}, + meta => $sl->{'meta'}); $first_new_volume = $sl if !$first_new_volume; $new_volume = $sl if $current && !$new_volume; push @new_volume, $sl; @@ -178,10 +187,6 @@ sub analyze { } for my $sl (@new_volume) { - $sl->{'label'} = $self->{'chg'}->make_new_tape_label( - barcode => $sl->{'barcode'}, - slot => $sl->{'slot'}, - meta => $sl->{'meta'}); $new_volume = $sl if defined $last_label and $new_volume->{'label'} ne $sl->{'label'} and (($sl->{'label'} gt $last_label and diff --git a/perl/Amanda/Taper/Scan/traditional.pm b/perl/Amanda/Taper/Scan/traditional.pm index ec6e96b..32fcf89 100644 --- a/perl/Amanda/Taper/Scan/traditional.pm +++ b/perl/Amanda/Taper/Scan/traditional.pm @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +#* License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -286,9 +287,9 @@ sub stage_2 { my $loaded_current = $load_current; $load_current = 0; # don't load current a second time - $self->_user_msg(search_result => 1, res => $res, err => $err); # bail out immediately if the scan is complete if ($err and $err->failed and $err->notfound) { + $self->_user_msg(search_result => 1, res => $res, err => $err); # no error, no reservation -> end of the scan return $self->scan_result(result_cb => $result_cb); } diff --git a/perl/Amanda/Taper/Scribe.pm b/perl/Amanda/Taper/Scribe.pm index 31831b7..6f90d30 100644 --- a/perl/Amanda/Taper/Scribe.pm +++ b/perl/Amanda/Taper/Scribe.pm @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +#* License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -874,7 +875,7 @@ sub _xmsg_part_done { $self->dbg("not notifying for empty, successful part"); } else { # double-check partnum - confess "Part numbers do not match!" + confess "Part numbers do not match! $self->{'dump_header'}->{'partnum'} $msg->{'partnum'}" unless ($self->{'dump_header'}->{'partnum'} == $msg->{'partnum'}); # notify @@ -985,6 +986,14 @@ sub _xmsg_done { } } +sub abort_setup { + my $self = shift; + my %params = @_; + + $self->{'dump_cb'} = $params{'dump_cb'}; + $self->_dump_done(); +} + sub _dump_done { my $self = shift; @@ -992,14 +1001,19 @@ sub _dump_done { # determine the correct final status - DONE if we're done, PARTIAL # if we've started writing to the volume, otherwise FAILED - if (@{$self->{'device_errors'}} or $self->{'config_denial_message'} or - !$self->{'last_part_successful'}) { - $result = $self->{'started_writing'}? 'PARTIAL' : 'FAILED'; + if (!$self->{'started_writing'}) { + $result = 'FAILED'; + } elsif (@{$self->{'device_errors'}} or $self->{'config_denial_message'} or + !$self->{'last_part_successful'}) { + $result = 'PARTIAL'; } else { $result = 'DONE'; } my $dump_cb = $self->{'dump_cb'}; + + return if !defined $dump_cb; + my %dump_cb_args = ( result => $result, device_errors => $self->{'device_errors'}, @@ -1054,8 +1068,6 @@ sub _operation_failed { if (defined $self->{'dump_cb'}) { # _dump_done constructs the dump_cb from $self parameters $self->_dump_done(); - } else { - confess "error with no callback to handle it: $error_message"; } } } @@ -1249,7 +1261,13 @@ sub _volume_cb { step device_started => sub { my $result = shift; - if ($result == 0) { + if ($result =~ /\D/) { + $self->{'feedback'}->scribe_notif_new_tape( + error => $result, + volume_label => undef); + $self->_get_new_volume(); + return $cbX->(); + } elsif ($result == 0) { # try reading the label to see whether we erased the tape my $erased = 0; CHECK_READ_LABEL: { @@ -1293,12 +1311,6 @@ sub _volume_cb { $self->_get_new_volume(); return $cbX->(); - } elsif ($result != 1) { - $self->{'feedback'}->scribe_notif_new_tape( - error => $result, - volume_label => undef); - $self->_get_new_volume(); - return $cbX->(); } $new_label = $device->volume_label; @@ -1466,11 +1478,26 @@ sub get_splitting_args_from_config { unless defined $params{'part_cache_type'}; } - # if any of the dle_* parameters are set, use those to set the part_* - # parameters, which are emptied out first. - if (defined $params{'dle_tape_splitsize'} or - defined $params{'dle_split_diskbuffer'} or - defined $params{'dle_fallback_splitsize'}) { + if (defined $splitting_args{'data_path'} and + $splitting_args{'data_path'} eq "DIRECTTCP") { + my $ps = $params{'dle_tape_splitsize'}; + if (defined $ps and $ps > 0) { + $params{'part_cache_max_size'} = undef + } else { + $ps = $params{'part_size'}; + my $pcms = $params{'part_cache_max_size'}; + $ps = $pcms if (!defined $ps or (defined $pcms and $pcms < $ps)); + } + $splitting_args{'allow_split'} = 1 if ((defined $ps and $ps > 0) or + $params{'leom_supported'}); + $params{'part_size'} = $ps; + $params{'part_cache_type'} = 'none'; + $params{'part_cache_dir'} = undef; + } elsif (defined $params{'dle_tape_splitsize'} or + defined $params{'dle_split_diskbuffer'} or + defined $params{'dle_fallback_splitsize'}) { + # if any of the dle_* parameters are set, use those to set the part_* + # parameters, which are emptied out first. $params{'part_size'} = $params{'dle_tape_splitsize'} || 0; $params{'part_cache_type'} = 'none'; diff --git a/perl/Amanda/Taper/Worker.pm b/perl/Amanda/Taper/Worker.pm index d8802be..74ca332 100644 --- a/perl/Amanda/Taper/Worker.pm +++ b/perl/Amanda/Taper/Worker.pm @@ -1,8 +1,9 @@ # Copyright (c) 2009-2012 Zmanda Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -222,14 +223,20 @@ sub DONE { my $self = shift; my ($msgtype, %params) = @_; - if (!defined $self->{'dumper_status'}) { - $self->{'dumper_status'} = "DONE"; - $self->{'orig_kb'} = $params{'orig_kb'}; - if (defined $self->{'result'}) { - $self->result_cb(undef); - } - } else { - # ignore the message + if ($params{'handle'} ne $self->{'handle'}) { + # ignore message for previous handle + return; + } + + if (defined $self->{'dumper_status'}) { + # ignore duplicate message + return + } + + $self->{'dumper_status'} = "DONE"; + $self->{'orig_kb'} = $params{'orig_kb'}; + if (defined $self->{'result'}) { + $self->result_cb(undef); } } @@ -237,6 +244,16 @@ sub FAILED { my $self = shift; my ($msgtype, %params) = @_; + if ($params{'handle'} ne $self->{'handle'}) { + # ignore message for previous handle + return; + } + + if (defined $self->{'dumper_status'}) { + # ignore duplicate message + return + } + $self->{'dumper_status'} = "FAILED"; if (defined $self->{'header_xfer'}) { $self->{'header_xfer'}->cancel(); @@ -270,7 +287,7 @@ sub result_cb { my $logtype; if ($params{'result'} eq 'DONE') { - if (!$self->{'doing_port_write'} or $self->{'dumper_status'} eq "DONE") { + if ($self->{'dumper_status'} eq "DONE") { $msgtype = Amanda::Taper::Protocol::DONE; $logtype = $L_DONE; } else { @@ -346,7 +363,7 @@ sub result_cb { $msg_params{'taper'} = 'TAPE-ERROR'; $msg_params{'tapererr'} = join("; ", @{$params{'device_errors'}}); } elsif ($params{'config_denial_message'}) { - $msg_params{'taper'} = 'TAPE-ERROR'; + $msg_params{'taper'} = 'TAPE-CONFIG'; $msg_params{'tapererr'} = $params{'config_denial_message'}; } else { $msg_params{'taper'} = 'TAPE-GOOD'; @@ -618,10 +635,10 @@ sub setup_and_start_dump { step process_args => sub { # extract the splitting-related parameters, stripping out empty strings my %splitting_args = map { - ($params{$_} ne '')? ($_, $params{$_}) : () + (defined $params{$_} && $params{$_} ne '')? ($_, $params{$_}) : () } qw( dle_tape_splitsize dle_split_diskbuffer dle_fallback_splitsize dle_allow_split - part_size part_cache_type part_cache_dir part_cache_max_size + part_size part_cache_type part_cache_dir part_cache_max_size data_path ); # convert numeric values to BigInts @@ -700,12 +717,19 @@ sub setup_and_start_dump { # getting the header is easy for FILE-WRITE.. my $hdr = $self->{'header'} = Amanda::Holding::get_header($params{'filename'}); + if (!defined $hdr || $hdr->{'type'} != $Amanda::Header::F_DUMPFILE) { + confess("Could not read header from '$params{filename}'"); + } + # stip out header fields we don't need $hdr->{'cont_filename'} = ''; - if (!defined $hdr || $hdr->{'type'} != $Amanda::Header::F_DUMPFILE) { - confess("Could not read header from '$params{filename}'"); + if ($self->{'header'}->{'is_partial'}) { + $self->{'dumper_status'} = "FAILED"; + } else { + $self->{'dumper_status'} = "DONE"; } + $steps->{'start_dump'}->(undef); } else { # ..but quite a bit harder for PORT-WRITE; this method will send the @@ -721,6 +745,11 @@ sub setup_and_start_dump { $self->_assert_in_state("getting_header") or return; $self->{'state'} = 'writing'; + # abort if we already got a device_errors + if (@{$self->{'scribe'}->{'device_errors'}}) { + $self->{'scribe'}->abort_setup(dump_cb => $params{'dump_cb'}); + return; + } # if $err is set, cancel the dump, treating it as a input error if ($err) { push @{$self->{'input_errors'}}, $err; diff --git a/perl/Amanda/Tests.pod b/perl/Amanda/Tests.pod index 27c192c..9318964 100644 --- a/perl/Amanda/Tests.pod +++ b/perl/Amanda/Tests.pod @@ -1,9 +1,10 @@ /* * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Tests.swg b/perl/Amanda/Tests.swg index 6f83449..33c91ff 100644 --- a/perl/Amanda/Tests.swg +++ b/perl/Amanda/Tests.swg @@ -1,9 +1,10 @@ /* * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Util.pod b/perl/Amanda/Util.pod index ef97b3e..7708417 100644 --- a/perl/Amanda/Util.pod +++ b/perl/Amanda/Util.pod @@ -1,9 +1,10 @@ /* * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Util.swg b/perl/Amanda/Util.swg index 43c4a99..d85c473 100644 --- a/perl/Amanda/Util.swg +++ b/perl/Amanda/Util.swg @@ -1,9 +1,10 @@ /* * Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Xfer.pod b/perl/Amanda/Xfer.pod index 913ce4c..b269936 100644 --- a/perl/Amanda/Xfer.pod +++ b/perl/Amanda/Xfer.pod @@ -1,9 +1,10 @@ /* * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/Xfer.swg b/perl/Amanda/Xfer.swg index c5b0fd9..cee0b15 100644 --- a/perl/Amanda/Xfer.swg +++ b/perl/Amanda/Xfer.swg @@ -1,9 +1,10 @@ /* * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/XferServer.pod b/perl/Amanda/XferServer.pod index 054bf93..db73261 100644 --- a/perl/Amanda/XferServer.pod +++ b/perl/Amanda/XferServer.pod @@ -1,9 +1,10 @@ /* * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Amanda/XferServer.swg b/perl/Amanda/XferServer.swg index 4f25a21..92c4e47 100644 --- a/perl/Amanda/XferServer.swg +++ b/perl/Amanda/XferServer.swg @@ -1,9 +1,10 @@ /* * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/Makefile.am b/perl/Makefile.am index cdf7eb1..977d3c9 100644 --- a/perl/Makefile.am +++ b/perl/Makefile.am @@ -489,6 +489,9 @@ DISTCLEANFILES += Amanda/Constants.pm Amanda_DATA += Amanda/Script_App.pm EXTRA_DIST += Amanda/Script_App.pm +# PACKAGE: Amanda::Extract +Amanda_DATA += Amanda/Extract.pm +EXTRA_DIST += Amanda/Extract.pm if WANT_SERVER # PACKAGE: Amanda::Holding diff --git a/perl/Makefile.in b/perl/Makefile.in index 241fcc5..d4db7c1 100644 --- a/perl/Makefile.in +++ b/perl/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -18,9 +18,10 @@ # vim:ft=automake # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -40,9 +41,10 @@ # vim:ft=automake # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -110,6 +112,23 @@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -356,6 +375,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(libApplicationdir)" \ "$(DESTDIR)$(libArchivedir)" "$(DESTDIR)$(libCmdlinedir)" \ "$(DESTDIR)$(libConfigdir)" "$(DESTDIR)$(libDebugdir)" \ @@ -604,6 +629,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac DATA = $(Amanda_DATA) $(AmandaApplication_DATA) $(AmandaChanger_DATA) \ $(AmandaConfig_DATA) $(AmandaCurinfo_DATA) $(AmandaIPC_DATA) \ $(AmandaInteractivity_DATA) $(AmandaRecovery_DATA) \ @@ -1472,8 +1502,8 @@ EXTRA_DIST = $(AMGLUE_SWG) Amanda/Archive.swg Amanda/Archive.pm \ Amanda/MainLoop.swg Amanda/MainLoop.pm Amanda/MainLoop.pod \ $(AmandaIPC_DATA) Amanda/IPC/Binary.swg Amanda/IPC/Binary.pm \ Amanda/IPC/Binary.pod Amanda/Paths.pm.in \ - Amanda/Constants.pm.in Amanda/Script_App.pm Amanda/Holding.pm \ - Amanda/Application.swg Amanda/Application.pm \ + Amanda/Constants.pm.in Amanda/Script_App.pm Amanda/Extract.pm \ + Amanda/Holding.pm Amanda/Application.swg Amanda/Application.pm \ Amanda/Application.pod Amanda/Script.pm \ Amanda/Application/Zfs.pm BUILT_SOURCES = @@ -1559,6 +1589,8 @@ Amandadir = $(amperldir)/Amanda # PACKAGE: Amanda::Script_App +# PACKAGE: Amanda::Extract + # PACKAGE: Amanda::Script Amanda_DATA = Amanda/Archive.pm Amanda/Process.pm $(am__append_4) \ Amanda/Feature.pm $(am__append_6) Amanda/ClientService.pm \ @@ -1566,8 +1598,8 @@ Amanda_DATA = Amanda/Archive.pm Amanda/Process.pm $(am__append_4) \ $(am__append_13) Amanda/BigIntCompat.pm Amanda/Debug.pm \ Amanda/Config.pm Amanda/Util.pm Amanda/Header.pm \ Amanda/Tests.pm Amanda/MainLoop.pm Amanda/Paths.pm \ - Amanda/Constants.pm Amanda/Script_App.pm $(am__append_16) \ - $(am__append_17) Amanda/Script.pm + Amanda/Constants.pm Amanda/Script_App.pm Amanda/Extract.pm \ + $(am__append_16) $(am__append_17) Amanda/Script.pm # PACKAGE: Amanda::Archive libArchivedir = $(amperldir)/auto/Amanda/Archive @@ -1843,6 +1875,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; +$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/scripts.am: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -1854,7 +1887,6 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-libApplicationLTLIBRARIES: $(libApplication_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libApplicationdir)" || $(MKDIR_P) "$(DESTDIR)$(libApplicationdir)" @list='$(libApplication_LTLIBRARIES)'; test -n "$(libApplicationdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -1862,6 +1894,8 @@ install-libApplicationLTLIBRARIES: $(libApplication_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libApplicationdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libApplicationdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libApplicationdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libApplicationdir)"; \ } @@ -1885,7 +1919,6 @@ clean-libApplicationLTLIBRARIES: done install-libArchiveLTLIBRARIES: $(libArchive_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libArchivedir)" || $(MKDIR_P) "$(DESTDIR)$(libArchivedir)" @list='$(libArchive_LTLIBRARIES)'; test -n "$(libArchivedir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -1893,6 +1926,8 @@ install-libArchiveLTLIBRARIES: $(libArchive_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libArchivedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libArchivedir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libArchivedir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libArchivedir)"; \ } @@ -1916,7 +1951,6 @@ clean-libArchiveLTLIBRARIES: done install-libCmdlineLTLIBRARIES: $(libCmdline_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libCmdlinedir)" || $(MKDIR_P) "$(DESTDIR)$(libCmdlinedir)" @list='$(libCmdline_LTLIBRARIES)'; test -n "$(libCmdlinedir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -1924,6 +1958,8 @@ install-libCmdlineLTLIBRARIES: $(libCmdline_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libCmdlinedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libCmdlinedir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libCmdlinedir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libCmdlinedir)"; \ } @@ -1947,7 +1983,6 @@ clean-libCmdlineLTLIBRARIES: done install-libConfigLTLIBRARIES: $(libConfig_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libConfigdir)" || $(MKDIR_P) "$(DESTDIR)$(libConfigdir)" @list='$(libConfig_LTLIBRARIES)'; test -n "$(libConfigdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -1955,6 +1990,8 @@ install-libConfigLTLIBRARIES: $(libConfig_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libConfigdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libConfigdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libConfigdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libConfigdir)"; \ } @@ -1978,7 +2015,6 @@ clean-libConfigLTLIBRARIES: done install-libDebugLTLIBRARIES: $(libDebug_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libDebugdir)" || $(MKDIR_P) "$(DESTDIR)$(libDebugdir)" @list='$(libDebug_LTLIBRARIES)'; test -n "$(libDebugdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -1986,6 +2022,8 @@ install-libDebugLTLIBRARIES: $(libDebug_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libDebugdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libDebugdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libDebugdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libDebugdir)"; \ } @@ -2009,7 +2047,6 @@ clean-libDebugLTLIBRARIES: done install-libDeviceLTLIBRARIES: $(libDevice_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libDevicedir)" || $(MKDIR_P) "$(DESTDIR)$(libDevicedir)" @list='$(libDevice_LTLIBRARIES)'; test -n "$(libDevicedir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -2017,6 +2054,8 @@ install-libDeviceLTLIBRARIES: $(libDevice_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libDevicedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libDevicedir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libDevicedir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libDevicedir)"; \ } @@ -2040,7 +2079,6 @@ clean-libDeviceLTLIBRARIES: done install-libDisklistLTLIBRARIES: $(libDisklist_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libDisklistdir)" || $(MKDIR_P) "$(DESTDIR)$(libDisklistdir)" @list='$(libDisklist_LTLIBRARIES)'; test -n "$(libDisklistdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -2048,6 +2086,8 @@ install-libDisklistLTLIBRARIES: $(libDisklist_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libDisklistdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libDisklistdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libDisklistdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libDisklistdir)"; \ } @@ -2071,7 +2111,6 @@ clean-libDisklistLTLIBRARIES: done install-libFeatureLTLIBRARIES: $(libFeature_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libFeaturedir)" || $(MKDIR_P) "$(DESTDIR)$(libFeaturedir)" @list='$(libFeature_LTLIBRARIES)'; test -n "$(libFeaturedir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -2079,6 +2118,8 @@ install-libFeatureLTLIBRARIES: $(libFeature_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libFeaturedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libFeaturedir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libFeaturedir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libFeaturedir)"; \ } @@ -2102,7 +2143,6 @@ clean-libFeatureLTLIBRARIES: done install-libHeaderLTLIBRARIES: $(libHeader_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libHeaderdir)" || $(MKDIR_P) "$(DESTDIR)$(libHeaderdir)" @list='$(libHeader_LTLIBRARIES)'; test -n "$(libHeaderdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -2110,6 +2150,8 @@ install-libHeaderLTLIBRARIES: $(libHeader_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libHeaderdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libHeaderdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libHeaderdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libHeaderdir)"; \ } @@ -2133,7 +2175,6 @@ clean-libHeaderLTLIBRARIES: done install-libIPCBinaryLTLIBRARIES: $(libIPCBinary_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libIPCBinarydir)" || $(MKDIR_P) "$(DESTDIR)$(libIPCBinarydir)" @list='$(libIPCBinary_LTLIBRARIES)'; test -n "$(libIPCBinarydir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -2141,6 +2182,8 @@ install-libIPCBinaryLTLIBRARIES: $(libIPCBinary_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libIPCBinarydir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libIPCBinarydir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libIPCBinarydir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libIPCBinarydir)"; \ } @@ -2164,7 +2207,6 @@ clean-libIPCBinaryLTLIBRARIES: done install-libLogfileLTLIBRARIES: $(libLogfile_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libLogfiledir)" || $(MKDIR_P) "$(DESTDIR)$(libLogfiledir)" @list='$(libLogfile_LTLIBRARIES)'; test -n "$(libLogfiledir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -2172,6 +2214,8 @@ install-libLogfileLTLIBRARIES: $(libLogfile_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libLogfiledir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libLogfiledir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libLogfiledir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libLogfiledir)"; \ } @@ -2195,7 +2239,6 @@ clean-libLogfileLTLIBRARIES: done install-libMainLoopLTLIBRARIES: $(libMainLoop_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libMainLoopdir)" || $(MKDIR_P) "$(DESTDIR)$(libMainLoopdir)" @list='$(libMainLoop_LTLIBRARIES)'; test -n "$(libMainLoopdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -2203,6 +2246,8 @@ install-libMainLoopLTLIBRARIES: $(libMainLoop_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libMainLoopdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libMainLoopdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libMainLoopdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libMainLoopdir)"; \ } @@ -2226,7 +2271,6 @@ clean-libMainLoopLTLIBRARIES: done install-libNDMPLTLIBRARIES: $(libNDMP_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libNDMPdir)" || $(MKDIR_P) "$(DESTDIR)$(libNDMPdir)" @list='$(libNDMP_LTLIBRARIES)'; test -n "$(libNDMPdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -2234,6 +2278,8 @@ install-libNDMPLTLIBRARIES: $(libNDMP_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libNDMPdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libNDMPdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libNDMPdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libNDMPdir)"; \ } @@ -2257,7 +2303,6 @@ clean-libNDMPLTLIBRARIES: done install-libTapelistLTLIBRARIES: $(libTapelist_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libTapelistdir)" || $(MKDIR_P) "$(DESTDIR)$(libTapelistdir)" @list='$(libTapelist_LTLIBRARIES)'; test -n "$(libTapelistdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -2265,6 +2310,8 @@ install-libTapelistLTLIBRARIES: $(libTapelist_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libTapelistdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libTapelistdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libTapelistdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libTapelistdir)"; \ } @@ -2288,7 +2335,6 @@ clean-libTapelistLTLIBRARIES: done install-libTestsLTLIBRARIES: $(libTests_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libTestsdir)" || $(MKDIR_P) "$(DESTDIR)$(libTestsdir)" @list='$(libTests_LTLIBRARIES)'; test -n "$(libTestsdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -2296,6 +2342,8 @@ install-libTestsLTLIBRARIES: $(libTests_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libTestsdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libTestsdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libTestsdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libTestsdir)"; \ } @@ -2319,7 +2367,6 @@ clean-libTestsLTLIBRARIES: done install-libUtilLTLIBRARIES: $(libUtil_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libUtildir)" || $(MKDIR_P) "$(DESTDIR)$(libUtildir)" @list='$(libUtil_LTLIBRARIES)'; test -n "$(libUtildir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -2327,6 +2374,8 @@ install-libUtilLTLIBRARIES: $(libUtil_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libUtildir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libUtildir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libUtildir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libUtildir)"; \ } @@ -2350,7 +2399,6 @@ clean-libUtilLTLIBRARIES: done install-libXferLTLIBRARIES: $(libXfer_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libXferdir)" || $(MKDIR_P) "$(DESTDIR)$(libXferdir)" @list='$(libXfer_LTLIBRARIES)'; test -n "$(libXferdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -2358,6 +2406,8 @@ install-libXferLTLIBRARIES: $(libXfer_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libXferdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libXferdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libXferdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libXferdir)"; \ } @@ -2381,7 +2431,6 @@ clean-libXferLTLIBRARIES: done install-libXferServerLTLIBRARIES: $(libXferServer_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libXferServerdir)" || $(MKDIR_P) "$(DESTDIR)$(libXferServerdir)" @list='$(libXferServer_LTLIBRARIES)'; test -n "$(libXferServerdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -2389,6 +2438,8 @@ install-libXferServerLTLIBRARIES: $(libXferServer_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libXferServerdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libXferServerdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libXferServerdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libXferServerdir)"; \ } @@ -2410,41 +2461,41 @@ clean-libXferServerLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libApplication.la: $(libApplication_la_OBJECTS) $(libApplication_la_DEPENDENCIES) +libApplication.la: $(libApplication_la_OBJECTS) $(libApplication_la_DEPENDENCIES) $(EXTRA_libApplication_la_DEPENDENCIES) $(libApplication_la_LINK) $(am_libApplication_la_rpath) $(libApplication_la_OBJECTS) $(libApplication_la_LIBADD) $(LIBS) -libArchive.la: $(libArchive_la_OBJECTS) $(libArchive_la_DEPENDENCIES) +libArchive.la: $(libArchive_la_OBJECTS) $(libArchive_la_DEPENDENCIES) $(EXTRA_libArchive_la_DEPENDENCIES) $(libArchive_la_LINK) -rpath $(libArchivedir) $(libArchive_la_OBJECTS) $(libArchive_la_LIBADD) $(LIBS) -libBinary.la: $(libBinary_la_OBJECTS) $(libBinary_la_DEPENDENCIES) +libBinary.la: $(libBinary_la_OBJECTS) $(libBinary_la_DEPENDENCIES) $(EXTRA_libBinary_la_DEPENDENCIES) $(libBinary_la_LINK) -rpath $(libIPCBinarydir) $(libBinary_la_OBJECTS) $(libBinary_la_LIBADD) $(LIBS) -libCmdline.la: $(libCmdline_la_OBJECTS) $(libCmdline_la_DEPENDENCIES) +libCmdline.la: $(libCmdline_la_OBJECTS) $(libCmdline_la_DEPENDENCIES) $(EXTRA_libCmdline_la_DEPENDENCIES) $(libCmdline_la_LINK) $(am_libCmdline_la_rpath) $(libCmdline_la_OBJECTS) $(libCmdline_la_LIBADD) $(LIBS) -libConfig.la: $(libConfig_la_OBJECTS) $(libConfig_la_DEPENDENCIES) +libConfig.la: $(libConfig_la_OBJECTS) $(libConfig_la_DEPENDENCIES) $(EXTRA_libConfig_la_DEPENDENCIES) $(libConfig_la_LINK) -rpath $(libConfigdir) $(libConfig_la_OBJECTS) $(libConfig_la_LIBADD) $(LIBS) -libDebug.la: $(libDebug_la_OBJECTS) $(libDebug_la_DEPENDENCIES) +libDebug.la: $(libDebug_la_OBJECTS) $(libDebug_la_DEPENDENCIES) $(EXTRA_libDebug_la_DEPENDENCIES) $(libDebug_la_LINK) -rpath $(libDebugdir) $(libDebug_la_OBJECTS) $(libDebug_la_LIBADD) $(LIBS) -libDevice.la: $(libDevice_la_OBJECTS) $(libDevice_la_DEPENDENCIES) +libDevice.la: $(libDevice_la_OBJECTS) $(libDevice_la_DEPENDENCIES) $(EXTRA_libDevice_la_DEPENDENCIES) $(libDevice_la_LINK) $(am_libDevice_la_rpath) $(libDevice_la_OBJECTS) $(libDevice_la_LIBADD) $(LIBS) -libDisklist.la: $(libDisklist_la_OBJECTS) $(libDisklist_la_DEPENDENCIES) +libDisklist.la: $(libDisklist_la_OBJECTS) $(libDisklist_la_DEPENDENCIES) $(EXTRA_libDisklist_la_DEPENDENCIES) $(libDisklist_la_LINK) $(am_libDisklist_la_rpath) $(libDisklist_la_OBJECTS) $(libDisklist_la_LIBADD) $(LIBS) -libFeature.la: $(libFeature_la_OBJECTS) $(libFeature_la_DEPENDENCIES) +libFeature.la: $(libFeature_la_OBJECTS) $(libFeature_la_DEPENDENCIES) $(EXTRA_libFeature_la_DEPENDENCIES) $(libFeature_la_LINK) -rpath $(libFeaturedir) $(libFeature_la_OBJECTS) $(libFeature_la_LIBADD) $(LIBS) -libHeader.la: $(libHeader_la_OBJECTS) $(libHeader_la_DEPENDENCIES) +libHeader.la: $(libHeader_la_OBJECTS) $(libHeader_la_DEPENDENCIES) $(EXTRA_libHeader_la_DEPENDENCIES) $(libHeader_la_LINK) -rpath $(libHeaderdir) $(libHeader_la_OBJECTS) $(libHeader_la_LIBADD) $(LIBS) -libLogfile.la: $(libLogfile_la_OBJECTS) $(libLogfile_la_DEPENDENCIES) +libLogfile.la: $(libLogfile_la_OBJECTS) $(libLogfile_la_DEPENDENCIES) $(EXTRA_libLogfile_la_DEPENDENCIES) $(libLogfile_la_LINK) $(am_libLogfile_la_rpath) $(libLogfile_la_OBJECTS) $(libLogfile_la_LIBADD) $(LIBS) -libMainLoop.la: $(libMainLoop_la_OBJECTS) $(libMainLoop_la_DEPENDENCIES) +libMainLoop.la: $(libMainLoop_la_OBJECTS) $(libMainLoop_la_DEPENDENCIES) $(EXTRA_libMainLoop_la_DEPENDENCIES) $(libMainLoop_la_LINK) -rpath $(libMainLoopdir) $(libMainLoop_la_OBJECTS) $(libMainLoop_la_LIBADD) $(LIBS) -libNDMP.la: $(libNDMP_la_OBJECTS) $(libNDMP_la_DEPENDENCIES) +libNDMP.la: $(libNDMP_la_OBJECTS) $(libNDMP_la_DEPENDENCIES) $(EXTRA_libNDMP_la_DEPENDENCIES) $(libNDMP_la_LINK) $(am_libNDMP_la_rpath) $(libNDMP_la_OBJECTS) $(libNDMP_la_LIBADD) $(LIBS) -libTapelist.la: $(libTapelist_la_OBJECTS) $(libTapelist_la_DEPENDENCIES) +libTapelist.la: $(libTapelist_la_OBJECTS) $(libTapelist_la_DEPENDENCIES) $(EXTRA_libTapelist_la_DEPENDENCIES) $(libTapelist_la_LINK) $(am_libTapelist_la_rpath) $(libTapelist_la_OBJECTS) $(libTapelist_la_LIBADD) $(LIBS) -libTests.la: $(libTests_la_OBJECTS) $(libTests_la_DEPENDENCIES) +libTests.la: $(libTests_la_OBJECTS) $(libTests_la_DEPENDENCIES) $(EXTRA_libTests_la_DEPENDENCIES) $(libTests_la_LINK) -rpath $(libTestsdir) $(libTests_la_OBJECTS) $(libTests_la_LIBADD) $(LIBS) -libUtil.la: $(libUtil_la_OBJECTS) $(libUtil_la_DEPENDENCIES) +libUtil.la: $(libUtil_la_OBJECTS) $(libUtil_la_DEPENDENCIES) $(EXTRA_libUtil_la_DEPENDENCIES) $(libUtil_la_LINK) -rpath $(libUtildir) $(libUtil_la_OBJECTS) $(libUtil_la_LIBADD) $(LIBS) -libXfer.la: $(libXfer_la_OBJECTS) $(libXfer_la_DEPENDENCIES) +libXfer.la: $(libXfer_la_OBJECTS) $(libXfer_la_DEPENDENCIES) $(EXTRA_libXfer_la_DEPENDENCIES) $(libXfer_la_LINK) -rpath $(libXferdir) $(libXfer_la_OBJECTS) $(libXfer_la_LIBADD) $(LIBS) -libXferServer.la: $(libXferServer_la_OBJECTS) $(libXferServer_la_DEPENDENCIES) +libXferServer.la: $(libXferServer_la_OBJECTS) $(libXferServer_la_DEPENDENCIES) $(EXTRA_libXferServer_la_DEPENDENCIES) $(libXferServer_la_LINK) $(am_libXferServer_la_rpath) $(libXferServer_la_OBJECTS) $(libXferServer_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -2626,8 +2677,11 @@ clean-libtool: -rm -rf .libs _libs install-AmandaDATA: $(Amanda_DATA) @$(NORMAL_INSTALL) - test -z "$(Amandadir)" || $(MKDIR_P) "$(DESTDIR)$(Amandadir)" @list='$(Amanda_DATA)'; test -n "$(Amandadir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(Amandadir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(Amandadir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -2641,13 +2695,14 @@ uninstall-AmandaDATA: @$(NORMAL_UNINSTALL) @list='$(Amanda_DATA)'; test -n "$(Amandadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(Amandadir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(Amandadir)" && rm -f $$files + dir='$(DESTDIR)$(Amandadir)'; $(am__uninstall_files_from_dir) install-AmandaApplicationDATA: $(AmandaApplication_DATA) @$(NORMAL_INSTALL) - test -z "$(AmandaApplicationdir)" || $(MKDIR_P) "$(DESTDIR)$(AmandaApplicationdir)" @list='$(AmandaApplication_DATA)'; test -n "$(AmandaApplicationdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(AmandaApplicationdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(AmandaApplicationdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -2661,13 +2716,14 @@ uninstall-AmandaApplicationDATA: @$(NORMAL_UNINSTALL) @list='$(AmandaApplication_DATA)'; test -n "$(AmandaApplicationdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(AmandaApplicationdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(AmandaApplicationdir)" && rm -f $$files + dir='$(DESTDIR)$(AmandaApplicationdir)'; $(am__uninstall_files_from_dir) install-AmandaChangerDATA: $(AmandaChanger_DATA) @$(NORMAL_INSTALL) - test -z "$(AmandaChangerdir)" || $(MKDIR_P) "$(DESTDIR)$(AmandaChangerdir)" @list='$(AmandaChanger_DATA)'; test -n "$(AmandaChangerdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(AmandaChangerdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(AmandaChangerdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -2681,13 +2737,14 @@ uninstall-AmandaChangerDATA: @$(NORMAL_UNINSTALL) @list='$(AmandaChanger_DATA)'; test -n "$(AmandaChangerdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(AmandaChangerdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(AmandaChangerdir)" && rm -f $$files + dir='$(DESTDIR)$(AmandaChangerdir)'; $(am__uninstall_files_from_dir) install-AmandaConfigDATA: $(AmandaConfig_DATA) @$(NORMAL_INSTALL) - test -z "$(AmandaConfigdir)" || $(MKDIR_P) "$(DESTDIR)$(AmandaConfigdir)" @list='$(AmandaConfig_DATA)'; test -n "$(AmandaConfigdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(AmandaConfigdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(AmandaConfigdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -2701,13 +2758,14 @@ uninstall-AmandaConfigDATA: @$(NORMAL_UNINSTALL) @list='$(AmandaConfig_DATA)'; test -n "$(AmandaConfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(AmandaConfigdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(AmandaConfigdir)" && rm -f $$files + dir='$(DESTDIR)$(AmandaConfigdir)'; $(am__uninstall_files_from_dir) install-AmandaCurinfoDATA: $(AmandaCurinfo_DATA) @$(NORMAL_INSTALL) - test -z "$(AmandaCurinfodir)" || $(MKDIR_P) "$(DESTDIR)$(AmandaCurinfodir)" @list='$(AmandaCurinfo_DATA)'; test -n "$(AmandaCurinfodir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(AmandaCurinfodir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(AmandaCurinfodir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -2721,13 +2779,14 @@ uninstall-AmandaCurinfoDATA: @$(NORMAL_UNINSTALL) @list='$(AmandaCurinfo_DATA)'; test -n "$(AmandaCurinfodir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(AmandaCurinfodir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(AmandaCurinfodir)" && rm -f $$files + dir='$(DESTDIR)$(AmandaCurinfodir)'; $(am__uninstall_files_from_dir) install-AmandaIPCDATA: $(AmandaIPC_DATA) @$(NORMAL_INSTALL) - test -z "$(AmandaIPCdir)" || $(MKDIR_P) "$(DESTDIR)$(AmandaIPCdir)" @list='$(AmandaIPC_DATA)'; test -n "$(AmandaIPCdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(AmandaIPCdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(AmandaIPCdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -2741,13 +2800,14 @@ uninstall-AmandaIPCDATA: @$(NORMAL_UNINSTALL) @list='$(AmandaIPC_DATA)'; test -n "$(AmandaIPCdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(AmandaIPCdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(AmandaIPCdir)" && rm -f $$files + dir='$(DESTDIR)$(AmandaIPCdir)'; $(am__uninstall_files_from_dir) install-AmandaInteractivityDATA: $(AmandaInteractivity_DATA) @$(NORMAL_INSTALL) - test -z "$(AmandaInteractivitydir)" || $(MKDIR_P) "$(DESTDIR)$(AmandaInteractivitydir)" @list='$(AmandaInteractivity_DATA)'; test -n "$(AmandaInteractivitydir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(AmandaInteractivitydir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(AmandaInteractivitydir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -2761,13 +2821,14 @@ uninstall-AmandaInteractivityDATA: @$(NORMAL_UNINSTALL) @list='$(AmandaInteractivity_DATA)'; test -n "$(AmandaInteractivitydir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(AmandaInteractivitydir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(AmandaInteractivitydir)" && rm -f $$files + dir='$(DESTDIR)$(AmandaInteractivitydir)'; $(am__uninstall_files_from_dir) install-AmandaRecoveryDATA: $(AmandaRecovery_DATA) @$(NORMAL_INSTALL) - test -z "$(AmandaRecoverydir)" || $(MKDIR_P) "$(DESTDIR)$(AmandaRecoverydir)" @list='$(AmandaRecovery_DATA)'; test -n "$(AmandaRecoverydir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(AmandaRecoverydir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(AmandaRecoverydir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -2781,13 +2842,14 @@ uninstall-AmandaRecoveryDATA: @$(NORMAL_UNINSTALL) @list='$(AmandaRecovery_DATA)'; test -n "$(AmandaRecoverydir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(AmandaRecoverydir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(AmandaRecoverydir)" && rm -f $$files + dir='$(DESTDIR)$(AmandaRecoverydir)'; $(am__uninstall_files_from_dir) install-AmandaReportDATA: $(AmandaReport_DATA) @$(NORMAL_INSTALL) - test -z "$(AmandaReportdir)" || $(MKDIR_P) "$(DESTDIR)$(AmandaReportdir)" @list='$(AmandaReport_DATA)'; test -n "$(AmandaReportdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(AmandaReportdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(AmandaReportdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -2801,13 +2863,14 @@ uninstall-AmandaReportDATA: @$(NORMAL_UNINSTALL) @list='$(AmandaReport_DATA)'; test -n "$(AmandaReportdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(AmandaReportdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(AmandaReportdir)" && rm -f $$files + dir='$(DESTDIR)$(AmandaReportdir)'; $(am__uninstall_files_from_dir) install-AmandaTaperDATA: $(AmandaTaper_DATA) @$(NORMAL_INSTALL) - test -z "$(AmandaTaperdir)" || $(MKDIR_P) "$(DESTDIR)$(AmandaTaperdir)" @list='$(AmandaTaper_DATA)'; test -n "$(AmandaTaperdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(AmandaTaperdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(AmandaTaperdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -2821,13 +2884,14 @@ uninstall-AmandaTaperDATA: @$(NORMAL_UNINSTALL) @list='$(AmandaTaper_DATA)'; test -n "$(AmandaTaperdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(AmandaTaperdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(AmandaTaperdir)" && rm -f $$files + dir='$(DESTDIR)$(AmandaTaperdir)'; $(am__uninstall_files_from_dir) install-AmandaTaperScanDATA: $(AmandaTaperScan_DATA) @$(NORMAL_INSTALL) - test -z "$(AmandaTaperScandir)" || $(MKDIR_P) "$(DESTDIR)$(AmandaTaperScandir)" @list='$(AmandaTaperScan_DATA)'; test -n "$(AmandaTaperScandir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(AmandaTaperScandir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(AmandaTaperScandir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -2841,13 +2905,14 @@ uninstall-AmandaTaperScanDATA: @$(NORMAL_UNINSTALL) @list='$(AmandaTaperScan_DATA)'; test -n "$(AmandaTaperScandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(AmandaTaperScandir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(AmandaTaperScandir)" && rm -f $$files + dir='$(DESTDIR)$(AmandaTaperScandir)'; $(am__uninstall_files_from_dir) install-Amanda_DBDATA: $(Amanda_DB_DATA) @$(NORMAL_INSTALL) - test -z "$(Amanda_DBdir)" || $(MKDIR_P) "$(DESTDIR)$(Amanda_DBdir)" @list='$(Amanda_DB_DATA)'; test -n "$(Amanda_DBdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(Amanda_DBdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(Amanda_DBdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -2861,9 +2926,7 @@ uninstall-Amanda_DBDATA: @$(NORMAL_UNINSTALL) @list='$(Amanda_DB_DATA)'; test -n "$(Amanda_DBdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(Amanda_DBdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(Amanda_DBdir)" && rm -f $$files + dir='$(DESTDIR)$(Amanda_DBdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -3032,13 +3095,10 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -3083,10 +3143,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) diff --git a/perl/amglue/Makefile.in b/perl/amglue/Makefile.in index 9514960..56186ec 100644 --- a/perl/amglue/Makefile.in +++ b/perl/amglue/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -18,9 +18,10 @@ # vim:ft=automake # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -40,9 +41,10 @@ # vim:ft=automake # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -109,6 +111,23 @@ # configure.in VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -309,6 +328,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(amlibdir)" LTLIBRARIES = $(amlib_LTLIBRARIES) libamglue_la_DEPENDENCIES = $(top_builddir)/xfer-src/libamxfer.la @@ -333,6 +358,11 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libamglue_la_SOURCES) DIST_SOURCES = $(libamglue_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -1209,6 +1239,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; +$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/scripts.am: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -1220,7 +1251,6 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-amlibLTLIBRARIES: $(amlib_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(amlibdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibdir)" @list='$(amlib_LTLIBRARIES)'; test -n "$(amlibdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -1228,6 +1258,8 @@ install-amlibLTLIBRARIES: $(amlib_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(amlibdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(amlibdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(amlibdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(amlibdir)"; \ } @@ -1249,7 +1281,7 @@ clean-amlibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libamglue.la: $(libamglue_la_OBJECTS) $(libamglue_la_DEPENDENCIES) +libamglue.la: $(libamglue_la_OBJECTS) $(libamglue_la_DEPENDENCIES) $(EXTRA_libamglue_la_DEPENDENCIES) $(libamglue_la_LINK) -rpath $(amlibdir) $(libamglue_la_OBJECTS) $(libamglue_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -1398,10 +1430,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) diff --git a/perl/amglue/amglue.h b/perl/amglue/amglue.h index 67184d0..e625669 100644 --- a/perl/amglue/amglue.h +++ b/perl/amglue/amglue.h @@ -1,9 +1,10 @@ /* * Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/amglue/amglue.swg b/perl/amglue/amglue.swg index 0949025..fe00873 100644 --- a/perl/amglue/amglue.swg +++ b/perl/amglue/amglue.swg @@ -1,9 +1,10 @@ /* * Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/amglue/bigint.c b/perl/amglue/bigint.c index 33c5a5f..06e3725 100644 --- a/perl/amglue/bigint.c +++ b/perl/amglue/bigint.c @@ -1,9 +1,10 @@ /* * Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/amglue/constants.swg b/perl/amglue/constants.swg index 556ed83..2caa4f3 100644 --- a/perl/amglue/constants.swg +++ b/perl/amglue/constants.swg @@ -1,9 +1,10 @@ /* * Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/amglue/directtcp.swg b/perl/amglue/directtcp.swg index 27d7830..5b6e3ca 100644 --- a/perl/amglue/directtcp.swg +++ b/perl/amglue/directtcp.swg @@ -1,9 +1,10 @@ /* * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/amglue/dumpspecs.swg b/perl/amglue/dumpspecs.swg index 5a0eba5..4de1e17 100644 --- a/perl/amglue/dumpspecs.swg +++ b/perl/amglue/dumpspecs.swg @@ -1,9 +1,10 @@ /* * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/amglue/exports.swg b/perl/amglue/exports.swg index 19b792b..0f694b7 100644 --- a/perl/amglue/exports.swg +++ b/perl/amglue/exports.swg @@ -1,9 +1,10 @@ /* * Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/amglue/filehandles.swg b/perl/amglue/filehandles.swg index 6499886..4cbb24f 100644 --- a/perl/amglue/filehandles.swg +++ b/perl/amglue/filehandles.swg @@ -1,9 +1,10 @@ /* * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/amglue/gerror.c b/perl/amglue/gerror.c index 7664cfb..d86d7a2 100644 --- a/perl/amglue/gerror.c +++ b/perl/amglue/gerror.c @@ -1,9 +1,10 @@ /* * 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/amglue/ghashtable.c b/perl/amglue/ghashtable.c index 679cf2b..155446f 100644 --- a/perl/amglue/ghashtable.c +++ b/perl/amglue/ghashtable.c @@ -1,9 +1,10 @@ /* * Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/amglue/glib.swg b/perl/amglue/glib.swg index 3844b6e..4d567b3 100644 --- a/perl/amglue/glib.swg +++ b/perl/amglue/glib.swg @@ -1,9 +1,10 @@ /* * Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/amglue/integers.swg b/perl/amglue/integers.swg index 038906a..ea7dc3d 100644 --- a/perl/amglue/integers.swg +++ b/perl/amglue/integers.swg @@ -1,9 +1,10 @@ /* * Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/amglue/objwrap.c b/perl/amglue/objwrap.c index 5ce1eda..03c0a49 100644 --- a/perl/amglue/objwrap.c +++ b/perl/amglue/objwrap.c @@ -1,9 +1,10 @@ /* * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/amglue/source.c b/perl/amglue/source.c index fe07715..c4e2e17 100644 --- a/perl/amglue/source.c +++ b/perl/amglue/source.c @@ -1,9 +1,10 @@ /* * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/perl/amglue/xferwrap.c b/perl/amglue/xferwrap.c index 5ec9e91..afff1f7 100644 --- a/perl/amglue/xferwrap.c +++ b/perl/amglue/xferwrap.c @@ -1,9 +1,10 @@ /* * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/po/Makefile.in b/po/Makefile.in index 24c309e..ead550f 100644 --- a/po/Makefile.in +++ b/po/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,6 +17,23 @@ # Makefile for PO directory in any package using GNU gettext. VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -196,6 +213,11 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac ACLOCAL = @ACLOCAL@ AIX_BACKUP = @AIX_BACKUP@ ALLOCA = @ALLOCA@ @@ -1129,10 +1151,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/recover-src/Makefile.in b/recover-src/Makefile.in index 9acb85c..971a0f1 100644 --- a/recover-src/Makefile.in +++ b/recover-src/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -20,9 +20,10 @@ # vim:ft=automake # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -92,6 +93,23 @@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -301,15 +319,20 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS) +LEXCOMPILE = $(LEX) $(AM_LFLAGS) $(LFLAGS) LTLEXCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS) + --mode=compile $(LEX) $(AM_LFLAGS) $(LFLAGS) YLWRAP = $(top_srcdir)/config/ylwrap -YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS) +YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS) LTYACCCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(YACC) $(YFLAGS) $(AM_YFLAGS) + --mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS) SOURCES = $(amrecover_SOURCES) DIST_SOURCES = $(amrecover_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags @@ -1218,6 +1241,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; +$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/installperms.am $(top_srcdir)/config/automake/precompile.am: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -1229,8 +1253,11 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ @@ -1271,11 +1298,9 @@ clean-sbinPROGRAMS: echo " rm -f" $$list; \ rm -f $$list uparse.h: uparse.c - @if test ! -f $@; then \ - rm -f uparse.c; \ - $(MAKE) $(AM_MAKEFLAGS) uparse.c; \ - else :; fi -amrecover$(EXEEXT): $(amrecover_OBJECTS) $(amrecover_DEPENDENCIES) + @if test ! -f $@; then rm -f uparse.c; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) uparse.c; else :; fi +amrecover$(EXEEXT): $(amrecover_OBJECTS) $(amrecover_DEPENDENCIES) $(EXTRA_amrecover_DEPENDENCIES) @rm -f amrecover$(EXEEXT) $(LINK) $(amrecover_OBJECTS) $(amrecover_LDADD) $(LIBS) @@ -1427,10 +1452,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) diff --git a/recover-src/amrecover.c b/recover-src/amrecover.c index e0d7c18..b44724d 100644 --- a/recover-src/amrecover.c +++ b/recover-src/amrecover.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998, 2000 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/recover-src/amrecover.h b/recover-src/amrecover.h index efbfa89..333b8e6 100644 --- a/recover-src/amrecover.h +++ b/recover-src/amrecover.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998, 2000 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/recover-src/display_commands.c b/recover-src/display_commands.c index d18b868..423cfb7 100644 --- a/recover-src/display_commands.c +++ b/recover-src/display_commands.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/recover-src/extract_list.c b/recover-src/extract_list.c index 1744ad6..9a453cb 100644 --- a/recover-src/extract_list.c +++ b/recover-src/extract_list.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998, 2000 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -1860,7 +1861,7 @@ extract_files_child( /*NOTREACHED*/ } - if (ctl_data->file.program != NULL) { + if (ctl_data->file.program[0] != '\0') { if (strcmp(ctl_data->file.program, "APPLICATION") == 0) dumptype = IS_APPLICATION_API; #ifdef GNUTAR @@ -2718,13 +2719,13 @@ read_amidxtaped_data( g_debug("read header %zd => %d", size, header_size); if (header_size < 32768) { - security_stream_read(amidxtaped_streams[DATAFD].fd, - read_amidxtaped_data, cookie); + /* wait to read more data */ return; } else if (header_size > 32768) { error("header_size is %d\n", header_size); } assert (to_move == size); + security_stream_read_cancel(amidxtaped_streams[DATAFD].fd); /* parse the file header */ fh_init(&ctl_data->file); parse_file_header(header_buf, &ctl_data->file, (size_t)header_size); @@ -2788,8 +2789,6 @@ read_amidxtaped_data( * We ignore errors while writing to the index file. */ (void)full_write(ctl_data->child_pipe[1], buf, (size_t)size); - security_stream_read(amidxtaped_streams[DATAFD].fd, - read_amidxtaped_data, cookie); } } diff --git a/recover-src/help.c b/recover-src/help.c index f045de3..31dec03 100644 --- a/recover-src/help.c +++ b/recover-src/help.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998, 2000 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/recover-src/set_commands.c b/recover-src/set_commands.c index e741287..6d4e96a 100644 --- a/recover-src/set_commands.c +++ b/recover-src/set_commands.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998, 2000 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -540,14 +541,13 @@ cd_dir( int verbose) { char *dir = NULL; - char *s; int nb_found; int result; size_t i; DIR_ITEM *ditem; - if ((s = validate_regexp(tpath_on_disk)) != NULL) { + if (validate_regexp(tpath_on_disk) != NULL) { result = set_directory(default_dir, verbose); return result; } diff --git a/recover-src/uparse.c b/recover-src/uparse.c index 1f25e4d..f74d65d 100644 --- a/recover-src/uparse.c +++ b/recover-src/uparse.c @@ -66,7 +66,7 @@ /* Copy the first part of user declarations. */ /* Line 268 of yacc.c */ -#line 31 "uparse.y" +#line 32 "uparse.y" #include "amanda.h" #include "amrecover.h" @@ -188,7 +188,7 @@ typedef union YYSTYPE { /* Line 293 of yacc.c */ -#line 43 "uparse.y" +#line 44 "uparse.y" int intval; double floatval; @@ -543,17 +543,17 @@ static const yytype_int8 yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 68, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, - 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 132, 178, 179, 183, 184, 185, 186, 187, 188, 189, - 190, 191, 192, 193, 194, 195, 199, 200, 204, 208, - 209, 213, 217, 218, 222, 226, 227, 231, 235, 236, - 240, 241, 242, 246, 247, 251, 252, 256, 257, 261, - 270, 271, 275, 279, 280 + 0, 69, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 133, 179, 180, 184, 185, 186, 187, 188, 189, 190, + 191, 192, 193, 194, 195, 196, 200, 201, 205, 209, + 210, 214, 218, 219, 223, 227, 228, 232, 236, 237, + 241, 242, 243, 247, 248, 252, 253, 257, 258, 262, + 271, 272, 276, 280, 281 }; #endif @@ -1595,329 +1595,329 @@ yyreduce: case 14: /* Line 1806 of yacc.c */ -#line 83 "uparse.y" +#line 84 "uparse.y" { list_host(); } break; case 15: /* Line 1806 of yacc.c */ -#line 84 "uparse.y" +#line 85 "uparse.y" { yyerror("Invalid argument"); } break; case 16: /* Line 1806 of yacc.c */ -#line 85 "uparse.y" +#line 86 "uparse.y" { list_disk((yyvsp[(2) - (3)].strval)); amfree((yyvsp[(2) - (3)].strval)); } break; case 17: /* Line 1806 of yacc.c */ -#line 86 "uparse.y" +#line 87 "uparse.y" { list_disk(NULL); } break; case 18: /* Line 1806 of yacc.c */ -#line 87 "uparse.y" +#line 88 "uparse.y" { yyerror("Invalid argument"); amfree((yyvsp[(2) - (3)].strval)); } break; case 19: /* Line 1806 of yacc.c */ -#line 88 "uparse.y" +#line 89 "uparse.y" { list_property(); } break; case 20: /* Line 1806 of yacc.c */ -#line 89 "uparse.y" +#line 90 "uparse.y" { yyerror("Invalid argument"); } break; case 21: /* Line 1806 of yacc.c */ -#line 90 "uparse.y" +#line 91 "uparse.y" { set_translate(NULL); } break; case 22: /* Line 1806 of yacc.c */ -#line 91 "uparse.y" +#line 92 "uparse.y" { yyerror("Invalid argument"); } break; case 23: /* Line 1806 of yacc.c */ -#line 92 "uparse.y" +#line 93 "uparse.y" { set_translate((yyvsp[(2) - (3)].strval)); amfree((yyvsp[(2) - (3)].strval)); } break; case 24: /* Line 1806 of yacc.c */ -#line 93 "uparse.y" +#line 94 "uparse.y" { set_host((yyvsp[(2) - (3)].strval)); amfree((yyvsp[(2) - (3)].strval)); } break; case 25: /* Line 1806 of yacc.c */ -#line 94 "uparse.y" +#line 95 "uparse.y" { yyerror("Invalid argument"); amfree((yyvsp[(2) - (3)].strval)); } break; case 26: /* Line 1806 of yacc.c */ -#line 95 "uparse.y" +#line 96 "uparse.y" { yyerror("Argument required"); } break; case 27: /* Line 1806 of yacc.c */ -#line 96 "uparse.y" +#line 97 "uparse.y" { set_disk((yyvsp[(2) - (4)].strval), (yyvsp[(3) - (4)].strval)); amfree((yyvsp[(2) - (4)].strval)); amfree((yyvsp[(3) - (4)].strval)); } break; case 28: /* Line 1806 of yacc.c */ -#line 97 "uparse.y" +#line 98 "uparse.y" { set_disk((yyvsp[(2) - (3)].strval), NULL); amfree((yyvsp[(2) - (3)].strval)); } break; case 29: /* Line 1806 of yacc.c */ -#line 98 "uparse.y" +#line 99 "uparse.y" { yyerror("Invalid argument"); amfree((yyvsp[(2) - (4)].strval)); amfree((yyvsp[(3) - (4)].strval)); } break; case 30: /* Line 1806 of yacc.c */ -#line 99 "uparse.y" +#line 100 "uparse.y" { yyerror("Argument required"); } break; case 31: /* Line 1806 of yacc.c */ -#line 100 "uparse.y" +#line 101 "uparse.y" { set_tape((yyvsp[(2) - (3)].strval)); amfree((yyvsp[(2) - (3)].strval)); } break; case 32: /* Line 1806 of yacc.c */ -#line 101 "uparse.y" +#line 102 "uparse.y" { set_tape("default"); } break; case 33: /* Line 1806 of yacc.c */ -#line 102 "uparse.y" +#line 103 "uparse.y" { yyerror("Invalid argument"); amfree((yyvsp[(2) - (3)].strval)); } break; case 34: /* Line 1806 of yacc.c */ -#line 103 "uparse.y" +#line 104 "uparse.y" { set_device(NULL, (yyvsp[(2) - (3)].strval)); amfree((yyvsp[(2) - (3)].strval)); } break; case 35: /* Line 1806 of yacc.c */ -#line 104 "uparse.y" +#line 105 "uparse.y" { set_device((yyvsp[(3) - (5)].strval), (yyvsp[(4) - (5)].strval)); amfree((yyvsp[(3) - (5)].strval)); amfree((yyvsp[(4) - (5)].strval)); } break; case 36: /* Line 1806 of yacc.c */ -#line 105 "uparse.y" +#line 106 "uparse.y" { set_device(NULL, NULL); } break; case 37: /* Line 1806 of yacc.c */ -#line 106 "uparse.y" +#line 107 "uparse.y" { yyerror("Invalid argument"); amfree((yyvsp[(2) - (3)].strval)); } break; case 38: /* Line 1806 of yacc.c */ -#line 107 "uparse.y" +#line 108 "uparse.y" { yyerror("Invalid argument"); amfree((yyvsp[(3) - (4)].strval)); } break; case 39: /* Line 1806 of yacc.c */ -#line 108 "uparse.y" +#line 109 "uparse.y" { yyerror("Invalid argument"); amfree((yyvsp[(3) - (5)].strval)); amfree((yyvsp[(4) - (5)].strval)); } break; case 40: /* Line 1806 of yacc.c */ -#line 109 "uparse.y" +#line 110 "uparse.y" { set_property_name((yyvsp[(2) - (3)].strval), 0); amfree((yyvsp[(2) - (3)].strval)); } break; case 41: /* Line 1806 of yacc.c */ -#line 110 "uparse.y" +#line 111 "uparse.y" { set_property_name((yyvsp[(3) - (4)].strval), 1); amfree((yyvsp[(3) - (4)].strval)); } break; case 42: /* Line 1806 of yacc.c */ -#line 111 "uparse.y" +#line 112 "uparse.y" { set_property_name((yyvsp[(3) - (4)].strval), 0); amfree((yyvsp[(3) - (4)].strval)); } break; case 43: /* Line 1806 of yacc.c */ -#line 112 "uparse.y" +#line 113 "uparse.y" { set_property_name((yyvsp[(4) - (5)].strval), 1); amfree((yyvsp[(4) - (5)].strval)); } break; case 44: /* Line 1806 of yacc.c */ -#line 113 "uparse.y" +#line 114 "uparse.y" { yyerror("Invalid argument"); } break; case 45: /* Line 1806 of yacc.c */ -#line 114 "uparse.y" +#line 115 "uparse.y" { yyerror("Invalid argument"); } break; case 46: /* Line 1806 of yacc.c */ -#line 115 "uparse.y" +#line 116 "uparse.y" { yyerror("Invalid argument"); } break; case 47: /* Line 1806 of yacc.c */ -#line 116 "uparse.y" +#line 117 "uparse.y" { yyerror("Invalid argument"); } break; case 48: /* Line 1806 of yacc.c */ -#line 117 "uparse.y" +#line 118 "uparse.y" { cd_glob((yyvsp[(2) - (3)].strval), 1); amfree((yyvsp[(2) - (3)].strval)); } break; case 49: /* Line 1806 of yacc.c */ -#line 118 "uparse.y" +#line 119 "uparse.y" { yyerror("Invalid argument"); } break; case 50: /* Line 1806 of yacc.c */ -#line 119 "uparse.y" +#line 120 "uparse.y" { yyerror("Argument required"); } break; case 51: /* Line 1806 of yacc.c */ -#line 120 "uparse.y" +#line 121 "uparse.y" { cd_regex((yyvsp[(2) - (3)].strval), 1); amfree((yyvsp[(2) - (3)].strval)); } break; case 52: /* Line 1806 of yacc.c */ -#line 121 "uparse.y" +#line 122 "uparse.y" { yyerror("Invalid argument"); amfree((yyvsp[(2) - (3)].strval)); } break; case 53: /* Line 1806 of yacc.c */ -#line 122 "uparse.y" +#line 123 "uparse.y" { yyerror("Argument required"); } break; case 54: /* Line 1806 of yacc.c */ -#line 123 "uparse.y" +#line 124 "uparse.y" { set_mode(SAMBA_SMBCLIENT); } break; case 55: /* Line 1806 of yacc.c */ -#line 124 "uparse.y" +#line 125 "uparse.y" { set_mode(SAMBA_TAR); } break; case 56: /* Line 1806 of yacc.c */ -#line 125 "uparse.y" +#line 126 "uparse.y" { yyerror("Invalid argument"); } break; case 57: /* Line 1806 of yacc.c */ -#line 126 "uparse.y" +#line 127 "uparse.y" { yyerror("Invalid argument"); } break; case 58: /* Line 1806 of yacc.c */ -#line 127 "uparse.y" +#line 128 "uparse.y" { yyerror("Invalid argument"); } break; case 59: /* Line 1806 of yacc.c */ -#line 128 "uparse.y" +#line 129 "uparse.y" { yyerror("Argument required"); } break; case 60: /* Line 1806 of yacc.c */ -#line 132 "uparse.y" +#line 133 "uparse.y" { time_t now; struct tm *t; @@ -1969,196 +1969,196 @@ yyreduce: case 61: /* Line 1806 of yacc.c */ -#line 178 "uparse.y" +#line 179 "uparse.y" { yyerror("Argument required"); } break; case 62: /* Line 1806 of yacc.c */ -#line 179 "uparse.y" +#line 180 "uparse.y" { yyerror("Invalid argument"); } break; case 63: /* Line 1806 of yacc.c */ -#line 183 "uparse.y" +#line 184 "uparse.y" { list_disk_history(); } break; case 64: /* Line 1806 of yacc.c */ -#line 184 "uparse.y" +#line 185 "uparse.y" { yyerror("Invalid argument"); } break; case 65: /* Line 1806 of yacc.c */ -#line 185 "uparse.y" +#line 186 "uparse.y" { list_directory(); } break; case 66: /* Line 1806 of yacc.c */ -#line 186 "uparse.y" +#line 187 "uparse.y" { yyerror("Invalid argument"); } break; case 67: /* Line 1806 of yacc.c */ -#line 187 "uparse.y" +#line 188 "uparse.y" { display_extract_list((yyvsp[(2) - (3)].strval)); amfree((yyvsp[(2) - (3)].strval)); } break; case 68: /* Line 1806 of yacc.c */ -#line 188 "uparse.y" +#line 189 "uparse.y" { display_extract_list(NULL); } break; case 69: /* Line 1806 of yacc.c */ -#line 189 "uparse.y" +#line 190 "uparse.y" { yyerror("Invalid argument"); } break; case 70: /* Line 1806 of yacc.c */ -#line 190 "uparse.y" +#line 191 "uparse.y" { show_directory(); } break; case 71: /* Line 1806 of yacc.c */ -#line 191 "uparse.y" +#line 192 "uparse.y" { yyerror("Invalid argument"); } break; case 72: /* Line 1806 of yacc.c */ -#line 192 "uparse.y" +#line 193 "uparse.y" { clear_extract_list(); } break; case 73: /* Line 1806 of yacc.c */ -#line 193 "uparse.y" +#line 194 "uparse.y" { yyerror("Invalid argument"); } break; case 74: /* Line 1806 of yacc.c */ -#line 194 "uparse.y" +#line 195 "uparse.y" { show_mode (); } break; case 75: /* Line 1806 of yacc.c */ -#line 195 "uparse.y" +#line 196 "uparse.y" { yyerror("Invalid argument"); } break; case 76: /* Line 1806 of yacc.c */ -#line 199 "uparse.y" +#line 200 "uparse.y" { quit(); } break; case 77: /* Line 1806 of yacc.c */ -#line 200 "uparse.y" +#line 201 "uparse.y" { yyerror("Invalid argument"); } break; case 79: /* Line 1806 of yacc.c */ -#line 208 "uparse.y" +#line 209 "uparse.y" { add_glob((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); } break; case 80: /* Line 1806 of yacc.c */ -#line 209 "uparse.y" +#line 210 "uparse.y" { add_glob((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); } break; case 82: /* Line 1806 of yacc.c */ -#line 217 "uparse.y" +#line 218 "uparse.y" { add_regex((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); } break; case 83: /* Line 1806 of yacc.c */ -#line 218 "uparse.y" +#line 219 "uparse.y" { add_regex((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); } break; case 85: /* Line 1806 of yacc.c */ -#line 226 "uparse.y" +#line 227 "uparse.y" { delete_glob((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); } break; case 86: /* Line 1806 of yacc.c */ -#line 227 "uparse.y" +#line 228 "uparse.y" { delete_glob((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); } break; case 88: /* Line 1806 of yacc.c */ -#line 235 "uparse.y" +#line 236 "uparse.y" { delete_regex((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); } break; case 89: /* Line 1806 of yacc.c */ -#line 236 "uparse.y" +#line 237 "uparse.y" { delete_regex((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); } break; case 90: /* Line 1806 of yacc.c */ -#line 240 "uparse.y" +#line 241 "uparse.y" { char * buf= g_get_current_dir(); puts(buf); free(buf); } break; case 91: /* Line 1806 of yacc.c */ -#line 241 "uparse.y" +#line 242 "uparse.y" { yyerror("Invalid argument"); } break; case 92: /* Line 1806 of yacc.c */ -#line 242 "uparse.y" +#line 243 "uparse.y" { local_cd((yyvsp[(2) - (3)].strval)); amfree((yyvsp[(2) - (3)].strval)); @@ -2168,49 +2168,49 @@ yyreduce: case 93: /* Line 1806 of yacc.c */ -#line 246 "uparse.y" +#line 247 "uparse.y" { yyerror("Invalid argument"); } break; case 94: /* Line 1806 of yacc.c */ -#line 247 "uparse.y" +#line 248 "uparse.y" { yyerror("Argument required"); } break; case 95: /* Line 1806 of yacc.c */ -#line 251 "uparse.y" +#line 252 "uparse.y" { help_list(); } break; case 96: /* Line 1806 of yacc.c */ -#line 252 "uparse.y" +#line 253 "uparse.y" { yyerror("Invalid argument"); } break; case 97: /* Line 1806 of yacc.c */ -#line 256 "uparse.y" +#line 257 "uparse.y" { extract_files(); } break; case 98: /* Line 1806 of yacc.c */ -#line 257 "uparse.y" +#line 258 "uparse.y" { yyerror("Invalid argument"); } break; case 99: /* Line 1806 of yacc.c */ -#line 261 "uparse.y" +#line 262 "uparse.y" { char * errstr = vstralloc("Invalid command: ", (yyvsp[(1) - (2)].strval), NULL); yyerror(errstr); @@ -2222,35 +2222,35 @@ yyreduce: case 100: /* Line 1806 of yacc.c */ -#line 270 "uparse.y" +#line 271 "uparse.y" { add_property_value((yyvsp[(1) - (2)].strval)); amfree( (yyvsp[(1) - (2)].strval)); } break; case 101: /* Line 1806 of yacc.c */ -#line 271 "uparse.y" +#line 272 "uparse.y" { ; } break; case 102: /* Line 1806 of yacc.c */ -#line 275 "uparse.y" +#line 276 "uparse.y" { amfree((yyvsp[(1) - (2)].strval)); } break; case 103: /* Line 1806 of yacc.c */ -#line 279 "uparse.y" +#line 280 "uparse.y" { amfree((yyvsp[(1) - (2)].strval)); } break; case 104: /* Line 1806 of yacc.c */ -#line 280 "uparse.y" +#line 281 "uparse.y" { ; } break; @@ -2488,7 +2488,7 @@ yyreturn: /* Line 2067 of yacc.c */ -#line 283 "uparse.y" +#line 284 "uparse.y" void diff --git a/recover-src/uparse.h b/recover-src/uparse.h index 9e4d4e7..738d668 100644 --- a/recover-src/uparse.h +++ b/recover-src/uparse.h @@ -119,7 +119,7 @@ typedef union YYSTYPE { /* Line 2068 of yacc.c */ -#line 43 "uparse.y" +#line 44 "uparse.y" int intval; double floatval; diff --git a/recover-src/uparse.y b/recover-src/uparse.y index e947012..a05e536 100644 --- a/recover-src/uparse.y +++ b/recover-src/uparse.y @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998, 2000 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/recover-src/uscan.c b/recover-src/uscan.c index 5821f18..6d1f106 100644 --- a/recover-src/uscan.c +++ b/recover-src/uscan.c @@ -568,6 +568,7 @@ char *yytext; /* * amanda, the advanced maryland automatic network disk archiver * Copyright (c) 1991-2000 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -595,7 +596,7 @@ char *yytext; * * lexer for amrecover interactive language */ -#line 32 "uscan.l" +#line 33 "uscan.l" #include "amanda.h" #include "uparse.h" @@ -625,9 +626,9 @@ int process_line(char *line); -#line 66 "uscan.l" +#line 67 "uscan.l" static char *string_buf = NULL; -#line 631 "uscan.c" +#line 632 "uscan.c" #define INITIAL 0 #define quotedstring 1 @@ -816,14 +817,14 @@ YY_DECL register char *yy_cp, *yy_bp; register int yy_act; -#line 69 "uscan.l" +#line 70 "uscan.l" /* literal keyword tokens */ -#line 827 "uscan.c" +#line 828 "uscan.c" if ( !(yy_init) ) { @@ -908,173 +909,173 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 75 "uscan.l" +#line 76 "uscan.l" { BEGIN(needstring); return LISTHOST; } YY_BREAK case 2: YY_RULE_SETUP -#line 76 "uscan.l" +#line 77 "uscan.l" { BEGIN(needstring); return LISTDISK; } YY_BREAK case 3: YY_RULE_SETUP -#line 77 "uscan.l" +#line 78 "uscan.l" { BEGIN(needstring); return LISTPROPERTY; } YY_BREAK case 4: YY_RULE_SETUP -#line 78 "uscan.l" +#line 79 "uscan.l" { BEGIN(needstring); return SETHOST; } YY_BREAK case 5: YY_RULE_SETUP -#line 79 "uscan.l" +#line 80 "uscan.l" { BEGIN(needstring); return SETDISK; } YY_BREAK case 6: YY_RULE_SETUP -#line 80 "uscan.l" +#line 81 "uscan.l" { BEGIN(needstring); return SETDATE; } YY_BREAK case 7: YY_RULE_SETUP -#line 81 "uscan.l" +#line 82 "uscan.l" { BEGIN(needmode); return SETMODE; } YY_BREAK case 8: YY_RULE_SETUP -#line 82 "uscan.l" +#line 83 "uscan.l" { BEGIN(needstring); return SETTAPE; } YY_BREAK case 9: YY_RULE_SETUP -#line 83 "uscan.l" +#line 84 "uscan.l" { BEGIN(needdevice); return SETDEVICE; } YY_BREAK case 10: YY_RULE_SETUP -#line 84 "uscan.l" +#line 85 "uscan.l" { BEGIN(propertyappend); return SETPROPERTY; } YY_BREAK case 11: YY_RULE_SETUP -#line 85 "uscan.l" +#line 86 "uscan.l" { BEGIN(needstring); return SETTRANSLATE; } YY_BREAK case 12: YY_RULE_SETUP -#line 86 "uscan.l" +#line 87 "uscan.l" { BEGIN(needstring); return DASH_H; } YY_BREAK case 13: YY_RULE_SETUP -#line 87 "uscan.l" +#line 88 "uscan.l" { BEGIN(needstring); return CD; } YY_BREAK case 14: YY_RULE_SETUP -#line 88 "uscan.l" +#line 89 "uscan.l" { BEGIN(needstring); return CDX; } YY_BREAK case 15: YY_RULE_SETUP -#line 89 "uscan.l" +#line 90 "uscan.l" { BEGIN(needstring); return QUIT; } YY_BREAK case 16: YY_RULE_SETUP -#line 90 "uscan.l" +#line 91 "uscan.l" { BEGIN(needstring); return QUIT; } YY_BREAK case 17: YY_RULE_SETUP -#line 91 "uscan.l" +#line 92 "uscan.l" { BEGIN(needstring); return DHIST; } YY_BREAK case 18: YY_RULE_SETUP -#line 92 "uscan.l" +#line 93 "uscan.l" { BEGIN(needstring); return LS; } YY_BREAK case 19: YY_RULE_SETUP -#line 93 "uscan.l" +#line 94 "uscan.l" { BEGIN(needstring); return ADD; } YY_BREAK case 20: YY_RULE_SETUP -#line 94 "uscan.l" +#line 95 "uscan.l" { BEGIN(needstring); return ADDX; } YY_BREAK case 21: YY_RULE_SETUP -#line 95 "uscan.l" +#line 96 "uscan.l" { BEGIN(needstring); return LIST; } YY_BREAK case 22: YY_RULE_SETUP -#line 96 "uscan.l" +#line 97 "uscan.l" { BEGIN(needstring); return DELETE; } YY_BREAK case 23: YY_RULE_SETUP -#line 97 "uscan.l" +#line 98 "uscan.l" { BEGIN(needstring); return DELETEX; } YY_BREAK case 24: YY_RULE_SETUP -#line 98 "uscan.l" +#line 99 "uscan.l" { BEGIN(needstring); return PWD; } YY_BREAK case 25: YY_RULE_SETUP -#line 99 "uscan.l" +#line 100 "uscan.l" { BEGIN(needstring); return CLEAR; } YY_BREAK case 26: YY_RULE_SETUP -#line 100 "uscan.l" +#line 101 "uscan.l" { BEGIN(INITIAL); return HELP; } YY_BREAK case 27: YY_RULE_SETUP -#line 101 "uscan.l" +#line 102 "uscan.l" { BEGIN(needstring); return HELP; } YY_BREAK case 28: YY_RULE_SETUP -#line 102 "uscan.l" +#line 103 "uscan.l" { BEGIN(needstring); return LCD; } YY_BREAK case 29: YY_RULE_SETUP -#line 103 "uscan.l" +#line 104 "uscan.l" { BEGIN(needstring); return LPWD; } YY_BREAK case 30: YY_RULE_SETUP -#line 104 "uscan.l" +#line 105 "uscan.l" { BEGIN(needstring); return EXTRACT; } YY_BREAK case 31: YY_RULE_SETUP -#line 105 "uscan.l" +#line 106 "uscan.l" { BEGIN(needstring); return MODE; } YY_BREAK case 32: YY_RULE_SETUP -#line 106 "uscan.l" +#line 107 "uscan.l" { BEGIN(needstring); return TAR; } YY_BREAK case 33: YY_RULE_SETUP -#line 107 "uscan.l" +#line 108 "uscan.l" { BEGIN(needstring); return SMB; } YY_BREAK case 34: /* rule 34 can match eol */ YY_RULE_SETUP -#line 108 "uscan.l" +#line 109 "uscan.l" { BEGIN(INITIAL); return NL; } YY_BREAK @@ -1082,7 +1083,7 @@ YY_RULE_SETUP case 35: YY_RULE_SETUP -#line 114 "uscan.l" +#line 115 "uscan.l" { BEGIN(propertypriority); return APPEND; @@ -1090,7 +1091,7 @@ YY_RULE_SETUP YY_BREAK case 36: YY_RULE_SETUP -#line 119 "uscan.l" +#line 120 "uscan.l" { BEGIN(needstring); return PRIORITY; @@ -1098,7 +1099,7 @@ YY_RULE_SETUP YY_BREAK case 37: YY_RULE_SETUP -#line 124 "uscan.l" +#line 125 "uscan.l" { if(string_buf != NULL) { g_printf("ERROR:string_buf != NULL: %s\n",string_buf); @@ -1109,14 +1110,14 @@ YY_RULE_SETUP YY_BREAK case 38: YY_RULE_SETUP -#line 132 "uscan.l" +#line 133 "uscan.l" { strappend(string_buf, yytext); } YY_BREAK case 39: YY_RULE_SETUP -#line 136 "uscan.l" +#line 137 "uscan.l" { /* escaped character (including quote) */ strappend(string_buf, yytext); @@ -1124,7 +1125,7 @@ YY_RULE_SETUP YY_BREAK case 40: YY_RULE_SETUP -#line 141 "uscan.l" +#line 142 "uscan.l" { /* saw closing quote - all done */ strappend(string_buf, yytext); yylval.strval = string_buf; @@ -1136,7 +1137,7 @@ YY_RULE_SETUP case 41: /* rule 41 can match eol */ YY_RULE_SETUP -#line 149 "uscan.l" +#line 150 "uscan.l" { fprintf(stderr,"Unterminated quoted string\n"); string_buf = NULL; @@ -1149,7 +1150,7 @@ YY_RULE_SETUP case 42: YY_RULE_SETUP -#line 160 "uscan.l" +#line 161 "uscan.l" { yylval.strval = stralloc(yytext); BEGIN(needstring); @@ -1162,7 +1163,7 @@ YY_RULE_SETUP case 43: /* rule 43 can match eol */ YY_RULE_SETUP -#line 170 "uscan.l" +#line 171 "uscan.l" ; /* whitespace */ YY_BREAK @@ -1176,10 +1177,10 @@ YY_RULE_SETUP case 44: YY_RULE_SETUP -#line 183 "uscan.l" +#line 184 "uscan.l" ECHO; YY_BREAK -#line 1183 "uscan.c" +#line 1184 "uscan.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(quotedstring): case YY_STATE_EOF(needdevice): @@ -2184,7 +2185,7 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 183 "uscan.l" +#line 184 "uscan.l" diff --git a/recover-src/uscan.l b/recover-src/uscan.l index 0e583b8..7bba21f 100644 --- a/recover-src/uscan.l +++ b/recover-src/uscan.l @@ -1,6 +1,7 @@ /* * amanda, the advanced maryland automatic network disk archiver * Copyright (c) 1991-2000 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/server-src/Makefile.in b/server-src/Makefile.in index f6532d0..c902f38 100644 --- a/server-src/Makefile.in +++ b/server-src/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -20,9 +20,10 @@ # vim:ft=automake # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -42,9 +43,10 @@ # vim:ft=automake # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -165,6 +167,23 @@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -381,6 +400,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(amlibdir)" "$(DESTDIR)$(amlibexecdir)" \ "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(amlibexecdir)" \ "$(DESTDIR)$(sbindir)" @@ -478,6 +503,11 @@ DIST_SOURCES = $(libamserver_la_SOURCES) amadmin.c amcheck.c amflush.c \ $(amindexd_SOURCES) amtrmidx.c amtrmlog.c chunker.c \ $(diskfile_SOURCES) driver.c dumper.c $(infofile_SOURCES) \ planner.c +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags @@ -1429,6 +1459,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; +$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/scripts.am $(top_srcdir)/config/automake/installperms.am $(top_srcdir)/config/automake/precompile.am: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -1440,7 +1471,6 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-amlibLTLIBRARIES: $(amlib_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(amlibdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibdir)" @list='$(amlib_LTLIBRARIES)'; test -n "$(amlibdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -1448,6 +1478,8 @@ install-amlibLTLIBRARIES: $(amlib_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(amlibdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(amlibdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(amlibdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(amlibdir)"; \ } @@ -1469,12 +1501,15 @@ clean-amlibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libamserver.la: $(libamserver_la_OBJECTS) $(libamserver_la_DEPENDENCIES) +libamserver.la: $(libamserver_la_OBJECTS) $(libamserver_la_DEPENDENCIES) $(EXTRA_libamserver_la_DEPENDENCIES) $(libamserver_la_LINK) -rpath $(amlibdir) $(libamserver_la_OBJECTS) $(libamserver_la_LIBADD) $(LIBS) install-amlibexecPROGRAMS: $(amlibexec_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(amlibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)" @list='$(amlibexec_PROGRAMS)'; test -n "$(amlibexecdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(amlibexecdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ @@ -1516,8 +1551,11 @@ clean-amlibexecPROGRAMS: rm -f $$list install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ @@ -1557,46 +1595,49 @@ clean-sbinPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -amadmin$(EXEEXT): $(amadmin_OBJECTS) $(amadmin_DEPENDENCIES) +amadmin$(EXEEXT): $(amadmin_OBJECTS) $(amadmin_DEPENDENCIES) $(EXTRA_amadmin_DEPENDENCIES) @rm -f amadmin$(EXEEXT) $(LINK) $(amadmin_OBJECTS) $(amadmin_LDADD) $(LIBS) -amcheck$(EXEEXT): $(amcheck_OBJECTS) $(amcheck_DEPENDENCIES) +amcheck$(EXEEXT): $(amcheck_OBJECTS) $(amcheck_DEPENDENCIES) $(EXTRA_amcheck_DEPENDENCIES) @rm -f amcheck$(EXEEXT) $(LINK) $(amcheck_OBJECTS) $(amcheck_LDADD) $(LIBS) -amflush$(EXEEXT): $(amflush_OBJECTS) $(amflush_DEPENDENCIES) +amflush$(EXEEXT): $(amflush_OBJECTS) $(amflush_DEPENDENCIES) $(EXTRA_amflush_DEPENDENCIES) @rm -f amflush$(EXEEXT) $(LINK) $(amflush_OBJECTS) $(amflush_LDADD) $(LIBS) -amindexd$(EXEEXT): $(amindexd_OBJECTS) $(amindexd_DEPENDENCIES) +amindexd$(EXEEXT): $(amindexd_OBJECTS) $(amindexd_DEPENDENCIES) $(EXTRA_amindexd_DEPENDENCIES) @rm -f amindexd$(EXEEXT) $(LINK) $(amindexd_OBJECTS) $(amindexd_LDADD) $(LIBS) -amtrmidx$(EXEEXT): $(amtrmidx_OBJECTS) $(amtrmidx_DEPENDENCIES) +amtrmidx$(EXEEXT): $(amtrmidx_OBJECTS) $(amtrmidx_DEPENDENCIES) $(EXTRA_amtrmidx_DEPENDENCIES) @rm -f amtrmidx$(EXEEXT) $(LINK) $(amtrmidx_OBJECTS) $(amtrmidx_LDADD) $(LIBS) -amtrmlog$(EXEEXT): $(amtrmlog_OBJECTS) $(amtrmlog_DEPENDENCIES) +amtrmlog$(EXEEXT): $(amtrmlog_OBJECTS) $(amtrmlog_DEPENDENCIES) $(EXTRA_amtrmlog_DEPENDENCIES) @rm -f amtrmlog$(EXEEXT) $(LINK) $(amtrmlog_OBJECTS) $(amtrmlog_LDADD) $(LIBS) -chunker$(EXEEXT): $(chunker_OBJECTS) $(chunker_DEPENDENCIES) +chunker$(EXEEXT): $(chunker_OBJECTS) $(chunker_DEPENDENCIES) $(EXTRA_chunker_DEPENDENCIES) @rm -f chunker$(EXEEXT) $(LINK) $(chunker_OBJECTS) $(chunker_LDADD) $(LIBS) -diskfile$(EXEEXT): $(diskfile_OBJECTS) $(diskfile_DEPENDENCIES) +diskfile$(EXEEXT): $(diskfile_OBJECTS) $(diskfile_DEPENDENCIES) $(EXTRA_diskfile_DEPENDENCIES) @rm -f diskfile$(EXEEXT) $(LINK) $(diskfile_OBJECTS) $(diskfile_LDADD) $(LIBS) -driver$(EXEEXT): $(driver_OBJECTS) $(driver_DEPENDENCIES) +driver$(EXEEXT): $(driver_OBJECTS) $(driver_DEPENDENCIES) $(EXTRA_driver_DEPENDENCIES) @rm -f driver$(EXEEXT) $(LINK) $(driver_OBJECTS) $(driver_LDADD) $(LIBS) -dumper$(EXEEXT): $(dumper_OBJECTS) $(dumper_DEPENDENCIES) +dumper$(EXEEXT): $(dumper_OBJECTS) $(dumper_DEPENDENCIES) $(EXTRA_dumper_DEPENDENCIES) @rm -f dumper$(EXEEXT) $(LINK) $(dumper_OBJECTS) $(dumper_LDADD) $(LIBS) -infofile$(EXEEXT): $(infofile_OBJECTS) $(infofile_DEPENDENCIES) +infofile$(EXEEXT): $(infofile_OBJECTS) $(infofile_DEPENDENCIES) $(EXTRA_infofile_DEPENDENCIES) @rm -f infofile$(EXEEXT) $(LINK) $(infofile_OBJECTS) $(infofile_LDADD) $(LIBS) -planner$(EXEEXT): $(planner_OBJECTS) $(planner_DEPENDENCIES) +planner$(EXEEXT): $(planner_OBJECTS) $(planner_DEPENDENCIES) $(EXTRA_planner_DEPENDENCIES) @rm -f planner$(EXEEXT) $(LINK) $(planner_OBJECTS) $(planner_LDADD) $(LIBS) install-amlibexecSCRIPTS: $(amlibexec_SCRIPTS) @$(NORMAL_INSTALL) - test -z "$(amlibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)" @list='$(amlibexec_SCRIPTS)'; test -n "$(amlibexecdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(amlibexecdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ @@ -1624,13 +1665,14 @@ uninstall-amlibexecSCRIPTS: @list='$(amlibexec_SCRIPTS)'; test -n "$(amlibexecdir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(amlibexecdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(amlibexecdir)" && rm -f $$files + dir='$(DESTDIR)$(amlibexecdir)'; $(am__uninstall_files_from_dir) install-sbinSCRIPTS: $(sbin_SCRIPTS) @$(NORMAL_INSTALL) - test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ @@ -1658,9 +1700,7 @@ uninstall-sbinSCRIPTS: @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(sbindir)" && rm -f $$files + dir='$(DESTDIR)$(sbindir)'; $(am__uninstall_files_from_dir) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -1827,10 +1867,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) diff --git a/server-src/amaddclient.pl b/server-src/amaddclient.pl index 45b161e..d685208 100755 --- a/server-src/amaddclient.pl +++ b/server-src/amaddclient.pl @@ -2,9 +2,10 @@ # # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/server-src/amadmin.c b/server-src/amadmin.c index b7dea49..f51b17e 100644 --- a/server-src/amadmin.c +++ b/server-src/amadmin.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -93,6 +94,7 @@ static gboolean print_default = 1; static gboolean print_source = 0; static int opt_days = -1; static char *opt_sort = NULL; +static gboolean exact_match = FALSE; static gboolean opt_long = 0; static gboolean opt_outdated = 0; @@ -156,6 +158,7 @@ static struct option long_options[] = { {"print-source" , 0, NULL, 3}, {"days" , 1, NULL, 4}, {"sort" , 1, NULL, 5}, + {"exact-match" , 0, NULL, 6}, {NULL, 0, NULL, 0} }; @@ -212,6 +215,8 @@ main( break; case 5: opt_sort = g_strdup(optarg); break; + case 6: exact_match = TRUE; + break; case 'l': opt_long = TRUE; break; case 'd': opt_outdated = TRUE; @@ -291,7 +296,7 @@ usage(void) { int i; - g_fprintf(stderr, _("\nUsage: %s [--version] [--no-default] [--print-source] [-o configoption]*\n {} ...\n"), + g_fprintf(stderr, _("\nUsage: %s [--version] [--exact-match] [--no-default] [--print-source] [-o configoption]*\n {} ...\n"), get_pname()); g_fprintf(stderr, _(" Valid s are:\n")); for (i = 0; i < NCMDS; i++) @@ -369,7 +374,7 @@ diskloop( usage(); } - errstr = match_disklist(&diskq, argc-3, argv+3); + errstr = match_disklist(&diskq, exact_match, argc-3, argv+3); if (errstr) { g_printf("%s", errstr); amfree(errstr); @@ -1197,7 +1202,8 @@ find( } } start_argc=4; - errstr = match_disklist(&diskq, argc-(start_argc-1), argv+(start_argc-1)); + errstr = match_disklist(&diskq, exact_match, argc-(start_argc-1), + argv+(start_argc-1)); /* check all log file exists */ output_find_log = find_log(); @@ -1214,8 +1220,8 @@ find( disk_t *dp; amfree(errstr); - errstr = match_disklist(&diskq, argc-(start_argc-1), - argv+(start_argc-1)); + errstr = match_disklist(&diskq, exact_match, argc-(start_argc-1), + argv+(start_argc-1)); if (errstr) { g_printf("%s", errstr); amfree(errstr); @@ -1250,7 +1256,8 @@ static GSList * get_file_list( int argc, char **argv, - int allow_empty) + int allow_empty, + gboolean exact_match) { GSList * file_list = NULL; GSList * dumplist; @@ -1258,6 +1265,7 @@ get_file_list( flags = CMDLINE_PARSE_DATESTAMP; if (allow_empty) flags |= CMDLINE_EMPTY_TO_WILDCARD; + if (exact_match) flags |= CMDLINE_EXACT_MATCH; dumplist = cmdline_parse_dumpspecs(argc, argv, flags); file_list = cmdline_match_holding(dumplist); @@ -1508,7 +1516,7 @@ holding( _("size (kB)"), _("lv"), _("outd"), _("dump specification")); } - file_list = get_file_list(argc, argv, 1); + file_list = get_file_list(argc, argv, 1, exact_match); for (li = file_list; li != NULL; li = li->next) { char *dumpstr; int is_outdated; @@ -1543,7 +1551,7 @@ holding( case HOLDING_DELETE: argc -= 4; argv += 4; - file_list = get_file_list(argc, argv, 0); + file_list = get_file_list(argc, argv, 0, exact_match); for (li = file_list; li != NULL; li = li->next) { g_fprintf(stderr, _("Deleting '%s'\n"), (char *)li->data); /* remove it from the catalog */ diff --git a/server-src/amcheck-device.pl b/server-src/amcheck-device.pl index 87331a6..b87d0e3 100644 --- a/server-src/amcheck-device.pl +++ b/server-src/amcheck-device.pl @@ -1,9 +1,10 @@ #! @PERL@ # Copyright (c) 2009-2012 Zmanda Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -95,6 +96,17 @@ sub _user_msg_fn { print STDERR "slot $params{'err'}->{'this_slot'}:"; } print STDERR " $params{'err'}\n"; + } elsif (!$params{'res'}) { + my $volume_label = $params{'label'}; + if ($params{'active'}) { + print STDERR " volume '$volume_label' is still active and cannot be overwritten\n"; + } elsif ($params{'does_not_match_labelstr'}) { + print STDERR " volume '$volume_label' does not match labelstr '$params{'labelstr'}'\n"; + } elsif ($params{'not_in_tapelist'}) { + print STDERR " volume '$volume_label' is not in the tapelist\n" + } else { + print STDERR " volume '$volume_label'\n"; + } } else { # res must be defined my $res = $params{'res'}; my $dev = $res->{'device'}; @@ -190,7 +202,8 @@ sub do_check { print "Will $modestr to volume '$label' in slot $slot.\n"; } else { my $header = $res->{'device'}->volume_header(); - if ($header->{'type'} == $Amanda::Header::F_WEIRD) { + if (defined $header and defined $header->{'type'} and + $header->{'type'} == $Amanda::Header::F_WEIRD) { print "Will $modestr label '$label' to non-Amanda volume in slot $slot.\n"; } else { print "Will $modestr label '$label' to new volume in slot $slot.\n"; diff --git a/server-src/amcheck.c b/server-src/amcheck.c index 5393976..87f2d4a 100644 --- a/server-src/amcheck.c +++ b/server-src/amcheck.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-2000 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -71,7 +72,7 @@ int test_server_pgm(FILE *outf, char *dir, char *pgm, int suid, uid_t dumpuid); void usage(void) { - g_printf(_("Usage: amcheck [--version] [-am] [-w] [-sclt] [-M
] [--client-verbose] [-o configoption]* [host [disk]* ]*\n")); + g_printf(_("Usage: amcheck [--version] [-am] [-w] [-sclt] [-M
] [--client-verbose] [--exact_match] [-o configoption]* [host [disk]* ]*\n")); exit(1); /*NOTREACHED*/ } @@ -82,9 +83,11 @@ static char *displayunit; static long int unitdivisor; static int client_verbose = FALSE; +static gboolean exact_match = FALSE; static struct option long_options[] = { {"client-verbose", 0, NULL, 1}, {"version" , 0, NULL, 2}, + {"exact-match" , 0, NULL, 3}, {NULL, 0, NULL, 0} }; @@ -174,6 +177,8 @@ main( case 2: printf("amcheck-%s\n", VERSION); return(0); break; + case 3: exact_match = TRUE; + break; case 'M': if (mailto) { g_printf(_("Multiple -M options\n")); exit(1); @@ -278,7 +283,7 @@ main( conf_ctimeout = (time_t)getconf_int(CNF_CTIMEOUT); - errstr = match_disklist(&origq, argc-1, argv+1); + errstr = match_disklist(&origq, exact_match, argc-1, argv+1); if (errstr) { g_printf(_("%s"),errstr); amfree(errstr); diff --git a/server-src/amcheckdump.pl b/server-src/amcheckdump.pl index 92382e9..e277e24 100644 --- a/server-src/amcheckdump.pl +++ b/server-src/amcheckdump.pl @@ -1,9 +1,10 @@ #! @PERL@ # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -518,7 +519,7 @@ sub main { if ($all_success) { print "All images successfully validated\n"; } else { - print "Some images failed to be correclty validated.\n"; + print "Some images failed to be correctly validated.\n"; $exit_code = 1; } diff --git a/server-src/amcleanup.pl b/server-src/amcleanup.pl index c97f41b..14c9fc6 100644 --- a/server-src/amcleanup.pl +++ b/server-src/amcleanup.pl @@ -1,9 +1,10 @@ #!@PERL@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/server-src/amcleanupdisk.pl b/server-src/amcleanupdisk.pl index 952c5a6..7f4bded 100644 --- a/server-src/amcleanupdisk.pl +++ b/server-src/amcleanupdisk.pl @@ -1,9 +1,10 @@ #!@PERL@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/server-src/amdump.pl b/server-src/amdump.pl index 725fa5b..558a4c7 100644 --- a/server-src/amdump.pl +++ b/server-src/amdump.pl @@ -1,9 +1,10 @@ #! @PERL@ # Copyright (c) 2010-2012 Zmanda Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -23,6 +24,7 @@ use warnings; use Getopt::Long; use POSIX qw(WIFEXITED WEXITSTATUS strftime); +use File::Glob qw( :glob ); use Amanda::Config qw( :init :getconf ); use Amanda::Util qw( :constants ); @@ -36,7 +38,7 @@ use Amanda::Paths; sub usage { my ($msg) = @_; print STDERR < [--no-taper] [--from-client] [-o configoption]* [host/disk]* +Usage: amdump [--no-taper] [--from-client] [--exact-match] [-o configoption]* [host/disk]* EOF print STDERR "$msg\n" if $msg; exit 1; @@ -49,6 +51,7 @@ my @config_overrides_opts; my $opt_no_taper = 0; my $opt_from_client = 0; +my $opt_exact_match = 0; debug("Arguments: " . join(' ', @ARGV)); Getopt::Long::Configure(qw(bundling)); @@ -57,6 +60,7 @@ GetOptions( 'help|usage|?' => \&usage, 'no-taper' => \$opt_no_taper, 'from-client' => \$opt_from_client, + 'exact-match' => \$opt_exact_match, 'o=s' => sub { push @config_overrides_opts, "-o" . $_[1]; add_config_override_opt($config_overrides, $_[1]); @@ -87,7 +91,8 @@ my $timestamp = strftime "%Y%m%d%H%M%S", @now; my $datestamp = strftime "%Y%m%d", @now; my $starttime_locale_independent = strftime "%Y-%m-%d %H:%M:%S %Z", @now; my $trace_log_filename = "$logdir/log"; -my $amdump_log_filename = "$logdir/amdump"; +my $amdump_log_filename_default = "$logdir/amdump"; +my $amdump_log_filename = "$logdir/amdump.$timestamp"; my $exit_code = 0; my $amdump_log = \*STDERR; @@ -165,7 +170,7 @@ EOF } sub do_amcleanup { - return unless -f $amdump_log_filename || -f $trace_log_filename; + return unless -f $amdump_log_filename_default || -f $trace_log_filename; # logfiles are still around. First, try an amcleanup -p to see if # the actual processes are already dead @@ -173,7 +178,7 @@ sub do_amcleanup { run_subprocess("$sbindir/amcleanup", '-p', $config_name, @config_overrides_opts); # and check again - return unless -f $amdump_log_filename || -f $trace_log_filename; + return unless -f $amdump_log_filename_default || -f $trace_log_filename; bail_already_running(); } @@ -201,6 +206,8 @@ sub start_logfiles { # Must be opened in append so that all subprocess can write to it. open($amdump_log, ">>", $amdump_log_filename) or die("could not open amdump log file '$amdump_log_filename': $!"); + unlink $amdump_log_filename_default; + symlink $amdump_log_filename, $amdump_log_filename_default; } sub planner_driver_pipeline { @@ -208,6 +215,7 @@ sub planner_driver_pipeline { my $driver = "$amlibexecdir/driver"; my @no_taper = $opt_no_taper? ('--no-taper'):(); my @from_client = $opt_from_client? ('--from-client'):(); + my @exact_match = $opt_exact_match? ('--exact-match'):(); check_exec($planner); check_exec($driver); @@ -229,7 +237,7 @@ sub planner_driver_pipeline { close($amdump_log); exec $planner, # note that @no_taper must follow --starttime - $config_name, '--starttime', $timestamp, @no_taper, @from_client, @config_overrides_opts, @hostdisk; + $config_name, '--starttime', $timestamp, @no_taper, @from_client, @exact_match, @config_overrides_opts, @hostdisk; die "Could not exec $planner: $!"; } debug(" planner: $pl_pid"); @@ -291,15 +299,19 @@ sub trim_indexes { sub roll_amdump_logs { debug("renaming amdump log and trimming old amdump logs (beyond tapecycle+2)"); - # rename all the way along the tapecycle + unlink "$amdump_log_filename_default.1"; + rename $amdump_log_filename_default, "$amdump_log_filename_default.1"; + + # keep the latest tapecycle files. + my @files = sort {-M $b <=> -M $a} grep { !/^\./ && -f "$_"} <$logdir/amdump.*>; my $days = getconf($CNF_TAPECYCLE) + 2; for (my $i = $days-1; $i >= 1; $i--) { - next unless -f "$amdump_log_filename.$i"; - rename("$amdump_log_filename.$i", "$amdump_log_filename.".($i+1)); + my $a = pop @files; + } + foreach my $name (@files) { + unlink $name; + amdump_log("unlink $name"); } - - # now swap the current logfile in - rename("$amdump_log_filename", "$amdump_log_filename.1"); } # now do the meat of the amdump work; these operations are ported directly diff --git a/server-src/amdumpd.pl b/server-src/amdumpd.pl index 2778634..0d9b4db 100644 --- a/server-src/amdumpd.pl +++ b/server-src/amdumpd.pl @@ -1,9 +1,10 @@ #! @PERL@ # Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/server-src/amfetchdump.pl b/server-src/amfetchdump.pl index 652f619..df12800 100644 --- a/server-src/amfetchdump.pl +++ b/server-src/amfetchdump.pl @@ -1,9 +1,10 @@ #! @PERL@ # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -22,6 +23,9 @@ use strict; use warnings; use Getopt::Long; +use File::Basename; +use XML::Simple; +use IPC::Open3; use Amanda::Device qw( :constants ); use Amanda::Debug qw( :logging ); @@ -37,6 +41,7 @@ use Amanda::Xfer qw( :constants ); use Amanda::Recovery::Planner; use Amanda::Recovery::Clerk; use Amanda::Recovery::Scan; +use Amanda::Extract; # Interactivity package package Amanda::Interactivity::amfetchdump; @@ -113,10 +118,12 @@ sub usage { my ($msg) = @_; print STDERR < \$opt_decompress, 'server-decompress' => \$opt_server_decompress, 'client-decompress' => \$opt_client_decompress, + 'extract' => \$opt_extract, + 'directory=s' => \$opt_directory, + 'data-path=s' => \$opt_data_path, + 'application-property=s' => \%application_property, + 'exact-match' => \$opt_exact_match, 'b=s' => \$opt_blocksize, 'd=s' => \$opt_device, 'O=s' => \$opt_chdir, @@ -187,6 +201,10 @@ usage("-h, --header-file, and --header-fd are mutually incompatible") if (($opt_header and ($opt_header_file or $opt_header_fd)) or ($opt_header_file and $opt_header_fd)); + $opt_data_path = lc($opt_data_path) if defined ($opt_data_path); +usage("--data_path must be 'amanda' or 'directtcp'") + if (defined $opt_data_path and $opt_data_path ne 'directtcp' and $opt_data_path ne 'amanda'); + if (defined $opt_leave) { if (defined $opt_decrypt and $opt_decrypt) { print STDERR "-l is incompatible with --decrypt\n"; @@ -214,6 +232,38 @@ if (defined $opt_leave) { } } +if (( defined $opt_directory and !defined $opt_extract) or + (!defined $opt_directory and defined $opt_extract)) { + print STDERR "Both --directorty and --extract must be set\n"; + usage(); +} +if (defined $opt_directory and defined $opt_extract) { + $opt_decrypt = 1; + if (defined $opt_server_decrypt or defined $opt_client_decrypt) { + print STDERR "--server_decrypt or --client-decrypt is incompatible with --extract\n"; + usage(); + } + $opt_decompress = 1; + if (defined $opt_server_decompress || defined $opt_client_decompress) { + print STDERR "--server-decompress r --client-decompress is incompatible with --extract\n"; + usage(); + } + if (defined($opt_leave) + + defined($opt_compress) + + defined($opt_compress_best)) { + print STDERR "Can't use -l -c or -C with --extract\n"; + usage(); + } + if (defined $opt_pipe) { + print STDERR "--pipe is incompatible with --extract\n"; + usage(); + } + if (defined $opt_header) { + print STDERR "--header is incompatible with --extract\n"; + usage(); + } +} + if (defined($opt_decrypt) + defined($opt_server_decrypt) + defined($opt_client_decrypt) > 1) { @@ -260,8 +310,10 @@ $decompress = $ONLY_SERVER if defined $opt_server_decompress; $decompress = $ONLY_CLIENT if defined $opt_client_decompress; usage("must specify at least a hostname") unless @ARGV; -@opt_dumpspecs = Amanda::Cmdline::parse_dumpspecs([@ARGV], - $Amanda::Cmdline::CMDLINE_PARSE_DATESTAMP | $Amanda::Cmdline::CMDLINE_PARSE_LEVEL); +my $cmd_flags = $Amanda::Cmdline::CMDLINE_PARSE_DATESTAMP | + $Amanda::Cmdline::CMDLINE_PARSE_LEVEL; +$cmd_flags |= $Amanda::Cmdline::CMDLINE_EXACT_MATCH if $opt_exact_match; +@opt_dumpspecs = Amanda::Cmdline::parse_dumpspecs([@ARGV], $cmd_flags); set_config_overrides($config_overrides); config_init($CONFIG_INIT_EXPLICIT_NAME, $opt_config); @@ -277,9 +329,11 @@ Amanda::Util::finish_setup($RUNNING_AS_DUMPUSER); my $exit_status = 0; my $clerk; +use Data::Dumper; sub failure { my ($msg, $finished_cb) = @_; print STDERR "ERROR: $msg\n"; + debug("FAILURE: $msg"); $exit_status = 1; if ($clerk) { $clerk->quit(finished_cb => sub { @@ -338,6 +392,8 @@ sub main { my $timer; my $is_tty; my $delay; + my $directtcp = 0; + my @directtcp_command; my $steps = define_steps cb_ref => \$finished_cb; @@ -446,10 +502,105 @@ sub main { my ($errs, $hdr, $xfer_src, $directtcp_supported) = @_; return failure(join("; ", @$errs), $finished_cb) if $errs; + my $dle_str = $hdr->{'dle_str'}; + my $p1 = XML::Simple->new(); + my $dle = $p1->XMLin($dle_str); + # and set up the destination.. my $dest_fh; - if ($opt_pipe) { + my $xfer_dest; + my @filters; + + if (defined $opt_data_path and $opt_data_path eq 'directtcp' and !$directtcp_supported) { + return failure("The device can't do directtcp", $finished_cb); + } + $directtcp_supported = 0 if defined $opt_data_path and $opt_data_path eq 'amanda'; + if ($opt_extract) { + my $program = uc(basename($hdr->{program})); + my @argv; + if ($program ne "APPLICATION") { + $directtcp_supported = 0; + my %validation_programs = ( + "STAR" => [ $Amanda::Constants::STAR, qw(-x -f -) ], + "DUMP" => [ $Amanda::Constants::RESTORE, qw(xbf 2 -) ], + "VDUMP" => [ $Amanda::Constants::VRESTORE, qw(xf -) ], + "VXDUMP" => [ $Amanda::Constants::VXRESTORE, qw(xbf 2 -) ], + "XFSDUMP" => [ $Amanda::Constants::XFSRESTORE, qw(-v silent) ], + "TAR" => [ $Amanda::Constants::GNUTAR, qw(--ignore-zeros -xf -) ], + "GTAR" => [ $Amanda::Constants::GNUTAR, qw(--ignore-zeros -xf -) ], + "GNUTAR" => [ $Amanda::Constants::GNUTAR, qw(--ignore-zeros -xf -) ], + "SMBCLIENT" => [ $Amanda::Constants::GNUTAR, qw(-xf -) ], + "PKZIP" => undef, + ); + if (!exists $validation_programs{$program}) { + return failure("Unknown program '$program' in header; no validation to perform", + $finished_cb); + } + @argv = $validation_programs{$program}; + } else { + if (!defined $hdr->{application}) { + return failure("Application not set", $finished_cb); + } + my $program_path = $Amanda::Paths::APPLICATION_DIR . "/" . + $hdr->{application}; + if (!-x $program_path) { + return failure("Application '" . $hdr->{application} . + "($program_path)' not available on the server", + $finished_cb); + } + my %bsu_argv; + $bsu_argv{'application'} = $hdr->{application}; + $bsu_argv{'config'} = $opt_config; + $bsu_argv{'host'} = $hdr->{'name'}; + $bsu_argv{'disk'} = $hdr->{'disk'}; + $bsu_argv{'device'} = $dle->{'diskdevice'} if defined $dle->{'diskdevice'}; + my ($bsu, $err) = Amanda::Extract::BSU(%bsu_argv); + if (defined $opt_data_path and $opt_data_path eq 'directtcp' and + !$bsu->{'data-path-directtcp'}) { + return failure("The application can't do directtcp", $finished_cb); + } + if ($directtcp_supported and !$bsu->{'data-path-directtcp'}) { + # application do not support directtcp + $directtcp_supported = 0; + } + + push @argv, $program_path, "restore"; + push @argv, "--config", $opt_config; + push @argv, "--host", $hdr->{'name'}; + push @argv, "--disk", $hdr->{'disk'}; + push @argv, "--device", $dle->{'diskdevice'} if defined ($dle->{'diskdevice'}); + push @argv, "--level", $hdr->{'dumplevel'}; + push @argv, "--directory", $opt_directory; + + # add application_property + while (my($name, $value) = each(%application_property)) { + push @argv, "--".$name, $value if $value; + } + + #merge property from header; + while (my($name, $value) = each (%{$dle->{'backup-program'}->{'property'}})) { + if (!exists $application_property{$name}) { + push @argv, "--".$name, $value->{'value'}; + } + } + + } + $directtcp = $directtcp_supported; + if ($directtcp_supported) { + $xfer_dest = Amanda::Xfer::Dest::DirectTCPListen->new(); + @directtcp_command = @argv; + } else { + # set up the extraction command as a filter element, since + # we need its stderr. + debug("Running: ". join(' ',@argv)); + push @filters, Amanda::Xfer::Filter::Process->new(\@argv, 0); + + $dest_fh = \*STDOUT; + $xfer_dest = Amanda::Xfer::Dest::Fd->new($dest_fh); + } + } elsif ($opt_pipe) { $dest_fh = \*STDOUT; + $xfer_dest = Amanda::Xfer::Dest::Fd->new($dest_fh); } else { my $filename = sprintf("%s.%s.%s.%d", $hdr->{'name'}, @@ -469,6 +620,7 @@ sub main { if (!open($dest_fh, ">", $filename)) { return failure("Could not open '$filename' for writing: $!", $finished_cb); } + $xfer_dest = Amanda::Xfer::Dest::Fd->new($dest_fh); } $timer = Amanda::MainLoop::timeout_source($delay); @@ -481,12 +633,7 @@ sub main { } }); - my $xfer_dest = Amanda::Xfer::Dest::Fd->new($dest_fh); - - my $dle = $hdr->get_dle(); - # set up any filters that need to be applied; decryption first - my @filters; if ($hdr->{'encrypted'} and (($hdr->{'srv_encrypt'} and ($decrypt == $ALWAYS || $decrypt == $ONLY_SERVER)) || ($hdr->{'clnt_encrypt'} and ($decrypt == $ALWAYS || $decrypt == $ONLY_CLIENT)))) { @@ -514,10 +661,10 @@ sub main { if ($hdr->{'compressed'} and not $opt_compress and (($hdr->{'srvcompprog'} and ($decompress == $ALWAYS || $decompress == $ONLY_SERVER)) || ($hdr->{'clntcompprog'} and ($decompress == $ALWAYS || $decompress == $ONLY_CLIENT)) || - ($dle->{'compress'} == $Amanda::Config::COMP_SERVER_FAST and ($decompress == $ALWAYS || $decompress == $ONLY_SERVER)) || - ($dle->{'compress'} == $Amanda::Config::COMP_SERVER_BEST and ($decompress == $ALWAYS || $decompress == $ONLY_SERVER)) || - ($dle->{'compress'} == $Amanda::Config::COMP_FAST and ($decompress == $ALWAYS || $decompress == $ONLY_CLIENT)) || - ($dle->{'compress'} == $Amanda::Config::COMP_BEST and ($decompress == $ALWAYS || $decompress == $ONLY_CLIENT)))) { + ($dle->{'compress'} and $dle->{'compress'} eq "SERVER-FAST" and ($decompress == $ALWAYS || $decompress == $ONLY_SERVER)) || + ($dle->{'compress'} and $dle->{'compress'} eq "SERVER-BEST" and ($decompress == $ALWAYS || $decompress == $ONLY_SERVER)) || + ($dle->{'compress'} and $dle->{'compress'} eq "FAST" and ($decompress == $ALWAYS || $decompress == $ONLY_CLIENT)) || + ($dle->{'compress'} and $dle->{'compress'} eq "BEST" and ($decompress == $ALWAYS || $decompress == $ONLY_CLIENT)))) { # need to uncompress this file if ($hdr->{'encrypted'}) { print "Not decompressing because the backup image is not decrypted\n"; @@ -598,20 +745,74 @@ sub main { $buffer .= $b; if ($b eq "\n") { my $line = $buffer; - print STDERR "filter stderr: $line"; chomp $line; - debug("filter stderr: $line"); + if (length($line) > 1) { + print STDERR "filter stderr: $line\n"; + debug("filter stderr: $line"); + } $buffer = ""; } } }); } - my $xfer = Amanda::Xfer->new([ $xfer_src, @filters, $xfer_dest ]); + my $xfer; + if (@filters) { + $xfer = Amanda::Xfer->new([ $xfer_src, @filters, $xfer_dest ]); + } else { + $xfer = Amanda::Xfer->new([ $xfer_src, $xfer_dest ]); + } $xfer->start($steps->{'handle_xmsg'}, 0, $current_dump->{'bytes'}); $clerk->start_recovery( xfer => $xfer, recovery_cb => $steps->{'recovery_cb'}); + if ($directtcp) { + my $addr = $xfer_dest->get_addrs(); + push @directtcp_command, "--data-path", "DIRECTTCP"; + push @directtcp_command, "--direct-tcp", "$addr->[0]->[0]:$addr->[0]->[1]"; + debug("Running: ". join(' ', @directtcp_command)); + + my ($wtr, $rdr); + my $err = Symbol::gensym; + my $amndmp_pid = open3($wtr, $rdr, $err, @directtcp_command); + $amndmp_pid = $amndmp_pid; + my $file_to_close = 2; + my $amndmp_stdout_src = Amanda::MainLoop::fd_source($rdr, + $G_IO_IN|$G_IO_HUP|$G_IO_ERR); + my $amndmp_stderr_src = Amanda::MainLoop::fd_source($err, + $G_IO_IN|$G_IO_HUP|$G_IO_ERR); + + $amndmp_stdout_src->set_callback( sub { + my $line = <$rdr>; + if (!defined $line) { + $file_to_close--; + $amndmp_stdout_src->remove(); + if ($file_to_close == 0) { + #abort the xfer + $xfer->cancel() if $xfer->get_status != $XFER_DONE; + } + return; + } + chomp $line; + debug("amndmp stdout: $line"); + print "$line\n"; + }); + $amndmp_stderr_src->set_callback( sub { + my $line = <$err>; + if (!defined $line) { + $file_to_close--; + $amndmp_stderr_src->remove(); + if ($file_to_close == 0) { + #abort the xfer + $xfer->cancel() if $xfer->get_status != $XFER_DONE; + } + return; + } + chomp $line; + debug("amndmp stderr: $line"); + print STDERR "$line\n"; + }); + } }; step handle_xmsg => sub { diff --git a/server-src/amflush.c b/server-src/amflush.c index 8403ac2..481ff28 100644 --- a/server-src/amflush.c +++ b/server-src/amflush.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -44,6 +45,7 @@ static struct option long_options[] = { {"version" , 0, NULL, 1}, + {"exact-match" , 0, NULL, 2}, {NULL, 0, NULL, 0} }; @@ -100,6 +102,7 @@ main( char **config_options; find_result_t *holding_files; disklist_t holding_disklist = { NULL, NULL }; + gboolean exact_match = FALSE; /* * Configure program for internationalization: @@ -133,7 +136,8 @@ main( case 1 : printf("amflush-%s\n", VERSION); return(0); break; - + case 2 : exact_match = TRUE; + break; case 'b': batch = 1; break; case 'f': foreground = 1; @@ -161,7 +165,7 @@ main( } if(argc < 1) { - error(_("Usage: amflush [-b] [-f] [-s] [-D date]* [-o configoption]* [host [disk]* ]*")); + error(_("Usage: amflush [-b] [-f] [-s] [-D date]* [--exact-match] [-o configoption]* [host [disk]* ]*")); /*NOTREACHED*/ } @@ -191,7 +195,7 @@ main( * dumps will be filtered properly by match_disklist, setting the dp->todo * flag appropriately. */ - errstr = match_disklist(&diskq, argc-1, argv+1); + errstr = match_disklist(&diskq, exact_match, argc-1, argv+1); if (errstr) { g_printf(_("%s"),errstr); amfree(errstr); @@ -290,10 +294,19 @@ main( for(dp = diskq.head; dp != NULL; dp = dp->next) { if(dp->todo) { - char *qname; - qname = quote_string(dp->name); - log_add(L_DISK, "%s %s", dp->host->hostname, qname); - amfree(qname); + /* is it holding_list */ + for (holding_file=holding_list; holding_file != NULL; + holding_file = holding_file->next) { + dumpfile_t file; + holding_file_get_dumpfile((char *)holding_file->data, &file); + if (g_str_equal(dp->host->hostname, file.name) && + g_str_equal(dp->name, file.disk)) { + char *qname; + qname = quote_string(dp->name); + log_add(L_DISK, "%s %s", dp->host->hostname, qname); + amfree(qname); + } + } } } diff --git a/server-src/amidxtaped.pl b/server-src/amidxtaped.pl index 54fe4bd..79ea978 100644 --- a/server-src/amidxtaped.pl +++ b/server-src/amidxtaped.pl @@ -1,9 +1,10 @@ #! @PERL@ # Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/server-src/amindex.c b/server-src/amindex.c index e71fc01..c87c22b 100644 --- a/server-src/amindex.c +++ b/server-src/amindex.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/server-src/amindex.h b/server-src/amindex.h index 1356910..0e32101 100644 --- a/server-src/amindex.h +++ b/server-src/amindex.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/server-src/amindexd.c b/server-src/amindexd.c index 91d7db6..6f2e517 100644 --- a/server-src/amindexd.c +++ b/server-src/amindexd.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/server-src/amlabel.pl b/server-src/amlabel.pl index a054975..ce07c8c 100644 --- a/server-src/amlabel.pl +++ b/server-src/amlabel.pl @@ -1,9 +1,10 @@ #! @PERL@ # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/server-src/amlogroll.pl b/server-src/amlogroll.pl index bc5cdcc..00dd59d 100644 --- a/server-src/amlogroll.pl +++ b/server-src/amlogroll.pl @@ -1,9 +1,10 @@ #! @PERL@ # Copyright (c) 2010-2012 Zmanda Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/server-src/amoverview.pl b/server-src/amoverview.pl index 54d8153..eb53a3f 100644 --- a/server-src/amoverview.pl +++ b/server-src/amoverview.pl @@ -1,9 +1,10 @@ #!@PERL@ # Copyright (c) 2010-2012 Zmanda Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/server-src/amreport.pl b/server-src/amreport.pl index cd0432f..b2913eb 100755 --- a/server-src/amreport.pl +++ b/server-src/amreport.pl @@ -1,9 +1,10 @@ #! @PERL@ # Copyright (c) 2010-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/server-src/amrestore.pl b/server-src/amrestore.pl index 879aec4..b9cde45 100644 --- a/server-src/amrestore.pl +++ b/server-src/amrestore.pl @@ -1,9 +1,10 @@ #! @PERL@ # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -42,7 +43,7 @@ sub usage { print STDERR "$msg\n" if $msg; print STDERR < \&usage, 'config=s' => \$opt_config, 'holding' => \$opt_holding, + 'exact-match' => \$opt_exact_match, 'b=i' => \$opt_blocksize, 'r' => \$opt_raw, 'c' => \$opt_compress, @@ -87,8 +89,9 @@ if (!$opt_holding) { if (Amanda::Holding::get_header($opt_restore_src)); } -my @opt_dumpspecs = Amanda::Cmdline::parse_dumpspecs([@ARGV], - $Amanda::Cmdline::CMDLINE_PARSE_DATESTAMP); +my $cmd_flags = $Amanda::Cmdline::CMDLINE_PARSE_DATESTAMP; +$cmd_flags |= $Amanda::Cmdline::CMDLINE_EXACT_MATCH if $opt_exact_match; +my @opt_dumpspecs = Amanda::Cmdline::parse_dumpspecs([@ARGV], $cmd_flags); usage("Cannot check a label on a holding-disk file") if ($opt_holding and $opt_label); diff --git a/server-src/amrmtape.pl b/server-src/amrmtape.pl index f7d3708..2f9ec57 100644 --- a/server-src/amrmtape.pl +++ b/server-src/amrmtape.pl @@ -2,9 +2,10 @@ # # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -47,26 +48,6 @@ my $changer_name; my $keep_label; my $verbose = 1; my $help; -my $logdir; -my $log_file; -my $log_created = 0; - -sub die_handler { - if ($log_created == 1) { - unlink $log_file; - $log_created = 0; - } -} -$SIG{__DIE__} = \&die_handler; - -sub int_handler { - if ($log_created == 1) { - unlink $log_file; - $log_created = 0; - } - die "Interrupted\n"; -} -$SIG{INT} = \&int_handler; sub usage() { print <= $CFGERR_WARNINGS) { } Amanda::Util::finish_setup($RUNNING_AS_DUMPUSER); -$logdir = config_dir_relative(getconf($CNF_LOGDIR)); -$log_file = "$logdir/log"; - -if ($erase) { - # Check for log file existance - if (-e $log_file) { - `amcleanup -p $config_name`; - } - - if (-e $log_file) { - local *LOG; - open(LOG, $log_file); - my $info_line = ; - close LOG; - $info_line =~ /^INFO (.*) .* pid .*$/; - my $process_name = $1; - print "$process_name is running, or you must run amcleanup\n"; - exit 1; - } -} # amadmin may later try to load this and will die if it has errors # load it now to catch the problem sooner (before we might erase data) @@ -208,11 +169,12 @@ my $scrub_db = sub { $tapelist->write(); } - my $tmp_curinfo_file = "$AMANDA_TMPDIR/curinfo-amrmtape-" . time(); + my $tmp_curinfo_file = "$AMANDA_TMPDIR/curinfo-amrmtape-" . time() . "-" . $$; unless (open(AMADMIN, "$amadmin $config_name export |")) { die "Failed to execute $amadmin: $! $?"; } - open(CURINFO, ">$tmp_curinfo_file"); + open(CURINFO, ">$tmp_curinfo_file") or + die "Failed to open $tmp_curinfo_file for writing: $! $?"; sub info_line($) { print CURINFO "$_[0]"; @@ -294,11 +256,6 @@ my $scrub_db = sub { my $erase_volume = make_cb('erase_volume' => sub { if ($erase) { - $log_created = 1; - local *LOG; - open(LOG, ">$log_file"); - print LOG "INFO amrmtape amrmtape pid $$\n"; - close LOG; my $chg = Amanda::Changer->new($changer_name, tapelist => $tapelist); $chg->load( 'label' => $label, @@ -349,9 +306,4 @@ my $erase_volume = make_cb('erase_volume' => sub { $erase_volume->(); Amanda::MainLoop::run(); -if ($log_created == 1) { - unlink $log_file; - $log_created = 0; -} - Amanda::Util::finish_application(); diff --git a/server-src/amserverconfig.pl b/server-src/amserverconfig.pl index a05dd18..cef77e3 100755 --- a/server-src/amserverconfig.pl +++ b/server-src/amserverconfig.pl @@ -2,9 +2,10 @@ # # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/server-src/amstatus.pl b/server-src/amstatus.pl index 443e7e5..2dc19f9 100644 --- a/server-src/amstatus.pl +++ b/server-src/amstatus.pl @@ -191,7 +191,7 @@ else { open(AMDUMP,"<$errfile") || die("$errfile: $!"); print "Using $errfile\n"; -my $taper_status_file; +my %taper_status_file; $start_degraded_mode = 0; @@ -397,6 +397,7 @@ while($lineX = ) { $partition = $line[11]; $hostpart=&make_hostpart($host,$partition,$gdatestamp); $serial=$line[7]; + $dumper_to_serial{$line[5]} = $serial; $dump_started{$hostpart}=1; $dump_time{$hostpart}=$current_time; $dump_finished{$hostpart}=0; @@ -427,6 +428,7 @@ while($lineX = ) { $partition=$line[11]; $hostpart=&make_hostpart($host,$partition,$gdatestamp); $serial=$line[7]; + $chunker_to_serial{$line[5]} = $serial; $serial{$serial}=$hostpart; $holding_file{$hostpart}=$line[8]; #$chunk_started{$hostpart}=1; @@ -466,6 +468,7 @@ while($lineX = ) { } elsif($line[6] eq "FILE-WRITE") { #7:name 8:handle 9:filename 10:host 11:disk 12:level 13:datestamp 14:splitsize + $name=$line[7]; $serial=$line[8]; $host=$line[10]; $partition=$line[11]; @@ -485,10 +488,13 @@ while($lineX = ) { $taper_finished{$hostpart}=0; $taper_time{$hostpart}=$current_time; $taper_error{$hostpart}=""; - $ntchunk_size = 0; + $taper_name{$hostpart} = $name; + $worker_to_serial{$name} = $serial; + $tapedsize{$hostpart} = 0; } elsif($line[6] eq "PORT-WRITE") { #7:name 8:handle 9:host 10:disk 11:level 12:datestamp 13:splitsize 14:diskbuffer 15:fallback_splitsize + $name=$line[7]; $serial=$line[8]; $host=$line[9]; $partition=$line[10]; @@ -501,8 +507,22 @@ while($lineX = ) { $taper_finished{$hostpart}=0; $taper_time{$hostpart}=$current_time; $taper_error{$hostpart}=""; + $taper_name{$hostpart} = $name; + $worker_to_serial{$name} = $serial; + $tapedsize{$hostpart} = 0; $size{$hostpart} = 0; - $ntchunk_size = 0; + } + elsif($line[6] eq "TAKE-SCRIBE-FROM") { + #7:name1 #8:handle #9:name2 + $name1=$line[7]; + $serial=$line[8]; + $name2=$line[9]; + $hostpart=$serial{$serial}; + $taper_nb{$name1} = $taper_nb{$name2}; + $taper_nb{$name2} = 0; + if (defined $hostpart) { + $error{$hostpart} = $olderror{$hostpart}; + } } } } @@ -510,6 +530,11 @@ while($lineX = ) { #print "result: " , $line[5] . " " . $line[6] . " " . $line[7] . "\n" if defined $line[5] && defined $line[6] && defined $line[7]; $current_time = $line[3]; if($line[5] =~ /dumper\d+/) { + if($line[6] eq "(eof)") { + $line[6] = "FAILED"; + $line[7] = $dumper_to_serial{$line[5]}; + $line[8] = "dumper CRASH"; + } if($line[6] eq "FAILED" || $line[6] eq "TRY-AGAIN") { #7:handle 8:message $serial = $line[7]; @@ -561,6 +586,11 @@ while($lineX = ) { } } elsif($line[5] =~ /chunker\d+/) { + if($line[6] eq "(eof)") { + $line[6] = "FAILED"; + $line[7] = $chunker_to_serial{$line[5]}; + $line[8] = "chunker CRASH"; + } if($line[6] eq "DONE" || $line[6] eq "PARTIAL") { #7:handle 8:size $serial=$line[7]; @@ -601,7 +631,24 @@ while($lineX = ) { } } elsif($line[5] eq "taper") { - if($line[6] eq "DONE" || $line[6] eq "PARTIAL") { + if($line[6] eq "(eof)") { + # all worker fail + foreach $worker (keys %worker_to_serial) { + $serial = $worker_to_serial{$worker}; + $hostpart=$serial{$serial}; + if(defined $hostpart) { + $error= "taper CRASH"; + $taper_finished{$hostpart} = -2; + $status_taper = $error; + $busy_time{"taper"}+=($current_time-$taper_time{$hostpart}); + $taper_time{$hostpart}=$current_time; + $error{$hostpart}="$error"; + undef $worker_to_serial{$worker}; + } + undef $taper_status_file{$hostpart}; + } + } + elsif($line[6] eq "DONE" || $line[6] eq "PARTIAL") { #DONE: 7:handle 8:label 9:filenum 10:errstr #PARTIAL: 7:handle 8:INPUT-* 9:TAPE-* 10:errstr 11:INPUT-MSG 12:TAPE-MSG $serial=$line[7]; @@ -620,14 +667,8 @@ while($lineX = ) { if(!defined $size{$hostpart}) { $size{$hostpart}=$size; } - $ntpartition{$nb_tape}++; - $ntsize{$nb_tape} += $size{$hostpart} - $ntchunk_size; - if(defined $esize{$hostpart} && $esize{$hostpart} > 1) { - $ntesize{$nb_tape} += $esize{$hostpart} - $ntchunk_size; - } - else { - $ntesize{$nb_tape} += $size{$hostpart} - $ntchunk_size; - } + $ntape = $taper_nb{$taper_name{$hostpart}}; + $ntpartition{$ntape}++ if defined $ntape; if ($line[6] eq "PARTIAL") { $partial{$hostpart} = 1; if ($line[9] eq "TAPE-ERROR") { @@ -638,10 +679,8 @@ while($lineX = ) { else { $partial{$hostpart} = 0; } - if ($ntchunk_size > 0) { - $ntchunk{$nb_tape}++; - } - undef $taper_status_file; + undef $taper_status_file{$hostpart}; + undef $worker_to_serial{$taper_name{$hostpart}}; } elsif($line[6] eq "PARTDONE") { #7:handle 8:label 9:filenum 10:ksize 11:errstr @@ -651,10 +690,10 @@ while($lineX = ) { #$size=$1 / $unitdivisor; $size=$line[10] / $unitdivisor; $tapedsize{$hostpart} += $size; - $ntchunk{$nb_tape}++; - $ntsize{$nb_tape} += $size; - $ntesize{$nb_tape} += $size; - $ntchunk_size += $size; + $ntape = $taper_nb{$taper_name{$hostpart}}; + $ntchunk{$ntape}++; + $ntsize{$ntape} += $size; + $ntesize{$ntape} += $size; } elsif($line[6] eq "REQUEST-NEW-TAPE") { #7:serial @@ -662,7 +701,8 @@ while($lineX = ) { $old_status_taper = $status_taper; $status_taper = "Asking for a new tape"; $hostpart=$serial{$serial}; - if (defined $hostpart) { + if (defined $hostpart and + !defined($olderror{$hostpart})) { $olderror{$hostpart} = $error{$hostpart}; $error{$hostpart} = "waiting for a new tape"; } @@ -672,6 +712,13 @@ while($lineX = ) { $serial=$line[7]; $status_taper = $old_status_taper; $hostpart=$serial{$serial}; + $nb_tape++; + $taper_nb{$taper_name{$hostpart}} = $nb_tape; + $label = $line[8]; + $ntlabel{$nb_tape} = $label; + $ntpartition{$nb_tape} = 0; + $ntsize{$nb_tape} = 0; + $ntesize{$nb_tape} = 0; if (defined $hostpart) { $error{$hostpart} = $olderror{$hostpart}; } @@ -685,20 +732,26 @@ while($lineX = ) { $error=$line[8]; $status_taper = $error; $exit_status |= $STATUS_TAPE; - undef $taper_status_file; + undef $taper_status_file{$hostpart}; } elsif($line[6] eq "FAILED") { #7:handle 8:INPUT- 9:TAPE- 10:input_message 11:tape_message - $serial=$line[7]; + $serial=$line[7]; $hostpart=$serial{$serial}; if(defined $hostpart) { if($line[9] eq "TAPE-ERROR") { $error=$line[11]; $taper_finished{$hostpart} = -2; $status_taper = $error; - } - else { - $error=$line[10]; + } elsif($line[9] eq "TAPE-CONFIG") { + $tape_config{$hostpart} = $error; + $error=$line[11]; + $tape_config{$hostpart} = $error; + $taper_finished{$hostpart} = -2; + $status_taper = $error; + } else { # INPUT-ERROR + $error = $line[10]; + $error = $error{$hostpart} if defined $error{$hostpart}; $taper_finished{$hostpart} = -1; $status_taper = "Idle"; } @@ -706,7 +759,8 @@ while($lineX = ) { $taper_time{$hostpart}=$current_time; $error{$hostpart}="$error"; } - undef $taper_status_file; + undef $taper_status_file{$hostpart}; + undef $worker_to_serial{$taper_name{$hostpart}}; } } } @@ -757,7 +811,7 @@ while($lineX = ) { } } } - elsif($line[1] eq "FINISHED") { + elsif($line[1] eq "FINISHED") { $driver_finished = 1; } } @@ -775,16 +829,21 @@ while($lineX = ) { elsif($line[0] eq "taper") { if($line[1] eq "wrote") { #1:"wrote" 2:"label" 3:label - $nb_tape++; - $label = $line[3]; - $ntlabel{$nb_tape} = $label; - $ntpartition{$nb_tape} = 0; - $ntsize{$nb_tape} = 0; - $ntesize{$nb_tape} = 0; + #$nb_tape++; + #$label = $line[3]; + #$ntlabel{$nb_tape} = $label; + #$ntpartition{$nb_tape} = 0; + #$ntsize{$nb_tape} = 0; + #$ntesize{$nb_tape} = 0; } elsif($line[1] eq "status" && $line[2] eq "file") { #1:"status" #2:"file:" #3:hostname #4:diskname #5:filename - $taper_status_file = $line[5]; + #$host = $line[3]; + #$partition = $line[4]; + #Which datestamp to use? + #$hostpart=&make_hostpart($host,$partition,$datestamp); + #assume $hostpart is already set. + $taper_status_file{$hostpart} = $line[5]; } } elsif($line[0] eq "splitting" && @@ -798,7 +857,6 @@ while($lineX = ) { $ntchunk{$nb_tape}++; $ntsize{$nb_tape} += $size / $unitdivisor; $ntesize{$nb_tape} += $size / $unitdivisor; - $ntchunk_size += $size / $unitdivisor; } else { #print "Ignoring: $lineX\n"; @@ -940,8 +998,7 @@ foreach $host (sort @hosts) { $in_flush=1; } if(defined $taper_started{$hostpart} && - $taper_started{$hostpart}==1 && - $dump_finished{$hostpart}!=-3) { + $taper_started{$hostpart}==1) { if(defined $dump_started{$hostpart} && $dump_started{$hostpart} == 1 && $dump_finished{$hostpart} == -1) { @@ -970,8 +1027,8 @@ foreach $host (sort @hosts) { } print " dumping to tape"; $size = $tapedsize{$hostpart}; - if ($taper_status_file && -f $taper_status_file && - open FF, "<$taper_status_file") { + if ($taper_status_file{$hostpart} && -f $taper_status_file{$hostpart} && + open FF, "<$taper_status_file{$hostpart}") { $line = ; if (defined $line) { chomp $line; @@ -1005,15 +1062,24 @@ foreach $host (sort @hosts) { $exit_status |= $STATUS_FAILED; } if($in_flush == 0) { - print " dump done," if defined $dump_finished{$hostpart} && $dump_finished{$hostpart} == 1; + if (defined $dump_finished{$hostpart}) { + if ($dump_finished{$hostpart} == 1) { + print " dump done,"; + } else { + $exit_status |= $STATUS_FAILED; + print " dump failed: ", $error{$hostpart}, ","; + $fpartition++; + $fsize+=$esize{$hostpart}; + } + } print " writing to tape"; } else { print " flushing to tape"; } $size = $tapedsize{$hostpart}; - if ($taper_status_file && -f $taper_status_file && - open FF, "<$taper_status_file") { + if ($taper_status_file{$hostpart} && -f $taper_status_file{$hostpart} && + open FF, "<$taper_status_file{$hostpart}") { $line = ; if (defined $line) { chomp $line; @@ -1024,14 +1090,16 @@ foreach $host (sort @hosts) { } close FF; } - if(defined($size)) { + if(defined($size) and defined($size{$hostpart}) and $size{$hostpart} > 0) { printf " (%d$unit done (%0.2f%%))", $size, 100.0 * $size/$size{$hostpart}; } if( defined $starttime ) { print " (", &showtime($taper_time{$hostpart}), ")"; } print ", ", $error{$hostpart} if (defined($error{$hostpart}) && - $error{$hostpart} ne ""); + $error{$hostpart} ne "" && + (!defined $dump_finished{$hostpart} || + $dump_finished{$hostpart} != -3)); print "\n"; } $tapartition++; @@ -1076,12 +1144,20 @@ foreach $host (sort @hosts) { printf "%8s ", $datestamp if defined $opt_date; printf "%-${maxnamelength}s%2d ", "$host:$qpartition", $level{$hostpart}; printf "%9d$unit", $xsize; - print " dump done," if defined $dump_finished{$hostpart} && $dump_finished{$hostpart} == 1; + print " dump done," if defined $dump_finished{$hostpart} && $dump_finished{$hostpart} == 1; if($in_flush == 0) { - print " failed to tape"; + if ($tape_config{$hostpart}) { + print " taping delayed because of config"; + } else { + print " failed to tape"; + } } else { - print " failed to flush"; + if ($tape_config{$hostpart}) { + print " flushing delayed because of config"; + } else { + print " failed to flush"; + } } print ": ",$error{$hostpart} if defined $error{$hostpart}; @@ -1122,6 +1198,12 @@ foreach $host (sort @hosts) { printf "%-${maxnamelength}s%2d ", "$host:$qpartition", $level{$hostpart}; printf "%9d$unit", $size{$hostpart}; if($in_flush == 0) { + if (defined $dump_finished{$hostpart} && $dump_finished{$hostpart} == -3) { + $exit_status |= $STATUS_FAILED; + print " dump failed: ", $error{$hostpart}, ","; + $fpartition++; + $fsize+=$esize{$hostpart}; + } print " finished"; } else { @@ -1571,12 +1653,29 @@ sub set_starttime() { sub showtime() { - my($delta)=shift; - my($oneday)=24*60*60; + my($delta) = shift; + my($oneday) = 24*60*60; + + my @starttime = localtime($starttime); + my @now = localtime($starttime+$delta); + $now_yday = $now[7]; + + # leap year + if ($starttime[5] < $now[5]) { + my $days_in_year = 364; + my $startime1 = $starttime; + while ($startime1 < $starttime+$delta) { + my @starttime1 = localtime($starttime); + if ($starttime1[7] > $days_in_year) { + $days_in_year = $starttime1[7]; + } + $startime1 += $oneday; + } + $now_yday += $days_in_year+1; + } - @now=localtime($starttime+$delta); - if($delta > $oneday) { - $result=sprintf("%d+",$delta/$oneday); + if ($starttime[7] < $now_yday) { + $result=sprintf("%d+", $now_yday - $starttime[7]); } else { $result=""; } diff --git a/server-src/amtape.pl b/server-src/amtape.pl index dec31ea..7a83996 100644 --- a/server-src/amtape.pl +++ b/server-src/amtape.pl @@ -1,9 +1,10 @@ #! @PERL@ # Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -219,6 +220,10 @@ sub { return; } elsif ($err->volinuse and defined $err->{'slot'}) { $last_slot = $err->{'slot'}; + print STDERR sprintf("slot %3s: in use\n", $last_slot); + } elsif ($err->empty and defined $err->{'slot'}) { + $last_slot = $err->{'slot'}; + print STDERR sprintf("slot %3s: empty\n", $last_slot); } else { return failure($err, $finished_cb) if $err; } @@ -240,8 +245,6 @@ sub { } else { print STDERR sprintf("slot %3s: %s\n", $last_slot, $dev->error_or_status()); } - } else { - print STDERR sprintf("slot %3s: in use\n", $last_slot); } if ($res) { @@ -299,6 +302,7 @@ sub { for my $sl (@$inv) { my $line = "slot $sl->{slot}:"; + my $tle; if (!defined($sl->{device_status}) && !defined($sl->{label})) { $line .= " unknown state"; } elsif ($sl->{'state'} == Amanda::Changer::SLOT_EMPTY) { @@ -306,9 +310,11 @@ sub { } else { if (defined $sl->{label}) { $line .= " label $sl->{label}"; - my $tle = $tl->lookup_tapelabel($sl->{label}); - if ($tle->{'meta'}) { - $line .= " ($tle->{'meta'})"; + $tle = $tl->lookup_tapelabel($sl->{label}); + if (defined $tle) { + if ($tle->{'meta'}) { + $line .= " ($tle->{'meta'})"; + } } } elsif ($sl->{'device_status'} == $DEVICE_STATUS_VOLUME_UNLABELED) { $line .= " blank"; @@ -339,6 +345,13 @@ sub { if ($sl->{'current'}) { $line .= " (current)"; } + if (defined $tle) { + if (defined $sl->{'barcode'} and + defined $tle->{'barcode'} and + $sl->{'barcode'} ne $tle->{'barcode'}) { + $line .= " MISTMATCH barcode in tapelist: $tle->{'barcode'}"; + } + } # note that inventory goes to stdout print "$line\n"; @@ -658,7 +671,11 @@ sub load_changer { sub failure { my ($msg, $finished_cb) = @_; - print STDERR "ERROR: $msg\n"; + if ($msg->isa("Amanda::Changer::Error") and defined $msg->{'slot'}) { + print STDERR "ERROR: Slot: $msg->{'slot'}: $msg\n"; + } else { + print STDERR "ERROR: $msg\n"; + } $exit_status = 1; $finished_cb->(); } diff --git a/server-src/amtrmidx.c b/server-src/amtrmidx.c index a2f4c8b..c233743 100644 --- a/server-src/amtrmidx.c +++ b/server-src/amtrmidx.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/server-src/amtrmlog.c b/server-src/amtrmlog.c index 6b4e0ea..01193e8 100644 --- a/server-src/amtrmlog.c +++ b/server-src/amtrmlog.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/server-src/amvault.pl b/server-src/amvault.pl index 88111f7..de47562 100644 --- a/server-src/amvault.pl +++ b/server-src/amvault.pl @@ -1,9 +1,10 @@ #! @PERL@ # Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -440,7 +441,7 @@ sub scribe_started { my $xfers_finished = sub { my ($err) = @_; - $self->failure($err) if $err; + return $self->failure($err) if $err; $self->quit(0); }; @@ -938,6 +939,7 @@ sub usage { Usage: amvault [-o configoption...] [-q] [--quiet] [-n] [--dry-run] [--fulls-only] [--export] [--src-timestamp src-timestamp] + [--exact-match] --label-template label-template --dst-changer dst-changer [--autolabel autolabel-arg...] config @@ -973,6 +975,7 @@ my @config_overrides_opts; my $opt_quiet = 0; my $opt_dry_run = 0; my $opt_fulls_only = 0; +my $opt_exact_match = 0; my $opt_export = 0; my $opt_autolabel = {}; my $opt_autolabel_seen = 0; @@ -1016,6 +1019,7 @@ GetOptions( 'q|quiet' => \$opt_quiet, 'n|dry-run' => \$opt_dry_run, 'fulls-only' => \$opt_fulls_only, + 'exact-match' => \$opt_exact_match, 'export' => \$opt_export, 'label-template=s' => \&set_label_template, 'autolabel=s' => \&add_autolabel, @@ -1029,7 +1033,9 @@ $opt_autolabel->{'empty'} = 1 unless $opt_autolabel_seen; usage("not enough arguments") unless (@ARGV >= 1); my $config_name = shift @ARGV; -my @opt_dumpspecs = parse_dumpspecs(\@ARGV, $CMDLINE_PARSE_DATESTAMP|$CMDLINE_PARSE_LEVEL) +my $cmd_flags = $CMDLINE_PARSE_DATESTAMP|$CMDLINE_PARSE_LEVEL; +$cmd_flags |= $CMDLINE_EXACT_MATCH if $opt_exact_match; +my @opt_dumpspecs = parse_dumpspecs(\@ARGV, $cmd_flags) if (@ARGV); usage("no --label-template given") unless $opt_autolabel->{'template'}; diff --git a/server-src/chunker.c b/server-src/chunker.c index 488f675..6f81ad2 100644 --- a/server-src/chunker.c +++ b/server-src/chunker.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1999 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/server-src/cmdline.c b/server-src/cmdline.c index 600d500..c789421 100644 --- a/server-src/cmdline.c +++ b/server-src/cmdline.c @@ -1,9 +1,10 @@ /* * Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -89,7 +90,12 @@ cmdline_parse_dumpspecs( enum { ARG_GET_HOST, ARG_GET_DISK, ARG_GET_DATESTAMP, ARG_GET_LEVEL } arg_state = ARG_GET_HOST; while (optind < argc) { + char *new_name = NULL; name = argv[optind]; + if (flags & CMDLINE_EXACT_MATCH && *name != '=') { + new_name = g_strconcat("=", name, NULL); + name = new_name; + } switch (arg_state) { case ARG_GET_HOST: arg_state = ARG_GET_DISK; @@ -112,12 +118,14 @@ cmdline_parse_dumpspecs( arg_state = ARG_GET_HOST; if (!(flags & CMDLINE_PARSE_LEVEL)) continue; if (name[0] != '\0' + && !(flags & CMDLINE_EXACT_MATCH) && (errstr=validate_regexp(name)) != NULL) { error(_("bad level regex \"%s\": %s\n"), name, errstr); } dumpspec->level = stralloc(name); break; } + amfree(new_name); optind++; } diff --git a/server-src/cmdline.h b/server-src/cmdline.h index b1e6cad..2d93ab3 100644 --- a/server-src/cmdline.h +++ b/server-src/cmdline.h @@ -1,9 +1,10 @@ /* * Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -38,7 +39,7 @@ * * All strings in this struct are independently malloc()ed. */ -typedef struct dumpspec_s { +typedef struct dumpspec_t { char *host; char *disk; char *datestamp; @@ -118,6 +119,8 @@ cmdline_parse_dumpspecs( # define CMDLINE_PARSE_LEVEL (1<<1) /* an empty argv should result in a wildcard dumpspec */ # define CMDLINE_EMPTY_TO_WILDCARD (1<<2) + /* use exact match instead of host and disk expression */ +# define CMDLINE_EXACT_MATCH (1<<3) /* * Formatting diff --git a/server-src/disk_history.c b/server-src/disk_history.c index 1da5a2d..5b5de24 100644 --- a/server-src/disk_history.c +++ b/server-src/disk_history.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/server-src/disk_history.h b/server-src/disk_history.h index 2a706f0..774ea3f 100644 --- a/server-src/disk_history.h +++ b/server-src/disk_history.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/server-src/diskfile.c b/server-src/diskfile.c index 544346a..d8e11dc 100644 --- a/server-src/diskfile.c +++ b/server-src/diskfile.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -513,7 +514,7 @@ parse_diskline( amfree(hostname); return (-1); } - if ((dtype = lookup_dumptype(dumptype)) == NULL) { + if (lookup_dumptype(dumptype) == NULL) { diskdevice = dumptype; skip_whitespace(s, ch); if(ch == '\0' || ch == '#') { @@ -1851,6 +1852,7 @@ disable_skip_disk( char * match_disklist( disklist_t *origqp, + gboolean exact_match, int sargc, char ** sargv) { @@ -1862,10 +1864,24 @@ match_disklist( int prev_match; disk_t *dp_skip; disk_t *dp; + char **new_sargv = NULL; if(sargc <= 0) return NULL; + if (exact_match) { + new_sargv = g_new0(char *, sargc+1); + for (i=0; ibusy && !sched(dumper->dp)->taper) @@ -3782,35 +3811,68 @@ tape_action( } /* Add what is currently written to tape and in the go. */ + new_data = 0; for (taper1 = tapetable; taper1 < tapetable+conf_taper_parallel_write; taper1++) { if (taper1->state & TAPER_STATE_TAPE_STARTED) { - tapeq_size -= taper1->left; + if (taper1->nb_dle < conf_max_dle_by_volume) { + tapeq_size -= taper1->left; + } dle_free += (conf_max_dle_by_volume - taper1->nb_dle); } if (taper1->disk) { off_t data_to_go; + off_t t_size; if (taper1->dumper) { - data_to_go = sched(taper1->disk)->est_size - taper1->written; + t_size = sched(taper1->disk)->est_size; } else { - data_to_go = sched(taper1->disk)->act_size - taper1->written; + t_size = sched(taper1->disk)->act_size; } + data_to_go = t_size - taper1->written; if (data_to_go > taper1->left) { data_next_tape += data_to_go - taper1->left; data_lost += taper1->written + taper1->left; if (taper1->state & TAPER_STATE_TAPE_STARTED) { - dle_free--; + dle_free -= (conf_max_dle_by_volume - taper1->nb_dle) + 1; } else { - dle_free += conf_max_dle_by_volume - 2; + dle_free -= 2; + new_data += t_size; } } else { + if (!(taper1->state & TAPER_STATE_TAPE_STARTED)) { + dle_free--; + new_data += t_size; + } data_free += taper1->left - data_to_go; } tapeq_size += data_to_go; } } - data_lost_next_tape = tape_length + data_free - data_next_tape - runq_size - directq_size - tapeq_size; + + new_dle = queue_length(tapeq) - dle_free; driver_debug(2, _("dle_free: %d\n"), dle_free); + driver_debug(2, _("new_dle: %d\n"), new_dle); + if (new_dle > 0) { + if (taperflush == 0 && + flush_threshold_dumped == 0 && + flush_threshold_scheduled == 0) { + /* shortcut, will trigger taperflush_criteria and/or flush_criteria */ + new_data += 1; + } else { + /* sum the size of the first new-dle in tapeq */ + /* they should be the reverse taperalgo */ + for (dp = tapeq.head; + dp != NULL && new_dle > 0; + dp = dp->next, new_dle--) { + new_data += sched(dp)->act_size; + } + } + if (tapeq_size < new_data) { + tapeq_size = new_data; + } + } + driver_debug(2, _("new_data: %lld\n"), (long long)new_data); + data_lost_next_tape = tape_length + data_free - data_next_tape - runq_size - directq_size - tapeq_size; driver_debug(2, _("data_lost: %lld\n"), (long long)data_lost); driver_debug(2, _("data_free: %lld\n"), (long long)data_free); driver_debug(2, _("data_next_tape: %lld\n"), (long long)data_next_tape); @@ -3833,18 +3895,25 @@ tape_action( } } - allow_size_or_number = (flush_threshold_dumped < tapeq_size && - flush_threshold_scheduled < sched_size) || - (dle_free < (queue_length(runq) + - queue_length(directq) + - queue_length(tapeq))); + taperflush_criteria = (taperflush < tapeq_size && + (force_flush == 1 || dump_to_disk_terminated)); + flush_criteria = (flush_threshold_dumped < tapeq_size && + flush_threshold_scheduled < sched_size) || + taperflush_criteria; + + driver_debug(2, "taperflush %lld\n", (long long)taperflush); + driver_debug(2, "flush_threshold_dumped %lld\n", (long long)flush_threshold_dumped); + driver_debug(2, "flush_threshold_scheduled %lld\n", (long long)flush_threshold_scheduled); + driver_debug(2, "force_flush %d\n", force_flush); + driver_debug(2, "dump_to_disk_terminated %d\n", dump_to_disk_terminated); driver_debug(2, "queue_length(runq) %d\n", queue_length(runq)); driver_debug(2, "queue_length(directq) %d\n", queue_length(directq)); driver_debug(2, "queue_length(tapeq) %d\n", queue_length(tapeq)); - driver_debug(2, "allow_size_or_number %d\n", allow_size_or_number); + driver_debug(2, "taperflush_criteria %d\n", taperflush_criteria); + driver_debug(2, "flush_criteria %d\n", flush_criteria); // Changing conditionals can produce a driver hang, take care. - // + // // when to start writting to a new tape if (taper->state & TAPER_STATE_TAPE_REQUESTED) { driver_debug(2, "tape_action: TAPER_STATE_TAPE_REQUESTED\n"); @@ -3852,16 +3921,19 @@ tape_action( nb_taper_active == 0) { *why_no_new_tape = g_strdup_printf(_("%d tapes filled; runtapes=%d " "does not allow additional tapes"), current_tape, conf_runtapes); + driver_debug(2, "tape_action: TAPER_STATE_TAPE_REQUESTED return TAPE_ACTION_NO_NEW_TAPE\n"); result |= TAPE_ACTION_NO_NEW_TAPE; } else if (current_tape < conf_runtapes && taper_nb_scan_volume == 0 && - (allow_size_or_number || + (flush_criteria || (data_lost > data_lost_next_tape) || nb_taper_active == 0) && (last_started_taper == NULL || last_started_taper == taper)) { + driver_debug(2, "tape_action: TAPER_STATE_TAPE_REQUESTED return TAPE_ACTION_SCAN\n"); result |= TAPE_ACTION_SCAN; } else { + driver_debug(2, "tape_action: TAPER_STATE_TAPE_REQUESTED return TAPE_ACTION_MOVE\n"); result |= TAPE_ACTION_MOVE; } } else if ((taper->state & TAPER_STATE_WAIT_FOR_TAPE) && @@ -3869,11 +3941,8 @@ tape_action( !empty(directq) || // if a dle is waiting for a dump to tape !empty(roomq) || // holding disk constraint idle_reason == IDLE_NO_DISKSPACE || // holding disk constraint - allow_size_or_number || - (data_lost > data_lost_next_tape) || - (taperflush < tapeq_size && // taperflush - (force_flush == 1 || // if force_flush - dump_to_disk_terminated)) // or all dump to disk terminated + flush_criteria || // flush criteria + data_lost > data_lost_next_tape )) { driver_debug(2, "tape_action: TAPER_STATE_WAIT_FOR_TAPE return TAPE_ACTION_NEW_TAPE\n"); result |= TAPE_ACTION_NEW_TAPE; @@ -3905,14 +3974,17 @@ tape_action( (taper->state & TAPER_STATE_TAPE_STARTED || // tape already started !empty(roomq) || // holding disk constraint idle_reason == IDLE_NO_DISKSPACE || // holding disk constraint - allow_size_or_number || - (force_flush == 1 && taperflush < tapeq_size))) { // taperflush if force_flush + flush_criteria)) { // flush if (nb_taper_flushing == 0) { + driver_debug(2, "tape_action: TAPER_STATE_IDLE return TAPE_ACTION_START_A_FLUSH\n"); result |= TAPE_ACTION_START_A_FLUSH; } else { + driver_debug(2, "tape_action: TAPER_STATE_IDLE return TAPE_ACTION_START_A_FLUSH_FIT\n"); result |= TAPE_ACTION_START_A_FLUSH_FIT; } + } else { + driver_debug(2, "tape_action: TAPER_STATE_IDLE return TAPE_ACTION_NO_ACTION\n"); } } return result; @@ -3931,6 +4003,14 @@ no_taper_flushing(void) return 1; } +static int +active_dumper(void) +{ + int i, nidle=0; + + for(i = 0; i < inparallel; i++) if(!dmptable[i].busy) nidle++; + return inparallel - nidle; +} #if 0 static void dump_state( diff --git a/server-src/driverio.c b/server-src/driverio.c index c2632eb..8e41646 100644 --- a/server-src/driverio.c +++ b/server-src/driverio.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/server-src/driverio.h b/server-src/driverio.h index 4295cdb..db07d0f 100644 --- a/server-src/driverio.h +++ b/server-src/driverio.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/server-src/dumper.c b/server-src/dumper.c index d9fd9ca..1c75398 100644 --- a/server-src/dumper.c +++ b/server-src/dumper.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1999 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -1315,7 +1316,7 @@ do_dump( } /* copy the header in a file on the index dir */ - { + if (ISSET(status, HEADER_DONE)) { FILE *a; char *s; char *f = getheaderfname(hostname, diskname, dumper_timestamp, level); @@ -1566,7 +1567,6 @@ read_mesgfd( default: assert(buf != NULL); add_msg_data(buf, (size_t)size); - security_stream_read(streams[MESGFD].fd, read_mesgfd, cookie); break; } @@ -1703,8 +1703,6 @@ read_datafd( * Reset the timeout for future reads */ timeout(conf_dtimeout); - - security_stream_read(streams[DATAFD].fd, read_datafd, cookie); } /* @@ -1757,7 +1755,6 @@ read_indexfd( log_add(L_INFO, _("Index corrupted for %s:%s"), hostname, qdiskname); } } - security_stream_read(streams[INDEXFD].fd, read_indexfd, cookie); } static void @@ -1769,8 +1766,6 @@ handle_filter_stderr( char *b, *p; gint64 len; - event_release(filter->event); - if (filter->buffer == NULL) { /* allocate initial buffer */ filter->buffer = g_malloc(2048); @@ -1793,6 +1788,7 @@ handle_filter_stderr( filter->allocated_size - filter->first - filter->size - 2); if (nread <= 0) { + event_release(filter->event); aclose(filter->fd); if (filter->size > 0 && filter->buffer[filter->first + filter->size - 1] != '\n') { /* Add a '\n' at end of buffer */ @@ -1823,9 +1819,6 @@ handle_filter_stderr( if (nread <= 0) { g_free(filter->buffer); g_free(filter); - } else { - filter->event = event_register((event_id_t)filter->fd, EV_READFD, - handle_filter_stderr, filter); } } @@ -1833,25 +1826,33 @@ handle_filter_stderr( * Startup a timeout in the event handler. If the arg is 0, * then remove the timeout. */ +static event_handle_t *ev_timeout = NULL; +static time_t timeout_time; + static void timeout( time_t seconds) { - static event_handle_t *ev_timeout = NULL; + timeout_time = time(NULL) + seconds; /* - * First, remove a timeout if one is active. + * remove a timeout if seconds is 0 */ - if (ev_timeout != NULL) { - event_release(ev_timeout); - ev_timeout = NULL; + if (seconds == 0) { + if (ev_timeout != NULL) { + event_release(ev_timeout); + ev_timeout = NULL; + } + return; } /* - * Now, schedule a new one if 'seconds' is greater than 0 + * schedule a timeout if it not already scheduled */ - if (seconds > 0) - ev_timeout = event_register((event_id_t)seconds, EV_TIME, timeout_callback, NULL); + if (ev_timeout == NULL) { + ev_timeout = event_register((event_id_t)seconds, EV_TIME, + timeout_callback, NULL); + } } /* @@ -1862,8 +1863,20 @@ static void timeout_callback( void * unused) { + time_t now = time(NULL); (void)unused; /* Quiet unused parameter warning */ + if (ev_timeout != NULL) { + event_release(ev_timeout); + ev_timeout = NULL; + } + + if (timeout_time > now) { /* not a data timeout yet */ + ev_timeout = event_register((event_id_t)(timeout_time-now), EV_TIME, + timeout_callback, NULL); + return; + } + assert(unused == NULL); errstr = newstralloc(errstr, _("data timeout")); dump_result = 2; diff --git a/server-src/find.c b/server-src/find.c index 0b0348f..6891d00 100644 --- a/server-src/find.c +++ b/server-src/find.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/server-src/holding.c b/server-src/holding.c index 6da3e47..82df14c 100644 --- a/server-src/holding.c +++ b/server-src/holding.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/server-src/holding.h b/server-src/holding.h index d8f992a..cbde804 100644 --- a/server-src/holding.h +++ b/server-src/holding.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/server-src/infofile.c b/server-src/infofile.c index f30c8b0..8df21b9 100644 --- a/server-src/infofile.c +++ b/server-src/infofile.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/server-src/infofile.h b/server-src/infofile.h index bb33b6b..28ac933 100644 --- a/server-src/infofile.h +++ b/server-src/infofile.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/server-src/list_dir.c b/server-src/list_dir.c index 2831411..a909067 100644 --- a/server-src/list_dir.c +++ b/server-src/list_dir.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/server-src/list_dir.h b/server-src/list_dir.h index 109559f..53d03ff 100644 --- a/server-src/list_dir.h +++ b/server-src/list_dir.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/server-src/logfile.c b/server-src/logfile.c index c8ea268..8bab3cf 100644 --- a/server-src/logfile.c +++ b/server-src/logfile.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -218,9 +219,8 @@ log_rename( } if(rename(logfile, fname) == -1) { - error(_("could not rename \"%s\" to \"%s\": %s"), + g_debug(_("could not rename \"%s\" to \"%s\": %s"), logfile, fname, strerror(errno)); - /*NOTREACHED*/ } amfree(fname); @@ -276,17 +276,44 @@ get_logline( FILE * logf) { static char *logline = NULL; + static size_t line_size = 0; + char *lline; + size_t loffset = 0; char *logstr, *progstr; char *s; int ch; + int n; - amfree(logline); - while ((logline = agets(logf)) != NULL) { - if (logline[0] != '\0') - break; - amfree(logline); + if (!logline) { + line_size = 256; + logline = g_malloc(line_size); + } + + logline[0] = '\0'; + while(1) { + lline = fgets(logline + loffset, line_size - loffset, logf); + if (lline == NULL) { + break; /* EOF */ + } + if (strlen(logline) == line_size -1 && + logline[strlen(logline)-1] != '\n') { + line_size *= 2; + logline = g_realloc(logline, line_size); + loffset = strlen(logline); + } else if (strlen(logline) == 0 || + (strlen(logline) == 1 && logline[0] == '\n')) { + } else { + break; /* good line */ + } + logline[loffset] = '\0'; } - if (logline == NULL) return 0; + if (logline[0] == '\0') + return 0; + + /* remove \n */ + n = strlen(logline); + if (logline[n-1] == '\n') logline[n-1] = '\0'; + curlinenum++; s = logline; ch = *s++; diff --git a/server-src/logfile.h b/server-src/logfile.h index 409fb48..6c246e2 100644 --- a/server-src/logfile.h +++ b/server-src/logfile.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/server-src/planner.c b/server-src/planner.c index aa81629..f7a38be 100644 --- a/server-src/planner.c +++ b/server-src/planner.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1999 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -193,6 +194,7 @@ main( int exit_status = EXIT_SUCCESS; gboolean no_taper = FALSE; gboolean from_client = FALSE; + gboolean exact_match = FALSE; if (argc > 1 && argv && argv[1] && g_str_equal(argv[1], "--version")) { printf("planner-%s\n", VERSION); @@ -276,6 +278,11 @@ main( from_client = TRUE; diskarg_offset += 1; } + if (argc - diskarg_offset > 0 && g_str_equal(argv[diskarg_offset], + "--exact_match")) { + exact_match = TRUE; + diskarg_offset += 1; + } run_server_global_scripts(EXECUTE_ON_PRE_ESTIMATE, get_config_name()); @@ -348,7 +355,7 @@ main( g_fprintf(stderr, _("%s: timestamp %s\n"), get_pname(), planner_timestamp); - errstr = match_disklist(&origq, argc-diskarg_offset, + errstr = match_disklist(&origq, exact_match, argc-diskarg_offset, argv+diskarg_offset); if (errstr) { g_fprintf(stderr,"%s",errstr); @@ -463,7 +470,7 @@ main( /* see if this matches the command-line arguments */ if (conf_autoflush == 1 && - !match_dumpfile(&file, argc-diskarg_offset, + !match_dumpfile(&file, exact_match, argc-diskarg_offset, argv+diskarg_offset)) { continue; } @@ -2159,6 +2166,19 @@ static void handle_result( * reported. */ log_add(L_ERROR, "%s", errbuf); + for(dp = hostp->disks; dp != NULL; dp = dp->hostnext) { + if (dp->todo) { + qname = quote_string(dp->name); + est(dp)->state = DISK_DONE; + remove_disk(&waitq, dp); + enqueue_disk(&failq, dp); + + est(dp)->errstr = g_strdup(errbuf); + g_fprintf(stderr, _("error result for host %s disk %s: %s\n"), + dp->host->hostname, qname, errbuf); + amfree(qname); + } + } } hostp->up = HOST_DONE; amfree(errbuf); diff --git a/server-src/server_util.c b/server-src/server_util.c index 33d6ef8..72462a3 100644 --- a/server-src/server_util.c +++ b/server-src/server_util.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1999 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/server-src/server_util.h b/server-src/server_util.h index 656e43a..0754478 100644 --- a/server-src/server_util.h +++ b/server-src/server_util.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1999 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/server-src/tapefile.c b/server-src/tapefile.c index faf5875..35cbef2 100644 --- a/server-src/tapefile.c +++ b/server-src/tapefile.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -366,6 +367,7 @@ parse_tapeline( tape_t *tp = NULL; char *s, *s1; int ch; + char *cline; *status = 0; @@ -377,6 +379,7 @@ parse_tapeline( return NULL; } + cline = g_strdup(line); tp = g_new0(tape_t, 1); s1 = s - 1; @@ -432,6 +435,8 @@ parse_tapeline( } if (*(s - 1) == '#') { tp->comment = stralloc(s); /* skip leading '#' */ + } else if (*(s-1)) { + g_critical("Bogus line in the tapelist file: %s", cline); } return tp; diff --git a/server-src/tapefile.h b/server-src/tapefile.h index 38148d6..55d2ca5 100644 --- a/server-src/tapefile.h +++ b/server-src/tapefile.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/server-src/taper.pl b/server-src/taper.pl index 8422dbc..8b0d1d4 100644 --- a/server-src/taper.pl +++ b/server-src/taper.pl @@ -1,9 +1,10 @@ #! @PERL@ # Copyright (c) 2009-2012 Zmanda Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/server-src/xfer-server.h b/server-src/xfer-server.h index 34e1814..9e4892e 100644 --- a/server-src/xfer-server.h +++ b/server-src/xfer-server.h @@ -2,9 +2,10 @@ * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/server-src/xfer-source-holding.c b/server-src/xfer-source-holding.c index 4776acc..52e0ee1 100644 --- a/server-src/xfer-source-holding.c +++ b/server-src/xfer-source-holding.c @@ -2,9 +2,10 @@ * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 2009-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/xfer-src/Makefile.in b/xfer-src/Makefile.in index c83f280..33d75c0 100644 --- a/xfer-src/Makefile.in +++ b/xfer-src/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -20,9 +20,10 @@ # vim:ft=automake # Copyright (c) 2007-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -93,6 +94,23 @@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -298,6 +316,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(amlibdir)" LTLIBRARIES = $(amlib_LTLIBRARIES) libamxfer_la_DEPENDENCIES = ../common-src/libamanda.la @@ -331,6 +355,11 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libamxfer_la_SOURCES) $(xfer_test_SOURCES) DIST_SOURCES = $(libamxfer_la_SOURCES) $(xfer_test_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags @@ -1254,6 +1283,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; +$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/installperms.am $(top_srcdir)/config/automake/precompile.am: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -1265,7 +1295,6 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-amlibLTLIBRARIES: $(amlib_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(amlibdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibdir)" @list='$(amlib_LTLIBRARIES)'; test -n "$(amlibdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -1273,6 +1302,8 @@ install-amlibLTLIBRARIES: $(amlib_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(amlibdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(amlibdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(amlibdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(amlibdir)"; \ } @@ -1294,7 +1325,7 @@ clean-amlibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libamxfer.la: $(libamxfer_la_OBJECTS) $(libamxfer_la_DEPENDENCIES) +libamxfer.la: $(libamxfer_la_OBJECTS) $(libamxfer_la_DEPENDENCIES) $(EXTRA_libamxfer_la_DEPENDENCIES) $(libamxfer_la_LINK) -rpath $(amlibdir) $(libamxfer_la_OBJECTS) $(libamxfer_la_LIBADD) $(LIBS) clean-noinstPROGRAMS: @@ -1305,7 +1336,7 @@ clean-noinstPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -xfer-test$(EXEEXT): $(xfer_test_OBJECTS) $(xfer_test_DEPENDENCIES) +xfer-test$(EXEEXT): $(xfer_test_OBJECTS) $(xfer_test_DEPENDENCIES) $(EXTRA_xfer_test_DEPENDENCIES) @rm -f xfer-test$(EXEEXT) $(LINK) $(xfer_test_OBJECTS) $(xfer_test_LDADD) $(LIBS) @@ -1493,14 +1524,15 @@ check-TESTS: $(TESTS) fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ - echo "$$grn$$dashes"; \ + col="$$grn"; \ else \ - echo "$$red$$dashes"; \ + col="$$red"; \ fi; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes$$std"; \ + echo "$${col}$$dashes$${std}"; \ + echo "$${col}$$banner$${std}"; \ + test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ + test -z "$$report" || echo "$${col}$$report$${std}"; \ + echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi @@ -1554,10 +1586,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) diff --git a/xfer-src/amxfer.h b/xfer-src/amxfer.h index ab89d2f..8aba8ba 100644 --- a/xfer-src/amxfer.h +++ b/xfer-src/amxfer.h @@ -1,9 +1,10 @@ /* * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/xfer-src/dest-buffer.c b/xfer-src/dest-buffer.c index 4e85a70..37a6b4c 100644 --- a/xfer-src/dest-buffer.c +++ b/xfer-src/dest-buffer.c @@ -2,9 +2,10 @@ * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/xfer-src/dest-directtcp-connect.c b/xfer-src/dest-directtcp-connect.c index d739bf8..37a8e4a 100644 --- a/xfer-src/dest-directtcp-connect.c +++ b/xfer-src/dest-directtcp-connect.c @@ -2,9 +2,10 @@ * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/xfer-src/dest-directtcp-listen.c b/xfer-src/dest-directtcp-listen.c index 345bbbe..d67be6a 100644 --- a/xfer-src/dest-directtcp-listen.c +++ b/xfer-src/dest-directtcp-listen.c @@ -2,9 +2,10 @@ * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/xfer-src/dest-fd.c b/xfer-src/dest-fd.c index 962d3dd..37196f8 100644 --- a/xfer-src/dest-fd.c +++ b/xfer-src/dest-fd.c @@ -2,9 +2,10 @@ * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/xfer-src/dest-null.c b/xfer-src/dest-null.c index c4a49ef..3c53872 100644 --- a/xfer-src/dest-null.c +++ b/xfer-src/dest-null.c @@ -2,9 +2,10 @@ * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/xfer-src/element-glue.c b/xfer-src/element-glue.c index bb31e93..1282e93 100644 --- a/xfer-src/element-glue.c +++ b/xfer-src/element-glue.c @@ -2,9 +2,10 @@ * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/xfer-src/element-glue.h b/xfer-src/element-glue.h index 1838bfd..8bd7364 100644 --- a/xfer-src/element-glue.h +++ b/xfer-src/element-glue.h @@ -2,9 +2,10 @@ * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/xfer-src/filter-process.c b/xfer-src/filter-process.c index fbbe8e8..f525731 100644 --- a/xfer-src/filter-process.c +++ b/xfer-src/filter-process.c @@ -2,9 +2,10 @@ * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/xfer-src/filter-xor.c b/xfer-src/filter-xor.c index 112570c..f3f8a0f 100644 --- a/xfer-src/filter-xor.c +++ b/xfer-src/filter-xor.c @@ -2,9 +2,10 @@ * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/xfer-src/source-directtcp-connect.c b/xfer-src/source-directtcp-connect.c index b7ddc5b..b9c10ae 100644 --- a/xfer-src/source-directtcp-connect.c +++ b/xfer-src/source-directtcp-connect.c @@ -2,9 +2,10 @@ * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/xfer-src/source-directtcp-listen.c b/xfer-src/source-directtcp-listen.c index 8d3611c..ca9f4ff 100644 --- a/xfer-src/source-directtcp-listen.c +++ b/xfer-src/source-directtcp-listen.c @@ -2,9 +2,10 @@ * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/xfer-src/source-fd.c b/xfer-src/source-fd.c index fedeba6..0f8bf69 100644 --- a/xfer-src/source-fd.c +++ b/xfer-src/source-fd.c @@ -2,9 +2,10 @@ * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/xfer-src/source-pattern.c b/xfer-src/source-pattern.c index 1a9432f..d5aba97 100644 --- a/xfer-src/source-pattern.c +++ b/xfer-src/source-pattern.c @@ -2,9 +2,10 @@ * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/xfer-src/source-random.c b/xfer-src/source-random.c index 0683b6f..c66dec0 100644 --- a/xfer-src/source-random.c +++ b/xfer-src/source-random.c @@ -2,9 +2,10 @@ * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/xfer-src/xfer-element.c b/xfer-src/xfer-element.c index 37e3377..d23779f 100644 --- a/xfer-src/xfer-element.c +++ b/xfer-src/xfer-element.c @@ -2,9 +2,10 @@ * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/xfer-src/xfer-element.h b/xfer-src/xfer-element.h index 6c4ebed..0cb3b6c 100644 --- a/xfer-src/xfer-element.h +++ b/xfer-src/xfer-element.h @@ -2,9 +2,10 @@ * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/xfer-src/xfer-test.c b/xfer-src/xfer-test.c index 9c43b4a..f1ca54a 100644 --- a/xfer-src/xfer-test.c +++ b/xfer-src/xfer-test.c @@ -1,9 +1,10 @@ /* * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/xfer-src/xfer.c b/xfer-src/xfer.c index 97b7147..bc40cf3 100644 --- a/xfer-src/xfer.c +++ b/xfer-src/xfer.c @@ -1,9 +1,10 @@ /* * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/xfer-src/xfer.h b/xfer-src/xfer.h index 16a6a78..48d8583 100644 --- a/xfer-src/xfer.h +++ b/xfer-src/xfer.h @@ -1,9 +1,10 @@ /* * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/xfer-src/xmsg.c b/xfer-src/xmsg.c index a67624c..30b78cb 100644 --- a/xfer-src/xmsg.c +++ b/xfer-src/xmsg.c @@ -1,9 +1,10 @@ /* * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY diff --git a/xfer-src/xmsg.h b/xfer-src/xmsg.h index 85ba2ca..c1f14e8 100644 --- a/xfer-src/xmsg.h +++ b/xfer-src/xmsg.h @@ -1,9 +1,10 @@ /* * Copyright (c) 2008-2012 Zmanda, Inc. 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 free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- 2.30.2