diff options
| author | Mark Hatle <mark.hatle@windriver.com> | 2010-09-03 12:43:41 -0500 |
|---|---|---|
| committer | Saul Wold <Saul.Wold@intel.com> | 2010-09-03 18:30:47 -0700 |
| commit | c849ec75e718d1095bd7d25d05f57e25d5d94589 (patch) | |
| tree | ddcc642d7b5ea9db6cebcd419d779d3bf2f095e5 | |
| parent | a9b715736f96e3a4ac3fa99737ae412c1ac4f01e (diff) | |
| download | poky-c849ec75e718d1095bd7d25d05f57e25d5d94589.tar.gz | |
rpm: Fix autoconf/libtool usage
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>
| -rw-r--r-- | meta/classes/package.bbclass | 2 | ||||
| -rw-r--r-- | meta/classes/package_rpm.bbclass | 4 | ||||
| -rw-r--r-- | meta/classes/rootfs_rpm.bbclass | 2 | ||||
| -rw-r--r-- | meta/recipes-devtools/rpm/rpm/rpm-autoconf.patch | 20 | ||||
| -rw-r--r-- | meta/recipes-devtools/rpm/rpm_5.1.10.bb | 124 |
5 files changed, 102 insertions, 50 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index f0a8748023..4951220cba 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
| @@ -558,7 +558,7 @@ if [ x"$D" = "x" ]; then | |||
| 558 | fi | 558 | fi |
| 559 | } | 559 | } |
| 560 | 560 | ||
| 561 | RPMDEPS = "${STAGING_LIBDIR_NATIVE}/rpm/${BUILD_ARCH}-${BUILD_OS}-rpmdeps" | 561 | RPMDEPS = "${STAGING_LIBDIR_NATIVE}/rpm/rpmdeps" |
| 562 | 562 | ||
| 563 | # Collect perfile run-time dependency metadata | 563 | # Collect perfile run-time dependency metadata |
| 564 | # Output: | 564 | # Output: |
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index 3967ae294e..b70575cea0 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass | |||
| @@ -2,8 +2,8 @@ inherit package | |||
| 2 | 2 | ||
| 3 | IMAGE_PKGTYPE ?= "rpm" | 3 | IMAGE_PKGTYPE ?= "rpm" |
| 4 | 4 | ||
| 5 | RPM="${BUILD_ARCH}-${BUILD_OS}-rpm" | 5 | RPM="rpm" |
| 6 | RPMBUILD="${BUILD_ARCH}-${BUILD_OS}-rpmbuild" | 6 | RPMBUILD="rpmbuild" |
| 7 | 7 | ||
| 8 | PKGWRITEDIRRPM = "${WORKDIR}/deploy-rpms" | 8 | PKGWRITEDIRRPM = "${WORKDIR}/deploy-rpms" |
| 9 | 9 | ||
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass index 09afa58103..55c851c463 100644 --- a/meta/classes/rootfs_rpm.bbclass +++ b/meta/classes/rootfs_rpm.bbclass | |||
| @@ -26,7 +26,7 @@ rpmlibdir = "/var/lib/rpm" | |||
| 26 | opkglibdir = "${localstatedir}/lib/opkg" | 26 | opkglibdir = "${localstatedir}/lib/opkg" |
| 27 | 27 | ||
| 28 | RPMOPTS="--dbpath ${rpmlibdir} --define='_openall_before_chroot 1'" | 28 | RPMOPTS="--dbpath ${rpmlibdir} --define='_openall_before_chroot 1'" |
| 29 | RPM="${BUILD_ARCH}-${BUILD_OS}-rpm ${RPMOPTS}" | 29 | RPM="rpm ${RPMOPTS}" |
| 30 | 30 | ||
| 31 | fakeroot rootfs_rpm_do_rootfs () { | 31 | fakeroot rootfs_rpm_do_rootfs () { |
| 32 | set +x | 32 | 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 index 0000000000..30c5f7b183 --- /dev/null +++ b/meta/recipes-devtools/rpm/rpm/rpm-autoconf.patch | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | Using the version of autoconf in poky results in: | ||
| 2 | |||
| 3 | configure.ac:11: error: m4_divert_push: cannot change diversion to `GROW' inside m4_expand | ||
| 4 | |||
| 5 | without this patch. | ||
| 6 | |||
| 7 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 8 | |||
| 9 | diff -ur rpm-5.1.10.orig/configure.ac rpm-5.1.10/configure.ac | ||
| 10 | --- rpm-5.1.10.orig/configure.ac 2010-08-20 17:12:16.000000000 -0500 | ||
| 11 | +++ rpm-5.1.10/configure.ac 2010-09-03 11:34:44.722097327 -0500 | ||
| 12 | @@ -8,7 +8,7 @@ | ||
| 13 | |||
| 14 | AC_PREREQ(2.60) | ||
| 15 | AC_DEFUN([PACKAGE_BUGREPORT_DEFAULT], [rpm-devel@rpm5.org]) | ||
| 16 | -AC_INIT(rpm, [5.1.10], [PACKAGE_BUGREPORT_DEFAULT]) | ||
| 17 | +AC_INIT(rpm, [5.1.10]) | ||
| 18 | PACKAGE_TIMESTAMP="2008" dnl # YYYY[-MM[-DD[ HH[:MM]]]] | ||
| 19 | AC_MSG_TITLE([RPM Package Manager (RPM)], [$PACKAGE_VERSION]) | ||
| 20 | |||
diff --git a/meta/recipes-devtools/rpm/rpm_5.1.10.bb b/meta/recipes-devtools/rpm/rpm_5.1.10.bb index 4cf0fd8777..e5ccf8e99d 100644 --- a/meta/recipes-devtools/rpm/rpm_5.1.10.bb +++ b/meta/recipes-devtools/rpm/rpm_5.1.10.bb | |||
| @@ -3,12 +3,13 @@ DESCRIPTION_rpm-build = "The RPM Package Manager rpmbuild and related commands." | |||
| 3 | HOMEPAGE = "http://rpm5.org/" | 3 | HOMEPAGE = "http://rpm5.org/" |
| 4 | LICENSE = "LGPL 2.1" | 4 | LICENSE = "LGPL 2.1" |
| 5 | DEPENDS = "zlib perl popt beecrypt python libpcre elfutils" | 5 | DEPENDS = "zlib perl popt beecrypt python libpcre elfutils" |
| 6 | PR = "r4" | 6 | PR = "r5" |
| 7 | 7 | ||
| 8 | SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.1/SNAPSHOT/${BPN}-${PV}.tar.gz \ | 8 | SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.1/SNAPSHOT/${BPN}-${PV}.tar.gz \ |
| 9 | file://hdraddorappend.patch \ | 9 | file://hdraddorappend.patch \ |
| 10 | file://export-rpmbag-h.patch \ | 10 | file://export-rpmbag-h.patch \ |
| 11 | file://rpm-nrescan.patch \ | 11 | file://rpm-nrescan.patch \ |
| 12 | file://rpm-autoconf.patch \ | ||
| 12 | file://remove-compiled-tests.patch;apply=no \ | 13 | file://remove-compiled-tests.patch;apply=no \ |
| 13 | file://perfile_rpmdeps.sh \ | 14 | file://perfile_rpmdeps.sh \ |
| 14 | " | 15 | " |
| @@ -67,64 +68,95 @@ FILES_python-rpm-dbg = "${libdir}/python*/rpm/.debug/_*" | |||
| 67 | EXTRA_OECONF += "--with-mutex=POSIX/pthreads/library" | 68 | EXTRA_OECONF += "--with-mutex=POSIX/pthreads/library" |
| 68 | 69 | ||
| 69 | do_configure() { | 70 | do_configure() { |
| 70 | rm ${S}/db/dist/configure.in -f | 71 | # Manually run through the steps of the autogen.sh |
| 71 | for i in `find ${S} -name *.ac`; do | 72 | ( cd pcre |
| 72 | j=`echo $i | sed 's/.ac/.m4/g'` | 73 | libtoolize --quiet --copy --force --install |
| 73 | mv $i $j | 74 | aclocal |
| 74 | done | 75 | autoheader |
| 76 | automake -Wall -Wno-override -a -c | ||
| 77 | autoconf | ||
| 78 | ) | ||
| 79 | |||
| 80 | ( cd xz | ||
| 81 | autopoint -f | ||
| 82 | rm -f \ | ||
| 83 | codeset.m4 \ | ||
| 84 | glibc2.m4 \ | ||
| 85 | glibc21.m4 \ | ||
| 86 | intdiv0.m4 \ | ||
| 87 | intl.m4 \ | ||
| 88 | intldir.m4 \ | ||
| 89 | intmax.m4 \ | ||
| 90 | inttypes-pri.m4 \ | ||
| 91 | inttypes_h.m4 \ | ||
| 92 | lcmessage.m4 \ | ||
| 93 | lock.m4 \ | ||
| 94 | longdouble.m4 \ | ||
| 95 | longlong.m4 \ | ||
| 96 | printf-posix.m4 \ | ||
| 97 | size_max.m4 \ | ||
| 98 | stdint_h.m4 \ | ||
| 99 | uintmax_t.m4 \ | ||
| 100 | ulonglong.m4 \ | ||
| 101 | visibility.m4 \ | ||
| 102 | wchar_t.m4 \ | ||
| 103 | wint_t.m4 \ | ||
| 104 | xsize.m4 | ||
| 105 | libtoolize -c -f || glibtoolize -c -f | ||
| 106 | aclocal -I m4 | ||
| 107 | autoconf | ||
| 108 | autoheader | ||
| 109 | automake -acf --foreign | ||
| 110 | ) | ||
| 111 | |||
| 112 | ( cd file | ||
| 113 | libtoolize --quiet --copy --force --install | ||
| 114 | aclocal | ||
| 115 | autoheader | ||
| 116 | automake -Wall -Wno-override -a -c | ||
| 117 | autoconf | ||
| 118 | ) | ||
| 119 | |||
| 120 | (cd syck | ||
| 121 | libtoolize --quiet --copy --force --install | ||
| 122 | aclocal | ||
| 123 | autoheader | ||
| 124 | automake -Wall -Wno-override -a -c | ||
| 125 | autoconf | ||
| 126 | ) | ||
| 127 | |||
| 128 | (cd xar | ||
| 129 | libtoolize --quiet --copy --force --install | ||
| 130 | aclocal | ||
| 131 | autoheader | ||
| 132 | automake -Wall -Wno-override -a -c | ||
| 133 | autoconf | ||
| 134 | ) | ||
| 135 | |||
| 136 | rm -rf autom4te.cache || true | ||
| 137 | libtoolize --quiet --copy --force --install | ||
| 138 | autopoint --force | ||
| 139 | rm -f aclocal.m4 | ||
| 140 | aclocal -I m4 | ||
| 141 | autoheader -I m4 | ||
| 142 | automake -Wall -Wno-override -a -c | ||
| 143 | autoconf -I m4 | ||
| 144 | # end of autogen.sh steps | ||
| 145 | |||
| 75 | export ac_cv_va_copy=C99 | 146 | export ac_cv_va_copy=C99 |
| 76 | autotools_do_configure | 147 | oe_runconf |
| 77 | cd ${S}/db3 | ||
| 78 | ${S}/db3/configure \ | ||
| 79 | --build=${BUILD_SYS} \ | ||
| 80 | --host=${HOST_SYS} \ | ||
| 81 | --target=${TARGET_SYS} \ | ||
| 82 | --prefix=${prefix} \ | ||
| 83 | --exec_prefix=${exec_prefix} \ | ||
| 84 | --bindir=${bindir} \ | ||
| 85 | --sbindir=${sbindir} \ | ||
| 86 | --libexecdir=${libexecdir} \ | ||
| 87 | --datadir=${datadir} \ | ||
| 88 | --sysconfdir=${sysconfdir} \ | ||
| 89 | --sharedstatedir=${sharedstatedir} \ | ||
| 90 | --localstatedir=${localstatedir} \ | ||
| 91 | --libdir=${libdir} \ | ||
| 92 | --includedir=${includedir} \ | ||
| 93 | --oldincludedir=${oldincludedir} \ | ||
| 94 | --infodir=${infodir} \ | ||
| 95 | --mandir=${mandir} \ | ||
| 96 | ${EXTRA_OECONF} | ||
| 97 | } | 148 | } |
| 98 | 149 | ||
| 99 | INSTALL_ACTIONS="" | ||
| 100 | |||
| 101 | # When installing the native version, the rpm components are renamed with a | ||
| 102 | # naming transform. We need to adjust the rpmpopt file with the same transform | ||
| 103 | INSTALL_ACTIONS_virtclass-native="sed -i -e 's,rpm,${HOST_SYS}-rpm,' ${D}/${libdir}/rpm/rpmpopt" | ||
| 104 | |||
| 105 | do_install_append() { | 150 | do_install_append() { |
| 106 | ${INSTALL_ACTIONS} | ||
| 107 | sed -i -e 's,%__check_files,#%%__check_files,' ${D}/${libdir}/rpm/macros | 151 | sed -i -e 's,%__check_files,#%%__check_files,' ${D}/${libdir}/rpm/macros |
| 108 | sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros | 152 | sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros |
| 109 | sed -i -e 's,%__perl_provides,#%%__perl_provides,' ${D}/${libdir}/rpm/macros | 153 | sed -i -e 's,%__perl_provides,#%%__perl_provides,' ${D}/${libdir}/rpm/macros |
| 110 | sed -i -e 's,%__perl_requires,#%%__perl_requires,' ${D}/${libdir}/rpm/macros | 154 | sed -i -e 's,%__perl_requires,#%%__perl_requires,' ${D}/${libdir}/rpm/macros |
| 111 | sed -i -e 's,pythondeps.sh,${HOST_SYS}-pythondeps.sh,' ${D}/${libdir}/rpm/macros | ||
| 112 | sed -i -e 's,phpdeps.sh,${HOST_SYS}-phpdeps.sh,' ${D}/${libdir}/rpm/macros | ||
| 113 | sed -i -e 's,javadeps.sh,${HOST_SYS}-javadeps.sh,' ${D}/${libdir}/rpm/macros | ||
| 114 | sed -i -e 's,libtooldeps.sh,${HOST_SYS}-libtooldeps.sh,' ${D}/${libdir}/rpm/macros | ||
| 115 | sed -i -e 's,pkgconfigdeps.sh,${HOST_SYS}-pkgconfigdeps.sh,' ${D}/${libdir}/rpm/macros | ||
| 116 | sed -i -e 's,executabledeps.sh,${HOST_SYS}-executabledeps.sh,' ${D}/${libdir}/rpm/macros | ||
| 117 | sed -i -e 's,perl.prov,${HOST_SYS}-perl.prov,' ${D}/${libdir}/rpm/macros | ||
| 118 | sed -i -e 's,perl.req,${HOST_SYS}-perl.req,' ${D}/${libdir}/rpm/macros | ||
| 119 | 155 | ||
| 120 | # Enable Debian style arbitrary tags... | 156 | # Enable Debian style arbitrary tags... |
| 121 | sed -i -e 's,%_arbitrary_tags[^_].*,%_arbitrary_tags %{_arbitrary_tags_debian},' ${D}/${libdir}/rpm/macros | 157 | sed -i -e 's,%_arbitrary_tags[^_].*,%_arbitrary_tags %{_arbitrary_tags_debian},' ${D}/${libdir}/rpm/macros |
| 122 | 158 | ||
| 123 | install -m 0755 ${WORKDIR}/perfile_rpmdeps.sh ${D}/${libdir}/rpm/perfile_rpmdeps.sh | 159 | install -m 0755 ${WORKDIR}/perfile_rpmdeps.sh ${D}/${libdir}/rpm/perfile_rpmdeps.sh |
| 124 | |||
| 125 | mv ${D}/${libdir}/python${PYTHON_BASEVERSION}/rpm/${HOST_SYS}-__init__.py \ | ||
| 126 | ${D}/${libdir}/python${PYTHON_BASEVERSION}/rpm/__init__.py | ||
| 127 | |||
| 128 | } | 160 | } |
| 129 | 161 | ||
| 130 | BBCLASSEXTEND = "native" | 162 | BBCLASSEXTEND = "native" |
