Update to upstream version 4.2.0

This commit is contained in:
Marian Koncek 2019-07-22 09:47:05 +02:00
parent c4933bb857
commit ab34148b38
8 changed files with 163 additions and 169 deletions

5
.gitignore vendored
View File

@ -23,3 +23,8 @@
/biz.aQute.bnd-3.5.0.pom
/biz.aQute.bndlib-3.5.0.pom
/biz.aQute.bnd.annotation-3.5.0.pom
/4.2.0.REL.tar.gz
/aQute.libg-4.2.0.pom
/biz.aQute.bnd-4.2.0.pom
/biz.aQute.bndlib-4.2.0.pom
/biz.aQute.bnd.annotation-4.2.0.pom

View File

@ -4,14 +4,14 @@ 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(-)
biz.aQute.bnd/src/aQute/bnd/main/bnd.java | 49 -----------------------
1 file changed, 49 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
index 0e6f055..166687b 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;
@@ -108,7 +108,6 @@ import aQute.bnd.osgi.Processor;
import aQute.bnd.osgi.Resource;
import aQute.bnd.osgi.Verifier;
import aQute.bnd.osgi.eclipse.EclipseClasspath;
@ -19,10 +19,11 @@ index 1cc3216..c669e4a 100644
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 {
@@ -4225,54 +4224,6 @@ public class bnd extends Processor {
getInfo(profiles);
}
/**
- /**
- * Resolve command
- *
- * @throws Exception
@ -30,7 +31,8 @@ index 1cc3216..c669e4a 100644
-
- public void _resolve(ResolveCommand.ResolveOptions options) throws Exception {
- ResolveCommand rc = new ResolveCommand(this);
- String help = options._command().subCmd(options, rc);
- String help = options._command()
- .subCmd(options, rc);
- if (help != null)
- out.println(help);
- getInfo(rc);
@ -45,7 +47,8 @@ index 1cc3216..c669e4a 100644
-
- public void _remote(RemoteCommand.RemoteOptions options) throws Exception {
- RemoteCommand rc = new RemoteCommand(this, options);
- String help = options._command().subCmd(options, rc);
- String help = options._command()
- .subCmd(options, rc);
- if (help != null)
- out.println(help);
- getInfo(rc);
@ -60,16 +63,17 @@ index 1cc3216..c669e4a 100644
-
- public void _nexus(NexusCommand.NexusOptions options) throws Exception {
- NexusCommand rc = new NexusCommand(this, options);
- String help = options._command().subCmd(options, rc);
- String help = options._command()
- .subCmd(options, rc);
- if (help != null)
- out.println(help);
- getInfo(rc);
- rc.close();
- }
- /**
-
/**
* Export a bndrun file
*/
--
2.13.5
2.20.1

View File

@ -1,117 +0,0 @@
From e9469ae2ca9f3d64fd88e0d8aaf8ebeea7bb937d Mon Sep 17 00:00:00 2001
From: Marian Koncek <mkoncek@redhat.com>
Date: Fri, 12 Apr 2019 14:59:30 +0200
Subject: [PATCH] Port to OSGI 7.0.0
---
.../src/aQute/bnd/main/ReporterLogger.java | 16 +++++++++
.../src/aQute/bnd/testing/TestingLog.java | 35 +++++++++++++++++++
2 files changed, 51 insertions(+)
diff --git a/biz.aQute.bnd/src/aQute/bnd/main/ReporterLogger.java b/biz.aQute.bnd/src/aQute/bnd/main/ReporterLogger.java
index ce86cd6..735db9c 100644
--- a/biz.aQute.bnd/src/aQute/bnd/main/ReporterLogger.java
+++ b/biz.aQute.bnd/src/aQute/bnd/main/ReporterLogger.java
@@ -1,5 +1,6 @@
package aQute.bnd.main;
+import org.osgi.framework.Bundle;
import org.osgi.framework.ServiceReference;
import org.osgi.service.log.LogService;
import org.slf4j.Logger;
@@ -8,6 +9,7 @@ import org.slf4j.LoggerFactory;
import aQute.service.reporter.Reporter;
public class ReporterLogger implements LogService {
+ private final static RuntimeException UNSUPPORTED = new UnsupportedOperationException("This method is provided for backwards compatibility");
private final static Logger logger = LoggerFactory.getLogger(ReporterLogger.class);
private Reporter reporter;
@@ -108,4 +110,18 @@ public class ReporterLogger implements LogService {
}
}
+ @Override
+ public org.osgi.service.log.Logger getLogger(String name) {throw UNSUPPORTED;}
+
+ @Override
+ public org.osgi.service.log.Logger getLogger(Class< ? > clazz) {throw UNSUPPORTED;}
+
+ @Override
+ public <L extends org.osgi.service.log.Logger> L getLogger(String name, Class<L> loggerType) {throw UNSUPPORTED;}
+
+ @Override
+ public <L extends org.osgi.service.log.Logger> L getLogger(Class< ? > clazz, Class<L> loggerType) {throw UNSUPPORTED;}
+
+ @Override
+ public <L extends org.osgi.service.log.Logger> L getLogger(Bundle bundle, String name, Class<L> loggerType) {throw UNSUPPORTED;}
}
diff --git a/biz.aQute.bndlib/src/aQute/bnd/testing/TestingLog.java b/biz.aQute.bndlib/src/aQute/bnd/testing/TestingLog.java
index d9c3e78..ec7dd27 100644
--- a/biz.aQute.bndlib/src/aQute/bnd/testing/TestingLog.java
+++ b/biz.aQute.bndlib/src/aQute/bnd/testing/TestingLog.java
@@ -8,7 +8,9 @@ import java.util.regex.Pattern;
import org.osgi.framework.Bundle;
import org.osgi.framework.ServiceReference;
+import org.osgi.service.log.Logger;
import org.osgi.service.log.LogEntry;
+import org.osgi.service.log.LogLevel;
import org.osgi.service.log.LogService;
import aQute.bnd.annotation.component.Activate;
@@ -26,6 +28,8 @@ import aQute.bnd.testing.TestingLog.Config;
@Component(designate = Config.class)
@SuppressWarnings("rawtypes")
public class TestingLog implements LogService {
+ private final static RuntimeException UNSUPPORTED = new UnsupportedOperationException("This method is provided for backwards compatibility");
+
boolean stacktrace;
boolean direct;
int level;
@@ -125,6 +129,22 @@ public class TestingLog implements LogService {
return sb.toString();
}
}
+
+ @Override
+ public LogLevel getLogLevel() {throw UNSUPPORTED;}
+
+ @Override
+ public String getLoggerName() {throw UNSUPPORTED;}
+
+ @Override
+ public long getSequence() {throw UNSUPPORTED;}
+
+ @Override
+ public String getThreadInfo() {throw UNSUPPORTED;}
+
+ @Override
+ public StackTraceElement getLocation() {throw UNSUPPORTED;}
+
};
entries.add(entry);
if (direct)
@@ -197,4 +217,19 @@ public class TestingLog implements LogService {
return n != 0;
}
+ @Override
+ public Logger getLogger(String name) {throw UNSUPPORTED;}
+
+ @Override
+ public Logger getLogger(Class< ? > clazz) {throw UNSUPPORTED;}
+
+ @Override
+ public <L extends Logger> L getLogger(String name, Class<L> loggerType) {throw UNSUPPORTED;}
+
+ @Override
+ public <L extends Logger> L getLogger(Class< ? > clazz, Class<L> loggerType) {throw UNSUPPORTED;}
+
+ @Override
+ public <L extends Logger> L getLogger(Bundle bundle, String name, Class<L> loggerType) {throw UNSUPPORTED;}
+
}
--
2.20.1

View File

@ -8,7 +8,7 @@ Subject: [PATCH 2/2] Fix ant compatibility
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
index dd438a5..6b714be 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 {
@ -21,5 +21,5 @@ index aac8b8a..26dfe59 100644
projectProperties.putAll(builder.getProperties());
builder.setProperties(projectProperties);
--
2.13.5
2.20.1

View File

@ -0,0 +1,102 @@
From 64a36cbc8d7c8234dfa2af8670c2e1ea4a5c3909 Mon Sep 17 00:00:00 2001
From: Marian Koncek <mkoncek@redhat.com>
Date: Thu, 11 Jul 2019 14:29:26 +0200
Subject: [PATCH] Port to OSGI 7.0.0
---
.../src/aQute/bnd/junit/ConsoleLogger.java | 62 +++++++++++++++++++
1 file changed, 62 insertions(+)
diff --git a/biz.aQute.bndlib/src/aQute/bnd/junit/ConsoleLogger.java b/biz.aQute.bndlib/src/aQute/bnd/junit/ConsoleLogger.java
index 9c2591f..569b20e 100644
--- a/biz.aQute.bndlib/src/aQute/bnd/junit/ConsoleLogger.java
+++ b/biz.aQute.bndlib/src/aQute/bnd/junit/ConsoleLogger.java
@@ -15,9 +15,11 @@ import org.osgi.framework.ServiceFactory;
import org.osgi.framework.ServiceReference;
import org.osgi.framework.ServiceRegistration;
import org.osgi.service.log.LogEntry;
+import org.osgi.service.log.LogLevel;
import org.osgi.service.log.LogListener;
import org.osgi.service.log.LogReaderService;
import org.osgi.service.log.LogService;
+import org.osgi.service.log.Logger;
@Deprecated // see biz.aQute.bnd.remote.junit
public class ConsoleLogger implements LogReaderService {
@@ -76,6 +78,36 @@ public class ConsoleLogger implements LogReaderService {
return time;
}
+ @Override
+ public LogLevel getLogLevel() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String getLoggerName() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public long getSequence() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public String getThreadInfo() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public StackTraceElement getLocation() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
}
public class Facade implements LogService {
@@ -112,6 +144,36 @@ public class ConsoleLogger implements LogReaderService {
}
+ @Override
+ public Logger getLogger(String name) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Logger getLogger(Class<?> clazz) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public <L extends Logger> L getLogger(String name, Class<L> loggerType) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public <L extends Logger> L getLogger(Class<?> clazz, Class<L> loggerType) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public <L extends Logger> L getLogger(Bundle bundle, String name, Class<L> loggerType) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
}
public ConsoleLogger(BundleContext context) {
--
2.20.1

View File

@ -1,7 +1,6 @@
Name: aqute-bnd
Version: 3.5.0
Release: 6%{?dist}
Version: 4.2.0
Release: 1%{?dist}
Summary: BND Tool
# Part of jpm is under BSD, but jpm is not included in binary RPM
License: ASL 2.0
@ -22,16 +21,12 @@ Source6: https://repo1.maven.org/maven2/biz/aQute/bnd/biz.aQute.bnd.annot
Patch0: 0001-Disable-removed-commands.patch
Patch1: 0002-Fix-ant-compatibility.patch
Patch2: 0001-Port-to-OSGI-7.0.0.patch
Patch2: 0003-Port-to-OSGI-7.0.0.patch
BuildRequires: maven-local
BuildRequires: mvn(org.osgi:osgi.annotation)
BuildRequires: mvn(org.osgi:osgi.cmpn)
BuildRequires: mvn(org.osgi:osgi.core)
BuildRequires: mvn(org.slf4j:slf4j-api)
BuildRequires: mvn(org.slf4j:slf4j-simple)
BuildRequires: mvn(org.apache.ant:ant)
BuildRequires: mvn(jline:jline)
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.apache.ant:ant)
BuildRequires: mvn(org.apache.maven:maven-artifact)
BuildRequires: mvn(org.apache.maven:maven-compat)
BuildRequires: mvn(org.apache.maven:maven-core)
@ -39,7 +34,14 @@ BuildRequires: mvn(org.apache.maven:maven-plugin-api)
BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-source-plugin)
BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-annotations)
BuildRequires: mvn(org.apache.maven.shared:maven-mapping)
BuildRequires: mvn(org.assertj:assertj-core)
BuildRequires: mvn(org.eclipse.aether:aether-api)
BuildRequires: mvn(org.osgi:osgi.annotation)
BuildRequires: mvn(org.osgi:osgi.cmpn)
BuildRequires: mvn(org.osgi:osgi.core)
BuildRequires: mvn(org.slf4j:slf4j-api)
BuildRequires: mvn(org.slf4j:slf4j-simple)
BuildRequires: mvn(org.sonatype.plexus:plexus-build-api)
# Explicit javapackages-tools requires since bnd script uses
# /usr/share/java-utils/java-functions
@ -91,12 +93,12 @@ rm biz.aQute.bnd/src/aQute/bnd/main/{RemoteCommand,ResolveCommand}.java
sed 's/@VERSION@/%{version}/' %SOURCE2 > pom.xml
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_parent biz.aQute.bnd:parent:%{version}
%pom_remove_dep :org.osgi.util.function
%pom_remove_dep :org.osgi.util.promise
%pom_add_dep org.osgi:osgi.cmpn
%pom_add_dep org.slf4j:slf4j-api
popd
@ -111,7 +113,8 @@ popd
pushd biz.aQute.bndlib
cp -p %{SOURCE5} pom.xml
%pom_add_parent biz.aQute.bnd:parent:%{version}
%pom_remove_dep :org.osgi.util.function
%pom_remove_dep :org.osgi.util.promise
%pom_add_dep org.osgi:osgi.annotation
%pom_add_dep org.osgi:osgi.core
%pom_add_dep org.osgi:osgi.cmpn
@ -121,33 +124,29 @@ cp -p %{SOURCE5} pom.xml
popd
# bnd
cp -r biz.aQute.bnd.exporters/src/aQute/bnd/exporter biz.aQute.bnd/src/aQute/bnd/
pushd biz.aQute.bnd
cp -p %{SOURCE4} pom.xml
%pom_add_parent biz.aQute.bnd:parent:%{version}
%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
%pom_remove_dep :biz.aQute.resolve
%pom_remove_dep :biz.aQute.repository
%pom_remove_dep :biz.aQute.bnd.exporters
%pom_remove_dep :biz.aQute.bnd.reporter
%pom_remove_dep :biz.aQute.remote.api
%pom_remove_dep :biz.aQute.launchpad
%pom_remove_dep :snakeyaml
popd
# maven-plugins
cp -r biz.aQute.bnd.maven/src/aQute/bnd/maven/lib/configuration maven/bnd-maven-plugin/src/main/java/aQute/bnd/maven/lib
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
%pom_remove_dep -r :biz.aQute.bnd.maven
# 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
%pom_disable_module bnd-run-maven-plugin
# Integration tests require Internet access
%pom_remove_plugin -r :maven-invoker-plugin
%pom_remove_plugin -r :maven-javadoc-plugin
@ -155,14 +154,12 @@ rm bnd-shared-maven-lib/src/main/java/aQute/bnd/maven/lib/resolve/DependencyReso
%pom_remove_plugin -r :flatten-maven-plugin
popd
%mvn_alias biz.aQute.bnd:biz.aQute.bnd :bnd biz.aQute:bnd
%mvn_alias biz.aQute.bnd:biz.aQute.bndlib :bndlib biz.aQute:bndlib
%mvn_package biz.aQute.bnd:biz.aQute.bndlib bndlib
%mvn_package biz.aQute.bnd:biz.aQute.bnd.annotation bndlib
%mvn_package biz.aQute.bnd:aQute.libg bndlib
%mvn_package biz.aQute.bnd:bnd-shared-maven-lib maven
%mvn_package biz.aQute.bnd:bnd-maven-plugin maven
%mvn_package biz.aQute.bnd:bnd-baseline-maven-plugin maven
%mvn_package biz.aQute.bnd:parent __noinstall
@ -193,6 +190,9 @@ echo "aqute-bnd slf4j/api slf4j/simple osgi-annotation osgi-core osgi-compendium
%license LICENSE
%changelog
* Thu Jul 04 2019 Marian Koncek <mkoncek@redhat.com> - 4.2.0-1
- Update to upstream version 4.2.0
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.5.0-6
- Mass rebuild for javapackages-tools 201901

View File

@ -186,10 +186,10 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<version>3.8.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>

10
sources
View File

@ -1,5 +1,5 @@
SHA512 (3.5.0.REL.tar.gz) = c0e1fb6370881ab5012bbfbeae8093c23b25083a8a82599a9ae1179d8efc051c3b4a5cf99473072b7cf1e84440e08f19a5731b6f3c8bb805f849aa4823c16062
SHA512 (aQute.libg-3.5.0.pom) = 81a7f1350296c2bdd48755c38804520c80df2ed968186a35842284d55b4ac951092646c780a5bc91fca161f43515e3061b9003aa6674dd199297159b9a59eb60
SHA512 (biz.aQute.bnd-3.5.0.pom) = 60ff58f4d366dccb26cee5ac3d0749a564e0eab41b4e493df1727c7a79d7159f0913d3d1dcd406963580b7063d8b76cd92088d9eee46a01a0f9dd33643a5c345
SHA512 (biz.aQute.bndlib-3.5.0.pom) = 3987110f4fc1bedb13f3ad777cb33dc9db75ad81135fcbc49763dfb243c5053ea864d76d16f271547666c01f6dfbb104a9d4ee52496e62e6fb80dcfc02d23f75
SHA512 (biz.aQute.bnd.annotation-3.5.0.pom) = c968e0586f55accb37d4caf4d8a6d509fd6f88982dcc464cfb0fd41f863eb0b7945aadafb97c79ba2d6d1fda59ef12e5bac4556e302599924130d69fb99ac31f
SHA512 (4.2.0.REL.tar.gz) = 3fc4cf6340708d7594348a06678b11782392f14e785b1097255d4af005ab9bd24d71d61bda9644aba3cfba2002cb220cb356e2b2e686deb0cbefecc5dcd03a40
SHA512 (aQute.libg-4.2.0.pom) = 97d141b37631987f537f9c01c86cb66514e715af335765e956e7a99633cd3f473ce75a9152b6bc21fb3e7bc33bde1ec3b77ce814f9df8d1f0f542e8fe37e723a
SHA512 (biz.aQute.bnd-4.2.0.pom) = cf65171a1562648f4b376d21db73b1685b7acaa56a8912245e982f202e05a9e0f9cb47dae5b1ac950c5441596bf52883f171fbf515a4cb040bdef44f74b795ed
SHA512 (biz.aQute.bndlib-4.2.0.pom) = 2dcf0e61232ca5d3450b11a701c1462a42e4292a0905134be9507c1cace123d47148d12a420c71c21a0942367cc6e3e1f06a701c061acab26151c8c0fdda0599
SHA512 (biz.aQute.bnd.annotation-4.2.0.pom) = 075a3d63d08e5c9076090e79c35ae9aaef2ccd121b5ace35f28d46f11242894c8059258c2d6764691d16ccfe17cf2b2038132cd670e758d501732d34a592df17