threads / discuss / 13776

Eliminate curl binary

Subject: Eliminate curl binary

## tl;dr

7 messages between Jun 3, 2008 and Jun 3, 2008.

replies: 6people: 3as markdown or json

Stepan Kasal· Jun 3, 2008, 10:53 UTC · lore
Hello,

git source code uses curl (the binary) on exactly one spot: git-clone.sh I would welcome if that spot were rewritten so that git would no longer require curl, only libcurl.

(I clashed with a design flaw of curl cmd-line interfaace, so I'd like to uninstalle it. ;-) Nothing against libcurl.)

I apologize that I'm not providing a patch, and hope that this quick bug report (enhancement request) is better than doing nothing.

OTOH, I might write a patch later, so quick hints are welcome. (A git-* binary shall be called insted of curl in git-clone.sh; shall it be written from scratch, or is there a git-*.c source which can be bended for this purpose?)

Have a nice day,
	Stepan Kasal
Johan Herland· Jun 3, 2008, 11:14 UTC · re: Stepan Kasal · lore

Re: Eliminate curl binary

On Tuesday 03 June 2008, Stepan Kasal wrote:
Show 6 quoted lines
> Hello,
>
> git source code uses curl (the binary) on exactly one spot:
> git-clone.sh
> I would welcome if that spot were rewritten so that git would no
> longer require curl, only libcurl.

In the next version of Git (v1.5.6, currently in RC1), git-clone.sh has been replaced by a builtin C version (builtin-clone.c, part of the git binary). I assume the new version uses libcurl instead of the curl binary.

Have fun! :)
...Johan
-- 
Johan Herland, <johan@herland.net>
www.herland.net
Stepan Kasal· Jun 3, 2008, 12:13 UTC · re: Johan Herland · lore

Re: Eliminate curl binary

Hello,
On Tue, Jun 03, 2008 at 01:14:52PM +0200, Johan Herland wrote:
> In the next version of Git (v1.5.6, currently in RC1), git-clone.sh has 
> been replaced by a builtin C version (builtin-clone.c, part of the git 
great!

I have to apologize again, that I haven't checked the devel source of git.

Thanks,
Stepan
Stepan Kasal· Jun 3, 2008, 13:58 UTC · re: Stepan Kasal · lore

Re: Eliminate curl binary

Hello again.
(Sorry for answering twice, I type quicker than I think.)
> On Tue, Jun 03, 2008 at 01:14:52PM +0200, Johan Herland wrote:
> > In the next version of Git (v1.5.6, currently in RC1), git-clone.sh has 
> > been replaced by a builtin C version (builtin-clone.c, part of the git 

In that case, git.spec.in should not require curl. (A diff with proposed patch attached.)

That said, I do think that including Fedora-style spec files and other distribution-specific files into the tarball is a mistake.

Stepan Kasal
(FYI: I'm a Fedora developper, working for Red Hat.)
diff --git a/git.spec.in b/git.spec.in
index 97a26be..cd8e883 100644
--- a/git.spec.in
+++ b/git.spec.in
@@ -7,12 +7,12 @@ Summary:  	Core git tools
 License: 	GPL
 Group: 		Development/Tools
 URL: 		http://kernel.org/pub/software/scm/git/
-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}
+Source: 	http://kernel.org/pub/software/scm/git/%{name}-%{version}.tar.bz2
+BuildRequires:	zlib-devel >= 1.2, openssl-devel, libcurl-devel, expat-devel, gettext  %{!?_without_docs:, xmlto, asciidoc > 6.0.3}
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 Requires:	perl-Git = %{version}-%{release}
-Requires:	zlib >= 1.2, rsync, curl, less, openssh-clients, expat
+Requires:	zlib >= 1.2, rsync, less, openssh-clients, expat
 Provides:	git-core = %{version}-%{release}
 Obsoletes:	git-core <= 1.5.4.2
 Obsoletes:	git-p4
Jakub Narebski· Jun 3, 2008, 14:23 UTC · re: Stepan Kasal · lore

Re: Eliminate curl binary

Stepan Kasal <kasal@ucw.cz> writes:
> [...], I do think that including Fedora-style spec files and
> other distribution-specific files into the tarball is a mistake.

Not only Fedora (and Fedora derivatives) use RPMs. Contrary to deb packages and Debian there aren't, I think, many RPM packages with designed package maintainer; the development style for deb and for rpm packages is a bit different.

Besides, git.spec generated by git Makefile from git.spec.in isn't distribution specific. And it allows me to install git in a packaging system on and old machine with old Aurox 11.1 (Polish distribution, no longer active, based on Fedora Core 4), with glibc-2.3.5-10.3 via "rpmbuild --rebuild" from .src.rpm.

I'd rather _not_ lose this ability.
-- 
Jakub Narebski
Poland
ShadeHawk on #git
Stepan Kasal· Jun 3, 2008, 15:20 UTC · re: Jakub Narebski · lore

spec file in tarball (was: Eliminate curl binary)

Hello,
On Tue, Jun 03, 2008 at 07:23:21AM -0700, Jakub Narebski wrote:
Show 5 quoted lines
> Stepan Kasal <kasal@ucw.cz> writes:
> > [...], I do think that including Fedora-style spec files and
> > other distribution-specific files into the tarball is a mistake.
> 
> Not only Fedora (and Fedora derivatives) use RPMs.

I always suspected this is just a wish, I had the implression that the rpm-based distribution has diverged too much.

> Besides, git.spec generated by git Makefile from git.spec.in
> isn't distribution specific.

I often hear this, yet I see e.g. SuSE or Polish Linux creating spec files very different from what is used in Fedora.

> And it allows me to install git
> in a packaging system on and old machine with old Aurox 11.1
> (Polish distribution, no longer active, based on Fedora Core 4),
> with glibc-2.3.5-10.3 via "rpmbuild --rebuild" from .src.rpm.

(I suppose you meant "rpmbuild -ta", that's the feature which takes the spec file from the tarball.)

The value of this statement is limited by the fact that it's a fork of Fedora. What value does that spec file bring for Mandrake users, for example?

Happy hacking,
	Stepan
Jakub Narebski· Jun 3, 2008, 16:08 UTC · re: Stepan Kasal · lore

Re: spec file in tarball (was: Eliminate curl binary)

Stepan Kasal <kasal@ucw.cz> writes:
Show 5 quoted lines
> On Tue, Jun 03, 2008 at 07:23:21AM -0700, Jakub Narebski wrote:
> > Stepan Kasal <kasal@ucw.cz> writes:
> > >
> > > [...], I do think that including Fedora-style spec files and
> > > other distribution-specific files into the tarball is a mistake.
<whine>But I use it...</whine>
Show 10 quoted lines
> > Not only Fedora (and Fedora derivatives) use RPMs.
> 
> I always suspected this is just a wish, I had the impression that
> the rpm-based distribution has diverged too much.
> 
> > Besides, git.spec generated by git Makefile from git.spec.in
> > isn't distribution specific.
> 
> I often hear this, yet I see e.g. SuSE or Polish Linux creating spec
> files very different from what is used in Fedora.

True, spec files for a given _distribution_ (SuSE, PLD, Mandriva) are often _distribution specific_, containing bits that make distro different (for example translations of summary and description).

That doesn't change the fact, that git.spec file generated during build system and contained in the tarball (it is _single file_!), and RPM files in http://www.kernel.org/pub/software/scm/git/RPMS/ are (I think) not distribution specific, and can be installed on [almost] any RPM-based distribution.

Show 7 quoted lines
> > And it allows me to install git
> > in a packaging system on and old machine with old Aurox 11.1
> > (Polish distribution, no longer active, based on Fedora Core 4),
> > with glibc-2.3.5-10.3 via "rpmbuild --rebuild" from .src.rpm.
> 
> (I suppose you meant "rpmbuild -ta", that's the feature which takes
> the spec file from the tarball.)

No, I meant "rpmbuild --rebuild git-*.src.rpm", which I download from kernel.org. I could use "rpmbuild -ta git-*.tar.gz" instead, but I'm just used to this way of installing/upgrading git on my machine.

> The value of this statement is limited by the fact that it's a fork
> of Fedora.  What value does that spec file bring for Mandrake users,
> for example?

Besides I think that git.git git.spec.in file is a good basis for distribution specific spec files...

-- 
Jakub Narebski
Poland
ShadeHawk on #git

← back to recent threads