Hello.
I would like to know how other repositories than the official ones for CentOS 4 affect an update of a package if a package is present in both repositories. Will yum install the package that it finds having the highest version number ? and if so, is there a mean to tell yum that we would like to keep the preference to one repository instead of the highest version number on a possibly other repository ?
I ask that because I realise that having multiple repositories added to yum might mix up things if the packages placed there are compiled for newer versions, and even possibly create another system than CentOS by updating several main common packages. That would do something between a CentOS and a cAos distribution, is that right ?
For example, I would like to use Dag Wieers' repos, but I am in fear that some mix up might happen if there are several same packages with different versions than the official CentOS ones (and is it possible to have same packages there? ).
Thanks.
Regards, Daniel
On Mon, 2005-11-07 at 00:14 +0100, dan1 wrote:
Hello.
I would like to know how other repositories than the official ones for CentOS 4 affect an update of a package if a package is present in both repositories. Will yum install the package that it finds having the highest version number ? and if so, is there a mean to tell yum that we would like to keep the preference to one repository instead of the highest version number on a possibly other repository ?
I ask that because I realise that having multiple repositories added to yum might mix up things if the packages placed there are compiled for newer versions, and even possibly create another system than CentOS by updating several main common packages. That would do something between a CentOS and a cAos distribution, is that right ?
Yes, if you have a newer version in a repository and you add that full repo, the newest version will get installed.
But with yum > 2.2.x there is a feature called "includepkgs="
For example, I would like to use Dag Wieers' repos, but I am in fear that some mix up might happen if there are several same packages with different versions than the official CentOS ones (and is it possible to have same packages there? ).
With "includepkgs=" you can make an entry like this in the definition for the Dag repo:
includepkgs=rsync iptraf
It would then only look at rsync and iptraf from dags repo
See this link for an in depth review of yum:
On Mon, 2005-11-07 at 00:14 +0100, dan1 wrote:
Hello.
I would like to know how other repositories than the official ones for CentOS 4 affect an update of a package if a package is present in both repositories. Will yum install the package that it finds having the highest version number ? and if so, is there a mean to tell yum that we would like to keep the preference to one repository instead of the highest version number on a possibly other repository ?
I ask that because I realise that having multiple repositories added to yum might mix up things if the packages placed there are compiled for newer versions, and even possibly create another system than CentOS by updating several main common packages. That would do something between a CentOS and a cAos distribution, is that right ?
Yes, if you have a newer version in a repository and you add that full repo, the newest version will get installed.
But with yum > 2.2.x there is a feature called "includepkgs="
For example, I would like to use Dag Wieers' repos, but I am in fear that some mix up might happen if there are several same packages with different versions than the official CentOS ones (and is it possible to have same packages there? ).
With "includepkgs=" you can make an entry like this in the definition for the Dag repo:
includepkgs=rsync iptraf
It would then only look at rsync and iptraf from dags repo
See this link for an in depth review of yum:
Hello, Johnny.
Thank you for that useful information. Do you know if there is a list of packages that are the same that the official ones on the Dag repo, so that I might put them in the 'exclude' list on the official repo ?
My goal is to take all packages by default from the official centOS repositories, but all other packages that are not present there but present in Dag wieers' repo should be accessible and updatable. Isn't there a way to tell that to yum with a simple command, so that if Dag is adding a package which is already present in the official repo it would not be updated from there but still from the official centos repo? With the 'includepkgs' method we should list all packages that are not present in the official repo and also as soon as Dag adds a new package it would not be accessible apart if we periodically update a list that we must create ourselves and that would be not a clean solution. Is my assumption correct ? If yes, then a tag like 'pkgsauthority=yes' in the repository options could do the trick. That would tell yum that it must take all packages it can find in that repo as the official ones, even if there is another in some other repo with a higher version. However, any package not listed here but present in another one would be used there for update or install.
In my example, I would place that tag in the centos repositories. That way, we could really ensure that we have a clean, not modified, official CentOS distribution server running, and all very useful Dag's packages would still be available. My concern is that with any other repository, people would place there the same packages and that this particular version of the package would break up something. This is to avoid having a cAos like system and still keep the versionning from RHEL safely.
What do you think ?
Regards, Daniel
On Mon, 2005-11-07 at 11:56 +0100, dan1 wrote:
On Mon, 2005-11-07 at 00:14 +0100, dan1 wrote:
Hello.
I would like to know how other repositories than the official ones for CentOS 4 affect an update of a package if a package is present in both repositories. Will yum install the package that it finds having the highest version number ? and if so, is there a mean to tell yum that we would like to keep the preference to one repository instead of the highest version number on a possibly other repository ?
I ask that because I realise that having multiple repositories added to yum might mix up things if the packages placed there are compiled for newer versions, and even possibly create another system than CentOS by updating several main common packages. That would do something between a CentOS and a cAos distribution, is that right ?
Yes, if you have a newer version in a repository and you add that full repo, the newest version will get installed.
But with yum > 2.2.x there is a feature called "includepkgs="
For example, I would like to use Dag Wieers' repos, but I am in fear that some mix up might happen if there are several same packages with different versions than the official CentOS ones (and is it possible to have same packages there? ).
With "includepkgs=" you can make an entry like this in the definition for the Dag repo:
includepkgs=rsync iptraf
It would then only look at rsync and iptraf from dags repo
See this link for an in depth review of yum:
Hello, Johnny.
Thank you for that useful information. Do you know if there is a list of packages that are the same that the official ones on the Dag repo, so that I might put them in the 'exclude' list on the official repo ?
My goal is to take all packages by default from the official centOS repositories, but all other packages that are not present there but present in Dag wieers' repo should be accessible and updatable. Isn't there a way to tell that to yum with a simple command, so that if Dag is adding a package which is already present in the official repo it would not be updated from there but still from the official centos repo? With the 'includepkgs' method we should list all packages that are not present in the official repo and also as soon as Dag adds a new package it would not be accessible apart if we periodically update a list that we must create ourselves and that would be not a clean solution. Is my assumption correct ?
That is correct. You must currently maintain a separate list.
If yes, then a tag like 'pkgsauthority=yes' in the repository options could do the trick. That would tell yum that it must take all packages it can find in that repo as the official ones, even if there is another in some other repo with a higher version. However, any package not listed here but present in another one would be used there for update or install.
That would be, in my opinion, a very good thing to have. Or something like Repo pinning. That does not exist in the default yum.
Those things would bring their own problems, because there would be items in the Dag repo (let's say "package B" that REQUIRE a newer version of "package A" (which is contained in the CentOS repo). This would cause a dependency problem if trying to install or upgrade "Package B".
In my example, I would place that tag in the centos repositories. That way, we could really ensure that we have a clean, not modified, official CentOS distribution server running, and all very useful Dag's packages would still be available. My concern is that with any other repository, people would place there the same packages and that this particular version of the package would break up something. This is to avoid having a cAos like system and still keep the versionning from RHEL safely.
What do you think ?
There is a package called yum-utils that has a plugin called protectbase.
I have not used this plugin, so I can not vouch for it's ability.
You can download the latest yum-utils .src.rpm here:
http://linux.duke.edu/projects/yum/download/yum-utils/
(currently the latest one is yum-utils-0.3.1-1.src.rpm)
Then if you have the packages necessary to build packages installed, you can rebuild RPMS you can issue the command:
rpmbuild --rebuild yum-utils-0.3.1-1.src.rpm
I am not currently maintaining yum-utils for centos, but you can download the latest RPM (rather than building it yourself) from me here:
http://centos.hughesjr.com/testing/RPMS/yum-utils-0.3.1-1.noarch.rpm
and install it via the command:
yum install yum-utils-0.3.1-1.src.rpm
------------------------- After it is installed, it seems that you must make some directories at
/etc/yum/pluginconf.d/
and
/usr/lib/yum-plugins
The you need to edit the file /etc/yum.conf and add the following line:
plugins=1
------------------------------------
Then copy the file:
/usr/share/doc/yum-utils-0.3.1/plugins/protectbase/protectbase.conf
to
/etc/yum/pluginconf.d/
-------------------------------- and then copy the file:
/usr/share/doc/yum-utils-0.3.1/plugins/protectbase/protectbase.py
to
/usr/lib/yum-plugins -------------------------------
Once these files are in place, you would add the following to each repo that you want to protect:
protect=1
(I would recommend in [base], [updates], [extras], [addons] sections of /etc/yum.repos.d/CentOS-Base.repo)
------------------------------
The way I read the info on the plugin, that should mean that DAG (or other repos) can not update the protected ones.
This seems to work OK for me when using the dag repo in my setup and the protectbase plugin, I have no idea how well it works for other people.
--- Johnny Hughes
On Mon, 2005-11-07 at 06:57 -0600, Johnny Hughes wrote: [snip]
I am not currently maintaining yum-utils for centos, but you can download the latest RPM (rather than building it yourself) from me here:
http://centos.hughesjr.com/testing/RPMS/yum-utils-0.3.1-1.noarch.rpm
and install it via the command:
yum install yum-utils-0.3.1-1.src.rpm
oops .. ^^^^^^^^^^^^^^^^^^^^^^^^^ <--that should be:
yum install yum-utils-0.3.1-1.noarch.rpm
Hi, Johnny.
Thank you for that 'protect' tag explanation that seems to do exactly what I wanted.
That would be, in my opinion, a very good thing to have. Or something like Repo pinning. That does not exist in the default yum.
Those things would bring their own problems, because there would be items in the Dag repo (let's say "package B" that REQUIRE a newer version of "package A" (which is contained in the CentOS repo). This would cause a dependency problem if trying to install or upgrade "Package B".
Would this 'protect' tag solution also arise the same problem than described above ?
Also, does someone know where I could find a list of Dag's repo packages that are already present in the CentOS officials ? If there are only a few ones there, then it might be ok to just add them to the repos list as I am doing now already.
Is a downgrade from one higher version package to a current CentOS package something doable? I am a bit affraid to do something like that and don't know how I would do it (it might influence other packages as well..)
Best regards, Daniel
On Monday 07 November 2005 05:56, dan1 wrote:
My concern is that with any other repository, people would place there the same packages and that this particular version of the package would break up something. This is to avoid having a cAos like system and still keep the versionning from RHEL safely.
use apt and configure for apt-pinning. If your machine is not a mixed arch machine (x86 64 bits) then can be better option.
although apt-rpm is slowly dying in rpm distros.