<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://linux-vserver.at/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://linux-vserver.at/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Verit</id>
		<title>Linux-VServer - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://linux-vserver.at/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Verit"/>
		<link rel="alternate" type="text/html" href="http://linux-vserver.at/Special:Contributions/Verit"/>
		<updated>2026-04-09T16:53:31Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.20.2</generator>

	<entry>
		<id>http://linux-vserver.at/Yum-patch</id>
		<title>Yum-patch</title>
		<link rel="alternate" type="text/html" href="http://linux-vserver.at/Yum-patch"/>
				<updated>2007-06-11T10:06:06Z</updated>
		
		<summary type="html">&lt;p&gt;Verit: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Install Patched vyum=&lt;br /&gt;
&lt;br /&gt;
== The Issue ==&lt;br /&gt;
If you are getting the following error:-&lt;br /&gt;
&lt;br /&gt;
 You are using a version of yum which is insecure and broken in chroot&lt;br /&gt;
 related operations; either apply the patches shipped in the 'contrib/'&lt;br /&gt;
 directory of util-vserver, or ask the author of yum to apply them&lt;br /&gt;
 (preferred).&lt;br /&gt;
 In the meantime, 'vyum' will continue with dirty hacks which might not&lt;br /&gt;
 work when the vserver is running and local DOS attacks are possible.&lt;br /&gt;
 Execution will continue in 5 seconds...&lt;br /&gt;
&lt;br /&gt;
== How to solve ==&lt;br /&gt;
&lt;br /&gt;
Find your Yum version&lt;br /&gt;
 yum --version&lt;br /&gt;
&lt;br /&gt;
Change directory&lt;br /&gt;
 cd /usr/src/*/SOURCES/&lt;br /&gt;
&lt;br /&gt;
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)&lt;br /&gt;
 wget http://svn.linux-vserver.org/svn/util-vserver/trunk/contrib/yum-X.X.X-chroot.patch&lt;br /&gt;
&lt;br /&gt;
Now lets create a directory to build all this&lt;br /&gt;
 cd /root&lt;br /&gt;
 mkdir yum-chroot&lt;br /&gt;
 cd yum-chroot&lt;br /&gt;
&lt;br /&gt;
Go to http://rpm.pbone.net/ and search for yum-X.X.X&lt;br /&gt;
Pick the correct version eg 32 or 64bit, etc&lt;br /&gt;
Then click the SOURCE file (important, don’t go to the RPM's)&lt;br /&gt;
Select the right option from the list (eg. Centos or Redhat)&lt;br /&gt;
Then pick a mirror (replace X.X.X with your yum version)&lt;br /&gt;
 wget ftp://ftp.nluug.nl/pub/os/Linux/distr/CentOS/5.0/os/SRPMS/yum-X.X.X-1.el5.centos.2.src.rpm&lt;br /&gt;
 rpm -i yum-X.X.X-1.el5.centos.2.src.rpm&lt;br /&gt;
&lt;br /&gt;
Now we will have 'yum.spc' file to modify, move it to our working directory&lt;br /&gt;
 cp /usr/src/*/SPECS/yum.spec .&lt;br /&gt;
&lt;br /&gt;
Edit the yum.spec file and find Patch lines as below (yours may be different):-&lt;br /&gt;
 Patch1: yum.conf.centos&lt;br /&gt;
 Patch2: yum-fix-install.patch&lt;br /&gt;
And add another patch line after last Patch eg.&lt;br /&gt;
 Patch1: yum.conf.centos&lt;br /&gt;
 Patch2: yum-fix-install.patch&lt;br /&gt;
 Patch3: yum-X.X.X-chroot.patch  (replace X with version)&lt;br /&gt;
Then find:-&lt;br /&gt;
 %patch1 -p1&lt;br /&gt;
 %patch2 -p1&lt;br /&gt;
And add another line with the same number you added above:-&lt;br /&gt;
 %patch1 -p1&lt;br /&gt;
 %patch2 -p1&lt;br /&gt;
 %patch3 -p1&lt;br /&gt;
Save and exit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now the build&lt;br /&gt;
 rpmbuild -ba yum.spec&lt;br /&gt;
&lt;br /&gt;
Now update yum to our patched version&lt;br /&gt;
 rpm -U /usr/src/*/RPMS/noarch/yum-*&lt;br /&gt;
&lt;br /&gt;
vyum should now be patched, to test&lt;br /&gt;
 vyum &amp;lt;vserver_name&amp;gt; -- update&lt;/div&gt;</summary>
		<author><name>Verit</name></author>	</entry>

	</feed>