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 2023-04-27 20:01:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/jnr-enxio (Old)
 and      /work/SRC/openSUSE:Factory/.jnr-enxio.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "jnr-enxio"

Thu Apr 27 20:01:17 2023 rev:3 rq:1083175 version:0.32.14

Changes:
--------
--- /work/SRC/openSUSE:Factory/jnr-enxio/jnr-enxio.changes      2021-07-10 
00:03:04.474781700 +0200
+++ /work/SRC/openSUSE:Factory/.jnr-enxio.new.1533/jnr-enxio.changes    
2023-04-27 20:01:44.186208387 +0200
@@ -1,0 +2,6 @@
+Sun Dec 18 06:48:02 UTC 2022 - Anton Shvetz <shvetz.an...@gmail.com>
+
+- Update to v0.32.14
+  * No changelog provided by upstream
+
+-------------------------------------------------------------------
@@ -4,0 +11 @@
+  * No changelog provided by upstream

Old:
----
  jnr-enxio-0.32.6.tar.gz

New:
----
  jnr-enxio-0.32.14.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ jnr-enxio.spec ++++++
--- /var/tmp/diff_new_pack.sB1Cq3/_old  2023-04-27 20:02:19.290414751 +0200
+++ /var/tmp/diff_new_pack.sB1Cq3/_new  2023-04-27 20:02:19.294414775 +0200
@@ -1,7 +1,7 @@
 #
-# spec file for package jnr-enxio
+# spec file
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %global cluster jnr
 Name:           %{cluster}-enxio
-Version:        0.32.6
+Version:        0.32.14
 Release:        0
 Summary:        Native I/O access for java
 # src/main/java/jnr/enxio/channels/PollSelectionKey.java is LGPLv3

++++++ jnr-enxio-0.32.6.tar.gz -> jnr-enxio-0.32.14.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jnr-enxio-jnr-enxio-0.32.6/pom.xml 
new/jnr-enxio-jnr-enxio-0.32.14/pom.xml
--- old/jnr-enxio-jnr-enxio-0.32.6/pom.xml      2021-06-04 22:03:00.000000000 
+0200
+++ new/jnr-enxio-jnr-enxio-0.32.14/pom.xml     2022-11-15 19:34:09.000000000 
+0100
@@ -10,7 +10,7 @@
   <groupId>com.github.jnr</groupId>
   <artifactId>jnr-enxio</artifactId>
   <packaging>jar</packaging>
-  <version>0.32.6</version>
+  <version>0.32.14</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.2</version>
+      <version>0.10.4</version>
     </dependency>
     <dependency>
       <groupId>com.github.jnr</groupId>
       <artifactId>jnr-ffi</artifactId>
-      <version>2.2.4</version>
+      <version>2.2.13</version>
     </dependency>
   </dependencies>
 
@@ -138,11 +138,11 @@
       <build>
         <plugins>
           <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-compiler-plugin</artifactId>
+            <artifactId>maven-surefire-plugin</artifactId>
+            <version>3.0.0-M5</version>
             <configuration>
-              <!-- Use -release compiler option rather than source/target if 
9+ -->
-              <release>${maven.compiler.target}</release>
+              <!-- 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>
@@ -150,6 +150,9 @@
       <activation>
         <jdk>[9,)</jdk>
       </activation>
+      <properties>
+        <maven.compiler.release>8</maven.compiler.release>
+      </properties>
     </profile>
   </profiles>
 </project>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/jnr-enxio-jnr-enxio-0.32.6/src/main/java/jnr/enxio/channels/KQSelector.java 
new/jnr-enxio-jnr-enxio-0.32.14/src/main/java/jnr/enxio/channels/KQSelector.java
--- 
old/jnr-enxio-jnr-enxio-0.32.6/src/main/java/jnr/enxio/channels/KQSelector.java 
    2021-06-04 22:03:00.000000000 +0200
+++ 
new/jnr-enxio-jnr-enxio-0.32.14/src/main/java/jnr/enxio/channels/KQSelector.java
    2022-11-15 19:34:09.000000000 +0100
@@ -24,6 +24,7 @@
 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 @@
             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 @@
 
             } 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 @@
 
                 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 @@
                     }
 
                 } else if (fd == pipefd[0]) {
-                    if (DEBUG) System.out.println("Waking up");
+                    if (DEBUG) System.err.println("Waking up");
                     wakeupReceived();
                 }
             }
@@ -272,7 +273,7 @@
                         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 @@
 
     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 @@
         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 @@
         }
     }
 
-    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 @@
         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]);
+    }
 }

Reply via email to