+++ /dev/null
-This set of scripts is used to get contribution stats for a number of projects
-
-= Getting started =
-
-The following three commands can be used from within the *scripts* or the root
-directory (.)
-
-make-tree will create the directory structure, check out repositories, and copy
-scripts into the right location for optimal workflow and copy config files
-into the correct location also. You must use this command at least once, before
-you can get started.
-
-delete-tree will delete the entire directory structure including all files in
-them, with the exception of the archive
-
-update-scripts will update modified scripts and make them available to the user
-in locations most optimal for the workflow
-
-== GitDM config files ==
-scripts/xenproject-org-gitdm-config contains GitDM config files that override
-those. This ensures that you can have your own set of config files without
-having to push them back into the GitDM repository
-
-== Directory structure ==
-
-output: contains all output files. These are sorted by sub-project (e.g. hypervisor).
-There is also a directory called *all* which contains data for all subprojects.
-
-xenproject: contains all the code repositories, as well as scripts to gather data
-
-xenproject-org-gitdm: contains only helper scripts, GitDM and config files.
-Normally you will never need to touch this file.
-
-= Scripts =
-
-== xenproject ==
-
-month <year> <month> creates stats for a month : log files in the form <year>-<month>.* are generated
-year <year> creates stats for a full year : log files of the form <year>.* are generated
-year-range <year1> <hear2> creates stats covering several years : log files in the form <year1>-<year2>.* are generated
-year-compare-xen-kvm <year> compares comparable parts of xen and kvm : log files of the form <year>-comp.* are generated
-
-Examples of <year> : 1999, 2012, ...
-Examples of <month> : 1,2,..., 12
-
-== output ==
-
-archive will archive output files in the archive directory (note that
-only tarballs and git logs will be archived) and then wipe the output directory
-
+++ /dev/null
-#!/bin/bash
-# Only use if you keep config files in xenproject-org-gitdem-config
-# Otherwise your config files may be nuked
-PROJECTS=(kvm megamirage xapi linux hypervisor qemu winpvdrivers)
-
-old=`pwd`
-
-# Make sure the script can be used from scripts and the root folder
-if [ -d scripts ]; then
- root="."
-else
- root=".."
-fi
-
-# Make sure the script can be used from scripts and
-if [ ! -d scripts ]; then
- cd ..
-fi
-
-echo "Deleting generated output files"
-rm -rf $root/output
-
-# Make sure the script can be used from scripts and
-if [ ! -d scripts ]; then
- cd ..
-fi
-
-# Create the filesystem hierarchy
-echo "Recreating output folder"
-mkdir output
-mkdir output/all
-for i in "${PROJECTS[@]}"
-do
- :
- mkdir output/$i
-done
-
-cd $old
-
+++ /dev/null
-#!/bin/bash
-PROJECTS=(kvm megamirage xapi linux hypervisor qemu winpvdrivers)
-
-old=`pwd`
-
-# Make sure the script can be used from scripts and
-if [ ! -d scripts ]; then
- cd ..
-fi
-
-# Create the filesystem hierarchy
-if [ ! -d output ]; then
- echo "Creating output folder"
- mkdir output
- mkdir output/all
- for i in "${PROJECTS[@]}"
- do
- :
- mkdir output/$i
- done
-fi
-
-if [ ! -d archive ]; then
- echo "Creating archive folder"
- mkdir archive
- mkdir archive/all
- for i in "${PROJECTS[@]}"
- do
- :
- mkdir archive/$i
- done
-fi
-
-if [ ! -d xenproject ]; then
- echo "Creating xenproject folder"
- mkdir xenproject
- for i in "${PROJECTS[@]}"
- do
- :
- mkdir xenproject/$i
- done
- # Fetch repos
- # This contains the main logic of how to get the git repos for each project
- # (this is a little crude, but there is no point to make this more elegant)
- # IMPORTANT: because repoĊ are frequently added to mirage and xapi, it is
- # safer to nuke the xenproject directory and run make-tree again
- cd xenproject/hypervisor
- git clone git://xenbits.xen.org/xen.git
- git clone git://xenbits.xen.org/osstest.git
- git clone git://xenbits.xen.org/raisin.git
- git clone git://xenbits.xen.org/mini-os.git
-
- cd ../linux
- git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
- cd ../xapi
- curl https://api.github.com/orgs/xapi-project/repos\?per_page=200 | grep full_name | sed -e 's#.*"xapi-project/\(.*\)".*#\1#' | xargs -i git clone https://github.com/xapi-project/{}
- # cd ..
- # IMPORTANT: do not cd into megamirage
- # git clone --recursive git://github.com/mirage/megamirage
- # cd megamirage
- # git submodule init
- # git submodule update
- cd ../megamirage
- wget -q https://raw.githubusercontent.com/mirage/mirage-www/master/TROVE -O repolist.txt
-
- cd ../qemu
- git clone git://git.qemu.org/qemu.git
- cd ../winpvdrivers
- git clone git://xenbits.xen.org/pvdrivers/win/xenbus.git
- git clone git://xenbits.xen.org/pvdrivers/win/xeniface.git
- git clone git://xenbits.xen.org/pvdrivers/win/xennet.git
- git clone git://xenbits.xen.org/pvdrivers/win/xenvbd.git
- git clone git://xenbits.xen.org/pvdrivers/win/xenvif.git
- cd ../kvm
- git clone git://git.kernel.org/pub/scm/virt/kvm/kvm.git
- cd ../..
-
-fi
-
-# Get Git-DM
-if [ ! -d xenproject-org-gitdm ]; then
- echo "Cloning gitdm"
- git clone git://xenbits.xen.org/people/larsk/xenproject-org-gitdm.git
-fi
-
-# Copy latest versions of scripts into folders
-scripts/update-scripts
-
-cd $old
+++ /dev/null
-#!/bin/bash
-# Get contribution logs for a specific month
-
-# Deal with month length and leap year
-LAST=(31 28 31 30 31 30 31 31 30 31 30 31)
-LEAP=(2000 2004 2008 2012 2016 2020 2024)
-
-for j in "${LEAP[@]}"
-do
- :
- if [ "$1" -eq $j ]; then
- LAST[1]=29
- break
- fi
-done
-last=${LAST[$2-1]}
-
-# Argument builderplate
-ALL=(hypervisor winpvdrivers xapi megamirage)
-args="-p -M --since=$1-$2-01 --until=$1-$2-$last"
-ext="$1-$2"
-dir=xenproject
-
-# Actual code
-cd ..
-root=`pwd`
-cd $dir
-
-echo "= Removing $ext.gitlog files ="
-for i in "${ALL[@]}"
-do
- :
- rm -f $root/output/$i/$ext.gitlog
-done
-rm -f $root/output/all/$ext.gitlog
-
-echo "= Getting $ext.gitlog files ="
-for i in "${ALL[@]}"
-do
- :
- echo "** $i"
- find $i/* -maxdepth 0 -type d | xargs -i git -C {} log $args >> $root/output/$i/$ext.gitlog
- cat $root/output/$i/$ext.gitlog >> $root/output/all/$ext.gitlog
-done
-echo "** all"
-
-echo "= Running GitDM ="
-cd ../xenproject-org-gitdm
-for i in "${ALL[@]}"
-do
- :
- echo "** $i"
- ./gitdm-script $root/output/$i $ext
-
-done
-echo "** all"
-./gitdm-script $root/output/all $ext
-./gitdm-script-ext $root/output/all $ext-dev
-
-cd ../$dir
-
-
-
+++ /dev/null
-#!/bin/bash
-# Get contribution logs for a specific month
-
-# Deal with month length and leap year
-LAST=(31 28 31 30 31 30 31 31 30 31 30 31)
-LEAP=(2000 2004 2008 2012 2016 2020 2024)
-
-for j in "${LEAP[@]}"
-do
- :
- if [ "$1" -eq $j ]; then
- LAST[1]=29
- break
- fi
-done
-last=${LAST[$2-1]}
-
-# Argument builderplate
-ALL=(hypervisor winpvdrivers xapi megamirage)
-args="-p -M --since=$1-$2-01 --until=$1-$2-$last"
-ext="$1-$2"
-dir=xenproject
-
-# Actual code
-cd ..
-root=`pwd`
-cd $dir
-
-echo "= Removing $ext.gitlog files ="
-for i in "${ALL[@]}"
-do
- :
- rm -f $root/output/$i/$ext.gitlog
-done
-rm -f $root/output/all/$ext.gitlog
-
-echo "= Getting $ext.gitlog files ="
-for i in "${ALL[@]}"
-do
- :
- echo "** $i"
- find $i/* -maxdepth 0 -type d | xargs -i git -C {} log $args >> $root/output/$i/$ext.gitlog
- cat $root/output/$i/$ext.gitlog >> $root/output/all/$ext.gitlog
-done
-echo "** all"
-
-echo "= Running GitDM ="
-cd ../xenproject-org-gitdm
-for i in "${ALL[@]}"
-do
- :
- echo "** $i"
- ./gitdm-script $root/output/$i $ext
-done
-echo "** all"
-./gitdm-script $root/output/all $ext
-
-cd ../$dir
-
-
-
+++ /dev/null
-#!/bin/bash
-# Special log
-
-# Argument builderplate
-ALL=(megamirage)
-args="-p -M --since=2014-07-22 --until=2015-06-05"
-ext="mirage-25"
-dir=xenproject
-
-# Actual code
-cd ..
-root=`pwd`
-cd $dir
-
-echo "= Removing $ext.gitlog files ="
-for i in "${ALL[@]}"
-do
- :
- rm -f $root/output/$i/$ext.gitlog
-done
-rm -f $root/output/all/$ext.gitlog
-
-echo "= Getting $ext.gitlog files ="
-for i in "${ALL[@]}"
-do
- :
- echo "** $i"
- find $i/* -maxdepth 0 -type d | xargs -i git -C {} log $args >> $root/output/$i/$ext.gitlog
- cat $root/output/$i/$ext.gitlog >> $root/output/all/$ext.gitlog
- cp $root/output/$i/$ext.gitlog $root/output/$i/$ext-dev.gitlog
-done
-cp $root/output/all/$ext.gitlog $root/output/all/$ext-dev.gitlog
-echo "** all"
-
-echo "= Running GitDM ="
-cd ../xenproject-org-gitdm
-for i in "${ALL[@]}"
-do
- :
- echo "** $i"
- ./gitdm-script $root/output/$i $ext
- ./gitdm-script-ext $root/output/$i $ext-dev
-done
-echo "** all"
-./gitdm-script $root/output/all $ext
-./gitdm-script-ext $root/output/all $ext-dev
-
-cd ../$dir
-
-
-
+++ /dev/null
-#!/bin/bash
-# Perform git-fetch on all repos
-
-PROJECTS=(kvm megamirage xapi linux hypervisor qemu winpvdrivers)
-
-for i in "${PROJECTS[@]}"
-do
- :
- echo "Pulling repos in $i"
- find $i/* -maxdepth 0 -type d | xargs -i ./git-fetch-helper {}
-done
-
-# This has to be implemented differently
-cd megamirage
-git submodule update
-
-
-
-
-
+++ /dev/null
-#!/bin/bash
-# Get contribution logs for a range of years
-
-# Argument builderplate
-ALL=(hypervisor winpvdrivers xapi megamirage)
-args="-p -M --since=$1-01-01 --until=$2-12-31"
-ext="$1-$2"
-dir=xenproject
-
-# Actual code
-cd ..
-root=`pwd`
-cd $dir
-
-echo "= Removing $ext.gitlog files ="
-for i in "${ALL[@]}"
-do
- :
- rm -f $root/output/$i/$ext.gitlog
-done
-rm -f $root/output/all/$ext.gitlog
-
-echo "= Getting $ext.gitlog files ="
-for i in "${ALL[@]}"
-do
- :
- echo "** $i"
- find $i/* -maxdepth 0 -type d | xargs -i git -C {} log $args >> $root/output/$i/$ext.gitlog
- cat $root/output/$i/$ext.gitlog >> $root/output/all/$ext.gitlog
-done
-echo "** all"
-
-echo "= Running GitDM ="
-cd ../xenproject-org-gitdm
-for i in "${ALL[@]}"
-do
- :
- echo "** $i"
- ./gitdm-script $root/output/$i $ext
- ./gitdm-script-ext $root/output/$i $ext-dev
-done
-echo "** all"
-./gitdm-script $root/output/all $ext
-./gitdm-script-ext $root/output/all $ext-dev
-
-cd ../$dir
+++ /dev/null
-#!/bin/bash
-# Get contribution logs for a year
-
-# Argument builderplate
-ALL=(hypervisor winpvdrivers xapi megamirage)
-args="-p -M --since=$1-01-01 --until=$1-12-31"
-ext="$1"
-dir=xenproject
-
-# Actual code
-cd ..
-root=`pwd`
-cd $dir
-
-echo "= Removing $ext.gitlog files ="
-for i in "${ALL[@]}"
-do
- :
- rm -f $root/output/$i/$ext.gitlog
-done
-rm -f $root/output/all/$ext.gitlog
-
-echo "= Getting $ext.gitlog files ="
-for i in "${ALL[@]}"
-do
- :
- echo "** $i"
- find $i/* -maxdepth 0 -type d | xargs -i git -C {} log $args >> $root/output/$i/$ext.gitlog
- cat $root/output/$i/$ext.gitlog >> $root/output/all/$ext.gitlog
-done
-echo "** all"
-
-echo "= Running GitDM ="
-cd ../xenproject-org-gitdm
-for i in "${ALL[@]}"
-do
- :
- echo "** $i"
- ./gitdm-script $root/output/$i $ext
- ./gitdm-script-ext $root/output/$i $ext-dev
-done
-echo "** all"
-./gitdm-script $root/output/all $ext
-./gitdm-script-ext $root/output/all $ext-dev
-
-cd ../$dir
-