Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable pkg_rpm and pkg_subrpm to create empty RPMs (bazelbuild#859)
* Enable pkg_rpm and pkg_subrpm to create empty RPMs 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 this This 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. * Inject default file mode unconditionally We should be safe to inject this unconditionally instead of special casing on whether or not we have no actual files. * Fixup wrong append
- Loading branch information