[Git][java-team/jnr-netdb][master] 4 commits: New upstream version 1.2.0+dfsg
Andreas Tille (@tille)
gitlab at salsa.debian.org
Sat Feb 1 12:39:16 GMT 2025
Andreas Tille pushed to branch master at Debian Java Maintainers / jnr-netdb
Commits:
24b0d70d by Andreas Tille at 2025-02-01T13:33:00+01:00
New upstream version 1.2.0+dfsg
- - - - -
d2c6692b by Andreas Tille at 2025-02-01T13:33:00+01:00
New upstream version
- - - - -
a196f6b9 by Andreas Tille at 2025-02-01T13:33:00+01:00
Update upstream source from tag 'upstream/1.2.0+dfsg'
Update to upstream version '1.2.0+dfsg'
with Debian dir 8f50872646509685dc0aa93add6acdfad750c235
- - - - -
dc9eed3c by Andreas Tille at 2025-02-01T13:34:44+01:00
routine-update: Ready to upload to unstable
- - - - -
6 changed files:
- + .github/workflows/ci.yml
- debian/changelog
- pom.xml
- src/test/java/jnr/netdb/FileProtocolDBTest.java
- src/test/java/jnr/netdb/NativeProtocolsDBTest.java
- src/test/java/jnr/netdb/ProtocolTest.java
Changes:
=====================================
.github/workflows/ci.yml
=====================================
@@ -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 at v2
+ - name: Set up JDK 8
+ uses: actions/setup-java at v1
+ with:
+ java-version: 8
+ - name: Build with Maven
+ run: mvn -B package --file pom.xml
+
+ jdk11:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout at v2
+ - name: Set up JDK 11
+ uses: actions/setup-java at v1
+ with:
+ java-version: 11
+ - name: Build with Maven
+ run: mvn -B package --file pom.xml
=====================================
debian/changelog
=====================================
@@ -1,4 +1,4 @@
-jnr-netdb (1.1.6-2) UNRELEASED; urgency=medium
+jnr-netdb (1.2.0+dfsg-1) unstable; urgency=medium
* Team upload.
* Fix watch file
@@ -7,8 +7,9 @@ jnr-netdb (1.1.6-2) UNRELEASED; urgency=medium
* Reorder sequence of d/control fields by cme (routine-update)
* Secure URI in copyright format (routine-update)
* Remove trailing whitespace in debian/changelog (routine-update)
+ * New upstream version
- -- Andreas Tille <tille at debian.org> Sat, 01 Feb 2025 12:44:39 +0100
+ -- Andreas Tille <tille at debian.org> Sat, 01 Feb 2025 13:33:09 +0100
jnr-netdb (1.1.6-1.1) unstable; urgency=medium
=====================================
pom.xml
=====================================
@@ -9,7 +9,7 @@
<groupId>com.github.jnr</groupId>
<artifactId>jnr-netdb</artifactId>
<packaging>jar</packaging>
- <version>1.1.6</version>
+ <version>1.2.0</version>
<name>jnr-netdb</name>
<description>Lookup TCP and UDP services from java</description>
<url>http://github.com/jnr/jnr-netdb</url>
@@ -38,8 +38,8 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <maven.compiler.source>1.5</maven.compiler.source>
- <maven.compiler.target>1.5</maven.compiler.target>
+ <maven.compiler.source>8</maven.compiler.source>
+ <maven.compiler.target>8</maven.compiler.target>
</properties>
<dependencies>
@@ -54,10 +54,53 @@
<dependency>
<groupId>com.github.jnr</groupId>
<artifactId>jnr-ffi</artifactId>
- <version>2.1.0</version>
+ <version>2.2.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.3.1</version>
+ <configuration>
+ <archive>
+ <manifestEntries>
+ <Automatic-Module-Name>org.jnrproject.netdb</Automatic-Module-Name>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.8.1</version>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <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>[9,)</jdk>
+ </activation>
+ </profile>
+ </profiles>
+
</project>
=====================================
src/test/java/jnr/netdb/FileProtocolDBTest.java
=====================================
@@ -34,17 +34,32 @@ public class FileProtocolDBTest {
@Test public void canLookupIpProtocolByName() {
ProtocolsDB db = FileProtocolsDB.getInstance();
- Protocol p = db.getProtocolByName("ip");
- assertNotNull("could not lookup ip protocol", p);
- assertEquals("incorrect proto number", 0, p.getProto());
- assertEquals("incorrect name", "ip", p.getName());
+ // we try ip first and then ipv4 due to jnr/jnr-netdb#4
+ Protocol p = Protocol.getProtocolByName("ip");
+ if (p != null) {
+ assertEquals("incorrect proto number", 0, p.getProto());
+ assertEquals("incorrect name", "ip", p.getName());
+ } else {
+ p = Protocol.getProtocolByName("ipv4");
+ assertNotNull("could not lookup ipv4 protocol", p);
+ assertEquals("incorrect proto number", 4, p.getProto());
+ assertEquals("incorrect name", "ipv4", p.getName());
+ }
}
@Test public void canLookupIpProtocolByNumber() {
ProtocolsDB db = FileProtocolsDB.getInstance();
- Protocol p = db.getProtocolByNumber(0);
- assertNotNull("could not lookup ip protocol", p);
- assertEquals("incorrect proto number", 0, p.getProto());
- assertEquals("incorrect name", "ip", p.getName());
+ // we try ip first and then ipv4 due to jnr/jnr-netdb#4
+ Protocol p = Protocol.getProtocolByName("ip");
+ if (p != null) {
+ p = Protocol.getProtocolByNumber(0);
+ assertEquals("incorrect proto number", 0, p.getProto());
+ assertEquals("incorrect name", "ip", p.getName());
+ } else {
+ p = Protocol.getProtocolByNumber(4);
+ assertNotNull("could not lookup ip protocol", p);
+ assertEquals("incorrect proto number", 4, p.getProto());
+ assertEquals("incorrect name", "ipv4", p.getName());
+ }
}
}
=====================================
src/test/java/jnr/netdb/NativeProtocolsDBTest.java
=====================================
@@ -34,18 +34,33 @@ public class NativeProtocolsDBTest {
@Test public void canLookupIpProtocolByName() {
ProtocolsDB db = NativeProtocolsDB.getInstance();
- Protocol p = db.getProtocolByName("ip");
- assertNotNull("could not lookup ip protocol", p);
- assertEquals("incorrect proto number", 0, p.getProto());
- assertEquals("incorrect name", "ip", p.getName());
+ // we try ip first and then ipv4 due to jnr/jnr-netdb#4
+ Protocol p = Protocol.getProtocolByName("ip");
+ if (p != null) {
+ assertEquals("incorrect proto number", 0, p.getProto());
+ assertEquals("incorrect name", "ip", p.getName());
+ } else {
+ p = Protocol.getProtocolByName("ipv4");
+ assertNotNull("could not lookup ipv4 protocol", p);
+ assertEquals("incorrect proto number", 4, p.getProto());
+ assertEquals("incorrect name", "ipv4", p.getName());
+ }
}
@Test public void canLookupIpProtocolByNumber() {
ProtocolsDB db = NativeProtocolsDB.getInstance();
- Protocol p = db.getProtocolByNumber(0);
- assertNotNull("could not lookup ip protocol", p);
- assertEquals("incorrect proto number", 0, p.getProto());
- assertEquals("incorrect name", "ip", p.getName());
+ // we try ip first and then ipv4 due to jnr/jnr-netdb#4
+ Protocol p = Protocol.getProtocolByName("ip");
+ if (p != null) {
+ p = Protocol.getProtocolByNumber(0);
+ assertEquals("incorrect proto number", 0, p.getProto());
+ assertEquals("incorrect name", "ip", p.getName());
+ } else {
+ p = Protocol.getProtocolByNumber(4);
+ assertNotNull("could not lookup ip protocol", p);
+ assertEquals("incorrect proto number", 4, p.getProto());
+ assertEquals("incorrect name", "ipv4", p.getName());
+ }
}
@Test public void canLookupTcpProtocolByName() {
=====================================
src/test/java/jnr/netdb/ProtocolTest.java
=====================================
@@ -33,10 +33,17 @@ public class ProtocolTest {
}
@Test public void canLookupIpProtocolByName() {
+ // we try ip first and then ipv4 due to jnr/jnr-netdb#4
Protocol p = Protocol.getProtocolByName("ip");
- assertNotNull("could not lookup ip protocol", p);
- assertEquals("incorrect proto number", 0, p.getProto());
- assertEquals("incorrect name", "ip", p.getName());
+ if (p != null) {
+ assertEquals("incorrect proto number", 0, p.getProto());
+ assertEquals("incorrect name", "ip", p.getName());
+ } else {
+ p = Protocol.getProtocolByName("ipv4");
+ assertNotNull("could not lookup ipv4 protocol", p);
+ assertEquals("incorrect proto number", 4, p.getProto());
+ assertEquals("incorrect name", "ipv4", p.getName());
+ }
}
@Test public void returnsNullOnUnknownProtocol() {
@@ -45,10 +52,18 @@ public class ProtocolTest {
}
@Test public void canLookupIpProtocolByNumber() {
- Protocol p = Protocol.getProtocolByNumber(0);
- assertNotNull("could not lookup ip protocol", p);
- assertEquals("incorrect proto number", 0, p.getProto());
- assertEquals("incorrect name", "ip", p.getName());
+ // we try ip first and then ipv4 due to jnr/jnr-netdb#4
+ Protocol p = Protocol.getProtocolByName("ip");
+ if (p != null) {
+ p = Protocol.getProtocolByNumber(0);
+ assertEquals("incorrect proto number", 0, p.getProto());
+ assertEquals("incorrect name", "ip", p.getName());
+ } else {
+ p = Protocol.getProtocolByNumber(4);
+ assertNotNull("could not lookup ip protocol", p);
+ assertEquals("incorrect proto number", 4, p.getProto());
+ assertEquals("incorrect name", "ipv4", p.getName());
+ }
}
@Test public void returnsNullOnInvalidNumber() {
View it on GitLab: https://salsa.debian.org/java-team/jnr-netdb/-/compare/fe71b11f37f6a7ad197ded88492343fe61a8a273...dc9eed3c62320c56a1a1c57e9fe99f5ce8efa174
--
View it on GitLab: https://salsa.debian.org/java-team/jnr-netdb/-/compare/fe71b11f37f6a7ad197ded88492343fe61a8a273...dc9eed3c62320c56a1a1c57e9fe99f5ce8efa174
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/20250201/bdb14bdf/attachment.htm>
More information about the pkg-java-commits
mailing list