aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun Kuriyama <kuriyama@FreeBSD.org>2009-02-06 07:16:32 +0000
committerJun Kuriyama <kuriyama@FreeBSD.org>2009-02-06 07:16:32 +0000
commit2c0c9683099dd48ff2139916cf0580acaf46d716 (patch)
tree4c7ec334da8c82a05a630e1bd59362ca1d6ef8b5
parentd0c60b5cf51c7f384d80bbf9cda24318b3f1641d (diff)
downloadports-2c0c9683099dd48ff2139916cf0580acaf46d716.tar.gz
ports-2c0c9683099dd48ff2139916cf0580acaf46d716.zip
Notes
-rw-r--r--misc/amanda-client/Makefile1
-rw-r--r--misc/amanda-server/Makefile2
-rw-r--r--misc/amanda-server/files/extra-patch-application-src::amzfs-sendrecv.pl52
-rw-r--r--misc/amanda-server/files/patch-amandad-src::Makefile.in12
-rw-r--r--misc/amanda-server/files/patch-amar-src::Makefile.in12
-rw-r--r--misc/amanda-server/files/patch-changer-src::chg-glue.pl10
-rw-r--r--misc/amanda-server/files/patch-common-src::event.c11
-rw-r--r--misc/amanda-server/files/patch-man::amanda.conf.511
-rw-r--r--misc/amanda-server/files/patch-perl::Amanda::Process.pm11
-rw-r--r--misc/amanda-server/files/patch-server-src::amcleanup.pl11
-rw-r--r--misc/amanda26-client/Makefile1
-rw-r--r--misc/amanda26-server/Makefile2
-rw-r--r--misc/amanda26-server/files/extra-patch-application-src::amzfs-sendrecv.pl52
-rw-r--r--misc/amanda26-server/files/patch-amandad-src::Makefile.in12
-rw-r--r--misc/amanda26-server/files/patch-amar-src::Makefile.in12
-rw-r--r--misc/amanda26-server/files/patch-changer-src::chg-glue.pl10
-rw-r--r--misc/amanda26-server/files/patch-common-src::event.c11
-rw-r--r--misc/amanda26-server/files/patch-man::amanda.conf.511
-rw-r--r--misc/amanda26-server/files/patch-perl::Amanda::Process.pm11
-rw-r--r--misc/amanda26-server/files/patch-server-src::amcleanup.pl11
-rw-r--r--misc/amanda32-client/Makefile1
-rw-r--r--misc/amanda32-server/Makefile2
-rw-r--r--misc/amanda32-server/files/extra-patch-application-src::amzfs-sendrecv.pl52
-rw-r--r--misc/amanda32-server/files/patch-amandad-src::Makefile.in12
-rw-r--r--misc/amanda32-server/files/patch-amar-src::Makefile.in12
-rw-r--r--misc/amanda32-server/files/patch-changer-src::chg-glue.pl10
-rw-r--r--misc/amanda32-server/files/patch-common-src::event.c11
-rw-r--r--misc/amanda32-server/files/patch-man::amanda.conf.511
-rw-r--r--misc/amanda32-server/files/patch-perl::Amanda::Process.pm11
-rw-r--r--misc/amanda32-server/files/patch-server-src::amcleanup.pl11
30 files changed, 399 insertions, 0 deletions
diff --git a/misc/amanda-client/Makefile b/misc/amanda-client/Makefile
index 03f4f0473ffd..4e059afb73e2 100644
--- a/misc/amanda-client/Makefile
+++ b/misc/amanda-client/Makefile
@@ -6,6 +6,7 @@
#
PKGNAMESUFFIX= -client
+PORTREVISION= 1
COMMENT= The Advanced Maryland Automatic Network Disk Archiver (client)
diff --git a/misc/amanda-server/Makefile b/misc/amanda-server/Makefile
index 0240b8687e9b..765a7837dfad 100644
--- a/misc/amanda-server/Makefile
+++ b/misc/amanda-server/Makefile
@@ -7,6 +7,7 @@
PORTNAME= amanda
PORTVERSION= 2.6.1
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= misc
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
@@ -242,6 +243,7 @@ EXTRA_PATCHES= ${FILESDIR}/extra-patch-application-src::amzfs-sendrecv.pl
# MEMO:
# Prefix @WANT_SERVER_TRUE@ for server only files.
# Prefix @WANT_CLIENT_TRUE@ for client only files.
+# For debugging: dbprintf(_("getcmd: %s\n"), line);
# Maintainer TODO:
# o amanda-server installs libexec/amanda/amandad, sbin/amarchiver
# which should be handled by amanda-client only.
diff --git a/misc/amanda-server/files/extra-patch-application-src::amzfs-sendrecv.pl b/misc/amanda-server/files/extra-patch-application-src::amzfs-sendrecv.pl
new file mode 100644
index 000000000000..0a19153747d9
--- /dev/null
+++ b/misc/amanda-server/files/extra-patch-application-src::amzfs-sendrecv.pl
@@ -0,0 +1,52 @@
+--- 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 {
+ }
+
diff --git a/misc/amanda-server/files/patch-amandad-src::Makefile.in b/misc/amanda-server/files/patch-amandad-src::Makefile.in
new file mode 100644
index 000000000000..9a80b4b90f95
--- /dev/null
+++ b/misc/amanda-server/files/patch-amandad-src::Makefile.in
@@ -0,0 +1,12 @@
+--- amandad-src/Makefile.in.orig 2009-01-27 13:43:16.000000000 +0900
++++ amandad-src/Makefile.in 2009-01-27 13:44:02.000000000 +0900
+@@ -776,7 +776,8 @@
+ AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS)
+ LINT = $(AMLINT)
+ LINTFLAGS = $(AMLINTFLAGS)
+-amlib_LTLIBRARIES = libamandad.la
++@WANT_SERVER_TRUE@amlib_LTLIBRARIES =
++@WANT_CLIENT_TRUE@amlib_LTLIBRARIES = libamandad.la
+ LIB_EXTENSION = la
+ libamandad_la_SOURCES = amandad_util.c
+ libamandad_la_LDFLAGS = -release $(VERSION)
diff --git a/misc/amanda-server/files/patch-amar-src::Makefile.in b/misc/amanda-server/files/patch-amar-src::Makefile.in
new file mode 100644
index 000000000000..c7941f44904e
--- /dev/null
+++ b/misc/amanda-server/files/patch-amar-src::Makefile.in
@@ -0,0 +1,12 @@
+--- amar-src/Makefile.in.orig 2009-01-27 14:01:04.000000000 +0900
++++ amar-src/Makefile.in 2009-01-27 14:01:36.000000000 +0900
+@@ -856,7 +856,8 @@
+ AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS)
+ LINT = @AMLINT@
+ LINTFLAGS = @AMLINTFLAGS@
+-amlib_LTLIBRARIES = libamar.la
++@WANT_SERVER_TRUE@amlib_LTLIBRARIES =
++@WANT_CLIENT_TRUE@amlib_LTLIBRARIES = libamar.la
+ libamar_la_SOURCES = amar.c
+ libamar_la_LDFLAGS = -release $(VERSION)
+ libamar_la_LIBADD = ../common-src/libamanda.la
diff --git a/misc/amanda-server/files/patch-changer-src::chg-glue.pl b/misc/amanda-server/files/patch-changer-src::chg-glue.pl
new file mode 100644
index 000000000000..20467d2116fd
--- /dev/null
+++ b/misc/amanda-server/files/patch-changer-src::chg-glue.pl
@@ -0,0 +1,10 @@
+--- changer-src/chg-glue.pl.orig 2009-01-28 15:06:00.000000000 +0900
++++ changer-src/chg-glue.pl 2009-01-28 15:06:22.000000000 +0900
+@@ -206,6 +206,7 @@
+ finish();
+ return;
+ }
++ chomp($command);
+
+ if (($slot) = ($command =~ /^-slot (.*)$/)) {
+ do_slot($slot);
diff --git a/misc/amanda-server/files/patch-common-src::event.c b/misc/amanda-server/files/patch-common-src::event.c
new file mode 100644
index 000000000000..3011960848e4
--- /dev/null
+++ b/misc/amanda-server/files/patch-common-src::event.c
@@ -0,0 +1,11 @@
+--- common-src/event.c.orig 2009-02-04 07:50:43.000000000 +0900
++++ common-src/event.c 2009-02-04 07:50:20.000000000 +0900
+@@ -480,7 +480,7 @@
+ * some tricky race conditions and extra machinery. Since there are few, if any,
+ * users of a glib version this old, such machinery wouldn't get much testing.
+ */
+-#if (GLIB_MAJOR_VERSION < 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 6))
++#if (1 || GLIB_MAJOR_VERSION < 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 6))
+ typedef struct ChildWatchSource {
+ GSource source; /* must be the first element in the struct */
+
diff --git a/misc/amanda-server/files/patch-man::amanda.conf.5 b/misc/amanda-server/files/patch-man::amanda.conf.5
new file mode 100644
index 000000000000..438be98f0ab9
--- /dev/null
+++ b/misc/amanda-server/files/patch-man::amanda.conf.5
@@ -0,0 +1,11 @@
+--- man/amanda.conf.5.orig 2009-02-03 15:08:31.000000000 +0900
++++ man/amanda.conf.5 2009-02-03 15:10:14.000000000 +0900
+@@ -972,6 +972,8 @@
+ .\}
+ the width of the column itself\&. If set to a negative value, the width will be calculated on demand to fit the largest entry in this column\&.
+ .RE
++.sp
++.RE
+ .RS 4
+ Here is an example:
+ .sp
diff --git a/misc/amanda-server/files/patch-perl::Amanda::Process.pm b/misc/amanda-server/files/patch-perl::Amanda::Process.pm
new file mode 100644
index 000000000000..806659b3f979
--- /dev/null
+++ b/misc/amanda-server/files/patch-perl::Amanda::Process.pm
@@ -0,0 +1,11 @@
+--- perl/Amanda/Process.pm.orig 2009-01-28 13:57:55.000000000 +0900
++++ perl/Amanda/Process.pm 2009-01-28 13:58:19.000000000 +0900
+@@ -155,7 +155,7 @@
+ $self->{ppid} = ();
+ my $ps_argument = $Amanda::Constants::PS_ARGUMENT;
+ if ($ps_argument eq "CYGWIN") {
+- open(PSTABLE, "-|", "ps -ef") || die("ps -ef: $!");
++ open(PSTABLE, "-|", "ps -f") || die("ps -f: $!");
+ my $psline = <PSTABLE>; #header line
+ while($psline = <PSTABLE>) {
+ chomp $psline;
diff --git a/misc/amanda-server/files/patch-server-src::amcleanup.pl b/misc/amanda-server/files/patch-server-src::amcleanup.pl
new file mode 100644
index 000000000000..fbd45ccbea63
--- /dev/null
+++ b/misc/amanda-server/files/patch-server-src::amcleanup.pl
@@ -0,0 +1,11 @@
+--- server-src/amcleanup.pl.orig 2009-01-28 13:57:21.000000000 +0900
++++ server-src/amcleanup.pl 2009-01-28 13:57:33.000000000 +0900
+@@ -94,7 +94,7 @@
+ } elsif (!$process_alive) {
+ #check amdump/amflush process
+ foreach my $pname ("amdump", "amflush") {
+- my $pid = `ps -ef|grep -w ${pname}|grep -w ${config_name}| grep -v grep | awk '{print \$2}'`;
++ my $pid = `ps -f|grep -w ${pname}|grep -w ${config_name}| grep -v grep | awk '{print \$2}'`;
+ chomp $pid;
+ if ($pid ne "") {
+ $Amanda_process->set_master($pname, $pid);
diff --git a/misc/amanda26-client/Makefile b/misc/amanda26-client/Makefile
index 03f4f0473ffd..4e059afb73e2 100644
--- a/misc/amanda26-client/Makefile
+++ b/misc/amanda26-client/Makefile
@@ -6,6 +6,7 @@
#
PKGNAMESUFFIX= -client
+PORTREVISION= 1
COMMENT= The Advanced Maryland Automatic Network Disk Archiver (client)
diff --git a/misc/amanda26-server/Makefile b/misc/amanda26-server/Makefile
index 0240b8687e9b..765a7837dfad 100644
--- a/misc/amanda26-server/Makefile
+++ b/misc/amanda26-server/Makefile
@@ -7,6 +7,7 @@
PORTNAME= amanda
PORTVERSION= 2.6.1
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= misc
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
@@ -242,6 +243,7 @@ EXTRA_PATCHES= ${FILESDIR}/extra-patch-application-src::amzfs-sendrecv.pl
# MEMO:
# Prefix @WANT_SERVER_TRUE@ for server only files.
# Prefix @WANT_CLIENT_TRUE@ for client only files.
+# For debugging: dbprintf(_("getcmd: %s\n"), line);
# Maintainer TODO:
# o amanda-server installs libexec/amanda/amandad, sbin/amarchiver
# which should be handled by amanda-client only.
diff --git a/misc/amanda26-server/files/extra-patch-application-src::amzfs-sendrecv.pl b/misc/amanda26-server/files/extra-patch-application-src::amzfs-sendrecv.pl
new file mode 100644
index 000000000000..0a19153747d9
--- /dev/null
+++ b/misc/amanda26-server/files/extra-patch-application-src::amzfs-sendrecv.pl
@@ -0,0 +1,52 @@
+--- 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 {
+ }
+
diff --git a/misc/amanda26-server/files/patch-amandad-src::Makefile.in b/misc/amanda26-server/files/patch-amandad-src::Makefile.in
new file mode 100644
index 000000000000..9a80b4b90f95
--- /dev/null
+++ b/misc/amanda26-server/files/patch-amandad-src::Makefile.in
@@ -0,0 +1,12 @@
+--- amandad-src/Makefile.in.orig 2009-01-27 13:43:16.000000000 +0900
++++ amandad-src/Makefile.in 2009-01-27 13:44:02.000000000 +0900
+@@ -776,7 +776,8 @@
+ AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS)
+ LINT = $(AMLINT)
+ LINTFLAGS = $(AMLINTFLAGS)
+-amlib_LTLIBRARIES = libamandad.la
++@WANT_SERVER_TRUE@amlib_LTLIBRARIES =
++@WANT_CLIENT_TRUE@amlib_LTLIBRARIES = libamandad.la
+ LIB_EXTENSION = la
+ libamandad_la_SOURCES = amandad_util.c
+ libamandad_la_LDFLAGS = -release $(VERSION)
diff --git a/misc/amanda26-server/files/patch-amar-src::Makefile.in b/misc/amanda26-server/files/patch-amar-src::Makefile.in
new file mode 100644
index 000000000000..c7941f44904e
--- /dev/null
+++ b/misc/amanda26-server/files/patch-amar-src::Makefile.in
@@ -0,0 +1,12 @@
+--- amar-src/Makefile.in.orig 2009-01-27 14:01:04.000000000 +0900
++++ amar-src/Makefile.in 2009-01-27 14:01:36.000000000 +0900
+@@ -856,7 +856,8 @@
+ AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS)
+ LINT = @AMLINT@
+ LINTFLAGS = @AMLINTFLAGS@
+-amlib_LTLIBRARIES = libamar.la
++@WANT_SERVER_TRUE@amlib_LTLIBRARIES =
++@WANT_CLIENT_TRUE@amlib_LTLIBRARIES = libamar.la
+ libamar_la_SOURCES = amar.c
+ libamar_la_LDFLAGS = -release $(VERSION)
+ libamar_la_LIBADD = ../common-src/libamanda.la
diff --git a/misc/amanda26-server/files/patch-changer-src::chg-glue.pl b/misc/amanda26-server/files/patch-changer-src::chg-glue.pl
new file mode 100644
index 000000000000..20467d2116fd
--- /dev/null
+++ b/misc/amanda26-server/files/patch-changer-src::chg-glue.pl
@@ -0,0 +1,10 @@
+--- changer-src/chg-glue.pl.orig 2009-01-28 15:06:00.000000000 +0900
++++ changer-src/chg-glue.pl 2009-01-28 15:06:22.000000000 +0900
+@@ -206,6 +206,7 @@
+ finish();
+ return;
+ }
++ chomp($command);
+
+ if (($slot) = ($command =~ /^-slot (.*)$/)) {
+ do_slot($slot);
diff --git a/misc/amanda26-server/files/patch-common-src::event.c b/misc/amanda26-server/files/patch-common-src::event.c
new file mode 100644
index 000000000000..3011960848e4
--- /dev/null
+++ b/misc/amanda26-server/files/patch-common-src::event.c
@@ -0,0 +1,11 @@
+--- common-src/event.c.orig 2009-02-04 07:50:43.000000000 +0900
++++ common-src/event.c 2009-02-04 07:50:20.000000000 +0900
+@@ -480,7 +480,7 @@
+ * some tricky race conditions and extra machinery. Since there are few, if any,
+ * users of a glib version this old, such machinery wouldn't get much testing.
+ */
+-#if (GLIB_MAJOR_VERSION < 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 6))
++#if (1 || GLIB_MAJOR_VERSION < 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 6))
+ typedef struct ChildWatchSource {
+ GSource source; /* must be the first element in the struct */
+
diff --git a/misc/amanda26-server/files/patch-man::amanda.conf.5 b/misc/amanda26-server/files/patch-man::amanda.conf.5
new file mode 100644
index 000000000000..438be98f0ab9
--- /dev/null
+++ b/misc/amanda26-server/files/patch-man::amanda.conf.5
@@ -0,0 +1,11 @@
+--- man/amanda.conf.5.orig 2009-02-03 15:08:31.000000000 +0900
++++ man/amanda.conf.5 2009-02-03 15:10:14.000000000 +0900
+@@ -972,6 +972,8 @@
+ .\}
+ the width of the column itself\&. If set to a negative value, the width will be calculated on demand to fit the largest entry in this column\&.
+ .RE
++.sp
++.RE
+ .RS 4
+ Here is an example:
+ .sp
diff --git a/misc/amanda26-server/files/patch-perl::Amanda::Process.pm b/misc/amanda26-server/files/patch-perl::Amanda::Process.pm
new file mode 100644
index 000000000000..806659b3f979
--- /dev/null
+++ b/misc/amanda26-server/files/patch-perl::Amanda::Process.pm
@@ -0,0 +1,11 @@
+--- perl/Amanda/Process.pm.orig 2009-01-28 13:57:55.000000000 +0900
++++ perl/Amanda/Process.pm 2009-01-28 13:58:19.000000000 +0900
+@@ -155,7 +155,7 @@
+ $self->{ppid} = ();
+ my $ps_argument = $Amanda::Constants::PS_ARGUMENT;
+ if ($ps_argument eq "CYGWIN") {
+- open(PSTABLE, "-|", "ps -ef") || die("ps -ef: $!");
++ open(PSTABLE, "-|", "ps -f") || die("ps -f: $!");
+ my $psline = <PSTABLE>; #header line
+ while($psline = <PSTABLE>) {
+ chomp $psline;
diff --git a/misc/amanda26-server/files/patch-server-src::amcleanup.pl b/misc/amanda26-server/files/patch-server-src::amcleanup.pl
new file mode 100644
index 000000000000..fbd45ccbea63
--- /dev/null
+++ b/misc/amanda26-server/files/patch-server-src::amcleanup.pl
@@ -0,0 +1,11 @@
+--- server-src/amcleanup.pl.orig 2009-01-28 13:57:21.000000000 +0900
++++ server-src/amcleanup.pl 2009-01-28 13:57:33.000000000 +0900
+@@ -94,7 +94,7 @@
+ } elsif (!$process_alive) {
+ #check amdump/amflush process
+ foreach my $pname ("amdump", "amflush") {
+- my $pid = `ps -ef|grep -w ${pname}|grep -w ${config_name}| grep -v grep | awk '{print \$2}'`;
++ my $pid = `ps -f|grep -w ${pname}|grep -w ${config_name}| grep -v grep | awk '{print \$2}'`;
+ chomp $pid;
+ if ($pid ne "") {
+ $Amanda_process->set_master($pname, $pid);
diff --git a/misc/amanda32-client/Makefile b/misc/amanda32-client/Makefile
index 03f4f0473ffd..4e059afb73e2 100644
--- a/misc/amanda32-client/Makefile
+++ b/misc/amanda32-client/Makefile
@@ -6,6 +6,7 @@
#
PKGNAMESUFFIX= -client
+PORTREVISION= 1
COMMENT= The Advanced Maryland Automatic Network Disk Archiver (client)
diff --git a/misc/amanda32-server/Makefile b/misc/amanda32-server/Makefile
index 0240b8687e9b..765a7837dfad 100644
--- a/misc/amanda32-server/Makefile
+++ b/misc/amanda32-server/Makefile
@@ -7,6 +7,7 @@
PORTNAME= amanda
PORTVERSION= 2.6.1
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= misc
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
@@ -242,6 +243,7 @@ EXTRA_PATCHES= ${FILESDIR}/extra-patch-application-src::amzfs-sendrecv.pl
# MEMO:
# Prefix @WANT_SERVER_TRUE@ for server only files.
# Prefix @WANT_CLIENT_TRUE@ for client only files.
+# For debugging: dbprintf(_("getcmd: %s\n"), line);
# Maintainer TODO:
# o amanda-server installs libexec/amanda/amandad, sbin/amarchiver
# which should be handled by amanda-client only.
diff --git a/misc/amanda32-server/files/extra-patch-application-src::amzfs-sendrecv.pl b/misc/amanda32-server/files/extra-patch-application-src::amzfs-sendrecv.pl
new file mode 100644
index 000000000000..0a19153747d9
--- /dev/null
+++ b/misc/amanda32-server/files/extra-patch-application-src::amzfs-sendrecv.pl
@@ -0,0 +1,52 @@
+--- 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 {
+ }
+
diff --git a/misc/amanda32-server/files/patch-amandad-src::Makefile.in b/misc/amanda32-server/files/patch-amandad-src::Makefile.in
new file mode 100644
index 000000000000..9a80b4b90f95
--- /dev/null
+++ b/misc/amanda32-server/files/patch-amandad-src::Makefile.in
@@ -0,0 +1,12 @@
+--- amandad-src/Makefile.in.orig 2009-01-27 13:43:16.000000000 +0900
++++ amandad-src/Makefile.in 2009-01-27 13:44:02.000000000 +0900
+@@ -776,7 +776,8 @@
+ AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS)
+ LINT = $(AMLINT)
+ LINTFLAGS = $(AMLINTFLAGS)
+-amlib_LTLIBRARIES = libamandad.la
++@WANT_SERVER_TRUE@amlib_LTLIBRARIES =
++@WANT_CLIENT_TRUE@amlib_LTLIBRARIES = libamandad.la
+ LIB_EXTENSION = la
+ libamandad_la_SOURCES = amandad_util.c
+ libamandad_la_LDFLAGS = -release $(VERSION)
diff --git a/misc/amanda32-server/files/patch-amar-src::Makefile.in b/misc/amanda32-server/files/patch-amar-src::Makefile.in
new file mode 100644
index 000000000000..c7941f44904e
--- /dev/null
+++ b/misc/amanda32-server/files/patch-amar-src::Makefile.in
@@ -0,0 +1,12 @@
+--- amar-src/Makefile.in.orig 2009-01-27 14:01:04.000000000 +0900
++++ amar-src/Makefile.in 2009-01-27 14:01:36.000000000 +0900
+@@ -856,7 +856,8 @@
+ AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS)
+ LINT = @AMLINT@
+ LINTFLAGS = @AMLINTFLAGS@
+-amlib_LTLIBRARIES = libamar.la
++@WANT_SERVER_TRUE@amlib_LTLIBRARIES =
++@WANT_CLIENT_TRUE@amlib_LTLIBRARIES = libamar.la
+ libamar_la_SOURCES = amar.c
+ libamar_la_LDFLAGS = -release $(VERSION)
+ libamar_la_LIBADD = ../common-src/libamanda.la
diff --git a/misc/amanda32-server/files/patch-changer-src::chg-glue.pl b/misc/amanda32-server/files/patch-changer-src::chg-glue.pl
new file mode 100644
index 000000000000..20467d2116fd
--- /dev/null
+++ b/misc/amanda32-server/files/patch-changer-src::chg-glue.pl
@@ -0,0 +1,10 @@
+--- changer-src/chg-glue.pl.orig 2009-01-28 15:06:00.000000000 +0900
++++ changer-src/chg-glue.pl 2009-01-28 15:06:22.000000000 +0900
+@@ -206,6 +206,7 @@
+ finish();
+ return;
+ }
++ chomp($command);
+
+ if (($slot) = ($command =~ /^-slot (.*)$/)) {
+ do_slot($slot);
diff --git a/misc/amanda32-server/files/patch-common-src::event.c b/misc/amanda32-server/files/patch-common-src::event.c
new file mode 100644
index 000000000000..3011960848e4
--- /dev/null
+++ b/misc/amanda32-server/files/patch-common-src::event.c
@@ -0,0 +1,11 @@
+--- common-src/event.c.orig 2009-02-04 07:50:43.000000000 +0900
++++ common-src/event.c 2009-02-04 07:50:20.000000000 +0900
+@@ -480,7 +480,7 @@
+ * some tricky race conditions and extra machinery. Since there are few, if any,
+ * users of a glib version this old, such machinery wouldn't get much testing.
+ */
+-#if (GLIB_MAJOR_VERSION < 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 6))
++#if (1 || GLIB_MAJOR_VERSION < 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 6))
+ typedef struct ChildWatchSource {
+ GSource source; /* must be the first element in the struct */
+
diff --git a/misc/amanda32-server/files/patch-man::amanda.conf.5 b/misc/amanda32-server/files/patch-man::amanda.conf.5
new file mode 100644
index 000000000000..438be98f0ab9
--- /dev/null
+++ b/misc/amanda32-server/files/patch-man::amanda.conf.5
@@ -0,0 +1,11 @@
+--- man/amanda.conf.5.orig 2009-02-03 15:08:31.000000000 +0900
++++ man/amanda.conf.5 2009-02-03 15:10:14.000000000 +0900
+@@ -972,6 +972,8 @@
+ .\}
+ the width of the column itself\&. If set to a negative value, the width will be calculated on demand to fit the largest entry in this column\&.
+ .RE
++.sp
++.RE
+ .RS 4
+ Here is an example:
+ .sp
diff --git a/misc/amanda32-server/files/patch-perl::Amanda::Process.pm b/misc/amanda32-server/files/patch-perl::Amanda::Process.pm
new file mode 100644
index 000000000000..806659b3f979
--- /dev/null
+++ b/misc/amanda32-server/files/patch-perl::Amanda::Process.pm
@@ -0,0 +1,11 @@
+--- perl/Amanda/Process.pm.orig 2009-01-28 13:57:55.000000000 +0900
++++ perl/Amanda/Process.pm 2009-01-28 13:58:19.000000000 +0900
+@@ -155,7 +155,7 @@
+ $self->{ppid} = ();
+ my $ps_argument = $Amanda::Constants::PS_ARGUMENT;
+ if ($ps_argument eq "CYGWIN") {
+- open(PSTABLE, "-|", "ps -ef") || die("ps -ef: $!");
++ open(PSTABLE, "-|", "ps -f") || die("ps -f: $!");
+ my $psline = <PSTABLE>; #header line
+ while($psline = <PSTABLE>) {
+ chomp $psline;
diff --git a/misc/amanda32-server/files/patch-server-src::amcleanup.pl b/misc/amanda32-server/files/patch-server-src::amcleanup.pl
new file mode 100644
index 000000000000..fbd45ccbea63
--- /dev/null
+++ b/misc/amanda32-server/files/patch-server-src::amcleanup.pl
@@ -0,0 +1,11 @@
+--- server-src/amcleanup.pl.orig 2009-01-28 13:57:21.000000000 +0900
++++ server-src/amcleanup.pl 2009-01-28 13:57:33.000000000 +0900
+@@ -94,7 +94,7 @@
+ } elsif (!$process_alive) {
+ #check amdump/amflush process
+ foreach my $pname ("amdump", "amflush") {
+- my $pid = `ps -ef|grep -w ${pname}|grep -w ${config_name}| grep -v grep | awk '{print \$2}'`;
++ my $pid = `ps -f|grep -w ${pname}|grep -w ${config_name}| grep -v grep | awk '{print \$2}'`;
+ chomp $pid;
+ if ($pid ne "") {
+ $Amanda_process->set_master($pname, $pid);