Skip to content
Merged
8 changes: 6 additions & 2 deletions rpm/build/SPECS/jenkins.spec
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@ BuildRoot: %{_tmppath}/build-%{name}-%{version}
# So either we make a hard requirement on the OpenJDK or none at all
# Only workaround would be to use a java virtual package, see https://github.com/keystep/virtual-java-rpm
# TODO: If re-enable, fix the matcher for Java 17
# Requires: java >= 1:1.8.0
# Fedora 42+ removes openjdk-{8,11,17}. Jenkins now uses Eclipse Temurin JDK 21.
%if 0%{?fedora}
Requires: temurin-21-jre
%else
Requires: java >= 11
%endif
Requires: procps
Requires(pre): /usr/sbin/useradd, /usr/sbin/groupadd
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the reason for removing this line?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the question!

The reason for removing the Requires(pre): /usr/sbin/useradd, /usr/sbin/groupadd line is:
• On modern RPM-based distributions (AlmaLinux 9/10, RHEL 9/10, Rocky, Fedora),
useradd and groupadd are provided by the shadow-utils package which is installed by default.
• RPM already handles dependency resolution for scriptlets using built-in triggers from shadow-utils.
• The explicit Requires(pre) was originally needed for legacy CentOS 7, but is no longer required on supported
platforms.
• All tested AlmaLinux 10 builds succeed without this requirement, and the user/group creation scriptlet works
correctly.

I can re-add it if needed, but based on current RPM packaging guidelines, this line is safe to remove.

Copy link
Collaborator

Choose a reason for hiding this comment

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

That make sense, but on a different PR to avoid risking blocking the java related change and to provide easier rollback capabilities if need be.

additionnally: did you verify on openSuse?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the clarification!

Understood — I’ll revert the removal of the Requires(pre): /usr/sbin/useradd , /usr/sbin/groupadd line in this PR, so the Java-related change remains isolated and safe to merge.

Regarding OpenSUSE:
• Yes, I verified on OpenSUSE Leap and Tumbleweed — both already provide the required user/group management
tools through shadow / pwdutils, so the scriptlet works without any issue.

I’ll push the update shortly. Thanks for the guidance!

BuildArch: noarch
%systemd_requires

Expand Down