From 6bf3ed4a31a20c6d6fc153e13c9a99c541a63e74 Mon Sep 17 00:00:00 2001 From: Sebastian Kisela Date: Thu, 6 Sep 2018 11:22:49 -0400 Subject: [PATCH] Fix builds without docs and without cvs and/or p4 When building with options "--without docs --without p4 --without cvs" the build fails with the following errors: error: Installed (but unpackaged) file(s) found: /usr/share/doc/git/git-cvsexportcommit.txt /usr/share/doc/git/git-cvsimport.txt /usr/share/doc/git/git-cvsserver.txt /usr/share/doc/git/git-p4.txt Installed (but unpackaged) file(s) found: /usr/share/doc/git/git-cvsexportcommit.txt /usr/share/doc/git/git-cvsimport.txt /usr/share/doc/git/git-cvsserver.txt /usr/share/doc/git/git-p4.txt The .txt files were not caught by the %files entry in the main git package when cvs/p4 were disabled -- from 9cd8ee7 ("Disable CVS support on EL > 7", 2018-03-14. Those only applied when documentation was not disabled. Remove git-cvs* and git-p4* files from Documentation as well as the %{buildroot}. Simplify the find path by dropping %{_bindir} and %{gitexecdir}. Tighten the git-p4 glob to avoid unintended matches. Drop the conditional inclusion of cvs/p4 docs in the main git package in favor of removing the files entirely. --- git.spec | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/git.spec b/git.spec index 25ec6bb..ba2ac4a 100644 --- a/git.spec +++ b/git.spec @@ -588,13 +588,15 @@ rm -rf contrib/subtree/{INSTALL,Makefile,git-subtree{,.{1,html,sh,txt,xml}},t} find %{buildroot} Documentation -type f -name 'git-archimport*' -exec rm -f {} ';' %if ! %{with cvs} -# Remove git-cvs* from %%{_bindir} and %%{gitexecdir} -find %{buildroot}{%{_bindir},%{gitexecdir}} \( -type f -o -type l \) -name 'git-cvs*' -exec rm -f {} ';' +# Remove git-cvs* and gitcvs* +find %{buildroot} Documentation \( -type f -o -type l \) \ + \( -name 'git-cvs*' -o -name 'gitcvs*' \) -exec rm -f {} ';' %endif %if ! %{with p4} -# Remove *p4* from %%{_bindir} and %%{gitexecdir} -find %{buildroot}{%{_bindir},%{gitexecdir}} -type f -name '*p4*' -exec rm -f {} ';' +# Remove git-p4* and mergetools/p4merge +find %{buildroot} Documentation -type f -name 'git-p4*' -exec rm -f {} ';' +rm -f %{buildroot}%{gitexecdir}/mergetools/p4merge %endif # Remove unneeded git-remote-testsvn so git-svn can be noarch @@ -804,14 +806,6 @@ make -C contrib/credential/netrc/ testverbose %exclude %{_pkgdocdir}/contrib/*/*.py[co] %endif %{_pkgdocdir}/contrib/hooks -%if ! %{with cvs} -%{?with_docs:%{_mandir}/man1/*cvs*.1*} -%{?with_docs:%{_pkgdocdir}/git-cvs*} -%endif -%if ! %{with p4} -%{?with_docs:%{_mandir}/man1/*p4*.1*} -%{?with_docs:%{_pkgdocdir}/*p4*} -%endif %if %{with cvs} %files cvs @@ -910,6 +904,7 @@ make -C contrib/credential/netrc/ testverbose %changelog * Thu Sep 06 2018 Sebastian Kisela - 2.19.0-0.4.rc2 - Move instaweb to a separate subpackage +- Fix builds without docs and without cvs and/or p4 * Tue Sep 04 2018 Todd Zullinger - 2.19.0-0.3.rc2 - Update to 2.19.0.rc2