<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=KOI8-R" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Kir Kolyshkin wrote:
<blockquote cite="mid:48CC033D.5040404@openvz.org" type="cite">Robert
Nelson wrote:
<br>
<blockquote type="cite">Kir Kolyshkin wrote:
<br>
<blockquote type="cite">Hi Robert,
<br>
<br>
I'm trying to play with vzpkg2. Here are some random problems I found
so far.
<br>
<br>
<br>
1. I am trying to install the beast on Fedora 7 x86_64 system. This is
what I see:
<br>
<br>
/usr/share/vzpkg2/cache-os: line 164:
/usr/lib/vzctl/scripts/vps-create: No such file or directory
<br>
<br>
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.
<br>
<br>
</blockquote>
<br>
I am also testing on an x86_64 machine and vzctl/scripts is still
installed in /usr/lib.š This must be a change in the never released
version of vzctl.š I don't think this change is correct.š /usr/lib
should be for 32 bit and "Architecture-Independent" files, /usr/lib64
is for 64 bit only "Architecture Dependent" files.
<br>
</blockquote>
I checked with vzctl-3.0.20 and 3.0.22 -- official built RPMs from
download.openvz.org.
<br>
<br>
Even if it is incorrect we can fix it in future version but the problem
is people are using current versions and will use it for some time.
<br>
<br>
Which vzctl do you have, where you got it from? Maybe Debian build?
<br>
</blockquote>
<br>
I'm using version 3.0.22 and I test on both Debian and CentOS.š By
default CentOS installs both the 32 and 64 bit versions.š On Debian I'm
using the vzctl from <a class="moz-txt-link-freetext" href="http://download.openvz.org/debian-syst">http://download.openvz.org/debian-syst</a> and it
doesn't use /usr/lib64.<br>
<br>
Anyways, it is a simple enough to test for /usr/lib64/vzctl/scripts
first.<br>
<br>
<blockquote cite="mid:48CC033D.5040404@openvz.org" type="cite">
<blockquote type="cite"><br>
<blockquote type="cite"><br>
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.
<br>
<br>
The proper way is to put %{?dist} so if it's not set then it will
expand to empty string. Patch (0002-*) is attached.
<br>
<br>
</blockquote>
<br>
I know about the %(?dist), in fact I use it in the add-ons spec files.š
However vzpkg is not distribution specific and there is no reason to
build separate binary rpms for each distribution and each release of
the distribution.
<br>
</blockquote>
Still all the packages in Fedora have that suffix. I do not have time
at the moment to dig into Fedora Packaging Guidelines but AFAIK it is
required. It does no harm since it is expanded to nothing if %dist is
unset (which happened on my F9 box).
<br>
<br>
UPDATE: here it is -- <a class="moz-txt-link-freetext" href="https://fedoraproject.org/wiki/Packaging/DistTag">https://fedoraproject.org/wiki/Packaging/DistTag</a>.
Basically, setting this makes it easier to become a part of Fedora.
<br>
<blockquote type="cite"><br>
</blockquote>
</blockquote>
<br>
<h2> <span class="mw-headline"> Purpose of the Dist Tag </span></h2>
<p>There are several uses for a <code>%{dist}</code> tag. The original
purpose was so that a single spec file could be used for multiple
distribution releases. In doing this, there are cases in which
BuildRequires: and Requires: will need to be different for different
distribution releases. Hence, <code>%{dist}</code> does double duty:
</p>
<ul>
<li>it differentiates multiple packages which would otherwise have
the same <code>%{name}-%{version}-%{release}</code>, but very
different dependencies.
</li>
</ul>
<ul>
<li>it allows for a conditional check in the spec to deal with the
differing dependencies.
</li>
</ul>
<p><span id="IsItMandatory"></span>
</p>
<a name="Do_I_Have_To_Use_the_Dist_Tag.3F"></a>
<h3> <span class="mw-headline"> Do I Have To Use the Dist Tag? </span></h3>
<p>No. It is documented and standardized so that maintainers who wish
to use it can do so, but it is not mandatory.
</p>
<br>
Above is the actual text from the Guidelines.š Since vzpkg doesn't have
any dependencies it isn't version or distribution specific.š So it
isn't necessary, the guidelines also specify that it is optional.š If
it is specified then you would need to generate separate RPMs for every
distribution and every version of those distributions.š This isn't a
problem if it is being built as part of a distribution but it is when
you are building separate from a distribution.<br>
<br>
<br>
<blockquote cite="mid:48CC033D.5040404@openvz.org" type="cite">
<blockquote type="cite">
<blockquote type="cite"><br>
3. There are a few problems with setting VZPKG_CACHE_HOST in
/etc/vz/vz.conf
<br>
<br>
(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.
<br>
</blockquote>
<br>
With a bit of work I can generate default values in an install script.š
But it is really hard to figure out a default static IP address needed
to do an template update for Debian.
<br>
</blockquote>
<br>
Is there some list of mirrors available? I mean, if I run say
debootstrap I do not have to configure anything.
<br>
</blockquote>
<br>
I'm not sure how that is relevant to the issue being discussed.š The
issue I'm talking about is an IP address for the container.š This is
needed so that the container can access the network to run "apt-get
upgrade" to update the template with latest versions of the installed
packages.<br>
<br>
As far as the question about debootstrap, there is a default mirror
built into the debootstrap script.š This works for Debian, for Ubuntu
the default mirror is in the various scripts in
/usr/share/debootstrap/scripts on Debian or
/usr/lib/debootstrap/scripts on Fedora.<br>
<br>
<br>
<blockquote cite="mid:48CC033D.5040404@openvz.org" type="cite">
<blockquote type="cite"><br>
<blockquote type="cite">(b) vz.conf man page belongs to vzctl,
while this parameter belongs to vzpkg. It's a bit unnatural.
<br>
</blockquote>
I didn't find it unnatural since the vzctl package is really just the
user-mode component of OpenVZ.š The naming of the file vz.conf rather
than vzctl.conf reinforces that.
<br>
<br>
One thing I could do is create a vzpkg.conf in /etc/vz.š It could have
the global defaults, then have the template version of vzpkg.conf
override it per distribution or distribution/release.
<br>
<br>
<blockquote type="cite">(c) Protocol (<a class="moz-txt-link-freetext" href="http://">http://</a>) is explicitly
prepended to a value of VZPKG_CACHE_HOST. This makes it impossible to
use anything other than <a class="moz-txt-link-freetext" href="http://">http://</a> (i.e. <a class="moz-txt-link-freetext" href="ftp://">ftp://</a>, <a class="moz-txt-link-freetext" href="file://">file://</a>, whatever).
<br>
</blockquote>
This is a simple change in the vzpkg.conf files.
<br>
<br>
<blockquote type="cite">(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.
<br>
<br>
</blockquote>
<br>
See my response to point (b)
<br>
<br>
<blockquote type="cite">Not really sure what do to about that --
just started to looking and... here comes the weekend :)
<br>
This is it so far; will continue next week.
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
</body>
</html>