Skip to content

add missing BuildRequires: systemd-rpm-macros#99

Draft
corporate-gadfly wants to merge 1 commit into
OpenVoxProject:mainfrom
corporate-gadfly:sles-rpm-preinst
Draft

add missing BuildRequires: systemd-rpm-macros#99
corporate-gadfly wants to merge 1 commit into
OpenVoxProject:mainfrom
corporate-gadfly:sles-rpm-preinst

Conversation

@corporate-gadfly
Copy link
Copy Markdown
Contributor

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.

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>
@bastelfreak bastelfreak added the bug Something isn't working label May 18, 2026
@corporate-gadfly corporate-gadfly marked this pull request as draft May 18, 2026 13:58
@corporate-gadfly
Copy link
Copy Markdown
Contributor Author

@nmburgan Thoughts on using following diff in Dockerfile in openvox-server:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants