-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Seth Vidal
committed
Jun 7, 2002
0 parents
commit aaa1b77
Showing
40 changed files
with
5,391 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
---------------- | ||
YUM AUTHORS | ||
---------------- | ||
|
||
Yum is currently maintained by Seth Vidal <skvidal@phy.duke.edu>. Yum was | ||
written to scratch an itch for some folks at duke, specifically seth. It was | ||
based in huge parts off of code from yup - the yellowdog updater. Yum has used | ||
a bunch of code from other gpl'd projects - up2date, anaconda and yup. Folks below | ||
are thanked for their help/code/smarts. | ||
|
||
Jeremy Katz <katzj@linuxpower.org> | ||
Adrian Likins <alikins@redhat.com> | ||
Matthew Miller <mattdm@mattdm.org> | ||
Michael Stenner <mstenner@phy.duke.edu> | ||
Icon Riabitsev <icon@phy.duke.edu> | ||
Robert G. Brown <rgb@phy.duke.edu> | ||
Hollis Blanchard | ||
|
||
Original Yup people: | ||
Bryan Stillwell <bstill@terraplex.com>. | ||
Stephen Edie | ||
Dan Burcaw <dburcaw@yellowdoglinux.com> | ||
Troy Bengegerdes <troy@blacklablinux.com> | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
For usage information, please see the README. | ||
|
||
yum uses a relatively standard ./configure ; make ; make install to | ||
work, although it is recommended that you install an RPM as yum | ||
requires that it be installed as an RPM. | ||
|
||
If checking code out of CVS, you will need to run autoconf first to | ||
create the configure script. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
SHELL = @SHELL@ | ||
top_srcdir = @top_srcdir@ | ||
srcdir = @top_srcdir@ | ||
prefix = @prefix@ | ||
exec_prefix = @exec_prefix@ | ||
|
||
bindir = @bindir@ | ||
sbindir = @sbindir@ | ||
libexecdir = @libexecdir@ | ||
datadir = @datadir@ | ||
sysconfdir = @sysconfdir@ | ||
sharedstatedir = @sharedstatedir@ | ||
localstatedir = @localstatedir@ | ||
libdir = @libdir@ | ||
infodir = @infodir@ | ||
docdir = @docdir@ | ||
includedir = @includedir@ | ||
oldincludedir = @oldincludedir@ | ||
mandir = @mandir@ | ||
|
||
pkgdocdir = $(docdir)/@PACKAGE@-@VERSION@ | ||
pkgdatadir = $(datadir)/@PACKAGE@ | ||
pkglibdir = $(libdir)/@PACKAGE@ | ||
pkgincludedir = $(includedir)/@PACKAGE@ | ||
|
||
top_builddir = @top_builddir@ | ||
PACKAGE = @PACKAGE@ | ||
VERSION = @VERSION@ | ||
INSTALL = @INSTALL@ | ||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
INSTALL_DATA = @INSTALL_DATA@ | ||
INSTALL_SCRIPT = @INSTALL_SCRIPT@ | ||
|
||
SUBDIRS = sbin etc docs | ||
|
||
MODULES = $(srcdir)/pullheaders.pyc \ | ||
$(srcdir)/config.pyc \ | ||
$(srcdir)/nevral.pyc \ | ||
$(srcdir)/logger.pyc \ | ||
$(srcdir)/yummain.pyc \ | ||
$(srcdir)/pkgaction.pyc \ | ||
$(srcdir)/serverStuff.pyc \ | ||
$(srcdir)/archwork.pyc \ | ||
$(srcdir)/callback.pyc \ | ||
$(srcdir)/clientStuff.pyc \ | ||
$(srcdir)/depchecktree.pyc \ | ||
$(srcdir)/iutil.pyc \ | ||
$(srcdir)/lilocfg.pyc \ | ||
$(srcdir)/lilo.pyc \ | ||
$(srcdir)/grubcfg.pyc \ | ||
$(srcdir)/checkbootloader.pyc \ | ||
$(srcdir)/bootloadercfg.pyc \ | ||
$(srcdir)/up2datetheft.pyc \ | ||
$(srcdir)/translate.pyc | ||
|
||
.SUFFIXES: .py .pyc | ||
.py.pyc: | ||
./py-compile $*.py | ||
|
||
|
||
all: $(MODULES) | ||
for subdir in $(SUBDIRS) ; do \ | ||
$(MAKE) -C $$subdir ; \ | ||
done | ||
|
||
|
||
install: all installdirs | ||
for module in $(MODULES) ; do \ | ||
$(INSTALL_DATA) $(srcdir)/$$module $(DESTDIR)$(pkglibdir) ; \ | ||
done | ||
for subdir in $(SUBDIRS) ; do \ | ||
$(MAKE) -C $$subdir install ; \ | ||
done | ||
|
||
uninstall: | ||
for module in $(MODULES) ; do \ | ||
$(RM) $(pkglibdir)/$$module ; \ | ||
done | ||
for subdir in $(SUBDIRS) ; do \ | ||
$(MAKE) -C $$subdir uninstall ; \ | ||
done | ||
|
||
clean: | ||
rm -f *.pyc *.pyo | ||
for subdir in $(SUBDIRS) ; do \ | ||
$(MAKE) -C $$subdir clean ; \ | ||
done | ||
|
||
distclean: clean | ||
$(RM) $(srcdir)/config.log | ||
$(RM) $(srcdir)/config.cache | ||
$(RM) $(srcdir)/Makefile | ||
$(RM) $(srcdir)/config.status | ||
$(RM) -rf .libs | ||
$(RM) -f core | ||
for subdir in $(SUBDIRS) ; do \ | ||
$(MAKE) -C $$subdir distclean ; \ | ||
done | ||
|
||
mostlyclean: | ||
$(MAKE) clean | ||
|
||
|
||
maintainer-clean: | ||
$(MAKE) distclean | ||
$(RM) $(srcdir)/configure | ||
|
||
|
||
dist: | ||
olddir=`pwd`; \ | ||
distdir=$(PACKAGE)-$(VERSION); \ | ||
rm -rf .disttmp; \ | ||
mkdir .disttmp; \ | ||
mkdir .disttmp/$$distdir; \ | ||
$(MAKE) distfiles | ||
distdir=$(PACKAGE)-$(VERSION); \ | ||
cd .disttmp; \ | ||
tar -cvz > ../$$distdir.tar.gz $$distdir; \ | ||
cd $$olddir | ||
rm -rf .disttmp | ||
|
||
distfiles: | ||
distdir=$(PACKAGE)-$(VERSION); \ | ||
cp \ | ||
$(srcdir)/*.py \ | ||
$(srcdir)/AUTHORS \ | ||
$(srcdir)/COPYING \ | ||
$(srcdir)/INSTALL \ | ||
$(srcdir)/README \ | ||
$(srcdir)/TODO \ | ||
$(srcdir)/py-compile \ | ||
$(srcdir)/Makefile.in \ | ||
$(srcdir)/configure.in \ | ||
$(srcdir)/configure \ | ||
$(srcdir)/yum.spec \ | ||
$(srcdir)/install-sh \ | ||
$(srcdir)/mkinstalldirs \ | ||
$(top_srcdir)/.disttmp/$$distdir | ||
for subdir in $(SUBDIRS) ; do \ | ||
$(MAKE) -C $$subdir distfiles ; \ | ||
done | ||
|
||
installdirs: | ||
$(srcdir)/mkinstalldirs $(DESTDIR)$(sbindir) $(DESTDIR)/etc $(DESTDIR)$(pkglibdir) $(DESTDIR)$(mandir)/man8 $(DESTDIR)$(mandir)/man5 $(DESTDIR)/var/cache/@PACKAGE@/ | ||
|
||
archive: dist | ||
|
||
|
||
.PHONY: todo | ||
todo: | ||
@echo ---------------=========================================== | ||
@grep -n TODO\\\|FIXME `find . -type f` | grep -v grep | ||
@echo ---------------=========================================== | ||
.PHONY: all install install-strip uninstall clean distclean mostlyclean maintainer-clean info dvi dist distfiles check installcheck installdirs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
------------------------------------- | ||
Yum - an automatic updater and installer for rpm-based systems | ||
------------------------------------- | ||
|
||
Included programs: | ||
/usr/sbin/yum Main program | ||
/usr/sbin/yum-arch Generate the database that yum downloads | ||
|
||
Basic usage description follows: | ||
|
||
Yum is run with one of the following options: | ||
|
||
- update [package list] | ||
If run without any packages, Yum will automatically upgrade every | ||
currently installed package. If one or more packages are | ||
specified, Yum will only update the packages listed. | ||
|
||
- install <package list> | ||
Yum will install the latest version of the specified package | ||
(don't specify version information). | ||
|
||
- remove <package list> | ||
Yum will remove the specified packages from the system. | ||
|
||
- yum list [package list] | ||
List available packages | ||
|
||
yum-arch is run from the distribution site in order to create the | ||
databases which Yum determines remote package availability. | ||
|
||
yum-arch is run in one of two ways: | ||
yum-arch <top level of archive> | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
Things that must be done: | ||
|
||
Put the sigcheck function in :) | ||
make it an option per server not global. | ||
|
||
fix the nevral so newest wins for the headerInfoNevral by default and | ||
last-in as an option. | ||
|
||
Implement the comps parsing and group* functions | ||
Implement clean * - shouldn't be terribly hard. | ||
|
||
Implement pkg excludes for new packages on the client side | ||
Implement pkg excludes on the server side | ||
Implement a server-side config file or commandline option to let it know where to get the comps/group list from | ||
|
||
Make it possible to have an http-accesible global conf file for excludes and | ||
what not. | ||
|
||
gzip the headers so they are smaller to move across the network | ||
|
||
Implement a status/progress bar for downloading pkgs | ||
Make -q and -d 0 VERY quiet | ||
Make the syslog, log be sane | ||
|
||
rewrite the man pages so they have some meaning :) | ||
|
||
Work on making the frontend more spiffy | ||
|
||
quiet down the callback for rpm installs if -q is invoked. | ||
|
||
work on making ftp and file urls work | ||
|
||
test on non x86 archs and make sure grub and lilo stuff are not run for this arch | ||
possibly implement a per-arch pkgaction.kernelupdate function | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
#!/usr/bin/python -t | ||
|
||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation; either version 2 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Library General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program; if not, write to the Free Software | ||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
# Copyright 2002 Duke University | ||
|
||
|
||
import rpm, sys, types | ||
|
||
def getArch(): | ||
import os | ||
arch = os.uname()[4] | ||
if (len (arch) == 4 and arch[0] == 'i' and | ||
arch[2:4] == "86"): | ||
arch = "i386" | ||
if arch == "sparc64": | ||
arch = "sparc" | ||
return arch | ||
|
||
def betterarch(arch1, arch2): | ||
"""Take two archs, return the better of the two, returns none if both \ | ||
of them come out to 0, returns either if they are the same archscore""" | ||
score1 = rpm.archscore(arch1) | ||
score2 = rpm.archscore(arch2) | ||
if score1 == 0 and score2 == 0: | ||
return None | ||
if score1 < score2: | ||
if score1 != 0: | ||
return arch1 | ||
else: | ||
return arch2 | ||
if score2 < score1: | ||
if score2 != 0: | ||
return arch2 | ||
else: | ||
return arch1 | ||
if score1 == score2: | ||
return arch1 | ||
del score1 | ||
del score2 | ||
|
||
|
||
def bestarch(archlist): | ||
|
||
currentarch='garbage' | ||
for arch in archlist: | ||
if currentarch==None: | ||
currentarch = betterarch('garbage', arch) | ||
else: | ||
currentarch = betterarch(currentarch, arch) | ||
return currentarch | ||
|
||
|
||
def availablearchs(hinevral,name): | ||
archdict = {} | ||
archdict['i386']=['i386','i486','i586','i686','athlon','noarch'] | ||
archdict['alpha']=['alpha','alphaev6','noarch'] | ||
archdict['sparc']=['sparc','sparc64','noarch'] | ||
archdict['ppc']=['ppc','noarch'] | ||
archdict['ia64']=['ia64','noarch'] | ||
myarch=getArch() | ||
archlist = [] | ||
|
||
for arch in archdict[myarch]: | ||
if hinevral.exists(name,arch): | ||
archlist.append(arch) | ||
return archlist | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/usr/bin/python | ||
|
||
# base class for boot loader updating code code for Update Agent | ||
# Copyright (c) 2001 Red Hat, Inc. Distributed under GPL. | ||
# | ||
# Author: Adrian Likins <alikins@redhat.com> | ||
|
||
|
||
import os,sys | ||
import iutil | ||
#from translate import _, N_, cat | ||
#from up2date import log | ||
|
||
class Error: | ||
# base class for client errors | ||
def __init__(self, errmsg): | ||
self.errmsg = errmsg | ||
|
||
def __repr__(self): | ||
#log.log_me(self.errmsg) | ||
return self.errmsg | ||
|
||
def makeInitrd ( kernelTag, instRoot): | ||
initrd = "/boot/initrd-%s.img" % (kernelTag, ) | ||
#log.log_me("Running \"/sbin/mkinitrd --ifneeded %s %s\" " % | ||
# (initrd, kernelTag)) | ||
exec_return = iutil.execWithRedirect("/sbin/mkinitrd", | ||
[ "/sbin/mkinitrd", | ||
"--ifneeded", | ||
initrd, | ||
kernelTag ], | ||
stdout = None, stderr = None, searchPath = 1, | ||
root = instRoot) | ||
|
||
# see if mkinitrd actually created a initrd, this seems to be | ||
# the only way to tell since it returns sucess if one isnt needed either | ||
if os.access(initrd, os.R_OK): | ||
initrdExists = 1 | ||
#log.log_me("%s was created" % initrd) | ||
else: | ||
#log.log_me("No initrd was created by mkinitrd") | ||
initrdExists = None | ||
return (initrd,initrdExists) |
Oops, something went wrong.