--- /dev/null
+module-tools.py
\ No newline at end of file
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:
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"""
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):
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")
options.www=False
options.debug=False
+
+
########## module-*
if len(args) == 0:
if options.all_modules:
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)
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
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
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
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
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
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
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
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
--- /dev/null
+#!/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
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
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
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
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/