forked from pool/aqute-bnd
This commit is contained in:
commit
c7ab928f31
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
75
0001-Disable-removed-commands.patch
Normal file
75
0001-Disable-removed-commands.patch
Normal file
@ -0,0 +1,75 @@
|
||||
From c250eb3ebbb9afb650edc080708c5e4c3cccbb78 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Simacek <msimacek@redhat.com>
|
||||
Date: Tue, 4 Oct 2016 18:02:26 +0200
|
||||
Subject: [PATCH 1/2] Disable removed commands
|
||||
|
||||
---
|
||||
biz.aQute.bnd/src/aQute/bnd/main/bnd.java | 45 -------------------------------
|
||||
1 file changed, 45 deletions(-)
|
||||
|
||||
diff --git a/biz.aQute.bnd/src/aQute/bnd/main/bnd.java b/biz.aQute.bnd/src/aQute/bnd/main/bnd.java
|
||||
index 1cc3216..c669e4a 100644
|
||||
--- a/biz.aQute.bnd/src/aQute/bnd/main/bnd.java
|
||||
+++ b/biz.aQute.bnd/src/aQute/bnd/main/bnd.java
|
||||
@@ -105,7 +105,6 @@ import aQute.bnd.osgi.Processor;
|
||||
import aQute.bnd.osgi.Resource;
|
||||
import aQute.bnd.osgi.Verifier;
|
||||
import aQute.bnd.osgi.eclipse.EclipseClasspath;
|
||||
-import aQute.bnd.repository.maven.provider.NexusCommand;
|
||||
import aQute.bnd.service.Actionable;
|
||||
import aQute.bnd.service.RepositoryPlugin;
|
||||
import aQute.bnd.service.action.Action;
|
||||
@@ -4064,50 +4063,6 @@ public class bnd extends Processor {
|
||||
}
|
||||
|
||||
/**
|
||||
- * Resolve command
|
||||
- *
|
||||
- * @throws Exception
|
||||
- */
|
||||
-
|
||||
- public void _resolve(ResolveCommand.ResolveOptions options) throws Exception {
|
||||
- ResolveCommand rc = new ResolveCommand(this);
|
||||
- String help = options._command().subCmd(options, rc);
|
||||
- if (help != null)
|
||||
- out.println(help);
|
||||
- getInfo(rc);
|
||||
- rc.close();
|
||||
- }
|
||||
-
|
||||
- /**
|
||||
- * Remote command
|
||||
- *
|
||||
- * @throws Exception
|
||||
- */
|
||||
-
|
||||
- public void _remote(RemoteCommand.RemoteOptions options) throws Exception {
|
||||
- RemoteCommand rc = new RemoteCommand(this, options);
|
||||
- String help = options._command().subCmd(options, rc);
|
||||
- if (help != null)
|
||||
- out.println(help);
|
||||
- getInfo(rc);
|
||||
- rc.close();
|
||||
- }
|
||||
-
|
||||
- /**
|
||||
- * Nexus commands
|
||||
- *
|
||||
- * @throws Exception
|
||||
- */
|
||||
-
|
||||
- public void _nexus(NexusCommand.NexusOptions options) throws Exception {
|
||||
- NexusCommand rc = new NexusCommand(this, options);
|
||||
- String help = options._command().subCmd(options, rc);
|
||||
- if (help != null)
|
||||
- out.println(help);
|
||||
- getInfo(rc);
|
||||
- rc.close();
|
||||
- }
|
||||
- /**
|
||||
* Export a bndrun file
|
||||
*/
|
||||
|
||||
--
|
||||
2.13.5
|
||||
|
25
0002-Fix-ant-compatibility.patch
Normal file
25
0002-Fix-ant-compatibility.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From bb26bdfa9f742a6ae5d39e0312aeadb8e9b48940 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Simacek <msimacek@redhat.com>
|
||||
Date: Tue, 12 Sep 2017 18:11:27 +0300
|
||||
Subject: [PATCH 2/2] Fix ant compatibility
|
||||
|
||||
---
|
||||
biz.aQute.bnd/src/aQute/bnd/ant/BndTask.java | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/biz.aQute.bnd/src/aQute/bnd/ant/BndTask.java b/biz.aQute.bnd/src/aQute/bnd/ant/BndTask.java
|
||||
index aac8b8a..26dfe59 100644
|
||||
--- a/biz.aQute.bnd/src/aQute/bnd/ant/BndTask.java
|
||||
+++ b/biz.aQute.bnd/src/aQute/bnd/ant/BndTask.java
|
||||
@@ -220,7 +220,7 @@ public class BndTask extends BaseTask {
|
||||
if (inherit) {
|
||||
Properties projectProperties = new UTF8Properties();
|
||||
@SuppressWarnings("unchecked")
|
||||
- Hashtable<Object,Object> antProps = getProject().getProperties();
|
||||
+ Hashtable<String,Object> antProps = getProject().getProperties();
|
||||
projectProperties.putAll(antProps);
|
||||
projectProperties.putAll(builder.getProperties());
|
||||
builder.setProperties(projectProperties);
|
||||
--
|
||||
2.13.5
|
||||
|
3
3.5.0.REL.tar.gz
Normal file
3
3.5.0.REL.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b461470b48d09352d23e440b77cbde758a2351820da831c667c601ad008efebd
|
||||
size 79949018
|
42
aQute.libg-3.5.0.pom
Normal file
42
aQute.libg-3.5.0.pom
Normal file
@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>biz.aQute.bnd</groupId>
|
||||
<artifactId>aQute.libg</artifactId>
|
||||
<version>3.5.0</version>
|
||||
<description>A library to be statically linked. Contains many small utilities. This bundle should not be installed in a framework, it is compile only.</description>
|
||||
<name>aQute.libg</name>
|
||||
<url>http://bnd.bndtools.org/</url>
|
||||
<organization>
|
||||
<name>Bndtools</name>
|
||||
<url>http://bndtools.org/</url>
|
||||
</organization>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>Apache-2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
|
||||
<distribution>repo</distribution>
|
||||
<comments>Apache License, Version 2.0</comments>
|
||||
</license>
|
||||
</licenses>
|
||||
<scm>
|
||||
<url>https://github.com/bndtools/bnd</url>
|
||||
<connection>scm:git:https://github.com/bndtools/bnd.git</connection>
|
||||
<developerConnection>scm:git:git@github.com:bndtools/bnd.git</developerConnection>
|
||||
<tag>3.5.0.REL</tag>
|
||||
</scm>
|
||||
<developers>
|
||||
<developer>
|
||||
<id>pkriens</id>
|
||||
<email>Peter.Kriens@aQute.biz</email>
|
||||
<name>Peter Kriens</name>
|
||||
<organization>Bndtools</organization>
|
||||
<organizationUrl>https://github.com/bndtools</organizationUrl>
|
||||
<roles>
|
||||
<role>architect</role>
|
||||
<role>developer</role>
|
||||
</roles>
|
||||
<timezone>1</timezone>
|
||||
</developer>
|
||||
</developers>
|
||||
</project>
|
386
aqute-bnd-3.5.0-java8compat.patch
Normal file
386
aqute-bnd-3.5.0-java8compat.patch
Normal file
@ -0,0 +1,386 @@
|
||||
--- bnd-3.5.0.REL/aQute.libg/src/aQute/lib/io/ByteBufferDataInput.java 2017-09-29 20:03:19.000000000 +0200
|
||||
+++ bnd-3.5.0.REL/aQute.libg/src/aQute/lib/io/ByteBufferDataInput.java 2018-11-13 11:54:47.408250050 +0100
|
||||
@@ -3,6 +3,7 @@
|
||||
import java.io.DataInput;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.IOException;
|
||||
+import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.Objects;
|
||||
public class ByteBufferDataInput implements DataInput {
|
||||
@@ -32,7 +33,7 @@
|
||||
return 0;
|
||||
}
|
||||
int skipped = Math.min(n, bb.remaining());
|
||||
- bb.position(bb.position() + skipped);
|
||||
+ ((Buffer)bb).position(bb.position() + skipped);
|
||||
return skipped;
|
||||
}
|
||||
|
||||
--- bnd-3.5.0.REL/aQute.libg/src/aQute/lib/io/ByteBufferInputStream.java 2017-09-29 20:03:19.000000000 +0200
|
||||
+++ bnd-3.5.0.REL/aQute.libg/src/aQute/lib/io/ByteBufferInputStream.java 2018-11-13 11:53:37.615873907 +0100
|
||||
@@ -2,13 +2,14 @@
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
+import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
public class ByteBufferInputStream extends InputStream {
|
||||
private final ByteBuffer bb;
|
||||
|
||||
public ByteBufferInputStream(ByteBuffer buffer) {
|
||||
- buffer.mark();
|
||||
+ ((Buffer)buffer).mark();
|
||||
bb = buffer;
|
||||
}
|
||||
|
||||
@@ -37,7 +38,7 @@
|
||||
return 0L;
|
||||
}
|
||||
int skipped = Math.min((int) n, bb.remaining());
|
||||
- bb.position(bb.position() + skipped);
|
||||
+ ((Buffer)bb).position(bb.position() + skipped);
|
||||
return skipped;
|
||||
}
|
||||
|
||||
@@ -48,17 +49,17 @@
|
||||
|
||||
@Override
|
||||
public void close() throws IOException {
|
||||
- bb.position(bb.limit());
|
||||
+ ((Buffer)bb).position(((Buffer)bb).limit());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mark(int readlimit) {
|
||||
- bb.mark();
|
||||
+ ((Buffer)bb).mark();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reset() throws IOException {
|
||||
- bb.reset();
|
||||
+ ((Buffer)bb).reset();
|
||||
}
|
||||
|
||||
@Override
|
||||
--- bnd-3.5.0.REL/aQute.libg/src/aQute/lib/io/CharBufferReader.java 2017-09-29 20:03:19.000000000 +0200
|
||||
+++ bnd-3.5.0.REL/aQute.libg/src/aQute/lib/io/CharBufferReader.java 2018-11-13 11:45:05.349112131 +0100
|
||||
@@ -2,13 +2,14 @@
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Reader;
|
||||
+import java.nio.Buffer;
|
||||
import java.nio.CharBuffer;
|
||||
|
||||
public class CharBufferReader extends Reader {
|
||||
private final CharBuffer cb;
|
||||
|
||||
public CharBufferReader(CharBuffer buffer) {
|
||||
- buffer.mark();
|
||||
+ ((Buffer)buffer).mark();
|
||||
cb = buffer;
|
||||
}
|
||||
|
||||
@@ -25,7 +26,7 @@
|
||||
|
||||
@Override
|
||||
public void close() throws IOException {
|
||||
- cb.position(cb.limit());
|
||||
+ ((Buffer)cb).position(((Buffer)cb).limit());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -42,7 +43,7 @@
|
||||
return 0L;
|
||||
}
|
||||
int skipped = Math.min((int) n, cb.remaining());
|
||||
- cb.position(cb.position() + skipped);
|
||||
+ ((Buffer)cb).position(cb.position() + skipped);
|
||||
return skipped;
|
||||
}
|
||||
|
||||
@@ -58,11 +59,11 @@
|
||||
|
||||
@Override
|
||||
public void mark(int readAheadLimit) throws IOException {
|
||||
- cb.mark();
|
||||
+ ((Buffer)cb).mark();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reset() throws IOException {
|
||||
- cb.reset();
|
||||
+ ((Buffer)cb).reset();
|
||||
}
|
||||
}
|
||||
--- bnd-3.5.0.REL/aQute.libg/src/aQute/lib/io/IO.java 2017-09-29 20:03:19.000000000 +0200
|
||||
+++ bnd-3.5.0.REL/aQute.libg/src/aQute/lib/io/IO.java 2018-11-13 11:50:46.002948997 +0100
|
||||
@@ -23,6 +23,7 @@
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
+import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.CharBuffer;
|
||||
import java.nio.channels.Channels;
|
||||
@@ -196,11 +197,11 @@
|
||||
try {
|
||||
ByteBuffer bb = ByteBuffer.allocateDirect(BUFFER_SIZE);
|
||||
while (in.read(bb) > 0) {
|
||||
- bb.flip();
|
||||
+ ((Buffer)bb).flip();
|
||||
out.write(bb);
|
||||
bb.compact();
|
||||
}
|
||||
- for (bb.flip(); bb.hasRemaining();) {
|
||||
+ for (((Buffer)bb).flip(); bb.hasRemaining();) {
|
||||
out.write(bb);
|
||||
}
|
||||
return out;
|
||||
@@ -216,7 +217,7 @@
|
||||
int offset = bb.arrayOffset();
|
||||
for (int size; bb.hasRemaining()
|
||||
&& (size = in.read(buffer, offset + bb.position(), bb.remaining())) > 0;) {
|
||||
- bb.position(bb.position() + size);
|
||||
+ ((Buffer)bb).position(bb.position() + size);
|
||||
}
|
||||
} else {
|
||||
int length = Math.min(bb.remaining(), BUFFER_SIZE);
|
||||
@@ -250,7 +251,7 @@
|
||||
public static OutputStream copy(ByteBuffer bb, OutputStream out) throws IOException {
|
||||
if (bb.hasArray()) {
|
||||
out.write(bb.array(), bb.arrayOffset() + bb.position(), bb.remaining());
|
||||
- bb.position(bb.limit());
|
||||
+ ((Buffer)bb).position(((Buffer)bb).limit());
|
||||
} else {
|
||||
int length = Math.min(bb.remaining(), BUFFER_SIZE);
|
||||
byte[] buffer = new byte[length];
|
||||
@@ -295,11 +296,11 @@
|
||||
try {
|
||||
ByteBuffer bb = ByteBuffer.allocate(BUFFER_SIZE);
|
||||
while (in.read(bb) > 0) {
|
||||
- bb.flip();
|
||||
+ ((Buffer)bb).flip();
|
||||
md.update(bb);
|
||||
bb.compact();
|
||||
}
|
||||
- for (bb.flip(); bb.hasRemaining();) {
|
||||
+ for (((Buffer)bb).flip(); bb.hasRemaining();) {
|
||||
md.update(bb);
|
||||
}
|
||||
return md;
|
||||
@@ -425,12 +426,12 @@
|
||||
ByteBuffer bb = ByteBuffer.allocate(BUFFER_SIZE);
|
||||
byte[] buffer = bb.array();
|
||||
for (int size; (size = in.read(buffer, bb.position(), bb.remaining())) > 0;) {
|
||||
- bb.position(bb.position() + size);
|
||||
- bb.flip();
|
||||
+ ((Buffer)bb).position(bb.position() + size);
|
||||
+ ((Buffer)bb).flip();
|
||||
out.write(bb);
|
||||
bb.compact();
|
||||
}
|
||||
- for (bb.flip(); bb.hasRemaining();) {
|
||||
+ for (((Buffer)bb).flip(); bb.hasRemaining();) {
|
||||
out.write(bb);
|
||||
}
|
||||
return out;
|
||||
@@ -443,7 +444,7 @@
|
||||
try {
|
||||
ByteBuffer bb = ByteBuffer.allocate(BUFFER_SIZE);
|
||||
byte[] buffer = bb.array();
|
||||
- for (; in.read(bb) > 0; bb.clear()) {
|
||||
+ for (; in.read(bb) > 0; ((Buffer)bb).clear()) {
|
||||
out.write(buffer, 0, bb.position());
|
||||
}
|
||||
return out;
|
||||
@@ -468,7 +469,7 @@
|
||||
}
|
||||
ByteBuffer bb = ByteBuffer.allocate((int) size);
|
||||
while (in.read(bb) > 0) {}
|
||||
- bb.flip();
|
||||
+ ((Buffer)bb).flip();
|
||||
return bb;
|
||||
}
|
||||
}
|
||||
--- bnd-3.5.0.REL/aQute.libg/src/aQute/lib/utf8properties/UTF8Properties.java 2017-09-29 20:03:19.000000000 +0200
|
||||
+++ bnd-3.5.0.REL/aQute.libg/src/aQute/lib/utf8properties/UTF8Properties.java 2018-11-13 11:35:27.673997245 +0100
|
||||
@@ -10,6 +10,7 @@
|
||||
import java.io.Reader;
|
||||
import java.io.StringWriter;
|
||||
import java.io.Writer;
|
||||
+import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.CharBuffer;
|
||||
import java.nio.charset.CharsetDecoder;
|
||||
@@ -87,10 +88,10 @@
|
||||
}
|
||||
decoder.reset();
|
||||
if (success) {
|
||||
- return cb.flip().toString();
|
||||
+ return ((Buffer)cb).flip().toString();
|
||||
}
|
||||
- bb.rewind();
|
||||
- cb.clear();
|
||||
+ ((Buffer)bb).rewind();
|
||||
+ ((Buffer)cb).clear();
|
||||
}
|
||||
return new String(buffer); // default decoding
|
||||
}
|
||||
--- bnd-3.5.0.REL/aQute.libg/test/aQute/lib/io/IOTest.java 2017-09-29 20:03:19.000000000 +0200
|
||||
+++ bnd-3.5.0.REL/aQute.libg/test/aQute/lib/io/IOTest.java 2018-11-13 11:57:46.305214231 +0100
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
+import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.file.Files;
|
||||
|
||||
@@ -60,7 +61,7 @@
|
||||
assertEquals((int) src.length(), bb.position());
|
||||
assertEquals(bb.capacity(), bb.position());
|
||||
assertFalse(bb.hasRemaining());
|
||||
- bb.flip();
|
||||
+ ((Buffer)bb).flip();
|
||||
int length = bb.remaining();
|
||||
for (int i = 0; i < length; i++) {
|
||||
assertEquals(file[i], bb.get());
|
||||
@@ -73,7 +74,7 @@
|
||||
ByteBuffer bb = IO.copy(IO.stream(src), ByteBuffer.allocate((int) src.length() - 8));
|
||||
assertEquals(bb.capacity(), bb.position());
|
||||
assertFalse(bb.hasRemaining());
|
||||
- bb.flip();
|
||||
+ ((Buffer)bb).flip();
|
||||
int length = bb.remaining();
|
||||
for (int i = 0; i < length; i++) {
|
||||
assertEquals(file[i], bb.get());
|
||||
@@ -86,7 +87,7 @@
|
||||
ByteBuffer bb = IO.copy(IO.stream(src), ByteBuffer.allocate((int) src.length() + 20));
|
||||
assertEquals((int) src.length(), bb.position());
|
||||
assertTrue(bb.hasRemaining());
|
||||
- bb.flip();
|
||||
+ ((Buffer)bb).flip();
|
||||
int length = bb.remaining();
|
||||
for (int i = 0; i < length; i++) {
|
||||
assertEquals(file[i], bb.get());
|
||||
@@ -100,7 +101,7 @@
|
||||
assertEquals((int) src.length(), bb.position());
|
||||
assertEquals(bb.capacity(), bb.position());
|
||||
assertFalse(bb.hasRemaining());
|
||||
- bb.flip();
|
||||
+ ((Buffer)bb).flip();
|
||||
int length = bb.remaining();
|
||||
for (int i = 0; i < length; i++) {
|
||||
assertEquals(file[i], bb.get());
|
||||
@@ -113,7 +114,7 @@
|
||||
ByteBuffer bb = IO.copy(IO.stream(src), ByteBuffer.allocateDirect((int) src.length() - 8));
|
||||
assertEquals(bb.capacity(), bb.position());
|
||||
assertFalse(bb.hasRemaining());
|
||||
- bb.flip();
|
||||
+ ((Buffer)bb).flip();
|
||||
int length = bb.remaining();
|
||||
for (int i = 0; i < length; i++) {
|
||||
assertEquals(file[i], bb.get());
|
||||
@@ -126,7 +127,7 @@
|
||||
ByteBuffer bb = IO.copy(IO.stream(src), ByteBuffer.allocateDirect((int) src.length() + 20));
|
||||
assertEquals((int) src.length(), bb.position());
|
||||
assertTrue(bb.hasRemaining());
|
||||
- bb.flip();
|
||||
+ ((Buffer)bb).flip();
|
||||
int length = bb.remaining();
|
||||
for (int i = 0; i < length; i++) {
|
||||
assertEquals(file[i], bb.get());
|
||||
@@ -139,7 +140,7 @@
|
||||
ByteBuffer bb = IO.copy(IO.stream(src), ByteBuffer.allocateDirect(IOConstants.PAGE_SIZE * 32));
|
||||
assertEquals((int) src.length(), bb.position());
|
||||
assertTrue(bb.hasRemaining());
|
||||
- bb.flip();
|
||||
+ ((Buffer)bb).flip();
|
||||
int length = bb.remaining();
|
||||
for (int i = 0; i < length; i++) {
|
||||
assertEquals(file[i], bb.get());
|
||||
@@ -161,7 +162,7 @@
|
||||
for (int i = 1; i < length; i++) {
|
||||
assertEquals(file[i - 1], wrapped[i]);
|
||||
}
|
||||
- slice.flip();
|
||||
+ ((Buffer)slice).flip();
|
||||
length = slice.remaining();
|
||||
for (int i = 0; i < length; i++) {
|
||||
assertEquals(file[i], slice.get());
|
||||
--- bnd-3.5.0.REL/biz.aQute.bndlib/src/aQute/bnd/osgi/Clazz.java 2017-09-29 20:03:19.000000000 +0200
|
||||
+++ bnd-3.5.0.REL/biz.aQute.bndlib/src/aQute/bnd/osgi/Clazz.java 2018-11-13 12:06:21.331989997 +0100
|
||||
@@ -7,6 +7,7 @@
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.reflect.Modifier;
|
||||
+import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import java.util.Collection;
|
||||
@@ -1308,7 +1309,7 @@
|
||||
int low = bb.getInt();
|
||||
int high = bb.getInt();
|
||||
try {
|
||||
- bb.position(bb.position() + (high - low + 1) * 4);
|
||||
+ ((Buffer)bb).position(bb.position() + (high - low + 1) * 4);
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
@@ -1325,13 +1326,13 @@
|
||||
/* deflt = */
|
||||
int deflt = bb.getInt();
|
||||
int npairs = bb.getInt();
|
||||
- bb.position(bb.position() + npairs * 8);
|
||||
+ ((Buffer)bb).position(bb.position() + npairs * 8);
|
||||
lastReference = -1;
|
||||
break;
|
||||
|
||||
default :
|
||||
lastReference = -1;
|
||||
- bb.position(bb.position() + OpCodes.OFFSETS[instruction]);
|
||||
+ ((Buffer)bb).position(bb.position() + OpCodes.OFFSETS[instruction]);
|
||||
}
|
||||
}
|
||||
}
|
||||
--- bnd-3.5.0.REL/biz.aQute.bndlib/src/aQute/bnd/osgi/URLResource.java 2017-09-29 20:03:19.000000000 +0200
|
||||
+++ bnd-3.5.0.REL/biz.aQute.bndlib/src/aQute/bnd/osgi/URLResource.java 2018-11-13 12:01:36.758456308 +0100
|
||||
@@ -6,6 +6,7 @@
|
||||
import java.io.OutputStream;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
+import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
import aQute.lib.io.IO;
|
||||
@@ -41,7 +42,7 @@
|
||||
return buffer = ByteBuffer.wrap(IO.read(conn.getInputStream()));
|
||||
}
|
||||
ByteBuffer bb = IO.copy(conn.getInputStream(), ByteBuffer.allocate(size));
|
||||
- bb.flip();
|
||||
+ ((Buffer)bb).flip();
|
||||
return buffer = bb;
|
||||
}
|
||||
|
||||
--- bnd-3.5.0.REL/biz.aQute.bndlib/src/aQute/bnd/osgi/ZipResource.java 2017-09-29 20:03:19.000000000 +0200
|
||||
+++ bnd-3.5.0.REL/biz.aQute.bndlib/src/aQute/bnd/osgi/ZipResource.java 2018-11-13 12:03:47.143158991 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
+import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipFile;
|
||||
@@ -44,7 +45,7 @@
|
||||
return buffer = ByteBuffer.wrap(IO.read(zip.getInputStream(entry)));
|
||||
}
|
||||
ByteBuffer bb = IO.copy(zip.getInputStream(entry), ByteBuffer.allocate((int) size));
|
||||
- bb.flip();
|
||||
+ ((Buffer)bb).flip();
|
||||
return buffer = bb;
|
||||
}
|
||||
|
203
aqute-bnd.spec
Normal file
203
aqute-bnd.spec
Normal file
@ -0,0 +1,203 @@
|
||||
#
|
||||
# spec file for package aqute-bnd
|
||||
#
|
||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
Name: aqute-bnd
|
||||
Version: 3.5.0
|
||||
Release: 0
|
||||
Summary: BND Tool
|
||||
# Part of jpm is under BSD, but jpm is not included in binary RPM
|
||||
License: Apache-2.0
|
||||
Group: Development/Libraries/Java
|
||||
URL: http://bnd.bndtools.org/
|
||||
Source0: https://github.com/bndtools/bnd/archive/%{version}.REL.tar.gz
|
||||
Source1: bnd-%{version}.REL-build_xml.tar.xz
|
||||
Source3: https://repo1.maven.org/maven2/biz/aQute/bnd/aQute.libg/%{version}/aQute.libg-%{version}.pom
|
||||
Source4: https://repo1.maven.org/maven2/biz/aQute/bnd/biz.aQute.bnd/%{version}/biz.aQute.bnd-%{version}.pom
|
||||
Source5: https://repo1.maven.org/maven2/biz/aQute/bnd/biz.aQute.bndlib/%{version}/biz.aQute.bndlib-%{version}.pom
|
||||
Source6: https://repo1.maven.org/maven2/biz/aQute/bnd/biz.aQute.bnd.annotation/%{version}/biz.aQute.bnd.annotation-%{version}.pom
|
||||
Patch0: 0001-Disable-removed-commands.patch
|
||||
Patch1: 0002-Fix-ant-compatibility.patch
|
||||
Patch2: aqute-bnd-3.5.0-java8compat.patch
|
||||
BuildRequires: ant
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: javapackages-local
|
||||
BuildRequires: osgi-annotation
|
||||
BuildRequires: osgi-compendium
|
||||
BuildRequires: osgi-core
|
||||
BuildRequires: slf4j
|
||||
# Explicit javapackages-tools requires since bnd script uses
|
||||
# /usr/share/java-utils/java-functions
|
||||
Requires: javapackages-tools
|
||||
Requires: %{name}lib = %{version}-%{release}
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
The bnd tool helps you create and diagnose OSGi bundles.
|
||||
The key functions are:
|
||||
- Show the manifest and JAR contents of a bundle
|
||||
- Wrap a JAR so that it becomes a bundle
|
||||
- Create a Bundle from a specification and a class path
|
||||
- Verify the validity of the manifest entries
|
||||
The tool is capable of acting as:
|
||||
- Command line tool
|
||||
- File format
|
||||
- Directives
|
||||
- Use of macros
|
||||
|
||||
%package -n aqute-bndlib
|
||||
Summary: BND library
|
||||
Group: Development/Libraries/Java
|
||||
Requires: mvn(org.osgi:osgi.annotation)
|
||||
Requires: mvn(org.osgi:osgi.cmpn)
|
||||
Requires: mvn(org.osgi:osgi.core)
|
||||
Requires: mvn(org.slf4j:slf4j-api)
|
||||
Requires: mvn(org.slf4j:slf4j-simple)
|
||||
|
||||
%description -n aqute-bndlib
|
||||
%{summary}.
|
||||
|
||||
%package javadoc
|
||||
Summary: Javadoc for %{name}
|
||||
Group: Documentation/HTML
|
||||
|
||||
%description javadoc
|
||||
API documentation for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n bnd-%{version}.REL -a 1
|
||||
|
||||
rm gradlew*
|
||||
rm -f $(find | grep -E '\.(.ar|exe|tar\.(gz|bz2|xz)|zip)$' | xargs)
|
||||
|
||||
mkdir -p lib
|
||||
build-jar-repository -s lib \
|
||||
slf4j/api slf4j/simple osgi-annotation osgi-core osgi-compendium ant
|
||||
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
# the commands pull in more dependencies than we want (felix-resolver, jetty)
|
||||
rm biz.aQute.bnd/src/aQute/bnd/main/{RemoteCommand,ResolveCommand}.java
|
||||
|
||||
sed -i 's|${Bundle-Version}|%{version}|' biz.aQute.bndlib/src/aQute/bnd/osgi/bnd.info
|
||||
|
||||
# libg
|
||||
pushd aQute.libg
|
||||
cp -p %{SOURCE3} pom.xml
|
||||
%pom_add_dep org.osgi:osgi.cmpn
|
||||
%pom_add_dep org.slf4j:slf4j-api
|
||||
popd
|
||||
|
||||
# bndlib.annotations
|
||||
pushd biz.aQute.bnd.annotation
|
||||
cp -p %{SOURCE6} pom.xml
|
||||
popd
|
||||
|
||||
# bndlib
|
||||
pushd biz.aQute.bndlib
|
||||
cp -p %{SOURCE5} pom.xml
|
||||
%pom_add_dep org.osgi:osgi.annotation
|
||||
%pom_add_dep org.osgi:osgi.core
|
||||
%pom_add_dep org.osgi:osgi.cmpn
|
||||
%pom_add_dep org.slf4j:slf4j-api
|
||||
%pom_add_dep biz.aQute.bnd:aQute.libg:%{version}
|
||||
%pom_add_dep biz.aQute.bnd:biz.aQute.bnd.annotation:%{version}
|
||||
popd
|
||||
|
||||
# bnd
|
||||
pushd biz.aQute.bnd
|
||||
cp -p %{SOURCE4} pom.xml
|
||||
%pom_add_dep biz.aQute.bnd:biz.aQute.bndlib:%{version}
|
||||
%pom_add_dep biz.aQute.bnd:aQute.libg:%{version}
|
||||
%pom_add_dep biz.aQute.bnd:biz.aQute.bnd.annotation:%{version}
|
||||
%pom_add_dep org.apache.ant:ant
|
||||
%pom_add_dep org.osgi:osgi.annotation
|
||||
%pom_add_dep org.osgi:osgi.core
|
||||
%pom_add_dep org.osgi:osgi.cmpn
|
||||
%pom_add_dep org.slf4j:slf4j-api
|
||||
|
||||
%pom_add_dep org.slf4j:slf4j-simple::runtime
|
||||
popd
|
||||
|
||||
# maven-plugins
|
||||
pushd maven
|
||||
rm bnd-shared-maven-lib/src/main/java/aQute/bnd/maven/lib/resolve/DependencyResolver.java
|
||||
%pom_remove_dep -r :biz.aQute.resolve
|
||||
%pom_remove_dep -r :biz.aQute.repository
|
||||
# Unavailable reactor dependency - org.osgi.impl.bundle.repoindex.cli
|
||||
%pom_disable_module bnd-indexer-maven-plugin
|
||||
# Requires unbuilt parts of bnd
|
||||
%pom_disable_module bnd-export-maven-plugin
|
||||
%pom_disable_module bnd-resolver-maven-plugin
|
||||
%pom_disable_module bnd-testing-maven-plugin
|
||||
# Integration tests require Internet access
|
||||
%pom_remove_plugin -r :maven-invoker-plugin
|
||||
%pom_remove_plugin -r :maven-javadoc-plugin
|
||||
|
||||
%pom_remove_plugin -r :flatten-maven-plugin
|
||||
popd
|
||||
|
||||
%build
|
||||
%{ant}
|
||||
%{ant} javadoc
|
||||
|
||||
%install
|
||||
# jars
|
||||
install -dm 0755 %{buildroot}%{_javadir}/%{name}
|
||||
install -pm 0644 biz.aQute.bnd.annotation/target/biz.aQute.bnd.annotation-%{version}.jar %{buildroot}%{_javadir}/%{name}/biz.aQute.bnd.annotation.jar
|
||||
install -pm 0644 aQute.libg/target/aQute.libg-%{version}.jar %{buildroot}%{_javadir}/%{name}/aQute.libg.jar
|
||||
install -pm 0644 biz.aQute.bndlib/target/biz.aQute.bndlib-%{version}.jar %{buildroot}%{_javadir}/%{name}/biz.aQute.bndlib.jar
|
||||
install -pm 0644 biz.aQute.bnd/target/biz.aQute.bnd-%{version}.jar %{buildroot}%{_javadir}/%{name}/biz.aQute.bnd.jar
|
||||
# poms
|
||||
install -dm 0755 %{buildroot}%{_mavenpomdir}/%{name}
|
||||
install -pm 0644 biz.aQute.bnd.annotation/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/biz.aQute.bnd.annotation.pom
|
||||
%add_maven_depmap %{name}/biz.aQute.bnd.annotation.pom %{name}/biz.aQute.bnd.annotation.jar -f bndlib
|
||||
install -pm 0644 aQute.libg/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/aQute.libg.pom
|
||||
%add_maven_depmap %{name}/aQute.libg.pom %{name}/aQute.libg.jar -f bndlib
|
||||
install -pm 0644 biz.aQute.bndlib/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/biz.aQute.bndlib.pom
|
||||
%add_maven_depmap %{name}/biz.aQute.bndlib.pom %{name}/biz.aQute.bndlib.jar -f bndlib -a biz.aQute.bnd:bndlib,biz.aQute:bndlib
|
||||
install -pm 0644 biz.aQute.bnd/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/biz.aQute.bnd.pom
|
||||
%add_maven_depmap %{name}/biz.aQute.bnd.pom %{name}/biz.aQute.bnd.jar -a biz.aQute.bnd:bndlib,biz.aQute:bndlib
|
||||
# javadoc
|
||||
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
|
||||
mv biz.aQute.bnd.annotation/target/site/apidocs %{buildroot}%{_javadocdir}/%{name}/biz.aQute.bnd.annotation
|
||||
mv aQute.libg/target/site/apidocs %{buildroot}%{_javadocdir}/%{name}/aQute.libg
|
||||
mv biz.aQute.bndlib/target/site/apidocs %{buildroot}%{_javadocdir}/%{name}/biz.aQute.bndlib
|
||||
mv biz.aQute.bnd/target/site/apidocs %{buildroot}%{_javadocdir}/%{name}/biz.aQute.bnd
|
||||
%fdupes -s %{buildroot}%{_javadocdir}
|
||||
|
||||
install -d -m 755 %{buildroot}%{_sysconfdir}/ant.d
|
||||
echo "aqute-bnd slf4j/api slf4j/simple osgi-annotation osgi-core osgi-compendium" >%{buildroot}%{_sysconfdir}/ant.d/%{name}
|
||||
|
||||
%jpackage_script aQute.bnd.main.bnd "" "" aqute-bnd:slf4j/api:slf4j/simple:osgi-annotation:osgi-core:osgi-compendium bnd 1
|
||||
|
||||
%files -f .mfiles
|
||||
%license LICENSE
|
||||
%{_bindir}/bnd
|
||||
%config(noreplace) %{_sysconfdir}/ant.d/*
|
||||
%dir %{_sysconfdir}/ant.d
|
||||
|
||||
%files -n aqute-bndlib -f .mfiles-bndlib
|
||||
%license LICENSE
|
||||
|
||||
%files javadoc
|
||||
%license LICENSE
|
||||
%{_javadocdir}
|
||||
|
||||
%changelog
|
42
biz.aQute.bnd-3.5.0.pom
Normal file
42
biz.aQute.bnd-3.5.0.pom
Normal file
@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>biz.aQute.bnd</groupId>
|
||||
<artifactId>biz.aQute.bnd</artifactId>
|
||||
<version>3.5.0</version>
|
||||
<description>This command line utility is the Swiss army knife of OSGi. It provides you with a breadth of tools to understand and manage OSGi based systems. This project basically uses bndlib.</description>
|
||||
<name>biz.aQute.bnd</name>
|
||||
<url>http://bnd.bndtools.org/</url>
|
||||
<organization>
|
||||
<name>Bndtools</name>
|
||||
<url>http://bndtools.org/</url>
|
||||
</organization>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>Apache-2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
|
||||
<distribution>repo</distribution>
|
||||
<comments>Apache License, Version 2.0</comments>
|
||||
</license>
|
||||
</licenses>
|
||||
<scm>
|
||||
<url>https://github.com/bndtools/bnd</url>
|
||||
<connection>scm:git:https://github.com/bndtools/bnd.git</connection>
|
||||
<developerConnection>scm:git:git@github.com:bndtools/bnd.git</developerConnection>
|
||||
<tag>3.5.0.REL</tag>
|
||||
</scm>
|
||||
<developers>
|
||||
<developer>
|
||||
<id>pkriens</id>
|
||||
<email>Peter.Kriens@aQute.biz</email>
|
||||
<name>Peter Kriens</name>
|
||||
<organization>Bndtools</organization>
|
||||
<organizationUrl>https://github.com/bndtools</organizationUrl>
|
||||
<roles>
|
||||
<role>architect</role>
|
||||
<role>developer</role>
|
||||
</roles>
|
||||
<timezone>1</timezone>
|
||||
</developer>
|
||||
</developers>
|
||||
</project>
|
42
biz.aQute.bnd.annotation-3.5.0.pom
Normal file
42
biz.aQute.bnd.annotation-3.5.0.pom
Normal file
@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>biz.aQute.bnd</groupId>
|
||||
<artifactId>biz.aQute.bnd.annotation</artifactId>
|
||||
<version>3.5.0</version>
|
||||
<description>Contains only the annotations for bnd.</description>
|
||||
<name>bnd Annotations Library</name>
|
||||
<url>http://www.aQute.biz/Code/Bnd</url>
|
||||
<organization>
|
||||
<name>Bndtools</name>
|
||||
<url>http://bndtools.org/</url>
|
||||
</organization>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>Apache-2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
|
||||
<distribution>repo</distribution>
|
||||
<comments>Apache License, Version 2.0</comments>
|
||||
</license>
|
||||
</licenses>
|
||||
<scm>
|
||||
<url>https://github.com/bndtools/bnd</url>
|
||||
<connection>scm:git:https://github.com/bndtools/bnd.git</connection>
|
||||
<developerConnection>scm:git:git@github.com:bndtools/bnd.git</developerConnection>
|
||||
<tag>3.5.0.REL</tag>
|
||||
</scm>
|
||||
<developers>
|
||||
<developer>
|
||||
<id>pkriens</id>
|
||||
<email>Peter.Kriens@aQute.biz</email>
|
||||
<name>Peter Kriens</name>
|
||||
<organization>Bndtools</organization>
|
||||
<organizationUrl>https://github.com/bndtools</organizationUrl>
|
||||
<roles>
|
||||
<role>architect</role>
|
||||
<role>developer</role>
|
||||
</roles>
|
||||
<timezone>1</timezone>
|
||||
</developer>
|
||||
</developers>
|
||||
</project>
|
38
biz.aQute.bndlib-3.5.0.pom
Normal file
38
biz.aQute.bndlib-3.5.0.pom
Normal file
@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>biz.aQute.bnd</groupId>
|
||||
<artifactId>biz.aQute.bndlib</artifactId>
|
||||
<version>3.5.0</version>
|
||||
<description>A Swiss Army Knife for OSGi</description>
|
||||
<name>bndlib</name>
|
||||
<url>http://bnd.bndtools.org/</url>
|
||||
<organization>
|
||||
<name>Bndtools</name>
|
||||
<url>http://bndtools.org/</url>
|
||||
</organization>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>Apache-2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
|
||||
<distribution>repo</distribution>
|
||||
<comments>Apache License, Version 2.0</comments>
|
||||
</license>
|
||||
</licenses>
|
||||
<scm>
|
||||
<url>https://github.com/bndtools/bnd</url>
|
||||
<connection>scm:git:https://github.com/bndtools/bnd.git</connection>
|
||||
<developerConnection>scm:git:git@github.com:bndtools/bnd.git</developerConnection>
|
||||
<tag>3.5.0.REL</tag>
|
||||
</scm>
|
||||
<developers>
|
||||
<developer>
|
||||
<id>peter.kriens@aQute.biz</id>
|
||||
<email>peter.kriens@aQute.biz</email>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>njbartlett@gmail.com</id>
|
||||
<email>njbartlett@gmail.com</email>
|
||||
</developer>
|
||||
</developers>
|
||||
</project>
|
3
bnd-3.5.0.REL-build_xml.tar.xz
Normal file
3
bnd-3.5.0.REL-build_xml.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0cdff0738b7dcfb37e45b17a5b3311f960c186af89a16947df5cd5e351ba38f8
|
||||
size 1920
|
Loading…
Reference in New Issue
Block a user