1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
8 if [[ ${PV} == "9999" ]] ; then
9 EGIT_REPO_URI="https://github.com/digint/btrbk.git"
13 SRC_URI="https://digint.ch/download/btrbk/releases/${P}.tar.xz"
14 KEYWORDS="~amd64 ~arm ~arm64 ~x86"
17 DESCRIPTION="Tool for creating snapshots and remote backups of btrfs subvolumes"
18 HOMEPAGE="https://digint.ch/btrbk/"
23 DEPEND="doc? ( >=dev-ruby/asciidoctor-1.5.7 )"
25 RDEPEND="dev-lang/perl
27 mbuffer? ( >=sys-block/mbuffer-20180505 )
28 >=sys-fs/btrfs-progs-4.12"
32 use doc && emake -C doc
35 local targets="install-bin install-etc install-share install-systemd"
36 use doc && targets="${targets} install-man install-doc"
39 DOCDIR="/usr/share/doc/${PF}" \
40 SYSTEMDDIR="$(systemd_get_systemunitdir)" \
44 if has_version "<${CATEGORY}/${PN}-0.26.0" ; then
45 upgrade_0_26_0_warning="1"
47 if has_version "<${CATEGORY}/${PN}-0.27.0" ; then
48 upgrade_0_27_0_warning="1"
52 if [[ "${upgrade_0_26_0_warning}" == "1" ]]; then
53 ewarn "If you are using raw targets, make sure to run the"
54 ewarn "\"raw_suffix2sidecar\" utility in each target directory."
56 if [[ "${upgrade_0_27_0_warning}" == "1" ]]; then
57 ewarn 'Due to a bugfix in the scheduler [1] [2], previously preserved'
58 ewarn 'monthly/yearly backups could get deleted when upgrading to'
61 ewarn 'Before upgrading to btrbk-0.27.0, make sure to stop all cron jobs'
62 ewarn 'or systemd timers calling btrbk.'
64 ewarn 'After upgrading, run "btrbk prune --dry-run --print-schedule" and'
65 ewarn 'check if any snapshots/backups would get deleted. If you want to'
66 ewarn 'forcibly preserve a snapshot/backup forever, rename it:'
68 ewarn ' mv mysubvol.YYYYMMDD mysubvol.YYYYMMDD.keep_forever'
70 ewarn 'Note that btrbk ignores subvolumes with unknown naming scheme, e.g.'
71 ewarn '(".keep_forever" suffix in the example above).'
73 ewarn ' [1] https://github.com/digint/btrbk/issues/217'
74 ewarn ' [2] https://github.com/digint/btrbk/commit/719fb5f'