1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-18 19:49:40 +00:00

- Upgrade to 3.2.2.

- Add hidden option to disable snapshot dump for testing.
This commit is contained in:
Jun Kuriyama 2011-05-21 07:45:16 +00:00
parent 0c89741271
commit 17b4e03484
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=274402
11 changed files with 35 additions and 157 deletions

2
GIDs
View File

@ -71,7 +71,7 @@ dhcpd:*:136:
mpd:*:137:
wolfpack:*:138:
shellinabox:*:139:
amanda:*:140:operator
amanda:*:140:
ladvd:*:142:
dovecot:*:143:
dovenull:*:144:

View File

@ -6,7 +6,7 @@
#
PORTNAME= amanda
PORTVERSION= 3.2.1
PORTVERSION= 3.2.2
PORTEPOCH= 1
CATEGORIES= misc
MASTER_SITES= SF/amanda/amanda%20-%20stable/${PORTVERSION}
@ -189,6 +189,9 @@ pre-fetch:
CONFLICTS= amanda-client-2.5.* amanda-client-2.6.*
CONFIGURE_ARGS+=--without-server --with-amandates=${AMANDA_DATES}
.if defined(AMANDA_NO_SNAPSHOT_DUMP)
CFLAGS= -DFreeBSD_NO_SNAPSHOT_DUMP=t
.endif
MAN5= amanda-archive-format.5 \
amanda-client.conf.5 \

View File

@ -1,2 +1,2 @@
SHA256 (amanda-3.2.1.tar.gz) = 187b4ccc32af03b4ca6a9658f2d6a7884a934c7864730b0bb5bc5e82457b486f
SIZE (amanda-3.2.1.tar.gz) = 4116514
SHA256 (amanda-3.2.2.tar.gz) = 6bf8e3e39a55e877d8cbe75b927b985b9316654af26a3bd47022a2a2c99b3bac
SIZE (amanda-3.2.2.tar.gz) = 4120254

View File

@ -1,52 +0,0 @@
--- application-src/amzfs-sendrecv.pl.orig 2009-01-22 02:35:38.000000000 +0100
+++ application-src/amzfs-sendrecv.pl 2009-01-31 10:37:59.495534563 +0100
@@ -235,13 +235,48 @@
} elsif (defined $errmsg) {
$self->print_to_server_and_die($action, $errmsg, $Amanda::Script_App::ERROR);
} else {
- $self->print_to_server_and_die($action, "cannot estimate snapshot '$self->{snapshot}\@$self->{snapshot}': unknown reason", $Amanda::Script_App::ERROR);
+ $self->print_to_server_and_die($action, "cannot estimate snapshot '$self->{snapshot}\@$self->{snapshot}': unknown reason", $Amanda::Script_App::ERROR);
}
}
+ if ($level == 0) {
+ my $compratio = $self->get_compratio();
+ $msg *= int $compratio;
+ }
return $msg;
}
+sub get_compratio
+{
+ my $self = shift;
+ my $action = shift;
+
+ my $cmd;
+ $cmd = "$self->{pfexec_cmd} $self->{zfs_path} get -Hp -o value compressratio $self->{filesystem}\@$self->{snapshot}";
+ debug "running (get-compression): $cmd";
+ my($wtr, $rdr, $err, $pid);
+ $err = Symbol::gensym;
+ $pid = open3($wtr, $rdr, $err, $cmd);
+ close $wtr;
+ my ($msg) = <$rdr>;
+ my ($errmsg) = <$err>;
+ waitpid $pid, 0;
+ close $rdr;
+ close $err;
+ if ($? != 0) {
+ if (defined $msg && defined $errmsg) {
+ $self->print_to_server_and_die($action, "$msg, $errmsg", $Amanda::Script_App::ERROR);
+ } elsif (defined $msg) {
+ $self->print_to_server_and_die($action, $msg, $Amanda::Script_App::ERROR);
+ } elsif (defined $errmsg) {
+ $self->print_to_server_and_die($action, $errmsg, $Amanda::Script_App::ERROR);
+ } else {
+ $self->print_to_server_and_die($action, "cannot read compression ratio '$self->{snapshot}\@$self->{snapshot}': unknown reason", $Amanda::Script_App::ERROR);
+ }
+ }
+ return $msg
+}
+
sub command_index_from_output {
}

View File

@ -1,23 +0,0 @@
--- client-src/sendbackup-dump.c.orig 2008-12-13 04:18:11.000000000 +0900
+++ client-src/sendbackup-dump.c 2009-01-27 07:30:40.000000000 +0900
@@ -35,6 +35,10 @@
#include "clock.h"
#include "version.h"
+#ifdef __FreeBSD__
+#include <sys/param.h>
+#endif
+
#define LEAF_AND_DIRS "sed -e \'\ns/^leaf[ \t]*[0-9]*[ \t]*\\.//\nt\n/^dir[ \t]/ {\ns/^dir[ \t]*[0-9]*[ \t]*\\.//\ns%$%/%\nt\n}\nd\n\'"
static amregex_t re_table[] = {
@@ -310,6 +314,9 @@
cmdX, config,
"vxdump",
dumpkeys,
+#ifdef __FreeBSD__
+ "64",
+#endif
"1048576",
"-",
device,

View File

@ -0,0 +1,11 @@
--- client-src/sendbackup-dump.c.orig 2011-04-24 16:41:40.874642189 +0900
+++ client-src/sendbackup-dump.c 2011-04-24 16:42:28.215501968 +0900
@@ -377,7 +377,7 @@
#endif
#ifdef __FreeBSD__
-# if defined(__FreeBSD_version) && (__FreeBSD_version >= 500043)
+# if defined(__FreeBSD_version) && (__FreeBSD_version >= 500043) && !defined(FreeBSD_NO_SNAPSHOT_DUMP)
# define FREEBSD_EXTRA_KEYS "bL"
# else
# define FREEBSD_EXTRA_KEYS "b"

View File

@ -6,7 +6,7 @@
#
PORTNAME= amanda
PORTVERSION= 3.2.1
PORTVERSION= 3.2.2
PORTEPOCH= 1
CATEGORIES= misc
MASTER_SITES= SF/amanda/amanda%20-%20stable/${PORTVERSION}
@ -189,6 +189,9 @@ pre-fetch:
CONFLICTS= amanda-client-2.5.* amanda-client-2.6.*
CONFIGURE_ARGS+=--without-server --with-amandates=${AMANDA_DATES}
.if defined(AMANDA_NO_SNAPSHOT_DUMP)
CFLAGS= -DFreeBSD_NO_SNAPSHOT_DUMP=t
.endif
MAN5= amanda-archive-format.5 \
amanda-client.conf.5 \

View File

@ -1,2 +1,2 @@
SHA256 (amanda-3.2.1.tar.gz) = 187b4ccc32af03b4ca6a9658f2d6a7884a934c7864730b0bb5bc5e82457b486f
SIZE (amanda-3.2.1.tar.gz) = 4116514
SHA256 (amanda-3.2.2.tar.gz) = 6bf8e3e39a55e877d8cbe75b927b985b9316654af26a3bd47022a2a2c99b3bac
SIZE (amanda-3.2.2.tar.gz) = 4120254

View File

@ -1,52 +0,0 @@
--- application-src/amzfs-sendrecv.pl.orig 2009-01-22 02:35:38.000000000 +0100
+++ application-src/amzfs-sendrecv.pl 2009-01-31 10:37:59.495534563 +0100
@@ -235,13 +235,48 @@
} elsif (defined $errmsg) {
$self->print_to_server_and_die($action, $errmsg, $Amanda::Script_App::ERROR);
} else {
- $self->print_to_server_and_die($action, "cannot estimate snapshot '$self->{snapshot}\@$self->{snapshot}': unknown reason", $Amanda::Script_App::ERROR);
+ $self->print_to_server_and_die($action, "cannot estimate snapshot '$self->{snapshot}\@$self->{snapshot}': unknown reason", $Amanda::Script_App::ERROR);
}
}
+ if ($level == 0) {
+ my $compratio = $self->get_compratio();
+ $msg *= int $compratio;
+ }
return $msg;
}
+sub get_compratio
+{
+ my $self = shift;
+ my $action = shift;
+
+ my $cmd;
+ $cmd = "$self->{pfexec_cmd} $self->{zfs_path} get -Hp -o value compressratio $self->{filesystem}\@$self->{snapshot}";
+ debug "running (get-compression): $cmd";
+ my($wtr, $rdr, $err, $pid);
+ $err = Symbol::gensym;
+ $pid = open3($wtr, $rdr, $err, $cmd);
+ close $wtr;
+ my ($msg) = <$rdr>;
+ my ($errmsg) = <$err>;
+ waitpid $pid, 0;
+ close $rdr;
+ close $err;
+ if ($? != 0) {
+ if (defined $msg && defined $errmsg) {
+ $self->print_to_server_and_die($action, "$msg, $errmsg", $Amanda::Script_App::ERROR);
+ } elsif (defined $msg) {
+ $self->print_to_server_and_die($action, $msg, $Amanda::Script_App::ERROR);
+ } elsif (defined $errmsg) {
+ $self->print_to_server_and_die($action, $errmsg, $Amanda::Script_App::ERROR);
+ } else {
+ $self->print_to_server_and_die($action, "cannot read compression ratio '$self->{snapshot}\@$self->{snapshot}': unknown reason", $Amanda::Script_App::ERROR);
+ }
+ }
+ return $msg
+}
+
sub command_index_from_output {
}

View File

@ -1,23 +0,0 @@
--- client-src/sendbackup-dump.c.orig 2008-12-13 04:18:11.000000000 +0900
+++ client-src/sendbackup-dump.c 2009-01-27 07:30:40.000000000 +0900
@@ -35,6 +35,10 @@
#include "clock.h"
#include "version.h"
+#ifdef __FreeBSD__
+#include <sys/param.h>
+#endif
+
#define LEAF_AND_DIRS "sed -e \'\ns/^leaf[ \t]*[0-9]*[ \t]*\\.//\nt\n/^dir[ \t]/ {\ns/^dir[ \t]*[0-9]*[ \t]*\\.//\ns%$%/%\nt\n}\nd\n\'"
static amregex_t re_table[] = {
@@ -310,6 +314,9 @@
cmdX, config,
"vxdump",
dumpkeys,
+#ifdef __FreeBSD__
+ "64",
+#endif
"1048576",
"-",
device,

View File

@ -0,0 +1,11 @@
--- client-src/sendbackup-dump.c.orig 2011-04-24 16:41:40.874642189 +0900
+++ client-src/sendbackup-dump.c 2011-04-24 16:42:28.215501968 +0900
@@ -377,7 +377,7 @@
#endif
#ifdef __FreeBSD__
-# if defined(__FreeBSD_version) && (__FreeBSD_version >= 500043)
+# if defined(__FreeBSD_version) && (__FreeBSD_version >= 500043) && !defined(FreeBSD_NO_SNAPSHOT_DUMP)
# define FREEBSD_EXTRA_KEYS "bL"
# else
# define FREEBSD_EXTRA_KEYS "b"