Hi Serge,

On 06/15/16 19:00, Serge E. Hallyn wrote:
> Quoting Harald Dunkel (harald.dun...@aixigo.de):
>>
>> Using "rsync -SHaAX" in lxc-debian it works (on Jessie).
>> Attached you can find a suggested patch for all (lxc 1.1.5).
> 
> Thanks this looks good.  Do you mind sending a signed-off-by?
> 

See attachment. This change is based upon the stable-1.1
branch.

I kicked out one of the changes of my previous post, though.
The fedora template uses rsync on squashfs. This is too hot
for me to touch.


Regards
Harri

From b6c4371f038013121a753080ad9062f1896566f8 Mon Sep 17 00:00:00 2001
From: Harald Dunkel <ha...@afaics.de>
Date: Thu, 16 Jun 2016 11:26:03 +0200
Subject: [PATCH] use "rsync -SHaAX" to copy the cached rootfs into place

Signed-off-by: Harald Dunkel <ha...@afaics.de>
---
 templates/lxc-altlinux.in     | 2 +-
 templates/lxc-centos.in       | 2 +-
 templates/lxc-debian.in       | 2 +-
 templates/lxc-fedora.in       | 2 +-
 templates/lxc-openmandriva.in | 2 +-
 templates/lxc-opensuse.in     | 2 +-
 templates/lxc-ubuntu.in       | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/templates/lxc-altlinux.in b/templates/lxc-altlinux.in
index 8b4168c..3412772 100644
--- a/templates/lxc-altlinux.in
+++ b/templates/lxc-altlinux.in
@@ -208,7 +208,7 @@ copy_altlinux()
     #cp -a $cache/rootfs-$arch $rootfs_path || return 1
     # i prefer rsync (no reason really)
     mkdir -p $rootfs_path
-    rsync -Ha $cache/rootfs/ $rootfs_path/
+    rsync -SHaAX $cache/rootfs/ $rootfs_path/
     return 0
 }
 
diff --git a/templates/lxc-centos.in b/templates/lxc-centos.in
index 1a27cd3..1e04b10 100644
--- a/templates/lxc-centos.in
+++ b/templates/lxc-centos.in
@@ -512,7 +512,7 @@ copy_centos()
     #cp -a $cache/rootfs-$arch $rootfs_path || return 1
     # i prefer rsync (no reason really)
     mkdir -p $rootfs_path
-    rsync -a $cache/rootfs/ $rootfs_path/
+    rsync -SHaAX $cache/rootfs/ $rootfs_path/
     echo
     return 0
 }
diff --git a/templates/lxc-debian.in b/templates/lxc-debian.in
index 54393ca..33fe1ec 100644
--- a/templates/lxc-debian.in
+++ b/templates/lxc-debian.in
@@ -283,7 +283,7 @@ copy_debian()
     # make a local copy of the minidebian
     echo -n "Copying rootfs to $rootfs..."
     mkdir -p $rootfs
-    rsync -Ha "$cache/rootfs-$release-$arch"/ $rootfs/ || return 1
+    rsync -SHaAX "$cache/rootfs-$release-$arch"/ $rootfs/ || return 1
     return 0
 }
 
diff --git a/templates/lxc-fedora.in b/templates/lxc-fedora.in
index f6e5be5..624e755 100644
--- a/templates/lxc-fedora.in
+++ b/templates/lxc-fedora.in
@@ -1015,7 +1015,7 @@ copy_fedora()
     #cp -a $cache/rootfs-$basearch $rootfs_path || return 1
     # i prefer rsync (no reason really)
     mkdir -p $rootfs_path
-    rsync -Ha $cache/rootfs/ $rootfs_path/
+    rsync -SHaAX $cache/rootfs/ $rootfs_path/
     echo
     return 0
 }
diff --git a/templates/lxc-openmandriva.in b/templates/lxc-openmandriva.in
index 6123c5e..2b690b6 100644
--- a/templates/lxc-openmandriva.in
+++ b/templates/lxc-openmandriva.in
@@ -155,7 +155,7 @@ copy_openmandriva()
 
     echo -n "Copying rootfs to $rootfs_path ..."
     mkdir -p $rootfs_path
-    rsync -Ha $cache/rootfs/ $rootfs_path/
+    rsync -SHaAX $cache/rootfs/ $rootfs_path/
     return 0
 }
 
diff --git a/templates/lxc-opensuse.in b/templates/lxc-opensuse.in
index d4e2b28..a69c451 100644
--- a/templates/lxc-opensuse.in
+++ b/templates/lxc-opensuse.in
@@ -221,7 +221,7 @@ copy_opensuse()
     # make a local copy of the mini opensuse
     echo "Copying rootfs to $rootfs ..."
     mkdir -p $rootfs
-    rsync -Ha $cache/rootfs-$arch/ $rootfs/ || return 1
+    rsync -SHaAX $cache/rootfs-$arch/ $rootfs/ || return 1
     return 0
 }
 
diff --git a/templates/lxc-ubuntu.in b/templates/lxc-ubuntu.in
index 55199dc..5085bf9 100644
--- a/templates/lxc-ubuntu.in
+++ b/templates/lxc-ubuntu.in
@@ -413,7 +413,7 @@ copy_ubuntu()
       btrfs subvolume snapshot $cache/rootfs-$arch $realrootfs || return 1
       [ "$rootfs" = "$realrootfs" ] || mount --bind $realrootfs $rootfs || return 1
     else
-      rsync -Ha $cache/rootfs-$arch/ $rootfs/ || return 1
+      rsync -SHaAX $cache/rootfs-$arch/ $rootfs/ || return 1
     fi
     return 0
 }
-- 
2.8.1

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to