On Mon, Jul 25, 2011 at 06:07:16PM -0400, Ben Lipton wrote: > The fixes/ directory will be recursively copied to /usr/lib/ganeti/fixes > on the bootstrap OS. It contains a few executable scripts which will be > run with run-parts. If these are to be python scripts, most of their > code should be contained in modules in fixes/fixlib/, so that they can > be unit tested. > > This patch: > - Updates p2v-target.conf.in so that python will be available on the > bootstap os > - Adds the hook script to install the fixes directory on the boostrap OS > - Creates the fixes/fixlib directory where python modules for the > scripts will live > > Signed-off-by: Ben Lipton <[email protected]> > --- > instance-p2v-target/Makefile.am | 6 +++- > instance-p2v-target/fixes/fixlib/__init__.py | 27 > ++++++++++++++++++++++++++ > instance-p2v-target/hooks/install-fixes.in | 21 ++++++++++++++++++++ > instance-p2v-target/p2v-target.conf.in | 2 +- > 4 files changed, 53 insertions(+), 3 deletions(-) > create mode 100644 instance-p2v-target/fixes/fixlib/__init__.py > create mode 100644 instance-p2v-target/hooks/install-fixes.in > > diff --git a/instance-p2v-target/Makefile.am b/instance-p2v-target/Makefile.am > index 06d8017..b201da1 100644 > --- a/instance-p2v-target/Makefile.am > +++ b/instance-p2v-target/Makefile.am > @@ -11,8 +11,9 @@ dist_os_SCRIPTS = create import export rename > config_DATA = p2v-target.conf > dist_hook_SCRIPTS = hooks/ramboot hooks/interfaces hooks/xen-hvc0 \ > hooks/clear-root-password > +hook_SCRIPTS = hooks/install-fixes > > -subst_files = common.sh p2v-target.conf > +subst_files = hooks/install-fixes common.sh p2v-target.conf > > dist_os_DATA = ganeti_api_version variants.list > os_SCRIPTS = common.sh > @@ -20,7 +21,8 @@ os_SCRIPTS = common.sh > dist_sbin_SCRIPTS = scripts/make_ramboot_initrd.py > dist_fixes_SCRIPTS = > > -dist_fixlib_DATA = > +dist_fixlib_DATA = \ > + fixes/fixlib/__init__.py > > EXTRA_DIST = $(patsubst %,%.in,$(subst_files)) \ > $(dist_TESTS) \ > diff --git a/instance-p2v-target/fixes/fixlib/__init__.py > b/instance-p2v-target/fixes/fixlib/__init__.py > new file mode 100644 > index 0000000..0fb4bea > --- /dev/null > +++ b/instance-p2v-target/fixes/fixlib/__init__.py > @@ -0,0 +1,27 @@ > +#!/usr/bin/python > +# > +# Copyright 2011 Google Inc. All Rights Reserved.
Still here. What I mean in my previous email is that any "All Right Reserved" header is plain wrong. I'm pushing with this diff: diff --git a/instance-p2v-target/fixes/fixlib/__init__.py b/instance-p2v-target/fixes/fixlib/__init__.py index 0fb4bea..d2d02ce 100644 --- a/instance-p2v-target/fixes/fixlib/__init__.py +++ b/instance-p2v-target/fixes/fixlib/__init__.py @@ -1,6 +1,6 @@ -#!/usr/bin/python # -# Copyright 2011 Google Inc. All Rights Reserved. +# +# Copyright (C) 2011 Google Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/instance-p2v-target/hooks/install-fixes.in b/instance-p2v-target/hooks/install-fixes.in index 961de1d..1f2abe1 100644 --- a/instance-p2v-target/hooks/install-fixes.in +++ b/instance-p2v-target/hooks/install-fixes.in @@ -18,4 +18,3 @@ mkdir -p "$TARGET/usr/lib/ganeti" cp -r "@configdir@/fixes" "$TARGET/usr/lib/ganeti" exit 0 - -- thanks, iustin
