Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package woodstox-core for openSUSE:Factory 
checked in at 2023-08-31 13:45:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/woodstox-core (Old)
 and      /work/SRC/openSUSE:Factory/.woodstox-core.new.1766 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "woodstox-core"

Thu Aug 31 13:45:36 2023 rev:7 rq:1108065 version:6.2.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/woodstox-core/woodstox-core.changes      
2022-05-25 20:36:05.428355596 +0200
+++ /work/SRC/openSUSE:Factory/.woodstox-core.new.1766/woodstox-core.changes    
2023-08-31 13:51:16.628145109 +0200
@@ -1,0 +2,10 @@
+Wed Aug 23 12:48:41 UTC 2023 - Fridrich Strba <fst...@suse.com>
+
+- Added patches:
+  * 0001-Allow-building-against-OSGi-APIs-newer-than-R4.patch
+    + port to latest OSGi APIs
+  * 0002-Patch-out-optional-support-for-msv-and-relax-schema-.patch
+    + drop requirements unmaintained optional dependencies: msv and
+      relaxng
+
+-------------------------------------------------------------------

New:
----
  0001-Allow-building-against-OSGi-APIs-newer-than-R4.patch
  0002-Patch-out-optional-support-for-msv-and-relax-schema-.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ woodstox-core.spec ++++++
--- /var/tmp/diff_new_pack.JEMfyx/_old  2023-08-31 13:51:17.636181139 +0200
+++ /var/tmp/diff_new_pack.JEMfyx/_new  2023-08-31 13:51:17.640181282 +0200
@@ -1,7 +1,7 @@
 #
 # spec file
 #
-# Copyright (c) 2022 SUSE LLC
+# 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
@@ -26,18 +26,18 @@
 Group:          Development/Libraries/Java
 URL:            https://github.com/FasterXML/woodstox
 Source0:        
https://github.com/FasterXML/%{base_name}/archive/%{name}-%{version}.tar.gz
+# Port to latest OSGi APIs
+Patch0:         0001-Allow-building-against-OSGi-APIs-newer-than-R4.patch
+# Drop requirements on defunct optional dependencies: msv and relaxng
+Patch1:         0002-Patch-out-optional-support-for-msv-and-relax-schema-.patch
 BuildRequires:  fdupes
 BuildRequires:  java-devel >= 1.8
 BuildRequires:  maven-local
 BuildRequires:  mvn(com.fasterxml:oss-parent:pom:)
-BuildRequires:  mvn(junit:junit)
-BuildRequires:  mvn(net.java.dev.msv:msv-core)
-BuildRequires:  mvn(net.java.dev.msv:xsdlib)
 BuildRequires:  mvn(org.apache.felix:maven-bundle-plugin)
 BuildRequires:  mvn(org.apache.maven.plugins:maven-shade-plugin)
 BuildRequires:  mvn(org.codehaus.woodstox:stax2-api)
 BuildRequires:  mvn(org.osgi:osgi.core)
-BuildRequires:  mvn(relaxngDatatype:relaxngDatatype)
 BuildArch:      noarch
 
 %description
@@ -55,6 +55,12 @@
 
 %prep
 %setup -q -n %{base_name}-%{name}-%{version}
+%patch0 -p1
+%patch1 -p1
+
+%pom_remove_dep relaxngDatatype:relaxngDatatype
+%pom_remove_dep net.java.dev.msv:
+rm -rf src/main/java/com/ctc/wstx/msv
 
 %pom_remove_plugin :nexus-staging-maven-plugin
 

++++++ 0001-Allow-building-against-OSGi-APIs-newer-than-R4.patch ++++++
>From 18c3c498a8099dca74127abbc958d696b4397825 Mon Sep 17 00:00:00 2001
From: Mat Booth <mat.bo...@redhat.com>
Date: Wed, 18 Sep 2019 16:00:51 +0100
Subject: [PATCH 1/2] Allow building against OSGi APIs newer than R4

---
 .../ctc/wstx/osgi/WstxBundleActivator.java    | 24 ++++++++++++++-----
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/src/main/java/com/ctc/wstx/osgi/WstxBundleActivator.java 
b/src/main/java/com/ctc/wstx/osgi/WstxBundleActivator.java
index b233267..cedf476 100644
--- a/src/main/java/com/ctc/wstx/osgi/WstxBundleActivator.java
+++ b/src/main/java/com/ctc/wstx/osgi/WstxBundleActivator.java
@@ -1,6 +1,8 @@
 package com.ctc.wstx.osgi;
 
 import java.util.Dictionary;
+import java.util.Hashtable;
+import java.util.Properties;
 
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
@@ -30,19 +32,29 @@ public class WstxBundleActivator
     public void start(BundleContext ctxt)
     {
         InputFactoryProviderImpl inputP = new InputFactoryProviderImpl();
-        final Dictionary inputProps = inputP.getProperties();
-        ctxt.registerService(Stax2InputFactoryProvider.class.getName(), 
inputP, inputProps);
+        ctxt.registerService(Stax2InputFactoryProvider.class.getName(), 
inputP, convertPropsToDict(inputP.getProperties()));
         OutputFactoryProviderImpl outputP = new OutputFactoryProviderImpl();
-        final Dictionary outputProps = outputP.getProperties();
-        ctxt.registerService(Stax2OutputFactoryProvider.class.getName(), 
outputP, outputProps);
+        ctxt.registerService(Stax2OutputFactoryProvider.class.getName(), 
outputP, convertPropsToDict(outputP.getProperties()));
         ValidationSchemaFactoryProviderImpl[] impls = 
ValidationSchemaFactoryProviderImpl.createAll();
         for (int i = 0, len = impls.length; i < len; ++i) {
             ValidationSchemaFactoryProviderImpl impl = impls[i];
-            final Dictionary implProps = impl.getProperties();
-            
ctxt.registerService(Stax2ValidationSchemaFactoryProvider.class.getName(), 
impl, implProps);
+            
ctxt.registerService(Stax2ValidationSchemaFactoryProvider.class.getName(), 
impl, convertPropsToDict(impl.getProperties()));
         }
     }
 
+    /**
+     * A Properties object is a Dictionary<Object,Object> but the OSGi API got
+     * more restrictive and requires a Dictionary<String,Object>, so we must do
+     * a quick conversion here.
+     */
+    private Dictionary<String,Object> convertPropsToDict(Properties props) {
+               Dictionary<String,Object> dict = new Hashtable<String,Object>();
+               for (Object key : props.keySet()) {
+                       dict.put(key.toString(), props.get(key));
+               }
+               return dict;
+    }
+
     @Override
     public void stop(BundleContext ctxt) {
         // Nothing to do here: OSGi automatically de-registers services upon
-- 
2.28.0


++++++ 0002-Patch-out-optional-support-for-msv-and-relax-schema-.patch ++++++
>From 44c46d0412b02942c77f502a578ca3d1c1f0559d Mon Sep 17 00:00:00 2001
From: Mat Booth <mat.bo...@redhat.com>
Date: Wed, 22 Apr 2020 13:48:07 +0100
Subject: [PATCH 2/2] Patch out optional support for msv and relax schema
 validation

---
 .../ValidationSchemaFactoryProviderImpl.java  | 26 +------------------
 .../vstream/BaseStax2ValidationTest.java      | 24 -----------------
 .../java/stax2/vwstream/BaseOutputTest.java   |  2 +-
 .../wstxtest/vstream/BaseValidationTest.java  | 12 ---------
 4 files changed, 2 insertions(+), 62 deletions(-)

diff --git 
a/src/main/java/com/ctc/wstx/osgi/ValidationSchemaFactoryProviderImpl.java 
b/src/main/java/com/ctc/wstx/osgi/ValidationSchemaFactoryProviderImpl.java
index d7822bc..2c24f98 100644
--- a/src/main/java/com/ctc/wstx/osgi/ValidationSchemaFactoryProviderImpl.java
+++ b/src/main/java/com/ctc/wstx/osgi/ValidationSchemaFactoryProviderImpl.java
@@ -8,8 +8,6 @@ import 
org.codehaus.stax2.osgi.Stax2ValidationSchemaFactoryProvider;
 
 import com.ctc.wstx.api.ValidatorConfig;
 import com.ctc.wstx.dtd.DTDSchemaFactory;
-import com.ctc.wstx.msv.RelaxNGSchemaFactory;
-import com.ctc.wstx.msv.W3CSchemaFactory;
 
 public abstract class ValidationSchemaFactoryProviderImpl
     implements Stax2ValidationSchemaFactoryProvider
@@ -24,7 +22,7 @@ public abstract class ValidationSchemaFactoryProviderImpl
     public static ValidationSchemaFactoryProviderImpl[] createAll()
     {
         return new ValidationSchemaFactoryProviderImpl[] {
-            new DTD(), new RelaxNG(), new W3CSchema()
+            new DTD()
         };
     }
 
@@ -59,26 +57,4 @@ public abstract class ValidationSchemaFactoryProviderImpl
             return new DTDSchemaFactory();
         }
     }
-
-    final static class RelaxNG
-        extends ValidationSchemaFactoryProviderImpl
-    {
-        RelaxNG() { super(XMLValidationSchema.SCHEMA_ID_RELAXNG); }
-
-        @Override
-        public XMLValidationSchemaFactory createValidationSchemaFactory() {
-            return new RelaxNGSchemaFactory();
-        }
-    }
-
-    final static class W3CSchema
-        extends ValidationSchemaFactoryProviderImpl
-    {
-        W3CSchema() { super(XMLValidationSchema.SCHEMA_ID_W3C_SCHEMA); }
-
-        @Override
-        public XMLValidationSchemaFactory createValidationSchemaFactory() {
-            return new W3CSchemaFactory();
-        }
-    }
 }
diff --git a/src/test/java/stax2/vstream/BaseStax2ValidationTest.java 
b/src/test/java/stax2/vstream/BaseStax2ValidationTest.java
index 7ee0706..bf607bc 100644
--- a/src/test/java/stax2/vstream/BaseStax2ValidationTest.java
+++ b/src/test/java/stax2/vstream/BaseStax2ValidationTest.java
@@ -8,8 +8,6 @@ import org.codehaus.stax2.XMLStreamReader2;
 import org.codehaus.stax2.validation.*;
 
 import com.ctc.wstx.dtd.DTDSchemaFactory;
-import com.ctc.wstx.msv.RelaxNGSchemaFactory;
-import com.ctc.wstx.msv.W3CSchemaFactory;
 
 import stax2.BaseStax2Test;
 
@@ -20,25 +18,10 @@ public abstract class BaseStax2ValidationTest
     //    by implementations other than Woodstox, that do NOT support non-ns 
mode.
     protected final static boolean HAS_NON_NS_MODE = true;
     
-    protected XMLValidationSchemaFactory newW3CSchemaValidatorFactory() {
-        return new W3CSchemaFactory();
-    }
-
-    protected XMLValidationSchemaFactory newRelaxNGValidatorFactory() {
-        return new RelaxNGSchemaFactory();
-    }
-
     protected XMLValidationSchemaFactory newDTDValidatorFactory() {
         return new DTDSchemaFactory();
     }
 
-    protected XMLValidationSchema parseRngSchema(String contents)
-        throws XMLStreamException
-    {
-        return newRelaxNGValidatorFactory()
-                .createSchema(new StringReader(contents));
-    }
-
     protected XMLValidationSchema parseDTDSchema(String contents)
         throws XMLStreamException
     {
@@ -46,13 +29,6 @@ public abstract class BaseStax2ValidationTest
                 .createSchema(new StringReader(contents));
     }
 
-    protected XMLValidationSchema parseW3CSchema(String contents)
-        throws XMLStreamException
-    {
-        return newW3CSchemaValidatorFactory()
-                .createSchema(new StringReader(contents));
-    }
-
     protected void verifyFailure(String xml, XMLValidationSchema schema, 
String failMsg,
                                  String failPhrase) throws XMLStreamException
     {
diff --git a/src/test/java/stax2/vwstream/BaseOutputTest.java 
b/src/test/java/stax2/vwstream/BaseOutputTest.java
index a9e1ec5..475703e 100644
--- a/src/test/java/stax2/vwstream/BaseOutputTest.java
+++ b/src/test/java/stax2/vwstream/BaseOutputTest.java
@@ -36,7 +36,7 @@ abstract class BaseOutputTest
         outf.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, 
Boolean.valueOf(repairing));
 
         XMLStreamWriter2 strw = 
(XMLStreamWriter2)outf.createXMLStreamWriter(w);
-        XMLValidationSchema schema = parseW3CSchema(schemaSrc);
+        XMLValidationSchema schema = parseDTDSchema(schemaSrc);
 
         strw.validateAgainst(schema);
         strw.writeStartDocument();
diff --git a/src/test/java/wstxtest/vstream/BaseValidationTest.java 
b/src/test/java/wstxtest/vstream/BaseValidationTest.java
index b9d0c54..5ec3da2 100644
--- a/src/test/java/wstxtest/vstream/BaseValidationTest.java
+++ b/src/test/java/wstxtest/vstream/BaseValidationTest.java
@@ -25,24 +25,12 @@ public abstract class BaseValidationTest
         return schF.createSchema(ref);
     }
 
-    protected XMLValidationSchema parseRngSchema(String contents)
-        throws XMLStreamException
-    {
-        return parseSchema(contents, XMLValidationSchema.SCHEMA_ID_RELAXNG);
-    }
-
     protected XMLValidationSchema parseDTDSchema(String contents)
         throws XMLStreamException
     {
         return parseSchema(contents, XMLValidationSchema.SCHEMA_ID_DTD);
     }
 
-    protected XMLValidationSchema parseW3CSchema(String contents)
-        throws XMLStreamException
-    {
-        return parseSchema(contents, XMLValidationSchema.SCHEMA_ID_W3C_SCHEMA);
-    }
-
     protected void verifyFailure(String xml, XMLValidationSchema schema, 
String failMsg,
                                  String failPhrase) throws XMLStreamException
     {
-- 
2.28.0

Reply via email to