Gentoo Archives: gentoo-commits

From: Yixun Lan <dlan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-backup/snapper/, app-backup/snapper/files/
Date: Thu, 14 Jan 2021 08:20:30
Message-Id: 1610612389.44b450a6bd0d4356a031e1707893cfbc05c0978d.dlan@gentoo
1 commit: 44b450a6bd0d4356a031e1707893cfbc05c0978d
2 Author: Yixun Lan <dlan <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jan 14 08:09:42 2021 +0000
4 Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
5 CommitDate: Thu Jan 14 08:19:49 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44b450a6
7
8 app-backup/snapper: version bump, 0.8.15
9
10 Package-Manager: Portage-3.0.12, Repoman-3.0.2
11 Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
12
13 app-backup/snapper/Manifest | 1 +
14 .../snapper/files/snapper-0.8.15-testsuite.patch | 83 +++++++++++++++++++++
15 app-backup/snapper/snapper-0.8.15.ebuild | 87 ++++++++++++++++++++++
16 3 files changed, 171 insertions(+)
17
18 diff --git a/app-backup/snapper/Manifest b/app-backup/snapper/Manifest
19 index 3162b303dc6..8a9ee2e4833 100644
20 --- a/app-backup/snapper/Manifest
21 +++ b/app-backup/snapper/Manifest
22 @@ -1,4 +1,5 @@
23 DIST snapper-0.5.6.tar.bz2 580047 BLAKE2B 3b945acbf734db1925dad5515323a64a2c08ee8226a593025f9160e0d1b1140734b2b498d036256946159900b50fec8567147dc0a974c281be747e977bcbd05b SHA512 392427d097cbe221bf7ca0ae20bc065dffaa4d0017ed750c41748d71128fc7ce054bb4425d6dbed7308a530df71815f80f56e60d72aab17ef3e0a16f3b3ba47e
24 +DIST snapper-0.8.15.tar.gz 393310 BLAKE2B a977ed8cdcbd73b4e49713dc48407c9bdab88e3084f6d9030c555da860b7277961e8e742103bbe04a05a1efa9bbe916a08fc04da3c2bcb59df8d5e53c038c373 SHA512 cdcc811c4299373e22043780a2cc06e7d5bca44fbf62f92ecb76162e791849b6002b35fe804b8b89524fd5e3ed26ed4120f09b62b202e41fedb7339ab9fe267c
25 DIST snapper-0.8.6.tar.bz2 607016 BLAKE2B 3e496fa22b1ecce2079d79caeb530ca1538febcc6bdf04aa0256e5b43bb546ea66436e60eeaae6722bc869c60579bc47c556671c5878dd671c266102516f04bb SHA512 f01a309a8dcfff455bf480ff297108e8ec3603d469d50f08740176e22bc2b8dd211de678fa8ce12c1ccd828348a35c6d347ca51b829d7b8c30b3fbaba4e9e2d9
26 DIST snapper-0.8.7.tar.bz2 622381 BLAKE2B 82d1a9c91beb309e87acfa914b55b2ff5900edc023a5ecd6f2bee6b1a15adb1336656f3f1fffea4a9971aa449b7825750e6c680806d4574faada5bba0a6d14f1 SHA512 6fa63c2453f93a724f0ac23d84ff2c5aafc654463e84a4f767bb8a75a0d4fb7ca7314811179d5fefddddce0df4441298c67b473596aa720d86eeefa43011b727
27 DIST snapper-0.8.9.tar.gz 373192 BLAKE2B 55c927136518e91b45631f3087fce13e8e08228274ef7c54164a7024e382a45bfa5b40687fd5e3d770fc87019d8e93af5c681013a023cd89dcb1f16863a77421 SHA512 5a3e45839cd4b5e621425df2e1214ca5014a391d17b489fdf7d315e8ac9959741c1f6fcf7adf644276ed11488bc0f88fcfa563198bd78824867d267df204659d
28
29 diff --git a/app-backup/snapper/files/snapper-0.8.15-testsuite.patch b/app-backup/snapper/files/snapper-0.8.15-testsuite.patch
30 new file mode 100644
31 index 00000000000..237e0705c98
32 --- /dev/null
33 +++ b/app-backup/snapper/files/snapper-0.8.15-testsuite.patch
34 @@ -0,0 +1,83 @@
35 +diff --git a/configure.ac b/configure.ac
36 +index 839d012..ceac54d 100644
37 +--- a/configure.ac
38 ++++ b/configure.ac
39 +@@ -86,6 +86,12 @@ AS_IF([test "x$with_conf" != xno], [SYSCONFIG="${with_conf}"])
40 +
41 + CPPFLAGS="${CPPFLAGS} -DCONF_DIR='\"${SYSCONFIG}\"'"
42 +
43 ++AC_ARG_ENABLE([tests], AC_HELP_STRING([--disable-tests],[Disable internal tests support]),
44 ++ [with_tests=$enableval],[with_tests=yes])
45 ++AM_CONDITIONAL(ENABLE_TESTS, [test "x$with_tests" = "xyes"])
46 ++if test "x$with_tests" = "xyes"; then
47 ++ AC_DEFINE(ENABLE_TESTS, 1, [Enable internal tests support])
48 ++fi
49 +
50 + AC_ARG_ENABLE([btrfs], AC_HELP_STRING([--disable-btrfs],[Disable Btrfs internal snapshots support]),
51 + [with_btrfs=$enableval],[with_btrfs=yes])
52 +diff --git a/testsuite-cmp/Makefile.am b/testsuite-cmp/Makefile.am
53 +index 81104bf..9c29477 100644
54 +--- a/testsuite-cmp/Makefile.am
55 ++++ b/testsuite-cmp/Makefile.am
56 +@@ -2,6 +2,7 @@
57 + # Makefile.am for snapper/testsuite-cmp
58 + #
59 +
60 ++if ENABLE_TESTS
61 + AM_CPPFLAGS = -I$(top_srcdir)
62 + AM_LDFLAGS = -lboost_system
63 +
64 +@@ -15,3 +16,4 @@ cmp_SOURCES = cmp.cc
65 +
66 + EXTRA_DIST = $(noinst_SCRIPTS)
67 +
68 ++endif
69 +diff --git a/testsuite-real/Makefile.am b/testsuite-real/Makefile.am
70 +index 717313a..527843d 100644
71 +--- a/testsuite-real/Makefile.am
72 ++++ b/testsuite-real/Makefile.am
73 +@@ -2,6 +2,7 @@
74 + # Makefile.am for snapper/testsuite-real
75 + #
76 +
77 ++if ENABLE_TESTS
78 + CXXFLAGS += -std=gnu++0x
79 +
80 + AM_CPPFLAGS = -I$(top_srcdir)
81 +@@ -53,3 +54,4 @@ ug_tests_SOURCES = ug-tests.cc
82 +
83 + EXTRA_DIST = $(test_DATA) $(test_SCRIPTS)
84 +
85 ++endif
86 +diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
87 +index d7e30b8..72ef5ee 100644
88 +--- a/testsuite/Makefile.am
89 ++++ b/testsuite/Makefile.am
90 +@@ -2,6 +2,7 @@
91 + # Makefile.am for snapper/testsuite
92 + #
93 +
94 ++if ENABLE_TESTS
95 + AM_CPPFLAGS = -I$(top_srcdir) $(DBUS_CFLAGS)
96 +
97 + LDADD = ../snapper/libsnapper.la ../dbus/libdbus.la -lboost_unit_test_framework
98 +@@ -40,3 +41,4 @@ json_formatter_test_LDADD = -lboost_unit_test_framework ../client/utils/libutils
99 + getopts_test_LDADD = -lboost_unit_test_framework ../client/utils/libutils.la
100 +
101 + lvm_utils_test_LDADD = -lboost_unit_test_framework ../snapper/libsnapper.la
102 ++endif
103 +diff --git a/zypp-plugin/testsuite/Makefile.am b/zypp-plugin/testsuite/Makefile.am
104 +index 7b52e13..71cb545 100644
105 +--- a/zypp-plugin/testsuite/Makefile.am
106 ++++ b/zypp-plugin/testsuite/Makefile.am
107 +@@ -1,3 +1,5 @@
108 ++
109 ++if ENABLE_TESTS
110 + if HAVE_ZYPP
111 + TEST_LOG_DRIVER = $(SHELL) tap-driver.sh
112 +
113 +@@ -12,3 +14,4 @@ TESTS = $(check_SCRIPTS)
114 +
115 + EXTRA_DIST = $(check_SCRIPTS) $(noinst_SCRIPTS) $(noinst_DATA) tap-driver.sh
116 + endif
117 ++endif
118
119 diff --git a/app-backup/snapper/snapper-0.8.15.ebuild b/app-backup/snapper/snapper-0.8.15.ebuild
120 new file mode 100644
121 index 00000000000..62e5c8e65b2
122 --- /dev/null
123 +++ b/app-backup/snapper/snapper-0.8.15.ebuild
124 @@ -0,0 +1,87 @@
125 +# Copyright 1999-2021 Gentoo Authors
126 +# Distributed under the terms of the GNU General Public License v2
127 +
128 +EAPI=7
129 +
130 +inherit autotools systemd bash-completion-r1
131 +
132 +DESCRIPTION="Command-line program for btrfs and lvm snapshot management"
133 +HOMEPAGE="http://snapper.io/"
134 +SRC_URI="https://github.com/openSUSE/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
135 +
136 +LICENSE="GPL-2"
137 +SLOT="0"
138 +KEYWORDS="~amd64 ~x86"
139 +IUSE="doc lvm pam test systemd xattr"
140 +
141 +RDEPEND="dev-libs/boost:=[threads]
142 + dev-libs/libxml2
143 + dev-libs/icu:=
144 + sys-apps/acl
145 + sys-apps/dbus
146 + sys-apps/util-linux
147 + >=sys-fs/btrfs-progs-3.17.1
148 + sys-libs/zlib
149 + virtual/libintl
150 + lvm? ( sys-fs/lvm2 )
151 + pam? ( sys-libs/pam )
152 + xattr? ( sys-apps/attr )"
153 +
154 +DEPEND="${RDEPEND}
155 + app-text/docbook-xsl-stylesheets
156 + dev-libs/libxslt
157 + sys-devel/gettext
158 + virtual/pkgconfig"
159 +
160 +PATCHES=(
161 + "${FILESDIR}"/cron-confd.patch
162 + "${FILESDIR}"/${P}-testsuite.patch
163 +)
164 +
165 +src_prepare() {
166 + default
167 +
168 + sed -e "s,/usr/lib/systemd/system,$(systemd_get_systemunitdir),g" \
169 + -i data/Makefile.* \
170 + || die "Failed to fix systemd services and timers installation path"
171 + eautoreconf
172 +}
173 +
174 +src_configure() {
175 + # ext4 code does not work anymore
176 + # snapper does not build without btrfs
177 + local myeconfargs=(
178 + --disable-silent-rules
179 + --with-conf="/etc/conf.d"
180 + --enable-zypp
181 + --enable-rollback
182 + --enable-btrfs-quota
183 + --disable-ext4
184 + --enable-btrfs
185 + $(use_enable doc)
186 + $(use_enable lvm)
187 + $(use_enable pam)
188 + $(use_enable test tests)
189 + $(use_enable systemd)
190 + $(use_enable xattr xattrs)
191 + )
192 +
193 + econf "${myeconfargs[@]}"
194 +}
195 +
196 +src_install() {
197 + default
198 + # Existing configuration file required to function
199 + keepdir /etc/snapper/configs
200 + newconfd data/sysconfig.snapper snapper
201 + find "${D}" -name '*.la' -delete || die
202 + newbashcomp "${FILESDIR}"/${PN}.bash ${PN}
203 +}
204 +
205 +pkg_postinst() {
206 + elog "In order to use Snapper, you need to set up"
207 + elog "at least one config first. To do this, run:"
208 + elog "snapper create-config <subvolume>"
209 + elog "For more information, see man (8) snapper or"
210 + elog "http://snapper.io/documentation.html"
211 +}