add missing BuildRequires: systemd-rpm-macros for SLES 15#99
add missing BuildRequires: systemd-rpm-macros for SLES 15#99corporate-gadfly wants to merge 1 commit into
Conversation
On SLES, the package uses %service_del_preun and %service_del_postun macros but doesn't declare systemd-rpm-macros as a build dependency. This causes the macros to be incorrectly expanded or missing, resulting in scriptlet failures during package removal on SLES15: error: %preun(openvox-server) scriptlet failed, exit status 1 /var/tmp/rpm-tmp.XXX: line 1: fg: no job control Adding the BuildRequires ensures the macros are properly defined during package build. Signed-off-by: Corporate Gadfly <haroon.rafique@gmail.com>
|
@nmburgan Thoughts on using following diff in diff --git a/Dockerfile b/Dockerfile
index 74b2df1cd1..7634b50a6a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,8 +4,14 @@ RUN apt-get update && \
apt-get install -y --no-install-recommends \
openjdk-17-jdk-headless \
rpm \
+ cpio \
&& rm -rf /var/lib/apt/lists/*
+# Extract the RPM macros to resolve the expansion of macros on SLES
+RUN wget -q https://rpmfind.net/linux/opensuse/distribution/leap/16.0/repo/oss/noarch/systemd-rpm-macros-26-160000.2.2.noarch.rpm -O /tmp/suse-macros.rpm && \
+ rpm2cpio /tmp/suse-macros.rpm | cpio -idmv -D / && \
+ rm /tmp/suse-macros.rpm
+
RUN wget -q https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein -O /usr/local/bin/lein && \
chmod a+x /usr/local/bin/lein |
|
@corporate-gadfly when/where is systemd-rpm-macros required? Do we need it inside the container, before the package for for SLES is build? And if it's present, do we need to change any of the fpm parameters? |
@bastelfreak
The hope is that Running out of ideas. |
On SLES, the package uses %service_del_preun and %service_del_postun macros but doesn't declare systemd-rpm-macros as a build dependency.
This causes the macros to be incorrectly expanded or missing, resulting in scriptlet failures during package removal on SLES15:
error: %preun(openvox-server) scriptlet failed, exit status 1
/var/tmp/rpm-tmp.XXX: line 1: fg: no job control
Adding the BuildRequires ensures the macros are properly defined during package build.