Bug#959224: buster-pu: package scilab/6.0.1-10

2020-05-01 Thread Julien Puydt
Le vendredi 01 mai 2020 à 16:38 +0100, Adam D. Barratt a écrit :
> Thanks, please feel free to upload that.

Done.

Thanks,

JP



Bug#959224: buster-pu: package scilab/6.0.1-10

2020-05-01 Thread Adam D. Barratt
Control: tags -1 + confirmed

On Fri, 2020-05-01 at 17:23 +0200, Julien Puydt wrote:
> Le vendredi 01 mai 2020 à 15:39 +0100, Adam D. Barratt a écrit :
> > Why -11? I assume the unstable upload will be 6.1.0+dfsg1-3, so
> > this
> > is still the first stable update to 6.0.1-10.
> 
> I uploaded 6.1.0+dfsg1-3 right now with the improved patch.
> 
> Here is the new commit against 6.0.1-10, making it 6.0.1-10+deb10u1.

Thanks, please feel free to upload that.

Regards,

Adam



Processed: Re: Bug#959224: buster-pu: package scilab/6.0.1-10

2020-05-01 Thread Debian Bug Tracking System
Processing control commands:

> tags -1 + confirmed
Bug #959224 [release.debian.org] buster-pu: package scilab/6.0.1-10
Added tag(s) confirmed.

-- 
959224: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=959224
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#959224: buster-pu: package scilab/6.0.1-10

2020-05-01 Thread Julien Puydt
Le vendredi 01 mai 2020 à 15:39 +0100, Adam D. Barratt a écrit :
> 
> Why -11? I assume the unstable upload will be 6.1.0+dfsg1-3, so this
> is still the first stable update to 6.0.1-10.

I uploaded 6.1.0+dfsg1-3 right now with the improved patch.

Here is the new commit against 6.0.1-10, making it 6.0.1-10+deb10u1.

Cheers,

JP

PS:
diff --git a/debian/changelog b/debian/changelog
index cf6e4d47f..deede011f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+scilab (6.0.1-10+deb10u1) buster; urgency=medium
+
+  * Add patch from Gilles Filippini to fix library path loading
+  with the recent openjdk 11.0.7 upload. (Closes: #955694, #959034)
+
+ -- Julien Puydt   Fri, 01 May 2020 16:47:40 +0200
+
 scilab (6.0.1-10) unstable; urgency=medium
 
   [ Alexis Murzeau ]
diff --git a/debian/patches/addLibraryPath.patch
b/debian/patches/addLibraryPath.patch
new file mode 100644
index 0..84abb8df3
--- /dev/null
+++ b/debian/patches/addLibraryPath.patch
@@ -0,0 +1,50 @@
+Description: openjdk 11.0.7 changes how reloading java.library.path
works
+ Now it's not possible anymore to force it by setting sys_paths to
null
+ The related jdk changeset is:
+ http://hg.openjdk.java.net/jdk-updates/jdk11u/rev/21710e014d7f
+Author: Gilles Filippini
+Forwarded: http://bugzilla.scilab.org/show_bug.cgi?id=16423
+
+---
scilab.orig/modules/jvm/src/java/org/scilab/modules/jvm/LibraryPath.jav
a

scilab/modules/jvm/src/java/org/scilab/modules/jvm/LibraryPath.java
+@@ -19,7 +19,9 @@
+ /*---
---*/
+ import java.io.IOException;
+ import java.io.File;
++import java.lang.reflect.Method;
+ import java.lang.reflect.Field;
++import java.lang.reflect.InvocationTargetException;
+ /*---
---*/
+ /*
http://forum.java.sun.com/thread.jspa?threadID=135560=15=0
*/
+ /*---
---*/
+@@ -64,14 +66,25 @@
+ /* The order matter here... see bug #4022 */
+ String newLibPath = System.getProperty(JAVALIBRARYPATH) +
File.pathSeparator + p;
+ System.setProperty(JAVALIBRARYPATH, newLibPath);
++// First try the new initLibraryPaths method
+ try {
+-Field fieldSysPath =
ClassLoader.class.getDeclaredField("sys_paths");
+-fieldSysPath.setAccessible(true);
+-if (fieldSysPath != null) {
++final Method initLibraryPaths =
ClassLoader.class.getDeclaredMethod("initLibraryPaths");
++initLibraryPaths.setAccessible(true);
++initLibraryPaths.invoke(null);
++} catch (NoSuchMethodException e) {
++// The initLibraryPaths method doesn't exist
++// Fallback setting sys_paths to null
++try {
++Field fieldSysPath =
ClassLoader.class.getDeclaredField("sys_paths");
++fieldSysPath.setAccessible(true);
+ fieldSysPath.set(System.class.getClassLoader(),
null);
++} catch (NoSuchFieldException e1) {
++throw new IOException("Error
NoSuchFieldException, could not add path to " + JAVALIBRARYPATH);
++} catch (IllegalAccessException e1) {
++throw new IOException("Error
IllegalAccessException, could not add path to " + JAVALIBRARYPATH);
+ }
+-} catch (NoSuchFieldException e) {
+-throw new IOException("Error NoSuchFieldException,
could not add path to " + JAVALIBRARYPATH);
++} catch (InvocationTargetException e) {
++throw new IOException("Error
InvocationTargetException, could not add path to " + JAVALIBRARYPATH);
+ } catch (IllegalAccessException e) {
+ throw new IOException("Error IllegalAccessException,
could not add path to " + JAVALIBRARYPATH);
+ }
diff --git a/debian/patches/series b/debian/patches/series
index c00c002ff..1979678c0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
+addLibraryPath.patch
 adddemo.diff
 librarypath.diff
 jh.diff



Bug#959224: buster-pu: package scilab/6.0.1-10

2020-05-01 Thread Adam D. Barratt
On Fri, 2020-05-01 at 16:36 +0200, Julien Puydt wrote:
> Le vendredi 01 mai 2020 à 11:59 +0100, Adam D. Barratt a écrit :
> > On Fri, 2020-05-01 at 12:37 +0200, Julien Puydt wrote:
> > > No... it's either with Gilles' patch and it works with 11.0.7 or
> > > without and it works with 11.0.6... any other combination doesn't
> > > work.
> 
> With Gilles' improved patch, I could build (hence, run) scilab in two
> schroots : one is bare stable with openjdk 11.0.6, and the other
> stable with security updates with openjdk 11.0.7.

Yay.

> So you'll find at the end the new commit I have against scilab's
> stable 6.0.1-10 to make it a 6.0.1-11+deb10u11.
> 

Why -11? I assume the unstable upload will be 6.1.0+dfsg1-3, so this is
still the first stable update to 6.0.1-10.

Regards,

Adam



Bug#959224: buster-pu: package scilab/6.0.1-10

2020-05-01 Thread Julien Puydt
Le vendredi 01 mai 2020 à 11:59 +0100, Adam D. Barratt a écrit :
> On Fri, 2020-05-01 at 12:37 +0200, Julien Puydt wrote:
> > No... it's either with Gilles' patch and it works with 11.0.7 or
> > without and it works with 11.0.6... any other combination doesn't
> > work.

With Gilles' improved patch, I could build (hence, run) scilab in two
schroots : one is bare stable with openjdk 11.0.6, and the other stable
with security updates with openjdk 11.0.7.

So you'll find at the end the new commit I have against scilab's stable
6.0.1-10 to make it a 6.0.1-11+deb10u11.

Cheers,

JP

PS:
commit a243d928e74f04edbb13686218dff5d6a6a90999
Author: Julien Puydt 
Date:   Thu Apr 30 17:22:15 2020 +0200

Add patch from Gilles Filippini to fix library path loading with
the recent openjdk 11.0.7 upload. (Closes: #955694, #959034)

diff --git a/debian/changelog b/debian/changelog
index cf6e4d47f..6578fd506 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+scilab (6.0.1-11+deb10u1) buster; urgency=medium
+
+  * Add patch from Gilles Filippini to fix library path loading
+  with the recent openjdk 11.0.7 upload. (Closes: #955694, #959034)
+
+ -- Julien Puydt   Thu, 30 Apr 2020 17:15:32 +0200
+
 scilab (6.0.1-10) unstable; urgency=medium
 
   [ Alexis Murzeau ]
diff --git a/debian/patches/addLibraryPath.patch
b/debian/patches/addLibraryPath.patch
new file mode 100644
index 0..84abb8df3
--- /dev/null
+++ b/debian/patches/addLibraryPath.patch
@@ -0,0 +1,50 @@
+Description: openjdk 11.0.7 changes how reloading java.library.path
works
+ Now it's not possible anymore to force it by setting sys_paths to
null
+ The related jdk changeset is:
+ http://hg.openjdk.java.net/jdk-updates/jdk11u/rev/21710e014d7f
+Author: Gilles Filippini
+Forwarded: http://bugzilla.scilab.org/show_bug.cgi?id=16423
+
+---
scilab.orig/modules/jvm/src/java/org/scilab/modules/jvm/LibraryPath.jav
a

scilab/modules/jvm/src/java/org/scilab/modules/jvm/LibraryPath.java
+@@ -19,7 +19,9 @@
+ /*---
---*/
+ import java.io.IOException;
+ import java.io.File;
++import java.lang.reflect.Method;
+ import java.lang.reflect.Field;
++import java.lang.reflect.InvocationTargetException;
+ /*---
---*/
+ /*
http://forum.java.sun.com/thread.jspa?threadID=135560=15=0
*/
+ /*---
---*/
+@@ -64,14 +66,25 @@
+ /* The order matter here... see bug #4022 */
+ String newLibPath = System.getProperty(JAVALIBRARYPATH) +
File.pathSeparator + p;
+ System.setProperty(JAVALIBRARYPATH, newLibPath);
++// First try the new initLibraryPaths method
+ try {
+-Field fieldSysPath =
ClassLoader.class.getDeclaredField("sys_paths");
+-fieldSysPath.setAccessible(true);
+-if (fieldSysPath != null) {
++final Method initLibraryPaths =
ClassLoader.class.getDeclaredMethod("initLibraryPaths");
++initLibraryPaths.setAccessible(true);
++initLibraryPaths.invoke(null);
++} catch (NoSuchMethodException e) {
++// The initLibraryPaths method doesn't exist
++// Fallback setting sys_paths to null
++try {
++Field fieldSysPath =
ClassLoader.class.getDeclaredField("sys_paths");
++fieldSysPath.setAccessible(true);
+ fieldSysPath.set(System.class.getClassLoader(),
null);
++} catch (NoSuchFieldException e1) {
++throw new IOException("Error
NoSuchFieldException, could not add path to " + JAVALIBRARYPATH);
++} catch (IllegalAccessException e1) {
++throw new IOException("Error
IllegalAccessException, could not add path to " + JAVALIBRARYPATH);
+ }
+-} catch (NoSuchFieldException e) {
+-throw new IOException("Error NoSuchFieldException,
could not add path to " + JAVALIBRARYPATH);
++} catch (InvocationTargetException e) {
++throw new IOException("Error
InvocationTargetException, could not add path to " + JAVALIBRARYPATH);
+ } catch (IllegalAccessException e) {
+ throw new IOException("Error IllegalAccessException,
could not add path to " + JAVALIBRARYPATH);
+ }
diff --git a/debian/patches/series b/debian/patches/series
index c00c002ff..1979678c0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
+addLibraryPath.patch
 adddemo.diff
 librarypath.diff
 jh.diff



Bug#959224: buster-pu: package scilab/6.0.1-10

2020-05-01 Thread Adam D. Barratt
On Fri, 2020-05-01 at 15:57 +0200, Julien Puydt wrote:
> Le vendredi 01 mai 2020 à 11:59 +0100, Adam D. Barratt a écrit :
> > On Fri, 2020-05-01 at 12:37 +0200, Julien Puydt wrote:
> > > Le vendredi 01 mai 2020 à 11:21 +0100, Adam D. Barratt a écrit :
> > > > Just to confirm, does scilab with this patch still work if used
> > > > in
> > > > conjunction with OpenJDK 11.0.6? (11.0.7 isn't currently
> > > > available
> > > > on a few architectures.)
> > > 
> > > No... it's either with Gilles' patch and it works with 11.0.7 or
> > > without and it works with 11.0.6... any other combination doesn't
> > > work.
> > 
> > Thanks for the confirmation
> 
> Gilles Filippini has proposed another patch for scilab, which would
> make scilab work with both 11.0.6 and 11.0.7 - I still have to test
> it, but that would definitely be a better solution.

Thanks, that sounds promising.

As a note, the window for getting fixes into 10.4 closes during this
weekend and as usual the fix wants to be in unstable first.

Regards,

Adam



Bug#959224: buster-pu: package scilab/6.0.1-10

2020-05-01 Thread Julien Puydt
Le vendredi 01 mai 2020 à 11:59 +0100, Adam D. Barratt a écrit :
> On Fri, 2020-05-01 at 12:37 +0200, Julien Puydt wrote:
> > Le vendredi 01 mai 2020 à 11:21 +0100, Adam D. Barratt a écrit :
> > > Just to confirm, does scilab with this patch still work if used
> > > in
> > > conjunction with OpenJDK 11.0.6? (11.0.7 isn't currently
> > > available
> > > on a few architectures.)
> > 
> > No... it's either with Gilles' patch and it works with 11.0.7 or
> > without and it works with 11.0.6... any other combination doesn't
> > work.
> 
> Thanks for the confirmation

Gilles Filippini has proposed another patch for scilab, which would
make scilab work with both 11.0.6 and 11.0.7 - I still have to test it,
but that would definitely be a better solution.

JP



Bug#959224: buster-pu: package scilab/6.0.1-10

2020-05-01 Thread Adam D. Barratt
On Fri, 2020-05-01 at 12:37 +0200, Julien Puydt wrote:
> Le vendredi 01 mai 2020 à 11:21 +0100, Adam D. Barratt a écrit :
> > Just to confirm, does scilab with this patch still work if used in
> > conjunction with OpenJDK 11.0.6? (11.0.7 isn't currently available
> > on a few architectures.)
> 
> No... it's either with Gilles' patch and it works with 11.0.7 or
> without and it works with 11.0.6... any other combination doesn't
> work.

Thanks for the confirmation.

Do we have any idea how much scilab is used on the missing
architectures? (armel, mipsel, mips64el) I've given the builds back in
case they manage to build on a new attempt.

> I must admit was quite surprised to see openjdk 11.0.7 find its way
> to stable, since it was known to trigger a FTBFS in scilab.

Unfortunately for Oracle products, the Security Team don't have a great
deal of options for more granular updates.

Regards,

Adam



Bug#959224: buster-pu: package scilab/6.0.1-10

2020-05-01 Thread Julien Puydt
Le vendredi 01 mai 2020 à 11:21 +0100, Adam D. Barratt a écrit :
> Just to confirm, does scilab with this patch still work if used in
> conjunction with OpenJDK 11.0.6? (11.0.7 isn't currently available on
> a few architectures.)

No... it's either with Gilles' patch and it works with 11.0.7 or
without and it works with 11.0.6... any other combination doesn't work.

I must admit was quite surprised to see openjdk 11.0.7 find its way to
stable, since it was known to trigger a FTBFS in scilab.

Hope it helps,

JP



Processed: Re: Bug#959224: buster-pu: package scilab/6.0.1-10

2020-05-01 Thread Debian Bug Tracking System
Processing control commands:

> tags -1 + moreinfo
Bug #959224 [release.debian.org] buster-pu: package scilab/6.0.1-10
Added tag(s) moreinfo.

-- 
959224: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=959224
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#959224: buster-pu: package scilab/6.0.1-10

2020-05-01 Thread Adam D. Barratt
Control: tags -1 + moreinfo

On Fri, 2020-05-01 at 09:15 +0200, Julien Puydt wrote:
> I received reports (#955694 [main report], #956908 [duplicate]) that
> scilab 6.1.0+dfsg1-1 stopped working in sid : the move from openjdk
> 11.0.6 to 11.0.7 broke some of its code ; Gilles Filippini provided a
> patch and 6.1.0+dfsg1-2 fixed the problem.
> 
> Unfortunately, this openjdk also found its way to stable-sec, so
> broke scilab 6.0.1-10 there (#959034), so I would like to upload a
> 6.0.1-11+deb10u1 which would be 6.0.1-10 + adapted patch.
> 

Just to confirm, does scilab with this patch still work if used in
conjunction with OpenJDK 11.0.6? (11.0.7 isn't currently available on a
few architectures.)

Regards,

Adam



Bug#959224: buster-pu: package scilab/6.0.1-10

2020-05-01 Thread Julien Puydt
Package: release.debian.org
Severity: normal
Tags: buster
User: release.debian@packages.debian.org
Usertags: pu

I received reports (#955694 [main report], #956908 [duplicate]) that scilab
6.1.0+dfsg1-1 stopped working in sid : the move from openjdk 11.0.6 to 11.0.7
broke some of its code ; Gilles Filippini provided a patch and 6.1.0+dfsg1-2
fixed the problem.

Unfortunately, this openjdk also found its way to stable-sec, so broke scilab
6.0.1-10 there (#959034), so I would like to upload a 6.0.1-11+deb10u1 which
would be 6.0.1-10 + adapted patch.

>From tag debian/6.0.1-10, I added a single commit, and checked with sbuild and
a stable+stable-sec that it unbroke things (scilab is run to compile doc, so
getting the package to build is a valid check). I'm putting that commit at the
end of this mail.

The same openjdk will probably also move to stable, so the fixed scilab should
also follow it.

Thanks,

JP

PS: here it is:
commit 55df6269e8ac1a5a4200dbb759c3661bbd1249f2
Author: Julien Puydt 
Date:   Thu Apr 30 17:22:15 2020 +0200

Add patch from Gilles Filippini to fix library path loading with the recent
openjdk 11.0.7 upload. (Closes: #955694, #959034)

diff --git a/debian/changelog b/debian/changelog
index cf6e4d47f..6578fd506 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+scilab (6.0.1-11+deb10u1) buster; urgency=medium
+
+  * Add patch from Gilles Filippini to fix library path loading
+  with the recent openjdk 11.0.7 upload. (Closes: #955694, #959034)
+
+ -- Julien Puydt   Thu, 30 Apr 2020 17:15:32 +0200
+
 scilab (6.0.1-10) unstable; urgency=medium

   [ Alexis Murzeau ]
diff --git a/debian/patches/addLibraryPath.patch
b/debian/patches/addLibraryPath.patch
new file mode 100644
index 0..d20db1600
--- /dev/null
+++ b/debian/patches/addLibraryPath.patch
@@ -0,0 +1,40 @@
+Description: openjdk 11.0.7 changes how reloading java.library.path works
+ Not it's not possible anymore to force it by setting sys_paths to null
+ The related jdk changeset is:
+ http://hg.openjdk.java.net/jdk-updates/jdk11u/rev/21710e014d7f
+Author: Gilles Filippini
+Forwarded: http://bugzilla.scilab.org/show_bug.cgi?id=16423
+
+--- scilab.orig/modules/jvm/src/java/org/scilab/modules/jvm/LibraryPath.java
 scilab/modules/jvm/src/java/org/scilab/modules/jvm/LibraryPath.java
+@@ -19,7 +19,8 @@
+
/*--*/
+ import java.io.IOException;
+ import java.io.File;
+-import java.lang.reflect.Field;
++import java.lang.reflect.Method;
++import java.lang.reflect.InvocationTargetException;
+
/*--*/
+ /*http://forum.java.sun.com/thread.jspa?threadID=135560=15=0 */
+
/*--*/
+@@ -65,13 +66,13 @@
+ String newLibPath = System.getProperty(JAVALIBRARYPATH) +
File.pathSeparator + p;
+ System.setProperty(JAVALIBRARYPATH, newLibPath);
+ try {
+-Field fieldSysPath =
ClassLoader.class.getDeclaredField("sys_paths");
+-fieldSysPath.setAccessible(true);
+-if (fieldSysPath != null) {
+-fieldSysPath.set(System.class.getClassLoader(), null);
+-}
+-} catch (NoSuchFieldException e) {
+-throw new IOException("Error NoSuchFieldException, could not
add path to " + JAVALIBRARYPATH);
++final Method initLibraryPaths =
ClassLoader.class.getDeclaredMethod("initLibraryPaths");
++initLibraryPaths.setAccessible(true);
++initLibraryPaths.invoke(null);
++} catch (NoSuchMethodException e) {
++throw new IOException("Error NoSuchMethodException, could not
add path to " + JAVALIBRARYPATH);
++} catch (InvocationTargetException e) {
++throw new IOException("Error InvocationTargetException, could
not add path to " + JAVALIBRARYPATH);
+ } catch (IllegalAccessException e) {
+ throw new IOException("Error IllegalAccessException, could
not add path to " + JAVALIBRARYPATH);
+ }
diff --git a/debian/patches/series b/debian/patches/series
index c00c002ff..1979678c0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
+addLibraryPath.patch
 adddemo.diff
 librarypath.diff
 jh.diff