[Users] vzpkg2
Kir Kolyshkin
kir at openvz.org
Fri Sep 12 14:22:01 EDT 2008
Hi Robert,
I'm trying to play with vzpkg2. Here are some random problems I found so
far.
1. I am trying to install the beast on Fedora 7 x86_64 system. This is
what I see:
/usr/share/vzpkg2/cache-os: line 164: /usr/lib/vzctl/scripts/vps-create:
No such file or directory
The thing is vps-create is located in /usr/lib64/vzctl/scrpts on an x64
box (vzctl-lib-3.0.22-1.x86_64.rpm). This was never a problem because
vzpkg didn't work on x86_64. Now this needs to be fixed, I guess the
workaround is to check lib64 first and use it if available. Patch
(0001-*) is attached.
2. In git commit 2fdcbfc56b4d823ff085e80ec79828f67b5de5a9 you have added
%{dist} to the value of Release: field of vzpkg.spec. This is a good
thing, since it makes .spec file to be more Fedora-packaging-guidelines
compatible. Then in commit 0fe151bd07301c78c85a319d683c3e7fd9117f38 you
are removing it.
The proper way is to put %{?dist} so if it's not set then it will expand
to empty string. Patch (0002-*) is attached.
3. There are a few problems with setting VZPKG_CACHE_HOST in /etc/vz/vz.conf
(a) From my POV, vzpkg should work (maybe suboptimal and inefficient,
but it should) without any additional settings. Now it's not so -- you
have to specify VZPKG_CACHE_HOST manually. It should be optional.
(b) vz.conf man page belongs to vzctl, while this parameter belongs to
vzpkg. It's a bit unnatural.
(c) Protocol (http://) is explicitly prepended to a value of
VZPKG_CACHE_HOST. This makes it impossible to use anything other than
http:// (i.e. ftp://, file://, whatever).
(d) This is a global parameter, which means it's not possible to have a
per-distro cache/repo in different places. This is the case for me --
there are repo mirrors of pretty much every distro in my LAN, but they
are not on the same server.
Not really sure what do to about that -- just started to looking and...
here comes the weekend :)
This is it so far; will continue next week.
-------------- next part --------------
From 4d16e4280e2b9215997e1b8eaf0801aec22680ea Mon Sep 17 00:00:00 2001
From: Kir Kolyshkin <kir at openvz.org>
Date: Fri, 12 Sep 2008 18:19:48 +0400
Subject: [PATCH] functions: find the proper VZLIB_SCRIPTDIR
Fix for the following problem:
> /usr/share/vzpkg2/cache-os: line 164:
> /usr/lib/vzctl/scripts/vps-create: No such file or directory
The thing is vps-create is located in /usr/lib64/vzctl/scrpts on an amd64 box
(checked on vzctl-lib-3.0.22-1.x86_64.rpm). So check for this path first and
use it if available.
Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
functions | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/functions b/functions
index 04e8261..04527f3 100644
--- a/functions
+++ b/functions
@@ -19,7 +19,11 @@ VECFGDIR_OLD=/etc/sysconfig/vz-scripts
VZCFG_OLD=/etc/sysconfig/vz
VECFGDIR=/etc/vz/conf
VZCFG=/etc/vz/vz.conf
-VZLIB_SCRIPTDIR=/usr/lib/vzctl/scripts
+if test -d /usr/lib64/vzctl/scripts; then
+ VZLIB_SCRIPTDIR=/usr/lib64/vzctl/scripts
+else
+ VZLIB_SCRIPTDIR=/usr/lib/vzctl/scripts
+fi
ARCHES="i386 i586 i686 amd64 x86_64 ia64 x86"
# check that configs are in right place - use old values otherwise
--
1.5.5.1
-------------- next part --------------
From 32fc918f5a4b8c6eed09d69ecede31592ea8bd5a Mon Sep 17 00:00:00 2001
From: Kir Kolyshkin <kir at openvz.org>
Date: Fri, 12 Sep 2008 19:34:06 +0400
Subject: [PATCH] vzpkg.spec: add back %{dist} to release
In git commit 2fdcbfc56b4d823ff085e80ec79828f67b5de5a9 %{dist} was added
to the value of Release: field of vzpkg.spec. This is a good thing, since
it makes .spec file to be more Fedora-packaging-guidelines compatible.
Then in commit 0fe151bd07301c78c85a319d683c3e7fd9117f38 it was removed.
Returning it back in a proper way, i.e. %{?dist} -- which expands to empty
if dist is not set.
Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
vzpkg.spec | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/vzpkg.spec b/vzpkg.spec
index 824cc7c..e55f58a 100644
--- a/vzpkg.spec
+++ b/vzpkg.spec
@@ -1,6 +1,6 @@
Name: vzpkg2
Version: 0.9.2
-Release: 1
+Release: 1%{?dist}
Summary: OpenVZ template management tools
Source: %{name}-%{version}.tar.bz2
License: GPL
--
1.5.5.1
More information about the Users
mailing list