Closed kellyma2 closed 2 months ago
I still wonder why anyone would want an empty RPM, but I'll go with the flow on that.
The examples I've encountered thusfar involve having an empty / stub top level RPM with non-empty sub RPMs, although I figured it's harmless to also enable sub RPMs to do this too.
At present we fail in two ways if we try to create empty RPMs:
we expect srcs to be both non-empty and will fail if it is empty and we have no spec file
we don't emit anything for the
%files
block in the RPM if there are no actual files and rpmbuild doesn't like thisThis change tweaks the former condition so that srcs has to be non-None or we have to have a specfile, but will allow us to have an empty (
[]
) value for srcs. Additionally, it injects%defattr(-,root,root)
as a reasonable default for the%files
blocks so as to allow rpmbuild to be happy with what we're providing.Fixes #711