diff options
-rw-r--r-- | conf/checksums.ini | 2 | ||||
-rw-r--r-- | recipes/yum/createrepo-native/fix.patch | 17 | ||||
-rw-r--r-- | recipes/yum/createrepo-native/pathfix.patch | 81 | ||||
-rw-r--r-- | recipes/yum/createrepo-native_0.9.bb | 17 | ||||
-rw-r--r-- | recipes/yum/files/extract-postinst.awk | 11 | ||||
-rw-r--r-- | recipes/yum/files/hacks.patch | 81 | ||||
-rw-r--r-- | recipes/yum/files/paths.patch | 96 | ||||
-rw-r--r-- | recipes/yum/files/paths2.patch | 33 | ||||
-rwxr-xr-x | recipes/yum/files/yum-install-recommends.py | 39 | ||||
-rw-r--r-- | recipes/yum/yum-native_3.2.18.bb | 26 | ||||
-rw-r--r-- | recipes/yum/yum_3.2.18.bb | 32 |
11 files changed, 434 insertions, 1 deletions
diff --git a/conf/checksums.ini b/conf/checksums.ini index 18e4279d9c..0ffa03d076 100644 --- a/conf/checksums.ini +++ b/conf/checksums.ini @@ -3938,7 +3938,7 @@ sha256=133caca2c4e7c64106555154ee0ff693f5cf5beb9421ce2eb86baee997d22368 md5=d3912b9f7bf745fbfea68f6a9b9de30f sha256=133caca2c4e7c64106555154ee0ff693f5cf5beb9421ce2eb86baee997d22368 -[http://linux.duke.edu/projects/metadata/generate/createrepo-0.9.tar.gz] +[http://createrepo.baseurl.org/download/createrepo-0.9.tar.gz] md5=0a1b1e67e3c61cda41b41a8886a90e78 sha256=21786abe80f2c06eb9bef107d8c79f50a088a894cddf793112ce0417e83be531 diff --git a/recipes/yum/createrepo-native/fix.patch b/recipes/yum/createrepo-native/fix.patch new file mode 100644 index 0000000000..4fe58e379d --- /dev/null +++ b/recipes/yum/createrepo-native/fix.patch @@ -0,0 +1,17 @@ +--- + createrepo/yumbased.py | 2 ++ + 1 file changed, 2 insertions(+) + +Index: createrepo-0.9/createrepo/yumbased.py +=================================================================== +--- createrepo-0.9.orig/createrepo/yumbased.py 2008-08-26 11:41:13.000000000 +0100 ++++ createrepo-0.9/createrepo/yumbased.py 2008-08-26 11:37:01.000000000 +0100 +@@ -37,6 +37,8 @@ class CreateRepoPackage(YumLocalPackage) + self._hdrend = None + + def _xml(self, item): ++ if item == []: ++ return [] + return xml.sax.saxutils.escape(item) + + def _do_checksum(self): diff --git a/recipes/yum/createrepo-native/pathfix.patch b/recipes/yum/createrepo-native/pathfix.patch new file mode 100644 index 0000000000..a09a51ccc9 --- /dev/null +++ b/recipes/yum/createrepo-native/pathfix.patch @@ -0,0 +1,81 @@ +Index: createrepo-0.9/Makefile +=================================================================== +--- createrepo-0.9.orig/Makefile 2008-08-23 17:49:24.000000000 +0100 ++++ createrepo-0.9/Makefile 2008-08-23 17:52:01.000000000 +0100 +@@ -10,22 +10,6 @@ + SHELL = /bin/sh + top_srcdir = . + srcdir = . +-prefix = /usr +-exec_prefix = ${prefix} +- +-bindir = ${exec_prefix}/bin +-sbindir = ${exec_prefix}/sbin +-libexecdir = ${exec_prefix}/libexec +-datadir = ${prefix}/share +-sysconfdir = ${prefix}/etc +-sharedstatedir = ${prefix}/com +-localstatedir = ${prefix}/var +-libdir = ${exec_prefix}/lib +-infodir = ${prefix}/info +-docdir = +-includedir = ${prefix}/include +-oldincludedir = /usr/include +-mandir = ${prefix}/share/man + + pkgdatadir = $(datadir)/$(PKGNAME) + pkglibdir = $(libdir)/$(PKGNAME) +Index: createrepo-0.9/bin/Makefile +=================================================================== +--- createrepo-0.9.orig/bin/Makefile 2008-08-23 17:50:13.000000000 +0100 ++++ createrepo-0.9/bin/Makefile 2008-08-23 17:50:23.000000000 +0100 +@@ -1,22 +1,6 @@ + SHELL = /bin/sh + top_srcdir = .. + srcdir = ../bin +-prefix = /usr +-exec_prefix = ${prefix} +- +-bindir = ${exec_prefix}/bin +-sbindir = ${exec_prefix}/sbin +-libexecdir = ${exec_prefix}/libexec +-datadir = ${prefix}/share +-sysconfdir = ${prefix}/etc +-sharedstatedir = ${prefix}/com +-localstatedir = ${prefix}/var +-libdir = ${exec_prefix}/lib +-infodir = ${prefix}/info +-docdir = +-includedir = ${prefix}/include +-oldincludedir = /usr/include +-mandir = ${prefix}/man + + pkgdatadir = $(datadir)/$(PKGNAME) + pkglibdir = $(libdir)/$(PKGNAME) +Index: createrepo-0.9/docs/Makefile +=================================================================== +--- createrepo-0.9.orig/docs/Makefile 2008-08-23 17:52:42.000000000 +0100 ++++ createrepo-0.9/docs/Makefile 2008-08-23 17:52:50.000000000 +0100 +@@ -1,22 +1,6 @@ + SHELL = /bin/sh + top_srcdir = .. + srcdir = ../docs +-prefix = /usr +-exec_prefix = ${prefix} +- +-bindir = ${exec_prefix}/bin +-sbindir = ${exec_prefix}/sbin +-libexecdir = ${exec_prefix}/libexec +-datadir = ${prefix}/share +-sysconfdir = ${prefix}/etc +-sharedstatedir = ${prefix}/com +-localstatedir = ${prefix}/var +-libdir = ${exec_prefix}/lib +-infodir = ${prefix}/info +-docdir = +-includedir = ${prefix}/include +-oldincludedir = /usr/include +-mandir = ${datadir}/man + + pkgdatadir = $(datadir)/$(PKGNAME) + pkglibdir = $(libdir)/$(PKGNAME) diff --git a/recipes/yum/createrepo-native_0.9.bb b/recipes/yum/createrepo-native_0.9.bb new file mode 100644 index 0000000000..c634ecb746 --- /dev/null +++ b/recipes/yum/createrepo-native_0.9.bb @@ -0,0 +1,17 @@ +DEPENDS = "python-native" + +SRC_URI = "http://createrepo.baseurl.org/download/createrepo-${PV}.tar.gz \ + file://fix.patch;patch=1 \ + file://pathfix.patch;patch=1 " +PR = "r1" + +inherit autotools native + +S = "${WORKDIR}/createrepo-${PV}" + +do_compile_append () { + sed -e 's#exec /usr/share#exec ${datadir}#' -i ${S}/bin/createrepo + sed -e 's#exec /usr/share#exec ${datadir}#' -i ${S}/bin/modifyrepo + sed -e 's#!/usr/bin/python#!${bindir}/python#' -i ${S}/genpkgmetadata.py + sed -e 's#!/usr/bin/python#!${bindir}/python#' -i ${S}/modifyrepo.py +} diff --git a/recipes/yum/files/extract-postinst.awk b/recipes/yum/files/extract-postinst.awk new file mode 100644 index 0000000000..8f2836b32c --- /dev/null +++ b/recipes/yum/files/extract-postinst.awk @@ -0,0 +1,11 @@ +/Name:.*/ { + package = substr($0, 7) + next +} +/postinstall.*scriptlet .*/ { + next +} +{ + print $0 >> ENVIRON["D"] "/etc/rpm-postinsts/" package ".sh" +} + diff --git a/recipes/yum/files/hacks.patch b/recipes/yum/files/hacks.patch new file mode 100644 index 0000000000..61f477172c --- /dev/null +++ b/recipes/yum/files/hacks.patch @@ -0,0 +1,81 @@ +--- + rpmUtils/arch.py | 3 +++ + rpmUtils/transaction.py | 1 + + yum/constants.py | 2 +- + yum/depsolve.py | 2 ++ + 4 files changed, 7 insertions(+), 1 deletion(-) + +Index: yum-3.2.18/rpmUtils/arch.py +=================================================================== +--- yum-3.2.18.orig/rpmUtils/arch.py 2008-06-17 14:05:42.000000000 +0100 ++++ yum-3.2.18/rpmUtils/arch.py 2008-10-02 22:09:19.000000000 +0100 +@@ -275,6 +275,12 @@ + return arch + + def getCanonArch(skipRpmPlatform = 0): ++ import os ++ if 'YUM_ARCH_FORCE' in os.environ: ++ return os.environ['YUM_ARCH_FORCE'] ++ ++ sys.exit(1) ++ + if not skipRpmPlatform and os.access("/etc/rpm/platform", os.R_OK): + try: + f = open("/etc/rpm/platform", "r") +@@ -331,6 +338,12 @@ + base arch is the arch before noarch in the arches dict if myarch is not + a key in the multilibArches.""" + ++ import os ++ if 'YUM_ARCH_FORCE' in os.environ: ++ return os.environ['YUM_ARCH_FORCE'] ++ ++ sys.exit(1) ++ + if not myarch: + myarch = canonArch + +Index: yum-3.2.18/rpmUtils/transaction.py +=================================================================== +--- yum-3.2.18.orig/rpmUtils/transaction.py 2008-06-17 14:05:42.000000000 +0100 ++++ yum-3.2.18/rpmUtils/transaction.py 2008-10-02 17:09:57.000000000 +0100 +@@ -43,6 +43,7 @@ + 'clean'] + self.tsflags = [] + self.open = True ++ self.ts.setProbFilter(rpm.RPMPROB_FILTER_IGNOREOS | rpm.RPMPROB_FILTER_IGNOREARCH) + + def __del__(self): + # Automatically close the rpm transaction when the reference is lost +Index: yum-3.2.18/yum/constants.py +=================================================================== +--- yum-3.2.18.orig/yum/constants.py 2008-07-21 16:56:54.000000000 +0100 ++++ yum-3.2.18/yum/constants.py 2008-10-02 17:09:57.000000000 +0100 +@@ -17,7 +17,7 @@ + """ + + #Constants +-YUM_PID_FILE = '/var/run/yum.pid' ++YUM_PID_FILE = '/var/run2/yum.pid' + + #transaction set states + TS_UPDATE = 10 +Index: yum-3.2.18/yum/depsolve.py +=================================================================== +--- yum-3.2.18.orig/yum/depsolve.py 2008-08-06 17:05:16.000000000 +0100 ++++ yum-3.2.18/yum/depsolve.py 2008-10-02 17:09:57.000000000 +0100 +@@ -141,9 +141,14 @@ + else: + self.logger.critical(_('Invalid tsflag in config file: %s'), flag) + ++ self._ts.addTsFlag(rpm.RPMTRANS_FLAG_NOPOST) ++ self._ts.addTsFlag(rpm.RPMTRANS_FLAG_NOTRIGGERS) ++ + probfilter = 0 + for flag in self.tsInfo.probFilterFlags: + probfilter |= flag ++ probfilter |= rpm.RPMPROB_FILTER_IGNOREOS ++ probfilter |= rpm.RPMPROB_FILTER_IGNOREARCH + self._ts.setProbFilter(probfilter) + + def whatProvides(self, name, flags, version): diff --git a/recipes/yum/files/paths.patch b/recipes/yum/files/paths.patch new file mode 100644 index 0000000000..55e6a0a2ee --- /dev/null +++ b/recipes/yum/files/paths.patch @@ -0,0 +1,96 @@ +--- + Makefile | 18 +++++++++--------- + docs/Makefile | 12 ++++++------ + etc/Makefile | 20 ++++++++++---------- + 3 files changed, 25 insertions(+), 25 deletions(-) + +--- yum-3.2.18.orig/Makefile ++++ yum-3.2.18/Makefile +@@ -16,23 +16,23 @@ clean: + + subdirs: + 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)$(datadir)/yum-cli + for p in $(PYFILES) ; do \ +- install -m 644 $$p $(DESTDIR)/usr/share/yum-cli/$$p; \ ++ install -m 644 $$p $(DESTDIR)$(datadir)/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)$(datadir)/yum-cli/yum-updatesd.py $(DESTDIR)$(datadir)/yum-cli/yumupd.py ++ $(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)$(datadir)/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)$(bindir) $(DESTDIR)$(sbindir) ++ install -m 755 bin/yum.py $(DESTDIR)$(bindir)/yum ++ install -m 755 bin/yum-updatesd.py $(DESTDIR)$(sbindir)/yum-updatesd + +- mkdir -p $(DESTDIR)/var/cache/yum +- mkdir -p $(DESTDIR)/var/lib/yum ++ mkdir -p $(DESTDIR)$(localstatedir)/cache/yum ++ mkdir -p $(DESTDIR)$(localstatedir)/lib/yum + + for d in $(SUBDIRS); do make PYTHON=$(PYTHON) DESTDIR=`cd $(DESTDIR); pwd` -C $$d install; [ $$? = 0 ] || exit 1; done + + .PHONY: docs test + +--- yum-3.2.18.orig/docs/Makefile ++++ yum-3.2.18/docs/Makefile +@@ -4,11 +4,11 @@ all: + clean: + rm -f *.pyc *.pyo *~ + rm -fr epydoc + + install: +- mkdir -p $(DESTDIR)/usr/share/man/man{5,8} +- 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)/man{5,8} ++ 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 +--- yum-3.2.18.orig/etc/Makefile ++++ yum-3.2.18/etc/Makefile +@@ -3,22 +3,22 @@ all: + + clean: + rm -f *.pyc *.pyo *~ + + install: +- mkdir -p $(DESTDIR)/etc/yum/ +- mkdir -p $(DESTDIR)/etc/yum/repos.d ++ mkdir -p $(DESTDIR)$(sysconfdir)/yum/ ++ mkdir -p $(DESTDIR)$(sysconfdir)/yum/repos.d + +- install -m 644 yum.conf $(DESTDIR)/etc/yum/yum.conf ++ install -m 644 yum.conf $(DESTDIR)$(sysconfdir)/yum/yum.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 ++ install -m 755 yum-updatesd.conf $(DESTDIR)$(sysconfdir)/yum/yum-updatesd.conf + + diff --git a/recipes/yum/files/paths2.patch b/recipes/yum/files/paths2.patch new file mode 100644 index 0000000000..db614dfbbd --- /dev/null +++ b/recipes/yum/files/paths2.patch @@ -0,0 +1,33 @@ +--- + rpmUtils/Makefile | 2 +- + yum/Makefile | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- yum-3.2.18.orig/rpmUtils/Makefile ++++ yum-3.2.18/rpmUtils/Makefile +@@ -1,10 +1,10 @@ + 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') ++PYSYSDIR = $(prefix) + PYLIBDIR = $(PYSYSDIR)/lib/python$(PYVER) + PKGDIR = $(PYLIBDIR)/site-recipes/$(PACKAGE) + + all: + echo "Nothing to do" +--- yum-3.2.18.orig/yum/Makefile ++++ yum-3.2.18/yum/Makefile +@@ -1,10 +1,10 @@ + 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') ++PYSYSDIR = $(prefix) + PYLIBDIR = $(PYSYSDIR)/lib/python$(PYVER) + PKGDIR = $(PYLIBDIR)/site-recipes/$(PACKAGE) + + all: + echo "Nothing to do" diff --git a/recipes/yum/files/yum-install-recommends.py b/recipes/yum/files/yum-install-recommends.py new file mode 100755 index 0000000000..64716f2c3e --- /dev/null +++ b/recipes/yum/files/yum-install-recommends.py @@ -0,0 +1,39 @@ +#!/usr/bin/env python +import os, sys + +root = sys.argv[1] +installcmd = sys.argv[2] + +# +# Take an rpm image and look through for Recommends:. For each recommends +# found, try and install any matching packages including any Recommends for +# packages installed by us. +# + + +def get_recommends(): + deps = [] + output = os.popen("rpm --root %s -aq --recommends" % (root)) + lines = output.readlines() + for line in lines: + line = line.replace("(none)","") + if line: + deps.append(line.split()[0]) + return deps + +processed = [] + +while True: + toinstall = [] + recommends = set(get_recommends()) + for item in recommends: + if item not in processed: + toinstall.append(item) + if len(toinstall) != 0: + print "Installing %s" % " ".join(toinstall) + os.system("%s %s" % (installcmd, " ".join(toinstall))) + else: + break + processed.extend(toinstall) + + diff --git a/recipes/yum/yum-native_3.2.18.bb b/recipes/yum/yum-native_3.2.18.bb new file mode 100644 index 0000000000..afe9b02adb --- /dev/null +++ b/recipes/yum/yum-native_3.2.18.bb @@ -0,0 +1,26 @@ +HOMEPAGE = "http://linux.duke.edu/projects/yum/" + +SRC_URI = "http://linux.duke.edu/projects/yum/download/3.2/yum-${PV}.tar.gz \ + file://hacks.patch;patch=1 \ + file://paths.patch;patch=1 \ + file://yum-install-recommends.py \ + file://extract-postinst.awk" +PR = "r7" + +DEPENDS = "rpm-native python-native python-iniparse-native intltool-native \ + python-urlgrabber-native yum-metadata-parser-native libxml2-native" + +S = "${WORKDIR}/yum-${PV}" + +inherit autotools native + +do_compile_append () { + sed -e 's#!/usr/bin/python#!${bindir}/python#' -e 's#/usr/share#${datadir}#' -i ${S}/bin/yum.py + sed -e 's#!/usr/bin/python#!${bindir}/python#' -e 's#/usr/share#${datadir}#' -i ${S}/bin/yum-updatesd.py +} + +do_install_append () { + install -d ${STAGING_BINDIR}/ + install ${WORKDIR}/extract-postinst.awk ${STAGING_BINDIR}/ + install ${WORKDIR}/yum-install-recommends.py ${STAGING_BINDIR}/ +} diff --git a/recipes/yum/yum_3.2.18.bb b/recipes/yum/yum_3.2.18.bb new file mode 100644 index 0000000000..b147c52b7b --- /dev/null +++ b/recipes/yum/yum_3.2.18.bb @@ -0,0 +1,32 @@ +HOMEPAGE = "http://linux.duke.edu/projects/yum/" +PR = "r5" + +SRC_URI = "http://linux.duke.edu/projects/yum/download/3.2/yum-${PV}.tar.gz \ + file://paths.patch;patch=1 \ + file://paths2.patch;patch=1 \ + file://yum-install-recommends.py \ + file://extract-postinst.awk" + +RDEPENDS = "python-rpm python-core python-iniparse python-urlgrabber \ + python-shell python-re python-logging python-pickle \ + python-netserver python-compression \ + python-bzip2 python-unixadmin python-xml python-sqlite3 \ + python-textutils python-fcntl python-email \ + yum-metadata-parser" + +S = "${WORKDIR}/yum-${PV}" + +inherit autotools + +do_compile_append () { + sed -e 's#!/usr/bin/python#!${bindir}/python#' -e 's#/usr/share#${datadir}#' -i ${S}/bin/yum.py + sed -e 's#!/usr/bin/python#!${bindir}/python#' -e 's#/usr/share#${datadir}#' -i ${S}/bin/yum-updatesd.py +} + +do_install_append () { + install -d ${D}${bindir}/ + install ${WORKDIR}/extract-postinst.awk ${D}${bindir}/ + install ${WORKDIR}/yum-install-recommends.py ${D}${bindir}/ +} + +FILES_${PN} += "${libdir}/python* ${datadir}/yum-cli" |