* [gentoo-commits] repo/gentoo:master commit in: sys-block/thin-provisioning-tools/, sys-block/thin-provisioning-tools/files/
@ 2017-10-20 15:09 Lars Wendler
0 siblings, 0 replies; 6+ messages in thread
From: Lars Wendler @ 2017-10-20 15:09 UTC (permalink / raw
To: gentoo-commits
commit: b2be39932660fa5ae0df51ee4cbc5a514fe941f7
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 20 15:09:15 2017 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Fri Oct 20 15:09:25 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2be3993
sys-block/thin-provisioning-tools: Fixed build without tests.
Closes: https://bugs.gentoo.org/634868
Package-Manager: Portage-2.3.12, Repoman-2.3.3
...ning-tools-0.7.4-disabled-tests_build_fix.patch | 32 ++++++++++++++++++++++
.../thin-provisioning-tools-0.7.4.ebuild | 5 +++-
2 files changed, 36 insertions(+), 1 deletion(-)
diff --git a/sys-block/thin-provisioning-tools/files/thin-provisioning-tools-0.7.4-disabled-tests_build_fix.patch b/sys-block/thin-provisioning-tools/files/thin-provisioning-tools-0.7.4-disabled-tests_build_fix.patch
new file mode 100644
index 00000000000..f9a64b2188d
--- /dev/null
+++ b/sys-block/thin-provisioning-tools/files/thin-provisioning-tools-0.7.4-disabled-tests_build_fix.patch
@@ -0,0 +1,32 @@
+From 8d75be81120b9cf172c95d0153c5f845ed804234 Mon Sep 17 00:00:00 2001
+From: Adam Sampson <ats-github@offog.org>
+Date: Mon, 16 Oct 2017 13:07:36 +0100
+Subject: [PATCH] [functional-tests] fix build with testing disabled (#88)
+
+The rule for lib/libft.so is only enabled with --enable-testing,
+so the default target shouldn't depend unconditionally on it.
+With the default configure options, the build failed with:
+make: *** No rule to make target 'lib/libft.so', needed by 'all'. Stop.
+---
+ Makefile.in | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index e745739..02b75dd 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -21,8 +21,13 @@ V=@
+ PROGRAMS=\
+ bin/pdata_tools
+
++ifeq ("@TESTING@", "yes")
++TESTLIBS=\
++ lib/libft.so
++endif
++
+ .PHONY: all
+-all: $(PROGRAMS) lib/libft.so
++all: $(PROGRAMS) $(TESTLIBS)
+
+ SOURCE=\
+ base/output_file_requirements.cc \
diff --git a/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.7.4.ebuild b/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.7.4.ebuild
index 36d3cd79766..b0807e8fcff 100644
--- a/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.7.4.ebuild
+++ b/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.7.4.ebuild
@@ -29,7 +29,10 @@ DEPEND="${RDEPEND}
)
dev-libs/boost"
-PATCHES=( "${FILESDIR}"/${PN}-0.7.0-build-fixes.patch )
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.7.0-build-fixes.patch
+ "${FILESDIR}/${P}-disabled-tests_build_fix.patch" #634868
+)
src_prepare() {
default
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-block/thin-provisioning-tools/, sys-block/thin-provisioning-tools/files/
@ 2019-04-21 10:16 Lars Wendler
0 siblings, 0 replies; 6+ messages in thread
From: Lars Wendler @ 2019-04-21 10:16 UTC (permalink / raw
To: gentoo-commits
commit: 89a600e91fcaabcf4fea2dbf832f7e074451ad7e
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 21 10:15:42 2019 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sun Apr 21 10:16:15 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89a600e9
sys-block/thin-provisioning-tools: Removed old.
Package-Manager: Portage-2.3.64, Repoman-2.3.12
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
sys-block/thin-provisioning-tools/Manifest | 2 -
...thin-provisioning-tools-0.6.3-build-fixes.patch | 57 --------------------
.../thin-provisioning-tools-0.6.3.ebuild | 58 ---------------------
.../thin-provisioning-tools-0.7.5.ebuild | 60 ----------------------
4 files changed, 177 deletions(-)
diff --git a/sys-block/thin-provisioning-tools/Manifest b/sys-block/thin-provisioning-tools/Manifest
index a7be1f8bb4d..3517c6ec0ed 100644
--- a/sys-block/thin-provisioning-tools/Manifest
+++ b/sys-block/thin-provisioning-tools/Manifest
@@ -1,6 +1,4 @@
DIST thin-provisioning-tools-0.4.1.tar.gz 186979 BLAKE2B d7e60b67f716c1398c4fa7230b3e0b57f62aa47cf6253806e4e3b932b0a71a489cf367ec9eb1e0a620dfab5a7ef0f4c2049a8ee5f5da0d94855fc3618dd03feb SHA512 e148296b55f7ff4ab85dc3b4679c7eab0ee8d56e61415397fc2e46f17bcc16a6a582c17343381320f8582bc4f12311af622d43aabe60e7abb25a882446016b7e
-DIST thin-provisioning-tools-0.6.3.tar.gz 198697 BLAKE2B 0bc9ae1ee650f4f2c553ca72e0569bcf2590174cde2b89084ff4347d78f0dbd08c29bbc9629498f2b8fe2149fb27eeee2e0b5928890224b9ead224fd1a3161d1 SHA512 ccebf5bb1ac2da56a3dab5b7ce8d61f6a71f84b5168c2680618d724340bbf8cf97c935c1bce966a296331d9dc048a855d81775d2a39f10b4096ab3ee835286d9
DIST thin-provisioning-tools-0.7.0.tar.gz 230595 BLAKE2B 00238a682f80600e3a5bb6d0d2a9662bd0fd3ae5404d5895427f169640b469780f554c22c6a93187058e6399c76ba14a6fa8d73f2bb09aa79927dd458b58ffa9 SHA512 cb6c44c7215aadd72292d73e2374d8c0c28566adcb10c7a3de83576dbd28649ebba6e2cc59945a28921e423540969cb21f648c37e375d68f48e56a8be4a4c7b8
-DIST thin-provisioning-tools-0.7.5.tar.gz 278856 BLAKE2B f554a9001bc9dde3510e3702f184d48cd77ddfc04f16c7e054fea8a3a47fdce7796ca4fcdb8d155e3d22526535ae965e344b3c2735f6275a7702044536dff923 SHA512 65268cc0c68428fa89f039c097794f574ef79b1862de3208715b9180ba73b197f37d879b386b110c52d9f2d3e80fb069a8d48ee2939aa1fd2b88f2513babc763
DIST thin-provisioning-tools-0.7.6.tar.gz 285428 BLAKE2B af74eff6d435f00e347872786fee8627f02844af122a9f1bf9ffd00234ce5275d3a61d9b4204313a19813cadbc0197bbeb9a1bd92d55992c6d9a03a299579e29 SHA512 395035b6f59fafb1c0f3e68750611e04f10223bc8d57b257e25c28c928647d1d2c6e94014b64ed90eeae1151fc7e5d23cf1aa428716e343338cb3c8fe55ed704
DIST thin-provisioning-tools-0.8.0.tar.gz 305009 BLAKE2B 1002916cd7b455be21091007f68d12455476efc234a3892607152085adab37db03cea9959cf76d6903dad680b209d87ec62745b268daa02ff11667d0e070da8c SHA512 b95f320f8da94b52327d7afece98020de65c7a3eccf9e6d8e8f89600b9f984e3d4ae928b52c04dd973d0d87885354567f6d392e9551e0e7394158406bae79891
diff --git a/sys-block/thin-provisioning-tools/files/thin-provisioning-tools-0.6.3-build-fixes.patch b/sys-block/thin-provisioning-tools/files/thin-provisioning-tools-0.6.3-build-fixes.patch
deleted file mode 100644
index ae1148a1626..00000000000
--- a/sys-block/thin-provisioning-tools/files/thin-provisioning-tools-0.6.3-build-fixes.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-diff -purN a/Makefile.in b/Makefile.in
---- a/Makefile.in 2016-07-21 15:42:52.000000000 +0100
-+++ b/Makefile.in 2016-10-28 22:45:54.292931031 +0100
-@@ -108,7 +108,7 @@ CFLAGS?=@CFLAGS@
- CFLAGS+=-Wall
- CFLAGS+=@LFS_FLAGS@
- CXXFLAGS?=@CXXFLAGS@
--CXXFLAGS+=-Wall -fno-strict-aliasing -std=gnu++98
-+CXXFLAGS+=-Wall -fno-strict-aliasing
- CXXFLAGS+=@CXXOPTIMISE_FLAG@
- CXXFLAGS+=@CXXDEBUG_FLAG@
- CXXFLAGS+=@CXX_STRERROR_FLAG@
-diff -purN a/thin-provisioning/restore_emitter.cc b/thin-provisioning/restore_emitter.cc
---- a/thin-provisioning/restore_emitter.cc 2016-07-21 15:42:52.000000000 +0100
-+++ b/thin-provisioning/restore_emitter.cc 2016-10-28 22:49:32.662189111 +0100
-@@ -142,7 +142,7 @@ namespace {
- bool device_exists(thin_dev_t dev) const {
- uint64_t key[1] = {dev};
- device_tree::maybe_value v = md_->details_->lookup(key);
-- return v;
-+ return v.is_initialized();
- }
-
- metadata::ptr md_;
-diff -purN a/thin-provisioning/thin_pool.cc b/thin-provisioning/thin_pool.cc
---- a/thin-provisioning/thin_pool.cc 2016-07-21 15:42:52.000000000 +0100
-+++ b/thin-provisioning/thin_pool.cc 2016-10-28 22:50:26.999256645 +0100
-@@ -232,7 +232,7 @@ bool
- thin_pool::device_exists(thin_dev_t dev) const
- {
- uint64_t key[1] = {dev};
-- return md_->details_->lookup(key);
-+ return md_->details_->lookup(key).is_initialized();
- }
-
- //----------------------------------------------------------------
-diff -purN a/unit-tests/Makefile.in b/unit-tests/Makefile.in
---- a/unit-tests/Makefile.in 2016-07-21 15:42:52.000000000 +0100
-+++ b/unit-tests/Makefile.in 2016-10-28 22:45:20.985893955 +0100
-@@ -25,7 +25,7 @@ GMOCK_FLAGS=\
- -Wno-unused-local-typedefs
-
- GMOCK_LIBS=\
-- -Llib -lpdata -lgmock -lpthread -laio
-+ -Llib -lpdata -lgmock -lpthread -laio -lgtest
-
- GMOCK_DEPS=\
- $(wildcard $(GMOCK_DIR)/include/*.h) \
-@@ -80,7 +80,7 @@ TEST_OBJECTS=$(subst .cc,.gmo,$(TEST_SOU
- sed 's,\([^ :]*\)\.o[ :]*,\1.o \1.gmo $* : Makefile ,g' < $*.$$$$ > $*.d; \
- $(RM) $*.$$$$
-
--unit-tests/unit_tests: $(TEST_OBJECTS) lib/libgmock.a lib/libpdata.a
-+unit-tests/unit_tests: $(TEST_OBJECTS) lib/libpdata.a
- @echo " [LD] $<"
- $(V)g++ $(CXXFLAGS) $(LDFLAGS) -o $@ $(TEST_OBJECTS) $(LIBS) $(GMOCK_LIBS) $(LIBEXPAT)
-
diff --git a/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.6.3.ebuild b/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.6.3.ebuild
deleted file mode 100644
index fdca9783f12..00000000000
--- a/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.6.3.ebuild
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools flag-o-matic
-
-DESCRIPTION="A suite of tools for thin provisioning on Linux"
-HOMEPAGE="https://github.com/jthornber/thin-provisioning-tools"
-SRC_URI="https://github.com/jthornber/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="static test"
-
-LIB_DEPEND="dev-libs/expat[static-libs(+)]
- dev-libs/libaio[static-libs(+)]"
-RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
-DEPEND="${RDEPEND}
- static? ( ${LIB_DEPEND} )
- test? (
- || ( dev-lang/ruby:2.5 dev-lang/ruby:2.4 dev-lang/ruby:2.3 )
- >=dev-cpp/gtest-1.8.0
- dev-util/cucumber
- dev-util/aruba
- )
- dev-libs/boost"
-
-PATCHES=( "${FILESDIR}"/${P}-build-fixes.patch )
-
-src_prepare() {
- default
- eautoreconf
-}
-
-src_configure() {
- use static && append-ldflags -static
- STRIP=true econf \
- --prefix="${EPREFIX}"/ \
- --bindir="${EPREFIX}"/sbin \
- --with-optimisation='' \
- $(use_enable test testing)
-}
-
-src_compile() {
- MAKEOPTS+=" V="
- default
-}
-
-src_test() {
- emake unit-test
-}
-
-src_install() {
- emake DESTDIR="${D}" DATADIR="${ED}/usr/share" install
- dodoc README.md TODO.org
-}
diff --git a/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.7.5.ebuild b/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.7.5.ebuild
deleted file mode 100644
index 22a1164fc48..00000000000
--- a/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.7.5.ebuild
+++ /dev/null
@@ -1,60 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools flag-o-matic
-
-DESCRIPTION="A suite of tools for thin provisioning on Linux"
-HOMEPAGE="https://github.com/jthornber/thin-provisioning-tools"
-SRC_URI="https://github.com/jthornber/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="static test"
-
-LIB_DEPEND="dev-libs/expat[static-libs(+)]
- dev-libs/libaio[static-libs(+)]"
-RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
-DEPEND="${RDEPEND}
- static? ( ${LIB_DEPEND} )
- test? (
- || ( dev-lang/ruby:2.5 dev-lang/ruby:2.4 dev-lang/ruby:2.3 )
- >=dev-cpp/gtest-1.8.0
- dev-util/cucumber
- dev-util/aruba
- )
- dev-libs/boost"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-0.7.0-build-fixes.patch
-)
-
-src_prepare() {
- default
- eautoreconf
-}
-
-src_configure() {
- use static && append-ldflags -static
- STRIP=true econf \
- --prefix="${EPREFIX}"/ \
- --bindir="${EPREFIX}"/sbin \
- --with-optimisation='' \
- $(use_enable test testing)
-}
-
-src_compile() {
- MAKEOPTS+=" V="
- default
-}
-
-src_test() {
- emake unit-test
-}
-
-src_install() {
- emake DESTDIR="${D}" DATADIR="${ED%/}/usr/share" install
- dodoc README.md TODO.org
-}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-block/thin-provisioning-tools/, sys-block/thin-provisioning-tools/files/
@ 2019-06-05 14:14 Lars Wendler
0 siblings, 0 replies; 6+ messages in thread
From: Lars Wendler @ 2019-06-05 14:14 UTC (permalink / raw
To: gentoo-commits
commit: ecd5ec9189fa68ecb6f107a96126ddd1eaddc59f
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 5 14:08:48 2019 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Jun 5 14:14:27 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ecd5ec91
sys-block/thin-provisioning-tools: Bump to version 0.8.5
Package-Manager: Portage-2.3.67, Repoman-2.3.14
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
sys-block/thin-provisioning-tools/Manifest | 1 +
...n-provisioning-tools-0.8.5-libaio-0.3.112.patch | 84 ++++++++++++++++++++++
.../thin-provisioning-tools-0.8.5.ebuild | 73 +++++++++++++++++++
3 files changed, 158 insertions(+)
diff --git a/sys-block/thin-provisioning-tools/Manifest b/sys-block/thin-provisioning-tools/Manifest
index 97df26fe41f..c665cb67117 100644
--- a/sys-block/thin-provisioning-tools/Manifest
+++ b/sys-block/thin-provisioning-tools/Manifest
@@ -3,3 +3,4 @@ DIST thin-provisioning-tools-0.7.0.tar.gz 230595 BLAKE2B 00238a682f80600e3a5bb6d
DIST thin-provisioning-tools-0.7.6.tar.gz 285428 BLAKE2B af74eff6d435f00e347872786fee8627f02844af122a9f1bf9ffd00234ce5275d3a61d9b4204313a19813cadbc0197bbeb9a1bd92d55992c6d9a03a299579e29 SHA512 395035b6f59fafb1c0f3e68750611e04f10223bc8d57b257e25c28c928647d1d2c6e94014b64ed90eeae1151fc7e5d23cf1aa428716e343338cb3c8fe55ed704
DIST thin-provisioning-tools-0.8.2.tar.gz 305022 BLAKE2B ad4f7c088d890e111679a8de041ef0e05c30c5f4a46e96f7d0e1ca8034426d047dc9d2bbad624ba5e9371a5ebdd5be55ebc9486ed38c18c6fb764f8339806f3d SHA512 3aeaef4e720a14605181b700200ce6283e0e230034e5e787164a28043ae622f932e4fe8c166bc982e5e2e987cb2530027af08cc84443b2519cfbfc607c2b4681
DIST thin-provisioning-tools-0.8.3.tar.gz 305338 BLAKE2B 619f73ef7bd802eb72649d0bdaa8ce1d6afb4d7ae442ac7d2d709764aaa5058bf77b12710a332cf5f8215cfb94e1d63c189951058e2373467ca88c847e32cd8d SHA512 a69645d45fd62a487903a07f922fd622b5fb9c7858e656b9468903005ab7daa3098aa89ae356f2458fcf95e3c0672bf486b424553d82ffae54b83c0b71599541
+DIST thin-provisioning-tools-0.8.5.tar.gz 305585 BLAKE2B 7e4bde537535db79e97ddab3cba775c89854362dac7da491c040badf5e3546d2e6ac4b8da8462edb59f50a2ecd95fe9c5e3349fca5e9acd588efaaf990617ca4 SHA512 1f9a1b6b9059f0b23ec3a00ddef223599292d447894316525f13b9c1e4f29d0371cb901d199cb503be4342555e016e5e6eb2d6e0e10c44b08e6c9478c573e1d4
diff --git a/sys-block/thin-provisioning-tools/files/thin-provisioning-tools-0.8.5-libaio-0.3.112.patch b/sys-block/thin-provisioning-tools/files/thin-provisioning-tools-0.8.5-libaio-0.3.112.patch
new file mode 100644
index 00000000000..af31b90a40b
--- /dev/null
+++ b/sys-block/thin-provisioning-tools/files/thin-provisioning-tools-0.8.5-libaio-0.3.112.patch
@@ -0,0 +1,84 @@
+From 6332962ee866f5289de87ab70cd3db863298982c Mon Sep 17 00:00:00 2001
+From: Joe Thornber <ejt@redhat.com>
+Date: Wed, 5 Jun 2019 15:02:05 +0100
+Subject: [PATCH] [ft-lib/bcache] rename raise() -> raise_()
+
+Name clash with signal.h on Debian and Gentoo.
+---
+ ft-lib/bcache.c | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/ft-lib/bcache.c b/ft-lib/bcache.c
+index 0dca5031..ee5b6c59 100644
+--- a/ft-lib/bcache.c
++++ b/ft-lib/bcache.c
+@@ -31,7 +31,7 @@ static void warn(const char *fmt, ...)
+ }
+
+ // FIXME: raise a condition somehow?
+-static void raise(const char *fmt, ...)
++static void raise_(const char *fmt, ...)
+ {
+ va_list ap;
+
+@@ -51,7 +51,7 @@ static inline struct list_head *list_pop(struct list_head *head)
+ struct list_head *l;
+
+ if (head->next == head)
+- raise("list is empty\n");
++ raise_("list is empty\n");
+
+ l = head->next;
+ list_del(l);
+@@ -98,7 +98,7 @@ static struct cb_set *cb_set_create(unsigned nr)
+ static void cb_set_destroy(struct cb_set *cbs)
+ {
+ if (!list_empty(&cbs->allocated))
+- raise("async io still in flight");
++ raise_("async io still in flight");
+
+ free(cbs->vec);
+ free(cbs);
+@@ -713,13 +713,13 @@ struct bcache *bcache_simple(const char *path, unsigned nr_cache_blocks)
+ uint64_t s;
+
+ if (fd < 0) {
+- raise("couldn't open cache file");
++ raise_("couldn't open cache file");
+ return NULL;
+ }
+
+ r = fstat(fd, &info);
+ if (r < 0) {
+- raise("couldn't stat cache file");
++ raise_("couldn't stat cache file");
+ return NULL;
+ }
+
+@@ -751,7 +751,7 @@ void bcache_destroy(struct bcache *cache)
+ static void check_index(struct bcache *cache, block_address index)
+ {
+ if (index >= cache->nr_data_blocks)
+- raise("block out of bounds (%llu >= %llu)",
++ raise_("block out of bounds (%llu >= %llu)",
+ (unsigned long long) index,
+ (unsigned long long) cache->nr_data_blocks);
+ }
+@@ -802,7 +802,7 @@ static struct block *lookup_or_read_block(struct bcache *cache,
+ // FIXME: this is insufficient. We need to also catch a read
+ // lock of a write locked block. Ref count needs to distinguish.
+ if (b->ref_count && (flags & (GF_DIRTY | GF_ZERO)))
+- raise("concurrent write lock attempt");
++ raise_("concurrent write lock attempt");
+
+ if (test_flags(b, BF_IO_PENDING)) {
+ miss(cache, flags);
+@@ -858,7 +858,7 @@ struct block *get_block(struct bcache *cache, block_address index, unsigned flag
+ return b;
+ }
+
+- raise("couldn't get block");
++ raise_("couldn't get block");
+ return NULL;
+ }
+
diff --git a/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.8.5.ebuild b/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.8.5.ebuild
new file mode 100644
index 00000000000..037f7951d17
--- /dev/null
+++ b/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.8.5.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools flag-o-matic
+
+DESCRIPTION="A suite of tools for thin provisioning on Linux"
+HOMEPAGE="https://github.com/jthornber/thin-provisioning-tools"
+
+if [[ ${PV} != *9999 ]]; then
+ SRC_URI="https://github.com/jthornber/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+else
+ inherit git-r3
+ EGIT_REPO_URI='https://github.com/jthornber/thin-provisioning-tools.git'
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="static test"
+
+LIB_DEPEND="dev-libs/expat[static-libs(+)]
+ dev-libs/libaio[static-libs(+)]"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )
+ test? (
+ || (
+ dev-lang/ruby:2.6
+ dev-lang/ruby:2.5
+ dev-lang/ruby:2.4
+ )
+ >=dev-cpp/gtest-1.8.0
+ dev-util/cucumber
+ dev-util/aruba
+ )
+ dev-libs/boost"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.7.0-build-fixes.patch
+ "${FILESDIR}"/${PN}-0.8.5-libaio-0.3.112.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ use static && append-ldflags -static
+ local myeconfargs=(
+ --prefix="${EPREFIX}"/
+ --bindir="${EPREFIX}"/sbin
+ --with-optimisation=''
+ $(use_enable test testing)
+ )
+ STRIP=true econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ MAKEOPTS+=" V="
+ default
+}
+
+src_test() {
+ emake unit-test
+}
+
+src_install() {
+ emake DESTDIR="${D}" DATADIR="${D}/usr/share" install
+ dodoc README.md TODO.org
+}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-block/thin-provisioning-tools/, sys-block/thin-provisioning-tools/files/
@ 2021-12-24 19:42 Mike Gilbert
0 siblings, 0 replies; 6+ messages in thread
From: Mike Gilbert @ 2021-12-24 19:42 UTC (permalink / raw
To: gentoo-commits
commit: c488fb12f350ac6d697687b5b88b6109e7075d1f
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 24 19:38:47 2021 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Dec 24 19:41:17 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c488fb12
sys-block/thin-provisioning-tools: drop -lboost_iostreams
Closes: https://bugs.gentoo.org/794196
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
.../files/0.9.0-remove-boost_iostreams.patch | 11 +++++++++++
...s-0.9.0.ebuild => thin-provisioning-tools-0.9.0-r1.ebuild} | 1 +
2 files changed, 12 insertions(+)
diff --git a/sys-block/thin-provisioning-tools/files/0.9.0-remove-boost_iostreams.patch b/sys-block/thin-provisioning-tools/files/0.9.0-remove-boost_iostreams.patch
new file mode 100644
index 000000000000..87a1b4e2f7fd
--- /dev/null
+++ b/sys-block/thin-provisioning-tools/files/0.9.0-remove-boost_iostreams.patch
@@ -0,0 +1,11 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -173,7 +173,7 @@
+ CXXFLAGS+=@CXX_STRERROR_FLAG@
+ CXXFLAGS+=@LFS_FLAGS@
+ INCLUDES+=-I$(TOP_BUILDDIR) -I$(TOP_DIR) -I$(TOP_DIR)/thin-provisioning
+-LIBS:=-laio -lexpat -lboost_iostreams -ldl
++LIBS:=-laio -lexpat -ldl
+
+ ifeq ("@DEVTOOLS@", "yes")
+ LIBS+=-lncurses
diff --git a/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.9.0.ebuild b/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.9.0-r1.ebuild
similarity index 96%
rename from sys-block/thin-provisioning-tools/thin-provisioning-tools-0.9.0.ebuild
rename to sys-block/thin-provisioning-tools/thin-provisioning-tools-0.9.0-r1.ebuild
index a79debda1725..9d966a9fc583 100644
--- a/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.9.0.ebuild
+++ b/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.9.0-r1.ebuild
@@ -40,6 +40,7 @@ DEPEND="${RDEPEND}
PATCHES=(
"${FILESDIR}"/${PN}-0.7.0-build-fixes.patch
+ "${FILESDIR}"/0.9.0-remove-boost_iostreams.patch
)
src_prepare() {
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-block/thin-provisioning-tools/, sys-block/thin-provisioning-tools/files/
@ 2023-07-15 6:07 Sam James
0 siblings, 0 replies; 6+ messages in thread
From: Sam James @ 2023-07-15 6:07 UTC (permalink / raw
To: gentoo-commits
commit: 69c7647ae0eab2937fd4e7d75b8073e99866f594
Author: Gwendal Grignou <gwendal <AT> chromium <DOT> org>
AuthorDate: Wed Jun 28 23:25:01 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jul 15 06:02:57 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69c7647a
sys-block/thin-provisioning-tools: Do not use gcc directly
Use $(CXX) when linking libft.so.
BUG=b:271479944
TEST=Install on brya, check the new version.
Closes: https://bugs.gentoo.org/721500
Signed-off-by: Gwendal Grignou <gwendal <AT> chromium.org>
Closes: https://github.com/gentoo/gentoo/pull/31886
Signed-off-by: Sam James <sam <AT> gentoo.org>
...thin-provisioning-tools-0.9.0-build-fixes.patch | 25 ++++++++++++++++++++++
...ild => thin-provisioning-tools-0.9.0-r2.ebuild} | 1 +
2 files changed, 26 insertions(+)
diff --git a/sys-block/thin-provisioning-tools/files/thin-provisioning-tools-0.9.0-build-fixes.patch b/sys-block/thin-provisioning-tools/files/thin-provisioning-tools-0.9.0-build-fixes.patch
new file mode 100644
index 000000000000..da2a10e0afbf
--- /dev/null
+++ b/sys-block/thin-provisioning-tools/files/thin-provisioning-tools-0.9.0-build-fixes.patch
@@ -0,0 +1,25 @@
+From f912f6630eada34dcfb1320bb46b02d149c32ad4 Mon Sep 17 00:00:00 2001
+From: Gwendal Grignou <gwendal@chromium.org>
+Date: Wed, 28 Jun 2023 16:08:41 -0700
+Subject: [PATCH] [base] Never use gcc directly
+
+---
+ Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index b1fd4aa..342daf7 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -363,7 +363,7 @@ LIBFT_OBJECTS=$(subst .c,.o,$(LIBFT_SOURCE))
+
+ lib/libft.so: $(LIBFT_OBJECTS)
+ @echo " [LD]" $@
+- $(V) gcc -shared -o $@ $+ -laio
++ $(V) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $+ -laio
+
+ .PHONEY: functional-test unit-test
+
+--
+2.41.0.255.g8b1d071c50-goog
+
diff --git a/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.9.0-r1.ebuild b/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.9.0-r2.ebuild
similarity index 97%
rename from sys-block/thin-provisioning-tools/thin-provisioning-tools-0.9.0-r1.ebuild
rename to sys-block/thin-provisioning-tools/thin-provisioning-tools-0.9.0-r2.ebuild
index 42ab5f59eb01..072dbecae727 100644
--- a/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.9.0-r1.ebuild
+++ b/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.9.0-r2.ebuild
@@ -33,6 +33,7 @@ DEPEND="${RDEPEND}
PATCHES=(
"${FILESDIR}"/${PN}-0.7.0-build-fixes.patch
+ "${FILESDIR}"/${PN}-0.9.0-build-fixes.patch
"${FILESDIR}"/0.9.0-remove-boost_iostreams.patch
)
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-block/thin-provisioning-tools/, sys-block/thin-provisioning-tools/files/
@ 2023-09-18 9:50 Sam James
0 siblings, 0 replies; 6+ messages in thread
From: Sam James @ 2023-09-18 9:50 UTC (permalink / raw
To: gentoo-commits
commit: d4d007aac8769809cdf3396100ce5030f980bfa2
Author: Peter Levine <plevine457 <AT> gmail <DOT> com>
AuthorDate: Tue Sep 5 07:34:44 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Sep 18 09:48:22 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4d007aa
sys-block/thin-provisioning-tools: fix bug 911775
Many name clashes between boost::optional and std::optional are
resolved with explicit namespace qualification. Because of a problem
with a ADL and a global "operator<<" function name not being included
in gtest's environment, they had to be defined in "namespace boost {".
Utterly hackish but only affects two testcase code files. Finally,
there was an issue of a "one-past the end" access causing a segfault
that was fixed by allocating an extra element to a zeroed std::vector.
Closes: https://bugs.gentoo.org/911775
Signed-off-by: Peter Levine <plevine457 <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/32597
Signed-off-by: Sam James <sam <AT> gentoo.org>
...thin-provisioning-tools-0.9.0-boost-gtest.patch | 622 +++++++++++++++++++++
.../thin-provisioning-tools-0.9.0-r4.ebuild | 70 +++
2 files changed, 692 insertions(+)
diff --git a/sys-block/thin-provisioning-tools/files/thin-provisioning-tools-0.9.0-boost-gtest.patch b/sys-block/thin-provisioning-tools/files/thin-provisioning-tools-0.9.0-boost-gtest.patch
new file mode 100644
index 000000000000..ae9288db8be9
--- /dev/null
+++ b/sys-block/thin-provisioning-tools/files/thin-provisioning-tools-0.9.0-boost-gtest.patch
@@ -0,0 +1,622 @@
+Bug: https://bugs.gentoo.org/911775
+
+--- a/base/base64.cc
++++ b/base/base64.cc
+@@ -68,13 +68,13 @@
+ throw std::runtime_error("internal error, in split");
+ }
+
+- optional<unsigned> char_to_index(char c) {
++ boost::optional<unsigned> char_to_index(char c) {
+ // FIXME: very slow
+ for (unsigned i = 0; i < 64; i++)
+ if (table_[i] == c)
+- return optional<unsigned>(i);
++ return boost::optional<unsigned>(i);
+
+- return optional<unsigned>();
++ return boost::optional<unsigned>();
+ }
+
+ decoded_or_error success(vector<unsigned char> const &decoded) {
+@@ -92,7 +92,7 @@
+ }
+
+ decoded_or_error decode_quad(char c1, char c2, char c3, char c4) {
+- typedef optional<unsigned> oi;
++ typedef boost::optional<unsigned> oi;
+ unsigned char d1, d2, d3;
+ vector<unsigned char> decoded;
+
+--- a/base/run.h
++++ b/base/run.h
+@@ -1,7 +1,7 @@
+ #ifndef BASE_DATA_RANGE_H
+ #define BASE_DATA_RANGE_H
+
+-#include <boost/optional.hpp>
++#include <boost/optional/optional_io.hpp>
+ #include <ostream>
+
+ //----------------------------------------------------------------
+--- a/block-cache/copier.cc
++++ b/block-cache/copier.cc
+@@ -90,19 +90,19 @@
+ copier::wait_complete()
+ {
+ if (complete_.empty()) {
+- return optional<copy_op>();
++ return boost::optional<copy_op>();
+
+ } else {
+ auto op = complete_.front();
+ complete_.pop_front();
+- return optional<copy_op>(op);
++ return boost::optional<copy_op>(op);
+ }
+ }
+
+ void
+ copier::wait_(unsigned µ)
+ {
+- optional<io_engine::wait_result> mp;
++ boost::optional<io_engine::wait_result> mp;
+
+ if (!pending())
+ return;
+--- a/block-cache/io_engine.cc
++++ b/block-cache/io_engine.cc
+@@ -125,13 +125,13 @@
+ return r == 1;
+ }
+
+-optional<io_engine::wait_result>
++boost::optional<io_engine::wait_result>
+ aio_engine::wait()
+ {
+ return wait_(NULL);
+ }
+
+-optional<io_engine::wait_result>
++boost::optional<io_engine::wait_result>
+ aio_engine::wait(unsigned µsec)
+ {
+ timespec start = micro_to_ts(microsec);
+@@ -156,7 +156,7 @@
+ }
+
+ if (r == 0) {
+- return optional<wait_result>();
++ return boost::optional<wait_result>();
+ }
+
+ iocb *cb = reinterpret_cast<iocb *>(event.obj);
+@@ -164,19 +164,19 @@
+
+ if (event.res == cb->u.c.nbytes) {
+ cbs_.free(cb);
+- return optional<wait_result>(make_pair(true, context));
++ return boost::optional<wait_result>(make_pair(true, context));
+
+ } else if (static_cast<int>(event.res) < 0) {
+ cbs_.free(cb);
+- return optional<wait_result>(make_pair(false, context));
++ return boost::optional<wait_result>(make_pair(false, context));
+
+ } else {
+ cbs_.free(cb);
+- return optional<wait_result>(make_pair(false, context));
++ return boost::optional<wait_result>(make_pair(false, context));
+ }
+
+ // shouldn't get here
+- return optional<wait_result>(make_pair(false, 0));
++ return boost::optional<wait_result>(make_pair(false, 0));
+ }
+
+ struct timespec
+--- a/caching/cache_restore.cc
++++ b/caching/cache_restore.cc
+@@ -40,8 +40,8 @@
+ override_version(1) {
+ }
+
+- optional<string> input;
+- optional<string> output;
++ boost::optional<string> input;
++ boost::optional<string> output;
+
+ uint32_t metadata_version;
+ bool clean_shutdown;
+@@ -154,11 +154,11 @@
+ return 0;
+
+ case 'i':
+- fs.input = optional<string>(string(optarg));
++ fs.input = boost::optional<string>(string(optarg));
+ break;
+
+ case 'o':
+- fs.output = optional<string>(string(optarg));
++ fs.output = boost::optional<string>(string(optarg));
+ break;
+
+ case 'q':
+--- a/caching/cache_writeback.cc
++++ b/caching/cache_writeback.cc
+@@ -150,7 +150,7 @@
+ }
+
+ void check_for_completed_copies(bool block = false) {
+- optional<copy_op> mop;
++ boost::optional<copy_op> mop;
+
+ do {
+ if (block)
+--- a/era/era_invalidate.cc
++++ b/era/era_invalidate.cc
+@@ -27,7 +27,7 @@
+ }
+
+ bool metadata_snapshot_;
+- optional<uint32_t> era_threshold_;
++ boost::optional<uint32_t> era_threshold_;
+ };
+
+ //--------------------------------
+@@ -88,7 +88,7 @@
+ walk_writeset_tree(md.tm_, *md.writeset_tree_, v, dv);
+ }
+
+- void mark_blocks_since(metadata const &md, optional<uint32_t> const &threshold, set<uint32_t> &result) {
++ void mark_blocks_since(metadata const &md, boost::optional<uint32_t> const &threshold, set<uint32_t> &result) {
+ if (!threshold)
+ // Can't get here, just putting in to pacify the compiler
+ throw std::runtime_error("threshold not set");
+--- a/era/era_restore.cc
++++ b/era/era_restore.cc
+@@ -28,8 +28,8 @@
+ : quiet(false) {
+ }
+
+- optional<string> input;
+- optional<string> output;
++ boost::optional<string> input;
++ boost::optional<string> output;
+ bool quiet;
+ };
+
+@@ -99,11 +99,11 @@
+ return 0;
+
+ case 'i':
+- fs.input = optional<string>(string(optarg));
++ fs.input = boost::optional<string>(string(optarg));
+ break;
+
+ case 'o':
+- fs.output = optional<string>(string(optarg));
++ fs.output = boost::optional<string>(string(optarg));
+ break;
+
+ case 'q':
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -162,7 +162,7 @@
+ TOP_BUILDDIR:=@top_builddir@
+ CFLAGS+=-fPIC
+ CFLAGS+=@LFS_FLAGS@
+-CXXFLAGS+=-fPIC -fno-strict-aliasing -std=c++11
++CXXFLAGS+=-fPIC -fno-strict-aliasing
+
+ ifeq ("@DEVTOOLS@", "yes")
+ CXXFLAGS+=-DDEV_TOOLS
+--- a/persistent-data/hex_dump.h
++++ b/persistent-data/hex_dump.h
+@@ -19,6 +19,7 @@
+ #ifndef HEX_DUMP_H
+ #define HEX_DUMP_H
+
++#include <cstddef>
+ #include <iosfwd>
+
+ //----------------------------------------------------------------
+--- a/persistent-data/transaction_manager.cc
++++ b/persistent-data/transaction_manager.cc
+@@ -48,7 +48,7 @@
+ transaction_manager::write_ref
+ transaction_manager::new_block(validator v)
+ {
+- optional<block_address> mb = sm_->new_block();
++ boost::optional<block_address> mb = sm_->new_block();
+ if (!mb)
+ throw runtime_error("transaction_manager::new_block() couldn't allocate new block");
+
+@@ -67,7 +67,7 @@
+ return make_pair(bm_->write_lock(orig, v), need_inc);
+
+ read_ref src = bm_->read_lock(orig, v);
+- optional<block_address> mb = sm_->new_block();
++ boost::optional<block_address> mb = sm_->new_block();
+ if (!mb)
+ throw runtime_error("transaction_manager::shadow() couldn't allocate new block");
+
+--- a/thin-provisioning/metadata_checker.cc
++++ b/thin-provisioning/metadata_checker.cc
+@@ -182,7 +182,7 @@
+ error_state examine_mapping_tree_(transaction_manager::ptr tm,
+ superblock_detail::superblock const &sb,
+ nested_output &out,
+- optional<space_map::ptr> data_sm,
++ boost::optional<space_map::ptr> data_sm,
+ bool ignore_non_fatal) {
+ out << "examining mapping tree" << end_message();
+ nested_output::nest _ = out.push();
+@@ -213,7 +213,7 @@
+ error_state examine_mapping_tree(transaction_manager::ptr tm,
+ superblock_detail::superblock const &sb,
+ nested_output &out,
+- optional<space_map::ptr> data_sm,
++ boost::optional<space_map::ptr> data_sm,
+ bool ignore_non_fatal) {
+ error_state err = examine_devices_tree_(tm, sb, out, ignore_non_fatal);
+ err << examine_mapping_tree_(tm, sb, out, data_sm, ignore_non_fatal);
+@@ -403,7 +403,7 @@
+ // until that there's a better solution in space
+ // and time complexity
+ space_map::ptr data_sm{open_disk_sm(*tm, &sb.data_space_map_root_)};
+- optional<space_map::ptr> core_sm;
++ boost::optional<space_map::ptr> core_sm;
+ err_ << examine_data_mappings(tm, sb, options_.data_mapping_opts_, out_, core_sm);
+
+ if (err_ == FATAL)
+@@ -418,7 +418,7 @@
+ err_ << compare_space_maps(data_sm, *core_sm, out_);
+ } else
+ err_ << examine_data_mappings(tm, sb, options_.data_mapping_opts_, out_,
+- optional<space_map::ptr>());
++ boost::optional<space_map::ptr>());
+
+ metadata_checked_ = true;
+ }
+@@ -509,7 +509,7 @@
+ superblock_detail::superblock const &sb,
+ check_options::data_mapping_options option,
+ nested_output &out,
+- optional<space_map::ptr> data_sm) {
++ boost::optional<space_map::ptr> data_sm) {
+ error_state err = NO_ERROR;
+
+ switch (option) {
+--- a/thin-provisioning/metadata_dumper.cc
++++ b/thin-provisioning/metadata_dumper.cc
+@@ -125,7 +125,7 @@
+ };
+
+ // See comment on get_map_ids
+- optional<set<uint32_t> >
++ boost::optional<set<uint32_t> >
+ get_dev_ids(transaction_manager &tm, block_address root) {
+ d_thin_id_extractor de;
+ fatal_details_damage dv;
+@@ -134,7 +134,7 @@
+ try {
+ walk_device_tree(tree, de, dv, true);
+ } catch (...) {
+- return optional<set<uint32_t>>();
++ return boost::optional<set<uint32_t>>();
+ }
+
+ return de.dd_;
+@@ -150,7 +150,7 @@
+
+ // The walk will do more sanity checks than we did when scanning the metadata, so
+ // it's possible that it will fail and throw a metadata damage exception.
+- optional<set<uint32_t> >
++ boost::optional<set<uint32_t> >
+ get_map_ids(transaction_manager &tm, block_address root) {
+ m_thin_id_extractor me;
+ fatal_mapping_damage mv;
+@@ -159,7 +159,7 @@
+ try {
+ walk_mapping_tree(tree, me, mv, true);
+ } catch (...) {
+- return optional<set<uint32_t>>();
++ return boost::optional<set<uint32_t>>();
+ }
+
+ return me.dd_;
+@@ -288,7 +288,7 @@
+ uint32_t time;
+ };
+
+- optional<roots>
++ boost::optional<roots>
+ find_best_roots(transaction_manager &tm) {
+ vector<node_info> mapping_roots;
+ vector<node_info> device_roots;
+@@ -334,7 +334,7 @@
+ if (pairs.size())
+ return mk_roots(pairs[0]);
+ else
+- return optional<roots>();
++ return boost::optional<roots>();
+ }
+
+ private:
+@@ -623,12 +623,12 @@
+ }
+ }
+
+- optional<node_info> lookup_info(block_address b) const {
++ boost::optional<node_info> lookup_info(block_address b) const {
+ auto it = infos_.find(b);
+ if (it == infos_.end())
+- return optional<node_info>();
++ return boost::optional<node_info>();
+
+- return optional<node_info>(it->second);
++ return boost::optional<node_info>(it->second);
+ }
+
+ block_manager &bm_;
+@@ -846,16 +846,16 @@
+ return sb;
+ }
+
+- optional<superblock_detail::superblock>
++ boost::optional<superblock_detail::superblock>
+ maybe_read_superblock(block_manager::ptr bm)
+ {
+ try {
+ auto sb = read_superblock(bm);
+- return optional<superblock_detail::superblock>(sb);
++ return boost::optional<superblock_detail::superblock>(sb);
+ } catch (...) {
+ }
+
+- return optional<superblock_detail::superblock>();
++ return boost::optional<superblock_detail::superblock>();
+ }
+
+ void
+--- a/thin-provisioning/thin_dump.cc
++++ b/thin-provisioning/thin_dump.cc
+@@ -50,7 +50,7 @@
+ string format;
+ bool repair;
+ bool use_metadata_snap;
+- optional<block_address> snap_location;
++ boost::optional<block_address> snap_location;
+ };
+
+ metadata::ptr open_metadata(string const &path, struct flags &flags) {
+--- a/thin-provisioning/thin_ls.cc
++++ b/thin-provisioning/thin_ls.cc
+@@ -238,7 +238,7 @@
+
+ void pass1(metadata::ptr md, mapping_set &mappings, ::uint64_t dev_id) {
+ dev_tree::key k = {dev_id};
+- optional<::uint64_t> dev_root = md->mappings_top_level_->lookup(k);
++ boost::optional<::uint64_t> dev_root = md->mappings_top_level_->lookup(k);
+
+ if (!dev_root)
+ throw runtime_error("couldn't find mapping tree root");
+@@ -254,7 +254,7 @@
+
+ block_address count_exclusives(metadata::ptr md, mapping_set const &mappings, ::uint64_t dev_id) {
+ dev_tree::key k = {dev_id};
+- optional<::uint64_t> dev_root = md->mappings_top_level_->lookup(k);
++ boost::optional<::uint64_t> dev_root = md->mappings_top_level_->lookup(k);
+
+ if (!dev_root)
+ throw runtime_error("couldn't find mapping tree root");
+@@ -324,7 +324,7 @@
+ metadata::ptr md;
+
+ if (flags.use_metadata_snap)
+- md.reset(new metadata(bm, optional<block_address>()));
++ md.reset(new metadata(bm, boost::optional<block_address>()));
+ else
+ md.reset(new metadata(bm));
+
+--- a/unit-tests/bitset_t.cc
++++ b/unit-tests/bitset_t.cc
+@@ -60,14 +60,14 @@
+ tm_(bm_, sm_) {
+ }
+
+- bitset::ptr
++ persistent_data::bitset::ptr
+ create_bitset() {
+- return bitset::ptr(new bitset(tm_));
++ return persistent_data::bitset::ptr(new persistent_data::bitset(tm_));
+ }
+
+- bitset::ptr
++ persistent_data::bitset::ptr
+ open_bitset(block_address root, unsigned count) {
+- return bitset::ptr(new bitset(tm_, root, count));
++ return persistent_data::bitset::ptr(new persistent_data::bitset(tm_, root, count));
+ }
+
+ private:
+@@ -81,7 +81,7 @@
+
+ TEST_F(BitsetTests, create_empty_bitset)
+ {
+- bitset::ptr bs = create_bitset();
++ persistent_data::bitset::ptr bs = create_bitset();
+ ASSERT_THROW(bs->get(0), runtime_error);
+ }
+
+@@ -89,7 +89,7 @@
+ {
+ unsigned const COUNT = 100000;
+
+- bitset::ptr bs = create_bitset();
++ persistent_data::bitset::ptr bs = create_bitset();
+ bs->grow(COUNT, false);
+
+ for (unsigned i = 0; i < COUNT; i++)
+@@ -100,7 +100,7 @@
+ {
+ unsigned const COUNT = 100000;
+
+- bitset::ptr bs = create_bitset();
++ persistent_data::bitset::ptr bs = create_bitset();
+ bs->grow(COUNT, true);
+
+ for (unsigned i = 0; i < COUNT; i++)
+@@ -111,7 +111,7 @@
+ {
+ unsigned const COUNT = 100000;
+
+- bitset::ptr bs = create_bitset();
++ persistent_data::bitset::ptr bs = create_bitset();
+ bs->grow(COUNT, false);
+ ASSERT_THROW(bs->grow(COUNT / 2, false), runtime_error);
+ }
+@@ -120,7 +120,7 @@
+ {
+ unsigned const COUNT = 100000;
+ unsigned const STEP = 37;
+- bitset::ptr bs = create_bitset();
++ persistent_data::bitset::ptr bs = create_bitset();
+
+ vector<unsigned> chunks;
+ unsigned c;
+@@ -150,7 +150,7 @@
+ TEST_F(BitsetTests, set_out_of_bounds_throws)
+ {
+ unsigned const COUNT = 100000;
+- bitset::ptr bs = create_bitset();
++ persistent_data::bitset::ptr bs = create_bitset();
+
+ ASSERT_THROW(bs->set(0, true), runtime_error);
+ bs->grow(COUNT, true);
+@@ -160,7 +160,7 @@
+ TEST_F(BitsetTests, set_works)
+ {
+ unsigned const COUNT = 100000;
+- bitset::ptr bs = create_bitset();
++ persistent_data::bitset::ptr bs = create_bitset();
+
+ bs->grow(COUNT, true);
+ for (unsigned i = 0; i < COUNT; i += 7)
+@@ -176,7 +176,7 @@
+ block_address root;
+
+ {
+- bitset::ptr bs = create_bitset();
++ persistent_data::bitset::ptr bs = create_bitset();
+
+ bs->grow(COUNT, true);
+ for (unsigned i = 0; i < COUNT; i += 7)
+@@ -186,7 +186,7 @@
+ }
+
+ {
+- bitset::ptr bs = open_bitset(root, COUNT);
++ persistent_data::bitset::ptr bs = open_bitset(root, COUNT);
+ for (unsigned i = 0; i < COUNT; i++)
+ ASSERT_THAT(bs->get(i), Eq(i % 7 ? true : false));
+ }
+@@ -198,7 +198,7 @@
+ block_address root;
+
+ {
+- bitset::ptr bs = create_bitset();
++ persistent_data::bitset::ptr bs = create_bitset();
+
+ bs->grow(COUNT, true);
+ for (unsigned i = 0; i < COUNT; i += 7)
+@@ -211,7 +211,7 @@
+ }
+
+ {
+- bitset::ptr bs = open_bitset(root, COUNT);
++ persistent_data::bitset::ptr bs = open_bitset(root, COUNT);
+ bitset_checker c(COUNT, 7);
+ bs->walk_bitset(c);
+ }
+--- a/unit-tests/copier_t.cc
++++ b/unit-tests/copier_t.cc
+@@ -32,23 +32,27 @@
+ namespace {
+ unsigned const BLOCK_SIZE = 64u;
+ using wait_result = io_engine::wait_result;
++}
+
+- ostream &operator <<(ostream &out, optional<wait_result> const &mwr) {
++namespace boost {
++ ostream &operator <<(ostream &out, boost::optional<wait_result> const &mwr) {
+ if (mwr) {
+ out << "Just[wait_result[" << mwr->first << ", " << mwr->second << "]]";
+ } else
+ out << "Nothing";
+ return out;
+ }
++}
+
++namespace {
+ class io_engine_mock : public io_engine {
+ public:
+ MOCK_METHOD3(open_file, handle(string const &, mode, sharing));
+ MOCK_METHOD1(close_file, void(handle));
+ MOCK_METHOD6(issue_io, bool(handle, dir, sector_t, sector_t, void *, unsigned));
+
+- MOCK_METHOD0(wait, optional<wait_result>());
+- MOCK_METHOD1(wait, optional<wait_result>(unsigned &));
++ MOCK_METHOD0(wait, boost::optional<wait_result>());
++ MOCK_METHOD1(wait, boost::optional<wait_result>(unsigned &));
+ };
+
+ class CopierTests : public Test {
+@@ -72,8 +76,8 @@
+ BLOCK_SIZE, 1 * 1024 * 1024));
+ }
+
+- static optional<wait_result> make_wr(bool success, unsigned context) {
+- return optional<wait_result>(wait_result(success, context));
++ static boost::optional<wait_result> make_wr(bool success, unsigned context) {
++ return boost::optional<wait_result>(wait_result(success, context));
+ }
+
+ void issue_successful_op(copier &c, copy_op &op, unsigned context) {
+@@ -258,7 +262,7 @@
+ WillOnce(Return(true));
+
+ EXPECT_CALL(engine_, wait(micro)).
+- WillOnce(DoAll(SetArgReferee<0>(0u), Return(optional<wait_result>())));
++ WillOnce(DoAll(SetArgReferee<0>(0u), Return(boost::optional<wait_result>())));
+
+ auto mop = c->wait(micro);
+ ASSERT_FALSE(mop);
+--- a/unit-tests/rolling_hash_t.cc
++++ b/unit-tests/rolling_hash_t.cc
+@@ -127,10 +127,10 @@
+ unsigned min = 100000, max = 0;
+
+ bytes bs = random_bytes(1024 * 1024 * 100);
+- vector<unsigned> counts(window_size_, 0);
++ vector<unsigned> counts(window_size_ + 1, 0);
+
+ for (unsigned i = 0; i < bs.size(); i++) {
+- optional<unsigned> b = h_.step(bs[i]);
++ boost::optional<unsigned> b = h_.step(bs[i]);
+ if (b) {
+ counts[*b]++;
+
+--- a/unit-tests/span_iterator_t.cc
++++ b/unit-tests/span_iterator_t.cc
+@@ -81,7 +81,9 @@
+
+ base::run_set<block_address> forbidden;
+ };
++}
+
++namespace boost {
+ ostream &operator <<(ostream &out, maybe_span const &m) {
+ out << "maybe_span[";
+ if (m)
diff --git a/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.9.0-r4.ebuild b/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.9.0-r4.ebuild
new file mode 100644
index 000000000000..ce538347406e
--- /dev/null
+++ b/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.9.0-r4.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools flag-o-matic
+
+DESCRIPTION="A suite of tools for thin provisioning on Linux"
+HOMEPAGE="https://github.com/jthornber/thin-provisioning-tools"
+
+if [[ ${PV} != *9999 ]]; then
+ SRC_URI="https://github.com/jthornber/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+else
+ inherit git-r3
+ EGIT_REPO_URI='https://github.com/jthornber/thin-provisioning-tools.git'
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="static test"
+RESTRICT="!test? ( test )"
+
+LIB_DEPEND="dev-libs/expat[static-libs(+)]
+ dev-libs/libaio[static-libs(+)]"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )
+ test? (
+ >=dev-cpp/gtest-1.8.0
+ )
+ dev-libs/boost"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.7.0-build-fixes.patch
+ "${FILESDIR}"/${PN}-0.9.0-build-fixes.patch
+ "${FILESDIR}"/0.9.0-remove-boost_iostreams.patch
+ "${FILESDIR}"/${PN}-0.9.0-metadata_checker-Rename-function-to-reflect-command-.patch
+ "${FILESDIR}"/${PN}-0.9.0-thin_check-Allow-using-clear-needs-check-and-skip-ma.patch
+ "${FILESDIR}"/${PN}-0.9.0-boost-gtest.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ use static && append-ldflags -static
+ local myeconfargs=(
+ --prefix="${EPREFIX}"/
+ --bindir="${EPREFIX}"/sbin
+ --with-optimisation=''
+ $(use_enable test testing)
+ )
+ STRIP=true econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ emake V=
+}
+
+src_test() {
+ emake V= unit-test
+}
+
+src_install() {
+ emake V= DESTDIR="${D}" DATADIR="${ED}/usr/share" install
+ dodoc README.md TODO.org
+}
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-09-18 9:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-15 6:07 [gentoo-commits] repo/gentoo:master commit in: sys-block/thin-provisioning-tools/, sys-block/thin-provisioning-tools/files/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2023-09-18 9:50 Sam James
2021-12-24 19:42 Mike Gilbert
2019-06-05 14:14 Lars Wendler
2019-04-21 10:16 Lars Wendler
2017-10-20 15:09 Lars Wendler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox