- New port: sysutils/yum
The yum package manager is used by Fedora (and CentOS) to manage RPM packages. PR: 150541 Submitted by: Anders F Björklund <afb@rpm5.org> Feature safe: yes
This commit is contained in:
parent
a8caffea62
commit
78151dc8f2
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=306107
@ -1058,6 +1058,7 @@
|
||||
SUBDIR += xsysstats
|
||||
SUBDIR += xvidcap
|
||||
SUBDIR += yawho
|
||||
SUBDIR += yum
|
||||
SUBDIR += zeitgeist
|
||||
SUBDIR += zeroer
|
||||
SUBDIR += zetaback
|
||||
|
101
sysutils/yum/Makefile
Normal file
101
sysutils/yum/Makefile
Normal file
@ -0,0 +1,101 @@
|
||||
# Created by: Anders F Bjorklund <afb@rpm5.org>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= yum
|
||||
PORTVERSION= 3.4.3
|
||||
CATEGORIES= sysutils
|
||||
MASTER_SITES= http://yum.baseurl.org/download/${PORTVERSION:R}/
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= Installer/updater for rpm
|
||||
|
||||
BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash \
|
||||
msgfmt:${PORTSDIR}/devel/gettext \
|
||||
intltool-update:${PORTSDIR}/textproc/intltool
|
||||
RUN_DEPENDS= ${PYTHON_SITELIBDIR}/rpm:${PORTSDIR}/archivers/rpm4 \
|
||||
${PYTHON_SITELIBDIR}/_sqlite3.so:${PORTSDIR}/databases/py-sqlite3 \
|
||||
${PYTHON_SITELIBDIR}/sqlitecachec.py:${PORTSDIR}/devel/py-yum-metadata-parser \
|
||||
${PYTHON_SITELIBDIR}/iniparse:${PORTSDIR}/devel/py-iniparse \
|
||||
${PYTHON_SITELIBDIR}/urlgrabber:${PORTSDIR}/www/py-urlgrabber
|
||||
|
||||
USE_PYTHON= yes
|
||||
USE_GMAKE= yes
|
||||
USE_GETTEXT= yes
|
||||
|
||||
MAKE_ARGS= MAKE=${GMAKE} PYTHON=${PYTHON_CMD} \
|
||||
prefix=${PREFIX} mandir=${MANPREFIX}/man sysconfdir=${PREFIX}/etc
|
||||
|
||||
PLIST_SUB+= PYTHONPREFIX_SITELIBDIR=${PYTHONPREFIX_SITELIBDIR}
|
||||
|
||||
MAN5= yum.conf.5 yum-updatesd.conf.5
|
||||
MAN8= yum.8 yum-updatesd.8 yum-shell.8
|
||||
|
||||
RPMDIR?= /var/lib/rpm
|
||||
|
||||
post-patch:
|
||||
${REINPLACE_CMD} -e 's|@PREFIX@|${PREFIX}|g' -e \
|
||||
's|@RPMDIR@|${RPMDIR}|g' -e \
|
||||
's|@LOCALBASE@|${LOCALBASE}|g' \
|
||||
${WRKSRC}/bin/yum.py \
|
||||
${WRKSRC}/bin/yum-updatesd.py \
|
||||
${WRKSRC}/cli.py \
|
||||
${WRKSRC}/yum-updatesd.py \
|
||||
${WRKSRC}/yum/__init__.py \
|
||||
${WRKSRC}/yum/config.py \
|
||||
${WRKSRC}/yum/rpmsack.py \
|
||||
${WRKSRC}/yum/plugins.py
|
||||
${REINPLACE_CMD} -e 's|#!/usr/bin/python|#!${PYTHON_CMD}|' \
|
||||
${WRKSRC}/bin/yum.py \
|
||||
${WRKSRC}/bin/yum-updatesd.py \
|
||||
${WRKSRC}/callback.py \
|
||||
${WRKSRC}/cli.py \
|
||||
${WRKSRC}/output.py \
|
||||
${WRKSRC}/yumcommands.py \
|
||||
${WRKSRC}/yummain.py \
|
||||
${WRKSRC}/yum-updatesd.py \
|
||||
${WRKSRC}/utils.py \
|
||||
${WRKSRC}/rpmUtils/__init__.py \
|
||||
${WRKSRC}/rpmUtils/arch.py \
|
||||
${WRKSRC}/rpmUtils/miscutils.py \
|
||||
${WRKSRC}/rpmUtils/oldUtils.py \
|
||||
${WRKSRC}/rpmUtils/transaction.py \
|
||||
${WRKSRC}/rpmUtils/updates.py \
|
||||
${WRKSRC}/yum/__init__.py \
|
||||
${WRKSRC}/yum/Errors.py \
|
||||
${WRKSRC}/yum/callbacks.py \
|
||||
${WRKSRC}/yum/config.py \
|
||||
${WRKSRC}/yum/depsolve.py \
|
||||
${WRKSRC}/yum/failover.py \
|
||||
${WRKSRC}/yum/history.py \
|
||||
${WRKSRC}/yum/i18n.py \
|
||||
${WRKSRC}/yum/metalink.py \
|
||||
${WRKSRC}/yum/packageSack.py \
|
||||
${WRKSRC}/yum/packages.py \
|
||||
${WRKSRC}/yum/pkgtag_db.py \
|
||||
${WRKSRC}/yum/repoMDObject.py \
|
||||
${WRKSRC}/yum/repos.py \
|
||||
${WRKSRC}/yum/rpmsack.py \
|
||||
${WRKSRC}/yum/rpmtrans.py \
|
||||
${WRKSRC}/yum/sqlitesack.py \
|
||||
${WRKSRC}/yum/sqlutils.py \
|
||||
${WRKSRC}/yum/update_md.py
|
||||
${REINPLACE_CMD} -e 's|%%PYTHONPREFIX_SITELIBDIR%%|${PYTHONPREFIX_SITELIBDIR}|' \
|
||||
${WRKSRC}/yum/Makefile ${WRKSRC}/rpmUtils/Makefile
|
||||
|
||||
pre-install:
|
||||
${MKDIR} ${PREFIX}/share/yum-cli
|
||||
${MKDIR} ${PREFIX}/etc/yum/repos.d
|
||||
${MKDIR} ${PYTHONPREFIX_SITELIBDIR}/rpmUtils
|
||||
${MKDIR} ${PYTHONPREFIX_SITELIBDIR}/yum
|
||||
${MKDIR} /var/cache/yum
|
||||
${MKDIR} /var/lib/yum
|
||||
|
||||
post-install:
|
||||
if [ ! -f ${PREFIX}/etc/yum/yum.conf ]; then \
|
||||
${CP} -p ${PREFIX}/etc/yum/yum.conf.sample ${PREFIX}/etc/yum/yum.conf; \
|
||||
fi
|
||||
if [ ! -f ${PREFIX}/etc/yum/yum-updatesd.conf ]; then \
|
||||
${CP} -p ${PREFIX}/etc/yum/yum-updatesd.conf.sample ${PREFIX}/etc/yum/yum-updatesd.conf; \
|
||||
fi
|
||||
|
||||
.include <bsd.port.mk>
|
2
sysutils/yum/distinfo
Normal file
2
sysutils/yum/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (yum-3.4.3.tar.gz) = 0178f97820ced9bfbcc269e6fc3ea35e29e35e2d263d24c7bff8660ee62d37ca
|
||||
SIZE (yum-3.4.3.tar.gz) = 1140370
|
61
sysutils/yum/files/patch-Makefile
Normal file
61
sysutils/yum/files/patch-Makefile
Normal file
@ -0,0 +1,61 @@
|
||||
--- Makefile.orig 2010-05-06 16:54:46.000000000 +0200
|
||||
+++ Makefile 2010-08-22 14:31:31.000000000 +0200
|
||||
@@ -7,36 +7,39 @@
|
||||
VERSION=$(shell awk '/Version:/ { print $$2 }' ${PKGNAME}.spec)
|
||||
RELEASE=$(shell awk '/Release:/ { print $$2 }' ${PKGNAME}.spec)
|
||||
CVSTAG=yum-$(subst .,_,$(VERSION)-$(RELEASE))
|
||||
+MAKE=make
|
||||
PYTHON=python
|
||||
WEBHOST = yum.baseurl.org
|
||||
WEB_DOC_PATH = /srv/projects/yum/web/download/docs/yum-api/
|
||||
|
||||
+prefix = /usr
|
||||
+
|
||||
all: subdirs
|
||||
|
||||
clean:
|
||||
rm -f *.pyc *.pyo *~ *.bak
|
||||
- for d in $(SUBDIRS); do make -C $$d clean ; done
|
||||
+ for d in $(SUBDIRS); do $(MAKE) -C $$d clean ; done
|
||||
cd test; rm -f *.pyc *.pyo *~ *.bak
|
||||
|
||||
subdirs:
|
||||
- for d in $(SUBDIRS); do make PYTHON=$(PYTHON) -C $$d; [ $$? = 0 ] || exit 1 ; done
|
||||
+ for d in $(SUBDIRS); do $(MAKE) PYTHON=$(PYTHON) -C $$d; [ $$? = 0 ] || exit 1 ; done
|
||||
|
||||
install:
|
||||
- mkdir -p $(DESTDIR)/usr/share/yum-cli
|
||||
+ mkdir -p $(DESTDIR)$(prefix)/share/yum-cli
|
||||
for p in $(PYFILES) ; do \
|
||||
- install -m 644 $$p $(DESTDIR)/usr/share/yum-cli/$$p; \
|
||||
+ install -m 644 $$p $(DESTDIR)$(prefix)/share/yum-cli/$$p; \
|
||||
done
|
||||
- mv $(DESTDIR)/usr/share/yum-cli/yum-updatesd.py $(DESTDIR)/usr/share/yum-cli/yumupd.py
|
||||
- $(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)/usr/share/yum-cli', 1, '$(PYDIR)', 1)"
|
||||
+ mv $(DESTDIR)$(prefix)/share/yum-cli/yum-updatesd.py $(DESTDIR)$(prefix)/share/yum-cli/yumupd.py
|
||||
+ $(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)$(prefix)/share/yum-cli', 1, '$(PYDIR)', 1)"
|
||||
|
||||
- mkdir -p $(DESTDIR)/usr/bin $(DESTDIR)/usr/sbin
|
||||
- install -m 755 bin/yum.py $(DESTDIR)/usr/bin/yum
|
||||
- install -m 755 bin/yum-updatesd.py $(DESTDIR)/usr/sbin/yum-updatesd
|
||||
+ mkdir -p $(DESTDIR)$(prefix)/bin $(DESTDIR)$(prefix)/sbin
|
||||
+ install -m 755 bin/yum.py $(DESTDIR)$(prefix)/bin/yum
|
||||
+ install -m 755 bin/yum-updatesd.py $(DESTDIR)$(prefix)/sbin/yum-updatesd
|
||||
|
||||
mkdir -p $(DESTDIR)/var/cache/yum
|
||||
mkdir -p $(DESTDIR)/var/lib/yum
|
||||
|
||||
- for d in $(SUBDIRS); do make PYTHON=$(PYTHON) DESTDIR=`cd $(DESTDIR); pwd` -C $$d install; [ $$? = 0 ] || exit 1; done
|
||||
+ for d in $(SUBDIRS); do $(MAKE) PYTHON=$(PYTHON) DESTDIR=`if [ ! -z "$(DESTDIR)" ]; then cd $(DESTDIR); pwd; fi` -C $$d install; [ $$? = 0 ] || exit 1; done
|
||||
|
||||
.PHONY: docs test
|
||||
|
||||
@@ -64,7 +67,7 @@
|
||||
test:
|
||||
@nosetests -i ".*test" test
|
||||
-@test/check-po-yes-no.py
|
||||
- cd po; make test
|
||||
+ cd po; $(MAKE) test
|
||||
|
||||
test-skipbroken:
|
||||
@nosetests -i ".*test" test/skipbroken-tests.py
|
11
sysutils/yum/files/patch-bin-yum-updatesd.py
Normal file
11
sysutils/yum/files/patch-bin-yum-updatesd.py
Normal file
@ -0,0 +1,11 @@
|
||||
--- bin/yum-updatesd.py.orig 2010-08-22 12:58:40.000000000 +0200
|
||||
+++ bin/yum-updatesd.py 2010-08-22 12:59:38.000000000 +0200
|
||||
@@ -16,7 +16,7 @@
|
||||
os.dup2(fd, 2)
|
||||
os.close(fd)
|
||||
|
||||
-sys.path.insert(0, '/usr/share/yum-cli')
|
||||
+sys.path.insert(0, '@PREFIX@/share/yum-cli')
|
||||
try:
|
||||
import yumupd
|
||||
yumupd.main(options)
|
11
sysutils/yum/files/patch-bin-yum.py
Normal file
11
sysutils/yum/files/patch-bin-yum.py
Normal file
@ -0,0 +1,11 @@
|
||||
--- bin/yum.py.orig 2010-05-06 16:54:46.000000000 +0200
|
||||
+++ bin/yum.py 2010-08-22 12:55:43.000000000 +0200
|
||||
@@ -23,7 +23,7 @@
|
||||
""" % (sys.exc_value, sys.version)
|
||||
sys.exit(1)
|
||||
|
||||
-sys.path.insert(0, '/usr/share/yum-cli')
|
||||
+sys.path.insert(0, '@PREFIX@/share/yum-cli')
|
||||
try:
|
||||
import yummain
|
||||
yummain.user_main(sys.argv[1:], exit_code=True)
|
26
sysutils/yum/files/patch-cli.py
Normal file
26
sysutils/yum/files/patch-cli.py
Normal file
@ -0,0 +1,26 @@
|
||||
--- cli.py.orig 2010-07-07 20:46:08.000000000 +0200
|
||||
+++ cli.py 2010-08-22 13:35:53.000000000 +0200
|
||||
@@ -1412,10 +1412,10 @@
|
||||
if opts.installroot:
|
||||
if os.access(opts.installroot+'/'+opts.conffile, os.R_OK):
|
||||
opts.conffile = opts.installroot+'/'+opts.conffile
|
||||
- elif opts.conffile == '/etc/yum/yum.conf':
|
||||
- # check if /installroot/etc/yum.conf exists.
|
||||
- if os.access(opts.installroot+'/etc/yum.conf', os.R_OK):
|
||||
- opts.conffile = opts.installroot+'/etc/yum.conf'
|
||||
+ elif opts.conffile == '@PREFIX@/etc/yum/yum.conf':
|
||||
+ # check if /installroot@PREFIX@/etc/yum.conf exists.
|
||||
+ if os.access(opts.installroot+'@PREFIX@/etc/yum.conf', os.R_OK):
|
||||
+ opts.conffile = opts.installroot+'@PREFIX@/etc/yum.conf'
|
||||
root=opts.installroot
|
||||
else:
|
||||
root = '/'
|
||||
@@ -1456,7 +1456,7 @@
|
||||
action="store_true",
|
||||
help=_("run entirely from system cache, don't update cache"))
|
||||
group.add_option("-c", "--config", dest="conffile",
|
||||
- default='/etc/yum/yum.conf',
|
||||
+ default='@PREFIX@/etc/yum/yum.conf',
|
||||
help=_("config file location"), metavar='[config file]')
|
||||
group.add_option("-R", "--randomwait", dest="sleeptime", type='int',
|
||||
default=None,
|
28
sysutils/yum/files/patch-docs-Makefile
Normal file
28
sysutils/yum/files/patch-docs-Makefile
Normal file
@ -0,0 +1,28 @@
|
||||
--- docs/Makefile.orig 2010-05-06 16:54:46.000000000 +0200
|
||||
+++ docs/Makefile 2010-08-22 11:56:34.000000000 +0200
|
||||
@@ -1,3 +1,7 @@
|
||||
+prefix = /usr
|
||||
+
|
||||
+mandir = $(prefix)/share/man
|
||||
+
|
||||
all:
|
||||
echo "Nothing to do"
|
||||
|
||||
@@ -6,10 +10,10 @@
|
||||
rm -fr epydoc
|
||||
|
||||
install:
|
||||
- mkdir -p $(DESTDIR)/usr/share/man/man5
|
||||
- mkdir -p $(DESTDIR)/usr/share/man/man8
|
||||
- install -m 644 yum.8 $(DESTDIR)/usr/share/man/man8/yum.8
|
||||
- install -m 644 yum-shell.8 $(DESTDIR)/usr/share/man/man8/yum-shell.8
|
||||
- install -m 644 yum.conf.5 $(DESTDIR)/usr/share/man/man5/yum.conf.5
|
||||
- install -m 644 yum-updatesd.8 $(DESTDIR)/usr/share/man/man8/yum-updatesd.8
|
||||
- install -m 644 yum-updatesd.conf.5 $(DESTDIR)/usr/share/man/man5/yum-updatesd.conf.5
|
||||
+ mkdir -p $(DESTDIR)$(mandir)/man5
|
||||
+ mkdir -p $(DESTDIR)$(mandir)/man8
|
||||
+ install -m 644 yum.8 $(DESTDIR)$(mandir)/man8/yum.8
|
||||
+ install -m 644 yum-shell.8 $(DESTDIR)$(mandir)/man8/yum-shell.8
|
||||
+ install -m 644 yum.conf.5 $(DESTDIR)$(mandir)/man5/yum.conf.5
|
||||
+ install -m 644 yum-updatesd.8 $(DESTDIR)$(mandir)/man8/yum-updatesd.8
|
||||
+ install -m 644 yum-updatesd.conf.5 $(DESTDIR)$(mandir)/man5/yum-updatesd.conf.5
|
67
sysutils/yum/files/patch-etc-Makefile
Normal file
67
sysutils/yum/files/patch-etc-Makefile
Normal file
@ -0,0 +1,67 @@
|
||||
--- etc/Makefile.orig 2011-01-12 22:46:01.000000000 +0100
|
||||
+++ etc/Makefile 2011-06-07 23:55:37.000000000 +0200
|
||||
@@ -1,4 +1,8 @@
|
||||
-YUMETC=$(DESTDIR)/etc/yum
|
||||
+prefix = /usr
|
||||
+
|
||||
+sysconfdir = /etc
|
||||
+
|
||||
+YUMETC=$(DESTDIR)$(sysconfdir)/yum
|
||||
|
||||
all:
|
||||
echo "Nothing to do"
|
||||
@@ -7,32 +11,32 @@
|
||||
rm -f *.pyc *.pyo *~
|
||||
|
||||
install:
|
||||
- mkdir -p $(DESTDIR)/etc/yum/
|
||||
- mkdir -p $(DESTDIR)/etc/yum/protected.d
|
||||
- mkdir -p $(DESTDIR)/etc/yum/repos.d
|
||||
- mkdir -p $(DESTDIR)/etc/yum/vars
|
||||
+ mkdir -p $(DESTDIR)$(sysconfdir)/yum/
|
||||
+ mkdir -p $(DESTDIR)$(sysconfdir)/yum/protected.d
|
||||
+ mkdir -p $(DESTDIR)$(sysconfdir)/yum/repos.d
|
||||
+ mkdir -p $(DESTDIR)$(sysconfdir)/yum/vars
|
||||
|
||||
- install -m 644 yum.conf $(YUMETC)/yum.conf
|
||||
+ install -m 644 yum.conf $(YUMETC)/yum.conf.sample
|
||||
|
||||
install -m 644 version-groups.conf $(YUMETC)/version-groups.conf
|
||||
|
||||
- mkdir -p $(DESTDIR)/etc/logrotate.d
|
||||
- install -m 644 yum.logrotate $(DESTDIR)/etc/logrotate.d/yum
|
||||
+ mkdir -p $(DESTDIR)$(sysconfdir)/logrotate.d
|
||||
+ install -m 644 yum.logrotate $(DESTDIR)$(sysconfdir)/logrotate.d/yum
|
||||
|
||||
- mkdir -p $(DESTDIR)/etc/rc.d/init.d
|
||||
- install -m 755 yum-updatesd.init $(DESTDIR)/etc/rc.d/init.d/yum-updatesd
|
||||
+ mkdir -p $(DESTDIR)$(sysconfdir)/rc.d/init.d
|
||||
+ install -m 755 yum-updatesd.init $(DESTDIR)$(sysconfdir)/rc.d/init.d/yum-updatesd
|
||||
|
||||
- mkdir -p $(DESTDIR)/etc/dbus-1/system.d/
|
||||
- install -m 755 yum-updatesd-dbus.conf $(DESTDIR)/etc/dbus-1/system.d/yum-updatesd.conf
|
||||
+ mkdir -p $(DESTDIR)$(sysconfdir)/dbus-1/system.d/
|
||||
+ install -m 755 yum-updatesd-dbus.conf $(DESTDIR)$(sysconfdir)/dbus-1/system.d/yum-updatesd.conf
|
||||
|
||||
- install -m 755 yum-updatesd.conf $(DESTDIR)/etc/yum/yum-updatesd.conf
|
||||
-
|
||||
- mkdir -p $(DESTDIR)/etc/bash_completion.d
|
||||
- install -m 644 yum.bash $(DESTDIR)/etc/bash_completion.d
|
||||
- mkdir -p $(DESTDIR)/etc/cron.daily
|
||||
- mkdir -p $(DESTDIR)/etc/sysconfig/
|
||||
- install -D -m 755 0yum.cron $(DESTDIR)/etc/cron.daily/0yum.cron
|
||||
- install -D -m 755 yum-cron $(DESTDIR)/etc/rc.d/init.d/yum-cron
|
||||
- install -D -m 644 yum-daily.yum $(YUMETC)/yum-daily.yum
|
||||
- install -D -m 644 yum-weekly.yum $(YUMETC)/yum-weekly.yum
|
||||
- install -D -m 644 yum-cron.sysconf $(DESTDIR)/etc/sysconfig/yum-cron
|
||||
+ install -m 755 yum-updatesd.conf $(DESTDIR)$(sysconfdir)/yum/yum-updatesd.conf.sample
|
||||
+
|
||||
+ mkdir -p $(DESTDIR)$(sysconfdir)/bash_completion.d
|
||||
+ install -m 644 yum.bash $(DESTDIR)$(sysconfdir)/bash_completion.d
|
||||
+ #mkdir -p $(DESTDIR)/etc/cron.daily
|
||||
+ #mkdir -p $(DESTDIR)/etc/sysconfig/
|
||||
+ #install -D -m 755 0yum.cron $(DESTDIR)/etc/cron.daily/0yum.cron
|
||||
+ #install -D -m 755 yum-cron $(DESTDIR)/etc/rc.d/init.d/yum-cron
|
||||
+ #install -D -m 644 yum-daily.yum $(YUMETC)/yum-daily.yum
|
||||
+ #install -D -m 644 yum-weekly.yum $(YUMETC)/yum-weekly.yum
|
||||
+ #install -D -m 644 yum-cron.sysconf $(DESTDIR)/etc/sysconfig/yum-cron
|
20
sysutils/yum/files/patch-po-Makefile
Normal file
20
sysutils/yum/files/patch-po-Makefile
Normal file
@ -0,0 +1,20 @@
|
||||
--- po/Makefile.orig 2010-05-06 16:54:46.000000000 +0200
|
||||
+++ po/Makefile 2011-06-08 17:19:11.000000000 +0200
|
||||
@@ -1,7 +1,9 @@
|
||||
+localedir = share/locale
|
||||
+
|
||||
INSTALL= /usr/bin/install -c
|
||||
INSTALL_PROGRAM= ${INSTALL}
|
||||
INSTALL_DATA= ${INSTALL} -m 644
|
||||
-INSTALLNLSDIR=$(DESTDIR)/usr/share/locale
|
||||
+INSTALLNLSDIR=$(DESTDIR)$(localedir)
|
||||
top_srcdir = "."
|
||||
|
||||
|
||||
@@ -77,4 +79,4 @@
|
||||
msgfmt -c $$n; \
|
||||
done
|
||||
|
||||
-
|
||||
\ No newline at end of file
|
||||
+
|
14
sysutils/yum/files/patch-rpmUtils_Makefile
Normal file
14
sysutils/yum/files/patch-rpmUtils_Makefile
Normal file
@ -0,0 +1,14 @@
|
||||
--- rpmUtils/Makefile.orig 2011-06-08 17:10:50.000000000 +0200
|
||||
+++ rpmUtils/Makefile 2011-06-08 17:11:49.000000000 +0200
|
||||
@@ -1,10 +1,7 @@
|
||||
PYTHON=python
|
||||
PACKAGE = $(shell basename `pwd`)
|
||||
PYFILES = $(wildcard *.py)
|
||||
-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 = %%PYTHONPREFIX_SITELIBDIR%%/$(PACKAGE)
|
||||
|
||||
all:
|
||||
echo "Nothing to do"
|
32
sysutils/yum/files/patch-yum-__init__.py
Normal file
32
sysutils/yum/files/patch-yum-__init__.py
Normal file
@ -0,0 +1,32 @@
|
||||
--- yum/__init__.py.orig 2010-07-30 21:59:10.000000000 +0200
|
||||
+++ yum/__init__.py 2010-08-22 13:33:50.000000000 +0200
|
||||
@@ -92,7 +92,7 @@
|
||||
you tweak it here, and when yb.conf does it's thing ... it happens. """
|
||||
|
||||
def __init__(self):
|
||||
- self.fn = '/etc/yum/yum.conf'
|
||||
+ self.fn = '@PREFIX@/etc/yum/yum.conf'
|
||||
self.root = '/'
|
||||
self.init_plugins = True
|
||||
self.plugin_types = (plugins.TYPE_CORE,)
|
||||
@@ -208,7 +208,7 @@
|
||||
self.preconf.init_plugins = False
|
||||
self.conf.cache = cache
|
||||
|
||||
- def doConfigSetup(self, fn='/etc/yum/yum.conf', root='/', init_plugins=True,
|
||||
+ def doConfigSetup(self, fn='@PREFIX@/etc/yum/yum.conf', root='/', init_plugins=True,
|
||||
plugin_types=(plugins.TYPE_CORE,), optparser=None, debuglevel=None,
|
||||
errorlevel=None):
|
||||
warnings.warn(_('doConfigSetup() will go away in a future version of Yum.\n'),
|
||||
@@ -270,9 +270,9 @@
|
||||
|
||||
# TODO: Remove this block when we no longer support configs outside
|
||||
# of /etc/yum/
|
||||
- if fn == '/etc/yum/yum.conf' and not os.path.exists(fn):
|
||||
+ if fn == '@PREFIX@/etc/yum/yum.conf' and not os.path.exists(fn):
|
||||
# Try the old default
|
||||
- fn = '/etc/yum.conf'
|
||||
+ fn = '@PREFIX@/etc/yum.conf'
|
||||
|
||||
startupconf = config.readStartupConfig(fn, root)
|
||||
startupconf.arch = arch
|
61
sysutils/yum/files/patch-yum-config.py
Normal file
61
sysutils/yum/files/patch-yum-config.py
Normal file
@ -0,0 +1,61 @@
|
||||
--- yum/config.py.orig 2010-06-17 17:24:18.000000000 +0200
|
||||
+++ yum/config.py 2010-08-22 13:27:21.000000000 +0200
|
||||
@@ -614,10 +614,10 @@
|
||||
|
||||
distroverpkg = Option('redhat-release')
|
||||
installroot = Option('/')
|
||||
- config_file_path = Option('/etc/yum/yum.conf')
|
||||
+ config_file_path = Option('@PREFIX@/etc/yum/yum.conf')
|
||||
plugins = BoolOption(False)
|
||||
- pluginpath = ListOption(['/usr/share/yum-plugins', '/usr/lib/yum-plugins'])
|
||||
- pluginconfpath = ListOption(['/etc/yum/pluginconf.d'])
|
||||
+ pluginpath = ListOption(['@PREFIX@/share/yum-plugins', '@PREFIX@/lib/yum-plugins'])
|
||||
+ pluginconfpath = ListOption(['@PREFIX@/etc/yum/pluginconf.d'])
|
||||
gaftonmode = BoolOption(False)
|
||||
syslog_ident = Option()
|
||||
syslog_facility = Option('LOG_USER')
|
||||
@@ -637,7 +637,7 @@
|
||||
|
||||
keepcache = BoolOption(True)
|
||||
logfile = Option('/var/log/yum.log')
|
||||
- reposdir = ListOption(['/etc/yum/repos.d', '/etc/yum.repos.d'])
|
||||
+ reposdir = ListOption(['@PREFIX@/etc/yum/repos.d', '@PREFIX@/etc/yum.repos.d'])
|
||||
|
||||
commands = ListOption()
|
||||
exclude = ListOption()
|
||||
@@ -733,7 +733,7 @@
|
||||
|
||||
rpmverbosity = Option('info')
|
||||
|
||||
- protected_packages = ListOption("yum, glob:/etc/yum/protected.d/*.conf",
|
||||
+ protected_packages = ListOption("yum, glob:@PREFIX@/etc/yum/protected.d/*.conf",
|
||||
parse_default=True)
|
||||
exit_on_lock = BoolOption(False)
|
||||
|
||||
@@ -898,7 +898,7 @@
|
||||
|
||||
# Read the FS yumvars
|
||||
try:
|
||||
- dir_fsvars = yumconf.installroot + "/etc/yum/vars/"
|
||||
+ dir_fsvars = yumconf.installroot + "@PREFIX@/etc/yum/vars/"
|
||||
fsvars = os.listdir(dir_fsvars)
|
||||
except OSError:
|
||||
fsvars = []
|
||||
@@ -936,7 +936,7 @@
|
||||
|
||||
return yumconf
|
||||
|
||||
-def readVersionGroupsConfig(configfile="/etc/yum/version-groups.conf"):
|
||||
+def readVersionGroupsConfig(configfile="@PREFIX@/etc/yum/version-groups.conf"):
|
||||
parser = ConfigParser()
|
||||
confpp_obj = ConfigPreProcessor(configfile)
|
||||
try:
|
||||
@@ -1048,7 +1048,7 @@
|
||||
fp.close()
|
||||
|
||||
#def main():
|
||||
-# mainconf = readMainConfig(readStartupConfig('/etc/yum/yum.conf', '/'))
|
||||
+# mainconf = readMainConfig(readStartupConfig('@PREFIX@/etc/yum/yum.conf', '/'))
|
||||
# print mainconf.cachedir
|
||||
#
|
||||
#if __name__ == '__main__':
|
23
sysutils/yum/files/patch-yum-packages.py
Normal file
23
sysutils/yum/files/patch-yum-packages.py
Normal file
@ -0,0 +1,23 @@
|
||||
--- yum/packages.py.orig
|
||||
+++ yum/packages.py
|
||||
@@ -1353,11 +1353,14 @@
|
||||
is a pre-requires or a not"""
|
||||
# FIXME this should probably be put in rpmUtils.miscutils since
|
||||
# - that's what it is
|
||||
+ RPMSENSE_PREREQ = (1 << 6)
|
||||
+ RPMSENSE_SCRIPT_PRE = (1 << 9)
|
||||
+ RPMSENSE_SCRIPT_POST = (1 << 10)
|
||||
if flag is not None:
|
||||
# Note: RPMSENSE_PREREQ == 0 since rpm-4.4'ish
|
||||
- if flag & (rpm.RPMSENSE_PREREQ |
|
||||
- rpm.RPMSENSE_SCRIPT_PRE |
|
||||
- rpm.RPMSENSE_SCRIPT_POST):
|
||||
+ if flag & (RPMSENSE_PREREQ |
|
||||
+ RPMSENSE_SCRIPT_PRE |
|
||||
+ RPMSENSE_SCRIPT_POST):
|
||||
return 1
|
||||
return 0
|
||||
|
||||
--
|
||||
1.6.0.2
|
||||
|
11
sysutils/yum/files/patch-yum-plugins.py
Normal file
11
sysutils/yum/files/patch-yum-plugins.py
Normal file
@ -0,0 +1,11 @@
|
||||
--- yum/plugins.py.orig 2010-07-06 17:46:39.000000000 +0200
|
||||
+++ yum/plugins.py 2010-08-22 13:36:48.000000000 +0200
|
||||
@@ -135,7 +135,7 @@
|
||||
files. Defaults to "/etc/yum/pluginconf.d".
|
||||
'''
|
||||
if not pluginconfpath:
|
||||
- pluginconfpath = ['/etc/yum/pluginconf.d']
|
||||
+ pluginconfpath = ['@PREFIX@/etc/yum/pluginconf.d']
|
||||
|
||||
self.searchpath = searchpath
|
||||
self.pluginconfpath = pluginconfpath
|
19
sysutils/yum/files/patch-yum-rpmsack.py
Normal file
19
sysutils/yum/files/patch-yum-rpmsack.py
Normal file
@ -0,0 +1,19 @@
|
||||
--- yum/rpmsack.py.orig 2010-07-26 23:04:25.000000000 +0200
|
||||
+++ yum/rpmsack.py 2010-08-22 15:38:07.000000000 +0200
|
||||
@@ -894,7 +894,7 @@
|
||||
# http://lists.rpm.org/pipermail/rpm-maint/2007-November/001719.html
|
||||
# ...if anything gets implemented, we should change.
|
||||
rpmdbvfname = self._cachedir + "/version"
|
||||
- rpmdbfname = self.root + "/var/lib/rpm/Packages"
|
||||
+ rpmdbfname = self.root + "@RPMDIR@/Packages"
|
||||
|
||||
if os.path.exists(rpmdbvfname) and os.path.exists(rpmdbfname):
|
||||
# See if rpmdb has "changed" ...
|
||||
@@ -1428,6 +1428,7 @@
|
||||
self.conf.writable = False
|
||||
|
||||
self._packages = {} # pkgid = dir
|
||||
+ self.yumdb_cache = None
|
||||
if not os.path.exists(self.conf.db_path):
|
||||
try:
|
||||
os.makedirs(self.conf.db_path)
|
15
sysutils/yum/files/patch-yum-updatesd.py
Normal file
15
sysutils/yum/files/patch-yum-updatesd.py
Normal file
@ -0,0 +1,15 @@
|
||||
--- yum-updatesd.py.orig 2010-05-06 16:54:46.000000000 +0200
|
||||
+++ yum-updatesd.py 2010-08-22 13:29:51.000000000 +0200
|
||||
@@ -53,10 +53,10 @@
|
||||
from yum.update_md import UpdateMetadata
|
||||
|
||||
# FIXME: is it really sane to use this from here?
|
||||
-sys.path.append('/usr/share/yum-cli')
|
||||
+sys.path.append('@PREFIX@/share/yum-cli')
|
||||
import callback
|
||||
|
||||
-config_file = '/etc/yum/yum-updatesd.conf'
|
||||
+config_file = '@PREFIX@/etc/yum/yum-updatesd.conf'
|
||||
initial_directory = os.getcwd()
|
||||
|
||||
class UpdateEmitter(object):
|
14
sysutils/yum/files/patch-yum_Makefile
Normal file
14
sysutils/yum/files/patch-yum_Makefile
Normal file
@ -0,0 +1,14 @@
|
||||
--- yum/Makefile.orig 2011-06-08 17:12:12.000000000 +0200
|
||||
+++ yum/Makefile 2011-06-08 17:12:27.000000000 +0200
|
||||
@@ -1,10 +1,7 @@
|
||||
PYTHON=python
|
||||
PACKAGE = $(shell basename `pwd`)
|
||||
PYFILES = $(wildcard *.py)
|
||||
-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 = %%PYTHONPREFIX_SITELIBDIR%%/$(PACKAGE)
|
||||
|
||||
all:
|
||||
echo "Nothing to do"
|
5
sysutils/yum/pkg-descr
Normal file
5
sysutils/yum/pkg-descr
Normal file
@ -0,0 +1,5 @@
|
||||
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.
|
||||
|
||||
WWW: http://yum.baseurl.org/
|
146
sysutils/yum/pkg-plist
Normal file
146
sysutils/yum/pkg-plist
Normal file
@ -0,0 +1,146 @@
|
||||
bin/yum
|
||||
sbin/yum-updatesd
|
||||
share/yum-cli/callback.py
|
||||
share/yum-cli/callback.pyc
|
||||
share/yum-cli/cli.py
|
||||
share/yum-cli/cli.pyc
|
||||
share/yum-cli/output.py
|
||||
share/yum-cli/output.pyc
|
||||
share/yum-cli/shell.py
|
||||
share/yum-cli/shell.pyc
|
||||
share/yum-cli/utils.py
|
||||
share/yum-cli/utils.pyc
|
||||
share/yum-cli/yumcommands.py
|
||||
share/yum-cli/yumcommands.pyc
|
||||
share/yum-cli/yummain.py
|
||||
share/yum-cli/yummain.pyc
|
||||
share/yum-cli/yumupd.py
|
||||
share/yum-cli/yumupd.pyc
|
||||
%%PYTHON_SITELIBDIR%%/rpmUtils/__init__.py
|
||||
%%PYTHON_SITELIBDIR%%/rpmUtils/__init__.pyc
|
||||
%%PYTHON_SITELIBDIR%%/rpmUtils/arch.py
|
||||
%%PYTHON_SITELIBDIR%%/rpmUtils/arch.pyc
|
||||
%%PYTHON_SITELIBDIR%%/rpmUtils/miscutils.py
|
||||
%%PYTHON_SITELIBDIR%%/rpmUtils/miscutils.pyc
|
||||
%%PYTHON_SITELIBDIR%%/rpmUtils/oldUtils.py
|
||||
%%PYTHON_SITELIBDIR%%/rpmUtils/oldUtils.pyc
|
||||
%%PYTHON_SITELIBDIR%%/rpmUtils/transaction.py
|
||||
%%PYTHON_SITELIBDIR%%/rpmUtils/transaction.pyc
|
||||
%%PYTHON_SITELIBDIR%%/rpmUtils/updates.py
|
||||
%%PYTHON_SITELIBDIR%%/rpmUtils/updates.pyc
|
||||
%%PYTHON_SITELIBDIR%%/yum/Errors.py
|
||||
%%PYTHON_SITELIBDIR%%/yum/Errors.pyc
|
||||
%%PYTHON_SITELIBDIR%%/yum/__init__.py
|
||||
%%PYTHON_SITELIBDIR%%/yum/__init__.pyc
|
||||
%%PYTHON_SITELIBDIR%%/yum/callbacks.py
|
||||
%%PYTHON_SITELIBDIR%%/yum/callbacks.pyc
|
||||
%%PYTHON_SITELIBDIR%%/yum/comps.py
|
||||
%%PYTHON_SITELIBDIR%%/yum/comps.pyc
|
||||
%%PYTHON_SITELIBDIR%%/yum/config.py
|
||||
%%PYTHON_SITELIBDIR%%/yum/config.pyc
|
||||
%%PYTHON_SITELIBDIR%%/yum/constants.py
|
||||
%%PYTHON_SITELIBDIR%%/yum/constants.pyc
|
||||
%%PYTHON_SITELIBDIR%%/yum/depsolve.py
|
||||
%%PYTHON_SITELIBDIR%%/yum/depsolve.pyc
|
||||
%%PYTHON_SITELIBDIR%%/yum/failover.py
|
||||
%%PYTHON_SITELIBDIR%%/yum/failover.pyc
|
||||
%%PYTHON_SITELIBDIR%%/yum/history.py
|
||||
%%PYTHON_SITELIBDIR%%/yum/history.pyc
|
||||
%%PYTHON_SITELIBDIR%%/yum/i18n.py
|
||||
%%PYTHON_SITELIBDIR%%/yum/i18n.pyc
|
||||
%%PYTHON_SITELIBDIR%%/yum/logginglevels.py
|
||||
%%PYTHON_SITELIBDIR%%/yum/logginglevels.pyc
|
||||
%%PYTHON_SITELIBDIR%%/yum/mdparser.py
|
||||
%%PYTHON_SITELIBDIR%%/yum/mdparser.pyc
|
||||
%%PYTHON_SITELIBDIR%%/yum/metalink.py
|
||||
%%PYTHON_SITELIBDIR%%/yum/metalink.pyc
|
||||
%%PYTHON_SITELIBDIR%%/yum/misc.py
|
||||
%%PYTHON_SITELIBDIR%%/yum/misc.pyc
|
||||
%%PYTHON_SITELIBDIR%%/yum/packageSack.py
|
||||
%%PYTHON_SITELIBDIR%%/yum/packageSack.pyc
|
||||
%%PYTHON_SITELIBDIR%%/yum/packages.py
|
||||
%%PYTHON_SITELIBDIR%%/yum/packages.pyc
|
||||
%%PYTHON_SITELIBDIR%%/yum/parser.py
|
||||
%%PYTHON_SITELIBDIR%%/yum/parser.pyc
|
||||
%%PYTHON_SITELIBDIR%%/yum/pgpmsg.py
|
||||
%%PYTHON_SITELIBDIR%%/yum/pgpmsg.pyc
|
||||
%%PYTHON_SITELIBDIR%%/yum/pkgtag_db.py
|
||||
%%PYTHON_SITELIBDIR%%/yum/pkgtag_db.pyc
|
||||
%%PYTHON_SITELIBDIR%%/yum/plugins.py
|
||||
%%PYTHON_SITELIBDIR%%/yum/plugins.pyc
|
||||
%%PYTHON_SITELIBDIR%%/yum/repoMDObject.py
|
||||
%%PYTHON_SITELIBDIR%%/yum/repoMDObject.pyc
|
||||
%%PYTHON_SITELIBDIR%%/yum/repos.py
|
||||
%%PYTHON_SITELIBDIR%%/yum/repos.pyc
|
||||
%%PYTHON_SITELIBDIR%%/yum/rpmsack.py
|
||||
%%PYTHON_SITELIBDIR%%/yum/rpmsack.pyc
|
||||
%%PYTHON_SITELIBDIR%%/yum/rpmtrans.py
|
||||
%%PYTHON_SITELIBDIR%%/yum/rpmtrans.pyc
|
||||
%%PYTHON_SITELIBDIR%%/yum/sqlitesack.py
|
||||
%%PYTHON_SITELIBDIR%%/yum/sqlitesack.pyc
|
||||
%%PYTHON_SITELIBDIR%%/yum/sqlutils.py
|
||||
%%PYTHON_SITELIBDIR%%/yum/sqlutils.pyc
|
||||
%%PYTHON_SITELIBDIR%%/yum/transactioninfo.py
|
||||
%%PYTHON_SITELIBDIR%%/yum/transactioninfo.pyc
|
||||
%%PYTHON_SITELIBDIR%%/yum/update_md.py
|
||||
%%PYTHON_SITELIBDIR%%/yum/update_md.pyc
|
||||
%%PYTHON_SITELIBDIR%%/yum/yumRepo.py
|
||||
%%PYTHON_SITELIBDIR%%/yum/yumRepo.pyc
|
||||
share/locale/bn_IN/LC_MESSAGES/yum.mo
|
||||
share/locale/ca/LC_MESSAGES/yum.mo
|
||||
share/locale/cs/LC_MESSAGES/yum.mo
|
||||
share/locale/da/LC_MESSAGES/yum.mo
|
||||
share/locale/de/LC_MESSAGES/yum.mo
|
||||
share/locale/el/LC_MESSAGES/yum.mo
|
||||
share/locale/en_GB/LC_MESSAGES/yum.mo
|
||||
share/locale/es/LC_MESSAGES/yum.mo
|
||||
share/locale/eu/LC_MESSAGES/yum.mo
|
||||
share/locale/fi/LC_MESSAGES/yum.mo
|
||||
share/locale/fr/LC_MESSAGES/yum.mo
|
||||
share/locale/gu/LC_MESSAGES/yum.mo
|
||||
share/locale/hi/LC_MESSAGES/yum.mo
|
||||
share/locale/hu/LC_MESSAGES/yum.mo
|
||||
share/locale/id/LC_MESSAGES/yum.mo
|
||||
share/locale/id_ID/LC_MESSAGES/yum.mo
|
||||
share/locale/it/LC_MESSAGES/yum.mo
|
||||
share/locale/ja/LC_MESSAGES/yum.mo
|
||||
share/locale/lt_LT/LC_MESSAGES/yum.mo
|
||||
share/locale/mr/LC_MESSAGES/yum.mo
|
||||
share/locale/ms/LC_MESSAGES/yum.mo
|
||||
share/locale/nb/LC_MESSAGES/yum.mo
|
||||
share/locale/pa/LC_MESSAGES/yum.mo
|
||||
share/locale/pl/LC_MESSAGES/yum.mo
|
||||
share/locale/pt/LC_MESSAGES/yum.mo
|
||||
share/locale/pt_BR/LC_MESSAGES/yum.mo
|
||||
share/locale/ru/LC_MESSAGES/yum.mo
|
||||
share/locale/sr/LC_MESSAGES/yum.mo
|
||||
share/locale/sr@latin/LC_MESSAGES/yum.mo
|
||||
share/locale/sv/LC_MESSAGES/yum.mo
|
||||
share/locale/uk/LC_MESSAGES/yum.mo
|
||||
share/locale/ur/LC_MESSAGES/yum.mo
|
||||
share/locale/zh_CN/LC_MESSAGES/yum.mo
|
||||
share/locale/zh_TW/LC_MESSAGES/yum.mo
|
||||
etc/logrotate.d/yum
|
||||
etc/rc.d/init.d/yum-updatesd
|
||||
etc/dbus-1/system.d/yum-updatesd.conf
|
||||
etc/bash_completion.d/yum.bash
|
||||
etc/yum/version-groups.conf
|
||||
etc/yum/yum.conf
|
||||
etc/yum/yum-updatesd.conf
|
||||
etc/yum/yum.conf.sample
|
||||
etc/yum/yum-updatesd.conf.sample
|
||||
@dirrm share/yum-cli
|
||||
@dirrm etc/yum/repos.d
|
||||
@dirrm etc/yum/vars
|
||||
@dirrm etc/yum/protected.d
|
||||
@dirrm etc/yum
|
||||
@dirrm %%PYTHON_SITELIBDIR%%/rpmUtils
|
||||
@dirrm %%PYTHON_SITELIBDIR%%/yum
|
||||
@dirrmtry etc/logrotate.d
|
||||
|
||||
@unexec if cmp -s %D/etc/yum/yum.conf.sample %D/etc/yum/yum.conf; then rm -f %D/etc/yum/yum.conf; fi
|
||||
@exec if [ ! -f %D/etc/yum/yum.conf ]; then cp -p %D/%F %B/yum.conf; fi
|
||||
@unexec if cmp -s %D/etc/yum/yum-updatesd.conf.sample %D/etc/yum/yum-updatesd.conf; then rm -f %D/etc/yum/yum-updatesd.conf; fi
|
||||
@exec if [ ! -f %D/etc/yum-updatesd/yum.conf ]; then cp -p %D/%F %B/yum-updatesd.conf; fi
|
||||
@unexec rmdir /var/cache/yum 2>&1 >/dev/null || true
|
||||
@unexec rmdir /var/lib/yum 2>&1 >/dev/null || true
|
Loading…
Reference in New Issue
Block a user