diff -Nru lxc-templates-3.0.4/debian/changelog lxc-templates-3.0.4/debian/changelog --- lxc-templates-3.0.4/debian/changelog 2020-10-29 07:34:12.000000000 +0000 +++ lxc-templates-3.0.4/debian/changelog 2021-03-12 10:53:24.000000000 +0000 @@ -1,9 +1,17 @@ -lxc-templates (3.0.4-4ubuntu1) hirsute; urgency=low +lxc-templates (3.0.4-5) unstable; urgency=medium - * Merge from Debian unstable. Remaining changes: - - Suggest also qemu-user-static + [ Gianfranco Costamagna ] + * d/control: + - Add Suggests: qemu-user-static (Closes: #973345) + + [ Pierre-Elliott Bécue ] + * d/control: + - Add distro-info to the Recommends of lxc-templates (Closes: #974569) + - Bump Standards-Version to 4.5.1 + * d/p/0004: fix path variable in some templates to avoid catastrophic rm + (Closes: #839843) - -- Gianfranco Costamagna Thu, 29 Oct 2020 08:34:12 +0100 + -- Pierre-Elliott Bécue Fri, 12 Mar 2021 11:53:24 +0100 lxc-templates (3.0.4-4) unstable; urgency=medium @@ -21,14 +29,6 @@ -- Pierre-Elliott Bécue Sat, 17 Oct 2020 22:42:34 +0200 -lxc-templates (3.0.4-3ubuntu1) focal; urgency=low - - * Merge from Debian unstable. Remaining changes: - - Depend on lxc-utils instead of lxc - - Suggest also qemu-user-static - - -- Gianfranco Costamagna Sun, 19 Apr 2020 21:18:07 +0200 - lxc-templates (3.0.4-3) unstable; urgency=medium [ Debian Janitor ] @@ -46,14 +46,6 @@ -- Pierre-Elliott Bécue Wed, 15 Apr 2020 17:02:34 +0200 -lxc-templates (3.0.4-1ubuntu1) eoan; urgency=low - - * Merge from Debian unstable. Remaining changes: - - Depend on lxc-utils instead of lxc - - Suggest also qemu-user-static - - -- Gianfranco Costamagna Wed, 21 Aug 2019 09:09:39 +0200 - lxc-templates (3.0.4-1) unstable; urgency=medium * New upstream release 3.0.4 @@ -64,14 +56,6 @@ -- Pierre-Elliott Bécue Tue, 20 Aug 2019 13:49:53 +0200 -lxc-templates (3.0.3-1ubuntu2) eoan; urgency=medium - - * Merge from Debian unstable. (to make package mergeable) - - Depend on lxc-utils instead of lxc - - Suggest also qemu-user-static - - -- Gianfranco Costamagna Tue, 14 May 2019 09:59:50 +0200 - lxc-templates (3.0.3-1) unstable; urgency=medium * d/control: diff -Nru lxc-templates-3.0.4/debian/control lxc-templates-3.0.4/debian/control --- lxc-templates-3.0.4/debian/control 2020-10-29 07:34:01.000000000 +0000 +++ lxc-templates-3.0.4/debian/control 2021-03-12 10:53:22.000000000 +0000 @@ -4,7 +4,7 @@ Maintainer: pkg-lxc Uploaders: Pierre-Elliott Bécue Build-Depends: debhelper-compat (= 13) -Standards-Version: 4.5.0 +Standards-Version: 4.5.1 Homepage: https://linuxcontainers.org/ Vcs-Git: https://salsa.debian.org/lxc-team/lxc-templates.git Vcs-Browser: https://salsa.debian.org/lxc-team/lxc-templates @@ -17,6 +17,7 @@ busybox-static, cloud-image-utils | cloud-utils, debootstrap | cdebootstrap, + distro-info, mmdebstrap, openssl, rsync, diff -Nru lxc-templates-3.0.4/debian/patches/0004-Fixes-path-variable-in-some-templates.patch lxc-templates-3.0.4/debian/patches/0004-Fixes-path-variable-in-some-templates.patch --- lxc-templates-3.0.4/debian/patches/0004-Fixes-path-variable-in-some-templates.patch 1970-01-01 00:00:00.000000000 +0000 +++ lxc-templates-3.0.4/debian/patches/0004-Fixes-path-variable-in-some-templates.patch 2021-03-12 10:50:28.000000000 +0000 @@ -0,0 +1,180 @@ +From: =?utf-8?q?Pierre-Elliott_B=C3=A9cue?= +Date: Fri, 12 Mar 2021 11:50:00 +0100 +Subject: Fixes path variable in some templates + +The behaviour of the path variable is somewhat inconsistent with a +relevant way of generating containers. path now points to a directory, +where ${path}/${name} will be created and handle the new container's +config/rootfs +--- + templates/lxc-archlinux.in | 8 +++++--- + templates/lxc-centos.in | 6 ++++-- + templates/lxc-fedora-legacy.in | 8 +++++--- + templates/lxc-fedora.in | 8 +++++--- + templates/lxc-pld.in | 7 +++++-- + templates/lxc-voidlinux.in | 8 +++++++- + 6 files changed, 31 insertions(+), 14 deletions(-) + +diff --git a/templates/lxc-archlinux.in b/templates/lxc-archlinux.in +index f8d4ba0..afa2f11 100644 +--- a/templates/lxc-archlinux.in ++++ b/templates/lxc-archlinux.in +@@ -206,8 +206,8 @@ usage: + Mandatory args: + -n,--name container name, used to as an identifier for that container from now on + Optional args: +- -p,--path path to where the container rootfs will be created (${default_path}) +- --rootfs path for actual container rootfs, (${default_path}/rootfs) ++ -p,--path path the directory where the container directory will be created (${default_path}) ++ --rootfs path for actual container rootfs, (${default_path}/{container_name}/rootfs) + -P,--packages preinstall additional packages, comma-separated list + -e,--enable_units enable systemd services, comma-separated list + -d,--disable_units disable systemd services, comma-separated list +@@ -256,9 +256,11 @@ if [ ${?} -ne 0 ]; then + fi + + if [ -z "${path}" ]; then +- path="${default_path}/${name}" ++ path="${default_path}" + fi + ++path="${path}/${name}" ++ + if [ "${EUID}" != "0" ]; then + echo "This script should be run as 'root'" + exit 1 +diff --git a/templates/lxc-centos.in b/templates/lxc-centos.in +index eba5ec8..7145845 100644 +--- a/templates/lxc-centos.in ++++ b/templates/lxc-centos.in +@@ -708,7 +708,7 @@ usage: + Mandatory args: + -n,--name container name, used to as an identifier for that container from now on + Optional args: +- -p,--path path to where the container rootfs will be created, defaults to /var/lib/lxc/name. ++ -p,--path path to where the container directory will be created, defaults to /var/lib/lxc. + -c,--clean clean the cache + -R,--release CentOS release for the new container. If the host is CentOS, then it will default to the host's release. + --fqdn fully qualified domain name (FQDN) for DNS and system naming +@@ -847,9 +847,11 @@ if [ $? -ne 0 ]; then + fi + + if [ -z "$path" ]; then +- path=$default_path/$name ++ path=$default_path + fi + ++path="${path}/${name}" ++ + if [ -z "$release" ]; then + if [ "$is_centos" -a "$centos_host_ver" ]; then + release=$centos_host_ver +diff --git a/templates/lxc-fedora-legacy.in b/templates/lxc-fedora-legacy.in +index 3ef3415..d42d6a6 100644 +--- a/templates/lxc-fedora-legacy.in ++++ b/templates/lxc-fedora-legacy.in +@@ -1187,8 +1187,8 @@ usage: + Mandatory args: + -n,--name container name, used to as an identifier for that container + Optional args: +- -p,--path path to where the container will be created, +- defaults to @LXCPATH@. ++ -p,--path path to the directory where the container'directory will be ++ created, defaults to @LXCPATH@. + --rootfs path for actual rootfs. + -c,--clean clean the cache + -R,--release Fedora release for the new container. +@@ -1348,9 +1348,11 @@ if [ -n "$needed_pkgs" ]; then + fi + + if [ -z "$path" ]; then +- path=$default_path/$name ++ path=$default_path + fi + ++path="${path}/${name}" ++ + if [ -z "$release" ]; then + if [ "$is_fedora" -a "$fedora_host_ver" ]; then + release=$fedora_host_ver +diff --git a/templates/lxc-fedora.in b/templates/lxc-fedora.in +index 51868a6..f6e5191 100644 +--- a/templates/lxc-fedora.in ++++ b/templates/lxc-fedora.in +@@ -983,8 +983,8 @@ Template options: + -h, --help Print this help text + --mask-tmp Prevent systemd from over-mounting /tmp with tmpfs. + -M, --mirror=MIRROR Fedora mirror to use during installation. +- -p, --path=PATH Path to where the container will be created, +- defaults to ${lxc_path}. ++ -p, --path=PATH Path to the directory where the container's directory ++ will be created, defaults to ${lxc_path}. + -P, --packages=PKGS Comma-separated list of additional RPM packages to + install into the container. + -R, --release=RELEASE Fedora release number of the container, defaults +@@ -1216,9 +1216,11 @@ fi + # set container directory + if [ -z "${path}" ] + then +- path="${lxc_path}/${name}" ++ path="${lxc_path}" + fi + ++path="${path}/${name}" ++ + # set container rootfs and configuration path + config="${path}/config" + if [ -z "${rootfs}" ] +diff --git a/templates/lxc-pld.in b/templates/lxc-pld.in +index b748cb8..a333943 100644 +--- a/templates/lxc-pld.in ++++ b/templates/lxc-pld.in +@@ -319,7 +319,8 @@ usage: + Mandatory args: + -n,--name container name, used to as an identifier for that container from now on + Optional args: +- -p,--path path to where the container will be created, defaults to @LXCPATH@. The container config will go under @LXCPATH@ in that case ++ -p,--path path to the directory where the container's directory will be created, defaults to @LXCPATH@. ++ The container config will go under @LXCPATH@ in that case + --rootfs path for actual rootfs. + -c,--clean clean the cache + -R,--release PLD Linux release for the new container. if the host is PLD Linux, then it will default to the host's release. +@@ -397,9 +398,11 @@ if [ -n "$needed_pkgs" ]; then + fi + + if [ -z "$path" ]; then +- path=$default_path/$name ++ path=$default_path + fi + ++path="${path}/${name}" ++ + if [ -z "$release" ]; then + if [ "$is_pld" -a "$pld_host_ver" ]; then + release=$pld_host_ver +diff --git a/templates/lxc-voidlinux.in b/templates/lxc-voidlinux.in +index d74da38..0ba74ef 100644 +--- a/templates/lxc-voidlinux.in ++++ b/templates/lxc-voidlinux.in +@@ -103,7 +103,7 @@ usage: + Mandatory args: + -n,--name container name, used to as an identifier for that container from now on + Optional args: +- -p,--path path to where the container rootfs will be created (${default_path}) ++ -p,--path path to the directory where the container's directory will be created (${default_path}) + --rootfs path for actual container rootfs, (${default_path}/rootfs) + -P,--packages preinstall additional packages, comma-separated list + -c,--config use specified pacman config when installing container packages +@@ -152,6 +152,12 @@ if [ ${?} -ne 0 ]; then + echo "'xbps-query' command is missing." + fi + ++if [ -z "${path}" ]; then ++ path="${default_path}" ++fi ++ ++path="${path}/${name}" ++ + if [ -z "${rootfs_path}" ]; then + rootfs_path="${path}/rootfs" + fi diff -Nru lxc-templates-3.0.4/debian/patches/series lxc-templates-3.0.4/debian/patches/series --- lxc-templates-3.0.4/debian/patches/series 2020-10-18 03:47:23.000000000 +0000 +++ lxc-templates-3.0.4/debian/patches/series 2021-03-12 10:50:28.000000000 +0000 @@ -1,3 +1,4 @@ 0001-lxc-debian-Handle-languages-that-are-only-UTF-8-enco.patch 0002-Add-references-to-mmdebstrap-and-some-documentation-.patch 0003-Handle-properly-the-future-security-repositories.patch +0004-Fixes-path-variable-in-some-templates.patch