OpenVZ Forum


Home » Mailing lists » Users » Patch to turn a centos-4 metadata into a centos-5 version
Patch to turn a centos-4 metadata into a centos-5 version [message #25425] Mon, 24 December 2007 11:46 Go to next message
Chris Turan is currently offline  Chris Turan
Messages: 6
Registered: December 2007
Junior Member
I've recently put together this patch to convert a vanilla centos-4 
metadata into one for centos-5.  Template works flawlessly for me.

Instructions to apply the patch:
1) wget 
http://download.openvz.org/template/metadata/centos-4/src/vztmpl-centos-4.src.tar.bz2
2) tar xvjf vztmpl-centos-4.src.tar.bz2
3) cd centos-4
4) patch -p1 < /path/to/attached/centos-5-metadata.diff
5) yum install createrepo
6) make clean
7) make rpms

If your arch is i386, the metadata rpm should now be located in:
/usr/src/redhat/RPMS/i386/vztmpl-centos-5-2.0-2.i386.rpm


Notes:
- "kernel = 2.6.18" is needed to fix the "Error: initscripts conflicts 
with kernel < 2.6.12"
- udevd must be disabled when the vps starts up


I'd very much be interested in seeing this become an official metadata 
template on openvz.org.  I'd like to get centos-5 out of the user 
contrib area.

-Chris

[Updated on: Mon, 24 December 2007 13:41] by Moderator

Report message to a moderator

Re: Patch to turn a centos-4 metadata into a centos-5 version [message #25427 is a reply to message #25425] Mon, 24 December 2007 13:14 Go to previous messageGo to next message
khorenko is currently offline  khorenko
Messages: 533
Registered: January 2006
Location: Moscow, Russia
Senior Member
Hello Chris,

sorry, and could you please post the patch itself? Smile

--
Konstantin.


Update:
Sorry, i forgot that forum strips some attachments. Found it, thank you.


If your problem is solved - please, report it!
It's even more important than reporting the problem itself...

[Updated on: Mon, 24 December 2007 13:34]

Report message to a moderator

Re: Patch to turn a centos-4 metadata into a centos-5 version [message #25655 is a reply to message #25425] Sun, 06 January 2008 04:39 Go to previous messageGo to next message
Chris Turan is currently offline  Chris Turan
Messages: 6
Registered: December 2007
Junior Member
Has anyone had any luck with template I provided earlier?  A copy of my 
earlier e-mail is below.

-Chris

Chris Turan wrote:
> I've recently put together this patch to convert a vanilla centos-4 
> metadata into one for centos-5.  Template works flawlessly for me.
> 
> Instructions to apply the patch:
> 1) wget 
> http://download.openvz.org/template/metadata/centos-4/src/vztmpl-centos-4.src.tar.bz2 
> 
> 2) tar xvjf vztmpl-centos-4.src.tar.bz2
> 3) cd centos-4
> 4) patch -p1 < /path/to/attached/centos-5-metadata.diff
> 5) yum install createrepo
> 6) make clean
> 7) make rpms
> 
> If your arch is i386, the metadata rpm should now be located in:
> /usr/src/redhat/RPMS/i386/vztmpl-centos-5-2.0-2.i386.rpm
> 
> 
> Notes:
> - "kernel = 2.6.18" is needed to fix the "Error: initscripts conflicts 
> with kernel < 2.6.12"
> - udevd must be disabled when the vps starts up
> 
> 
> I'd very much be interested in seeing this become an official metadata 
> template on openvz.org.  I'd like to get centos-5 out of the user 
> contrib area.
> 
> -Chris
Re: Patch to turn a centos-4 metadata into a centos-5 version [message #25729 is a reply to message #25425] Tue, 08 January 2008 10:12 Go to previous messageGo to next message
Chris Turan is currently offline  Chris Turan
Messages: 6
Registered: December 2007
Junior Member
This is an updated version of my previous diff.  I missed documenting
a step in the first version.  This caused an error in the build process.

A binary and the diff are provided at:
	http://www.neonhost.com/openvz/

This patch to convert a vanilla centos-4 metadata into one for centos-5.

Instructions to apply the patch:
1. mkdir /tmp/openvz
2. cd /tmp/openvz
3. wget 
http://download.openvz.org/template/metadata/centos-4/src/vztmpl-centos-4.src.tar.bz2
4. wget http://www.neonhost.com/openvz/centos-5-metadata-v2.diff
5. tar xvjf vztmpl-centos-4.src.tar.bz2
6. mv centos-4 centos-5
7. cd centos-5
8. patch -p1 < ../centos-5-metadata-v2.diff
9. yum install createrepo
10. make clean
11. make rpms

If your arch is i386, the metadata rpm should now be located in:
/usr/src/redhat/RPMS/i386/vztmpl-centos-5-2.0-2.i386.rpm


Notes:
- "kernel = 2.6.18" is needed to fix the "Error: initscripts conflicts 
with kernel < 2.6.12"
- udevd must be disabled when the vps starts up

I'd very much be interested in seeing this become an official
metadata template on openvz.org.  I'd like to get centos-5 out of the
user contrib area.
Re: Re: Patch to turn a centos-4 metadata into a centos-5 version [message #25868 is a reply to message #25729] Thu, 10 January 2008 00:38 Go to previous messageGo to next message
rmello is currently offline  rmello
Messages: 15
Registered: October 2007
Junior Member
I don't know much about templates, but I'd like to create a new VE
with CentOS 5.

Would you be so kind as to guide me to the appropriate documentation
that tells me what to do with your patch so I can accomplish that
goal?

Thanks in advance,

Roberto

On Jan 8, 2008 3:12 AM, Chris Turan <lists@christuran.com> wrote:
> This is an updated version of my previous diff.  I missed documenting
> a step in the first version.  This caused an error in the build process.
>
> A binary and the diff are provided at:
>         http://www.neonhost.com/openvz/
>
> This patch to convert a vanilla centos-4 metadata into one for centos-5.
Re: Re: Patch to turn a centos-4 metadata into a centos-5 version [message #25870 is a reply to message #25868] Thu, 10 January 2008 00:58 Go to previous messageGo to next message
Chris Turan is currently offline  Chris Turan
Messages: 6
Registered: December 2007
Junior Member
Roberto Mello wrote:
> I don't know much about templates, but I'd like to create a new VE
> with CentOS 5.
> 
> Would you be so kind as to guide me to the appropriate documentation
> that tells me what to do with your patch so I can accomplish that
> goal?

Hi Roberto,

You can either do one of the following:

1) Download the pre-built metadata rpm I created from
	http://www.neonhost.com/openvz/vztmpl-centos-5-2.0-2.i386.rpm

- or -

2) Create the metadata rpm using the patch I provided.  Follow the 
instructions at http://www.neonhost.com/openvz/  Copy and paste every 
line from those numbered steps.


Afterwards, you'll have to install the template on your host system, run 
vzpkgcache, and run vzctl create but there already some very good 
documentation on the openvz.org website.  The OpenVZ User's Manual is a 
good place to start.

-Chris
Re: Patch to turn a centos-4 metadata into a centos-5 version [message #25962 is a reply to message #25425] Sat, 12 January 2008 14:59 Go to previous messageGo to next message
bcomisky is currently offline  bcomisky
Messages: 1
Registered: January 2008
Junior Member
Chris Turan wrote:
> This is an updated version of my previous diff.  I missed documenting
> a step in the first version.  This caused an error in the build process.
>
> A binary and the diff are provided at:
>         http://www.neonhost.com/openvz/
>
[ snip ]
> I'd very much be interested in seeing this become an official
> metadata template on openvz.org.  I'd like to get centos-5 out of the
> user contrib area.

Chris,

FYI your patch worked great for me on x86_64.

After following your instructions, I used the instructions at the link
below to get vzpkgcache working for Centos5 x86_64 (I'm assuming they
are still required for x86_64):

http://http://wiki.openvz.org/Install_OpenVZ_on_a_x86_64_system_Centos-Fedora

I had to make one additional change (replacing vzrpm44 shared library
below) not documented on this page because I was getting a "wrong ELF
class: ELFCLASS32" error:
cp /usr/lib64/python2.4/site-packages/rpm/_rpmmodule.so
/usr/share/vzpkgtools/vzrpm44/lib/python2.4/site-packages/rpm

I had already removed a related vzrpm43 library as per the
instructions mentioned above:
rm /usr/share/vzpkgtools/vzrpm43/lib/python2.4/site-packages/rpmmodule.so

thanks for the patch to get me started!
Bill

-- 
Bill Comisky
bcomisky@pobox.com
Re: Re: Patch to turn a centos-4 metadata into a centos-5 version [message #26028 is a reply to message #25962] Mon, 14 January 2008 16:08 Go to previous messageGo to next message
Chris Turan is currently offline  Chris Turan
Messages: 6
Registered: December 2007
Junior Member
Bill Comisky wrote:
> FYI your patch worked great for me on x86_64.

Excellent!  I have not had the opportunity to try it out on a x86_64 
system yet.  My own openvz systems are i386.

> After following your instructions, I used the instructions at the link
> below to get vzpkgcache working for Centos5 x86_64 (I'm assuming they
> are still required for x86_64):

Yes, that is a known issue.  I'm not sure of the specifics of why vzrpm 
can't use a common repository but the workaround is to do it on a per-ve 
basis. Not sure what they estimated fix time for the issue is either.

> thanks for the patch to get me started!

Keep us/me posted.  Would definitely like to hear some feedback.  If you 
have patches for it on an x86_64 system, would you send them my way?

-Chris
Re: Re: Patch to turn a centos-4 metadata into a centos-5 version [message #26029 is a reply to message #25870] Mon, 14 January 2008 16:30 Go to previous message
rmello is currently offline  rmello
Messages: 15
Registered: October 2007
Junior Member
On Jan 9, 2008 5:58 PM, Chris Turan <lists@christuran.com> wrote:
>
> Afterwards, you'll have to install the template on your host system, run
> vzpkgcache, and run vzctl create but there already some very good

Running vzpkgcache was the missing bit of information for me. Thanks a
lot for the patch. Worked great for me!

-Roberto
Previous Topic: Debuginfo-package for kernel-ovz
Next Topic: time wait bucket table overflow
Goto Forum:
  


Current Time: Sat Dec 07 15:37:27 GMT 2024

Total time taken to generate the page: 0.04108 seconds