summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2022-10-13 10:11:19 +0100
committerMarek Szuba <marecki@gentoo.org>2022-10-13 10:31:07 +0100
commit05080d4d865f13bba83b65734de2b5d3bff3f9a7 (patch)
tree7e0c79695a7e8d09cdf1f3b3c8fdbba25275f1cb /app-backup
parentnet-misc/oidc-agent: add 4.4.0 (diff)
downloadgentoo-05080d4d865f13bba83b65734de2b5d3bff3f9a7.tar.gz
gentoo-05080d4d865f13bba83b65734de2b5d3bff3f9a7.tar.bz2
gentoo-05080d4d865f13bba83b65734de2b5d3bff3f9a7.zip
app-backup/borgmatic: add 1.7.3
Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'app-backup')
-rw-r--r--app-backup/borgmatic/Manifest1
-rw-r--r--app-backup/borgmatic/borgmatic-1.7.3.ebuild68
-rw-r--r--app-backup/borgmatic/files/borgmatic-1.7.3-systemd_service_bin_path.patch8
3 files changed, 77 insertions, 0 deletions
diff --git a/app-backup/borgmatic/Manifest b/app-backup/borgmatic/Manifest
index 91760f50ee99..8ec71b9b9c77 100644
--- a/app-backup/borgmatic/Manifest
+++ b/app-backup/borgmatic/Manifest
@@ -1,2 +1,3 @@
DIST borgmatic-1.6.6.tar.gz 323601 BLAKE2B b40d8f00e3b7bbd343336cf4c6992e34d8289de451c184717827e8e43519b84d4bb9b8cff6a835a7cc502d2e93045f0196d744e4b6ad800de1276e11c3189cec SHA512 f1a6dfa344ebee89e88f1aa6b43d8493c80815c637d8e0f7f6314462fd511b576e62246d957023ab2f9a68875d2818e2b8ef00cbf3339dc35a93d6ebad0bed19
DIST borgmatic-1.7.2.tar.gz 333772 BLAKE2B fd628e9c77547686d4edf5d1066d3c171575f4d923ebc5205c5eb64f3a960e94c121282e9f4fb02b1291a81011a18dc393c6d13a07f215585459e7a5b55f8107 SHA512 6ec12ec25ae4d0210bb9114795c1ea292d8236f9e68c9425e24ee7b580796504e4c317a3fcf778806a33bbd3db68669beb4ef7a88ec538c1bd432db9a2845b3e
+DIST borgmatic-1.7.3.tar.gz 337143 BLAKE2B 3cd0112978feb6476c9d6ea9a81bb535406514e82d2134f408935c5949ecc276881c4402251bffdccf814fe58c93d6db4d0cbe4a63138a865bbab3459e1bd83f SHA512 aa40090fbddd5453c792cf289021d52347b022a2dfb5bf53d7695f594c27a2fd8e7d9cfe0912e02fb3c1c1b8cd7a4a1a4f4890f86458bde58554f58d9d30b523
diff --git a/app-backup/borgmatic/borgmatic-1.7.3.ebuild b/app-backup/borgmatic/borgmatic-1.7.3.ebuild
new file mode 100644
index 000000000000..7693ff51ae61
--- /dev/null
+++ b/app-backup/borgmatic/borgmatic-1.7.3.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+DISTUTILS_SINGLE_IMPL=1
+DISTUTILS_USE_PEP517=setuptools
+
+inherit distutils-r1 systemd
+
+DESCRIPTION="Automatically create, prune and verify backups with borgbackup"
+HOMEPAGE="https://torsion.org/borgmatic/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~riscv"
+
+# borg is called as an external tool, hence no pythonic stuff
+RDEPEND="app-backup/borgbackup
+ $(python_gen_cond_dep '
+ <dev-python/colorama-0.5[${PYTHON_USEDEP}]
+ dev-python/jsonschema[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ <dev-python/ruamel-yaml-0.18.0[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ ')"
+BDEPEND="
+ test? (
+ $(python_gen_cond_dep '
+ >=dev-python/flexmock-0.10.10[${PYTHON_USEDEP}]
+ ')
+ )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.1-no_test_coverage.patch
+ "${FILESDIR}"/${PN}-1.7.3-systemd_service_bin_path.patch
+)
+
+# test_borgmatic_version_matches_news_version tries to run the 'borgmatic'
+# executable so making it work would require passing --install
+# to distutils_enable_tests. Given that this is the only test requiring
+# this and that all it does is make sure the NEWS file has been updated
+# for the current version, just skip it.
+EPYTEST_DESELECT=(
+ tests/integration/commands/test_borgmatic.py::test_borgmatic_version_matches_news_version
+)
+
+distutils_enable_tests pytest
+
+src_install() {
+ distutils-r1_src_install
+ systemd_dounit sample/systemd/borgmatic.{service,timer}
+ keepdir /etc/borgmatic
+}
+
+pkg_postinst() {
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ elog "To generate a sample configuration file, run:"
+ elog " generate-borgmatic-config"
+ else
+ ewarn "Please note that since version 1.7.0 ${PN} no longer supports old-style command-line action flags like '--create', '--list', etc."
+ ewarn "Make sure all your scripts use actions, e.g. 'create', 'list' and so on"
+ fi
+ elog
+ elog "Systemd users wishing to periodically run borgmatic can use the provided timer and service units."
+}
diff --git a/app-backup/borgmatic/files/borgmatic-1.7.3-systemd_service_bin_path.patch b/app-backup/borgmatic/files/borgmatic-1.7.3-systemd_service_bin_path.patch
new file mode 100644
index 000000000000..25b283777408
--- /dev/null
+++ b/app-backup/borgmatic/files/borgmatic-1.7.3-systemd_service_bin_path.patch
@@ -0,0 +1,8 @@
+--- a/sample/systemd/borgmatic.service
++++ b/sample/systemd/borgmatic.service
+@@ -61,4 +61,4 @@
+ # Delay start to prevent backups running during boot. Note that systemd-inhibit requires dbus and
+ # dbus-user-session to be installed.
+ ExecStartPre=sleep 1m
+-ExecStart=systemd-inhibit --who="borgmatic" --what="sleep:shutdown" --why="Prevent interrupting scheduled backup" /root/.local/bin/borgmatic --verbosity -1 --syslog-verbosity 1
++ExecStart=systemd-inhibit --who="borgmatic" --what="sleep:shutdown" --why="Prevent interrupting scheduled backup" /usr/bin/borgmatic --verbosity -1 --syslog-verbosity 1