{"thread":{"id":"16548","subject":"Git as a BuildRequires (packaging)","startedAt":"2008-12-02T02:30:04Z","lastAt":"2008-12-02T10:12:23Z","messageCount":3,"participants":["Josh Boyer","Jeff King","Miklos Vajna"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"96914","messageId":"20081202023004.GA30372@zod.rchland.ibm.com","threadId":"16548","inReplyTo":null,"subject":"Git as a BuildRequires (packaging)","fromName":"Josh Boyer","fromEmail":"jwboyer@gmail.com","sentAt":"2008-12-02T02:30:04Z","receivedAt":"2008-12-02T02:30:04Z","isPatch":false,"sender":{"key":"jwboyer@gmail.com","avatar":null},"body":"Hi All,\n\nRecently we've hit an issue where a new package being reviewed for\nFedora (cgit) needs to build against the git headers.  The problem\nis that these headers aren't typically installed with the git\npackage itself, and we have no git-devel subpackage either.  This\nis mostly due to the fact that from what I can tell the upstream\ngit Makefile doesn't install the headers anywhere.\n\nThere are a few options here.  The first is to install the git\nheaders and create a git-devel subpackage.  That seems like\noverkill, given that the git headers are generically named and\nwould have to be installed to something like /usr/include/git/.\n\nThe second option is to create a patch file that includes all\nthe needed headers and use that in the cgit package.  That is\nsort of sub-optimal given that you'd have to keep checking\n(and possibly regenerating) the patch for correctness every time\na new version of git comes out.\n\nThe third option is to include the entire git tarball as part of\nthe sources for the package.  That is pretty easily done with the\nFedora infrastructure, but isn't exactly clean from a packaging\nstandpoint.\n\nSo, what do the git gurus recommend?  I'm not sure if other\ndistros have tackled this problem before, but some kind of\ncommonality for the 'how do you package things that need to build\nagainst git' question would be nice.\n\n(Please CC me.  I can't remember if I'm still subscribed to the\ngit list or not.)\n\nthx,\njosh\n"},{"id":"96924","messageId":"20081202030922.GC6804@coredump.intra.peff.net","threadId":"16548","inReplyTo":"20081202023004.GA30372@zod.rchland.ibm.com","subject":"Re: Git as a BuildRequires (packaging)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-12-02T03:09:23Z","receivedAt":"2008-12-02T03:09:23Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Dec 01, 2008 at 09:30:04PM -0500, Josh Boyer wrote:\n\n> Recently we've hit an issue where a new package being reviewed for\n> Fedora (cgit) needs to build against the git headers.  The problem\n> is that these headers aren't typically installed with the git\n> package itself, and we have no git-devel subpackage either.  This\n> is mostly due to the fact that from what I can tell the upstream\n> git Makefile doesn't install the headers anywhere.\n\nI don't think Linus, Junio, or anybody involved with git has _ever_\nadvocated using git source files as a library. The expected method for\ninterfacing with git is the plumbing API, which is stable and available\nvia the installed git programs.\n\nThat being said, I think linking with libgit.a has been discussed on the\nlist, and Lars took part in the discussion. So I think he is aware that\nwhat cgit does is not officially supported, that there is no stable\nlibrary API, and that he is taking his chances.\n\n> There are a few options here.  The first is to install the git\n> headers and create a git-devel subpackage.  That seems like\n> overkill, given that the git headers are generically named and\n> would have to be installed to something like /usr/include/git/.\n\nI think that is a mistake; the headers are subject to change in ways that\nwill break calling code, and creating a -devel package creates the\nimpression that it's OK to link against it.\n\n> The second option is to create a patch file that includes all\n> the needed headers and use that in the cgit package.  That is\n> [...]\n> The third option is to include the entire git tarball as part of\n> the sources for the package.  That is pretty easily done with the\n> Fedora infrastructure, but isn't exactly clean from a packaging\n> standpoint.\n\nI don't know how one is usually expected to build cgit. But yes, you are\nalways going to have a problem with upgrading git. I would think each\ncgit release would be tested based on a particular git version. And you\nshould rely on cgit upstream to figure that out and just package (either\nin whole or as patches, as appropriate) the upstream git headers with\nit.\n\n> So, what do the git gurus recommend?  I'm not sure if other\n> distros have tackled this problem before, but some kind of\n> commonality for the 'how do you package things that need to build\n> against git' question would be nice.\n\nAFAIK, cgit is the only program that behaves in this way, and it doesn't\nseem to be in Debian at all. So you might be the first to deal with it.\n:)\n\n-Peff\n"},{"id":"96935","messageId":"20081202101223.GD19355@genesis.frugalware.org","threadId":"16548","inReplyTo":"20081202030922.GC6804@coredump.intra.peff.net","subject":"Re: Git as a BuildRequires (packaging)","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2008-12-02T10:12:23Z","receivedAt":"2008-12-02T10:12:23Z","isPatch":false,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"On Mon, Dec 01, 2008 at 10:09:23PM -0500, Jeff King <peff@peff.net> wrote:\n> > So, what do the git gurus recommend?  I'm not sure if other\n> > distros have tackled this problem before, but some kind of\n> > commonality for the 'how do you package things that need to build\n> > against git' question would be nice.\n> \n> AFAIK, cgit is the only program that behaves in this way, and it doesn't\n> seem to be in Debian at all. So you might be the first to deal with it.\n> :)\n\nWe have it in Frugalware[1], and it's not a that big problem: the cgit\nMakefile clearly states the supported git version, you just have to\ndownload it \"manually\" (specify it in the spec file in case of Fedora)\nin case you want an offline build (what every distro wants).\n\n1: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=blob;f=source/network-extra/cgit/FrugalBuild;hb=HEAD\n"}]}