Bug#1056329: Cannot create simple TCPMUXPLUS service - produces seg fault

2023-11-20 Thread Brian Blood
Disregard,

I did not see in the xinetd.conf manpage that you have to also add the base 
tcpmux service file.



Bug#1056329: xinetd: Cannot create simple TCPMUXPLUS service - produces seg fault

2023-11-20 Thread Brian Blood
Package: xinetd
Version: 1:2.3.15.3-1+b1
Severity: important

Dear Maintainer,

I'm trying to create a simple TCPMUXPLUS service that takes a TCP connection 
and returns a predetermined amount a entropy.

Here is my xinet.d conf file:

# default: off
# description: An xinetd service which provides entropy.
# the shell script called will return 128 bytes of entropy to the caller.
service entropy
{
id  = entropy
type= TCPMUXPLUS UNLISTED
socket_type = stream
protocol= tcp
disable = no
#flags   = KEEPALIVE IPv4
instances   = 40
server  = /srv/xinetd-entropy.sh
log_type= FILE /var/log/entropy-xinetd.log
log_on_success  = PID HOST USERID EXIT DURATION
log_on_failure  = HOST USERID ATTEMPT
user= nobody
wait= no
}

In this form, restarting xinetd produces this syslog output:

systemd[1]: Started xinetd.service - LSB: Starts or stops the xinetd daemon..
xinetd[9295]: Reading included configuration file: /etc/xinetd.d/chargen 
[file=/etc/xinetd.conf] [line=14]
xinetd[9295]: Reading included configuration file: /etc/xinetd.d/chargen-udp 
[file=/etc/xinetd.d/chargen-udp] [line=28]
xinetd[9295]: Reading included configuration file: /etc/xinetd.d/daytime 
[file=/etc/xinetd.d/daytime] [line=14]
xinetd[9295]: Reading included configuration file: /etc/xinetd.d/daytime-udp 
[file=/etc/xinetd.d/daytime-udp] [line=26]
xinetd[9295]: Reading included configuration file: /etc/xinetd.d/discard 
[file=/etc/xinetd.d/discard] [line=14]
xinetd[9295]: Reading included configuration file: /etc/xinetd.d/discard-udp 
[file=/etc/xinetd.d/discard-udp] [line=25]
xinetd[9295]: Reading included configuration file: /etc/xinetd.d/echo 
[file=/etc/xinetd.d/echo] [line=14]
xinetd[9295]: Reading included configuration file: /etc/xinetd.d/echo-udp 
[file=/etc/xinetd.d/echo-udp] [line=26]
xinetd[9295]: Reading included configuration file: /etc/xinetd.d/egd-py 
[file=/etc/xinetd.d/egd-py] [line=14]
xinetd[9295]: Reading included configuration file: /etc/xinetd.d/entropy 
[file=/etc/xinetd.d/entropy] [line=21]
xinetd[9295]: Reading included configuration file: /etc/xinetd.d/servers 
[file=/etc/xinetd.d/servers] [line=21]
xinetd[9295]: Reading included configuration file: /etc/xinetd.d/services 
[file=/etc/xinetd.d/services] [line=13]
xinetd[9295]: Reading included configuration file: /etc/xinetd.d/time 
[file=/etc/xinetd.d/time] [line=13]
xinetd[9295]: Reading included configuration file: /etc/xinetd.d/time-udp 
[file=/etc/xinetd.d/time-udp] [line=28]
xinetd[9295]: 2.3.15.3 started with libwrap loadavg labeled-networking options 
compiled in.
xinetd[9295]: Started working: 0 available services





When I comment out the socket_type and protocol lines in the conf (since they 
are redundant to type being TCPMUXPLUS), restarting xinetd segfaults:


systemd[1]: Started xinetd.service - LSB: Starts or stops the xinetd daemon..
xinetd[9364]: Reading included configuration file: /etc/xinetd.d/chargen 
[file=/etc/xinetd.conf] [line=14]
xinetd[9364]: Reading included configuration file: /etc/xinetd.d/chargen-udp 
[file=/etc/xinetd.d/chargen-udp] [line=28]
xinetd[9364]: Reading included configuration file: /etc/xinetd.d/daytime 
[file=/etc/xinetd.d/daytime] [line=14]
xinetd[9364]: Reading included configuration file: /etc/xinetd.d/daytime-udp 
[file=/etc/xinetd.d/daytime-udp] [line=26]
xinetd[9364]: Reading included configuration file: /etc/xinetd.d/discard 
[file=/etc/xinetd.d/discard] [line=14]
xinetd[9364]: Reading included configuration file: /etc/xinetd.d/discard-udp 
[file=/etc/xinetd.d/discard-udp] [line=25]
xinetd[9364]: Reading included configuration file: /etc/xinetd.d/echo 
[file=/etc/xinetd.d/echo] [line=14]
xinetd[9364]: Reading included configuration file: /etc/xinetd.d/echo-udp 
[file=/etc/xinetd.d/echo-udp] [line=26]
xinetd[9364]: Reading included configuration file: /etc/xinetd.d/egd-py 
[file=/etc/xinetd.d/egd-py] [line=14]
xinetd[9364]: Reading included configuration file: /etc/xinetd.d/entropy 
[file=/etc/xinetd.d/entropy] [line=21]
xinetd[9364]: Reading included configuration file: /etc/xinetd.d/servers 
[file=/etc/xinetd.d/servers] [line=21]
xinetd[9364]: Reading included configuration file: /etc/xinetd.d/services 
[file=/etc/xinetd.d/services] [line=13]
xinetd[9364]: Reading included configuration file: /etc/xinetd.d/time 
[file=/etc/xinetd.d/time] [line=13]
xinetd[9364]: Reading included configuration file: /etc/xinetd.d/time-udp 
[file=/etc/xinetd.d/time-udp] [line=28]
xinetd[9364]: 9364 {general_handler} (9364) Unexpected signal: 11 (Segmentation 
fault)
xinetd[9364]: 9364 {general_handler} (9364) Unexpected signal: 11 (Segmentation 
fault)
xinetd[9364]: 9364 {general_handler} (9364) Unexpected signal: 11 (Segmentation 
fault)
xinetd[9364]: 9364 {general_handler} (9364) Unexpected signal: 11 (Segmentation 
fault)
xinetd[9364]: 9364 

Bug#1013281: closed by Debian FTP Masters (reply to Pierre Gruet ) (Bug#1013281: fixed in batik 1.14-2)

2022-07-18 Thread Brian Blood
> We have two things here:
> - The org.apache.batik.apps.rasterizer.Main class has been moved to 
> another jar: /usr/share/java/batik-svgrasterizer.jar;
> - Some Class-Path and Main-Class indications are missing in the jars we 
> ship in libbatik-java.
> 
> I believe your call would be OK right now if you tried
>   rasterizer -m image/png -scriptSecurityOff -w 1920 
> /tmp/ramdisk/svgproc-b83e35c457f48904da8a39a01d230d48.svg
> 
> rasterizer is a script lying in /usr/bin that we ship in libbatik-java.
> 
> 
> 

(FYI, I installed Inkscape on my system to have an alternate SVG renderer)



I’ve tried several different SVGs:


# rasterizer -d /tmp/rampdisk/ -m image/png -scriptSecurityOff -w 1920 
/usr/share/inkscape/icons/multicolor/symbolic/actions/xml-node-delete-symbolic.svg.2019_12_27_20_11_26.0.svg
[warning] /usr/bin/rasterizer: JVM flavor 'sun' not understood
About to transcode 1 SVG file(s)

Converting xml-node-delete-symbolic.svg.2019_12_27_20_11_26.0.svg to 
/tmp/rampdisk/xml-node-delete-symbolic.svg.2019_12_27_20_11_26.0.png ... … 
success


This says success, but there is no output file.




# rasterizer -d /tmp/rampdisk/ -m image/png -scriptSecurityOff -w 1920 
/usr/share/apache2/icons/apache_pb.svg   
[warning] /usr/bin/rasterizer: JVM flavor 'sun' not understood
About to transcode 1 SVG file(s)

Converting apache_pb.svg to /tmp/rampdisk/apache_pb.png ... Exception in thread 
"main" java.lang.NoClassDefFoundError: 
org/apache/xmlgraphics/java2d/color/NamedColorSpace
at 
org.apache.batik.bridge.SVGShapeElementBridge.createShapePainter(SVGShapeElementBridge.java:117)
at 
org.apache.batik.bridge.SVGDecoratedShapeElementBridge.createFillStrokePainter(SVGDecoratedShapeElementBridge.java:58)
at 
org.apache.batik.bridge.SVGDecoratedShapeElementBridge.createShapePainter(SVGDecoratedShapeElementBridge.java:84)
at 
org.apache.batik.bridge.SVGShapeElementBridge.buildGraphicsNode(SVGShapeElementBridge.java:91)
at 
org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:224)
at 
org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:171)
at 
org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:219)
at 
org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:171)
at 
org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:219)
at 
org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:171)
at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:82)
at 
org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:210)
at 
org.apache.batik.transcoder.image.ImageTranscoder.transcode(ImageTranscoder.java:92)
at 
org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:142)
at 
org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:158)
at 
org.apache.batik.apps.rasterizer.SVGConverter.transcode(SVGConverter.java:1008)
at 
org.apache.batik.apps.rasterizer.SVGConverter.execute(SVGConverter.java:719)
at org.apache.batik.apps.rasterizer.Main.execute(Main.java:954)
at org.apache.batik.apps.rasterizer.Main.main(Main.java:1007)
Caused by: java.lang.ClassNotFoundException: 
org.apache.xmlgraphics.java2d.color.NamedColorSpace
at 
java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at 
java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 19 more

No output here of course.



> Please tell me if you need it in bullseye or if calling
>   rasterizer ...
> is OK for you.

I do not have a "testing" box try out the fix and rasterizer on bullseye seems 
to have same/similar problems.



Bug#1013281: libbatik-java: Running rasterizer fails with inability to load main class org.apache.batik.apps.rasterizer.Main

2022-06-20 Thread Brian Blood
Package: libbatik-java
Version: 1.12-4
Severity: grave
Justification: renders package unusable

Dear Maintainer,


Been using this kind of call against a Jessie install of this package for years:

java -jar /usr/share/java/batik-rasterizer.jar  -m image/png  
-scriptSecurityOff -w 1920 
/tmp/ramdisk/svgproc-b83e35c457f48904da8a39a01d230d48.svg


After upgrading system to bullseye, the same call produces this error:

Error: Could not find or load main class org.apache.batik.apps.rasterizer.Main
Caused by: java.lang.ClassNotFoundException: 
org.apache.batik.apps.rasterizer.Main


From what I can tell, this was repackaged from having the actual code inside to 
the jar to being references to other jars.
However it looks as if all of the manifests now have a "lib/" prefixed to the 
classpaths and this causes java to fail at finding any usable source.

As a test, I created a symlink called lib inside /usr/share/java/ that simply 
points back to the same directory.
There were still some errors, but it looked like java could at least find some 
of the other jars it was looking at.

This might turn out to be a repackaging problem since the source package on the 
Apache site does come with all the jars stored into a "lib" directory.



-- System Information:
Debian Release: 11.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-15-amd64 (SMP w/2 CPU threads)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libbatik-java depends on:
ii  java-wrappers 0.3
ii  libjaxp1.3-java   1.3.05-6
ii  libxalan2-java2.7.2-4
ii  libxml-commons-external-java  1.4.01-5
ii  libxmlgraphics-commons-java   2.4-2~deb11u1

Versions of packages libbatik-java recommends:
ii  default-jre  2:1.11-72

Versions of packages libbatik-java suggests:
ii  librhino-java  1.7.7.2-3

-- no debconf information