diff --git a/.apache-commons-daemon.metadata b/.apache-commons-daemon.metadata new file mode 100644 index 0000000..65cdef4 --- /dev/null +++ b/.apache-commons-daemon.metadata @@ -0,0 +1 @@ +f633b117f8c8bd6c1858d02d4811ec4d1406b0f7 SOURCES/commons-daemon-1.0.13-src.tar.gz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5eb8138 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/commons-daemon-1.0.13-src.tar.gz diff --git a/SOURCES/0001-execve-path-warning.patch b/SOURCES/0001-execve-path-warning.patch new file mode 100644 index 0000000..3a9c4d1 --- /dev/null +++ b/SOURCES/0001-execve-path-warning.patch @@ -0,0 +1,32 @@ +From 0de57c78cbe1666fdf78ff6522b3b0ce18f12716 Mon Sep 17 00:00:00 2001 +From: Stanislav Ochotnicky +Date: Tue, 18 Jan 2011 14:46:21 +0100 +Subject: [PATCH 1/3] execve path warning + +--- + src/native/unix/native/jsvc-unix.c | 9 +++++++++ + 1 files changed, 9 insertions(+), 0 deletions(-) + +diff --git a/src/native/unix/native/jsvc-unix.c b/src/native/unix/native/jsvc-unix.c +index 1967f09..22967f1 100644 +--- a/src/native/unix/native/jsvc-unix.c ++++ b/src/native/unix/native/jsvc-unix.c +@@ -1015,6 +1015,15 @@ int main(int argc, char *argv[]) + char *tmp = NULL; + char *p1 = NULL; + char *p2 = NULL; ++ ++ /* We don't want to use a form of exec() that searches the ++ PATH, so require that argv[0] be either an absolute or ++ relative path. Error out if this isn't the case. */ ++ if (strchr(argv[0],'/') == NULL) { ++ log_error("JSVC re-exec requires execution with an absolute or relative path"); ++ return(1); ++ } ++ + + /* + * There is no need to change LD_LIBRARY_PATH +-- +1.7.6 + diff --git a/SOURCES/apache-commons-daemon-JAVA_OS.patch b/SOURCES/apache-commons-daemon-JAVA_OS.patch new file mode 100644 index 0000000..b67b56e --- /dev/null +++ b/SOURCES/apache-commons-daemon-JAVA_OS.patch @@ -0,0 +1,11 @@ +--- commons-daemon-1.0.12-src/src/native/unix/configure~ 2013-01-14 07:45:15.000000000 +0100 ++++ commons-daemon-1.0.12-src/src/native/unix/configure 2013-01-24 15:55:59.757193071 +0100 +@@ -2776,7 +2776,7 @@ + echo "${ECHO_T}jni_md.h found in $JAVA_HOME/$JAVA_INC" >&6 + INCLUDES="$INCLUDES -I$JAVA_HOME/include -I$JAVA_HOME/$JAVA_INC" + else +- INCLUDES="$INCLUDES -I$JAVA_HOME/include -I$JAVA_HOME/include/$supported_os" ++ INCLUDES="$INCLUDES -I$JAVA_HOME/include -I$JAVA_HOME/include/$JAVA_OS" + fi + + if test "$GCC" = "yes" diff --git a/SOURCES/apache-commons-daemon-aarch64.patch b/SOURCES/apache-commons-daemon-aarch64.patch new file mode 100644 index 0000000..c71ea03 --- /dev/null +++ b/SOURCES/apache-commons-daemon-aarch64.patch @@ -0,0 +1,30 @@ +*** commons-daemon-1.0.13-src/src/native/unix/support/apsupport.m4.orig Mon Nov 4 20:43:08 2013 +--- commons-daemon-1.0.13-src/src/native/unix/support/apsupport.m4 Mon Nov 4 20:42:57 2013 +*************** +*** 148,153 **** +--- 148,157 ---- + CFLAGS="$CFLAGS -DCPU=\\\"arm\\\"" + supported_os="arm" + HOST_CPU=arm;; ++ aarch64*) ++ CFLAGS="$CFLAGS -DCPU=\\\"aarch64\\\"" ++ supported_os="aarch64" ++ HOST_CPU=aarch64;; + *) + AC_MSG_RESULT([failed]) + AC_MSG_ERROR([Unsupported CPU architecture "$host_cpu"]);; +*** commons-daemon-1.0.13-src/src/native/unix/configure.orig Mon Nov 4 20:40:54 2013 +--- commons-daemon-1.0.13-src/src/native/unix/configure Mon Nov 4 20:41:27 2013 +*************** +*** 2637,2642 **** +--- 2637,2646 ---- + CFLAGS="$CFLAGS -DCPU=\\\"arm\\\"" + supported_os="arm" + HOST_CPU=arm;; ++ aarch64*) ++ CFLAGS="$CFLAGS -DCPU=\\\"aarch64\\\"" ++ supported_os="aarch64" ++ HOST_CPU=aarch64;; + *) + echo "$as_me:$LINENO: result: failed" >&5 + echo "${ECHO_T}failed" >&6 diff --git a/SOURCES/apache-commons-daemon-ppc64.patch b/SOURCES/apache-commons-daemon-ppc64.patch new file mode 100644 index 0000000..1419e9c --- /dev/null +++ b/SOURCES/apache-commons-daemon-ppc64.patch @@ -0,0 +1,40 @@ +diff -up commons-daemon-1.0.10-src/src/native/unix/configure.ppc64 commons-daemon-1.0.10-src/src/native/unix/configure +--- commons-daemon-1.0.10-src/src/native/unix/configure.ppc64 2012-08-17 15:50:17.060069518 +0200 ++++ commons-daemon-1.0.10-src/src/native/unix/configure 2012-08-17 15:51:23.540069517 +0200 +@@ -2566,8 +2566,14 @@ echo "$as_me: error: Unsupported operati + esac + case $host_cpu in + powerpc) +- CFLAGS="$CFLAGS -DCPU=\\\"$host_cpu\\\"" +- HOST_CPU=$host_cpu;; ++ CFLAGS="$CFLAGS -DCPU=\\\"ppc\\\"" ++ HOST_CPU=ppc;; ++ powerpc64) ++ CFLAGS="$CFLAGS -DCPU=\\\"ppc64\\\"" ++ HOST_CPU=ppc64;; ++ powerpc64le) ++ CFLAGS="$CFLAGS -DCPU=\\\"ppc64le\\\"" ++ HOST_CPU=ppc64le;; + sparc*) + CFLAGS="$CFLAGS -DCPU=\\\"$host_cpu\\\"" + HOST_CPU=$host_cpu;; +diff -up commons-daemon-1.0.10-src/src/native/unix/support/apsupport.m4.ppc64 commons-daemon-1.0.10-src/src/native/unix/support/apsupport.m4 +--- commons-daemon-1.0.10-src/src/native/unix/support/apsupport.m4.ppc64 2012-08-17 15:50:30.330069517 +0200 ++++ commons-daemon-1.0.10-src/src/native/unix/support/apsupport.m4 2012-08-17 15:51:33.280069517 +0200 +@@ -77,8 +77,14 @@ AC_DEFUN(AP_SUPPORTED_HOST,[ + esac + case $host_cpu in + powerpc) +- CFLAGS="$CFLAGS -DCPU=\\\"$host_cpu\\\"" +- HOST_CPU=$host_cpu;; ++ CFLAGS="$CFLAGS -DCPU=\\\"ppc\\\"" ++ HOST_CPU=ppc;; ++ powerpc64) ++ CFLAGS="$CFLAGS -DCPU=\\\"ppc64\\\"" ++ HOST_CPU=ppc64;; ++ powerpc64le) ++ CFLAGS="$CFLAGS -DCPU=\\\"ppc64le\\\"" ++ HOST_CPU=ppc64le;; + sparc*) + CFLAGS="$CFLAGS -DCPU=\\\"$host_cpu\\\"" + HOST_CPU=$host_cpu;; diff --git a/SOURCES/apache-commons-daemon-s390x.patch b/SOURCES/apache-commons-daemon-s390x.patch new file mode 100644 index 0000000..c54c245 --- /dev/null +++ b/SOURCES/apache-commons-daemon-s390x.patch @@ -0,0 +1,28 @@ +diff -up commons-daemon-1.0.10-src/src/native/unix/configure.s390x commons-daemon-1.0.10-src/src/native/unix/configure +--- commons-daemon-1.0.10-src/src/native/unix/configure.s390x 2012-04-23 11:55:56.000000000 +0200 ++++ commons-daemon-1.0.10-src/src/native/unix/configure 2012-04-23 11:57:18.000000000 +0200 +@@ -2671,6 +2671,10 @@ echo "$as_me: error: Unsupported operati + CFLAGS="$CFLAGS -DCPU=\\\"s390\\\"" + supported_os="s390" + HOST_CPU=s390;; ++ s390x) ++ CFLAGS="$CFLAGS -DCPU=\\\"s390x\\\"" ++ supported_os="s390x" ++ HOST_CPU=s390x;; + arm*) + CFLAGS="$CFLAGS -DCPU=\\\"arm\\\"" + supported_os="arm" +diff -up commons-daemon-1.0.10-src/src/native/unix/support/apsupport.m4.s390x commons-daemon-1.0.10-src/src/native/unix/support/apsupport.m4 +--- commons-daemon-1.0.10-src/src/native/unix/support/apsupport.m4.s390x 2012-04-23 11:56:04.000000000 +0200 ++++ commons-daemon-1.0.10-src/src/native/unix/support/apsupport.m4 2012-04-23 11:56:41.000000000 +0200 +@@ -140,6 +140,10 @@ AC_DEFUN(AP_SUPPORTED_HOST,[ + CFLAGS="$CFLAGS -DCPU=\\\"s390\\\"" + supported_os="s390" + HOST_CPU=s390;; ++ s390x) ++ CFLAGS="$CFLAGS -DCPU=\\\"s390x\\\"" ++ supported_os="s390x" ++ HOST_CPU=s390x;; + arm*) + CFLAGS="$CFLAGS -DCPU=\\\"arm\\\"" + supported_os="arm" diff --git a/SPECS/apache-commons-daemon.spec b/SPECS/apache-commons-daemon.spec new file mode 100644 index 0000000..0caea2d --- /dev/null +++ b/SPECS/apache-commons-daemon.spec @@ -0,0 +1,253 @@ + +%global base_name daemon +%global short_name commons-%{base_name} + +Name: apache-%{short_name} +Version: 1.0.13 +Release: 7%{?dist} +Summary: Defines API to support an alternative invocation mechanism +License: ASL 2.0 +Group: Applications/System +URL: http://commons.apache.org/%{base_name} +Source0: http://archive.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz +Patch0: 0001-execve-path-warning.patch +Patch1: apache-commons-daemon-JAVA_OS.patch +Patch2: apache-commons-daemon-s390x.patch +Patch3: apache-commons-daemon-ppc64.patch +Patch4: apache-commons-daemon-aarch64.patch +BuildRequires: maven-local +BuildRequires: java-devel >= 1:1.6.0 +BuildRequires: jpackage-utils +BuildRequires: apache-commons-parent >= 26-7 +BuildRequires: maven-surefire-provider-junit +BuildRequires: xmlto + + +Provides: jakarta-%{short_name} = 1:%{version}-%{release} +Obsoletes: jakarta-%{short_name} <= 1:1.0.1 + + +%description +The scope of this package is to define an API in line with the current +Java Platform APIs to support an alternative invocation mechanism +which could be used instead of the public static void main(String[]) +method. This specification covers the behavior and life cycle of what +we define as Java daemons, or, in other words, non interactive +Java applications. + +%package jsvc +Summary: Java daemon launcher +Group: Applications/System +Provides: jsvc = 1:%{version}-%{release} + +Provides: jakarta-%{short_name}-jsvc = 1:%{version}-%{release} +Obsoletes: jakarta-%{short_name}-jsvc <= 1:1.0.1 + +%description jsvc +%{summary}. + +%package javadoc +Summary: API documentation for %{name} +Group: Documentation +Requires: jpackage-utils +BuildArch: noarch + +Provides: jakarta-%{short_name}-javadoc = 1:%{version}-%{release} +Obsoletes: jakarta-%{short_name}-javadoc <= 1:1.0.1 + +%description javadoc +%{summary}. + + +%prep +%setup -q -n %{short_name}-%{version}-src +%patch0 -p1 -b .execve +%patch1 -p1 -b .java_os +%patch2 -p1 -b .s390x +%patch3 -p1 -b .ppc64 +%patch4 -p1 -b .aarch64 + +# remove java binaries from sources +rm -rf src/samples/build/ + +chmod 644 src/samples/* +cd src/native/unix +xmlto man man/jsvc.1.xml + + +%build + +# build native jsvc +pushd src/native/unix +%configure --with-java=%{java_home} +# this is here because 1.0.2 archive contains old *.o +make clean +make %{?_smp_mflags} +popd + +# build jars +%mvn_file : %{short_name} %{name} +%mvn_alias : org.apache.commons:%{short_name} +%mvn_build + + +%install +# install native jsvc +install -Dpm 755 src/native/unix/jsvc $RPM_BUILD_ROOT%{_bindir}/jsvc +install -Dpm 644 src/native/unix/jsvc.1 $RPM_BUILD_ROOT%{_mandir}/man1/jsvc.1 + +%mvn_install + + +%files -f .mfiles +%doc LICENSE.txt PROPOSAL.html NOTICE.txt RELEASE-NOTES.txt src/samples +%doc src/docs/* + + +%files jsvc +%doc LICENSE.txt NOTICE.txt +%{_bindir}/jsvc +%{_mandir}/man1/jsvc.1* + + +%files javadoc -f .mfiles-javadoc +%doc LICENSE.txt NOTICE.txt + + +%changelog +* Wed Aug 23 2017 Mikolaj Izdebski - 1.0.13-7 +- Correct host-cpu values on PowerPC + +* Fri Jan 24 2014 Daniel Mach - 1.0.13-6 +- Mass rebuild 2014-01-24 + +* Fri Dec 27 2013 Daniel Mach - 1.0.13-5 +- Mass rebuild 2013-12-27 + +* Mon Nov 11 2013 Stanislav Ochotnicky - 1.0.13-4 +- Add aarch64 support patch +- Resolves: rhbz#1028109 + +* Fri Sep 20 2013 Mikolaj Izdebski - 1.0.13-3 +- Add BuildRequires on apache-commons-parent >= 26-7 + +* Fri Jun 28 2013 Mikolaj Izdebski - 1.0.13-2 +- Rebuild to regenerate API documentation +- Resolves: CVE-2013-1571 + +* Wed Feb 13 2013 Mikolaj Izdebski - 1.0.13-1 +- Update to upstream version 1.0.13 + +* Wed Feb 06 2013 Java SIG - 1.0.12-2 +- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild +- Replace maven BuildRequires with maven-local + +* Thu Jan 24 2013 Mikolaj Izdebski - 1.0.12-1 +- Update to upstream version 1.0.12 +- Install NOTICE files + +* Tue Jan 15 2013 Michal Srb - 1.0.11-2 +- Build with xmvn +- Spec file cleanup + +* Tue Dec 11 2012 Mikolaj Izdebski - 1.0.11-1 +- Update to upstream version 1.0.11 + +* Fri Aug 17 2012 Karsten Hopp 1.0.10-5 +- add ppc64 as known arch + +* Wed Jul 18 2012 Fedora Release Engineering - 1.0.10-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Apr 23 2012 Dan Horák - 1.0.10-3 +- add s390x as known arch + +* Thu Mar 29 2012 Dennis Gilmore - 1.0.10-2 +- $supported_os and $JAVA_OS in configure do not always match +- on arches that override supported_os to be the arch we can not find headers + +* Thu Jan 26 2012 Stanislav Ochotnicky - 1.0.10-1 +- Update to latest upstream (1.0.10) +- Several bugfixes concerning libcap and building upstream + +* Thu Jan 26 2012 Stanislav Ochotnicky - 1.0.8-1 +- Update to latest upstream (1.0.8) +- Drop s390/ppc patches (upstream seems to already include them) + +* Thu Jan 12 2012 Fedora Release Engineering - 1.0.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Aug 15 2011 Stanislav Ochotnicky - 1.0.7-1 +- Update to latest upstream (1.0.7) +- Fix CVE-2011-2729 + +* Wed Jul 20 2011 Stanislav Ochotnicky - 1.0.6-1 +- Update to latest upstream (1.0.6) +- Cleanups according to new guidelines + +* Mon May 9 2011 Stanislav Ochotnicky - 1.0.5-5 +- Use mvn-rpmbuild instead of mvn-local (changes in maven) + +* Wed May 4 2011 Dan Horák - 1.0.5-4 +- updated the s390x patch + +* Mon Feb 07 2011 Fedora Release Engineering - 1.0.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Tue Feb 1 2011 Stanislav Ochotnicky - 1.0.5-2 +- Fix bug 669259 (execve warning segfault) + +* Tue Jan 18 2011 Stanislav Ochotnicky - 1.0.5-1 +- Update to latest version +- Use maven 3 to build +- Versionless jars & javadocs +- Use apache-commons-parent for BR + +* Tue Oct 26 2010 Chris Spike 1.0.4-2 +- Added fix to remove java binaries from sources + +* Tue Oct 26 2010 Chris Spike 1.0.4-1 +- Updated to 1.0.4 + +* Fri Oct 22 2010 Chris Spike 1.0.3-1 +- Updated to 1.0.3 +- Cleaned up BRs + +* Thu Jul 8 2010 Stanislav Ochotnicky - 1.0.2-4 +- Add license to javadoc subpackage + +* Fri Jun 4 2010 Stanislav Ochotnicky - 1.0.2-3 +- Make javadoc subpackage noarch + +* Tue Jun 1 2010 Stanislav Ochotnicky - 1.0.2-2 +- Fix add_to_maven_depmap call +- Added depmap for old groupId +- Unified use of `install` + +* Wed May 12 2010 Stanislav Ochotnicky - 1.0.2-1 +- Rename and rebase to apache-commons-daemon +- Get rid of gcj, native conditional compilation +- Build with maven +- Update patches to cleanly apply on new version, remove unneeded +- Clean up whole spec + +* Fri Jul 24 2009 Fedora Release Engineering - 1:1.0.1-8.8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Tue Mar 03 2009 Karsten Hopp 1.0.1-7.8 +- ppc needs a similar patch + +* Tue Mar 03 2009 Karsten Hopp 1.0.1-7.7 +- add configure patch for s390x + +* Wed Feb 25 2009 Fedora Release Engineering - 1:1.0.1-7.6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Wed Jul 9 2008 Tom "spot" Callaway - 1:1.0.1-6.6 +- drop repotag + +* Fri Feb 08 2008 Permaine Cheung - 1:1.0.1-6jpp.5 +- Add configure patch for ia64 from Doug Chapman + +* Mon Sep 24 2007 Permaine Cheung - 1:1.0.1-6jpp.4 +- Add execve path warning patch from James Ralston