Hosting SoC Repo On Github: Difference between revisions

From MultimediaWiki
Jump to navigation Jump to search
No edit summary
(remove dependency on git-daemon)
 
Line 1: Line 1:
If you prefer hosting your SoC code on a git repo at [http://github.com Github] or elsewhere instead of the ffmpeg-soc svn repo, you have to make sure that the ffmpeg-soc mailing list is notified of your commits. Github does provide an email service hook for this, but the commit diff is not included in the email payload.This can be overcome by setting up a local repo and configuring the git post-receive-email hook to notify the mailing list, and pushing to both the local repo as well as github. The following steps detail the procedure. It is assumed that you already have git installed.
If you prefer hosting your SoC code on a git repo at [http://github.com Github] or elsewhere instead of the ffmpeg-soc svn repo, you have to make sure that the ffmpeg-soc mailing list is notified of your commits. Github does provide an email service hook for this, but the commit diff is not included in the email payload.This can be overcome by setting up a local repo and configuring the git post-receive hook to notify the mailing list, and pushing to both the local repo as well as github. The following steps detail the procedure. It is assumed that you already have git installed.


# Clone the ffmpeg git repo (http://ffmpeg.org/download.html) and execute the following commands.
# Clone the ffmpeg git repo (http://ffmpeg.org/download.html) and execute the following commands.
Line 5: Line 5:
#:git clone --bare ffmpeg ffmpeg-soc  #creates a directory named ffmpeg-soc.git
#:git clone --bare ffmpeg ffmpeg-soc  #creates a directory named ffmpeg-soc.git
#:cd ffmpeg
#:cd ffmpeg
#:git remote add local git://localhost/{absolute_path_to_the_cloned_repo} #eg: git remote add local git://localhost/home/user/ffmpeg-soc.git
#:git remote add local /path/to/cloned/repo #eg: git remote add local /home/user/ffmpeg-soc.git
#:</pre>
#:</pre>
# Set up commit notification emails.
# Set up commit notification emails.
#:<pre>
#:<pre>
#:cd ffmpeg-soc.git
#:cd ffmpeg-soc.git
#:touch git-daemon-export-ok      #allow access to the repo via git-daemon
#:git config --add hooks.mailinglist "ffmpeg-soc@mplayer.hq"
#:git config --add hooks.mailinglist "ffmpeg-soc@mplayer.hq"
#:git config hooks.emailprefix "[soc]"
#:git config hooks.emailprefix "[soc]"
Line 29: Line 28:
#:!/bin/bash
#:!/bin/bash
#:git push soc master  #push to github
#:git push soc master  #push to github
#:git daemon --enable=receive-pack &
#:git push local master #push to the local repo
#:git push local master #push to the local repo
#:pkill -SIGINT git-daemon #ignore the error displayed
#:</pre>
#:</pre>
And you are done!
And you are done!

Latest revision as of 16:39, 10 June 2010

If you prefer hosting your SoC code on a git repo at Github or elsewhere instead of the ffmpeg-soc svn repo, you have to make sure that the ffmpeg-soc mailing list is notified of your commits. Github does provide an email service hook for this, but the commit diff is not included in the email payload.This can be overcome by setting up a local repo and configuring the git post-receive hook to notify the mailing list, and pushing to both the local repo as well as github. The following steps detail the procedure. It is assumed that you already have git installed.

  1. Clone the ffmpeg git repo (http://ffmpeg.org/download.html) and execute the following commands.
    git clone --bare ffmpeg ffmpeg-soc #creates a directory named ffmpeg-soc.git
    cd ffmpeg
    git remote add local /path/to/cloned/repo #eg: git remote add local /home/user/ffmpeg-soc.git
  2. Set up commit notification emails.
    cd ffmpeg-soc.git
    git config --add hooks.mailinglist "ffmpeg-soc@mplayer.hq"
    git config hooks.emailprefix "[soc]"
    git config hooks.showrev "git show -C %s;echo" #ensure diff is included in the mail
    cp /path/to/post-receive-email hooks/post-receive #post-receive-email can usually be found in /usr/share/doc/git-core/contrib/hooks
    chmod +x hooks/post-receive
  3. Edit ffmpeg-soc.git/hooks/post-receive to your liking (determines the email payload). Add a short description of your project to ffmpeg-soc.git/description (this will be used in the email subject)
  4. Set up sendmail if you haven't already. To use gmail as a sendmail relay, refer http://james-lloyd.com/getting-sendmail-use-gmail-as-a-relay-2.
  5. Create a github account if you haven't already, create a new repo and populate it.
    cd ffmpeg
    git remote add soc git@github.com:{user_name}/{repo_name}.git
    git push soc master
  6. After committing your code in the local ffmpeg repo, use a script like the one below to push it upstream.
    !/bin/bash
    git push soc master #push to github
    git push local master #push to the local repo

And you are done!