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 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}

--
Earth is a beta site.


Home | Main Index | Thread Index | Old Index