Merge commit 'origin/master'
authorroot <root@blitz.inria.fr>
Sat, 26 Mar 2011 16:06:13 +0000 (17:06 +0100)
committerroot <root@blitz.inria.fr>
Sat, 26 Mar 2011 16:06:13 +0000 (17:06 +0100)
adopt-master [new symlink]
module-tools.py
onelab-k22-tags.mk
onelab-k27-tags.mk
onelab-k32-tags.mk
partial-repo.sh [new file with mode: 0755]
planetlab-k27-tags.mk
planetlab-k32-tags.mk
planetlab-tags.mk
trellis-tags.mk

diff --git a/adopt-master b/adopt-master
new file mode 120000 (symlink)
index 0000000..323e9ad
--- /dev/null
@@ -0,0 +1 @@
+module-tools.py
\ No newline at end of file
index ba45bf2..8146561 100755 (executable)
@@ -1326,6 +1326,19 @@ def release_changelog(options, buildtag_old, buildtag_new):
         print '=== %s : removed package from build %s ===' % (tagfile, module)
 
 
+def adopt_master (options, args):
+    modules=[]
+    for module in options.modules:
+        modules += module.split()
+    for module in modules: 
+        modobj=Module(module,options)
+        for tags_file in args:
+            if options.verbose:
+                print 'adopting master for',module,'in',tags_file
+            modobj.patch_tags_file(tags_file,'_unused_','master',fine_grain=False)
+    if options.verbose:
+        Command("git diff %s"%" ".join(args),options).run()
+
 ##############################
 class Main:
 
@@ -1351,6 +1364,12 @@ Branches:
       release-changelog :4.2 4.2-rc25
   You can refer to the build trunk by just mentioning 'trunk', e.g.
       release-changelog -t coblitz-tags.mk coblitz-2.01-rc6 trunk
+"""
+    master_usage="""Usage: %prog [options] tag-file[s]
+  With this command you can adopt one or several masters in your tag files
+    This should be run in your daily build workdir; no call of git nor svn is done
+  Examples:
+    module-master -m "plewww plcapi" -m Monitor onelab*tags.mk
 """
     common_usage="""More help:
   see http://svn.planet-lab.org/wiki/ModuleTools"""
@@ -1368,10 +1387,13 @@ Branches:
                 this is a last resort option, mostly for repairs""",
         'changelog' : """extract changelog between build tags
                 expected arguments are a list of tags""",
+        'master' : """locally adopt master or trunk for some modules""",
         }
 
     silent_modes = ['list']
-    release_modes = ['changelog']
+    # 'changelog' is for release-changelog
+    # 'master' is for 'adopt-master'
+    regular_modes = set(modes.keys()).difference(set(['changelog','master']))
 
     @staticmethod
     def optparse_list (option, opt, value, parser):
@@ -1392,16 +1414,37 @@ Branches:
             print "Supported commands:" + " ".join(Main.modes.keys())
             sys.exit(1)
 
-        if mode not in Main.release_modes:
+        usage='undefined usage, mode=%s'%mode
+        if mode in Main.regular_modes:
             usage = Main.module_usage
             usage += Main.common_usage
             usage += "\nmodule-%s : %s"%(mode,Main.modes[mode])
-        else:
+        elif mode=='changelog':
             usage = Main.release_usage
             usage += Main.common_usage
+        elif mode=='master':
+            usage = Main.master_usage
+            usage += Main.common_usage
 
         parser=OptionParser(usage=usage)
         
+        # the 'master' mode is really special and doesn't share any option
+        if mode=='master':
+            parser.add_option("-m","--module",action="append",dest="modules",default=[],
+                              help="modules, can be used several times or with quotes")
+            parser.add_option("-v","--verbose", action="store_true", dest="verbose", default=False, 
+                              help="run in verbose mode")
+            (options, args) = parser.parse_args()
+            options.workdir='unused'
+            options.dry_run=False
+            options.mode='master'
+            if len(args)==0 or len(options.modules)==0:
+                parser.print_help()
+                sys.exit(1)
+            adopt_master (options,args)
+            return 
+
+        # the other commands (module-* and release-changelog) share the same skeleton
         if mode == "tag" or mode == 'branch':
             parser.add_option("-s","--set-version",action="store",dest="new_version",default=None,
                               help="set new version and reset taglevel to 0")
@@ -1458,6 +1501,8 @@ Branches:
             options.www=False
         options.debug=False
 
+        
+
         ########## module-*
         if len(args) == 0:
             if options.all_modules:
@@ -1470,7 +1515,7 @@ Branches:
         Module.init_homedir(options)
         
 
-        if mode not in Main.release_modes:
+        if mode in Main.regular_modes:
             modules=[ Module(modname,options) for modname in args ]
             # hack: create a dummy Module to store errors/warnings
             error_module = Module('__errors__',options)
index c52be30..de5faa8 100644 (file)
@@ -33,7 +33,7 @@ vsys-GITPATH                  := git://git.onelab.eu/vsys.git@vsys-0.99-1
 vsys-scripts-GITPATH            := git://git.onelab.eu/vsys-scripts.git@vsys-scripts-0.95-28
 plcapi-GITPATH                  := git://git.onelab.eu/plcapi.git@plcapi-5.0-32
 drupal-SVNPATH                 := http://svn.planet-lab.org/svn/drupal/tags/drupal-4.7-14
-plewww-GITPATH                  := git://git.onelab.eu/plewww.git@plewww-4.3-62
+plewww-GITPATH                  := git://git.onelab.eu/plewww.git@master
 www-register-wizard-SVNPATH     := http://svn.planet-lab.org/svn/www-register-wizard/tags/www-register-wizard-4.3-5
 pcucontrol-GITPATH              := git://git.onelab.eu/pcucontrol.git@pcucontrol-1.0-10
 Monitor-SVNPATH                        := http://svn.planet-lab.org/svn/Monitor/tags/Monitor-3.0-35
@@ -45,7 +45,7 @@ ejabberd-GITPATH              := git://git.onelab.eu/ejabberd.git@ejabberd-2.1.6-2
 omf-GITPATH                     := git://git.onelab.eu/omf.git@omf-5.3-10
 oml-GITPATH                     := git://git.onelab.eu/oml.git@oml-2.5.1-1
 ###
-sfa-GITPATH                     := git://git.onelab.eu/sfa.git@sfa-1.0-21
+sfa-GITPATH                     := git://git.onelab.eu/sfa.git@master
 sface-GITPATH                   := git://git.onelab.eu/sface.git@sface-0.1-9
 nodeconfig-GITPATH              := git://git.onelab.eu/nodeconfig.git@nodeconfig-5.0-5
 bootmanager-GITPATH             := git://git.onelab.eu/bootmanager.git@bootmanager-5.0-17
@@ -58,4 +58,4 @@ myplc-GITPATH                   := git://git.onelab.eu/myplc.git@myplc-5.0-17
 DistributedRateLimiting-SVNPATH        := http://svn.planet-lab.org/svn/DistributedRateLimiting/tags/DistributedRateLimiting-0.1-1
 
 # locating the right test directory - see make tests_gitpath
-tests-GITPATH                   := git://git.onelab.eu/tests.git@tests-5.0-26
+tests-GITPATH                   := git://git.onelab.eu/tests.git@master
index 59200b3..ac95954 100644 (file)
@@ -32,7 +32,7 @@ vsys-GITPATH                  := git://git.onelab.eu/vsys.git@vsys-0.99-1
 vsys-scripts-GITPATH            := git://git.onelab.eu/vsys-scripts.git@vsys-scripts-0.95-28
 plcapi-GITPATH                  := git://git.onelab.eu/plcapi.git@plcapi-5.0-32
 drupal-SVNPATH                 := http://svn.planet-lab.org/svn/drupal/tags/drupal-4.7-14
-plewww-GITPATH                  := git://git.onelab.eu/plewww.git@plewww-4.3-62
+plewww-GITPATH                  := git://git.onelab.eu/plewww.git@master
 www-register-wizard-SVNPATH     := http://svn.planet-lab.org/svn/www-register-wizard/tags/www-register-wizard-4.3-5
 pcucontrol-GITPATH              := git://git.onelab.eu/pcucontrol.git@pcucontrol-1.0-10
 Monitor-SVNPATH                        := http://svn.planet-lab.org/svn/Monitor/tags/Monitor-3.0-35
@@ -44,7 +44,7 @@ ejabberd-GITPATH              := git://git.onelab.eu/ejabberd.git@ejabberd-2.1.3-2
 omf-GITPATH                     := git://git.onelab.eu/omf.git@omf-5.3-10
 oml-GITPATH                     := git://git.onelab.eu/oml.git@oml-2.5.1-1
 ###
-sfa-GITPATH                     := git://git.onelab.eu/sfa.git@sfa-1.0-21
+sfa-GITPATH                     := git://git.onelab.eu/sfa.git@master
 sface-GITPATH                   := git://git.onelab.eu/sface.git@sface-0.1-9
 nodeconfig-GITPATH              := git://git.onelab.eu/nodeconfig.git@nodeconfig-5.0-5
 bootmanager-GITPATH             := git://git.onelab.eu/bootmanager.git@bootmanager-5.0-17
@@ -57,7 +57,7 @@ myplc-GITPATH                   := git://git.onelab.eu/myplc.git@myplc-5.0-17
 DistributedRateLimiting-SVNPATH        := http://svn.planet-lab.org/svn/DistributedRateLimiting/tags/DistributedRateLimiting-0.1-1
 
 # locating the right test directory - see make tests_gitpath
-tests-GITPATH                   := git://git.onelab.eu/tests.git@tests-5.0-26
+tests-GITPATH                   := git://git.onelab.eu/tests.git@master
 
 ### temporary
 # nozomi not needed anymore for 2.6.27
index 352070e..8ce7a7e 100644 (file)
@@ -38,7 +38,7 @@ vsys-GITPATH                  := git://git.onelab.eu/vsys.git@vsys-0.99-1
 vsys-scripts-GITPATH            := git://git.onelab.eu/vsys-scripts.git@vsys-scripts-0.95-28
 plcapi-GITPATH                  := git://git.onelab.eu/plcapi.git@plcapi-5.0-32
 drupal-SVNPATH                 := http://svn.planet-lab.org/svn/drupal/tags/drupal-4.7-14
-plewww-GITPATH                  := git://git.onelab.eu/plewww.git@plewww-4.3-62
+plewww-GITPATH                  := git://git.onelab.eu/plewww.git@master
 www-register-wizard-SVNPATH     := http://svn.planet-lab.org/svn/www-register-wizard/tags/www-register-wizard-4.3-5
 pcucontrol-GITPATH              := git://git.onelab.eu/pcucontrol.git@pcucontrol-1.0-10
 Monitor-SVNPATH                        := http://svn.planet-lab.org/svn/Monitor/tags/Monitor-3.0-35
@@ -63,7 +63,7 @@ myplc-GITPATH                   := git://git.onelab.eu/myplc.git@myplc-5.0-17
 DistributedRateLimiting-SVNPATH        := http://svn.planet-lab.org/svn/DistributedRateLimiting/tags/DistributedRateLimiting-0.1-1
 
 # locating the right test directory - see make tests_gitpath
-tests-GITPATH                   := git://git.onelab.eu/tests.git@tests-5.0-26
+tests-GITPATH                   := git://git.onelab.eu/tests.git@master
 
 ### temporary
 # nozomi not needed anymore for 2.6.27
diff --git a/partial-repo.sh b/partial-repo.sh
new file mode 100755 (executable)
index 0000000..09771c0
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/sh
+# $URL$
+
+COMMAND=$(basename $0)
+
+function usage () {
+    echo "Usage: $COMMAND repo1..."
+    echo "  a 'RPMS' subdir is expected in each repo arg"
+    exit 1
+}
+
+[[ -n "$@" ]] || usage
+
+set -e 
+
+for repo in "$@" ; do
+    if [ ! -d $repo/RPMS ] ; then
+       echo could not find $repo/RPMS - ignored
+       continue
+    fi
+
+    cd $repo
+    echo "==================== Dealing with repo $repo"
+    mkdir -p PARTIAL-RPMS
+    rsync --archive --verbose $(find RPMS -type f | egrep '/(bootcd|bootstrapfs|noderepo)-.*-.*-.*-.*rpm') PARTIAL-RPMS/
+    echo "==================== building packages index in $repo .."
+    createrepo PARTIAL-RPMS
+    echo '==================== DONE'
+    cd - >& /dev/null
+done
index b26024f..9a5d8b3 100644 (file)
@@ -28,7 +28,7 @@ vsys-GITPATH                  := git://git.planet-lab.org/vsys.git@vsys-0.99-1
 vsys-scripts-GITPATH           := git://git.planet-lab.org/vsys-scripts@vsys-scripts-0.95-28
 plcapi-GITPATH                  := git://git.planet-lab.org/plcapi@plcapi-5.0-32
 drupal-SVNPATH                 := http://svn.planet-lab.org/svn/drupal/tags/drupal-4.7-14
-plewww-GITPATH                 := git://git.planet-lab.org/plewww@plewww-4.3-62
+plewww-GITPATH                 := git://git.planet-lab.org/plewww@plewww-4.3-63
 www-register-wizard-SVNPATH    := http://svn.planet-lab.org/svn/www-register-wizard/tags/www-register-wizard-4.3-5
 Monitor-SVNPATH                        := http://svn.planet-lab.org/svn/Monitor/tags/Monitor-3.0-35
 PLCRT-SVNPATH                  := http://svn.planet-lab.org/svn/PLCRT/tags/PLCRT-1.0-11
index 6e66027..a7fd87e 100644 (file)
@@ -35,7 +35,7 @@ vsys-GITPATH                  := git://git.planet-lab.org/vsys.git@vsys-0.99-1
 vsys-scripts-GITPATH           := git://git.planet-lab.org/vsys-scripts@vsys-scripts-0.95-28
 plcapi-GITPATH                  := git://git.planet-lab.org/plcapi@plcapi-5.0-32
 drupal-SVNPATH                 := http://svn.planet-lab.org/svn/drupal/tags/drupal-4.7-14
-plewww-GITPATH                 := git://git.planet-lab.org/plewww@plewww-4.3-62
+plewww-GITPATH                 := git://git.planet-lab.org/plewww@plewww-4.3-63
 www-register-wizard-SVNPATH    := http://svn.planet-lab.org/svn/www-register-wizard/tags/www-register-wizard-4.3-5
 Monitor-SVNPATH                        := http://svn.planet-lab.org/svn/Monitor/tags/Monitor-3.0-35
 PLCRT-SVNPATH                  := http://svn.planet-lab.org/svn/PLCRT/tags/PLCRT-1.0-11
index 30db899..4a5f9f1 100644 (file)
@@ -27,7 +27,7 @@ vsys-GITPATH                  := git://git.planet-lab.org/vsys.git@vsys-0.99-1
 vsys-scripts-GITPATH           := git://git.planet-lab.org/vsys-scripts@vsys-scripts-0.95-28
 plcapi-GITPATH                  := git://git.planet-lab.org/plcapi@plcapi-5.0-32
 drupal-SVNPATH                 := http://svn.planet-lab.org/svn/drupal/tags/drupal-4.7-14
-plewww-GITPATH                 := git://git.planet-lab.org/plewww@plewww-4.3-62
+plewww-GITPATH                 := git://git.planet-lab.org/plewww@plewww-4.3-63
 www-register-wizard-SVNPATH    := http://svn.planet-lab.org/svn/www-register-wizard/tags/www-register-wizard-4.3-5
 pcucontrol-GITPATH              := git://git.planet-lab.org/pcucontrol.git@pcucontrol-1.0-10
 Monitor-SVNPATH                        := http://svn.planet-lab.org/svn/Monitor/tags/Monitor-3.0-35
index e0743fe..8346d0a 100644 (file)
@@ -31,7 +31,7 @@ vsys-GITPATH                  := git://git.onelab.eu/vsys@vsys-0.9-4
 vsys-scripts-GITPATH            := git://git.onelab.eu/vsys-scripts@vsys-scripts-0.95-24
 PLCAPI-SVNPATH                  := http://svn.planet-lab.org/svn/PLCAPI/tags/PLCAPI-4.3-33
 drupal-SVNPATH                 := http://svn.planet-lab.org/svn/drupal/tags/drupal-4.7-14
-PLEWWW-GITPATH                  := git://git.onelab.eu/plewww@plewww-4.3-62
+PLEWWW-GITPATH                  := git://git.onelab.eu/plewww@plewww-4.3-63
 www-register-wizard-SVNPATH    := http://svn.planet-lab.org/svn/www-register-wizard/tags/www-register-wizard-4.3-5
 Monitor-SVNPATH                        := http://svn.planet-lab.org/svn//Monitor/tags/Monitor-3.0-30/
 pcucontrol-SVNPATH             := http://svn.planet-lab.org/svn/pcucontrol/tags/pcucontrol-1.0-4/