Koozali.org: home of the SME Server

Contribs.org Forums => General Discussion => Topic started by: mmccarn on October 23, 2011, 06:08:35 PM

Title: Custom Yum repository configuration suggestion
Post by: mmccarn on October 23, 2011, 06:08:35 PM
I've always had trouble keeping clear records of what custom software I have installed from what yum repository, leaving me sometimes in trouble managing my updates.

I was recently (http://forums.contribs.org/index.php/topic,47978.msg237661.html#msg237661) working on a problem involving a custom repo, and got the following suggestion:
Instead of listing what you exclude, it might be better to use:

IncludePkgs pcre
...so you don't inadvertently install something else from that repo

and

status enabled
...so you get notified of updates/fixes.
This solution solves the problem of keeping my custom software updated, but makes it hard to install anything else from the same repo, as there is no command-line option for yum to ignore the 'IncludePkgs' directive.

This started me thinking about what it would take to both allow future installs and provide automatic update notifications for packages installed from custom repos.

I've come up with a proposed solution:
Under this scenario, we would edit the repo setup instructions for all repos.  As an example, the instructions to setup the dag repository on SME 8b6 would look like this:
Code: [Select]
/sbin/e-smith/db yum_repositories set dag repository \
Name 'Dag - EL5' \
BaseURL 'http://apt.sw.be/redhat/el5/en/$basearch/dag' \
EnableGroups no \
GPGCheck yes \
GPGKey http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt \
Visible no \
Exclude freetype,htop,iptraf,rsync,syslinux \
status disabled

/sbin/e-smith/db yum_repositories set dag-installed repository \
Name 'Dag - EL5 - Installed Packages' \
BaseURL 'http://apt.sw.be/redhat/el5/en/$basearch/dag' \
EnableGroups no \
GPGCheck yes \
GPGKey http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt \
Visible no \
Exclude freetype,htop,iptraf,rsync,syslinux \
IncludePkgs '-none-' \
status enabled

And wiki pages instructing users to install software from a custom repo would include instructions on updating the setting for 'IncludePkgs' for <repo>-installed:
Code: [Select]
db yum_repositories setprop dag-installed IncludePkgs "`db yum_repositories getprop dag-installed IncludePkgs` <newpkg>"
Pros:Cons:
Comments?
Title: Re: Custom Yum repository configuration suggestion
Post by: gregswallow on October 24, 2011, 10:18:49 AM
Have a repo named 'smecontribs-dag'  and set IncludePkgs pcre and status enabled.  There is no way to install anything but pcre from that repo configured like that.  This is what I would do for any contribs you have locally that are not in the smecontribs repository.

Have another repo named 'dag' and have it disabled.  Exclude any rpms that SME customizes if you want to be a bit safer, but you should know never to do yum --enablerepo=* update anyways....  That repo should just be used to test what rpms a new contrib needed, something like "yum --enablerepo=dag localinstall smeserver-xxx".

PS - I don't think you can have Exclude and IncludePkgs settings in the same repo.
Title: Re: Custom Yum repository configuration suggestion
Post by: mmccarn on October 24, 2011, 12:42:43 PM
I like 'smecontribs-<reponame>', and you're right - 'Exclude' has no effect if 'IncludePkgs' is set.

My question is really about whether I should update the 'Repository' category page (and all of the repo pages, and possibly the repo template, and the 'howto' and 'contrib' pages that mention '--enablerepo=...') with this suggestion?
Title: Re: Custom Yum repository configuration suggestion
Post by: gregswallow on October 24, 2011, 09:57:48 PM
My question is really about whether I should update the 'Repository' category page (and all of the repo pages, and possibly the repo template, and the 'howto' and 'contrib' pages that mention '--enablerepo=...') with this suggestion?

I don't think so.  It's not how we want development to go.  Contribs should go in smecontribs CVS and be built on the build server and their depedencies from 3rd part repo's added to the smecontribs repository as well.  This is a good thing to do for your own personal use though

I suggested some reorganization of the Contrib category of the wiki - http://bugs.contribs.org/show_bug.cgi?id=6749 - So this would not be relevant for contribs (proper contribs that are in CVS and the smecontribs repo and have a component in the bug tracker), as their dependencies can also be put in the smecontribs repo.  As you can see in bug http://bugs.contribs.org/show_bug.cgi?id=6759#c10 as of very recently all the corresponding EL5/SME8 dependancies are in smecontribs for all but a couple of the SME7 smecontribs smesercer-xxx rpms.