[gentoo-commits] repo/gentoo:master commit in: sys-block/thin-provisioning-tools/, sys-block/thin-provisioning-tools/files/

2023-09-18 Thread Sam James
commit: d4d007aac8769809cdf3396100ce5030f980bfa2
Author: Peter Levine  gmail  com>
AuthorDate: Tue Sep  5 07:34:44 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Sep 18 09:48:22 2023 +
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  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/32597
Signed-off-by: Sam James  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 ..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 char_to_index(char c) {
++  boost::optional char_to_index(char c) {
+   // FIXME: very slow
+   for (unsigned i = 0; i < 64; i++)
+   if (table_[i] == c)
+-  return optional(i);
++  return boost::optional(i);
+ 
+-  return optional();
++  return boost::optional();
+   }
+ 
+   decoded_or_error success(vector const ) {
+@@ -92,7 +92,7 @@
+   }
+ 
+   decoded_or_error decode_quad(char c1, char c2, char c3, char c4) {
+-  typedef optional oi;
++  typedef boost::optional oi;
+   unsigned char d1, d2, d3;
+   vector decoded;
+ 
+--- a/base/run.h
 b/base/run.h
+@@ -1,7 +1,7 @@
+ #ifndef BASE_DATA_RANGE_H
+ #define BASE_DATA_RANGE_H
+ 
+-#include 
++#include 
+ #include 
+ 
+ //
+--- a/block-cache/copier.cc
 b/block-cache/copier.cc
+@@ -90,19 +90,19 @@
+ copier::wait_complete()
+ {
+   if (complete_.empty()) {
+-  return optional();
++  return boost::optional();
+ 
+   } else {
+   auto op = complete_.front();
+   complete_.pop_front();
+-  return optional(op);
++  return boost::optional(op);
+   }
+ }
+ 
+ void
+ copier::wait_(unsigned )
+ {
+-  optional mp;
++  boost::optional mp;
+ 
+   if (!pending())
+   return;
+--- a/block-cache/io_engine.cc
 b/block-cache/io_engine.cc
+@@ -125,13 +125,13 @@
+   return r == 1;
+ }
+ 
+-optional
++boost::optional
+ aio_engine::wait()
+ {
+   return wait_(NULL);
+ }
+ 
+-optional
++boost::optional
+ aio_engine::wait(unsigned )
+ {
+   timespec start = micro_to_ts(microsec);
+@@ -156,7 +156,7 @@
+   }
+ 
+   if (r == 0) {
+-  return optional();
++  return boost::optional();
+   }
+ 
+   iocb *cb = reinterpret_cast(event.obj);
+@@ -164,19 +164,19 @@
+ 
+   if (event.res == cb->u.c.nbytes) {
+   cbs_.free(cb);
+-  return optional(make_pair(true, context));
++  return boost::optional(make_pair(true, context));
+ 
+   } else if (static_cast(event.res) < 0) {
+   cbs_.free(cb);
+-  return optional(make_pair(false, context));
++  return boost::optional(make_pair(false, context));
+ 
+   } else {
+   cbs_.free(cb);
+-  return optional(make_pair(false, context));
++  return boost::optional(make_pair(false, context));
+   }
+ 
+   // shouldn't get here
+-  return optional(make_pair(false, 0));
++  return boost::optional(make_pair(false, 0));
+ }
+ 
+ struct timespec
+--- a/caching/cache_restore.cc
 b/caching/cache_restore.cc
+@@ -40,8 +40,8 @@
+ override_version(1) {
+   }
+ 
+-  optional input;
+-  optional output;
++  boost::optional input;
++  boost::optional output;
+ 
+   uint32_t metadata_version;
+   bool clean_shutdown;
+@@ -154,11 +154,11 @@
+   return 0;
+ 
+   

[gentoo-commits] repo/gentoo:master commit in: sys-block/thin-provisioning-tools/, sys-block/thin-provisioning-tools/files/

2023-07-15 Thread Sam James
commit: 69c7647ae0eab2937fd4e7d75b8073e99866f594
Author: Gwendal Grignou  chromium  org>
AuthorDate: Wed Jun 28 23:25:01 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Sat Jul 15 06:02:57 2023 +
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  chromium.org>
Closes: https://github.com/gentoo/gentoo/pull/31886
Signed-off-by: Sam James  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 ..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 
+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
 )
 



[gentoo-commits] repo/gentoo:master commit in: sys-block/thin-provisioning-tools/, sys-block/thin-provisioning-tools/files/

2021-12-24 Thread Mike Gilbert
commit: c488fb12f350ac6d697687b5b88b6109e7075d1f
Author: Mike Gilbert  gentoo  org>
AuthorDate: Fri Dec 24 19:38:47 2021 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Fri Dec 24 19:41:17 2021 +
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  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 ..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() {



[gentoo-commits] repo/gentoo:master commit in: sys-block/thin-provisioning-tools/, sys-block/thin-provisioning-tools/files/

2019-06-05 Thread Lars Wendler
commit: ecd5ec9189fa68ecb6f107a96126ddd1eaddc59f
Author: Lars Wendler  gentoo  org>
AuthorDate: Wed Jun  5 14:08:48 2019 +
Commit: Lars Wendler  gentoo  org>
CommitDate: Wed Jun  5 14:14:27 2019 +
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  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 000..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 
+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(>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, );
+   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: 

[gentoo-commits] repo/gentoo:master commit in: sys-block/thin-provisioning-tools/, sys-block/thin-provisioning-tools/files/

2019-04-21 Thread Lars Wendler
commit: 89a600e91fcaabcf4fea2dbf832f7e074451ad7e
Author: Lars Wendler  gentoo  org>
AuthorDate: Sun Apr 21 10:15:42 2019 +
Commit: Lars Wendler  gentoo  org>
CommitDate: Sun Apr 21 10:16:15 2019 +
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  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 
0bc9ae1ee650f4f2c553ca72e0569bcf2590174cde2b89084ff4347d78f0dbd08c29bbc9629498f2b8fe2149fb272e0b5928890224b9ead224fd1a3161d1
 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..000
--- 
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.0 +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.0 
+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.0 +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

[gentoo-commits] repo/gentoo:master commit in: sys-block/thin-provisioning-tools/, sys-block/thin-provisioning-tools/files/

2017-10-20 Thread Lars Wendler
commit: b2be39932660fa5ae0df51ee4cbc5a514fe941f7
Author: Lars Wendler  gentoo  org>
AuthorDate: Fri Oct 20 15:09:15 2017 +
Commit: Lars Wendler  gentoo  org>
CommitDate: Fri Oct 20 15:09:25 2017 +
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 000..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 
+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