Editing
Yum-patch
(section)
From Linix VServer
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=Install Patched vyum= == The Issue == If you are getting the following error:- You are using a version of [http://en.wikipedia.org/wiki/YUM_%28software%29 yum] which is insecure and broken in chroot related operations; either apply the patches shipped in the 'contrib/' directory of util-vserver, or ask the author of yum to apply them (preferred). In the meantime, 'vyum' will continue with dirty hacks which might not work when the vserver is running and local DOS attacks are possible. Execution will continue in 5 seconds... == How to solve == Find your Yum version yum --version Change directory cd /usr/src/*/SOURCES/ Next find the correct patch at http://svn.linux-vserver.org/svn/util-vserver/trunk/contrib/ and download it (replace X.X.X with your yum version) wget http://svn.linux-vserver.org/svn/util-vserver/trunk/contrib/yum-X.X.X-chroot.patch Now lets create a directory to build all this cd /root mkdir yum-chroot cd yum-chroot Go to http://rpm.pbone.net/ and search for yum-X.X.X Pick the correct version eg 32 or 64bit, etc Then click the SOURCE file (important, donβt go to the RPM's) Select the right option from the list (eg. Centos or Redhat) Then pick a mirror (replace X.X.X with your yum version) wget ftp://ftp.nluug.nl/pub/os/Linux/distr/CentOS/5.0/os/SRPMS/yum-X.X.X-1.el5.centos.2.src.rpm rpm -i yum-X.X.X-1.el5.centos.2.src.rpm Now we will have 'yum.spc' file to modify, move it to our working directory cp /usr/src/*/SPECS/yum.spec . Edit the yum.spec file and find Patch lines as below (yours may be different):- Patch1: yum.conf.centos Patch2: yum-fix-install.patch And add another patch line after last Patch eg. Patch1: yum.conf.centos Patch2: yum-fix-install.patch Patch3: yum-X.X.X-chroot.patch (replace X with version) Then find:- %patch1 -p1 %patch2 -p1 And add another line with the same number you added above:- %patch1 -p1 %patch2 -p1 %patch3 -p1 Save and exit Now the build rpmbuild -ba yum.spec Now update yum to our patched version rpm -U /usr/src/*/RPMS/noarch/yum-* vyum should now be patched, to test vyum <vserver_name> -- update [[Category:Software under linux-vserver]]
Summary:
Please note that all contributions to Linix VServer may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Linix VServer:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Page actions
Page
Discussion
Read
Edit
History
Page actions
Page
Discussion
More
Tools
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
About
Overview
Paper
News
Developers
Donations
Search
Getting Started
Downloads
FAQs
Documentation
Support
Participate
How to participate
Report a Bug
Communicate
Teams/Projects
Hall of Fame
Resources
Archives
Recent Wiki Changes
Pastebin
Related Projects
VServer Hosting
Happy VServer Users
Tools
What links here
Related changes
Special pages
Page information