Changes of Revision 16
[-] | Added | amanda.spec |
x 1
2 +%define _libexecdir %{_libdir} 3 +%{!?defconfig:%define defconfig DailySet1} 4 +%{!?indexserver:%define indexserver amandahost} 5 +%{!?tapeserver:%define tapeserver %{indexserver}} 6 +%{!?amanda_user:%define amanda_user amandabackup} 7 +%{!?amanda_group:%define amanda_group disk} 8 + 9 +Summary: A network-capable tape backup solution 10 +Name: amanda 11 +Version: 3.3.0 12 +Release: 16.1 13 +Source: http://downloads.sourceforge.net/amanda/amanda-%%{version}.tar.gz 14 +Source1: amanda.crontab 15 +Source4: disklist 16 +Source5: amanda-xinetd 17 +Source8: amandahosts 18 +Patch2: amanda-3.1.1-xattrs.patch 19 +Patch3: amanda-3.1.1-tcpport.patch 20 +Patch6: amanda-3.2.0-config-dir.patch 21 +Patch7: amanda-3.3.0-qw.patch 22 +Patch8: amanda-3.3.0-match_disk.patch 23 +Patch9: amanda-3.3.0-glib.patch 24 +License: BSD and GPLv3+ and GPLv2+ and GPLv2 25 +Group: Applications/System 26 +URL: http://www.amanda.org 27 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 28 +BuildRequires: automake autoconf libtool 29 +BuildRequires: dump gnuplot cups samba-client tar grep fileutils 30 +BuildRequires: gcc-c++ readline-devel 31 +BuildRequires: krb5-devel rsh openssh-clients ncompress mtx mt-st 32 +BuildRequires: perl-devel perl(ExtUtils::Embed) perl(Test::Simple) 33 +BuildRequires: glib2-devel openssl-devel swig bison flex 34 +BuildRequires: libcurl-devel 35 +Requires(pre): shadow-utils 36 +Requires(post): grep sed 37 +Requires: fileutils grep initscripts tar /bin/mail xinetd 38 +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) 39 +Obsoletes: amanda-devel < 2.6.1p2-5 40 +Provides: amanda-devel = 2.6.1p2-5 41 + 42 +%global __perl_provides /bin/sh -c "/usr/lib/rpm/perl.prov | grep -v \\\"perl(Math::BigInt)\\\"" 43 + 44 +%description 45 +AMANDA, the Advanced Maryland Automatic Network Disk Archiver, is a 46 +backup system that allows the administrator of a LAN to set up a 47 +single master backup server to back up multiple hosts to one or more 48 +tape drives or disk files. AMANDA uses native dump and/or GNU tar 49 +facilities and can back up a large number of workstations running 50 +multiple versions of Unix. Newer versions of AMANDA (including this 51 +version) can use SAMBA to back up Microsoft(TM) Windows95/NT hosts. 52 +The amanda package contains the core AMANDA programs and will need to 53 +be installed on both AMANDA clients and AMANDA servers. Note that you 54 +will have to install the amanda-client and/or amanda-server packages as 55 +well. 56 + 57 +%package client 58 +Summary: The client component of the AMANDA tape backup system 59 +Group: Applications/System 60 +Requires: fileutils grep /sbin/service 61 +Requires(pre): amanda = %{version}-%{release} 62 + 63 +%description client 64 +The Amanda-client package should be installed on any machine that will 65 +be backed up by AMANDA (including the server if it also needs to be 66 +backed up). You will also need to install the amanda package on each 67 +AMANDA client machine. 68 + 69 +%package server 70 +Summary: The server side of the AMANDA tape backup system 71 +Group: Applications/System 72 +Requires: fileutils grep /sbin/service 73 +Requires(pre): amanda = %{version}-%{release} 74 + 75 +%description server 76 +The amanda-server package should be installed on the AMANDA server, 77 +the machine attached to the device(s) (such as a tape drive) where backups 78 +will be written. You will also need to install the amanda package on 79 +the AMANDA server machine. And, if the server is also to be backed up, the 80 +server also needs to have the amanda-client package installed. 81 + 82 +%prep 83 +%setup -q -n %{name}-%{version} 84 +%patch2 -p1 -b .xattrs 85 +%patch3 -p1 -b .tcpport 86 +%patch6 -p1 -b .config 87 +%patch7 -p3 -b .qw 88 +%patch8 -p3 -b .match_disk 89 +%patch9 -p2 -b .glib 90 +./autogen 91 + 92 +%build 93 +export MAILER=/bin/mail CFLAGS="$RPM_OPT_FLAGS -fPIE" LDFLAGS=-pie 94 + 95 +%configure --enable-shared \ 96 + --disable-rpath \ 97 + --disable-static \ 98 + --disable-dependency-tracking \ 99 + --disable-installperms \ 100 + --with-amdatadir=%{_localstatedir}/lib/amanda \ 101 + --with-amlibdir=%{_libdir} \ 102 + --with-amperldir=%{perl_vendorarch} \ 103 + --with-index-server=%{indexserver} \ 104 + --with-tape-server=%{tapeserver} \ 105 + --with-config=%{defconfig} \ 106 + --with-gnutar-listdir=%{_localstatedir}/lib/amanda/gnutar-lists \ 107 + --with-smbclient=%{_bindir}/smbclient \ 108 + --with-amandates=%{_localstatedir}/lib/amanda/amandates \ 109 + --with-amandahosts \ 110 + --with-user=%amanda_user \ 111 + --with-group=%amanda_group \ 112 + --with-tmpdir=/var/log/amanda \ 113 + --with-gnutar=/bin/tar \ 114 + --with-ssh-security \ 115 + --with-rsh-security \ 116 + --with-bsdtcp-security \ 117 + --with-bsdudp-security \ 118 + --with-krb5-security 119 + 120 +make %{?_smp_mflags} 121 + 122 + 123 +%install 124 +rm -rf ${RPM_BUILD_ROOT} 125 + 126 +make install BINARY_OWNER=%(id -un) SETUID_GROUP=%(id -gn) DESTDIR=$RPM_BUILD_ROOT 127 + 128 +mkdir -p $RPM_BUILD_ROOT/etc/amanda 129 +mkdir -p $RPM_BUILD_ROOT/etc/xinetd.d 130 +cp %SOURCE5 $RPM_BUILD_ROOT/etc/xinetd.d/amanda 131 +chmod 644 $RPM_BUILD_ROOT/etc/xinetd.d/amanda 132 +mkdir -p $RPM_BUILD_ROOT/var/log/amanda 133 +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/amanda 134 +install -m 600 %SOURCE8 $RPM_BUILD_ROOT%{_localstatedir}/lib/amanda/.amandahosts 135 + 136 +ln -s %{_libexecdir}/amanda/amandad $RPM_BUILD_ROOT%{_sbindir}/amandad 137 +ln -s amrecover.8.gz $RPM_BUILD_ROOT%{_mandir}/man8/amoldrecover.8 138 + 139 +pushd ${RPM_BUILD_ROOT} 140 + mv .%{_localstatedir}/lib/amanda/example .%{_sysconfdir}/amanda/%defconfig 141 + cp ${RPM_SOURCE_DIR}/amanda.crontab .%{_sysconfdir}/amanda/crontab.sample 142 + cp ${RPM_SOURCE_DIR}/disklist .%{_sysconfdir}/amanda/%defconfig 143 + cp ${RPM_SOURCE_DIR}/disklist .%{_sysconfdir}/amanda/%defconfig 144 + rm -f .%{_sysconfdir}/amanda/%defconfig/xinetd* 145 + rm -f .%{_sysconfdir}/amanda/%defconfig/inetd* 146 + 147 + mkdir -p .%{_localstatedir}/lib/amanda/gnutar-lists 148 + mkdir -p .%{_localstatedir}/lib/amanda/%defconfig/index 149 + touch .%{_localstatedir}/lib/amanda/amandates 150 +popd 151 +rm -rf $RPM_BUILD_ROOT/usr/share/amanda 152 +find $RPM_BUILD_ROOT -name \*.la | xargs rm 153 + 154 +%check 155 +make check 156 + 157 +%clean 158 +rm -rf ${RPM_BUILD_ROOT} 159 + 160 +%pre 161 +/usr/sbin/useradd -M -N -g %amanda_group -o -r -d %{_localstatedir}/lib/amanda -s /bin/bash \ 162 + -c "Amanda user" -u 33 %amanda_user >/dev/null 2>&1 || : 163 +/usr/bin/gpasswd -a %amanda_user tape >/dev/null 2>&1 || : 164 + 165 +%post 166 +/sbin/ldconfig 167 +[ -f /var/lock/subsys/xinetd ] && /sbin/service xinetd reload > /dev/null 2>&1 || : 168 + 169 +%postun 170 +/sbin/ldconfig 171 +[ -f /var/lock/subsys/xinetd ] && /sbin/service xinetd reload > /dev/null 2>&1 || : 172 + 173 +%post client -p /sbin/ldconfig 174 + 175 +%post server -p /sbin/ldconfig 176 + 177 +%postun client -p /sbin/ldconfig 178 + 179 +%postun server -p /sbin/ldconfig 180 + 181 +%files 182 +%defattr(-,root,root) 183 +%doc COPYRIGHT* NEWS README 184 +%config(noreplace) /etc/xinetd.d/amanda 185 + 186 +%{_libdir}/libamanda-*.so 187 +%{_libdir}/libamanda.so 188 +%{_libdir}/libamandad*.so 189 +%{_libdir}/libamar*.so 190 +%{_libdir}/libamglue*.so 191 +%{_libdir}/libamxfer*.so 192 +%{_libdir}/libndmjob*.so 193 +%{_libdir}/libndmlib*.so 194 + 195 +%dir %{_libexecdir}/amanda 196 +%{_libexecdir}/amanda/amandad 197 +%{_libexecdir}/amanda/amanda-sh-lib.sh 198 +%{_libexecdir}/amanda/amcat.awk 199 +%{_libexecdir}/amanda/amndmjob 200 +%{_libexecdir}/amanda/amplot.awk 201 |
||
[+] | Added | amanda-3.1.1-tcpport.patch ^ |
@@ -0,0 +1,29 @@ +diff -up amanda-3.1.1/example/amanda-client.conf.in.tcpport amanda-3.1.1/example/amanda-client.conf.in +--- amanda-3.1.1/example/amanda-client.conf.in.tcpport 2010-06-29 19:09:55.000000000 +0200 ++++ amanda-3.1.1/example/amanda-client.conf.in 2010-08-10 14:44:32.372879810 +0200 +@@ -22,3 +22,5 @@ auth "bsdtcp" + + ssh_keys "" # your ssh keys file if you use ssh auth + ++#resolves "resource temporarily unavailable" bug ++unreserved-tcp-port 1025,65535 +diff -up amanda-3.1.1/example/amanda-client-postgresql.conf.in.tcpport amanda-3.1.1/example/amanda-client-postgresql.conf.in +--- amanda-3.1.1/example/amanda-client-postgresql.conf.in.tcpport 2010-06-29 19:09:55.000000000 +0200 ++++ amanda-3.1.1/example/amanda-client-postgresql.conf.in 2010-08-10 14:44:41.423755630 +0200 +@@ -44,3 +44,6 @@ property "foo-PG-DATADIR" "/var/postgres + # For this example: + # archive_command = 'test ! -f /var/postgresql/archive/%f && cp %p /var/postgresql/archive/%f' + property "foo-PG-ARCHIVEDIR" "/var/postgresql/archive" ++ ++#resolves "resource temporarily unavailable" bug ++unreserved-tcp-port 1025,65535 +diff -up amanda-3.1.1/example/amanda.conf.in.tcpport amanda-3.1.1/example/amanda.conf.in +--- amanda-3.1.1/example/amanda.conf.in.tcpport 2010-08-10 14:43:55.640754722 +0200 ++++ amanda-3.1.1/example/amanda.conf.in 2010-08-10 14:44:50.760880089 +0200 +@@ -761,3 +761,6 @@ define script-tool sc-email { + # configurations. + + #includefile "@CONFIG_DIR@/amanda.conf.main" ++ ++#resolves "resource temporarily unavailable" bug ++unreserved-tcp-port 1025,65535 | ||
[+] | Added | amanda-3.1.1-xattrs.patch ^ |
@@ -0,0 +1,55 @@ +diff -up amanda-3.1.1/example/amanda.conf.in.xattrs amanda-3.1.1/example/amanda.conf.in +--- amanda-3.1.1/example/amanda.conf.in.xattrs 2010-08-03 14:45:25.000000000 +0200 ++++ amanda-3.1.1/example/amanda.conf.in 2010-08-03 14:47:42.516753010 +0200 +@@ -718,6 +718,7 @@ define interface local { + define application-tool app_amgtar { + comment "amgtar" + plugin "amgtar" ++ property "XATTRS" "YES" + #property "GNUTAR-PATH" "/path/to/gtar" + #property "GNUTAR-LISTDIR" "/path/to/gnutar_list_dir" + #default from gnutar_list_dir setting in amanda-client.conf +diff -up amanda-3.1.1/example/template.d/amanda-harddisk.conf.in.xattrs amanda-3.1.1/example/template.d/amanda-harddisk.conf.in +--- amanda-3.1.1/example/template.d/amanda-harddisk.conf.in.xattrs 2010-06-29 19:09:55.000000000 +0200 ++++ amanda-3.1.1/example/template.d/amanda-harddisk.conf.in 2010-08-03 14:47:17.027752940 +0200 +@@ -30,6 +30,7 @@ define dumptype global { + define application-tool app_amgtar { + comment "amgtar" + plugin "amgtar" ++ property "XATTRS" "YES" + #property "GNUTAR-PATH" "/path/to/gtar" + #property "GNUTAR-LISTDIR" "/path/to/gnutar_list_dir" + } +diff -up amanda-3.1.1/example/template.d/amanda-single-tape.conf.in.xattrs amanda-3.1.1/example/template.d/amanda-single-tape.conf.in +--- amanda-3.1.1/example/template.d/amanda-single-tape.conf.in.xattrs 2010-06-29 19:09:55.000000000 +0200 ++++ amanda-3.1.1/example/template.d/amanda-single-tape.conf.in 2010-08-03 14:47:21.307753002 +0200 +@@ -37,6 +37,7 @@ define dumptype global { + define application-tool app_amgtar { + comment "amgtar" + plugin "amgtar" ++ property "XATTRS" "YES" + #property "GNUTAR-PATH" "/path/to/gtar" + #property "GNUTAR-LISTDIR" "/path/to/gnutar_list_dir" + } +diff -up amanda-3.1.1/example/template.d/amanda-S3.conf.in.xattrs amanda-3.1.1/example/template.d/amanda-S3.conf.in +--- amanda-3.1.1/example/template.d/amanda-S3.conf.in.xattrs 2010-06-29 19:09:55.000000000 +0200 ++++ amanda-3.1.1/example/template.d/amanda-S3.conf.in 2010-08-03 14:47:26.723752659 +0200 +@@ -38,6 +38,7 @@ define dumptype global { + define application-tool app_amgtar { + comment "amgtar" + plugin "amgtar" ++ property "XATTRS" "YES" + #property "GNUTAR-PATH" "/path/to/gtar" + #property "GNUTAR-LISTDIR" "/path/to/gnutar_list_dir" + } +diff -up amanda-3.1.1/example/template.d/amanda-tape-changer.conf.in.xattrs amanda-3.1.1/example/template.d/amanda-tape-changer.conf.in +--- amanda-3.1.1/example/template.d/amanda-tape-changer.conf.in.xattrs 2010-06-29 19:09:55.000000000 +0200 ++++ amanda-3.1.1/example/template.d/amanda-tape-changer.conf.in 2010-08-03 14:47:30.827752997 +0200 +@@ -37,6 +37,7 @@ define dumptype global { + define application-tool app_amgtar { + comment "amgtar" + plugin "amgtar" ++ property "XATTRS" "YES" + #property "GNUTAR-PATH" "/path/to/gtar" + #property "GNUTAR-LISTDIR" "/path/to/gnutar_list_dir" + } | ||
[+] | Added | amanda-3.2.0-config-dir.patch ^ |
@@ -0,0 +1,19 @@ +diff --git a/example/amanda.conf.in b/example/amanda.conf.in +index 5c6ced7..721d683 100644 +--- a/example/amanda.conf.in ++++ b/example/amanda.conf.in +@@ -225,10 +225,10 @@ holdingdisk hd1 { + # Note that, although the keyword below is infofile, it is only so for + # historic reasons, since now it is supposed to be a directory (unless + # you have selected some database format other than the `text' default) +-infofile "@CONFIG_DIR@/@DEFAULT_CONFIG@/curinfo" # database DIRECTORY +-logdir "@CONFIG_DIR@/@DEFAULT_CONFIG@" # log directory +-indexdir "@CONFIG_DIR@/@DEFAULT_CONFIG@/index" # index directory +-#tapelist "@CONFIG_DIR@/@DEFAULT_CONFIG@/tapelist" # list of used tapes ++infofile "/var/lib/amanda/@DEFAULT_CONFIG@/curinfo" # database DIRECTORY ++logdir "/var/lib/amanda/@DEFAULT_CONFIG@" # log directory ++indexdir "/var/lib/amanda/@DEFAULT_CONFIG@/index" # index directory ++tapelist "/var/lib/amanda/@DEFAULT_CONFIG@/tapelist" # list of used tapes + # tapelist is stored, by default, in the directory that contains amanda.conf + + # tapetypes | ||
[+] | Added | amanda-3.3.0-glib.patch ^ |
@@ -0,0 +1,42 @@ +--- amanda/trunk/common-src/glib-util.c 2012/03/09 21:13:00 4591 ++++ amanda/trunk/common-src/glib-util.c 2012/03/10 13:43:44 4592 +@@ -120,15 +120,6 @@ + } + #endif + +-void g_queue_free_full(GQueue * queue) { +- while (!g_queue_is_empty(queue)) { +- gpointer data; +- data = g_queue_pop_head(queue); +- amfree(data); +- } +- g_queue_free(queue); +-} +- + void g_ptr_array_free_full(GPtrArray * array) { + size_t i; + +--- amanda/trunk/common-src/glib-util.h 2012/03/09 21:13:00 4591 ++++ amanda/trunk/common-src/glib-util.h 2012/03/10 13:43:44 4592 +@@ -72,7 +72,6 @@ + + /* These functions all take a GLib container, and call free() on all the + * pointers in the container before free()ing the container itself. */ +-void g_queue_free_full(GQueue * queue); + void g_ptr_array_free_full(GPtrArray * array); + + /* g_value_compare() does what you expect. It returns TRUE if and + +--- amanda/trunk/common-src/glib-util.c 2012/03/10 13:43:52 4593 ++++ amanda/trunk/common-src/glib-util.c 2012/03/11 16:27:35 4594 +@@ -42,7 +42,9 @@ + * is initialized) */ + #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 + | ||
[+] | Added | amanda-3.3.0-match_disk.patch ^ |
@@ -0,0 +1,189 @@ +Index: amanda/branches/3_3/client-src/amdump_client.pl +=================================================================== +--- amanda/branches/3_3/client-src/amdump_client.pl (revision 4389) ++++ amanda/branches/3_3/client-src/amdump_client.pl (revision 4390) +@@ -28,7 +28,7 @@ + use Amanda::Util qw( :constants ); + use Amanda::Config qw( :init :getconf ); + use Amanda::Paths; +-use Amanda::Logfile qw( log_rename get_current_log_timestamp $amanda_log_trace_log ); ++use Amanda::Util qw ( match_disk ); + use Amanda::Debug qw( debug ); + + Amanda::Util::setup_application("amdump_client", "client", $CONTEXT_CMDLINE); +@@ -95,7 +95,7 @@ + #find the diskname that match + for (my $i=1; $i <= $#ARGV; $i++) { + for my $diskname (@disks) { +- if (Amanda::Logfile::match_disk($ARGV[$i], $diskname)) { ++ if (match_disk($ARGV[$i], $diskname)) { + debug("send: DISK " . Amanda::Util::quote_string($diskname)); + print {$amservice_in} "DISK " . Amanda::Util::quote_string($diskname) . "\n"; + my $a = <$amservice_out>; +@@ -118,7 +118,7 @@ + #find the diskname that match + for (my $i=1; $i <= $#ARGV; $i++) { + for my $diskname (@disks) { +- if (Amanda::Logfile::match_disk($ARGV[$i], $diskname)) { ++ if (match_disk($ARGV[$i], $diskname)) { + debug("send: DISK " . Amanda::Util::quote_string($diskname)); + print {$amservice_in} "DISK " . Amanda::Util::quote_string($diskname) . "\n"; + my $a = <$amservice_out>; +Index: amanda/branches/3_3/server-src/amvault.pl +=================================================================== +--- amanda/branches/3_3/server-src/amvault.pl (revision 4389) ++++ amanda/branches/3_3/server-src/amvault.pl (revision 4390) +@@ -108,8 +108,8 @@ + use Amanda::Cmdline; + use Amanda::Paths; + use Amanda::Logfile qw( :logtype_t log_add log_add_full +- log_rename $amanda_log_trace_log make_stats +- match_datestamp match_level ); ++ log_rename $amanda_log_trace_log make_stats ); ++use Amanda::Util qw ( match_datestamp match_level ); + + use base qw( + Amanda::Recovery::Clerk::Feedback +Index: amanda/branches/3_3/server-src/amidxtaped.pl +=================================================================== +--- amanda/branches/3_3/server-src/amidxtaped.pl (revision 4389) ++++ amanda/branches/3_3/server-src/amidxtaped.pl (revision 4390) +@@ -118,7 +118,7 @@ + + use Amanda::Debug qw( debug info warning ); + use Amanda::MainLoop qw( :GIOCondition ); +-use Amanda::Util qw( :constants ); ++use Amanda::Util qw( :constants match_disk match_host ); + use Amanda::Feature; + use Amanda::Config qw( :init :getconf ); + use Amanda::Changer; +@@ -130,7 +130,6 @@ + use Amanda::Recovery::Scan; + use Amanda::DB::Catalog; + use Amanda::Disklist; +-use Amanda::Logfile qw( match_disk match_host ); + + # Note that this class performs its control IO synchronously. This is adequate + # for this service, as it never receives unsolicited input from the remote +Index: amanda/branches/3_3/server-src/amdumpd.pl +=================================================================== +--- amanda/branches/3_3/server-src/amdumpd.pl (revision 4389) ++++ amanda/branches/3_3/server-src/amdumpd.pl (revision 4390) +@@ -39,7 +39,7 @@ + use Amanda::Cmdline; + use Amanda::Paths; + use Amanda::Disklist; +-use Amanda::Logfile qw( match_disk match_host ); ++use Amanda::Util qw( match_disk match_host ); + + # Note that this class performs its control IO synchronously. This is adequate + # for this service, as it never receives unsolicited input from the remote +Index: amanda/branches/3_3/perl/Amanda/Logfile.swg +=================================================================== +--- amanda/branches/3_3/perl/Amanda/Logfile.swg (revision 4389) ++++ amanda/branches/3_3/perl/Amanda/Logfile.swg (revision 4390) +@@ -251,7 +251,6 @@ + + amglue_export_ok( + find_log search_logfile dumps_match log_rename +- match_host match_disk match_datestamp match_level + ); + + char **find_log(void); +@@ -289,13 +288,6 @@ + amglue_dumpspec_list *dumpspecs, + gboolean ok); + +-/* these are actually available for clients as well, but they do not deserve +- * their own perl module, so they're stuck here */ +-gboolean match_host(char *pat, char *value); +-gboolean match_disk(char *pat, char *value); +-gboolean match_datestamp(char *pat, char *value); +-gboolean match_level(char *pat, char *value); +- + %immutable; + amanda_log_handler_t *amanda_log_trace_log; + %mutable; +Index: amanda/branches/3_3/perl/Amanda/DB/Catalog.pm +=================================================================== +--- amanda/branches/3_3/perl/Amanda/DB/Catalog.pm (revision 4389) ++++ amanda/branches/3_3/perl/Amanda/DB/Catalog.pm (revision 4390) +@@ -401,11 +401,10 @@ + + =cut + +-use Amanda::Logfile qw( :constants match_disk match_host +- match_datestamp match_level ); ++use Amanda::Logfile qw( :constants ); + use Amanda::Tapelist; + use Amanda::Config qw( :init :getconf config_dir_relative ); +-use Amanda::Util qw( quote_string weaken_ref ); ++use Amanda::Util qw( quote_string weaken_ref match_disk match_host match_datestamp match_level); + use File::Glob qw( :glob ); + use warnings; + use strict; +Index: amanda/branches/3_3/perl/Amanda/Util.pod +=================================================================== +--- amanda/branches/3_3/perl/Amanda/Util.pod (revision 4389) ++++ amanda/branches/3_3/perl/Amanda/Util.pod (revision 4390) +@@ -421,7 +421,17 @@ + burp $filename, $header; + + These functions can (and should) be exported to the main namespace +- ++ ++=head1 MATCHING ++ ++The following functions are available to match strings against patterns using ++the rules described in amanda(8): ++ ++ match_host($pat, $str); ++ match_disk($pat, $str); ++ match_datestamp($pat, $str); ++ match_level($pat, $str); ++ + =cut + + %} +Index: amanda/branches/3_3/perl/Amanda/Logfile.pod +=================================================================== +--- amanda/branches/3_3/perl/Amanda/Logfile.pod (revision 4389) ++++ amanda/branches/3_3/perl/Amanda/Logfile.pod (revision 4390) +@@ -206,16 +206,6 @@ + + All of these functions can be imported by name. + +-=head1 MATCHING +- +-The following functions are available to match strings against patterns using +-the rules described in amanda(8): +- +- match_host($pat, $str); +- match_disk($pat, $str); +- match_datestamp($pat, $str); +- match_level($pat, $str); +- + =head1 DEBUG LOGGING HANDLER + + This package provides C<$amanda_log_trace_log>, which sends C<die> +Index: amanda/branches/3_3/perl/Amanda/Util.swg +=================================================================== +--- amanda/branches/3_3/perl/Amanda/Util.swg (revision 4389) ++++ amanda/branches/3_3/perl/Amanda/Util.swg (revision 4390) +@@ -633,6 +633,16 @@ + + %} + ++amglue_export_ok( ++ match_host match_disk match_datestamp match_level ++); ++ ++gboolean match_host(char *pat, char *value); ++gboolean match_disk(char *pat, char *value); ++gboolean match_datestamp(char *pat, char *value); ++gboolean match_level(char *pat, char *value); ++ ++ + /* ------------------------------------------------------------------------- + * Functions below this line are only meant to be called within this module; + * do not call them externally. */ | ||
[+] | Added | amanda-3.3.0-qw.patch ^ |
@@ -0,0 +1,106 @@ +Index: amanda/branches/3_3/perl/Amanda/Changer/robot.pm +=================================================================== +--- amanda/branches/3_3/perl/Amanda/Changer/robot.pm (revision 4171) ++++ amanda/branches/3_3/perl/Amanda/Changer/robot.pm (revision 4172) +@@ -266,7 +266,7 @@ + } + + # status-interval, eject-delay, unload-delay +- for my $propname qw(status-interval eject-delay unload-delay) { ++ for my $propname (qw(status-interval eject-delay unload-delay)) { + next unless exists $config->{'properties'}->{$propname}; + if (@{$config->{'properties'}->{$propname}->{'values'}} > 1) { + return Amanda::Changer->make_error("fatal", undef, +Index: amanda/branches/3_3/perl/Amanda/Recovery/Planner.pm +=================================================================== +--- amanda/branches/3_3/perl/Amanda/Recovery/Planner.pm (revision 4171) ++++ amanda/branches/3_3/perl/Amanda/Recovery/Planner.pm (revision 4172) +@@ -228,7 +228,7 @@ + my $self = shift; + my %params = @_; + +- for my $rq_param qw(changer plan_cb dumpspecs) { ++ for my $rq_param (qw(changer plan_cb dumpspecs)) { + croak "required parameter '$rq_param' mising" + unless exists $params{$rq_param}; + } +@@ -339,7 +339,7 @@ + my $self = shift; + my %params = @_; + +- for my $rq_param qw(holding_file plan_cb) { ++ for my $rq_param (qw(holding_file plan_cb)) { + croak "required parameter '$rq_param' mising" + unless exists $params{$rq_param}; + } +@@ -390,7 +390,7 @@ + my $self = shift; + my %params = @_; + +- for my $rq_param qw(filelist plan_cb) { ++ for my $rq_param (qw(filelist plan_cb)) { + croak "required parameter '$rq_param' mising" + unless exists $params{$rq_param}; + } +Index: amanda/branches/3_3/perl/Amanda/Recovery/Clerk.pm +=================================================================== +--- amanda/branches/3_3/perl/Amanda/Recovery/Clerk.pm (revision 4171) ++++ amanda/branches/3_3/perl/Amanda/Recovery/Clerk.pm (revision 4172) +@@ -228,7 +228,7 @@ + my $self = shift; + my %params = @_; + +- for my $rq_param qw(dump xfer_src_cb) { ++ for my $rq_param (qw(dump xfer_src_cb)) { + croak "required parameter '$rq_param' missing" + unless exists $params{$rq_param}; + } +@@ -262,7 +262,7 @@ + my %params = @_; + + $self->dbg("starting recovery"); +- for my $rq_param qw(xfer recovery_cb) { ++ for my $rq_param (qw(xfer recovery_cb)) { + croak "required parameter '$rq_param' missing" + unless exists $params{$rq_param}; + } +Index: amanda/branches/3_3/perl/Amanda/Taper/Scribe.pm +=================================================================== +--- amanda/branches/3_3/perl/Amanda/Taper/Scribe.pm (revision 4171) ++++ amanda/branches/3_3/perl/Amanda/Taper/Scribe.pm (revision 4172) +@@ -442,7 +442,7 @@ + my %params = @_; + + my $decide_debug = $Amanda::Config::debug_taper || $params{'debug'}; +- for my $rq_param qw(taperscan feedback) { ++ for my $rq_param (qw(taperscan feedback)) { + croak "required parameter '$rq_param' mising" + unless exists $params{$rq_param}; + } +@@ -491,7 +491,7 @@ + my $self = shift; + my %params = @_; + +- for my $rq_param qw(write_timestamp finished_cb) { ++ for my $rq_param (qw(write_timestamp finished_cb)) { + croak "required parameter '$rq_param' missing" + unless exists $params{$rq_param}; + } +@@ -615,7 +615,7 @@ + my $self = shift; + my %params = @_; + +- for my $rq_param qw(max_memory) { ++ for my $rq_param (qw(max_memory)) { + croak "required parameter '$rq_param' missing" + unless exists $params{$rq_param}; + } +@@ -1622,7 +1622,7 @@ + my $self = shift; + my %params = @_; + +- for my $rq_param qw(finished_cb) { ++ for my $rq_param (qw(finished_cb)) { + croak "required parameter '$rq_param' mising" + unless exists $params{$rq_param}; + } | ||
Added | amanda-3.3.0.tar.gz ^ | |
[+] | Added | amanda-xinetd ^ |
@@ -0,0 +1,25 @@ +# default: off +# description: The client for the Amanda backup system.\ +# This must be on for systems being backed up\ +# by Amanda. + +service amanda +{ + flags = IPv4 + socket_type = stream + protocol = tcp + wait = no + user = amandabackup + group = disk + groups = yes + server = /usr/sbin/amandad +# Configure server_args for the authentication type you will be using, +# and the services you wish to allow the amanda server and/or recovery +# clients to use. +# +# Change the -auth= entry to reflect the authentication type you use. +# Add amindexd to allow recovery clients to access the index database. +# Add amidxtaped to allow recovery clients to access the tape device. + server_args = -auth=bsdtcp amdump + disable = yes +} | ||
[+] | Added | amanda.crontab ^ |
@@ -0,0 +1,9 @@ +# This is an example for a crontab entry for automated backup with amanda +# With these cron lines, Amanda will check that the correct tape is in +# the drive every weekday afternoon at 4pm (if it isn't, all the +# operators will get mail). At 12:45am that night the dumps will be run. +# +# This should be put in user operator's crontab +# +0 16 * * 1-5 /usr/sbin/amcheck -m DailySet1 +45 0 * * 2-6 /usr/sbin/amdump DailySet1 | ||
[+] | Added | amandahosts ^ |
@@ -0,0 +1,29 @@ +# Allow access to amanda over the network. See 'man amanda' + +# 'ambackup' connects to 'amandad'. If your 'disklist' is correctly +# set up, i.e. if it does not use 'localhost' but the fully qualified +# domain name (FQDN) of the target machine, then you must put +# the FQDN here. 'ambackup' must be run by user 'amandabackup', so we allow +# access by user 'amandabackup'. Do not forget to add an 'only_from' line to +# '/etc/xinet.d/amanda' to allow access to 'amandad' only from known +# IP addresses. + +# replace mymachine.mydomain by the correct value and uncomment +# mymachine.mydomain amandabackup + + +# 'amrecover' connects to 'amandaidx', which uses the fully qualified +# domain name when access is done from another machine. 'amrecover' +# must be run by user 'root', so we allow access by user 'root'. + +# replace mymachine.mydomain by the correct value and uncomment +# mymachine.mydomain root + + +# 'amrecover' connects to 'amandaidx', which uses the bare machine +# name w/o domain name when access is done from the same machine. +# 'amrecover' must be run by user 'root', so we allow access by user +# 'root'. + +# replace mymachine by the correct value and uncomment +# mymachine root | ||
[+] | Added | disklist ^ |
@@ -0,0 +1,69 @@ +# sample Amanda2 disklist file, derived from CS.UMD.EDU's disklist +# +# If your configuration is called, say, "csd2", then this file normally goes +# in /etc/amanda/csd2/disklist. +# +# File format is: +# +# hostname diskdev dumptype +# +# where the dumptypes are defined by you in amanda.conf. + + +# At our site, root partitions have a different dumptype because they +# are of lower priority; they don't contain user data, and don't change +# much from the department prototype. In a crunch, they can be left for +# last or skipped. + +## A SPARCstation 1+ +#salty sd0a comp-root +#salty sd0g comp-user +#salty sd1g comp-user +#salty sd2a comp-root +#salty sd2g comp-user +#salty sd3c comp-user +# +## A DECstation 3100 +#slithy rz1a comp-root +#slithy rz1g comp-user +#slithy rz3a comp-root +#slithy rz3g comp-user +# +## We don't run compression on the master host since it is going to be +## busy enough running amanda. +#master sd0a nocomp-root -1 local +#master sd0g nocomp-user -1 local +## note: -1 is a placeholder for the spindle number +## the holding disk can't be dumped to itself, it uses a disktype that +## specifies the "no-hold" option (see amanda.conf). +#master sd1c holding-disk -1 local +# +## The chairman's disk is high priority to make sure it gets done. +#bigwig sd0a comp-root +#bigwig sd0g comp-high +## Likewise the named databases in the root partition on our primary +## nameserver. Also, compression is turned off because we don't want +## to create any unnecessary load on this baby (it's only a Sun3). +#bozo sd0a nocomp-high +#bozo sd0g nocomp-user +#bozo sd4c nocomp-user +# +## Dump Joe's NetBSD machine, with the mounted MS-DOS partition dumped +## using tar. +#joespc wd0a comp-root +#joespc wd0e comp-user +#joespc /msdos comp-user-tar +# +## Some really slow machines, like Sun2's and some Vaxstations, take +## forever to compress their dumps: it's just not worth it. +# +## A Sun2 +#cleo sd0a nocomp-root +#cleo sd0g nocomp-user +## A VaxStation +#susie rz8a nocomp-root +#susie rz8g nocomp-user +# +## and so on ... well, you get the idea + +localhost /etc comp-root-tar |