From 4be6deadf3e814bc37585cde9dc08faad2561453 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 18 Sep 2023 17:06:27 +0100 Subject: gentoo auto-resync : 18:09:2023 - 17:06:27 --- sys-block/Manifest.gz | Bin 11016 -> 11020 bytes sys-block/thin-provisioning-tools/Manifest | 2 + ...thin-provisioning-tools-0.9.0-boost-gtest.patch | 622 +++++++++++++++++++++ .../thin-provisioning-tools-0.9.0-r4.ebuild | 70 +++ 4 files changed, 694 insertions(+) create mode 100644 sys-block/thin-provisioning-tools/files/thin-provisioning-tools-0.9.0-boost-gtest.patch create mode 100644 sys-block/thin-provisioning-tools/thin-provisioning-tools-0.9.0-r4.ebuild (limited to 'sys-block') diff --git a/sys-block/Manifest.gz b/sys-block/Manifest.gz index 36471fda4a39..2181a3a4dac5 100644 Binary files a/sys-block/Manifest.gz and b/sys-block/Manifest.gz differ diff --git a/sys-block/thin-provisioning-tools/Manifest b/sys-block/thin-provisioning-tools/Manifest index 4710f4a5db19..37a31ff5bbb5 100644 --- a/sys-block/thin-provisioning-tools/Manifest +++ b/sys-block/thin-provisioning-tools/Manifest @@ -1,5 +1,6 @@ AUX 0.9.0-remove-boost_iostreams.patch 300 BLAKE2B 05ebeb2a34c0c22be1d743af65ed9d2b4533e5a72034f818dd3c691aa66796b6fef41fc320e1f1d8ec21fa687752a15486e3b0716bfd67fc169cb72b3400ed31 SHA512 baced99272969395b0c5698435d22df4a2ca9ee0eec7848e918cab5bd0832a0fd73d95bf199c795c9647ce7d46d1f62e54f60d69b7e452821fd6cca9b808bc7b AUX thin-provisioning-tools-0.7.0-build-fixes.patch 1077 BLAKE2B 540efcaff8a0f826f132aa06b5d63728d5b7e0de2da81ff65480537c10b4a769330f0e557496f1ce6116cce51b834057ffb6c967fb527deb419aee4d1f3d2ec5 SHA512 fbdf778774bca2e608bbab7696b6646c64ee740c40c743f40f28e7e360fc2a6c6c3752992d9d5f7bbb624a9240ba480a6e58a7c5956ba6d2b772ece18502afe7 +AUX thin-provisioning-tools-0.9.0-boost-gtest.patch 17435 BLAKE2B e3a70f7bc64224c3dd99edbea8feb6d2abf6638d0f9ae51af5050da31dc450959717a9892c3aa74cb6c71811d42a65f27387cf6761298ba46f020abbcc24b7e0 SHA512 dfe435cc75382562d2483a9de9f406b15cf6853e6351f7cf4c651cd1153360bb540c7882929a0c5ce0e67a7bbce0f134167349524f269ba0f0494ef1580b352a AUX thin-provisioning-tools-0.9.0-build-fixes.patch 667 BLAKE2B cb739c4e54de19a48d71c36054090029fb57b40976bf71cbcf4a30b3999ba4f2ead77e7d59a604438d45373d4e5210efda62cfb457e9b06a2826f740a16418cd SHA512 d22acca5707b10b64f89255dc273dc90a12f0c81646a75606c0e214411d174cba0bc342aaf38535706d828c2e394e992949f67f9753f19fec9c52ddb6c9ce20b AUX thin-provisioning-tools-0.9.0-metadata_checker-Rename-function-to-reflect-command-.patch 2237 BLAKE2B d88a1ffb8e947a611deeee2e5e69b8a09b200f5dbf86f948a61c8f664eb17b099c12e1c1df2167361e6a0f457cec45723238dc3081e8e849c921bb5cd12cf9f6 SHA512 b838fcdca33186626fd75688b4383c64a18b503a3b9b6e136d4b1a706095e0a2b8d11f90d0b739d2568b2efd5eea2128680fa64fa6e39ac33a66c41f51d76d18 AUX thin-provisioning-tools-0.9.0-thin_check-Allow-using-clear-needs-check-and-skip-ma.patch 5793 BLAKE2B 017dffdb8a3170ede131396e4eb5cdb2e12a442cbbd0f515e06aa0b905c560a21a9de7190019492c2bb81dd772ee8ba38eb5cc05b635dd1b6a65c6f0864308ef SHA512 ba978d05cad60d3436e11d6c499498209f2efea989b5ac65e0920b44b2fa0b1c6ba8431e73220f671426a95dc6d843ad383cf9de6cb4b0c78f7342f881903878 @@ -131,6 +132,7 @@ DIST windows_x86_64_msvc-0.42.2.crate 666936 BLAKE2B bc3a456e7f8bc272f8978ec6950 DIST windows_x86_64_msvc-0.48.0.crate 671422 BLAKE2B abb063610dcc38581657133182b7d9efeed5553df67bd2bd6f30f1668a645186e4824f9ef556a5abc84ace10b1b437b6325bbda6df5a64ce880d7dcb743ac786 SHA512 6e598b8e3ac54912a8ebac01b0dd2c58fd282072527d7fedc7f6ebecdfb7dcb09ae46c22293bc0117849437f8b053db5e90406e7a38276f0f0afd06be3966795 EBUILD thin-provisioning-tools-0.9.0-r2.ebuild 1502 BLAKE2B 0f2cf3924bbac4515c709744640465508118f9555e6008d5cd6fdd8857760b31badedb81d9e11f8af7e1fde861fe5d1b6e4bb7960e8a4499334db6947475b4a9 SHA512 ada200456c411e6d22ba58b10396fdbb80efd0ed109622adbf57a455016de7b203516375c24223f2534b8b27cc78c92878a9b46e24607b1155390d56c24fa685 EBUILD thin-provisioning-tools-0.9.0-r3.ebuild 1682 BLAKE2B 932400950b8b5919f3bf1a7a4392b5554ec815594ebb6d120df07a2f3729de5d44d2b6e8e3914efd60329c6805288741d03128f6b03ebddd1b4dc3c8cf3e9044 SHA512 48c2338c24483be07ed8fab3cba4941889e7a578cefda66fa6afcfb909f02703ea444696536bb04f4f775bd2a36505f2c5fdde0d57f7f6afcefc4f5ae3aa5247 +EBUILD thin-provisioning-tools-0.9.0-r4.ebuild 1727 BLAKE2B 498934ecbcef6d4e59d464adf5eb4d2cb94f37438b31ae06533aef8bbbdbf72e27b0adb17dfc9d00dfab8e87134a584998bc4581bc39a60ec9e384fdd8e8691e SHA512 1cf906960fccc5540b5fd0e7d48b652ab810f385ef3de08f2450192aee7f134febdf6c39eafa5092d95a21788f64ae519c1521f137e0383ebe5aeacaacf48820 EBUILD thin-provisioning-tools-1.0.6.ebuild 3857 BLAKE2B bd0f241c5e0a433b6073eb5de5465ebb8d5b7068e34a81686872bc218b4afc807597212617a14fb8acb841021176adacfc9867873628deb87ccfde01f904479e SHA512 85c0837bf2de870ac2482c26815a3013a10582f1c3a5f8ce62d51038a10687950e635eb515461a46d703f827e0808ea6c7ceaca7c9b0372cc5f3893e5b0bb021 EBUILD thin-provisioning-tools-9999.ebuild 3852 BLAKE2B 159e54ef8dcadd01f17f5d76ed90fdf3ccb3699852334faee3916f420426e76cdc04b4f54bba2f58795f9eacb52844bb269e705dafb7840d597f1e21c41e9797 SHA512 22a2de51142f7856c237deb917e417f420b1d3511ff063e22f4582562c5962af00d11137da5cf1e94f2bb3259a143392b4ed3b9d5ec0a3cb259a847c14670d95 MISC metadata.xml 523 BLAKE2B 4655ecae3360d46012106a3956bfa251e5d496883858bf54d98b41c058b900839f27c4904c29c927ae6a9c0f9de3aabfc803f991bb77044e94fb6973d686cc7e SHA512 930adf57684772db565b607ee5dc309777ce3620ee10f60f305656fb566cba0e16300648808a046381eb1ec3ea3d8bf56ab582a70082e0f10b4089e2ecefc981 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 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 &decoded) { +@@ -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 µsec) + { + 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; + + case 'i': +- fs.input = optional(string(optarg)); ++ fs.input = boost::optional(string(optarg)); + break; + + case 'o': +- fs.output = optional(string(optarg)); ++ fs.output = boost::optional(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 mop; ++ boost::optional mop; + + do { + if (block) +--- a/era/era_invalidate.cc ++++ b/era/era_invalidate.cc +@@ -27,7 +27,7 @@ + } + + bool metadata_snapshot_; +- optional era_threshold_; ++ boost::optional era_threshold_; + }; + + //-------------------------------- +@@ -88,7 +88,7 @@ + walk_writeset_tree(md.tm_, *md.writeset_tree_, v, dv); + } + +- void mark_blocks_since(metadata const &md, optional const &threshold, set &result) { ++ void mark_blocks_since(metadata const &md, boost::optional const &threshold, set &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 input; +- optional output; ++ boost::optional input; ++ boost::optional output; + bool quiet; + }; + +@@ -99,11 +99,11 @@ + return 0; + + case 'i': +- fs.input = optional(string(optarg)); ++ fs.input = boost::optional(string(optarg)); + break; + + case 'o': +- fs.output = optional(string(optarg)); ++ fs.output = boost::optional(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 + #include + + //---------------------------------------------------------------- +--- 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 mb = sm_->new_block(); ++ boost::optional 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 mb = sm_->new_block(); ++ boost::optional 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 data_sm, ++ boost::optional 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 data_sm, ++ boost::optional 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 core_sm; ++ boost::optional 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()); ++ boost::optional()); + + metadata_checked_ = true; + } +@@ -509,7 +509,7 @@ + superblock_detail::superblock const &sb, + check_options::data_mapping_options option, + nested_output &out, +- optional data_sm) { ++ boost::optional 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 > ++ boost::optional > + 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>(); ++ return boost::optional>(); + } + + 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 > ++ boost::optional > + 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>(); ++ return boost::optional>(); + } + + return me.dd_; +@@ -288,7 +288,7 @@ + uint32_t time; + }; + +- optional ++ boost::optional + find_best_roots(transaction_manager &tm) { + vector mapping_roots; + vector device_roots; +@@ -334,7 +334,7 @@ + if (pairs.size()) + return mk_roots(pairs[0]); + else +- return optional(); ++ return boost::optional(); + } + + private: +@@ -623,12 +623,12 @@ + } + } + +- optional lookup_info(block_address b) const { ++ boost::optional lookup_info(block_address b) const { + auto it = infos_.find(b); + if (it == infos_.end()) +- return optional(); ++ return boost::optional(); + +- return optional(it->second); ++ return boost::optional(it->second); + } + + block_manager &bm_; +@@ -846,16 +846,16 @@ + return sb; + } + +- optional ++ boost::optional + maybe_read_superblock(block_manager::ptr bm) + { + try { + auto sb = read_superblock(bm); +- return optional(sb); ++ return boost::optional(sb); + } catch (...) { + } + +- return optional(); ++ return boost::optional(); + } + + 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 snap_location; ++ boost::optional 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())); ++ md.reset(new metadata(bm, boost::optional())); + 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 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 const &mwr) { ++namespace boost { ++ ostream &operator <<(ostream &out, boost::optional 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()); +- MOCK_METHOD1(wait, optional(unsigned &)); ++ MOCK_METHOD0(wait, boost::optional()); ++ MOCK_METHOD1(wait, boost::optional(unsigned &)); + }; + + class CopierTests : public Test { +@@ -72,8 +76,8 @@ + BLOCK_SIZE, 1 * 1024 * 1024)); + } + +- static optional make_wr(bool success, unsigned context) { +- return optional(wait_result(success, context)); ++ static boost::optional make_wr(bool success, unsigned context) { ++ return boost::optional(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()))); ++ WillOnce(DoAll(SetArgReferee<0>(0u), Return(boost::optional()))); + + 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 counts(window_size_, 0); ++ vector counts(window_size_ + 1, 0); + + for (unsigned i = 0; i < bs.size(); i++) { +- optional b = h_.step(bs[i]); ++ boost::optional 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 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 +} -- cgit v1.2.3