File yum.spec of Package yum

# spec file for package yum (Version 3.2.7)
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
# Please submit bugfixes or comments via

# norootforbuild

Name:           yum
BuildRequires:  python-devel
Version:        3.2.7
Release:        1
Summary:        RPM installer/updater
Group:          System/Packages
License:        GPL v2 or later
Source:         %{name}-%{version}.tar.bz2
Source1:        %{name}.conf
Source2:        repos.tar.bz2
Patch:          %{name}-3.2.7-updatesd.patch
Patch2:         %{name}-3.1.7.patch
Patch3:         %{name}-3.2.2.patch
Patch4:         %{name}-3.2.6-epoch_workaround.patch
Patch5:         %{name}-3.2.6.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       rpm >= 4.4.0
Requires:       rpm-python
Requires:       python-urlgrabber
Requires:       yum-metadata-parser >= 1.1.0
%if %{suse_version} <= 1010
Requires:       python-elementtree
Requires:       python-xml

Yum is a utility that can check for and automatically download and
install updated RPM packages. Dependencies are obtained and downloaded
automatically prompting the user as necessary.

    Seth Vidal <>

%package updatesd
Summary:        YUM update notification daemon
Group:          Applications/System
Requires:       yum = %{version}-%{release}
Requires:       python-gobject2
PreReq:         %insserv_prereq

%description updatesd
yum-updatesd provides a daemon which checks for available updates and 
can notify you when they are available via email, syslog or dbus. 

%setup -q -b 2
%ifnarch %{ix86}
for i in rpmUtils yum
  pushd $i
  sed -e "s/lib/%{_lib}/" Makefile >
  mv Makefile


install -m 644 %{SOURCE1} $RPM_BUILD_ROOT/etc/yum/yum.conf
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/yum/pluginconf.d/ $RPM_BUILD_ROOT/usr/lib/yum-plugins/
%if %{suse_version} >= 1000 && %{suse_version} <= 1030 && %sles_version == 0
cp $RPM_BUILD_DIR/repos/%{suse_version}* $RPM_BUILD_ROOT%{_sysconfdir}/yum/repos.d
rename %{suse_version} opensuse $RPM_BUILD_ROOT%{_sysconfdir}/yum/repos.d/*.repo
%if %{suse_version} > 1030 && %sles_version == 0
cp $RPM_BUILD_DIR/repos/factory* $RPM_BUILD_ROOT%{_sysconfdir}/yum/repos.d
rename factory opensuse $RPM_BUILD_ROOT%{_sysconfdir}/yum/repos.d/*.repo

%postun updatesd
%restart_on_update yum-updatesd

%preun updatesd
%stop_on_removal yum-updatesd

# if we are upgrading from older distros the config should be moved
# to the new place
if [ -e "$OCONF" ] ; then
# in worst case we will get:
# /etc/yum/yum.conf         - the old /etc/yum.conf
# /etc/yum/yum.conf.rpmnew  - the config of the newly installed package.
# /etc/yum/yum.conf.rpmsave - the old /etc/yum/yum.conf
    if [ ! -d "$CONFD" ] ; then 
        mkdir "$CONFD"
# we dont need to handle the case that /etc/yum/yum.conf
# exists. rpm does that for us.
# it creates /etc/yum/yum.conf.rpmnew
    if [ -e "$NCONF" ] ; then
        mv "$NCONF" "$NCONFB"
        echo "warning: /etc/yum/yum.conf backed up as /etc/yum/yum.conf.rpmsave" >&2
    echo "warning: /etc/yum.conf moved to /etc/yum/yum.conf" >&2
    mv "$OCONF" "$NCONF"


%defattr(-, root, root)
%dir /var/cache/yum
%dir %{_sysconfdir}/yum
%dir %{_sysconfdir}/yum/repos.d
%dir %{_sysconfdir}/yum/pluginconf.d
%dir %{_sysconfdir}/yum
%dir /usr/lib/yum-plugins
%if %sles_version == 0 && %{suse_version} >= 1000
%config %{_sysconfdir}/yum/repos.d/*.repo
%config(noreplace) %{_sysconfdir}/yum/yum.conf
%config %{_sysconfdir}/logrotate.d/%{name}
%exclude %{_mandir}/man*/yum-updatesd*

%files updatesd
%defattr(-, root, root)
%config(noreplace) %{_sysconfdir}/yum/yum-updatesd.conf
%config %{_sysconfdir}/init.d/yum-updatesd  
%config %{_sysconfdir}/dbus-1/system.d/yum-updatesd.conf
* Thu Oct 18 2007 -
- update to version 3.2.7
  * fix transaction listing to properly display only deps as deps as opposed
  to some things which are manually done and also deps (rh#283961)
  * fix requirements moving to new packages when a package is obsoleted
  * when an obsolete is available for a package, only install most matching
  arch rather than all available arches (rh#301661)
- split of yum-updatesd package
- changed config file location from /etc/yum.conf to /etc/yum/yum.conf
* Fri Oct 12 2007 -
- fix build (there is room between 1030 and 1040)
* Thu Oct 11 2007 -
- added yum-3.2.6.patch to fix typo in
- added Recommends to yum-basearchonly
* Thu Oct 11 2007 -
- added yum-3.2.6-epoch_workaround.patch, to treat null epoch equal to zero
  epoch (#331818)
* Fri Oct 05 2007 -
- update to version 3.2.6
  * Mostly bug fixes in this version. A number of output changes which
  mostly just make it clearer whats going on when yum says things like
  'Nothing to do'.
  * also added a 'cost' option to repository and global configuration
  cost  relative  cost of accessing this repository. Useful for weighing
  one repo’s packages as greater/less than any other. defaults to
- changes in 3.2.5
  * We've fixed a good number of user-impacting bugs and cleaned up some
  medium-standing messes.
* Tue Sep 18 2007 -
- update default repos to include openSUSE 10.3
* Wed Aug 29 2007 -
- fix build
* Wed Aug 29 2007 -
- update to version 3.2.4
  * So, yum 3.2.3 had a few issues that needed some immediate addressing.
  Mostly the depsolving was still off by a couple and a few output
  situations blew up using the new transaction callbacks. But never fear,
  it, and an array of other items have been addressed in 3.2.4 :)
* Thu Aug 23 2007 -
- update to version 3.2.3
  * If you find a transaction aborted before it finished (or your computer
  went off or whatever) go to /var/lib/yum and compare the
  transaction-all.timestamp file with the transaction-done.timestamp file.
  The things remaining in transaction-all that aren't in transaction-done
  are what is left to do.
  * If you're confused by -e and -d as debug and error log levels you'll
  be happy to see --verbose and --quiet.
  * A bunch of plugins which exclude pkgs should be much faster now.
  * If there is something else holding the yum lock file, yum will wait
  and try again.
* Tue Aug 07 2007 -
- added yum-HEAD.patch
* Tue Aug 07 2007 -
- update to version 3.2.2
  * integrated installonlyn plugin functionality - new config option
  installonly_limit will remove old, non-running kernels from your system
  as you add more. It defaults to off, though.
  * we're downloading and saving mirrorlists locally, now, for a cached
  default. So you don't have to grab them each time if you run frequently.
  * implement an extra rpm transaction check at the end of the depsolving.
  This will help us catch invalid depsolving we might be doing. Defaults
  to on.
  * bunch of depsolving issues, multilib depsolving issues, unicode output
  * See the changelog for the complete list
- changes in version 3.2.1
  * fixes to the depsolving to get it much more correct than it was in
  * catch errors from yum-updatesd more gracefully
  * series of misc fixes for encoding breakages
  * 15%% speed up of list  and list 'all' commands
  * yum search now returns results based on all search terms included and
  returns results ranked with most-matches at the top
* Mon May 21 2007 -
- update to version 3.2.0
  * latests stable release
- drop yum-install.patch, included in 3.2.0
* Thu May 03 2007 -
- added yum-3.1.7.patch to workaround bug #255914
* Thu May 03 2007 -
- update to version 3.1.7
  * We raised the minor version on yum-metadata-parser b/c we've increased
  the db version of the yum sqlite dbs to 10. yum 3.1.7 now has an
  explicit require on yum-metadata-parser 1.1.0
  * There have been a lot of changes since yum 3.1.6. The depsolver has
  changed around, we've merged optimizations from all sorts of folks and
  added in a couple of new features. As well we have hopefully fixed a
  number of bugs. :)
* Tue Apr 10 2007 -
- added yum-install.patch by Jan Matejek which replaces $(PYDIR) with
  correct value, $(PKGDIR)
* Fri Apr 06 2007 -
- update to version 3.1.6
  * 3.1.6 brings with it another round of fixes and optimizations to the
  depsolver. It also ports forward some changes from 3.0.X that were
  needed. This release should provide depsolver speed experience more
  inline with what we want.
* Tue Mar 27 2007 -
- update to version 3.1.5
  * This is a substantially less sucky yum 3.1.X release for those folks
  suffering with the depsolving rate in 3.1.4. It's still not great but
  it's a damned-sight better than it was. :)
* Fri Mar 09 2007 -
- minor typo fixes to repos.tar.bz2
* Thu Mar 08 2007 -
- added repos.tar.bz2, which includes preconfigured openSUSE channels for yum (#245899)
* Thu Mar 08 2007 -
- update to version 3.1.4
  * We've fixed a few more things in the depsolver and optimized more of the
  sqlite look ups. As well as some slowdowns in excludePackages().
* Thu Mar 01 2007 -
- update to version 3.1.3
  * more depsolver fixes on the new depsolver - it's probably working more
  accurately now, we hope. :)
  * properties - if you're using the yum module for doing any programming
  we've gotten rid of all of the need for things like doConfigSetup(),
  doRepoSetup(), doSackSetup(), etc. You can just reference the attribute
  you want and python properties will set it up for you automatically with
  the default config options. You can still call those functions, of
  course, but you only need to call them if you want to pass them
  different configuration options.
  * speed ups. We've made a lot of changes to our calls to query the sqlite
  dbs. Trimming out a lot of fat and also dumping some downright silly
  ways of doing things.
* Wed Feb 21 2007 -
- update to version 3.1.2
  * This is a development release and should not be used on systems where
  you value their continued functionality. That said, it passed all the
  release tests, for what those are worth. This is a big change from
  previous yum versions as we're doing all the dep solving inside yum. It
  doesn't download headers to do the dependency resolution.  It uses what
  information it has to do them. We were focusing on correctness with this
  release over many speedups. However, for a lot of simple cases it
  appears to be about the same as it was before, just w/o all the
  downloading during the dep resolution. We'll be adding in optimizations
  once we're more confident of the correctness of it.
* Wed Feb 07 2007 -
- update to version 3.1.1
  * download sqlite db's directly if the repository was made with createrepo
  0.4.7 or higher using the -d option.
  * should be able to handle media:// urls quasi-sanely now
  * faster package name resolution in install/update/erase commands
  * addition of a utils base class to be used by yum-utils for simpler, more
  consistent commands.
- changelog for 3.1.0
  * This is mostly 3.0.3 + some new logging patches from Terje and Tim and
  some cleanups from James.
* Mon Jan 08 2007 -
- update to version 3.0.3
  * yum/ fixed YumError messages was not returned.  Added the
  changes made to in HEAD, now it is working again.
  * yum/ Fixed Traceback args is not defined
  * rpmUtils/ fixed some indentation error
  * yum/ try to speed up MetaSack returnObsoletes()
  * yum/ fix error handling (rh#221470)
  * yum/
    - make MetaSack returnObsoletes not take forever and a day
    - clean up the other PackageSack returnObsoletes()
  * rpmUtils/ sparc support from spot (rh#220953)
  * yum/ thanks to terje rosten for pointing out this bug
    - fixes a dumb list of lists thing from the ListPackageSacks
    - makes groupinstall work
  * yum/ make package checking work again
  * yum/:, remove the ts.close() calls in rpmsack.
  See if it helps the rpmdb locking problems. Add in some debug output in
  the depsolving so we can see how much time is spent per dep and what
  kind of dep it is
  * yum/ Add missing 'self'
  * yum/ Urlgrabber will always be used here (especially since we
  don't import urllib)
  *,,, yum/,
  yum/, yum/, yum/ Remove a bunch of
  unused imports
  * yum/ Replace catching Exception with IOError, which
  should catch all cases
  * yum/ Undo my previous patch, since it breaks how the sql
  package overrides returnChecksums
  * yum/ Remove unneeded use of lambda in some properties
  * whitespace fix- thanks to terje rosten
  * yum/ fix up the debuglevel and errorlevel so they are set
  appropriately from the cmdline to the conf
  * yum/ bring back here too
  *,,,,,, bin/, bin/, rpmUtils/,
  rpmUtils/, yum/, yum/, yum/,
  yum/, yum/, yum/, yum/,
  yum/, yum/, yum/ Pychecker fixes
  back again, less the brokenness
  *,,,,,, bin/, bin/, rpmUtils/,
  rpmUtils/, yum/, yum/, yum/,
  yum/, yum/, yum/, yum/,
  yum/, yum/, yum/ Revert previous
  pychecker fixes patch, since I broke things good and proper
  * yum/:,
    - make old obsoletes be ignored by install/update command
    - fix a variety of minor issues created by recent changes
  *,,,,,, bin/, bin/, rpmUtils/,
  rpmUtils/, yum/, yum/, yum/,
  yum/, yum/, yum/, yum/,
  yum/, yum/, yum/ pychecker related
  fixes, including unused imports, and removal of use of deprecated
  methods from the string module
  * get rid of deprecation warning
  * yum/ Re-enable using sack.searchAll in the provides
  command. This really speeds up things, since we'll pull fewer filelists
  for packages out of the db. Looks like this broke when the metasack was
  introduced. oops. ;)
  * yum/ Remove unused code for manipulating the
  failure_obj during __get
  * yum/
    - fix a deprecation warning
    - give an idea of where gpg keys come from on the import; add a new
  callback method that's more extensible
  *,,, Implement the ShellCommand
  * yum/ Close the file descriptor used by imp in case an
  exception is thrown.
  *,, yum/ Provide a default file
  name for doLock and doUnlock
  * yum/ Only catch ImportError in storagefactory
  * yum/ apply patch for bug #670 - thanks to Joe Shaw
  * docs/yum.conf.5, yum/, yum/ allow setting the type
  of packages that will be installed by default on a 'groupinstall'
  * fix format error (rh#212850)
  * yum/ fix progress_obj typo - back to 3.0.X
  * yum/ check in changelog changes to 3.0.X
  * yum/ make sure we're comparing versions - thanks to pjones
  * init plugins, fix log config (jbowes)
  * etc/yum-updatesd.init: fix tyop (rh#214298)
  * etc/yum-updatesd.conf: add a comment and the dbus_listener option
  * fix excludes (rh#213622, rh#212494) and
  auto-update (rh#212507)
  * print out version before plugins are loaded (rh#212292)
- removed old patches
- added yum-python25.patch to drop python-sqlite requirement (use sqlite3
- removed obsolete requires to libxml2-python
* Wed Nov 01 2006 -
- update to version 3.0.1
  * Makefile, docs/Makefile: Add docs target to Makefile for epydoc
  * yum/ file can be a unicode string
  * yum/
  actually return the checksum value
  * yum/:,,,,,,,,
    - lots of pychecker fixes
    - remove duplicate code for checksumming
    - clean up some potential bugs
  *, yum/
    - remove IncludingConfigParser,IncludedConfigParser
    - make use ConfigPreProcessor for include= config files
  * yum/ bring back equality of package objects
  * yum/ EVR comparison
  * yum/ Fix comparisons using PackageEVR
  *, yum/, yum/ fix so that
  foo-1.1-1.i386 != foo-1.1-1.x86_64.  at the same time, move
  comparison to be of an EVR object and adjust callers accordingly.
  patch for EVR comparison
  * yum/ close the syslog handler if it fails to get
  +set up (rh#208773)
  * yum/ fix typo
  * yum/
    - speed up searchNevra() by building a pkgtup->headerindex dict -
  make the header_from_index() method work by deleting match iterator
  each time explicitly.
  * yum/ raise the right error... this ended up
  manifesting itself by raising the last error (which had been passed
  on) instead of the intended and an entirely non-obvious traceback.
  moral of the story: always raise a specific exception
  * yum/ fix var expansion
  * yum/ fix handling of base path
  * definition moved
* Thu Oct 26 2006 -
- added patches by Jeremy Katz <>
  * yum-python25-etree.patch, only require python-elementtree old dists
  * yum-error-vals.patch, fixes #214119
* Thu Oct 05 2006 -
- update to version 3.0
  * yum/ messing around with a few tests to figure out where it
  is slow.
  *, yum/ make the fix for pekka's bug more correct
  * fix for the traceback Pekka reported - makes sure that our ts
  is reopened/intialized when the user decides to not run the transaction
  from the shell.
  * yum/ replaced IncludingConfigParser with
  ConfigPreProcessor/ConfigParser in plugins, so i works like the rest of
  * yum/ * add a remote_url property for packages to get the
  remote location as a string that can be printed * get rid of some
  explicit uses of relativepath
  * yum/ Copy the default value in case it is mutable and
  different config instances end up manipulating the same default value.
  * yum/ fix for this error : AttributeError: 'module' object has
  no attribute 'IncludingConfigParser' When running latest yum-cvs with
  * yum/:,, make the include= and yum -c
  http://path/to/file behave like I thought they should.
  * yum/ put accidentally removed line back
  * yum/:, cleaned up Repository.setkeys as discussed
  on yum-devel
  * yum/ Removed on the fly write-back support from the config
  classes. Added BaseConfig.write() instead. This is simpler and should
  use less memory. No-one was using the write support anyway.
* Sun Oct 01 2006 -
- update to version 2.9.8
  * yum/ minor fix to deprecated returnTupleByKeyword method in
  * make sure we're not accidentally trying to install an old
  * yum/ make excludes (and who knows how many other things) work
  again.  This, however, may not be the correct fix - willing to roll it
  back out
  * yum/ make sure we're only returning the newest from the
  * yum/ if we have a local copy of the package that checksums
  fine, use it instead of trying to do a range request from the end of the
  * define a checkFailed signal so that watchers can notify
  users about failures to check for updates
  * yum/ Commited James Bowes' inheritance fix and simplify the
  *,,, yum/ Committed Bastiaan
  Bakker's command extension patch.
  * some error logging; avoid leaving a stale lock file
  * yum/ lazily populate prco to speed up rpmsack initialization
  when it's not needed
  * yum/ fix dep installs for locales like turkish where
  string.lower("I") != "i"
  * yum/ if we can't connect to a syslog, don't die
  * yum/ Removed unused excludes attribute and updated comments
  * yum/:,, As discussed privately with
  Paul Nasrat, merged YumRepository and RepoConf to help allow config
  * * actually time out after a few tries * catch another
  place we could potentially not unlock the pid file
  * yum/:, swap arguments on __init__ for a few
  Package types so that we have consistency
  * yum/ clean up some duplicate code to take advantage of the
  fact that the rpmdb is now a package sack
  * yum/ we need to redo setupGrab() after changing callbacks so
  that our grabber has the right info.  this makes it so that we get
  progress feedback when downloading in pirut again
  *, yum/ fix whatprovides based on a patch from Tim
  * yum/ makePackageObject -> _makePackageObject
  * yum/ Fixed the disk space check; it was failing because
  po.size can be a string.  Make the disk space check more readable by
  using the statvfs attributes.
  * yum/ Prevent a KeyError that was occur during the disk space
  check because errors wasn't always initialised correctly. Added
  adderror() to avoid initialisation problems like this and minimise
  * yum/:, partial check in just to get it off my
  laptop: 1. do check for space in cache dir for downloading packages 2.
  start changing around the way packages are checked
  * yum/:, get rid of silly code in verifyPkg()
  * yum/ as I read through the changes: - clean up one docstring
    - make some of the list constructions using _search look the same
  * yum/ make getNameArchPkgList() and getNamePkgList()
  consistent - if our pkglist is length zero then they would have traced
  * yum/:,,
    - move refineSearchPattern into misc from YumBase
    - clean up some pychecker errors
  * yum/ Big cleanup of RPMDBPackageSack. Indexes are no longer
  built (buildIndexes).  This significantly reducing Yum's initialisation
  time and reduces memory footprint. Despite the lack of indexes almost
  all operations are faster.
  *,, yum/, yum/, yum/
    - fix up findDeps interface
    - it now takes a list of package objects
    - clean up a deprecation in deplistoutput
    - remove RpmBase._prcoTuple2Printable() since it was no longer needed
  and only introduced in this devel series.
  * more obvious error message for group not existing
  * remove a bunch of unused imports
  * use TYPE_INTERACTIVE instead of the deprecated TYPE_INTERFACE
  * rpmUtils/ make epoch output quasi-consistent for
  * yum/ add some debug output to depsolving
- require rpm >= 4.4
* Wed Sep 06 2006 -
- Update to version 2.9.6, required by rum
- Remove yum-${version}-misc.patch and yum-syslog.patch, which are
  now upstream.
* Mon Aug 07 2006 -
- fix build
* Sat Aug 05 2006 -
- update to version 2.9.3
  * new dev cycle
- require yum-metadata-parser
- added yum-2.9.3-misc.patch and yum-syslog.patch from Fedora
- updated yum.conf
- don't package yum updatesd for now
* Thu May 25 2006 -
- update to version 2.6.1
  * includes countless bugfixes
* Wed Jan 25 2006 -
- converted neededforbuild to BuildRequires
* Sun Dec 18 2005 -
- update to version 2.4.2
* Wed Nov 30 2005 -
- update to version 2.4.1
* Mon Oct 31 2005 -
- build as nonroot
* Thu Sep 15 2005 -
- specfile cleanup
* Sat Aug 27 2005 -
- adapt yum's defaults to SUSE Linux
* Tue Aug 16 2005 -
- update to version 2.4.0
* Sun Aug 14 2005 -
- initial package (version 2.3.4)