aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Weinberger <adamw@FreeBSD.org>2019-07-27 11:41:12 +0000
committerAdam Weinberger <adamw@FreeBSD.org>2019-07-27 11:41:12 +0000
commit80aac3925642526faee4ac37f9ce0f4a347fd68c (patch)
treef395e7b8ef7aee329eed931781a826201fd75b9c
parent9bf5bdf2604aa6b7c52ec2b1a024af796f4d529f (diff)
downloadports-80aac3925642526faee4ac37f9ce0f4a347fd68c.tar.gz
ports-80aac3925642526faee4ac37f9ce0f4a347fd68c.zip
Notes
-rw-r--r--sysutils/acts/Makefile7
-rw-r--r--sysutils/acts/files/patch-acts33
-rw-r--r--sysutils/acts/pkg-descr4
3 files changed, 39 insertions, 5 deletions
diff --git a/sysutils/acts/Makefile b/sysutils/acts/Makefile
index af8ec8d52664..1a659e8783d5 100644
--- a/sysutils/acts/Makefile
+++ b/sysutils/acts/Makefile
@@ -4,9 +4,10 @@
PORTNAME= acts
PORTVERSION= 1.4.0
DISTVERSIONPREFIX= v
+PORTREVISION= 1
CATEGORIES= sysutils archivers
-MAINTAINER= feld@FreeBSD.org
+MAINTAINER= adamw@FreeBSD.org
COMMENT= Another Calendar-based Tarsnap Script
LICENSE= PD
@@ -20,7 +21,7 @@ NO_BUILD= yes
NO_ARCH= yes
do-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/acts ${STAGEDIR}${PREFIX}/bin/acts
- ${INSTALL_DATA} ${WRKSRC}/acts.conf.sample ${STAGEDIR}${PREFIX}/etc/acts.conf.sample
+ ${INSTALL_SCRIPT} ${WRKSRC}/acts ${STAGEDIR}${PREFIX}/bin
+ ${INSTALL_DATA} ${WRKSRC}/acts.conf.sample ${STAGEDIR}${PREFIX}/etc
.include <bsd.port.mk>
diff --git a/sysutils/acts/files/patch-acts b/sysutils/acts/files/patch-acts
new file mode 100644
index 000000000000..72d6b1100c54
--- /dev/null
+++ b/sysutils/acts/files/patch-acts
@@ -0,0 +1,33 @@
+From 8230c749dd92ce6d5fd7b742525e8c9701f4bacb Mon Sep 17 00:00:00 2001
+From: Adam Weinberger <adamw@adamw.org>
+Date: Tue, 16 Jul 2019 06:16:27 -0600
+Subject: [PATCH] Wrap the archive deletion tarsnap call
+
+With it unwrapped, if you call tarsnap with --print-stats, or if that
+is in your tarsnap.conf, you'll get the stats printed after every
+archive deletion.
+
+While the information is great to have, if you have many targets,
+you get 5n lines of output, with nothing indicating which target it's
+referring to. It might be worth exploring a better way to show how
+much data got added and/or removed for each target, given that tarsnap
+can automatically give that info right back to acts.
+---
+ acts | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/acts b/acts
+index 4dc1803..63f35cb 100755
+--- acts.orig
++++ acts
+@@ -238,7 +238,9 @@ prune_backups() {
+ log_verbose "message=\"Deleting backup prefix $archiveprefixtodel*\""
+ echo "$archives" | grep -E "^$archiveprefixtodel" | while read -r archivetodel; do
+ log_debug "message=\"Deleting backup $archivetodel\""
+- $tarsnap -d -f "$archivetodel"
++ if ! output="$($tarsnap -d -f "$archivetodel" 2>&1)"; then
++ log_message "delete-error type=$backuplevel output=\"$(echo $output | tr '\n' " ")\""
++ fi
+ done
+ done
+ else
diff --git a/sysutils/acts/pkg-descr b/sysutils/acts/pkg-descr
index b969560dc6ed..5caecba5d92e 100644
--- a/sysutils/acts/pkg-descr
+++ b/sysutils/acts/pkg-descr
@@ -5,7 +5,7 @@ Some design goals:
Calendar-based (daily, monthly, yearly) backup schedule
Portable, small code footprint.
-One Tarsnap archive is created per-target per-run. 31 daily, 12 monthly,
-and indefinite yearly backups are kept.
+By default, 31 daily, 12 monthly, and indefinite yearly backups
+are kept.
WWW: https://github.com/alexjurkiewicz/acts