[aur-general] PKGBUILD that helps with VCS upstream contribution?
One of the reasons why I like Arch Linux so much is that it makes it easy to work together with upstream. Through makepkg I can install the latest, even VCS, version in a sane and very comfortable way. So far I've mainly been testing, reporting bugs, stuff like that, but rarely needed to contribute any code. Now if I wanted to contribute code back to a project that uses git, how would I do that without losing the comfort and safety of makepkg? I figured it should be possible to write a PKGBUILD that gets the latest upstream changes but also integrates local changes. Sadly both my bash and git skills are minimal, so I was wondering if someone already has such a PKGBUILD, for git at least and maybe for svn as well. TIA -- Regards, Philipp
On Thu, May 20, 2010 at 18:01, Philipp <hollunder@lavabit.com> wrote:
Now if I wanted to contribute code back to a project that uses git, how would I do that without losing the comfort and safety of makepkg? I figured it should be possible to write a PKGBUILD that gets the latest upstream changes but also integrates local changes.
Fork their git repo (github makes this easy), add and commit your changes, and set your PKGBUILD to use your forked version. You can use git format-patch to send things back to them, or send a pull request through github or some other medium. The individual project will determine what's the best method.
Excerpts from Daenyth Blank's message of 2010-05-21 00:03:53 +0200:
On Thu, May 20, 2010 at 18:01, Philipp <hollunder@lavabit.com> wrote:
Now if I wanted to contribute code back to a project that uses git, how would I do that without losing the comfort and safety of makepkg? I figured it should be possible to write a PKGBUILD that gets the latest upstream changes but also integrates local changes.
Fork their git repo (github makes this easy), add and commit your changes, and set your PKGBUILD to use your forked version. You can use git format-patch to send things back to them, or send a pull request through github or some other medium. The individual project will determine what's the best method.
Ah, yes. I don't remember whether github can follow upstream or whether I have to do that manually and push to github. I think it's a nice way to do it, since github is always available and upstream can pull (which may or may not work locally). But a number of projects still use svn (I even know at least one that uses cvs) and this approach won't work there afaik. -- Regards, Philipp
On Fri, May 21, 2010 at 12:01 AM, Philipp <hollunder@lavabit.com> wrote:
One of the reasons why I like Arch Linux so much is that it makes it easy to work together with upstream. Through makepkg I can install the latest, even VCS, version in a sane and very comfortable way.
So far I've mainly been testing, reporting bugs, stuff like that, but rarely needed to contribute any code.
Now if I wanted to contribute code back to a project that uses git, how would I do that without losing the comfort and safety of makepkg? I figured it should be possible to write a PKGBUILD that gets the latest upstream changes but also integrates local changes.
Sadly both my bash and git skills are minimal, so I was wondering if someone already has such a PKGBUILD, for git at least and maybe for svn as well.
Well that's very easy. The standard git PKGBUILDs use git clone / git pull with a remote URL. If you already have your own git repo locally, you have many ways to use that in the PKGBUILD : 1 - just switch to your git tree directory 2 - duplicate your git tree directory and put it inside $srcdir , using git clone for example 3 - ... (there are probably other ways) Here is an extract of a PKGBUILD for pacman using 2 : --------------------------------------------------- _gitroot=~/data/devel/pacman/pacman _gitname=working #_gitname=download getgitsource() { rm -rf $srcdir/pacman git clone $_gitroot $srcdir/pacman || return 1 } build() { getgitsource || return 1 cd $srcdir/pacman git checkout origin/$_gitname || return 1 msg "Building..." ./autogen.sh --------------------------------------------------- However I usually don't bother with that. Most projects I work on, I just use them locally if possible. Only if needed, I install them system-wide, and then I don't care about pacman not knowing the files. I can deal with that myself without any problems.
Excerpts from Xavier Chantry's message of 2010-05-21 00:23:37 +0200:
On Fri, May 21, 2010 at 12:01 AM, Philipp <hollunder@lavabit.com> wrote:
One of the reasons why I like Arch Linux so much is that it makes it easy to work together with upstream. Through makepkg I can install the latest, even VCS, version in a sane and very comfortable way.
So far I've mainly been testing, reporting bugs, stuff like that, but rarely needed to contribute any code.
Now if I wanted to contribute code back to a project that uses git, how would I do that without losing the comfort and safety of makepkg? I figured it should be possible to write a PKGBUILD that gets the latest upstream changes but also integrates local changes.
Sadly both my bash and git skills are minimal, so I was wondering if someone already has such a PKGBUILD, for git at least and maybe for svn as well.
Well that's very easy. The standard git PKGBUILDs use git clone / git pull with a remote URL. If you already have your own git repo locally, you have many ways to use that in the PKGBUILD : 1 - just switch to your git tree directory 2 - duplicate your git tree directory and put it inside $srcdir , using git clone for example 3 - ... (there are probably other ways)
Here is an extract of a PKGBUILD for pacman using 2 : --------------------------------------------------- _gitroot=~/data/devel/pacman/pacman _gitname=working #_gitname=download
getgitsource() { rm -rf $srcdir/pacman git clone $_gitroot $srcdir/pacman || return 1 }
build() { getgitsource || return 1
cd $srcdir/pacman
git checkout origin/$_gitname || return 1
msg "Building..." ./autogen.sh
So you do follow upstream in a separate directory (~/data/devel/pacman/pacman), make your changes there, resolve conflicts if they arise, stuff like that. Then the PKGBUILD clones that git repo and builds from it. Ok, sounds like a workable solution, thanks :) I guess that works with svn and simple cp as well? The problem with svn is probably getting the changes upstream? -- Regards, Philipp
On Sun, May 23, 2010 at 12:07 PM, Philipp Überbacher <hollunder@lavabit.com> wrote:
So you do follow upstream in a separate directory (~/data/devel/pacman/pacman), make your changes there, resolve conflicts if they arise, stuff like that. Then the PKGBUILD clones that git repo and builds from it. Ok, sounds like a workable solution, thanks :)
That's it.
I guess that works with svn and simple cp as well? The problem with svn is probably getting the changes upstream?
I don't know any VCS that automate the process of getting the changes upstream, but we can dream.
Hi! I'm currently revisiting most of my PKGBUILDs and I'd kindly ask you to delete the following pkgbuilds: -) abiword-devel-collab deprecated - will be replaced by a abiword-collab-plugins -) neon-stable deprecated - not needed anymore -) qt-git-full deprecated - new pkgbuild with different name in the pipe Thanks! Best regards, Bernhard Friedreich (friesoft)
On 26/05/2010, Bernhard Friedreich <friesoft@gmail.com> wrote:
Hi!
I'm currently revisiting most of my PKGBUILDs and I'd kindly ask you to delete the following pkgbuilds:
-) abiword-devel-collab deprecated - will be replaced by a abiword-collab-plugins
-) neon-stable deprecated - not needed anymore
-) qt-git-full deprecated - new pkgbuild with different name in the pipe
Thanks!
Best regards, Bernhard Friedreich (friesoft)
Done. -- GPG/PGP ID: B42DDCAD
participants (6)
-
Bernhard Friedreich
-
Daenyth Blank
-
Philipp
-
Philipp Überbacher
-
Ray Rashif
-
Xavier Chantry