# Eliminate curl binary

7 messages from 2008-06-03 to 2008-06-03. Participants: Stepan Kasal, Johan Herland, Jakub Narebski.
Thread: https://gitlist.dev/t/13776

## Stepan Kasal, 2008-06-03 10:53

Subject: Eliminate curl binary
Message-ID: <20080603105323.GA15825@camelia.ucw.cz>
URL: https://gitlist.dev/e/20080603105323.GA15825%40camelia.ucw.cz

```
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, 2008-06-03 11:14

Subject: Re: Eliminate curl binary
Message-ID: <200806031314.52579.johan@herland.net>
URL: https://gitlist.dev/e/200806031314.52579.johan%40herland.net
In-Reply-To: <20080603105323.GA15825@camelia.ucw.cz>

```
On Tuesday 03 June 2008, Stepan Kasal wrote:
> 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, 2008-06-03 12:13

Subject: Re: Eliminate curl binary
Message-ID: <20080603121332.GA16570@camelia.ucw.cz>
URL: https://gitlist.dev/e/20080603121332.GA16570%40camelia.ucw.cz
In-Reply-To: <200806031314.52579.johan@herland.net>

```
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, 2008-06-03 13:58

Subject: Re: Eliminate curl binary
Message-ID: <20080603135851.GB17302@camelia.ucw.cz>
URL: https://gitlist.dev/e/20080603135851.GB17302%40camelia.ucw.cz
In-Reply-To: <20080603121332.GA16570@camelia.ucw.cz>

```
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, 2008-06-03 14:23

Subject: Re: Eliminate curl binary
Message-ID: <m3zlq2zjgz.fsf@localhost.localdomain>
URL: https://gitlist.dev/e/m3zlq2zjgz.fsf%40localhost.localdomain
In-Reply-To: <20080603135851.GB17302@camelia.ucw.cz>

```
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, 2008-06-03 15:20

Subject: spec file in tarball (was: Eliminate curl binary)
Message-ID: <20080603152054.GA19027@camelia.ucw.cz>
URL: https://gitlist.dev/e/20080603152054.GA19027%40camelia.ucw.cz
In-Reply-To: <m3zlq2zjgz.fsf@localhost.localdomain>

```
Hello,

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.
> 
> 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, 2008-06-03 16:08

Subject: Re: spec file in tarball (was: Eliminate curl binary)
Message-ID: <m3ve0qzekl.fsf@localhost.localdomain>
URL: https://gitlist.dev/e/m3ve0qzekl.fsf%40localhost.localdomain
In-Reply-To: <20080603152054.GA19027@camelia.ucw.cz>

```
Stepan Kasal <kasal@ucw.cz> writes:

> 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>

> > 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.

> > 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

```
