[Yum] yum/rpm group question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 26 Oct 2003, seth vidal wrote:

> On Sun, 2003-10-26 at 17:50, Robert G. Brown wrote:
> > I'm about half way through writing a perl script to create a list of
> > groups and packages that would recreate an existing install in either
> > kickstart or via yum, and I encounter my own ignorance.  To help me
> > avoid RTFM, I entreat the following Enlightenment.
> > 
> > When running yum -y -d 0 grouplist hidden groupname, one gets a results
> > such as:
> > 
> 
> from  the top of yumcomps.py:
> # goals
> # be able to list which groups a user has installed based on whether or
> # not mandatory pkgs are installed and whether all the metapkgs are installed
> # (consider making metapkgs groups with settings in this model)
> # so groups have end up being default, optional or mandatory
> # - all groups (as listed in the xml file are default only)
> # so installgroup X installs all the default+mandatory pkgs and any group
> # determine if groupreqs are included on install
>
> # is installed? - group reqs not consulted - metapkgs and pkgs in mandatory
> # install - groupreqs installed too - metapkgs in default or better
> #           and pkgs in default or better
> # update - if pkg in group installed (any class of pkg) check for update,
> #          all mandatory pkgs and metapkgs will be updated/installed if possible
> #           ???? Ask - should update recurse the pkg group list so you could run
> #           yum groupupdate "Workstation Common"
> # erase - only pkgs in group - not subgroups nor metapkgs

OK, so yum installgroup Frog would install all the mandatory+default
pkgs in group Frog as defined in comps.xml, including mandatory groups
and mandatory or default metapkgs, but ignores optional pkgs and
metapkgs (right)?  Does this mirror kickstart behavior?  Remember, my
goal is to create a list of "installed package groups" according to yum,
determine the list of the packages that are members of those groups that
would be installed by yum and/or kickstart if those groups were
installed, determine the list of "remainder" packages that would not be
installed just by installing the groups, and eventually output something
like:

%packages
@ Development Tools
@ Editors
@ GNOME Desktop Environment
@ Games and Entertainment
@ Graphical Internet
@ Graphics
@ Kernel Development
@ Office/Productivity
@ Printing Support
@ Server Configuration Tools
@ System Tools
@ Text-based Internet
@ Web Server
@ X Window System
@ KDE Desktop Environment
@ Sound and Video
@ Authoring and Publishing
amanda
amanda-server
gnuplot
krb5-workstation
krbafs-utils
postfix
sndconfig
sysstat
dhcp
tftp
tftp-server
pine
xmlsysd
wulfstat
-apmd

(for kickstart) or a very similar list for feeding yum in a loop, the
end stage of either or both of which is to achieve a system with a
precisely defined set of packages as listed by rpm -qa | sort.

I actually have the script written to the point where it generates the
yum list installed | cut -f 1 -d ' ' package names, as well as a related
list extracted from the installed package groups, but it isn't clear to
me that these correspond to what goes in on kickstart.  kickstart also
doesn't appear to list e.g. the Base group explicitly.  I'm going to be
playing with this pretty extensively very soon as I have four systems at
home I want to be able to kickstart and/or kickstart+yum install to a
standard WITHOUT having to list all the previously installed packages
(which probably wouldn't even work).

I realize that this is a nasty problem, as the groups themselves could
change in between, packages can disappear, etc.  However, focussing on
it may elicit some of the issues associated with using yum as a base for
system installation and not just maintenance/upgrade/update.

> # gist of operation of this class:
> # create the class
> # add  comps.xml type files
> # compile the groups
> # then you can perform the functions on the groups
>                                                                                                       
> # which groups are around.
> # maybe parse the files, populate the fields as much as possible then sweep
> # through and calculate things after all the .xml files have been added
> # need to deal with groupname vs groupid


> does that help? If not - go check out info on comps.xml - that should

It helps a bit, but I suspect that only experimentation will make it
really clear; probably experimentation involving re-kickstarting a
system a few dozen times until the script achieves something like
reproducibility at reconstructing the original kickstart file AND (or)
a yum loop reproduces the actual installed package list ditto.  I've
been assuming that the mandatory+default are what appears in the package
chooser section of the interactive install (with the optional entries
the unchecked packages) but the metapkg stuff is far from transparent.

The kickstart itself does the map from group+package list to package
list; alas there is no tool I've seen that does the reverse, in spite of
its obvious utility.  In fact, it would be lovely if a toolset existed
that at all times maintained a "kickstart image" of the system so that
it could always be easily reconstructed even if one adds a bunch of
packages by hand after the original install, ks or otherwise.

    rgb

> explain the grouping/package options.
> 
> -sv
> 
> 
> _______________________________________________
> Yum mailing list
> Yum@xxxxxxxxxxxxxxxxxxxx
> https://lists.dulug.duke.edu/mailman/listinfo/yum
> 

-- 
Robert G. Brown	                       http://www.phy.duke.edu/~rgb/
Duke University Dept. of Physics, Box 90305
Durham, N.C. 27708-0305
Phone: 1-919-660-2567  Fax: 919-660-2525     email:rgb@xxxxxxxxxxxx




[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux