-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix RPM uninstall failure by enabling systemd-rpm-macros BuildRequires #5336
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
base: v3.0
Are you sure you want to change the base?
Conversation
This fixes the uninstall failure on Amazon Linux 2023 and other RHEL-based distributions. The %systemd_preun macro requires systemd-rpm-macros to be declared as a build dependency. Fixes uninstall error: "%preun scriptlet failed, exit status 1" - Uncommented BuildRequires in rhel-compliant spec file - Uncommented BuildRequires in suse-compliant spec file Note: Build images must have systemd-rpm-macros package installed. Co-authored-by: renecannao <[email protected]>
|
this will fail to build, the build images would also need systemd-rpm-macros insatlled |
|
@CodeRabbit review |
✅ Actions performedReview triggered.
|
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughTwo RPM spec files had a commented-out Changes
Estimated Code Review Effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Update on Complete SolutionThis PR correctly addresses the spec file requirement by uncommenting However, as noted by other commenters, this is only part of the complete solution. The Docker build images used to create these RPM packages must also have the I've created a detailed issue in the docker-images repository that outlines the required changes: The fix requires updating the Dockerfiles for all RHEL-based (CentOS, AlmaLinux, Fedora) and OpenSUSE build images to install the Once those changes are implemented and the new build images are published, the complete solution will be:
This will fully resolve the uninstallation failures on Amazon Linux 2023 and other systemd-based RHEL distributions. |
This change adds the systemd-rpm-macros package to all RHEL-based and OpenSUSE-based Docker build images. This is required for proper RPM package uninstallation on Amazon Linux 2023 and other systemd-based RHEL distributions, as the %systemd_preun macro in the RPM spec files requires this package to be available in the build environment. Fixes #15 Related to: - ProxySQL issue sysown/proxysql#5335 - ProxySQL PR sysown/proxysql#5336
Signed-off-by: Miro Stauder <[email protected]>
Signed-off-by: Miro Stauder <[email protected]>
Signed-off-by: René Cannaò <[email protected]>
|
@mirostauder : please test this |
60bdc6f to
b099ff5
Compare
b099ff5 to
ada28f0
Compare
|
retest this please |
|
retest this please |
1 similar comment
|
retest this please |
|



RPM uninstall fails on Amazon Linux 2023 with
%preun scriptlet failed, exit status 1because the%systemd_preunmacro expands to invalid shell code whensystemd-rpm-macrosis not declared as a build dependency.Changes
BuildRequires: systemd-rpm-macrosinrhel-compliant/rpmmacros/rpmbuild/SPECS/proxysql.specBuildRequires: systemd-rpm-macrosinsuse-compliant/rpmmacros/rpmbuild/SPECS/proxysql.specBoth spec files use
%systemd_preunin their%preunsection but had the required build dependency commented out, causing macro expansion to fail during package build.Build Infrastructure Note
Build images must have
systemd-rpm-macrospackage installed for rpmbuild to succeed with this change.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Summary by CodeRabbit