[Rpm-maint] [rpm-software-management/rpm] rpmbuild should bail out as soon as recursive macro expansion is detected (#145)
Jan Pokorný
notifications at github.com
Thu Feb 2 18:20:02 UTC 2017
Currently:
```
$ cat newpackage.spec
%define __os_install_post %(echo '%{__os_install_post}' \
| sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
Name: foo
Version: 1
Release: 1%{?dist}
Summary: bar
License: GPLv2
URL: http://localhost
Source: newpackage.spec
%description
Foo bar
%install
```
```
$ rpmbuild -bb -v -D "_srcdir $(pwd)" newpackage.spec
error: Too many levels of recursion in macro expansion. It is likely caused by recursive macro declaration.
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.cIXCaT
+ umask 022
+ cd /home/mock/rpmbuild/BUILD
+ '[' /home/mock/rpmbuild/BUILDROOT/foo-1-1.fc22.x86_64 '!=' / ']'
+ rm -rf /home/mock/rpmbuild/BUILDROOT/foo-1-1.fc22.x86_64
++ dirname /home/mock/rpmbuild/BUILDROOT/foo-1-1.fc22.x86_64
+ mkdir -p /home/mock/rpmbuild/BUILDROOT
+ mkdir /home/mock/rpmbuild/BUILDROOT/foo-1-1.fc22.x86_64
+ /usr/lib/rpm/check-buildroot
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/mock/rpmbuild/BUILDROOT/foo-1-1.fc22.x86_64
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.E2B2uY
+ umask 022
+ cd /home/mock/rpmbuild/BUILD
+ /usr/bin/rm -rf /home/mock/rpmbuild/BUILDROOT/foo-1-1.fc22.x86_64
+ exit 0
```
```
$ echo $?
0
```
So the process doesn't fail and continues despite an internal error with
undesired consequences. It would be expected that the build fails
instead, not masking any subtle issues.
--
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/145
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20170202/7ecc672e/attachment.html>
More information about the Rpm-maint
mailing list