Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 658098 Details for
Bug 872103
sigar: Java bindings are missing
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Added java bindings sub package
0001-Added-java-bindings-sub-package.patch (text/plain), 18.04 KB, created by
gil cattaneo
on 2012-12-05 09:46:21 UTC
(
hide
)
Description:
Added java bindings sub package
Filename:
MIME Type:
Creator:
gil cattaneo
Created:
2012-12-05 09:46:21 UTC
Size:
18.04 KB
patch
obsolete
>From 23f96877b633cdae08ba5111094b5a0f7cb87b5b Mon Sep 17 00:00:00 2001 >From: gil <puntogil@libero.it> >Date: Wed, 5 Dec 2012 10:43:59 +0100 >Subject: [PATCH] Added java bindings sub package > >--- > sigar-1.6.5-java_build.patch | 354 ++++++++++++++++++++++++++++++++++++++++++ > sigar-1.6.5.pom | 43 +++++ > sigar.spec | 87 +++++++++- > 3 files changed, 475 insertions(+), 9 deletions(-) > create mode 100644 sigar-1.6.5-java_build.patch > create mode 100644 sigar-1.6.5.pom > >diff --git a/sigar-1.6.5-java_build.patch b/sigar-1.6.5-java_build.patch >new file mode 100644 >index 0000000..bdf8a2f >--- /dev/null >+++ b/sigar-1.6.5-java_build.patch >@@ -0,0 +1,354 @@ >+diff -Nru sigar-1.6.5/bindings/java/build.xml sigar-1.6.5-gil/bindings/java/build.xml >+--- sigar-1.6.5/bindings/java/build.xml 2011-04-21 20:38:36.000000000 +0200 >++++ sigar-1.6.5-gil/bindings/java/build.xml 2012-12-05 09:11:27.360092658 +0100 >+@@ -22,7 +22,7 @@ >+ <property name="jni.info.res" location="build/src/sigar.res"/> >+ <property name="jni.libprefix" value=""/> <!-- drop "java" prefix --> >+ <property name="cpptasks.jar" >+- location="hyperic_jni/lib/cpptasks.jar"/> >++ location="/usr/share/java/ant/cpptasks.jar"/> >+ >+ <condition property="file.version" value="-${sigar.version}"> >+ <isset property="file.versioned"/> >+@@ -50,13 +50,15 @@ >+ <property name="sigar.fqdn" value=""/> >+ >+ <path id="libjars"> >+- <fileset dir="lib" includes="*.jar"/> >++ <fileset dir="/usr/share/java" includes="ant/cpptasks.jar"/> >++ <fileset dir="/usr/share/java" includes="mx4j/mx4j-jmx.jar"/> >++ <fileset dir="/usr/share/java" includes="log4j.jar"/> >+ </path> >+ >+ <path id="alljars"> >+ <path refid="libjars"/> >+ <fileset dir="${sigar-bin}/lib" includes="${sigar.jar}"/> >+- <fileset dir="${ant.library.dir}" includes="junit*.jar"/> >++ <fileset dir="/usr/share/java" includes="junit.jar"/> >+ </path> >+ >+ <target name="javadoc_check"> >+@@ -85,7 +87,7 @@ >+ doctitle="Sigar"> >+ <group title="Sigar" packages="org.hyperic.sigar" /> >+ <classpath refid="libjars"/> >+- <classpath><path path="${ant.library.dir}/ant.jar"/></classpath> >++ <classpath><path path="/usr/share/java/ant.jar"/></classpath> >+ <bottom>Copyright © ${copyright.year} <![CDATA[<a target="_top" href="http://www.hyperic.com/">Hyperic</a>]]>. All Rights Reserved.</bottom> >+ </javadoc> >+ </target> >+@@ -96,7 +98,7 @@ >+ <classpath refid="alljars"/> >+ </available> >+ <javac destdir="${build}/classes" >+- source="1.4" target="1.4" >++ source="1.5" target="1.5" >+ sourcepath="" >+ debug="true" >+ classpathref="libjars"> >+diff -Nru sigar-1.6.5/bindings/java/hyperic_jni/jni-build.xml sigar-1.6.5-gil/bindings/java/hyperic_jni/jni-build.xml >+--- sigar-1.6.5/bindings/java/hyperic_jni/jni-build.xml 2011-04-21 20:38:36.000000000 +0200 >++++ sigar-1.6.5-gil/bindings/java/hyperic_jni/jni-build.xml 2012-12-05 09:15:11.564529239 +0100 >+@@ -28,7 +28,7 @@ >+ <property name="jni.libprefix" value="java"/> >+ <property name="jni.libversion" value=""/> >+ >+- <property name="cpptasks.jar" location="lib/cpptasks.jar"/> >++ <property name="cpptasks.jar" location="/usr/share/java/cpptasks.jar"/> >+ >+ <taskdef name="cc" classname="net.sf.antcontrib.cpptasks.CCTask"> >+ <classpath location="${cpptasks.jar}"/> >+@@ -60,7 +60,7 @@ >+ <condition property="linux"> >+ <equals arg1="${os.name}" arg2="Linux"/> >+ </condition> >+- <condition property="solaris"> >++ <!--condition property="solaris"> >+ <equals arg1="${os.name}" arg2="SunOS"/> >+ </condition> >+ <condition property="win32"> >+@@ -86,13 +86,13 @@ >+ </condition> >+ <condition property="osf1"> >+ <equals arg1="${os.name}" arg2="OSF1"/> >+- </condition> >++ </condition--> >+ >+ <condition property="jni.os" value="linux"> >+ <isset property="linux"/> >+ </condition> >+ >+- <condition property="jni.os" value="win32"> >++ <!--condition property="jni.os" value="win32"> >+ <isset property="win32"/> >+ </condition> >+ >+@@ -122,10 +122,10 @@ >+ >+ <condition property="jni.os" value="netbsd"> >+ <isset property="netbsd"/> >+- </condition> >++ </condition--> >+ >+ <!-- darwin and freebsd use the same source files --> >+- <condition property="jni.src" value="darwin"> >++ <!--condition property="jni.src" value="darwin"> >+ <isset property="freebsd"/> >+ </condition> >+ <condition property="jni.src" value="darwin"> >+@@ -137,7 +137,7 @@ >+ >+ <condition property="jni.os" value="osf1"> >+ <isset property="osf1"/> >+- </condition> >++ </condition--> >+ >+ <condition property="jni.jdk.os" value="${jni.os}"> >+ <and> >+@@ -146,13 +146,13 @@ >+ </and> >+ </condition> >+ >+- <condition property="jni.jdk.os" value="hp-ux"> >++ <!--condition property="jni.jdk.os" value="hp-ux"> >+ <istrue value="${hpux}"/> >+ </condition> >+ >+ <condition property="jni.jdk.os" value="alpha"> >+ <istrue value="${osf1}"/> >+- </condition> >++ </condition--> >+ >+ <condition property="jni.src" value="${jni.os}"> >+ <isfalse value="${jni.src}"/> >+@@ -161,7 +161,7 @@ >+ <echo message="jni.src=${jni.src}, jni.jdk.os=${jni.jdk.os}, ${sun.arch.data.model}-bit"/> >+ >+ <javac srcdir="${jni.src.java}" destdir="${build}/classes" debug="true" >+- source="1.4" target="1.4" >++ source="1.5" target="1.5" >+ includes="org/hyperic/jni/*.java"/> >+ >+ <taskdef name="libarch" classname="org.hyperic.jni.ArchNameTask"> >+@@ -190,9 +190,9 @@ >+ >+ <property name="jni.objdir" value="${build}/obj/${jni.libarch}"/> >+ >+- <condition property="jni.cc" value="uni-cc"> >++ <!--condition property="jni.cc" value="uni-cc"> >+ <isset property="darwin"/> >+- </condition> >++ </condition--> >+ >+ <property name="jni.cc" value="jni-cc"/> >+ >+@@ -225,19 +225,19 @@ >+ </target> >+ >+ <!-- run jni-cc twice {ppc,i386}, then feed both to lipo to build a universal binary --> >+- <target name="uni-cc" if="jni.libarch"> >+- <property name="shlib" value="${jni.objdir}/lib/lib${jni.libname}.dylib"/> >++ <!--target name="uni-cc" if="jni.libarch"> >++ <property name="shlib" value="${jni.objdir}/lib/lib${jni.libname}.dylib"/--> >+ >+ <!-- ppc --> >+- <echo message="build 'ppc' arch"/> >++ <!--echo message="build 'ppc' arch"/> >+ <antcall target="jni-cc" inheritRefs="true"> >+ <param name="uni.arch" value="ppc"/> >+ </antcall> >+ >+- <copy file="${shlib}" tofile="${shlib}.ppc"/> >++ <copy file="${shlib}" tofile="${shlib}.ppc"/--> >+ >+ <!-- i386 --> >+- <echo message="build 'i386' arch"/> >++ <!--echo message="build 'i386' arch"/> >+ <delete> >+ <fileset dir="${jni.objdir}" includes="*.o"/> >+ </delete> >+@@ -256,7 +256,7 @@ >+ <delete> >+ <fileset dir="${jni.objdir}/lib" includes="*.ppc,*.i386"/> >+ </delete> >+- </target> >++ </target--> >+ >+ <target name="jni-cc" if="jni.libarch"> >+ <mkdir dir="${jni.objdir}/lib"/> >+@@ -270,7 +270,7 @@ >+ relentless="false"> >+ >+ <!-- HPUX --> >+- <compiler name="hp" if="hpux"> >++ <!--compiler name="hp" if="hpux"> >+ <compilerarg value="+Z"/> >+ <compilerarg value="+DD64" if="jni.arch64"/> >+ >+@@ -288,10 +288,10 @@ >+ >+ <syslibset libs="nsl"/> >+ <syslibset libs="nm"/> >+- </linker> >++ </linker--> >+ >+ <!-- Solaris --> >+- <compiler name="gcc" if="solaris"> >++ <!--compiler name="gcc" if="solaris"> >+ <compilerarg value="-O2" if="jni.optim"/> >+ <compilerarg value="-g" if="jni.debug"/> >+ <compilerarg value="-Wall"/> >+@@ -303,12 +303,12 @@ >+ <define name="_POSIX_PTHREAD_SEMANTICS"/> >+ <define name="DMALLOC" if="jni.dmalloc"/> >+ </defineset> >+- </compiler> >++ </compiler--> >+ >+- <linker name="gcc" if="solaris"> >++ <!--linker name="gcc" if="solaris"--> >+ <!-- required for modern gcc to avoid libgcc_s.so dependency --> >+ <!-- this arg is ignored by older gcc --> >+- <linkerarg value="-static-libgcc"/> >++ <!--linkerarg value="-static-libgcc"/> >+ <linkerarg value="-m64" if="jni.arch64"/> >+ >+ <libset if="jni.libset.libs" >+@@ -317,7 +317,7 @@ >+ <libset if="jni.dmalloc" >+ dir="${jni.dmalloc}/lib" >+ libs="dmallocth"/> >+- </linker> >++ </linker--> >+ >+ <!-- Linux --> >+ <compiler name="gcc" debug="${jni.debug}" if="linux"> >+@@ -344,7 +344,7 @@ >+ </linker> >+ >+ <!-- Darwin --> >+- <compiler name="gcc" if="darwin"> >++ <!--compiler name="gcc" if="darwin"> >+ <compilerarg value="-Wall"/> >+ <compilerarg value="-Werror" if="jni.werror"/> >+ <compilerarg value="-m64" if="jni.arch64"/> >+@@ -369,10 +369,10 @@ >+ <linkerarg value="-Wl,-syslibroot,${uni.sdk}"/> >+ <linkerarg value="-arch"/> >+ <linkerarg value="${uni.arch}"/> >+- <linkerarg value="-mmacosx-version-min=${osx.min}"/> >++ <linkerarg value="-mmacosx-version-min=${osx.min}"/--> >+ >+ <!-- for Gestalt() --> >+- <linkerarg value="-framework"/> >++ <!--linkerarg value="-framework"/> >+ <linkerarg value="CoreServices"/> >+ >+ <linkerarg value="-sectcreate,__TEXT,__info_plist,${jni.info.plist}" if="jni.info.plist"/> >+@@ -382,10 +382,10 @@ >+ libs="${jni.libset.libs}"/> >+ >+ <syslibset libs="IOKit"/> >+- </linker> >++ </linker--> >+ >+ <!-- Freebsd --> >+- <compiler name="gcc" if="freebsd"> >++ <!--compiler name="gcc" if="freebsd"> >+ <compilerarg value="-O2" if="jni.optim"/> >+ <compilerarg value="-g" if="jni.debug"/> >+ <compilerarg value="-Wall"/> >+@@ -400,15 +400,15 @@ >+ dir="${jni.libset.dir}" >+ libs="${jni.libset.libs}"/> >+ <syslibset libs="kvm"/> >+- </linker> >++ </linker--> >+ >+ <!-- OpenBSD --> >+- <compiler name="gcc" if="openbsd"> >++ <!--compiler name="gcc" if="openbsd"> >+ <compilerarg value="-O2" if="jni.optim"/> >+ <compilerarg value="-g" if="jni.debug"/> >+- <compilerarg value="-Wall"/> >++ <compilerarg value="-Wall"/--> >+ <!-- <compilerarg value="-Werror" if="jni.werror"/> --> >+- <defineset> >++ <!--defineset> >+ <define name="${jni.define.name}_OPENBSD"/> >+ </defineset> >+ </compiler> >+@@ -418,15 +418,15 @@ >+ dir="${jni.libset.dir}" >+ libs="${jni.libset.libs}"/> >+ <syslibset libs="kvm"/> >+- </linker> >++ </linker--> >+ >+ <!-- NetBSD --> >+- <compiler name="gcc" if="netbsd"> >++ <!--compiler name="gcc" if="netbsd"> >+ <compilerarg value="-O2" if="jni.optim"/> >+ <compilerarg value="-g" if="jni.debug"/> >+- <compilerarg value="-Wall"/> >++ <compilerarg value="-Wall"/--> >+ <!-- <compilerarg value="-Werror" if="jni.werror"/> --> >+- <defineset> >++ <!--defineset> >+ <define name="${jni.define.name}_NETBSD"/> >+ </defineset> >+ </compiler> >+@@ -436,10 +436,10 @@ >+ dir="${jni.libset.dir}" >+ libs="${jni.libset.libs}"/> >+ <syslibset libs="kvm"/> >+- </linker> >++ </linker--> >+ >+ <!-- AIX --> >+- <compiler name="xlc_r" if="aix"> >++ <!--compiler name="xlc_r" if="aix"> >+ <compilerarg value="-q64" if="jni.arch64"/> >+ <defineset> >+ <define name="${jni.define.name}_AIX"/> >+@@ -454,10 +454,10 @@ >+ <libset if="jni.libset.libs" >+ dir="${jni.libset.dir}" >+ libs="${jni.libset.libs}"/> >+- </linker> >++ </linker--> >+ >+ <!-- WIN32 --> >+- <linker name="msvc" debug="${jni.debug}" if="win32"> >++ <!--linker name="msvc" debug="${jni.debug}" if="win32"> >+ <libset if="jni.libset.libs" >+ dir="${jni.libset.dir}" >+ libs="${jni.libset.libs}"/> >+@@ -470,14 +470,14 @@ >+ <compiler name="msvc" debug="${jni.debug}" if="win32"> >+ <defineset> >+ <define name="WIN32"/> >+- <define name="_CRT_SECURE_NO_DEPRECATE"/> >++ <define name="_CRT_SECURE_NO_DEPRECATE"/--> >+ <!-- XXX 2008 MSC express/SDK does not include atl headers --> >+- <define name="SIGAR_NO_ATL" if="jni.noatl"/> >++ <!--define name="SIGAR_NO_ATL" if="jni.noatl"/> >+ </defineset> >+- </compiler> >++ </compiler--> >+ >+ <!-- OSF1 --> >+- <compiler name="gcc" if="osf1"> >++ <!--compiler name="gcc" if="osf1"> >+ <compilerarg value="-Wall"/> >+ <compilerarg value="-pthread"/> >+ <defineset> >+@@ -491,7 +491,7 @@ >+ libs="${jni.libset.libs}"/> >+ >+ <syslibset libs="mach"/> >+- </linker> >++ </linker--> >+ >+ <!-- C sources --> >+ <fileset dir="${jni.source.dir}"> >diff --git a/sigar-1.6.5.pom b/sigar-1.6.5.pom >new file mode 100644 >index 0000000..0a8c9cc >--- /dev/null >+++ b/sigar-1.6.5.pom >@@ -0,0 +1,43 @@ >+<?xml version="1.0" encoding="UTF-8"?> >+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" >+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> >+ <modelVersion>4.0.0</modelVersion> >+ >+ <parent> >+ <groupId>org.fusesource</groupId> >+ <artifactId>fusesource-pom</artifactId> >+ <version>1.5</version> >+ </parent> >+ >+ <groupId>org.fusesource</groupId> >+ <artifactId>sigar</artifactId> >+ <version>1.6.5</version> >+ >+ <dependencies> >+ <dependency> >+ <groupId>log4j</groupId> >+ <artifactId>log4j</artifactId> >+ <version>1.2.15</version> >+ <scope>compile</scope> >+ <exclusions> >+ <exclusion> >+ <groupId>javax.mail</groupId> >+ <artifactId>mail</artifactId> >+ </exclusion> >+ <exclusion> >+ <groupId>javax.jms</groupId> >+ <artifactId>jms</artifactId> >+ </exclusion> >+ <exclusion> >+ <groupId>com.sun.jdmk</groupId> >+ <artifactId>jmxtools</artifactId> >+ </exclusion> >+ <exclusion> >+ <groupId>com.sun.jmx</groupId> >+ <artifactId>jmxri</artifactId> >+ </exclusion> >+ </exclusions> >+ </dependency> >+ </dependencies> >+ >+</project> >diff --git a/sigar.spec b/sigar.spec >index a1d7c3d..5c659d0 100644 >--- a/sigar.spec >+++ b/sigar.spec >@@ -1,11 +1,11 @@ >-Name: sigar >-Version: 1.6.5 >-Release: 0.7.git58097d9%{?dist} >-Summary: System Information Gatherer And Reporter > > %global sigar_suffix 0-g4b67f57 > %global sigar_hash 58097d9 > >+Name: sigar >+Version: 1.6.5 >+Release: 0.8.git58097d9%{?dist} >+Summary: System Information Gatherer And Reporter > Group: System Environment/Libraries > License: ASL 2.0 > URL: http://sigar.hyperic.com/ >@@ -20,14 +20,26 @@ URL: http://sigar.hyperic.com/ > # > # The diff from 1.6.4 is too huge to contemplate cherrypicking from > Source0: %{name}-%{version}-%{sigar_hash}.tbz2 >- >-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) >+# originally taken from http://repo1.maven.org/maven2/org/fusesource/sigar/1.6.4/sigar-1.6.4.pom >+Source1: %{name}-%{version}.pom > > BuildRequires: gcc cmake >+BuildRequires: cpptasks >+# BuildRequires: fusesource-pom >+BuildRequires: java-devel >+BuildRequires: jpackage-utils >+BuildRequires: ant >+BuildRequires: log4j >+BuildRequires: mx4j > > Patch100: bz714249-1-cpu-count.patch > Patch101: bz746288-1-cpu-count-arch.patch > >+# use system libraries >+# build only linux jni libraries >+Patch120: %{name}-%{version}-java_build.patch >+ >+ > %description > The Sigar API provides a portable interface for gathering system > information such as: >@@ -54,6 +66,26 @@ Requires: %{name} = %{version}-%{release} > %description devel > Header files for developing against the Sigar API > >+%package java >+License: ASL 2.0 >+Group: Development/Libraries >+Summary: SIGAR Java bindings - System Information Gatherer And Reporter >+Requires: %{name} = %{version}-%{release} >+Requires: java >+Requires: jpackage-utils >+Requires: log4j >+ >+%description java >+This package contains the Java bindings SIGAR. >+ >+%package javadoc >+Group: Documentation >+Summary: Javadoc for %{name}-java >+Requires: jpackage-utils >+ >+%description javadoc >+This package contains javadoc for %{name}-java. >+ > %prep > # When using the GitHub tarballs, use: > # setup -q -n hyperic-{name}-{sigar_hash} >@@ -62,6 +94,11 @@ Header files for developing against the Sigar API > %patch100 -p1 -b .bz714249 > %patch101 -p1 -b .bz746288 > >+%patch120 -p1 >+# clean up >+find . -name "*.class" -delete >+find . -name "*.jar" -delete >+ > %build > > # Fix lib directory >@@ -73,15 +110,32 @@ pushd build > make %{?_smp_mflags} > popd > >+pushd bindings/java >+%ant build javadoc >+popd >+ > %install >-rm -rf $RPM_BUILD_ROOT > pushd build > %cmake .. > make install DESTDIR=$RPM_BUILD_ROOT > popd > >-%clean >-rm -rf $RPM_BUILD_ROOT >+pushd bindings/java >+mkdir -p %{buildroot}%{_libdir}/%{name} >+mkdir -p %{buildroot}%{_jnidir} >+install -m 644 %{name}-bin/lib/%{name}.jar %{buildroot}%{_libdir}/%{name}/%{name}.jar >+ln -s ../%{name}/%{name}.jar %{buildroot}%{_jnidir}/ >+ >+install -pm 755 %{name}-bin/lib/libsigar-*.so \ >+ %{buildroot}%{_libdir}/%{name}/ >+ >+mkdir -p %{buildroot}%{_mavenpomdir} >+install -pm 644 %{SOURCE1} %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom >+%add_maven_depmap JPP-%{name}.pom %{name}.jar >+ >+mkdir -p %{buildroot}%{_javadocdir}/%{name} >+cp -rp build/javadoc/* %{buildroot}%{_javadocdir}/%{name} >+popd > > %post -p /sbin/ldconfig > >@@ -97,7 +151,22 @@ rm -rf $RPM_BUILD_ROOT > %{_includedir}/sigar*.h > %doc LICENSE NOTICE AUTHORS > >+%files java >+%{_libdir}/%{name}/* >+%{_jnidir}/* >+%{_mavenpomdir}/JPP-%{name}.pom >+%{_mavendepmapfragdir}/%{name} >+%doc LICENSE NOTICE bindings/java/examples >+ >+%files javadoc >+%{_javadocdir}/%{name} >+%doc LICENSE NOTICE >+ > %changelog >+* Tue Dec 04 2012 gil cattaneo <puntogil@libero.it> - 1.6.5-0.8.git58097d9 >+- Added java bindings sub package >+- Minor changes to current guideline >+ > * Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.5-0.7.git58097d9 > - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild > >-- >1.7.7.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 872103
:
636511
|
658055
|
658098
|
934925