]> code.ossystems Code Review - openembedded-core.git/commitdiff
rpm: Fix autoconf/libtool usage
authorMark Hatle <mark.hatle@windriver.com>
Fri, 3 Sep 2010 17:43:41 +0000 (12:43 -0500)
committerSaul Wold <Saul.Wold@intel.com>
Sat, 4 Sep 2010 01:30:47 +0000 (18:30 -0700)
In order to resolve a host-contamination problem, we re-work the way that
autoconf and friends are invoked during the compilation of RPM.

This has a side effect of fixing another bug where RPM was being renamed
HOST_ARCH-HOST_OS-rpm.  So we remove the "fixes" for that behavior as well.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
meta/classes/package.bbclass
meta/classes/package_rpm.bbclass
meta/classes/rootfs_rpm.bbclass
meta/recipes-devtools/rpm/rpm/rpm-autoconf.patch [new file with mode: 0644]
meta/recipes-devtools/rpm/rpm_5.1.10.bb

index f0a874802389296f6c22073d107ad1a7e7635cd8..4951220cbaaab057b4e40882259eabd34d1bf305 100644 (file)
@@ -558,7 +558,7 @@ if [ x"$D" = "x" ]; then
 fi
 }
 
-RPMDEPS = "${STAGING_LIBDIR_NATIVE}/rpm/${BUILD_ARCH}-${BUILD_OS}-rpmdeps"
+RPMDEPS = "${STAGING_LIBDIR_NATIVE}/rpm/rpmdeps"
 
 # Collect perfile run-time dependency metadata
 # Output:
index 3967ae294eb485c11a2f59c50fd6e52bad013336..b70575cea0267a4e5f94fe3d8ab6e8aca31d572f 100644 (file)
@@ -2,8 +2,8 @@ inherit package
 
 IMAGE_PKGTYPE ?= "rpm"
 
-RPM="${BUILD_ARCH}-${BUILD_OS}-rpm"
-RPMBUILD="${BUILD_ARCH}-${BUILD_OS}-rpmbuild"
+RPM="rpm"
+RPMBUILD="rpmbuild"
 
 PKGWRITEDIRRPM = "${WORKDIR}/deploy-rpms"
 
index 09afa5810354f32536efa9e0b34a0d75d01b5fdb..55c851c463525461c3d169998bcd1e6e0824c3f2 100644 (file)
@@ -26,7 +26,7 @@ rpmlibdir = "/var/lib/rpm"
 opkglibdir = "${localstatedir}/lib/opkg"
 
 RPMOPTS="--dbpath ${rpmlibdir} --define='_openall_before_chroot 1'"
-RPM="${BUILD_ARCH}-${BUILD_OS}-rpm ${RPMOPTS}"
+RPM="rpm ${RPMOPTS}"
 
 fakeroot rootfs_rpm_do_rootfs () {
        set +x
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-autoconf.patch b/meta/recipes-devtools/rpm/rpm/rpm-autoconf.patch
new file mode 100644 (file)
index 0000000..30c5f7b
--- /dev/null
@@ -0,0 +1,20 @@
+Using the version of autoconf in poky results in:
+
+configure.ac:11: error: m4_divert_push: cannot change diversion to `GROW' inside m4_expand
+
+without this patch.
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+diff -ur rpm-5.1.10.orig/configure.ac rpm-5.1.10/configure.ac
+--- rpm-5.1.10.orig/configure.ac       2010-08-20 17:12:16.000000000 -0500
++++ rpm-5.1.10/configure.ac    2010-09-03 11:34:44.722097327 -0500
+@@ -8,7 +8,7 @@
+ AC_PREREQ(2.60)
+ AC_DEFUN([PACKAGE_BUGREPORT_DEFAULT], [rpm-devel@rpm5.org])
+-AC_INIT(rpm, [5.1.10], [PACKAGE_BUGREPORT_DEFAULT])
++AC_INIT(rpm, [5.1.10])
+ PACKAGE_TIMESTAMP="2008" dnl # YYYY[-MM[-DD[ HH[:MM]]]]
+ AC_MSG_TITLE([RPM Package Manager (RPM)], [$PACKAGE_VERSION])
index 4cf0fd8777cf8d02f2aef8cfd00b002c77d6af9e..e5ccf8e99da396bf67a50b9442e4431f37adba97 100644 (file)
@@ -3,12 +3,13 @@ DESCRIPTION_rpm-build = "The RPM Package Manager rpmbuild and related commands."
 HOMEPAGE = "http://rpm5.org/"
 LICENSE = "LGPL 2.1"
 DEPENDS = "zlib perl popt beecrypt python libpcre elfutils"
-PR = "r4"
+PR = "r5"
 
 SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.1/SNAPSHOT/${BPN}-${PV}.tar.gz \
            file://hdraddorappend.patch \
            file://export-rpmbag-h.patch \
           file://rpm-nrescan.patch \
+          file://rpm-autoconf.patch \
           file://remove-compiled-tests.patch;apply=no \
           file://perfile_rpmdeps.sh \
          "
@@ -67,64 +68,95 @@ FILES_python-rpm-dbg = "${libdir}/python*/rpm/.debug/_*"
 EXTRA_OECONF += "--with-mutex=POSIX/pthreads/library"
 
 do_configure() {
-       rm ${S}/db/dist/configure.in -f
-       for i in `find ${S} -name *.ac`; do
-               j=`echo $i | sed 's/.ac/.m4/g'`
-               mv $i $j
-       done
+       # Manually run through the steps of the autogen.sh
+       ( cd pcre
+         libtoolize --quiet --copy --force --install
+         aclocal
+         autoheader
+         automake -Wall -Wno-override -a -c
+         autoconf
+       )
+
+       ( cd xz
+         autopoint -f
+         rm -f \
+               codeset.m4 \
+               glibc2.m4 \
+               glibc21.m4 \
+               intdiv0.m4 \
+               intl.m4 \
+               intldir.m4 \
+               intmax.m4 \
+               inttypes-pri.m4 \
+               inttypes_h.m4 \
+               lcmessage.m4 \
+               lock.m4 \
+               longdouble.m4 \
+               longlong.m4 \
+               printf-posix.m4 \
+               size_max.m4 \
+               stdint_h.m4 \
+               uintmax_t.m4 \
+               ulonglong.m4 \
+               visibility.m4 \
+               wchar_t.m4 \
+               wint_t.m4 \
+               xsize.m4
+         libtoolize -c -f || glibtoolize -c -f
+         aclocal -I m4
+         autoconf
+         autoheader
+         automake -acf --foreign
+       )
+
+       ( cd file
+         libtoolize --quiet --copy --force --install
+         aclocal
+         autoheader
+         automake -Wall -Wno-override -a -c
+         autoconf
+       )
+
+       (cd syck
+         libtoolize --quiet --copy --force --install
+         aclocal
+         autoheader
+         automake -Wall -Wno-override -a -c
+         autoconf
+       )
+
+       (cd xar
+         libtoolize --quiet --copy --force --install
+         aclocal
+         autoheader
+         automake -Wall -Wno-override -a -c
+         autoconf
+       )
+
+       rm -rf autom4te.cache || true
+       libtoolize --quiet --copy --force --install
+       autopoint --force
+       rm -f aclocal.m4
+       aclocal -I m4
+       autoheader -I m4
+       automake -Wall -Wno-override -a -c
+       autoconf -I m4
+       # end of autogen.sh steps
+
        export ac_cv_va_copy=C99
-       autotools_do_configure
-       cd ${S}/db3
-       ${S}/db3/configure \
-                   --build=${BUILD_SYS} \
-                   --host=${HOST_SYS} \
-                   --target=${TARGET_SYS} \
-                   --prefix=${prefix} \
-                   --exec_prefix=${exec_prefix} \
-                   --bindir=${bindir} \
-                   --sbindir=${sbindir} \
-                   --libexecdir=${libexecdir} \
-                   --datadir=${datadir} \
-                   --sysconfdir=${sysconfdir} \
-                   --sharedstatedir=${sharedstatedir} \
-                   --localstatedir=${localstatedir} \
-                   --libdir=${libdir} \
-                   --includedir=${includedir} \
-                   --oldincludedir=${oldincludedir} \
-                   --infodir=${infodir} \
-                   --mandir=${mandir} \
-                   ${EXTRA_OECONF}
+       oe_runconf
 }
 
-INSTALL_ACTIONS=""
-
-# When installing the native version, the rpm components are renamed with a
-# naming transform.  We need to adjust the rpmpopt file with the same transform
-INSTALL_ACTIONS_virtclass-native="sed -i -e 's,rpm,${HOST_SYS}-rpm,' ${D}/${libdir}/rpm/rpmpopt"
-
 do_install_append() {
-        ${INSTALL_ACTIONS}
        sed -i -e 's,%__check_files,#%%__check_files,' ${D}/${libdir}/rpm/macros
        sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros
        sed -i -e 's,%__perl_provides,#%%__perl_provides,' ${D}/${libdir}/rpm/macros
        sed -i -e 's,%__perl_requires,#%%__perl_requires,' ${D}/${libdir}/rpm/macros
-       sed -i -e 's,pythondeps.sh,${HOST_SYS}-pythondeps.sh,' ${D}/${libdir}/rpm/macros
-       sed -i -e 's,phpdeps.sh,${HOST_SYS}-phpdeps.sh,' ${D}/${libdir}/rpm/macros
-       sed -i -e 's,javadeps.sh,${HOST_SYS}-javadeps.sh,' ${D}/${libdir}/rpm/macros
-       sed -i -e 's,libtooldeps.sh,${HOST_SYS}-libtooldeps.sh,' ${D}/${libdir}/rpm/macros
-       sed -i -e 's,pkgconfigdeps.sh,${HOST_SYS}-pkgconfigdeps.sh,' ${D}/${libdir}/rpm/macros
-       sed -i -e 's,executabledeps.sh,${HOST_SYS}-executabledeps.sh,' ${D}/${libdir}/rpm/macros
-       sed -i -e 's,perl.prov,${HOST_SYS}-perl.prov,' ${D}/${libdir}/rpm/macros
-       sed -i -e 's,perl.req,${HOST_SYS}-perl.req,' ${D}/${libdir}/rpm/macros
 
        # Enable Debian style arbitrary tags...
        sed -i -e 's,%_arbitrary_tags[^_].*,%_arbitrary_tags %{_arbitrary_tags_debian},' ${D}/${libdir}/rpm/macros
 
        install -m 0755 ${WORKDIR}/perfile_rpmdeps.sh ${D}/${libdir}/rpm/perfile_rpmdeps.sh
-
-       mv ${D}/${libdir}/python${PYTHON_BASEVERSION}/rpm/${HOST_SYS}-__init__.py \
-               ${D}/${libdir}/python${PYTHON_BASEVERSION}/rpm/__init__.py
-
 }
 
 BBCLASSEXTEND = "native"