xgerman commented on code in PR #2505:
URL: https://github.com/apache/cassandra/pull/2505#discussion_r1270864131


##########
.build/build-resolver.xml:
##########
@@ -246,6 +247,15 @@
             <file 
file="${local.repository}/org/apache/cassandra/deps/sigar-bin/libsigar-x86-linux.so"/>
             <file 
file="${local.repository}/org/apache/cassandra/deps/sigar-bin/libsigar-x86-solaris.so"/>
         </copy>
+
+        <copy todir="${build.lib}/corretto" quiet="true">
+            <file 
file="${local.repository}/software/amazon/cryptools/AmazonCorrettoCryptoProvider/2.2.0/AmazonCorrettoCryptoProvider-2.2.0-linux-x86_64.jar"/>

Review Comment:
   don't like the hard coded 2.2.0 -- can't there be vars like in maven?



##########
.build/parent-pom-template.xml:
##########
@@ -239,6 +239,42 @@
     
<developerConnection>scm:https://gitbox.apache.org/repos/asf/cassandra.git</developerConnection>
     <url>https://gitbox.apache.org/repos/asf?p=cassandra.git;a=tree</url>
   </scm>
+
+  <profiles>
+    <profile>
+      <id>x86_64</id>
+      <activation>
+        <os>
+          <arch>!aarch64</arch>
+        </os>
+      </activation>
+      <dependencies>
+        <dependency>
+          <groupId>software.amazon.cryptools</groupId>
+          <artifactId>AmazonCorrettoCryptoProvider</artifactId>
+          <classifier>linux-x86_64</classifier>
+          <version>2.2.0</version>

Review Comment:
   make 2.20 a variable to configure in one place



##########
.build/parent-pom-template.xml:
##########
@@ -770,6 +806,13 @@
       </dependency>
       <!-- end of chronicle-queue -->
 
+      <dependency>
+        <groupId>software.amazon.cryptools</groupId>
+        <artifactId>AmazonCorrettoCryptoProvider</artifactId>
+        <version>2.2.0</version>

Review Comment:
   same



##########
.build/parent-pom-template.xml:
##########
@@ -239,6 +239,42 @@
     
<developerConnection>scm:https://gitbox.apache.org/repos/asf/cassandra.git</developerConnection>
     <url>https://gitbox.apache.org/repos/asf?p=cassandra.git;a=tree</url>
   </scm>
+
+  <profiles>
+    <profile>
+      <id>x86_64</id>
+      <activation>
+        <os>
+          <arch>!aarch64</arch>
+        </os>
+      </activation>
+      <dependencies>
+        <dependency>
+          <groupId>software.amazon.cryptools</groupId>
+          <artifactId>AmazonCorrettoCryptoProvider</artifactId>
+          <classifier>linux-x86_64</classifier>
+          <version>2.2.0</version>
+        </dependency>
+      </dependencies>
+    </profile>
+    <profile>
+      <id>aarch_64</id>
+      <activation>
+        <os>
+          <arch>aarch64</arch>
+        </os>
+      </activation>
+      <dependencies>
+        <dependency>
+          <groupId>software.amazon.cryptools</groupId>
+          <artifactId>AmazonCorrettoCryptoProvider</artifactId>
+          <classifier>linux-aarch_64</classifier>
+          <version>2.2.0</version>

Review Comment:
   same



##########
bin/cassandra.in.sh:
##########
@@ -84,6 +84,12 @@ JAVA_AGENT="$JAVA_AGENT 
-javaagent:$CASSANDRA_HOME/lib/jamm-0.3.2.jar"
 # Added sigar-bin to the java.library.path CASSANDRA-7838
 JAVA_OPTS="$JAVA_OPTS:-Djava.library.path=$CASSANDRA_HOME/lib/sigar-bin"
 
+operating_system=$(uname -s | tr '[:upper:]' '[:lower:]')
+corretto_lib_pattern="AmazonCorrettoCryptoProvider-*-$operating_system-$(uname 
-m).jar"
+corretto_lib="$(find "${CASSANDRA_HOME}"/lib/corretto -type f -name 
"$corretto_lib_pattern" -exec basename {} \; | head -n 1)"
+if [ -f "${CASSANDRA_HOME}/lib/corretto/${corretto_lib}" ]; then
+  CLASSPATH="$CLASSPATH${CASSANDRA_HOME}/lib/corretto/$corretto_lib";
+fi

Review Comment:
   maybe an else to print a warning that the other architetcure (e.g. MIPS, 
power. or whatever) is not supported



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to