From 5ec8930a6f4cac2f1207ff2a96bc894d508cac6a Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Fri, 22 Feb 2019 10:51:18 +0100 Subject: [PATCH] ugly patch https://github.com/OpenNebula/one/commit/320a8c26c0c455edfdc5ea87ae2fad38817ee856?diff=unified --- eole/one.patch | 33 +++++++++++++++++++++++++++++++++ posttemplate/90-one-db | 6 ++++++ 2 files changed, 39 insertions(+) create mode 100644 eole/one.patch diff --git a/eole/one.patch b/eole/one.patch new file mode 100644 index 0000000..eb6c240 --- /dev/null +++ b/eole/one.patch @@ -0,0 +1,33 @@ +--- onehost_helper.rb 2019-02-09 11:13:40.592653423 +0100 ++++ lib/one/ruby/cli/one_helper/onehost_helper.rb 2019-02-09 11:13:48.820708340 +0100 +@@ -349,7 +349,7 @@ + sync_cmd = "rsync -Laz --delete #{REMOTES_LOCATION}" << + " #{host['NAME']}:#{remote_dir}" + else +- sync_cmd = "scp -rp #{REMOTES_LOCATION}/. " << ++ sync_cmd = "scp -rp #{REMOTES_LOCATION}/* " << + "#{host['NAME']}:#{remote_dir} 2> /dev/null" + end + +--- one_im_exec.rb 2019-02-09 11:14:41.809061980 +0100 ++++ lib/one/mads/one_im_exec.rb 2019-02-09 11:14:45.981089826 +0100 +@@ -74,7 +74,7 @@ + if !action_is_local?(:MONITOR) + if do_update == "1" || @options[:force_copy] + # Use SCP to sync: +- sync_cmd = "scp -r #{@local_scripts_base_path}/. " \ ++ sync_cmd = "scp -r #{@local_scripts_base_path}/* " \ + "#{host}:#{@remote_scripts_base_path}" + + # Use rsync to sync: +--- CommandManager.rb 2019-02-09 11:14:53.877142524 +0100 ++++ lib/one/ruby/CommandManager.rb 2019-02-09 11:15:07.325232276 +0100 +@@ -268,7 +268,7 @@ + SSHCommand.run("mkdir -p #{remote_dir}",host,logger) + + # Use SCP to sync: +- sync_cmd = "scp -rp #{REMOTES_LOCATION}/. #{host}:#{remote_dir}" ++ sync_cmd = "scp -rp #{REMOTES_LOCATION}/* #{host}:#{remote_dir}" + + # Use rsync to sync: + # sync_cmd = "rsync -Laz #{REMOTES_LOCATION} #{host}:#{@remote_dir}" diff --git a/posttemplate/90-one-db b/posttemplate/90-one-db index 213d001..55654e5 100644 --- a/posttemplate/90-one-db +++ b/posttemplate/90-one-db @@ -81,4 +81,10 @@ echo EchoGras "Mise à jour de la base de données ONE" echo updateDB +# FIXME ugly patch +grep -q "\/\." /usr/lib/one/ruby/CommandManager.rb +if [ $? = 0 ]; then + cd /usr + patch -fp0 < /usr/share/eole/one.patch +fi exit ${?}