[packagers] New specfile for git

Tom G. Christensen tgc at statsbiblioteket.dk
Wed Dec 9 17:32:26 CET 2009


Yury V. Zaytsev wrote:
> Hi Tom!
> 
> Thank you very much for your efforts. I think that your package is
> clearly superior than the one that is currently provided by RPMForge.
> 
> On Thu, 2009-11-26 at 08:51 +0100, Tom G. Christensen wrote:
> 
>> It supports el2 which Dag has stopped supporting.
> 
> I think that we can keep it for awhile as long as it does not clutter
> the SPEC all that much to be able to sync with you if you are willing to
> help us to keep it up to date.
> 
That was the plan.
A new 1.6.6 release is currently on the way so I might just yank out the 
el2 stuff then.

>> The upgrade path from the old RPMforge git package has not been tested.
> 
> This IS an issue. I can mark it as test and than ask users@ to check
> whether it works for them before including it in the updates.
> 
Well apart from the fact that the new package is more modular I don't 
expect any problems.
Upstream made a change in 1.6.0 so that all the git-* are no longer 
created in the path (they go in libexec/git-core) and this might upset 
some but it *is* an upstream change that Fedora (and I hope EPEL when it 
get's updated) has embraced.

> Could you please have a look at the corrections I made before I commit
> the whole thing? Particularly, I'm wondering, why you are obsoleting a
> specific version and not the whole bunch of previous packages:
> 
> -Obsoletes:<--->git <= 1.5.4.3
> +Obsoletes:<--->git <= %{version}-%{release}
> 
This is from Upstream/Fedora and I believe it is related to a reshuffle 
of the subpackages (git->git-all, git-core->git), hence the "new" git 
obsoletes the old git (which became git-all).
This took 'yum install git' from a being a kitchen-sink install to just 
grabbing the parts of git that most people use.
I think it makes sense to keep it as is for compatibility reasons 
(Fedora/EPEL will have the same provides/obsoletes) but otherwise it 
should just be removed.

> --- git-tom.spec	2009-12-08 14:16:06.000000000 +0100
> +++ git.spec	2009-12-08 13:53:39.000000000 +0100
> @@ -1,4 +1,8 @@
> -%{?dtag: %{expand: %%define %dtag 1}}
> +# $Id$
> +# Authority: dag
> +# Upstream: Scott Chacon <schacon$gmail,com>
> +#
Junio C Hamano (gitster$pobox,com) is the upstream maintainer of Git.

> +# Tag: test
>  
>  %define perl_vendorlib %(eval "`%{__perl} -V:installvendorlib`"; echo $installvendorlib)
>  %define perl_vendorarch %(eval "`%{__perl} -V:installvendorarch`"; echo $installvendorarch)
> @@ -13,15 +17,16 @@
>  %{?el2:%define _without_nsec 1}
>  %{?el2:%define _without_svn 1}
>  %{?el2:%define _without_external_grep 1}
> +
>  %{?el3:%define _with_old_makemaker 1}
>  %{?el3:%define _without_gitweb 1}
>  %{?el3:%define _without_gui 1}
>  
> -#define snap	.rc2
> +#%define snap	.rc2
>  
Please don't add back % here, it's safer to comment a %define by 
replacing % with # as RPM might still expand it otherwise.

>  Name: 		git
>  Version: 	1.6.5.3

Two new minor releases have come out since I posted this.
The latest is 1.6.5.5 and it builds fine with this specfile so you can 
update the version while you're at it.

> -Release: 	1%{?snap}
> +Release: 	2%{?snap}%{?dist}
>  Summary:	Fast Version Control System
>  License: 	GPLv2
>  Group: 		Development/Tools
> @@ -34,24 +39,26 @@
>  # https://bugzilla.redhat.com/490602
>  Patch1:		git-cvsimport-Ignore-cvsps-2.2b1-Branches-output.patch
>  # https://bugzilla.redhat.com/500137
> -Patch2:         git-1.6-update-contrib-hooks-path.patch
> +Patch2:		git-1.6-update-contrib-hooks-path.patch
>  Patch10:	git-1.6.5-nomakemaker.patch
> -BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
> +BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root
>  
>  BuildRequires:	zlib-devel, openssl-devel, expat-devel
>  BuildRequires:	gnupg
> +
Why introduce a blank line here?

>  %{!?_without_curl:BuildRequires:	curl-devel >= 7.9.8}
> +
>  Requires:	perl-Git = %{version}-%{release}
>  Requires:	rsync, less
>  Provides:	git-core = %{version}-%{release}
> -Obsoletes:	git-core <= 1.5.4.3
> +Obsoletes:	git-core <= %{version}-%{release}
>  
This is not right.
Either keep it as is or remove it all together. Also see the explanation 
above.

>  %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.
>  
> -The git rpm installs the core tools with minimal dependencies.  To
> +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.
>  
IIRC this text comes straight from Fedora, unless you think it's very 
important I see no reason to change it.

> @@ -65,7 +72,7 @@
>  %{!?_without_gui:Requires:	gitk = %{version}-%{release}}
>  %{!?_without_gui:Requires:	git-gui = %{version}-%{release}}
>  %{?_with_arch:Requires:	git-arch = %{version}-%{release}}
> -Obsoletes:	git <= 1.5.4.3
> +Obsoletes:	git <= %{version}-%{release}
>  
Same as above with git-core.

>  %description all
>  Git is a fast, scalable, distributed revision control system with an
> @@ -166,7 +173,7 @@
>  
>  # Consolidate build options in one place
>  # All on one line please, older rpms don't grok multiline macros.
> -%define make_git make %{_smp_mflags} V=1 CFLAGS="$RPM_OPT_FLAGS%{?el3: -I/usr/kerberos/include}" ETC_GITCONFIG=%{_sysconfdir}/gitconfig DESTDIR=$RPM_BUILD_ROOT INSTALL="%{__install} -p" PREFIX="%{_prefix}" INSTALLDIRS="vendor" %{?_without_curl:NO_CURL=YES} %{?_without_gui:NO_TCLTK=YES} %{?_without_nsec:NO_NSEC=YES} %{?_without_external_grep:NO_EXTERNAL_GREP=YES} %{?_with_old_makemaker:NO_PERL_MAKEMAKER=YES} prefix=%{_prefix} mandir=%{_mandir}
> +%define make_git make %{?_smp_mflags} V=1 CFLAGS="%{optflags}%{?el3: -I/usr/kerberos/include}" ETC_GITCONFIG=%{_sysconfdir}/gitconfig DESTDIR=$RPM_BUILD_ROOT INSTALL="%{__install} -p" PREFIX="%{_prefix}" INSTALLDIRS="vendor" %{?_without_curl:NO_CURL=YES} %{?_without_gui:NO_TCLTK=YES} %{?_without_nsec:NO_NSEC=YES} %{?_without_external_grep:NO_EXTERNAL_GREP=YES} %{?_with_old_makemaker:NO_PERL_MAKEMAKER=YES} prefix=%{_prefix} mandir=%{_mandir}
>  
No problem.

>  # Filter bogus perl requires
>  # packed-refs comes from a comment in contrib/hooks/update-paranoid
> @@ -371,6 +378,9 @@
>  # No files for you!
>  
>  %changelog
> +* Tue Dec 8 2009 Yury V. Zaytsev <yury at shurup.com> - 1.6.5.3-2
> +- Minor updates for RPMForge.
> +
>  * Mon Nov 23 2009 Tom G. Christensen <swpkg at statsbiblioteket.dk> - 1.6.5.3-1
>  - Update to 1.6.5.3
>


Thanks for taking the time to review this.

-tgc



More information about the packagers mailing list