From: Bdale Garbee Date: Mon, 8 Oct 2012 23:48:35 +0000 (-0600) Subject: Merge tag 'upstream/3.3.2' X-Git-Tag: debian/3.3.3-1~13 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=109540caa4e37a3663b3dcfb9a205b9609e3f561;hp=-c;p=debian%2Famanda Merge tag 'upstream/3.3.2' Upstream version 3.3.2 Conflicts: common-src/glib-util.c perl/Amanda/Header.pm --- 109540caa4e37a3663b3dcfb9a205b9609e3f561 diff --combined client-src/selfcheck.c index 04e8248,8cd7b53..746093b --- a/client-src/selfcheck.c +++ b/client-src/selfcheck.c @@@ -95,7 -95,7 +95,7 @@@ main dle_t *dle; int level; GSList *errlist; - level_t *alevel; + am_level_t *alevel; if (argc > 1 && argv && argv[1] && g_str_equal(argv[1], "--version")) { printf("selfcheck-%s\n", VERSION); @@@ -260,7 -260,7 +260,7 @@@ if (ch == '\0' || sscanf(s - 1, "%d", &level) != 1) { goto err; /* bad level */ } - alevel = g_new0(level_t, 1); + alevel = g_new0(am_level_t, 1); alevel->level = level; dle->levellist = g_slist_append(dle->levellist, alevel); skip_integer(s, ch); @@@ -1137,8 -1137,8 +1137,8 @@@ check_overall(void check_file(COMPRESS_PATH, X_OK); if (need_dump || need_xfsdump ) { - if (check_file_exist("/etc/dumpdates")) { - check_file("/etc/dumpdates", + if (check_file_exist("/var/lib/dumpdates")) { + check_file("/var/lib/dumpdates", #ifdef USE_RUNDUMP F_OK #else @@@ -1148,15 -1148,15 +1148,15 @@@ } else { #ifndef USE_RUNDUMP if (access("/etc", R_OK|W_OK) == -1) { - g_printf(_("ERROR [dump will not be able to create the /etc/dumpdates file: %s]\n"), strerror(errno)); + g_printf(_("ERROR [dump will not be able to create the /var/lib/dumpdates file: %s]\n"), strerror(errno)); } #endif } } if (need_vdump) { - if (check_file_exist("/etc/vdumpdates")) { - check_file("/etc/vdumpdates", F_OK); + if (check_file_exist("/var/lib/vdumpdates")) { + check_file("/var/lib/vdumpdates", F_OK); } } @@@ -1168,7 -1168,6 +1168,7 @@@ check_space(AMANDA_DBGDIR, (off_t)64); /* for amandad i/o */ #endif + check_space("/var/lib", (off_t)64); /* for /var/lib/dumpdates writing */ check_space("/etc", (off_t)64); /* for /etc/dumpdates writing */ } } diff --combined common-src/glib-util.c index 99f55f7,9fd8ced..a20d745 --- a/common-src/glib-util.c +++ b/common-src/glib-util.c @@@ -1,5 -1,5 +1,5 @@@ /* - * Copyright (c) 2007, 2008, 2009, 2010 Zmanda, Inc. All Rights Reserved. + * 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 @@@ -30,7 -30,64 +30,64 @@@ #ifdef HAVE_LIBCURL #include - #endif + + #ifdef LIBCURL_USE_OPENSSL + #include + static GMutex **openssl_mutex_array; + static void openssl_lock_callback(int mode, int type, const char *file, int line) + { + (void)file; + (void)line; + if (mode & CRYPTO_LOCK) { + g_mutex_lock(openssl_mutex_array[type]); + } + else { + g_mutex_unlock(openssl_mutex_array[type]); + } + } + + static void + init_ssl(void) + { + int i; + + openssl_mutex_array = g_new0(GMutex *, CRYPTO_num_locks()); + + for (i=0; i + #include + + GCRY_THREAD_OPTION_PTHREAD_IMPL; + static void + init_ssl(void) + { + gcry_control(GCRYCTL_SET_THREAD_CBS); + } + + #else /* LIBCURL_USE_GNUTLS */ + + static void + init_ssl(void) + { + } + #endif /* LIBCURL_USE_GNUTLS */ + #endif /* LIBCURL_USE_OPENSSL */ + + #else /* HAVE_LIBCURL */ + static void + init_ssl(void) + { + } + #endif /* HAVE_LIBCURL */ void glib_init(void) { @@@ -38,8 -95,14 +95,13 @@@ if (did_glib_init) return; did_glib_init = TRUE; - /* set up libcurl (this must happen before threading - * is initialized) */ + /* set up libcurl */ #ifdef HAVE_LIBCURL + # ifdef G_THREADS_ENABLED + # if (GLIB_MAJOR_VERSION < 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 31)) + g_assert(!g_thread_supported()); /* assert threads aren't initialized yet */ + # endif + # endif g_assert(curl_global_init(CURL_GLOBAL_ALL) == 0); #endif @@@ -60,6 -123,16 +122,16 @@@ /* Initialize glib's type system. On glib >= 2.24, this will initialize * threads, so it must be done after curl is initialized. */ g_type_init(); + + /* And set up glib's threads */ + #if defined(G_THREADS_ENABLED) && !defined(G_THREADS_IMPL_NONE) + if (!g_thread_supported()) + g_thread_init(NULL); + #endif + + /* initialize ssl */ + init_ssl(); + } typedef enum { diff --combined debian/patches/series index 9394693,0000000..de4e07d mode 100644,000000..100644 --- a/debian/patches/series +++ b/debian/patches/series @@@ -1,4 -1,0 +1,3 @@@ +dumpdates-path +glib-2.32.patch +kfreebsd-ftbfs.diff - VTAPES-access.diff diff --combined man/amanda.conf.5 index a412d96,d71edae..a909f20 --- a/man/amanda.conf.5 +++ b/man/amanda.conf.5 @@@ -2,12 -2,12 +2,12 @@@ .\" Title: amanda.conf .\" Author: James da Silva .\" Generator: DocBook XSL Stylesheets v1.76.1 - .\" Date: 02/21/2012 + .\" Date: 07/25/2012 .\" Manual: File formats and conventions - .\" Source: Amanda 3.3.1 + .\" Source: Amanda 3.3.2 .\" Language: English .\" - .TH "AMANDA\&.CONF" "5" "02/21/2012" "Amanda 3\&.3\&.1" "File formats and conventions" + .TH "AMANDA\&.CONF" "5" "07/25/2012" "Amanda 3\&.3\&.2" "File formats and conventions" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@@ -887,7 -887,7 +887,7 @@@ setting\& .PP \fBcolumnspec\fR \fIstring\fR .RS 4 - default: "HostName=0:12:12,Disk=1:11:11,Level=1:1:1,OrigKB=1:\-7:0,OutKB=1:\-7:0,Compress=1:\-6:1,DumpTime=1:\-7:7,Dumprate=1:\-6:1,TapeTime=1:\-6:6,TapeRate=1:\-6:1" + default: "HostName=0:\-12:12,Disk=1:\-11:11,Level=1:\-1:1,OrigKB=1:\-7:0,OutKB=1:\-7:0,Compress=1:\-6:1,DumpTime=1:\-7:7,Dumprate=1:\-6:1,TapeTime=1:\-6:6,TapeRate=1:\-6:1" .sp Defines the width of columns \fBamreport\fR @@@ -1130,6 -1130,11 +1130,11 @@@ The error messages that appear in amrec .sp Recovery limits can be refined on a per\-DLE basis using the dumptype parameter of the same name\&. Note that the default value will apply to any dumpfiles for disks which no longer appear in the disklist; thus leaving the global parameter at its default value but setting it for all DLEs is not sufficient to maintain secure backups\&. .RE + .PP + \fBtmpdir\fR \fIstring\fR + .RS 4 + Default: none (system default)\&. Set it to a directory with lots of free space if sort in amindexd fail with \*(AqNo space left on device\*(Aq\&. + .RE .SH "HOLDINGDISK SECTION" .PP The @@@ -1650,6 -1655,12 +1655,12 @@@ Default \fI10000\fR\&. The maximum number of day for a promotion, set it 0 if you don\*(Aqt want promotion, set it to 1 or 2 if your disks get overpromoted\&. .RE .PP + \fBmax\-warnings\fR \fIint\fR + .RS 4 + Default: + \fI20\fR\&. The maximum number of error lines in the report for a dle\&. A value of \*(Aq0\*(Aq means unlimited\&. This is useful to reduce the size of the log file and the size of the report\&. All errors are put in separate files if a dle have more errors\&. + .RE + .PP \fBpriority\fR [ \fBlow\fR | \fBmedium\fR | \fBhigh\fR ] .RS 4 Default: @@@ -1702,8 -1713,8 +1713,8 @@@ keyword append the values to the list o \fBrecord\fR \fIboolean\fR .RS 4 Default: -\fByes\fR\&. Whether to ask the backup program to update its database (e\&.g\&. -/etc/dumpdates +\fIyes\fR\&. Whether to ask the backup program to update its database (e\&.g\&. +/var/lib/dumpdates for DUMP or /usr/local/var/amanda/gnutar\-lists for GNUTAR) of time stamps\&. This is normally enabled for daily backups and turned off for periodic archival runs\&. @@@ -2443,7 -2454,7 +2454,7 @@@ Default: not set\&. A comment string de \fBplugin\fR \fIstring\fR .RS 4 No default\&. Must be set to the name of the taperscan module\&. See - + \fBamanda-taperscan\fR(7) for a list of defined taperscan modules\&. .RE .PP diff --combined man/disklist.5 index 915248b,83d9687..6200b13 --- a/man/disklist.5 +++ b/man/disklist.5 @@@ -2,12 -2,12 +2,12 @@@ .\" Title: disklist .\" Author: James da Silva .\" Generator: DocBook XSL Stylesheets v1.76.1 - .\" Date: 02/21/2012 + .\" Date: 07/25/2012 .\" Manual: File formats and conventions - .\" Source: Amanda 3.3.1 + .\" Source: Amanda 3.3.2 .\" Language: English .\" - .TH "DISKLIST" "5" "02/21/2012" "Amanda 3\&.3\&.1" "File formats and conventions" + .TH "DISKLIST" "5" "07/25/2012" "Amanda 3\&.3\&.2" "File formats and conventions" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@@ -33,7 -33,19 +33,19 @@@ disklist \- List of partitions to back .PP The \fIdisklist\fR - file determines which disks will be backed up by Amanda\&. The file usually contains one line per disk: + file determines which disks will be backed up by Amanda\&. The file contains + \fBincludefile\fR + directive or disklist entry (\fBDLE\fR)\&. + .PP + \fBincludefile\fR \fIstring\fR + .RS 4 + Default: + \fIno default\fR\&. The name of a disklist file to include within the current file\&. Useful for sharing disklist among several configurations\&. Relative pathnames are relative to the configuration directory\&. + .RE + .PP + A + \fBDLE\fR + usually contains one line per disk: .nf \fIhostname diskname\fR [\fIdiskdevice\fR] \fIdumptype\fR [\fIspindle\fR [\fIinterface\fR] ] .fi @@@ -98,7 -110,7 +110,7 @@@ defined in th \fBamanda\&.conf\fR file\&. \fIDumptype\fRs specify backup related parameters, such as whether to compress the backups, whether to record backup results in -/etc/dumpdates, the disk\*(Aqs relative priority, etc\&. +/var/lib/dumpdates, the disk\*(Aqs relative priority, etc\&. .RE .PP \fIspindle\fR diff --combined man/xml-source/amanda.conf.5.xml index cb33c5f,e8d1fc0..f986fb4 --- a/man/xml-source/amanda.conf.5.xml +++ b/man/xml-source/amanda.conf.5.xml @@@ -1159,7 -1159,7 +1159,7 @@@ is the same as the amrecover columnspec string - default: "HostName=0:12:12,Disk=1:11:11,Level=1:1:1,OrigKB=1:-7:0,OutKB=1:-7:0,Compress=1:-6:1,DumpTime=1:-7:7,Dumprate=1:-6:1,TapeTime=1:-6:6,TapeRate=1:-6:1" + default: "HostName=0:-12:12,Disk=1:-11:11,Level=1:-1:1,OrigKB=1:-7:0,OutKB=1:-7:0,Compress=1:-6:1,DumpTime=1:-7:7,Dumprate=1:-6:1,TapeTime=1:-6:6,TapeRate=1:-6:1" Defines the width of columns amreport should use. String @@@ -1465,6 -1465,13 +1465,13 @@@ Range is inclusive. + + tmpdir string + + Default: none (system default). Set it to a directory with lots of free + space if sort in amindexd fail with 'No space left on device'. + + @@@ -2114,6 -2121,17 +2121,17 @@@ See also the main section parameter 10000. The maximum number of day for a promotion, set it 0 if you don't want promotion, set it to 1 or 2 if your disks get overpromoted. + + + + max-warnings int + + Default: + 20. + The maximum number of error lines in the report for a dle. A value of '0' + means unlimited. This is useful to reduce the size of the log file and the + size of the report. All errors are put in separate files if a dle have more + errors. @@@ -2182,8 -2200,8 +2200,8 @@@ the property to set, and the others con record boolean Default: -yes. -Whether to ask the backup program to update its database (e.g. /etc/dumpdates +yes. +Whether to ask the backup program to update its database (e.g. /var/lib/dumpdates for DUMP or /usr/local/var/amanda/gnutar-lists for GNUTAR) of time stamps. This is normally enabled for daily backups and turned off for periodic archival runs. @@@ -3081,7 -3099,7 +3099,7 @@@ A comment string describing this tapers plugin string - No default. Must be set to the name of the taperscan module. See for a list of defined taperscan modules. + No default. Must be set to the name of the taperscan module. See for a list of defined taperscan modules. diff --combined man/xml-source/disklist.5.xml index a4bd049,80c0c96..352e09c --- a/man/xml-source/disklist.5.xml +++ b/man/xml-source/disklist.5.xml @@@ -30,8 -30,25 +30,25 @@@ DESCRIPTION The disklist - file determines which disks will be backed up by Amanda. - The file usually contains one line per disk: + file determines which disks will be backed up by Amanda. The file contains + includefile directive or disklist entry + (DLE). + + + + includefile string + + Default: + no default. + The name of a disklist file to include within the current file. + Useful for sharing disklist among several configurations. + Relative pathnames are relative to the configuration directory. + + + + + + A DLE usually contains one line per disk: hostname diskname [diskdevice] dumptype [spindle [interface] ] @@@ -112,7 -129,7 +129,7 @@@ file specify backup related parameters, such as whether to compress the backups, whether to record backup results in -/etc/dumpdates, the disk's relative priority, etc. +/var/lib/dumpdates, the disk's relative priority, etc. diff --combined server-src/diskfile.h index 9fae30e,f4b930e..c2d7d07 --- a/server-src/diskfile.h +++ b/server-src/diskfile.h @@@ -79,14 -79,15 +79,15 @@@ typedef struct disk_s char *client_username; /* username to connect on the client */ char *client_port; /* port to connect on the client */ char *ssh_keys; /* ssh_key file to use */ - sl_t *exclude_file; /* file exclude spec */ - sl_t *exclude_list; /* exclude list */ - sl_t *include_file; /* file include spec */ - sl_t *include_list; /* include list */ + am_sl_t *exclude_file; /* file exclude spec */ + am_sl_t *exclude_list; /* exclude list */ + am_sl_t *include_file; /* file include spec */ + am_sl_t *include_list; /* include list */ int exclude_optional; /* exclude list are optional */ int include_optional; /* include list are optional */ int priority; /* priority of disk */ int allow_split; + int max_warnings; off_t splitsize; off_t tape_splitsize; /* size of dumpfile chunks on tape */ char *split_diskbuffer; /* place where we can buffer PORT-WRITE dumps other than RAM */ @@@ -111,7 -112,7 +112,7 @@@ char *clnt_decrypt_opt; /* client-side decryption option parameter to use */ double comprate[2]; /* default compression rates */ /* flag options */ - int record; /* record dump in /etc/dumpdates ? */ + int record; /* record dump in /var/lib/dumpdates ? */ int skip_incr; /* incs done externally ? */ int skip_full; /* fulls done externally ? */ int to_holdingdisk; /* use holding disk ? */