[Users] Re: vzpkg2

Robert Nelson robertn at the-nelsons.org
Sat Sep 13 18:09:42 EDT 2008


Kir Kolyshkin wrote:
> Robert Nelson wrote:
>> Kir Kolyshkin wrote:
>>> 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.
>>>
>>
>> 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.
> I checked with vzctl-3.0.20 and 3.0.22 -- official built RPMs from 
> download.openvz.org.
>
> 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.
>
> Which vzctl do you have, where you got it from? Maybe Debian build?

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 http://download.openvz.org/debian-syst and it 
doesn't use /usr/lib64.

Anyways, it is a simple enough to test for /usr/lib64/vzctl/scripts first.

>>
>>>
>>> 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.
>>>
>>
>> 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.
> 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).
>
> UPDATE: here it is -- 
> https://fedoraproject.org/wiki/Packaging/DistTag. Basically, setting 
> this makes it easier to become a part of Fedora.
>>

    Purpose of the Dist Tag

There are several uses for a |%{dist}| 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, |%{dist}| does double duty:

    * it differentiates multiple packages which would otherwise have the
      same |%{name}-%{version}-%{release}|, but very different
      dependencies.

    * it allows for a conditional check in the spec to deal with the
      differing dependencies.


      Do I Have To Use the Dist Tag?

No. It is documented and standardized so that maintainers who wish to 
use it can do so, but it is not mandatory.


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.


>>>
>>> 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.
>>
>> 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.
>
> Is there some list of mirrors available? I mean, if I run say 
> debootstrap I do not have to configure anything.

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.

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.


>>
>>> (b) vz.conf man page belongs to vzctl, while this parameter belongs 
>>> to vzpkg. It's a bit unnatural.
>> 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.
>>
>> 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.
>>
>>> (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.
>>
>>> (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)
>>
>>> 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 --------------
An HTML attachment was scrubbed...
URL: http://openvz.org/pipermail/users/attachments/20080913/6b6a9668/attachment.html


More information about the Users mailing list