From ebb359d8cff5813daf1a69944a4c012b7fae17a6 Mon Sep 17 00:00:00 2001 From: jeff200902 Date: Mon, 10 Aug 2020 16:42:24 +0800 Subject: [PATCH] Package init --- ...dd-enxio-classes-from-jnr-unixsocket.patch | 449 ++++++++++++++++++ jnr-enxio-0.19.tar.gz | Bin 0 -> 11627 bytes jnr-enxio.spec | 43 ++ jnr-enxio.yaml | 5 + 4 files changed, 497 insertions(+) create mode 100644 0001-Add-enxio-classes-from-jnr-unixsocket.patch create mode 100644 jnr-enxio-0.19.tar.gz create mode 100644 jnr-enxio.spec create mode 100644 jnr-enxio.yaml diff --git a/0001-Add-enxio-classes-from-jnr-unixsocket.patch b/0001-Add-enxio-classes-from-jnr-unixsocket.patch new file mode 100644 index 0000000..4bb5c94 --- /dev/null +++ b/0001-Add-enxio-classes-from-jnr-unixsocket.patch @@ -0,0 +1,449 @@ +From c9e2b0f565074474613c8fbee6dde86a9fcd2395 Mon Sep 17 00:00:00 2001 +From: Mat Booth +Date: Sat, 8 Dec 2018 10:39:47 +0000 +Subject: [PATCH] Add enxio classes from jnr-unixsocket + +These classes are removed from jnr-unixsocket and packaged here instead +to avoid split-package problems in OSGi systems. +--- + .../AbstractNativeDatagramChannel.java | 79 ++++++++++ + .../channels/AbstractNativeSocketChannel.java | 101 +++++++++++++ + src/main/java/jnr/enxio/channels/Common.java | 136 ++++++++++++++++++ + .../enxio/channels/NativeSocketChannel.java | 46 ++---- + 4 files changed, 325 insertions(+), 37 deletions(-) + create mode 100644 src/main/java/jnr/enxio/channels/AbstractNativeDatagramChannel.java + create mode 100644 src/main/java/jnr/enxio/channels/AbstractNativeSocketChannel.java + create mode 100644 src/main/java/jnr/enxio/channels/Common.java + +diff --git a/src/main/java/jnr/enxio/channels/AbstractNativeDatagramChannel.java b/src/main/java/jnr/enxio/channels/AbstractNativeDatagramChannel.java +new file mode 100644 +index 0000000..a48d6bc +--- /dev/null ++++ b/src/main/java/jnr/enxio/channels/AbstractNativeDatagramChannel.java +@@ -0,0 +1,79 @@ ++/* ++ * Copyright (C) 2016 Fritz Elfert ++ * ++ * This file is part of the JNR project. ++ * ++ * Licensed under the Apache License, Version 2.0 (the "License"); ++ * you may not use this file except in compliance with the License. ++ * You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ */ ++ ++package jnr.enxio.channels; ++ ++import java.io.IOException; ++import java.nio.ByteBuffer; ++import java.nio.channels.ByteChannel; ++import java.nio.channels.DatagramChannel; ++import java.nio.channels.spi.SelectorProvider; ++ ++public abstract class AbstractNativeDatagramChannel extends DatagramChannel ++ implements ByteChannel, NativeSelectableChannel { ++ ++ private final Common common; ++ ++ public AbstractNativeDatagramChannel(int fd) { ++ this(NativeSelectorProvider.getInstance(), fd); ++ } ++ ++ AbstractNativeDatagramChannel(SelectorProvider provider, int fd) { ++ super(provider); ++ common = new Common(fd); ++ } ++ ++ public void setFD(int fd) { ++ common.setFD(fd); ++ } ++ ++ public final int getFD() { ++ return common.getFD(); ++ } ++ ++ @Override ++ protected void implCloseSelectableChannel() throws IOException { ++ Native.close(common.getFD()); ++ } ++ ++ @Override ++ protected void implConfigureBlocking(boolean block) throws IOException { ++ Native.setBlocking(common.getFD(), block); ++ } ++ ++ public int read(ByteBuffer dst) throws IOException { ++ return common.read(dst); ++ } ++ ++ @Override ++ public long read(ByteBuffer[] dsts, int offset, ++ int length) throws IOException { ++ return common.read(dsts, offset, length); ++ } ++ ++ public int write(ByteBuffer src) throws IOException { ++ return common.write(src); ++ } ++ ++ @Override ++ public long write(ByteBuffer[] srcs, int offset, ++ int length) throws IOException { ++ return common.write(srcs, offset, length); ++ } ++ ++} +diff --git a/src/main/java/jnr/enxio/channels/AbstractNativeSocketChannel.java b/src/main/java/jnr/enxio/channels/AbstractNativeSocketChannel.java +new file mode 100644 +index 0000000..65ead06 +--- /dev/null ++++ b/src/main/java/jnr/enxio/channels/AbstractNativeSocketChannel.java +@@ -0,0 +1,101 @@ ++/* ++ * Copyright (C) 2016 Marcus Linke ++ * ++ * This file is part of the JNR project. ++ * ++ * Licensed under the Apache License, Version 2.0 (the "License"); ++ * you may not use this file except in compliance with the License. ++ * You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ */ ++ ++package jnr.enxio.channels; ++ ++import java.io.IOException; ++import java.nio.ByteBuffer; ++import java.nio.channels.ByteChannel; ++import java.nio.channels.SocketChannel; ++import java.nio.channels.spi.SelectorProvider; ++ ++import jnr.constants.platform.Shutdown; ++ ++public abstract class AbstractNativeSocketChannel extends SocketChannel ++ implements ByteChannel, NativeSelectableChannel { ++ ++ private final Common common; ++ ++ public AbstractNativeSocketChannel(int fd) { ++ this(NativeSelectorProvider.getInstance(), fd); ++ } ++ ++ AbstractNativeSocketChannel(SelectorProvider provider, int fd) { ++ super(provider); ++ common = new Common(fd); ++ } ++ ++ public void setFD(int fd) { ++ common.setFD(fd); ++ } ++ ++ public final int getFD() { ++ return common.getFD(); ++ } ++ ++ @Override ++ protected void implCloseSelectableChannel() throws IOException { ++ Native.close(common.getFD()); ++ } ++ ++ @Override ++ protected void implConfigureBlocking(boolean block) throws IOException { ++ Native.setBlocking(common.getFD(), block); ++ } ++ ++ public int read(ByteBuffer dst) throws IOException { ++ return common.read(dst); ++ } ++ ++ @Override ++ public long read(ByteBuffer[] dsts, int offset, ++ int length) throws IOException { ++ return common.read(dsts, offset, length); ++ } ++ ++ public int write(ByteBuffer src) throws IOException { ++ return common.write(src); ++ } ++ ++ @Override ++ public long write(ByteBuffer[] srcs, int offset, ++ int length) throws IOException { ++ return common.write(srcs, offset, length); ++ } ++ ++ @Override ++ public SocketChannel shutdownInput() throws IOException { ++ int n = Native.shutdown(common.getFD(), SHUT_RD); ++ if (n < 0) { ++ throw new IOException(Native.getLastErrorString()); ++ } ++ return this; ++ } ++ ++ @Override ++ public SocketChannel shutdownOutput() throws IOException { ++ int n = Native.shutdown(common.getFD(), SHUT_WR); ++ if (n < 0) { ++ throw new IOException(Native.getLastErrorString()); ++ } ++ return this; ++ } ++ ++ private static final int SHUT_RD = Shutdown.SHUT_RD.intValue(); ++ private static final int SHUT_WR = Shutdown.SHUT_WR.intValue(); ++} +diff --git a/src/main/java/jnr/enxio/channels/Common.java b/src/main/java/jnr/enxio/channels/Common.java +new file mode 100644 +index 0000000..66ac609 +--- /dev/null ++++ b/src/main/java/jnr/enxio/channels/Common.java +@@ -0,0 +1,136 @@ ++/* ++ * Copyright (C) 2016 Fritz Elfert ++ * ++ * This file is part of the JNR project. ++ * ++ * Licensed under the Apache License, Version 2.0 (the "License"); ++ * you may not use this file except in compliance with the License. ++ * You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ */ ++ ++package jnr.enxio.channels; ++ ++import java.io.IOException; ++import java.nio.ByteBuffer; ++ ++import jnr.constants.platform.Errno; ++ ++/** ++ * Helper class, providing common methods. ++ */ ++final class Common { ++ ++ private int _fd = -1; ++ ++ Common(int fd) { ++ _fd = fd; ++ } ++ ++ void setFD(int fd) { ++ _fd = fd; ++ } ++ ++ int getFD() { ++ return _fd; ++ } ++ ++ int read(ByteBuffer dst) throws IOException { ++ ++ ByteBuffer buffer = ByteBuffer.allocate(dst.remaining()); ++ ++ int n = Native.read(_fd, buffer); ++ ++ buffer.flip(); ++ ++ dst.put(buffer); ++ ++ switch (n) { ++ case 0: ++ return -1; ++ ++ case -1: ++ Errno lastError = Native.getLastError(); ++ switch (lastError) { ++ case EAGAIN: ++ case EWOULDBLOCK: ++ return 0; ++ ++ default: ++ throw new IOException(Native.getLastErrorString()); ++ } ++ ++ default: { ++ ++ return n; ++ } ++ } ++ } ++ ++ long read(ByteBuffer[] dsts, int offset, int length) ++ throws IOException { ++ long total = 0; ++ ++ for (int i = 0; i < length; i++) { ++ ByteBuffer dst = dsts[offset + i]; ++ long read = read(dst); ++ if (read == -1) { ++ return read; ++ } ++ total += read; ++ } ++ ++ return total; ++ } ++ ++ int write(ByteBuffer src) throws IOException { ++ ++ int r = src.remaining(); ++ ++ ByteBuffer buffer = ByteBuffer.allocate(r); ++ ++ buffer.put(src); ++ ++ buffer.position(0); ++ ++ int n = Native.write(_fd, buffer); ++ ++ if (n >=0 ) { ++ if (n < r) { ++ src.position(src.position()-(r-n)); ++ } ++ } else { ++ switch (Native.getLastError()) { ++ case EAGAIN: ++ case EWOULDBLOCK: ++ src.position(src.position()-r); ++ return 0; ++ default: ++ throw new IOException(Native.getLastErrorString()); ++ } ++ } ++ ++ return n; ++ } ++ ++ long write(ByteBuffer[] srcs, int offset, int length) ++ throws IOException { ++ ++ long result = 0; ++ int index = 0; ++ ++ for (index = offset; index < length; index++) { ++ result += write(srcs[index]); ++ } ++ ++ return result; ++ } ++ ++} +diff --git a/src/main/java/jnr/enxio/channels/NativeSocketChannel.java b/src/main/java/jnr/enxio/channels/NativeSocketChannel.java +index 445ba1a..082ead1 100644 +--- a/src/main/java/jnr/enxio/channels/NativeSocketChannel.java ++++ b/src/main/java/jnr/enxio/channels/NativeSocketChannel.java +@@ -29,7 +29,7 @@ import java.nio.channels.spi.SelectorProvider; + public class NativeSocketChannel extends AbstractSelectableChannel + implements ByteChannel, NativeSelectableChannel { + +- private final int fd; ++ private final Common common; + private final int validOps; + + public NativeSocketChannel(int fd) { +@@ -42,18 +42,18 @@ public class NativeSocketChannel extends AbstractSelectableChannel + + NativeSocketChannel(SelectorProvider provider, int fd, int ops) { + super(provider); +- this.fd = fd; ++ common = new Common(fd); + this.validOps = ops; + } + + @Override + protected void implCloseSelectableChannel() throws IOException { +- Native.close(fd); ++ Native.close(common.getFD()); + } + + @Override + protected void implConfigureBlocking(boolean block) throws IOException { +- Native.setBlocking(fd, block); ++ Native.setBlocking(common.getFD(), block); + } + + @Override +@@ -61,54 +61,26 @@ public class NativeSocketChannel extends AbstractSelectableChannel + return validOps; + } + public final int getFD() { +- return fd; ++ return common.getFD(); + } + + public int read(ByteBuffer dst) throws IOException { +- int n = Native.read(fd, dst); +- switch (n) { +- case 0: +- return -1; +- +- case -1: +- switch (Native.getLastError()) { +- case EAGAIN: +- case EWOULDBLOCK: +- return 0; +- +- default: +- throw new IOException(Native.getLastErrorString()); +- } +- +- default: +- return n; +- } ++ return common.read(dst); + } + + public int write(ByteBuffer src) throws IOException { +- int n = Native.write(fd, src); +- if (n < 0) { +- switch (Native.getLastError()) { +- case EAGAIN: +- case EWOULDBLOCK: +- return 0; +- default: +- throw new IOException(Native.getLastErrorString()); +- } +- } +- +- return n; ++ return common.write(src); + } + + public void shutdownInput() throws IOException { +- int n = Native.shutdown(fd, SHUT_RD); ++ int n = Native.shutdown(common.getFD(), SHUT_RD); + if (n < 0) { + throw new IOException(Native.getLastErrorString()); + } + } + + public void shutdownOutput() throws IOException { +- int n = Native.shutdown(fd, SHUT_WR); ++ int n = Native.shutdown(common.getFD(), SHUT_WR); + if (n < 0) { + throw new IOException(Native.getLastErrorString()); + } +-- +2.19.1 + diff --git a/jnr-enxio-0.19.tar.gz b/jnr-enxio-0.19.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..e8069e40b39c76c3dae9172c5f4273e1e71e9a1f GIT binary patch literal 11627 zcma)BLz5*8kZjwwZQHhO+qN-n+qN}r+t##g8*jheU$A+~LqyZt)>3z5FwUz#pDOi0krR%GYs*rG_asc7}@yQr;&bhEZR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bKX3aZP8U%DlV%8JdQ@a5GHfJ!b-I)~nD%EuOC)>A4CR zdlPN{8Mb8F)URqiNOax;e>=!&^`UNfR+L)~y=|C=)^V+>iyvObG4-_>+KepH?Qry-NG}bvVa76mHzi=UJ`cznakE0N36kx4g7%HJHKs(PXJTamUvG*;!i|3Bi8(*De5HbdG z{AI3$kzjCx$XO&m*)#NQ?y@vqc@7>Qa6aT7~TGiFQ`;ogCO z85YGU8Bw(QFLYT*qrIyL)hkOzx+goTOf7=1L{>V+R00K#Zclb9eM=laJSg~k`Pe>5P12C9nM$?otoO}g(*}6+0*Lf-b1TFt z%sg^%anm45=70;~L~26W$SsaNTW~X9NLY_e%f0WGjax3S3RTJBAmwYzIZo#tjS zkv)q6p}NVnJ>ZML9dFR!{a42#`wWAIq2yRUys6Wgow+8dCe#lKtR7vl&pxSCjx17Y id>g7Z(Fg?r0fT@+Arbxm2xJfdH2(0T7sv`2=zjpSlJ7PE literal 0 HcmV?d00001 diff --git a/jnr-enxio.spec b/jnr-enxio.spec new file mode 100644 index 0000000..686d0b0 --- /dev/null +++ b/jnr-enxio.spec @@ -0,0 +1,43 @@ +Name: jnr-enxio +Version: 0.19 +Release: 1 +Summary: Unix sockets for Java +License: ASL 2.0 and LGPLv3 +URL: https://github.com/jnr/%{name}/ +Source0: https://github.com/jnr/%{name}/archive/%{name}-%{version}.tar.gz +Patch0: 0001-Add-enxio-classes-from-jnr-unixsocket.patch +BuildArch: noarch +BuildRequires: maven-local mvn(com.github.jnr:jnr-constants) mvn(com.github.jnr:jnr-ffi) +BuildRequires: mvn(junit:junit) mvn(org.apache.felix:maven-bundle-plugin) +BuildRequires: mvn(org.apache.maven.plugins:maven-source-plugin) +BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:) +%description +Unix sockets for Java. + +%package javadoc +Summary: Javadocs for %{name} +%description javadoc +This package contains the API documentation for %{name}. + +%prep +%setup -q -n %{name}-%{name}-%{version} +%patch0 -p1 +find ./ -name '*.jar' -delete +find ./ -name '*.class' -delete +%pom_remove_plugin ":maven-javadoc-plugin" + +%build +%mvn_build + +%install +%mvn_install + +%files -f .mfiles +%license LICENSE + +%files javadoc -f .mfiles-javadoc +%license LICENSE + +%changelog +* Thu Jul 30 2020 Jeffery.Gao - 0.19-1 +- Package init diff --git a/jnr-enxio.yaml b/jnr-enxio.yaml new file mode 100644 index 0000000..111a7f6 --- /dev/null +++ b/jnr-enxio.yaml @@ -0,0 +1,5 @@ +git_url: https://github.com/jnr/jnr-enxio +version_control: github +src_repo: jnr/jnr-enxio +tag_prefix: "jnr-enxio-" +seperator: "."