[Git][java-team/jnr-enxio][master] 16 commits: New upstream version 0.32.3

Emmanuel Bourg (@ebourg) gitlab at salsa.debian.org
Tue May 31 07:07:22 BST 2022



Emmanuel Bourg pushed to branch master at Debian Java Maintainers / jnr-enxio


Commits:
34d54028 by Louis-Philippe Véronneau at 2020-12-30T14:39:42-05:00
New upstream version 0.32.3
- - - - -
9ae46a89 by Emmanuel Bourg at 2022-05-31T00:46:56+02:00
Fixed the build failure with OpenJDK 17 GA (Closes: #1011561)

- - - - -
60a33fb8 by Emmanuel Bourg at 2022-05-31T00:47:03+02:00
Standards-Version updated to 4.6.1

- - - - -
93833eca by Emmanuel Bourg at 2022-05-31T00:55:15+02:00
Removed the -java-doc package

- - - - -
ddef4e3c by Emmanuel Bourg at 2022-05-31T00:57:23+02:00
New upstream version 0.32.4
- - - - -
54ab3a11 by Emmanuel Bourg at 2022-05-31T00:57:27+02:00
New upstream version 0.32.5
- - - - -
e433b3fa by Emmanuel Bourg at 2022-05-31T00:57:31+02:00
New upstream version 0.32.6
- - - - -
bef3a68e by Emmanuel Bourg at 2022-05-31T00:57:35+02:00
New upstream version 0.32.7
- - - - -
17bb784f by Emmanuel Bourg at 2022-05-31T00:57:38+02:00
New upstream version 0.32.8
- - - - -
2ffcea5b by Emmanuel Bourg at 2022-05-31T00:57:43+02:00
New upstream version 0.32.9
- - - - -
d0586b99 by Emmanuel Bourg at 2022-05-31T00:57:46+02:00
New upstream version 0.32.10
- - - - -
d69a4d6b by Emmanuel Bourg at 2022-05-31T00:57:50+02:00
New upstream version 0.32.11
- - - - -
055b03f3 by Emmanuel Bourg at 2022-05-31T00:57:53+02:00
New upstream version 0.32.12
- - - - -
fb000e8b by Emmanuel Bourg at 2022-05-31T00:58:51+02:00
New upstream version 0.32.13
- - - - -
538de27a by Emmanuel Bourg at 2022-05-31T00:58:51+02:00
Update upstream source from tag 'upstream/0.32.13'

Update to upstream version '0.32.13'
with Debian dir 7b1ca2d3c70c8c3048e40d03342ea94222b41f68
- - - - -
f83d0ba8 by Emmanuel Bourg at 2022-05-31T08:06:31+02:00
New upstream release (0.32.13)

- - - - -


7 changed files:

- debian/changelog
- debian/control
- − debian/libjnr-enxio-java-doc.install
- + debian/maven.ignoreRules
- debian/maven.properties
- pom.xml
- src/main/java/jnr/enxio/channels/KQSelector.java


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,13 @@
+jnr-enxio (0.32.13-1) unstable; urgency=medium
+
+  * Team upload.
+  * New upstream release
+  * Fixed the build failure with OpenJDK 17 GA (Closes: #1011561)
+  * Removed the -java-doc package
+  * Standards-Version updated to 4.6.1
+
+ -- Emmanuel Bourg <ebourg at apache.org>  Tue, 31 May 2022 08:06:23 +0200
+
 jnr-enxio (0.32.3-2) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/control
=====================================
@@ -6,17 +6,15 @@ Uploaders: Tim Potter <tpot at hp.com>,
            Miguel Landaeta <nomadium at debian.org>
 Build-Depends: debhelper-compat (= 13),
                default-jdk,
-               default-jdk-doc,
                javahelper,
                junit4,
                libjnr-constants-java,
                libjnr-ffi-java,
                libmaven-bundle-plugin-java,
-               libmaven-javadoc-plugin-java,
                libmaven-source-plugin-java,
                libmaven-compiler-plugin-java,
                maven-debian-helper
-Standards-Version: 4.5.1
+Standards-Version: 4.6.1
 Homepage: https://github.com/jnr/jnr-enxio
 Vcs-Git: https://salsa.debian.org/java-team/jnr-enxio.git
 Vcs-Browser: https://salsa.debian.org/java-team/jnr-enxio
@@ -26,8 +24,7 @@ Package: libjnr-enxio-java
 Architecture: all
 Depends: ${maven:Depends},
          ${misc:Depends}
-Suggests: libjnr-enxio-java-doc,
-          ${maven:OptionalDepends}
+Suggests: ${maven:OptionalDepends}
 Description: Java extended native cross-platform I/O library
  Java Native Runtime (JNR) is a collection of Java libraries to make
  interfacing with OS-level features easier. JNR uses an alternate
@@ -38,23 +35,3 @@ Description: Java extended native cross-platform I/O library
  library by implementing an I/O backend based on calls to the underlying
  native OS-level functions. This is implementing using the jnr-ffi
  foreign function interface.
-
-Package: libjnr-enxio-java-doc
-Architecture: all
-Section: doc
-Depends: ${maven:DocDepends},
-         ${misc:Depends}
-Suggests: libjnr-enxio-java,
-          ${maven:DocOptionalDepends}
-Description: Java extended native cross-platform I/O library (documentation)
- Java Native Runtime (JNR) is a collection of Java libraries to make
- interfacing with OS-level features easier. JNR uses an alternate
- method to JNI or JNA to achieve programming simplicity while still
- retaining performance.
- .
- The jnr-enxio package mimics the standard Java non-blocking I/O (NIO)
- library by implementing an I/O backend based on calls to the underlying
- native OS-level functions. This is implementing using the jnr-ffi
- foreign function interface.
- .
- This package contains the API documentation of libjnr-enxio.


=====================================
debian/libjnr-enxio-java-doc.install deleted
=====================================
@@ -1 +0,0 @@
-target/apidocs/* usr/share/doc/libjnr-enxio-java/api


=====================================
debian/maven.ignoreRules
=====================================
@@ -0,0 +1,2 @@
+
+org.apache.maven.plugins maven-javadoc-plugin


=====================================
debian/maven.properties
=====================================
@@ -2,4 +2,4 @@ project.build.sourceEncoding=UTF-8
 maven.compiler.source=8
 maven.compiler.target=8
 
-argLine=--illegal-access=permit
+argLine=--add-opens java.base/java.io=ALL-UNNAMED


=====================================
pom.xml
=====================================
@@ -10,7 +10,7 @@
   <groupId>com.github.jnr</groupId>
   <artifactId>jnr-enxio</artifactId>
   <packaging>jar</packaging>
-  <version>0.32.3</version>
+  <version>0.32.13</version>
   <name>jnr-enxio</name>
   <description>Native I/O access for java</description>
   <url>http://github.com/jnr/jnr-enxio</url>
@@ -53,12 +53,12 @@
     <dependency>
       <groupId>com.github.jnr</groupId>
       <artifactId>jnr-constants</artifactId>
-      <version>0.10.1</version>
+      <version>0.10.3</version>
     </dependency>
     <dependency>
       <groupId>com.github.jnr</groupId>
       <artifactId>jnr-ffi</artifactId>
-      <version>2.2.1</version>
+      <version>2.2.11</version>
     </dependency>
   </dependencies>
 
@@ -145,6 +145,23 @@
               <release>${maven.compiler.target}</release>
             </configuration>
           </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-javadoc-plugin</artifactId>
+            <version>3.2.0</version>
+            <configuration>
+              <!-- Use -release compiler option rather than source/target if 9+ -->
+              <release>${maven.compiler.target}</release>
+            </configuration>
+          </plugin>
+          <plugin>
+            <artifactId>maven-surefire-plugin</artifactId>
+            <version>3.0.0-M5</version>
+            <configuration>
+              <!-- open up java.io so we can access file descriptor during testing -->
+              <argLine>--add-opens java.base/java.io=ALL-UNNAMED</argLine>
+            </configuration>
+          </plugin>
         </plugins>
       </build>
       <activation>


=====================================
src/main/java/jnr/enxio/channels/KQSelector.java
=====================================
@@ -24,6 +24,7 @@ import jnr.ffi.Pointer;
 import jnr.ffi.StructLayout;
 import jnr.ffi.TypeAlias;
 import jnr.ffi.provider.jffi.NativeRuntime;
+import jnr.ffi.Platform;
 
 import java.io.IOException;
 import java.nio.channels.SelectionKey;
@@ -156,7 +157,7 @@ class KQSelector extends java.nio.channels.spi.AbstractSelector {
             ts = new Native.Timespec(sec, nsec);
         }
 
-        if (DEBUG) System.out.printf("nchanged=%d\n", nchanged);
+        if (DEBUG) System.err.printf("nchanged=%d\n", nchanged);
         int nready = 0;
         try {
             begin();
@@ -166,7 +167,7 @@ class KQSelector extends java.nio.channels.spi.AbstractSelector {
 
             } while (nready < 0 && Errno.EINTR.equals(Errno.valueOf(Native.getRuntime().getLastError())));
 
-            if (DEBUG) System.out.println("kevent returned " + nready + " events ready");
+            if (DEBUG) System.err.println("kevent returned " + nready + " events ready");
 
         } finally {
             end();
@@ -180,7 +181,7 @@ class KQSelector extends java.nio.channels.spi.AbstractSelector {
 
                 if (d != null) {
                     int filt = io.getFilter(eventbuf, i);
-                    if (DEBUG) System.out.printf("fd=%d filt=0x%x\n", d.fd, filt);
+                    if (DEBUG) System.err.printf("fd=%d filt=0x%x\n", d.fd, filt);
                     for (KQSelectionKey k : d.keys) {
                         int iops = k.interestOps();
                         int ops = 0;
@@ -199,7 +200,7 @@ class KQSelector extends java.nio.channels.spi.AbstractSelector {
                     }
 
                 } else if (fd == pipefd[0]) {
-                    if (DEBUG) System.out.println("Waking up");
+                    if (DEBUG) System.err.println("Waking up");
                     wakeupReceived();
                 }
             }
@@ -272,7 +273,7 @@ class KQSelector extends java.nio.channels.spi.AbstractSelector {
                         changed.write = false;
                     }
                 }
-                if (DEBUG) System.out.printf("Updating fd %d filt=0x%x flags=0x%x\n",
+                if (DEBUG) System.err.printf("Updating fd %d filt=0x%x flags=0x%x\n",
                     changed.fd, filt, flags);
                 if (flags != 0) {
                     io.put(changebuf, _nchanged++, changed.fd, filt, flags);
@@ -301,8 +302,35 @@ class KQSelector extends java.nio.channels.spi.AbstractSelector {
 
     private static final class EventIO {
         private static final EventIO INSTANCE = new EventIO();
-        private final EventLayout layout = new EventLayout(NativeRuntime.getSystemRuntime());
-        private final jnr.ffi.Type uintptr_t = layout.getRuntime().findType(TypeAlias.uintptr_t);
+        private final EventLayout layout;
+        private final jnr.ffi.Type uintptr_t;
+
+        private EventIO() {
+            boolean is_freebsd_12_or_later = false;
+            if(Platform.getNativePlatform().getOS() == Platform.OS.FREEBSD) {
+                String version = System.getProperty("os.version");
+                if(version != null) {
+                    int tr_i = -1;
+                    for(char c : new char[] { ' ', '_', '-', '+', '.' }) {
+                        int i = version.indexOf(c);
+                        if(i >= 0 && (tr_i == -1 || tr_i > i)) tr_i = i;
+                    }
+                    if(tr_i >= 0) version = version.substring(0, tr_i);
+                    try {
+                        int freebsd_major_version = Integer.parseInt(version);
+                        if(freebsd_major_version > 11) is_freebsd_12_or_later = true;
+                    } catch(NumberFormatException e) {
+                        if(DEBUG) e.printStackTrace();
+                    }
+                }
+            }
+            if(is_freebsd_12_or_later) {
+                layout = new FreeBSD12EventLayout(NativeRuntime.getSystemRuntime());
+            } else {
+                layout = new LegacyEventLayout(NativeRuntime.getSystemRuntime());
+            }
+            uintptr_t = layout.getRuntime().findType(TypeAlias.uintptr_t);
+        }
 
         public static EventIO getInstance() {
             return EventIO.INSTANCE;
@@ -311,7 +339,7 @@ class KQSelector extends java.nio.channels.spi.AbstractSelector {
         public final void put(Pointer buf, int index, int fd, int filt, int flags) {
             buf.putInt(uintptr_t, (index * layout.size()) + layout.ident.offset(), fd);
             buf.putShort((index * layout.size()) + layout.filter.offset(), (short) filt);
-            buf.putInt((index * layout.size()) + layout.flags.offset(), flags);
+            buf.putShort((index * layout.size()) + layout.flags.offset(), (short)flags);
         }
         
         public final int size() {
@@ -335,7 +363,7 @@ class KQSelector extends java.nio.channels.spi.AbstractSelector {
         }
     }
 
-    private static class EventLayout extends StructLayout {
+    private static abstract class EventLayout extends StructLayout {
         private EventLayout(jnr.ffi.Runtime runtime) {
             super(runtime);
         }
@@ -343,7 +371,22 @@ class KQSelector extends java.nio.channels.spi.AbstractSelector {
         public final int16_t filter = new int16_t();
         public final u_int16_t flags = new u_int16_t();
         public final u_int32_t fflags = new u_int32_t();
+    }
+
+    private static class LegacyEventLayout extends EventLayout {
+        private LegacyEventLayout(jnr.ffi.Runtime runtime) {
+            super(runtime);
+        }
         public final intptr_t data = new intptr_t();
         public final Pointer udata = new Pointer();
     }
+
+    private static class FreeBSD12EventLayout extends EventLayout {
+        private FreeBSD12EventLayout(jnr.ffi.Runtime runtime) {
+            super(runtime);
+        }
+        public final int64_t data = new int64_t();
+        public final Pointer udata = new Pointer();
+        public final u_int64_t[] ext = array(new u_int64_t[4]);
+    }
 }



View it on GitLab: https://salsa.debian.org/java-team/jnr-enxio/-/compare/50f1e1c0719edf4e3b20616a33f60876328913c4...f83d0ba84635c3196a2babefb250d305444b442c

-- 
View it on GitLab: https://salsa.debian.org/java-team/jnr-enxio/-/compare/50f1e1c0719edf4e3b20616a33f60876328913c4...f83d0ba84635c3196a2babefb250d305444b442c
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20220531/f5bd0f90/attachment.htm>


More information about the pkg-java-commits mailing list