Skip to content
This repository was archived by the owner on Jul 6, 2023. It is now read-only.

Conversation

@jennyowen
Copy link
Member

Added a new package neo4j-java-adapter (name changable if you think it's needed).
So now instead of having 3 separate cypher-shell rpm builds we have one.

The workaround is to create an empty java meta-package which depends on jre-11 and provides jre = 11 so that oracle java, and openjdk java both provide the same package name. As a bonus, making cypher-shell require jre >= 1.8 means that jre = 11 satisfies that dependency so we can make cypher-shell java 8 and java 11 compatible without extra effort (yay 🎉).

@pontusmelke pontusmelke self-assigned this Apr 17, 2019
Copy link
Contributor

@fickludd fickludd left a comment

Choose a reason for hiding this comment

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

I'm a bit confused - when we tried the java-adapter strategy before it didn't seem to work, and I'm not seeing anything different here that would explain why it now works. Could you explain to me what changed? Also I don't think we every made the adapter solve the java 8 dep - I thought requiring java >= 1.8 would not be satisfied by java = 11, because major versions are not backwards compatible.

@jennyowen
Copy link
Member Author

I've added some tests which create a local yum repository of cypher-shell within a docker container. They preinstall a java version and then test installing cypher-shell to see if it decides to install a java dependency. I haven't got tests for oracle javas because there doesn't seem to be a public yum repository for it.

I thought java11 wasn't properly backwards compatible as well, but it seems to work if we specify jre or jre-headless instead of java, I'm not 100% sure why. Perhaps, so long as the "provides" package names match in the java packages it'll do a dumb version checking? Maybe the "provides" package names weren't consistent.

I decided to revisit the java adapter package type solution because I really don't like the idea of releasing a different neo4j for each java type, which is what we'd end up doing if we stuck with the cypher-shell openjava11/java11/java8 solution.

Java adapter, plus cypher-shell requirement "jre >= 1.8" makes cypher-shell compatible with java8 and java11 in both openjdk and oracle flavours.
I don't expect it will need updating often, so version numbers will need manually changing.
…itory

still need to use this to create tests for the java adapter and/or cypher-shell
Copy link
Contributor

@fickludd fickludd left a comment

Choose a reason for hiding this comment

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

This is a much cleaner solution, nice. I don't have the tooling or knowledge currently to verify that this works, but as you've tested it (irl discussion) I'm going to approve anyway.

out/$(rpmfile) \
packaging/test/java-adapter/tempneo4j.repo \
packaging/test/java-adapter/Dockerfile \
packaging/test/java-adapter/entrypoint.sh
Copy link
Contributor

Choose a reason for hiding this comment

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

Much nicer!

@fickludd fickludd changed the base branch from 1.2 to 1.1 April 24, 2019 09:47
@jennyowen jennyowen merged commit abd2396 into neo4j:1.1 Apr 24, 2019
@jennyowen jennyowen deleted the java-repackage branch April 24, 2019 10:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants