Re: Git as a BuildRequires (packaging)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 01, 2008 at 09:30:04PM -0500, Josh Boyer wrote:

> Recently we've hit an issue where a new package being reviewed for
> Fedora (cgit) needs to build against the git headers.  The problem
> is that these headers aren't typically installed with the git
> package itself, and we have no git-devel subpackage either.  This
> is mostly due to the fact that from what I can tell the upstream
> git Makefile doesn't install the headers anywhere.

I don't think Linus, Junio, or anybody involved with git has _ever_
advocated using git source files as a library. The expected method for
interfacing with git is the plumbing API, which is stable and available
via the installed git programs.

That being said, I think linking with libgit.a has been discussed on the
list, and Lars took part in the discussion. So I think he is aware that
what cgit does is not officially supported, that there is no stable
library API, and that he is taking his chances.

> There are a few options here.  The first is to install the git
> headers and create a git-devel subpackage.  That seems like
> overkill, given that the git headers are generically named and
> would have to be installed to something like /usr/include/git/.

I think that is a mistake; the headers are subject to change in ways that
will break calling code, and creating a -devel package creates the
impression that it's OK to link against it.

> The second option is to create a patch file that includes all
> the needed headers and use that in the cgit package.  That is
> [...]
> The third option is to include the entire git tarball as part of
> the sources for the package.  That is pretty easily done with the
> Fedora infrastructure, but isn't exactly clean from a packaging
> standpoint.

I don't know how one is usually expected to build cgit. But yes, you are
always going to have a problem with upgrading git. I would think each
cgit release would be tested based on a particular git version. And you
should rely on cgit upstream to figure that out and just package (either
in whole or as patches, as appropriate) the upstream git headers with
it.

> So, what do the git gurus recommend?  I'm not sure if other
> distros have tackled this problem before, but some kind of
> commonality for the 'how do you package things that need to build
> against git' question would be nice.

AFAIK, cgit is the only program that behaves in this way, and it doesn't
seem to be in Debian at all. So you might be the first to deal with it.
:)

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux