pkgsrc-Users archive

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

Re: Java class file corrupted during extract



On 11/18/17 09:12, Jason Bacon wrote:
On 11/18/17 07:41, Thomas Klausner wrote:
On Fri, Nov 17, 2017 at 12:32:20PM -0600, Jason Bacon wrote:
Can anybody explain this?

When installing wip/fastqc via pkgsrc, one of the Java programs fails with an internal error.  I found that the checksum on the class file is wrong when it's unpackedby pkgsrc, but correct if I unpack it manually using the
same unzip command.
I don't see this. (NetBSD 8.99.5/amd64)

# make patch
...
# md5 work/FastQC/org/apache/commons/math3/distribution/IntegerDistribution.class MD5 (work/FastQC/org/apache/commons/math3/distribution/IntegerDistribution.class) = 326bd29eaa7e102a547a751de7b28b57

# unzip -p /distfiles/fastqc_v0.11.5.zip */IntegerDistribution.class | md5
326bd29eaa7e102a547a751de7b28b57
# /usr/pkg/bin/unzip -p /distfiles/fastqc_v0.11.5.zip */IntegerDistribution.class | md5
326bd29eaa7e102a547a751de7b28b57
# ./work/.tools/bin/unzip -p /distfiles/fastqc_v0.11.5.zip */IntegerDistribution.class | md5
326bd29eaa7e102a547a751de7b28b57

  Thomas

I added a "set -x" to mk/extract/extract to see exactly what it's doing.

The problem is the -a flag in ${EXTRACT_OPTS_ZIP}.

It extracts correctly for me on NetBSD 7, but not on CentOS 6 or CentOS 7.

NetBSD has unzip in the base install.

CentOS uses pkgsrc unzip, which seems to have a problem with the -a flag (convert text files).  Apparently it thinks a Java class file is text.

Adding the following works around the problem:

do-extract:
        cd ${WRKDIR} && unzip -qo ${DISTDIR}/${DISTFILES}

The following exhibits the problem, verifying the -a flag issue.

do-extract:
        cd ${WRKDIR} && unzip -aqo ${DISTDIR}/${DISTFILES}

More info...

There are five class files that pkgsrc unzip thinks are text. The rest are seen as binary, as they should be.

[root@centosdev fastqc]# zipinfo /sharedapps/pkgsrc-2017Q3/distfiles/fastqc_v0.11.5.zip |grep 't-.*class' -rw-a--     2.0 fat      716 t- defN 16-Feb-26 11:44 FastQC/org/apache/commons/math3/analysis/solvers/BaseUnivariateSolver.class -rw-a--     2.0 fat      852 t- defN 16-Feb-26 11:44 FastQC/org/apache/commons/math3/analysis/solvers/BracketedUnivariateSolver.class -rw-a--     2.0 fat      678 t- defN 16-Feb-26 11:44 FastQC/org/apache/commons/math3/distribution/IntegerDistribution.class -rw-a--     2.0 fat      755 t- defN 16-Feb-26 11:44 FastQC/org/apache/commons/math3/distribution/RealDistribution.class -rw-a--     2.0 fat    42550 t- defN 16-Feb-26 11:44 FastQC/org/apache/commons/math3/exception/util/LocalizedFormats.class

[root@centosdev fastqc]# which zipinfo
/sharedapps/pkg-2017Q3/bin/zipinfo

Segment from just using "grep class":


-rw-a--     2.0 fat     4761 b- defN 16-Feb-26 11:44 FastQC/org/apache/commons/math3/distribution/HypergeometricDistribution.class -rw-a--     2.0 fat      678 t- defN 16-Feb-26 11:44 FastQC/org/apache/commons/math3/distribution/IntegerDistribution.class -rw-a--     2.0 fat     3708 b- defN 16-Feb-26 11:44 FastQC/org/apache/commons/m

--
Earth is a beta site.


Home | Main Index | Thread Index | Old Index