From 986b772e5516e1a4a762931959576dcf070722e8 Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Wed, 7 Feb 2018 14:17:52 -0500 Subject: [PATCH] Split 'git subtree' into a separate package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While 'git subtree' does not pull in any additional dependencies, having it in a separate package may help avoid confusion that it is a core git command. This came up recently on the git list¹. Another recent thread leaves the impression that 'git subtree' is in maintenance mode². This implies that it is unlikely to move out of contib in the near future. ¹ https://public-inbox.org/git/alpine.LFD.2.21.1802070801470.19185@android-a172fe96dd584b41/ ² https://public-inbox.org/git/CADfK3RWXDuE=hYD==4sHXO1iJeOiVDOp7hBqhBtSn7gnQ+x7Qg@mail.gmail.com/ --- .rpmlint | 1 + git.spec | 22 ++++++++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.rpmlint b/.rpmlint index 61b6a32..08c9108 100644 --- a/.rpmlint +++ b/.rpmlint @@ -2,6 +2,7 @@ from Config import * # the dictionary is a bit limited addFilter("git.* spelling-error %description .* subpackages") +addFilter("git-subtree.* spelling-error %description .* (subdirectory|subproject|subtree)") # We're not misusing %{buildroot} here addFilter("git\.(spec|src):.* rpm-buildroot-usage %prep DESTDIR = %{buildroot}") diff --git a/git.spec b/git.spec index 915fc0a..8d0a478 100644 --- a/git.spec +++ b/git.spec @@ -187,6 +187,7 @@ Requires: git-cvs = %{version}-%{release} Requires: git-email = %{version}-%{release} Requires: git-gui = %{version}-%{release} Requires: git-p4 = %{version}-%{release} +Requires: git-subtree = %{version}-%{release} Requires: git-svn = %{version}-%{release} Requires: gitk = %{version}-%{release} Requires: perl-Git = %{version}-%{release} @@ -324,6 +325,14 @@ Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $versi %description -n perl-Git-SVN %{summary}. +%package subtree +Summary: Git tools to merge and split repositories +Requires: git-core = %{version}-%{release} +%description subtree +Git subtrees allow subprojects to be included within a subdirectory +of the main project, optionally including the subproject's entire +history. + %package svn Summary: Git tools for interacting with Subversion repositories Requires: git = %{version}-%{release}, subversion @@ -464,12 +473,14 @@ find %{buildroot} -type f -name '*.bs' -empty -exec rm -f {} ';' find %{buildroot} -type f -name perllocal.pod -exec rm -f {} ';' # Clean up contrib/subtree to avoid cruft in the git-core-doc docdir +# Move git-subtree.txt to Documentation so it can be installed later in docdir +mv contrib/subtree/git-subtree.txt Documentation/ rm -rf contrib/subtree/{INSTALL,Makefile,git-subtree{,.{1,html,sh,txt,xml}},t} # git-archimport is not supported find %{buildroot} Documentation -type f -name 'git-archimport*' -exec rm -f {} ';' -exclude_re="archimport|email|git-citool|git-cvs|git-daemon|git-gui|git-remote-bzr|git-remote-hg|gitk|p4|svn" +exclude_re="archimport|email|git-citool|git-cvs|git-daemon|git-gui|git-remote-bzr|git-remote-hg|git-subtree|gitk|p4|svn" (find %{buildroot}{%{_bindir},%{_libexecdir}} -type f | grep -vE "$exclude_re" | sed -e s@^%{buildroot}@@) > bin-man-doc-files (find %{buildroot}{%{_bindir},%{_libexecdir}} -mindepth 1 -type d | grep -vE "$exclude_re" | sed -e 's@^%{buildroot}@%dir @') >> bin-man-doc-files (find %{buildroot}%{perl_vendorlib} -type f | sed -e s@^%{buildroot}@@) > perl-git-files @@ -547,7 +558,7 @@ grep -E "$not_core_re" bin-man-doc-files > bin-man-doc-git-files ##### DOC # place doc files into %%{_pkgdocdir} and split them into expected packages # contrib -not_core_doc_re="(git-(cvs|gui|citool|daemon))|p4|svn|email|gitk|gitweb" +not_core_doc_re="(git-(cvs|gui|citool|daemon|subtree))|p4|svn|email|gitk|gitweb" mkdir -p %{buildroot}%{_pkgdocdir}/ cp -pr README.md Documentation/*.txt Documentation/RelNotes contrib %{buildroot}%{_pkgdocdir}/ # Remove contrib/{credential,svn-fe}, they have nothing useful for documentation @@ -758,6 +769,12 @@ make test || ./print-failed-test-output %files -n perl-Git-SVN -f perl-git-svn-files %{?with_docs:%{_mandir}/man3/*Git*SVN*.3pm*} +%files subtree +%{gitexecdir}/git-subtree +%{_pkgdocdir}/git-subtree.txt +%{?with_docs:%{_mandir}/man1/git-subtree.1*} +%{?with_docs:%{_pkgdocdir}/git-subtree.html} + %files svn %{gitexecdir}/*svn* %{_pkgdocdir}/*svn*.txt @@ -769,6 +786,7 @@ make test || ./print-failed-test-output - Order %%files and %%packages sections by name - Remove obsolete %%defattr - Don't package contrib/svn-fe in %%doc +- Split git-subtree into a separate package * Wed Feb 07 2018 Fedora Release Engineering - 2.16.1-2.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild