aboutsummaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2015-06-11 18:16:08 -0400
committerAnthony G. Basile <blueness@gentoo.org>2015-06-11 18:16:08 -0400
commit8eddda8072add075ebf56cf6d288bc1450d6b5f8 (patch)
tree373e2d36142a298a821f6643c097007aa38aa29f /sys-fs
downloadmusl-8eddda8072add075ebf56cf6d288bc1450d6b5f8.tar.gz
musl-8eddda8072add075ebf56cf6d288bc1450d6b5f8.tar.bz2
musl-8eddda8072add075ebf56cf6d288bc1450d6b5f8.zip
Initial migration from hardened-dev::musl
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/dosfstools/Manifest5
-rw-r--r--sys-fs/dosfstools/dosfstools-3.0.28-r99.ebuild29
-rw-r--r--sys-fs/dosfstools/files/dosfstools-3.0.27-Fix-format-string-in-check.c.patch25
-rw-r--r--sys-fs/dosfstools/files/dosfstools-3.0.28-fix_build_with_musl.patch25
-rw-r--r--sys-fs/dosfstools/metadata.xml5
-rw-r--r--sys-fs/encfs/Manifest5
-rw-r--r--sys-fs/encfs/encfs-1.7.4-r99.ebuild44
-rw-r--r--sys-fs/encfs/files/encfs-1.7.4-encfsctl.patch10
-rw-r--r--sys-fs/encfs/files/encfs-1.7.4-r68:69.patch31
-rw-r--r--sys-fs/encfs/metadata.xml11
-rw-r--r--sys-fs/fuse/Manifest6
-rw-r--r--sys-fs/fuse/files/fuse-2.9.3-includes.patch66
-rw-r--r--sys-fs/fuse/files/fuse-fbsd.init23
-rw-r--r--sys-fs/fuse/files/fuse.init35
-rw-r--r--sys-fs/fuse/fuse-2.9.3-r99.ebuild88
-rw-r--r--sys-fs/fuse/metadata.xml8
-rw-r--r--sys-fs/lvm2/Manifest30
-rw-r--r--sys-fs/lvm2/files/clvmd.confd-2.02.399
-rwxr-xr-xsys-fs/lvm2/files/clvmd.rc-2.02.39146
-rw-r--r--sys-fs/lvm2/files/device-mapper.conf-1.02.22-r31
-rw-r--r--sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2147
-rw-r--r--sys-fs/lvm2/files/device-mapper.rc-2.02.95-r2111
-rw-r--r--sys-fs/lvm2/files/dmeventd.initd-2.02.67-r126
-rw-r--r--sys-fs/lvm2/files/dmtab12
-rw-r--r--sys-fs/lvm2/files/lvm-monitoring.initd-2.02.105-r239
-rw-r--r--sys-fs/lvm2/files/lvm-monitoring.initd-2.02.67-r246
-rw-r--r--sys-fs/lvm2/files/lvm.confd-2.02.28-r25
-rw-r--r--sys-fs/lvm2/files/lvm.rc-2.02.105-r297
-rw-r--r--sys-fs/lvm2/files/lvm.rc-2.02.95-r296
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.100-selinux_and_udev_static.patch93
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.106-pthread-pkgconfig.patch32
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.107-static-pkgconfig-libs.patch104
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.108-example.conf.in.patch50
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.108-static-pkgconfig-libs.patch104
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.56-lvm2create_initrd.patch72
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.63-always-make-static-libdm.patch42
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.67-createinitrd.patch18
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.70-asneeded.patch15
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.92-dynamic-static-ldflags.patch63
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.99-example.conf.in.patch47
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.99-locale-muck.patch11
-rw-r--r--sys-fs/lvm2/files/lvm2-fix-stdio-usage.patch111
-rw-r--r--sys-fs/lvm2/files/lvm2-musl-fixes.patch33
-rwxr-xr-xsys-fs/lvm2/files/lvmetad.initd-2.02.105-r213
-rw-r--r--sys-fs/lvm2/lvm2-2.02.110-r99.ebuild275
-rw-r--r--sys-fs/lvm2/metadata.xml24
-rw-r--r--sys-fs/squashfs-tools/Manifest6
-rw-r--r--sys-fs/squashfs-tools/files/squashfs-tools-4.2-missing-includes.patch10
-rw-r--r--sys-fs/squashfs-tools/metadata.xml8
-rw-r--r--sys-fs/squashfs-tools/squashfs-tools-4.2-r99.ebuild59
-rw-r--r--sys-fs/squashfs-tools/squashfs-tools-4.3-r99.ebuild61
-rw-r--r--sys-fs/xfsdump/Manifest6
-rw-r--r--sys-fs/xfsdump/files/xfsdump-3.0.4-no-symlink.patch22
-rw-r--r--sys-fs/xfsdump/files/xfsdump-3.0.5-prompt-overflow.patch14
-rw-r--r--sys-fs/xfsdump/files/xfsdump-3.1.4-compat-musl.patch36
-rw-r--r--sys-fs/xfsdump/metadata.xml5
-rw-r--r--sys-fs/xfsdump/xfsdump-3.1.4-r99.ebuild45
-rw-r--r--sys-fs/xfsprogs/ChangeLog783
-rw-r--r--sys-fs/xfsprogs/Manifest7
-rw-r--r--sys-fs/xfsprogs/files/xfsprogs-3.2.2-add-limits-h.patch10
-rw-r--r--sys-fs/xfsprogs/files/xfsprogs-3.2.2-musl-compat.patch154
-rw-r--r--sys-fs/xfsprogs/files/xfsprogs-3.2.2-sharedlibs.patch108
-rw-r--r--sys-fs/xfsprogs/metadata.xml5
-rw-r--r--sys-fs/xfsprogs/xfsprogs-3.2.2-r99.ebuild100
64 files changed, 3727 insertions, 0 deletions
diff --git a/sys-fs/dosfstools/Manifest b/sys-fs/dosfstools/Manifest
new file mode 100644
index 00000000..1ee4cd46
--- /dev/null
+++ b/sys-fs/dosfstools/Manifest
@@ -0,0 +1,5 @@
+AUX dosfstools-3.0.27-Fix-format-string-in-check.c.patch 886 SHA256 44f80903b89d69d51ec71fb0fb1a1a560c5e795c8c9a3a25e8d84ac81cf423fa SHA512 d278ba4fbf79bfd1490c1f693113da5e047a394b639e3ca29e13e98604dddecf61c860e9dc1a0ef9b84c97c1d467a05d61a9e9e8942d24ca8dfe39e05599bfb4 WHIRLPOOL fa2bd8339a3cab8787ada26ab2df54af5e27c980dd33761aa7d603d115053f8b756ff7252d8168280579d99d5287ae88c6e313c2f92a31c397f3014fb0d17e28
+AUX dosfstools-3.0.28-fix_build_with_musl.patch 815 SHA256 fb8cafac2fc31b726aa5a8a74b29554a6865a6b92fb8aacf01fafc630dcc18bd SHA512 f1bc61db4f28ceb70ec30be007ca1b67616b61ec44c82cb373d83803fa8a075cc051ae77a002ed487764f2623309db6d61b5bbb9a5764d48511feeaf2ef6fb54 WHIRLPOOL 1627ff041848a67f768ec6e706f22c7dded41992499694e073107d5cad745f5c452f2d69ec4e8d3be5d0231152e96fc52a3af088e8a0900ce01cf6d0b65a7409
+DIST dosfstools-3.0.28.tar.xz 82980 SHA256 ee95913044ecf2719b63ea11212917649709a6e53209a72d622135aaa8517ee2 SHA512 7325a9e05f51715b358cab0a8fa8f8096422b470f1a43eecfab2adbb954e1daf6a24003121be5b3a22de5fcb3e3adffbf1551e2158852b6663fd57a109f057ad WHIRLPOOL b584aa1dee4db96c04f19b6ac46b6322c533fcadbafb09546412e4d6a7568e23abe6985389dc446dacbe2d14f36dd7a8b52fc83b93ab1f5864b4b61f14f6ffd0
+EBUILD dosfstools-3.0.28-r99.ebuild 954 SHA256 667f2342d0b8db2b51568a71157988835b7bdf15a21a5ede942332e6617768b4 SHA512 96718cff2640c6279419114e127d4b319858fd62dc9d26392e07011ecc421a5dd7e5161223def86f340af1e47720250e48fd2c7bdf4954ae7ca62fb256aa63f7 WHIRLPOOL df0b1ce733cd5669fb30672abb6487f2eaf08639162f242a16c5031bbec8c78a939e393eeb53dc0054e5d087cf1ca97e9b7fa72169e27aa759138237cce293b2
+MISC metadata.xml 164 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92 SHA512 8eb0d5153d388f6ea069c64b93882244816a0a09aecc0d73cb872121ce0eb24c5ccafa96aad0b620b2300f319e1af101fa7fa6c5d0d561719d49bb07da0a2eca WHIRLPOOL 11a1441bddb7a6c69653c663902b7da5767ae6ad515ac2aabfc42fe37927a1ccc21472deeee454009ff720201a41c3e4a912df42661a0a87150fb46126da2d52
diff --git a/sys-fs/dosfstools/dosfstools-3.0.28-r99.ebuild b/sys-fs/dosfstools/dosfstools-3.0.28-r99.ebuild
new file mode 100644
index 00000000..63dc7c2a
--- /dev/null
+++ b/sys-fs/dosfstools/dosfstools-3.0.28-r99.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/dosfstools/dosfstools-3.0.27.ebuild,v 1.1 2015/04/03 07:05:29 vapier Exp $
+
+EAPI="5"
+
+inherit toolchain-funcs flag-o-matic eutils
+
+DESCRIPTION="DOS filesystem tools - provides mkdosfs, mkfs.msdos, mkfs.vfat"
+HOMEPAGE="http://www.daniel-baumann.ch/software/dosfstools/"
+SRC_URI="https://github.com/dosfstools/dosfstools/releases/download/v${PV}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~mips ~ppc ~x86"
+RESTRICT="test" # there is no test target #239071
+
+src_prepare() {
+ sed -i \
+ -e "/^PREFIX/s:=.*:= ${EPREFIX}/usr:" \
+ -e '/^OPTFLAGS/d' \
+ -e '/^DEBUGFLAGS/d' \
+ -e "/\$(DOCDIR)/s:${PN}:${PF}:" \
+ Makefile || die
+ epatch "${FILESDIR}"/${PN}-3.0.27-Fix-format-string-in-check.c.patch
+ epatch "${FILESDIR}"/${PN}-3.0.28-fix_build_with_musl.patch
+ append-lfs-flags
+ tc-export CC
+}
diff --git a/sys-fs/dosfstools/files/dosfstools-3.0.27-Fix-format-string-in-check.c.patch b/sys-fs/dosfstools/files/dosfstools-3.0.27-Fix-format-string-in-check.c.patch
new file mode 100644
index 00000000..8a5bbb65
--- /dev/null
+++ b/sys-fs/dosfstools/files/dosfstools-3.0.27-Fix-format-string-in-check.c.patch
@@ -0,0 +1,25 @@
+From 04d5d990904df782a7a774827e0c860eac640272 Mon Sep 17 00:00:00 2001
+From: Hinnerk van Bruinehsen <h.v.bruinehsen@fu-berlin.de>
+Date: Thu, 16 Apr 2015 14:19:57 +0000
+Subject: [PATCH 2/2] Fix format string in check.c
+
+---
+ src/check.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/check.c b/src/check.c
+index d8880a8..bb783e5 100644
+--- a/src/check.c
++++ b/src/check.c
+@@ -582,7 +582,7 @@ static int check_file(DOS_FS * fs, DOS_FILE * file)
+ if (!(file->dir_ent.attr & ATTR_DIR) && le32toh(file->dir_ent.size) <=
+ (uint64_t)clusters * fs->cluster_size) {
+ printf
+- ("%s\n File size is %u bytes, cluster chain length is > %lu "
++ ("%s\n File size is %u bytes, cluster chain length is > %llu "
+ "bytes.\n Truncating file to %u bytes.\n", path_name(file),
+ le32toh(file->dir_ent.size),
+ (uint64_t)clusters * fs->cluster_size,
+--
+2.3.5
+
diff --git a/sys-fs/dosfstools/files/dosfstools-3.0.28-fix_build_with_musl.patch b/sys-fs/dosfstools/files/dosfstools-3.0.28-fix_build_with_musl.patch
new file mode 100644
index 00000000..b4953786
--- /dev/null
+++ b/sys-fs/dosfstools/files/dosfstools-3.0.28-fix_build_with_musl.patch
@@ -0,0 +1,25 @@
+diff --git a/Makefile b/Makefile
+index f22a4c5..967defe 100644
+--- a/Makefile
++++ b/Makefile
+@@ -30,7 +30,7 @@ MANDIR = $(PREFIX)/share/man
+ #OPTFLAGS = -O2 -fomit-frame-pointer -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
+ #WARNFLAGS = -Wall -pedantic -std=c99
+ WARNFLAGS = -Wall -Wextra -Wno-sign-compare -Wno-missing-field-initializers -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings
+-CFLAGS += $(OPTFLAGS) $(WARNFLAGS) $(DEBUGFLAGS)
++CFLAGS += $(OPTFLAGS) $(WARNFLAGS) $(DEBUGFLAGS) -D _GNU_SOURCE
+
+ VPATH = src
+
+diff --git a/src/mkfs.fat.c b/src/mkfs.fat.c
+index b38d116..7e6c996 100644
+--- a/src/mkfs.fat.c
++++ b/src/mkfs.fat.c
+@@ -60,6 +60,7 @@
+ #include <sys/ioctl.h>
+ #include <sys/stat.h>
+ #include <sys/time.h>
++#include <sys/types.h>
+ #include <unistd.h>
+ #include <time.h>
+ #include <errno.h>
diff --git a/sys-fs/dosfstools/metadata.xml b/sys-fs/dosfstools/metadata.xml
new file mode 100644
index 00000000..96a2d586
--- /dev/null
+++ b/sys-fs/dosfstools/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+</pkgmetadata>
diff --git a/sys-fs/encfs/Manifest b/sys-fs/encfs/Manifest
new file mode 100644
index 00000000..557338c2
--- /dev/null
+++ b/sys-fs/encfs/Manifest
@@ -0,0 +1,5 @@
+AUX encfs-1.7.4-encfsctl.patch 243 SHA256 ca73c93de560460893cd125bf408f4f5fbf37e6aafb98b1e8d736e8b48aeb0d9 SHA512 c6d2c74ed14e5375c0a19b45a9beb945d3bdfe3f1a02e97d8f5b5d6008b87e5a94305249bf051aa122480df8488d874b2abd1fa35e373d5c415d99af3589050f WHIRLPOOL a77caf91c0d83dc00c9a88abbb93cf4be603a3f94e76c66864172d01ddfbcd28d04df92f5dbea5c581ca8d9143a0f9c5a66fc59ae9c575a34a19c04e985df813
+AUX encfs-1.7.4-r68:69.patch 787 SHA256 33d7019e74bba6b3efdb3594d5fc773804436ea263416c73d60f63e61dd823fe SHA512 9a94af359a12c4b293e26dfe9ca55d43db8e82e1166edc7316ed592d8be5cc41046c0f6a165ca15dc5a7a9204c5d4265a9faf30be27c1d1639969bf22818599a WHIRLPOOL 6ba3741ef6e0918e3ec23e2cfc024e8be02751da06eeaa828c0d6ddb4af11daff5584e64e7bc761e2d877130271ce70071abe6b799f912a72a63f48b8182f65a
+DIST encfs-1.7.4.tgz 931048 SHA256 282ef0f04f2dd7ba3527b45621fab485b7cc510c2ceee116600d0348dc2170a8 SHA512 323db9a9e7b3bc76902e0aefc6cad34974be27586651b21cc3e0550999a6313b997ad06d05a659dd7112a1f499cb60a547837d40f6a1547c9551c28ef765beaf WHIRLPOOL 7eafc12b47d5820fbcbefb45156ed3fe78aadc6d93b6f9f49ca7c5ffe8169dd8d63410d05a9249dba87bc31c0c1c504de29efdef2c89cc5b5404fb5ee5a70914
+EBUILD encfs-1.7.4-r99.ebuild 1051 SHA256 11123fff7dd23e23c424ce85b4b1f1daae9d79e0a5004deca86163df1558447e SHA512 7412cb0d002a0d53108269c2f83e471f87fce70b9e7a9d8a5f215827b8c8f4cf4fcbca3de6688b6453a36899261ed1d8bb8c89dde44b9a1a787a5a51637d637c WHIRLPOOL 821683fb533b7e1be48e8013f986f6532b21c4fbb6a53cf71876d1d58e88dc94231760a37bae19bfc5e165043ec6a12b7ab3c657a0cf3463c87db5484b515a36
+MISC metadata.xml 313 SHA256 abe6b6fece5704f3a514740324c6d3bc9a77959f4a61be0888d3115a5def3bd7 SHA512 a0dca7552f2b432de4b6520ff39688fafb87243b9b3a8458958b2db4669d6a6061628dd4a7e75cd195b357f7220c83b104b9779abfd1f3ff0fd2da86e0c581bc WHIRLPOOL 0ebf3e41f00ea50f329eade3a499a6caace811dba0af84e817a5527270b661d6dd1b6b8a2b468323d40613e688f06b80487c37a583e39341441fc7c34e947833
diff --git a/sys-fs/encfs/encfs-1.7.4-r99.ebuild b/sys-fs/encfs/encfs-1.7.4-r99.ebuild
new file mode 100644
index 00000000..ac968342
--- /dev/null
+++ b/sys-fs/encfs/encfs-1.7.4-r99.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/encfs/encfs-1.7.4.ebuild,v 1.6 2012/10/31 23:14:20 flameeyes Exp $
+
+EAPI=2
+inherit eutils multilib
+
+DESCRIPTION="An implementation of encrypted filesystem in user-space using FUSE"
+HOMEPAGE="http://www.arg0.net/encfs/"
+SRC_URI="http://encfs.googlecode.com/files/${P}.tgz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="xattr"
+
+RDEPEND=">=dev-libs/boost-1.34
+ >=dev-libs/openssl-0.9.7
+ >=dev-libs/rlog-1.4
+ >=sys-fs/fuse-2.7.0
+ sys-libs/zlib"
+DEPEND="${RDEPEND}
+ dev-lang/perl
+ virtual/pkgconfig
+ xattr? ( sys-apps/attr )
+ sys-devel/gettext"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.7.4-r68:69.patch
+ epatch "${FILESDIR}"/${PN}-1.7.4-encfsctl.patch
+}
+
+src_configure() {
+ use xattr || export ac_cv_header_attr_xattr_h=no
+
+ econf \
+ --disable-dependency-tracking
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog README
+ find "${D}" -name '*.la' -delete
+}
diff --git a/sys-fs/encfs/files/encfs-1.7.4-encfsctl.patch b/sys-fs/encfs/files/encfs-1.7.4-encfsctl.patch
new file mode 100644
index 00000000..fe111724
--- /dev/null
+++ b/sys-fs/encfs/files/encfs-1.7.4-encfsctl.patch
@@ -0,0 +1,10 @@
+--- a/encfs-1.7.4/encfs/encfsctl.cpp
++++ b/encfs-1.7.4/encfs/encfsctl.cpp
+@@ -38,6 +38,7 @@
+ #include <getopt.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <limits.h>
+ #include <fcntl.h>
+ #ifdef __FreeBSD__
+ #include <libintl.h>
diff --git a/sys-fs/encfs/files/encfs-1.7.4-r68:69.patch b/sys-fs/encfs/files/encfs-1.7.4-r68:69.patch
new file mode 100644
index 00000000..0c27095f
--- /dev/null
+++ b/sys-fs/encfs/files/encfs-1.7.4-r68:69.patch
@@ -0,0 +1,31 @@
+Index: encfs/base64.cpp
+===================================================================
+--- encfs/base64.cpp (revision 68)
++++ encfs/base64.cpp (revision 69)
+@@ -80,7 +80,7 @@
+ }
+
+ // we have at least one value that can be output
+- char outVal = work & mask;
++ unsigned char outVal = work & mask;
+ work >>= dst2Pow;
+ workBits -= dst2Pow;
+
+@@ -96,8 +96,15 @@
+ *outLoc++ = outVal;
+
+ // we could have a partial value left in the work buffer..
+- if(workBits && outputPartialLastByte)
+- *outLoc = work & mask;
++ if(outputPartialLastByte)
++ {
++ while(workBits > 0)
++ {
++ *outLoc++ = work & mask;
++ work >>= dst2Pow;
++ workBits -= dst2Pow;
++ }
++ }
+ }
+ }
+
diff --git a/sys-fs/encfs/metadata.xml b/sys-fs/encfs/metadata.xml
new file mode 100644
index 00000000..3693a6a8
--- /dev/null
+++ b/sys-fs/encfs/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="google-code">encfs</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-fs/fuse/Manifest b/sys-fs/fuse/Manifest
new file mode 100644
index 00000000..e73491bd
--- /dev/null
+++ b/sys-fs/fuse/Manifest
@@ -0,0 +1,6 @@
+AUX fuse-2.9.3-includes.patch 1771 SHA256 7aa45538344fb6eadc8bfaeaf04e397efd18a653d0cd3fe1266d6741f18f7dea SHA512 c15cce6095278148f45f3117575a05248e8e7074473273def7d8556f12cb04038c661300ff1fc040b0fd95a65cf03b1e0e47fcde3b5763752039aa0ecb5be27a WHIRLPOOL 7216deebc38df2dd8929bed364ad72a33084780b879d05c275c7b56f86f6eefb19defcd2bf547494ebdf599958f36d0a42ccd41ea992476acc10f22315ac9407
+AUX fuse-fbsd.init 467 SHA256 d896a80d67668246f586c6283f95f624fdbecb306408bec6f2c944601aae7273 SHA512 4d8ce71d9a025a52e8f1d7074f83fdc368fbdd4bdf65bccfdbdce214580d4051c20bdde7f61725d14c585db1dbbe0781cee2a0c73a857f1340a5b57ee920649e WHIRLPOOL 3cb757a5de22b36c6e638c612a99cad43edeac86e37a9590a3635d550ee12f404ea54734c69a7f139c1c1089d2446b37a6387f1aa264651000d50942f4a97047
+AUX fuse.init 756 SHA256 22a22c914d2a4f0fb5fc8495f4b7efcd1819efde548c9033ca612c181cd29eda SHA512 3d2765114081c8f6720ed25d7b7da4f6da5fbbb5b35760bb0a760f0bf2482abacabec63c1488d4e8cbe4f78875574607e6e46508dfe22df0869f4d2e1e91e607 WHIRLPOOL 2932da7d97b7418b5ead6c71f9e583b6ec1b47c86e763577312fd55492482c0c31677a78534301c7b541d476ee16b0eb2da981eb6723c1fdc9af338ce10c243c
+DIST fuse-2.9.3.tar.gz 572044 SHA256 0beb83eaf2c5e50730fc553406ef124d77bc02c64854631bdfc86bfd6437391c SHA512 03f43f88694ec7e039ff3579a8e76349b5a5a05872c55901fc1d9ee53dbb6b1e69f6dd0005b620f3b5ead0b14da8eeb31d46b922d10f88f4e3f830aa47e8162c WHIRLPOOL 739562e48e85326049dac0ef06653e5e6574a01dd60649e23ddc0990ea6c1979e6ce952a1e84d0776b706fbcad79eb0e1328aa35f70ba4881db9a4482d254a04
+EBUILD fuse-2.9.3-r99.ebuild 2213 SHA256 30cb8fcf62efc23e0103237920a2f17dc15b0532b9d27339aa168ce25eb0e78c SHA512 5637dd9bc6b6822aa4731e2abd21333b4574edd215183272a8b9879763b92c9e65111191b6202d1e723cad0ea636e694cc6939c92eea6f4f0f3c081ce7eaba55 WHIRLPOOL 1687f495902fa1c4aa0162edb8eca658cc0d7d30fd723a04a186187d5884a58b3721cd7dd00e7b55c7d95c347855462e3f5af65c1b21598a3dc27d4f17adeb44
+MISC metadata.xml 248 SHA256 32abf15e7c6c5b1d79352aff76413358aea37ae781534cee099c03723de657bc SHA512 b820a6d68eb09f0c3eda90fd7ed53d21afc40eb3daef875542f711b8064a5c7fc78f06462a5aa6a9a7e7d71bd82225ecaee627eb599b5c5fd563d2599cf78974 WHIRLPOOL 9187ff09bb4d8f155befdf23e5ec86740069de083eb920122ed18702a1f3a83ad9aa2e9adacd307940c9455d3b346853726f750e350be0f4f644b898e9dc3c21
diff --git a/sys-fs/fuse/files/fuse-2.9.3-includes.patch b/sys-fs/fuse/files/fuse-2.9.3-includes.patch
new file mode 100644
index 00000000..db293776
--- /dev/null
+++ b/sys-fs/fuse/files/fuse-2.9.3-includes.patch
@@ -0,0 +1,66 @@
+diff -ur a/fuse-2.9.3/lib/fuse.c b/fuse-2.9.3/lib/fuse.c
+--- a/fuse-2.9.3/lib/fuse.c
++++ b/fuse-2.9.3/lib/fuse.c
+@@ -33,6 +33,7 @@
+ #include <dlfcn.h>
+ #include <assert.h>
+ #include <poll.h>
++#include <sys/file.h>
+ #include <sys/param.h>
+ #include <sys/uio.h>
+ #include <sys/time.h>
+diff -ur a/fuse-2.9.3/lib/fuse_lowlevel.c b/fuse-2.9.3/lib/fuse_lowlevel.c
+--- a/fuse-2.9.3/lib/fuse_lowlevel.c
++++ b/fuse-2.9.3/lib/fuse_lowlevel.c
+@@ -24,6 +24,7 @@
+ #include <limits.h>
+ #include <errno.h>
+ #include <assert.h>
++#include <sys/file.h>
+
+ #ifndef F_LINUX_SPECIFIC_BASE
+ #define F_LINUX_SPECIFIC_BASE 1024
+diff -ur a/fuse-2.9.3/lib/mount.c b/fuse-2.9.3/lib/mount.c
+--- a/fuse-2.9.3/lib/mount.c
++++ b/fuse-2.9.3/lib/mount.c
+@@ -20,6 +20,7 @@
+ #include <string.h>
+ #include <fcntl.h>
+ #include <errno.h>
++#include <paths.h>
+ #include <sys/poll.h>
+ #include <sys/socket.h>
+ #include <sys/un.h>
+diff -ur a/fuse-2.9.3/lib/mount_util.c b/fuse-2.9.3/lib/mount_util.c
+--- a/fuse-2.9.3/lib/mount_util.c
++++ b/fuse-2.9.3/lib/mount_util.c
+@@ -16,6 +16,7 @@
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <limits.h>
++#include <paths.h>
+ #ifndef __NetBSD__
+ #include <mntent.h>
+ #endif
+diff -ur a/fuse-2.9.3/util/fusermount.c b/fuse-2.9.3/util/fusermount.c
+--- a/fuse-2.9.3/util/fusermount.c
++++ b/fuse-2.9.3/util/fusermount.c
+@@ -19,6 +19,7 @@
+ #include <getopt.h>
+ #include <errno.h>
+ #include <fcntl.h>
++#include <paths.h>
+ #include <pwd.h>
+ #include <mntent.h>
+ #include <sys/wait.h>
+diff -ur a/fuse-2.9.3/util/mount_util.c b/fuse-2.9.3/util/mount_util.c
+--- a/fuse-2.9.3/util/mount_util.c
++++ b/fuse-2.9.3/util/mount_util.c
+@@ -16,6 +16,7 @@
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <limits.h>
++#include <paths.h>
+ #ifndef __NetBSD__
+ #include <mntent.h>
+ #endif
diff --git a/sys-fs/fuse/files/fuse-fbsd.init b/sys-fs/fuse/files/fuse-fbsd.init
new file mode 100644
index 00000000..19b8400e
--- /dev/null
+++ b/sys-fs/fuse/files/fuse-fbsd.init
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need localmount
+}
+
+start() {
+ ebegin "Starting fuse"
+ if ! kldstat -q -m fuse; then
+ kldload fuse >/dev/null 2>&1 || eerror $? "Error loading fuse module"
+ fi
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping fuse"
+ if kldstat -q -m fuse; then
+ kldunload fuse >/dev/null 2>&1 || eerror $? "Error unloading fuse module"
+ fi
+ eend ${?}
+}
diff --git a/sys-fs/fuse/files/fuse.init b/sys-fs/fuse/files/fuse.init
new file mode 100644
index 00000000..30b512e8
--- /dev/null
+++ b/sys-fs/fuse/files/fuse.init
@@ -0,0 +1,35 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+MOUNTPOINT=/sys/fs/fuse/connections
+
+depend() {
+ need localmount
+}
+
+start() {
+
+ ebegin "Starting fuse"
+ if ! grep -qw fuse /proc/filesystems; then
+ modprobe fuse >/dev/null 2>&1 || eerror $? "Error loading fuse module"
+ fi
+ if grep -qw fusectl /proc/filesystems && \
+ ! grep -qw $MOUNTPOINT /proc/mounts; then
+ mount -t fusectl none $MOUNTPOINT >/dev/null 2>&1 || \
+ eerror $? "Error mounting control filesystem"
+ fi
+ eend ${?}
+
+}
+
+stop() {
+
+ ebegin "Stopping fuse"
+ if grep -qw $MOUNTPOINT /proc/mounts; then
+ umount $MOUNTPOINT >/dev/null 2>&1 || \
+ eerror $? "Error unmounting control filesystem"
+ fi
+ eend ${?}
+
+}
diff --git a/sys-fs/fuse/fuse-2.9.3-r99.ebuild b/sys-fs/fuse/fuse-2.9.3-r99.ebuild
new file mode 100644
index 00000000..11cacff7
--- /dev/null
+++ b/sys-fs/fuse/fuse-2.9.3-r99.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/fuse/fuse-2.9.3.ebuild,v 1.11 2014/01/18 19:54:53 ago Exp $
+
+EAPI=5
+inherit eutils libtool linux-info udev toolchain-funcs
+
+MY_P=${P/_/-}
+DESCRIPTION="An interface for filesystems implemented in userspace."
+HOMEPAGE="http://fuse.sourceforge.net"
+SRC_URI="mirror://sourceforge/fuse/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm ~mips ppc x86"
+IUSE="examples kernel_linux kernel_FreeBSD static-libs"
+
+PDEPEND="kernel_FreeBSD? ( sys-fs/fuse4bsd )"
+DEPEND="virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ if use kernel_linux ; then
+ if kernel_is lt 2 6 9 ; then
+ die "Your kernel is too old."
+ fi
+ CONFIG_CHECK="~FUSE_FS"
+ FUSE_FS_WARNING="You need to have FUSE module built to use user-mode utils"
+ linux-info_pkg_setup
+ fi
+}
+
+src_prepare() {
+ # sandbox violation with mtab writability wrt #438250
+ # don't sed configure.in without eautoreconf because of maintainer mode
+ sed -i 's:umount --fake:true --fake:' configure || die
+ epatch "${FILESDIR}"/${PN}-2.9.3-includes.patch
+ elibtoolize
+}
+
+src_configure() {
+ econf \
+ INIT_D_PATH="${EPREFIX}/etc/init.d" \
+ MOUNT_FUSE_PATH="${EPREFIX}/sbin" \
+ UDEV_RULES_PATH="${EPREFIX}/$(get_udevdir)/rules.d" \
+ $(use_enable static-libs static) \
+ --disable-example
+}
+
+src_install() {
+ default
+
+ dodoc AUTHORS ChangeLog Filesystems README \
+ README.NFS NEWS doc/how-fuse-works \
+ doc/kernel.txt FAQ
+
+ if use examples ; then
+ docinto examples
+ dodoc example/*
+ fi
+
+ if use kernel_linux ; then
+ newinitd "${FILESDIR}"/fuse.init fuse
+ elif use kernel_FreeBSD ; then
+ insinto /usr/include/fuse
+ doins include/fuse_kernel.h
+ newinitd "${FILESDIR}"/fuse-fbsd.init fuse
+ else
+ die "We don't know what init code install for your kernel, please file a bug."
+ fi
+
+ prune_libtool_files
+ rm -rf "${D}"/dev
+
+ dodir /etc
+ cat > "${ED}"/etc/fuse.conf <<-EOF
+ # Set the maximum number of FUSE mounts allowed to non-root users.
+ # The default is 1000.
+ #
+ #mount_max = 1000
+
+ # Allow non-root users to specify the 'allow_other' or 'allow_root'
+ # mount options.
+ #
+ #user_allow_other
+ EOF
+}
diff --git a/sys-fs/fuse/metadata.xml b/sys-fs/fuse/metadata.xml
new file mode 100644
index 00000000..5cb3fdef
--- /dev/null
+++ b/sys-fs/fuse/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>kernel-misc</herd>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:fuse:fuse</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest
new file mode 100644
index 00000000..0ff3eda7
--- /dev/null
+++ b/sys-fs/lvm2/Manifest
@@ -0,0 +1,30 @@
+AUX clvmd.confd-2.02.39 213 SHA256 68442d5c9da81bad79fa6b1beaede290f24ea6a4e4415f3d9f4e37ccca6c524a SHA512 9614c4188c9a5bcf398d1f521b52d7e2281fcdf76265fdaca4acda22be282d8468e82b54a2661d5753f4b9a442ebe93a60daf87c846db4e275a283f71c9fd8e2 WHIRLPOOL b429d06a5200d37f46e72190060bc2fe866575ba441b5f92d12d939bdc5d411ef37e895a7369bbaaf733b1a0d0305a05d499c7ae6c7360fe8767e902d2a3bfc4
+AUX clvmd.rc-2.02.39 3684 SHA256 476289b24539eeff4ff94c34c129da755d8cff11f1e950b40f9fad212ca5c05d SHA512 18879fa7925d6181b9ebfd7a6379ee4f25c9c83474ba69684e63811867754b1c52dd6568324aafd9fe391fd2fd4aadf931870cefc21b72d2f81f9e04ef123f41 WHIRLPOOL 095a313a6c66f0dec1d42233dd1853879ade6334c474ac747c2cd87c24b433381547a6fdecedf784db060549ece8dc24870d4981bcf590bf39e57dd7bad92120
+AUX device-mapper.conf-1.02.22-r3 15 SHA256 57777904f12a35617e5a4193c964ebb32396452487fd02353e71e16e7b46bc22 SHA512 1846e0ca1be7170d4c0beb694a23aea4d19b24b99a248bb0f4e034286a6beede0a8efc474b0c237e33ee72c86c93b6238f2d5ea23e224765acba99c90633261e WHIRLPOOL a0de185e849cd4d1aab9f145a6330f267ca547ba4ec7720be6f33e2c3c4c182b8674ea220b894f0fc806fe6637ba7bcabd739ca57b53b3efa5fad0cf1e57ba2e
+AUX device-mapper.rc-2.02.105-r2 3828 SHA256 036b6de05e6cbd921a667d6fc6b01d30c8f9b720e1a0d0e2453ecd62d32573fb SHA512 aa5c73a91a85069782384ab9ecec299d9f036ed8c069ebef66bbedfa9d9ce7c63baa70692148cf4f1b06d6b4e53fc1916ae576ecc005323154a25a686bef33fd WHIRLPOOL bebba4faf498d400c68b8e79a64c90f0b71a3df350895ea4b78efb802600f4179ec0b7507be7ca61bd7444ca8d5c8f8156112a2fa3083e51a6fe8f552db583ba
+AUX device-mapper.rc-2.02.95-r2 2765 SHA256 e0bff689040746480e2479d1ad57adb5ab23cc0415ab9a8356503aed7a14c658 SHA512 f6e653c6af92debe543bcb48ee36c2bfa0f1ad08d2dfe40455cf9d3b104a1f825a295b43de2a5fa64367c6c2eadb2b36004c7cf51fd3b15191ea6be21d0c5a4f WHIRLPOOL 298548daebf413ea8739c979c23b9ea7cfbcf12437debb8ce7d570b6a8269fbcd4d7b27816734f3728e2d591ef9658a4f4bb0c43299dbf408aeac10ef87e5bf0
+AUX dmeventd.initd-2.02.67-r1 683 SHA256 0c051388991ba69afbf2f6baf36ba227d7c26fc8f0d7588d8de76d9a74886d79 SHA512 523b54d63592c500394243632f4ed60838d04a8c386a85bb2a0fda6f756607467ec025c1490104d8c73035e37646eeea55dcafd3f05eab85e035bbedcebf0406 WHIRLPOOL 5dcf777e9c736eb4101649e5b0bbb43016c3b7ece77c1bb8afdda63b23b15a37257cdd29c05f82b0ae4f98405067c85a9a6ee8a35d98c4b5fb647ed015c11da7
+AUX dmtab 416 SHA256 e2e22bbe13fb97ec9a68659daa275b1d22fd0a3fd21e76b1f4bfba504a8bd7b5 SHA512 392b4bd85745bc774245195a1c416ae68efbe5f7b2498f6bfc40021cd2c9f6372fd1c3d346198c7749635b5d9b3f66ba1b963a2e144b4f522d87016ab4777de2 WHIRLPOOL f48c0fda382c7d57bad2ad4a8155189735236d13f24f39b3969736c3ad54d28f92c82174cae5c6775f8bc58506f19025f2cba6433f389c84505552fc8b4d3ed4
+AUX lvm-monitoring.initd-2.02.105-r2 1088 SHA256 d7655cadd3a3a9d3683a540413365310ca9503c38fd21a9bfccec40630ca72f1 SHA512 3c3f7ec1868e3634be3bb82689d30065dbe0fac3e2dfa22a14acb76c82b102022c280f995f82a1f7c91c905c0ba961bbb2707ddf60ad5fa9d717acdf942855d5 WHIRLPOOL 92e7eedf6add5cba645f74281912713928f694f18155db222352ba8e4a70ac89696f9db3cc2c9fc79fb9ff0f98cb176da8aedb1c5b7b47eecd4ee36360df41f0
+AUX lvm-monitoring.initd-2.02.67-r2 1183 SHA256 b89971a4f163e1a91df2416ff442cae7209f8343e6c8612eb3174ed8f5c5c788 SHA512 e99d8e0ed2f22e8f3f1e36581ce92bc2196dbebdeb7c301070c5f2e78079804de3ac782c732929e23a3a01536a270236513c849ec1574ff4c72045b8f69c98ed WHIRLPOOL 71eb7d1203bc2b6be22ebb0eb20e3d2e0786036bea9f0beda91c517f47b99374b52ca4c7d5cd76ae6338ddab187b68a7a371a437e5501996454e125e12e998a8
+AUX lvm.confd-2.02.28-r2 173 SHA256 28370c089c39c248d7ded0960b8d8a9256bada44d44c22ce3cec87d512ef6844 SHA512 67b153cbc5c2327c15f042b3b5590c1d8fdf9823efb19c80192ac4dcf98e530efea8ecae0aaaa4a54b0e3e4907565aa21455b364df1dbe8f2e7dffa1c5d355d0 WHIRLPOOL 06467b28ad2acf36984eef1b7b7e3d88277505760f848a808d85820cd1cccf6bb7397c00624d36961d9bdbb994e55de03444a7cfc97ecefd9bd3b785a3c6fdbf
+AUX lvm.rc-2.02.105-r2 3071 SHA256 a5754ffa0a05a0c29a9f6b5acf1b21dd313581fd6156c1ef722dc620e0114676 SHA512 9dd321b6d76628376b324de1ff47c4a37b98d3bf406abbf1b1755e20d957a9f1d77ff2e50a99b0c77ca8200800cd6071da5ab83c2f5afb9ff97f31e75671a617 WHIRLPOOL 6ba25a5152bf6f5052481e6ad2b1dc3ea65a818d11bff49e9688f537245c471f5446d4b8d381dba69ab8ece8f16340220f4c8173be096c7cb3d7c4c7fd10cebd
+AUX lvm.rc-2.02.95-r2 3001 SHA256 66844a70cedf61b2cd3373cdbd8f8c1afa817bde0764fdf5cf488857532d4553 SHA512 e5d34447db2fc050256222eff427703341b839a80c833c8ca2a814663b790bdffad967fa41bda8c182d5217dda629057a571520cb0a2e4cb06d5a8a241746ea3 WHIRLPOOL 102baf82bd5573ce90bdb19307ccf71026b6e03fd9e471a123f17072e0ac3785ecf017bb2cd81adf7a5332f33b42330e7c484c8804ed57d4ad6fb1cdd4c119f7
+AUX lvm2-2.02.100-selinux_and_udev_static.patch 3223 SHA256 15c20b1e16443932c560164ad9546ab01279601b0f0dd7fdc54f9cf3cd3ffee3 SHA512 232dc2908073254e23878098734cc65449c7be0707f7f0f7e73561e7b204bf71cf75ff5ee143b0f9f301ddabac1595c59cb0ec80c665464e8fe3f1b65a3eb0c2 WHIRLPOOL fdd908aa01cc3790be4ff8e7b2180cd526065c826657924edfccdc53f5c2266a12911c1ebface9de649b1974ff77401e94a64de507b5c72415614e5726dd4a2a
+AUX lvm2-2.02.106-pthread-pkgconfig.patch 860 SHA256 aaf04bdb140cbedebe731a04846cbb7459cdd002ee4616a3d0725136edb5ef02 SHA512 ae073936ee15fdeabde4d3948a65f6a435b82e62aa0ddadbad399b69bd5c9bfc181d5e0be1beae9f6e899a6e8b9d7c21add13f7a1606cb5ed4762ed5aa5aa223 WHIRLPOOL 9e822f0f1c7c67b5443fb9e62547a1893d8c91f91d63f03c9f4b3d9a20cd24c377f5697f2fe24028f10949550af6f2a05d95db6d5e29700dfaa05f1c3d615773
+AUX lvm2-2.02.107-static-pkgconfig-libs.patch 3607 SHA256 b3efe76e670fd45e363c62bc8a9965eff4bb1c12e98b6eebdf3b8690de24ddca SHA512 6cd6bbe2ff2dbbe012c20043f3b31e42cacc3379838358c58891ec8ce9593ced29a14fbb9e96b9c76e1b245c5aec2e38a26d3a599c78ff18c3d920e89f1d2f72 WHIRLPOOL 4acf0777694df20886b4e6bf06c91a86041f6e4d888c49dc26f582cd6220504550f54ea5d94c220a3a16b4768933e45e901f274dfaf616083db741aab81b612b
+AUX lvm2-2.02.108-example.conf.in.patch 1681 SHA256 c9e0b46965f68c25495e21ca9504699031ed88dbb69407a08d53569ddc88ae4c SHA512 b4e983892b7ff47e5e7617376197daa62cfd063cf398235dc4a436fd9025ec4b1e263d7418e2c2943d53be494cba4209e9d4230d54a78762b0ca526f92e9746c WHIRLPOOL 0fc73d8e6f47596fa1789118aefebf931fb217342259da838d701bdeb96f21d7de59f29ac81c3c0f4a00db711e86b9fac6b4c889cf05ffc90ad8fd5a9ef77cd1
+AUX lvm2-2.02.108-static-pkgconfig-libs.patch 3302 SHA256 5cbdb4c4db1a77767a8cf3a89490eb0e21a2d4cc7729a8ffb099e4d0746e2775 SHA512 246f1029f9346d6bc57c2062c8a223535d0b832fa6bd86947b8b91b094dbc388706a9914f9ca0531666f77e73544612e2819335435b7576b4e91cdb1b0e4f041 WHIRLPOOL 53e723bdcfe07f668abf6fe9e6093ae38d81b01bd10ade0b40a037d44c367a6945ed86d14d70c2af8af6e7063763fd3620591b5c7384bd255b98cceb7ee192f3
+AUX lvm2-2.02.56-lvm2create_initrd.patch 2032 SHA256 b892d0544e05350e78ea400c16e6fd3657671d9bdf50bfae70505fd79bdda081 SHA512 b2a1705fa6b962027ebc5047583547489afe8ef8d8977c6284a28d0a8b0e05e20e6c48bd6c02a8bb02de9cfb40ac2d6e2a4b8ed8ef8c4ae7b6ea9a29bc4194de WHIRLPOOL cb533df528be0aae4bf50966285ef7a238f810d955ee86d5b446f43944d093732eff6ef8178d1654c4a2c075049ffc11994a99de6291bab1140cb8812be8b8a0
+AUX lvm2-2.02.63-always-make-static-libdm.patch 1420 SHA256 1c498b5efce77ed16bbbfcd9e0ec6da404a9c70c7ad0959ed7b60733adfcfc21 SHA512 67735af9e51369d5b3b400cab4f9ffa25f8dea1c1ec3d01855cb3c5aeade5c39a35eeed43f3a665204fe6bbba4ca43baecd845330bf26d023064b94ca3d1317c WHIRLPOOL f273c893acedfd658e7947abb5f4b528f15de9808ae3862ec8a9189ba7de4ea6998dc67dbc7af642ca3a27bba2ef8eabfd48337f532145f88500988f564313b1
+AUX lvm2-2.02.67-createinitrd.patch 660 SHA256 d59f5642fff9d9575227bfd0b3d103d928a6f7b08b417d6c458704171f11da39 SHA512 17fbba5d34ece5c1c25ef35fa3bbc3d6fcd20b44bd766c049bbc120853a8d60c9544db5790645a7814db5c272fd12d383699a8a9be6f4e9c56a7c0a1bb29ade2 WHIRLPOOL b358a31a9ee669a4fccf42280da5342c214932bfd83deee92d41351eb37dc6c0b2e5dc7419f2304128b5d285fed92db5b2e1634a71bbf1310d36b54d1a353bb0
+AUX lvm2-2.02.70-asneeded.patch 326 SHA256 b0f84dadc213a9daaa97ae7815f624f0bcdc883d627659c7fcf8b7131538b43e SHA512 e38d8ef5d13c8861f7d1ca5c16271b3da138e8747ba01442de3f55aab45265fdaf42513e596f5af1d024fa2cf0c959bd3e47da52bbe8b13c75e665dd95f81279 WHIRLPOOL 77143f2dafeca221f8b3cda4df1669111de44a4ae4916d9aa2228aa76d94b4d1c556cf90a6f90cae2f1938f7474fb678ec6eab1b4e57f7fd20eab473de667cda
+AUX lvm2-2.02.92-dynamic-static-ldflags.patch 3031 SHA256 90b880572186d4d1abf049d39e5f11e4cfedb3707c29eeb9740ceccdb3b62468 SHA512 edb78081d12bebaccd31c2474cb531563b729f1ad966afaff7892556177ee7a68217cc699c65383318066139ba62183adc8334f46f8f8933d62b6b5dcd11a023 WHIRLPOOL 6880a29dfb6747f167c41506e1472c0d48ef7af3a545238c733949f85f3f8f36110fb6908c6f626260f7ed975e56a4e8ccf42ece4d758fa3570154cbe970f2a3
+AUX lvm2-2.02.99-example.conf.in.patch 1489 SHA256 55273a2bc6df33057f4efdd947b75f0282a7993acd5e57f0019f8ca57ca7df38 SHA512 0c92a0e454505219653500d4fb2ee57626bb30375782be941bda17d7b841cb05eeebb87bfc4f7aa397b26fb4908bcbd0f69d2c07e63bf4f070756a1894851869 WHIRLPOOL 3f6c94dd63fcf5e2d1406aa074aee27997fa6d58da3db9d22281b3080ec36277bc5225c3b62f042b38f5d0870fb1e3e19433f218f01e03323c7ad1210d45d4b3
+AUX lvm2-2.02.99-locale-muck.patch 395 SHA256 14e7c65fd9aa71b7f09cc1aecfaccb3048dbb09dd4eb4c342556708aa6adba77 SHA512 4014abbaeb1106dbaa360e2573340651adc0cccc6c0c05cc57695e74e7a3d0b5a73e2b72242bab0d0a10c2506a7c30c2a4de0275c0f81a14dfb068ec91492497 WHIRLPOOL 3383e94ca4dbaefd2c628d3a95b17a14602481c98425caf48f490185289eb3f1af2ef234ff5b5c431ea4624edd8e48764252bdf5b7159ab3bbbad699c3f936ab
+AUX lvm2-fix-stdio-usage.patch 3666 SHA256 79c5379cbf660f8dabd45359463c77a40b5a83153b54c67ce36049260dac9071 SHA512 c4d55b366a60926baadf431dd382012eb808490c0bb514e01503d526cfd7ae573efa2d60a92bd5f6f451b54b11fb5cf827f45cec35cfcdee6aa291674cc776dd WHIRLPOOL 48be6a1205c2293fda51bb8b103db0eebe4b28794a6983c910e5761bb50712da4552eb339a485258f0f79032e10aa7589f65411de282f83ab910881c52a356ed
+AUX lvm2-musl-fixes.patch 1537 SHA256 6516f64faeccaf87641f7c29823344baea0f3af9ac14701e98fa768cbccb703d SHA512 87bd64a0c7525cbf5d49f1fbdd4a86f23bade065362580a1f2ef3b73b5e76e865e620800c922aa6819ace78daf3d4e2ce96b7990c63dcdbf504d03e636d26c00 WHIRLPOOL 9aeabec1f8b0e3487cad583e359c729b5c45ecbc426b48c19260d1f3a8e377fe5e8f09297d893dc2588b9ee11537148558a372c029ac84c02282011cc07440fe
+AUX lvmetad.initd-2.02.105-r2 405 SHA256 60accb4b6114753232f2db0adf3fc3f46d4459bfedf79b888801a13c55d79fa9 SHA512 d9c6f6c68a83b8f391ded7ebe900009a61ff06e92eb68ccb3dcdc8f41e61bbcdf47246e523ea8cfd6e71790376b316b219d4afaf66cf11477e2b54d526b74998 WHIRLPOOL d959d8c8b5f4ef84c26f8e585fe1761ef9bfd37f590e783e937679a863982e7cc4a4e320c3e2e3bd635dbd3486c15baf7c24e1a21325521f4320e643a57fb0e7
+DIST LVM2.2.02.110.tgz 1487448 SHA256 3dad1aa04a71b8420b15f44c53f041001436539d3f8073490c2d0c52f6fecd11 SHA512 5b4dfa5ed877d34efa5b109dc712e8fa9154b4954b267b0243f1925f9d2fa8c67f4ce8da36a85f3bba6c117f6153fdbf150e3753587ab90584a86d2654dc0812 WHIRLPOOL ea221ed3e9d3f79009d7c341a7a75b52eacc5be79e28f2498e7cdc0f4a97c2bebff405b032eb8086d3b5b5aaf79da2f281c5734562355bddbe6004058e114ced
+EBUILD lvm2-2.02.110-r99.ebuild 9477 SHA256 0005f0d2e3c85c7d00648fd7c56526564fc6cabcfd17fbfe495035a2de0024cf SHA512 e170af6ee4b8b9b1ac31ae67abe04736e36d1e0550f4f4689665fa895b77879d5ec23621e9afdc3c9e74d3ac691ca999968f2379744694c8ada021d67bae935c WHIRLPOOL 58549bf7414360770fff8050ce777c1af382333be2700f8206eb9bec0a413750579d7815c7e8bd15cc0306106eb17105d5230c4423ee6a413d6beb7aaeddeaaf
+MISC metadata.xml 995 SHA256 a2be36b695dab8ef65772af8d808cdc7a5c5855e2c9104060e7232e21b984216 SHA512 642abe2a196ffeaf3a67530befa8dc123f1e3e1238bf55d38c0affea82ab5b2f9e56da6b303410845c625494a59323ac8570f40e0f8a406db76295059958361a WHIRLPOOL cba3a6dd12fafc4719050082ee740d03ef0ed68e074b556a0c1f15f4a7b328d9b826d2b7ab3d3f19546de92e907a3fd466792db67423cb8630d5313154d5b6f2
diff --git a/sys-fs/lvm2/files/clvmd.confd-2.02.39 b/sys-fs/lvm2/files/clvmd.confd-2.02.39
new file mode 100644
index 00000000..57821709
--- /dev/null
+++ b/sys-fs/lvm2/files/clvmd.confd-2.02.39
@@ -0,0 +1,9 @@
+# CLVMD_CLUSTER_TIMEOUT -- amount of time to wait for cluster quorum.
+
+CLVMD_CLUSTER_TIMEOUT=30
+
+
+# CLVMD_NODES_TIMEOUT -- amount of time to wait for the other nodes to
+# join the cluster.
+
+CLVMD_NODES_TIMEOUT=60
diff --git a/sys-fs/lvm2/files/clvmd.rc-2.02.39 b/sys-fs/lvm2/files/clvmd.rc-2.02.39
new file mode 100755
index 00000000..96476236
--- /dev/null
+++ b/sys-fs/lvm2/files/clvmd.rc-2.02.39
@@ -0,0 +1,146 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/files/clvmd.rc-2.02.39,v 1.3 2013/04/09 11:00:26 ssuominen Exp $
+
+[ -x /usr/sbin/clvmd ] && CLVMD_BIN="/usr/sbin/clvmd" || CLVMD_BIN="/sbin/clvmd"
+
+[ -z "$CLVMD_CLUSTER_TIMEOUT" ] && CLVMD_CLUSTER_TIMEOUT=30
+[ -n "$CLVMD_NODES_TIMEOUT" ] || CLVMD_NODES_TIMEOUT=60
+
+VGCHANGE="/sbin/vgchange"
+VGSCAN="/sbin/vgscan"
+VGDISPLAY="/sbin/vgdisplay"
+CLVMD_PIDFILE="/var/run/clvmd.pid"
+
+depend() {
+ use net dns logger dmeventd
+ need cman
+}
+
+load_modules() {
+ local module modules
+ modules=$1
+
+ for module in ${modules}; do
+ ebegin "Loading ${module} kernel module"
+ modprobe ${module}
+ eend $? "Failed to load ${module} kernel module"
+ done
+}
+
+unload_modules() {
+ local module modules
+ modules=$1
+
+ for module in ${modules}; do
+ ebegin "Unloading ${module} kernel module"
+ modprobe -r ${module}
+ eend $? "Failed to unload ${module} kernel module"
+ done
+}
+
+umount_gfs_filesystems() {
+ local sig retry
+ local remaining="$(awk '$3 == "gfs" { print $2 }' /proc/mounts | sort -r)"
+
+ if [ -n "${remaining}" ]
+ then
+ sig=
+ retry=3
+ while [ -n "${remaining}" -a "${retry}" -gt 0 ]
+ do
+ if [ "${retry}" -lt 3 ]
+ then
+ ebegin "Unmounting GFS filesystems (retry)"
+ umount ${remaining} &>/dev/null
+ eend $? "Failed to unmount GFS filesystems this retry"
+ else
+ ebegin "Unmounting GFS filesystems"
+ umount ${remaining} &>/dev/null
+ eend $? "Failed to unmount GFS filesystems"
+ fi
+ remaining="$(awk '$3 == "gfs" { print $2 }' /proc/mounts | sort -r)"
+ [ -z "${remaining}" ] && break
+ /bin/fuser -k -m ${sig} ${remaining} &>/dev/null
+ sleep 5
+ retry=$((${retry} -1))
+ sig=-9
+ done
+ fi
+}
+
+
+start_volumes() {
+ ebegin "Scanning LVM volumes"
+ $VGSCAN > /dev/null 2>&1
+ eend $?
+
+ ret=$?
+ if [ "$ret" -eq 5 ]
+ then
+ einfo " Waiting for other nodes to join the cluster ($CLVMD_NODES_TIMEOUT seconds)"
+ fi
+
+ clustervgs=`$VGDISPLAY 2> /dev/null | awk 'BEGIN {RS="VG Name"} {if (/Clustered/) print $1;}'`
+ for vg in $clustervgs; do
+ ebegin " Activating Clustered VG: ${vg} "
+
+ wait=0
+ while [ -n "$($VGCHANGE -a y ${vg} 2>&1 |grep "clvmd not running")" ]; do
+ if [ $wait -lt $CLVMD_NODES_TIMEOUT ]; then
+ sleep 3
+ wait=$(($wait + 3))
+ else
+ eend 1
+ fi
+ done
+ eend 0
+ done
+}
+
+stop_volumes() {
+ # Deactivate only clustered volumes
+ clustervgs=`$VGDISPLAY 2> /dev/null | awk 'BEGIN {RS="VG Name"} {if (/Clustered/) print $1;}'`
+ for vg in $clustervgs; do
+ ebegin " Shutting Down Clustered VG: ${vg} "
+ $VGCHANGE -anl ${vg} >/dev/null
+ eend $?
+ done
+}
+
+
+start() {
+ local module=$(awk '$1 == "dm_mod" { print $1 }' /proc/{modules,devices})
+
+ if [ -z "${module}" ]; then
+ load_modules "dm-mod"
+ sleep 1s
+ fi
+
+ ebegin "Starting clvmd ($CLVMD_CLUSTER_TIMEOUT seconds)"
+
+ start-stop-daemon --start --quiet --exec ${CLVMD_BIN} -- -T ${CLVMD_CLUSTER_TIMEOUT}
+ eend $?
+
+ start_volumes
+}
+
+stop() {
+
+ # umount GFS filesystems
+ umount_gfs_filesystems
+
+ #stop_volumes
+
+ ebegin "Stopping clvmd"
+ #start-stop-daemon --stop -s TERM --quiet --exec ${CLVMD_BIN} --name clvmd
+ killall -TERM ${CLVMD_BIN} >/dev/null
+ eend $?
+
+ #local module=$(awk '$1 == "dm_mod" { print $1 }' /proc/modules)
+
+ #if [[ "$?" -eq 0 && ! -z "${module}" ]]; then
+ # unload_modules "dm-mod"
+ #fi
+}
diff --git a/sys-fs/lvm2/files/device-mapper.conf-1.02.22-r3 b/sys-fs/lvm2/files/device-mapper.conf-1.02.22-r3
new file mode 100644
index 00000000..bc7a2515
--- /dev/null
+++ b/sys-fs/lvm2/files/device-mapper.conf-1.02.22-r3
@@ -0,0 +1 @@
+RC_AFTER="lvm"
diff --git a/sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2 b/sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2
new file mode 100644
index 00000000..56e75037
--- /dev/null
+++ b/sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2
@@ -0,0 +1,147 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2,v 1.1 2014/02/02 19:52:34 robbat2 Exp $
+
+depend() {
+ # As of .67-r1, we call ALL lvm start/stop scripts with --sysinit, that
+ # means dmeventd is NOT notified, as it cannot be safely running
+ before dmeventd checkfs fsck
+ after modules
+}
+
+dm_in_proc() {
+ local retval=0
+ for x in devices misc ; do
+ grep -qs 'device-mapper' /proc/${x}
+ retval=$((${retval} + $?))
+ done
+ return ${retval}
+}
+
+# char **build_dmsetup_command(volume)
+#
+# Returns complete dmsetup command given single volume name
+build_dmsetup_command() {
+ local count dmsetup_cmd
+
+ # Number of lines mentioning volume name
+ count=$(grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | grep -c ${1})
+
+ # If there's just one line:
+ if [ ${count} -eq 1 ] ; then
+ echo "echo $(grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \
+ grep ${1} | awk '{$1=""; print $0}') | /sbin/dmsetup create ${1}"
+
+ # For all cases with more lines:
+ elif [ ${count} -gt 1 ] ; then
+ for c in $( seq 1 ${count} ) ; do
+ if [ ${c} -eq 1 ] ; then
+ # Heavy escaping in awk-statement because we cannot use apostrophes
+ dmsetup_cmd="echo -e $(grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \
+ grep ${1} | awk NR==${c}\ \{\$1=\"\"\;\ print\ \$0\})"
+ else
+ # Append starting with newline
+ dmsetup_cmd="${dmsetup_cmd}\\\\n \
+ $(grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \
+ grep ${1} | awk NR==${c}\ \{\$1=\"\"\;\ print\ \$0\})"
+ fi
+ done
+ echo "${dmsetup_cmd} | /sbin/dmsetup create ${1}"
+ fi
+
+ return 0
+}
+
+# char **get_new_dm_volumes(void)
+#
+# Return unique volumes from /etc/dmtab
+get_new_dm_volumes() {
+ local volume
+
+ # Filter comments and blank lines
+ grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \
+ awk '{ print $1 }' | \
+ uniq | \
+ while read volume ; do
+ # If it exists, skip it
+ dmvolume_exists "${volume%:}" && continue
+
+ echo "${volume%:}"
+ done
+
+ return 0
+}
+
+# int dmvolume_exists(volume)
+#
+# Return true if volume exists in DM table
+dmvolume_exists() {
+ local x line volume=$1
+
+ [ -z "${volume}" ] && return 1
+
+ /sbin/dmsetup ls 2>/dev/null | \
+ while read line ; do
+ for x in ${line} ; do
+ # the following conditonal return only breaks out
+ # of the while loop, as it is running in a pipe.
+ [ "${x}" = "${volume}" ] && return 1
+ # We only want to check the volume name
+ break
+ done
+ done
+
+ # if 1 was returned from the above loop, then indicate that
+ # volume exists
+ [ $? = 1 ] && return 0
+
+ # otherwise the loop exited normally and the volume does not
+ # exist
+ return 1
+}
+
+# int is_empty_dm_volume(volume)
+#
+# Return true if the volume exists in DM table, but is empty/non-valid
+is_empty_dm_volume() {
+ local table volume=$1
+
+ set -- $(/sbin/dmsetup table 2>/dev/null | grep -e "^${volume}:")
+ [ "${volume}" = "$1" -a -z "$2" ]
+}
+
+
+start() {
+ if [ -e /proc/modules ] && ! dm_in_proc ; then
+ modprobe dm-mod 2>/dev/null
+ fi
+ # Ensure the dirs exist for locking and running
+ checkpath -q -d -m 0700 -o root:root /run/lvm /run/lock/lvm
+
+ local x volume
+
+ if [ -x /sbin/dmsetup -a -c /dev/mapper/control -a -f /etc/dmtab ] ; then
+ [ -n "$(get_new_dm_volumes)" ] && \
+ einfo " Setting up device-mapper volumes:"
+
+ get_new_dm_volumes | \
+ while read x ; do
+ [ -n "${x}" ] || continue
+
+ volume="${x##* }"
+
+ ebegin " Creating volume: ${volume}"
+ if ! eval $(build_dmsetup_command ${volume}) >/dev/null 2>/dev/null ; then
+ eend 1 " Error creating volume: ${volume}"
+ # dmsetup still adds an empty volume in some cases,
+ # so lets remove it
+ is_empty_dm_volume "${volume}" && \
+ /sbin/dmsetup remove "${volume}" 2>/dev/null
+ else
+ eend 0
+ fi
+ done
+ fi
+}
+
diff --git a/sys-fs/lvm2/files/device-mapper.rc-2.02.95-r2 b/sys-fs/lvm2/files/device-mapper.rc-2.02.95-r2
new file mode 100644
index 00000000..9ac8cdb7
--- /dev/null
+++ b/sys-fs/lvm2/files/device-mapper.rc-2.02.95-r2
@@ -0,0 +1,111 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/files/device-mapper.rc-2.02.95-r2,v 1.2 2013/04/09 11:00:26 ssuominen Exp $
+
+depend() {
+ # As of .67-r1, we call ALL lvm start/stop scripts with --sysinit, that
+ # means dmeventd is NOT notified, as it cannot be safely running
+ before dmeventd checkfs fsck
+ after modules
+}
+
+dm_in_proc() {
+ local retval=0
+ for x in devices misc ; do
+ grep -qs 'device-mapper' /proc/${x}
+ retval=$((${retval} + $?))
+ done
+ return ${retval}
+}
+
+# char **get_new_dm_volumes(void)
+#
+# Return dmsetup commands to setup volumes
+get_new_dm_volumes() {
+ local volume params
+
+ # Filter comments and blank lines
+ grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \
+ while read volume params ; do
+ # If it exists, skip it
+ dmvolume_exists "${volume%:}" && continue
+ # Assemble the command to run to create volume
+ echo "echo ${params} | /sbin/dmsetup create ${volume%:}"
+ done
+
+ return 0
+}
+
+# int dmvolume_exists(volume)
+#
+# Return true if volume exists in DM table
+dmvolume_exists() {
+ local x line volume=$1
+
+ [ -z "${volume}" ] && return 1
+
+ /sbin/dmsetup ls 2>/dev/null | \
+ while read line ; do
+ for x in ${line} ; do
+ # the following conditonal return only breaks out
+ # of the while loop, as it is running in a pipe.
+ [ "${x}" = "${volume}" ] && return 1
+ # We only want to check the volume name
+ break
+ done
+ done
+
+ # if 1 was returned from the above loop, then indicate that
+ # volume exists
+ [ $? = 1 ] && return 0
+
+ # otherwise the loop exited normally and the volume does not
+ # exist
+ return 1
+}
+
+# int is_empty_dm_volume(volume)
+#
+# Return true if the volume exists in DM table, but is empty/non-valid
+is_empty_dm_volume() {
+ local table volume=$1
+
+ set -- $(/sbin/dmsetup table 2>/dev/null | grep -e "^${volume}:")
+ [ "${volume}" = "$1" -a -z "$2" ]
+}
+
+
+start() {
+ if [ -e /proc/modules ] && ! dm_in_proc ; then
+ modprobe dm-mod 2>/dev/null
+ fi
+ # Ensure the dirs exist for locking and running
+ checkpath -q -d -m 0700 -o root:root /run/lvm /run/lock/lvm
+
+ local x volume
+
+ if [ -x /sbin/dmsetup -a -c /dev/mapper/control -a -f /etc/dmtab ] ; then
+ [ -n "$(get_new_dm_volumes)" ] && \
+ einfo " Setting up device-mapper volumes:"
+
+ get_new_dm_volumes | \
+ while read x ; do
+ [ -n "${x}" ] || continue
+
+ volume="${x##* }"
+
+ ebegin " Creating volume: ${volume}"
+ if ! eval "${x}" >/dev/null 2>/dev/null ; then
+ eend 1 " Error creating volume: ${volume}"
+ # dmsetup still adds an empty volume in some cases,
+ # so lets remove it
+ is_empty_dm_volume "${volume}" && \
+ /sbin/dmsetup remove "${volume}" 2>/dev/null
+ else
+ eend 0
+ fi
+ done
+ fi
+}
+
diff --git a/sys-fs/lvm2/files/dmeventd.initd-2.02.67-r1 b/sys-fs/lvm2/files/dmeventd.initd-2.02.67-r1
new file mode 100644
index 00000000..3c2f5f32
--- /dev/null
+++ b/sys-fs/lvm2/files/dmeventd.initd-2.02.67-r1
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/files/dmeventd.initd-2.02.67-r1,v 1.3 2014/02/08 21:17:46 robbat2 Exp $
+
+PIDFILE=/run/dmeventd.pid
+BIN=/sbin/dmeventd
+
+depend() {
+ # As of .67-r1, we call ALL lvm start/stop scripts with --sysinit, that
+ # means dmeventd is NOT notified, as it cannot be safely running
+ after lvm device-mapper
+}
+
+start() {
+ ebegin "Starting dmeventd"
+ start-stop-daemon --start --exec $BIN --pidfile $PIDFILE
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping dmeventd"
+ start-stop-daemon --stop --exec $BIN --pidfile $PIDFILE
+ eend $?
+}
+
diff --git a/sys-fs/lvm2/files/dmtab b/sys-fs/lvm2/files/dmtab
new file mode 100644
index 00000000..5fc1d793
--- /dev/null
+++ b/sys-fs/lvm2/files/dmtab
@@ -0,0 +1,12 @@
+#/etc/dmraid: config file for adding device-mapper volumes at boot
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/files/dmtab,v 1.1 2009/04/09 23:00:10 caleb Exp $
+
+# Format: <volume name>: <table>
+# Example: isw0: 0 312602976 striped 2 128 /dev/sda 0 /dev/sdb 0
+#
+# Alternatively you can create all your volumes the first time, and just run:
+#
+# dmsetup table >> /etc/dmtab
+#
+# and verify that they are correct.
+
diff --git a/sys-fs/lvm2/files/lvm-monitoring.initd-2.02.105-r2 b/sys-fs/lvm2/files/lvm-monitoring.initd-2.02.105-r2
new file mode 100644
index 00000000..c53a6046
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm-monitoring.initd-2.02.105-r2
@@ -0,0 +1,39 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/files/lvm-monitoring.initd-2.02.105-r2,v 1.1 2014/02/02 19:52:34 robbat2 Exp $
+
+# This script is based on upstream file
+# LVM2.2.02.67/scripts/lvm2_monitoring_init_red_hat.in
+
+depend() {
+ # As of .67-r1, we call ALL lvm start/stop scripts with --sysinit, that
+ # means dmeventd is NOT notified, as it cannot be safely running
+ need lvm dmeventd
+}
+
+VGCHANGE=/sbin/vgchange
+VGS=/sbin/vgs
+
+start() {
+ ret=0
+ # TODO do we want to separate out already active groups only?
+ VGSLIST=`$VGS --noheadings -o name --rows 2> /dev/null`
+ ebegin "Starting LVM monitoring for VGs ${VGSLIST}:"
+ $VGCHANGE --monitor y --poll y ${VGSLIST}
+ ret=$?
+ eend $ret
+ return $ret
+
+}
+
+stop() {
+ ret=0
+ # TODO do we want to separate out already active groups only?
+ VGSLIST=`$VGS --noheadings -o name --rows 2> /dev/null`
+ ebegin "Stopping LVM monitoring for VGs ${VGSLIST}:"
+ $VGCHANGE --monitor n ${VGSLIST}
+ ret=$?
+ eend $ret
+ return $ret
+}
diff --git a/sys-fs/lvm2/files/lvm-monitoring.initd-2.02.67-r2 b/sys-fs/lvm2/files/lvm-monitoring.initd-2.02.67-r2
new file mode 100644
index 00000000..6a41bb60
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm-monitoring.initd-2.02.67-r2
@@ -0,0 +1,46 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/files/lvm-monitoring.initd-2.02.67-r2,v 1.4 2013/04/09 11:00:26 ssuominen Exp $
+
+# This script is based on upstream file
+# LVM2.2.02.67/scripts/lvm2_monitoring_init_red_hat.in
+
+depend() {
+ # As of .67-r1, we call ALL lvm start/stop scripts with --sysinit, that
+ # means dmeventd is NOT notified, as it cannot be safely running
+ need lvm dmeventd
+}
+
+VGCHANGE=/sbin/vgchange
+VGS=/sbin/vgs
+
+start() {
+ ret=0
+ # TODO do we want to separate out already active groups only?
+ VGSLIST=`$VGS --noheadings -o name 2> /dev/null`
+ for vg in $VGSLIST
+ do
+ ebegin "Starting LVM monitoring for VG $vg:"
+ $VGCHANGE --monitor y --poll y $vg
+ ret2=$?
+ eend $ret2
+ [ $ret2 -ne 0 ] && ret=$ret2
+ done
+ return $ret
+}
+
+stop() {
+ ret=0
+ # TODO do we want to separate out already active groups only?
+ VGSLIST=`$VGS --noheadings -o name 2> /dev/null`
+ for vg in $VGSLIST
+ do
+ ebegin "Stopping LVM monitoring for VG $vg:"
+ $VGCHANGE --monitor n $vg
+ ret2=$?
+ eend $ret2
+ [ $ret2 -ne 0 ] && ret=$ret2
+ done
+ return $ret
+}
diff --git a/sys-fs/lvm2/files/lvm.confd-2.02.28-r2 b/sys-fs/lvm2/files/lvm.confd-2.02.28-r2
new file mode 100644
index 00000000..2fbd8668
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm.confd-2.02.28-r2
@@ -0,0 +1,5 @@
+# LVM should normally only be started after mdraid is available
+# this is because LVM physical volumes are very often MD devices.
+RC_AFTER="mdraid"
+
+# vim: ft=gentoo-conf-d
diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.105-r2 b/sys-fs/lvm2/files/lvm.rc-2.02.105-r2
new file mode 100644
index 00000000..7fdf50e1
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm.rc-2.02.105-r2
@@ -0,0 +1,97 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/files/lvm.rc-2.02.105-r2,v 1.1 2014/02/02 19:52:34 robbat2 Exp $
+
+depend() {
+ before checkfs fsck
+ after modules device-mapper
+ need lvmetad sysfs
+}
+
+config='global { locking_dir = "/run/lock/lvm" }'
+
+dm_in_proc() {
+ local retval=0
+ for x in devices misc ; do
+ grep -qs 'device-mapper' /proc/${x}
+ retval=$((${retval} + $?))
+ done
+ return ${retval}
+}
+
+start() {
+ # LVM support for /usr, /home, /opt ....
+ # This should be done *before* checking local
+ # volumes, or they never get checked.
+
+ # NOTE: Add needed modules for LVM or RAID, etc
+ # to /etc/modules.autoload if needed
+ for lvm_path in /bin/lvm /sbin/lvm ; do
+ [ -x "$lvm_path" ] && break
+ done
+ if [ ! -x "$lvm_path" ]; then
+ eerror "Cannot find lvm binary in /sbin or /bin!"
+ return 1
+ fi
+ if [ -z "${CDBOOT}" ] ; then
+ if [ -e /proc/modules ] && ! dm_in_proc ; then
+ modprobe dm-mod 2>/dev/null
+ fi
+ if [ -d /proc/lvm ] || dm_in_proc ; then
+ ebegin "Setting up the Logical Volume Manager"
+ #still echo stderr for debugging
+ lvm_commands="#! ${lvm_path} --config '${config}'\n"
+ # Extra PV find pass because some devices might not have been available until very recently
+ lvm_commands="${lvm_commands}pvscan\n"
+ # Now make the nodes
+ lvm_commands="${lvm_commands}vgscan --mknodes\n"
+ # And turn them on!
+ lvm_commands="${lvm_commands}vgchange --sysinit -a ly\n"
+ # Order of this is important, have to work around dash and LVM readline
+ printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null
+ eend $? "Failed to setup the LVM"
+ fi
+ fi
+}
+
+stop() {
+ for lvm_path in /bin/lvm /sbin/lvm ; do
+ [ -x "$lvm_path" ] && break
+ done
+ if [ ! -x "$lvm_path" ]; then
+ eerror "Cannot find lvm binary in /sbin or /bin!"
+ return 1
+ fi
+# Stop LVM2
+if [ -x /sbin/vgs ] && \
+ [ -x /sbin/vgchange ] && \
+ [ -x /sbin/lvchange ] && \
+ [ -f /etc/lvmtab -o -d /etc/lvm ] && \
+ [ -d /proc/lvm -o "`grep device-mapper /proc/misc 2>/dev/null`" ]
+then
+ einfo "Shutting down the Logical Volume Manager"
+
+
+ VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix --rows 2> /dev/null)
+
+ if [ "$VGS" ]
+ then
+ ebegin " Shutting Down LVs & VGs"
+ #still echo stderr for debugging
+ lvm_commands="#! ${lvm_path} --config '${config}'\n"
+ # Extra PV find pass because some devices might not have been available until very recently
+ lvm_commands="${lvm_commands}lvchange --sysinit -a ln ${VGS}\n"
+ # Now make the nodes
+ lvm_commands="${lvm_commands}vgchange --sysinit -a ln ${VGS}\n"
+ # Order of this is important, have to work around dash and LVM readline
+ printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null
+ eend $? "Failed (possibly some LVs still needed for /usr or root)"
+ fi
+
+ einfo "Finished shutting down the Logical Volume Manager"
+ return 0
+fi
+}
+
+# vim:ts=4
diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.95-r2 b/sys-fs/lvm2/files/lvm.rc-2.02.95-r2
new file mode 100644
index 00000000..76d90f33
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm.rc-2.02.95-r2
@@ -0,0 +1,96 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/files/lvm.rc-2.02.95-r2,v 1.2 2013/04/09 11:00:26 ssuominen Exp $
+
+depend() {
+ use dmeventd
+ before checkfs fsck
+ after dmeventd modules device-mapper
+}
+
+config='global { locking_dir = "/run/lock/lvm" }'
+
+dm_in_proc() {
+ local retval=0
+ for x in devices misc ; do
+ grep -qs 'device-mapper' /proc/${x}
+ retval=$((${retval} + $?))
+ done
+ return ${retval}
+}
+
+start() {
+ # LVM support for /usr, /home, /opt ....
+ # This should be done *before* checking local
+ # volumes, or they never get checked.
+
+ # NOTE: Add needed modules for LVM or RAID, etc
+ # to /etc/modules.autoload if needed
+ for lvm_path in /bin/lvm /sbin/lvm ; do
+ [ -x "$lvm_path" ] && break
+ done
+ if [ ! -x "$lvm_path" ]; then
+ eerror "Cannot find lvm binary in /sbin or /bin!"
+ return 1
+ fi
+ if [ -z "${CDBOOT}" ] ; then
+ if [ -e /proc/modules ] && ! dm_in_proc ; then
+ modprobe dm-mod 2>/dev/null
+ fi
+ if [ -d /proc/lvm ] || dm_in_proc ; then
+ ebegin "Setting up the Logical Volume Manager"
+ #still echo stderr for debugging
+ lvm_commands="#! ${lvm_path} --config '${config}'\n"
+ # Extra PV find pass because some devices might not have been available until very recently
+ lvm_commands="${lvm_commands}pvscan\n"
+ # Now make the nodes
+ lvm_commands="${lvm_commands}vgscan --mknodes\n"
+ # And turn them on!
+ lvm_commands="${lvm_commands}vgchange --sysinit -a ly\n"
+ # Order of this is important, have to work around dash and LVM readline
+ printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null
+ eend $? "Failed to setup the LVM"
+ fi
+ fi
+}
+
+stop() {
+ for lvm_path in /bin/lvm /sbin/lvm ; do
+ [ -x "$lvm_path" ] && break
+ done
+ if [ ! -x "$lvm_path" ]; then
+ eerror "Cannot find lvm binary in /sbin or /bin!"
+ return 1
+ fi
+# Stop LVM2
+if [ -x /sbin/vgs ] && \
+ [ -x /sbin/vgchange ] && \
+ [ -x /sbin/lvchange ] && \
+ [ -f /etc/lvmtab -o -d /etc/lvm ] && \
+ [ -d /proc/lvm -o "`grep device-mapper /proc/misc 2>/dev/null`" ]
+then
+ einfo "Shutting down the Logical Volume Manager"
+
+
+ VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix 2> /dev/null)
+
+ if [ "$VGS" ]
+ then
+ ebegin " Shutting Down LVs & VGs"
+ #still echo stderr for debugging
+ lvm_commands="#! ${lvm_path} --config '${config}'\n"
+ # Extra PV find pass because some devices might not have been available until very recently
+ lvm_commands="${lvm_commands}lvchange --sysinit -a ln ${VGS}\n"
+ # Now make the nodes
+ lvm_commands="${lvm_commands}vgchange --sysinit -a ln\n"
+ # Order of this is important, have to work around dash and LVM readline
+ printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null
+ eend $? "Failed"
+ fi
+
+ einfo "Finished Shutting down the Logical Volume Manager"
+fi
+}
+
+# vim:ts=4
diff --git a/sys-fs/lvm2/files/lvm2-2.02.100-selinux_and_udev_static.patch b/sys-fs/lvm2/files/lvm2-2.02.100-selinux_and_udev_static.patch
new file mode 100644
index 00000000..d6c8e5fd
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.100-selinux_and_udev_static.patch
@@ -0,0 +1,93 @@
+diff -ur LVM2.2.02.100.orig/configure.in LVM2.2.02.100/configure.in
+--- LVM2.2.02.100.orig/configure.in 2013-08-13 13:44:43.000000000 +0300
++++ LVM2.2.02.100/configure.in 2013-09-12 23:23:19.365329440 +0300
+@@ -954,6 +954,7 @@
+ pkg_config_init
+ fi
+ PKG_CHECK_MODULES(UDEV, libudev >= 143, [UDEV_PC="libudev"])
++ UDEV_STATIC_LIBS=`$PKG_CONFIG --static --libs libudev`
+ AC_DEFINE([UDEV_SYNC_SUPPORT], 1, [Define to 1 to enable synchronisation with udev processing.])
+ fi
+
+@@ -1199,19 +1200,32 @@
+ if test x$SELINUX = xyes; then
+ AC_CHECK_LIB([sepol], [sepol_check_context], [
+ AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context is available.])
+- SELINUX_LIBS="-lsepol"])
++ SEPOL_LIBS="-lsepol"])
+
+- AC_CHECK_LIB([selinux], [is_selinux_enabled], [
+- AC_CHECK_HEADERS([selinux/selinux.h],, hard_bailout)
+- AC_CHECK_HEADERS([selinux/label.h])
+- AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
+- SELINUX_LIBS="-lselinux $SELINUX_LIBS"
++ dnl -- init pkgconfig if required
++ if test x$PKGCONFIG_INIT != x1; then
++ pkg_config_init
++ fi
++ PKG_CHECK_MODULES(SELINUX, libselinux, [
+ SELINUX_PC="libselinux"
+- HAVE_SELINUX=yes ], [
+- AC_MSG_WARN(Disabling selinux)
+- SELINUX_LIBS=
+- SELINUX_PC=
+- HAVE_SELINUX=no ])
++ SELINUX_STATIC_LIBS=`$PKG_CONFIG --static --libs libselinux`
++ SELINUX_LIBS="$SELINUX_LIBS $SEPOL_LIBS"
++ AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
++ ],[
++ dnl -- old non-pkgconfig method, is buggy with static builds
++ AC_CHECK_LIB([selinux], [is_selinux_enabled], [
++ AC_CHECK_HEADERS([selinux/selinux.h],, hard_bailout)
++ AC_CHECK_HEADERS([selinux/label.h])
++ AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
++ SELINUX_LIBS="-lselinux $SEPOL_LIBS"
++ SELINUX_STATIC_LIBS="$SELINUX_LIBS"
++ SELINUX_PC="libselinux"
++ HAVE_SELINUX=yes ], [
++ AC_MSG_WARN(Disabling selinux)
++ SELINUX_LIBS=
++ SELINUX_PC=
++ HAVE_SELINUX=no ])
++ ])
+ fi
+
+ ################################################################################
+@@ -1615,6 +1629,7 @@
+ AC_SUBST(SALCK_CFLAGS)
+ AC_SUBST(SALCK_LIBS)
+ AC_SUBST(SELINUX_LIBS)
++AC_SUBST(SELINUX_STATIC_LIBS)
+ AC_SUBST(SELINUX_PC)
+ AC_SUBST(SNAPSHOTS)
+ AC_SUBST(STATICDIR)
+@@ -1625,6 +1640,7 @@
+ AC_SUBST(THIN_DUMP_CMD)
+ AC_SUBST(THIN_REPAIR_CMD)
+ AC_SUBST(UDEV_LIBS)
++AC_SUBST(UDEV_STATIC_LIBS)
+ AC_SUBST(UDEV_PC)
+ AC_SUBST(UDEV_RULES)
+ AC_SUBST(UDEV_SYNC)
+diff -ur LVM2.2.02.100.orig/make.tmpl.in LVM2.2.02.100/make.tmpl.in
+--- LVM2.2.02.100.orig/make.tmpl.in 2013-08-13 13:44:43.000000000 +0300
++++ LVM2.2.02.100/make.tmpl.in 2013-09-12 23:22:58.125328808 +0300
+@@ -32,7 +32,7 @@
+
+ LIBS = @LIBS@
+ # Extra libraries always linked with static binaries
+-STATIC_LIBS = $(SELINUX_LIBS) $(UDEV_LIBS)
++STATIC_LIBS = $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS)
+ DEFS += @DEFS@
+ # FIXME set this only where it's needed, not globally?
+ CFLAGS += @CFLAGS@ @UDEV_CFLAGS@
+@@ -46,7 +46,9 @@
+ PTHREAD_LIBS = @PTHREAD_LIBS@
+ READLINE_LIBS = @READLINE_LIBS@
+ SELINUX_LIBS = @SELINUX_LIBS@
++SELINUX_STATIC_LIBS = @SELINUX_STATIC_LIBS@
+ UDEV_LIBS = @UDEV_LIBS@
++UDEV_STATIC_LIBS = @UDEV_STATIC_LIBS@
+ TESTING = @TESTING@
+
+ # Setup directory variables
diff --git a/sys-fs/lvm2/files/lvm2-2.02.106-pthread-pkgconfig.patch b/sys-fs/lvm2/files/lvm2-2.02.106-pthread-pkgconfig.patch
new file mode 100644
index 00000000..594d6061
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.106-pthread-pkgconfig.patch
@@ -0,0 +1,32 @@
+Make sure that libdm usage always brings in pthread libraries, both in
+pkgconfig and during manual build.
+
+--- tools/Makefile.in
++++ tools/Makefile.in
+@@ -87,6 +87,7 @@
+ INSTALL_LVM_TARGETS += install_tools_static
+ INSTALL_DMSETUP_TARGETS += install_dmsetup_static
+ INSTALL_CMDLIB_TARGETS += install_cmdlib_static
++ STATIC_LIBS += @PTHREAD_LIBS@
+ endif
+
+ LVMLIBS = $(LVMINTERNAL_LIBS)
+@@ -118,6 +119,10 @@
+
+ include $(top_builddir)/make.tmpl
+
++ifeq ("@STATIC_LINK@", "yes")
++ STATIC_LIBS += @PTHREAD_LIBS@
++endif
++
+ device-mapper: $(TARGETS_DM)
+
+ CFLAGS_dmsetup.o += $(UDEV_CFLAGS) $(EXTRA_EXEC_CFLAGS)
+--- libdm/libdevmapper.pc.in
++++ libdm/libdevmapper.pc.in
+@@ -8,4 +8,5 @@
+ Version: @DM_LIB_PATCHLEVEL@
+ Cflags: -I${includedir}
+ Libs: -L${libdir} -ldevmapper
++Libs.private: -L${libdir} @PTHREAD_LIBS@
+ Requires.private: @SELINUX_PC@ @UDEV_PC@
diff --git a/sys-fs/lvm2/files/lvm2-2.02.107-static-pkgconfig-libs.patch b/sys-fs/lvm2/files/lvm2-2.02.107-static-pkgconfig-libs.patch
new file mode 100644
index 00000000..723cd0e2
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.107-static-pkgconfig-libs.patch
@@ -0,0 +1,104 @@
+diff -Nuar --exclude '*.orig' --exclude '*.rej' LVM2.2.02.107.orig/configure.in LVM2.2.02.107/configure.in
+--- LVM2.2.02.107.orig/configure.in 2014-07-15 12:57:55.867439868 -0700
++++ LVM2.2.02.107/configure.in 2014-07-15 17:24:02.662666091 -0700
+@@ -997,6 +997,7 @@
+ fi])
+ if test "$BLKID_WIPING" = yes; then
+ BLKID_PC="blkid"
++ BLKID_STATIC_LIBS=`$PKG_CONFIG --static --libs $BLKID_PC`
+ AC_DEFINE([BLKID_WIPING_SUPPORT], 1, [Define to 1 to use libblkid detection of signatures when wiping.])
+ fi
+ fi
+@@ -1022,6 +1023,7 @@
+ if test "$UDEV_SYNC" = yes; then
+ pkg_config_init
+ PKG_CHECK_MODULES(UDEV, libudev >= 143, [UDEV_PC="libudev"])
++ UDEV_STATIC_LIBS=`$PKG_CONFIG --static --libs libudev`
+ AC_DEFINE([UDEV_SYNC_SUPPORT], 1, [Define to 1 to enable synchronisation with udev processing.])
+ fi
+
+@@ -1242,19 +1244,32 @@
+ if test "$SELINUX" = yes; then
+ AC_CHECK_LIB([sepol], [sepol_check_context], [
+ AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context is available.])
+- SELINUX_LIBS="-lsepol"])
++ SEPOL_LIBS="-lsepol"])
++
++ dnl -- init pkgconfig if required
++ if test x$PKGCONFIG_INIT != x1; then
++ pkg_config_init
++ fi
++ PKG_CHECK_MODULES(SELINUX, libselinux, [
++ SELINUX_PC="libselinux"
++ SELINUX_STATIC_LIBS=`$PKG_CONFIG --static --libs libselinux`
++ SELINUX_LIBS="$SELINUX_LIBS $SEPOL_LIBS"
++ AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
++ ],[
++ dnl -- old non-pkgconfig method, is buggy with static builds
+
+ AC_CHECK_LIB([selinux], [is_selinux_enabled], [
+ AC_CHECK_HEADERS([selinux/selinux.h],, hard_bailout)
+ AC_CHECK_HEADERS([selinux/label.h])
+ AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
+- SELINUX_LIBS="-lselinux $SELINUX_LIBS"
++ SELINUX_LIBS="-lselinux $SEPOL_LIBS"
+ SELINUX_PC="libselinux"
+ HAVE_SELINUX=yes ], [
+ AC_MSG_WARN(Disabling selinux)
+ SELINUX_LIBS=
+ SELINUX_PC=
+ HAVE_SELINUX=no ])
++ ])
+ fi
+
+ ################################################################################
+@@ -1556,6 +1571,7 @@
+ ################################################################################
+ AC_SUBST(APPLIB)
+ AC_SUBST(AWK)
++AC_SUBST(BLKID_STATIC_LIBS)
+ AC_SUBST(BLKID_PC)
+ AC_SUBST(BLKID_WIPING)
+ AC_SUBST(BUILD_CMIRRORD)
+@@ -1651,6 +1667,7 @@
+ AC_SUBST(SALCK_CFLAGS)
+ AC_SUBST(SALCK_LIBS)
+ AC_SUBST(SELINUX_LIBS)
++AC_SUBST(SELINUX_STATIC_LIBS)
+ AC_SUBST(SELINUX_PC)
+ AC_SUBST(SNAPSHOTS)
+ AC_SUBST(STATICDIR)
+@@ -1662,6 +1679,7 @@
+ AC_SUBST(THIN_DUMP_CMD)
+ AC_SUBST(THIN_REPAIR_CMD)
+ AC_SUBST(THIN_RESTORE_CMD)
++AC_SUBST(UDEV_STATIC_LIBS)
+ AC_SUBST(UDEV_PC)
+ AC_SUBST(UDEV_RULES)
+ AC_SUBST(UDEV_SYNC)
+diff -Nuar --exclude '*.orig' --exclude '*.rej' LVM2.2.02.107.orig/make.tmpl.in LVM2.2.02.107/make.tmpl.in
+--- LVM2.2.02.107.orig/make.tmpl.in 2014-07-15 12:57:55.868439884 -0700
++++ LVM2.2.02.107/make.tmpl.in 2014-07-15 17:23:24.060055838 -0700
+@@ -44,7 +44,7 @@
+
+ LIBS = @LIBS@
+ # Extra libraries always linked with static binaries
+-STATIC_LIBS = $(SELINUX_LIBS) $(UDEV_LIBS) $(BLKID_LIBS)
++STATIC_LIBS = $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS)
+ DEFS += @DEFS@
+ # FIXME set this only where it's needed, not globally?
+ CFLAGS += @CFLAGS@
+@@ -59,10 +59,13 @@
+ PTHREAD_LIBS = @PTHREAD_LIBS@
+ READLINE_LIBS = @READLINE_LIBS@
+ SELINUX_LIBS = @SELINUX_LIBS@
++SELINUX_STATIC_LIBS = @SELINUX_STATIC_LIBS@
+ UDEV_CFLAGS = @UDEV_CFLAGS@
+ UDEV_LIBS = @UDEV_LIBS@
++UDEV_STATIC_LIBS = @UDEV_STATIC_LIBS@
+ BLKID_CFLAGS = @BLKID_CFLAGS@
+ BLKID_LIBS = @BLKID_LIBS@
++BLKID_STATIC_LIBS = @BLKID_STATIC_LIBS@
+ TESTING = @TESTING@
+
+ # Setup directory variables
diff --git a/sys-fs/lvm2/files/lvm2-2.02.108-example.conf.in.patch b/sys-fs/lvm2/files/lvm2-2.02.108-example.conf.in.patch
new file mode 100644
index 00000000..af5a5afe
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.108-example.conf.in.patch
@@ -0,0 +1,50 @@
+Maintainer note: Forward ported without editing from lvm2-2.02.99-example.conf.in.patch to apply cleanly.
+
+--- conf/example.conf.in
++++ conf/example.conf.in
+@@ -105,6 +105,10 @@
+ # By default we accept every block device:
+ # filter = [ "a/.*/" ]
+
++ # Gentoo: we exclude /dev/nbd by default, because it makes a lot of kernel
++ # noise when you probed while not available.
++ filter = [ "r|/dev/nbd.*|", "a/.*/" ]
++
+ # Exclude the cdrom drive
+ # filter = [ "r|/dev/cdrom|" ]
+
+@@ -522,7 +526,8 @@
+ # e.g. vgscan.lvm1 and they will stop working after you start using
+ # the new lvm2 on-disk metadata format.
+ # The default value is set when the tools are built.
+- # fallback_to_lvm1 = 0
++ # Gentoo: the LVM tools are a seperate package.
++ fallback_to_lvm1 = 0
+
+ # The default metadata format that commands should use - "lvm1" or "lvm2".
+ # The command line override is -M1 or -M2.
+@@ -1182,12 +1187,13 @@
+
+ # Metadata settings
+ #
+-# metadata {
++metadata {
+ # Default number of copies of metadata to hold on each PV. 0, 1 or 2.
+ # You might want to override it from the command line with 0
+ # when running pvcreate on new PVs which are to be added to large VGs.
+
+- # pvmetadatacopies = 1
++ # Gentoo: enable for data safety, but PV resize is then disabled.
++ # pvmetadatacopies = 2
+
+ # Default number of copies of metadata to maintain for each VG.
+ # If set to a non-zero value, LVM automatically chooses which of
+@@ -1222,7 +1228,7 @@
+ # the supplied toolset to make changes (e.g. vgcfgrestore).
+
+ # dirs = [ "/etc/lvm/metadata", "/mnt/disk2/lvm/metadata2" ]
+-#}
++}
+
+ # Event daemon
+ #
diff --git a/sys-fs/lvm2/files/lvm2-2.02.108-static-pkgconfig-libs.patch b/sys-fs/lvm2/files/lvm2-2.02.108-static-pkgconfig-libs.patch
new file mode 100644
index 00000000..3ab69986
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.108-static-pkgconfig-libs.patch
@@ -0,0 +1,104 @@
+Maintainer note: Forward ported without editing from lvm2-2.02.107-static-pkgconfig-libs.patch to apply cleanly.
+
+--- configure.in
++++ configure.in
+@@ -1067,6 +1067,7 @@
+ fi])
+ if test "$BLKID_WIPING" = yes; then
+ BLKID_PC="blkid"
++ BLKID_STATIC_LIBS=`$PKG_CONFIG --static --libs $BLKID_PC`
+ AC_DEFINE([BLKID_WIPING_SUPPORT], 1, [Define to 1 to use libblkid detection of signatures when wiping.])
+ fi
+ fi
+@@ -1092,6 +1093,7 @@
+ if test "$UDEV_SYNC" = yes; then
+ pkg_config_init
+ PKG_CHECK_MODULES(UDEV, libudev >= 143, [UDEV_PC="libudev"])
++ UDEV_STATIC_LIBS=`$PKG_CONFIG --static --libs libudev`
+ AC_DEFINE([UDEV_SYNC_SUPPORT], 1, [Define to 1 to enable synchronisation with udev processing.])
+ fi
+
+@@ -1312,19 +1314,32 @@
+ if test "$SELINUX" = yes; then
+ AC_CHECK_LIB([sepol], [sepol_check_context], [
+ AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context is available.])
+- SELINUX_LIBS="-lsepol"])
++ SEPOL_LIBS="-lsepol"])
++
++ dnl -- init pkgconfig if required
++ if test x$PKGCONFIG_INIT != x1; then
++ pkg_config_init
++ fi
++ PKG_CHECK_MODULES(SELINUX, libselinux, [
++ SELINUX_PC="libselinux"
++ SELINUX_STATIC_LIBS=`$PKG_CONFIG --static --libs libselinux`
++ SELINUX_LIBS="$SELINUX_LIBS $SEPOL_LIBS"
++ AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
++ ],[
++ dnl -- old non-pkgconfig method, is buggy with static builds
+
+ AC_CHECK_LIB([selinux], [is_selinux_enabled], [
+ AC_CHECK_HEADERS([selinux/selinux.h],, hard_bailout)
+ AC_CHECK_HEADERS([selinux/label.h])
+ AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
+- SELINUX_LIBS="-lselinux $SELINUX_LIBS"
++ SELINUX_LIBS="-lselinux $SEPOL_LIBS"
+ SELINUX_PC="libselinux"
+ HAVE_SELINUX=yes ], [
+ AC_MSG_WARN(Disabling selinux)
+ SELINUX_LIBS=
+ SELINUX_PC=
+ HAVE_SELINUX=no ])
++ ])
+ fi
+
+ ################################################################################
+@@ -1626,6 +1641,7 @@
+ ################################################################################
+ AC_SUBST(APPLIB)
+ AC_SUBST(AWK)
++AC_SUBST(BLKID_STATIC_LIBS)
+ AC_SUBST(BLKID_PC)
+ AC_SUBST(BLKID_WIPING)
+ AC_SUBST(BUILD_CMIRRORD)
+@@ -1721,6 +1737,7 @@
+ AC_SUBST(SALCK_CFLAGS)
+ AC_SUBST(SALCK_LIBS)
+ AC_SUBST(SELINUX_LIBS)
++AC_SUBST(SELINUX_STATIC_LIBS)
+ AC_SUBST(SELINUX_PC)
+ AC_SUBST(SNAPSHOTS)
+ AC_SUBST(STATICDIR)
+@@ -1735,6 +1752,7 @@
+ AC_SUBST(CACHE_DUMP_CMD)
+ AC_SUBST(CACHE_REPAIR_CMD)
+ AC_SUBST(CACHE_RESTORE_CMD)
++AC_SUBST(UDEV_STATIC_LIBS)
+ AC_SUBST(UDEV_PC)
+ AC_SUBST(UDEV_RULES)
+ AC_SUBST(UDEV_SYNC)
+--- make.tmpl.in
++++ make.tmpl.in
+@@ -43,7 +43,7 @@
+
+ LIBS = @LIBS@
+ # Extra libraries always linked with static binaries
+-STATIC_LIBS = $(SELINUX_LIBS) $(UDEV_LIBS) $(BLKID_LIBS)
++STATIC_LIBS = $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS)
+ DEFS += @DEFS@
+ # FIXME set this only where it's needed, not globally?
+ CFLAGS += @CFLAGS@
+@@ -57,10 +57,13 @@
+ PTHREAD_LIBS = @PTHREAD_LIBS@
+ READLINE_LIBS = @READLINE_LIBS@
+ SELINUX_LIBS = @SELINUX_LIBS@
++SELINUX_STATIC_LIBS = @SELINUX_STATIC_LIBS@
+ UDEV_CFLAGS = @UDEV_CFLAGS@
+ UDEV_LIBS = @UDEV_LIBS@
++UDEV_STATIC_LIBS = @UDEV_STATIC_LIBS@
+ BLKID_CFLAGS = @BLKID_CFLAGS@
+ BLKID_LIBS = @BLKID_LIBS@
++BLKID_STATIC_LIBS = @BLKID_STATIC_LIBS@
+ TESTING = @TESTING@
+
+ # Setup directory variables
diff --git a/sys-fs/lvm2/files/lvm2-2.02.56-lvm2create_initrd.patch b/sys-fs/lvm2/files/lvm2-2.02.56-lvm2create_initrd.patch
new file mode 100644
index 00000000..59aaa9b3
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.56-lvm2create_initrd.patch
@@ -0,0 +1,72 @@
+--- LVM2.2.02.56/scripts/lvm2create_initrd/lvm2create_initrd.orig 2006-11-21 22:41:56.000000000 +0000
++++ LVM2.2.02.56/scripts/lvm2create_initrd/lvm2create_initrd 2009-12-26 01:47:08.025224602 +0000
+@@ -54,7 +54,9 @@
+ DEVRAM=/tmp/initrd.$$
+
+ # set defaults
+-BINFILES=${BINFILES:-"`which lvm` `which bash` `which busybox` `which pivot_root`"}
++LVM=`which lvm.static`
++LVM=${LVM:-"`which lvm`"}
++BINFILES=${BINFILES:-"${LVM} `which bash` `which busybox` `which pivot_root`"}
+ BASICDEVICES=${BASICDEVICES:-"std consoleonly fd"}
+ BLOCKDEVICES=${BLOCKDEVICES:-"md hda hdb hdc hdd sda sdb sdc sdd"}
+ MAKEDEV=${MAKEDEV:-"debian"}
+@@ -119,6 +121,10 @@
+ echo "$PRE Mounting /proc"
+ mount -t proc none /proc
+
++# We need /sys for lvm
++echo "$PRE Mounting /sys"
++mount -t sysfs sysfs /sys
++
+ # plug in modules listed in /etc/modules
+ if [ -f /etc/modules ]; then
+ echo -n "$PRE plugging in kernel modules:"
+@@ -179,26 +185,29 @@
+ # run a shell if we're passed lvm2rescue on commandline
+ grep lvm2rescue /proc/cmdline 1>/dev/null 2>&1
+ if [ $? -eq 0 ]; then
+- lvm vgchange --ignorelockingfailure -P -a y
++ $LVM vgchange --ignorelockingfailure -P -a y
+ do_shell
+ else
+- lvm vgchange --ignorelockingfailure -a y
++ $LVM vgchange --ignorelockingfailure -a y
+ fi
+
+ echo "$PRE Mounting root filesystem $rootvol ro"
+ mkdir /rootvol
+ if ! mount -t auto -o ro $rootvol /rootvol; then
+- echo "\t*FAILED*";
++ echo "\t*FAILED TRYING TO MOUNT ROOTVOL*";
+ do_shell
+ fi
+
+ echo "$PRE Umounting /proc"
+ umount /proc
+
++echo "$PRE Umounting /sys"
++umount /sys
++
+ echo "$PRE Changing roots"
+ cd /rootvol
+ if ! pivot_root . initrd ; then
+- echo "\t*FAILED*"
++ echo "\t*FAILED PIVOT TO NEW ROOT*"
+ do_shell
+ fi
+
+@@ -356,7 +365,7 @@
+ fi
+
+ verbose "creating basic set of directories in $TMPMNT"
+-(cd $TMPMNT; mkdir bin dev etc lib proc sbin var)
++(cd $TMPMNT; mkdir bin dev etc lib proc sbin sys var)
+ if [ $? -ne 0 ]; then
+ echo "$cmd -- ERROR creating directories in $TMPMNT"
+ cleanup 1
+@@ -499,4 +508,3 @@
+ FINALTXT
+
+ cleanup 0
+-
diff --git a/sys-fs/lvm2/files/lvm2-2.02.63-always-make-static-libdm.patch b/sys-fs/lvm2/files/lvm2-2.02.63-always-make-static-libdm.patch
new file mode 100644
index 00000000..5ddcb4e5
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.63-always-make-static-libdm.patch
@@ -0,0 +1,42 @@
+diff -Nuar --exclude '*~' LVM2.2.02.63.orig/daemons/dmeventd/Makefile.in LVM2.2.02.63/daemons/dmeventd/Makefile.in
+--- LVM2.2.02.63.orig/daemons/dmeventd/Makefile.in 2010-04-09 14:42:48.000000000 -0700
++++ LVM2.2.02.63/daemons/dmeventd/Makefile.in 2010-04-19 11:53:27.000000000 -0700
+@@ -28,11 +28,12 @@
+ INSTALL_LIB_TARGETS = install_lib_dynamic
+
+ LIB_NAME = libdevmapper-event
++LIB_STATIC = $(LIB_NAME).a
++INSTALL_LIB_TARGETS += install_lib_static
++TARGETS += $(LIB_STATIC)
+ ifeq ("@STATIC_LINK@", "yes")
+- LIB_STATIC = $(LIB_NAME).a
+- TARGETS += $(LIB_STATIC) dmeventd.static
++ TARGETS += dmeventd.static
+ INSTALL_DMEVENTD_TARGETS += install_dmeventd_static
+- INSTALL_LIB_TARGETS += install_lib_static
+ endif
+
+ LIB_VERSION = $(LIB_VERSION_DM)
+diff -Nuar --exclude '*~' LVM2.2.02.63.orig/libdm/Makefile.in LVM2.2.02.63/libdm/Makefile.in
+--- LVM2.2.02.63.orig/libdm/Makefile.in 2010-04-09 14:42:51.000000000 -0700
++++ LVM2.2.02.63/libdm/Makefile.in 2010-04-19 11:52:20.000000000 -0700
+@@ -34,8 +34,8 @@
+
+ INCLUDES = -I$(srcdir)/$(interface) -I$(srcdir)
+
+-ifeq ("@STATIC_LINK@", "yes")
+ LIB_STATIC = $(interface)/libdevmapper.a
++ifeq ("@STATIC_LINK@", "yes")
+ endif
+
+ LIB_SHARED = $(interface)/libdevmapper.$(LIB_SUFFIX)
+@@ -63,8 +63,8 @@
+
+ INSTALL_TYPE = install_dynamic
+
+-ifeq ("@STATIC_LINK@", "yes")
+ INSTALL_TYPE += install_static
++ifeq ("@STATIC_LINK@", "yes")
+ endif
+
+ ifeq ("@PKGCONFIG@", "yes")
diff --git a/sys-fs/lvm2/files/lvm2-2.02.67-createinitrd.patch b/sys-fs/lvm2/files/lvm2-2.02.67-createinitrd.patch
new file mode 100644
index 00000000..7f0bfb89
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.67-createinitrd.patch
@@ -0,0 +1,18 @@
+X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=301331
+X-Gentoo-Bug: 301331
+
+diff -Nuar LVM2.2.02.67.orig/scripts/lvm2create_initrd/lvm2create_initrd LVM2.2.02.67/scripts/lvm2create_initrd/lvm2create_initrd
+--- LVM2.2.02.67.orig/scripts/lvm2create_initrd/lvm2create_initrd 2010-06-07 18:44:34.182980475 +0000
++++ LVM2.2.02.67/scripts/lvm2create_initrd/lvm2create_initrd 2010-06-07 18:51:27.636312899 +0000
+@@ -469,9 +469,9 @@
+ rmdir $TMPMNT/lost+found
+
+ echo "$cmd -- ummounting ram disk"
+-umount $DEVRAM
++umount $TMPMNT
+ if [ $? -ne 0 ]; then
+- echo "$cmd -- ERROR umounting $DEVRAM"
++ echo "$cmd -- ERROR umounting $TMPMNT"
+ cleanup 1
+ fi
+
diff --git a/sys-fs/lvm2/files/lvm2-2.02.70-asneeded.patch b/sys-fs/lvm2/files/lvm2-2.02.70-asneeded.patch
new file mode 100644
index 00000000..7576e192
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.70-asneeded.patch
@@ -0,0 +1,15 @@
+http://bugs.gentoo.org/330255
+
+liblvm2app.so: undefined reference to `floor'
+
+--- liblvm/Makefile.in
++++ liblvm/Makefile.in
+@@ -39,7 +39,7 @@
+
+ include $(top_builddir)/make.tmpl
+
+-LIBS += $(LVMINTERNAL_LIBS) -ldevmapper
++LIBS += $(LVMINTERNAL_LIBS) -ldevmapper -lm
+
+ ifeq ("@DMEVENTD@", "yes")
+ LIBS += -ldevmapper-event
diff --git a/sys-fs/lvm2/files/lvm2-2.02.92-dynamic-static-ldflags.patch b/sys-fs/lvm2/files/lvm2-2.02.92-dynamic-static-ldflags.patch
new file mode 100644
index 00000000..de2b294e
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.92-dynamic-static-ldflags.patch
@@ -0,0 +1,63 @@
+diff -Nuar --exclude '*.rej' --exclude '*.orig' LVM2.2.02.92.orig/configure.in LVM2.2.02.92/configure.in
+--- LVM2.2.02.92.orig/configure.in 2012-02-20 11:36:27.000000000 -0800
++++ LVM2.2.02.92/configure.in 2012-02-20 15:53:40.700124222 -0800
+@@ -32,6 +32,7 @@
+ COPTIMISE_FLAG="-O2"
+ CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym"
+ ELDFLAGS="-Wl,--export-dynamic"
++ STATIC_LDFLAGS="-Wl,--no-export-dynamic"
+ # FIXME Generate list and use --dynamic-list=.dlopen.sym
+ CLDWHOLEARCHIVE="-Wl,-whole-archive"
+ CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
+@@ -1458,6 +1459,7 @@
+ AC_SUBST(SELINUX_PC)
+ AC_SUBST(SNAPSHOTS)
+ AC_SUBST(STATICDIR)
++AC_SUBST(STATIC_LDFLAGS)
+ AC_SUBST(STATIC_LINK)
+ AC_SUBST(TESTING)
+ AC_SUBST(THIN)
+diff -Nuar --exclude '*.rej' --exclude '*.orig' LVM2.2.02.92.orig/daemons/dmeventd/Makefile.in LVM2.2.02.92/daemons/dmeventd/Makefile.in
+--- LVM2.2.02.92.orig/daemons/dmeventd/Makefile.in 2012-02-20 15:48:04.861683196 -0800
++++ LVM2.2.02.92/daemons/dmeventd/Makefile.in 2012-02-20 15:52:50.732314588 -0800
+@@ -65,7 +65,7 @@
+ $(DL_LIBS) $(LVMLIBS) $(LIBS) -rdynamic
+
+ dmeventd.static: $(LIB_STATIC) dmeventd.o $(interfacebuilddir)/libdevmapper.a
+- $(CC) $(CFLAGS) $(LDFLAGS) $(ELDFLAGS) -static -L. -L$(interfacebuilddir) -o $@ \
++ $(CC) $(CFLAGS) $(LDFLAGS) $(ELDFLAGS) $(STATIC_LDFLAGS) -static -L. -L$(interfacebuilddir) -o $@ \
+ dmeventd.o $(DL_LIBS) $(LVMLIBS) $(LIBS) $(STATIC_LIBS)
+
+ ifeq ("@PKGCONFIG@", "yes")
+diff -Nuar --exclude '*.rej' --exclude '*.orig' LVM2.2.02.92.orig/make.tmpl.in LVM2.2.02.92/make.tmpl.in
+--- LVM2.2.02.92.orig/make.tmpl.in 2012-02-20 15:48:05.034685963 -0800
++++ LVM2.2.02.92/make.tmpl.in 2012-02-20 15:48:58.622550855 -0800
+@@ -38,6 +38,7 @@
+ ELDFLAGS += @ELDFLAGS@
+ LDDEPS += @LDDEPS@
+ LDFLAGS += @LDFLAGS@
++STATIC_LDFLAGS += @STATIC_LDFLAGS@
+ LIB_SUFFIX = @LIB_SUFFIX@
+ LVMINTERNAL_LIBS = -llvm-internal $(UDEV_LIBS) $(DL_LIBS)
+ DL_LIBS = @DL_LIBS@
+diff -Nuar --exclude '*.rej' --exclude '*.orig' LVM2.2.02.92.orig/tools/Makefile.in LVM2.2.02.92/tools/Makefile.in
+--- LVM2.2.02.92.orig/tools/Makefile.in 2011-11-14 13:30:36.000000000 -0800
++++ LVM2.2.02.92/tools/Makefile.in 2012-02-20 15:52:25.242901501 -0800
+@@ -126,7 +126,7 @@
+ -o $@ dmsetup.o -ldevmapper $(LIBS)
+
+ dmsetup.static: dmsetup.o $(interfacebuilddir)/libdevmapper.a
+- $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) \
++ $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) \
+ -o $@ dmsetup.o -ldevmapper $(STATIC_LIBS) $(LIBS)
+
+ all: device-mapper
+@@ -136,7 +136,7 @@
+ $(LVMLIBS) $(READLINE_LIBS) $(LIBS) -rdynamic
+
+ lvm.static: $(OBJECTS) lvm-static.o $(top_builddir)/lib/liblvm-internal.a $(interfacebuilddir)/libdevmapper.a
+- $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) -o $@ \
++ $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) -o $@ \
+ $(OBJECTS) lvm-static.o $(LVMLIBS) $(STATIC_LIBS) $(LIBS)
+
+ liblvm2cmd.a: $(top_builddir)/lib/liblvm-internal.a $(OBJECTS) lvmcmdlib.o lvm2cmd.o
diff --git a/sys-fs/lvm2/files/lvm2-2.02.99-example.conf.in.patch b/sys-fs/lvm2/files/lvm2-2.02.99-example.conf.in.patch
new file mode 100644
index 00000000..38be5dfa
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.99-example.conf.in.patch
@@ -0,0 +1,47 @@
+--- conf/example.conf.in
++++ conf/example.conf.in
+@@ -50,7 +50,9 @@
+
+
+ # By default we accept every block device:
+- filter = [ "a/.*/" ]
++ # Gentoo: we exclude /dev/nbd by default, because it makes a lot of kernel
++ # noise when you probed while not available.
++ filter = [ "r|/dev/nbd.*|", "a/.*/" ]
+
+ # Exclude the cdrom drive
+ # filter = [ "r|/dev/cdrom|" ]
+@@ -259,6 +261,8 @@
+ # the new lvm2 on-disk metadata format.
+ # The default value is set when the tools are built.
+ # fallback_to_lvm1 = 0
++ # Gentoo: the LVM tools are a seperate package.
++ fallback_to_lvm1 = 0
+
+ # The default metadata format that commands should use - "lvm1" or "lvm2".
+ # The command line override is -M1 or -M2.
+@@ -449,12 +453,12 @@
+
+ # Metadata settings
+ #
+-# metadata {
++metadata {
+ # Default number of copies of metadata to hold on each PV. 0, 1 or 2.
+ # You might want to override it from the command line with 0
+ # when running pvcreate on new PVs which are to be added to large VGs.
+-
+- # pvmetadatacopies = 1
++ # Gentoo: enable for data safety, but PV resize is then disabled.
++ #pvmetadatacopies = 2
+
+ # Approximate default size of on-disk metadata areas in sectors.
+ # You should increase this if you have large volume groups or
+@@ -476,7 +480,7 @@
+ # the supplied toolset to make changes (e.g. vgcfgrestore).
+
+ # dirs = [ "/etc/lvm/metadata", "/mnt/disk2/lvm/metadata2" ]
+-#}
++}
+
+ # Event daemon
+ #
diff --git a/sys-fs/lvm2/files/lvm2-2.02.99-locale-muck.patch b/sys-fs/lvm2/files/lvm2-2.02.99-locale-muck.patch
new file mode 100644
index 00000000..364fbd44
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.99-locale-muck.patch
@@ -0,0 +1,11 @@
+--- make.tmpl.in
++++ make.tmpl.in
+@@ -395,7 +395,7 @@
+ ( cat $(srcdir)/.exported_symbols; \
+ if test x$(EXPORTED_HEADER) != x; then \
+ $(CC) -E -P $(INCLUDES) $(DEFS) $(EXPORTED_HEADER) | \
+- $(SED) -ne "/^typedef|}/!s/.*[ *]\($(EXPORTED_FN_PREFIX)_[a-z0-9_]*\)(.*/\1/p"; \
++ LC_ALL=C $(SED) -ne "/^typedef|}/!s/.*[ *]\($(EXPORTED_FN_PREFIX)_[a-z0-9_]*\)(.*/\1/p"; \
+ fi \
+ ) > $@
+
diff --git a/sys-fs/lvm2/files/lvm2-fix-stdio-usage.patch b/sys-fs/lvm2/files/lvm2-fix-stdio-usage.patch
new file mode 100644
index 00000000..71fa5bfa
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-fix-stdio-usage.patch
@@ -0,0 +1,111 @@
+--- LVM2.2.02.103.orig/lib/commands/toolcontext.c
++++ LVM2.2.02.103/lib/commands/toolcontext.c
+@@ -1336,7 +1336,10 @@
+ /*
+ * Close and reopen stream on file descriptor fd.
+ */
+-static int _reopen_stream(FILE *stream, int fd, const char *mode, const char *name, FILE **new_stream)
++#ifdef __GLIBC__
++#define _reopen_stream(stream, fd, mode, name) __reopen_stream(stream, fd, mode, name, &stream)
++
++static int __reopen_stream(FILE *stream, int fd, const char *mode, const char *name, FILE **new_stream)
+ {
+ int fd_copy, new_fd;
+
+@@ -1363,6 +1366,9 @@
+
+ return 1;
+ }
++#else
++#define _reopen_stream(stream, fd, mode, name) (freopen(NULL, mode, stream) != NULL)
++#endif
+
+ /* Entry point */
+ struct cmd_context *create_toolcontext(unsigned is_long_lived,
+@@ -1371,7 +1377,6 @@
+ unsigned threaded)
+ {
+ struct cmd_context *cmd;
+- FILE *new_stream;
+ int flags;
+
+ #ifdef M_MMAP_MAX
+@@ -1421,9 +1426,8 @@
+ if (is_valid_fd(STDIN_FILENO) &&
+ ((flags = fcntl(STDIN_FILENO, F_GETFL)) > 0) &&
+ (flags & O_ACCMODE) != O_WRONLY) {
+- if (!_reopen_stream(stdin, STDIN_FILENO, "r", "stdin", &new_stream))
++ if (!_reopen_stream(stdin, STDIN_FILENO, "r", "stdin"))
+ goto_out;
+- stdin = new_stream;
+ if (setvbuf(stdin, cmd->linebuffer, _IOLBF, linebuffer_size)) {
+ log_sys_error("setvbuf", "");
+ goto out;
+@@ -1433,9 +1437,8 @@
+ if (is_valid_fd(STDOUT_FILENO) &&
+ ((flags = fcntl(STDOUT_FILENO, F_GETFL)) > 0) &&
+ (flags & O_ACCMODE) != O_RDONLY) {
+- if (!_reopen_stream(stdout, STDOUT_FILENO, "w", "stdout", &new_stream))
++ if (!_reopen_stream(stdout, STDOUT_FILENO, "w", "stdout"))
+ goto_out;
+- stdout = new_stream;
+ if (setvbuf(stdout, cmd->linebuffer + linebuffer_size,
+ _IOLBF, linebuffer_size)) {
+ log_sys_error("setvbuf", "");
+@@ -1715,7 +1718,6 @@
+ void destroy_toolcontext(struct cmd_context *cmd)
+ {
+ struct dm_config_tree *cft_cmdline;
+- FILE *new_stream;
+ int flags;
+
+ if (cmd->dump_filter && cmd->filter && cmd->filter->dump &&
+@@ -1752,8 +1754,7 @@
+ if (is_valid_fd(STDIN_FILENO) &&
+ ((flags = fcntl(STDIN_FILENO, F_GETFL)) > 0) &&
+ (flags & O_ACCMODE) != O_WRONLY) {
+- if (_reopen_stream(stdin, STDIN_FILENO, "r", "stdin", &new_stream)) {
+- stdin = new_stream;
++ if (_reopen_stream(stdin, STDIN_FILENO, "r", "stdin")) {
+ setlinebuf(stdin);
+ } else
+ cmd->linebuffer = NULL; /* Leave buffer in place (deliberate leak) */
+@@ -1762,8 +1763,7 @@
+ if (is_valid_fd(STDOUT_FILENO) &&
+ ((flags = fcntl(STDOUT_FILENO, F_GETFL)) > 0) &&
+ (flags & O_ACCMODE) != O_RDONLY) {
+- if (_reopen_stream(stdout, STDOUT_FILENO, "w", "stdout", &new_stream)) {
+- stdout = new_stream;
++ if (_reopen_stream(stdout, STDOUT_FILENO, "w", "stdout")) {
+ setlinebuf(stdout);
+ } else
+ cmd->linebuffer = NULL; /* Leave buffer in place (deliberate leak) */
+--- LVM2.2.02.103.orig/tools/lvmcmdline.c
++++ LVM2.2.02.103/tools/lvmcmdline.c
+@@ -1252,7 +1252,7 @@
+ int err = is_valid_fd(STDERR_FILENO);
+
+ if (!is_valid_fd(STDIN_FILENO) &&
+- !(stdin = fopen(_PATH_DEVNULL, "r"))) {
++ !freopen(_PATH_DEVNULL, "r", stdin)) {
+ if (err)
+ perror("stdin stream open");
+ else
+@@ -1262,7 +1262,7 @@
+ }
+
+ if (!is_valid_fd(STDOUT_FILENO) &&
+- !(stdout = fopen(_PATH_DEVNULL, "w"))) {
++ !freopen(_PATH_DEVNULL, "w", stdout)) {
+ if (err)
+ perror("stdout stream open");
+ /* else no stdout */
+@@ -1270,7 +1270,7 @@
+ }
+
+ if (!is_valid_fd(STDERR_FILENO) &&
+- !(stderr = fopen(_PATH_DEVNULL, "w"))) {
++ !freopen(_PATH_DEVNULL, "w", stderr)) {
+ printf("stderr stream open: %s\n",
+ strerror(errno));
+ return 0;
diff --git a/sys-fs/lvm2/files/lvm2-musl-fixes.patch b/sys-fs/lvm2/files/lvm2-musl-fixes.patch
new file mode 100644
index 00000000..b62e80ae
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-musl-fixes.patch
@@ -0,0 +1,33 @@
+diff -uar LVM2.2.02.110-old/daemons/lvmetad/lvmetad-core.c LVM2.2.02.110/daemons/lvmetad/lvmetad-core.c
+--- LVM2.2.02.110-old/daemons/lvmetad/lvmetad-core.c 2015-05-14 21:37:01.226755157 +0000
++++ LVM2.2.02.110/daemons/lvmetad/lvmetad-core.c 2015-05-14 21:44:08.098585801 +0000
+@@ -124,7 +124,7 @@
+ if (!(vg = dm_hash_lookup(s->lock.vg, id))) {
+ if (!(vg = malloc(sizeof(pthread_mutex_t))) ||
+ pthread_mutexattr_init(&rec) ||
+- pthread_mutexattr_settype(&rec, PTHREAD_MUTEX_RECURSIVE_NP) ||
++ pthread_mutexattr_settype(&rec, PTHREAD_MUTEX_RECURSIVE) ||
+ pthread_mutex_init(vg, &rec))
+ goto bad;
+ if (!dm_hash_insert(s->lock.vg, id, vg)) {
+@@ -1152,7 +1152,7 @@
+ ls->log = s->log;
+
+ pthread_mutexattr_init(&rec);
+- pthread_mutexattr_settype(&rec, PTHREAD_MUTEX_RECURSIVE_NP);
++ pthread_mutexattr_settype(&rec, PTHREAD_MUTEX_RECURSIVE);
+ pthread_mutex_init(&ls->lock.pvid_to_pvmeta, &rec);
+ pthread_mutex_init(&ls->lock.vgid_to_metadata, &rec);
+ pthread_mutex_init(&ls->lock.pvid_to_vgid, NULL);
+Only in LVM2.2.02.110/lib/commands: toolcontext.c.orig
+diff -uar LVM2.2.02.110-old/libdaemon/server/daemon-server.c LVM2.2.02.110/libdaemon/server/daemon-server.c
+--- LVM2.2.02.110-old/libdaemon/server/daemon-server.c 2015-05-14 21:37:01.256755555 +0000
++++ LVM2.2.02.110/libdaemon/server/daemon-server.c 2015-05-14 21:37:51.108437752 +0000
+@@ -26,6 +26,7 @@
+ #include <sys/un.h>
+ #include <unistd.h>
+ #include <signal.h>
++#include <fcntl.h>
+
+ #include <syslog.h> /* FIXME. For the global closelog(). */
+
diff --git a/sys-fs/lvm2/files/lvmetad.initd-2.02.105-r2 b/sys-fs/lvm2/files/lvmetad.initd-2.02.105-r2
new file mode 100755
index 00000000..e16d55c4
--- /dev/null
+++ b/sys-fs/lvm2/files/lvmetad.initd-2.02.105-r2
@@ -0,0 +1,13 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/files/lvmetad.initd-2.02.105-r2,v 1.2 2014/02/08 21:17:46 robbat2 Exp $
+
+pidfile="/run/lvmetad.pid"
+command="/sbin/lvmetad"
+command_args="${LVMETAD_OPTS:=-p ${pidfile}}"
+start_stop_daemon_args="--pidfile ${pidfile}"
+
+depend() {
+ :
+}
diff --git a/sys-fs/lvm2/lvm2-2.02.110-r99.ebuild b/sys-fs/lvm2/lvm2-2.02.110-r99.ebuild
new file mode 100644
index 00000000..4cffcec6
--- /dev/null
+++ b/sys-fs/lvm2/lvm2-2.02.110-r99.ebuild
@@ -0,0 +1,275 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/lvm2-2.02.110.ebuild,v 1.3 2014/08/29 07:15:02 ssuominen Exp $
+
+EAPI=5
+inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
+
+DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
+HOMEPAGE="http://sources.redhat.com/lvm2/"
+SRC_URI="ftp://sources.redhat.com/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
+ ftp://sources.redhat.com/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="readline static static-libs systemd clvm cman lvm1 lvm2create_initrd selinux +udev +thin device-mapper-only"
+REQUIRED_USE="device-mapper-only? ( !clvm !cman !lvm1 !lvm2create_initrd !thin )
+ systemd? ( udev )
+ static? ( !udev )" #520450
+
+DEPEND_COMMON="clvm? ( cman? ( =sys-cluster/cman-3* ) =sys-cluster/libdlm-3* )
+ readline? ( sys-libs/readline )
+ udev? ( >=virtual/libudev-208:=[static-libs?] )"
+# /run is now required for locking during early boot. /var cannot be assumed to
+# be available -- thus, pull in recent enough baselayout for /run.
+# This version of LVM is incompatible with cryptsetup <1.1.2.
+RDEPEND="${DEPEND_COMMON}
+ >=sys-apps/baselayout-2.2
+ !<sys-apps/openrc-0.11
+ !<sys-fs/cryptsetup-1.1.2
+ !!sys-fs/clvm
+ !!sys-fs/lvm-user
+ >=sys-apps/util-linux-2.16
+ lvm2create_initrd? ( sys-apps/makedev )
+ thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
+# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
+DEPEND="${DEPEND_COMMON}
+ virtual/pkgconfig
+ >=sys-devel/binutils-2.20.1-r1
+ static? (
+ selinux? ( sys-libs/libselinux[static-libs] )
+ udev? ( >=virtual/libudev-208:=[static-libs] )
+ >=sys-apps/util-linux-2.16[static-libs]
+ )"
+
+S=${WORKDIR}/${PN/lvm/LVM}.${PV}
+
+pkg_setup() {
+ local CONFIG_CHECK="~SYSVIPC"
+
+ if use udev; then
+ local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
+ if linux_config_exists; then
+ local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
+ if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
+ ewarn "It's recommended to set an empty value to the following kernel config option:"
+ ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
+ fi
+ fi
+ fi
+
+ check_extra_config
+
+ # 1. Genkernel no longer copies /sbin/lvm blindly.
+ if use static; then
+ elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
+ elog "their static versions. If you need the static binaries,"
+ elog "you must append .static to the filename!"
+ fi
+}
+
+src_prepare() {
+ # Gentoo specific modification(s):
+ epatch "${FILESDIR}"/${PN}-2.02.108-example.conf.in.patch
+
+ sed -i \
+ -e "1iAR = $(tc-getAR)" \
+ -e "s:CC ?= @CC@:CC = $(tc-getCC):" \
+ make.tmpl.in || die #444082
+
+ sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
+
+ if use udev && ! use device-mapper-only; then
+ sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
+ elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
+ elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
+ elog "if it was previously disabled."
+ fi
+
+ sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
+
+ # For upstream -- review and forward:
+ epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
+ epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
+ epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
+ epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
+ epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
+ epatch "${FILESDIR}"/${PN}-2.02.92-dynamic-static-ldflags.patch #332905
+ epatch "${FILESDIR}"/${PN}-2.02.108-static-pkgconfig-libs.patch #370217, #439414 + blkid
+ epatch "${FILESDIR}"/${PN}-2.02.106-pthread-pkgconfig.patch #492450
+ # Patches for musl
+ epatch "${FILESDIR}"/${PN}-fix-stdio-usage.patch # Patch from alpine linux
+ epatch "${FILESDIR}"/${PN}-musl-fixes.patch
+
+ # Without thin-privision-tools, there is nothing to install for target install_man7:
+ use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
+
+ eautoreconf
+}
+
+src_configure() {
+ filter-flags -flto
+ local myconf
+ local buildmode
+
+ myconf="${myconf} $(use_enable !device-mapper-only dmeventd)"
+ myconf="${myconf} $(use_enable !device-mapper-only cmdlib)"
+ myconf="${myconf} $(use_enable !device-mapper-only applib)"
+ myconf="${myconf} $(use_enable !device-mapper-only fsadm)"
+ myconf="${myconf} $(use_enable !device-mapper-only lvmetad)"
+ use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
+
+ # Most of this package does weird stuff.
+ # The build options are tristate, and --without is NOT supported
+ # options: 'none', 'internal', 'shared'
+ if use static; then
+ buildmode="internal"
+ # This only causes the .static versions to become available
+ myconf="${myconf} --enable-static_link"
+ else
+ buildmode="shared"
+ fi
+ dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
+
+ # dmeventd requires mirrors to be internal, and snapshot available
+ # so we cannot disable them
+ myconf="${myconf} --with-mirrors=${dmbuildmode}"
+ myconf="${myconf} --with-snapshots=${dmbuildmode}"
+ if use thin; then
+ myconf="${myconf} --with-thin=internal --with-cache=internal"
+ local texec
+ for texec in check dump repair restore; do
+ myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
+ myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
+ done
+ else
+ myconf="${myconf} --with-thin=none --with-cache=none"
+ fi
+
+ if use lvm1; then
+ myconf="${myconf} --with-lvm1=${buildmode}"
+ else
+ myconf="${myconf} --with-lvm1=none"
+ fi
+
+ # disable O_DIRECT support on hppa, breaks pv detection (#99532)
+ use hppa && myconf="${myconf} --disable-o_direct"
+
+ if use clvm; then
+ myconf="${myconf} --with-cluster=${buildmode}"
+ # 4-state! Make sure we get it right, per bug 210879
+ # Valid options are: none, cman, gulm, all
+ #
+ # 2009/02:
+ # gulm is removed now, now dual-state:
+ # cman, none
+ # all still exists, but is not needed
+ #
+ # 2009/07:
+ # TODO: add corosync and re-enable ALL
+ local clvmd=""
+ use cman && clvmd="cman"
+ #clvmd="${clvmd/cmangulm/all}"
+ [ -z "${clvmd}" ] && clvmd="none"
+ myconf="${myconf} --with-clvmd=${clvmd}"
+ myconf="${myconf} --with-pool=${buildmode}"
+ else
+ myconf="${myconf} --with-clvmd=none --with-cluster=none"
+ fi
+
+ econf \
+ $(use_enable readline) \
+ $(use_enable selinux) \
+ --enable-pkgconfig \
+ --with-confdir="${EPREFIX}"/etc \
+ --exec-prefix="${EPREFIX}" \
+ --sbindir="${EPREFIX}/sbin" \
+ --with-staticdir="${EPREFIX}"/sbin \
+ --libdir="${EPREFIX}/$(get_libdir)" \
+ --with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
+ --with-default-dm-run-dir=/run \
+ --with-default-run-dir=/run/lvm \
+ --with-default-locking-dir=/run/lock/lvm \
+ --with-default-pid-dir=/run \
+ $(use_enable udev udev_rules) \
+ $(use_enable udev udev_sync) \
+ $(use_with udev udevdir "$(get_udevdir)"/rules.d) \
+ $(use_enable systemd udev-systemd-background-jobs) \
+ "$(systemd_with_unitdir)" \
+ ${myconf} \
+ CLDFLAGS="${LDFLAGS}"
+}
+
+src_compile() {
+ pushd include >/dev/null
+ emake
+ popd >/dev/null
+
+ if use device-mapper-only ; then
+ emake device-mapper
+ else
+ emake
+ emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
+ fi
+}
+
+src_install() {
+ local inst
+ INSTALL_TARGETS="install install_systemd_units install_systemd_generators install_tmpfiles_configuration"
+ use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
+ for inst in ${INSTALL_TARGETS}; do
+ emake DESTDIR="${D}" ${inst}
+ done
+
+ newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
+ newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
+
+ if use !device-mapper-only ; then
+ newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
+ newinitd "${FILESDIR}"/lvm.rc-2.02.105-r2 lvm
+ newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
+
+ newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
+ newinitd "${FILESDIR}"/lvmetad.initd-2.02.105-r2 lvmetad
+ fi
+
+ if use clvm; then
+ newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
+ newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
+ fi
+
+ if use static-libs; then
+ dolib.a libdm/ioctl/libdevmapper.a
+ dolib.a libdaemon/client/libdaemonclient.a #462908
+ #gen_usr_ldscript libdevmapper.so
+ dolib.a daemons/dmeventd/libdevmapper-event.a
+ #gen_usr_ldscript libdevmapper-event.so
+ else
+ rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
+ fi
+
+ if use lvm2create_initrd; then
+ dosbin scripts/lvm2create_initrd/lvm2create_initrd
+ doman scripts/lvm2create_initrd/lvm2create_initrd.8
+ newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
+ fi
+
+ insinto /etc
+ doins "${FILESDIR}"/dmtab
+
+ dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
+}
+
+pkg_postinst() {
+ ewarn "Make sure the \"lvm\" init script is in the runlevels:"
+ ewarn "# rc-update add lvm boot"
+ ewarn
+ ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
+ ewarn "to enable lvm autoactivation and metadata caching."
+}
+
+src_test() {
+ einfo "Tests are disabled because of device-node mucking, if you want to"
+ einfo "run tests, compile the package and see ${S}/tests"
+}
diff --git a/sys-fs/lvm2/metadata.xml b/sys-fs/lvm2/metadata.xml
new file mode 100644
index 00000000..74f768f7
--- /dev/null
+++ b/sys-fs/lvm2/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>robbat2@gentoo.org</email>
+ <name>Robin H. Johnson</name>
+ </maintainer>
+ <maintainer>
+ <email>agk@redhat.com</email>
+ <name>Alasdair Kergon</name>
+ <description>Upstream Maintainer (please CC on bugs)</description>
+ </maintainer>
+ <use>
+ <flag name='clvm'>Allow users to build clustered lvm2</flag>
+ <flag name='cman'>Cman support for clustered lvm</flag>
+ <flag name='lvm1'>Allow users to build lvm2 with lvm1 support</flag>
+ <flag name='lvm2create_initrd'>Install lvm2create_initrd script and pull in <pkg>sys-apps/makedev</pkg> for the /sbin/MAKEDEV command</flag>
+ <flag name='thin'>Support for thin volumes</flag>
+ <flag name='device-mapper-only'>Build only device-mapper and not the rest of LVM2 (UNSUPPORTED)</flag>
+ </use>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:heinz_mauelshagen:lvm2</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-fs/squashfs-tools/Manifest b/sys-fs/squashfs-tools/Manifest
new file mode 100644
index 00000000..120cdfee
--- /dev/null
+++ b/sys-fs/squashfs-tools/Manifest
@@ -0,0 +1,6 @@
+AUX squashfs-tools-4.2-missing-includes.patch 236 SHA256 3e88e86568146d80733d52bcdd28405e3f02120e8ca408c5fc995f37d30006f1 SHA512 8f18536e59708475d210e7a2fb4ff4dd3fa29441ea6881ddd21f1a5aadb5686647d45961de832384e356cc011fcb74ebabb8d52816a64db3adb3a9a3a37e785e WHIRLPOOL fb7eb189ddd120e291b11a927ff3ee9871d187530c49729c9fb3d0becff9cfe89e89d0e308bdddde33252caff5949c26263f18712429507b27eeef61b70ae322
+DIST squashfs4.2.tar.gz 133173 SHA256 d9e0195aa922dbb665ed322b9aaa96e04a476ee650f39bbeadb0d00b24022e96 SHA512 4b69c5d3008803347d0ce7628957e3873c9ebd799662b25dfb739afb6a1ce97bdd02b0465ac4d949bc38af2155880ac068209dc638b94e5c86a8011ec3a00de0 WHIRLPOOL c69d403b9775ecebfba02c2ae395b3e5ed8f832caf80417863e5df861b60462b97ac3d10ee027cc96c6f8146450bd8fe8cf715574d41ed47abcc7abc9423ce52
+DIST squashfs4.3.tar.gz 182550 SHA256 0d605512437b1eb800b4736791559295ee5f60177e102e4d4ccd0ee241a5f3f6 SHA512 854ed7acc99920f24ecf11e0da807e5a2a162eeda55db971aba63a03f0da2c13b20ec0564a906c4b0e415bd8258b273a10208c7abc0704f2ceea773aa6148a79 WHIRLPOOL c819f416b34cc46a232b8bc385017774603f81b4a865e6b97208004c183ebad5de7d0f726be444f8cb4e1d450abed9340dab730aec0762407f034e99b39bdc06
+EBUILD squashfs-tools-4.2-r99.ebuild 1452 SHA256 21d0faeec0b21f801de63770b454273d2e9baa5320334fdbf72ac7a25c6a7d0f SHA512 64a7e21aea34462b91ea4dfb3c934c4f44ad43eff09884722a3c59e8a4c8b2859ad8fa3fc8422ef916285c2edad76cc90adcb4b7c6e554bf62d7e08895694ea6 WHIRLPOOL 31aa501b6c4ae2c149bcfcbdc03d0d17dc7e44aaaa71e3d61b5a4c4a78091ccd91450a9a132580a0dccb914278c1be45df5b6fb67a16e9c395600c8302ce5638
+EBUILD squashfs-tools-4.3-r99.ebuild 1522 SHA256 549d659c5a2f2a76e6dab8a7e32cfd76fe81733b5c0d1ca71461461ee1aff5dc SHA512 d08074bd1d6b90d2739e63d0164f9cc7886d06cfb6dac7aabfa3d5d034402acd74c9830f0cffbcdcd6068a6e95ba36cbde51dfd32176dd9d2cfc0c2f59d7f685 WHIRLPOOL 3dfb210820065645205607faad4bdfd302861bcbdfd1533a09de7027e7ab7e85eb1ab7d00caece0055c0db6f3dd70bbdac9f709b9bac8a6af4252468e78d2797
+MISC metadata.xml 284 SHA256 f61a80ede0dd7d1044c5112f9e484ab6debc7fbf6bf3da8755e6e30063141622 SHA512 3bc31499e8734e371a5a062f599e4c61be8af09fda0bc5c06827aa50bec7e0349a86f35f200550e531cd9ab519b9370e717b9fc0550efb272d2007924faa6c82 WHIRLPOOL f3644be42c30edfd27e7e4a7e8fab00019939f564b9cbfa8dfe4606cd4004706444b6c12bda7adc1b7148652ad8cc8ba824e3bf5436a8de3b49cf2c61bd01165
diff --git a/sys-fs/squashfs-tools/files/squashfs-tools-4.2-missing-includes.patch b/sys-fs/squashfs-tools/files/squashfs-tools-4.2-missing-includes.patch
new file mode 100644
index 00000000..82451e0d
--- /dev/null
+++ b/sys-fs/squashfs-tools/files/squashfs-tools-4.2-missing-includes.patch
@@ -0,0 +1,10 @@
+--- a/squashfs4.2/squashfs-tools/pseudo.c
++++ b/squashfs4.2/squashfs-tools/pseudo.c
+@@ -30,6 +30,7 @@
+ #include <errno.h>
+ #include <string.h>
+ #include <stdlib.h>
++#include <sys/stat.h>
+ #include <sys/types.h>
+ #include <sys/wait.h>
+
diff --git a/sys-fs/squashfs-tools/metadata.xml b/sys-fs/squashfs-tools/metadata.xml
new file mode 100644
index 00000000..e1c66a45
--- /dev/null
+++ b/sys-fs/squashfs-tools/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>livecd</herd>
+ <use>
+ <flag name="xz">Enable support for XZ ("LZMA2") compression using <pkg>app-arch/xz-utils</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-fs/squashfs-tools/squashfs-tools-4.2-r99.ebuild b/sys-fs/squashfs-tools/squashfs-tools-4.2-r99.ebuild
new file mode 100644
index 00000000..5ed51e54
--- /dev/null
+++ b/sys-fs/squashfs-tools/squashfs-tools-4.2-r99.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/squashfs-tools/squashfs-tools-4.2.ebuild,v 1.12 2014/01/18 11:37:50 vapier Exp $
+
+EAPI="2"
+
+inherit eutils toolchain-funcs flag-o-matic
+
+MY_PV=${PV}
+DESCRIPTION="Tool for creating compressed filesystem type squashfs"
+HOMEPAGE="http://squashfs.sourceforge.net"
+SRC_URI="mirror://sourceforge/squashfs/squashfs${MY_PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm ~mips ppc x86"
+IUSE="+xz lzo xattr"
+
+RDEPEND="
+ sys-libs/zlib
+ xz? ( app-arch/xz-utils )
+ lzo? ( dev-libs/lzo )
+ !xz? ( !lzo? ( sys-libs/zlib ) )
+ xattr? ( sys-apps/attr )"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/squashfs${MY_PV}/squashfs-tools
+
+use_sed() {
+ local u=$1 s="${2:-`echo $1 | tr '[:lower:]' '[:upper:]'`}_SUPPORT"
+ printf '/^#?%s =/%s\n' "${s}" \
+ "$( use $u && echo s:.*:${s} = 1: || echo d )"
+}
+
+src_prepare() {
+ epatch ${FILESDIR}/${P}-missing-includes.patch
+}
+
+src_configure() {
+ append-cppflags -DFNM_EXTMATCH=0
+ tc-export CC
+ sed -i -r \
+ -e "$(use_sed xz XZ)" \
+ -e "$(use_sed lzo)" \
+ -e "$(use_sed xattr)" \
+ Makefile || die
+}
+
+src_install() {
+ dobin mksquashfs unsquashfs || die
+ cd ..
+ dodoc README ACKNOWLEDGEMENTS CHANGES PERFORMANCE.README || die
+}
+
+pkg_postinst() {
+ ewarn "This version of mksquashfs requires a 2.6.29 kernel or better"
+ use xz &&
+ ewarn "XZ support requires a 2.6.38 kernel or better"
+}
diff --git a/sys-fs/squashfs-tools/squashfs-tools-4.3-r99.ebuild b/sys-fs/squashfs-tools/squashfs-tools-4.3-r99.ebuild
new file mode 100644
index 00000000..f186f889
--- /dev/null
+++ b/sys-fs/squashfs-tools/squashfs-tools-4.3-r99.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/squashfs-tools/squashfs-tools-4.3.ebuild,v 1.6 2014/09/28 11:02:46 blueness Exp $
+
+EAPI=5
+inherit eutils toolchain-funcs flag-o-matic
+
+DESCRIPTION="Tool for creating compressed filesystem type squashfs"
+HOMEPAGE="http://squashfs.sourceforge.net"
+SRC_URI="mirror://sourceforge/squashfs/squashfs${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~mips ~ppc ~x86"
+IUSE="+xz lzma lz4 lzo xattr"
+
+RDEPEND="
+ sys-libs/zlib
+ !xz? ( !lzo? ( sys-libs/zlib ) )
+ lz4? ( app-arch/lz4 )
+ lzma? ( app-arch/xz-utils )
+ lzo? ( dev-libs/lzo )
+ xattr? ( sys-apps/attr )
+ xz? ( app-arch/xz-utils )
+"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/squashfs${PV}/${PN}"
+
+src_prepare() {
+ epatch ${FILESDIR}/${PN}-4.2-missing-includes.patch
+}
+
+src_configure() {
+ # set up make command line variables in EMAKE_SQUASHFS_CONF
+ EMAKE_SQUASHFS_CONF=(
+ $(usex lzma LZMA_XZ_SUPPORT=1 LZMA_XS_SUPPORT=0)
+ $(usex lzo LZO_SUPPORT=1 LZO_SUPPORT=0)
+ $(usex lz4 LZ4_SUPPORT=1 LZ4_SUPPORT=0)
+ $(usex xattr XATTR_SUPPORT=1 XATTR_SUPPORT=0)
+ $(usex xz XZ_SUPPORT=1 XZ_SUPPORT=0)
+ )
+
+ append-cppflags -DFNM_EXTMATCH=0
+ tc-export CC
+}
+
+src_compile() {
+ emake ${EMAKE_SQUASHFS_CONF[@]}
+}
+
+src_install() {
+ dobin mksquashfs unsquashfs
+ dodoc ../README
+}
+
+pkg_postinst() {
+ ewarn "This version of mksquashfs requires a 2.6.29 kernel or better"
+ use xz &&
+ ewarn "XZ support requires a 2.6.38 kernel or better"
+}
diff --git a/sys-fs/xfsdump/Manifest b/sys-fs/xfsdump/Manifest
new file mode 100644
index 00000000..c20265c7
--- /dev/null
+++ b/sys-fs/xfsdump/Manifest
@@ -0,0 +1,6 @@
+AUX xfsdump-3.0.4-no-symlink.patch 721 SHA256 b3ccccfce2b7f36263a8b3611724560ae768a3371dcc6e19045abae8df8052a3 SHA512 8b8feddfbdd76bebe61a8d06e174f5bef6edd05d0ce3b96731c234f58f36c73182e411a6f7b30f4e2bbc48b13b675edaf9ba30434e414b2bf2c7dbf431c1b819 WHIRLPOOL 576a5f0324ac20b80fe946f1b0390b9e70860b9f350811e41c7ccbbbb06ef8439ca1946b4d7db88b2d106ad4d67b9bf82cb46636e52d362b304c6d78bb35f142
+AUX xfsdump-3.0.5-prompt-overflow.patch 333 SHA256 80684664bae903256dd1b6355da9e88b727b8b42a559a6131aa2d24a6ce08428 SHA512 73f2a2f29b1f0e8585f49ac510b4da18deebbb799e428519fedf936f46dbd602c1cf6d300fd4e416ae4e6af1e6ce726798dec710c01d73c263782cb01ab21ba2 WHIRLPOOL 33e53b9b2690791df7374e8c7b9ff893850e076f936be86c2164798ae98ba33b35d9f2955c060d487688cb6dc9818591a05e1a74ce0792c40afd5d5989e514c7
+AUX xfsdump-3.1.4-compat-musl.patch 1023 SHA256 2983ea5405e6ebee2a595345b7c519f48f1202d8d557daff6f709ced65759801 SHA512 350638c7a214f565ea1ffbe7753ed01e8d6cee873f73a45c58fc99d49122099d6e83c55fe2966b5595bcffcc2bdb895d765dfa6874f02d2b4d0d1b75e75904f7 WHIRLPOOL 34178b7e079d6125031e677e2090a7409695ab3dccfdfa76b98c7111c3ab16687fc6e6f92aeef85157644ea04815eab3070deb4c87f49360cebc3f06d50eeb72
+DIST xfsdump-3.1.4.tar.gz 848188 SHA256 570eafd0721515bdd79cb0e295b701d49cdf81e71a0a0ff0df6d4c5cc1960943 SHA512 e82885ad6b3f1d81c1cdeff56714b73651e1c74eb4ce71574875ec0bb69b3fe707b40f85f0766b21ba589d13364ecfc0bad657a9b15c428cf821f926c3d66b25 WHIRLPOOL 5677000929f260b391743207a865c7529b788db46806a62c62bb6917025194913609cc804ead23314988f44853abc57f3c86ee22d2bde365697a35b0a7e3b607
+EBUILD xfsdump-3.1.4-r99.ebuild 1180 SHA256 3c87b64acf0da936526a3fe762803f81b9b9b07d19b65c0d95d8ce17b7f6d3d3 SHA512 86c2bac6bdc8bf927eb58625303e7b05ef010f7aa7f1f744f5df59e2baa9ad576eb0086b5087f299c030322048f0dbb5c8dae2040f19e33eac83b20dd86ad606 WHIRLPOOL b5716771f8ce4d0683a22ade8cc4b093469c6624052b62574a5985e481f6e83051f2cb74a6df8a0b21b7f2c922f5b7172ade278ab178f9581d5b20ddd2fd0f28
+MISC metadata.xml 164 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92 SHA512 8eb0d5153d388f6ea069c64b93882244816a0a09aecc0d73cb872121ce0eb24c5ccafa96aad0b620b2300f319e1af101fa7fa6c5d0d561719d49bb07da0a2eca WHIRLPOOL 11a1441bddb7a6c69653c663902b7da5767ae6ad515ac2aabfc42fe37927a1ccc21472deeee454009ff720201a41c3e4a912df42661a0a87150fb46126da2d52
diff --git a/sys-fs/xfsdump/files/xfsdump-3.0.4-no-symlink.patch b/sys-fs/xfsdump/files/xfsdump-3.0.4-no-symlink.patch
new file mode 100644
index 00000000..014ca33d
--- /dev/null
+++ b/sys-fs/xfsdump/files/xfsdump-3.0.4-no-symlink.patch
@@ -0,0 +1,22 @@
+http://bugs.gentoo.org/311881
+
+--- xfsdump-3.0.4/dump/Makefile
++++ xfsdump-3.0.4/dump/Makefile
+@@ -102,7 +102,6 @@
+ $(INSTALL) -m 755 -d $(PKG_ROOT_SBIN_DIR)
+ $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_ROOT_SBIN_DIR)
+ $(INSTALL) -m 755 -d $(PKG_SBIN_DIR)
+- $(INSTALL) -S $(PKG_ROOT_SBIN_DIR)/$(LTCOMMAND) $(PKG_SBIN_DIR)/$(LTCOMMAND)
+ install-dev:
+
+ $(COMMINCL) $(COMMON):
+--- xfsdump-3.0.4/restore/Makefile
++++ xfsdump-3.0.4/restore/Makefile
+@@ -114,7 +114,6 @@
+ $(INSTALL) -m 755 -d $(PKG_ROOT_SBIN_DIR)
+ $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_ROOT_SBIN_DIR)
+ $(INSTALL) -m 755 -d $(PKG_SBIN_DIR)
+- $(INSTALL) -S $(PKG_ROOT_SBIN_DIR)/$(LTCOMMAND) $(PKG_SBIN_DIR)/$(LTCOMMAND)
+ install-dev:
+
+ $(COMMINCL) $(COMMON):
diff --git a/sys-fs/xfsdump/files/xfsdump-3.0.5-prompt-overflow.patch b/sys-fs/xfsdump/files/xfsdump-3.0.5-prompt-overflow.patch
new file mode 100644
index 00000000..053615c8
--- /dev/null
+++ b/sys-fs/xfsdump/files/xfsdump-3.0.5-prompt-overflow.patch
@@ -0,0 +1,14 @@
+http://oss.sgi.com/bugzilla/show_bug.cgi?id=876
+https://bugs.gentoo.org/335115
+
+--- dump/content.c
++++ dump/content.c
+@@ -6460,7 +6460,7 @@
+ Media_prompt_erase( drive_t *drivep )
+ {
+ fold_t fold;
+- char question[ 100 ];
++ char question[ 200 ];
+ char *preamblestr[ PREAMBLEMAX ];
+ size_t preamblecnt;
+ char *querystr[ QUERYMAX ];
diff --git a/sys-fs/xfsdump/files/xfsdump-3.1.4-compat-musl.patch b/sys-fs/xfsdump/files/xfsdump-3.1.4-compat-musl.patch
new file mode 100644
index 00000000..643fba6f
--- /dev/null
+++ b/sys-fs/xfsdump/files/xfsdump-3.1.4-compat-musl.patch
@@ -0,0 +1,36 @@
+diff -Naurp xfsdump-3.1.4.orig/common/main.c xfsdump-3.1.4.mod/common/main.c
+--- xfsdump-3.1.4.orig/common/main.c 2012-10-09 20:42:33.000000000 +0000
++++ xfsdump-3.1.4.mod/common/main.c 2015-05-10 20:14:36.255773000 +0000
+@@ -50,6 +50,10 @@
+ #include "content.h"
+ #include "inventory.h"
+
++#ifndef RLIM64_INFINITY
++#define RLIM64_INFINITY (~0ULL)
++#endif
++
+ #ifdef DUMP
+ /* main.c - main for dump
+ */
+@@ -2220,7 +2224,10 @@ static sig_printmap_t sig_printmap[ ] =
+ {SIGTERM, "SIGTERM"},
+ {SIGUSR1, "SIGUSR1"},
+ {SIGUSR2, "SIGUSR2"},
++ {SIGCHLD, "SIGCHLD"},
++#ifdef SIGCLD
+ {SIGCLD, "SIGCLD"},
++#endif
+ {SIGPWR, "SIGPWR"},
+ {SIGURG, "SIGURG"},
+ {SIGPOLL, "SIGPOLL"},
+diff -Naurp xfsdump-3.1.4.orig/dump/content.c xfsdump-3.1.4.mod/dump/content.c
+--- xfsdump-3.1.4.orig/dump/content.c 2015-05-10 19:45:58.915773000 +0000
++++ xfsdump-3.1.4.mod/dump/content.c 2015-05-10 22:23:10.705773000 +0000
+@@ -33,6 +33,7 @@
+
+ #ifdef linux
+ #include <xfs/xqm.h>
++#include <linux/limits.h>
+ #endif
+
+ #include <attr/attributes.h>
diff --git a/sys-fs/xfsdump/metadata.xml b/sys-fs/xfsdump/metadata.xml
new file mode 100644
index 00000000..96a2d586
--- /dev/null
+++ b/sys-fs/xfsdump/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+</pkgmetadata>
diff --git a/sys-fs/xfsdump/xfsdump-3.1.4-r99.ebuild b/sys-fs/xfsdump/xfsdump-3.1.4-r99.ebuild
new file mode 100644
index 00000000..c8c7302e
--- /dev/null
+++ b/sys-fs/xfsdump/xfsdump-3.1.4-r99.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/xfsdump/xfsdump-3.1.4.ebuild,v 1.2 2014/09/04 05:19:58 polynomial-c Exp $
+
+EAPI="4"
+
+inherit multilib eutils
+
+DESCRIPTION="xfs dump/restore utilities"
+HOMEPAGE="http://oss.sgi.com/projects/xfs"
+SRC_URI="ftp://oss.sgi.com/projects/xfs/cmd_tars/${P}.tar.gz
+ ftp://oss.sgi.com/projects/xfs/previous/cmd_tars/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 -sparc ~x86"
+IUSE=""
+
+RDEPEND="sys-fs/e2fsprogs
+ >=sys-fs/xfsprogs-3.2.0
+ sys-apps/dmapi
+ >=sys-apps/attr-2.4.19"
+DEPEND="${RDEPEND}
+ sys-devel/gettext"
+
+src_prepare() {
+ sed -i \
+ -e "/^PKG_DOC_DIR/s:@pkg_name@:${PF}:" \
+ include/builddefs.in \
+ || die
+ epatch "${FILESDIR}"/${PN}-3.0.5-prompt-overflow.patch #335115
+ epatch "${FILESDIR}"/${PN}-3.0.4-no-symlink.patch #311881
+ epatch "${FILESDIR}"/${PN}-3.1.4-compat-musl.patch #549116
+}
+
+src_configure() {
+ unset PLATFORM #184564
+ export OPTIMIZER=${CFLAGS}
+ export DEBUG=-DNDEBUG
+
+ econf \
+ --libdir=/$(get_libdir) \
+ --libexecdir=/usr/$(get_libdir) \
+ --sbindir=/sbin
+}
diff --git a/sys-fs/xfsprogs/ChangeLog b/sys-fs/xfsprogs/ChangeLog
new file mode 100644
index 00000000..c299052e
--- /dev/null
+++ b/sys-fs/xfsprogs/ChangeLog
@@ -0,0 +1,783 @@
+# ChangeLog for sys-fs/xfsprogs
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/xfsprogs/ChangeLog,v 1.178 2014/12/15 10:01:52 polynomial-c Exp $
+
+*xfsprogs-3.2.2 (15 Dec 2014)
+
+ 15 Dec 2014; Lars Wendler <polynomial-c@gentoo.org> +xfsprogs-3.2.2.ebuild,
+ +files/xfsprogs-3.2.2-sharedlibs.patch:
+ Version bump.
+
+ 11 Nov 2014; Agostino Sarubbo <ago@gentoo.org> xfsprogs-3.2.1.ebuild:
+ Stable for ia64, wrt bug #524374
+
+ 04 Nov 2014; Agostino Sarubbo <ago@gentoo.org> xfsprogs-3.2.1.ebuild:
+ Stable for sparc, wrt bug #524374
+
+ 03 Nov 2014; Agostino Sarubbo <ago@gentoo.org> xfsprogs-3.2.1.ebuild:
+ Stable for x86, wrt bug #524374
+
+ 02 Nov 2014; Agostino Sarubbo <ago@gentoo.org> xfsprogs-3.2.1.ebuild:
+ Stable for alpha, wrt bug #524374
+
+ 01 Nov 2014; Agostino Sarubbo <ago@gentoo.org> xfsprogs-3.2.1.ebuild:
+ Stable for ppc, wrt bug #524374
+
+ 31 Oct 2014; Agostino Sarubbo <ago@gentoo.org> xfsprogs-3.2.1.ebuild:
+ Stable for ppc64, wrt bug #524374
+
+ 30 Oct 2014; Agostino Sarubbo <ago@gentoo.org> xfsprogs-3.2.1.ebuild:
+ Stable for amd64, wrt bug #524374
+
+ 23 Oct 2014; Jeroen Roovers <jer@gentoo.org> xfsprogs-3.2.1.ebuild:
+ Stable for HPPA (bug #524374).
+
+ 22 Oct 2014; Markus Meier <maekke@gentoo.org> xfsprogs-3.2.1.ebuild:
+ arm stable, bug #524374
+
+*xfsprogs-3.2.1 (04 Sep 2014)
+
+ 04 Sep 2014; Lars Wendler <polynomial-c@gentoo.org> -xfsprogs-3.1.11.ebuild,
+ +xfsprogs-3.2.1.ebuild:
+ Version bump (bug #510750). Removed old.
+
+*xfsprogs-3.1.11-r1 (25 Dec 2013)
+
+ 25 Dec 2013; Mike Frysinger <vapier@gentoo.org>
+ +files/xfsprogs-3.1.11-sharedlibs.patch, +xfsprogs-3.1.11-r1.ebuild:
+ Install extra headers for libxfs #486514 by Stefan Reimer. Rewrite shared lib
+ installs to only use libtool to avoid rpath issues.
+
+*xfsprogs-3.1.11 (18 Oct 2013)
+
+ 18 Oct 2013; Lars Wendler <polynomial-c@gentoo.org> -xfsprogs-3.1.7.ebuild,
+ -xfsprogs-3.1.8.ebuild, +xfsprogs-3.1.11.ebuild,
+ -files/xfsprogs-3.1.1-sharedlibs.patch, -files/xfsprogs-3.1.8-readline.patch:
+ Version bump. Removed old.
+
+ 15 May 2013; Mike Frysinger <vapier@gentoo.org> xfsprogs-3.1.10.ebuild:
+ Add s390 love #444688.
+
+ 02 Apr 2013; Agostino Sarubbo <ago@gentoo.org> xfsprogs-3.1.10.ebuild:
+ Stable for hppa, wrt bug #457486
+
+ 31 Mar 2013; Agostino Sarubbo <ago@gentoo.org> xfsprogs-3.1.10.ebuild:
+ Stable for sh, wrt bug #457486
+
+ 31 Mar 2013; Agostino Sarubbo <ago@gentoo.org> xfsprogs-3.1.10.ebuild:
+ Stable for sparc, wrt bug #457486
+
+ 30 Mar 2013; Agostino Sarubbo <ago@gentoo.org> xfsprogs-3.1.10.ebuild:
+ Stable for alpha, wrt bug #457486
+
+ 28 Mar 2013; Agostino Sarubbo <ago@gentoo.org> xfsprogs-3.1.10.ebuild:
+ Stable for ia64, wrt bug #457486
+
+ 28 Mar 2013; Agostino Sarubbo <ago@gentoo.org> xfsprogs-3.1.10.ebuild:
+ Stable for arm, wrt bug #457486
+
+ 27 Mar 2013; Agostino Sarubbo <ago@gentoo.org> xfsprogs-3.1.10.ebuild:
+ Stable for ppc64, wrt bug #457486
+
+ 26 Mar 2013; Agostino Sarubbo <ago@gentoo.org> xfsprogs-3.1.10.ebuild:
+ Stable for ppc, wrt bug #457486
+
+ 26 Mar 2013; Agostino Sarubbo <ago@gentoo.org> xfsprogs-3.1.10.ebuild:
+ Stable for x86, wrt bug #457486
+
+ 26 Mar 2013; Agostino Sarubbo <ago@gentoo.org> xfsprogs-3.1.10.ebuild:
+ Stable for amd64, wrt bug #457486
+
+*xfsprogs-3.1.10 (11 Jan 2013)
+
+ 11 Jan 2013; Mike Frysinger <vapier@gentoo.org>
+ +files/xfsprogs-3.1.10-sharedlibs.patch, +xfsprogs-3.1.10.ebuild:
+ Version bump #450588 by Agostino Sarubbo.
+
+ 19 Oct 2012; Mike Frysinger <vapier@gentoo.org>
+ files/xfsprogs-3.1.1-sharedlibs.patch:
+ Fix parallel install failures with libxlog #438764 by Jorge Manuel B. S.
+ Vicetto.
+
+ 25 Aug 2012; Mike Frysinger <vapier@gentoo.org>
+ +files/xfsprogs-3.1.8-readline.patch, xfsprogs-3.1.8.ebuild:
+ Link libxcmd against readline #432644 by David Badia.
+
+ 19 Aug 2012; Raúl Porcel <armin76@gentoo.org> xfsprogs-3.1.8.ebuild:
+ alpha/ia64/sh/sparc stable wrt #422225
+
+ 14 Jul 2012; Markus Meier <maekke@gentoo.org> xfsprogs-3.1.8.ebuild:
+ arm stable, bug #422225
+
+ 28 Jun 2012; Brent Baude <ranger@gentoo.org> xfsprogs-3.1.8.ebuild:
+ Marking xfsprogs-3.1.8 ppc for bug 422225
+
+ 27 Jun 2012; Jeroen Roovers <jer@gentoo.org> xfsprogs-3.1.8.ebuild:
+ Stable for HPPA (bug #422225).
+
+ 22 Jun 2012; Brent Baude <ranger@gentoo.org> xfsprogs-3.1.8.ebuild:
+ Marking xfsprogs-3.1.8 ppc64 for bug 422225
+
+ 21 Jun 2012; Jeff Horelick <jdhore@gentoo.org> xfsprogs-3.1.8.ebuild:
+ marked x86 per bug 422225
+
+ 19 Jun 2012; Agostino Sarubbo <ago@gentoo.org> xfsprogs-3.1.8.ebuild:
+ Stable for amd64, wrt bug #422225
+
+*xfsprogs-3.1.8 (26 Apr 2012)
+
+ 26 Apr 2012; Tomáš Chvátal <scarabeus@gentoo.org> +xfsprogs-3.1.8.ebuild,
+ -xfsprogs-3.1.4.ebuild, -xfsprogs-3.1.5.ebuild, -xfsprogs-3.1.6.ebuild,
+ -xfsprogs-3.1.7-r1.ebuild:
+ Version bump to latest. Prune older a bit.
+
+ 01 Apr 2012; Raúl Porcel <armin76@gentoo.org> xfsprogs-3.1.7.ebuild:
+ alpha/ia64/sh/sparc stable wrt #408021
+
+*xfsprogs-3.1.7-r1 (30 Mar 2012)
+
+ 30 Mar 2012; Mike Frysinger <vapier@gentoo.org> +xfsprogs-3.1.7-r1.ebuild:
+ Migrate to EAPI=4 and fix static-libs handling #410251 by Fernando V.
+
+ 30 Mar 2012; Diego E. Pettenò <flameeyes@gentoo.org> xfsprogs-3.1.4.ebuild,
+ xfsprogs-3.1.5.ebuild, xfsprogs-3.1.6.ebuild, xfsprogs-3.1.7.ebuild:
+ Fix dependencies on util-linux with USE=static (bug #410251, thanks to
+ Fernando V.).
+
+ 25 Mar 2012; Markus Meier <maekke@gentoo.org> xfsprogs-3.1.7.ebuild:
+ arm stable, bug #408021
+
+ 24 Mar 2012; Pawel Hajdan jr <phajdan.jr@gentoo.org> xfsprogs-3.1.7.ebuild:
+ x86 stable wrt bug #408021
+
+ 15 Mar 2012; Jeroen Roovers <jer@gentoo.org> xfsprogs-3.1.7.ebuild:
+ Stable for HPPA (bug #408021).
+
+ 13 Mar 2012; Samuli Suominen <ssuominen@gentoo.org> xfsprogs-3.1.7.ebuild:
+ ppc/ppc64 stable wrt #408021
+
+ 13 Mar 2012; Agostino Sarubbo <ago@gentoo.org> xfsprogs-3.1.7.ebuild:
+ Stable for amd64, wrt bug #408021
+
+*xfsprogs-3.1.7 (09 Feb 2012)
+
+ 09 Feb 2012; Robin H. Johnson <robbat2@gentoo.org> +xfsprogs-3.1.7.ebuild:
+ Bug #402801: version bump.
+
+*xfsprogs-3.1.6 (06 Nov 2011)
+
+ 06 Nov 2011; Mike Frysinger <vapier@gentoo.org> +xfsprogs-3.1.6.ebuild:
+ Version bump.
+
+*xfsprogs-3.1.5 (12 Apr 2011)
+
+ 12 Apr 2011; Mike Frysinger <vapier@gentoo.org> +xfsprogs-3.1.5.ebuild:
+ Version bump #363261 by Lars Wendler.
+
+ 30 Mar 2011; Jeroen Roovers <jer@gentoo.org> xfsprogs-3.1.4.ebuild:
+ Stable for HPPA (bug #358499).
+
+ 20 Mar 2011; Raúl Porcel <armin76@gentoo.org> xfsprogs-3.1.4.ebuild:
+ alpha/arm/ia64/sh/sparc stable wrt #358499
+
+ 13 Mar 2011; Markos Chandras <hwoarang@gentoo.org> xfsprogs-3.1.4.ebuild:
+ Stable on amd64 wrt bug #358499
+
+ 13 Mar 2011; Kacper Kowalik <xarthisius@gentoo.org> xfsprogs-3.1.4.ebuild:
+ ppc/ppc64 stable wrt #358499
+
+ 13 Mar 2011; Pawel Hajdan jr <phajdan.jr@gentoo.org>
+ xfsprogs-3.1.4.ebuild:
+ x86 stable wrt bug #358499
+
+*xfsprogs-3.1.4 (13 Dec 2010)
+
+ 13 Dec 2010; Mike Frysinger <vapier@gentoo.org> +xfsprogs-3.1.4.ebuild:
+ Version bump #348147 by Francisco Javier.
+
+ 18 Aug 2010; Mike Frysinger <vapier@gentoo.org> xfsprogs-3.1.2.ebuild,
+ +files/xfsprogs-3.1.2-depend.patch:
+ Clean up dependency generation to avoid parallel build issues #333155 by
+ Samuli Suominen.
+
+ 17 Aug 2010; Mike Frysinger <vapier@gentoo.org>
+ files/xfsprogs-3.1.1-sharedlibs.patch, xfsprogs-3.1.2.ebuild:
+ Clean up library install and prefer readline over editline like upstream
+ #311109.
+
+*xfsprogs-3.1.2 (03 Jun 2010)
+
+ 03 Jun 2010; Tiziano Müller <dev-zero@gentoo.org>
+ +files/xfsprogs-3.1.1-sharedlibs.patch, +xfsprogs-3.1.2.ebuild:
+ Version bump (bug #311109), added deps for readline/libedit, added
+ static-libs use flag, changed dependency from e2fsprogs to util-linux,
+ thanks to Hendrik Leppkes for the updated patch.
+
+ 11 May 2010; Joseph Jezak <josejx@gentoo.org> xfsprogs-3.0.3.ebuild:
+ Marked ppc/ppc64 stable for bug #311381.
+
+ 06 May 2010; Jeroen Roovers <jer@gentoo.org> xfsprogs-3.0.3.ebuild:
+ Stable for HPPA (bug #311381).
+
+ 25 Apr 2010; Raúl Porcel <armin76@gentoo.org> xfsprogs-3.0.3.ebuild:
+ alpha/ia64/sh/sparc stable wrt #311381
+
+ 05 Apr 2010; Markus Meier <maekke@gentoo.org> xfsprogs-3.0.3.ebuild:
+ amd64/arm/x86 stable, bug #311381
+
+*xfsprogs-3.0.3 (23 Sep 2009)
+
+ 23 Sep 2009; Mike Frysinger <vapier@gentoo.org> +xfsprogs-3.0.3.ebuild:
+ Version bump #285985 by Lars Wendler.
+
+ 19 Sep 2009; Robin H. Johnson <robbat2@gentoo.org>
+ xfsprogs-3.0.1-r1.ebuild:
+ Adding ~arm support. Tested on mv78100.arm.dev.gentoo.org thanks to
+ Marvell.
+
+*xfsprogs-3.0.1-r1 (26 Jun 2009)
+
+ 26 Jun 2009; Mike Frysinger <vapier@gentoo.org> +xfsprogs-3.0.1-r1.ebuild,
+ files/xfsprogs-3.0.1-sharedlibs.patch:
+ Fix by Lars Wendler to install missing libxcmd.so #275456 by Chris Smith.
+
+ 25 Jun 2009; Mike Frysinger <vapier@gentoo.org> +xfsprogs-3.0.1.ebuild,
+ +files/xfsprogs-3.0.1-sharedlibs.patch:
+ Version bump #275405 by Lars Wendler and USE=static support #273219 by
+ Wolfram Schlich.
+
+*xfsprogs-3.0.1 (25 Jun 2009)
+
+ 25 Jun 2009; Mike Frysinger <vapier@gentoo.org> +xfsprogs-3.0.1.ebuild:
+ Version bump #275405 by Lars Wendler.
+
+ 24 Feb 2009; Mike Frysinger <vapier@gentoo.org>
+ +files/xfsprogs-3.0.0-parallel-build.patch, xfsprogs-3.0.0.ebuild:
+ Fix parallel build failures #260005 by Gilles Dartiguelongue.
+
+ 24 Feb 2009; Mike Frysinger <vapier@gentoo.org> xfsprogs-3.0.0.ebuild:
+ Apply blocker as some binaries have moved from xfsdump to xfsprogs #259966
+ by Robin Johnson.
+
+*xfsprogs-3.0.0 (22 Feb 2009)
+
+ 22 Feb 2009; Mike Frysinger <vapier@gentoo.org> +xfsprogs-3.0.0.ebuild:
+ Version bump #259894 by Lars (Polynomial-C).
+
+ 14 Feb 2009; Raúl Porcel <armin76@gentoo.org> xfsprogs-2.10.1.ebuild:
+ ia64 stable wrt #252148
+
+ 31 Jan 2009; Jeroen Roovers <jer@gentoo.org> xfsprogs-2.10.1.ebuild:
+ Stable for HPPA (bug #252148).
+
+ 09 Jan 2009; Brent Baude <ranger@gentoo.org> xfsprogs-2.10.1.ebuild:
+ stable ppc, bug 252148
+
+ 07 Jan 2009; Brent Baude <ranger@gentoo.org> xfsprogs-2.10.1.ebuild:
+ stable ppc64, bug 252148
+
+ 25 Dec 2008; Tobias Klausmann <klausman@gentoo.org>
+ xfsprogs-2.10.1.ebuild:
+ Stable on alpha, bug #252148
+
+ 22 Dec 2008; Markus Meier <maekke@gentoo.org> xfsprogs-2.10.1.ebuild:
+ amd64/x86 stable, bug #252148
+
+ 22 Dec 2008; Ferris McCormick <fmccor@gentoo.org> xfsprogs-2.10.1.ebuild:
+ Sparc stable, Bug #252148.
+
+*xfsprogs-2.10.2 (22 Dec 2008)
+
+ 22 Dec 2008; Mike Frysinger <vapier@gentoo.org> +xfsprogs-2.10.2.ebuild:
+ Version bump #251651 by Lars (Polynomial-C).
+
+ 16 Nov 2008; Diego E. Pettenò <flameeyes@gentoo.org>
+ +files/xfsprogs-2.10.1-parallelmake.patch, xfsprogs-2.10.1.ebuild:
+ Add a patch to allow parallel make builds, reported upstream.
+
+*xfsprogs-2.10.1 (29 Sep 2008)
+
+ 29 Sep 2008; Mike Frysinger <vapier@gentoo.org>
+ +files/xfsprogs-2.10.1-headers.patch, +xfsprogs-2.10.1.ebuild:
+ Version bump #237170 by Conrad Kostecki.
+
+ 01 May 2008; Raúl Porcel <armin76@gentoo.org> xfsprogs-2.9.7.ebuild:
+ ia64/sparc stable wrt #218942
+
+ 01 May 2008; Tobias Scherbaum <dertobi123@gentoo.org>
+ xfsprogs-2.9.7.ebuild:
+ ppc stable, bug #218942
+
+ 30 Apr 2008; Tobias Klausmann <klausman@gentoo.org> xfsprogs-2.9.7.ebuild:
+ Stable on alpha, bug #218942
+
+ 28 Apr 2008; Jeroen Roovers <jer@gentoo.org> xfsprogs-2.9.7.ebuild:
+ Stable for HPPA (bug #218942).
+
+ 26 Apr 2008; Markus Meier <maekke@gentoo.org> xfsprogs-2.9.7.ebuild:
+ x86 stable, bug #218942
+
+ 26 Apr 2008; Richard Freeman <rich0@gentoo.org> xfsprogs-2.9.7.ebuild:
+ amd64 stable - 218942
+
+ 24 Apr 2008; Markus Rothe <corsair@gentoo.org> xfsprogs-2.9.7.ebuild:
+ Stable on ppc64; bug #218942
+
+*xfsprogs-2.9.8 (23 Apr 2008)
+
+ 23 Apr 2008; Mike Frysinger <vapier@gentoo.org> +xfsprogs-2.9.8.ebuild:
+ Version bump #219018 by Sergey Dryabzhinsky.
+
+*xfsprogs-2.9.7 (18 Mar 2008)
+
+ 18 Mar 2008; Robin H. Johnson <robbat2@gentoo.org> +xfsprogs-2.9.7.ebuild:
+ Version bump as 2.9.6 had a bad default that enabled lazy-counts and then
+ the filesystem did not work on kernels older than 2.6.23.
+
+ 07 Mar 2008; Richard Freeman <rich0@gentoo.org> xfsprogs-2.9.5.ebuild:
+ amd64 stabe - 211152
+
+ 28 Feb 2008; nixnut <nixnut@gentoo.org> xfsprogs-2.9.5.ebuild:
+ Stable on ppc wrt bug 211152
+
+ 27 Feb 2008; Raúl Porcel <armin76@gentoo.org> xfsprogs-2.9.5.ebuild:
+ alpha/ia64/sparc stable wrt #211152
+
+ 25 Feb 2008; Jeroen Roovers <jer@gentoo.org> xfsprogs-2.9.5.ebuild:
+ Stable for HPPA (bug #211152).
+
+ 24 Feb 2008; Brent Baude <ranger@gentoo.org> xfsprogs-2.9.5.ebuild:
+ stable ppc64, bug 211152
+
+ 24 Feb 2008; Markus Meier <maekke@gentoo.org> xfsprogs-2.9.5.ebuild:
+ x86 stable, bug #211152
+
+*xfsprogs-2.9.6 (23 Feb 2008)
+
+ 23 Feb 2008; Mike Frysinger <vapier@gentoo.org> +xfsprogs-2.9.6.ebuild:
+ Version bump #211113 by Raúl Porcel.
+
+*xfsprogs-2.9.5 (26 Jan 2008)
+
+ 26 Jan 2008; Mike Frysinger <vapier@gentoo.org> +xfsprogs-2.9.5.ebuild:
+ Version bump #207411 by Sergey Dryabzhinsky.
+
+ 19 Nov 2007; Joshua Kinard <kumba@gentoo.org> xfsprogs-2.9.4.ebuild:
+ Stable on mips, per #197204.
+
+ 02 Nov 2007; Steve Dibb <beandog@gentoo.org> xfsprogs-2.9.4.ebuild:
+ amd64 stable, bug 197204
+
+ 31 Oct 2007; Jeroen Roovers <jer@gentoo.org> xfsprogs-2.9.4.ebuild:
+ Stable for HPPA (bug #197204).
+
+ 30 Oct 2007; nixnut <nixnut@gentoo.org> xfsprogs-2.9.4.ebuild:
+ Stable on ppc wrt bug 197204
+
+ 29 Oct 2007; Raúl Porcel <armin76@gentoo.org> xfsprogs-2.9.4.ebuild:
+ ia64 stable wrt #197204
+
+ 28 Oct 2007; Ferris McCormick <fmccor@gentoo.org> xfsprogs-2.9.4.ebuild:
+ Sparc stable --- Bug #197204 (although we don't much use xfs).
+
+ 28 Oct 2007; Jose Luis Rivero <yoswink@gentoo.org> xfsprogs-2.9.4.ebuild:
+ Stable on alpha wrt bug #197204
+
+ 28 Oct 2007; Markus Rothe <corsair@gentoo.org> xfsprogs-2.9.4.ebuild:
+ Stable on ppc64; bug #197204
+
+ 28 Oct 2007; Andrej Kacian <ticho@gentoo.org> xfsprogs-2.9.4.ebuild:
+ Stable on x86, bug #197204.
+
+ 06 Oct 2007; Tom Gall <tgall@gentoo.org> xfsprogs-2.9.3.ebuild:
+ stable on ppc64, bug #193143
+
+ 28 Sep 2007; Joshua Kinard <kumba@gentoo.org> xfsprogs-2.9.3.ebuild:
+ Stable on mips, per #193143.
+
+ 26 Sep 2007; Raúl Porcel <armin76@gentoo.org> xfsprogs-2.9.3.ebuild:
+ sparc stable wrt #193143
+
+ 26 Sep 2007; Christoph Mende <angelos@gentoo.org> xfsprogs-2.9.3.ebuild:
+ Stable on amd64 wrt bug #193143
+
+ 23 Sep 2007; Raúl Porcel <armin76@gentoo.org> xfsprogs-2.9.3.ebuild:
+ alpha/ia64 stable wrt #193143
+
+ 22 Sep 2007; Christian Faulhammer <opfer@gentoo.org>
+ xfsprogs-2.9.3.ebuild:
+ stable x86, bug 193143
+
+ 20 Sep 2007; Lars Weiler <pylon@gentoo.org> xfsprogs-2.9.3.ebuild:
+ Stable on ppc; bug #193143.
+
+*xfsprogs-2.9.4 (20 Sep 2007)
+
+ 20 Sep 2007; Mike Frysinger <vapier@gentoo.org> +xfsprogs-2.9.4.ebuild:
+ Version bump #192647 by Arfrever Frehtes Taifersar Arahesis.
+
+ 01 Sep 2007; Mike Frysinger <vapier@gentoo.org>
+ +files/xfsprogs-2.9.3-pthreads.patch, xfsprogs-2.9.3.ebuild:
+ Link in libpthread with all binaries for now #190523 by Sergey D.
+
+*xfsprogs-2.9.3 (29 Aug 2007)
+
+ 29 Aug 2007; Mike Frysinger <vapier@gentoo.org> +xfsprogs-2.9.3.ebuild:
+ Version bump #190523 by Sergey D.
+
+ 13 Jun 2007; Mike Frysinger <vapier@gentoo.org>
+ +files/xfsprogs-2.8.21-LDFLAGS.patch, xfsprogs-2.8.21.ebuild:
+ Respect LDFLAGS while linking the library.
+
+ 09 Jun 2007; Markus Rothe <corsair@gentoo.org>
+ +files/xfsprogs-2.8.21-kern-types.patch, xfsprogs-2.8.21.ebuild:
+ Added patch for bug #131483; upstream fixed the fix ... and broke it
+
+*xfsprogs-2.8.21 (31 May 2007)
+
+ 31 May 2007; Mike Frysinger <vapier@gentoo.org> +xfsprogs-2.8.21.ebuild:
+ Version bump.
+
+ 14 Feb 2007; Mike Frysinger <vapier@gentoo.org>
+ +files/xfsprogs-2.8.18-symlinks.patch, xfsprogs-2.8.18.ebuild:
+ Fix installing in parallel #166729 by Connor.
+
+*xfsprogs-2.8.18 (13 Feb 2007)
+
+ 13 Feb 2007; Mike Frysinger <vapier@gentoo.org> +xfsprogs-2.8.18.ebuild:
+ Version bump #166640 by Antti Mäkelä.
+
+ 28 Jan 2007; Joseph Jezak <josejx@gentoo.org> xfsprogs-2.8.11.ebuild:
+ Marked ppc stable for bug #156840.
+
+ 31 Dec 2006; Bryan Østergaard <kloeri@gentoo.org> xfsprogs-2.8.11.ebuild:
+ Stable on Alpha, bug 156840.
+
+ 11 Dec 2006; Peter Weller <welp@gentoo.org> xfsprogs-2.8.11.ebuild:
+ Added amd64 keyword wrt bug ##156840
+
+ 07 Dec 2006; Guy Martin <gmsoft@gentoo.org> xfsprogs-2.8.11.ebuild:
+ Stable on hppa.
+
+ 07 Dec 2006; Christian Faulhammer <opfer@gentoo.org>
+ xfsprogs-2.8.11.ebuild:
+ stable x86, bug #156840
+
+ 03 Dec 2006; Markus Rothe <corsair@gentoo.org> ChangeLog:
+ Stable on ppc64; bug #156840
+
+ 27 Sep 2006; Mike Frysinger <vapier@gentoo.org>
+ +files/xfsprogs-2.8.11-kern-types.patch, xfsprogs-2.8.11.ebuild:
+ Fix from upstream for building with newer kernel headers #131483 by Markus
+ Rothe.
+
+*xfsprogs-2.8.11 (26 Sep 2006)
+
+ 26 Sep 2006; Patrick McLean <chutzpah@gentoo.org> +xfsprogs-2.8.11.ebuild:
+ Version bump.
+
+*xfsprogs-2.8.10 (10 Aug 2006)
+
+ 10 Aug 2006; Mike Frysinger <vapier@gentoo.org> +xfsprogs-2.8.10.ebuild:
+ Version bump #143377 by Christian Hesse.
+
+ 12 Jul 2006; Aron Griffis <agriffis@gentoo.org> xfsprogs-2.7.11.ebuild:
+ Mark 2.7.11 stable on ia64. #130436
+
+ 14 May 2006; Luis Medinas <metalgod@gentoo.org> xfsprogs-2.7.11.ebuild:
+ Stable on amd64.
+
+ 29 Apr 2006; Guy Martin <gmsoft@gentoo.org> xfsprogs-2.7.11.ebuild:
+ Stable on hppa.
+
+ 29 Apr 2006; Joseph Jezak <josejx@gentoo.org> xfsprogs-2.7.11.ebuild:
+ Marked ppc stable for bug #130436.
+
+ 29 Apr 2006; Joshua Kinard <kumba@gentoo.org> xfsprogs-2.7.11.ebuild:
+ Marked stable on mips.
+
+ 23 Apr 2006; Chris Gianelloni <wolf31o2@gentoo.org>
+ xfsprogs-2.7.11.ebuild:
+ Stable on x86 wrt bug #130436.
+
+ 20 Apr 2006; Mike Frysinger <vapier@gentoo.org>
+ +files/xfsprogs-2.7.11-LDFLAGS.patch, xfsprogs-2.7.11.ebuild:
+ Respect user LDFLAGS #126825 by Diego Pettenò.
+
+ 10 Apr 2006; Mike Frysinger <vapier@gentoo.org>
+ +files/xfsprogs-2.7.11-no-compress-docs.patch, xfsprogs-2.7.11.ebuild:
+ Let portage compress the docs #129486 by Stefan de Konink.
+
+ 19 Feb 2006; Joshua Kinard <kumba@gentoo.org> xfsprogs-2.7.3.ebuild:
+ Marked stable on mips.
+
+ 29 Jan 2006; Simon Stelling <blubb@gentoo.org> xfsprogs-2.7.3.ebuild:
+ stable on amd64
+
+ 28 Jan 2006; Mark Loeser <halcy0n@gentoo.org> xfsprogs-2.7.3.ebuild:
+ Stable on x86; bug #120486
+
+ 28 Jan 2006; Markus Rothe <corsair@gentoo.org> xfsprogs-2.7.3.ebuild:
+ Stable on ppc64; bug #120486
+
+ 27 Jan 2006; Luca Barbato <lu_zero@gentoo.org> xfsprogs-2.7.3.ebuild:
+ Marked ppc
+
+ 27 Jan 2006; Aron Griffis <agriffis@gentoo.org> xfsprogs-2.7.3.ebuild:
+ Mark 2.7.3 stable on alpha #120486
+
+*xfsprogs-2.7.11 (27 Jan 2006)
+
+ 27 Jan 2006; Mike Frysinger <vapier@gentoo.org> +xfsprogs-2.7.11.ebuild:
+ Version bump.
+
+*xfsprogs-2.7.3 (29 Nov 2005)
+
+ 29 Nov 2005; Mike Frysinger <vapier@gentoo.org> +xfsprogs-2.7.3.ebuild:
+ Version bump.
+
+*xfsprogs-2.6.36 (02 Sep 2005)
+
+ 02 Sep 2005; Mike Frysinger <vapier@gentoo.org> +xfsprogs-2.6.36.ebuild:
+ Version bump.
+
+ 29 May 2005; <solar@gentoo.org> xfsprogs-2.6.25.ebuild:
+ - update xfsprogs to use libc expanded variable elibc_uclibc vs uclibc so
+ USE=-* works
+
+ 29 Apr 2005; Markus Rothe <corsair@gentoo.org> xfsprogs-2.6.25.ebuild:
+ Stable on ppc64
+
+ 29 Apr 2005; Hanno Boeck <hanno@gentoo.org> +files/xfsprogs_gcc4.gz,
+ xfsprogs-2.6.25.ebuild:
+ Add patch to compile with gcc4 (from upstream cvs).
+
+ 30 Mar 2005; Mike Frysinger <vapier@gentoo.org> xfsprogs-2.6.25.ebuild:
+ Clean up and add ppc64 KEYWORDS.
+
+ 20 Mar 2005; Bryan Østergaard <kloeri@gentoo.org> xfsprogs-2.6.25.ebuild:
+ Stable on alpha.
+
+ 19 Feb 2005; Joseph Jezak <josejx@gentoo.org> xfsprogs-2.6.25.ebuild:
+ Marked ppc stable for bug #82181.
+
+ 29 Jan 2005; <solar@gentoo.org> +files/2.6.25-uclibc-fadvise.patch,
+ xfsprogs-2.6.25.ebuild:
+ - temp work around to disable posix_fadvise till such times as _syscall6()
+ exists for uClibc. bug #73855
+
+ 19 Jan 2005; Joshua Kinard <kumba@gentoo.org> xfsprogs-2.6.25.ebuild:
+ Marked stable on mips.
+
+ 03 Jan 2005; Ciaran McCreesh <ciaranm@gentoo.org> :
+ Change encoding to UTF-8 for GLEP 31 compliance
+
+ 14 Dec 2004; Dylan Carlson <absinthe@gentoo.org> xfsprogs-2.6.25.ebuild:
+ Stable on amd64.
+
+*xfsprogs-2.6.25 (09 Oct 2004)
+
+ 09 Oct 2004; Mike Frysinger <vapier@gentoo.org> +xfsprogs-2.6.25.ebuild:
+ Version bump.
+
+ 07 Oct 2004; <solar@gentoo.org> +files/2.6.13-uclibc-mincore.patch,
+ xfsprogs-2.6.13.ebuild:
+ mincore() does not appear to be part of POSIX or the Single Unix
+ Specification. So we patch it out for uclibc builds.
+
+ 07 Oct 2004; Mike Frysinger <vapier@gentoo.org> xfsprogs-2.6.13.ebuild,
+ +files/2.6.13-configure.patch:
+ Add patch to fix configure mis-detection #65735 by Marc Bevand.
+
+ 21 Sep 2004; Mike Frysinger <vapier@gentoo.org> xfsprogs-2.6.13.ebuild:
+ Make nls support optional #64862 by Aaron GIpson.
+
+ 03 Sep 2004; Pieter Van den Abeele <pvdabeel@gentoo.org>
+ xfsprogs-2.3.9.ebuild, xfsprogs-2.6.3.ebuild:
+ Masked xfsprogs-2.6.3.ebuild stable for ppc
+
+ 03 Sep 2004; Pieter Van den Abeele <pvdabeel@gentoo.org>
+ xfsprogs-2.3.9.ebuild:
+ Masked xfsprogs-2.3.9.ebuild stable for ppc
+
+ 23 Aug 2004; Bryan Østergaard <kloeri@gentoo.org> xfsprogs-2.6.13.ebuild:
+ Stable on alpha.
+
+ 21 Aug 2004; Joshua Kinard <kumba@gentoo.org> xfsprogs-2.6.13.ebuild:
+ Marked stable on mips.
+
+ 21 Aug 2004; Mike Frysinger <vapier@gentoo.org> xfsprogs-2.6.13.ebuild:
+ Unmask since latest stable xfsdump needs a the latest xfsprogs #42484 and to
+ cheat at fixing #39559.
+
+ 30 Jul 2004; Aron Griffis <agriffis@gentoo.org> xfsprogs-2.6.3.ebuild:
+ stable on alpha and ia64
+
+ 29 Jul 2004; Guy Martin <gmsoft@gentoo.org> xfsprogs-2.6.3.ebuild:
+ Stable on hppa.
+
+*xfsprogs-2.6.13 (28 Jul 2004)
+
+ 28 Jul 2004; Jon Portnoy <avenj@gentoo.org> xfsprogs-2.6.13.ebuild :
+ Version bump.
+
+ 28 Jul 2004; Jon Portnoy <avenj@gentoo.org> xfsprogs-2.6.3.ebuild :
+ Bump to stable on x86 and AMD64, bug #54108.
+
+ 01 Jul 2004; Jeremy Huddleston <eradicator@gentoo.org>
+ xfsprogs-1.3.13.ebuild, xfsprogs-2.6.3.ebuild:
+ virtual/glibc -> virtual/libc
+
+ 27 Jun 2004; Aron Griffis <agriffis@gentoo.org> xfsprogs-2.6.0.ebuild:
+ QA - fix use invocation
+
+ 24 May 2004; Michael Sterrett <mr_bones_@gentoo.org> xfsprogs-2.6.3.ebuild:
+ IUSE; don't rdepend on sed; use character class in sed; error check disk io;
+ compress docs
+
+ 25 Apr 2004; Joshua Kinard <kumba@gentoo.org> xfsprogs-2.6.3.ebuild:
+ Tweaked the arch check to see if PLATFORM needed to be unset and added mips to
+ that arch list.
+
+ 18 Apr 2004; Luca Barbato <lu_zero@gentoo.org> xfsprogs-2.6.0.ebuild,
+ xfsprogs-2.6.3.ebuild:
+ Fixed bug #42181
+
+*xfsprogs-2.6.3 (11 Feb 2004)
+
+ 11 Feb 2004; Mike Frysinger <vapier@gentoo.org> :
+ Version bump #19406.
+
+ 31 Jan 2004; Brian Harring <ferringb@gentoo.org> xfsprogs-1.3.13.ebuild,
+ xfsprogs-2.3.9.ebuild, xfsprogs-2.6.0.ebuild:
+ Adjusted all xfsprogs ebuild SRC_URI's to mirror://gentoo, due to upstream
+ files no longer existing.
+
+ 17 Jan 2004; Bartosch Pixa <darkspecter@gentoo.org> :
+ manifest fix
+
+ 16 Jan 2004; Bartosch Pixa <darkspecter@gentoo.org> xfsprogs-2.6.0.ebuild:
+ set ppc in keywords
+
+ 15 Dec 2003; Jason Wever <weeve@gentoo.org> xfsprogs-2.6.0.ebuild:
+ Added sparc fix and marked ~sparc.
+
+*xfsprogs-2.6.0 (13 Nov 2003)
+
+ 13 Nov 2003; <plasmaroo@gentoo.org> xfsprogs-2.6.0.ebuild:
+ Version bump. Bug #33358
+
+ 28 Sep 2003; David Holm <dholm@gentoo.org> xfsprogs-2.3.9.ebuild:
+ Added to ~ppc.
+
+*xfsprogs-2.3.6-r1 (15 Sep 2003)
+
+ 15 Sep 2003; Seemant Kulleen <seemant@gentoo.org> xfsprogs-1.3.13.ebuild,
+ xfsprogs-2.0.1_p20020330.ebuild, xfsprogs-2.2.2-r1.ebuild,
+ xfsprogs-2.2.2.ebuild, xfsprogs-2.3.6-r1.ebuild, xfsprogs-2.3.6-r2.ebuild,
+ xfsprogs-2.3.6.ebuild, xfsprogs-2.3.9.ebuild:
+ moved to sys-fs
+
+ 10 Jun 2003; Brandon Low <lostlogic@gentoo.org> xfsprogs-2.3.9.ebuild:
+ Change to sed -i and more better fix bug 19527
+
+ 10 Jun 2003; Brad Cowan <bcowan@gentoo.org> xfsprogs-2.3.9.ebuild:
+ added fix from bug #19527
+
+ 09 Jun 2003; Brad Laue <brad@gentoo.org> xfsprogs-2.3.9.ebuild:
+ Marking xfsprogs-2.3.9 stable: the 2.3.6 distfile is no longer on the main FTP
+ site.
+
+ 03 Jun 2003; Brad Cowan <bcowan@gentoo.org> xfsprogs-2.3.9.ebuild:
+ added dep to close bug #21160
+
+*xfsprogs-2.3.9 (16 Apr 2003)
+
+ 16 Apr 2003; Daniel Ahlberg <aliz@gentoo.org> xfsprogs-2.3.9.ebuild :
+ Version bump.
+
+*xfsprogs-2.3.6-r2 (26 Dec 2002)
+
+ 28 Mar 2003; Guy Martin <gmsoft@gentoo.org> xfsprogs-2.3.6-r2.ebuild :
+ Added ~hppa to KEYWORDS.
+
+ 24 Feb 2003; Nicholas Wourms <dragon@gentoo.org> xfsprogs-2.3.6-r2.ebuild :
+ Marked as testing for mips. Made ChangeLog compatible with echangelog.
+
+ 26 Dec 2002; Brad Cowan <bcowan@gentoo.org> xfsprogs-2.3.6-r2.ebuild,
+ files/digest-xfsprogs-2.3.6-r2:
+ Changed some sedding to use flag-o-matic, and exported some vars.
+
+ 21 Dec 2002; Daniel Robbins <drobbins@gentoo.org>: renamed xfsprogs version
+ 20020330-r1 to 2.0.1_p20020330 to bring in line with CVS ebuild policy and
+ fix version comparison snafu.
+
+*xfsprogs-2.3.6-r1 (16 Dec 2002)
+
+ 16 Dec 2002; Bjoern Brauel <bjb@gentoo.org> xfsprogs-2.3.6-r1.ebuild,
+ files/digest-xfsprogs-2.3.6-r1:
+
+ Add ~alpha to KEYWORDS
+
+ 16 Dec 2002; Brad Cowan <bcowan@gentoo.org> xfsprogs-2.3.6-r1.ebuild,
+ files/digest-xfsprogs-2.3.6-r1:
+
+ Cleaned up ebuild.
+
+*xfsprogs-2.3.6 (09 Dec 2002)
+
+ 09 Dec 2002; Donny Davies <woodchip@gentoo.org> : Chase latest release.
+
+*xfsprogs-2.2.2-r1 (29 Oct 2002)
+
+ 27 Oct 2002; Brad Cowan <bcowan@gentoo.org> xfsprogs-2.2.2-r1.ebuild
+ files/digest-xfsprogs-2.2.2-r1 :
+
+ Updated symlinks for bug# 9861.
+
+*xfsprogs-2.2.2 (27 Sep 2002)
+
+ 05 Oct 2002; Brad Cowan <bcowan@gentoo.org> xfsprogs-2.2.2.ebuild :
+
+ Fixed symlinks and "modernized" ebuild.
+
+ 27 Sep 2002; Brad Cowan <bcowan@gentoo.org> xfsprogs-2.2.2.ebuild
+ files/digest-xfsprogs-2.2.2 :
+
+ version bump thanks to Hanno Boeck <hanno@gentoo.org>
+
+*xfsprogs-20020330-r1 (26 July 2002)
+
+ 26 Jul 2002; phoen][x <phoenix@gentoo.org>:
+ This package will be compiled with -O1 now.
+ Compiling it with a higher setting, breaks xfs_check in
+ a gcc-2.95.3 environment. Closes bug #5551.
+
+*xfsprogs-20020330 (14 July 2002)
+
+ 21 Jul 2002; Mark Guertin <gerk@gentoo.org>:
+ updated keywords (ppc)
+
+ 14 Jul 2002; phoen][x <phoenix@gentoo.org> xfsprogs-20020330.ebuild :
+ Added LICENSE, KEYWORDS, SLOT.
+
+*xfsprogs-1.3.13 (14 July 2002)
+
+ 25 Feb 2003; Brandon Low <lostlogic@gentoo.org> xfsprogs-1.3.13.ebuild :
+ Fix massively long line
+
+ 14 Jul 2002; phoen][x <phoenix@gentoo.org> xfsprogs-1.3.13.ebuild :
+ Added LICENSE, KEYWORDS, SLOT.
+
+*xfsprogs-20020124-r2 (1 Feb 2002)
+
+ 14 Jul 2002; phoen][x <phoenix@gentoo.org> xfsprogs-20020124-r2.ebuild :
+ Added LICENSE, KEYWORDS, SLOT.
+
+ 1 Feb 2002; G.Bevin <gbevin@gentoo.org> ChangeLog :
+
+ Added initial ChangeLog which should be updated whenever the package is
+ updated in any way. This changelog is targetted to users. This means that the
+ comments should well explained and written in clean English. The details about
+ writing correct changelogs are explained in the skel.ChangeLog file which you
+ can find in the root directory of the portage repository.
diff --git a/sys-fs/xfsprogs/Manifest b/sys-fs/xfsprogs/Manifest
new file mode 100644
index 00000000..2be54c5d
--- /dev/null
+++ b/sys-fs/xfsprogs/Manifest
@@ -0,0 +1,7 @@
+AUX xfsprogs-3.2.2-add-limits-h.patch 271 SHA256 6d8e49de188fc9932ea488a8945601bf2035b03dfa4c3667bd55689445582696 SHA512 62125c90ff22e52142927d3e1ca8411a757679a304fcf1acf780c692fee1ef8c8d1d4bdbd97dce3e9f6d6678f9640f189fd96400e91c974978f0455966b80c6c WHIRLPOOL 8c9aa0e5ec61319e53c983c8484e1770beaf5c229b5c99735fb473d4a973034060bf5cdd2e6295f0d673eade4c393de43adcb5711c0e964dd6fac8fa68e8a53d
+AUX xfsprogs-3.2.2-musl-compat.patch 3599 SHA256 b62b258a56ba5ffbead385a390541fa34b8b545322ad6984bc5c1bb01d2e0c58 SHA512 1c6936fdee3cebf81a1ef9828cbf28175533dab46b47aead3f4165f725b7a66d1ac214314818f639313ebfef8e0fe245d21bb7f804423f934c2505c493dbce97 WHIRLPOOL a314521a2e68e5f22a3d4dd6f88c2cf86c7ea1ca778f27efda090490dae19a30a9f2015ba7f7cec364831b1a203832484651355e6a446e3418a64763cffdc5de
+AUX xfsprogs-3.2.2-sharedlibs.patch 2776 SHA256 a687cbd95bdd3948ab50a2d945b5c73197dbf6f2a2b5190071dd67003753fa8b SHA512 cb54e4e1a15e45b801788d0a189c3cdb4a02ff8ad9e3d31814c73532e33a0c47e3b0226179142c9f79a87511eaa89387c30794c1651718e36bf6cd4efbba5f6a WHIRLPOOL 0c42f6194a99372acbc914f71a73217cd29fc9256cd39ae832f245d2526f9bfa7ff3e76c2e2bc0ce6d39d05744c4f8ef8e9b7a6624c0a258014f5c99471a04a2
+DIST xfsprogs-3.2.2.tar.gz 1477667 SHA256 1a525ce21dc39d4ad3d775fa3c12c2dd4fb7a85e1e05ddd4530dcf773ed65fab SHA512 6316ce6da87bc3d70c1a887b7c5558b594fa6960105d6a51ad0e8072d5533444f69da174f370907738a15bd50f785f715f71947de916940daf0df2845f4a700e WHIRLPOOL a3e1d57e3dd77f91361ff710306a5579a5d99204849291d6730f672e65febe18a5957646cfcda60d02684a24333dca45f742637256b423a7756d4f28556594cf
+EBUILD xfsprogs-3.2.2-r99.ebuild 2857 SHA256 f835a99f146d2537bb9009440626bacde5db667807ac18611e5425856522a3f9 SHA512 a42104a92687ea86b7cd245748e3ae9c811a03f8b336f4cf6f0392943b4b09ac3c5c9deadd7afbb02f0757027b7e1b59398a3a6612935ac5a939bab743225646 WHIRLPOOL 9ba7f85e8e4e79aaff767996f862609cd91b7971c17cbe9e59894061f98c5033e7166301042688dfde92f11a30e0dc6cc751b77b158a82b94a2a797a3671dd4b
+MISC ChangeLog 27065 SHA256 a0637579839e88d27c78c8ae0d1ff4fc8459bf1001a13df17040020ebc4a8f5f SHA512 2c987b23b3f752fcbe1fa4e17df0b3714edf758ce4b807cc10ae29aac69ee8a6b27909a5c7391d38b1ae8be165f8bf99b71c564b1607044643fe5939f485dd7b WHIRLPOOL d31f96e38bcf1e8fc735c254565776fbe3dcf0fa62a7540a9dc2930c8e9debe17a6fd7951c8128f427292a2d8c5704b721d16d4cd384382bf8f3df8f382fb711
+MISC metadata.xml 164 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92 SHA512 8eb0d5153d388f6ea069c64b93882244816a0a09aecc0d73cb872121ce0eb24c5ccafa96aad0b620b2300f319e1af101fa7fa6c5d0d561719d49bb07da0a2eca WHIRLPOOL 11a1441bddb7a6c69653c663902b7da5767ae6ad515ac2aabfc42fe37927a1ccc21472deeee454009ff720201a41c3e4a912df42661a0a87150fb46126da2d52
diff --git a/sys-fs/xfsprogs/files/xfsprogs-3.2.2-add-limits-h.patch b/sys-fs/xfsprogs/files/xfsprogs-3.2.2-add-limits-h.patch
new file mode 100644
index 00000000..813119fd
--- /dev/null
+++ b/sys-fs/xfsprogs/files/xfsprogs-3.2.2-add-limits-h.patch
@@ -0,0 +1,10 @@
+--- ./libxfs/xfs_attr_remote.c.orig
++++ ./libxfs/xfs_attr_remote.c
+@@ -17,6 +17,7 @@
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+ #include <xfs.h>
++#include <linux/limits.h>
+
+ #define ATTR_RMTVALUE_MAPSIZE 1 /* # of map entries at once */
+
diff --git a/sys-fs/xfsprogs/files/xfsprogs-3.2.2-musl-compat.patch b/sys-fs/xfsprogs/files/xfsprogs-3.2.2-musl-compat.patch
new file mode 100644
index 00000000..bffa6fb6
--- /dev/null
+++ b/sys-fs/xfsprogs/files/xfsprogs-3.2.2-musl-compat.patch
@@ -0,0 +1,154 @@
+diff --git a/fsr/xfs_fsr.c b/fsr/xfs_fsr.c
+index 6f00b41..5b4af53 100644
+--- a/fsr/xfs_fsr.c
++++ b/fsr/xfs_fsr.c
+@@ -44,6 +44,10 @@
+ #define _PATH_FSRLAST "/var/tmp/.fsrlast_xfs"
+ #define _PATH_PROC_MOUNTS "/proc/mounts"
+
++#ifndef _PATH_MOUNTED
++#define _PATH_MOUNTED MOUNTED
++#endif
++
+
+ char *progname;
+
+diff --git a/include/platform_defs.h.in b/include/platform_defs.h.in
+index ac260bc..0e7fccf 100644
+--- a/include/platform_defs.h.in
++++ b/include/platform_defs.h.in
+@@ -68,6 +68,32 @@ typedef __u64 __bitwise __be64;
+
+ typedef struct filldir filldir_t;
+
++#ifndef __uint8_t
++#define __uint8_t uint8_t
++#endif
++#ifndef __uint16_t
++#define __uint16_t uint16_t
++#endif
++#ifndef __uint32_t
++#define __uint32_t uint32_t
++#endif
++#ifndef __uint64_t
++#define __uint64_t uint64_t
++#endif
++
++#ifndef __int8_t
++#define __int8_t int8_t
++#endif
++#ifndef __int16_t
++#define __int16_t int16_t
++#endif
++#ifndef __int32_t
++#define __int32_t int32_t
++#endif
++#ifndef __int64_t
++#define __int64_t int64_t
++#endif
++
+ #if defined(__linux__)
+ #include <xfs/linux.h>
+ #elif defined(__FreeBSD__)
+diff --git a/libhandle/handle.c b/libhandle/handle.c
+index 9a232fa..1db7772 100644
+--- a/libhandle/handle.c
++++ b/libhandle/handle.c
+@@ -20,6 +20,9 @@
+ #include <xfs/xfs.h>
+ #include <xfs/handle.h>
+ #include <xfs/parent.h>
++#if defined(__linux__)
++#include <linux/limits.h>
++#endif
+
+ /* just pick a value we know is more than big enough */
+ #define MAXHANSIZ 64
+diff --git a/libhandle/jdm.c b/libhandle/jdm.c
+index 070407b..8dd6322 100644
+--- a/libhandle/jdm.c
++++ b/libhandle/jdm.c
+@@ -20,6 +20,9 @@
+ #include <xfs/handle.h>
+ #include <xfs/jdm.h>
+ #include <xfs/parent.h>
++#if defined(__linux__)
++#include <linux/limits.h>
++#endif
+
+ /* internal fshandle - typecast to a void for external use */
+ #define FSHANDLE_SZ 8
+diff --git a/libxfs/linux.c b/libxfs/linux.c
+index 2e07d54..4075786 100644
+--- a/libxfs/linux.c
++++ b/libxfs/linux.c
+@@ -16,12 +16,9 @@
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+-#define ustat __kernel_ustat
+ #include <xfs/libxfs.h>
+ #include <mntent.h>
+ #include <sys/stat.h>
+-#undef ustat
+-#include <sys/ustat.h>
+ #include <sys/mount.h>
+ #include <sys/ioctl.h>
+ #include <sys/sysinfo.h>
+@@ -49,9 +46,12 @@ static int max_block_alignment;
+ int
+ platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose)
+ {
+- /* Pad ust; pre-2.6.28 linux copies out too much in 32bit compat mode */
+- struct ustat ust[2];
+ struct stat64 st;
++ FILE *f;
++ struct stat64 mst;
++ struct mntent *mnt;
++ char mounts[MAXPATHLEN];
++ int ismounted = 0;
+
+ if (!s) {
+ if (stat64(block, &st) < 0)
+@@ -61,14 +61,25 @@ platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose)
+ s = &st;
+ }
+
+- if (ustat(s->st_rdev, ust) >= 0) {
++ strcpy(mounts, (!access(PROC_MOUNTED, R_OK)) ? PROC_MOUNTED : MOUNTED);
++ if ((f = setmntent(mounts, "r")) == NULL)
++ return 0;
++
++ while ((mnt = getmntent(f)) != NULL) {
++ if (stat64(mnt->mnt_dir, &mst) < 0)
++ continue;
++ if (mst.st_dev != s->st_rdev)
++ continue;
++
+ if (verbose)
+ fprintf(stderr,
+ _("%s: %s contains a mounted filesystem\n"),
+ progname, name);
+- return 1;
++ ismounted = 1;
++ break;
+ }
+- return 0;
++ endmntent(f);
++ return ismounted;
+ }
+
+ int
+--- ./repair/attr_repair.c.orig
++++ ./repair/attr_repair.c
+@@ -24,6 +24,10 @@
+ #include "bmap.h"
+ #include "protos.h"
+ #include "dir2.h"
++#if defined(__linux__)
++#include <linux/limits.h>
++#endif
++
+
+ static int xfs_acl_valid(struct xfs_mount *mp, struct xfs_acl *daclp);
+ static int xfs_mac_valid(xfs_mac_label_t *lp);
diff --git a/sys-fs/xfsprogs/files/xfsprogs-3.2.2-sharedlibs.patch b/sys-fs/xfsprogs/files/xfsprogs-3.2.2-sharedlibs.patch
new file mode 100644
index 00000000..118874a5
--- /dev/null
+++ b/sys-fs/xfsprogs/files/xfsprogs-3.2.2-sharedlibs.patch
@@ -0,0 +1,108 @@
+use libtool to do all installing. do not use the manual file install as
+that'll copy files directly from the .libs/ subdir which might have rpaths
+that we do not want.
+
+--- xfsprogs-3.2.2/include/buildmacros
++++ xfsprogs-3.2.2/include/buildmacros
+@@ -70,18 +70,9 @@
+ # /usr/lib.
+ ifeq ($(ENABLE_SHARED),yes)
+ INSTALL_LTLIB_DEV = \
+- cd $(TOPDIR)/$(LIBNAME)/.libs; \
+- ../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \
+- ../$(INSTALL) -m 644 -T old_lib $(LIBNAME).lai $(PKG_LIB_DIR); \
+- ../$(INSTALL) -m 644 $(LIBNAME).lai $(PKG_LIB_DIR)/$(LIBNAME).la ; \
+- ../$(INSTALL) -m 755 -d $(PKG_ROOT_LIB_DIR); \
+- ../$(INSTALL) -T so_base $(LIBNAME).lai $(PKG_ROOT_LIB_DIR); \
+- if [ "x$(shell readlink -f $(PKG_LIB_DIR))" != \
+- "x$(shell readlink -f $(PKG_ROOT_LIB_DIR))"; ]; then \
+- ../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).a $(PKG_ROOT_LIB_DIR)/$(LIBNAME).a; \
+- ../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).la $(PKG_ROOT_LIB_DIR)/$(LIBNAME).la; \
+- ../$(INSTALL) -S $(PKG_ROOT_LIB_DIR)/$(LIBNAME).so $(PKG_LIB_DIR)/$(LIBNAME).so; \
+- fi
++ set -e; cd $(TOPDIR)/$(LIBNAME); \
++ $(INSTALL) -m 755 -d $(PKG_LIB_DIR); \
++ env -uDIST_ROOT $(LTINSTALL) $(TOPDIR)/$(LIBNAME)/$(LIBNAME).la $(DIST_ROOT)$(PKG_LIB_DIR)/$(LIBNAME).la
+ else
+ INSTALL_LTLIB_DEV = $(INSTALL_LTLIB_STATIC)
+ endif
+--- xfsprogs-3.2.2/libdisk/Makefile
++++ xfsprogs-3.2.2/libdisk/Makefile
+@@ -31,6 +31,7 @@
+ install: default
+
+ install-dev: default
++ $(INSTALL_LTLIB_DEV)
+
+ install-qa: install-dev
+
+--- xfsprogs-3.2.2/libhandle/Makefile
++++ xfsprogs-3.2.2/libhandle/Makefile
+@@ -20,7 +20,6 @@
+ include $(BUILDRULES)
+
+ install: default
+- $(INSTALL_LTLIB)
+
+ install-dev: default
+ $(INSTALL_LTLIB_DEV)
+--- xfsprogs-3.2.2/libxcmd/Makefile
++++ xfsprogs-3.2.2/libxcmd/Makefile
+@@ -34,6 +34,11 @@
+
+ include $(BUILDRULES)
+
+-install install-dev install-qa: default
++install: default
++
++ install-dev: default
++ $(INSTALL_LTLIB_DEV)
++
++install-qa: default
+
+ -include .ltdep
+--- xfsprogs-3.2.2/libxfs/Makefile
++++ xfsprogs-3.2.2/libxfs/Makefile
+@@ -86,6 +86,7 @@
+ install: default
+
+ install-dev: default
++ $(INSTALL_LTLIB_DEV)
+
+ install-qa: default
+
+--- xfsprogs-3.2.2/libxlog/Makefile
++++ xfsprogs-3.2.2/libxlog/Makefile
+@@ -12,6 +12,8 @@
+
+ CFILES = xfs_log_recover.c util.c
+
++LTLIBS = $(LIBUUID) $(LIBXFS)
++
+ # don't want to link xfs_repair with a debug libxlog.
+ DEBUG = -DNDEBUG
+
+@@ -19,6 +21,11 @@
+
+ include $(BUILDRULES)
+
+-install install-dev install-qa: default
++install: default
++
++install-dev: default
++ $(INSTALL_LTLIB_DEV)
++
++install-qa: default
+
+ -include .ltdep
+--- xfsprogs-3.2.2/Makefile
++++ xfsprogs-3.2.2/Makefile
+@@ -63,6 +63,8 @@
+ mkfs: libxfs
+ quota: libxcmd
+ repair: libxfs libxlog
++libxlog: libxfs
++libxlog-install-dev: libxfs-install-dev
+
+ ifneq ($(ENABLE_BLKID), yes)
+ mkfs: libdisk
diff --git a/sys-fs/xfsprogs/metadata.xml b/sys-fs/xfsprogs/metadata.xml
new file mode 100644
index 00000000..96a2d586
--- /dev/null
+++ b/sys-fs/xfsprogs/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+</pkgmetadata>
diff --git a/sys-fs/xfsprogs/xfsprogs-3.2.2-r99.ebuild b/sys-fs/xfsprogs/xfsprogs-3.2.2-r99.ebuild
new file mode 100644
index 00000000..c9216e37
--- /dev/null
+++ b/sys-fs/xfsprogs/xfsprogs-3.2.2-r99.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/xfsprogs/xfsprogs-3.2.2.ebuild,v 1.1 2014/12/15 10:01:52 polynomial-c Exp $
+
+EAPI="4"
+
+inherit eutils toolchain-funcs multilib
+
+DESCRIPTION="xfs filesystem utilities"
+HOMEPAGE="http://oss.sgi.com/projects/xfs/"
+SRC_URI="ftp://oss.sgi.com/projects/xfs/cmd_tars/${P}.tar.gz
+ ftp://oss.sgi.com/projects/xfs/previous/cmd_tars/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="libedit nls readline static static-libs"
+REQUIRED_USE="static? ( static-libs )"
+
+LIB_DEPEND=">=sys-apps/util-linux-2.17.2[static-libs(+)]
+ readline? ( sys-libs/readline[static-libs(+)] )
+ !readline? ( libedit? ( dev-libs/libedit[static-libs(+)] ) )"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
+ !<sys-fs/xfsdump-3"
+DEPEND="${RDEPEND}
+ static? (
+ ${LIB_DEPEND}
+ readline? ( sys-libs/ncurses[static-libs] )
+ )
+ nls? ( sys-devel/gettext )"
+
+pkg_setup() {
+ if use readline && use libedit ; then
+ ewarn "You have USE='readline libedit' but these are exclusive."
+ ewarn "Defaulting to readline; please disable this USE flag if you want libedit."
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-3.2.2-sharedlibs.patch
+ epatch "${FILESDIR}"/${PN}-3.2.2-musl-compat.patch
+ epatch "${FILESDIR}"/${PN}-3.2.2-add-limits-h.patch
+
+ sed -i \
+ -e "/^PKG_DOC_DIR/s:@pkg_name@:${PF}:" \
+ include/builddefs.in || die
+ sed -i \
+ -e '1iLLDFLAGS = -static' \
+ {estimate,fsr}/Makefile || die
+ sed -i \
+ -e "/LLDFLAGS/s:-static:$(use static && echo -all-static):" \
+ $(find -name Makefile) || die
+
+ # libdisk has broken blkid conditional checking
+ sed -i \
+ -e '/LIB_SUBDIRS/s:libdisk::' \
+ Makefile || die
+
+ # TODO: write a patch for configure.in to use pkg-config for the uuid-part
+ if use static && use readline ; then
+ sed -i \
+ -e 's|-lreadline|\0 -lncurses|' \
+ -e 's|-lblkid|\0 -luuid|' \
+ configure || die
+ fi
+}
+
+src_configure() {
+ export DEBUG=-DNDEBUG
+ export OPTIMIZER=${CFLAGS}
+ unset PLATFORM # if set in user env, this breaks configure
+
+ local myconf
+ if use static || use static-libs ; then
+ myconf+=" --enable-static"
+ else
+ myconf+=" --disable-static"
+ fi
+
+ econf \
+ --bindir=/usr/bin \
+ --libexecdir=/usr/$(get_libdir) \
+ $(use_enable nls gettext) \
+ $(use_enable readline) \
+ $(usex readline --disable-editline $(use_enable libedit editline)) \
+ ${myconf}
+
+ MAKEOPTS+=" V=1"
+}
+
+src_install() {
+ emake DIST_ROOT="${ED}" install
+ # parallel install fails on these targets for >=xfsprogs-3.2.0
+ emake -j1 DIST_ROOT="${ED}" install-{dev,qa}
+
+ # handle is for xfsdump, the rest for xfsprogs
+ gen_usr_ldscript -a xfs xlog
+ # removing unnecessary .la files if not needed
+ use static-libs || find "${ED}" -name '*.la' -delete
+}