]> git.proxmox.com Git - mirror_lxc.git/commitdiff
Use "rsync -SHaAX" to copy the cached rootfs into place
authorHarald Dunkel <harri@afaics.de>
Fri, 28 Jul 2017 18:08:02 +0000 (13:08 -0500)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Fri, 28 Jul 2017 18:09:36 +0000 (13:09 -0500)
(updated by Serge to also handle hte new lxc-fedora{-legacy{.in
templates)

Signed-off-by: Harald Dunkel <harri@afaics.de>
Signed-off-by: Serge Hallyn <serge@hallyn.com>
Acked-by: Serge Hallyn <serge@hallyn.com>
templates/lxc-altlinux.in
templates/lxc-centos.in
templates/lxc-debian.in
templates/lxc-fedora-legacy.in
templates/lxc-fedora.in
templates/lxc-openmandriva.in
templates/lxc-opensuse.in
templates/lxc-ubuntu.in

index b6de74662fce1b1656f8467dc40e46e2d8a833af..d526fa09619a2041ea9c76223182a4cbed062940 100644 (file)
@@ -221,7 +221,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
 }
 
index 6832133b25699c5d01fe91cac018bde76392a837..4d2777bd6b045bf196eec9ee8b47ac3686a00576 100644 (file)
@@ -533,7 +533,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
 }
index 5cbfcd1f2fc8f19b073214a712e71585d0b777df..cd00066f34a2ffec0d3022a8b100c0a8604e778b 100644 (file)
@@ -433,7 +433,7 @@ copy_debian()
       btrfs subvolume snapshot "$cache/rootfs-$release-$arch" "$realrootfs" || return 1
       [ "$rootfs" = "$realrootfs" ] || mount --bind "$realrootfs" "$rootfs" || return 1
     else
-        rsync -Ha "$cache/rootfs-$release-$arch"/ "$rootfs"/ || return 1
+        rsync -SHaAX "$cache/rootfs-$release-$arch"/ $rootfs/ || return 1
     fi
     return 0
 }
index 512adbe5a3a8055adfc3e811c8dd22d689d426db..3ef341530239560d8a58140ffbe4881d8d117a17 100644 (file)
@@ -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
 }
index 57c5569bc411363885d6aff14d4e5eced857069f..10b90b1e50dcddf0fdacf0d09571b10afc03bd88 100644 (file)
@@ -520,7 +520,7 @@ copy_fedora()
     echo -n "Copying ${cache} to ${rootfs} ... "
 
     mkdir -p "${rootfs}" &&
-    rsync --archive --hard-links --sparse "${cache}/" "${rootfs}/" &&
+    rsync --archive --hard-links --sparse --acls --xattrs "${cache}/" "${rootfs}/" &&
     echo || return 1
 
     return 0
index 6fefb45c1fc2dd53a35b1e6a4c46c733159f473e..2761cd50921d538255b24283ec03c0a3a0d3fd30 100644 (file)
@@ -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
 }
 
index 29f9f41780340c65fbbae409caaa6b3cdfd2a536..edecad5e32e78ddc24795ef7ac8ab252c8d8e87d 100644 (file)
@@ -251,7 +251,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
 }
 
index 8077b319cdcdaa72811e666b5c4f23d0227c9896..7fc3e513287ccf72ff5936ad711cfd5ec6e686e5 100644 (file)
@@ -439,7 +439,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
 }