Package: lxc Version: 0.8.0-1 Followup-For: Bug #683837 [re-posting here, sent yesterday to #687767 by mistake]
Hello, I noticed this bug still occurs with 0.8.0-1. I would like to submit the attached patch, which solves the problem in my case (using LVM rootfs). It's very similar to the 2 other patches, but uses tar instead of cp, which should work for dotfiles. Using rsync would be nicer, but this would add a dependency on the package. I hope one or another of these patches will find their way in the package sooner or later :-) BTW, thanks for making lxc-debconf, it's excellent ! Cheers, Marc
--- /usr/share/lxc/templates/lxc-debconfig.distrib 2012-11-21 19:50:03.806793345 +0100 +++ /usr/share/lxc/templates/lxc-debconfig 2012-11-21 21:12:22.861169495 +0100 @@ -522,7 +522,8 @@ then # system cache in the form of a directory echo -n "Copying system cache to ${_ROOTFS}..." - cp -a "/usr/share/lxc/cache/${_MODE}/${_DISTRIBUTION}_${_ARCHITECTURE}" "${_ROOTFS}" || return 1 + mkdir -p "${_ROOTFS}" + (tar -C "/usr/share/lxc/cache/${_MODE}/${_DISTRIBUTION}_${_ARCHITECTURE}" -c . | tar -C "${_ROOTFS}" -x) || return 1 elif ls "/usr/share/lxc/cache/${_MODE}/${_DISTRIBUTION}_${_ARCHITECTURE}".* > /dev/null 2>&1 then # system cache in the form of a tarball @@ -546,7 +547,8 @@ # make a local copy of the minimal system echo -n "Copying local cache to ${_ROOTFS}..." - cp -a "${_CACHE}/${_DISTRIBUTION}_${_ARCHITECTURE}" "${_ROOTFS}" || return 1 + mkdir -p "${_ROOTFS}" + (tar -C "${_CACHE}/${_DISTRIBUTION}_${_ARCHITECTURE}" -c . | tar -C "${_ROOTFS}" -x) || return 1 fi # Add local repositories configured from preseed file