echonesis commented on code in PR #8924:
URL: https://github.com/apache/ozone/pull/8924#discussion_r2283851689


##########
hadoop-ozone/dist/pom.xml:
##########
@@ -438,6 +438,95 @@
         </plugins>
       </build>
     </profile>
+    <profile>
+      <id>rpm</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>rpm-maven-plugin</artifactId>
+            <version>2.2.0</version>
+            <configuration>
+              <name>ozone</name>
+              <version>${project.version}</version>
+              <release>1</release>
+              <license>Apache License, Version 2.0</license>
+              <summary>Ozone RPM package</summary>
+              <group>Development/Tools</group>
+              <needarch>noarch</needarch>
+              <targetArch>noarch</targetArch>
+              <targetOS>linux</targetOS>
+              <requires>
+                <require>java-1.8.0-openjdk &gt;= 1.8.0</require>

Review Comment:
   In this case, `java-1.8.0-openjdk` will be installed anyway.
   And yes, your mentioned question is essential - OpenJDK should be detected 
automatically.
   Currently, I remove the `require` check for java.
   Instead, I add `postinstallScriptlet` step to inform users if their JDK is 
detected or not.
   
   OpenJDK package names for different versions are not unified, and the 
virtual dependency also varies under different OSs.
   - When we check through `dnf whatprovides java`, we get `1.8.0` under 
`rockylinux:8` while get `17` under `rockylinux:9.3`, which means we can't use 
virtual dependency `java` to do the check.
   
   Maybe we could use `require` to check if the default `java` is installed 
without limiting the version of `1.8.0`.



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