summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2023-01-18 11:30:44 +0100
committerHelmut Grohne <helmut@subdivi.de>2023-01-18 11:30:44 +0100
commit2db760078f0951c86ea378afdb0807c4632e2196 (patch)
tree762b3293cf024d1e3e47833c0c03d530d17caf5d
parent2f345516a87baa1fe0d5d7221aec650bb74e9ad6 (diff)
Add borgbackup-is-borgbackup2 package. Thanks to Scott Kitterman.
-rw-r--r--debian/borgbackup-is-borgbackup2.dirs2
-rw-r--r--debian/control14
-rwxr-xr-xdebian/rules9
3 files changed, 23 insertions, 2 deletions
diff --git a/debian/borgbackup-is-borgbackup2.dirs b/debian/borgbackup-is-borgbackup2.dirs
new file mode 100644
index 00000000..98d15831
--- /dev/null
+++ b/debian/borgbackup-is-borgbackup2.dirs
@@ -0,0 +1,2 @@
+usr/bin
+usr/share/man/man1
diff --git a/debian/control b/debian/control
index afc92b21..01fd680c 100644
--- a/debian/control
+++ b/debian/control
@@ -65,12 +65,24 @@ Description: deduplicating and compressing backup program (version 2.x)
Please note that the server and the client should be on the same
version of borgbackup. Using different versions of borgbackup on
client and server might result in 'incompatible API version' error
- messages and a non-working backup.
+ messages and a non-working backup. Borg 2.x can only read from Borg 1.x
+ repositories.
.
While there is no direct operations mode for pull-type backups, you
can configure the backup target in append-only mode, preventing the
backup source from deleting or altering previous backups.
+Package: borgbackup-is-borgbackup2
+Architecture: any
+Depends: ${misc:Depends}, borgbackup2 (= ${binary:Version})
+Conflicts: borgbackup
+Description: deduplicating and compressing backup program (unversioned symlink)
+ This package makes the borg command refer to version 2.x of borgbackup.
+ If you prefer version 1.x, please install borgbackup instead.
+ .
+ Refer to the package descriptions of borgbackup and borgbackup2 for more
+ information about what borg is.
+
Package: borgbackup2-doc
Architecture: all
Multi-Arch: foreign
diff --git a/debian/rules b/debian/rules
index 0491ea39..dbbad4e1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,6 +9,7 @@
VERSION_SUFFIX=2
MODULE_DIR=/usr/lib/borgbackup$(VERSION_SUFFIX)
PACKAGE=borgbackup$(VERSION_SUFFIX)
+SYMLINK_PACKAGE=borgbackup-is-borgbackup$(VERSION_SUFFIX)
# Full hardening for the cython build.
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
@@ -70,15 +71,21 @@ execute_after_dh_install-arch:
ifneq (,$(VERSION_SUFFIX))
set -e; for f in debian/$(PACKAGE)/usr/bin/*; do \
mv "$$f" "$${f}$(VERSION_SUFFIX)"; \
+ ln -s "$${f##*/}$(VERSION_SUFFIX)" "debian/$(SYMLINK_PACKAGE)$${f#debian/$(PACKAGE)}"; \
done
mv 'debian/$(PACKAGE)/usr/share/bash-completion/completions/borg' 'debian/$(PACKAGE)/usr/share/bash-completion/completions/borg$(VERSION_SUFFIX)'
execute_after_dh_installman-arch:
set -e; for f in debian/$(PACKAGE)/usr/share/man/man1/*.1; do \
- mv "$$f" "$$(echo "$$f" | sed 's,^\(.*/[a-z]*\),&$(VERSION_SUFFIX),')"; \
+ v=$$(echo "$$f" | sed 's,^\(.*/[a-z]*\),&$(VERSION_SUFFIX),'); \
+ mv "$$f" "$$v"; \
+ ln -s "$${v##*/}.gz" "debian/$(SYMLINK_PACKAGE)$${f#debian/$(PACKAGE)}.gz"; \
done
endif
+override_dh_installdocs-arch:
+ dh_installdocs --link-doc=borgbackup2
+
# Do not compress .ico file (affects html documentation)
override_dh_compress:
dh_compress -X.ico -Xfonts