Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package jnr-enxio for openSUSE:Factory checked in at 2021-07-10 00:00:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/jnr-enxio (Old) and /work/SRC/openSUSE:Factory/.jnr-enxio.new.2625 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "jnr-enxio" Sat Jul 10 00:00:15 2021 rev:2 rq:905167 version:0.32.6 Changes: -------- --- /work/SRC/openSUSE:Factory/jnr-enxio/jnr-enxio.changes 2020-07-24 15:03:27.712086157 +0200 +++ /work/SRC/openSUSE:Factory/.jnr-enxio.new.2625/jnr-enxio.changes 2021-07-10 00:03:04.474781700 +0200 @@ -1,0 +2,8 @@ +Thu Jul 8 13:48:55 UTC 2021 - Anton Shvetz <shvetz.an...@gmail.com> + +- Update to v0.32.6 +- Fix summary and description +- Remove patch 0001-Add-enxio-classes-from-jnr-unixsocket.patch +- Install artifact into %{_javadir}/jnr + +------------------------------------------------------------------- Old: ---- 0001-Add-enxio-classes-from-jnr-unixsocket.patch jnr-enxio-0.19.tar.gz New: ---- jnr-enxio-0.32.6.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ jnr-enxio.spec ++++++ --- /var/tmp/diff_new_pack.1w6jjE/_old 2021-07-10 00:03:04.822778994 +0200 +++ /var/tmp/diff_new_pack.1w6jjE/_new 2021-07-10 00:03:04.822778994 +0200 @@ -1,7 +1,7 @@ # # spec file for package jnr-enxio # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,17 +16,19 @@ # -Name: jnr-enxio -Version: 0.19 +%global cluster jnr +Name: %{cluster}-enxio +Version: 0.32.6 Release: 0 -Summary: Unix sockets for Java +Summary: Native I/O access for java # src/main/java/jnr/enxio/channels/PollSelectionKey.java is LGPLv3 # rest of the source code is ASL 2.0 License: Apache-2.0 AND LGPL-3.0-only -URL: https://github.com/jnr/%{name}/ -Source0: https://github.com/jnr/%{name}/archive/%{name}-%{version}.tar.gz +Group: Development/Libraries/Java +URL: https://github.com/%{cluster}/%{name}/ +Source0: %{url}/archive/%{name}-%{version}.tar.gz # Avoid split-package situation, this patch submitted upstream here: https://github.com/jnr/jnr-enxio/pull/26 -Patch0: 0001-Add-enxio-classes-from-jnr-unixsocket.patch +#Patch0: 0001-Add-enxio-classes-from-jnr-unixsocket.patch BuildRequires: fdupes BuildRequires: maven-local BuildRequires: mvn(com.github.jnr:jnr-constants) @@ -36,30 +38,25 @@ BuildArch: noarch %description -Unix sockets for Java. +Java Native Runtime Enhanced X-platform I/O %package javadoc Summary: Javadocs for %{name} +Group: Development/Libraries/Java %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 +%{mvn_file} : %{cluster}/%{name} # Unnecessary for RPM builds -%pom_remove_plugin ":maven-javadoc-plugin" -%pom_remove_plugin ":maven-source-plugin" +%pom_remove_plugin :maven-javadoc-plugin +%pom_remove_plugin :maven-source-plugin %build -%{mvn_build} -f \ -%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 9}%{!?pkg_vcmp:0} - -- -Dmaven.compiler.release=7 \ -%endif +%{mvn_build} -f %install %mvn_install ++++++ jnr-enxio-0.19.tar.gz -> jnr-enxio-0.32.6.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jnr-enxio-jnr-enxio-0.19/.github/workflows/ci.yml new/jnr-enxio-jnr-enxio-0.32.6/.github/workflows/ci.yml --- old/jnr-enxio-jnr-enxio-0.19/.github/workflows/ci.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/jnr-enxio-jnr-enxio-0.32.6/.github/workflows/ci.yml 2021-06-04 22:03:00.000000000 +0200 @@ -0,0 +1,37 @@ +# This workflow will build a Java project with Maven +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven + +name: Java CI with Maven + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + jdk8: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 8 + uses: actions/setup-java@v1.4.3 + with: + java-version: 8 + - name: Build with Maven + run: mvn -B package --file pom.xml + + jdk11: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v1.4.3 + with: + java-version: 11 + - name: Build with Maven + run: mvn -B package --file pom.xml diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jnr-enxio-jnr-enxio-0.19/.travis.yml new/jnr-enxio-jnr-enxio-0.32.6/.travis.yml --- old/jnr-enxio-jnr-enxio-0.19/.travis.yml 2018-10-26 22:49:38.000000000 +0200 +++ new/jnr-enxio-jnr-enxio-0.32.6/.travis.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,20 +0,0 @@ -language: java -jdk: - - openjdk9 - - openjdk8 - - openjdk7 -os: - - linux -# - osx -notifications: - irc: - channels: - - "irc.freenode.org#jnr" - on_success: change - on_failure: always - template: - - "%{repository} (%{branch}:%{commit} by %{author}): %{message} (%{build_url})" -addons: - apt: - packages: - - openjdk-7-jdk diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jnr-enxio-jnr-enxio-0.19/pom.xml new/jnr-enxio-jnr-enxio-0.32.6/pom.xml --- old/jnr-enxio-jnr-enxio-0.19/pom.xml 2018-10-26 22:49:38.000000000 +0200 +++ new/jnr-enxio-jnr-enxio-0.32.6/pom.xml 2021-06-04 22:03:00.000000000 +0200 @@ -10,7 +10,7 @@ <groupId>com.github.jnr</groupId> <artifactId>jnr-enxio</artifactId> <packaging>jar</packaging> - <version>0.19</version> + <version>0.32.6</version> <name>jnr-enxio</name> <description>Native I/O access for java</description> <url>http://github.com/jnr/jnr-enxio</url> @@ -39,26 +39,26 @@ <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <maven.compiler.source>1.6</maven.compiler.source> - <maven.compiler.target>1.6</maven.compiler.target> + <maven.compiler.source>8</maven.compiler.source> + <maven.compiler.target>8</maven.compiler.target> </properties> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> - <version>4.11</version> + <version>4.13.1</version> <scope>test</scope> </dependency> <dependency> <groupId>com.github.jnr</groupId> <artifactId>jnr-constants</artifactId> - <version>0.9.11</version> + <version>0.10.2</version> </dependency> <dependency> <groupId>com.github.jnr</groupId> <artifactId>jnr-ffi</artifactId> - <version>2.1.9</version> + <version>2.2.4</version> </dependency> </dependencies> @@ -72,6 +72,7 @@ <instructions> <_nouses>true</_nouses> <Import-Package>*,jnr.ffi.mapper,jnr.ffi.provider.converters,com.kenai.jffi</Import-Package> + <Automatic-Module-Name>jnr.enxio</Automatic-Module-Name> </instructions> </configuration> <executions> @@ -91,6 +92,9 @@ <configuration> <archive> <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile> + <manifestEntries> + <Automatic-Module-Name>org.jnrproject.enxio</Automatic-Module-Name> + </manifestEntries> </archive> </configuration> </plugin> @@ -110,6 +114,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> + <version>3.2.0</version> <executions> <execution> <id>attach-javadocs</id> @@ -119,26 +124,32 @@ </execution> </executions> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.8.1</version> + </plugin> </plugins> </build> <profiles> - <profile> - <id>old-jdk</id> + <id>java9</id> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <!-- Use -release compiler option rather than source/target if 9+ --> + <release>${maven.compiler.target}</release> + </configuration> + </plugin> + </plugins> + </build> <activation> - <jdk>(,1.6]</jdk> + <jdk>[9,)</jdk> </activation> - - <dependencies> - <dependency> - <groupId>com.github.jnr</groupId> - <artifactId>jnr-enxio-protocolfamily</artifactId> - <version>1.0</version> - <scope>provided</scope> - <optional>true</optional> - </dependency> - </dependencies> </profile> </profiles> </project> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jnr-enxio-jnr-enxio-0.19/src/main/java/jnr/enxio/channels/KQSelector.java new/jnr-enxio-jnr-enxio-0.32.6/src/main/java/jnr/enxio/channels/KQSelector.java --- old/jnr-enxio-jnr-enxio-0.19/src/main/java/jnr/enxio/channels/KQSelector.java 2018-10-26 22:49:38.000000000 +0200 +++ new/jnr-enxio-jnr-enxio-0.32.6/src/main/java/jnr/enxio/channels/KQSelector.java 2021-06-04 22:03:00.000000000 +0200 @@ -214,13 +214,13 @@ synchronized (regLock) { for (SelectionKey k : cancelled) { KQSelectionKey kqs = (KQSelectionKey) k; - Descriptor d = descriptors.get(kqs.getFD()); deregister(kqs); synchronized (selected) { selected.remove(kqs); } - d.keys.remove(kqs); - if (d.keys.isEmpty()) { + Descriptor d = descriptors.get(kqs.getFD()); + if (d != null) d.keys.remove(kqs); + if (d == null || d.keys.isEmpty()) { io.put(changebuf, nchanged++, kqs.getFD(), EVFILT_READ, EV_DELETE); io.put(changebuf, nchanged++, kqs.getFD(), EVFILT_WRITE, EV_DELETE); descriptors.remove(kqs.getFD()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jnr-enxio-jnr-enxio-0.19/src/main/java/jnr/enxio/channels/Native.java new/jnr-enxio-jnr-enxio-0.32.6/src/main/java/jnr/enxio/channels/Native.java --- old/jnr-enxio-jnr-enxio-0.19/src/main/java/jnr/enxio/channels/Native.java 2018-10-26 22:49:38.000000000 +0200 +++ new/jnr-enxio-jnr-enxio-0.32.6/src/main/java/jnr/enxio/channels/Native.java 2021-06-04 22:03:00.000000000 +0200 @@ -19,7 +19,9 @@ package jnr.enxio.channels; import jnr.constants.platform.Errno; +import jnr.enxio.channels.WinLibCAdapter.LibMSVCRT; import jnr.ffi.*; +import jnr.ffi.Platform.OS; import jnr.ffi.Runtime; import jnr.ffi.annotations.IgnoreError; import jnr.ffi.annotations.In; @@ -32,7 +34,7 @@ import java.io.IOException; import java.nio.ByteBuffer; -final class Native { +public final class Native { public static interface LibC { public static final int F_GETFL = jnr.constants.platform.Fcntl.F_GETFL.intValue(); @@ -62,8 +64,25 @@ } private static final class SingletonHolder { - static final LibC libc = LibraryLoader.create(LibC.class).load(Platform.getNativePlatform().getStandardCLibraryName()); - static final jnr.ffi.Runtime runtime = Runtime.getRuntime(libc); + static final LibC libc; + static final jnr.ffi.Runtime runtime; + + static { + Platform platform = Platform.getNativePlatform(); + LibraryLoader<LibC> loader = LibraryLoader.create(LibC.class); + loader.library(platform.getStandardCLibraryName()); + if (platform.getOS() == OS.SOLARIS) { + loader.library("socket"); + } + LibC straight = loader.load(); + if (platform.getOS() == OS.WINDOWS) { + LibMSVCRT mslib = LibraryLoader.create(LibMSVCRT.class).load(platform.getStandardCLibraryName()); + libc = new WinLibCAdapter(mslib); + } else { + libc = straight; + } + runtime = Runtime.getRuntime(libc); + } } static LibC libc() { @@ -145,7 +164,7 @@ return libc().strerror(LastError.getLastError(getRuntime())); } - static Errno getLastError() { + public static Errno getLastError() { return Errno.valueOf(LastError.getLastError(getRuntime())); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jnr-enxio-jnr-enxio-0.19/src/main/java/jnr/enxio/channels/PollSelector.java new/jnr-enxio-jnr-enxio-0.32.6/src/main/java/jnr/enxio/channels/PollSelector.java --- old/jnr-enxio-jnr-enxio-0.19/src/main/java/jnr/enxio/channels/PollSelector.java 2018-10-26 22:49:38.000000000 +0200 +++ new/jnr-enxio-jnr-enxio-0.32.6/src/main/java/jnr/enxio/channels/PollSelector.java 2021-06-04 22:03:00.000000000 +0200 @@ -116,7 +116,7 @@ @Override public Set<SelectionKey> keys() { - return new HashSet<SelectionKey>(Arrays.asList(keyArray).subList(0, nfds)); + return new HashSet<SelectionKey>(Arrays.asList(keyArray).subList(1, nfds)); } @Override diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jnr-enxio-jnr-enxio-0.19/src/main/java/jnr/enxio/channels/WinLibCAdapter.java new/jnr-enxio-jnr-enxio-0.32.6/src/main/java/jnr/enxio/channels/WinLibCAdapter.java --- old/jnr-enxio-jnr-enxio-0.19/src/main/java/jnr/enxio/channels/WinLibCAdapter.java 1970-01-01 01:00:00.000000000 +0100 +++ new/jnr-enxio-jnr-enxio-0.32.6/src/main/java/jnr/enxio/channels/WinLibCAdapter.java 2021-06-04 22:03:00.000000000 +0200 @@ -0,0 +1,117 @@ +/* + * 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.nio.ByteBuffer; + +import jnr.enxio.channels.Native.LibC; +import jnr.enxio.channels.Native.Timespec; +import jnr.ffi.Pointer; +import jnr.ffi.Runtime; +import jnr.ffi.annotations.IgnoreError; +import jnr.ffi.annotations.In; +import jnr.ffi.annotations.Out; +import jnr.ffi.provider.LoadedLibrary; +import jnr.ffi.types.size_t; +import jnr.ffi.types.ssize_t; + +/** + * MSVCRT.DLL only supports some LibC functions, but the symbols are different. + * This adapter maps the MSVCRT.DLL names to standard LibC names + */ +public final class WinLibCAdapter implements LibC, LoadedLibrary { + + public static interface LibMSVCRT { + + public int _close(int fd); + public @ssize_t int _read(int fd, @Out ByteBuffer data, @size_t long size); + public @ssize_t int _read(int fd, @Out byte[] data, @size_t long size); + public @ssize_t int _write(int fd, @In ByteBuffer data, @size_t long size); + public @ssize_t int _write(int fd, @In byte[] data, @size_t long size); + public int _pipe(@Out int[] fds); + + @IgnoreError String _strerror(int error); + + // These functions don't exist: + + //public int shutdown(int s, int how); + //public int fcntl(int fd, int cmd, int data); + //public int poll(@In @Out ByteBuffer pfds, int nfds, int timeout); + //public int poll(@In @Out Pointer pfds, int nfds, int timeout); + //public int kqueue(); + //public int kevent(int kq, @In ByteBuffer changebuf, int nchanges, + // @Out ByteBuffer eventbuf, int nevents, + // @In @Transient Timespec timeout); + //public int kevent(int kq, + // @In Pointer changebuf, int nchanges, + // @Out Pointer eventbuf, int nevents, + // @In @Transient Timespec timeout); + } + + private LibMSVCRT win; + public WinLibCAdapter(LibMSVCRT winlibc) { this.win = winlibc; } + + @Override public int close(int fd) { return win._close(fd); } + @Override public int read(int fd, ByteBuffer data, long size) { return win._read(fd, data, size); } + @Override public int read(int fd, byte[] data, long size) { return win._read(fd, data, size); } + @Override public int write(int fd, ByteBuffer data, long size) { return win._write(fd, data, size); } + @Override public int write(int fd, byte[] data, long size) { return win._write(fd, data, size); } + @Override public int pipe(int[] fds) { return win._pipe(fds); } + @Override public String strerror(int error) { return win._strerror(error); } + + @Override + public Runtime getRuntime() { + return Runtime.getRuntime(win); + } + + // Unsupported Operations. Some may be implementable, others like fcntl may not be. + + @Override + public int fcntl(int fd, int cmd, int data) { + throw new UnsupportedOperationException("fcntl isn't supported on Windows"); + } + + @Override + public int poll(ByteBuffer pfds, int nfds, int timeout) { + throw new UnsupportedOperationException("poll isn't supported on Windows"); + } + + @Override + public int poll(Pointer pfds, int nfds, int timeout) { + throw new UnsupportedOperationException("poll isn't supported on Windows"); + } + + @Override + public int kqueue() { + throw new UnsupportedOperationException("kqueue isn't supported on Windows"); + } + + @Override + public int kevent(int kq, ByteBuffer changebuf, int nchanges, ByteBuffer eventbuf, int nevents, Timespec timeout) { + throw new UnsupportedOperationException("kevent isn't supported on Windows"); + } + + @Override + public int kevent(int kq, Pointer changebuf, int nchanges, Pointer eventbuf, int nevents, Timespec timeout) { + throw new UnsupportedOperationException("kevent isn't supported on Windows"); + } + + @Override + public int shutdown(int s, int how) { + throw new UnsupportedOperationException("shutdown isn't supported on Windows"); + } +} \ No newline at end of file