Repository : ssh://git@open-mesh.org/doc
On branches: backup-redmine/2017-07-13,master
commit 74aaf549e83e336440e67e1f7eed5927401f070e Author: Sven Eckelmann sven@narfation.org Date: Sun May 23 22:19:29 2010 +0000
doc: batman-adv/LinuxNextTracking: Starting information how to track Linux-Next
74aaf549e83e336440e67e1f7eed5927401f070e batman-adv/LinuxNextTracking.textile | 54 ++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+)
diff --git a/batman-adv/LinuxNextTracking.textile b/batman-adv/LinuxNextTracking.textile new file mode 100644 index 00000000..fafce985 --- /dev/null +++ b/batman-adv/LinuxNextTracking.textile @@ -0,0 +1,54 @@ += Tracking the linux-next branch = + +We have currently our own branch to create patches for linux. These patches are send to a sub-system maintainer which integrates them into his own git repository. New patches from other people usually went to linux-next. We have to create patches on top of linux-next unless they are only small bug fixes directly for 2.6. + +Other people will also create patches which may affect our code and thus we have to import them too in our codebase. In a perfect world these people will CC: us, but we aren't in a perfect world and we must ensure by our self that we get informed about them. The first approach was to check linux-next before we try to rebase our patches on top of linux-next. This created a large gap until we noticed them or we forgot them at all. + +The new approach is to create a mirror of linux-next on our server, install a small script which parses the commits in post-receive and send mails when there are changes in fails inside drivers/staging/batman-adv. This script is stolen from http://git.open-mesh.org/batman-adv/. + +== Initial setup == + +{{{ +su batman - +cd $HOME +git clone --mirror git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git +cp /srv/git/batman-adv/hooks/post-receive linux-next.git/hooks/manual-hook +chmod +x linux-next.git/hooks/manual-hook +cat << 'EOF' > linux-next.git/sync-git +#! /bin/sh +MY_REV="refs/heads/master" +cd /home/batman/linux-next.git +oldrev="`git rev-parse $MY_REV`" +git fetch +newref="`git rev-parse master`" +if [ "$oldrev" != "$newref" ]; then + echo "$oldrev" "$newref" "$MY_REV" | ./hooks/manual-hook +fi +EOF +chmod +x linux-next.git/sync-git +}}} + +The script has to be modified a little bit to get it working after refs/heads/master was modified. Just exchange +{{{ +git rev-parse --not --branches | grep -v $(git rev-parse $refname) | git rev-list --reverse --stdin $oldrev..$newrev -- drivers/staging/batman-adv +}}} + +with +{{{ +git rev-list --reverse $oldrev..$newrev -- drivers/staging/batman-adv +}}} + +The next step is to add it to batman crontab +{{{ +15 0 * * * /home/batman/linux-next.git/sync-git +}}} + +To get it really to send something we have to add the mail information to the hooks section of linux-next.git/config +{{{ +[hooks] + mailinglist = my-address@foobar.com + envelopesender = postmaster@open-mesh.org + emailprefix = "[linux-next] " +}}} + +Now the guy with my-address@foobar.com will receive our and foreign patches which touches drivers/staging/batman-adv in linux-next... each day at 0:15 (or at least once a day). \ No newline at end of file