Declare the deb/rpm runtime dependencies (java, which, chkconfig)#677
Merged
vharseko merged 2 commits intoJul 8, 2026
Merged
Conversation
The rpm declared no dependencies at all: it installed on a Java-less host (setup then fails), its scripts locate java via "which" (absent on minimal RHEL9 - setup fails with "Please set OPENDJ_JAVA_HOME"), and the postinstall/preuninstall scriptlets call /sbin/chkconfig unconditionally. Declare java-headless >= 1:11, which and chkconfig. The deb Depends listed only the full javaNN-runtime virtual packages, so a server with only openjdk-NN-jre-headless (the common server setup) did not satisfy them and apt pulled a second JRE; the list also stopped at Java 21. Add the javaNN-runtime-headless alternatives and Java 25.
vharseko
added a commit
to vharseko/OpenDJ
that referenced
this pull request
Jul 3, 2026
…anual installs from the deb/rpm tests - rpm: add Requires: util-linux - postinstall runs the upgrade tool and the server via runuser unconditionally. - test-rpm: no manual dependency installs; dnf must resolve everything from the package Requires (java-headless, util-linux, shadow-utils). - test-deb-upgrade: drop the manual JRE (the released 5.1.1 deb declares a JRE dependency itself) and procps (the process-owner check now uses /proc stat). - test-rpm-upgrade: keep only java + which, needed by the RELEASED 5.1.1 rpm which declared no dependencies at all (declarations added by OpenIdentityPlatform#677); drop them when the upgrade-source artifact link points to a release containing OpenIdentityPlatform#677.
maximthomas
approved these changes
Jul 3, 2026
vharseko
added a commit
to vharseko/OpenDJ
that referenced
this pull request
Jul 4, 2026
/etc/redhat-release exists on every RHEL-family system, but the sourced /etc/init.d/functions only exists when the optional initscripts package is installed - so the init script aborted with "No such file or directory" on minimal systems. Check for the function-library files themselves and fall back to a self-contained default (the script does not depend on them). test-rpm-upgrade: the RELEASED 5.1.1 init script has the same defect and cannot be fixed, so install initscripts for the old package (alongside java and which), to be dropped when the upgrade-source artifact points to a release containing OpenIdentityPlatform#677.
The shipped /etc/init.d/opendj sources /etc/init.d/functions whenever /etc/redhat-release exists, and that file is provided by the optional initscripts package - on minimal RHEL-family systems the service script aborted with "No such file or directory" (reproduced in CI against the released 5.1.1 rpm).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Audit of the deb/rpm dependency declarations against what the packages actually use (maintainer scripts + the server's shell scripts). Scoped for a minor release: declarations only, no packaging behavior changes (the packaging modernization itself is #663, targeted at the next major).
rpm: no
Requireswere declared at allsetupthen failswhich_script-util.shjava discoverysetupfails with "Please set OPENDJ_JAVA_HOME" (reproduced in CI: failing job)/sbin/chkconfigpostinstall.sh(--add),preuninstall.sh(--del), unconditionallyNow declared:
java-headless >= 1:11,which,chkconfig.deb:
Dependsmatched only full JREs and stopped at Java 21java11-runtime | java17-runtime | java21-runtimeare provided by the fullopenjdk-NN-jrepackages only. A server with justopenjdk-NN-jre-headless(the common server setup) did not satisfy the alternatives, so apt pulled a second JRE (default-jre-headless). The list also lacked Java 25.Now:
default-jre-headless | default-jre | java25-runtime-headless | java25-runtime | java21-runtime-headless | java21-runtime | java17-runtime-headless | java17-runtime | java11-runtime-headless | java11-runtime(
update-rc.d— init-system-helpers — andwhich— debianutils — are Essential on Debian and need no declaration.)