[ 
https://issues.apache.org/jira/browse/CASSANDRA-18690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17747213#comment-17747213
 ] 

Ekaterina Dimitrova edited comment on CASSANDRA-18690 at 7/25/23 11:46 PM:
---------------------------------------------------------------------------

Unzip broke on Mac with:

{code:java}
BUILD FAILED
/home/cassandra/cassandra/build/tmp/cassandra-dtest-jars/build.xml:1726: Error 
while expanding 
/home/cassandra/cassandra/build/tmp/cassandra-dtest-jars/build/lib/jars/netty-tcnative-boringssl-static-2.0.36.Final.jar
java.nio.file.FileSystemException: 
/home/cassandra/cassandra/build/tmp/cassandra-dtest-jars/build/dtest/META-INF/license/LICENSE.tomcat-native.txt:
 Not a directory
{code}

Looking into the ant manual for unzip 
[here|https://ant.apache.org/manual/Tasks/unzip.html], I see
{code:java}
The task

<unzip src="some-archive" dest="some-dir">
  <patternset>
    <include name="some-pattern"/>
  </patternset>
  <mapper type="some-mapper"/>
</unzip>
is identical to

<copy todir="some-dir" preservelastmodified="true">
  <zipfileset src="some-archive">
    <patternset>
      <include name="some-pattern"/>
    </patternset>
  </zipfileset>
  <mapper type="some-mapper"/>
</copy>
{code}

Tested ant dtest-jar on a Mac and it completes successfully with this patch:
https://github.com/apache/cassandra/commit/abc8037f4fa9cb5e8bd8acaeb0dbed7b78e4d578

Running CI here:
https://app.circleci.com/pipelines/github/ekaterinadimitrova2/cassandra/2439/workflows/6bd96dd0-f469-4d2f-8afb-906b3414a6a3



was (Author: e.dimitrova):
Unzip broke on Mac with:

Looking into the ant manual for unzip 
[here|https://ant.apache.org/manual/Tasks/unzip.html], I see
{code:java}
The task

<unzip src="some-archive" dest="some-dir">
  <patternset>
    <include name="some-pattern"/>
  </patternset>
  <mapper type="some-mapper"/>
</unzip>
is identical to

<copy todir="some-dir" preservelastmodified="true">
  <zipfileset src="some-archive">
    <patternset>
      <include name="some-pattern"/>
    </patternset>
  </zipfileset>
  <mapper type="some-mapper"/>
</copy>
{code}

Tested ant dtest-jar on a Mac and it completes successfully with this patch:
https://github.com/apache/cassandra/commit/abc8037f4fa9cb5e8bd8acaeb0dbed7b78e4d578

Running CI here:
https://app.circleci.com/pipelines/github/ekaterinadimitrova2/cassandra/2439/workflows/6bd96dd0-f469-4d2f-8afb-906b3414a6a3


> Fix the way we produce a DTest jar
> ----------------------------------
>
>                 Key: CASSANDRA-18690
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-18690
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Build
>            Reporter: Ekaterina Dimitrova
>            Assignee: Ekaterina Dimitrova
>            Priority: Normal
>             Fix For: 5.0
>
>
> The problem is related to the way we produce a {{{}dtest jar{}}}. That 
> repackages all dependencies along with our classes in a single jar. Some of 
> the dependencies might have digital signatures, which are extracted into 
> {{META-INF}} as say {{*.SF}} files. We need to remove them because they are 
> invalid for the uber jar we produce.
> Therefore, there are exclusion in {{zipgroupfileset}} operations, more or 
> less like this:
> {noformat}
> <zipgroupfileset dir="${build.lib}" includes="*.jar" 
> excludes="META-INF/*.SF"/>
> {noformat}
> However, this is wrong. {{exclude}} attribute denotes jar files we don't want 
> to repackage rather than filter on the content of the jar file. 
> The issue was discovered and explained by [~jlewandowski] in CASSANDRA-17992



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to