A simple way to achieve this would be running the build-scripts inside a 
transient systemd unit. This is enough to make the reproducer to not hang 
around:

```--- a/macros.in
+++ b/macros.in
@@ -792,9 +792,10 @@ package or when debugging this package.\
 #      Global defaults used for building scriptlet templates.
 #
 
+%___build_session       systemd-run --pipe --user --wait --quiet
 %___build_shell                
%{?_buildshell:%{_buildshell}}%{!?_buildshell:/bin/sh}
 %___build_args         -e
-%___build_cmd          %{?_sudo:%{_sudo} }%{?_remsh:%{_remsh} %{_remhost} 
}%{?_remsudo:%{_remsudo} }%{?_remchroot:%{_remchroot} %{_remroot} 
}%{___build_shell} %{___build_args}
+%___build_cmd          %{?_sudo:%{_sudo} }%{?_remsh:%{_remsh} %{_remhost} 
}%{?_remsudo:%{_remsudo} }%{?_remchroot:%{_remchroot} %{_remroot} 
}%{?___build_session} %{___build_shell} %{___build_args}
 %___build_pre  \
   RPM_SOURCE_DIR=\"%{u2p:%{_sourcedir}}\"\
   RPM_BUILD_DIR=\"%{u2p:%{_builddir}}\"\
```

OTOH one could just run rpmbuild itself under systemd-run for the same effect 
and with a zero-length diff...

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/134#issuecomment-416903721
_______________________________________________
Rpm-maint mailing list
[email protected]
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to