fusesource / jansi

Jansi is a small java library that allows you to use ANSI escape sequences to format your console output which works even on windows.
http://fusesource.github.io/jansi/
Apache License 2.0
1.12k stars 140 forks source link

JAnsi 2.1.1 release is not fully reproducible #185

Closed hboutemy closed 3 years ago

hboutemy commented 3 years ago

see https://github.com/jvm-repo-rebuild/reproducible-central#org.fusesource.jansi:jansi

the issue is that Include-Resource property in META-INF/MANIFEST contains a huge list that is not sorted in a reproducible way I don't know OSGi nor OSGi plugins sufficiently to know that to do...

here is the diffoscope output:

$ diffoscope target/reference/jansi-2.1.1.jar target/jansi-2.1.1.jar
--- target/reference/jansi-2.1.1.jar
+++ target/jansi-2.1.1.jar
├── zipinfo /dev/stdin
│ @@ -1,8 +1,8 @@
-│ -Zip file size: 315627 bytes, number of entries: 87
+│ +Zip file size: 315602 bytes, number of entries: 87
│  -rw-r--r--  2.0 unx     3676 b- defN 20-Dec-15 10:02 META-INF/MANIFEST.MF
│  drwxr-xr-x  2.0 unx        0 b- stor 20-Dec-15 10:02 META-INF/
│  drwxr-xr-x  2.0 unx        0 b- stor 20-Dec-15 10:02 META-INF/native-image/
│  drwxr-xr-x  2.0 unx        0 b- stor 20-Dec-15 10:02 META-INF/native-image/jansi/
│  drwxr-xr-x  2.0 unx        0 b- stor 20-Dec-15 10:02 org/
│  drwxr-xr-x  2.0 unx        0 b- stor 20-Dec-15 10:02 org/fusesource/
│  drwxr-xr-x  2.0 unx        0 b- stor 20-Dec-15 10:02 org/fusesource/jansi/
│ @@ -82,8 +82,8 @@
│  -rw-r--r--  2.0 unx     3754 b- defN 20-Dec-15 10:02 org/fusesource/jansi/io/ColorsAnsiProcessor.class
│  -rw-r--r--  2.0 unx     1312 b- defN 20-Dec-15 10:02 org/fusesource/jansi/io/FastBufferedOutputStream.class
│  -rw-r--r--  2.0 unx    11080 b- defN 20-Dec-15 10:02 org/fusesource/jansi/io/WindowsAnsiProcessor.class
│  -rw-r--r--  2.0 unx       14 b- defN 20-Dec-15 10:02 org/fusesource/jansi/jansi.properties
│  -rw-r--r--  2.0 unx      935 b- defN 20-Dec-15 10:02 org/fusesource/jansi/jansi.txt
│  -rw-r--r--  2.0 unx    13404 b- defN 20-Dec-15 10:02 META-INF/maven/org.fusesource.jansi/jansi/pom.xml
│  -rw-r--r--  2.0 unx       60 b- defN 20-Dec-15 10:02 META-INF/maven/org.fusesource.jansi/jansi/pom.properties
-│ -87 files, 993732 bytes uncompressed, 301169 bytes compressed:  69.7%
+│ +87 files, 993732 bytes uncompressed, 301144 bytes compressed:  69.7%
├── META-INF/MANIFEST.MF
│ @@ -16,42 +16,42 @@
│  Bundle-Name: jansi
│  Bundle-SymbolicName: org.fusesource.jansi
│  Bundle-Vendor: FuseSource, Corp.
│  Bundle-Version: 2.1.1
│  Export-Package: org.fusesource.jansi;version="2.1.1",org.fusesource.jans
│   i.internal;version="2.1.1"
│  Include-Resource: {org/fusesource/jansi/jansi.properties=src/main/resour
-│ - ces/org/fusesource/jansi/jansi.properties},org/fusesource/jansi/interna
-│ - l/native/FreeBSD/x86/libjansi.so=src/main/resources/org/fusesource/jans
-│ - i/internal/native/FreeBSD/x86/libjansi.so,org/fusesource/jansi/internal
-│ - /native/FreeBSD/x86_64/libjansi.so=src/main/resources/org/fusesource/ja
-│ - nsi/internal/native/FreeBSD/x86_64/libjansi.so,org/fusesource/jansi/int
-│ - ernal/native/Mac/x86/libjansi.jnilib=src/main/resources/org/fusesource/
-│ - jansi/internal/native/Mac/x86/libjansi.jnilib,org/fusesource/jansi/inte
-│ - rnal/native/Mac/x86_64/libjansi.jnilib=src/main/resources/org/fusesourc
-│ - e/jansi/internal/native/Mac/x86_64/libjansi.jnilib,org/fusesource/jansi
-│ - /internal/native/Linux/ppc64/libjansi.so=src/main/resources/org/fusesou
-│ - rce/jansi/internal/native/Linux/ppc64/libjansi.so,org/fusesource/jansi/
-│ - internal/native/Linux/armv7/libjansi.so=src/main/resources/org/fusesour
-│ - ce/jansi/internal/native/Linux/armv7/libjansi.so,org/fusesource/jansi/i
-│ - nternal/native/Linux/x86/libjansi.so=src/main/resources/org/fusesource/
-│ - jansi/internal/native/Linux/x86/libjansi.so,org/fusesource/jansi/intern
-│ - al/native/Linux/arm/libjansi.so=src/main/resources/org/fusesource/jansi
-│ - /internal/native/Linux/arm/libjansi.so,org/fusesource/jansi/internal/na
-│ - tive/Linux/arm64/libjansi.so=src/main/resources/org/fusesource/jansi/in
-│ - ternal/native/Linux/arm64/libjansi.so,org/fusesource/jansi/internal/nat
-│ - ive/Linux/x86_64/libjansi.so=src/main/resources/org/fusesource/jansi/in
-│ - ternal/native/Linux/x86_64/libjansi.so,org/fusesource/jansi/internal/na
-│ - tive/Windows/x86/jansi.dll=src/main/resources/org/fusesource/jansi/inte
-│ - rnal/native/Windows/x86/jansi.dll,org/fusesource/jansi/internal/native/
-│ - Windows/x86_64/jansi.dll=src/main/resources/org/fusesource/jansi/intern
-│ - al/native/Windows/x86_64/jansi.dll,org/fusesource/jansi/jansi.txt=src/m
-│ - ain/resources/org/fusesource/jansi/jansi.txt,META-INF/native-image/jans
-│ - i/resource-config.json=src/main/resources/META-INF/native-image/jansi/r
-│ - esource-config.json
+│ + ces/org/fusesource/jansi/jansi.properties},META-INF/native-image/jansi/
+│ + resource-config.json=src/main/resources/META-INF/native-image/jansi/res
+│ + ource-config.json,org/fusesource/jansi/jansi.txt=src/main/resources/org
+│ + /fusesource/jansi/jansi.txt,org/fusesource/jansi/internal/native/Mac/x8
+│ + 6_64/libjansi.jnilib=src/main/resources/org/fusesource/jansi/internal/n
+│ + ative/Mac/x86_64/libjansi.jnilib,org/fusesource/jansi/internal/native/M
+│ + ac/x86/libjansi.jnilib=src/main/resources/org/fusesource/jansi/internal
+│ + /native/Mac/x86/libjansi.jnilib,org/fusesource/jansi/internal/native/Li
+│ + nux/arm/libjansi.so=src/main/resources/org/fusesource/jansi/internal/na
+│ + tive/Linux/arm/libjansi.so,org/fusesource/jansi/internal/native/Linux/a
+│ + rmv7/libjansi.so=src/main/resources/org/fusesource/jansi/internal/nativ
+│ + e/Linux/armv7/libjansi.so,org/fusesource/jansi/internal/native/Linux/x8
+│ + 6_64/libjansi.so=src/main/resources/org/fusesource/jansi/internal/nativ
+│ + e/Linux/x86_64/libjansi.so,org/fusesource/jansi/internal/native/Linux/x
+│ + 86/libjansi.so=src/main/resources/org/fusesource/jansi/internal/native/
+│ + Linux/x86/libjansi.so,org/fusesource/jansi/internal/native/Linux/ppc64/
+│ + libjansi.so=src/main/resources/org/fusesource/jansi/internal/native/Lin
+│ + ux/ppc64/libjansi.so,org/fusesource/jansi/internal/native/Linux/arm64/l
+│ + ibjansi.so=src/main/resources/org/fusesource/jansi/internal/native/Linu
+│ + x/arm64/libjansi.so,org/fusesource/jansi/internal/native/FreeBSD/x86_64
+│ + /libjansi.so=src/main/resources/org/fusesource/jansi/internal/native/Fr
+│ + eeBSD/x86_64/libjansi.so,org/fusesource/jansi/internal/native/FreeBSD/x
+│ + 86/libjansi.so=src/main/resources/org/fusesource/jansi/internal/native/
+│ + FreeBSD/x86/libjansi.so,org/fusesource/jansi/internal/native/Windows/x8
+│ + 6_64/jansi.dll=src/main/resources/org/fusesource/jansi/internal/native/
+│ + Windows/x86_64/jansi.dll,org/fusesource/jansi/internal/native/Windows/x
+│ + 86/jansi.dll=src/main/resources/org/fusesource/jansi/internal/native/Wi
+│ + ndows/x86/jansi.dll
│  Main-Class: org.fusesource.jansi.AnsiMain
│  Private-Package: org.fusesource.jansi.internal.native.FreeBSD.x86,org.fu
│   sesource.jansi.internal.native.FreeBSD.x86_64,org.fusesource.jansi.inte
│   rnal.native.Linux.arm,org.fusesource.jansi.internal.native.Linux.arm64,
│   org.fusesource.jansi.internal.native.Linux.armv7,org.fusesource.jansi.i
│   nternal.native.Linux.ppc64,org.fusesource.jansi.internal.native.Linux.x
│   86,org.fusesource.jansi.internal.native.Linux.x86_64,org.fusesource.jan
hboutemy commented 3 years ago

added _reproducible configuration for the bundle plugin: I hope this will be sufficient for the next release

gnodet commented 3 years ago

I've removed the unneeded headers with https://github.com/fusesource/jansi/commit/0a06ceb8710f97e42e15999d7b90d6634533e745