commit 40273dcf9ab6df457bce41aabc07c626c7c05bb8b2c5b01afda0ac2c9f847993 Author: Adrian Schröter Date: Fri May 3 11:07:28 2024 +0200 Sync from SUSE:SLFO:Main aqute-bnd revision 69dbdf37a7e961a7205a0516e2d21507 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/0001-Disable-removed-commands.patch b/0001-Disable-removed-commands.patch new file mode 100644 index 0000000..86f074c --- /dev/null +++ b/0001-Disable-removed-commands.patch @@ -0,0 +1,108 @@ +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; +@@ -3921,54 +3920,6 @@ public class bnd extends Processor { + getInfo(profiles); + } + +- /** +- * Resolve command +- * +- * @throws Exception +- */ +- +- public void _resolve(ResolveCommand.ResolveOptions options) throws Exception { +- ResolveCommand rc = new ResolveCommand(this); +- String help = options._command() +- .subCmd(options, rc); +- if (help != null) +- out.println(help); +- getInfo(rc); +- rc.close(); +- } +- +- /** +- * Remote command +- * +- * @throws Exception +- */ +- +- public void _remote(RemoteCommand.RemoteOptions options) throws Exception { +- RemoteCommand rc = new RemoteCommand(this, options); +- String help = options._command() +- .subCmd(options, rc); +- if (help != null) +- out.println(help); +- getInfo(rc); +- rc.close(); +- } +- +- /** +- * Nexus commands +- * +- * @throws Exception +- */ +- +- public void _nexus(NexusCommand.NexusOptions options) throws Exception { +- NexusCommand rc = new NexusCommand(this, options); +- String help = options._command() +- .subCmd(options, rc); +- if (help != null) +- out.println(help); +- getInfo(rc); +- rc.close(); +- } +- + /** + * Export a bndrun file + */ +@@ -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 { + + } + +- @Description("Generate and export reports of a workspace, a project or of a jar.") +- public void _exportreport(ExportReportCommand.ReporterOptions options) throws Exception { +- ExportReportCommand mc = new ExportReportCommand(this); +- mc.run(options); +- getInfo(mc); +- } +- +- @Description("Maintain Maven Bnd Repository GAV files") +- public void _mbr(MbrCommand.MrOptions options) throws Exception { +- MbrCommand c = new MbrCommand(this, options); +- CommandLine cl = new CommandLine(this); +- String s = cl.subCmd(options, c); +- if (s != null) { +- out.println(s); +- } +- getInfo(c); +- } +- + @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/0002-Port-to-OSGI-7.0.0.patch b/0002-Port-to-OSGI-7.0.0.patch new file mode 100644 index 0000000..79da882 --- /dev/null +++ b/0002-Port-to-OSGI-7.0.0.patch @@ -0,0 +1,102 @@ +From 64a36cbc8d7c8234dfa2af8670c2e1ea4a5c3909 Mon Sep 17 00:00:00 2001 +From: Marian Koncek +Date: Thu, 11 Jul 2019 14:29:26 +0200 +Subject: [PATCH] Port to OSGI 7.0.0 + +--- + .../src/aQute/bnd/junit/ConsoleLogger.java | 62 +++++++++++++++++++ + 1 file changed, 62 insertions(+) + +diff --git a/biz.aQute.bndlib/src/aQute/bnd/junit/ConsoleLogger.java b/biz.aQute.bndlib/src/aQute/bnd/junit/ConsoleLogger.java +index 9c2591f..569b20e 100644 +--- a/biz.aQute.bndlib/src/aQute/bnd/junit/ConsoleLogger.java ++++ b/biz.aQute.bndlib/src/aQute/bnd/junit/ConsoleLogger.java +@@ -15,9 +15,11 @@ import org.osgi.framework.ServiceFactory; + import org.osgi.framework.ServiceReference; + import org.osgi.framework.ServiceRegistration; + import org.osgi.service.log.LogEntry; ++import org.osgi.service.log.LogLevel; + import org.osgi.service.log.LogListener; + import org.osgi.service.log.LogReaderService; + import org.osgi.service.log.LogService; ++import org.osgi.service.log.Logger; + + @Deprecated // see biz.aQute.bnd.remote.junit + public class ConsoleLogger implements LogReaderService { +@@ -76,6 +78,36 @@ public class ConsoleLogger implements LogReaderService { + return time; + } + ++ @Override ++ public LogLevel getLogLevel() { ++ // TODO Auto-generated method stub ++ return null; ++ } ++ ++ @Override ++ public String getLoggerName() { ++ // TODO Auto-generated method stub ++ return null; ++ } ++ ++ @Override ++ public long getSequence() { ++ // TODO Auto-generated method stub ++ return 0; ++ } ++ ++ @Override ++ public String getThreadInfo() { ++ // TODO Auto-generated method stub ++ return null; ++ } ++ ++ @Override ++ public StackTraceElement getLocation() { ++ // TODO Auto-generated method stub ++ return null; ++ } ++ + } + + public class Facade implements LogService { +@@ -112,6 +144,36 @@ public class ConsoleLogger implements LogReaderService { + + } + ++ @Override ++ public Logger getLogger(String name) { ++ // TODO Auto-generated method stub ++ return null; ++ } ++ ++ @Override ++ public Logger getLogger(Class clazz) { ++ // TODO Auto-generated method stub ++ return null; ++ } ++ ++ @Override ++ public L getLogger(String name, Class loggerType) { ++ // TODO Auto-generated method stub ++ return null; ++ } ++ ++ @Override ++ public L getLogger(Class clazz, Class loggerType) { ++ // TODO Auto-generated method stub ++ return null; ++ } ++ ++ @Override ++ public L getLogger(Bundle bundle, String name, Class loggerType) { ++ // TODO Auto-generated method stub ++ return null; ++ } ++ + } + + public ConsoleLogger(BundleContext context) { +-- +2.20.1 + 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/_multibuild b/_multibuild new file mode 100644 index 0000000..050e1c5 --- /dev/null +++ b/_multibuild @@ -0,0 +1,4 @@ + + bnd-maven-plugin + + diff --git a/_service b/_service new file mode 100644 index 0000000..8e4c5fc --- /dev/null +++ b/_service @@ -0,0 +1,24 @@ + + + git + https://github.com/bndtools/bnd.git + 6.3.1 + @PARENT_TAG@ + gradlew* + docs + **.jar + **.class + **.ar + **.gz + **.bz2 + **.xz + **.zip + **.exe + **.dll + + + *.tar + xz + + + diff --git a/aQute.libg-6.3.1.pom b/aQute.libg-6.3.1.pom new file mode 100644 index 0000000..4918cdc --- /dev/null +++ b/aQute.libg-6.3.1.pom @@ -0,0 +1,110 @@ + + + 4.0.0 + biz.aQute.bnd + aQute.libg + 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/ + + 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 + + + org.slf4j + slf4j-api + 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.2.0 + compile + + + org.osgi + org.osgi.util.promise + 1.2.0 + compile + + + diff --git a/aqute-bnd.changes b/aqute-bnd.changes new file mode 100644 index 0000000..2eff192 --- /dev/null +++ b/aqute-bnd.changes @@ -0,0 +1,103 @@ +------------------------------------------------------------------- +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 +- Removed patch: + * aqute-bnd-java8compat.patch + + handled by release=8 in ant javac task + +------------------------------------------------------------------- +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 deterministic + +------------------------------------------------------------------- +Thu May 4 14:25:12 UTC 2023 - Dominique Leuenberger + +- Add _multibuild to define 2nd spec file as additional flavor. + Eliminates the need for source package links in OBS. + +------------------------------------------------------------------- +Wed Apr 26 17:47:47 UTC 2023 - Fridrich Strba + +- Fetch sources using source_service and don't distribute legally + spurious files (bsc#1210878) + +------------------------------------------------------------------- +Wed Nov 10 08:13:30 UTC 2021 - Fridrich Strba + +- Update to aqute-bnd 5.1.1 + * ant plugin is in separate artifact +- Removed patch: + * 0002-Fix-ant-compatibility.patch + + fixed by upstream + +------------------------------------------------------------------- +Tue Oct 19 07:20:57 UTC 2021 - Fridrich Strba + +- Modified patches: + * 0001-Disable-removed-commands.patch + * 0002-Fix-ant-compatibility.patch + * 0001-Port-to-OSGI-7.0.0.patch -> 0003-Port-to-OSGI-7.0.0.patch + + rediff to changed context +- Added patch: + * 0004-maven-plugin-dependencies.patch + + Do not build a whole artifact, if we need only one source file + +------------------------------------------------------------------- +Mon Oct 18 06:21:29 UTC 2021 - Fridrich Strba + +- Added patch: + + aqute-bnd-java8compat.patch + + Produce bytecode compatible with Java 8 + +------------------------------------------------------------------- +Thu Feb 18 01:00:32 UTC 2021 - Marcel Witte + +- Update to aqute-bnd 5.1.1 +- Removed patch: + * aqute-bnd-3.5.0-java8compat.patch + +------------------------------------------------------------------- +Wed Apr 1 08:09:22 UTC 2020 - Fridrich Strba + +- Addes patch: + * 0001-Port-to-OSGI-7.0.0.patch + + Port to OSGI 7.0.0 + +------------------------------------------------------------------- +Wed Jun 26 15:29:03 UTC 2019 - Fridrich Strba + +- Add aliases for the aqute-bnd artifact + +------------------------------------------------------------------- +Thu Mar 14 10:43:20 UTC 2019 - Fridrich Strba + +- Correct error with duplicate identical aliases for two different + artifacts + +------------------------------------------------------------------- +Tue Feb 12 08:34:57 UTC 2019 - Fridrich Strba + +- Initial packaging of aqute-bnd 3.5.0 +- Add ant build.xml files in order to build without having to use + gradle diff --git a/aqute-bnd.spec b/aqute-bnd.spec new file mode 100644 index 0000000..cc0e44d --- /dev/null +++ b/aqute-bnd.spec @@ -0,0 +1,246 @@ +# +# spec file for package aqute-bnd +# +# Copyright (c) 2023 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: aqute-bnd +Version: 6.3.1 +Release: 0 +Summary: BND Tool +# Part of jpm is under BSD, but jpm is not included in binary RPM +License: Apache-2.0 +Group: Development/Libraries/Java +URL: 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.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.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 >= 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: javapackages-tools +BuildArch: noarch + +%description +The bnd tool helps you create and diagnose OSGi bundles. +The key functions are: +- Show the manifest and JAR contents of a bundle +- Wrap a JAR so that it becomes a bundle +- Create a Bundle from a specification and a class path +- Verify the validity of the manifest entries +The tool is capable of acting as: +- Command line tool +- File format +- Directives +- Use of macros + +%package -n aqute-bndlib +Summary: BND library +Group: Development/Libraries/Java + +%description -n aqute-bndlib +%{summary}. + +%package javadoc +Summary: Javadoc for %{name} +Group: Documentation/HTML + +%description javadoc +API documentation for %{name}. + +%prep +%setup -q -n bnd-%{version} -a 1 + +mkdir -p lib +build-jar-repository -s lib \ + slf4j/api slf4j/simple osgi-annotation osgi-core osgi-compendium ant jline + +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 + +# 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_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 + +# bnd.annotation +pushd biz.aQute.bnd.annotation +cp -p %{SOURCE6} pom.xml +%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_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 %{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 :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_xpath_remove pom:dependency/pom:scope +popd + +%build +%{ant} +%{ant} javadoc + +%install +# 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 +install -pm 0644 biz.aQute.bnd/target/biz.aQute.bnd-%{version}.jar %{buildroot}%{_javadir}/%{name}/biz.aQute.bnd.jar +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 +%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 +%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 +%{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 +%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 +%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 +%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 +mv biz.aQute.bnd/target/site/apidocs %{buildroot}%{_javadocdir}/%{name}/biz.aQute.bnd +mv biz.aQute.bnd.ant/target/site/apidocs %{buildroot}%{_javadocdir}/%{name}/biz.aQute.bnd.ant +%fdupes -s %{buildroot}%{_javadocdir} + +install -d -m 755 %{buildroot}%{_sysconfdir}/ant.d +echo "aqute-bnd slf4j/api slf4j/simple osgi-annotation osgi-core osgi-compendium" >%{buildroot}%{_sysconfdir}/ant.d/%{name} + +%jpackage_script aQute.bnd.main.bnd "" "" aqute-bnd:slf4j/api:slf4j/simple:osgi-annotation:osgi-core:osgi-compendium bnd 1 + +%files -f .mfiles +%license LICENSE +%{_bindir}/bnd +%config(noreplace) %{_sysconfdir}/ant.d/* +%dir %{_sysconfdir}/ant.d + +%files -n aqute-bndlib -f .mfiles-bndlib +%license LICENSE + +%files javadoc +%license LICENSE +%{_javadocdir} + +%changelog diff --git a/biz.aQute.bnd-6.3.1.pom b/biz.aQute.bnd-6.3.1.pom new file mode 100644 index 0000000..e91612f --- /dev/null +++ b/biz.aQute.bnd-6.3.1.pom @@ -0,0 +1,200 @@ + + + 4.0.0 + biz.aQute.bnd + biz.aQute.bnd + 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/ + + 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 + 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 + + + org.osgi + org.osgi.service.log + 1.3.0 + provided + + + org.osgi + org.osgi.service.repository + 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 + 6.3.1 + provided + + + biz.aQute.bnd + biz.aQute.bnd.ant + 6.3.1 + provided + + + biz.aQute.bnd + biz.aQute.resolve + 6.3.1 + provided + + + biz.aQute.bnd + biz.aQute.repository + 6.3.1 + provided + + + biz.aQute.bnd + biz.aQute.bnd.exporters + 6.3.1 + provided + + + biz.aQute.bnd + biz.aQute.bnd.reporter + 6.3.1 + provided + + + biz.aQute.bnd + biz.aQute.remote.api + 6.3.1 + provided + + + org.yaml + snakeyaml + 1.15 + provided + + + org.slf4j + slf4j-api + 1.7.25 + provided + + + org.slf4j + slf4j-simple + 1.7.25 + provided + + + jline + jline + 2.14.6 + provided + + + diff --git a/biz.aQute.bnd.annotation-6.3.1.pom b/biz.aQute.bnd.annotation-6.3.1.pom new file mode 100644 index 0000000..5967109 --- /dev/null +++ b/biz.aQute.bnd.annotation-6.3.1.pom @@ -0,0 +1,98 @@ + + + 4.0.0 + biz.aQute.bnd + biz.aQute.bnd.annotation + 6.3.1 + bnd Annotations Library + biz.aQute.bnd.annotation + 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 + + + org.osgi + org.osgi.namespace.extender + 1.0.1 + provided + + + org.osgi + org.osgi.namespace.service + 1.0.0 + provided + + + org.osgi + org.osgi.resource + 1.0.0 + compile + + + org.osgi + org.osgi.service.serviceloader + 1.0.0 + compile + + + diff --git a/biz.aQute.bnd.ant-6.3.1.pom b/biz.aQute.bnd.ant-6.3.1.pom new file mode 100644 index 0000000..7b620a9 --- /dev/null +++ b/biz.aQute.bnd.ant-6.3.1.pom @@ -0,0 +1,98 @@ + + + 4.0.0 + biz.aQute.bnd + biz.aQute.bnd.ant + 6.3.1 + Bnd Ant Tasks + biz.aQute.bnd.ant + 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 + + + biz.aQute.bnd + biz.aQute.bnd.util + 6.3.1 + compile + + + biz.aQute.bnd + biz.aQute.bndlib + 6.3.1 + compile + + + org.slf4j + slf4j-api + 1.7.25 + compile + + + org.apache.ant + ant + 1.10.12 + compile + + + diff --git a/biz.aQute.bnd.exporters-6.3.1.pom b/biz.aQute.bnd.exporters-6.3.1.pom new file mode 100644 index 0000000..3db5055 --- /dev/null +++ b/biz.aQute.bnd.exporters-6.3.1.pom @@ -0,0 +1,98 @@ + + + 4.0.0 + biz.aQute.bnd + biz.aQute.bnd.exporters + 6.3.1 + biz.aQute.bnd.exporters + biz.aQute.bnd.exporters + 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.core + 6.0.0 + provided + + + org.osgi + org.osgi.service.subsystem + 1.1.0 + provided + + + biz.aQute.bnd + biz.aQute.bnd.util + 6.3.1 + compile + + + biz.aQute.bnd + biz.aQute.bndlib + 6.3.1 + compile + + + org.slf4j + slf4j-api + 1.7.25 + 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-6.3.1.pom b/biz.aQute.bndlib-6.3.1.pom new file mode 100644 index 0000000..b3437f5 --- /dev/null +++ b/biz.aQute.bndlib-6.3.1.pom @@ -0,0 +1,158 @@ + + + 4.0.0 + biz.aQute.bnd + biz.aQute.bndlib + 6.3.1 + bndlib: A Swiss Army Knife for OSGi + biz.aQute.bndlib + 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 + + + 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.tracker + 1.5.4 + compile + + + org.osgi + org.osgi.namespace.contract + 1.0.0 + provided + + + org.osgi + org.osgi.namespace.extender + 1.0.1 + provided + + + org.osgi + org.osgi.namespace.implementation + 1.0.0 + provided + + + org.osgi + org.osgi.namespace.service + 1.0.0 + provided + + + org.osgi + org.osgi.service.log + 1.3.0 + compile + + + org.osgi + org.osgi.service.repository + 1.1.0 + compile + + + org.osgi + org.osgi.util.function + 1.2.0 + compile + + + org.osgi + org.osgi.util.promise + 1.2.0 + compile + + + biz.aQute.bnd + biz.aQute.bnd.util + 6.3.1 + compile + + + org.slf4j + slf4j-api + 1.7.25 + compile + + + 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..b74c012 --- /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:c77f8f9a6f57efc84b875765563090d161c6d2fd7626f55bac5669e4feccff88 +size 2628 diff --git a/bnd-6.3.1.tar.xz b/bnd-6.3.1.tar.xz new file mode 100644 index 0000000..3310dea --- /dev/null +++ b/bnd-6.3.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:66d511e933109a91fd616f730fe6543ba73e0e70d23191f62811ecc5cd03ebab +size 3244484 diff --git a/bnd-maven-plugin.changes b/bnd-maven-plugin.changes new file mode 100644 index 0000000..07213a0 --- /dev/null +++ b/bnd-maven-plugin.changes @@ -0,0 +1,85 @@ +------------------------------------------------------------------- +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 +- Removed patch: + * aqute-bnd-java8compat.patch + + handled by release=8 in ant javac task + +------------------------------------------------------------------- +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 deterministic + +------------------------------------------------------------------- +Wed Apr 26 17:47:47 UTC 2023 - Fridrich Strba + +- Fetch sources using source_service and don't distribute legally + spurious files (bsc#1210878) + +------------------------------------------------------------------- +Wed Nov 10 08:13:30 UTC 2021 - Fridrich Strba + +- Update to aqute-bnd 5.1.1 + * ant plugin is in separate artifact +- Removed patch: + * 0002-Fix-ant-compatibility.patch + + fixed by upstream + +------------------------------------------------------------------- +Tue Oct 19 07:20:57 UTC 2021 - Fridrich Strba + +- Modified patches: + * 0001-Disable-removed-commands.patch + * 0002-Fix-ant-compatibility.patch + * 0001-Port-to-OSGI-7.0.0.patch -> 0003-Port-to-OSGI-7.0.0.patch + + rediff to changed context +- Added patch: + * 0004-maven-plugin-dependencies.patch + + Do not build a whole artifact, if we need only one source file + +------------------------------------------------------------------- +Mon Oct 18 06:21:29 UTC 2021 - Fridrich Strba + +- Added patch: + + aqute-bnd-java8compat.patch + + Produce bytecode compatible with Java 8 + +------------------------------------------------------------------- +Thu Feb 18 01:00:32 UTC 2021 - Marcel Witte + +- Update to aqute-bnd 5.1.1 +- Removed patch: + * aqute-bnd-3.5.0-java8compat.patch + +------------------------------------------------------------------- +Wed Apr 1 08:09:22 UTC 2020 - Fridrich Strba + +- Addes patch: + * 0001-Port-to-OSGI-7.0.0.patch + + Port to OSGI 7.0.0 + +------------------------------------------------------------------- +Wed Apr 3 09:33:04 UTC 2019 - Fridrich Strba + +- Initial packaging of the bnd-maven-plugin distributed as a part + of aqute-bnd 3.5.0 diff --git a/bnd-maven-plugin.spec b/bnd-maven-plugin.spec new file mode 100644 index 0000000..ccf7a98 --- /dev/null +++ b/bnd-maven-plugin.spec @@ -0,0 +1,100 @@ +# +# spec file for package bnd-maven-plugin +# +# Copyright (c) 2023 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: bnd-maven-plugin +Version: 6.3.1 +Release: 0 +Summary: BND Maven plugin +# Part of jpm is under BSD, but jpm is not included in binary RPM +License: Apache-2.0 +Group: Development/Libraries/Java +URL: https://bnd.bndtools.org/ +Source0: bnd-%{version}.tar.xz +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) >= %{version} +BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin) +BuildRequires: mvn(org.apache.maven.shared:maven-mapping) +BuildRequires: mvn(org.codehaus.plexus:plexus-component-metadata) +BuildArch: noarch + +%description +Collection of various Maven plugins provided by the Bnd project. + +%package javadoc +Summary: Javadoc for %{name} +Group: Development/Libraries/Java + +%description javadoc +API documentation for %{name}. + +%prep +%setup -q -n bnd-%{version} + +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -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 +# 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-reporter-maven-plugin +%pom_disable_module bnd-resolver-maven-plugin +%pom_disable_module bnd-run-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_remove_dep -r org.junit:junit-bom + +%{mvn_package} biz.aQute.bnd:bnd-plugin-parent __noinstall +popd + +%build +pushd maven +%{mvn_build} -f -- -Dproject.build.sourceEncoding=UTF-8 -Dsource=8 +popd + +%install +pushd maven +%mvn_install +popd +%fdupes -s %{buildroot}%{_javadocdir} + +%files -f maven/.mfiles +%license LICENSE + +%files javadoc -f maven/.mfiles-javadoc +%license LICENSE + +%changelog 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 new file mode 100644 index 0000000..11244bf --- /dev/null +++ b/reproducible-timestamps.patch @@ -0,0 +1,40 @@ +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 { + 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; +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 +@@ -904,6 +904,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)); +@@ -922,6 +926,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; + } +