commit:     c6eed6583a02c19992ac131b7a71439da5d6da31
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 28 03:48:58 2024 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Sun Apr 28 08:23:50 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6eed658

app-backup/snapper: add 0.11.0

Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-backup/snapper/Manifest                        |  1 +
 .../snapper/files/snapper-0.11.0-cron-confd.patch  | 18 +++++
 app-backup/snapper/snapper-0.11.0.ebuild           | 90 ++++++++++++++++++++++
 3 files changed, 109 insertions(+)

diff --git a/app-backup/snapper/Manifest b/app-backup/snapper/Manifest
index e975685fd561..dd6d2ce24c65 100644
--- a/app-backup/snapper/Manifest
+++ b/app-backup/snapper/Manifest
@@ -1,2 +1,3 @@
 DIST snapper-0.10.6.tar.gz 423867 BLAKE2B 
a7d0f8c62c60c0d03bf108a8c0692dd209f170cf8227512cbc3b80eb9f58ecca845aa585859032bc6582d67e4c6ff15b75443a9ee9291d1b970efec15513571f
 SHA512 
6eedfb9408260331f042f0a429a1104136cb88dac450f320641b0941cd06faf52f67cad2397cf4122f919876bb994455da0cfd3bb099f82217050e07b4c77d2e
 DIST snapper-0.10.7.tar.gz 428482 BLAKE2B 
43c48d978296901f6584cef258ec3723de97b1d6b4b4a5b6bc39649f28b3300919616c65b8fcdb97b3ebcab08d04e4583713eef146721367de24513e80113b45
 SHA512 
bf098c941735b60554ff0711fa43b30ef3634e01178f5ee8ad44c65b757c3366bd5bf568cef3a787b2ddcc2fc63090056109250480e6bd360ebf27a8343373b8
+DIST snapper-0.11.0.tar.gz 445685 BLAKE2B 
301e6d745d8d6d7acc6ca0c9fc431a0e46700aabd9882785bb2be38152693f9dbe897f85f6ad724c9529a0754b6146b53dda0a24141b386e59e7737855bc5da2
 SHA512 
fe86be4ceb1439b5be3fa61f5bc037bc51a5fe47451d0698851f83e2783d6c245ef8d40a33f79b03e8d1d8b63433743c35938ad7dca0747e0e1f650a5a766c40

diff --git a/app-backup/snapper/files/snapper-0.11.0-cron-confd.patch 
b/app-backup/snapper/files/snapper-0.11.0-cron-confd.patch
new file mode 100644
index 000000000000..c1fc5c692c71
--- /dev/null
+++ b/app-backup/snapper/files/snapper-0.11.0-cron-confd.patch
@@ -0,0 +1,18 @@
+diff --git a/scripts/snapper-hourly b/scripts/snapper-hourly
+index 36a41f5..f36d8ec 100755
+--- a/scripts/snapper-hourly
++++ b/scripts/snapper-hourly
+@@ -9,10 +9,10 @@ export PATH
+ 
+ 
+ #
+-# get information from /etc/sysconfig/snapper
++# get information from /etc/conf.d/snapper
+ #
+-if [ -f /etc/sysconfig/snapper ] ; then
+-    . /etc/sysconfig/snapper
++if [ -f /etc/conf.d/snapper ] ; then
++    . /etc/conf.d/snapper
+ fi
+ 
+ 

diff --git a/app-backup/snapper/snapper-0.11.0.ebuild 
b/app-backup/snapper/snapper-0.11.0.ebuild
new file mode 100644
index 000000000000..0e9331554272
--- /dev/null
+++ b/app-backup/snapper/snapper-0.11.0.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools systemd
+
+DESCRIPTION="Command-line program for btrfs and lvm snapshot management"
+HOMEPAGE="http://snapper.io/";
+SRC_URI="https://github.com/openSUSE/${PN}/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~riscv ~x86"
+IUSE="lvm pam test systemd xattr"
+RESTRICT="test"
+
+BDEPEND="app-text/docbook-xsl-stylesheets
+       dev-libs/libxslt
+       sys-devel/gettext
+       virtual/pkgconfig"
+
+RDEPEND="dev-libs/boost:=
+       dev-libs/json-c:=
+       dev-libs/libxml2
+       dev-libs/icu:=
+       sys-apps/acl
+       sys-apps/dbus
+       sys-apps/util-linux
+       >=sys-fs/btrfs-progs-3.17.1
+       sys-libs/zlib
+       virtual/libintl
+       lvm? ( sys-fs/lvm2 )
+       pam? ( sys-libs/pam )
+       xattr? ( sys-apps/attr )"
+
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-cron-confd.patch
+       "${FILESDIR}"/${PN}-0.10.1-testsuite.patch
+)
+
+src_prepare() {
+       default
+
+       sed -e "s,/usr/lib/systemd/system,$(systemd_get_systemunitdir),g" \
+               -i data/Makefile.* \
+               || die "Failed to fix systemd services and timers installation 
path"
+       eautoreconf
+}
+
+src_configure() {
+       # ext4 code does not work anymore
+       # snapper does not build without btrfs
+       local myeconfargs=(
+               --disable-silent-rules
+               --with-conf="/etc/conf.d"
+               --enable-zypp
+               --enable-rollback
+               --enable-btrfs-quota
+               --disable-ext4
+               --enable-btrfs
+               --enable-doc
+               $(use_enable lvm)
+               $(use_enable pam)
+               $(use_enable test tests)
+               $(use_enable systemd)
+               $(use_enable xattr xattrs)
+       )
+
+       econf "${myeconfargs[@]}"
+}
+
+src_install() {
+       default
+       # Existing configuration file required to function
+       keepdir /etc/snapper/configs
+       newconfd data/sysconfig.snapper snapper
+       find "${D}" -name '*.la' -delete || die
+}
+
+pkg_postinst() {
+       elog "In order to use Snapper, you need to set up"
+       elog "at least one config first. To do this, run:"
+       elog "snapper create-config <subvolume>"
+       elog "For more information, see man (8) snapper or"
+       elog "http://snapper.io/documentation.html and"
+       elog "https://wiki.gentoo.org/wiki/Snapper";
+}

Reply via email to