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 934925 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.
Added java bindings sub packages
0001-Added-java-bindings-sub-packages-rhbz-872103.patch (text/plain), 17.55 KB, created by
gil cattaneo
on 2014-09-06 00:01:32 UTC
(
hide
)
Description:
Added java bindings sub packages
Filename:
MIME Type:
Creator:
gil cattaneo
Created:
2014-09-06 00:01:32 UTC
Size:
17.55 KB
patch
obsolete
>From 361934d7efe81b33d9f584541e29884aaf880319 Mon Sep 17 00:00:00 2001 >From: gil <puntogil@libero.it> >Date: Sat, 6 Sep 2014 01:59:05 +0200 >Subject: [PATCH] Added java bindings sub packages (rhbz#872103) > >--- > sigar-1.6.5-java_build.patch | 354 +++++++++++++++++++++++++++++++++++++++++++ > sigar-template-pom.xml | 43 ++++++ > sigar.spec | 67 +++++++- > 3 files changed, 459 insertions(+), 5 deletions(-) > create mode 100644 sigar-1.6.5-java_build.patch > create mode 100644 sigar-template-pom.xml > >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-template-pom.xml b/sigar-template-pom.xml >new file mode 100644 >index 0000000..b1f781a >--- /dev/null >+++ b/sigar-template-pom.xml >@@ -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>@VERSION@</version> >+ >+ <dependencies> >+ <dependency> >+ <groupId>log4j</groupId> >+ <artifactId>log4j</artifactId> >+ <version>1.2.17</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> >\ No newline at end of file >diff --git a/sigar.spec b/sigar.spec >index 4b94dfc..9463968 100644 >--- a/sigar.spec >+++ b/sigar.spec >@@ -1,6 +1,6 @@ > Name: sigar > Version: 1.6.5 >-Release: 0.11.git58097d9%{?dist} >+Release: 0.12.git58097d9%{?dist} > Summary: System Information Gatherer And Reporter > > %global sigar_suffix 0-g4b67f57 >@@ -21,12 +21,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}-template-pom.xml > > BuildRequires: gcc cmake > >+BuildRequires: cpptasks >+BuildRequires: javapackages-local >+BuildRequires: ant >+%if %{?fedora} > 20 >+BuildRequires: log4j12 >+%else >+BuildRequires: log4j >+%endif >+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 >@@ -54,6 +68,18 @@ Requires: %{name} = %{version}-%{release} > %description devel > Header files for developing against the Sigar API > >+%package java >+Summary: SIGAR Java bindings >+ >+%description java >+This package contains the Java bindings SIGAR. >+ >+%package javadoc >+Summary: Javadoc for SIGAR Java bindings >+ >+%description javadoc >+This package contains javadoc for SIGAR Java bindings. >+ > %prep > # When using the GitHub tarballs, use: > # setup -q -n hyperic-{name}-{sigar_hash} >@@ -62,6 +88,16 @@ Header files for developing against the Sigar API > %patch100 -p1 -b .bz714249 > %patch101 -p1 -b .bz746288 > >+%patch120 -p1 -b .bz872103 >+# clean up >+find . -name "*.class" -delete >+find . -name "*.jar" -delete >+cp -p %{SOURCE1} bindings/java/pom.xml >+sed -i "s|@VERSION@|%{version}|" bindings/java/pom.xml >+%if %{?fedora} > 20 >+sed -i.log4j12 "s|log4j.jar|log4j12-1.2.17.jar|" bindings/java/build.xml >+%endif >+ > %build > > # Fix lib directory >@@ -73,15 +109,25 @@ pushd build > make %{?_smp_mflags} > popd > >+pushd bindings/java >+%mvn_file org.fusesource:%{name} %{name} >+%ant build javadoc >+%mvn_artifact pom.xml %{name}-bin/lib/%{name}.jar >+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 >+%mvn_install -J build/javadoc >+mkdir -p %{buildroot}%{_libdir}/%{name} >+install -pm 755 %{name}-bin/lib/libsigar-*.so \ >+ %{buildroot}%{_libdir}/%{name}/ >+popd > > %post -p /sbin/ldconfig > >@@ -97,7 +143,18 @@ rm -rf $RPM_BUILD_ROOT > %{_includedir}/sigar*.h > %doc LICENSE NOTICE AUTHORS > >+%files java -f bindings/java/.mfiles >+%{_libdir}/%{name} >+%doc LICENSE NOTICE bindings/java/examples >+ >+%files javadoc -f bindings/java/.mfiles-javadoc >+%doc LICENSE NOTICE >+ > %changelog >+* Fri Sep 05 2014 gil cattaneo <puntogil@libero.it> 1.6.5-0.12.git58097d9 >+- Added java bindings sub packages (rhbz#872103) >+- Minor changes to current guideline >+ > * Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.5-0.11.git58097d9 > - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild > >-- >1.8.3.1 >
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 Raw
Actions:
View
Attachments on
bug 872103
:
636511
|
658055
|
658098
| 934925