Compare commits
2 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a82538492 | ||
|
|
3342ebdfab |
6 changed files with 293 additions and 1 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
yum-2.2.2.tar.gz
|
||||
|
|
@ -1 +0,0 @@
|
|||
EL-4 is now EOL, so become unuseful
|
||||
1
sources
Normal file
1
sources
Normal file
|
|
@ -0,0 +1 @@
|
|||
734cc68e26c2fd07629616ab597acac6 yum-2.2.2.tar.gz
|
||||
91
yum-arch-folder.patch
Normal file
91
yum-arch-folder.patch
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
--- ./docs/Makefile.remi 2004-10-13 07:36:58.000000000 +0200
|
||||
+++ ./docs/Makefile 2007-02-16 17:11:37.000000000 +0100
|
||||
@@ -5,7 +5,5 @@
|
||||
rm -f *.pyc *.pyo *~
|
||||
|
||||
install:
|
||||
- mkdir -p $(DESTDIR)/usr/share/man/man{5,8}
|
||||
- install -m 644 yum.8 $(DESTDIR)/usr/share/man/man8/yum.8
|
||||
+ mkdir -p $(DESTDIR)/usr/share/man/man8
|
||||
install -m 644 yum-arch.8 $(DESTDIR)/usr/share/man/man8/yum-arch.8
|
||||
- install -m 644 yum.conf.5 $(DESTDIR)/usr/share/man/man5/yum.conf.5
|
||||
--- ./yum/Makefile.remi 2004-08-31 06:20:04.000000000 +0200
|
||||
+++ ./yum/Makefile 2007-02-16 17:11:37.000000000 +0100
|
||||
@@ -3,7 +3,7 @@
|
||||
PYVER := $(shell python -c 'import sys; print "%.3s" %(sys.version)')
|
||||
PYSYSDIR := $(shell python -c 'import sys; print sys.prefix')
|
||||
PYLIBDIR = $(PYSYSDIR)/lib/python$(PYVER)
|
||||
-PKGDIR = $(PYLIBDIR)/site-packages/$(PACKAGE)
|
||||
+PKGDIR = /usr/share/yum-arch/$(PACKAGE)
|
||||
|
||||
all:
|
||||
echo "Nothing to do"
|
||||
--- ./repomd/Makefile.remi 2004-08-31 06:20:03.000000000 +0200
|
||||
+++ ./repomd/Makefile 2007-02-16 17:11:37.000000000 +0100
|
||||
@@ -3,7 +3,7 @@
|
||||
PYVER := $(shell python -c 'import sys; print "%.3s" %(sys.version)')
|
||||
PYSYSDIR := $(shell python -c 'import sys; print sys.prefix')
|
||||
PYLIBDIR = $(PYSYSDIR)/lib/python$(PYVER)
|
||||
-PKGDIR = $(PYLIBDIR)/site-packages/$(PACKAGE)
|
||||
+PKGDIR = /usr/share/yum-arch/$(PACKAGE)
|
||||
|
||||
all:
|
||||
echo "Nothing to do"
|
||||
--- ./bin/yum-arch.remi 2004-10-13 07:57:34.000000000 +0200
|
||||
+++ ./bin/yum-arch 2007-02-16 17:11:37.000000000 +0100
|
||||
@@ -18,6 +18,6 @@
|
||||
|
||||
import sys
|
||||
|
||||
-sys.path.insert(1,'/usr/share/yum-cli')
|
||||
+sys.path.insert(0,'/usr/share/yum-arch')
|
||||
import pullheaders
|
||||
pullheaders.main(sys.argv[1:])
|
||||
--- ./Makefile.remi 2005-01-25 06:56:43.000000000 +0100
|
||||
+++ ./Makefile 2007-02-16 17:13:59.000000000 +0100
|
||||
@@ -1,4 +1,4 @@
|
||||
-SUBDIRS = repomd rpmUtils urlgrabber yum etc docs
|
||||
+SUBDIRS = repomd rpmUtils urlgrabber yum docs
|
||||
PYFILES = $(wildcard *.py)
|
||||
|
||||
PKGNAME = yum
|
||||
@@ -17,14 +17,13 @@
|
||||
for d in $(SUBDIRS); do make -C $$d; [ $$? = 0 ] || exit 1 ; done
|
||||
|
||||
install:
|
||||
- mkdir -p $(DESTDIR)/usr/share/yum-cli
|
||||
+ mkdir -p $(DESTDIR)/usr/share/yum-arch
|
||||
for p in $(PYFILES) ; do \
|
||||
- install -m 644 $$p $(DESTDIR)/usr/share/yum-cli/$$p; \
|
||||
+ install -m 644 $$p $(DESTDIR)/usr/share/yum-arch/$$p; \
|
||||
done
|
||||
- $(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)/usr/share/yum-cli', 1, '$(PYDIR)', 1)"
|
||||
+ $(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)/usr/share/yum-arch', 1, '$(PYDIR)', 1)"
|
||||
|
||||
mkdir -p $(DESTDIR)/usr/bin $(DESTDIR)/usr/bin
|
||||
- install -m 755 bin/yum.py $(DESTDIR)/usr/bin/yum
|
||||
install -m 755 bin/yum-arch $(DESTDIR)/usr/bin/yum-arch
|
||||
|
||||
mkdir -p $(DESTDIR)/var/cache/yum
|
||||
--- ./urlgrabber/Makefile.remi 2004-08-31 06:20:04.000000000 +0200
|
||||
+++ ./urlgrabber/Makefile 2007-02-16 17:11:37.000000000 +0100
|
||||
@@ -3,7 +3,7 @@
|
||||
PYVER := $(shell python -c 'import sys; print "%.3s" %(sys.version)')
|
||||
PYSYSDIR := $(shell python -c 'import sys; print sys.prefix')
|
||||
PYLIBDIR = $(PYSYSDIR)/lib/python$(PYVER)
|
||||
-PKGDIR = $(PYLIBDIR)/site-packages/$(PACKAGE)
|
||||
+PKGDIR = /usr/share/yum-arch/$(PACKAGE)
|
||||
|
||||
all:
|
||||
echo "Nothing to do"
|
||||
--- ./rpmUtils/Makefile.remi 2004-08-31 06:20:03.000000000 +0200
|
||||
+++ ./rpmUtils/Makefile 2007-02-16 17:11:37.000000000 +0100
|
||||
@@ -3,7 +3,7 @@
|
||||
PYVER := $(shell python -c 'import sys; print "%.3s" %(sys.version)')
|
||||
PYSYSDIR := $(shell python -c 'import sys; print sys.prefix')
|
||||
PYLIBDIR = $(PYSYSDIR)/lib/python$(PYVER)
|
||||
-PKGDIR = $(PYLIBDIR)/site-packages/$(PACKAGE)
|
||||
+PKGDIR = /usr/share/yum-arch/$(PACKAGE)
|
||||
|
||||
all:
|
||||
echo "Nothing to do"
|
||||
117
yum-arch-python26.patch
Normal file
117
yum-arch-python26.patch
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
diff -up yum-2.2.2/yum/depsolve.py.p26 yum-2.2.2/yum/depsolve.py
|
||||
--- yum-2.2.2/yum/depsolve.py.p26 2009-05-16 19:34:02.000000000 +0200
|
||||
+++ yum-2.2.2/yum/depsolve.py 2009-05-16 19:35:07.000000000 +0200
|
||||
@@ -67,7 +67,7 @@ class Depsolve:
|
||||
matched = 1
|
||||
if not matched:
|
||||
self.log(2, 'Importing Additional filelist information for dependency resolution')
|
||||
- self.repos.populateSack(with='filelists')
|
||||
+ self.repos.populateSack(mdtype='filelists')
|
||||
|
||||
pkgs = self.pkgSack.searchProvides(name)
|
||||
if flags == 0:
|
||||
diff -up yum-2.2.2/yum/__init__.py.p26 yum-2.2.2/yum/__init__.py
|
||||
--- yum-2.2.2/yum/__init__.py.p26 2009-05-16 19:33:54.000000000 +0200
|
||||
+++ yum-2.2.2/yum/__init__.py 2009-05-16 19:34:56.000000000 +0200
|
||||
@@ -904,7 +904,7 @@ class YumBase(depsolve.Depsolve):
|
||||
matched = 1
|
||||
if not matched:
|
||||
self.log(2, 'Importing Additional filelist information for packages')
|
||||
- self.repos.populateSack(with='filelists')
|
||||
+ self.repos.populateSack(mdtype='filelists')
|
||||
|
||||
for arg in args:
|
||||
restring = self._refineSearchPattern(arg)
|
||||
diff -up yum-2.2.2/yum/pgpmsg.py.p26 yum-2.2.2/yum/pgpmsg.py
|
||||
diff -up yum-2.2.2/yum/repos.py.p26 yum-2.2.2/yum/repos.py
|
||||
--- yum-2.2.2/yum/repos.py.p26 2009-05-16 19:34:10.000000000 +0200
|
||||
+++ yum-2.2.2/yum/repos.py 2009-05-16 19:35:39.000000000 +0200
|
||||
@@ -202,10 +202,10 @@ class RepoStorage:
|
||||
repo.setupGrab()
|
||||
|
||||
|
||||
- def populateSack(self, which='enabled', with='metadata', callback=None, pickleonly=0):
|
||||
+ def populateSack(self, which='enabled', mdtype='metadata', callback=None, pickleonly=0):
|
||||
"""This populates the package sack from the repositories, two optional
|
||||
arguments: which='repoid, enabled, all'
|
||||
- with='metadata, filelists, otherdata, all'"""
|
||||
+ mdtype='metadata, filelists, otherdata, all'"""
|
||||
|
||||
if not callback:
|
||||
callback = self.callback
|
||||
@@ -223,10 +223,10 @@ class RepoStorage:
|
||||
repobj = self.getRepo(which)
|
||||
myrepos.append(repobj)
|
||||
|
||||
- if with == 'all':
|
||||
+ if mdtype == 'all':
|
||||
data = ['metadata', 'filelists', 'otherdata']
|
||||
else:
|
||||
- data = [ with ]
|
||||
+ data = [ mdtype ]
|
||||
|
||||
for repo in myrepos:
|
||||
if not hasattr(repo, 'cacheHandler'):
|
||||
--- yum-2.2.2/rpmUtils/oldUtils.py.orig 2009-05-16 20:10:54.000000000 +0100
|
||||
+++ yum-2.2.2/rpmUtils/oldUtils.py 2009-09-08 15:19:47.494521706 +0100
|
||||
@@ -151,7 +151,10 @@
|
||||
def _write_gzip_header(self):
|
||||
self.fileobj.write('\037\213') # magic header
|
||||
self.fileobj.write('\010') # compression method
|
||||
- fname = self.filename[:-3]
|
||||
+ if self.name[-3:] != ".gz":
|
||||
+ fname = self.name
|
||||
+ else:
|
||||
+ fname = self.name[:-3]
|
||||
flags = 0
|
||||
if fname:
|
||||
flags = FNAME
|
||||
--- yum-2.2.2/yum/pgpmsg.py.orig 2009-05-16 20:10:54.000000000 +0100
|
||||
+++ yum-2.2.2/yum/pgpmsg.py 2009-09-08 15:31:53.921273337 +0100
|
||||
@@ -13,7 +13,12 @@
|
||||
##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.
|
||||
-import string, struct, time, cStringIO, base64, types, sha
|
||||
+import string, struct, time, cStringIO, base64, types
|
||||
+try:
|
||||
+ from hashlib import sha1 as sha
|
||||
+except:
|
||||
+ from sha import new as sha
|
||||
+
|
||||
|
||||
debug = None
|
||||
|
||||
@@ -385,7 +390,7 @@
|
||||
#XXX do the v3 fingerprint here
|
||||
|
||||
elif self.version == 4:
|
||||
- s = sha.new()
|
||||
+ s = sha()
|
||||
s.update(self.pkttag)
|
||||
s.update(struct.pack(">H", pkt_len))
|
||||
s.update(msg[idx_save:idx_save+pkt_len])
|
||||
--- yum-2.2.2/cli.py.p26 2010-02-14 08:00:21.000000000 +0100
|
||||
+++ yum-2.2.2/cli.py 2010-02-14 08:00:59.000000000 +0100
|
||||
@@ -491,7 +491,7 @@
|
||||
needrepos.append(po.repoid)
|
||||
|
||||
self.log(2, 'Importing Changelog Metadata')
|
||||
- self.repos.populateSack(with='otherdata', which=needrepos)
|
||||
+ self.repos.populateSack(mdtype='otherdata', which=needrepos)
|
||||
self.log(2, 'Generating RSS File for %s' % pkgtype)
|
||||
|
||||
self.listPkgs(this_pkg_list, titles[pkgtype], outputType='rss')
|
||||
@@ -602,9 +602,9 @@
|
||||
self.log(3, '%s' % self.pickleRecipe())
|
||||
try:
|
||||
self.doRepoSetup(nosack=1)
|
||||
- self.repos.populateSack(with='metadata', pickleonly=1)
|
||||
- self.repos.populateSack(with='filelists', pickleonly=1)
|
||||
- self.repos.populateSack(with='otherdata', pickleonly=1)
|
||||
+ self.repos.populateSack(mdtype='metadata', pickleonly=1)
|
||||
+ self.repos.populateSack(mdtype='filelists', pickleonly=1)
|
||||
+ self.repos.populateSack(mdtype='otherdata', pickleonly=1)
|
||||
|
||||
except yum.Errors.YumBaseError, e:
|
||||
return 1, [str(e)]
|
||||
83
yum-arch.spec
Normal file
83
yum-arch.spec
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
Summary: Extract headers from rpm in a old yum repository
|
||||
Name: yum-arch
|
||||
Version: 2.2.2
|
||||
Release: 9%{?dist}
|
||||
License: GPLv2+
|
||||
Group: System Environment/Base
|
||||
Source0: http://linux.duke.edu/projects/yum/download/2.2/yum-%{version}.tar.gz
|
||||
|
||||
Patch1: yum-arch-folder.patch
|
||||
Patch2: yum-arch-python26.patch
|
||||
|
||||
URL: http://linux.duke.edu/yum/
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: python, gettext
|
||||
|
||||
Requires: python, rpm-python, rpm >= 0:4.1.1, libxml2-python
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
%description
|
||||
Extract headers from rpm in a old yum repository.
|
||||
|
||||
This package only provides the old yum-arch command from yum-%{version}
|
||||
It should be used to generate repository informations for Fedora Core < 3
|
||||
and RedHat Enterprise Linux < 4.
|
||||
|
||||
%prep
|
||||
%setup -q -n yum-%{version}
|
||||
%patch1 -p0 -b .folder
|
||||
%patch2 -p1 -b .p26
|
||||
|
||||
# to avoid rpmlint warnings
|
||||
for source in *.py {repomd,rpmUtils,yum}/*.py; do
|
||||
sed -i -e '/^#!\/usr/d' $source
|
||||
done
|
||||
|
||||
%build
|
||||
make
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-, root, root, -)
|
||||
%doc README AUTHORS COPYING TODO INSTALL ChangeLog
|
||||
%{_datadir}/%{name}
|
||||
%{_bindir}/%{name}
|
||||
%{_mandir}/man8/%{name}*
|
||||
|
||||
%changelog
|
||||
* Sun Feb 14 2010 Remi Collet <Fedora@FamilleCollet.com> - 2.2.2-9
|
||||
- improve python 2.6 patch (fix FTBFS #564994)
|
||||
|
||||
* Sat Sep 26 2009 Remi Collet <Fedora@FamilleCollet.com> - 2.2.2-8
|
||||
- fix python 2.6 warnings (#521869)
|
||||
|
||||
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.2-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
||||
|
||||
* Sat May 16 2009 Remi Collet <Fedora@FamilleCollet.com> - 2.2.2-6
|
||||
- fix python 2.6 issue
|
||||
|
||||
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.2-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
||||
|
||||
* Mon Dec 01 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.2.2-4
|
||||
- Rebuild for Python 2.6
|
||||
|
||||
* Mon Aug 11 2008 Jason L Tibbitts III <tibbs@math.uh.edu> - 2.2.2-3
|
||||
- Fix license tag.
|
||||
|
||||
* Sun Feb 18 2007 Remi Collet <Fedora@FamilleCollet.com> - 2.2.2-2
|
||||
- from package review (#229123)
|
||||
own /usr/share/yum-arch
|
||||
del shellbang in libs
|
||||
|
||||
* Sat Feb 17 2007 Remi Collet <Fedora@FamilleCollet.com> - 2.2.2-1
|
||||
- initial spec for Extras
|
||||
Loading…
Add table
Add a link
Reference in a new issue