From mhroncok at redhat.com Tue Apr 5 19:21:47 2022 From: mhroncok at redhat.com (=?UTF-8?Q?Miro_Hron=c4=8dok?=) Date: Tue, 5 Apr 2022 21:21:47 +0200 Subject: rpmbuild: `! true` does not fail %install, but `false` does, `! true` fails other sections Message-ID: <68755ede-62f0-3b4a-bcdf-d9738713bc93@redhat.com> 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 -- Phone: +420777974800 IRC: mhroncok From pmatilai at redhat.com Wed Apr 13 13:00:08 2022 From: pmatilai at redhat.com (Panu Matilainen) Date: Wed, 13 Apr 2022 16:00:08 +0300 Subject: New RPM community venue In-Reply-To: <9437c6cb-ae92-da62-683c-1bcd032243a0@redhat.com> References: <9437c6cb-ae92-da62-683c-1bcd032243a0@redhat.com> Message-ID: <1e10e94a-af98-705a-9ce3-8c047b071a80@redhat.com> As of today, we're opening up the GitHub Discussions forum as a new venue for community interaction: https://github.com/rpm-software-management/rpm/discussions Why, you ask, when we have all these mailing lists? The sad fact is that the mailing lists are all but dead, to the point that even us maintainers miss the rare post on them, leading them even more dead because few people like talking to themselves. Yet, clearly there is a need for a place to ask questions and discuss various aspects of rpm and its future, and based on evidence people are more inclined to file a ticket to do this rather than post on a mailing list. That, or remain silent. Neither is a particularly good outcome. We hate the potential vendor lock-in as much as anybody, so these discussions will always be mirrored to rpm-maint mailing list along with the ticket and PR notifications. Other than that, we'll see how it goes. On behalf of rpm-team, - Panu -