[Users] vzpkg2

2008-09-12 Thread Kir Kolyshkin

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.
From 4d16e4280e2b9215997e1b8eaf0801aec22680ea Mon Sep 17 00:00:00 2001
From: Kir Kolyshkin [EMAIL PROTECTED]
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 [EMAIL PROTECTED]
---
 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

From 32fc918f5a4b8c6eed09d69ecede31592ea8bd5a Mon Sep 17 00:00:00 2001
From: Kir Kolyshkin [EMAIL PROTECTED]
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 [EMAIL PROTECTED]
---
 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

___
Users mailing list
Users@openvz.org
https://openvz.org/mailman/listinfo/users


Re: [Users] Re: vzpkg2

2008-09-12 Thread Robert Nelson

I did some more thinking about this, additional comments below:

Robert Nelson wrote:

Kir Kolyshkin wrote:

(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).

This is a simple change in the vzpkg.conf files.

Just to be clear, this is already supported.If you don't want to use 
pkg-cacher at all then you can modify the definition of 
YUM_CONF/YUM_REPO or APT_MIRROR/APT_SOURCES in the distribution or 
version specific vzpkg.conf.
(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.




See my response to point (b)

If you specify VZPKG_CACHE_HOST in the distribution specific vzpkg.conf 
file it will override the global setting.


If you are using pkg-cacher and want to use local repositories then you 
just modify /etc/pkg-cacher/pkg-cacher.conf to point at your local 
repositories.  This results in some files on the HN duplicating those on 
your private mirrors but that isn't any different than the old yum-cache 
directories which pkg-cacher is designed to replace.


Btw, I also used to have private mirrors on my network but I've replaced 
them with pkg-cacher.  It is much better since it only caches the files 
that are actually used.


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.




In summary, the only outstanding work item I see from these comments is 
moving the VZPKG_* settings to a separate /etc/vz/vzpkg.conf.


Do you agree?

___
Users mailing list
Users@openvz.org
https://openvz.org/mailman/listinfo/users