* Git as a BuildRequires (packaging) @ 2008-12-02 2:30 Josh Boyer 2008-12-02 3:09 ` Jeff King 0 siblings, 1 reply; 3+ messages in thread From: Josh Boyer @ 2008-12-02 2:30 UTC (permalink / raw) To: git; +Cc: skvidal Hi All, 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. 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/. The second option is to create a patch file that includes all the needed headers and use that in the cgit package. That is sort of sub-optimal given that you'd have to keep checking (and possibly regenerating) the patch for correctness every time a new version of git comes out. 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. 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. (Please CC me. I can't remember if I'm still subscribed to the git list or not.) thx, josh ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Git as a BuildRequires (packaging) 2008-12-02 2:30 Git as a BuildRequires (packaging) Josh Boyer @ 2008-12-02 3:09 ` Jeff King 2008-12-02 10:12 ` Miklos Vajna 0 siblings, 1 reply; 3+ messages in thread From: Jeff King @ 2008-12-02 3:09 UTC (permalink / raw) To: Josh Boyer; +Cc: git, skvidal 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Git as a BuildRequires (packaging) 2008-12-02 3:09 ` Jeff King @ 2008-12-02 10:12 ` Miklos Vajna 0 siblings, 0 replies; 3+ messages in thread From: Miklos Vajna @ 2008-12-02 10:12 UTC (permalink / raw) To: Jeff King; +Cc: Josh Boyer, git, skvidal [-- Attachment #1: Type: text/plain, Size: 886 bytes --] On Mon, Dec 01, 2008 at 10:09:23PM -0500, Jeff King <peff@peff.net> wrote: > > 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. > :) We have it in Frugalware[1], and it's not a that big problem: the cgit Makefile clearly states the supported git version, you just have to download it "manually" (specify it in the spec file in case of Fedora) in case you want an offline build (what every distro wants). 1: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=blob;f=source/network-extra/cgit/FrugalBuild;hb=HEAD [-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-12-02 10:15 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-12-02 2:30 Git as a BuildRequires (packaging) Josh Boyer 2008-12-02 3:09 ` Jeff King 2008-12-02 10:12 ` Miklos Vajna
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).