Rename git-core rpm to just git and rename the meta-pacakge to git-all.
PATCH 1/1 Rename git-core rpm to just git and rename the meta-pacakge to git-all.
---
So here's change to fix my favorite annoyance with the git rpm
packaging: don't pull in tla when I say yum install git! The decision to make 'git' a metapackage is to say the least unconventional and continues to surprise people (here's today discussion:
http://marc.info/?t=120309228600004&r=1&w=2).
I know it's late and most people who use the git rpms are used to installing git-core by now, but myself and most of my Red Hat co-workers (who should know a thing or two about rpm packaging) have been fooled by the 'git' rpm that pulls in everything. There's really no precendence for this, quite the opposite: you wouldn't expect yum install gcc to pull in fortran, right?
The patch below only affects people who know that 'git' is a metapackage and actually use that to pull in everything (but who does?). The patch renames the 'git-core' rpm to just 'git', but adds a 'Provides: git-core' there so people who have trained themselves to say yum install git-core wont get burned.
cheers,
Kristian
git.spec.in | 65 ++++++++++++++++++++++++++++++---------------------------- 1 files changed, 34 insertions(+), 31 deletions(-)
git.spec.in +34 -31
@@ -3,7 +3,7 @@ Name: git Version: @@VERSION@@ Release: 1%{?dist} -Summary: Git core and tools +Summary: Core git tools License: GPL Group: Development/Tools URL: http://kernel.org/pub/software/scm/git/
@@ -11,80 +11,83 @@ Source: http://kernel.org/pub/software/scm/git/%{name}-%{version}.tar.gz BuildRequires: zlib-devel >= 1.2, openssl-devel, curl-devel, expat-devel, gettext %{!?_without_docs:, xmlto, asciidoc > 6.0.3} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -Requires: git-core = %{version}-%{release} -Requires: git-svn = %{version}-%{release} -Requires: git-cvs = %{version}-%{release} -Requires: git-arch = %{version}-%{release} -Requires: git-email = %{version}-%{release} -Requires: gitk = %{version}-%{release} -Requires: git-gui = %{version}-%{release} Requires: perl-Git = %{version}-%{release} +Requires: zlib >= 1.2, rsync, curl, less, openssh-clients, expat +Provides: git-core = %{version}-%{release} +Obsoletes: git-core < %{version}-%{release} %description Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals. -This is a dummy package which brings in all subpackages. +These are the core tools with minimal dependencies. -%package core -Summary: Core git tools +%package all +Summary: Meta-package to pull in all git tools Group: Development/Tools -Requires: zlib >= 1.2, rsync, curl, less, openssh-clients, expat -Obsoletes: git-p4 -%description core +Requires: git = %{version}-%{release} +Requires: git-svn = %{version}-%{release} +Requires: git-cvs = %{version}-%{release} +Requires: git-arch = %{version}-%{release} +Requires: git-email = %{version}-%{release} +Requires: gitk = %{version}-%{release} +Requires: git-gui = %{version}-%{release} +Obsoletes: git < %{version}-%{release} + +%description all Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals. -These are the core tools with minimal dependencies. +This is a dummy package which brings in all subpackages. %package svn Summary: Git tools for importing Subversion repositories Group: Development/Tools -Requires: git-core = %{version}-%{release}, subversion +Requires: git = %{version}-%{release}, subversion %description svn Git tools for importing Subversion repositories. %package cvs Summary: Git tools for importing CVS repositories Group: Development/Tools -Requires: git-core = %{version}-%{release}, cvs, cvsps +Requires: git = %{version}-%{release}, cvs, cvsps %description cvs Git tools for importing CVS repositories. %package arch Summary: Git tools for importing Arch repositories Group: Development/Tools -Requires: git-core = %{version}-%{release}, tla +Requires: git = %{version}-%{release}, tla %description arch Git tools for importing Arch repositories. %package email Summary: Git tools for sending email Group: Development/Tools -Requires: git-core = %{version}-%{release} +Requires: git = %{version}-%{release} %description email Git tools for sending email. %package gui Summary: Git GUI tool Group: Development/Tools -Requires: git-core = %{version}-%{release}, tk >= 8.4 +Requires: git = %{version}-%{release}, tk >= 8.4 %description gui Git GUI tool %package -n gitk Summary: Git revision tree visualiser ('gitk') Group: Development/Tools -Requires: git-core = %{version}-%{release}, tk >= 8.4 +Requires: git = %{version}-%{release}, tk >= 8.4 %description -n gitk Git revision tree visualiser ('gitk') %package -n perl-Git Summary: Perl interface to Git Group: Development/Libraries -Requires: git-core = %{version}-%{release} +Requires: git = %{version}-%{release} Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) BuildRequires: perl(Error)
@@ -121,8 +124,12 @@ rm -rf $RPM_BUILD_ROOT%{_mandir} %clean rm -rf $RPM_BUILD_ROOT -%files -# These are no files in the root package +%files -f bin-man-doc-files +%defattr(-,root,root) +%{_datadir}/git-core/ +%doc README COPYING Documentation/*.txt +%{!?_without_docs: %doc Documentation/*.html Documentation/howto} +%{!?_without_docs: %doc Documentation/technical} %files svn %defattr(-,root,root)
@@ -173,14 +180,10 @@ rm -rf $RPM_BUILD_ROOT %files -n perl-Git -f perl-files %defattr(-,root,root) -%files core -f bin-man-doc-files -%defattr(-,root,root) -%{_datadir}/git-core/ -%doc README COPYING Documentation/*.txt -%{!?_without_docs: %doc Documentation/*.html Documentation/howto} -%{!?_without_docs: %doc Documentation/technical} - %changelog +* Fri Feb 15 2008 Kristian Høgsberg <[email protected]> +- Rename git-core to just git and rename meta package from git to git-all. + * Sun Feb 03 2008 James Bowes <[email protected]> - Add a BuildRequires for gettext
Signature · 1 line
1.5.4.1.123.g012f
Quoted 14 lines · Kristian Høgsberg
---
So here's change to fix my favorite annoyance with the git rpm
packaging: don't pull in tla when I say yum install git! The decision to make 'git' a metapackage is to say the least unconventional and continues to surprise people (here's today discussion:
http://marc.info/?t=120309228600004&r=1&w=2).I know it's late and most people who use the git rpms are used to installing git-core by now, but myself and most of my Red Hat co-workers (who should know a thing or two about rpm packaging) have been fooled by the 'git' rpm that pulls in everything. There's really no precendence for this, quite the opposite: you wouldn't expect yum install gcc to pull in fortran, right?
Quoted 6 lines
The patch below only affects people who know that 'git' is a metapackage and actually use that to pull in everything (but who does?). The patch renames the 'git-core' rpm to just 'git', but adds a 'Provides: git-core' there so people who have trained themselves to say yum install git-core wont get burned.
Neat, and very nicely done. However, why not add "git-extras" package as meta-package that does what just plain "git" package used to do, and mentioning the git-extras rpm in the %description of git's package?
Signature · 3 lines
Andreas Ericsson [email protected] OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231
Quoted 22 lines · Andreas Ericsson
Quoted 14 lines · Kristian Høgsberg
---
So here's change to fix my favorite annoyance with the git rpm
packaging: don't pull in tla when I say yum install git! The decision to make 'git' a metapackage is to say the least unconventional and continues to surprise people (here's today discussion:
http://marc.info/?t=120309228600004&r=1&w=2).I know it's late and most people who use the git rpms are used to installing git-core by now, but myself and most of my Red Hat co-workers (who should know a thing or two about rpm packaging) have been fooled by the 'git' rpm that pulls in everything. There's really no precendence for this, quite the opposite: you wouldn't expect yum install gcc to pull in fortran, right?
Quoted 6 lines
The patch below only affects people who know that 'git' is a metapackage and actually use that to pull in everything (but who does?). The patch renames the 'git-core' rpm to just 'git', but adds a 'Provides: git-core' there so people who have trained themselves to say yum install git-core wont get burned.
Quoted 3 lines
Neat, and very nicely done. However, why not add "git-extras" package as meta-package that does what just plain "git" package used to do, and mentioning the git-extras rpm in the %description of git's package?
It's already there, I called it git-all though. Mentioning it in the git rpm description is a good idea. How about this wording:
"Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals.
The git rpm installs the core tools with minimal dependencies. To install all git packages, including tools for integrating with other SCMs, install the git-all meta-package."
Kristian
Thanks for updates to the spec file, but I need a bit of help here on two problems.
If I understand you correctly, it should now create "git" package, instead of "git-core", that contains the really core parts, and other pieces such as "git-svn" and friends will stay pretty much the same. In addition, the new "git" package will also say "this provides git-core, so install this when the user asks to install git-core".
Where does "git-all" you talked about in your message come into the picture? The "make rpm" procedure produced these files for me:
Wrote: /home/junio/rpms/SRPMS/git-1.5.4.2-1.src.rpm
Wrote: /home/junio/rpms/RPMS/i386/git-1.5.4.2-1.i386.rpm
Wrote: /home/junio/rpms/RPMS/i386/git-svn-1.5.4.2-1.i386.rpm
Wrote: /home/junio/rpms/RPMS/i386/git-cvs-1.5.4.2-1.i386.rpm
Wrote: /home/junio/rpms/RPMS/i386/git-arch-1.5.4.2-1.i386.rpm
Wrote: /home/junio/rpms/RPMS/i386/git-email-1.5.4.2-1.i386.rpm
Wrote: /home/junio/rpms/RPMS/i386/git-gui-1.5.4.2-1.i386.rpm
Wrote: /home/junio/rpms/RPMS/i386/gitk-1.5.4.2-1.i386.rpm
Wrote: /home/junio/rpms/RPMS/i386/perl-Git-1.5.4.2-1.i386.rpm
Wrote: /home/junio/rpms/RPMS/i386/git-debuginfo-1.5.4.2-1.i386.rpm
After I throw in these 9 i386.rpm files in my local yum repository and say "yum install git-all", I get "No Match for
argument: git-all". This is problem #1.
"yum install git" and "yum install git-core" do not give such an error but the latter gives quite a bunch of errors ("yum install git" goes alright). This is problem #2.
Note that I want to make sure that the upgrade to go smoothly, so I populated both 1.5.4 RPM and 1.5.4.2 RPM in the repository, which is to emulate what we do on k.org machines.
The errors start like this. It looks to me that "Provides:
git-core" is not being honored.
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
git-core i386 1.5.4-1 local 3.6 M
Installing for dependencies:
git i386 1.5.4.2-1 local 3.6 M perl-Git i386 1.5.4.2-1 local 14 k
Transaction Summary
=============================================================================
Install 3 Package(s) Update 0 Package(s) Remove 0 Package(s)
Total download size: 7.3 M
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Test
Finished Transaction Test
Transaction Check Error: file /usr/bin/git conflicts between attempted installs of git-1.5.4.2-1 and git-core-1.5.4-1
file /usr/bin/git-add conflicts between attempted installs of git-1.5.4.2-1 and git-core-1.5.4-1 file /usr/bin/git-am conflicts between attempted installs of git-1.5.4.2-1 and git-core-1.5.4-1
...
Quoted 3 lines · Junio C Hamano
"yum install git" and "yum install git-core" do not give such an error but the latter gives quite a bunch of errors ("yum install git" goes alright). This is problem #2.
You probably want "yum upgrade git-core".
The "problem" is that yum by default doesn't process RPM renames (obsoletes) unless you either have obsoletes=1 in your yum.conf, use "yum --obsoletes update" or use "yum upgrade".
j.
Quoted 11 lines · Jay Soffian
Quoted 3 lines · Junio C Hamano
"yum install git" and "yum install git-core" do not give such an error but the latter gives quite a bunch of errors ("yum install git" goes alright). This is problem #2.
You probably want "yum upgrade git-core".
The "problem" is that yum by default doesn't process RPM renames (obsoletes) unless you either have obsoletes=1 in your yum.conf, use "yum --obsoletes update" or use "yum upgrade".
Ah, that's what it is. Thanks, I wasn't aware of this issue.
Kristian
Quoted 7 lines · Kristian Høgsberg
Quoted 6 lines · Jay Soffian
Quoted 3 lines · Junio C Hamano
"yum install git" and "yum install git-core" do not give such an error but the latter gives quite a bunch of errors ("yum install git" goes alright). This is problem #2.
Quoted 7 lines
Quoted 5 lines
You probably want "yum upgrade git-core".
The "problem" is that yum by default doesn't process RPM renames (obsoletes) unless you either have obsoletes=1 in your yum.conf, use "yum --obsoletes update" or use "yum upgrade".
Ah, that's what it is. Thanks, I wasn't aware of this issue.
Does that mean that the test I did and the problem I saw were end-user errors and that there is no proble with your patch and I can use it as-is to cut 1.5.4.3 and future ones?
That's a great news.
But perhaps we would need some description/warning to help end users as clueless as I am with respect to yum in the release notes and/or announcements?
Could you resend the patch with a commit log message that I can later reuse parts from for such a purpose, with a sign-off please?
Quoted 21 lines · Junio C Hamano
Quoted 7 lines · Kristian Høgsberg
Quoted 6 lines · Jay Soffian
Quoted 3 lines · Junio C Hamano
"yum install git" and "yum install git-core" do not give such an error but the latter gives quite a bunch of errors ("yum install git" goes alright). This is problem #2.
Quoted 7 lines
Quoted 5 lines
You probably want "yum upgrade git-core".
The "problem" is that yum by default doesn't process RPM renames (obsoletes) unless you either have obsoletes=1 in your yum.conf, use "yum --obsoletes update" or use "yum upgrade".
Ah, that's what it is. Thanks, I wasn't aware of this issue.
Does that mean that the test I did and the problem I saw were end-user errors and that there is no proble with your patch and I can use it as-is to cut 1.5.4.3 and future ones?
Quoted 5 lines
That's a great news.
But perhaps we would need some description/warning to help end users as clueless as I am with respect to yum in the release notes and/or announcements?
We could, but could you provide a little more detail about the system you tested on? I have
obsoletes=1
in my /etc/yum.conf, which has been default in Fedora since October 2004.
Quoted 3 lines
Could you resend the patch with a commit log message that I can later reuse parts from for such a purpose, with a sign-off please?
Yup, I'm getting a new patch together to address the comments from your earlier mail. Also, I had the git-all package in there, but it turns out that without a %files section, rpm doesn't create the rpm. New patch coming up in a few minutes.
Kristian
Quoted 14 lines · Kristian Høgsberg
---
So here's change to fix my favorite annoyance with the git rpm
packaging: don't pull in tla when I say yum install git! The decision to make 'git' a metapackage is to say the least unconventional and continues to surprise people (here's today discussion:
http://marc.info/?t=120309228600004&r=1&w=2).I know it's late and most people who use the git rpms are used to installing git-core by now, but myself and most of my Red Hat co-workers (who should know a thing or two about rpm packaging) have been fooled by the 'git' rpm that pulls in everything. There's really no precendence for this, quite the opposite: you wouldn't expect yum install gcc to pull in fortran, right?
Quoted 5 lines
The patch below only affects people who know that 'git' is a metapackage and actually use that to pull in everything (but who does?). The patch renames the 'git-core' rpm to just 'git', but adds a 'Provides: git-core' there so people who have trained themselves to say yum install git-core wont get burned.
Why all of these good information is below the three-dash lines and without Sign-off?
The spec file I ship in git.git was written by somebody else for Linus a long time ago, augmented with patches from others over time, and I freely admit that I am RPM challenged. I do not exactly know what I have been shipping, and I do not personally manage an RPM based system. Having no way of testing any changes myself makes me first go hide whenever I see a patch to the spec file and then re-approach the patch slowly, prodding with ten-foot pole. The only thing that is saving the world from disaster is that Distro people tend to have and do use their own spec file, not mine ;-)
So I am more than Ok with a patch like this from somebody whose RPM skills and common sense I can trust.
I have to wonder where the git-p4 obsoletion went, though.
Quoted 11 lines · Kristian Høgsberg
So here's change to fix my favorite annoyance with the git rpm
packaging: don't pull in tla when I say yum install git! The decision to make 'git' a metapackage is to say the least unconventional and continues to surprise people (here's today discussion:
http://marc.info/?t=120309228600004&r=1&w=2).I know it's late and most people who use the git rpms are used to installing git-core by now, but myself and most of my Red Hat co-workers (who should know a thing or two about rpm packaging) have been fooled by the 'git' rpm that pulls in everything. There's really no precendence for this, quite the opposite: you wouldn't expect yum install gcc to pull in fortran, right?
I think I'd rather have git RPM as metapackage, but not such wide one. I'd like for git RPM to install git-core, git-email, git, git-gui and perl-Git; I agree that bits about interaction with other SCMs should be not included in git (meta)package, as this requires to actually have all those SCMs...
Just my 2 eurocents
Signature · 3 lines
Jakub Narebski Poland ShadeHawk on #git
PATCH 1/1 Rename git-core rpm to just git and rename the meta-pacakge to git-all.
In reply to Junio C HamanoThis fixes my favorite annoyance with the git rpm packaging: don't pull in tla when I say yum install git! You wouldn't expect yum install gcc to pull in gcc-gfortran, right?
With this change, and blanket 'yum update' will automatically pull in the new 'git' package and push out the old 'git-core', and if the old 'git' package was installed 'git-all' will be pulled in instead. A couple of things do break though: 'yum update git-core', because yum behaves differently when given a specific package name - it doesn't follow obsoletes.
Instead, 'yum install git' will pull in the new git rpm, which will then push out the old 'git-core'. Similarly, to get the newest version of the meta package, 'yum install git-all' will install git-all, which then pushes out the old 'git' meta package.
---
Here's the updated patch. I did spend some time trying to better handle the 'yum update git-core' case, but yum doesn't work that way. When an explicit package name is given, yum doesn't use Obsoletes to find the latest version, but it does for just 'yum update'. Yes, I think yum is broken in that respect.
Other changes: added back the git-p4 obsoletion I dropped, added parts of my rant to the commit message, added an empty %files section for the git-all package so it's actually created, hard code the obsoletes versions to < 1.5.4.2.
I tried 'yum install git-core' on a system with no git packages as you described in your email, and both rpm versions in the repo, but I didn't see the errors you mentioned, I just got 'git' installed. Perhaps you need to issue a 'yum clean all' and rebuild the yum repo metadata?
Kristian
[ Sent to Junio earlier, forgot to Cc the list ]
git.spec.in | 69 +++++++++++++++++++++++++++++++++------------------------- 1 files changed, 39 insertions(+), 30 deletions(-)
git.spec.in +39 -30
@@ -3,7 +3,7 @@ Name: git Version: @@VERSION@@ Release: 1%{?dist} -Summary: Git core and tools +Summary: Core git tools License: GPL Group: Development/Tools URL: http://kernel.org/pub/software/scm/git/
@@ -11,80 +11,86 @@ Source: http://kernel.org/pub/software/scm/git/%{name}-%{version}.tar.gz BuildRequires: zlib-devel >= 1.2, openssl-devel, curl-devel, expat-devel, gettext %{!?_without_docs:, xmlto, asciidoc > 6.0.3} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -Requires: git-core = %{version}-%{release} -Requires: git-svn = %{version}-%{release} -Requires: git-cvs = %{version}-%{release} -Requires: git-arch = %{version}-%{release} -Requires: git-email = %{version}-%{release} -Requires: gitk = %{version}-%{release} -Requires: git-gui = %{version}-%{release} Requires: perl-Git = %{version}-%{release} +Requires: zlib >= 1.2, rsync, curl, less, openssh-clients, expat +Provides: git-core = %{version}-%{release} +Obsoletes: git-core <= 1.5.4.2 +Obsoletes: git-p4 %description Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals. -This is a dummy package which brings in all subpackages. +The git rpm installs the core tools with minimal dependencies. To +install all git packages, including tools for integrating with other +SCMs, install the git-all meta-package. -%package core -Summary: Core git tools +%package all +Summary: Meta-package to pull in all git tools Group: Development/Tools -Requires: zlib >= 1.2, rsync, curl, less, openssh-clients, expat -Obsoletes: git-p4 -%description core +Requires: git = %{version}-%{release} +Requires: git-svn = %{version}-%{release} +Requires: git-cvs = %{version}-%{release} +Requires: git-arch = %{version}-%{release} +Requires: git-email = %{version}-%{release} +Requires: gitk = %{version}-%{release} +Requires: git-gui = %{version}-%{release} +Obsoletes: git <= 1.5.4.2 + +%description all Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals. -These are the core tools with minimal dependencies. +This is a dummy package which brings in all subpackages. %package svn Summary: Git tools for importing Subversion repositories Group: Development/Tools -Requires: git-core = %{version}-%{release}, subversion +Requires: git = %{version}-%{release}, subversion %description svn Git tools for importing Subversion repositories. %package cvs Summary: Git tools for importing CVS repositories Group: Development/Tools -Requires: git-core = %{version}-%{release}, cvs, cvsps +Requires: git = %{version}-%{release}, cvs, cvsps %description cvs Git tools for importing CVS repositories. %package arch Summary: Git tools for importing Arch repositories Group: Development/Tools -Requires: git-core = %{version}-%{release}, tla +Requires: git = %{version}-%{release}, tla %description arch Git tools for importing Arch repositories. %package email Summary: Git tools for sending email Group: Development/Tools -Requires: git-core = %{version}-%{release} +Requires: git = %{version}-%{release} %description email Git tools for sending email. %package gui Summary: Git GUI tool Group: Development/Tools -Requires: git-core = %{version}-%{release}, tk >= 8.4 +Requires: git = %{version}-%{release}, tk >= 8.4 %description gui Git GUI tool %package -n gitk Summary: Git revision tree visualiser ('gitk') Group: Development/Tools -Requires: git-core = %{version}-%{release}, tk >= 8.4 +Requires: git = %{version}-%{release}, tk >= 8.4 %description -n gitk Git revision tree visualiser ('gitk') %package -n perl-Git Summary: Perl interface to Git Group: Development/Libraries -Requires: git-core = %{version}-%{release} +Requires: git = %{version}-%{release} Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) BuildRequires: perl(Error)
@@ -121,8 +127,12 @@ rm -rf $RPM_BUILD_ROOT%{_mandir} %clean rm -rf $RPM_BUILD_ROOT -%files -# These are no files in the root package +%files -f bin-man-doc-files +%defattr(-,root,root) +%{_datadir}/git-core/ +%doc README COPYING Documentation/*.txt +%{!?_without_docs: %doc Documentation/*.html Documentation/howto} +%{!?_without_docs: %doc Documentation/technical} %files svn %defattr(-,root,root)
@@ -173,14 +183,13 @@ rm -rf $RPM_BUILD_ROOT %files -n perl-Git -f perl-files %defattr(-,root,root) -%files core -f bin-man-doc-files -%defattr(-,root,root) -%{_datadir}/git-core/ -%doc README COPYING Documentation/*.txt -%{!?_without_docs: %doc Documentation/*.html Documentation/howto} -%{!?_without_docs: %doc Documentation/technical} +%files all +# No files for you! %changelog +* Fri Feb 15 2008 Kristian Høgsberg <[email protected]> +- Rename git-core to just git and rename meta package from git to git-all. + * Sun Feb 03 2008 James Bowes <[email protected]> - Add a BuildRequires for gettext
Signature · 1 line
1.5.4.1.123.gf3c6