FreeBSD Bugzilla – Attachment 252127 Details for
Bug 280330
[new port] sysutils/simplesnap: powerful system for transferring ZFS snapshots across a network
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
sysutils/simplesnap: Add new port
0001-sysutils-simplesnap-Add-new-port.diff (text/plain), 5.75 KB, created by
Fabian Keil
on 2024-07-17 13:07:30 UTC
(
hide
)
Description:
sysutils/simplesnap: Add new port
Filename:
MIME Type:
Creator:
Fabian Keil
Created:
2024-07-17 13:07:30 UTC
Size:
5.75 KB
patch
obsolete
>From 2a7fffd9f2fe620b1ef5dfffd6d847ffd7c9dcd3 Mon Sep 17 00:00:00 2001 >From: Fabian Keil <fk@fabiankeil.de> >Date: Wed, 30 Dec 2020 14:42:02 +0100 >Subject: [PATCH] sysutils/simplesnap: Add new port > >simplesnap is a powerful system for transferring ZFS snapshots across >a network. Although it can serve many purposes, its primary goal is to >manage backups from one ZFS filesystem to a backup filesystem also >running ZFS, using incremental backups to minimize network traffic and >disk usage. >--- > sysutils/Makefile | 1 + > sysutils/simplesnap/Makefile | 34 +++++++++++ > sysutils/simplesnap/distinfo | 3 + > .../simplesnap/files/patch-simplesnapwrap | 59 +++++++++++++++++++ > sysutils/simplesnap/pkg-descr | 5 ++ > 5 files changed, 102 insertions(+) > create mode 100644 sysutils/simplesnap/Makefile > create mode 100644 sysutils/simplesnap/distinfo > create mode 100644 sysutils/simplesnap/files/patch-simplesnapwrap > create mode 100644 sysutils/simplesnap/pkg-descr > >diff --git a/sysutils/Makefile b/sysutils/Makefile >index 155a9094a2d0..01dee684ffe5 100644 >--- a/sysutils/Makefile >+++ b/sysutils/Makefile >@@ -1376,6 +1376,7 @@ > SUBDIR += signon-plugin-oauth2 > SUBDIR += signon-ui > SUBDIR += signond >+ SUBDIR += simplesnap > SUBDIR += sispmctl > SUBDIR += skopeo > SUBDIR += slack >diff --git a/sysutils/simplesnap/Makefile b/sysutils/simplesnap/Makefile >new file mode 100644 >index 000000000000..d35d8223c0ab >--- /dev/null >+++ b/sysutils/simplesnap/Makefile >@@ -0,0 +1,34 @@ >+PORTNAME= simplesnap >+PORTVERSION= 0.0.2021.09.06 >+DISTVERSIONPREFIX= v >+CATEGORIES= sysutils >+ >+MAINTAINER= fk@fabiankeil.de >+COMMENT= Transfers ZFS snapshots across a network >+WWW= https://github.com/jgoerzen/simplesnap >+ >+LICENSE= GPLv3 >+LICENSE_FILE= ${WRKSRC}/COPYING >+ >+RUN_DEPENDS= bash:shells/bash \ >+ gdate:sysutils/coreutils >+ >+USES= shebangfix >+ >+USE_GITHUB= yes >+GH_ACCOUNT= jgoerzen >+GH_TAGNAME= 1b68bb9f0e >+ >+PLIST_FILES= sbin/${PORTNAME} \ >+ sbin/${PORTNAME}wrap \ >+ share/man/man8/simplesnap.8.gz >+SHEBANG_FILES= ${PORTNAME} ${PORTNAME}wrap >+ >+NO_BUILD= yes >+ >+do-install: >+ ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/sbin >+ ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME}wrap ${STAGEDIR}${PREFIX}/sbin >+ ${INSTALL_MAN} ${WRKSRC}/doc/${PORTNAME}.8 ${STAGEDIR}${PREFIX}/share/man/man8 >+ >+.include <bsd.port.mk> >diff --git a/sysutils/simplesnap/distinfo b/sysutils/simplesnap/distinfo >new file mode 100644 >index 000000000000..e35dbb1a795f >--- /dev/null >+++ b/sysutils/simplesnap/distinfo >@@ -0,0 +1,3 @@ >+TIMESTAMP = 1635946833 >+SHA256 (jgoerzen-simplesnap-v0.0.2021.09.06-1b68bb9f0e_GH0.tar.gz) = e2d759ef6f6e342283fb3429be91c6db56137322282fdd41b224308f973761ca >+SIZE (jgoerzen-simplesnap-v0.0.2021.09.06-1b68bb9f0e_GH0.tar.gz) = 51451 >diff --git a/sysutils/simplesnap/files/patch-simplesnapwrap b/sysutils/simplesnap/files/patch-simplesnapwrap >new file mode 100644 >index 000000000000..b810cb271f67 >--- /dev/null >+++ b/sysutils/simplesnap/files/patch-simplesnapwrap >@@ -0,0 +1,59 @@ >+From 291f06c48636ea643900174072372bc7b2e48810 Mon Sep 17 00:00:00 2001 >+From: Fabian Keil <fk@fabiankeil.de> >+Date: Wed, 30 Dec 2020 20:58:03 +0100 >+Subject: [PATCH] simplesnapwrap: Use ghead if available >+ >+... as the standard head may not understand negative line counts. >+ >+Fixes "simplesnapwrap reap mainset dpool" on ElectroBSD. >+--- >+ simplesnapwrap | 10 ++++++---- >+ 1 file changed, 6 insertions(+), 4 deletions(-) >+ >+diff --git simplesnapwrap simplesnapwrap >+index d0bf79b..3009b2d 100755 >+--- simplesnapwrap >++++ simplesnapwrap >+@@ -48,6 +48,8 @@ SED="gsed" >+ gsed &> /dev/null || SED="sed" >+ GREP="ggrep" >+ ggrep &> /dev/null || GREP="grep" >++HEAD="ghead" >++ghead &> /dev/null < /dev/null || HEAD="head" >+ >+ >+ # template - $1 >+@@ -98,10 +100,10 @@ if [ "$1" = "reinvoked" ]; then >+ logit "Listing snapshots on \"${DATASET}\" with template \"${TEMPLATE}\"" >+ >+ USINGBOOKMARK=0 >+- OLDESTSNAP="`listsnaps \"${TEMPLATE}\" \"${DATASET}\" | head -n 1`" >++ OLDESTSNAP="`listsnaps \"${TEMPLATE}\" \"${DATASET}\" | $HEAD -n 1`" >+ if [ -z "${OLDESTSNAP}" ]; then >+ logit "Found no existing snapshot, looking for a bookmark." >+- OLDESTSNAP="`listbookmarks \"${TEMPLATE}\" \"${DATASET}\" | head -n 1`" >++ OLDESTSNAP="`listbookmarks \"${TEMPLATE}\" \"${DATASET}\" | $HEAD -n 1`" >+ if [ -z "${OLDESTSNAP}" ]; then >+ logit "Found no existing bookmark either; will send full stream." >+ else >+@@ -152,7 +154,7 @@ if [ "$1" = "reinvoked" ]; then >+ [ -z "$1" ] && exiterror "No template given." >+ >+ # We always save the most recent. >+- SNAPSTOREMOVE="`listsnaps \"${TEMPLATE}\" \"${DATASET}\" | head -n -1`" >++ SNAPSTOREMOVE="`listsnaps \"${TEMPLATE}\" \"${DATASET}\" | $HEAD -n -1`" >+ if [ -z "${SNAPSTOREMOVE}" ]; then >+ logit "No snapshots to remove." >+ else >+@@ -164,7 +166,7 @@ if [ "$1" = "reinvoked" ]; then >+ fi >+ >+ # We always save the most recent. >+- BOOKSTOREMOVE="`listbookmarks \"${TEMPLATE}\" \"${DATASET}\" | head -n -1`" >++ BOOKSTOREMOVE="`listbookmarks \"${TEMPLATE}\" \"${DATASET}\" | $HEAD -n -1`" >+ if [ -z "${BOOKSTOREMOVE}" ]; then >+ logit "No bookmarks to remove." >+ else >+-- >+2.28.0 >+ >diff --git a/sysutils/simplesnap/pkg-descr b/sysutils/simplesnap/pkg-descr >new file mode 100644 >index 000000000000..6bfdb94f1b37 >--- /dev/null >+++ b/sysutils/simplesnap/pkg-descr >@@ -0,0 +1,5 @@ >+simplesnap is a powerful system for transferring ZFS snapshots across >+a network. Although it can serve many purposes, its primary goal is to >+manage backups from one ZFS filesystem to a backup filesystem also >+running ZFS, using incremental backups to minimize network traffic and >+disk usage. >-- >2.45.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 280330
:
252127
|
256931
Working