From 01ba3c196f2007dcd1bed3755bd5d392be4f499a Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 11 Jun 2024 09:54:26 +0800 Subject: [PATCH] Revert "build: don't add nonexistent directory 'lib' to relocatable packages" This reverts commit 82e3d0c6a894ac752a67d1342e8ca7e1192cde5f. the "lib" directory is not empty, and it collects all the runtime dependencies for running the java-based nodetool. without them, we'd run into test failures when testing dtests using the java-based nodetool: ``` > raise ToolError(cmd_args, rc, out, err) E ccmlib.node.ToolError: Subprocess ['stress', 'write', 'n=50K', '-rate', 'threads=4', '-node', '127.0.96.1'] exited with non-zero status; exit status: 1; E stderr: Exception in thread "main" java.lang.NoClassDefFoundError: io/netty/util/concurrent/FastThreadLocal E at org.apache.cassandra.stress.Stress.main(Stress.java:59) E Caused by: java.lang.ClassNotFoundException: io.netty.util.concurrent.FastThreadLocal E at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) E at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) E at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:527) E ... 1 more ``` Closes: #397 --- scripts/create-relocatable-package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/create-relocatable-package.py b/scripts/create-relocatable-package.py index 0a20dd5265..5e4f550f35 100755 --- a/scripts/create-relocatable-package.py +++ b/scripts/create-relocatable-package.py @@ -62,6 +62,7 @@ def reloc_add(self, name, arcname=None, recursive=True, *, filter=None): ar.reloc_add('conf') ar.reloc_add('bin') ar.reloc_add('tools') +ar.reloc_add('lib') ar.reloc_add('doc') ar.reloc_add('install.sh') ar.reloc_add('build/apache-cassandra-{}.jar'.format(version), arcname='lib/apache-cassandra-{}.jar'.format(version))