summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Dewender2013-04-29 15:59:54 +0200
committerJohannes Dewender2013-04-29 15:59:54 +0200
commit69dc2d2df4dca875a0b91db2394b10bca28ebbea (patch)
treee23c72887a2e13c689b2c93eb571e35a6aba4781
parentf82b4200f70daed00cb4629c88b6ea3d91a06593 (diff)
downloadaur-69dc2d2df4dca875a0b91db2394b10bca28ebbea.tar.gz
rpm-org: add --with-db and fedora UsrMove patch
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD10
-rw-r--r--rpmlib-filesystem-check.patch125
3 files changed, 135 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e00a0a7d2f38..09eac2cfae2f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = rpm-org
pkgdesc = RPM Package Manager - RPM.org fork, used in major RPM distros
pkgver = 4.11.0.1
- pkgrel = 1
+ pkgrel = 2
url = http://www.rpm.org/
arch = i686
arch = x86_64
@@ -22,9 +22,11 @@ pkgbase = rpm-org
source = http://rpm.org/releases/rpm-4.11.x/rpm-4.11.0.1.tar.bz2
source = rpmextract.sh
source = finish-lua52-support.patch
+ source = rpmlib-filesystem-check.patch
md5sums = b35f5359e0d4494d7b11e8d0c1512a0d
md5sums = 1f7f4f3b3a93ff6d2f600c7751ae25ef
md5sums = a82a9372f2bca43049791c162a36c1e5
+ md5sums = 62a62de128345a8a7a6195fd59f8cd71
pkgname = rpm-org
diff --git a/PKGBUILD b/PKGBUILD
index 235d4ac92c1a..9a78c947c65e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,7 +6,7 @@
pkgname=rpm-org
pkgver=4.11.0.1
-pkgrel=1
+pkgrel=2
pkgdesc="RPM Package Manager - RPM.org fork, used in major RPM distros"
arch=('i686' 'x86_64')
url=("http://www.rpm.org/")
@@ -17,16 +17,19 @@ conflicts=('rpm' 'rpmextract')
options=('!libtool')
provides=("rpm=${pkgver}" 'rpmextract=1.0-4')
source=(http://rpm.org/releases/rpm-4.11.x/rpm-${pkgver}.tar.bz2
- rpmextract.sh finish-lua52-support.patch)
+ rpmextract.sh
+ finish-lua52-support.patch rpmlib-filesystem-check.patch)
md5sums=('b35f5359e0d4494d7b11e8d0c1512a0d'
'1f7f4f3b3a93ff6d2f600c7751ae25ef'
- 'a82a9372f2bca43049791c162a36c1e5')
+ 'a82a9372f2bca43049791c162a36c1e5'
+ '62a62de128345a8a7a6195fd59f8cd71')
build() {
cd ${srcdir}/rpm-${pkgver}
patch -p1 < ../finish-lua52-support.patch
+ patch -p1 < ../rpmlib-filesystem-check.patch
./configure \
--prefix=/usr \
@@ -35,6 +38,7 @@ build() {
--enable-python \
--with-external-db \
--with-lua \
+ --with-cap \
CPPFLAGS="`pkg-config --cflags nss`" \
PYTHON=python2
make
diff --git a/rpmlib-filesystem-check.patch b/rpmlib-filesystem-check.patch
new file mode 100644
index 000000000000..ec4324c7f99f
--- /dev/null
+++ b/rpmlib-filesystem-check.patch
@@ -0,0 +1,125 @@
+diff -up rpm-4.10.90.git11978/lib/depends.c.rpmlib-filesystem-check rpm-4.10.90.git11978/lib/depends.c
+--- rpm-4.10.90.git11978/lib/depends.c.rpmlib-filesystem-check 2012-11-01 09:40:26.000000000 +0200
++++ rpm-4.10.90.git11978/lib/depends.c 2012-11-05 10:53:42.294733695 +0200
+@@ -537,6 +537,109 @@ static int rpmdbProvides(rpmts ts, depCa
+ return rc;
+ }
+
++/*
++ * Temporary support for live-conversion of the filesystem hierarchy
++ * mailto: kay@redhat.com, harald@redhat.com
++ * https://fedoraproject.org/wiki/Features/UsrMove
++ *
++ * X-CheckUnifiedSystemdir:
++ * /bin, /sbin, /lib, /lib64 --> /usr
++ *
++ * X-CheckUnifiedBindir:
++ * /usr/sbin -> /usr/bin
++ *
++ * X-CheckMultiArchLibdir:
++ * /usr/lib64 /usr/lib/<platform tuple> (e.g. x86_64-linux-gnu)
++ *
++ * This code is not needed for new installations, it can be removed after
++ * updates from older systems are no longer supported: Fedora 19 / RHEL 8.
++ */
++
++static int CheckLink(const char *dir, const char *root)
++{
++ char *d = NULL;
++ struct stat sbuf;
++ int rc = 0;
++
++ if (!root)
++ root = "/";
++
++ rasprintf(&d, "%s%s", root, dir);
++ if (!d) {
++ rc = -1;
++ goto exit;
++ }
++
++ /* directory or symlink does not exist, all is fine */
++ if (lstat(d, &sbuf) < 0) {
++ rc = 1;
++ goto exit;
++ }
++
++ /* if it is a symlink, all is fine */
++ if (S_ISLNK(sbuf.st_mode))
++ rc = 1;
++
++exit:
++ free(d);
++ return rc;
++}
++
++static int CheckFilesystemHierarchy(rpmds * dsp, const char *root)
++{
++ static const char *dirs[] = { "bin", "sbin", "lib", "lib64" };
++ int check;
++ int i;
++ rpmds ds;
++ rpmstrPool pool = rpmdsPool(*dsp);
++ int rc = 0;
++
++ for (i = 0; i < sizeof(dirs) / sizeof(dirs[0]); i++) {
++ check = CheckLink(dirs[i], root);
++ if (check < 0) {
++ rc = -1;
++ goto exit;
++ }
++
++ if (check == 0)
++ goto exit;
++ }
++ ds = rpmdsSinglePool(pool, RPMTAG_PROVIDENAME,
++ "rpmlib(X-CheckUnifiedSystemdir)", "1",
++ RPMSENSE_EQUAL);
++ rpmdsMerge(dsp, ds);
++ rpmdsFree(ds);
++
++ check = CheckLink("usr/lib64", root);
++ if (check < 0) {
++ rc = -1;
++ goto exit;
++ }
++ if (check > 0) {
++ ds = rpmdsSinglePool(pool, RPMTAG_PROVIDENAME,
++ "rpmlib(X-CheckMultiArchLibdir)", "1",
++ RPMSENSE_EQUAL);
++ rpmdsMerge(dsp, ds);
++ rpmdsFree(ds);
++ }
++
++ check = CheckLink("usr/sbin", root);
++ if (check < 0) {
++ rc = -1;
++ goto exit;
++ }
++ if (check > 0) {
++ ds = rpmdsSinglePool(pool, RPMTAG_PROVIDENAME,
++ "rpmlib(X-CheckUnifiedBindir)", "1",
++ RPMSENSE_EQUAL);
++ rpmdsMerge(dsp, ds);
++ rpmdsFree(ds);
++ }
++
++exit:
++ return rc;
++}
++
+ /**
+ * Check dep for an unsatisfied dependency.
+ * @param ts transaction set
+@@ -560,8 +663,10 @@ retry:
+ * Check those dependencies now.
+ */
+ if (dsflags & RPMSENSE_RPMLIB) {
+- if (tsmem->rpmlib == NULL)
++ if (tsmem->rpmlib == NULL) {
+ rpmdsRpmlibPool(rpmtsPool(ts), &(tsmem->rpmlib), NULL);
++ CheckFilesystemHierarchy(&(tsmem->rpmlib), rpmtsRootDir(ts));
++ }
+
+ if (tsmem->rpmlib != NULL && rpmdsSearch(tsmem->rpmlib, dep) >= 0) {
+ rpmdsNotify(dep, "(rpmlib provides)", rc);