7
0

Accepting request 124694 from Java:packages

- update to 0.8
  * Add -fno-stack-protector to fix compilation issues in various distros
  * Fix spin-on-disconnection bug (Spotted by Christopher Armstrong 
    <carmstrong -at- fastmail -dot- com -dot- au>)
  * Patch from 石頭成 <shirock -dot- tw -at- gmail -dot- com> to avoid a
    memory leak
  * Change to expat (MIT) licence 
  * Patches to the CGI libraries from Andy Canfield <andy -dot- canfield -at-
    pimco -dot- mobi>

OBS-URL: https://build.opensuse.org/request/show/124694
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/matthewlib-java?expand=0&rev=10
This commit is contained in:
Stephan Kulow
2012-06-13 11:31:56 +00:00
committed by Git OBS Bridge
parent b42660491e
commit 062a3ab50b
8 changed files with 41 additions and 145 deletions

View File

@@ -1,8 +1,8 @@
diff --git a/Makefile b/Makefile
index 5ba907f..9183316 100644
--- a/Makefile
+++ b/Makefile
@@ -57,11 +57,12 @@ cgi-$(CGIVER).jar: .classes
Index: libmatthew-java-0.8/Makefile
===================================================================
--- libmatthew-java-0.8.orig/Makefile 2012-05-15 10:19:39.418201897 +0200
+++ libmatthew-java-0.8/Makefile 2012-05-15 10:19:41.742201844 +0200
@@ -62,11 +62,12 @@
io-$(IOVER).jar: .classes
(cd classes; $(JAR) cf ../$@ cx/ath/matthew/io/*class)
unix-$(UNIXVER).jar: .classes
@@ -20,7 +20,7 @@ index 5ba907f..9183316 100644
(cd classes; $(JAR) cfm ../$@ ../Manifest cx/ath/matthew/unix/*class)
hexdump-$(HEXVER).jar: .classes
@@ -86,11 +87,13 @@ libmatthew-java-$(MATTVER).tar.gz: Makefile cx cgi-java.c unix-java.c README INS
@@ -91,11 +92,13 @@
debug-enable-$(DEBUGVER).jar: cx/ath/matthew/debug/Debug.jpp
make .enabledebug

View File

@@ -1,76 +0,0 @@
diff --git a/unix-java.c b/unix-java.c
index 25f6282..15fffbf 100644
--- a/unix-java.c
+++ b/unix-java.c
@@ -18,6 +18,10 @@
*
*/
+
+/* _GNU_SOURCE is required to use struct ucred in glibc 2.8 */
+#define _GNU_SOURCE
+
#include "unix-java.h"
#include <stdio.h>
#include <stdlib.h>
@@ -381,9 +385,9 @@ JNIEXPORT void JNICALL Java_cx_ath_matthew_unix_UnixSocket_native_1send_1creds
cmsg->cmsg_len = CMSG_LEN(sizeof(struct ucred));
/* Initialize the payload: */
creds = (struct ucred *)CMSG_DATA(cmsg);
- creds.pid = getpid();
- creds.uid = getuid();
- creds.gid = getgid();
+ creds->pid = getpid();
+ creds->uid = getuid();
+ creds->gid = getgid();
#endif
int rv = sendmsg(sock, &msg, 0);
@@ -399,7 +403,7 @@ JNIEXPORT jbyte JNICALL Java_cx_ath_matthew_unix_UnixSocket_native_1recv_1creds
(JNIEnv *env, jobject o, jint sock, jintArray jcreds)
{
struct msghdr msg;
- char buf = 0;
+ char iov_buf = 0;
struct iovec iov;
msg.msg_name = NULL;
msg.msg_namelen = 0;
@@ -408,7 +412,7 @@ JNIEXPORT jbyte JNICALL Java_cx_ath_matthew_unix_UnixSocket_native_1recv_1creds
msg.msg_iovlen = 1;
msg.msg_control = NULL;
msg.msg_controllen = 0;
- iov.iov_base = &buf;
+ iov.iov_base = &iov_buf;
iov.iov_len = 1;
#ifdef SCM_CREDENTIALS
@@ -422,9 +426,9 @@ JNIEXPORT jbyte JNICALL Java_cx_ath_matthew_unix_UnixSocket_native_1recv_1creds
recvmsg(sock, &msg, 0);
#ifdef SCM_CREDENTIALS
- for (cmsg = CMSG_FIRSTHDR(&msgh);
+ for (cmsg = CMSG_FIRSTHDR(&msg);
cmsg != NULL;
- cmsg = CMSG_NXTHDR(&msgh,cmsg)) {
+ cmsg = CMSG_NXTHDR(&msg,cmsg)) {
if (cmsg->cmsg_level == SOL_SOCKET
&& cmsg->cmsg_type == SCM_CREDENTIALS) {
creds = (struct ucred *) CMSG_DATA(cmsg);
@@ -432,11 +436,15 @@ JNIEXPORT jbyte JNICALL Java_cx_ath_matthew_unix_UnixSocket_native_1recv_1creds
}
}
if (NULL != creds) {
- (*env)->SetIntArrayRegion(env, jcreds, 0, 3, creds);
+ jint cred_array[3];
+ cred_array[0] = creds->pid;
+ cred_array[1] = creds->uid;
+ cred_array[2] = creds->gid;
+ (*env)->SetIntArrayRegion(env, jcreds, 0, 3, &cred_array[0]);
}
#endif
- return buf;
+ return iov_buf;
}

View File

@@ -1,17 +1,17 @@
diff --git a/Makefile b/Makefile
index 7607a79..4f6e728 100644
--- a/Makefile
+++ b/Makefile
@@ -39,7 +39,7 @@ DEBUG?=disable
.NOPARALLEL:
Index: libmatthew-java-0.8/Makefile
===================================================================
--- libmatthew-java-0.8.orig/Makefile 2011-01-23 18:09:41.000000000 +0100
+++ libmatthew-java-0.8/Makefile 2012-05-15 10:18:51.501203006 +0200
@@ -44,7 +44,7 @@
.NO_PARALLEL:
.NOTPARALLEL:
-all: unix-$(UNIXVER).jar cgi-$(CGIVER).jar debug-enable-$(DEBUGVER).jar debug-disable-$(DEBUGVER).jar io-$(IOVER).jar hexdump-$(HEXVER).jar libcgi-java.so libunix-java.so
+all: unix-$(UNIXVER).jar cgi-$(CGIVER).jar debug-enable-$(DEBUGVER).jar debug-disable-$(DEBUGVER).jar io-$(IOVER).jar hexdump-$(HEXVER).jar libcgi-java.so libunix-java.so doc
classes: .classes
.classes: $(SRC)
@@ -134,4 +134,4 @@ install-jar: unix-$(UNIXVER).jar cgi-$(CGIVER).jar debug-enable-$(DEBUGVER).jar
@@ -139,4 +139,4 @@
ln -sf cgi-$(CGIVER).jar $(DESTDIR)$(JARDIR)/cgi.jar
ln -sf hexdump-$(HEXVER).jar $(DESTDIR)$(JARDIR)/hexdump.jar

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:05d1d3d9b5e33bd3642102aae10bba904e296c5c01a10854200ad4df349c8dfa
size 30749

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e8cdf35b54683a893f739130972f55aded2ed13fc14db0da516fe7a3cbb6318c
size 38375

View File

@@ -1,3 +1,16 @@
-------------------------------------------------------------------
Tue May 15 08:44:01 UTC 2012 - mvyskocil@suse.cz
- update to 0.8
* Add -fno-stack-protector to fix compilation issues in various distros
* Fix spin-on-disconnection bug (Spotted by Christopher Armstrong
<carmstrong -at- fastmail -dot- com -dot- au>)
* Patch from 石頭成 <shirock -dot- tw -at- gmail -dot- com> to avoid a
memory leak
* Change to expat (MIT) licence
* Patches to the CGI libraries from Andy Canfield <andy -dot- canfield -at-
pimco -dot- mobi>
-------------------------------------------------------------------
Mon Feb 2 13:52:33 CET 2009 - mvyskocil@suse.cz

View File

@@ -1,7 +1,7 @@
#
# spec file for package matthewlib-java (Version 0.7.1)
# spec file for package matthewlib-java
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,11 +19,11 @@
%define orig_name libmatthew-java
Name: matthewlib-java
Version: 0.7.1
Release: 4
Version: 0.8
Release: 0
Summary: A few useful Java libraries
License: MIT
Group: Development/Libraries/Java
License: GPL-2.0
# actual upstream:
#URL: http://matthew.ath.cx/projects/java/
#Source0: http://matthew.ath.cx/projects/java/%{name}-%{version}.tar.gz
@@ -31,18 +31,15 @@ License: GPL-2.0
# he gets newer releases into debian before he puts them up on
# the upstream website. so we use the "original" source from debian
# (ie, the source before debian patches are applied to it)
Url: http://packages.debian.org/source/sid/libmatthew-java
Source0: http://ftp.de.debian.org/debian/pool/main/libm/%{orig_name}/%{orig_name}_%{version}.orig.tar.gz
Patch0: early_upstream.patch
Patch1: install_doc.patch
Patch3: classpath_fix.patch
Patch4: openjdk.patch
Source0: libmatthew-java-0.8.tar.gz
Patch0: install_doc.patch
Patch1: classpath_fix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: fdupes
BuildRequires: java-devel
BuildRequires: jpackage-utils
BuildRequires: fdupes
Requires: jre >= 1.5.0
Requires: jpackage-utils
Requires: jre >= 1.5.0
Provides: %{orig_name}
%description
@@ -61,14 +58,7 @@ A collection of Java libraries: - Unix Sockets Library This is a
- Hexdump This class formats byte-arrays in hex and ascii for display.
Authors:
--------
Matthew Johnson
%package javadoc
License: GPL-2.0
Summary: A few useful Java libraries
Group: Development/Libraries/Java
@@ -88,18 +78,10 @@ A collection of Java libraries: - Unix Sockets Library This is a
- Hexdump This class formats byte-arrays in hex and ascii for display.
Authors:
--------
Matthew Johnson
%prep
%setup -q -n %{orig_name}-%{version}
%patch0 -p1
%patch1 -p1
%patch3 -p1
%patch4 -p1
%build
make \
@@ -127,20 +109,10 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root,-)
%{_javadir}/*jar
%{_libdir}/lib*.so*
%doc COPYING INSTALL README
%doc COPYING README
%files javadoc
%defattr(-,root,root,-)
%{_javadocdir}/%{name}-%{version}
%changelog
* Mon Feb 02 2009 mvyskocil@suse.cz
- fix of bnc#468886: matthewlib-java unix server socket creation crashes due to
a linking problem
- use a gcc as a linker
* Thu Sep 04 2008 mvyskocil@suse.cz
- Removal of a jpackage_compliance patch, which seems to be uncecessary
- Removal of makefile patch, all of necessary changes could be done via make
variables
* Wed Sep 03 2008 mvyskocil@suse.cz
- Initial packaging for SUSE (0.7.1)

View File

@@ -1,13 +0,0 @@
diff --git a/Makefile b/Makefile
index 5ba907f..54019bc 100644
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@ LD?=ld
PPFLAGS+=-C -P
CFLAGS+=-fpic -Wall -Os -pedantic -std=c99 -Werror
GCJFLAGS+=-fjni
-JCFLAGS+=-source 5.0
+#JCFLAGS+=-source 5.0
INCLUDES+=-I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
JAVADOCFLAGS?=-quiet -author -link http://java.sun.com/j2se/1.4.2/docs/api/