From a6cacbe7834b7f6afed09e9bd0b0784f00e5e71499b08b078b30ae1302a6c979 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Sat, 16 Sep 2023 10:13:01 +0000 Subject: [PATCH 1/9] OBS-URL: https://build.opensuse.org/package/show/Java:packages/aqute-bnd?expand=0&rev=30 --- aqute-bnd.changes | 10 +++++++++ aqute-bnd.spec | 4 ++++ bnd-maven-plugin.changes | 10 +++++++++ bnd-maven-plugin.spec | 4 ++++ reproducible-packages-list.patch | 27 ++++++++++++++++++++++++ reproducible-timestamps.patch | 36 ++++++++++++++++++++++++++++++++ 6 files changed, 91 insertions(+) create mode 100644 reproducible-packages-list.patch create mode 100644 reproducible-timestamps.patch diff --git a/aqute-bnd.changes b/aqute-bnd.changes index cff7df9..6e16c3d 100644 --- a/aqute-bnd.changes +++ b/aqute-bnd.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Sat Sep 16 10:08:36 UTC 2023 - Fridrich Strba + +- Added patches: + * reproducible-timestamps.patch + + set "-reproducible" option to true by default + + use SOURCE_DATE_EPOCH for timestamp if available + * reproducible-packages-list.patch + + make the order of packages to import/export determininstic + ------------------------------------------------------------------- Thu May 4 14:25:12 UTC 2023 - Dominique Leuenberger diff --git a/aqute-bnd.spec b/aqute-bnd.spec index 0fb719f..6a889bb 100644 --- a/aqute-bnd.spec +++ b/aqute-bnd.spec @@ -36,6 +36,8 @@ Patch0: 0001-Disable-removed-commands.patch Patch2: 0003-Port-to-OSGI-7.0.0.patch Patch3: aqute-bnd-java8compat.patch Patch4: 0004-maven-plugin-dependencies.patch +Patch5: reproducible-timestamps.patch +Patch6: reproducible-packages-list.patch BuildRequires: ant BuildRequires: fdupes BuildRequires: javapackages-local @@ -95,6 +97,8 @@ build-jar-repository -s lib \ %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 +%patch6 -p1 # the commands pull in more dependencies than we want (felix-resolver, jetty, jtwig, javapackager) rm biz.aQute.bnd/src/aQute/bnd/main/{RemoteCommand,ResolveCommand,ExportReportCommand,MbrCommand,ReporterLogger}.java diff --git a/bnd-maven-plugin.changes b/bnd-maven-plugin.changes index ffeedd5..2421ad0 100644 --- a/bnd-maven-plugin.changes +++ b/bnd-maven-plugin.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Sat Sep 16 10:08:36 UTC 2023 - Fridrich Strba + +- Added patches: + * reproducible-timestamps.patch + + set "-reproducible" option to true by default + + use SOURCE_DATE_EPOCH for timestamp if available + * reproducible-packages-list.patch + + make the order of packages to import/export determininstic + ------------------------------------------------------------------- Wed Apr 26 17:47:47 UTC 2023 - Fridrich Strba diff --git a/bnd-maven-plugin.spec b/bnd-maven-plugin.spec index e7e11a0..c2c9279 100644 --- a/bnd-maven-plugin.spec +++ b/bnd-maven-plugin.spec @@ -29,6 +29,8 @@ Patch0: 0001-Disable-removed-commands.patch Patch2: 0003-Port-to-OSGI-7.0.0.patch Patch3: aqute-bnd-java8compat.patch Patch4: 0004-maven-plugin-dependencies.patch +Patch5: reproducible-timestamps.patch +Patch6: reproducible-packages-list.patch BuildRequires: fdupes BuildRequires: maven-local BuildRequires: mvn(biz.aQute.bnd:biz.aQute.bndlib) @@ -62,6 +64,8 @@ API documentation for %{name}. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 +%patch6 -p1 pushd maven %pom_remove_dep -r :biz.aQute.bnd.maven diff --git a/reproducible-packages-list.patch b/reproducible-packages-list.patch new file mode 100644 index 0000000..e1dec44 --- /dev/null +++ b/reproducible-packages-list.patch @@ -0,0 +1,27 @@ +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Packages.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Packages.java +@@ -1,9 +1,9 @@ + package aQute.bnd.osgi; + + import java.util.Collection; +-import java.util.LinkedHashMap; + import java.util.Map; + import java.util.Set; ++import java.util.TreeMap; + + import aQute.bnd.header.Attrs; + import aQute.bnd.osgi.Descriptors.PackageRef; +@@ -21,11 +21,11 @@ public class Packages implements Map { + } + + public Packages(Packages other) { +- map = new LinkedHashMap<>(other.map); ++ map = new TreeMap<>(other.map); + } + + public Packages() { +- map = new LinkedHashMap<>(); ++ map = new TreeMap<>(); + } + + @Override diff --git a/reproducible-timestamps.patch b/reproducible-timestamps.patch new file mode 100644 index 0000000..905fd09 --- /dev/null +++ b/reproducible-timestamps.patch @@ -0,0 +1,36 @@ +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Jar.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Jar.java +@@ -114,7 +114,7 @@ public class Jar implements Closeable { + private String lastModifiedReason; + private boolean doNotTouchManifest; + private boolean nomanifest; +- private boolean reproducible; ++ private boolean reproducible = true; + private Compression compression = Compression.DEFLATE; + private boolean closed; + private String[] algorithms; +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Macro.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Macro.java +@@ -909,6 +909,10 @@ public class Macro { + reporter.warning("Too many arguments for tstamp: %s", Arrays.toString(args)); + } + ++ if (System.getenv("SOURCE_DATE_EPOCH") != null) { ++ now = 1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH")); ++ } ++ + SimpleDateFormat sdf = new SimpleDateFormat(format, Locale.US); + sdf.setTimeZone(tz); + return sdf.format(new Date(now)); +@@ -927,6 +931,11 @@ public class Macro { + } else { + now = System.currentTimeMillis(); + } ++ ++ if (System.getenv("SOURCE_DATE_EPOCH") != null) { ++ now = 1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH")); ++ } ++ + return now; + } + From 9c2a93e4205f2a18b594af52f16f010980a9a8beb85d21a832f524264a86cd8a Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Sun, 17 Sep 2023 17:15:21 +0000 Subject: [PATCH 2/9] OBS-URL: https://build.opensuse.org/package/show/Java:packages/aqute-bnd?expand=0&rev=31 --- aqute-bnd.spec | 2 ++ bnd-maven-plugin.changes | 4 ++- bnd-maven-plugin.spec | 2 ++ reproducible-require-capability.patch | 39 +++++++++++++++++++++++++++ 4 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 reproducible-require-capability.patch diff --git a/aqute-bnd.spec b/aqute-bnd.spec index 6a889bb..0ef4d42 100644 --- a/aqute-bnd.spec +++ b/aqute-bnd.spec @@ -38,6 +38,7 @@ Patch3: aqute-bnd-java8compat.patch Patch4: 0004-maven-plugin-dependencies.patch Patch5: reproducible-timestamps.patch Patch6: reproducible-packages-list.patch +Patch7: reproducible-require-capability.patch BuildRequires: ant BuildRequires: fdupes BuildRequires: javapackages-local @@ -99,6 +100,7 @@ build-jar-repository -s lib \ %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 # the commands pull in more dependencies than we want (felix-resolver, jetty, jtwig, javapackager) rm biz.aQute.bnd/src/aQute/bnd/main/{RemoteCommand,ResolveCommand,ExportReportCommand,MbrCommand,ReporterLogger}.java diff --git a/bnd-maven-plugin.changes b/bnd-maven-plugin.changes index 2421ad0..306743b 100644 --- a/bnd-maven-plugin.changes +++ b/bnd-maven-plugin.changes @@ -6,7 +6,9 @@ Sat Sep 16 10:08:36 UTC 2023 - Fridrich Strba + set "-reproducible" option to true by default + use SOURCE_DATE_EPOCH for timestamp if available * reproducible-packages-list.patch - + make the order of packages to import/export determininstic + + make the order of packages to import/export deterministic + * reproducible-require-capability.patch + + make the order of require-capabilities entries deterministic ------------------------------------------------------------------- Wed Apr 26 17:47:47 UTC 2023 - Fridrich Strba diff --git a/bnd-maven-plugin.spec b/bnd-maven-plugin.spec index c2c9279..f153d8f 100644 --- a/bnd-maven-plugin.spec +++ b/bnd-maven-plugin.spec @@ -31,6 +31,7 @@ Patch3: aqute-bnd-java8compat.patch Patch4: 0004-maven-plugin-dependencies.patch Patch5: reproducible-timestamps.patch Patch6: reproducible-packages-list.patch +Patch7: reproducible-require-capability.patch BuildRequires: fdupes BuildRequires: maven-local BuildRequires: mvn(biz.aQute.bnd:biz.aQute.bndlib) @@ -66,6 +67,7 @@ API documentation for %{name}. %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 pushd maven %pom_remove_dep -r :biz.aQute.bnd.maven diff --git a/reproducible-require-capability.patch b/reproducible-require-capability.patch new file mode 100644 index 0000000..a4b3898 --- /dev/null +++ b/reproducible-require-capability.patch @@ -0,0 +1,39 @@ +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceBuilder.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceBuilder.java +index ebb8463a..e624009c 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceBuilder.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceBuilder.java +@@ -11,8 +11,6 @@ import java.net.URI; + import java.util.ArrayList; + import java.util.Collections; + import java.util.Comparator; +-import java.util.LinkedHashMap; +-import java.util.LinkedHashSet; + import java.util.LinkedList; + import java.util.List; + import java.util.Map; +@@ -20,6 +18,7 @@ import java.util.Map.Entry; + import java.util.Optional; + import java.util.Set; + import java.util.TreeMap; ++import java.util.TreeSet; + import java.util.function.Supplier; + import java.util.jar.Manifest; + +@@ -101,7 +100,7 @@ public class ResourceBuilder { + } + + private static void add(Map> map, String namespace, CR capreq) { +- map.computeIfAbsent(namespace, k -> new LinkedHashSet<>()) ++ map.computeIfAbsent(namespace, k -> new TreeSet<>()) + .add(capreq); + } + +@@ -672,7 +671,7 @@ public class ResourceBuilder { + } + + public Map from(Resource bundle) { +- Map mapping = new LinkedHashMap<>(); ++ Map mapping = new TreeMap<>(); + + addRequirements(bundle.getRequirements(null)); + From 378921bae0e65b620c6af06e7f01b4bbc2443ec2b9951726d2632dc06d174fd1 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Sun, 17 Sep 2023 17:41:28 +0000 Subject: [PATCH 3/9] OBS-URL: https://build.opensuse.org/package/show/Java:packages/aqute-bnd?expand=0&rev=32 --- aqute-bnd.changes | 4 +- aqute-bnd.spec | 4 +- bnd-maven-plugin.changes | 6 +- bnd-maven-plugin.spec | 4 +- reproducible-element-order.patch | 425 ++++++++++++++++++++++++++ reproducible-packages-list.patch | 27 -- reproducible-require-capability.patch | 39 --- 7 files changed, 431 insertions(+), 78 deletions(-) create mode 100644 reproducible-element-order.patch delete mode 100644 reproducible-packages-list.patch delete mode 100644 reproducible-require-capability.patch diff --git a/aqute-bnd.changes b/aqute-bnd.changes index 6e16c3d..5abd6e0 100644 --- a/aqute-bnd.changes +++ b/aqute-bnd.changes @@ -5,8 +5,8 @@ Sat Sep 16 10:08:36 UTC 2023 - Fridrich Strba * reproducible-timestamps.patch + set "-reproducible" option to true by default + use SOURCE_DATE_EPOCH for timestamp if available - * reproducible-packages-list.patch - + make the order of packages to import/export determininstic + * reproducible-element-order.patch + + make the order of elements in manifest deterministic ------------------------------------------------------------------- Thu May 4 14:25:12 UTC 2023 - Dominique Leuenberger diff --git a/aqute-bnd.spec b/aqute-bnd.spec index 0ef4d42..eb8b5d3 100644 --- a/aqute-bnd.spec +++ b/aqute-bnd.spec @@ -37,8 +37,7 @@ Patch2: 0003-Port-to-OSGI-7.0.0.patch Patch3: aqute-bnd-java8compat.patch Patch4: 0004-maven-plugin-dependencies.patch Patch5: reproducible-timestamps.patch -Patch6: reproducible-packages-list.patch -Patch7: reproducible-require-capability.patch +Patch6: reproducible-element-order.patch BuildRequires: ant BuildRequires: fdupes BuildRequires: javapackages-local @@ -100,7 +99,6 @@ build-jar-repository -s lib \ %patch4 -p1 %patch5 -p1 %patch6 -p1 -%patch7 -p1 # the commands pull in more dependencies than we want (felix-resolver, jetty, jtwig, javapackager) rm biz.aQute.bnd/src/aQute/bnd/main/{RemoteCommand,ResolveCommand,ExportReportCommand,MbrCommand,ReporterLogger}.java diff --git a/bnd-maven-plugin.changes b/bnd-maven-plugin.changes index 306743b..9a809f9 100644 --- a/bnd-maven-plugin.changes +++ b/bnd-maven-plugin.changes @@ -5,10 +5,8 @@ Sat Sep 16 10:08:36 UTC 2023 - Fridrich Strba * reproducible-timestamps.patch + set "-reproducible" option to true by default + use SOURCE_DATE_EPOCH for timestamp if available - * reproducible-packages-list.patch - + make the order of packages to import/export deterministic - * reproducible-require-capability.patch - + make the order of require-capabilities entries deterministic + * reproducible-element-order.patch + + make the order of elements in manifest deterministic ------------------------------------------------------------------- Wed Apr 26 17:47:47 UTC 2023 - Fridrich Strba diff --git a/bnd-maven-plugin.spec b/bnd-maven-plugin.spec index f153d8f..54a9277 100644 --- a/bnd-maven-plugin.spec +++ b/bnd-maven-plugin.spec @@ -30,8 +30,7 @@ Patch2: 0003-Port-to-OSGI-7.0.0.patch Patch3: aqute-bnd-java8compat.patch Patch4: 0004-maven-plugin-dependencies.patch Patch5: reproducible-timestamps.patch -Patch6: reproducible-packages-list.patch -Patch7: reproducible-require-capability.patch +Patch6: reproducible-element-order.patch BuildRequires: fdupes BuildRequires: maven-local BuildRequires: mvn(biz.aQute.bnd:biz.aQute.bndlib) @@ -67,7 +66,6 @@ API documentation for %{name}. %patch4 -p1 %patch5 -p1 %patch6 -p1 -%patch7 -p1 pushd maven %pom_remove_dep -r :biz.aQute.bnd.maven diff --git a/reproducible-element-order.patch b/reproducible-element-order.patch new file mode 100644 index 0000000..2ebbf4c --- /dev/null +++ b/reproducible-element-order.patch @@ -0,0 +1,425 @@ +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/ActivelyClosingClassLoader.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/ActivelyClosingClassLoader.java +index 761f48ef..4c9b3efd 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/ActivelyClosingClassLoader.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/ActivelyClosingClassLoader.java +@@ -14,10 +14,10 @@ import java.net.URLClassLoader; + import java.net.URLConnection; + import java.net.URLStreamHandler; + import java.util.Enumeration; +-import java.util.LinkedHashMap; + import java.util.List; + import java.util.Map; + import java.util.Objects; ++import java.util.TreeMap; + import java.util.concurrent.ScheduledFuture; + import java.util.concurrent.TimeUnit; + import java.util.concurrent.atomic.AtomicBoolean; +@@ -35,7 +35,7 @@ import aQute.lib.io.IO; + * This class loader can load classes from JAR files. + */ + class ActivelyClosingClassLoader extends URLClassLoader implements Closeable { +- final AtomicReference> wrappers = new AtomicReference<>(new LinkedHashMap<>()); ++ final AtomicReference> wrappers = new AtomicReference<>(new TreeMap<>()); + final AtomicBoolean open = new AtomicBoolean(true); + final Processor processor; + ScheduledFuture schedule; +@@ -89,7 +89,7 @@ class ActivelyClosingClassLoader extends URLClassLoader implements Closeable { + throw new IllegalStateException("Already closed"); + } + wrappers.updateAndGet(map -> { +- Map copy = new LinkedHashMap<>(map); ++ Map copy = new TreeMap<>(map); + copy.computeIfAbsent(file, Wrapper::new); + return copy; + }); +@@ -183,7 +183,7 @@ class ActivelyClosingClassLoader extends URLClassLoader implements Closeable { + if (schedule != null) { + schedule.cancel(true); + } +- wrappers.getAndSet(new LinkedHashMap<>()) ++ wrappers.getAndSet(new TreeMap<>()) + .values() + .forEach(Wrapper::close); + } +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Analyzer.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Analyzer.java +index bf5029ae..533eea3d 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Analyzer.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Analyzer.java +@@ -43,7 +43,6 @@ import java.util.EnumSet; + import java.util.HashMap; + import java.util.HashSet; + import java.util.Iterator; +-import java.util.LinkedHashSet; + import java.util.LinkedList; + import java.util.List; + import java.util.Map; +@@ -2144,7 +2143,7 @@ public class Analyzer extends Processor { + .distinct() + .filter(this::isProvider) + .map(TypeRef::getPackageRef) +- .collect(toCollection(LinkedHashSet::new)); ++ .collect(toCollection(TreeSet::new)); + return providers; + } + +@@ -2686,7 +2685,7 @@ public class Analyzer extends Processor { + + // Look at the referred packages + // and copy them to our baseline +- Set refs = new LinkedHashSet<>(clazz.getReferred()); ++ Set refs = new TreeSet<>(clazz.getReferred()); + refs.addAll(referencesByAnnotation(clazz)); + for (PackageRef p : refs) { + referred.put(p); +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Annotation.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Annotation.java +index 685c92e1..c3f10b29 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Annotation.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Annotation.java +@@ -6,9 +6,9 @@ import java.lang.annotation.RetentionPolicy; + import java.util.Arrays; + import java.util.Collections; + import java.util.Iterator; +-import java.util.LinkedHashMap; + import java.util.Map; + import java.util.Map.Entry; ++import java.util.TreeMap; + import java.util.Set; + import java.util.stream.Stream; + +@@ -150,7 +150,7 @@ public class Annotation { + + public void put(String string, Object v) { + if (elements == null) { +- elements = new LinkedHashMap<>(); ++ elements = new TreeMap<>(); + } + elements.put(string, v); + } +@@ -193,7 +193,7 @@ public class Annotation { + + public T getAnnotation(Class c) throws Exception { + if (elements == null) { +- elements = new LinkedHashMap<>(); ++ elements = new TreeMap<>(); + } + return CONVERTER.convert(c, elements); + } +@@ -211,7 +211,7 @@ public class Annotation { + return; + } + if (elements == null) { +- elements = new LinkedHashMap<>(map); ++ elements = new TreeMap<>(map); + } else { + map.forEach(elements::putIfAbsent); + } +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Clazz.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Clazz.java +index b97251b5..e0e315bf 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Clazz.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Clazz.java +@@ -32,7 +32,6 @@ import java.util.Deque; + import java.util.EnumSet; + import java.util.HashMap; + import java.util.HashSet; +-import java.util.LinkedHashMap; + import java.util.List; + import java.util.Map; + import java.util.Optional; +@@ -40,6 +39,7 @@ import java.util.Properties; + import java.util.Set; + import java.util.Spliterator; + import java.util.Spliterators.AbstractSpliterator; ++import java.util.TreeMap; + import java.util.function.Consumer; + import java.util.function.Function; + import java.util.function.Predicate; +@@ -1478,7 +1478,7 @@ public class Clazz { + + private Map annotationValues(ElementValueInfo[] values, ElementType elementType, + RetentionPolicy policy, int access_flags) { +- Map elements = new LinkedHashMap<>(); ++ Map elements = new TreeMap<>(); + for (ElementValueInfo elementValueInfo : values) { + String element = elementValueInfo.name; + Object value = newElementValue(elementValueInfo.value, elementType, policy, access_flags); +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Instructions.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Instructions.java +index bf1d13c4..277d8f00 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Instructions.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Instructions.java +@@ -9,10 +9,10 @@ import java.util.Collection; + import java.util.Collections; + import java.util.HashSet; + import java.util.Iterator; +-import java.util.LinkedHashMap; + import java.util.List; + import java.util.Map; + import java.util.Set; ++import java.util.TreeMap; + import java.util.concurrent.atomic.AtomicBoolean; + import java.util.function.Function; + +@@ -23,13 +23,13 @@ import aQute.lib.collections.MultiMap; + import aQute.lib.io.IO; + + public class Instructions implements Map { +- private LinkedHashMap map; ++ private TreeMap map; + public static Instructions ALWAYS = new Instructions(); + static Map EMPTY = Collections.emptyMap(); + + public Instructions(Instructions other) { + if (other.map != null && !other.map.isEmpty()) { +- map = new LinkedHashMap<>(other.map); ++ map = new TreeMap<>(other.map); + } + } + +@@ -134,7 +134,7 @@ public class Instructions implements Map { + @Override + public Attrs put(Instruction key, Attrs value) { + if (map == null) +- map = new LinkedHashMap<>(); ++ map = new TreeMap<>(); + + return map.put(key, value); + } +@@ -144,7 +144,7 @@ public class Instructions implements Map { + if (this.map == null) { + if (map.isEmpty()) + return; +- this.map = new LinkedHashMap<>(); ++ this.map = new TreeMap<>(); + } + this.map.putAll(map); + } +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Macro.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Macro.java +index 47312379..f9996bd8 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Macro.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Macro.java +@@ -29,7 +29,6 @@ import java.util.Date; + import java.util.Deque; + import java.util.Formatter; + import java.util.Iterator; +-import java.util.LinkedHashSet; + import java.util.LinkedList; + import java.util.List; + import java.util.Locale; +@@ -42,6 +41,7 @@ import java.util.Random; + import java.util.Set; + import java.util.TimeZone; + import java.util.TreeMap; ++import java.util.TreeSet; + import java.util.concurrent.ConcurrentHashMap; + import java.util.function.BiFunction; + import java.util.function.Function; +@@ -2166,7 +2166,7 @@ public class Macro { + * @return a map with commands and their help + */ + public Map getCommands() { +- Set targets = new LinkedHashSet<>(); ++ Set targets = new TreeSet<>(); + Collections.addAll(targets, this.targets); + Processor rover = domain; + while (rover != null) { +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Packages.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Packages.java +index 6e0cd11d..6bd42dcd 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Packages.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Packages.java +@@ -1,9 +1,9 @@ + package aQute.bnd.osgi; + + import java.util.Collection; +-import java.util.LinkedHashMap; + import java.util.Map; + import java.util.Set; ++import java.util.TreeMap; + + import aQute.bnd.header.Attrs; + import aQute.bnd.osgi.Descriptors.PackageRef; +@@ -21,11 +21,11 @@ public class Packages implements Map { + } + + public Packages(Packages other) { +- map = new LinkedHashMap<>(other.map); ++ map = new TreeMap<>(other.map); + } + + public Packages() { +- map = new LinkedHashMap<>(); ++ map = new TreeMap<>(); + } + + @Override +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Processor.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Processor.java +index ca5d496d..c65c493e 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Processor.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Processor.java +@@ -31,7 +31,6 @@ import java.util.Collection; + import java.util.Collections; + import java.util.HashSet; + import java.util.Iterator; +-import java.util.LinkedHashMap; + import java.util.List; + import java.util.Map; + import java.util.Map.Entry; +@@ -41,6 +40,7 @@ import java.util.Properties; + import java.util.Random; + import java.util.Set; + import java.util.Spliterator; ++import java.util.TreeMap; + import java.util.TreeSet; + import java.util.concurrent.CopyOnWriteArrayList; + import java.util.concurrent.CopyOnWriteArraySet; +@@ -942,11 +942,11 @@ public class Processor extends Domain implements Reporter, Registry, Constants, + } + + public static Map newMap() { +- return new LinkedHashMap<>(); ++ return new TreeMap<>(); + } + + public static Map newHashMap() { +- return new LinkedHashMap<>(); ++ return new TreeMap<>(); + } + + public List newList(Collection t) { +@@ -958,7 +958,7 @@ public class Processor extends Domain implements Reporter, Registry, Constants, + } + + public Map newMap(Map t) { +- return new LinkedHashMap<>(t); ++ return new TreeMap<>(t); + } + + @Override +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/eclipse/EclipseClasspath.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/eclipse/EclipseClasspath.java +index 3f9a2be9..2daf737c 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/eclipse/EclipseClasspath.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/eclipse/EclipseClasspath.java +@@ -5,11 +5,11 @@ import java.io.FileNotFoundException; + import java.io.IOException; + import java.util.ArrayList; + import java.util.HashMap; +-import java.util.LinkedHashSet; + import java.util.List; + import java.util.Map; + import java.util.Set; + import java.util.StringTokenizer; ++import java.util.TreeSet; + import java.util.regex.Matcher; + import java.util.regex.Pattern; + +@@ -34,18 +34,18 @@ public class EclipseClasspath { + static final DocumentBuilderFactory documentBuilderFactory = XML.newDocumentBuilderFactory(); + File project; + File workspace; +- Set sources = new LinkedHashSet<>(); +- Set allSources = new LinkedHashSet<>(); ++ Set sources = new TreeSet<>(); ++ Set allSources = new TreeSet<>(); + +- Set classpath = new LinkedHashSet<>(); ++ Set classpath = new TreeSet<>(); + List dependents = new ArrayList<>(); + File output; + boolean recurse = true; +- Set exports = new LinkedHashSet<>(); ++ Set exports = new TreeSet<>(); + Map properties = new HashMap<>(); + Reporter reporter; + int options; +- Set bootclasspath = new LinkedHashSet<>(); ++ Set bootclasspath = new TreeSet<>(); + + public final static int DO_VARIABLES = 1; + +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/ResourcesRepository.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/ResourcesRepository.java +index 4cf286bc..8ef64202 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/ResourcesRepository.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/ResourcesRepository.java +@@ -5,10 +5,10 @@ import static java.util.stream.Collectors.toMap; + + import java.util.ArrayList; + import java.util.Collection; +-import java.util.LinkedHashSet; + import java.util.List; + import java.util.Map; + import java.util.Set; ++import java.util.TreeSet; + import java.util.concurrent.ConcurrentHashMap; + import java.util.function.Predicate; + import java.util.stream.Collector; +@@ -24,7 +24,7 @@ public class ResourcesRepository extends BaseRepository { + private final Map>> cache; + + public ResourcesRepository() { +- resources = new LinkedHashSet<>(); ++ resources = new TreeSet<>(); + cache = new ConcurrentHashMap<>(); + } + +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/SimpleIndexer.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/SimpleIndexer.java +index 9ac735f6..6e022641 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/SimpleIndexer.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/SimpleIndexer.java +@@ -9,10 +9,10 @@ import java.net.URI; + import java.net.URISyntaxException; + import java.nio.file.Path; + import java.util.Collection; +-import java.util.LinkedHashSet; + import java.util.List; + import java.util.Objects; + import java.util.Set; ++import java.util.TreeSet; + import java.util.stream.Collectors; + + import org.osgi.resource.Resource; +@@ -67,7 +67,7 @@ public class SimpleIndexer { + void analyzeFile(File file, ResourceBuilder resourceBuilder) throws Exception; + } + +- private final Set files = new LinkedHashSet<>(); ++ private final Set files = new TreeSet<>(); + private Path base; + private boolean compress = false; + private String name; +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceBuilder.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceBuilder.java +index ebb8463a..e624009c 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceBuilder.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceBuilder.java +@@ -11,8 +11,6 @@ import java.net.URI; + import java.util.ArrayList; + import java.util.Collections; + import java.util.Comparator; +-import java.util.LinkedHashMap; +-import java.util.LinkedHashSet; + import java.util.LinkedList; + import java.util.List; + import java.util.Map; +@@ -20,6 +18,7 @@ import java.util.Map.Entry; + import java.util.Optional; + import java.util.Set; + import java.util.TreeMap; ++import java.util.TreeSet; + import java.util.function.Supplier; + import java.util.jar.Manifest; + +@@ -101,7 +100,7 @@ public class ResourceBuilder { + } + + private static void add(Map> map, String namespace, CR capreq) { +- map.computeIfAbsent(namespace, k -> new LinkedHashSet<>()) ++ map.computeIfAbsent(namespace, k -> new TreeSet<>()) + .add(capreq); + } + +@@ -672,7 +671,7 @@ public class ResourceBuilder { + } + + public Map from(Resource bundle) { +- Map mapping = new LinkedHashMap<>(); ++ Map mapping = new TreeMap<>(); + + addRequirements(bundle.getRequirements(null)); + diff --git a/reproducible-packages-list.patch b/reproducible-packages-list.patch deleted file mode 100644 index e1dec44..0000000 --- a/reproducible-packages-list.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Packages.java -+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Packages.java -@@ -1,9 +1,9 @@ - package aQute.bnd.osgi; - - import java.util.Collection; --import java.util.LinkedHashMap; - import java.util.Map; - import java.util.Set; -+import java.util.TreeMap; - - import aQute.bnd.header.Attrs; - import aQute.bnd.osgi.Descriptors.PackageRef; -@@ -21,11 +21,11 @@ public class Packages implements Map { - } - - public Packages(Packages other) { -- map = new LinkedHashMap<>(other.map); -+ map = new TreeMap<>(other.map); - } - - public Packages() { -- map = new LinkedHashMap<>(); -+ map = new TreeMap<>(); - } - - @Override diff --git a/reproducible-require-capability.patch b/reproducible-require-capability.patch deleted file mode 100644 index a4b3898..0000000 --- a/reproducible-require-capability.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceBuilder.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceBuilder.java -index ebb8463a..e624009c 100644 ---- a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceBuilder.java -+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceBuilder.java -@@ -11,8 +11,6 @@ import java.net.URI; - import java.util.ArrayList; - import java.util.Collections; - import java.util.Comparator; --import java.util.LinkedHashMap; --import java.util.LinkedHashSet; - import java.util.LinkedList; - import java.util.List; - import java.util.Map; -@@ -20,6 +18,7 @@ import java.util.Map.Entry; - import java.util.Optional; - import java.util.Set; - import java.util.TreeMap; -+import java.util.TreeSet; - import java.util.function.Supplier; - import java.util.jar.Manifest; - -@@ -101,7 +100,7 @@ public class ResourceBuilder { - } - - private static void add(Map> map, String namespace, CR capreq) { -- map.computeIfAbsent(namespace, k -> new LinkedHashSet<>()) -+ map.computeIfAbsent(namespace, k -> new TreeSet<>()) - .add(capreq); - } - -@@ -672,7 +671,7 @@ public class ResourceBuilder { - } - - public Map from(Resource bundle) { -- Map mapping = new LinkedHashMap<>(); -+ Map mapping = new TreeMap<>(); - - addRequirements(bundle.getRequirements(null)); - From 80917016551ccd9d97c29fb480b4aa7cab58b061d7be55ba0bb75f242b71e831 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Sun, 17 Sep 2023 17:47:34 +0000 Subject: [PATCH 4/9] OBS-URL: https://build.opensuse.org/package/show/Java:packages/aqute-bnd?expand=0&rev=33 --- reproducible-element-order.patch | 50 -------------------------------- 1 file changed, 50 deletions(-) diff --git a/reproducible-element-order.patch b/reproducible-element-order.patch index 2ebbf4c..2963b65 100644 --- a/reproducible-element-order.patch +++ b/reproducible-element-order.patch @@ -142,56 +142,6 @@ index b97251b5..e0e315bf 100644 for (ElementValueInfo elementValueInfo : values) { String element = elementValueInfo.name; Object value = newElementValue(elementValueInfo.value, elementType, policy, access_flags); -diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Instructions.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Instructions.java -index bf1d13c4..277d8f00 100644 ---- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Instructions.java -+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Instructions.java -@@ -9,10 +9,10 @@ import java.util.Collection; - import java.util.Collections; - import java.util.HashSet; - import java.util.Iterator; --import java.util.LinkedHashMap; - import java.util.List; - import java.util.Map; - import java.util.Set; -+import java.util.TreeMap; - import java.util.concurrent.atomic.AtomicBoolean; - import java.util.function.Function; - -@@ -23,13 +23,13 @@ import aQute.lib.collections.MultiMap; - import aQute.lib.io.IO; - - public class Instructions implements Map { -- private LinkedHashMap map; -+ private TreeMap map; - public static Instructions ALWAYS = new Instructions(); - static Map EMPTY = Collections.emptyMap(); - - public Instructions(Instructions other) { - if (other.map != null && !other.map.isEmpty()) { -- map = new LinkedHashMap<>(other.map); -+ map = new TreeMap<>(other.map); - } - } - -@@ -134,7 +134,7 @@ public class Instructions implements Map { - @Override - public Attrs put(Instruction key, Attrs value) { - if (map == null) -- map = new LinkedHashMap<>(); -+ map = new TreeMap<>(); - - return map.put(key, value); - } -@@ -144,7 +144,7 @@ public class Instructions implements Map { - if (this.map == null) { - if (map.isEmpty()) - return; -- this.map = new LinkedHashMap<>(); -+ this.map = new TreeMap<>(); - } - this.map.putAll(map); - } diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Macro.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Macro.java index 47312379..f9996bd8 100644 --- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Macro.java From 8b89b2acd0adb8ecffb98ccbc85214fa358b1251b6c079d2faffe8e65bada083 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Sun, 17 Sep 2023 19:00:59 +0000 Subject: [PATCH 5/9] OBS-URL: https://build.opensuse.org/package/show/Java:packages/aqute-bnd?expand=0&rev=34 --- reproducible-element-order.patch | 479 ++++++++++++++++++++++++++++++- 1 file changed, 476 insertions(+), 3 deletions(-) diff --git a/reproducible-element-order.patch b/reproducible-element-order.patch index 2963b65..f57db37 100644 --- a/reproducible-element-order.patch +++ b/reproducible-element-order.patch @@ -1,3 +1,28 @@ +diff --git a/biz.aQute.bndlib/src/aQute/bnd/header/Parameters.java b/biz.aQute.bndlib/src/aQute/bnd/header/Parameters.java +index d3916f63..ae84ca14 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/header/Parameters.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/header/Parameters.java +@@ -4,10 +4,10 @@ import static aQute.bnd.osgi.Constants.DUPLICATE_MARKER; + import static java.util.stream.Collectors.toList; + + import java.util.Collection; +-import java.util.LinkedHashMap; + import java.util.List; + import java.util.Map; + import java.util.Set; ++import java.util.TreeMap; + import java.util.stream.Collector; + + import aQute.bnd.stream.MapStream; +@@ -19,7 +19,7 @@ public class Parameters implements Map { + + public Parameters(boolean allowDuplicateAttributes) { + this.allowDuplicateAttributes = allowDuplicateAttributes; +- map = new LinkedHashMap<>(); ++ map = new TreeMap<>(); + } + + public Parameters() { diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/ActivelyClosingClassLoader.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/ActivelyClosingClassLoader.java index 761f48ef..4c9b3efd 100644 --- a/biz.aQute.bndlib/src/aQute/bnd/osgi/ActivelyClosingClassLoader.java @@ -113,15 +138,75 @@ index 685c92e1..c3f10b29 100644 } else { map.forEach(elements::putIfAbsent); } +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/AnnotationHeaders.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/AnnotationHeaders.java +index 7ee4b2a5..ade0577c 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/AnnotationHeaders.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/AnnotationHeaders.java +@@ -8,7 +8,6 @@ import java.io.IOException; + import java.lang.annotation.Target; + import java.util.ArrayList; + import java.util.Arrays; +-import java.util.HashSet; + import java.util.List; + import java.util.Map.Entry; + import java.util.Optional; +@@ -151,7 +150,7 @@ class AnnotationHeaders extends ClassDataCollector implements Closeable { + // The annotations we could not load. used to avoid repeatedly logging the + // same missing annotation for the same project. Note that this should not + // be reset for each #classStart(Clazz). +- final Set loggedMissing = new HashSet<>(); ++ final Set loggedMissing = new TreeSet<>(); + final Instructions instructions; + + // we parse the annotations separately at the end +@@ -394,7 +393,7 @@ class AnnotationHeaders extends ClassDataCollector implements Closeable { + handleAttributeOrDirective(a); + break; + default : +- Set processed = new HashSet<>(this.processed); ++ Set processed = new TreeSet<>(this.processed); + processed.add(c.getFQN()); + doAnnotatedAnnotation(a, a.getName(), processed, attributesAndDirectives); + break; +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Builder.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Builder.java +index cbeb4452..9b03e520 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Builder.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Builder.java +@@ -14,13 +14,13 @@ import java.util.ArrayList; + import java.util.Arrays; + import java.util.Collection; + import java.util.Collections; +-import java.util.HashSet; + import java.util.Iterator; + import java.util.List; + import java.util.Map; + import java.util.Map.Entry; + import java.util.Objects; + import java.util.Set; ++import java.util.TreeSet; + import java.util.concurrent.ConcurrentHashMap; + import java.util.jar.Manifest; + import java.util.regex.Matcher; +@@ -489,7 +489,7 @@ public class Builder extends Analyzer { + .toStringWithoutQualifier(); + } + } +- Set visited = new HashSet<>(); ++ Set visited = new TreeSet<>(); + + for (Map.Entry entry : packages.entrySet()) { + diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Clazz.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Clazz.java -index b97251b5..e0e315bf 100644 +index b97251b5..a3f8644f 100644 --- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Clazz.java +++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Clazz.java -@@ -32,7 +32,6 @@ import java.util.Deque; +@@ -31,8 +31,7 @@ import java.util.Comparator; + import java.util.Deque; import java.util.EnumSet; import java.util.HashMap; - import java.util.HashSet; +-import java.util.HashSet; -import java.util.LinkedHashMap; ++import java.util.TreeSet; import java.util.List; import java.util.Map; import java.util.Optional; @@ -133,6 +218,33 @@ index b97251b5..e0e315bf 100644 import java.util.function.Consumer; import java.util.function.Function; import java.util.function.Predicate; +@@ -735,7 +735,7 @@ public class Clazz { + private boolean hasDefaultConstructor; + + private Set imports = Create.set(); +- private Set xref = new HashSet<>(); ++ private Set xref = new TreeSet<>(); + private Set annotations; + private int forName = 0; + private int class$ = 0; +@@ -803,7 +803,7 @@ public class Clazz { + referred = new HashMap<>(constantPool.size()); + + if (classDef.isPublic()) { +- api = new HashSet<>(); ++ api = new TreeSet<>(); + } + if (!classDef.isModule()) { + referTo(classDef.getType(), Modifier.PUBLIC); +@@ -1430,7 +1430,7 @@ public class Clazz { + private void processAnnotation(AnnotationInfo annotationInfo, ElementType elementType, RetentionPolicy policy, + int access_flags) { + if (annotations == null) { +- annotations = new HashSet<>(); ++ annotations = new TreeSet<>(); + } + + String typeName = annotationInfo.type; @@ -1478,7 +1478,7 @@ public class Clazz { private Map annotationValues(ElementValueInfo[] values, ElementType elementType, @@ -142,6 +254,109 @@ index b97251b5..e0e315bf 100644 for (ElementValueInfo elementValueInfo : values) { String element = elementValueInfo.name; Object value = newElementValue(elementValueInfo.value, elementType, policy, access_flags); +@@ -1706,7 +1706,7 @@ public class Clazz { + Spliterator spliterator = new AbstractSpliterator(Long.MAX_VALUE, + Spliterator.DISTINCT | Spliterator.ORDERED | Spliterator.NONNULL) { + private final Deque queue = new ArrayDeque<>(func.apply(Clazz.this)); +- private final Set seen = (visited != null) ? visited : new HashSet<>(); ++ private final Set seen = (visited != null) ? visited : new TreeSet<>(); + + @Override + public boolean tryAdvance(Consumer action) { +@@ -1758,7 +1758,7 @@ public class Clazz { + + case IMPLEMENTS : { + requireNonNull(instr); +- Set visited = new HashSet<>(); ++ Set visited = new TreeSet<>(); + return hierarchyStream(analyzer).flatMap(c -> c.typeStream(analyzer, Clazz::interfaces, visited)) + .map(TypeRef::getDottedOnly) + .anyMatch(instr::matches) ^ instr.isNegated(); +@@ -1787,7 +1787,7 @@ public class Clazz { + + case INDIRECTLY_ANNOTATED : { + requireNonNull(instr); +- return typeStream(analyzer, Clazz::annotations, new HashSet<>()) // ++ return typeStream(analyzer, Clazz::annotations, new TreeSet<>()) // + .map(TypeRef::getFQN) + .anyMatch(instr::matches) ^ instr.isNegated(); + } +@@ -1802,7 +1802,7 @@ public class Clazz { + + case HIERARCHY_INDIRECTLY_ANNOTATED : { + requireNonNull(instr); +- Set visited = new HashSet<>(); ++ Set visited = new TreeSet<>(); + return hierarchyStream(analyzer) // + .flatMap(c -> c.typeStream(analyzer, Clazz::annotations, visited)) + .map(TypeRef::getFQN) +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Contracts.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Contracts.java +index d6ab2fd0..4824c91a 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Contracts.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Contracts.java +@@ -4,10 +4,10 @@ import static aQute.bnd.osgi.Constants.DUPLICATE_MARKER; + + import java.util.Collection; + import java.util.Formatter; +-import java.util.HashSet; + import java.util.List; + import java.util.Map.Entry; + import java.util.Set; ++import java.util.TreeSet; + + import org.osgi.namespace.contract.ContractNamespace; + import org.osgi.resource.Namespace; +@@ -36,7 +36,7 @@ class Contracts { + Contract.class, true); + private MultiMap, PackageRef> overlappingContracts = new MultiMap<>(); + private Instructions instructions; +- private final Set contracts = new HashSet<>(); ++ private final Set contracts = new TreeSet<>(); + + public class Contract { + public String name; +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Jar.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Jar.java +index 3576bd87..d86ce7c1 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Jar.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Jar.java +@@ -27,7 +27,6 @@ import java.util.Arrays; + import java.util.Calendar; + import java.util.EnumSet; + import java.util.GregorianCalendar; +-import java.util.HashSet; + import java.util.List; + import java.util.Map; + import java.util.NavigableMap; +@@ -548,9 +547,9 @@ public class Jar implements Closeable { + // default is DEFLATED + } + +- Set done = new HashSet<>(); ++ Set done = new TreeSet<>(); + +- Set directories = new HashSet<>(); ++ Set directories = new TreeSet<>(); + if (doNotTouchManifest) { + Resource r = getResource(manifestName); + if (r != null) { +@@ -588,7 +587,7 @@ public class Jar implements Closeable { + + check(); + +- Set done = new HashSet<>(); ++ Set done = new TreeSet<>(); + + if (doNotTouchManifest) { + Resource r = getResource(manifestName); +@@ -1281,7 +1280,7 @@ public class Jar implements Closeable { + public void stripSignatures() { + Map map = getDirectory("META-INF"); + if (map != null) { +- for (String file : new HashSet<>(map.keySet())) { ++ for (String file : new TreeSet<>(map.keySet())) { + if (SIGNER_FILES_P.matcher(file) + .matches()) + remove(file); diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Macro.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Macro.java index 47312379..f9996bd8 100644 --- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Macro.java @@ -200,6 +415,27 @@ index 6e0cd11d..6bd42dcd 100644 } @Override +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/PermissionGenerator.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/PermissionGenerator.java +index e7721390..c9f654df 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/PermissionGenerator.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/PermissionGenerator.java +@@ -4,7 +4,6 @@ import static java.util.stream.Collectors.toCollection; + + import java.util.Collections; + import java.util.EnumSet; +-import java.util.HashSet; + import java.util.Objects; + import java.util.Set; + import java.util.TreeSet; +@@ -150,7 +149,7 @@ public class PermissionGenerator { + + @Override + public Set visit(Or expr) { +- Set matches = new HashSet<>(); ++ Set matches = new TreeSet<>(); + for (Expression expression : expr.getExpressions()) { + matches.addAll(expression.visit(this)); + } diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Processor.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Processor.java index ca5d496d..c65c493e 100644 --- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Processor.java @@ -243,6 +479,74 @@ index ca5d496d..c65c493e 100644 } @Override +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Verifier.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Verifier.java +index 982e229b..5ea80f10 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Verifier.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Verifier.java +@@ -4,7 +4,6 @@ import java.io.InputStream; + import java.util.ArrayList; + import java.util.Arrays; + import java.util.Formatter; +-import java.util.HashSet; + import java.util.Iterator; + import java.util.List; + import java.util.Map; +@@ -565,7 +564,7 @@ public class Verifier extends Processor { + if (!unresolvedReferences.isEmpty()) { + // Now we want to know the + // classes that are the culprits +- Set culprits = new HashSet<>(); ++ Set culprits = new TreeSet<>(); + for (Clazz clazz : analyzer.getClassspace() + .values()) { + if (hasOverlap(unresolvedReferences, clazz.getReferred())) +@@ -674,7 +673,7 @@ public class Verifier extends Processor { + if (!since(About._2_3)) + return; + +- Set invalidPaths = new HashSet<>(); ++ Set invalidPaths = new TreeSet<>(); + Pattern pattern = ReservedFileNames; + setProperty("@", ReservedFileNames.pattern()); + String p = getProperty(INVALIDFILENAMES); +@@ -690,7 +689,7 @@ public class Verifier extends Processor { + } + } + +- Set segments = new HashSet<>(); ++ Set segments = new TreeSet<>(); + for (String path : dot.getResources() + .keySet()) { + String parts[] = path.split("/"); +@@ -717,8 +716,8 @@ public class Verifier extends Processor { + if (isStrict()) { + Parameters map = parseHeader(manifest.getMainAttributes() + .getValue(Constants.IMPORT_PACKAGE)); +- Set noimports = new HashSet<>(); +- Set toobroadimports = new HashSet<>(); ++ Set noimports = new TreeSet<>(); ++ Set toobroadimports = new TreeSet<>(); + + for (Entry e : map.entrySet()) { + +@@ -791,7 +790,7 @@ public class Verifier extends Processor { + if (isStrict()) { + Parameters map = parseHeader(manifest.getMainAttributes() + .getValue(Constants.EXPORT_PACKAGE)); +- Set noexports = new HashSet<>(); ++ Set noexports = new TreeSet<>(); + + for (Entry e : map.entrySet()) { + +@@ -837,7 +836,7 @@ public class Verifier extends Processor { + String mandatory = e.getValue() + .get(Constants.MANDATORY_DIRECTIVE); + if (mandatory != null) { +- Set missing = new HashSet<>(split(mandatory)); ++ Set missing = new TreeSet<>(split(mandatory)); + missing.removeAll(e.getValue() + .keySet()); + if (!missing.isEmpty()) { diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/eclipse/EclipseClasspath.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/eclipse/EclipseClasspath.java index 3f9a2be9..2daf737c 100644 --- a/biz.aQute.bndlib/src/aQute/bnd/osgi/eclipse/EclipseClasspath.java @@ -284,6 +588,71 @@ index 3f9a2be9..2daf737c 100644 public final static int DO_VARIABLES = 1; +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/BaseRepository.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/BaseRepository.java +index c4853157..f334a26e 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/BaseRepository.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/BaseRepository.java +@@ -3,11 +3,11 @@ package aQute.bnd.osgi.repository; + import java.util.ArrayList; + import java.util.Collection; + import java.util.Collections; +-import java.util.HashSet; + import java.util.Iterator; + import java.util.List; + import java.util.Map; + import java.util.Set; ++import java.util.TreeSet; + + import org.osgi.resource.Capability; + import org.osgi.resource.Requirement; +@@ -42,7 +42,7 @@ public abstract class BaseRepository implements Repository { + + @Override + public Promise> findProviders(RequirementExpression expression) { +- Set providers = new HashSet<>(); ++ Set providers = new TreeSet<>(); + + dispatch(expression, providers); + +@@ -72,7 +72,7 @@ public abstract class BaseRepository implements Repository { + return; + } + +- Set subset = new HashSet<>(); ++ Set subset = new TreeSet<>(); + dispatch(requirementExpressions.get(0), subset); + + for (int i = 1; i < requirementExpressions.size(); i++) { +@@ -93,7 +93,7 @@ public abstract class BaseRepository implements Repository { + } + providers.addAll(subset); + } else if (expression instanceof NotExpression) { +- Set allSet = new HashSet<>(); ++ Set allSet = new TreeSet<>(); + dispatch(all, allSet); + RequirementExpression re = ((NotExpression) expression).getRequirementExpression(); + for (Iterator it = allSet.iterator(); it.hasNext();) { +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/BridgeRepository.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/BridgeRepository.java +index e5356c59..39e9b55f 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/BridgeRepository.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/BridgeRepository.java +@@ -4,7 +4,6 @@ import java.util.ArrayList; + import java.util.Collection; + import java.util.Collections; + import java.util.HashMap; +-import java.util.HashSet; + import java.util.List; + import java.util.Map; + import java.util.Set; +@@ -196,7 +195,7 @@ public class BridgeRepository { + + public BridgeRepository(Repository repository) { + this.repository = repository; +- Set resources = new HashSet<>(); ++ Set resources = new TreeSet<>(); + find(resources, allIdentity); + find(resources, allBndInfo); + resources.forEach(this::index); diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/ResourcesRepository.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/ResourcesRepository.java index 4cf286bc..8ef64202 100644 --- a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/ResourcesRepository.java @@ -334,6 +703,110 @@ index 9ac735f6..6e022641 100644 private Path base; private boolean compress = false; private String name; +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/XMLResourceGenerator.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/XMLResourceGenerator.java +index 08398185..5928ea97 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/XMLResourceGenerator.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/XMLResourceGenerator.java +@@ -28,11 +28,11 @@ import java.net.URISyntaxException; + import java.nio.charset.StandardCharsets; + import java.util.Collection; + import java.util.Collections; +-import java.util.HashSet; + import java.util.List; + import java.util.Map; + import java.util.Objects; + import java.util.Set; ++import java.util.TreeSet; + import java.util.zip.GZIPOutputStream; + + import org.osgi.resource.Capability; +@@ -55,7 +55,7 @@ import aQute.lib.tag.Tag; + public class XMLResourceGenerator { + + private Tag repository = new Tag(TAG_REPOSITORY); +- private Set visited = new HashSet<>(); ++ private Set visited = new TreeSet<>(); + private int indent = 0; + private boolean compress = false; + private URI base; +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/XMLResourceParser.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/XMLResourceParser.java +index a45738d7..50701ae9 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/XMLResourceParser.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/XMLResourceParser.java +@@ -22,9 +22,9 @@ import java.io.IOException; + import java.io.InputStream; + import java.net.URI; + import java.util.ArrayList; +-import java.util.HashSet; + import java.util.List; + import java.util.Set; ++import java.util.TreeSet; + + import javax.xml.stream.XMLInputFactory; + import javax.xml.stream.XMLStreamConstants; +@@ -94,7 +94,7 @@ public class XMLResourceParser extends Processor { + } + + public XMLResourceParser(InputStream in, String what, URI uri) throws Exception { +- this(in, what, 100, new HashSet<>(), uri); ++ this(in, what, 100, new TreeSet<>(), uri); + } + + public void setDepth(int n) { +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/CapReqBuilder.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/CapReqBuilder.java +index f556954d..9d508c3d 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/CapReqBuilder.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/CapReqBuilder.java +@@ -6,12 +6,12 @@ import static java.util.stream.Collectors.toList; + import java.lang.reflect.Array; + import java.util.ArrayList; + import java.util.Collection; +-import java.util.HashMap; + import java.util.List; + import java.util.Map; + import java.util.Map.Entry; + import java.util.Objects; + import java.util.Optional; ++import java.util.TreeMap; + + import org.osgi.framework.Constants; + import org.osgi.framework.Version; +@@ -49,8 +49,8 @@ public class CapReqBuilder { + + private final String namespace; + private Resource resource; +- private final Map attributes = new HashMap<>(); +- private final Map directives = new HashMap<>(); ++ private final Map attributes = new TreeMap<>(); ++ private final Map directives = new TreeMap<>(); + + public CapReqBuilder(String namespace) { + this.namespace = requireNonNull(namespace); +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/PersistentResource.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/PersistentResource.java +index 89a82456..b0566f08 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/PersistentResource.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/PersistentResource.java +@@ -3,10 +3,10 @@ package aQute.bnd.osgi.resource; + import java.lang.reflect.Array; + import java.util.Arrays; + import java.util.Collection; +-import java.util.HashSet; + import java.util.List; + import java.util.Map; + import java.util.Set; ++import java.util.TreeSet; + import java.util.stream.Stream; + + import org.osgi.framework.Version; +@@ -125,7 +125,7 @@ public class PersistentResource extends DTO implements Resource { + for (Requirement req : resource.getRequirements(null)) + reqMap.add(req.getNamespace(), req); + +- Set names = new HashSet<>(capMap.keySet()); ++ Set names = new TreeSet<>(capMap.keySet()); + names.addAll(reqMap.keySet()); + + namespaces = new Namespace[names.size()]; diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceBuilder.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceBuilder.java index ebb8463a..e624009c 100644 --- a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceBuilder.java From bdc5aeea2d2246034162415bba3c6b012cd43f46c18de9d880f496ab49cc2b4f Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Sun, 17 Sep 2023 19:12:13 +0000 Subject: [PATCH 6/9] OBS-URL: https://build.opensuse.org/package/show/Java:packages/aqute-bnd?expand=0&rev=35 --- reproducible-element-order.patch | 54 -------------------------------- 1 file changed, 54 deletions(-) diff --git a/reproducible-element-order.patch b/reproducible-element-order.patch index f57db37..f4f82a0 100644 --- a/reproducible-element-order.patch +++ b/reproducible-element-order.patch @@ -290,31 +290,6 @@ index b97251b5..a3f8644f 100644 return hierarchyStream(analyzer) // .flatMap(c -> c.typeStream(analyzer, Clazz::annotations, visited)) .map(TypeRef::getFQN) -diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Contracts.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Contracts.java -index d6ab2fd0..4824c91a 100644 ---- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Contracts.java -+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Contracts.java -@@ -4,10 +4,10 @@ import static aQute.bnd.osgi.Constants.DUPLICATE_MARKER; - - import java.util.Collection; - import java.util.Formatter; --import java.util.HashSet; - import java.util.List; - import java.util.Map.Entry; - import java.util.Set; -+import java.util.TreeSet; - - import org.osgi.namespace.contract.ContractNamespace; - import org.osgi.resource.Namespace; -@@ -36,7 +36,7 @@ class Contracts { - Contract.class, true); - private MultiMap, PackageRef> overlappingContracts = new MultiMap<>(); - private Instructions instructions; -- private final Set contracts = new HashSet<>(); -+ private final Set contracts = new TreeSet<>(); - - public class Contract { - public String name; diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Jar.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Jar.java index 3576bd87..d86ce7c1 100644 --- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Jar.java @@ -753,35 +728,6 @@ index a45738d7..50701ae9 100644 } public void setDepth(int n) { -diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/CapReqBuilder.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/CapReqBuilder.java -index f556954d..9d508c3d 100644 ---- a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/CapReqBuilder.java -+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/CapReqBuilder.java -@@ -6,12 +6,12 @@ import static java.util.stream.Collectors.toList; - import java.lang.reflect.Array; - import java.util.ArrayList; - import java.util.Collection; --import java.util.HashMap; - import java.util.List; - import java.util.Map; - import java.util.Map.Entry; - import java.util.Objects; - import java.util.Optional; -+import java.util.TreeMap; - - import org.osgi.framework.Constants; - import org.osgi.framework.Version; -@@ -49,8 +49,8 @@ public class CapReqBuilder { - - private final String namespace; - private Resource resource; -- private final Map attributes = new HashMap<>(); -- private final Map directives = new HashMap<>(); -+ private final Map attributes = new TreeMap<>(); -+ private final Map directives = new TreeMap<>(); - - public CapReqBuilder(String namespace) { - this.namespace = requireNonNull(namespace); diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/PersistentResource.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/PersistentResource.java index 89a82456..b0566f08 100644 --- a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/PersistentResource.java From 0e3dae4810a27ea1f7b72fa0f74b847cdc2b9aa7564f7a8101c25794013718c3 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Mon, 18 Sep 2023 06:12:46 +0000 Subject: [PATCH 7/9] Accepting request 1111849 from home:fstrba:branches:Java:packages 6.3.1 OBS-URL: https://build.opensuse.org/request/show/1111849 OBS-URL: https://build.opensuse.org/package/show/Java:packages/aqute-bnd?expand=0&rev=36 --- 0001-Disable-removed-commands.patch | 43 +- ...0.0.patch => 0002-Port-to-OSGI-7.0.0.patch | 0 0003-Remove-unmet-dependencies.patch | 1403 +++++++++++++++++ 0004-maven-plugin-dependencies.patch | 116 -- _service | 4 +- aQute.libg-5.2.0.pom => aQute.libg-6.3.1.pom | 36 +- aqute-bnd.changes | 23 +- aqute-bnd.spec | 162 +- ...e.bnd-5.2.0.pom => biz.aQute.bnd-6.3.1.pom | 72 +- ....pom => biz.aQute.bnd.annotation-6.3.1.pom | 14 +- ...t-5.2.0.pom => biz.aQute.bnd.ant-6.3.1.pom | 18 +- ...0.pom => biz.aQute.bnd.exporters-6.3.1.pom | 14 +- biz.aQute.bnd.util-6.3.1.pom | 74 + ...ib-5.2.0.pom => biz.aQute.bndlib-6.3.1.pom | 50 +- bnd-5.2.0-build_xml.tar.xz | 3 - bnd-5.2.0.tar.xz | 3 - bnd-6.3.1-build_xml.tar.xz | 3 + bnd-6.3.1.tar.xz | 3 + bnd-maven-plugin.changes | 23 +- bnd-maven-plugin.spec | 45 +- reproducible-element-order.patch | 794 ---------- reproducible-packages-list.patch | 29 + reproducible-timestamps.patch | 8 +- 23 files changed, 1843 insertions(+), 1097 deletions(-) rename 0003-Port-to-OSGI-7.0.0.patch => 0002-Port-to-OSGI-7.0.0.patch (100%) create mode 100644 0003-Remove-unmet-dependencies.patch delete mode 100644 0004-maven-plugin-dependencies.patch rename aQute.libg-5.2.0.pom => aQute.libg-6.3.1.pom (84%) rename biz.aQute.bnd-5.2.0.pom => biz.aQute.bnd-6.3.1.pom (72%) rename biz.aQute.bnd.annotation-5.2.0.pom => biz.aQute.bnd.annotation-6.3.1.pom (93%) rename biz.aQute.bnd.ant-5.2.0.pom => biz.aQute.bnd.ant-6.3.1.pom (89%) rename biz.aQute.bnd.exporters-5.2.0.pom => biz.aQute.bnd.exporters-6.3.1.pom (91%) create mode 100644 biz.aQute.bnd.util-6.3.1.pom rename biz.aQute.bndlib-5.2.0.pom => biz.aQute.bndlib-6.3.1.pom (78%) delete mode 100644 bnd-5.2.0-build_xml.tar.xz delete mode 100644 bnd-5.2.0.tar.xz create mode 100644 bnd-6.3.1-build_xml.tar.xz create mode 100644 bnd-6.3.1.tar.xz delete mode 100644 reproducible-element-order.patch create mode 100644 reproducible-packages-list.patch diff --git a/0001-Disable-removed-commands.patch b/0001-Disable-removed-commands.patch index 533ce6f..86f074c 100644 --- a/0001-Disable-removed-commands.patch +++ b/0001-Disable-removed-commands.patch @@ -1,18 +1,20 @@ -diff -Napur bnd-5.1.1.REL.orig/biz.aQute.bnd/src/aQute/bnd/main/bnd.java bnd-5.1.1.REL/biz.aQute.bnd/src/aQute/bnd/main/bnd.java ---- bnd-5.1.1.REL.orig/biz.aQute.bnd/src/aQute/bnd/main/bnd.java 2020-06-16 23:03:04.000000000 +0200 -+++ bnd-5.1.1.REL/biz.aQute.bnd/src/aQute/bnd/main/bnd.java 2021-02-17 12:56:39.434022335 +0100 -@@ -104,7 +104,6 @@ import aQute.bnd.osgi.Resource; +diff --git a/biz.aQute.bnd/src/aQute/bnd/main/bnd.java b/biz.aQute.bnd/src/aQute/bnd/main/bnd.java +index a787c32..fc241a2 100644 +--- a/biz.aQute.bnd/src/aQute/bnd/main/bnd.java ++++ b/biz.aQute.bnd/src/aQute/bnd/main/bnd.java +@@ -110,7 +110,6 @@ import aQute.bnd.osgi.Resource; import aQute.bnd.osgi.Verifier; import aQute.bnd.osgi.eclipse.EclipseClasspath; import aQute.bnd.print.JarPrinter; -import aQute.bnd.repository.maven.provider.NexusCommand; + import aQute.bnd.result.Result; import aQute.bnd.service.Actionable; import aQute.bnd.service.RepositoryPlugin; - import aQute.bnd.service.action.Action; -@@ -3905,54 +3904,6 @@ public class bnd extends Processor { +@@ -3921,54 +3920,6 @@ public class bnd extends Processor { + getInfo(profiles); } - /** +- /** - * Resolve command - * - * @throws Exception @@ -60,11 +62,26 @@ diff -Napur bnd-5.1.1.REL.orig/biz.aQute.bnd/src/aQute/bnd/main/bnd.java bnd-5.1 - rc.close(); - } - -- /** + /** * Export a bndrun file */ - interface ExportOptions extends ProjectWorkspaceOptions { -@@ -4462,24 +4413,6 @@ public class bnd extends Processor { +@@ -4424,15 +4375,6 @@ public class bnd extends Processor { + } + } + +- @Description("Start an interactive shell") +- public void _shell(Shell.ShellOptions options) throws Exception { +- try (Shell shell = new Shell(this, options)) { +- shell.loop(); +- } finally { +- out.println("done"); +- } +- } +- + public Workspace getWorkspace() { + return workspace; + } +@@ -4479,24 +4421,6 @@ public class bnd extends Processor { } @@ -86,6 +103,6 @@ diff -Napur bnd-5.1.1.REL.orig/biz.aQute.bnd/src/aQute/bnd/main/bnd.java bnd-5.1 - getInfo(c); - } - - @Description("Generate source code") - interface GenerateOptions extends ProjectWorkspaceOptions { - + @Description("Shows the differences between two XML resource repositories") + public void _xmlrepodiff(XmlRepoDiffOptions options) throws Exception { + try (XmlRepoDiffCommand cmd = new XmlRepoDiffCommand(this)) { diff --git a/0003-Port-to-OSGI-7.0.0.patch b/0002-Port-to-OSGI-7.0.0.patch similarity index 100% rename from 0003-Port-to-OSGI-7.0.0.patch rename to 0002-Port-to-OSGI-7.0.0.patch diff --git a/0003-Remove-unmet-dependencies.patch b/0003-Remove-unmet-dependencies.patch new file mode 100644 index 0000000..b759576 --- /dev/null +++ b/0003-Remove-unmet-dependencies.patch @@ -0,0 +1,1403 @@ +From d1702cae9e19a8b9dc2ad538777e51a0680cc605 Mon Sep 17 00:00:00 2001 +From: Marian Koncek +Date: Fri, 24 Jun 2022 14:55:51 +0200 +Subject: [PATCH] Remove unmet dependencies + +--- + .../src/aQute/lib/bundles/BundleIdentity.java | 65 -- + .../startlevel/StartLevelRuntimeHandler.java | 305 --------- + aQute.libg/src/aQute/libg/dtos/DTOMap.java | 143 ---- + aQute.libg/src/aQute/libg/dtos/DTOs.java | 211 ------ + aQute.libg/src/aQute/libg/dtos/DTOsImpl.java | 615 ------------------ + .../src/aQute/bnd/build/ProjectLauncher.java | 1 - + 6 files changed, 1340 deletions(-) + delete mode 100644 aQute.libg/src/aQute/lib/bundles/BundleIdentity.java + delete mode 100644 aQute.libg/src/aQute/lib/startlevel/StartLevelRuntimeHandler.java + delete mode 100644 aQute.libg/src/aQute/libg/dtos/DTOMap.java + delete mode 100644 aQute.libg/src/aQute/libg/dtos/DTOs.java + delete mode 100644 aQute.libg/src/aQute/libg/dtos/DTOsImpl.java + +diff --git a/aQute.libg/src/aQute/lib/bundles/BundleIdentity.java b/aQute.libg/src/aQute/lib/bundles/BundleIdentity.java +deleted file mode 100644 +index dfd4b6a..0000000 +--- a/aQute.libg/src/aQute/lib/bundles/BundleIdentity.java ++++ /dev/null +@@ -1,65 +0,0 @@ +-package aQute.lib.bundles; +- +-import java.util.Map; +-import java.util.Objects; +- +-import org.osgi.framework.Bundle; +-import org.osgi.framework.Version; +-import org.osgi.framework.dto.BundleDTO; +- +-public class BundleIdentity { +- final String bsn; +- final Version version; +- +- public BundleIdentity(String bsn, Version version) { +- Objects.requireNonNull(bsn, "bsn must be specified"); +- this.bsn = bsn; +- this.version = version == null ? Version.emptyVersion : version; +- } +- +- public BundleIdentity(Bundle bundle) { +- this(bundle.getSymbolicName(), bundle.getVersion()); +- } +- +- public BundleIdentity(BundleDTO bundle) { +- this(bundle.symbolicName, bundle.version); +- } +- +- public BundleIdentity(String bsn, String version) { +- this(bsn, version == null ? null : Version.parseVersion(version)); +- } +- +- public BundleIdentity(Map.Entry entry) { +- this(entry.getKey(), entry.getValue()); +- } +- +- public String getBundleSymbolicName() { +- return bsn; +- } +- +- public Version getVersion() { +- return version; +- } +- +- @Override +- public int hashCode() { +- return Objects.hash(bsn, version); +- } +- +- @Override +- public boolean equals(Object obj) { +- if (this == obj) +- return true; +- if (obj == null) +- return false; +- if (getClass() != obj.getClass()) +- return false; +- BundleIdentity other = (BundleIdentity) obj; +- return Objects.equals(bsn, other.bsn) && Objects.equals(version, other.version); +- } +- +- @Override +- public String toString() { +- return bsn + "-" + version; +- } +-} +diff --git a/aQute.libg/src/aQute/lib/startlevel/StartLevelRuntimeHandler.java b/aQute.libg/src/aQute/lib/startlevel/StartLevelRuntimeHandler.java +deleted file mode 100644 +index e32c255..0000000 +--- a/aQute.libg/src/aQute/lib/startlevel/StartLevelRuntimeHandler.java ++++ /dev/null +@@ -1,305 +0,0 @@ +-package aQute.lib.startlevel; +- +-import java.io.Closeable; +-import java.util.HashMap; +-import java.util.Map; +-import java.util.Properties; +-import java.util.concurrent.CountDownLatch; +- +-import org.osgi.framework.Bundle; +-import org.osgi.framework.BundleEvent; +-import org.osgi.framework.Constants; +-import org.osgi.framework.FrameworkListener; +-import org.osgi.framework.SynchronousBundleListener; +-import org.osgi.framework.launch.Framework; +-import org.osgi.framework.startlevel.BundleStartLevel; +-import org.osgi.framework.startlevel.FrameworkStartLevel; +- +-import aQute.lib.bundles.BundleIdentity; +-import aQute.libg.parameters.ParameterMap; +- +-/** +- * Support to handle start levels in a launcher. This code is related to code in +- * the Project Launcher. It is in aQute.lib so it can be included easily in the +- * Launcher, the Remote launcher, and Launchpad. +- *

+- * This class is not threadsafe! +- */ +-public class StartLevelRuntimeHandler implements Closeable { +- +- /** +- * If this property is set we take on start levels, if this property is not +- * set we ignore the startlevels completely. This is defined in +- * aQute.bnd.osgi.Constants +- */ +- public static String LAUNCH_STARTLEVEL_DEFAULT = "launch.startlevel.default"; +- public static String LAUNCH_RUNBUNDLES_ATTRS = "launch.runbundles.attrs"; +- +- /** +- * Indicate if this class supports start levels or not. +- * +- * @return true if this class supports startlevels +- */ +- public boolean hasStartLevels() { +- return false; +- } +- +- /** +- * Set the start level of a bundle +- * +- * @param b the bundle +- */ +- public void setStartLevel(Bundle b) {} +- +- /** +- * Answer the current framework start level +- * +- * @param framework the framework +- * @return the current start level of the framework +- */ +- public int getFrameworkStartLevel(Framework framework) { +- return framework.adapt(FrameworkStartLevel.class) +- .getStartLevel(); +- } +- +- /** +- * Set the default start level of newly installed bundles +- * +- * @param framework the framework +- * @param level the default start level +- */ +- public void setDefaultStartlevel(Framework framework, int level) { +- framework.adapt(FrameworkStartLevel.class) +- .setInitialBundleStartLevel(level); +- } +- +- /** +- * Set the framework start level and return previous +- * +- * @param framework the framework +- * @param startlevel the start level to set +- * @param ls listeners +- * @return the previous start level of the framework +- */ +- public int setFrameworkStartLevel(Framework framework, int startlevel, FrameworkListener... ls) { +- int previous = getFrameworkStartLevel(framework); +- framework.adapt(FrameworkStartLevel.class) +- .setStartLevel(startlevel, ls); +- return previous; +- } +- +- /** +- * Get a bundle's start level +- * +- * @param bundle the bundle to query +- * @return the start level > 0 +- */ +- public int getBundleStartLevel(Bundle bundle) { +- return bundle.adapt(BundleStartLevel.class) +- .getStartLevel(); +- } +- +- /** +- * Set a bundle's start level +- * +- * @param bundle the bundle to query +- * @param startlevel start level to set, > 0 +- */ +- public void setBundleStartLevel(Bundle bundle, int startlevel) { +- bundle.adapt(BundleStartLevel.class) +- .setStartLevel(startlevel); +- } +- +- /** +- * Must be called before the framework is started. +- *

+- * ensure systemBundle.getState() == INIT and startlevel systemBundle == 0 +- * +- * @param systemBundle the framework +- */ +- public void beforeStart(Framework systemBundle) {} +- +- /** +- * When the configuration properties have been updated +- * +- * @param configuration the configuration properties +- */ +- public void updateConfiguration(Map configuration) {} +- +- /** +- * Called after the framework is started and the launcher is ready +- */ +- public void afterStart() {} +- +- /** +- * Wait for the framework to reach its start level. Must be called after the +- * {@link #afterStart()} method. Will return when the framework has +- * traversed all start levels. +- */ +- public void sync() {} +- +- /** +- * Close this object +- */ +- +- @Override +- public void close() {} +- +- /** +- * Create a start level handler. If the {@link #LAUNCH_STARTLEVEL_DEFAULT} +- * property is set we create an active handler that will direct the +- * framework properly according to the settings in Project Launcher. If not +- * set, a dummy is returned that does not do anything +- * +- * @param outerConfiguration the properties as set by the Project Launcher +- * @return an active or dummy {@link StartLevelRuntimeHandler} +- */ +- static public StartLevelRuntimeHandler create(Trace logger, Map outerConfiguration) { +- +- String defaultStartlevelString = outerConfiguration.get(LAUNCH_STARTLEVEL_DEFAULT); +- if (defaultStartlevelString == null) { +- logger.trace("startlevel: not handled"); +- return absent(); +- } +- +- int defaultStartlevel = toInt(defaultStartlevelString, 1); +- int beginningStartlevel = toInt(outerConfiguration.get(Constants.FRAMEWORK_BEGINNING_STARTLEVEL), 1); +- outerConfiguration.put(Constants.FRAMEWORK_BEGINNING_STARTLEVEL, "1"); +- +- logger.trace("startlevel: handled begin=%s default=%s", beginningStartlevel, defaultStartlevel); +- +- // +- // We need to remove it otherwise the framework reacts to it +- // +- +- return new StartLevelRuntimeHandler() { +- CountDownLatch latch = new CountDownLatch(1); +- private Framework systemBundle; +- private Map startlevels = new HashMap<>(); +- private Map installed = new HashMap<>(); +- +- @Override +- public void beforeStart(Framework systemBundle) { +- assert getFrameworkStartLevel( +- systemBundle) == 0 : "Expects the framework to be in init mode, not yet started"; +- +- this.systemBundle = systemBundle; +- +- for (Bundle bundle : systemBundle.getBundleContext() +- .getBundles()) { +- if (bundle.getBundleId() == 0) { +- continue; +- } +- if (bundle.getSymbolicName() == null) { +- continue; +- } +- installed.put(bundle, new BundleIdentity(bundle)); +- } +- +- updateConfiguration(outerConfiguration); +- +- setDefaultStartlevel(this.systemBundle, defaultStartlevel); +- +- systemBundle.getBundleContext() +- .addBundleListener((SynchronousBundleListener) event -> { +- Bundle bundle = event.getBundle(); +- if (bundle.getBundleId() == 0) +- return; +- +- if (bundle.getSymbolicName() == null) { +- logger.trace("Found bundle without a bsn %s, ignoring", bundle); +- return; +- } +- +- BundleIdentity id = installed.computeIfAbsent(bundle, BundleIdentity::new); +- if (event.getType() == BundleEvent.INSTALLED || event.getType() == BundleEvent.UPDATED) { +- setStartlevel(bundle, id); +- } else if (event.getType() == BundleEvent.UNINSTALLED) { +- installed.remove(bundle); +- } +- }); +- logger.trace("startlevel: default=%s, beginning=%s", defaultStartlevel, beginningStartlevel); +- +- } +- +- @Override +- public void afterStart() { +- setFrameworkStartLevel(systemBundle, beginningStartlevel, event -> { +- logger.trace("startlevel: notified reached final level %s : %s", beginningStartlevel, event); +- latch.countDown(); +- }); +- logger.trace("startlevel change begin: beginning level %s", beginningStartlevel); +- } +- +- @Override +- public void sync() { +- try { +- latch.await(); +- } catch (InterruptedException ie) { +- Thread.interrupted(); +- throw new RuntimeException(ie); +- } +- } +- +- @Override +- public boolean hasStartLevels() { +- return true; +- } +- +- @Override +- public void updateConfiguration(Map configuration) { +- new ParameterMap((String) configuration.get(LAUNCH_RUNBUNDLES_ATTRS)).entrySet() +- .forEach(entry -> { +- String bsn = ParameterMap.removeDuplicateMarker(entry.getKey()); +- String version = entry.getValue() +- .getVersion(); +- BundleIdentity id = new BundleIdentity(bsn, version); +- +- int startlevel = toInt(entry.getValue() +- .get("startlevel"), -1); +- if (startlevel > 0) { +- startlevels.put(id, startlevel); +- } +- }); +- +- installed.forEach(this::setStartlevel); +- } +- +- private void setStartlevel(Bundle bundle, BundleIdentity id) { +- if (bundle.getState() != Bundle.UNINSTALLED) { +- int level = startlevels.getOrDefault(id, -1); +- if (level == -1) +- level = defaultStartlevel; +- +- setBundleStartLevel(bundle, level); +- logger.trace("startlevel: %s <- %s", bundle, level); +- } +- } +- +- }; +- } +- +- static int toInt(Object object, int defltValue) { +- if (object == null) +- return defltValue; +- +- String s = object.toString() +- .trim(); +- try { +- return Integer.parseInt(s); +- } catch (NumberFormatException nfe) { +- return defltValue; +- } +- } +- +- public static StartLevelRuntimeHandler absent() { +- return new StartLevelRuntimeHandler() {}; +- } +- +- @SuppressWarnings({ +- "rawtypes", "unchecked" +- }) +- public static StartLevelRuntimeHandler create(Trace reporter, Properties properties) { +- return create(reporter, (Map) properties); +- } +-} +diff --git a/aQute.libg/src/aQute/libg/dtos/DTOMap.java b/aQute.libg/src/aQute/libg/dtos/DTOMap.java +deleted file mode 100644 +index f927de5..0000000 +--- a/aQute.libg/src/aQute/libg/dtos/DTOMap.java ++++ /dev/null +@@ -1,143 +0,0 @@ +-package aQute.libg.dtos; +- +-import java.lang.reflect.Field; +-import java.util.AbstractMap; +-import java.util.AbstractSet; +-import java.util.Iterator; +-import java.util.Map; +-import java.util.Set; +- +-import org.osgi.dto.DTO; +- +-public class DTOMap extends AbstractMap { +- +- private final DTOsImpl dtos; +- private final Object dto; +- private final Field[] fields; +- +- public DTOMap(DTOsImpl dtos, Object dto) { +- this.dtos = dtos; +- this.dto = dto; +- this.fields = dtos.getFields(dto); +- } +- +- @Override +- public int size() { +- return fields.length; +- } +- +- @Override +- public boolean isEmpty() { +- return fields.length == 0; +- } +- +- @Override +- public boolean containsKey(Object key) { +- if (!(key instanceof String)) +- return false; +- +- return dtos.bsearch(fields, 0, fields.length, (String) key) >= 0; +- } +- +- @Override +- public boolean containsValue(Object value) { +- for (Field f : fields) { +- Object o; +- try { +- o = f.get(dto); +- +- if (o == value) +- return true; +- if (o == null) +- return false; +- +- return o.equals(value); +- } catch (IllegalArgumentException | IllegalAccessException e) { +- // Ignore since we only have public fields +- } +- } +- return false; +- } +- +- @Override +- public Object get(Object key) { +- try { +- if (!(key instanceof String)) +- return null; +- +- Field field = dtos.getField(fields, (String) key); +- if (field == null) +- return null; +- +- Object o = field.get(dto); +- if (o instanceof DTO) { +- return new DTOMap(dtos, o); +- } else +- return o; +- } catch (IllegalArgumentException | IllegalAccessException e) { +- // cannot happen +- return null; +- } +- } +- +- @Override +- public Set> entrySet() { +- return new AbstractSet>() { +- +- @Override +- public Iterator> iterator() { +- return new Iterator>() { +- int n = 0; +- +- @Override +- public boolean hasNext() { +- return n < fields.length; +- } +- +- @Override +- public java.util.Map.Entry next() { +- final Field field = fields[n]; +- n++; +- return new Map.Entry() { +- +- @Override +- public String getKey() { +- return field.getName(); +- } +- +- @Override +- public Object getValue() { +- try { +- return field.get(dto); +- } catch (IllegalArgumentException | IllegalAccessException e) { +- throw new RuntimeException(e); +- } +- } +- +- @Override +- public Object setValue(Object value) { +- try { +- Object old = field.get(dto); +- field.set(dto, value); +- return old; +- } catch (IllegalArgumentException | IllegalAccessException e) { +- throw new RuntimeException(e); +- } +- } +- }; +- } +- +- @Override +- public void remove() { +- throw new UnsupportedOperationException("A DTO map cannot remove entries"); +- } +- }; +- } +- +- @Override +- public int size() { +- return DTOMap.this.size(); +- } +- }; +- } +-} +diff --git a/aQute.libg/src/aQute/libg/dtos/DTOs.java b/aQute.libg/src/aQute/libg/dtos/DTOs.java +deleted file mode 100644 +index a8abdb1..0000000 +--- a/aQute.libg/src/aQute/libg/dtos/DTOs.java ++++ /dev/null +@@ -1,211 +0,0 @@ +-package aQute.libg.dtos; +- +-import java.util.List; +-import java.util.Map; +-import java.util.Optional; +- +-import org.osgi.annotation.versioning.ProviderType; +-import org.osgi.dto.DTO; +- +-/** +- * This interface provides a number of utilities to make it easy to work with +- * DTOs. It contains a number of utility functions. +- */ +-@ProviderType +-public interface DTOs { +- +- DTOs INSTANCE = new DTOsImpl(); +- +- /** +- * Return a partially read only Map object that maps directly to a DTO. I.e. +- * changes are reflected in the DTO. If a field is a DTO, then this field +- * will also become a Map. +- * +- * @param dto the DTO +- * @return a Map where the keys map to the field names and the values to the +- * field values. This map is not modifiable. +- */ +- Map asMap(Object dto); +- +- /** +- * Convert a DTO to a human readable string presentation. This is primarily +- * for debugging since the toString can truncate fields. This method must +- * print all public fields, also non primary. Output formats can vary (e.g. +- * YAML like) so the actual output should NOT be treated as standard. +- * +- * @param dto the dto to turn into a string +- * @return a human readable string (not json!) +- */ +- String toString(Object dto); +- +- /** +- * Check if two dtos fields are equal. This is shallow equal, that is the +- * fields of this DTO are using the equals() instance method. +- * +- * @param a the first object +- * @param b the second object +- * @return true if both are null or the DTO's primary fields are equal +- */ +- boolean equals(Object a, Object b); +- +- /** +- * Check if two DTOs fields are equal. This is deep equal, that is the +- * fields of this DTO are using this method is the object at a field is a +- * DTO, recursively. +- * +- * @param a the first object +- * @param b the second object +- * @return true if both are null or the DTO's primary fields are equal +- */ +- boolean deepEquals(Object a, Object b); +- +- /** +- * Calculate a hash Code for the fields in this DTO. The dto must have at +- * least one public field. +- * +- * @param dto the object to calculate the hashcode for, must not be null . +- * @return a hashcode +- */ +- int hashCode(Object dto); +- +- /** +- * Access a DTO with a path. A path is a '.' separated string. Each part in +- * the path is either a field name, key in a map, or an index in a list. If +- * the path segments contain dots or backslashes, then these must be escaped +- * +- * @param dto the root +- * @param path the path, should only contain dots as separators +- * @return the value of the object or empty if not found. +- */ +- +- Optional get(Object dto, String path); +- +- /** +- * Access a DTO with a path that consists of an array with segments. Each +- * segment in the path is either a field name, key in a map, or an index in +- * a list. +- * +- * @param dto the root +- * @param path the path +- * @return the value of the object or empty if not found. +- */ +- Optional get(Object dto, String... path); +- +- /** +- * Return a list of paths where the two objects differ. The objects must be +- * of the same class. +- * +- * @param older the older object +- * @param newer the newer object +- * @return A list of differences, if there is no difference, the list is +- * empty. +- */ +- List diff(Object older, Object newer); +- +- /** +- * The details of a difference +- */ +- class Difference extends DTO { +- /** +- * The path where there was a difference +- */ +- public String path[]; +- +- /** +- * The reason why there was a difference +- */ +- public Reason reason; +- } +- +- /** +- * The reason for a difference. +- */ +- enum Reason { +- UNEQUAL, +- REMOVED, +- ADDED, +- DIFFERENT_TYPES, +- SIZE, +- KEYS, +- NO_STRING_MAP, +- INVALID_KEY; +- } +- +- /** +- * Takes a path with escaped '.'and '\' and then turns it into an array of +- * unescaped keys +- * +- * @param path the path with escaped \ and . +- * @return a path array with unescaped segments +- */ +- String[] fromPathToSegments(String path); +- +- /** +- * Takes a path with unescaped keys and turns it into a string path where +- * the \ and . are escaped. +- * +- * @param segments The unescaped segments of the path +- * @return a string path where the . and \ are escaped. +- */ +- String fromSegmentsToPath(String[] segments); +- +- /** +- * Escape a string to be used in a path. This will put a backslash ('\') in +- * front of full stops ('.') and the backslash ('\'). +- * +- * @param unescaped the string to be escaped +- * @return a string where all '.' and '\' are escaped with a '\'. +- */ +- String escape(String unescaped); +- +- /** +- * Unescapes a string to be used in a path. This will remove a backslash +- * ('\') in front of full stops ('.') and the backslash ('\'). +- * +- * @param escaped the string to be unescaped +- * @return a string where all '\.' and '\\' have the preceding backslash +- * removed with a '\'. +- */ +- String unescape(String escaped); +- +- /** +- * Return true if the give dto is complex (either Map, Collection, Array, or +- * has public fields. +- * +- * @param object The DTO to check +- * @return true if this is a DTO with fields or length. +- */ +- +- boolean isComplex(Object object); +- +- /** +- * An object with public non-static non-synthetic fields. +- * +- * @param dto the object to check +- * @return true if this object has public fields or extends DTO +- */ +- boolean isDTO(Object dto); +- +- /** +- * Create a shallow copy of a DTO. This will create a new object of the same +- * type and copy the public fields of the source to the new copy. It will +- * not create a copy for these values. +- * +- * @param object the source object +- * @return a shallow copy of object +- */ +- +- T shallowCopy(T object); +- +- /** +- * Create a deep copy of a DTO. This will copy the fields of the DTO. Copied +- * values will also be created anew if they are complex (Map, Collection, +- * DTO, or Array). Other objects are assumed to be immutable unless they +- * implement Cloneable. +- * +- * @param object the object to deep copy +- * @return the deep copied object +- */ +- +- T deepCopy(T object); +-} +diff --git a/aQute.libg/src/aQute/libg/dtos/DTOsImpl.java b/aQute.libg/src/aQute/libg/dtos/DTOsImpl.java +deleted file mode 100644 +index 6de46b6..0000000 +--- a/aQute.libg/src/aQute/libg/dtos/DTOsImpl.java ++++ /dev/null +@@ -1,615 +0,0 @@ +-package aQute.libg.dtos; +- +-import java.lang.reflect.Array; +-import java.lang.reflect.Field; +-import java.lang.reflect.Modifier; +-import java.util.ArrayList; +-import java.util.Arrays; +-import java.util.Collection; +-import java.util.Collections; +-import java.util.Comparator; +-import java.util.Formatter; +-import java.util.List; +-import java.util.Map; +-import java.util.Map.Entry; +-import java.util.Optional; +-import java.util.WeakHashMap; +-import java.util.regex.Pattern; +- +-import org.osgi.dto.DTO; +-import org.slf4j.Logger; +-import org.slf4j.LoggerFactory; +- +-import aQute.bnd.exceptions.Exceptions; +- +-public class DTOsImpl implements DTOs { +- private final static Logger logger = LoggerFactory.getLogger(DTOsImpl.class); +- private final Field[] EMPTY_FIELDS = new Field[0]; +- private final Map, Field[]> cache = Collections +- .synchronizedMap(new WeakHashMap, Field[]>()); +- +- private final Link root = new Link(null, null, null); +- +- // +- // The link class is to keep track of cycles traversing and to +- // maintain the path at minimum cost. +- // +- +- static class Link { +- final Link prev; +- final Object object; +- final Object name; +- +- public Link(Link link, Object name, Object object) { +- this.prev = link; +- this.name = name; +- this.object = object; +- } +- +- boolean isCycle(Object t) { +- if (this.object == t) +- return true; +- else if (prev == null) +- return false; +- else +- return prev.isCycle(t); +- } +- +- String[] getPath(int n) { +- if (prev == null) { +- String[] path = new String[n]; +- return path; +- } +- String[] path = prev.getPath(n + 1); +- path[path.length - n - 1] = name.toString(); +- return path; +- } +- +- void verifyCycle(Object o) { +- if (isCycle(o)) { +- throw new IllegalArgumentException("Cycle in DTO " + Arrays.toString(getPath(0))); +- } +- } +- } +- +- static class Diff extends Difference { +- public Diff(Reason reason, Link link) { +- this.reason = reason; +- this.path = link.getPath(0); +- } +- } +- +- @Override +- public Map asMap(Object dto) { +- return new DTOMap(this, dto); +- } +- +- Field[] getFields(Object o) { +- if (o == null) +- return EMPTY_FIELDS; +- return getFields(o.getClass()); +- } +- +- Field[] getFields(Class c) { +- Field fields[] = cache.get(c); +- if (fields == null) { +- List publicFields = new ArrayList<>(); +- +- for (Field field : c.getFields()) { +- if (field.isEnumConstant() || field.isSynthetic() || Modifier.isStatic(field.getModifiers())) +- continue; +- publicFields.add(field); +- } +- Collections.sort(publicFields, new Comparator() { +- +- @Override +- public int compare(Field o1, Field o2) { +- return o1.getName() +- .compareTo(o2.getName()); +- } +- }); +- +- cache.put(c.getClass(), fields = publicFields.toArray(new Field[publicFields.size()])); +- } +- return fields; +- } +- +- int bsearch(Field[] a, int fromIndex, int toIndex, String key) { +- int low = fromIndex; +- int high = toIndex - 1; +- +- while (low <= high) { +- int mid = (low + high) >>> 1; +- Field midVal = a[mid]; +- int cmp = midVal.getName() +- .compareTo(key); +- if (cmp < 0) +- low = mid + 1; +- else if (cmp > 0) +- high = mid - 1; +- else +- return mid; // key found +- } +- return -(low + 1); // key not found. +- } +- +- Field getField(Field[] fields, String name) { +- int index = bsearch(fields, 0, fields.length, name); +- if (index < 0) +- return null; +- else +- return fields[index]; +- } +- +- /** +- * Shallow copy +- */ +- +- @SuppressWarnings({ +- "unchecked", "rawtypes" +- }) +- @Override +- public T shallowCopy(T source) { +- try { +- if (!isComplex(source)) +- return source; +- +- Class c = (Class) source.getClass(); +- +- if (c.isArray()) { +- int l = Array.getLength(source); +- T dest = (T) Array.newInstance(c.getComponentType(), l); +- System.arraycopy(source, 0, dest, 0, l); +- return dest; +- } +- +- T dest = c.newInstance(); +- +- if (source instanceof Map) { +- ((Map) dest).putAll((Map) source); +- return dest; +- } +- +- if (source instanceof Collection) { +- ((Collection) dest).addAll((Collection) source); +- return dest; +- } +- +- for (Field field : getFields(c)) { +- field.set(dest, field.get(source)); +- } +- return dest; +- } catch (Exception e) { +- throw Exceptions.duck(e); +- } +- } +- +- /** +- * Deep copy +- */ +- +- @Override +- public T deepCopy(T source) { +- return deepCopy(source, root); +- } +- +- @SuppressWarnings({ +- "unchecked", "rawtypes" +- }) +- T deepCopy(T source, Link link) { +- try { +- if (!isComplex(source)) +- return source; +- +- link.verifyCycle(source); +- +- Class c = (Class) source.getClass(); +- +- if (c.isArray()) { +- int l = Array.getLength(source); +- T dest = (T) Array.newInstance(c.getComponentType(), l); +- +- for (int i = 0; i < l; i++) { +- Object s = Array.get(source, i); +- Array.set(dest, i, deepCopy(s, new Link(link, i, source))); +- } +- return dest; +- } +- +- T dest = c.newInstance(); +- +- if (source instanceof Map) { +- Map d = (Map) dest; +- Map s = (Map) source; +- for (Entry entry : s.entrySet()) { +- Link next = new Link(link, entry.getKey(), source); +- d.put(deepCopy(entry.getKey(), next), deepCopy(entry.getValue(), next)); +- } +- return dest; +- } +- +- if (source instanceof Collection) { +- Collection s = (Collection) source; +- Collection d = (Collection) dest; +- int i = 0; +- for (Object o : s) { +- Link next = new Link(link, i++, source); +- d.add(deepCopy(o, next)); +- } +- return dest; +- } +- +- for (Field field : getFields(c)) { +- Link next = new Link(link, field.getName(), source); +- field.set(dest, deepCopy(field.get(source), next)); +- } +- return dest; +- } catch (Exception e) { +- throw Exceptions.duck(e); +- } +- +- } +- +- @Override +- public String[] fromPathToSegments(String path) { +- return fromPathToSegments(path, 0, 0); +- } +- +- String[] fromPathToSegments(String path, int start, int n) { +- if (start >= path.length()) { +- return new String[n]; +- } +- +- StringBuilder sb = new StringBuilder(); +- int i = start; +- outer: for (; i < path.length(); i++) { +- char c = path.charAt(i); +- switch (c) { +- +- case '.' : +- break outer; +- +- case '\\' : +- c = path.charAt(++i); +- assert c == '.' || c == '\\'; +- +- default : +- sb.append(c); +- break; +- } +- } +- String[] result = fromPathToSegments(path, i + 1, n + 1); +- result[n] = sb.toString(); +- return result; +- } +- +- @Override +- public String fromSegmentsToPath(String[] segments) { +- StringBuilder sb = new StringBuilder(); +- String del = ""; +- for (String segment : segments) { +- sb.append(del); +- for (int i = 0; i < segment.length(); i++) { +- char c = segment.charAt(i); +- switch (c) { +- case '\\' : +- case '.' : +- sb.append('\\'); +- +- // FALL THROUGH +- +- default : +- sb.append(c); +- break; +- } +- } +- del = "."; +- } +- return sb.toString(); +- } +- +- @Override +- public boolean deepEquals(Object a, Object b) { +- try { +- return diff(a, b).isEmpty(); +- } catch (Exception e) { +- throw Exceptions.duck(e); +- } +- } +- +- @Override +- public String toString(Object dto) { +- if (dto == null) +- return null + ""; +- +- Field[] fields = getFields(dto); +- if (fields.length == 0) +- return dto.toString(); +- +- try { +- try (Formatter format = new Formatter()) { +- for (Field f : fields) { +- format.format("%s: %s%n", f.getName(), f.get(dto)); +- } +- return format.toString(); +- } +- } catch (IllegalArgumentException | IllegalAccessException e) { +- throw new RuntimeException(e); +- } +- } +- +- @Override +- public boolean equals(Object a, Object b) { +- try { +- return diff(a, b).isEmpty(); +- } catch (Exception e) { +- return false; +- } +- } +- +- @Override +- public int hashCode(Object dto) { +- Field[] fields = getFields(dto); +- if (fields.length == 0) +- return dto.hashCode(); +- +- int prime = 31; +- int result = 1; +- try { +- +- for (Field f : fields) { +- Object a = f.get(this); +- result = prime * result + (a == null ? 0 : hashCode(dto)); +- } +- +- return result; +- } catch (Exception e) { +- return result; +- } +- } +- +- @Override +- public Optional get(Object dto, String path) { +- return get(dto, fromPathToSegments(path)); +- } +- +- @Override +- public Optional get(Object dto, String... path) { +- return get(dto, path, 0, path.length); +- } +- +- private Optional get(Object dto, String[] path, int i, int max) { +- try { +- if (i > path.length) +- throw new IllegalArgumentException("Incorrect index in path " + Arrays.toString(path) + "[" + i + "]"); +- +- if (i == path.length || i == max) +- return Optional.of(dto); +- +- if (dto == null) +- return Optional.empty(); +- +- String name = path[i]; +- +- if (dto.getClass() +- .isArray()) { +- int index = Integer.parseInt(name); +- if (index >= Array.getLength(dto)) +- throw new IllegalArgumentException( +- "path access contains an array but the corresponding index is not an integer: " +- + Arrays.toString(path) + "[" + i + "]"); +- +- return get(Array.get(dto, index), path, i + 1, max); +- } +- +- if (dto instanceof Collection) { +- Collection coll = (Collection) dto; +- int index = Integer.parseInt(name); +- if (index >= coll.size()) +- throw new IllegalArgumentException("path access contains a collection but the corresponding index is not an integer: " +- + Arrays.toString(path) + "[" + i + "]"); +- +- if (coll instanceof List) { +- return get(((List) coll).get(index), path, i + 1, max); +- } +- for (Object o : coll) { +- if (index-- == 0) +- return get(o, path, i + 1, max); +- } +- assert false; +- return null; // unreachable +- } +- +- if (dto instanceof Map) { +- Object value = ((Map) dto).get(name); +- return get(value, path, i + 1, max); +- } +- +- Field fields[] = getFields(dto); +- if (fields.length > 0) { +- for (Field field : fields) { +- if (field.getName() +- .equals(name)) { +- return get(field.get(dto), path, i + 1, max); +- } +- } +- } +- +- throw new IllegalArgumentException("Unknown type to traverse " + dto.getClass() + " for " + name); +- } catch (Exception e) { +- throw Exceptions.duck(e); +- } +- } +- +- @Override +- public List diff(Object older, final Object newer) { +- List diffs = new ArrayList<>(); +- diff(diffs, root, older, newer); +- return diffs; +- } +- +- private boolean diff(List diffs, Link link, Object older, Object newer) { +- try { +- if (older == newer) +- return false; +- +- if (older == null) { +- diffs.add(new Diff(Reason.ADDED, link)); +- return true; +- } +- +- if (newer == null) { +- diffs.add(new Diff(Reason.REMOVED, link)); +- return true; +- } +- +- Class oc = older.getClass(); +- Class nc = newer.getClass(); +- if (oc != nc) { +- diffs.add(new Diff(Reason.DIFFERENT_TYPES, link)); +- return true; +- } +- +- if (older.equals(newer)) +- return true; +- +- if (older instanceof Collection) { +- Collection co = (Collection) older; +- Collection cn = (Collection) newer; +- +- if (co.size() != cn.size()) { +- diffs.add(new Diff(Reason.SIZE, link)); +- return true; +- } +- +- if (co.equals(cn)) +- return false; +- +- // +- // They're different, if it is a list we can find out which +- // +- +- if (older instanceof List) { +- List clo = (List) older; +- List cln = (List) newer; +- +- for (int i = 0; i < co.size(); i++) { +- Object lo = clo.get(i); +- Object ln = cln.get(i); +- diff(diffs, new Link(link, i, older), lo, ln); +- } +- return true; +- } +- +- // +- // If not a list, we're lost ... +- // +- +- diffs.add(new Diff(Reason.UNEQUAL, link)); +- return true; +- } +- +- if (oc.isArray()) { +- Object[] ao = new Object[] { +- older +- }; +- Object[] an = new Object[] { +- newer +- }; +- if (Arrays.deepEquals(ao, an)) { +- return false; +- } +- +- int lo = Array.getLength(older); +- int ln = Array.getLength(newer); +- if (lo != ln) { +- diffs.add(new Diff(Reason.SIZE, link)); +- return true; +- } +- +- for (int i = 0; i < lo; i++) { +- diff(diffs, new Link(link, i, older), Array.get(older, i), Array.get(newer, i)); +- } +- return true; +- } +- +- if (older instanceof Map) { +- Map co = (Map) older; +- Map cn = (Map) newer; +- +- if (co.size() != cn.size()) { +- diffs.add(new Diff(Reason.SIZE, link)); +- return true; +- } +- +- if (co.equals(cn)) +- return false; +- +- if (!co.keySet() +- .equals(cn.keySet())) { +- diffs.add(new Diff(Reason.KEYS, link)); +- return true; +- } +- +- for (Map.Entry e : co.entrySet()) { +- Object key = e.getKey(); +- if (!(key instanceof String)) { +- diffs.add(new Diff(Reason.NO_STRING_MAP, link)); +- return true; +- } +- +- String k = escape((String) key); +- +- Object no = co.get(key); +- Object nn = cn.get(key); +- +- diff(diffs, new Link(link, k, older), no, nn); +- } +- return true; +- } +- +- Field[] fields = getFields(older); +- if (fields.length > 0) { +- for (Field field : fields) { +- Object o = field.get(older); +- Object n = field.get(newer); +- diff(diffs, new Link(link, field.getName(), older), o, n); +- } +- return true; +- } +- +- diffs.add(new Diff(Reason.UNEQUAL, link)); +- return true; +- } catch (Exception e) { +- logger.warn("failed to diff %s to %s : %s", older, newer, e.getMessage(), e); +- throw Exceptions.duck(e); +- } +- } +- +- static Pattern ESCAPE_P = Pattern.compile("(\\.|\\\\)"); +- static Pattern UNESCAPE_P = Pattern.compile("\\\\(\\.|\\\\)"); +- +- @Override +- public String escape(String unescaped) { +- return ESCAPE_P.matcher(unescaped) +- .replaceAll("\\\\$1"); +- } +- +- @Override +- public String unescape(String unescaped) { +- return UNESCAPE_P.matcher(unescaped) +- .replaceAll("$1"); +- } +- +- @Override +- public boolean isComplex(Object a) { +- return a != null && (a instanceof Map || a instanceof Collection || a instanceof DTO || a.getClass() +- .isArray() || getFields(a).length > 0); +- } +- +- @Override +- public boolean isDTO(Object o) { +- return getFields(o).length != 0; +- } +- +-} +diff --git a/biz.aQute.bndlib/src/aQute/bnd/build/ProjectLauncher.java b/biz.aQute.bndlib/src/aQute/bnd/build/ProjectLauncher.java +index e1ce42f..c1a3d87 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/build/ProjectLauncher.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/build/ProjectLauncher.java +@@ -43,7 +43,6 @@ import aQute.bnd.osgi.Processor; + import aQute.bnd.osgi.Verifier; + import aQute.bnd.service.Strategy; + import aQute.lib.io.IO; +-import aQute.lib.startlevel.StartLevelRuntimeHandler; + import aQute.lib.strings.Strings; + import aQute.lib.watcher.FileWatcher; + import aQute.lib.watcher.FileWatcher.Builder; +-- +2.37.2 + diff --git a/0004-maven-plugin-dependencies.patch b/0004-maven-plugin-dependencies.patch deleted file mode 100644 index d0d5006..0000000 --- a/0004-maven-plugin-dependencies.patch +++ /dev/null @@ -1,116 +0,0 @@ -diff -Natur bnd-5.1.1.REL-orig/maven/bnd-maven-plugin/src/main/java/aQute/bnd/maven/plugin/AbstractBndMavenPlugin.java bnd-5.1.1.REL/maven/bnd-maven-plugin/src/main/java/aQute/bnd/maven/plugin/AbstractBndMavenPlugin.java ---- bnd-5.1.1.REL-orig/maven/bnd-maven-plugin/src/main/java/aQute/bnd/maven/plugin/AbstractBndMavenPlugin.java 2020-06-16 23:03:04.000000000 +0200 -+++ bnd-5.1.1.REL/maven/bnd-maven-plugin/src/main/java/aQute/bnd/maven/plugin/AbstractBndMavenPlugin.java 2021-10-17 22:35:26.583884078 +0200 -@@ -56,7 +56,6 @@ - - import aQute.bnd.build.Project; - import aQute.bnd.header.OSGiHeader; --import aQute.bnd.maven.lib.configuration.BeanProperties; - import aQute.bnd.osgi.Builder; - import aQute.bnd.osgi.Constants; - import aQute.bnd.osgi.FileResource; -diff -Natur bnd-5.1.1.REL-orig/maven/bnd-maven-plugin/src/main/java/aQute/bnd/maven/plugin/BeanProperties.java bnd-5.1.1.REL/maven/bnd-maven-plugin/src/main/java/aQute/bnd/maven/plugin/BeanProperties.java ---- bnd-5.1.1.REL-orig/maven/bnd-maven-plugin/src/main/java/aQute/bnd/maven/plugin/BeanProperties.java 1970-01-01 01:00:00.000000000 +0100 -+++ bnd-5.1.1.REL/maven/bnd-maven-plugin/src/main/java/aQute/bnd/maven/plugin/BeanProperties.java 2021-10-17 22:35:31.151908789 +0200 -@@ -0,0 +1,101 @@ -+package aQute.bnd.maven.plugin; -+ -+import static java.lang.invoke.MethodHandles.publicLookup; -+ -+import java.lang.invoke.MethodHandle; -+import java.lang.reflect.Array; -+import java.lang.reflect.Modifier; -+import java.util.Iterator; -+import java.util.List; -+import java.util.Properties; -+import java.util.regex.Matcher; -+import java.util.regex.Pattern; -+ -+import org.slf4j.Logger; -+import org.slf4j.LoggerFactory; -+ -+public class BeanProperties extends Properties { -+ private static final Logger logger = LoggerFactory.getLogger(BeanProperties.class); -+ -+ private static final Pattern KEY_P = Pattern -+ .compile("(?[^\\.\\[]+)(?:\\[(?\\d+)\\])?\\.?"); -+ private static final long serialVersionUID = 1L; -+ -+ protected Properties defaults; -+ -+ public BeanProperties() { -+ this(null); -+ } -+ -+ public BeanProperties(Properties defaults) { -+ this.defaults = defaults; -+ } -+ -+ @Override -+ public String getProperty(String key) { -+ final Matcher m = KEY_P.matcher(key); -+ if (!m.find()) { -+ return defaultValue(key); -+ } -+ String name = m.group("name"); -+ Object value = value(name, get(name), m.group("index")); -+ while ((value != null) && m.find()) { -+ name = m.group("name"); -+ value = value(name, getField(value, name), m.group("index")); -+ } -+ return (value != null) ? value.toString() : defaultValue(key); -+ } -+ -+ private String defaultValue(String key) { -+ return (defaults != null) ? defaults.getProperty(key) : null; -+ } -+ -+ private Object getField(Object target, String fieldName) { -+ try { -+ String getterSuffix = Character.toUpperCase(fieldName.charAt(0)) + fieldName.substring(1); -+ Class targetClass = target.getClass(); -+ while (!Modifier.isPublic(targetClass.getModifiers())) { -+ targetClass = targetClass.getSuperclass(); -+ } -+ MethodHandle mh; -+ try { -+ mh = publicLookup().unreflect(targetClass.getMethod("get" + getterSuffix)); -+ } catch (NoSuchMethodException nsme) { -+ mh = publicLookup().unreflect(targetClass.getMethod("is" + getterSuffix)); -+ } -+ return mh.invoke(target); -+ } catch (Error e) { -+ throw e; -+ } catch (Throwable e) { -+ logger.debug("Could not find getter method for field {}", fieldName, e); -+ } -+ return null; -+ } -+ -+ private Object value(String name, Object value, String index) { -+ if ((value == null) || (index == null)) { -+ return value; -+ } -+ try { -+ int i = Integer.parseInt(index); -+ if (value instanceof List) { -+ return ((List) value).get(i); -+ } else if (value instanceof Iterable) { -+ if (i < 0) { -+ throw new IndexOutOfBoundsException("index < 0"); -+ } -+ Iterator iter = ((Iterable) value).iterator(); -+ for (; i > 0; i--) { -+ iter.next(); -+ } -+ return iter.next(); -+ } else if (value.getClass() -+ .isArray()) { -+ return Array.get(value, i); -+ } -+ } catch (Exception e) { -+ logger.debug("Could not find field {}[{}]", name, index, e); -+ } -+ return value; -+ } -+} diff --git a/_service b/_service index 5503b06..8e4c5fc 100644 --- a/_service +++ b/_service @@ -2,10 +2,8 @@ git https://github.com/bndtools/bnd.git - 5.2.0.REL - *.REL + 6.3.1 @PARENT_TAG@ - (.*).REL gradlew* docs **.jar diff --git a/aQute.libg-5.2.0.pom b/aQute.libg-6.3.1.pom similarity index 84% rename from aQute.libg-5.2.0.pom rename to aQute.libg-6.3.1.pom index 436f46e..4918cdc 100644 --- a/aQute.libg-5.2.0.pom +++ b/aQute.libg-6.3.1.pom @@ -3,7 +3,7 @@ 4.0.0 biz.aQute.bnd aQute.libg - 5.2.0 + 6.3.1 A library to be statically linked. Contains many small utilities. This bundle should not be installed in a framework, it is compile only. aQute.libg https://bnd.bndtools.org/ @@ -23,7 +23,7 @@ https://github.com/bndtools/bnd scm:git:https://github.com/bndtools/bnd.git scm:git:git@github.com:bndtools/bnd.git - 5.2.0.REL + 6.3.1 @@ -41,7 +41,7 @@ bjhargrave BJ Hargrave - bj@bjhargrave.com + bj@hargrave.dev https://github.com/bjhargrave IBM https://developer.ibm.com @@ -67,7 +67,7 @@ org.osgi osgi.annotation - 7.0.0 + 8.1.0 provided @@ -76,22 +76,34 @@ 1.7.25 compile + + org.osgi + org.osgi.dto + 1.0.0 + compile + + + org.osgi + org.osgi.resource + 1.0.0 + compile + + + org.osgi + org.osgi.framework + 1.8.0 + compile + org.osgi org.osgi.util.function - 1.1.0 + 1.2.0 compile org.osgi org.osgi.util.promise - 1.1.1 - compile - - - org.osgi - osgi.core - 6.0.0 + 1.2.0 compile diff --git a/aqute-bnd.changes b/aqute-bnd.changes index 5abd6e0..514f4e4 100644 --- a/aqute-bnd.changes +++ b/aqute-bnd.changes @@ -1,3 +1,22 @@ +------------------------------------------------------------------- +Mon Sep 18 05:23:18 UTC 2023 - Fridrich Strba + +- Update to aqute-bnd 6.3.1 + * https://github.com/bndtools/bnd/wiki/Changes-in-6.3.1 + * https://github.com/bndtools/bnd/wiki/Changes-in-6.3.0 + * https://github.com/bndtools/bnd/wiki/Changes-in-6.2.0 + * https://github.com/bndtools/bnd/wiki/Changes-in-6.1.0 + * https://github.com/bndtools/bnd/wiki/Changes-in-6.0.0 + * https://github.com/bndtools/bnd/wiki/Changes-in-5.3.0 +- Modified patches: + * 0001-Disable-removed-commands.patch + * 0003-Port-to-OSGI-7.0.0.patch -> 0002-Port-to-OSGI-7.0.0.patch + * 0004-maven-plugin-dependencies.patch -> + 0003-Remove-unmet-dependencies.patch + * reproducible-timestamps.patch + * reproducible-packages-list.patch + + rediff to changed context + ------------------------------------------------------------------- Sat Sep 16 10:08:36 UTC 2023 - Fridrich Strba @@ -5,8 +24,8 @@ Sat Sep 16 10:08:36 UTC 2023 - Fridrich Strba * reproducible-timestamps.patch + set "-reproducible" option to true by default + use SOURCE_DATE_EPOCH for timestamp if available - * reproducible-element-order.patch - + make the order of elements in manifest deterministic + * reproducible-packages-list.patch + + make the order of packages to import/export deterministic ------------------------------------------------------------------- Thu May 4 14:25:12 UTC 2023 - Dominique Leuenberger diff --git a/aqute-bnd.spec b/aqute-bnd.spec index eb8b5d3..f274171 100644 --- a/aqute-bnd.spec +++ b/aqute-bnd.spec @@ -17,7 +17,7 @@ Name: aqute-bnd -Version: 5.2.0 +Version: 6.3.1 Release: 0 Summary: BND Tool # Part of jpm is under BSD, but jpm is not included in binary RPM @@ -26,29 +26,29 @@ Group: Development/Libraries/Java URL: https://bnd.bndtools.org/ Source0: bnd-%{version}.tar.xz Source1: bnd-%{version}-build_xml.tar.xz -Source2: https://repo1.maven.org/maven2/biz/aQute/bnd/biz.aQute.bnd.ant/%{version}/biz.aQute.bnd.ant-%{version}.pom +Source2: https://repo1.maven.org/maven2/biz/aQute/bnd/biz.aQute.bnd.exporters/%{version}/biz.aQute.bnd.exporters-%{version}.pom 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 -Source7: https://repo1.maven.org/maven2/biz/aQute/bnd/biz.aQute.bnd.exporters/%{version}/biz.aQute.bnd.exporters-%{version}.pom -Patch0: 0001-Disable-removed-commands.patch -Patch2: 0003-Port-to-OSGI-7.0.0.patch -Patch3: aqute-bnd-java8compat.patch -Patch4: 0004-maven-plugin-dependencies.patch -Patch5: reproducible-timestamps.patch -Patch6: reproducible-element-order.patch +Source7: https://repo1.maven.org/maven2/biz/aQute/bnd/biz.aQute.bnd.ant/%{version}/biz.aQute.bnd.ant-%{version}.pom +Source8: https://repo1.maven.org/maven2/biz/aQute/bnd/biz.aQute.bnd.util/%{version}/biz.aQute.bnd.util-%{version}.pom +Patch1: 0001-Disable-removed-commands.patch +Patch2: 0002-Port-to-OSGI-7.0.0.patch +Patch3: 0003-Remove-unmet-dependencies.patch +Patch4: reproducible-timestamps.patch +Patch5: reproducible-packages-list.patch BuildRequires: ant BuildRequires: fdupes -BuildRequires: javapackages-local +BuildRequires: javapackages-local >= 6 BuildRequires: jline BuildRequires: osgi-annotation BuildRequires: osgi-compendium BuildRequires: osgi-core BuildRequires: slf4j +Requires: %{name}lib = %{version}-%{release} # Explicit javapackages-tools requires since bnd script uses # /usr/share/java-utils/java-functions -Requires: %{name}lib = %{version}-%{release} Requires: javapackages-tools BuildArch: noarch @@ -68,13 +68,6 @@ The tool is capable of acting as: %package -n aqute-bndlib Summary: BND library Group: Development/Libraries/Java -Requires: mvn(biz.aQute.bnd:aQute.libg) -Requires: mvn(biz.aQute.bnd:biz.aQute.bnd.annotation) -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}. @@ -93,91 +86,102 @@ mkdir -p lib build-jar-repository -s lib \ slf4j/api slf4j/simple osgi-annotation osgi-core osgi-compendium ant jline -%patch0 -p1 +%patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 -%patch6 -p1 -# the commands pull in more dependencies than we want (felix-resolver, jetty, jtwig, javapackager) -rm biz.aQute.bnd/src/aQute/bnd/main/{RemoteCommand,ResolveCommand,ExportReportCommand,MbrCommand,ReporterLogger}.java +# the commands pull in more dependencies than we want (felix-resolver, jetty) +rm biz.aQute.bnd/src/aQute/bnd/main/{ExportReportCommand,MbrCommand,RemoteCommand,ReporterLogger,ResolveCommand,Shell}.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_remove_dep :::provided:: -%pom_remove_dep -r org.osgi:org.osgi.util.function -%pom_remove_dep -r org.osgi:org.osgi.util.promise -%pom_add_dep org.osgi:osgi.cmpn -%pom_add_dep org.slf4j:slf4j-api +%pom_add_dep org.osgi:osgi.cmpn:7 +%pom_remove_dep org.osgi:org.osgi.dto +%pom_remove_dep org.osgi:org.osgi.framework +%pom_remove_dep org.osgi:org.osgi.resource +%pom_remove_dep org.osgi:org.osgi.util.function +%pom_remove_dep org.osgi:org.osgi.util.promise +%pom_xpath_remove pom:dependency/pom:scope popd -# bndlib.annotations +# bnd.annotation pushd biz.aQute.bnd.annotation cp -p %{SOURCE6} pom.xml -%pom_remove_dep -r org.osgi:org.osgi.namespace.extender -%pom_remove_dep -r org.osgi:org.osgi.namespace.service -%pom_remove_dep -r org.osgi:org.osgi.resource -%pom_remove_dep -r org.osgi:org.osgi.service.serviceloader +%pom_add_dep org.osgi:osgi.core:7 +%pom_add_dep org.osgi:osgi.cmpn:7 +%pom_remove_dep org.osgi:org.osgi.namespace.extender +%pom_remove_dep org.osgi:org.osgi.namespace.service +%pom_remove_dep org.osgi:org.osgi.resource +%pom_remove_dep org.osgi:org.osgi.service.serviceloader +%pom_xpath_remove pom:dependency/pom:scope popd # bndlib pushd biz.aQute.bndlib cp -p %{SOURCE5} pom.xml -%pom_remove_dep :::provided:: -%pom_add_dep org.osgi:osgi.cmpn +%pom_add_dep org.osgi:osgi.cmpn:7 %pom_add_dep biz.aQute.bnd:aQute.libg:%{version} %pom_add_dep biz.aQute.bnd:biz.aQute.bnd.annotation:%{version} +%pom_remove_dep org.osgi:org.osgi.dto +%pom_remove_dep org.osgi:org.osgi.framework +%pom_remove_dep org.osgi:org.osgi.namespace.contract +%pom_remove_dep org.osgi:org.osgi.namespace.extender +%pom_remove_dep org.osgi:org.osgi.namespace.implementation +%pom_remove_dep org.osgi:org.osgi.namespace.service +%pom_remove_dep org.osgi:org.osgi.resource +%pom_remove_dep org.osgi:org.osgi.service.log +%pom_remove_dep org.osgi:org.osgi.service.repository +%pom_remove_dep org.osgi:org.osgi.util.function +%pom_remove_dep org.osgi:org.osgi.util.promise +%pom_remove_dep org.osgi:org.osgi.util.tracker +%pom_xpath_remove pom:dependency/pom:scope +popd + +# bnd.ant +pushd biz.aQute.bnd.ant +cp -p %{SOURCE7} pom.xml +%pom_xpath_remove pom:dependency/pom:scope popd # bnd.exporters pushd biz.aQute.bnd.exporters -cp -p %{SOURCE7} pom.xml -%pom_remove_dep :::provided:: -%pom_add_dep biz.aQute.bnd:biz.aQute.bndlib:%{version} -%pom_add_dep biz.aQute.bnd:biz.aQute.bnd.annotation:%{version} +cp -p %{SOURCE2} pom.xml +%pom_remove_dep org.osgi:org.osgi.service.subsystem +%pom_xpath_remove pom:dependency/pom:scope popd # bnd pushd biz.aQute.bnd cp -p %{SOURCE4} pom.xml -%pom_remove_dep :::provided:: -%pom_add_dep biz.aQute.bnd:biz.aQute.bndlib:%{version} +%pom_remove_dep :biz.aQute.resolve +%pom_remove_dep :biz.aQute.repository +%pom_remove_dep :biz.aQute.bnd.reporter +%pom_remove_dep :biz.aQute.remote.api +%pom_remove_dep :snakeyaml +%pom_remove_dep :jline +%pom_remove_dep org.osgi:org.osgi.service.coordinator +%pom_remove_dep org.osgi:org.osgi.service.resolver +%pom_remove_dep org.osgi:org.osgi.dto +%pom_remove_dep org.osgi:org.osgi.framework +%pom_remove_dep org.osgi:org.osgi.resource +%pom_remove_dep org.osgi:org.osgi.service.log +%pom_remove_dep org.osgi:org.osgi.service.repository +%pom_remove_dep org.osgi:org.osgi.util.function +%pom_remove_dep org.osgi:org.osgi.util.promise +%pom_remove_dep org.osgi:org.osgi.util.tracker +%pom_xpath_remove pom:dependency/pom:scope +popd + +# bnd.util +pushd biz.aQute.bnd.util +cp -p %{SOURCE8} pom.xml %pom_add_dep biz.aQute.bnd:aQute.libg:%{version} -%pom_add_dep biz.aQute.bnd:biz.aQute.bnd.annotation:%{version} -%pom_add_dep biz.aQute.bnd:biz.aQute.bnd.ant:%{version} -%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 - -# bndlib.ant -pushd biz.aQute.bnd.ant -cp -p %{SOURCE2} pom.xml -%pom_remove_dep :::provided:: -%pom_add_dep org.osgi:osgi.annotation -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 +%pom_xpath_remove pom:dependency/pom:scope popd %build @@ -188,6 +192,7 @@ popd # jars install -dm 0755 %{buildroot}%{_javadir}/%{name} install -pm 0644 biz.aQute.bnd.exporters/target/biz.aQute.bnd.exporters-%{version}.jar %{buildroot}%{_javadir}/%{name}/biz.aQute.bnd.exporters.jar +install -pm 0644 biz.aQute.bnd.util/target/biz.aQute.bnd.util-%{version}.jar %{buildroot}%{_javadir}/%{name}/biz.aQute.bnd.util.jar 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 @@ -195,21 +200,24 @@ install -pm 0644 biz.aQute.bnd/target/biz.aQute.bnd-%{version}.jar %{buildroot}% install -pm 0644 biz.aQute.bnd.ant/target/biz.aQute.bnd.ant-%{version}.jar %{buildroot}%{_javadir}/%{name}/biz.aQute.bnd.ant.jar # poms install -dm 0755 %{buildroot}%{_mavenpomdir}/%{name} -install -pm 0644 biz.aQute.bnd.exporters/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/biz.aQute.bnd.exporters.pom +%mvn_install_pom biz.aQute.bnd.exporters/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/biz.aQute.bnd.exporters.pom %add_maven_depmap %{name}/biz.aQute.bnd.exporters.pom %{name}/biz.aQute.bnd.exporters.jar -f bndlib -install -pm 0644 biz.aQute.bnd.annotation/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/biz.aQute.bnd.annotation.pom +%mvn_install_pom biz.aQute.bnd.util/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/biz.aQute.bnd.util.pom +%add_maven_depmap %{name}/biz.aQute.bnd.util.pom %{name}/biz.aQute.bnd.util.jar -f bndlib +%mvn_install_pom 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 +%mvn_install_pom 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 +%mvn_install_pom 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 +%mvn_install_pom 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:bnd,biz.aQute:bnd -install -pm 0644 biz.aQute.bnd.ant/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/biz.aQute.bnd.ant.pom +%mvn_install_pom biz.aQute.bnd.ant/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/biz.aQute.bnd.ant.pom %add_maven_depmap %{name}/biz.aQute.bnd.ant.pom %{name}/biz.aQute.bnd.ant.jar # javadoc install -dm 0755 %{buildroot}%{_javadocdir}/%{name} mv biz.aQute.bnd.exporters/target/site/apidocs %{buildroot}%{_javadocdir}/%{name}/biz.aQute.bnd.exporters +mv biz.aQute.bnd.util/target/site/apidocs %{buildroot}%{_javadocdir}/%{name}/biz.aQute.bnd.util 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 diff --git a/biz.aQute.bnd-5.2.0.pom b/biz.aQute.bnd-6.3.1.pom similarity index 72% rename from biz.aQute.bnd-5.2.0.pom rename to biz.aQute.bnd-6.3.1.pom index 7be22f3..e91612f 100644 --- a/biz.aQute.bnd-5.2.0.pom +++ b/biz.aQute.bnd-6.3.1.pom @@ -3,7 +3,7 @@ 4.0.0 biz.aQute.bnd biz.aQute.bnd - 5.2.0 + 6.3.1 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. biz.aQute.bnd https://bnd.bndtools.org/ @@ -23,7 +23,7 @@ https://github.com/bndtools/bnd scm:git:https://github.com/bndtools/bnd.git scm:git:git@github.com:bndtools/bnd.git - 5.2.0.REL + 6.3.1 @@ -41,7 +41,7 @@ bjhargrave BJ Hargrave - bj@bjhargrave.com + bj@hargrave.dev https://github.com/bjhargrave IBM https://developer.ibm.com @@ -66,8 +66,32 @@ org.osgi - osgi.core - 6.0.0 + org.osgi.dto + 1.0.0 + provided + + + org.osgi + org.osgi.resource + 1.0.0 + provided + + + org.osgi + org.osgi.framework + 1.8.0 + provided + + + org.osgi + org.osgi.util.tracker + 1.5.4 + provided + + + org.osgi + org.osgi.service.coordinator + 1.0.2 provided @@ -82,46 +106,70 @@ 1.1.0 provided + + org.osgi + org.osgi.service.resolver + 1.1.1 + provided + + + org.osgi + org.osgi.util.function + 1.2.0 + provided + + + org.osgi + org.osgi.util.promise + 1.2.0 + provided + + + biz.aQute.bnd + biz.aQute.bnd.util + 6.3.1 + provided + biz.aQute.bnd biz.aQute.bndlib - 5.2.0 + 6.3.1 provided biz.aQute.bnd biz.aQute.bnd.ant - 5.2.0 + 6.3.1 provided biz.aQute.bnd biz.aQute.resolve - 5.2.0 + 6.3.1 provided biz.aQute.bnd biz.aQute.repository - 5.2.0 + 6.3.1 provided biz.aQute.bnd biz.aQute.bnd.exporters - 5.2.0 + 6.3.1 provided biz.aQute.bnd biz.aQute.bnd.reporter - 5.2.0 + 6.3.1 provided biz.aQute.bnd biz.aQute.remote.api - 5.2.0 + 6.3.1 provided diff --git a/biz.aQute.bnd.annotation-5.2.0.pom b/biz.aQute.bnd.annotation-6.3.1.pom similarity index 93% rename from biz.aQute.bnd.annotation-5.2.0.pom rename to biz.aQute.bnd.annotation-6.3.1.pom index a70c67b..5967109 100644 --- a/biz.aQute.bnd.annotation-5.2.0.pom +++ b/biz.aQute.bnd.annotation-6.3.1.pom @@ -3,7 +3,7 @@ 4.0.0 biz.aQute.bnd biz.aQute.bnd.annotation - 5.2.0 + 6.3.1 bnd Annotations Library biz.aQute.bnd.annotation https://bnd.bndtools.org/ @@ -23,7 +23,7 @@ https://github.com/bndtools/bnd scm:git:https://github.com/bndtools/bnd.git scm:git:git@github.com:bndtools/bnd.git - 5.2.0.REL + 6.3.1 @@ -41,7 +41,7 @@ bjhargrave BJ Hargrave - bj@bjhargrave.com + bj@hargrave.dev https://github.com/bjhargrave IBM https://developer.ibm.com @@ -67,20 +67,20 @@ org.osgi osgi.annotation - 7.0.0 - compile + 8.1.0 + provided org.osgi org.osgi.namespace.extender 1.0.1 - compile + provided org.osgi org.osgi.namespace.service 1.0.0 - compile + provided org.osgi diff --git a/biz.aQute.bnd.ant-5.2.0.pom b/biz.aQute.bnd.ant-6.3.1.pom similarity index 89% rename from biz.aQute.bnd.ant-5.2.0.pom rename to biz.aQute.bnd.ant-6.3.1.pom index 8430b76..7b620a9 100644 --- a/biz.aQute.bnd.ant-5.2.0.pom +++ b/biz.aQute.bnd.ant-6.3.1.pom @@ -3,7 +3,7 @@ 4.0.0 biz.aQute.bnd biz.aQute.bnd.ant - 5.2.0 + 6.3.1 Bnd Ant Tasks biz.aQute.bnd.ant https://bnd.bndtools.org/ @@ -23,7 +23,7 @@ https://github.com/bndtools/bnd scm:git:https://github.com/bndtools/bnd.git scm:git:git@github.com:bndtools/bnd.git - 5.2.0.REL + 6.3.1 @@ -41,7 +41,7 @@ bjhargrave BJ Hargrave - bj@bjhargrave.com + bj@hargrave.dev https://github.com/bjhargrave IBM https://developer.ibm.com @@ -67,13 +67,19 @@ org.osgi osgi.annotation - 7.0.0 + 8.1.0 provided + + biz.aQute.bnd + biz.aQute.bnd.util + 6.3.1 + compile + biz.aQute.bnd biz.aQute.bndlib - 5.2.0 + 6.3.1 compile @@ -85,7 +91,7 @@ org.apache.ant ant - 1.10.8 + 1.10.12 compile diff --git a/biz.aQute.bnd.exporters-5.2.0.pom b/biz.aQute.bnd.exporters-6.3.1.pom similarity index 91% rename from biz.aQute.bnd.exporters-5.2.0.pom rename to biz.aQute.bnd.exporters-6.3.1.pom index aa28fe9..3db5055 100644 --- a/biz.aQute.bnd.exporters-5.2.0.pom +++ b/biz.aQute.bnd.exporters-6.3.1.pom @@ -3,7 +3,7 @@ 4.0.0 biz.aQute.bnd biz.aQute.bnd.exporters - 5.2.0 + 6.3.1 biz.aQute.bnd.exporters biz.aQute.bnd.exporters https://bnd.bndtools.org/ @@ -23,7 +23,7 @@ https://github.com/bndtools/bnd scm:git:https://github.com/bndtools/bnd.git scm:git:git@github.com:bndtools/bnd.git - 5.2.0.REL + 6.3.1 @@ -41,7 +41,7 @@ bjhargrave BJ Hargrave - bj@bjhargrave.com + bj@hargrave.dev https://github.com/bjhargrave IBM https://developer.ibm.com @@ -76,10 +76,16 @@ 1.1.0 provided + + biz.aQute.bnd + biz.aQute.bnd.util + 6.3.1 + compile + biz.aQute.bnd biz.aQute.bndlib - 5.2.0 + 6.3.1 compile diff --git a/biz.aQute.bnd.util-6.3.1.pom b/biz.aQute.bnd.util-6.3.1.pom new file mode 100644 index 0000000..84a2119 --- /dev/null +++ b/biz.aQute.bnd.util-6.3.1.pom @@ -0,0 +1,74 @@ + + + 4.0.0 + biz.aQute.bnd + biz.aQute.bnd.util + 6.3.1 + Util classes + biz.aQute.bnd.util + https://bnd.bndtools.org/ + + Bndtools + https://bndtools.org/ + + + + (Apache-2.0 OR EPL-2.0) + https://opensource.org/licenses/Apache-2.0,https://opensource.org/licenses/EPL-2.0 + repo + This program and the accompanying materials are made available under the terms of the Apache License, Version 2.0, or the Eclipse Public License 2.0. + + + + https://github.com/bndtools/bnd + scm:git:https://github.com/bndtools/bnd.git + scm:git:git@github.com:bndtools/bnd.git + 6.3.1 + + + + pkriens + Peter.Kriens@aQute.biz + Peter Kriens + Bndtools + https://github.com/bndtools + + architect + developer + + 1 + + + bjhargrave + BJ Hargrave + bj@hargrave.dev + https://github.com/bjhargrave + IBM + https://developer.ibm.com + + developer + + America/New_York + + + rotty3000 + Ray Augé + raymond.auge@liferay.com + https://rotty3000.github.io + Liferay Inc. + https://www.liferay.com + + developer + + America/New_York + + + + + org.osgi + osgi.annotation + 8.1.0 + provided + + + diff --git a/biz.aQute.bndlib-5.2.0.pom b/biz.aQute.bndlib-6.3.1.pom similarity index 78% rename from biz.aQute.bndlib-5.2.0.pom rename to biz.aQute.bndlib-6.3.1.pom index 16eee72..b3437f5 100644 --- a/biz.aQute.bndlib-5.2.0.pom +++ b/biz.aQute.bndlib-6.3.1.pom @@ -3,7 +3,7 @@ 4.0.0 biz.aQute.bnd biz.aQute.bndlib - 5.2.0 + 6.3.1 bndlib: A Swiss Army Knife for OSGi biz.aQute.bndlib https://bnd.bndtools.org/ @@ -23,7 +23,7 @@ https://github.com/bndtools/bnd scm:git:https://github.com/bndtools/bnd.git scm:git:git@github.com:bndtools/bnd.git - 5.2.0.REL + 6.3.1 @@ -41,7 +41,7 @@ bjhargrave BJ Hargrave - bj@bjhargrave.com + bj@hargrave.dev https://github.com/bjhargrave IBM https://developer.ibm.com @@ -67,14 +67,32 @@ org.osgi osgi.annotation - 7.0.0 + 8.1.0 provided org.osgi - osgi.core - 6.0.0 - provided + org.osgi.dto + 1.0.0 + compile + + + org.osgi + org.osgi.resource + 1.0.0 + compile + + + org.osgi + org.osgi.framework + 1.8.0 + compile + + + org.osgi + org.osgi.util.tracker + 1.5.4 + compile org.osgi @@ -104,25 +122,31 @@ org.osgi org.osgi.service.log 1.3.0 - provided + compile org.osgi org.osgi.service.repository 1.1.0 - provided + compile org.osgi org.osgi.util.function - 1.1.0 - provided + 1.2.0 + compile org.osgi org.osgi.util.promise - 1.1.1 - provided + 1.2.0 + compile + + + biz.aQute.bnd + biz.aQute.bnd.util + 6.3.1 + compile org.slf4j diff --git a/bnd-5.2.0-build_xml.tar.xz b/bnd-5.2.0-build_xml.tar.xz deleted file mode 100644 index 5d4af10..0000000 --- a/bnd-5.2.0-build_xml.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7a0a00d5def0906575b207d0961ba7df9332a6ab3b9dc24dc73219a81e27dac0 -size 2332 diff --git a/bnd-5.2.0.tar.xz b/bnd-5.2.0.tar.xz deleted file mode 100644 index 581748b..0000000 --- a/bnd-5.2.0.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cbb03e40bdaa9886996ac0e0a4e847da1533d7f6ca67f647c1323951463a8bd5 -size 3188412 diff --git a/bnd-6.3.1-build_xml.tar.xz b/bnd-6.3.1-build_xml.tar.xz new file mode 100644 index 0000000..62fb3f8 --- /dev/null +++ b/bnd-6.3.1-build_xml.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2772170b1fce1419d8eed3ce0bad39f55b1b265346c8280544f17888427e5979 +size 2584 diff --git a/bnd-6.3.1.tar.xz b/bnd-6.3.1.tar.xz new file mode 100644 index 0000000..a8ba0ed --- /dev/null +++ b/bnd-6.3.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3bf2527963728874767aac12a817f914cf4188f632f323df68455c2e28a8d279 +size 3247528 diff --git a/bnd-maven-plugin.changes b/bnd-maven-plugin.changes index 9a809f9..8bece8a 100644 --- a/bnd-maven-plugin.changes +++ b/bnd-maven-plugin.changes @@ -1,3 +1,22 @@ +------------------------------------------------------------------- +Mon Sep 18 05:23:18 UTC 2023 - Fridrich Strba + +- Update to aqute-bnd 6.3.1 + * https://github.com/bndtools/bnd/wiki/Changes-in-6.3.1 + * https://github.com/bndtools/bnd/wiki/Changes-in-6.3.0 + * https://github.com/bndtools/bnd/wiki/Changes-in-6.2.0 + * https://github.com/bndtools/bnd/wiki/Changes-in-6.1.0 + * https://github.com/bndtools/bnd/wiki/Changes-in-6.0.0 + * https://github.com/bndtools/bnd/wiki/Changes-in-5.3.0 +- Modified patches: + * 0001-Disable-removed-commands.patch + * 0003-Port-to-OSGI-7.0.0.patch -> 0002-Port-to-OSGI-7.0.0.patch + * 0004-maven-plugin-dependencies.patch -> + 0003-Remove-unmet-dependencies.patch + * reproducible-timestamps.patch + * reproducible-packages-list.patch + + rediff to changed context + ------------------------------------------------------------------- Sat Sep 16 10:08:36 UTC 2023 - Fridrich Strba @@ -5,8 +24,8 @@ Sat Sep 16 10:08:36 UTC 2023 - Fridrich Strba * reproducible-timestamps.patch + set "-reproducible" option to true by default + use SOURCE_DATE_EPOCH for timestamp if available - * reproducible-element-order.patch - + make the order of elements in manifest deterministic + * reproducible-packages-list.patch + + make the order of packages to import/export deterministic ------------------------------------------------------------------- Wed Apr 26 17:47:47 UTC 2023 - Fridrich Strba diff --git a/bnd-maven-plugin.spec b/bnd-maven-plugin.spec index 54a9277..f3e7a5e 100644 --- a/bnd-maven-plugin.spec +++ b/bnd-maven-plugin.spec @@ -17,7 +17,7 @@ Name: bnd-maven-plugin -Version: 5.2.0 +Version: 6.3.1 Release: 0 Summary: BND Maven plugin # Part of jpm is under BSD, but jpm is not included in binary RPM @@ -25,26 +25,17 @@ License: Apache-2.0 Group: Development/Libraries/Java URL: https://bnd.bndtools.org/ Source0: bnd-%{version}.tar.xz -Patch0: 0001-Disable-removed-commands.patch -Patch2: 0003-Port-to-OSGI-7.0.0.patch -Patch3: aqute-bnd-java8compat.patch -Patch4: 0004-maven-plugin-dependencies.patch -Patch5: reproducible-timestamps.patch -Patch6: reproducible-element-order.patch +Patch1: 0001-Disable-removed-commands.patch +Patch2: 0002-Port-to-OSGI-7.0.0.patch +Patch3: 0003-Remove-unmet-dependencies.patch +Patch4: reproducible-timestamps.patch +Patch5: reproducible-packages-list.patch BuildRequires: fdupes BuildRequires: maven-local -BuildRequires: mvn(biz.aQute.bnd:biz.aQute.bndlib) -BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-annotations) +BuildRequires: mvn(biz.aQute.bnd:biz.aQute.bndlib) >= %{version} BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin) BuildRequires: mvn(org.apache.maven.shared:maven-mapping) -BuildRequires: mvn(org.apache.maven:maven-artifact) -BuildRequires: mvn(org.apache.maven:maven-compat) -BuildRequires: mvn(org.apache.maven:maven-core) -BuildRequires: mvn(org.apache.maven:maven-plugin-api) -BuildRequires: mvn(org.eclipse.aether:aether-api) -BuildRequires: mvn(org.osgi:osgi.cmpn) -BuildRequires: mvn(org.slf4j:slf4j-api) -BuildRequires: mvn(org.sonatype.plexus:plexus-build-api) +BuildRequires: mvn(org.codehaus.plexus:plexus-component-metadata) BuildArch: noarch %description @@ -60,23 +51,19 @@ API documentation for %{name}. %prep %setup -q -n bnd-%{version} -%patch0 -p1 +%patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 -%patch6 -p1 +cp -r biz.aQute.bnd.maven/src/aQute/bnd/maven/lib/configuration maven/bnd-maven-plugin/src/main/java/aQute/bnd/maven/lib +cp -r biz.aQute.bnd.maven/src/aQute/bnd/maven/lib/executions maven/bnd-maven-plugin/src/main/java/aQute/bnd/maven/lib pushd maven %pom_remove_dep -r :biz.aQute.bnd.maven -%pom_remove_dep -r :biz.aQute.resolve -%pom_remove_dep -r :biz.aQute.repository -%pom_remove_dep -r :biz.aQute.bnd.embedded-repo - # 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-baseline-maven-plugin %pom_disable_module bnd-export-maven-plugin %pom_disable_module bnd-reporter-maven-plugin %pom_disable_module bnd-resolver-maven-plugin @@ -85,11 +72,13 @@ pushd maven # 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 -%pom_remove_plugin -r :maven-source-plugin -popd -%{mvn_package} biz.aQute.bnd:bnd-plugin-parent __noinstall +%pom_remove_plugin -r :flatten-maven-plugin + +%pom_remove_dep -r org.junit:junit-bom + +%mvn_package biz.aQute.bnd:bnd-plugin-parent __noinstall +popd %build pushd maven diff --git a/reproducible-element-order.patch b/reproducible-element-order.patch deleted file mode 100644 index f4f82a0..0000000 --- a/reproducible-element-order.patch +++ /dev/null @@ -1,794 +0,0 @@ -diff --git a/biz.aQute.bndlib/src/aQute/bnd/header/Parameters.java b/biz.aQute.bndlib/src/aQute/bnd/header/Parameters.java -index d3916f63..ae84ca14 100644 ---- a/biz.aQute.bndlib/src/aQute/bnd/header/Parameters.java -+++ b/biz.aQute.bndlib/src/aQute/bnd/header/Parameters.java -@@ -4,10 +4,10 @@ import static aQute.bnd.osgi.Constants.DUPLICATE_MARKER; - import static java.util.stream.Collectors.toList; - - import java.util.Collection; --import java.util.LinkedHashMap; - import java.util.List; - import java.util.Map; - import java.util.Set; -+import java.util.TreeMap; - import java.util.stream.Collector; - - import aQute.bnd.stream.MapStream; -@@ -19,7 +19,7 @@ public class Parameters implements Map { - - public Parameters(boolean allowDuplicateAttributes) { - this.allowDuplicateAttributes = allowDuplicateAttributes; -- map = new LinkedHashMap<>(); -+ map = new TreeMap<>(); - } - - public Parameters() { -diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/ActivelyClosingClassLoader.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/ActivelyClosingClassLoader.java -index 761f48ef..4c9b3efd 100644 ---- a/biz.aQute.bndlib/src/aQute/bnd/osgi/ActivelyClosingClassLoader.java -+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/ActivelyClosingClassLoader.java -@@ -14,10 +14,10 @@ import java.net.URLClassLoader; - import java.net.URLConnection; - import java.net.URLStreamHandler; - import java.util.Enumeration; --import java.util.LinkedHashMap; - import java.util.List; - import java.util.Map; - import java.util.Objects; -+import java.util.TreeMap; - import java.util.concurrent.ScheduledFuture; - import java.util.concurrent.TimeUnit; - import java.util.concurrent.atomic.AtomicBoolean; -@@ -35,7 +35,7 @@ import aQute.lib.io.IO; - * This class loader can load classes from JAR files. - */ - class ActivelyClosingClassLoader extends URLClassLoader implements Closeable { -- final AtomicReference> wrappers = new AtomicReference<>(new LinkedHashMap<>()); -+ final AtomicReference> wrappers = new AtomicReference<>(new TreeMap<>()); - final AtomicBoolean open = new AtomicBoolean(true); - final Processor processor; - ScheduledFuture schedule; -@@ -89,7 +89,7 @@ class ActivelyClosingClassLoader extends URLClassLoader implements Closeable { - throw new IllegalStateException("Already closed"); - } - wrappers.updateAndGet(map -> { -- Map copy = new LinkedHashMap<>(map); -+ Map copy = new TreeMap<>(map); - copy.computeIfAbsent(file, Wrapper::new); - return copy; - }); -@@ -183,7 +183,7 @@ class ActivelyClosingClassLoader extends URLClassLoader implements Closeable { - if (schedule != null) { - schedule.cancel(true); - } -- wrappers.getAndSet(new LinkedHashMap<>()) -+ wrappers.getAndSet(new TreeMap<>()) - .values() - .forEach(Wrapper::close); - } -diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Analyzer.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Analyzer.java -index bf5029ae..533eea3d 100644 ---- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Analyzer.java -+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Analyzer.java -@@ -43,7 +43,6 @@ import java.util.EnumSet; - import java.util.HashMap; - import java.util.HashSet; - import java.util.Iterator; --import java.util.LinkedHashSet; - import java.util.LinkedList; - import java.util.List; - import java.util.Map; -@@ -2144,7 +2143,7 @@ public class Analyzer extends Processor { - .distinct() - .filter(this::isProvider) - .map(TypeRef::getPackageRef) -- .collect(toCollection(LinkedHashSet::new)); -+ .collect(toCollection(TreeSet::new)); - return providers; - } - -@@ -2686,7 +2685,7 @@ public class Analyzer extends Processor { - - // Look at the referred packages - // and copy them to our baseline -- Set refs = new LinkedHashSet<>(clazz.getReferred()); -+ Set refs = new TreeSet<>(clazz.getReferred()); - refs.addAll(referencesByAnnotation(clazz)); - for (PackageRef p : refs) { - referred.put(p); -diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Annotation.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Annotation.java -index 685c92e1..c3f10b29 100644 ---- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Annotation.java -+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Annotation.java -@@ -6,9 +6,9 @@ import java.lang.annotation.RetentionPolicy; - import java.util.Arrays; - import java.util.Collections; - import java.util.Iterator; --import java.util.LinkedHashMap; - import java.util.Map; - import java.util.Map.Entry; -+import java.util.TreeMap; - import java.util.Set; - import java.util.stream.Stream; - -@@ -150,7 +150,7 @@ public class Annotation { - - public void put(String string, Object v) { - if (elements == null) { -- elements = new LinkedHashMap<>(); -+ elements = new TreeMap<>(); - } - elements.put(string, v); - } -@@ -193,7 +193,7 @@ public class Annotation { - - public T getAnnotation(Class c) throws Exception { - if (elements == null) { -- elements = new LinkedHashMap<>(); -+ elements = new TreeMap<>(); - } - return CONVERTER.convert(c, elements); - } -@@ -211,7 +211,7 @@ public class Annotation { - return; - } - if (elements == null) { -- elements = new LinkedHashMap<>(map); -+ elements = new TreeMap<>(map); - } else { - map.forEach(elements::putIfAbsent); - } -diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/AnnotationHeaders.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/AnnotationHeaders.java -index 7ee4b2a5..ade0577c 100644 ---- a/biz.aQute.bndlib/src/aQute/bnd/osgi/AnnotationHeaders.java -+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/AnnotationHeaders.java -@@ -8,7 +8,6 @@ import java.io.IOException; - import java.lang.annotation.Target; - import java.util.ArrayList; - import java.util.Arrays; --import java.util.HashSet; - import java.util.List; - import java.util.Map.Entry; - import java.util.Optional; -@@ -151,7 +150,7 @@ class AnnotationHeaders extends ClassDataCollector implements Closeable { - // The annotations we could not load. used to avoid repeatedly logging the - // same missing annotation for the same project. Note that this should not - // be reset for each #classStart(Clazz). -- final Set loggedMissing = new HashSet<>(); -+ final Set loggedMissing = new TreeSet<>(); - final Instructions instructions; - - // we parse the annotations separately at the end -@@ -394,7 +393,7 @@ class AnnotationHeaders extends ClassDataCollector implements Closeable { - handleAttributeOrDirective(a); - break; - default : -- Set processed = new HashSet<>(this.processed); -+ Set processed = new TreeSet<>(this.processed); - processed.add(c.getFQN()); - doAnnotatedAnnotation(a, a.getName(), processed, attributesAndDirectives); - break; -diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Builder.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Builder.java -index cbeb4452..9b03e520 100644 ---- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Builder.java -+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Builder.java -@@ -14,13 +14,13 @@ import java.util.ArrayList; - import java.util.Arrays; - import java.util.Collection; - import java.util.Collections; --import java.util.HashSet; - import java.util.Iterator; - import java.util.List; - import java.util.Map; - import java.util.Map.Entry; - import java.util.Objects; - import java.util.Set; -+import java.util.TreeSet; - import java.util.concurrent.ConcurrentHashMap; - import java.util.jar.Manifest; - import java.util.regex.Matcher; -@@ -489,7 +489,7 @@ public class Builder extends Analyzer { - .toStringWithoutQualifier(); - } - } -- Set visited = new HashSet<>(); -+ Set visited = new TreeSet<>(); - - for (Map.Entry entry : packages.entrySet()) { - -diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Clazz.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Clazz.java -index b97251b5..a3f8644f 100644 ---- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Clazz.java -+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Clazz.java -@@ -31,8 +31,7 @@ import java.util.Comparator; - import java.util.Deque; - import java.util.EnumSet; - import java.util.HashMap; --import java.util.HashSet; --import java.util.LinkedHashMap; -+import java.util.TreeSet; - import java.util.List; - import java.util.Map; - import java.util.Optional; -@@ -40,6 +39,7 @@ import java.util.Properties; - import java.util.Set; - import java.util.Spliterator; - import java.util.Spliterators.AbstractSpliterator; -+import java.util.TreeMap; - import java.util.function.Consumer; - import java.util.function.Function; - import java.util.function.Predicate; -@@ -735,7 +735,7 @@ public class Clazz { - private boolean hasDefaultConstructor; - - private Set imports = Create.set(); -- private Set xref = new HashSet<>(); -+ private Set xref = new TreeSet<>(); - private Set annotations; - private int forName = 0; - private int class$ = 0; -@@ -803,7 +803,7 @@ public class Clazz { - referred = new HashMap<>(constantPool.size()); - - if (classDef.isPublic()) { -- api = new HashSet<>(); -+ api = new TreeSet<>(); - } - if (!classDef.isModule()) { - referTo(classDef.getType(), Modifier.PUBLIC); -@@ -1430,7 +1430,7 @@ public class Clazz { - private void processAnnotation(AnnotationInfo annotationInfo, ElementType elementType, RetentionPolicy policy, - int access_flags) { - if (annotations == null) { -- annotations = new HashSet<>(); -+ annotations = new TreeSet<>(); - } - - String typeName = annotationInfo.type; -@@ -1478,7 +1478,7 @@ public class Clazz { - - private Map annotationValues(ElementValueInfo[] values, ElementType elementType, - RetentionPolicy policy, int access_flags) { -- Map elements = new LinkedHashMap<>(); -+ Map elements = new TreeMap<>(); - for (ElementValueInfo elementValueInfo : values) { - String element = elementValueInfo.name; - Object value = newElementValue(elementValueInfo.value, elementType, policy, access_flags); -@@ -1706,7 +1706,7 @@ public class Clazz { - Spliterator spliterator = new AbstractSpliterator(Long.MAX_VALUE, - Spliterator.DISTINCT | Spliterator.ORDERED | Spliterator.NONNULL) { - private final Deque queue = new ArrayDeque<>(func.apply(Clazz.this)); -- private final Set seen = (visited != null) ? visited : new HashSet<>(); -+ private final Set seen = (visited != null) ? visited : new TreeSet<>(); - - @Override - public boolean tryAdvance(Consumer action) { -@@ -1758,7 +1758,7 @@ public class Clazz { - - case IMPLEMENTS : { - requireNonNull(instr); -- Set visited = new HashSet<>(); -+ Set visited = new TreeSet<>(); - return hierarchyStream(analyzer).flatMap(c -> c.typeStream(analyzer, Clazz::interfaces, visited)) - .map(TypeRef::getDottedOnly) - .anyMatch(instr::matches) ^ instr.isNegated(); -@@ -1787,7 +1787,7 @@ public class Clazz { - - case INDIRECTLY_ANNOTATED : { - requireNonNull(instr); -- return typeStream(analyzer, Clazz::annotations, new HashSet<>()) // -+ return typeStream(analyzer, Clazz::annotations, new TreeSet<>()) // - .map(TypeRef::getFQN) - .anyMatch(instr::matches) ^ instr.isNegated(); - } -@@ -1802,7 +1802,7 @@ public class Clazz { - - case HIERARCHY_INDIRECTLY_ANNOTATED : { - requireNonNull(instr); -- Set visited = new HashSet<>(); -+ Set visited = new TreeSet<>(); - return hierarchyStream(analyzer) // - .flatMap(c -> c.typeStream(analyzer, Clazz::annotations, visited)) - .map(TypeRef::getFQN) -diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Jar.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Jar.java -index 3576bd87..d86ce7c1 100644 ---- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Jar.java -+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Jar.java -@@ -27,7 +27,6 @@ import java.util.Arrays; - import java.util.Calendar; - import java.util.EnumSet; - import java.util.GregorianCalendar; --import java.util.HashSet; - import java.util.List; - import java.util.Map; - import java.util.NavigableMap; -@@ -548,9 +547,9 @@ public class Jar implements Closeable { - // default is DEFLATED - } - -- Set done = new HashSet<>(); -+ Set done = new TreeSet<>(); - -- Set directories = new HashSet<>(); -+ Set directories = new TreeSet<>(); - if (doNotTouchManifest) { - Resource r = getResource(manifestName); - if (r != null) { -@@ -588,7 +587,7 @@ public class Jar implements Closeable { - - check(); - -- Set done = new HashSet<>(); -+ Set done = new TreeSet<>(); - - if (doNotTouchManifest) { - Resource r = getResource(manifestName); -@@ -1281,7 +1280,7 @@ public class Jar implements Closeable { - public void stripSignatures() { - Map map = getDirectory("META-INF"); - if (map != null) { -- for (String file : new HashSet<>(map.keySet())) { -+ for (String file : new TreeSet<>(map.keySet())) { - if (SIGNER_FILES_P.matcher(file) - .matches()) - remove(file); -diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Macro.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Macro.java -index 47312379..f9996bd8 100644 ---- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Macro.java -+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Macro.java -@@ -29,7 +29,6 @@ import java.util.Date; - import java.util.Deque; - import java.util.Formatter; - import java.util.Iterator; --import java.util.LinkedHashSet; - import java.util.LinkedList; - import java.util.List; - import java.util.Locale; -@@ -42,6 +41,7 @@ import java.util.Random; - import java.util.Set; - import java.util.TimeZone; - import java.util.TreeMap; -+import java.util.TreeSet; - import java.util.concurrent.ConcurrentHashMap; - import java.util.function.BiFunction; - import java.util.function.Function; -@@ -2166,7 +2166,7 @@ public class Macro { - * @return a map with commands and their help - */ - public Map getCommands() { -- Set targets = new LinkedHashSet<>(); -+ Set targets = new TreeSet<>(); - Collections.addAll(targets, this.targets); - Processor rover = domain; - while (rover != null) { -diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Packages.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Packages.java -index 6e0cd11d..6bd42dcd 100644 ---- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Packages.java -+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Packages.java -@@ -1,9 +1,9 @@ - package aQute.bnd.osgi; - - import java.util.Collection; --import java.util.LinkedHashMap; - import java.util.Map; - import java.util.Set; -+import java.util.TreeMap; - - import aQute.bnd.header.Attrs; - import aQute.bnd.osgi.Descriptors.PackageRef; -@@ -21,11 +21,11 @@ public class Packages implements Map { - } - - public Packages(Packages other) { -- map = new LinkedHashMap<>(other.map); -+ map = new TreeMap<>(other.map); - } - - public Packages() { -- map = new LinkedHashMap<>(); -+ map = new TreeMap<>(); - } - - @Override -diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/PermissionGenerator.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/PermissionGenerator.java -index e7721390..c9f654df 100644 ---- a/biz.aQute.bndlib/src/aQute/bnd/osgi/PermissionGenerator.java -+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/PermissionGenerator.java -@@ -4,7 +4,6 @@ import static java.util.stream.Collectors.toCollection; - - import java.util.Collections; - import java.util.EnumSet; --import java.util.HashSet; - import java.util.Objects; - import java.util.Set; - import java.util.TreeSet; -@@ -150,7 +149,7 @@ public class PermissionGenerator { - - @Override - public Set visit(Or expr) { -- Set matches = new HashSet<>(); -+ Set matches = new TreeSet<>(); - for (Expression expression : expr.getExpressions()) { - matches.addAll(expression.visit(this)); - } -diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Processor.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Processor.java -index ca5d496d..c65c493e 100644 ---- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Processor.java -+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Processor.java -@@ -31,7 +31,6 @@ import java.util.Collection; - import java.util.Collections; - import java.util.HashSet; - import java.util.Iterator; --import java.util.LinkedHashMap; - import java.util.List; - import java.util.Map; - import java.util.Map.Entry; -@@ -41,6 +40,7 @@ import java.util.Properties; - import java.util.Random; - import java.util.Set; - import java.util.Spliterator; -+import java.util.TreeMap; - import java.util.TreeSet; - import java.util.concurrent.CopyOnWriteArrayList; - import java.util.concurrent.CopyOnWriteArraySet; -@@ -942,11 +942,11 @@ public class Processor extends Domain implements Reporter, Registry, Constants, - } - - public static Map newMap() { -- return new LinkedHashMap<>(); -+ return new TreeMap<>(); - } - - public static Map newHashMap() { -- return new LinkedHashMap<>(); -+ return new TreeMap<>(); - } - - public List newList(Collection t) { -@@ -958,7 +958,7 @@ public class Processor extends Domain implements Reporter, Registry, Constants, - } - - public Map newMap(Map t) { -- return new LinkedHashMap<>(t); -+ return new TreeMap<>(t); - } - - @Override -diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Verifier.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Verifier.java -index 982e229b..5ea80f10 100644 ---- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Verifier.java -+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Verifier.java -@@ -4,7 +4,6 @@ import java.io.InputStream; - import java.util.ArrayList; - import java.util.Arrays; - import java.util.Formatter; --import java.util.HashSet; - import java.util.Iterator; - import java.util.List; - import java.util.Map; -@@ -565,7 +564,7 @@ public class Verifier extends Processor { - if (!unresolvedReferences.isEmpty()) { - // Now we want to know the - // classes that are the culprits -- Set culprits = new HashSet<>(); -+ Set culprits = new TreeSet<>(); - for (Clazz clazz : analyzer.getClassspace() - .values()) { - if (hasOverlap(unresolvedReferences, clazz.getReferred())) -@@ -674,7 +673,7 @@ public class Verifier extends Processor { - if (!since(About._2_3)) - return; - -- Set invalidPaths = new HashSet<>(); -+ Set invalidPaths = new TreeSet<>(); - Pattern pattern = ReservedFileNames; - setProperty("@", ReservedFileNames.pattern()); - String p = getProperty(INVALIDFILENAMES); -@@ -690,7 +689,7 @@ public class Verifier extends Processor { - } - } - -- Set segments = new HashSet<>(); -+ Set segments = new TreeSet<>(); - for (String path : dot.getResources() - .keySet()) { - String parts[] = path.split("/"); -@@ -717,8 +716,8 @@ public class Verifier extends Processor { - if (isStrict()) { - Parameters map = parseHeader(manifest.getMainAttributes() - .getValue(Constants.IMPORT_PACKAGE)); -- Set noimports = new HashSet<>(); -- Set toobroadimports = new HashSet<>(); -+ Set noimports = new TreeSet<>(); -+ Set toobroadimports = new TreeSet<>(); - - for (Entry e : map.entrySet()) { - -@@ -791,7 +790,7 @@ public class Verifier extends Processor { - if (isStrict()) { - Parameters map = parseHeader(manifest.getMainAttributes() - .getValue(Constants.EXPORT_PACKAGE)); -- Set noexports = new HashSet<>(); -+ Set noexports = new TreeSet<>(); - - for (Entry e : map.entrySet()) { - -@@ -837,7 +836,7 @@ public class Verifier extends Processor { - String mandatory = e.getValue() - .get(Constants.MANDATORY_DIRECTIVE); - if (mandatory != null) { -- Set missing = new HashSet<>(split(mandatory)); -+ Set missing = new TreeSet<>(split(mandatory)); - missing.removeAll(e.getValue() - .keySet()); - if (!missing.isEmpty()) { -diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/eclipse/EclipseClasspath.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/eclipse/EclipseClasspath.java -index 3f9a2be9..2daf737c 100644 ---- a/biz.aQute.bndlib/src/aQute/bnd/osgi/eclipse/EclipseClasspath.java -+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/eclipse/EclipseClasspath.java -@@ -5,11 +5,11 @@ import java.io.FileNotFoundException; - import java.io.IOException; - import java.util.ArrayList; - import java.util.HashMap; --import java.util.LinkedHashSet; - import java.util.List; - import java.util.Map; - import java.util.Set; - import java.util.StringTokenizer; -+import java.util.TreeSet; - import java.util.regex.Matcher; - import java.util.regex.Pattern; - -@@ -34,18 +34,18 @@ public class EclipseClasspath { - static final DocumentBuilderFactory documentBuilderFactory = XML.newDocumentBuilderFactory(); - File project; - File workspace; -- Set sources = new LinkedHashSet<>(); -- Set allSources = new LinkedHashSet<>(); -+ Set sources = new TreeSet<>(); -+ Set allSources = new TreeSet<>(); - -- Set classpath = new LinkedHashSet<>(); -+ Set classpath = new TreeSet<>(); - List dependents = new ArrayList<>(); - File output; - boolean recurse = true; -- Set exports = new LinkedHashSet<>(); -+ Set exports = new TreeSet<>(); - Map properties = new HashMap<>(); - Reporter reporter; - int options; -- Set bootclasspath = new LinkedHashSet<>(); -+ Set bootclasspath = new TreeSet<>(); - - public final static int DO_VARIABLES = 1; - -diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/BaseRepository.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/BaseRepository.java -index c4853157..f334a26e 100644 ---- a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/BaseRepository.java -+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/BaseRepository.java -@@ -3,11 +3,11 @@ package aQute.bnd.osgi.repository; - import java.util.ArrayList; - import java.util.Collection; - import java.util.Collections; --import java.util.HashSet; - import java.util.Iterator; - import java.util.List; - import java.util.Map; - import java.util.Set; -+import java.util.TreeSet; - - import org.osgi.resource.Capability; - import org.osgi.resource.Requirement; -@@ -42,7 +42,7 @@ public abstract class BaseRepository implements Repository { - - @Override - public Promise> findProviders(RequirementExpression expression) { -- Set providers = new HashSet<>(); -+ Set providers = new TreeSet<>(); - - dispatch(expression, providers); - -@@ -72,7 +72,7 @@ public abstract class BaseRepository implements Repository { - return; - } - -- Set subset = new HashSet<>(); -+ Set subset = new TreeSet<>(); - dispatch(requirementExpressions.get(0), subset); - - for (int i = 1; i < requirementExpressions.size(); i++) { -@@ -93,7 +93,7 @@ public abstract class BaseRepository implements Repository { - } - providers.addAll(subset); - } else if (expression instanceof NotExpression) { -- Set allSet = new HashSet<>(); -+ Set allSet = new TreeSet<>(); - dispatch(all, allSet); - RequirementExpression re = ((NotExpression) expression).getRequirementExpression(); - for (Iterator it = allSet.iterator(); it.hasNext();) { -diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/BridgeRepository.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/BridgeRepository.java -index e5356c59..39e9b55f 100644 ---- a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/BridgeRepository.java -+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/BridgeRepository.java -@@ -4,7 +4,6 @@ import java.util.ArrayList; - import java.util.Collection; - import java.util.Collections; - import java.util.HashMap; --import java.util.HashSet; - import java.util.List; - import java.util.Map; - import java.util.Set; -@@ -196,7 +195,7 @@ public class BridgeRepository { - - public BridgeRepository(Repository repository) { - this.repository = repository; -- Set resources = new HashSet<>(); -+ Set resources = new TreeSet<>(); - find(resources, allIdentity); - find(resources, allBndInfo); - resources.forEach(this::index); -diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/ResourcesRepository.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/ResourcesRepository.java -index 4cf286bc..8ef64202 100644 ---- a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/ResourcesRepository.java -+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/ResourcesRepository.java -@@ -5,10 +5,10 @@ import static java.util.stream.Collectors.toMap; - - import java.util.ArrayList; - import java.util.Collection; --import java.util.LinkedHashSet; - import java.util.List; - import java.util.Map; - import java.util.Set; -+import java.util.TreeSet; - import java.util.concurrent.ConcurrentHashMap; - import java.util.function.Predicate; - import java.util.stream.Collector; -@@ -24,7 +24,7 @@ public class ResourcesRepository extends BaseRepository { - private final Map>> cache; - - public ResourcesRepository() { -- resources = new LinkedHashSet<>(); -+ resources = new TreeSet<>(); - cache = new ConcurrentHashMap<>(); - } - -diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/SimpleIndexer.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/SimpleIndexer.java -index 9ac735f6..6e022641 100644 ---- a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/SimpleIndexer.java -+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/SimpleIndexer.java -@@ -9,10 +9,10 @@ import java.net.URI; - import java.net.URISyntaxException; - import java.nio.file.Path; - import java.util.Collection; --import java.util.LinkedHashSet; - import java.util.List; - import java.util.Objects; - import java.util.Set; -+import java.util.TreeSet; - import java.util.stream.Collectors; - - import org.osgi.resource.Resource; -@@ -67,7 +67,7 @@ public class SimpleIndexer { - void analyzeFile(File file, ResourceBuilder resourceBuilder) throws Exception; - } - -- private final Set files = new LinkedHashSet<>(); -+ private final Set files = new TreeSet<>(); - private Path base; - private boolean compress = false; - private String name; -diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/XMLResourceGenerator.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/XMLResourceGenerator.java -index 08398185..5928ea97 100644 ---- a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/XMLResourceGenerator.java -+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/XMLResourceGenerator.java -@@ -28,11 +28,11 @@ import java.net.URISyntaxException; - import java.nio.charset.StandardCharsets; - import java.util.Collection; - import java.util.Collections; --import java.util.HashSet; - import java.util.List; - import java.util.Map; - import java.util.Objects; - import java.util.Set; -+import java.util.TreeSet; - import java.util.zip.GZIPOutputStream; - - import org.osgi.resource.Capability; -@@ -55,7 +55,7 @@ import aQute.lib.tag.Tag; - public class XMLResourceGenerator { - - private Tag repository = new Tag(TAG_REPOSITORY); -- private Set visited = new HashSet<>(); -+ private Set visited = new TreeSet<>(); - private int indent = 0; - private boolean compress = false; - private URI base; -diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/XMLResourceParser.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/XMLResourceParser.java -index a45738d7..50701ae9 100644 ---- a/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/XMLResourceParser.java -+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/repository/XMLResourceParser.java -@@ -22,9 +22,9 @@ import java.io.IOException; - import java.io.InputStream; - import java.net.URI; - import java.util.ArrayList; --import java.util.HashSet; - import java.util.List; - import java.util.Set; -+import java.util.TreeSet; - - import javax.xml.stream.XMLInputFactory; - import javax.xml.stream.XMLStreamConstants; -@@ -94,7 +94,7 @@ public class XMLResourceParser extends Processor { - } - - public XMLResourceParser(InputStream in, String what, URI uri) throws Exception { -- this(in, what, 100, new HashSet<>(), uri); -+ this(in, what, 100, new TreeSet<>(), uri); - } - - public void setDepth(int n) { -diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/PersistentResource.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/PersistentResource.java -index 89a82456..b0566f08 100644 ---- a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/PersistentResource.java -+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/PersistentResource.java -@@ -3,10 +3,10 @@ package aQute.bnd.osgi.resource; - import java.lang.reflect.Array; - import java.util.Arrays; - import java.util.Collection; --import java.util.HashSet; - import java.util.List; - import java.util.Map; - import java.util.Set; -+import java.util.TreeSet; - import java.util.stream.Stream; - - import org.osgi.framework.Version; -@@ -125,7 +125,7 @@ public class PersistentResource extends DTO implements Resource { - for (Requirement req : resource.getRequirements(null)) - reqMap.add(req.getNamespace(), req); - -- Set names = new HashSet<>(capMap.keySet()); -+ Set names = new TreeSet<>(capMap.keySet()); - names.addAll(reqMap.keySet()); - - namespaces = new Namespace[names.size()]; -diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceBuilder.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceBuilder.java -index ebb8463a..e624009c 100644 ---- a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceBuilder.java -+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceBuilder.java -@@ -11,8 +11,6 @@ import java.net.URI; - import java.util.ArrayList; - import java.util.Collections; - import java.util.Comparator; --import java.util.LinkedHashMap; --import java.util.LinkedHashSet; - import java.util.LinkedList; - import java.util.List; - import java.util.Map; -@@ -20,6 +18,7 @@ import java.util.Map.Entry; - import java.util.Optional; - import java.util.Set; - import java.util.TreeMap; -+import java.util.TreeSet; - import java.util.function.Supplier; - import java.util.jar.Manifest; - -@@ -101,7 +100,7 @@ public class ResourceBuilder { - } - - private static void add(Map> map, String namespace, CR capreq) { -- map.computeIfAbsent(namespace, k -> new LinkedHashSet<>()) -+ map.computeIfAbsent(namespace, k -> new TreeSet<>()) - .add(capreq); - } - -@@ -672,7 +671,7 @@ public class ResourceBuilder { - } - - public Map from(Resource bundle) { -- Map mapping = new LinkedHashMap<>(); -+ Map mapping = new TreeMap<>(); - - addRequirements(bundle.getRequirements(null)); - diff --git a/reproducible-packages-list.patch b/reproducible-packages-list.patch new file mode 100644 index 0000000..c912458 --- /dev/null +++ b/reproducible-packages-list.patch @@ -0,0 +1,29 @@ +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Packages.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Packages.java +index b127fc68..679a1051 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Packages.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Packages.java +@@ -1,9 +1,9 @@ + package aQute.bnd.osgi; + + import java.util.Collection; +-import java.util.LinkedHashMap; + import java.util.Map; + import java.util.Set; ++import java.util.TreeMap; + + import aQute.bnd.header.Attrs; + import aQute.bnd.osgi.Descriptors.PackageRef; +@@ -21,11 +21,11 @@ public class Packages implements Map { + } + + public Packages(Packages other) { +- map = new LinkedHashMap<>(other.map); ++ map = new TreeMap<>(other.map); + } + + public Packages() { +- map = new LinkedHashMap<>(); ++ map = new TreeMap<>(); + } + + @Override diff --git a/reproducible-timestamps.patch b/reproducible-timestamps.patch index 905fd09..11244bf 100644 --- a/reproducible-timestamps.patch +++ b/reproducible-timestamps.patch @@ -1,3 +1,5 @@ +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Jar.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Jar.java +index 10ec3fd0..7dd75418 100644 --- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Jar.java +++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Jar.java @@ -114,7 +114,7 @@ public class Jar implements Closeable { @@ -9,9 +11,11 @@ private Compression compression = Compression.DEFLATE; private boolean closed; private String[] algorithms; +diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Macro.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Macro.java +index e9ecd39e..f7f83d83 100644 --- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Macro.java +++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Macro.java -@@ -909,6 +909,10 @@ public class Macro { +@@ -904,6 +904,10 @@ public class Macro { reporter.warning("Too many arguments for tstamp: %s", Arrays.toString(args)); } @@ -22,7 +26,7 @@ SimpleDateFormat sdf = new SimpleDateFormat(format, Locale.US); sdf.setTimeZone(tz); return sdf.format(new Date(now)); -@@ -927,6 +931,11 @@ public class Macro { +@@ -922,6 +926,11 @@ public class Macro { } else { now = System.currentTimeMillis(); } From 36bada4bcbf90b29aa5c7c6613ed9294c0f3938968ef5893d8eae9b30899a097 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Mon, 18 Sep 2023 06:57:15 +0000 Subject: [PATCH 8/9] OBS-URL: https://build.opensuse.org/package/show/Java:packages/aqute-bnd?expand=0&rev=37 --- aqute-bnd-java8compat.patch | 658 ------------------------------------ aqute-bnd.spec | 14 +- bnd-6.3.1-build_xml.tar.xz | 4 +- bnd-6.3.1.tar.xz | 4 +- bnd-maven-plugin.spec | 2 +- 5 files changed, 12 insertions(+), 670 deletions(-) delete mode 100644 aqute-bnd-java8compat.patch diff --git a/aqute-bnd-java8compat.patch b/aqute-bnd-java8compat.patch deleted file mode 100644 index f908744..0000000 --- a/aqute-bnd-java8compat.patch +++ /dev/null @@ -1,658 +0,0 @@ ---- bnd-5.1.1.REL/aQute.libg/src/aQute/lib/io/ByteBufferDataInput.java 2020-06-16 23:03:04.000000000 +0200 -+++ bnd-5.1.1.REL/aQute.libg/src/aQute/lib/io/ByteBufferDataInput.java 2021-10-18 07:58:03.359785670 +0200 -@@ -2,6 +2,7 @@ - - import java.io.DataInput; - import java.io.IOException; -+import java.nio.Buffer; - import java.nio.ByteBuffer; - import java.util.Objects; - -@@ -34,8 +35,8 @@ - public ByteBuffer slice(int n) { - int limit = ranged(n); - ByteBuffer slice = bb.slice(); -- slice.limit(limit); -- bb.position(bb.position() + limit); -+ ((Buffer)slice).limit(limit); -+ ((Buffer)bb).position(bb.position() + limit); - return slice; - } - -@@ -52,7 +53,7 @@ - @Override - public int skipBytes(int n) { - int skipped = ranged(n); -- bb.position(bb.position() + skipped); -+ ((Buffer)bb).position(bb.position() + skipped); - return skipped; - } - ---- bnd-5.1.1.REL/aQute.libg/src/aQute/lib/io/ByteBufferDataOutput.java 2020-06-16 23:03:04.000000000 +0200 -+++ bnd-5.1.1.REL/aQute.libg/src/aQute/lib/io/ByteBufferDataOutput.java 2021-10-18 08:02:40.545556492 +0200 -@@ -4,6 +4,7 @@ - import java.io.IOException; - import java.io.InputStream; - import java.io.UTFDataFormatException; -+import java.nio.Buffer; - import java.nio.ByteBuffer; - - public class ByteBufferDataOutput implements DataOutput { -@@ -19,7 +20,7 @@ - - public ByteBuffer toByteBuffer() { - ByteBuffer obb = bb.duplicate(); -- obb.flip(); -+ ((Buffer)obb).flip(); - return obb; - } - -@@ -41,7 +42,7 @@ - if ((newCap - minCap) < 0) { - newCap = minCap; - } -- obb.flip(); -+ ((Buffer)obb).flip(); - return bb = ByteBuffer.allocate(newCap) - .put(obb); - } -@@ -78,7 +79,7 @@ - byte[] buffer = obb.array(); - for (int size, position; obb.hasRemaining() - && (size = in.read(buffer, position = obb.position(), obb.remaining())) > 0;) { -- obb.position(position + size); -+ ((Buffer)obb).position(position + size); - } - } while (!obb.hasRemaining()); - } ---- bnd-5.1.1.REL/aQute.libg/src/aQute/lib/io/ByteBufferInputStream.java 2020-06-16 23:03:04.000000000 +0200 -+++ bnd-5.1.1.REL/aQute.libg/src/aQute/lib/io/ByteBufferInputStream.java 2021-10-18 08:00:48.472840427 +0200 -@@ -1,13 +1,14 @@ - package aQute.lib.io; - - 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; - } - -@@ -44,7 +45,7 @@ - return 0L; - } - int skipped = Math.min((int) n, bb.remaining()); -- bb.position(bb.position() + skipped); -+ ((Buffer)bb).position(bb.position() + skipped); - return skipped; - } - -@@ -55,17 +56,17 @@ - - @Override - public void close() { -- bb.position(bb.limit()); -+ ((Buffer)bb).position(bb.limit()); - } - - @Override - public synchronized void mark(int readlimit) { -- bb.mark(); -+ ((Buffer)bb).mark(); - } - - @Override - public synchronized void reset() { -- bb.reset(); -+ ((Buffer)bb).reset(); - } - - @Override ---- bnd-5.1.1.REL/aQute.libg/src/aQute/lib/io/ByteBufferOutputStream.java 2020-06-16 23:03:04.000000000 +0200 -+++ bnd-5.1.1.REL/aQute.libg/src/aQute/lib/io/ByteBufferOutputStream.java 2021-10-18 07:59:24.488303884 +0200 -@@ -3,6 +3,7 @@ - import java.io.IOException; - import java.io.InputStream; - import java.io.OutputStream; -+import java.nio.Buffer; - import java.nio.ByteBuffer; - - public class ByteBufferOutputStream extends OutputStream { -@@ -18,7 +19,7 @@ - - public ByteBuffer toByteBuffer() { - ByteBuffer obb = bb.duplicate(); -- obb.flip(); -+ ((Buffer)obb).flip(); - return obb; - } - -@@ -40,7 +41,7 @@ - if ((newCap - minCap) < 0) { - newCap = minCap; - } -- obb.flip(); -+ ((Buffer)obb).flip(); - return bb = ByteBuffer.allocate(newCap) - .put(obb); - } -@@ -77,7 +78,7 @@ - byte[] buffer = obb.array(); - for (int size, position; obb.hasRemaining() - && (size = in.read(buffer, position = obb.position(), obb.remaining())) > 0;) { -- obb.position(position + size); -+ ((Buffer)obb).position(position + size); - } - } while (!obb.hasRemaining()); - } ---- bnd-5.1.1.REL/aQute.libg/src/aQute/lib/io/CharBufferReader.java 2020-06-16 23:03:04.000000000 +0200 -+++ bnd-5.1.1.REL/aQute.libg/src/aQute/lib/io/CharBufferReader.java 2021-10-18 08:09:03.356117231 +0200 -@@ -1,13 +1,14 @@ - package aQute.lib.io; - - 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; - } - -@@ -24,7 +25,7 @@ - - @Override - public void close() { -- cb.position(cb.limit()); -+ ((Buffer)cb).position(cb.limit()); - } - - @Override -@@ -41,7 +42,7 @@ - return 0L; - } - int skipped = Math.min((int) n, cb.remaining()); -- cb.position(cb.position() + skipped); -+ ((Buffer)cb).position(cb.position() + skipped); - return skipped; - } - -@@ -57,11 +58,11 @@ - - @Override - public void mark(int readAheadLimit) { -- cb.mark(); -+ ((Buffer)cb).mark(); - } - - @Override - public void reset() { -- cb.reset(); -+ ((Buffer)cb).reset(); - } - } ---- bnd-5.1.1.REL/aQute.libg/src/aQute/lib/io/IO.java 2020-06-16 23:03:04.000000000 +0200 -+++ bnd-5.1.1.REL/aQute.libg/src/aQute/lib/io/IO.java 2021-10-18 08:32:23.545468242 +0200 -@@ -25,6 +25,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; -@@ -218,11 +219,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; -@@ -238,7 +239,7 @@ - int offset = bb.arrayOffset(); - for (int size, position; bb.hasRemaining() - && (size = in.read(buffer, offset + (position = bb.position()), bb.remaining())) > 0;) { -- bb.position(position + size); -+ ((Buffer)bb).position(position + size); - } - } else { - int length = Math.min(bb.remaining(), BUFFER_SIZE); -@@ -275,7 +276,7 @@ - bbout.write(bb); - } else if (bb.hasArray()) { - out.write(bb.array(), bb.arrayOffset() + bb.position(), bb.remaining()); -- bb.position(bb.limit()); -+ ((Buffer)bb).position(bb.limit()); - } else { - int length = Math.min(bb.remaining(), BUFFER_SIZE); - byte[] buffer = new byte[length]; -@@ -294,7 +295,7 @@ - bbout.write(bb); - } else if (bb.hasArray()) { - out.write(bb.array(), bb.arrayOffset() + bb.position(), bb.remaining()); -- bb.position(bb.limit()); -+ ((Buffer)bb).position(bb.limit()); - } else { - int length = Math.min(bb.remaining(), BUFFER_SIZE); - byte[] buffer = new byte[length]; -@@ -339,7 +340,7 @@ - try { - ByteBuffer bb = ByteBuffer.allocate(BUFFER_SIZE); - while (in.read(bb) > 0) { -- bb.flip(); -+ ((Buffer)bb).flip(); - md.update(bb); - bb.compact(); - } -@@ -472,12 +473,12 @@ - ByteBuffer bb = ByteBuffer.allocate(BUFFER_SIZE); - byte[] buffer = bb.array(); - for (int size, position; (size = in.read(buffer, position = bb.position(), bb.remaining())) > 0;) { -- bb.position(position + size); -- bb.flip(); -+ ((Buffer)bb).position(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; -@@ -490,7 +491,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; -@@ -515,7 +516,7 @@ - } - ByteBuffer bb = ByteBuffer.allocate((int) size); - while (in.read(bb) > 0) {} -- bb.flip(); -+ ((Buffer)bb).flip(); - return bb; - } - } ---- bnd-5.1.1.REL/aQute.libg/src/aQute/lib/utf8properties/UTF8Properties.java 2020-06-16 23:03:04.000000000 +0200 -+++ bnd-5.1.1.REL/aQute.libg/src/aQute/lib/utf8properties/UTF8Properties.java 2021-10-18 08:04:01.910076369 +0200 -@@ -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; -@@ -120,11 +121,11 @@ - } - decoder.reset(); - if (success) { -- return cb.flip() -+ return ((Buffer)cb).flip() - .toString(); - } -- bb.rewind(); -- cb.clear(); -+ ((Buffer)bb).rewind(); -+ ((Buffer)cb).clear(); - } - return new String(buffer); // default decoding - } ---- bnd-5.1.1.REL/aQute.libg/test/aQute/lib/io/IOTest.java 2020-06-16 23:03:04.000000000 +0200 -+++ bnd-5.1.1.REL/aQute.libg/test/aQute/lib/io/IOTest.java 2021-10-18 07:51:55.341414987 +0200 -@@ -13,6 +13,7 @@ - import java.io.InputStream; - import java.io.Writer; - import java.lang.reflect.Method; -+import java.nio.Buffer; - import java.nio.ByteBuffer; - import java.nio.file.Files; - import java.nio.file.Path; -@@ -135,7 +136,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()); -@@ -149,7 +150,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()); -@@ -163,7 +164,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()); -@@ -178,7 +179,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()); -@@ -192,7 +193,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()); -@@ -206,7 +207,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()); -@@ -220,7 +221,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()); -@@ -243,7 +244,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-5.1.1.REL/biz.aQute.bndlib/src/aQute/bnd/classfile/CodeAttribute.java 2020-06-16 23:03:04.000000000 +0200 -+++ bnd-5.1.1.REL/biz.aQute.bndlib/src/aQute/bnd/classfile/CodeAttribute.java 2021-10-18 07:43:59.698276751 +0200 -@@ -3,6 +3,7 @@ - import java.io.DataInput; - import java.io.DataOutput; - import java.io.IOException; -+import java.nio.Buffer; - import java.nio.ByteBuffer; - import java.util.Arrays; - -@@ -58,7 +59,7 @@ - out.writeShort(max_stack); - out.writeShort(max_locals); - ByteBuffer duplicate = code.duplicate(); -- duplicate.rewind(); -+ ((Buffer)duplicate).rewind(); - int code_length = duplicate.limit(); - out.writeInt(code_length); - IO.copy(duplicate, out); ---- bnd-5.1.1.REL/biz.aQute.bndlib/src/aQute/bnd/classfile/SourceDebugExtensionAttribute.java 2020-06-16 23:03:04.000000000 +0200 -+++ bnd-5.1.1.REL/biz.aQute.bndlib/src/aQute/bnd/classfile/SourceDebugExtensionAttribute.java 2021-10-18 07:46:56.515450094 +0200 -@@ -3,6 +3,7 @@ - import java.io.DataInput; - import java.io.DataOutput; - import java.io.IOException; -+import java.nio.Buffer; - import java.nio.ByteBuffer; - - import aQute.lib.io.IO; -@@ -40,7 +41,7 @@ - out.writeShort(attribute_name_index); - out.writeInt(attribute_length); - ByteBuffer duplicate = debug_extension.duplicate(); -- duplicate.rewind(); -+ ((Buffer)duplicate).rewind(); - IO.copy(duplicate, out); - } - ---- bnd-5.1.1.REL/biz.aQute.bndlib/src/aQute/bnd/classfile/UnrecognizedAttribute.java 2020-06-16 23:03:04.000000000 +0200 -+++ bnd-5.1.1.REL/biz.aQute.bndlib/src/aQute/bnd/classfile/UnrecognizedAttribute.java 2021-10-18 08:14:58.714562788 +0200 -@@ -3,6 +3,7 @@ - import java.io.DataInput; - import java.io.DataOutput; - import java.io.IOException; -+import java.nio.Buffer; - import java.nio.ByteBuffer; - - import aQute.lib.io.IO; -@@ -41,7 +42,7 @@ - out.writeShort(attribute_name_index); - out.writeInt(attribute_length); - ByteBuffer duplicate = value.duplicate(); -- duplicate.rewind(); -+ ((Buffer)duplicate).rewind(); - IO.copy(duplicate, out); - } - ---- bnd-5.1.1.REL/biz.aQute.bndlib/src/aQute/bnd/osgi/Clazz.java 2020-06-16 23:03:04.000000000 +0200 -+++ bnd-5.1.1.REL/biz.aQute.bndlib/src/aQute/bnd/osgi/Clazz.java 2021-10-18 07:36:37.475442949 +0200 -@@ -23,6 +23,7 @@ - import java.io.InputStream; - import java.lang.annotation.RetentionPolicy; - import java.lang.reflect.Modifier; -+import java.nio.Buffer; - import java.nio.ByteBuffer; - import java.util.ArrayDeque; - import java.util.Arrays; -@@ -1201,7 +1202,7 @@ - - private void processCode(CodeAttribute attribute, ElementType elementType) { - ByteBuffer code = attribute.code.duplicate(); -- code.rewind(); -+ ((Buffer)code).rewind(); - int lastReference = -1; - while (code.hasRemaining()) { - int instruction = Byte.toUnsignedInt(code.get()); -@@ -1248,7 +1249,7 @@ - } - case OpCodes.wide : { - int opcode = Byte.toUnsignedInt(code.get()); -- code.position(code.position() + (opcode == OpCodes.iinc ? 4 : 2)); -+ ((Buffer)code).position(code.position() + (opcode == OpCodes.iinc ? 4 : 2)); - lastReference = -1; - break; - } -@@ -1256,12 +1257,12 @@ - // Skip to place divisible by 4 - int rem = code.position() % 4; - if (rem != 0) { -- code.position(code.position() + 4 - rem); -+ ((Buffer)code).position(code.position() + 4 - rem); - } - int deflt = code.getInt(); - int low = code.getInt(); - int high = code.getInt(); -- code.position(code.position() + (high - low + 1) * 4); -+ ((Buffer)code).position(code.position() + (high - low + 1) * 4); - lastReference = -1; - break; - } -@@ -1269,16 +1270,16 @@ - // Skip to place divisible by 4 - int rem = code.position() % 4; - if (rem != 0) { -- code.position(code.position() + 4 - rem); -+ ((Buffer)code).position(code.position() + 4 - rem); - } - int deflt = code.getInt(); - int npairs = code.getInt(); -- code.position(code.position() + npairs * 8); -+ ((Buffer)code).position(code.position() + npairs * 8); - lastReference = -1; - break; - } - default : { -- code.position(code.position() + OpCodes.OFFSETS[instruction]); -+ ((Buffer)code).position(code.position() + OpCodes.OFFSETS[instruction]); - lastReference = -1; - break; - } -@@ -1292,7 +1293,7 @@ - - private void visitCode(ClassDataCollector cd, CodeAttribute attribute, ElementType elementType) throws Exception { - ByteBuffer code = attribute.code.duplicate(); -- code.rewind(); -+ ((Buffer)code).rewind(); - while (code.hasRemaining()) { - int instruction = Byte.toUnsignedInt(code.get()); - switch (instruction) { -@@ -1309,7 +1310,7 @@ - case OpCodes.invokeinterface : { - int method_ref_index = Short.toUnsignedInt(code.getShort()); - visitReferenceMethod(cd, method_ref_index); -- code.position(code.position() + 2); -+ ((Buffer)code).position(code.position() + 2); - break; - } - case OpCodes.invokestatic : { -@@ -1319,34 +1320,34 @@ - } - case OpCodes.wide : { - int opcode = Byte.toUnsignedInt(code.get()); -- code.position(code.position() + (opcode == OpCodes.iinc ? 4 : 2)); -+ ((Buffer)code).position(code.position() + (opcode == OpCodes.iinc ? 4 : 2)); - break; - } - case OpCodes.tableswitch : { - // Skip to place divisible by 4 - int rem = code.position() % 4; - if (rem != 0) { -- code.position(code.position() + 4 - rem); -+ ((Buffer)code).position(code.position() + 4 - rem); - } - int deflt = code.getInt(); - int low = code.getInt(); - int high = code.getInt(); -- code.position(code.position() + (high - low + 1) * 4); -+ ((Buffer)code).position(code.position() + (high - low + 1) * 4); - break; - } - case OpCodes.lookupswitch : { - // Skip to place divisible by 4 - int rem = code.position() % 4; - if (rem != 0) { -- code.position(code.position() + 4 - rem); -+ ((Buffer)code).position(code.position() + 4 - rem); - } - int deflt = code.getInt(); - int npairs = code.getInt(); -- code.position(code.position() + npairs * 8); -+ ((Buffer)code).position(code.position() + npairs * 8); - break; - } - default : { -- code.position(code.position() + OpCodes.OFFSETS[instruction]); -+ ((Buffer)code).position(code.position() + OpCodes.OFFSETS[instruction]); - break; - } - } ---- bnd-5.1.1.REL/biz.aQute.bndlib/src/aQute/bnd/osgi/Jar.java 2020-06-16 23:03:04.000000000 +0200 -+++ bnd-5.1.1.REL/biz.aQute.bndlib/src/aQute/bnd/osgi/Jar.java 2021-10-18 07:40:21.304848650 +0200 -@@ -13,6 +13,7 @@ - import java.io.InputStream; - import java.io.OutputStream; - import java.net.URI; -+import java.nio.Buffer; - import java.nio.ByteBuffer; - import java.nio.file.FileVisitOption; - import java.nio.file.FileVisitResult; -@@ -1106,7 +1107,7 @@ - if ((bb != null) && bb.hasArray()) { - for (MessageDigest d : digests) { - d.update(bb); -- bb.flip(); -+ ((Buffer)bb).flip(); - } - } else { - try (InputStream in = r.openInputStream()) { ---- bnd-5.1.1.REL/biz.aQute.bndlib/src/aQute/bnd/osgi/URLResource.java 2020-06-16 23:03:04.000000000 +0200 -+++ bnd-5.1.1.REL/biz.aQute.bndlib/src/aQute/bnd/osgi/URLResource.java 2021-10-18 07:39:12.944410885 +0200 -@@ -7,6 +7,7 @@ - import java.net.MalformedURLException; - import java.net.URL; - import java.net.URLConnection; -+import java.nio.Buffer; - import java.nio.ByteBuffer; - import java.util.jar.JarFile; - -@@ -48,7 +49,7 @@ - return buffer = ByteBuffer.wrap(IO.read(in)); - } - ByteBuffer bb = IO.copy(in, ByteBuffer.allocate(size)); -- bb.flip(); -+ ((Buffer)bb).flip(); - return buffer = bb; - } - ---- bnd-5.1.1.REL/biz.aQute.bndlib/src/aQute/bnd/osgi/ZipResource.java 2020-06-16 23:03:04.000000000 +0200 -+++ bnd-5.1.1.REL/biz.aQute.bndlib/src/aQute/bnd/osgi/ZipResource.java 2021-10-18 07:37:53.975919239 +0200 -@@ -6,6 +6,7 @@ - import java.io.IOException; - import java.io.InputStream; - import java.io.OutputStream; -+import java.nio.Buffer; - import java.nio.ByteBuffer; - import java.nio.file.Path; - import java.util.zip.ZipEntry; -@@ -64,7 +65,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; - } - ---- bnd-5.1.1.REL/biz.aQute.repository/src/aQute/maven/provider/POM.java 2020-06-16 23:03:04.000000000 +0200 -+++ bnd-5.1.1.REL/biz.aQute.repository/src/aQute/maven/provider/POM.java 2021-10-18 07:49:09.756330007 +0200 -@@ -3,6 +3,7 @@ - import java.io.File; - import java.io.IOException; - import java.io.InputStream; -+import java.nio.Buffer; - import java.nio.ByteBuffer; - import java.nio.channels.FileChannel; - import java.nio.charset.StandardCharsets; -@@ -147,7 +148,7 @@ - try (FileChannel in = IO.readChannel(file.toPath())) { - ByteBuffer bb = ByteBuffer.allocate((int) in.size()); - while (in.read(bb) > 0) {} -- bb.flip(); -+ ((Buffer)bb).flip(); - return processEntities(bb); - } - } diff --git a/aqute-bnd.spec b/aqute-bnd.spec index f274171..cc0e44d 100644 --- a/aqute-bnd.spec +++ b/aqute-bnd.spec @@ -200,19 +200,19 @@ install -pm 0644 biz.aQute.bnd/target/biz.aQute.bnd-%{version}.jar %{buildroot}% install -pm 0644 biz.aQute.bnd.ant/target/biz.aQute.bnd.ant-%{version}.jar %{buildroot}%{_javadir}/%{name}/biz.aQute.bnd.ant.jar # poms install -dm 0755 %{buildroot}%{_mavenpomdir}/%{name} -%mvn_install_pom biz.aQute.bnd.exporters/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/biz.aQute.bnd.exporters.pom +%{mvn_install_pom} biz.aQute.bnd.exporters/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/biz.aQute.bnd.exporters.pom %add_maven_depmap %{name}/biz.aQute.bnd.exporters.pom %{name}/biz.aQute.bnd.exporters.jar -f bndlib -%mvn_install_pom biz.aQute.bnd.util/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/biz.aQute.bnd.util.pom +%{mvn_install_pom} biz.aQute.bnd.util/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/biz.aQute.bnd.util.pom %add_maven_depmap %{name}/biz.aQute.bnd.util.pom %{name}/biz.aQute.bnd.util.jar -f bndlib -%mvn_install_pom biz.aQute.bnd.annotation/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/biz.aQute.bnd.annotation.pom +%{mvn_install_pom} 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 -%mvn_install_pom aQute.libg/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/aQute.libg.pom +%{mvn_install_pom} aQute.libg/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/aQute.libg.pom %add_maven_depmap %{name}/aQute.libg.pom %{name}/aQute.libg.jar -f bndlib -%mvn_install_pom biz.aQute.bndlib/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/biz.aQute.bndlib.pom +%{mvn_install_pom} 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 -%mvn_install_pom biz.aQute.bnd/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/biz.aQute.bnd.pom +%{mvn_install_pom} 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:bnd,biz.aQute:bnd -%mvn_install_pom biz.aQute.bnd.ant/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/biz.aQute.bnd.ant.pom +%{mvn_install_pom} biz.aQute.bnd.ant/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/biz.aQute.bnd.ant.pom %add_maven_depmap %{name}/biz.aQute.bnd.ant.pom %{name}/biz.aQute.bnd.ant.jar # javadoc install -dm 0755 %{buildroot}%{_javadocdir}/%{name} diff --git a/bnd-6.3.1-build_xml.tar.xz b/bnd-6.3.1-build_xml.tar.xz index 62fb3f8..b74c012 100644 --- a/bnd-6.3.1-build_xml.tar.xz +++ b/bnd-6.3.1-build_xml.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2772170b1fce1419d8eed3ce0bad39f55b1b265346c8280544f17888427e5979 -size 2584 +oid sha256:c77f8f9a6f57efc84b875765563090d161c6d2fd7626f55bac5669e4feccff88 +size 2628 diff --git a/bnd-6.3.1.tar.xz b/bnd-6.3.1.tar.xz index a8ba0ed..3310dea 100644 --- a/bnd-6.3.1.tar.xz +++ b/bnd-6.3.1.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3bf2527963728874767aac12a817f914cf4188f632f323df68455c2e28a8d279 -size 3247528 +oid sha256:66d511e933109a91fd616f730fe6543ba73e0e70d23191f62811ecc5cd03ebab +size 3244484 diff --git a/bnd-maven-plugin.spec b/bnd-maven-plugin.spec index f3e7a5e..ccf7a98 100644 --- a/bnd-maven-plugin.spec +++ b/bnd-maven-plugin.spec @@ -77,7 +77,7 @@ pushd maven %pom_remove_dep -r org.junit:junit-bom -%mvn_package biz.aQute.bnd:bnd-plugin-parent __noinstall +%{mvn_package} biz.aQute.bnd:bnd-plugin-parent __noinstall popd %build From 8c2d7f21681740a7b8942e3b5058ef40e87bf2a26424906aaa8bc569be634d2c Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Mon, 18 Sep 2023 07:03:02 +0000 Subject: [PATCH 9/9] OBS-URL: https://build.opensuse.org/package/show/Java:packages/aqute-bnd?expand=0&rev=38 --- aqute-bnd.changes | 3 +++ bnd-maven-plugin.changes | 3 +++ 2 files changed, 6 insertions(+) diff --git a/aqute-bnd.changes b/aqute-bnd.changes index 514f4e4..2eff192 100644 --- a/aqute-bnd.changes +++ b/aqute-bnd.changes @@ -16,6 +16,9 @@ Mon Sep 18 05:23:18 UTC 2023 - Fridrich Strba * reproducible-timestamps.patch * reproducible-packages-list.patch + rediff to changed context +- Removed patch: + * aqute-bnd-java8compat.patch + + handled by release=8 in ant javac task ------------------------------------------------------------------- Sat Sep 16 10:08:36 UTC 2023 - Fridrich Strba diff --git a/bnd-maven-plugin.changes b/bnd-maven-plugin.changes index 8bece8a..07213a0 100644 --- a/bnd-maven-plugin.changes +++ b/bnd-maven-plugin.changes @@ -16,6 +16,9 @@ Mon Sep 18 05:23:18 UTC 2023 - Fridrich Strba * reproducible-timestamps.patch * reproducible-packages-list.patch + rediff to changed context +- Removed patch: + * aqute-bnd-java8compat.patch + + handled by release=8 in ant javac task ------------------------------------------------------------------- Sat Sep 16 10:08:36 UTC 2023 - Fridrich Strba