[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1033952: marked as done (unblock: osgi-core/8.0.0-2)



Your message dated Tue, 04 Apr 2023 21:38:38 +0000
with message-id <E1pjoMQ-004mzz-D9@respighi.debian.org>
and subject line unblock osgi-core
has caused the Debian Bug report #1033952,
regarding unblock: osgi-core/8.0.0-2
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1033952: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1033952
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
X-Debbugs-Cc: osgi-core@packages.debian.org
Control: affects -1 + src:osgi-core

Please unblock package osgi-core

[ Reason ]
The LoggerFactory and LogEntry interface definitions where added to
osgi-core in version 8.0.0 duplication those in osgi-compendium.
osgi-compendium carries a Debian patch to adopt the APIs to be backward
compatible that was missing from osgi-core resulting in src:bnd FTBFS
(#1026606). 8.0.0-2 copies this patch so both packages provide the same
API.

[ Impact ]
src:bnd can not be build without this patch.

[ Tests ]
I did a test rebuild of src:bnd to make sure it compiles again:
https://tests.reproducible-builds.org/debian/rb-pkg/bnd.html

[ Risks ]
Given that the patch is already in osgi-compendium since 2020 and it
only provides default implementations for the added API methods I don't
see a risk.

Alternative solutions I looked into:

- Adopting src:bnd to implement the new API. I tried this but the diff
  was rather large with no added value. Also I assume there are other
  packages depending on the old API.

- removing LoggerFactory and LogEntry from osgi-core again which would
  result in a diff to the upstream source and probably other packages
  failing.

[ Checklist ]
  [X] all changes are documented in the d/changelog
  [X] I reviewed all changes and I approve them
  [X] attach debdiff against the package in testing

unblock osgi-core/8.0.0-2
diff --git a/debian/changelog b/debian/changelog
index 0f8c8cf..ee0ef4a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+osgi-core (8.0.0-2) unstable; urgency=medium
+
+  * Team upload.
+  * Preserve backward compatibility in logging interface.
+    Turned the new interface methods into default methods to preserve the
+    backward compatibility. Taken from osgi-compendium. (Closes: #1026606)
+
+ -- Jochen Sprickerhof <jspricke@debian.org>  Mon, 03 Apr 2023 14:57:28 +0200
+
 osgi-core (8.0.0-1) unstable; urgency=medium
 
   * Team upload.
diff --git a/debian/patches/01-backward-compatibility.patch b/debian/patches/01-backward-compatibility.patch
new file mode 100644
index 0000000..a45e721
--- /dev/null
+++ b/debian/patches/01-backward-compatibility.patch
@@ -0,0 +1,95 @@
+Description: Preserves the source compatibility with older versions of the API
+Author: Emmanuel Bourg <ebourg@apache.org>
+Forwarded: not-needed
+--- a/org/osgi/service/log/LoggerFactory.java
++++ b/org/osgi/service/log/LoggerFactory.java
+@@ -61,7 +61,7 @@
+ 	 *         parameter is equal to {@link Logger#ROOT_LOGGER_NAME}, then the
+ 	 *         root logger is returned.
+ 	 */
+-	Logger getLogger(String name);
++	default Logger getLogger(String name) { throw new UnsupportedOperationException(); }
+ 
+ 	/**
+ 	 * Return the {@link Logger} named with the specified class.
+@@ -70,7 +70,7 @@
+ 	 *            {@code null}.
+ 	 * @return The {@link Logger} named with the name of the specified class.
+ 	 */
+-	Logger getLogger(Class< ? > clazz);
++	default Logger getLogger(Class< ? > clazz) { throw new UnsupportedOperationException(); }
+ 
+ 	/**
+ 	 * Return the {@link Logger} of the specified type named with the specified
+@@ -88,7 +88,7 @@
+ 	 * @throws IllegalArgumentException If the specified type is not a supported
+ 	 *             Logger type.
+ 	 */
+-	<L extends Logger> L getLogger(String name, Class<L> loggerType);
++	default <L extends Logger> L getLogger(String name, Class<L> loggerType) { throw new UnsupportedOperationException(); }
+ 
+ 	/**
+ 	 * Return the {@link Logger} of the specified type named with the specified
+@@ -104,7 +104,7 @@
+ 	 * @throws IllegalArgumentException If the specified type is not a supported
+ 	 *             Logger type.
+ 	 */
+-	<L extends Logger> L getLogger(Class< ? > clazz, Class<L> loggerType);
++	default <L extends Logger> L getLogger(Class< ? > clazz, Class<L> loggerType) {throw new UnsupportedOperationException(); }
+ 
+ 	/**
+ 	 * Return the {@link Logger} of the specified type named with the specified
+@@ -130,6 +130,6 @@
+ 	 * @throws IllegalArgumentException If the specified type is not a supported
+ 	 *             Logger type or the specified Bundle is not a resolved bundle.
+ 	 */
+-	<L extends Logger> L getLogger(Bundle bundle, String name,
+-			Class<L> loggerType);
++	default <L extends Logger> L getLogger(Bundle bundle, String name,
++			Class<L> loggerType) { throw new UnsupportedOperationException(); }
+ }
+--- a/org/osgi/service/log/LogEntry.java
++++ b/org/osgi/service/log/LogEntry.java
+@@ -111,7 +111,7 @@
+ 	 * @return The level of this {@code LogEntry} object.
+ 	 * @since 1.4
+ 	 */
+-	LogLevel getLogLevel();
++	default LogLevel getLogLevel() { throw new UnsupportedOperationException(); }
+ 
+ 	/**
+ 	 * Returns the name of the {@link Logger} object used to create this
+@@ -121,7 +121,7 @@
+ 	 *         {@code LogEntry} object.
+ 	 * @since 1.4
+ 	 */
+-	String getLoggerName();
++	default String getLoggerName() { throw new UnsupportedOperationException(); }
+ 
+ 	/**
+ 	 * Returns the sequence number for this {@code LogEntry} object.
+@@ -133,7 +133,7 @@
+ 	 * @return The sequence number for this {@code LogEntry} object.
+ 	 * @since 1.4
+ 	 */
+-	long getSequence();
++	default long getSequence() { throw new UnsupportedOperationException(); }
+ 
+ 	/**
+ 	 * Returns a string representing the thread which created this
+@@ -146,7 +146,7 @@
+ 	 *         {@code LogEntry} object.
+ 	 * @since 1.4
+ 	 */
+-	String getThreadInfo();
++	default String getThreadInfo() { throw new UnsupportedOperationException(); }
+ 
+ 	/**
+ 	 * Returns the location information of the creation of this {@code LogEntry}
+@@ -156,5 +156,5 @@
+ 	 *         object.
+ 	 * @since 1.4
+ 	 */
+-	StackTraceElement getLocation();
++	default StackTraceElement getLocation() { throw new UnsupportedOperationException(); }
+ }
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..4e58ea8
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+01-backward-compatibility.patch

--- End Message ---
--- Begin Message ---
Unblocked.

--- End Message ---

Reply to: