Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rpminspect test #4868

Merged
merged 1 commit into from
Oct 2, 2024
Merged

Update rpminspect test #4868

merged 1 commit into from
Oct 2, 2024

Conversation

edewata
Copy link
Contributor

@edewata edewata commented Sep 30, 2024

The pom.xml files have been updated to define the target Java version using maven.compiler.release property. The maven-compiler-plugin is no longer used so it has been removed.

The pki-rpminspect.yaml has been updated to no longer define the javabytecode requirement so it will use the standard requirement for the platform.

The rpminspect test has been updated to call rpminspect directly in separate steps to make it easier to inspect the failures. The rpminspect.sh is no longer used so it has been removed.

Currently the test is failing because some dependencies were built with older Java bytecode versions. They need to be rebuilt with the proper version.

Copy link
Member

@fmarco76 fmarco76 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is OK moving from the plugin to the compiler properties. Additionally, it simplify the version update but I do not think it is good to get the release version from the java available.
Additionally, default fedora check verify bytecode version 55 for fc40 (source here, is there a reason to be more strict considering this apply to the pki and all related libraries?

pki.spec Outdated
%pom_xpath_set \
"pom:properties/pom:maven.compiler.release" \
"$JAVA_VERSION"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think the compiled bytecode release should be related to the default JVM available in the build environment. I think we should set a value based on the language and support all the version from that.

- default: 65
- fc39: 55
- fc40: 55
- default: 43
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since these are the values defined for fedora, are they needed or can be removed here to get them?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like they can be removed.

@edewata edewata force-pushed the tools branch 2 times, most recently from d442069 to a170126 Compare October 1, 2024 20:30
@edewata edewata changed the title Update Java version in pom.xml Update rpminspect test Oct 1, 2024
@edewata
Copy link
Contributor Author

edewata commented Oct 1, 2024

Thanks for the feedback! Please see the updated PR.

So the target Java version is hard-coded to 17. I'm just wondering if rpminspect is going to pass on CentOS/RHEL 10 since it doesn't have Java 17 anymore, and all packages were rebuilt with Java 21. That test is currently disabled.

@fmarco76
Copy link
Member

fmarco76 commented Oct 2, 2024

and all packages were rebuilt with Java 21. That test is currently disabled.

It should build without problems for version 17 but we can modify the default in case. An alternative could be to use only the source option instead of release (they map to the javac options) but I would not consider for now.
Looking at centos stream it seems version 17 should be accepted (not sure I have selected the right package though): https://gitlab.com/redhat/centos-stream/ci-cd/rpminspect-data-centos/-/blob/master/centos.yaml?ref_type=heads#L551

Copy link
Member

@fmarco76 fmarco76 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

The pom.xml files have been updated to define the target
Java version using maven.compiler.release property. The
maven-compiler-plugin is no longer used so it has been
removed.

The pki-rpminspect.yaml has been updated to no longer
define the javabytecode requirement so it will use the
standard requirement for the platform.

The rpminspect test has been updated to call rpminspect
directly in separate steps to make it easier to inspect
the failures. The rpminspect.sh is no longer used so it
has been removed.

Currently the test is failing because some dependencies
were built with older Java bytecode versions. They need
to be rebuilt with the proper version.
@edewata
Copy link
Contributor Author

edewata commented Oct 2, 2024

@fmarco76 Thanks! We can try enabling that test in the next CentOS build and see how it goes.

Copy link

sonarcloud bot commented Oct 2, 2024

@edewata edewata merged commit e62f2c6 into dogtagpki:master Oct 2, 2024
158 of 165 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants