git: 3b5b6c2798e3 - main - py-borgbackup: Upgrade to 1.4.0, preserving 1.2.8 as py-borgbackup12

From: Matthias Andree <mandree_at_FreeBSD.org>
Date: Sun, 21 Jul 2024 16:02:39 UTC
The branch main has been updated by mandree:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3b5b6c2798e3e59ae96a23b0ae16df519efa076f

commit 3b5b6c2798e3e59ae96a23b0ae16df519efa076f
Author:     Matthias Andree <mandree@FreeBSD.org>
AuthorDate: 2024-07-21 15:29:03 +0000
Commit:     Matthias Andree <mandree@FreeBSD.org>
CommitDate: 2024-07-21 16:02:27 +0000

    py-borgbackup: Upgrade to 1.4.0, preserving 1.2.8 as py-borgbackup12
    
    ...and mentioning it in MOVED so that the upgrade path is clear.
    
    ChangeLog:      https://www.borgbackup.org/releases/borg-1.4.html
---
 MOVED                                 |  1 +
 archivers/Makefile                    |  1 +
 archivers/py-borgbackup/Makefile      |  8 ++--
 archivers/py-borgbackup/distinfo      |  6 +--
 archivers/py-borgbackup/pkg-plist     |  1 +
 archivers/py-borgbackup11/Makefile    |  3 ++
 archivers/py-borgbackup12/Makefile    | 73 +++++++++++++++++++++++++++++++++++
 archivers/py-borgbackup12/distinfo    |  3 ++
 archivers/py-borgbackup12/pkg-descr   |  9 +++++
 archivers/py-borgbackup12/pkg-message | 32 +++++++++++++++
 archivers/py-borgbackup12/pkg-plist   | 35 +++++++++++++++++
 11 files changed, 165 insertions(+), 7 deletions(-)

diff --git a/MOVED b/MOVED
index f7564a104fd2..09d0a998d0bb 100644
--- a/MOVED
+++ b/MOVED
@@ -3401,3 +3401,4 @@ textproc/rubygem-nokogiri111|textproc/rubygem-nokogiri|2024-07-17|Obsolete, use
 devel/rubygem-google-gax||2024-07-21|Remove obsoleted port. This gem is officially end-of-life
 audio/strawberry@qt5|audio/strawberry|2024-07-21|Unflavor. Qt5 is obsolete
 audio/strawberry@qt6|audio/strawberry|2024-07-21|Unflavor. Qt5 is obsolete
+archivers/py-borgbackup|archivers/py-borgbackup12|2024-07-21|Borgbackup released a new stable version 1.4.0
diff --git a/archivers/Makefile b/archivers/Makefile
index 54ccaf3f66b3..46d216a9e410 100644
--- a/archivers/Makefile
+++ b/archivers/Makefile
@@ -183,6 +183,7 @@
     SUBDIR += py-blosc2
     SUBDIR += py-borgbackup
     SUBDIR += py-borgbackup11
+    SUBDIR += py-borgbackup12
     SUBDIR += py-brotli
     SUBDIR += py-brotlicffi
     SUBDIR += py-brotlipy
diff --git a/archivers/py-borgbackup/Makefile b/archivers/py-borgbackup/Makefile
index 0da3be670eb8..34be7f812f9a 100644
--- a/archivers/py-borgbackup/Makefile
+++ b/archivers/py-borgbackup/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	borgbackup
-DISTVERSION=	1.2.8
-PORTREVISION=	1
+DISTVERSION=	1.4.0
+PORTREVISION=	0
 CATEGORIES=	archivers python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -13,7 +13,7 @@ LICENSE=	BSD3CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
 # note that borgbackup pins the msgpack version range per patchlevel version!
-_BB_DEPENDS=	${PYTHON_PKGNAMEPREFIX}msgpack>=1.0.2<1.0.8_99:devel/py-msgpack@${PY_FLAVOR}
+_BB_DEPENDS=	${PYTHON_PKGNAMEPREFIX}msgpack>=1.0.2<1.1.0:devel/py-msgpack@${PY_FLAVOR}
 BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}setuptools-scm>=1.7:devel/py-setuptools-scm@${PY_FLAVOR} \
 		${_BB_DEPENDS}
 LIB_DEPENDS=	liblz4.so:archivers/liblz4 \
@@ -27,7 +27,7 @@ TEST_DEPENDS=	${RUN_DEPENDS} \
 		${PYTHON_PKGNAMEPREFIX}pkgconfig>=0:devel/py-pkgconfig@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR} \
 		fakeroot:security/fakeroot
-USES=		pkgconfig python ssl
+USES=		pkgconfig python:3.9+ ssl
 USE_PYTHON=	autoplist distutils
 MAKE_ENV=	BORG_OPENSSL_PREFIX=${OPENSSLBASE}
 
diff --git a/archivers/py-borgbackup/distinfo b/archivers/py-borgbackup/distinfo
index 050f395e4118..2c8ffe4a7bca 100644
--- a/archivers/py-borgbackup/distinfo
+++ b/archivers/py-borgbackup/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1711803798
-SHA256 (borgbackup-1.2.8.tar.gz) = d39d22b0d2cb745584d68608a179b6c75f7b40e496e96feb789e41d34991f4aa
-SIZE (borgbackup-1.2.8.tar.gz) = 4369117
+TIMESTAMP = 1721573353
+SHA256 (borgbackup-1.4.0.tar.gz) = c54c45155643fa66fed7f9ff2d134ea0a58d0ac197c18781ddc2fb236bf6ed29
+SIZE (borgbackup-1.4.0.tar.gz) = 3798511
diff --git a/archivers/py-borgbackup/pkg-plist b/archivers/py-borgbackup/pkg-plist
index 8582338afb36..be93d9bf9606 100644
--- a/archivers/py-borgbackup/pkg-plist
+++ b/archivers/py-borgbackup/pkg-plist
@@ -30,6 +30,7 @@ share/man/man1/borg-rename.1.gz
 share/man/man1/borg-serve.1.gz
 share/man/man1/borg-umount.1.gz
 share/man/man1/borg-upgrade.1.gz
+share/man/man1/borg-version.1.gz
 share/man/man1/borg-with-lock.1.gz
 share/man/man1/borg.1.gz
 share/man/man1/borgfs.1.gz
diff --git a/archivers/py-borgbackup11/Makefile b/archivers/py-borgbackup11/Makefile
index ba593f705f1f..b3d3d026354d 100644
--- a/archivers/py-borgbackup11/Makefile
+++ b/archivers/py-borgbackup11/Makefile
@@ -13,6 +13,9 @@ WWW=		https://pypi.org/project/borgbackup/
 LICENSE=	BSD3CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
+DEPRECATED=	No longer supported upstream, use borgbackup 1.2 (oldstable) or 1.4 (stable) instead.
+EXPIRATION_DATE=2024-09-30
+
 BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}setuptools-scm>=1.7:devel/py-setuptools-scm@${PY_FLAVOR}
 LIB_DEPENDS=	liblz4.so:archivers/liblz4 \
 		libzstd.so:archivers/zstd \
diff --git a/archivers/py-borgbackup12/Makefile b/archivers/py-borgbackup12/Makefile
new file mode 100644
index 000000000000..fd980609b8a9
--- /dev/null
+++ b/archivers/py-borgbackup12/Makefile
@@ -0,0 +1,73 @@
+PORTNAME=	borgbackup
+DISTVERSION=	1.2.8
+PORTREVISION=	1
+CATEGORIES=	archivers python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+PKGNAMESUFFIX=	12
+
+MAINTAINER=	mandree@FreeBSD.org
+COMMENT=	Deduplicating backup program
+WWW=		https://pypi.org/project/borgbackup/
+
+LICENSE=	BSD3CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+# note that borgbackup pins the msgpack version range per patchlevel version!
+_BB_DEPENDS=	${PYTHON_PKGNAMEPREFIX}msgpack>=1.0.2<1.0.8_99:devel/py-msgpack@${PY_FLAVOR}
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}setuptools-scm>=1.7:devel/py-setuptools-scm@${PY_FLAVOR} \
+		${_BB_DEPENDS}
+LIB_DEPENDS=	liblz4.so:archivers/liblz4 \
+		libzstd.so:archivers/zstd \
+		libxxhash.so:devel/xxhash
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}packaging>=19.0:devel/py-packaging@${PY_FLAVOR} \
+		${_BB_DEPENDS}
+TEST_DEPENDS=	${RUN_DEPENDS} \
+		${PYTHON_PKGNAMEPREFIX}tox>3.2:devel/py-tox@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}virtualenv>=0:devel/py-virtualenv@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pkgconfig>=0:devel/py-pkgconfig@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR} \
+		fakeroot:security/fakeroot
+USES=		pkgconfig python ssl
+USE_PYTHON=	autoplist distutils
+MAKE_ENV=	BORG_OPENSSL_PREFIX=${OPENSSLBASE}
+
+OPTIONS_DEFINE=		FUSE
+OPTIONS_DEFAULT=	FUSE
+
+FUSE_DESC=	Support to mount locally borg backup files
+FUSE_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}llfuse>0:devel/py-llfuse@${PY_FLAVOR}
+
+_BORGHOME=${WRKDIR}/testhome
+_BORGENV=-i BORG_PASSPHRASE=secret123 PYTHONPATH=${STAGEDIR}${PYTHON_SITELIBDIR} HOME=${_BORGHOME}
+post-install:
+	${MKDIR} ${STAGEDIR}${PREFIX}/share/man/man1/
+	${INSTALL_MAN} ${WRKSRC}/docs/man/* ${STAGEDIR}${PREFIX}/share/man/man1/
+	${FIND} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/borg/ -name "*.so" \
+		-exec ${STRIP_CMD} {} \;
+	@${ECHO_MSG} "----> running borg smoke tests"
+	${MKDIR} ${_BORGHOME}
+	${SETENV} PYTHONPATH=${STAGEDIR}${PYTHON_SITELIBDIR} ${STAGEDIR}${PREFIX}/bin/borg -V
+	${RM} -r ${WRKDIR}/borgrepo
+	${SETENV} ${_BORGENV} ${STAGEDIR}${PREFIX}/bin/borg init --encryption=repokey ${WRKDIR}/borgrepo
+	${SETENV} ${_BORGENV} ${STAGEDIR}${PREFIX}/bin/borg key export ${WRKDIR}/borgrepo
+	${SETENV} ${_BORGENV} ${STAGEDIR}${PREFIX}/bin/borg create ${WRKDIR}/borgrepo::test1 ${WRKSRC}
+	${SETENV} ${_BORGENV} ${STAGEDIR}${PREFIX}/bin/borg create ${WRKDIR}/borgrepo::test2 ${WRKSRC} ${STAGEDIR}
+	${SETENV} ${_BORGENV} ${STAGEDIR}${PREFIX}/bin/borg check --verify-data ${WRKDIR}/borgrepo
+	${SETENV} ${_BORGENV} ${STAGEDIR}${PREFIX}/bin/borg info ${WRKDIR}/borgrepo
+	${SETENV} ${_BORGENV} ${STAGEDIR}${PREFIX}/bin/borg prune --keep-last 1 ${WRKDIR}/borgrepo
+	${SETENV} ${_BORGENV} ${STAGEDIR}${PREFIX}/bin/borg check --verify-data ${WRKDIR}/borgrepo
+	${ECHO_CMD} YES \
+	| ${SETENV} ${_BORGENV} ${STAGEDIR}${PREFIX}/bin/borg check --repair ${WRKDIR}/borgrepo
+	${SETENV} ${_BORGENV} ${STAGEDIR}${PREFIX}/bin/borg compact --progress ${WRKDIR}/borgrepo
+	${SETENV} ${_BORGENV} ${STAGEDIR}${PREFIX}/bin/borg check --verify-data ${WRKDIR}/borgrepo
+	${SETENV} ${_BORGENV} ${STAGEDIR}${PREFIX}/bin/borg extract --dry-run --progress ${WRKDIR}/borgrepo::test2
+	${SETENV} ${_BORGENV} ${STAGEDIR}${PREFIX}/bin/borg export-tar ${WRKDIR}/borgrepo::test2 - >/dev/null
+	${SETENV} ${_BORGENV} ${STAGEDIR}${PREFIX}/bin/borg list ${WRKDIR}/borgrepo
+	# long output - ${SETENV} ${_BORGENV} ${STAGEDIR}${PREFIX}/bin/borg list ${WRKDIR}/borgrepo::test2 | ${GREP} -v ^d
+	${SETENV} ${_BORGENV} ${STAGEDIR}${PREFIX}/bin/borg info ${WRKDIR}/borgrepo
+
+do-test:
+	cd ${WRKSRC} && ${SETENV} ${_BORGENV} ${TEST_ENV} tox-${PYTHON_VER} -e ${PY_FLAVOR} -vv
+
+.include <bsd.port.mk>
diff --git a/archivers/py-borgbackup12/distinfo b/archivers/py-borgbackup12/distinfo
new file mode 100644
index 000000000000..050f395e4118
--- /dev/null
+++ b/archivers/py-borgbackup12/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1711803798
+SHA256 (borgbackup-1.2.8.tar.gz) = d39d22b0d2cb745584d68608a179b6c75f7b40e496e96feb789e41d34991f4aa
+SIZE (borgbackup-1.2.8.tar.gz) = 4369117
diff --git a/archivers/py-borgbackup12/pkg-descr b/archivers/py-borgbackup12/pkg-descr
new file mode 100644
index 000000000000..f2e09ee51b29
--- /dev/null
+++ b/archivers/py-borgbackup12/pkg-descr
@@ -0,0 +1,9 @@
+[excerpt from borgbackup web site]
+
+BorgBackup (short: Borg) is a deduplicating backup program. Optionally, it
+supports compression and authenticated encryption.
+
+The main goal of Borg is to provide an efficient and secure way to backup data.
+The data deduplication technique used makes Borg suitable for daily backups
+since only changes are stored. The authenticated encryption technique makes it
+suitable for backups to not fully trusted targets.
diff --git a/archivers/py-borgbackup12/pkg-message b/archivers/py-borgbackup12/pkg-message
new file mode 100644
index 000000000000..52b4e6aa0e07
--- /dev/null
+++ b/archivers/py-borgbackup12/pkg-message
@@ -0,0 +1,32 @@
+[
+{ type: install
+  message: <<EOM
+In order to mount locally a remote archive or an entire repository as a FUSE
+filesystem, it is required to load fusefs module, for instance, as root, run:
+
+	kldload fusefs
+
+To load the module at boot time, you can add it to the kld_list variable
+in /etc/rc.conf or related files, for instance, by running
+
+	sysrc kld_list+=fusefs
+
+as root.  Alternatively, to load the module earlier, you can manually add
+
+	fusefs_load="YES"
+
+to /boot/loader.conf.local or /boot/loader.conf with a text editor.
+
+
+Also, if you plan to mount borg repositories as non root user, you need to run
+
+# sysctl vfs.usermount=1
+
+and add the line
+
+vfs.usermount=1
+
+to /etc/sysctl.conf to ensure the setting is loaded at boot time.
+EOM
+}
+]
diff --git a/archivers/py-borgbackup12/pkg-plist b/archivers/py-borgbackup12/pkg-plist
new file mode 100644
index 000000000000..8582338afb36
--- /dev/null
+++ b/archivers/py-borgbackup12/pkg-plist
@@ -0,0 +1,35 @@
+share/man/man1/borg-benchmark-crud.1.gz
+share/man/man1/borg-benchmark.1.gz
+share/man/man1/borg-break-lock.1.gz
+share/man/man1/borg-change-passphrase.1.gz
+share/man/man1/borg-check.1.gz
+share/man/man1/borg-common.1.gz
+share/man/man1/borg-compact.1.gz
+share/man/man1/borg-compression.1.gz
+share/man/man1/borg-config.1.gz
+share/man/man1/borg-create.1.gz
+share/man/man1/borg-delete.1.gz
+share/man/man1/borg-diff.1.gz
+share/man/man1/borg-export-tar.1.gz
+share/man/man1/borg-extract.1.gz
+share/man/man1/borg-import-tar.1.gz
+share/man/man1/borg-info.1.gz
+share/man/man1/borg-init.1.gz
+share/man/man1/borg-key-change-passphrase.1.gz
+share/man/man1/borg-key-export.1.gz
+share/man/man1/borg-key-import.1.gz
+share/man/man1/borg-key-migrate-to-repokey.1.gz
+share/man/man1/borg-key.1.gz
+share/man/man1/borg-list.1.gz
+share/man/man1/borg-mount.1.gz
+share/man/man1/borg-patterns.1.gz
+share/man/man1/borg-placeholders.1.gz
+share/man/man1/borg-prune.1.gz
+share/man/man1/borg-recreate.1.gz
+share/man/man1/borg-rename.1.gz
+share/man/man1/borg-serve.1.gz
+share/man/man1/borg-umount.1.gz
+share/man/man1/borg-upgrade.1.gz
+share/man/man1/borg-with-lock.1.gz
+share/man/man1/borg.1.gz
+share/man/man1/borgfs.1.gz