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 >= 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.
- If we don't have any `OpenJDK` installed, we get
<img width="383" height="94" alt="截圖 2025-08-19 上午9 47 43"
src="https://github.com/user-attachments/assets/bb9103a2-bdd9-4767-9488-106908141e49"
/>
- If we have `OpenJDK` installed (e.g. `java-11-openjdk`), we get
<img width="530" height="74" alt="截圖 2025-08-19 上午9 52 12"
src="https://github.com/user-attachments/assets/9f9b1337-e97a-4936-af49-841d8d40693a"
/>
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`.
##########
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 >= 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.
- If we don't have any `OpenJDK` installed, we get
<img width="383" height="94" alt="截圖 2025-08-19 上午9 47 43"
src="https://github.com/user-attachments/assets/bb9103a2-bdd9-4767-9488-106908141e49"
/>
- If we have `OpenJDK` installed (e.g. `java-11-openjdk`), we get
<img width="530" height="74" alt="截圖 2025-08-19 上午9 52 12"
src="https://github.com/user-attachments/assets/9f9b1337-e97a-4936-af49-841d8d40693a"
/>
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]