Hello folks,
I've realized that if the %install section contains a command that reverses the exit code from success to failure via !, the build does not fail, but it proceeds. In other sections, the build fails. E.g. this:
%install ! true
Does not fail the build.
But this does:
%install false
As well as this:
%build ! true
Any idea why this is happening? Is it a bug, or a feature? This happens on Fedora 35 locally as well as Rawhide in Koji/mock.
All of the following (applied separately) fail the RPM build:
%prep false
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.A1K5K0 + umask 022 + cd /home/churchyard/rpmbuild/BUILD + false error: Bad exit status from /var/tmp/rpm-tmp.A1K5K0 (%prep)
%build false
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.YR6FiX + umask 022 + cd /home/churchyard/rpmbuild/BUILD + false error: Bad exit status from /var/tmp/rpm-tmp.YR6FiX (%build)
%install false
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.OapPfB + umask 022 + cd /home/churchyard/rpmbuild/BUILD + '[' /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64 '!=' / ']' + rm -rf /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64 ++ dirname /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64 + mkdir -p /home/churchyard/rpmbuild/BUILDROOT + mkdir /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64 + false error: Bad exit status from /var/tmp/rpm-tmp.OapPfB (%install)
%check false
Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.CnEWIO + umask 022 + cd /home/churchyard/rpmbuild/BUILD + false error: Bad exit status from /var/tmp/rpm-tmp.CnEWIO (%check)
But when replaced with `! true`, %install (and %install only) succeeds:
%prep ! true
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.ojDvj8 + umask 022 + cd /home/churchyard/rpmbuild/BUILD + true + RPM_EC=1 ++ jobs -p + exit 1 error: Bad exit status from /var/tmp/rpm-tmp.ojDvj8 (%prep)
%build ! true
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.RTiQQH + umask 022 + cd /home/churchyard/rpmbuild/BUILD + true + RPM_EC=1 ++ jobs -p + exit 1 error: Bad exit status from /var/tmp/rpm-tmp.RTiQQH (%build)
%install ! true
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.RczM4N + umask 022 + cd /home/churchyard/rpmbuild/BUILD + '[' /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64 '!=' / ']' + rm -rf /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64 ++ dirname /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64 + mkdir -p /home/churchyard/rpmbuild/BUILDROOT + mkdir /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64 + true + /usr/lib/rpm/check-buildroot + ... + /usr/lib/rpm/redhat/brp-python-hardlink Executing(%check): ...
Or even:
%install ! true echo UNREACHABLE
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.nzrs6N + umask 022 + cd /home/churchyard/rpmbuild/BUILD + '[' /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64 '!=' / ']' + rm -rf /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64 ++ dirname /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64 + mkdir -p /home/churchyard/rpmbuild/BUILDROOT + mkdir /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64 + true + echo UNREACHABLE UNREACHABLE + /usr/lib/rpm/check-buildroot + ... + /usr/lib/rpm/redhat/brp-python-hardlink Executing(%check): ...
%check ! true
Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.4E9WU3 + umask 022 + cd /home/churchyard/rpmbuild/BUILD + true + RPM_EC=1 ++ jobs -p + exit 1 error: Bad exit status from /var/tmp/rpm-tmp.4E9WU3 (%check)
What sorcery is this?
Miro Hrončok wrote on 2022/04/06 4:21:
Hello folks,
I've realized that if the %install section contains a command that reverses the exit code from success to failure via !, the build does not fail, but it proceeds. In other sections, the build fails. E.g. this:
%install ! true
Does not fail the build.
But this does:
%install false
As well as this:
%build ! true
Any idea why this is happening? Is it a bug, or a feature? This happens on Fedora 35 locally as well as Rawhide in Koji/mock.
All of the following (applied separately) fail the RPM build:
%prep false
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.A1K5K0
- umask 022
- cd /home/churchyard/rpmbuild/BUILD
- false
error: Bad exit status from /var/tmp/rpm-tmp.A1K5K0 (%prep)
%build false
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.YR6FiX
- umask 022
- cd /home/churchyard/rpmbuild/BUILD
- false
error: Bad exit status from /var/tmp/rpm-tmp.YR6FiX (%build)
%install false
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.OapPfB
- umask 022
- cd /home/churchyard/rpmbuild/BUILD
- '[' /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64 '!=' / ']'
- rm -rf /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64
++ dirname /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64
- mkdir -p /home/churchyard/rpmbuild/BUILDROOT
- mkdir /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64
- false
error: Bad exit status from /var/tmp/rpm-tmp.OapPfB (%install)
%check false
Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.CnEWIO
- umask 022
- cd /home/churchyard/rpmbuild/BUILD
- false
error: Bad exit status from /var/tmp/rpm-tmp.CnEWIO (%check)
But when replaced with `! true`, %install (and %install only) succeeds:
%prep ! true
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.ojDvj8
- umask 022
- cd /home/churchyard/rpmbuild/BUILD
- true
- RPM_EC=1
++ jobs -p
- exit 1
error: Bad exit status from /var/tmp/rpm-tmp.ojDvj8 (%prep)
%build ! true
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.RTiQQH
- umask 022
- cd /home/churchyard/rpmbuild/BUILD
- true
- RPM_EC=1
++ jobs -p
- exit 1
error: Bad exit status from /var/tmp/rpm-tmp.RTiQQH (%build)
%install ! true
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.RczM4N
- umask 022
- cd /home/churchyard/rpmbuild/BUILD
- '[' /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64 '!=' / ']'
- rm -rf /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64
++ dirname /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64
- mkdir -p /home/churchyard/rpmbuild/BUILDROOT
- mkdir /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64
- true
- /usr/lib/rpm/check-buildroot
- ...
- /usr/lib/rpm/redhat/brp-python-hardlink
Executing(%check): ...
Or even:
%install ! true echo UNREACHABLE
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.nzrs6N
- umask 022
- cd /home/churchyard/rpmbuild/BUILD
- '[' /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64 '!=' / ']'
- rm -rf /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64
++ dirname /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64
- mkdir -p /home/churchyard/rpmbuild/BUILDROOT
- mkdir /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64
- true
- echo UNREACHABLE
UNREACHABLE
- /usr/lib/rpm/check-buildroot
- ...
- /usr/lib/rpm/redhat/brp-python-hardlink
Executing(%check): ...
%check ! true
Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.4E9WU3
- umask 022
- cd /home/churchyard/rpmbuild/BUILD
- true
- RPM_EC=1
++ jobs -p
- exit 1
error: Bad exit status from /var/tmp/rpm-tmp.4E9WU3 (%check)
What sorcery is this?
I think because on %install section, your line "! false" is followed by "echo UNREACHABLE" sentense and later by brp- scripts, and bash "set -e" explanation says:
Exit immediately if a pipeline (which may consist of a single simple command), a list, or a compound command (see SHELL GRAMMAR above), exits with a non-zero status. The shell does not exit if the command that fails is ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ part of the command list immediately following a while ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ or until keyword, part of the test following the if or elif reserved words, part of any command executed in a && or || list except the command following the final && or ||, any command in a pipeline but the last, or if the ^^^^^^^^^ command's return value is being inverted with !. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
So as far as I read the above explanation, this is expected bash behavior.
Regards, Mamoru
On 06. 04. 22 1:08, Mamoru TASAKA wrote:
Miro Hrončok wrote on 2022/04/06 4:21:
Hello folks,
I've realized that if the %install section contains a command that reverses the exit code from success to failure via !, the build does not fail, but it proceeds. In other sections, the build fails. E.g. this:
%install ! true
Does not fail the build.
But this does:
%install false
As well as this:
%build ! true
Any idea why this is happening? Is it a bug, or a feature? This happens on Fedora 35 locally as well as Rawhide in Koji/mock.
All of the following (applied separately) fail the RPM build:
%prep false
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.A1K5K0
- umask 022
- cd /home/churchyard/rpmbuild/BUILD
- false
error: Bad exit status from /var/tmp/rpm-tmp.A1K5K0 (%prep)
%build false
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.YR6FiX
- umask 022
- cd /home/churchyard/rpmbuild/BUILD
- false
error: Bad exit status from /var/tmp/rpm-tmp.YR6FiX (%build)
%install false
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.OapPfB
- umask 022
- cd /home/churchyard/rpmbuild/BUILD
- '[' /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64 '!=' / ']'
- rm -rf /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64
++ dirname /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64
- mkdir -p /home/churchyard/rpmbuild/BUILDROOT
- mkdir /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64
- false
error: Bad exit status from /var/tmp/rpm-tmp.OapPfB (%install)
%check false
Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.CnEWIO
- umask 022
- cd /home/churchyard/rpmbuild/BUILD
- false
error: Bad exit status from /var/tmp/rpm-tmp.CnEWIO (%check)
But when replaced with `! true`, %install (and %install only) succeeds:
%prep ! true
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.ojDvj8
- umask 022
- cd /home/churchyard/rpmbuild/BUILD
- true
- RPM_EC=1
++ jobs -p
- exit 1
error: Bad exit status from /var/tmp/rpm-tmp.ojDvj8 (%prep)
%build ! true
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.RTiQQH
- umask 022
- cd /home/churchyard/rpmbuild/BUILD
- true
- RPM_EC=1
++ jobs -p
- exit 1
error: Bad exit status from /var/tmp/rpm-tmp.RTiQQH (%build)
%install ! true
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.RczM4N
- umask 022
- cd /home/churchyard/rpmbuild/BUILD
- '[' /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64 '!=' / ']'
- rm -rf /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64
++ dirname /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64
- mkdir -p /home/churchyard/rpmbuild/BUILDROOT
- mkdir /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64
- true
- /usr/lib/rpm/check-buildroot
- ...
- /usr/lib/rpm/redhat/brp-python-hardlink
Executing(%check): ...
Or even:
%install ! true echo UNREACHABLE
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.nzrs6N
- umask 022
- cd /home/churchyard/rpmbuild/BUILD
- '[' /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64 '!=' / ']'
- rm -rf /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64
++ dirname /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64
- mkdir -p /home/churchyard/rpmbuild/BUILDROOT
- mkdir /home/churchyard/rpmbuild/BUILDROOT/reproducer-0-0.x86_64
- true
- echo UNREACHABLE
UNREACHABLE
- /usr/lib/rpm/check-buildroot
- ...
- /usr/lib/rpm/redhat/brp-python-hardlink
Executing(%check): ...
%check ! true
Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.4E9WU3
- umask 022
- cd /home/churchyard/rpmbuild/BUILD
- true
- RPM_EC=1
++ jobs -p
- exit 1
error: Bad exit status from /var/tmp/rpm-tmp.4E9WU3 (%check)
What sorcery is this?
I think because on %install section, your line "! false" is followed by "echo UNREACHABLE" sentense and later by brp- scripts, and bash "set -e" explanation says:
Exit immediately if a pipeline (which may consist of a single simple command), a list, or a compound command (see SHELL GRAMMAR above), exits with a non-zero status. The shell does not exit if the command that fails is ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ part of the command list immediately following a while ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ or until keyword, part of the test following the if or elif reserved words, part of any command executed in a && or || list except the command following the final && or ||, any command in a pipeline but the last, or if the ^^^^^^^^^ command's return value is being inverted with !. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
So as far as I read the above explanation, this is expected bash behavior.
Wow. Thanks.
Indeed this doesn't fail either:
%check ! true ! true ! true echo
I guess I need to verify the packages where we use `! grep ...` etc. in %check:
$ rg '^!\s+\S' rpm-specs/ rpm-specs/python-tomli.spec 81:! grep '^Requires-Dist:' %{buildroot}%{python3_sitelib}/tomli-%{version}.dist-info/METADATA
rpm-specs/symfpu.spec 78:! ./test --allTests
rpm-specs/radamsa.spec 39:! diff -u output1 output2
rpm-specs/python-rpm-macros.spec 133:! grep -E '^#[^%%]*%%[^%%]' %{buildroot}%{rpmmacrodir}/macros.*
rpm-specs/python-pyqtchart.spec 71:! grep %{buildroot} %{buildroot}%{distinfo}/*
rpm-specs/python-bleach.spec 55:! find %{buildroot}%{python3_sitelib}/bleach/ -type d | grep vendor
rpm-specs/ilua.spec 59:! grep Traceback check.log
rpm-specs/hspell.spec 66:! make test | grep FAILED | grep -E -v '1/aspell/[489]'
rpm-specs/gdb.spec 472:! find -name "*.rej" # Should not happen. 762:! grep '_RELOCATABLE.*1' gdb/config.h
rpm-specs/gap-pkg-edim.spec 87:! grep -Fq 'false' log
rpm-specs/csnappy.spec 49:! test -e LICENSE
And https://src.fedoraproject.org/rpms/pyproject-rpm-macros/blob/rawhide/f/tests... + other specs there.
On Wed, Apr 06, 2022 at 02:20:19AM +0200, Miro Hrončok wrote:
On 06. 04. 22 1:08, Mamoru TASAKA wrote:
Miro Hrončok wrote on 2022/04/06 4:21:
Hello folks,
I've realized that if the %install section contains a command that reverses the exit code from success to failure via !, the build does not fail, but it proceeds. In other sections, the build fails. E.g. this:
%install ! true
Does not fail the build.
But this does:
%install false
As well as this:
%build ! true
I think because on %install section, your line "! false" is followed by "echo UNREACHABLE" sentense and later by brp- scripts, and bash "set -e" explanation says:
Exit immediately if a pipeline (which may consist of a single simple command), a list, or a compound command (see SHELL GRAMMAR above), exits with a non-zero status. The shell does not exit if the command that fails is ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ part of the command list immediately following a while ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ or until keyword, part of the test following the if or elif reserved words, part of any command executed in a && or || list except the command following the final && or ||, any command in a pipeline but the last, or if the ^^^^^^^^^ command's return value is being inverted with !. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Yeah, it's a fairly terrible gotcha. To add to the excellent explanation by Mamoru, when there's a sequence of commands, the return value of the last command becomes the return value of the program. Thus bash -c 'set -e; ! true; true' returns success, but 'set -e; true; ! true' returns failure.
We fought with this in the systemd testsuite [e.g. 1,2]. One neat treat is to push the inversion into the command: ! test -e /some/path → test ! -e /some/path
Another trick is to wrap the whole command in a subshell [3]. Then the return value of the (only) command becomes the return value of the subshell: ! false → ( ! false ) (Only () works. {} doesn't have the same effect.)
[1] https://github.com/systemd/systemd/commit/ffa328f060 [2] https://github.com/systemd/systemd/commit/b1e1e5ac25 [3] https://github.com/systemd/systemd/commit/d6c51c485a
I guess I need to verify the packages where we use `! grep ...` etc. in %check:
$ rg '^!\s+\S' rpm-specs/ rpm-specs/python-tomli.spec 81:! grep '^Requires-Dist:' %{buildroot}%{python3_sitelib}/tomli-%{version}.dist-info/METADATA
rpm-specs/symfpu.spec 78:! ./test --allTests
rpm-specs/radamsa.spec 39:! diff -u output1 output2
rpm-specs/python-rpm-macros.spec 133:! grep -E '^#[^%%]*%%[^%%]' %{buildroot}%{rpmmacrodir}/macros.*
rpm-specs/python-pyqtchart.spec 71:! grep %{buildroot} %{buildroot}%{distinfo}/*
rpm-specs/python-bleach.spec 55:! find %{buildroot}%{python3_sitelib}/bleach/ -type d | grep vendor
rpm-specs/ilua.spec 59:! grep Traceback check.log
rpm-specs/hspell.spec 66:! make test | grep FAILED | grep -E -v '1/aspell/[489]'
rpm-specs/gdb.spec 472:! find -name "*.rej" # Should not happen. 762:! grep '_RELOCATABLE.*1' gdb/config.h
rpm-specs/gap-pkg-edim.spec 87:! grep -Fq 'false' log
rpm-specs/csnappy.spec 49:! test -e LICENSE
And https://src.fedoraproject.org/rpms/pyproject-rpm-macros/blob/rawhide/f/tests...
- other specs there.
This just shows how hard bash is to use correctly. shellcheck helps a lot, but even it doesn't find all the caveats.
Zbyszek
On Wednesday, April 6, 2022 10:13:16 AM CEST Zbigniew Jędrzejewski-Szmek wrote:
On Wed, Apr 06, 2022 at 02:20:19AM +0200, Miro Hrončok wrote:
On 06. 04. 22 1:08, Mamoru TASAKA wrote:
Miro Hrončok wrote on 2022/04/06 4:21:
Hello folks,
I've realized that if the %install section contains a command that reverses the exit code from success to failure via !, the build does not fail, but it proceeds. In other sections, the build fails. E.g. this:
%install ! true
Does not fail the build.
But this does:
%install false
As well as this:
%build ! true
I think because on %install section, your line "! false" is followed by "echo UNREACHABLE" sentense and later by brp- scripts, and bash "set -e" explanation says:
Exit immediately if a pipeline (which may consist of a single simple command), a list, or a compound command (see SHELL GRAMMAR above), exits with a non-zero status. The shell does not exit if the command that fails is ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ part of the command list immediately following a while ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ or until keyword, part of the test following the if or elif reserved words, part of any command executed in a && or || list except the command following the final && or ||, any command in a pipeline but the last, or if the ^^^^^^^^^ command's return value is being inverted with !. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Yeah, it's a fairly terrible gotcha. To add to the excellent explanation by Mamoru, when there's a sequence of commands, the return value of the last command becomes the return value of the program. Thus bash -c 'set -e; ! true; true' returns success, but 'set -e; true; ! true' returns failure.
Just note that the 'set -e' isn't related to the shell exit status in this case. It simply returns non-zero exit status because it _normally_ inherits that from the last command.
With the set -e, the surprising (but documented) fact is that 'set -e ; false ; true' fails but 'set -e ; ! true ; true' doesn't (this is excatly the scriptlet case).
Pavel
We fought with this in the systemd testsuite [e.g. 1,2]. One neat treat is to push the inversion into the command: ! test -e /some/path → test ! -e /some/path
Another trick is to wrap the whole command in a subshell [3]. Then the return value of the (only) command becomes the return value of the subshell: ! false → ( ! false ) (Only () works. {} doesn't have the same effect.)
[1] https://github.com/systemd/systemd/commit/ffa328f060 [2] https://github.com/systemd/systemd/commit/b1e1e5ac25 [3] https://github.com/systemd/systemd/commit/d6c51c485a
I guess I need to verify the packages where we use `! grep ...` etc. in %check:
$ rg '^!\s+\S' rpm-specs/ rpm-specs/python-tomli.spec 81:! grep '^Requires-Dist:' %{buildroot}%{python3_sitelib}/tomli-%{version}.dist-info/METADATA
rpm-specs/symfpu.spec 78:! ./test --allTests
rpm-specs/radamsa.spec 39:! diff -u output1 output2
rpm-specs/python-rpm-macros.spec 133:! grep -E '^#[^%%]*%%[^%%]' %{buildroot}%{rpmmacrodir}/macros.*
rpm-specs/python-pyqtchart.spec 71:! grep %{buildroot} %{buildroot}%{distinfo}/*
rpm-specs/python-bleach.spec 55:! find %{buildroot}%{python3_sitelib}/bleach/ -type d | grep vendor
rpm-specs/ilua.spec 59:! grep Traceback check.log
rpm-specs/hspell.spec 66:! make test | grep FAILED | grep -E -v '1/aspell/[489]'
rpm-specs/gdb.spec 472:! find -name "*.rej" # Should not happen. 762:! grep '_RELOCATABLE.*1' gdb/config.h
rpm-specs/gap-pkg-edim.spec 87:! grep -Fq 'false' log
rpm-specs/csnappy.spec 49:! test -e LICENSE
And https://src.fedoraproject.org/rpms/pyproject-rpm-macros/blob/rawhide/f/tests...
- other specs there.
This just shows how hard bash is to use correctly. shellcheck helps a lot, but even it doesn't find all the caveats.
Zbyszek _______________________________________________ packaging mailing list -- packaging@lists.fedoraproject.org To unsubscribe send an email to packaging-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/packaging@lists.fedoraproject.... Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
packaging@lists.fedoraproject.org