[Rpm-maint] [rpm-software-management/rpm] Unreadable directory causes difficult to debug failure (#776)

Jason Tibbitts notifications at github.com
Fri Jun 28 19:13:05 UTC 2019

I recently helped track down a rather bizarre build failure, where rpmbuild exited 1 (causing mock to abort) but it wasn't really obvious why.  Turns out that executable permissions had been removed from a directory.  (Upstream had added a directory where previously there were only files, and so an overly broad `chmod 600 *` remained in the spec.)  There were complaints about this in various brp scripts but these didn't actually cause failures and ended up being buried in the rest of the output.  The last line output by rpmbuild itself was just `+ exit 0`.

The below simple spec should illustrate.  (Running in mock is not necessary to see the issue.)  The %prep section and %license bit in files aren't necessary, but serve to illustrate how difficult it can be to find the underlying cause.  Running with `-vv` doesn't expose any additional information at the end besides some calls to the compressor.  If you would like to see this with a less contrived spec, I can provide the package I originally helped debug.

Summary: foo
Name: foo
Version: 1
Release: 1%{?dist}
License: BSD0


touch lic

pushd %buildroot
mkdir -p etc/foo/bar
touch etc/foo/bar/{a,b,c}
chmod 600 etc/foo

echo foo

%license lic

* Fri Jun 28 2019 Jason L Tibbitts III <j at tib.bs> - 1-1
- Foo

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20190628/e8e84256/attachment.html>

More information about the Rpm-maint mailing list