summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorThomas Sachau <tommy@gentoo.org>2010-12-15 17:25:09 +0000
committerThomas Sachau <tommy@gentoo.org>2010-12-15 17:25:09 +0000
commit10306b302443290a542185cf07d838bf08484a9a (patch)
treef0dc6f817a16d3b19fefb31e15ceffac9b44e9a8 /sys-fs
parentReturn false for non-existant cpv. Stops backtrace (diff)
downloadgentoo-2-10306b302443290a542185cf07d838bf08484a9a.tar.gz
gentoo-2-10306b302443290a542185cf07d838bf08484a9a.tar.bz2
gentoo-2-10306b302443290a542185cf07d838bf08484a9a.zip
proxy commit: Revision bump, fixes bug 347712
(Portage version: 2.2.0_alpha7-r1/cvs/Linux x86_64)
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/dmraid/ChangeLog9
-rw-r--r--sys-fs/dmraid/dmraid-1.0.0_rc16-r3.ebuild94
-rw-r--r--sys-fs/dmraid/files/dmraid-1.0.0_rc16-static-build-fixes.patch110
-rw-r--r--sys-fs/dmraid/metadata.xml7
4 files changed, 219 insertions, 1 deletions
diff --git a/sys-fs/dmraid/ChangeLog b/sys-fs/dmraid/ChangeLog
index bf3e704ae04f..75c1382ef625 100644
--- a/sys-fs/dmraid/ChangeLog
+++ b/sys-fs/dmraid/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-fs/dmraid
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/dmraid/ChangeLog,v 1.23 2010/08/17 19:47:55 tommy Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/dmraid/ChangeLog,v 1.24 2010/12/15 17:25:09 tommy Exp $
+
+*dmraid-1.0.0_rc16-r3 (15 Dec 2010)
+
+ 15 Dec 2010; Thomas Sachau (Tommy[D]) <tommy@gentoo.org>
+ +dmraid-1.0.0_rc16-r3.ebuild,
+ +files/dmraid-1.0.0_rc16-static-build-fixes.patch:
+ proxy commit: Revision bump, fixes bug 347712
*dmraid-1.0.0_rc16-r2 (17 Aug 2010)
diff --git a/sys-fs/dmraid/dmraid-1.0.0_rc16-r3.ebuild b/sys-fs/dmraid/dmraid-1.0.0_rc16-r3.ebuild
new file mode 100644
index 000000000000..6d8019a52751
--- /dev/null
+++ b/sys-fs/dmraid/dmraid-1.0.0_rc16-r3.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/dmraid/dmraid-1.0.0_rc16-r3.ebuild,v 1.1 2010/12/15 17:25:09 tommy Exp $
+
+EAPI="2"
+
+inherit autotools linux-info flag-o-matic
+
+MY_PV=${PV/_/.}-3
+
+DESCRIPTION="Device-mapper RAID tool and library"
+HOMEPAGE="http://people.redhat.com/~heinzm/sw/dmraid/"
+SRC_URI="http://people.redhat.com/~heinzm/sw/dmraid/src/${PN}-${MY_PV}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="dietlibc intel_led klibc led mini static"
+
+RDEPEND="|| ( >=sys-fs/lvm2-2.02.45
+ sys-fs/device-mapper )
+ klibc? ( dev-libs/klibc )
+ dietlibc? ( dev-libs/dietlibc )"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig"
+
+S=${WORKDIR}/${PN}/${MY_PV}/${PN}
+
+pkg_setup() {
+ if kernel_is lt 2 6 ; then
+ ewarn "You are using a kernel < 2.6"
+ ewarn "DMraid uses recently introduced Device-Mapper features."
+ ewarn "These might be unavailable in the kernel you are running now."
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-undo-p-rename.patch \
+ "${FILESDIR}"/${P}-return-all-sets.patch \
+ "${FILESDIR}"/${P}-static-build-fixes.patch
+ # pkg_check_modules is not in aclocal.m4 by default, and eautoreconf doesnt add it
+ elog "Appending pkg.m4 from system to aclocal.m4"
+ cat "${ROOT}"/usr/share/aclocal/pkg.m4 >>"${S}"/aclocal.m4 || die "Could not append pkg.m4"
+ eautoreconf
+
+ elog "Creating prepatched source archive for use with Genkernel"
+ # archive the patched source for use with genkernel
+ cd "${WORKDIR}"
+ mkdir -p "tmp/${PN}"
+ cp -a "${PN}/${MY_PV}/${PN}" "tmp/${PN}"
+ mv "tmp/${PN}/${PN}" "tmp/${PN}/${MY_PV}"
+ cd tmp
+ tar -jcf ${PN}-${MY_PV}-prepatched.tar.bz2 ${PN} || die
+ mv ${PN}-${MY_PV}-prepatched.tar.bz2 ..
+}
+
+src_configure() {
+ local mylibc
+ if use klibc && use dietlibc; then
+ ewarn "Cannot compile against both klibc and dietlibc -- choosing klibc."
+ mylibc="--enable-klibc --disable-dietlibc"
+ else
+ mylibc="$(use_enable klibc) $(use_enable dietlibc)"
+ fi
+ econf --with-usrlibdir='${prefix}'/$(get_libdir) \
+ $(use_enable static static_link) \
+ $(use_enable mini) \
+ $(use_enable led) \
+ $(use_enable intel_led) \
+ ${mylibc}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc CHANGELOG README TODO KNOWN_BUGS doc/* || die "dodoc failed"
+ insinto /usr/share/${PN}
+ doins "${WORKDIR}"/${PN}-${MY_PV}-prepatched.tar.bz2 || die
+}
+
+pkg_postinst() {
+ elog "For booting Gentoo from Device-Mapper RAID you can use Genkernel."
+ elog " "
+ elog "Genkernel will generate the kernel and the initrd with a statically "
+ elog "linked dmraid binary (its own version which may not be the same as this version):"
+ elog "\t emerge -av sys-kernel/genkernel"
+ elog "\t genkernel --dmraid all"
+ elog " "
+ elog "If you would rather use this version of DMRAID with Genkernel, update the following"
+ elog "in /etc/genkernel.conf:"
+ elog "\t DMRAID_VER=\"${MY_PV}\""
+ elog "\t DMRAID_SRCTAR=\"/usr/share/${PN}/${PN}-${MY_PV}-prepatched.tar.bz2\""
+ elog " "
+ ewarn "DMRAID should be safe to use, but no warranties can be given"
+}
diff --git a/sys-fs/dmraid/files/dmraid-1.0.0_rc16-static-build-fixes.patch b/sys-fs/dmraid/files/dmraid-1.0.0_rc16-static-build-fixes.patch
new file mode 100644
index 000000000000..298811701e4e
--- /dev/null
+++ b/sys-fs/dmraid/files/dmraid-1.0.0_rc16-static-build-fixes.patch
@@ -0,0 +1,110 @@
+--- tools/Makefile.in.old 2010-05-31 07:18:31.000000000 -0400
++++ tools/Makefile.in 2010-12-13 13:15:22.000000000 -0500
+@@ -60,17 +60,23 @@
+ ifeq ("@KLIBC@", "no")
+ ifeq ("@STATIC_LINK@", "no")
+ LDFLAGS += -rdynamic
++ MYLIBOBJ=$(top_builddir)/lib/libdmraid.so
+ else
+ LDFLAGS += -static
++ MYLIBOBJ=$(top_builddir)/lib/libdmraid.a
++ DMRAIDLIBS += \
++ $(DEVMAPPEREVENT_LIBS) \
++ $(DEVMAPPER_LIBS) \
++ $(DL_LIBS)
+ endif
+ endif
+
+ .PHONY: install_dmraid_tools
+
+-dmraid: $(OBJECTS) $(top_builddir)/lib/libdmraid.a
++dmraid: $(OBJECTS) $(MYLIBOBJ)
+ $(CC) -o $@ $(OBJECTS) $(LDFLAGS) -L$(top_builddir)/lib $(DMRAIDLIBS) $(LIBS)
+
+-dmevent_tool: $(OBJECTS2) $(top_builddir)/lib/libdmraid.a
++dmevent_tool: $(OBJECTS2) $(MYLIBOBJ)
+ $(CC) -o $@ $(OBJECTS2) $(INCLUDES) $(LDFLAGS) -L$(top_builddir)/lib \
+ $(DMEVENTTOOLLIBS) $(DMRAIDLIBS) $(LIBS)
+
+--- lib/Makefile.in.old 2010-10-27 07:31:46.000000000 -0400
++++ lib/Makefile.in 2010-12-13 13:04:16.000000000 -0500
+@@ -60,11 +60,11 @@
+ USRLIB_RELPATH = $(shell echo $(abspath $(usrlibdir) $(libdir)) | \
+ $(AWK) -f $(top_srcdir)/tools/relpath.awk)
+
+-TARGETS = $(LIB_STATIC)
++TARGETS = $(LIB_STATIC) $(LIB_SHARED) $(LIB_EVENTS_SHARED)
+
+ ifeq ("@KLIBC@", "no")
+ ifeq ("@STATIC_LINK@", "no")
+- TARGETS += $(LIB_SHARED) $(LIB_EVENTS_SHARED)
++ TARGETS = $(LIB_SHARED) $(LIB_EVENTS_SHARED)
+ endif
+ endif
+
+--- configure.in 2010-05-31 07:18:30.000000000 -0400
++++ configure.in.new 2010-12-07 13:30:40.000000000 -0500
+@@ -155,6 +155,15 @@
+ Default is dynamic linking]),
+ [STATIC_LINK=$enableval], [STATIC_LINK=no])
+
++if test "x$STATIC_LINK" != "xno"; then
++ if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
++ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
++ fi
++ PKG_CONFIG="${PKG_CONFIG} --static"
++ ac_cv_env_PKG_CONFIG_set=set
++fi
++PKG_PROG_PKG_CONFIG([0.2])
++
+ dnl Enables shared libdmraid
+ AC_ARG_ENABLE(shared_lib,
+ AC_HELP_STRING([--enable-shared_lib], [Use this to generate shared
+@@ -248,23 +257,31 @@
+ AC_HELP_STRING([--with-devmapper-prefix=PFX],
+ [Where is devmapper library installed]),
+ [DEVMAPPER_LIBS="-L$withval/lib"
+- DEVMAPPER_CFLAGS="-I$withval/include"],
++ DEVMAPPER_CFLAGS="-I$withval/include"
++ dmprefix=$withval],
+ [DEVMAPPER_LIBS=
+- DEVMAPPER_CFLAGS=])
+-save_LDFLAGS=$LDFLAGS
+-save_CPPFLAGS=$CPPFLAGS
+-LDFLAGS="$LDFLAGS $DEVMAPPER_LIBS"
+-CPPFLAGS="$CPPFLAGS $DEVMAPPER_CFLAGS"
+-AC_CHECK_LIB(devmapper-event, dm_event_handler_create,
+- [DEVMAPPEREVENT_LIBS="$DEVMAPPER_LIBS -ldevmapper-event"],
+- [AC_MSG_ERROR([device-mapper-event library is either missing or is too old and badly linked])])
+-AC_CHECK_LIB(devmapper, dm_task_set_name,
+- [DEVMAPPER_LIBS="$DEVMAPPER_LIBS -ldevmapper"],
+- [AC_MSG_ERROR([device-mapper library is missing])])
+-AC_CHECK_HEADERS(libdevmapper.h libdevmapper-event.h,,
+- [AC_MSG_ERROR([Missing headers device-mapper headers])])
+-CPPFLAGS=$save_CPPFLAGS
+-LDFLAGS=$save_LDFLAGS
++ DEVMAPPER_CFLAGS=
++ dmprefix=no])
++if test "x$dmprefix" = xno ; then
++ PKG_CHECK_MODULES([DEVMAPPER],[devmapper],
++ [PKG_CHECK_MODULES([DEVMAPPEREVENT],[devmapper-event])
++ ])
++else
++ save_LDFLAGS=$LDFLAGS
++ save_CPPFLAGS=$CPPFLAGS
++ LDFLAGS="$LDFLAGS $DEVMAPPER_LIBS"
++ CPPFLAGS="$CPPFLAGS $DEVMAPPER_CFLAGS"
++ AC_CHECK_LIB(devmapper-event, dm_event_handler_create,
++ [DEVMAPPEREVENT_LIBS="$DEVMAPPER_LIBS -ldevmapper-event"],
++ [AC_MSG_ERROR([device-mapper-event library is either missing or is too old and badly linked])])
++ AC_CHECK_LIB(devmapper, dm_task_set_name,
++ [DEVMAPPER_LIBS="$DEVMAPPER_LIBS -ldevmapper"],
++ [AC_MSG_ERROR([device-mapper library is missing])])
++ AC_CHECK_HEADERS(libdevmapper.h libdevmapper-event.h,,
++ [AC_MSG_ERROR([Missing headers device-mapper headers])])
++ CPPFLAGS=$save_CPPFLAGS
++ LDFLAGS=$save_LDFLAGS
++fi
+
+ VERSION=$srcdir/tools/VERSION
+ DMRAID_LIB_MAJOR=$(cut -d. -f1 $VERSION) \ No newline at end of file
diff --git a/sys-fs/dmraid/metadata.xml b/sys-fs/dmraid/metadata.xml
index 7879ce6c954a..e690154a5e21 100644
--- a/sys-fs/dmraid/metadata.xml
+++ b/sys-fs/dmraid/metadata.xml
@@ -2,6 +2,13 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>no-herd</herd>
+ <use>
+ <flag name='dietlibc'>Compile against <pkg>dev-libs/dietlibc</pkg></flag>
+ <flag name='intel_led'>Enable Intel LED support</flag>
+ <flag name='klibc'>Compile against <pkg>dev-libs/klibc</pkg></flag>
+ <flag name='led'>Enable LED support</flag>
+ <flag name='mini'>Create a minimal binary suitable for early boot environments</flag>
+ </use>
<maintainer>
<email>ian@aerobiology.ca</email>
<name>Ian Stakenvicius</name>