rpms/apache-commons-daemon/devel apache-commons-daemon-execve-path-warning.patch, NONE, 1.1 apache-commons-daemon-ppc64-configure.patch, NONE, 1.1 apache-commons-daemon-s390x-configure.patch, NONE, 1.1 apache-commons-daemon.spec, NONE, 1.1 import.log, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Stanislav Ochotnicky sochotni at fedoraproject.org
Tue Jun 8 07:48:13 UTC 2010


Author: sochotni

Update of /cvs/pkgs/rpms/apache-commons-daemon/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv20194/devel

Modified Files:
	.cvsignore sources 
Added Files:
	apache-commons-daemon-execve-path-warning.patch 
	apache-commons-daemon-ppc64-configure.patch 
	apache-commons-daemon-s390x-configure.patch 
	apache-commons-daemon.spec import.log 
Log Message:
Initial commit after rename from jakarta-commons-daemon



apache-commons-daemon-execve-path-warning.patch:
 jsvc-unix.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

--- NEW FILE apache-commons-daemon-execve-path-warning.patch ---
>From f1a95250e28d69acf85819ad8a792c39f8b0d393 Mon Sep 17 00:00:00 2001
From: Stanislav Ochotnicky <sochotnicky at redhat.com>
Date: Tue, 11 May 2010 13:29:15 +0200
Subject: [PATCH 1/3] Patch to force absolute or relative paths (no PATH searching)

---
 src/native/unix/native/jsvc-unix.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/native/unix/native/jsvc-unix.c b/src/native/unix/native/jsvc-unix.c
index 6f39365..abbebb7 100644
--- a/src/native/unix/native/jsvc-unix.c
+++ b/src/native/unix/native/jsvc-unix.c
@@ -702,6 +702,16 @@ int main(int argc, char *argv[]) {
         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.  */
+        tmp=strchr(oldpath,'/');
+        if (tmp==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
          * if we were not able to find a path to libjvm.so
-- 
1.6.6.1


apache-commons-daemon-ppc64-configure.patch:
 configure          |    5 ++++-
 support/config.sub |   13 +++++++++----
 2 files changed, 13 insertions(+), 5 deletions(-)

--- NEW FILE apache-commons-daemon-ppc64-configure.patch ---
>From 9e535d207d52ed4dd4337e91ffc14068401f3d31 Mon Sep 17 00:00:00 2001
From: Stanislav Ochotnicky <sochotnicky at redhat.com>
Date: Tue, 11 May 2010 14:05:57 +0200
Subject: [PATCH 2/3] Add support for 64bin PPC architectures to configure

---
 src/native/unix/configure          |    5 ++++-
 src/native/unix/support/config.sub |   12 +++++++++---
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/src/native/unix/configure b/src/native/unix/configure
index 8674972..a9284c0 100755
--- a/src/native/unix/configure
+++ b/src/native/unix/configure
@@ -2979,7 +2979,10 @@ $as_echo "$as_me: error: Unsupported operating system \"$host_os\"" >&2;}
     ;;
   esac
   case $host_cpu in
-  powerpc)
+  powerpc*)
+    CFLAGS="$CFLAGS -DCPU=\\\"$host_cpu\\\""
+    HOST_CPU=$host_cpu;;
+  ppc*)
     CFLAGS="$CFLAGS -DCPU=\\\"$host_cpu\\\""
     HOST_CPU=$host_cpu;;
   sparc*)
diff --git a/src/native/unix/support/config.sub b/src/native/unix/support/config.sub
index 93a3a14..449f3b1 100755
--- a/src/native/unix/support/config.sub
+++ b/src/native/unix/support/config.sub
@@ -225,7 +225,7 @@ case $basic_machine in
 		| alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
 		| alphaev6[78] \
 		| we32k | ns16k | clipper | i370 | sh | sh[34] \
-		| powerpc | powerpcle \
+		| powerpc | powerpc64 | powerpcle \
 		| 1750a | dsp16xx | pdp10 | pdp11 \
 		| mips16 | mips64 | mipsel | mips64el \
 		| mips64orion | mips64orionel | mipstx39 | mipstx39el \
@@ -272,7 +272,8 @@ case $basic_machine in
 	      | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
 	      | clipper-* | orion-* \
 	      | sparclite-* | pdp10-* | pdp11-* | sh-* | sh[34]-* | sh[34]eb-* \
-	      | powerpc-* | powerpcle-* | sparc64-* | sparcv9-* | sparcv9b-* | sparc86x-* \
+	      | powerpc-* | powerpc64-* | powerpcle-* \
+              | sparc64-* | sparcv9-* | sparcv9b-* | sparc86x-* \
 	      | mips16-* | mips64-* | mipsel-* \
 	      | mips64el-* | mips64orion-* | mips64orionel-* \
 	      | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
@@ -718,9 +719,14 @@ case $basic_machine in
 	power)	basic_machine=power-ibm
 		;;
 	ppc)	basic_machine=powerpc-unknown
-	        ;;
+		;;
+	ppc64)	basic_machine=powerpc64-unknown
+		;;
 	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
+	ppc64-*)
+		basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	ppcle | powerpclittle | ppc-le | powerpc-little)
 		basic_machine=powerpcle-unknown
 	        ;;
-- 
1.6.6.1


apache-commons-daemon-s390x-configure.patch:
 configure |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

--- NEW FILE apache-commons-daemon-s390x-configure.patch ---
>From 18a2855ac81518c42988feb0a089e2949b246e40 Mon Sep 17 00:00:00 2001
From: Stanislav Ochotnicky <sochotnicky at redhat.com>
Date: Wed, 12 May 2010 11:01:31 +0200
Subject: [PATCH 3/3] Add support for s390x to configure

---
 src/native/unix/configure |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/native/unix/configure b/src/native/unix/configure
index a9284c0..f7f9b9a 100755
--- a/src/native/unix/configure
+++ b/src/native/unix/configure
@@ -3025,10 +3025,10 @@ $as_echo "$as_me: error: Unsupported operating system \"$host_os\"" >&2;}
     CFLAGS="$CFLAGS -DCPU=\\\"ia64\\\""
     supported_os="ia64"
     HOST_CPU=ia64;;
-  s390)
-    CFLAGS="$CFLAGS -DCPU=\\\"s390\\\""
-    supported_os="s390"
-    HOST_CPU=s390;;
+  s390*)
+    CFLAGS="$CFLAGS -DCPU=\\\"$host_cpu\\\""
+    supported_os="$host_cpu"
+    HOST_CPU=$host_cpu;;
   *)
     { $as_echo "$as_me:$LINENO: result: failed" >&5
 $as_echo "failed" >&6; }
-- 
1.6.6.1



--- NEW FILE apache-commons-daemon.spec ---

%global base_name   daemon
%global short_name  commons-%{base_name}

Name:           apache-%{short_name}
Version:        1.0.2
Release:        3%{?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:         %{name}-execve-path-warning.patch
Patch1:         %{name}-ppc64-configure.patch
Patch2:         %{name}-s390x-configure.patch
BuildRequires:  java-devel >= 1:1.6.0
BuildRequires:  jpackage-utils >= 0:1.7.2
BuildRequires:  maven-plugin-bundle
BuildRequires:  maven-surefire-maven-plugin
BuildRequires:  maven-surefire-provider-junit
BuildRequires:  maven-doxia-sitetools
BuildRequires:  maven2-plugin-assembly
BuildRequires:  maven2-plugin-antrun
BuildRequires:  maven2-plugin-compiler
BuildRequires:  maven2-plugin-idea
BuildRequires:  maven2-plugin-install
BuildRequires:  maven2-plugin-jar
BuildRequires:  maven2-plugin-javadoc
BuildRequires:  maven2-plugin-resources
BuildRequires:  xmlto

Requires:       java >= 1:1.6.0
Requires:       jpackage-utils >= 0:1.6
Requires(post):    jpackage-utils
Requires(postun):  jpackage-utils

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

# This should go away with F-17
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

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 .ppc
%patch2 -p1 -b .s390

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
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
mkdir -p $MAVEN_REPO_LOCAL
mvn-jpp -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
    install javadoc:javadoc



%install
rm -rf $RPM_BUILD_ROOT

# 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

# jars
install -Dpm 644 target/%{short_name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar

pushd $RPM_BUILD_ROOT%{_javadir}
for jar in *-%{version}*; do
    ln -sf ${jar} `echo $jar| sed "s|apache-||g"`
    ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
    ln -sf ${jar} `echo $jar| sed "s|apache-\(.*\)-%{version}|\1|g"`
done
popd # come back from javadir

# pom
install -Dpm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{short_name}.pom
%add_to_maven_depmap org.apache.commons %{short_name} %{version} JPP %{short_name}

# following line is only for backwards compatibility. New packages
# should use proper groupid org.apache.commons and also artifactid
%add_to_maven_depmap %{short_name} %{short_name} %{version} JPP %{short_name}

# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}


%clean
rm -rf $RPM_BUILD_ROOT

%post
%update_maven_depmap

%postun
%update_maven_depmap

%files
%defattr(-,root,root,-)
%doc LICENSE.txt PROPOSAL.html NOTICE.txt RELEASE-NOTES.txt src/samples
%doc src/docs/*
%{_javadir}/*
%{_mavenpomdir}/JPP-%{short_name}.pom
%{_mavendepmapfragdir}/*


%files jsvc
%defattr(-,root,root,-)
%doc LICENSE.txt
%{_bindir}/jsvc
%{_mandir}/man1/jsvc.1*


%files javadoc
%defattr(-,root,root,-)
%doc %{_javadocdir}/%{name}-%{version}
%doc %{_javadocdir}/%{name}


%changelog
* Fri Jun  4 2010 Stanislav Ochotnicky <sochotnicky at redhat.com> - 1.0.2-3
- Make javadoc subpackage noarch

* Tue Jun  1 2010 Stanislav Ochotnicky <sochotnicky at redhat.com> - 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 <sochotnicky at redhat.com> - 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 <rel-eng at lists.fedoraproject.org> - 1:1.0.1-8.8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Tue Mar 03 2009 Karsten Hopp <karsten at redhat.com> 1.0.1-7.8
- ppc needs a similar patch

* Tue Mar 03 2009 Karsten Hopp <karsten at redhat.com> 1.0.1-7.7
- add configure patch for s390x

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1:1.0.1-7.6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Wed Jul  9 2008 Tom "spot" Callaway <tcallawa at redhat.com> - 1:1.0.1-6.6
- drop repotag

* Fri Feb 08 2008 Permaine Cheung <pcheung at redhat.com> - 1:1.0.1-6jpp.5
- Add configure patch for ia64 from Doug Chapman

* Mon Sep 24 2007 Permaine Cheung <pcheung at redhat.com> - 1:1.0.1-6jpp.4
- Add execve path warning patch from James Ralston


--- NEW FILE import.log ---
apache-commons-daemon-1_0_2-3_fc13:HEAD:apache-commons-daemon-1.0.2-3.fc13.src.rpm:1275983213


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/apache-commons-daemon/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- .cvsignore	7 Jun 2010 21:20:52 -0000	1.1
+++ .cvsignore	8 Jun 2010 07:48:12 -0000	1.2
@@ -0,0 +1 @@
+commons-daemon-1.0.2-src.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/apache-commons-daemon/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sources	7 Jun 2010 21:20:53 -0000	1.1
+++ sources	8 Jun 2010 07:48:12 -0000	1.2
@@ -0,0 +1 @@
+a6c68eed204bc9f1ef3b77488edfcfeb  commons-daemon-1.0.2-src.tar.gz



More information about the scm-commits mailing list