summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-java/commons-daemon')
-rw-r--r--dev-java/commons-daemon/ChangeLog10
-rw-r--r--dev-java/commons-daemon/commons-daemon-1.0.1-r2.ebuild67
-rw-r--r--dev-java/commons-daemon/files/1.0.1-capabilities-non-root.patch11
-rw-r--r--dev-java/commons-daemon/files/1.0.1-execve-self.patch10
-rw-r--r--dev-java/commons-daemon/files/digest-commons-daemon-1.0.1-r23
5 files changed, 100 insertions, 1 deletions
diff --git a/dev-java/commons-daemon/ChangeLog b/dev-java/commons-daemon/ChangeLog
index 4480a24289fe..99eae9b28dd2 100644
--- a/dev-java/commons-daemon/ChangeLog
+++ b/dev-java/commons-daemon/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for dev-java/commons-daemon
# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/commons-daemon/ChangeLog,v 1.28 2007/01/10 03:20:40 caster Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/commons-daemon/ChangeLog,v 1.29 2007/02/11 17:11:15 betelgeuse Exp $
+
+*commons-daemon-1.0.1-r2 (11 Feb 2007)
+
+ 11 Feb 2007; Petteri Räty <betelgeuse@gentoo.org>
+ +files/1.0.1-capabilities-non-root.patch, +files/1.0.1-execve-self.patch,
+ +commons-daemon-1.0.1-r2.ebuild:
+ Added patches from bug #162918. Thanks to Simone Piunno
+ <pioppo@ferrara.linux.it>.
10 Jan 2007; Vlastimil Babka <caster@gentoo.org>
-commons-daemon-1.0.1.ebuild:
diff --git a/dev-java/commons-daemon/commons-daemon-1.0.1-r2.ebuild b/dev-java/commons-daemon/commons-daemon-1.0.1-r2.ebuild
new file mode 100644
index 000000000000..15e0822f8f13
--- /dev/null
+++ b/dev-java/commons-daemon/commons-daemon-1.0.1-r2.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/commons-daemon/commons-daemon-1.0.1-r2.ebuild,v 1.1 2007/02/11 17:11:15 betelgeuse Exp $
+
+WANT_AUTOCONF=2.5
+inherit java-pkg-2 java-ant-2 eutils autotools
+
+DESCRIPTION="Tools to allow java programs to run as unix daemons"
+SRC_URI="mirror://apache/jakarta/commons/daemon/source/daemon-${PV}.tar.gz"
+HOMEPAGE="http://jakarta.apache.org/commons/daemon/"
+
+LICENSE="Apache-1.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
+IUSE="doc examples source"
+
+DEPEND=">=virtual/jdk-1.4
+ dev-java/ant-core
+ source? ( app-arch/zip )"
+RDEPEND=">=virtual/jre-1.4"
+
+S=${WORKDIR}/daemon-${PV}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # Submitted upstream to http://bugs.gentoo.org/show_bug.cgi?id=132563
+ epatch "${FILESDIR}/1.0.1-as-needed.patch"
+
+ # Fix fbsd building, from upstream svn, #157381
+ epatch "${FILESDIR}/1.0.1-fbsd.patch"
+
+ # https://issues.apache.org/jira/browse/DAEMON-93
+ epatch "${FILESDIR}/1.0.1-capabilities-non-root.patch"
+
+ # Already in trunk
+ epatch "${FILESDIR}/1.0.1-execve-self.patch"
+
+ cd "${S}/src/native/unix"
+ sed -e "s/powerpc/powerpc|powerpc64/g" -i support/apsupport.m4
+ eautoconf
+}
+
+src_compile() {
+ # compile native stuff
+ cd "${S}/src/native/unix"
+ econf || die "configure failed"
+ emake || die "make failed"
+
+ # compile java stuff
+ cd "${S}"
+ eant jar $(use_doc)
+}
+
+src_install() {
+ dobin src/native/unix/jsvc
+ java-pkg_dojar dist/${PN}.jar
+
+ dodoc README RELEASE-NOTES.txt *.html
+ use doc && java-pkg_dohtml -r dist/docs/*
+ if use examples; then
+ dodir /usr/share/doc/${PF}/examples
+ cp -R src/samples/* ${D}/usr/share/doc/${PF}/examples
+ fi
+ use source && java-pkg_dosrc src/java/* src/native/unix/native
+}
diff --git a/dev-java/commons-daemon/files/1.0.1-capabilities-non-root.patch b/dev-java/commons-daemon/files/1.0.1-capabilities-non-root.patch
new file mode 100644
index 000000000000..5a9566b91676
--- /dev/null
+++ b/dev-java/commons-daemon/files/1.0.1-capabilities-non-root.patch
@@ -0,0 +1,11 @@
+--- daemon-1.0.1/src/native/unix/native/jsvc-unix.c.orig 2007-01-20 12:08:52.000000000 +0100
++++ daemon-1.0.1/src/native/unix/native/jsvc-unix.c 2007-01-20 12:12:35.000000000 +0100
+@@ -475,7 +475,7 @@
+
+ #ifdef OS_LINUX
+ /* setuid()/setgid() only apply the current thread so we must do it now */
+- if (linuxset_user_group(args->user,uid,gid)!=0)
++ if (getuid()==0 && linuxset_user_group(args->user,uid,gid)!=0)
+ return(4);
+ #endif
+ /* Initialize the Java VM */
diff --git a/dev-java/commons-daemon/files/1.0.1-execve-self.patch b/dev-java/commons-daemon/files/1.0.1-execve-self.patch
new file mode 100644
index 000000000000..578d2e021e8f
--- /dev/null
+++ b/dev-java/commons-daemon/files/1.0.1-execve-self.patch
@@ -0,0 +1,10 @@
+--- daemon-1.0.1/src/native/unix/native/jsvc-unix.c.orig 2007-01-20 12:08:52.000000000 +0100
++++ daemon-1.0.1/src/native/unix/native/jsvc-unix.c 2007-01-20 13:15:43.000000000 +0100
+@@ -652,6 +652,7 @@
+ log_debug("Invoking w/ LD_LIBRARY_PATH=%s",getenv("LD_LIBRARY_PATH"));
+
+ argv[0]=args->procname;
++ execve("/proc/self/exe",argv,environ);
+ execve(old,argv,environ);
+ log_error("Cannot execute JSVC executor process");
+ return(1);
diff --git a/dev-java/commons-daemon/files/digest-commons-daemon-1.0.1-r2 b/dev-java/commons-daemon/files/digest-commons-daemon-1.0.1-r2
new file mode 100644
index 000000000000..3e3fd1923d9c
--- /dev/null
+++ b/dev-java/commons-daemon/files/digest-commons-daemon-1.0.1-r2
@@ -0,0 +1,3 @@
+MD5 df3eb5aafa53ca530843a09d40b8a1c0 daemon-1.0.1.tar.gz 301023
+RMD160 b77ffd3dbc40d18d867afd62015ba1aa05bd9c65 daemon-1.0.1.tar.gz 301023
+SHA256 177107b8d99cabdbcda58cec284a2e2ccb5063113cc1fdb1b672754d4652848c daemon-1.0.1.tar.gz 301023