Commit 6a181e06 authored by Vincent Pelletier's avatar Vincent Pelletier Committed by Rafael Monnerat

software/slaprunner: Exclude all buildout-managed files.

parent 4ee761cd
......@@ -15,7 +15,7 @@
# not need these here).
[template]
filename = instance.cfg
md5sum = afd426c01891d06e95f17b622ecd172f
md5sum = 43b3f80bc368a5b246e0f0e80e7e3c01
[template-runner]
filename = instance-runner.cfg
......@@ -31,11 +31,11 @@ md5sum = 9db9957f452bda370cb2d5cc2e833e85
[template-runner-export-script]
filename = template/runner-export.sh.jinja2
md5sum = a8cb62a948300e6641af935e81ac4aef
md5sum = 5fab5c6867a57adf6dcf7b8dc758358a
[instance-runner-export]
filename = instance-runner-export.cfg.in
md5sum = e9aa653417a85ed2a7a7ccfb64668ace
md5sum = 2a29bcf1c857721eb2462d9cb9d20386
[template-resilient]
filename = instance-resilient.cfg.jinja2
......
......@@ -7,6 +7,7 @@ extends =
../../component/curl/buildout.cfg
../../component/dash/buildout.cfg
../../component/dcron/buildout.cfg
../../component/gawk/buildout.cfg
../../component/git/buildout.cfg
../../component/tig/buildout.cfg
../../component/logrotate/buildout.cfg
......
......@@ -64,6 +64,7 @@ port = ${supervisord-free-port:port}
[exporter-configuration]
coreutils-location = {{ dumps(parameter_dict['coreutils-location']) }}
gawk-location = {{ dumps(parameter_dict['gawk-location']) }}
[exporter]
recipe = slapos.recipe.template:jinja2
......
......@@ -49,6 +49,7 @@ mode = 0644
[template-runner-export-configuration]
coreutils-location = ${coreutils:location}
gawk-location = ${gawk:location}
[template-runner-export]
recipe = slapos.recipe.template:jinja2
......
......@@ -40,6 +40,7 @@ relativise () {
if [ -d instance ]; then
# Concatenate the exclude file of each partition of webrunner
# to create a global exclude file.
# Also, ignore all buildout-managed files.
(
echo "*.sock"
echo "*.socket"
......@@ -52,6 +53,17 @@ relativise () {
if [ -r "$exclude_file" ]; then
relativise "$path" < "$exclude_file"
fi
for installed in .installed*.cfg; do
if [ -r "$installed" ]; then
# Print every line from each __buildout_installed__ found.
'{{ parameter_dict["gawk-location"] }}/bin/gawk' '
BEGIN { do_print = 0 }
match($0, /^__buildout_installed__\s*=\s*(\S.*)/, ary) { do_print = 1; print ary[1]; next }
/^\S/ { do_print = 0; next }
match($0, /^\s+(\S.*)/, ary) { if (do_print) print ary[1] }
' "$installed" | relativise "$path"
fi
done
done
) | rsync --exclude-from=- instance "$backup_path"
fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment