<p>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 <code>chmod 600 *</code> 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 <code>+ exit 0</code>.</p>
<p>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 <code>-vv</code> 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.</p>
<pre><code>Summary: foo
Name: foo
Version: 1
Release: 1%{?dist}
License: BSD0

%description
Foo.

%prep
touch lic

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

%check
echo foo

%files
%license lic
/etc/foo/

%changelog
* Fri Jun 28 2019 Jason L Tibbitts III <j@tib.bs> - 1-1
- Foo
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/rpm-software-management/rpm/issues/776?email_source=notifications&email_token=ADLPZU75BK7JAPLSOF7FFELP4ZPEDA5CNFSM4H4H35NKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G4MGD2Q">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ADLPZUZY4N6HHTFW4BCDA5LP4ZPEDANCNFSM4H4H35NA">mute the thread</a>.<img src="https://github.com/notifications/beacon/ADLPZUY2PQ6PJVLVLTRSYF3P4ZPEDA5CNFSM4H4H35NKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G4MGD2Q.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/rpm-software-management/rpm/issues/776?email_source=notifications\u0026email_token=ADLPZU75BK7JAPLSOF7FFELP4ZPEDA5CNFSM4H4H35NKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G4MGD2Q",
"url": "https://github.com/rpm-software-management/rpm/issues/776?email_source=notifications\u0026email_token=ADLPZU75BK7JAPLSOF7FFELP4ZPEDA5CNFSM4H4H35NKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G4MGD2Q",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>