summaryrefslogtreecommitdiff
path: root/meta-extras/packages/yum/files
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:14:24 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:29:45 +0100
commit29d6678fd546377459ef75cf54abeef5b969b5cf (patch)
tree8edd65790e37a00d01c3f203f773fe4b5012db18 /meta-extras/packages/yum/files
parentda49de6885ee1bc424e70bc02f21f6ab920efb55 (diff)
downloadopenembedded-core-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.gz
openembedded-core-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.bz2
openembedded-core-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.xz
openembedded-core-29d6678fd546377459ef75cf54abeef5b969b5cf.zip
Major layout change to the packages directory
Having one monolithic packages directory makes it hard to find things and is generally overwhelming. This commit splits it into several logical sections roughly based on function, recipes.txt gives more information about the classifications used. The opportunity is also used to switch from "packages" to "recipes" as used in OpenEmbedded as the term "packages" can be confusing to people and has many different meanings. Not all recipes have been classified yet, this is just a first pass at separating things out. Some packages are moved to meta-extras as they're no longer actively used or maintained. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta-extras/packages/yum/files')
-rw-r--r--meta-extras/packages/yum/files/98_yum1
-rw-r--r--meta-extras/packages/yum/files/extract-postinst.awk11
-rw-r--r--meta-extras/packages/yum/files/fix18
-rw-r--r--meta-extras/packages/yum/files/hacks.patch81
-rw-r--r--meta-extras/packages/yum/files/paths.patch106
-rw-r--r--meta-extras/packages/yum/files/paths2.patch35
-rwxr-xr-xmeta-extras/packages/yum/files/yum-install-recommends.py39
7 files changed, 291 insertions, 0 deletions
diff --git a/meta-extras/packages/yum/files/98_yum b/meta-extras/packages/yum/files/98_yum
new file mode 100644
index 000000000..cb4047ad2
--- /dev/null
+++ b/meta-extras/packages/yum/files/98_yum
@@ -0,0 +1 @@
+d root root 0755 /var/cache/yum none
diff --git a/meta-extras/packages/yum/files/extract-postinst.awk b/meta-extras/packages/yum/files/extract-postinst.awk
new file mode 100644
index 000000000..8f2836b32
--- /dev/null
+++ b/meta-extras/packages/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/meta-extras/packages/yum/files/fix b/meta-extras/packages/yum/files/fix
new file mode 100644
index 000000000..bcb3301e1
--- /dev/null
+++ b/meta-extras/packages/yum/files/fix
@@ -0,0 +1,18 @@
+---
+ rpmUtils/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- 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 := /usr
+ PYLIBDIR = $(PYSYSDIR)/lib/python$(PYVER)
+ PKGDIR = $(PYLIBDIR)/site-packages/$(PACKAGE)
+
+ all:
+ echo "Nothing to do"
diff --git a/meta-extras/packages/yum/files/hacks.patch b/meta-extras/packages/yum/files/hacks.patch
new file mode 100644
index 000000000..61f477172
--- /dev/null
+++ b/meta-extras/packages/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/meta-extras/packages/yum/files/paths.patch b/meta-extras/packages/yum/files/paths.patch
new file mode 100644
index 000000000..0175d05b3
--- /dev/null
+++ b/meta-extras/packages/yum/files/paths.patch
@@ -0,0 +1,106 @@
+---
+ Makefile | 18 +++++++++---------
+ docs/Makefile | 12 ++++++------
+ etc/Makefile | 20 ++++++++++----------
+ 3 files changed, 25 insertions(+), 25 deletions(-)
+
+Index: yum-3.2.27/Makefile
+===================================================================
+--- yum-3.2.27.orig/Makefile 2010-03-04 01:10:20.000000000 +0000
++++ yum-3.2.27/Makefile 2010-03-23 13:49:50.663912930 +0000
+@@ -22,19 +22,19 @@
+ 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
+
+Index: yum-3.2.27/docs/Makefile
+===================================================================
+--- yum-3.2.27.orig/docs/Makefile 2009-04-07 14:57:06.000000000 +0100
++++ yum-3.2.27/docs/Makefile 2010-03-23 13:52:30.086667913 +0000
+@@ -6,10 +6,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
+Index: yum-3.2.27/etc/Makefile
+===================================================================
+--- yum-3.2.27.orig/etc/Makefile 2009-10-26 18:56:06.000000000 +0000
++++ yum-3.2.27/etc/Makefile 2010-03-23 13:54:40.421912460 +0000
+@@ -1,4 +1,4 @@
+-YUMETC=$(DESTDIR)/etc/yum
++YUMETC=$(DESTDIR)$(sysconfdir)/yum
+
+ all:
+ echo "Nothing to do"
+@@ -7,23 +7,23 @@
+ 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 $(YUMETC)/yum.conf
+
+ 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
++ install -m 755 yum-updatesd.conf $(DESTDIR)$(sysconfdir)/yum/yum-updatesd.conf
+
+- mkdir -p $(DESTDIR)/etc/bash_completion.d
+- install -m 644 yum.bash $(DESTDIR)/etc/bash_completion.d
++ mkdir -p $(DESTDIR)$(sysconfdir)/bash_completion.d
++ install -m 644 yum.bash $(DESTDIR)$(sysconfdir)/bash_completion.d
diff --git a/meta-extras/packages/yum/files/paths2.patch b/meta-extras/packages/yum/files/paths2.patch
new file mode 100644
index 000000000..8fe6d0c98
--- /dev/null
+++ b/meta-extras/packages/yum/files/paths2.patch
@@ -0,0 +1,35 @@
+---
+ rpmUtils/Makefile | 2 +-
+ yum/Makefile | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+Index: yum-3.2.27/rpmUtils/Makefile
+===================================================================
+--- yum-3.2.27.orig/rpmUtils/Makefile 2010-03-24 17:26:39.759798777 +0000
++++ yum-3.2.27/rpmUtils/Makefile 2010-03-24 17:26:54.835863845 +0000
+@@ -2,8 +2,8 @@
+ 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)
++PYSYSDIR = $(libdir)
++PYLIBDIR = $(PYSYSDIR)/python$(PYVER)
+ PKGDIR = $(PYLIBDIR)/site-packages/$(PACKAGE)
+
+ all:
+Index: yum-3.2.27/yum/Makefile
+===================================================================
+--- yum-3.2.27.orig/yum/Makefile 2010-03-24 17:26:39.759798777 +0000
++++ yum-3.2.27/yum/Makefile 2010-03-24 17:26:43.726773783 +0000
+@@ -2,8 +2,8 @@
+ 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)
++PYSYSDIR = $(libdir)
++PYLIBDIR = $(PYSYSDIR)/python$(PYVER)
+ PKGDIR = $(PYLIBDIR)/site-packages/$(PACKAGE)
+
+ all:
diff --git a/meta-extras/packages/yum/files/yum-install-recommends.py b/meta-extras/packages/yum/files/yum-install-recommends.py
new file mode 100755
index 000000000..64716f2c3
--- /dev/null
+++ b/meta-extras/packages/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)
+
+