aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2015-07-20 04:03:05 -0400
committerAnthony G. Basile <blueness@gentoo.org>2015-07-20 04:03:05 -0400
commite476ef39ac7c594138da4afe29f1d1bfe001ba8b (patch)
tree393ecac34c3290735aeda20c9133ce385bd6421d /sys-block
parentapp-editors/emacs: sync with tree version (diff)
downloadmusl-e476ef39ac7c594138da4afe29f1d1bfe001ba8b.tar.gz
musl-e476ef39ac7c594138da4afe29f1d1bfe001ba8b.tar.bz2
musl-e476ef39ac7c594138da4afe29f1d1bfe001ba8b.zip
sys-block/thin-provisioning-tools: strerror_r() returns and in, not char *
Package-Manager: portage-2.2.18 RepoMan-Options: --force Manifest-Sign-Key: 0xF52D4BBA
Diffstat (limited to 'sys-block')
-rw-r--r--sys-block/thin-provisioning-tools/Manifest5
-rw-r--r--sys-block/thin-provisioning-tools/files/thin-provisioning-tools-0.3.2-Remove-ambiguity-between-boost-uint64_t-and-uint64_t.patch214
-rw-r--r--sys-block/thin-provisioning-tools/files/thin-provisioning-tools-0.3.2-strerror_r-returns-int.patch33
-rw-r--r--sys-block/thin-provisioning-tools/metadata.xml15
-rw-r--r--sys-block/thin-provisioning-tools/thin-provisioning-tools-0.3.2-r99.ebuild52
5 files changed, 319 insertions, 0 deletions
diff --git a/sys-block/thin-provisioning-tools/Manifest b/sys-block/thin-provisioning-tools/Manifest
new file mode 100644
index 0000000..0fee6fb
--- /dev/null
+++ b/sys-block/thin-provisioning-tools/Manifest
@@ -0,0 +1,5 @@
+AUX thin-provisioning-tools-0.3.2-Remove-ambiguity-between-boost-uint64_t-and-uint64_t.patch 6866 SHA256 377c4b1b2caec23243e3cab6660ea736006a3c859e1a1b49831a481b631b230e SHA512 1f52f99d5fe41718b45558270b59be882cab54c962db2048fdb934321b5753957587ac62a9507fd7a89e45fceaeda1d8f2189af28188e2c8742783be1dd1421b WHIRLPOOL 0d5f856f23e023a696041b28b7a1ae39b28bf6bb7b2a82ccf30db98ea817fd5bd37676c7f046d0451db303fe2ecc54fcb5922da02856cba13455d3c9d275659b
+AUX thin-provisioning-tools-0.3.2-strerror_r-returns-int.patch 1384 SHA256 b604495e13eeb02bbf9c3970053249f57f54fb5af8a1565e75563d434dd42ca5 SHA512 93edbfe491bc491946c47a62ac2020b65b70e5196dc475a99ca001942a0869ff7c4e5a017172d2e5530c6dfc48a5ac8565d6a27134e3a54cd14601ff6ffe7574 WHIRLPOOL 39afca367a4592da272cf9639f276fb2350e9ada3902a37f77297c9dd3020f997598e05eabda00a28e592ab081356c7b195239c48c33a7e80382ffc41e9c4b4e
+DIST thin-provisioning-tools-0.3.2.tar.gz 175049 SHA256 1b9d8e9269cffe06f3c87214d35436225e12599debefbf1a50194c69cc3404ca SHA512 d6e18c303769b39c5bd48ef30d2819adc57d2d87b3c9b56d5d72468fb35f9b7b2309d35c6c12eabc36d653dd85338b9ad2fca9eed5c738a87b932b71f3a6da4f WHIRLPOOL b1bd87aa1995ba0616001837247c962c492d0029cb8a89b97aa326eb63d8a89113905f5d34490593e0cfcca33ef074e02a50679d22c3b1859d8fe5b97368c608
+EBUILD thin-provisioning-tools-0.3.2-r99.ebuild 1489 SHA256 7cd94d475a27243363579266113ea739aa42f25deda72ad63a5e0d0b6c80547c SHA512 120c03e0879113710d87f14b91f85f06362d1f01521e88c8cdddef24ad39bac99113622e3a13578bc32e7cdcc785e4e106c1ccf987b95c411db9efaca8f73085 WHIRLPOOL 61d8fa61e9cfdf3062ead6009c06ec5d6277ec1e1bbd37227596668c34859481a9c25e6293a4ec3751b93ce6bdb162a5b164a3afba72694e134baf62352a59ab
+MISC metadata.xml 457 SHA256 8283b979ca234301828c060894ba654b7731811ccfb860dde7cba90dafd05ba8 SHA512 838f6d3e2514c91dbcef049b0dd866fc71c8a0040c1bbb128a2613063f298d40dfb63391de97016cc768811c0cc19e93b89ff8c2061f01cc044048a8c090e1ce WHIRLPOOL 254971786e417e803815d12032e5ebcdcbe533f719acafbdb0b8dd75521f33e085f5f4a501379a8e95e739656290f12a37ed29c3a4ba03e98cb57dc5c32d1698
diff --git a/sys-block/thin-provisioning-tools/files/thin-provisioning-tools-0.3.2-Remove-ambiguity-between-boost-uint64_t-and-uint64_t.patch b/sys-block/thin-provisioning-tools/files/thin-provisioning-tools-0.3.2-Remove-ambiguity-between-boost-uint64_t-and-uint64_t.patch
new file mode 100644
index 0000000..9dd9780
--- /dev/null
+++ b/sys-block/thin-provisioning-tools/files/thin-provisioning-tools-0.3.2-Remove-ambiguity-between-boost-uint64_t-and-uint64_t.patch
@@ -0,0 +1,214 @@
+From e77e8715b0a91a60cf2c4b85933b1063385da122 Mon Sep 17 00:00:00 2001
+From: Joe Thornber <ejt@redhat.com>
+Date: Wed, 2 Jul 2014 08:19:20 +0000
+Subject: Remove ambiguity between boost::uint64_t and ::uint64_t.
+
+This has been causing people problems on uclibc builds.
+---
+ caching/cache_metadata_size.cc | 15 +++++++--------
+ caching/xml_format.cc | 7 +++----
+ era/superblock.cc | 5 ++---
+ era/writeset_tree.cc | 5 ++---
+ persistent-data/data-structures/bitset.cc | 7 +++----
+ thin-provisioning/device_tree.h | 4 +---
+ thin-provisioning/metadata_dumper.cc | 2 +-
+ 7 files changed, 19 insertions(+), 26 deletions(-)
+
+diff --git a/caching/cache_metadata_size.cc b/caching/cache_metadata_size.cc
+index 7584da6..5792c49 100644
+--- a/caching/cache_metadata_size.cc
++++ b/caching/cache_metadata_size.cc
+@@ -7,7 +7,6 @@
+ #include <stdint.h>
+ #include <stdexcept>
+
+-using namespace boost;
+ using namespace std;
+
+ //----------------------------------------------------------------
+@@ -18,9 +17,9 @@ namespace {
+ : max_hint_width(4) {
+ }
+
+- optional<uint64_t> device_size;
+- optional<uint32_t> block_size;
+- optional<uint64_t> nr_blocks;
++ boost::optional<uint64_t> device_size;
++ boost::optional<uint32_t> block_size;
++ boost::optional<uint64_t> nr_blocks;
+ uint32_t max_hint_width;
+ };
+
+@@ -58,19 +57,19 @@ namespace {
+ while ((c = getopt_long(argc, argv, short_opts, long_opts, NULL)) != -1) {
+ switch (c) {
+ case 0:
+- fs.block_size = lexical_cast<uint32_t>(optarg);
++ fs.block_size = boost::lexical_cast<uint32_t>(optarg);
+ break;
+
+ case 1:
+- fs.device_size = lexical_cast<uint64_t>(optarg);
++ fs.device_size = boost::lexical_cast<uint64_t>(optarg);
+ break;
+
+ case 2:
+- fs.nr_blocks = lexical_cast<uint64_t>(optarg);
++ fs.nr_blocks = boost::lexical_cast<uint64_t>(optarg);
+ break;
+
+ case 3:
+- fs.max_hint_width = lexical_cast<uint32_t>(optarg);
++ fs.max_hint_width = boost::lexical_cast<uint32_t>(optarg);
+ break;
+
+ case 'h':
+diff --git a/caching/xml_format.cc b/caching/xml_format.cc
+index cb03018..84d6fc2 100644
+--- a/caching/xml_format.cc
++++ b/caching/xml_format.cc
+@@ -5,7 +5,6 @@
+ #include <boost/lexical_cast.hpp>
+ #include <expat.h>
+
+-using namespace boost;
+ using namespace caching;
+ using namespace persistent_data;
+ using namespace std;
+@@ -189,14 +188,14 @@ namespace {
+
+ block_address cblock = get_attr<uint64_t>(attr, "cache_block");
+ decoded_or_error doe = base64_decode(get_attr<string>(attr, "data"));
+- if (!get<vector<unsigned char> >(&doe)) {
++ if (!boost::get<vector<unsigned char> >(&doe)) {
+ ostringstream msg;
+ msg << "invalid base64 encoding of hint for cache block "
+- << cblock << ": " << get<string>(doe);
++ << cblock << ": " << boost::get<string>(doe);
+ throw runtime_error(msg.str());
+ }
+
+- e->hint(cblock, get<vector<unsigned char> >(doe));
++ e->hint(cblock, boost::get<vector<unsigned char> >(doe));
+ }
+
+ // FIXME: why passing e by ptr?
+diff --git a/era/superblock.cc b/era/superblock.cc
+index 1bd1a4f..c319e9b 100644
+--- a/era/superblock.cc
++++ b/era/superblock.cc
+@@ -4,7 +4,6 @@
+ #include "persistent-data/errors.h"
+
+ using namespace base;
+-using namespace boost;
+ using namespace era;
+ using namespace superblock_damage;
+ using namespace persistent_data;
+@@ -149,8 +148,8 @@ superblock_traits::unpack(disk_type const &disk, value_type &value)
+
+ block_address ms = to_cpu<uint64_t>(disk.metadata_snap);
+ value.metadata_snap = (ms == SUPERBLOCK_LOCATION) ?
+- optional<block_address>() :
+- optional<block_address>(ms);
++ boost::optional<block_address>() :
++ boost::optional<block_address>(ms);
+ }
+
+ void
+diff --git a/era/writeset_tree.cc b/era/writeset_tree.cc
+index 54aa6a1..4e2c478 100644
+--- a/era/writeset_tree.cc
++++ b/era/writeset_tree.cc
+@@ -2,7 +2,6 @@
+ #include "persistent-data/data-structures/btree_damage_visitor.h"
+ #include "persistent-data/data-structures/bitset.h"
+
+-using namespace boost;
+ using namespace era;
+ using namespace writeset_tree_detail;
+ using namespace persistent_data;
+@@ -90,8 +89,8 @@ namespace {
+ private:
+ template <typename T>
+ run<uint32_t> to_uint32(run<T> const &r) {
+- return run<uint32_t>(optional<uint32_t>(r.begin_),
+- optional<uint32_t>(r.end_));
++ return run<uint32_t>(boost::optional<uint32_t>(r.begin_),
++ boost::optional<uint32_t>(r.end_));
+ }
+
+ damage_visitor &v_;
+diff --git a/persistent-data/data-structures/bitset.cc b/persistent-data/data-structures/bitset.cc
+index 5851e28..e49e19f 100644
+--- a/persistent-data/data-structures/bitset.cc
++++ b/persistent-data/data-structures/bitset.cc
+@@ -2,7 +2,6 @@
+ #include "persistent-data/data-structures/bitset.h"
+ #include "persistent-data/math_utils.h"
+
+-using namespace boost;
+ using namespace persistent_data;
+ using namespace persistent_data::bitset_detail;
+ using namespace std;
+@@ -12,7 +11,7 @@ using namespace std;
+ namespace {
+ struct bitset_traits {
+ typedef base::le64 disk_type;
+- typedef uint64_t value_type;
++ typedef ::uint64_t value_type;
+ typedef no_op_ref_counter<uint64_t> ref_counter;
+
+ static void unpack(disk_type const &disk, value_type &value) {
+@@ -118,11 +117,11 @@ namespace persistent_data {
+ }
+
+ private:
+- optional<uint32_t> lifted_mult64(optional<uint32_t> const &m) {
++ boost::optional<uint32_t> lifted_mult64(boost::optional<uint32_t> const &m) {
+ if (!m)
+ return m;
+
+- return optional<uint32_t>(*m * 64);
++ return boost::optional<uint32_t>(*m * 64);
+ }
+
+ bitset_visitor &v_;
+diff --git a/thin-provisioning/device_tree.h b/thin-provisioning/device_tree.h
+index 320eb73..23ae924 100644
+--- a/thin-provisioning/device_tree.h
++++ b/thin-provisioning/device_tree.h
+@@ -4,8 +4,6 @@
+ #include "persistent-data/data-structures/btree.h"
+ #include "persistent-data/run.h"
+
+-using namespace boost;
+-
+ //----------------------------------------------------------------
+
+ namespace thin_provisioning {
+@@ -50,7 +48,7 @@ namespace thin_provisioning {
+
+ class damage_visitor {
+ public:
+- typedef shared_ptr<damage_visitor> ptr;
++ typedef boost::shared_ptr<damage_visitor> ptr;
+
+ virtual ~damage_visitor() {}
+
+diff --git a/thin-provisioning/metadata_dumper.cc b/thin-provisioning/metadata_dumper.cc
+index dfe18e0..0bd284e 100644
+--- a/thin-provisioning/metadata_dumper.cc
++++ b/thin-provisioning/metadata_dumper.cc
+@@ -226,7 +226,7 @@ thin_provisioning::metadata_dump(metadata::ptr md, emitter::ptr e, bool repair)
+ md->sb_.trans_id_,
+ md->sb_.data_block_size_,
+ md->data_sm_->get_nr_blocks(),
+- optional<block_address>());
++ boost::optional<block_address>());
+
+ {
+ mapping_tree_detail::damage_visitor::ptr md_policy(mapping_damage_policy(repair));
+--
+2.0.2
+
diff --git a/sys-block/thin-provisioning-tools/files/thin-provisioning-tools-0.3.2-strerror_r-returns-int.patch b/sys-block/thin-provisioning-tools/files/thin-provisioning-tools-0.3.2-strerror_r-returns-int.patch
new file mode 100644
index 0000000..2f42acc
--- /dev/null
+++ b/sys-block/thin-provisioning-tools/files/thin-provisioning-tools-0.3.2-strerror_r-returns-int.patch
@@ -0,0 +1,33 @@
+diff -Naur thin-provisioning-tools-0.3.2.orig/caching/cache_check.cc thin-provisioning-tools-0.3.2/caching/cache_check.cc
+--- thin-provisioning-tools-0.3.2.orig/caching/cache_check.cc 2014-04-02 08:43:16.000000000 -0400
++++ thin-provisioning-tools-0.3.2/caching/cache_check.cc 2015-07-19 22:42:11.606851760 -0400
+@@ -201,10 +201,10 @@
+ int r = ::stat(path.c_str(), &info);
+ if (r) {
+ ostringstream msg;
+- char buffer[128], *ptr;
++ char buffer[128];
+
+- ptr = ::strerror_r(errno, buffer, sizeof(buffer));
+- msg << path << ": " << ptr;
++ ::strerror_r(errno, buffer, sizeof(buffer));
++ msg << path << ": " << buffer;
+ throw runtime_error(msg.str());
+ }
+
+diff -Naur thin-provisioning-tools-0.3.2.orig/persistent-data/block.tcc thin-provisioning-tools-0.3.2/persistent-data/block.tcc
+--- thin-provisioning-tools-0.3.2.orig/persistent-data/block.tcc 2014-04-02 08:43:16.000000000 -0400
++++ thin-provisioning-tools-0.3.2/persistent-data/block.tcc 2015-07-19 22:39:10.567860436 -0400
+@@ -45,10 +45,10 @@
+ // to exception.h
+ void syscall_failed(char const *call) {
+ char buffer[128];
+- char *msg = strerror_r(errno, buffer, sizeof(buffer));
++ strerror_r(errno, buffer, sizeof(buffer));
+
+ ostringstream out;
+- out << "syscall '" << call << "' failed: " << msg;
++ out << "syscall '" << call << "' failed: " << buffer;
+ throw runtime_error(out.str());
+ }
+
diff --git a/sys-block/thin-provisioning-tools/metadata.xml b/sys-block/thin-provisioning-tools/metadata.xml
new file mode 100644
index 0000000..659c8f5
--- /dev/null
+++ b/sys-block/thin-provisioning-tools/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>base-system</herd>
+ <maintainer>
+ <email>robbat2@gentoo.org</email>
+ <name>Robin H. Johnson</name>
+ </maintainer>
+ <longdescription lang="en">
+A suite of tools for thin provisioning on Linux.
+</longdescription>
+ <upstream>
+ <remote-id type="github">jthornber/thin-provisioning-tools</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.3.2-r99.ebuild b/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.3.2-r99.ebuild
new file mode 100644
index 0000000..4d2fae6
--- /dev/null
+++ b/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.3.2-r99.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-block/thin-provisioning-tools/thin-provisioning-tools-0.3.2-r1.ebuild,v 1.9 2015/05/29 05:25:36 jmorgan Exp $
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="A suite of tools for thin provisioning on Linux"
+HOMEPAGE="http://github.com/jthornber/thin-provisioning-tools"
+EXT=.tar.gz
+BASE_A=${P}${EXT}
+SRC_URI="http://github.com/jthornber/${PN}/archive/v${PV}${EXT} -> ${BASE_A}"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 arm ~mips ppc x86"
+IUSE="test"
+
+RDEPEND="dev-libs/expat"
+# || ( ) is a non-future proof workaround for Portage unefficiency wrt #477050
+DEPEND="${RDEPEND}
+ test? (
+ || ( dev-lang/ruby:2.9 dev-lang/ruby:2.8 dev-lang/ruby:2.7 dev-lang/ruby:2.6 dev-lang/ruby:2.5 dev-lang/ruby:2.4 dev-lang/ruby:2.3 dev-lang/ruby:2.2 dev-lang/ruby:2.1 dev-lang/ruby:2.0 dev-lang/ruby:1.9 dev-lang/ruby:1.8 )
+ dev-cpp/gmock
+ dev-util/cucumber
+ dev-util/aruba
+ )
+ dev-libs/boost"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-Remove-ambiguity-between-boost-uint64_t-and-uint64_t.patch
+ epatch "${FILESDIR}"/${P}-strerror_r-returns-int.patch
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --prefix="${EPREFIX}"/ \
+ --bindir="${EPREFIX}"/sbin \
+ --with-optimisation='' \
+ $(use_enable test testing)
+}
+
+src_install() {
+ emake install DESTDIR="${D}" MANDIR=/usr/share/man
+ dodoc README.md TODO.org
+}
+
+src_test() {
+ emake unit-test
+}