commit:     d61bf15ea960700eb4a2eff05ebad194315ca655
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Mon May 11 14:03:13 2015 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Mon May 11 14:03:13 2015 +0000
URL:        https://gitweb.gentoo.org/proj/hardened-dev.git/commit/?id=d61bf15e

sys-fs/xfsdump: add missing defines and headers.  Bug #549116.

 .../xfsdump/files/xfsdump-3.0.4-no-symlink.patch   | 22 +++++++++++
 .../files/xfsdump-3.0.5-prompt-overflow.patch      | 14 +++++++
 .../xfsdump/files/xfsdump-3.1.4-compat-musl.patch  | 36 +++++++++++++++++
 sys-fs/xfsdump/metadata.xml                        |  5 +++
 sys-fs/xfsdump/xfsdump-3.1.4-r99.ebuild            | 45 ++++++++++++++++++++++
 5 files changed, 122 insertions(+)

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 0000000..014ca33
--- /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 0000000..053615c
--- /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 0000000..643fba6
--- /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 0000000..96a2d58
--- /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 0000000..c8c7302
--- /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
+}

Reply via email to