RELEASE=2.0
SVER=3.0.29
-PACKAGERELEASE=3pve2
+PACKAGERELEASE=3pve3
ARCH=amd64
PACKAGE=vzctl
+vzctl (3.0.29-3pve3) unstable; urgency=low
+
+ * fix config path in vzmigrate
+
+ * symlink /etc/vz/conf to /etc/pve/openvz
+
+ * do not make backups of config files on destroy
+
+ -- Proxmox Support Team <support@proxmox.com> Thu, 17 Nov 2011 07:54:34 +0100
+
vzctl (3.0.29-3pve2) unstable; urgency=low
* fix config path in vznetaddbr
Index: new/include/types.h
===================================================================
---- new.orig/include/types.h 2011-09-26 11:54:22.000000000 +0200
-+++ new/include/types.h 2011-09-26 12:00:55.000000000 +0200
+--- new.orig/include/types.h 2011-11-17 08:05:21.000000000 +0100
++++ new/include/types.h 2011-11-17 08:05:45.000000000 +0100
@@ -21,7 +21,7 @@
#define VZ_DIR PKGCONFDIR "/"
#define GLOBAL_CFG VZ_DIR "vz.conf"
#define VENAME_DIR VZ_DIR "names"
Index: new/paths.am
===================================================================
---- new.orig/paths.am 2011-09-26 07:35:16.000000000 +0200
-+++ new/paths.am 2011-09-26 07:36:40.000000000 +0200
+--- new.orig/paths.am 2011-11-17 08:05:21.000000000 +0100
++++ new/paths.am 2011-11-17 08:05:45.000000000 +0100
@@ -32,7 +32,7 @@
ifupdir = $(sysconfdir)/network/if-up.d
distconfdir = $(pkgconfdir)/dists
namesdir = $(pkgconfdir)/names
+Index: new/bin/vznetaddbr.in
+===================================================================
+--- new.orig/bin/vznetaddbr.in 2011-11-17 08:02:47.000000000 +0100
++++ new/bin/vznetaddbr.in 2011-11-17 08:05:45.000000000 +0100
+@@ -2,7 +2,7 @@
+ #
+ # Add virtual network interfaces (veth's) in a container to a bridge on CT0
+
+-CONFIGFILE=@PKGCONFDIR@/conf/$VEID.conf
++CONFIGFILE=@VPSCONFDIR@/$VEID.conf
+ . $CONFIGFILE
+
+ NETIFLIST=$(printf %s "$NETIF" |tr ';' '\n')
+Index: new/bin/vzmigrate.in
+===================================================================
+--- new.orig/bin/vzmigrate.in 2011-11-17 08:02:47.000000000 +0100
++++ new/bin/vzmigrate.in 2011-11-17 08:05:45.000000000 +0100
+@@ -31,7 +31,7 @@
+ remove_area=1
+ keep_dst=0
+ debug=0
+-confdir="@PKGCONFDIR@/conf"
++confdir="@VPSCONFDIR@"
+ vzconf="@PKGCONFDIR@/vz.conf"
+ tmpdir="/var/tmp"
+ act_scripts=
+Index: new/etc/init.d/vz-redhat.in
+===================================================================
+--- new.orig/etc/init.d/vz-redhat.in 2011-11-17 08:06:26.000000000 +0100
++++ new/etc/init.d/vz-redhat.in 2011-11-17 08:07:06.000000000 +0100
+@@ -41,7 +41,7 @@
+ . @VZLIBDIR@/initd-functions
+
+ VZQUOTA=@SBINDIR@/vzquota
+-CONFIG_DIR=@PKGCONFDIR@/conf
++CONFIG_DIR=@VPSCONFDIR@
+ LOCKFILE=$VARLOCK/vz_lock
+ SUBSYS_VZ=$VARLOCK/vz
+ VESTAT=/proc/vz/vestat
+++ /dev/null
-Index: new/bin/vznetaddbr.in
-===================================================================
---- new.orig/bin/vznetaddbr.in 2011-10-05 09:03:07.000000000 +0200
-+++ new/bin/vznetaddbr.in 2011-10-05 09:04:15.000000000 +0200
-@@ -2,7 +2,7 @@
- #
- # Add virtual network interfaces (veth's) in a container to a bridge on CT0
-
--CONFIGFILE=@PKGCONFDIR@/conf/$VEID.conf
-+CONFIGFILE=@VPSCONFDIR@/$VEID.conf
- . $CONFIGFILE
-
- NETIFLIST=$(printf %s "$NETIF" |tr ';' '\n')
--- /dev/null
+Index: new/src/lib/destroy.c
+===================================================================
+--- new.orig/src/lib/destroy.c 2011-11-17 09:23:13.000000000 +0100
++++ new/src/lib/destroy.c 2011-11-17 09:35:20.000000000 +0100
+@@ -295,7 +295,7 @@
+ logger(0, 0, "Destroying container private area: %s", fs->private);
+ if ((ret = vps_destroy_dir(veid, fs->private)))
+ return ret;
+- move_config(veid, BACKUP);
++ move_config(veid, DESTR_ALL);
+ if (rmdir(fs->root) < 0)
+ logger(-1, errno, "Warning: failed to remove %s", fs->root);
+ logger(0, 0, "Container private area was destroyed");
+Index: new/include/util.h
+===================================================================
+--- new.orig/include/util.h 2011-11-17 09:32:06.000000000 +0100
++++ new/include/util.h 2011-11-17 09:35:31.000000000 +0100
+@@ -25,6 +25,7 @@
+
+ #define BACKUP 0
+ #define DESTR 1
++#define DESTR_ALL 2
+
+ #define PROCMEM "/proc/meminfo"
+ #define PROCTHR "/proc/sys/kernel/threads-max"
+Index: new/src/lib/util.c
+===================================================================
+--- new.orig/src/lib/util.c 2011-11-17 09:36:31.000000000 +0100
++++ new/src/lib/util.c 2011-11-17 09:38:57.000000000 +0100
+@@ -558,7 +558,14 @@
+
+ snprintf(conf, sizeof(conf), VPS_CONF_DIR "%d.%s", veid, prefix);
+ snprintf(newconf, sizeof(newconf), "%s." DESTR_PREFIX, conf);
+- action == BACKUP ? rename(conf, newconf) : unlink(newconf);
++ if (action == BACKUP) {
++ rename(conf, newconf);
++ } else if (action == DESTR_ALL) {
++ unlink(conf);
++ unlink(newconf);
++ } else if (action == DESTR) {
++ unlink(newconf);
++ }
+ }
+
+ /* Renames or removes CT config and various CT scripts.
fix-default-template.diff
fix-udev-path.diff
fix-config-path.diff
-fix-vznetaddbr-conf-path.diff
+no-backup-on-destroy.diff
rm -rf $(CURDIR)/debian/vzctl/etc/pve/openvz
rmdir $(CURDIR)/debian/vzctl/etc/pve
+ # remove files in /etc/vz/conf (symlink to /etc/pve/openvz)
+ rm -rf $(CURDIR)/debian/vzctl/etc/vz/conf
+ # we create the symlink to /etc/pve/openvz inside the preinst script
+
+
# Build architecture-independent files here.
binary-indep: build install
rm -f "/etc/network/if-up.d/vzifup-post"
fi
+ # move old config out of the way - newer version
+ # use a symlink to /etc/pve/openvz
+ if [ ! -L "/etc/vz/conf" ]; then
+ if [ -e "/etc/vz/conf.org" ]; then
+ echo "unable to backup existing configuration"
+ exit 1
+ fi
+ mv /etc/vz/conf /etc/vz/conf.org
+ ln -s /etc/pve/openvz /etc/vz/conf
+ fi
+
# compability mode /var/lib/vz -> /vz
# ln -sT /var/lib/vz vz 2>/dev/null || true
# echo "Add a link from /var/lib/vz to /vz/"