From bc4a29df84542f0ef905a2e20d8533a0ea7cb613 Mon Sep 17 00:00:00 2001 From: Mark Hatle Date: Mon, 11 Jun 2012 13:18:53 -0500 Subject: rpm: Upgrade RPM to 5.4.9 Beside upreving RPM, add necessary integration patches to libzypp. Also change the configuration of RPM to support PACKAGECONFIG flags. RPM is highly configurable, the default configuration is good for minimal OE-Core use. (From OE-Core rev: bf94103d4c532ffdfdcdcc6d27c9f65f7824f8f8) Signed-off-by: Mark Hatle Signed-off-by: Richard Purdie --- meta/recipes-devtools/rpm/rpm/rpm-lua.patch | 29 ++ .../rpm/rpm/rpm-scriptletexechelper.patch | 33 +- meta/recipes-devtools/rpm/rpm/rpmdeps-oecore.patch | 26 +- meta/recipes-devtools/rpm/rpm_5.4.8.bb | 462 --------------------- meta/recipes-devtools/rpm/rpm_5.4.9.bb | 448 ++++++++++++++++++++ .../libzypp/libzypp/libzypp-rpm549.patch | 28 ++ meta/recipes-extended/libzypp/libzypp_git.bb | 3 +- 7 files changed, 535 insertions(+), 494 deletions(-) create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-lua.patch delete mode 100644 meta/recipes-devtools/rpm/rpm_5.4.8.bb create mode 100644 meta/recipes-devtools/rpm/rpm_5.4.9.bb create mode 100644 meta/recipes-extended/libzypp/libzypp/libzypp-rpm549.patch diff --git a/meta/recipes-devtools/rpm/rpm/rpm-lua.patch b/meta/recipes-devtools/rpm/rpm/rpm-lua.patch new file mode 100644 index 0000000000..980e1b1476 --- /dev/null +++ b/meta/recipes-devtools/rpm/rpm/rpm-lua.patch @@ -0,0 +1,29 @@ +Add support for cross compiling lua + +Signed-off-by: Mark Hatle + +diff -ur rpm-5.4.9.orig/configure.ac rpm-5.4.9/configure.ac +--- rpm-5.4.9.orig/configure.ac 2012-05-16 12:16:36.589813548 -0500 ++++ rpm-5.4.9/configure.ac 2012-05-16 12:26:01.070813518 -0500 +@@ -120,6 +120,9 @@ + + AC_PATH_PROG(AS, as, as) + ++CC_FOR_BUILD=${CC_FOR_BUILD-\$(CC)} ++AC_SUBST(CC_FOR_BUILD) ++ + dnl # GCC specifics + AC_PROG_GCC_TRADITIONAL + AC_ARG_ENABLE(build-pic, +diff -ur rpm-5.4.9.orig/lua/Makefile.am rpm-5.4.9/lua/Makefile.am +--- rpm-5.4.9.orig/lua/Makefile.am 2012-04-07 19:15:25.000000000 -0500 ++++ rpm-5.4.9/lua/Makefile.am 2012-05-16 12:26:19.556856688 -0500 +@@ -40,7 +40,7 @@ + + # --- bin2c doesn't need anything but a compiler + bin2c$(EXEEXT): bin2c.c +- $(CC) -o $@ $< ++ $(CC_FOR_BUILD) -o $@ $< + + liblua_la_SOURCES = + liblua_la_CFLAGS = @WITH_LUA_SUBDIR_DEF@ diff --git a/meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch b/meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch index e4db0e4211..8a9e712acf 100644 --- a/meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch +++ b/meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch @@ -12,10 +12,11 @@ Upstream-Status: Pending Signed-off-by: Mark Hatle -diff -ur rpm-5.4.0.orig/lib/psm.c rpm-5.4.0/lib/psm.c ---- rpm-5.4.0.orig/lib/psm.c 2010-12-29 07:42:11.000000000 -0600 -+++ rpm-5.4.0/lib/psm.c 2011-11-08 13:38:48.132791154 -0600 -@@ -792,6 +792,10 @@ +Index: rpm-5.4.9/lib/psm.c +=================================================================== +--- rpm-5.4.9.orig/lib/psm.c ++++ rpm-5.4.9/lib/psm.c +@@ -801,6 +801,10 @@ static rpmRC runScript(rpmpsm psm, Heade int xx; int i; @@ -26,23 +27,23 @@ diff -ur rpm-5.4.0.orig/lib/psm.c rpm-5.4.0/lib/psm.c if (psm->sstates != NULL && ix >= 0 && ix < RPMSCRIPT_MAX) ssp = psm->sstates + ix; if (ssp != NULL) -@@ -858,14 +862,29 @@ +@@ -867,14 +871,29 @@ assert(he->p.str != NULL); (F_ISSET(psm, UNORDERED) ? "a" : "")); if (Phe->p.argv == NULL) { -- argv = alloca(5 * sizeof(*argv)); +- argv = (const char **) alloca(5 * sizeof(*argv)); - argv[0] = "/bin/sh"; - argc = 1; -+ argv = alloca(7 * sizeof(*argv)); ++ argv = (const char **) alloca(7 * sizeof(*argv)); + argc = 0; + } else { -+ argv = alloca((Phe->c + 6) * sizeof(*argv)); ++ argv = (const char **) alloca((Phe->c + 6) * sizeof(*argv)); + argc = 0; + } + +#ifdef RPM_VENDOR_POKY + if (scriptletWrapper && *scriptletWrapper) { -+ argv[argc++] = scriptletWrapper; ++ argv[argc++] = scriptletWrapper; + argv[argc] = rpmtsRootDir(ts); + if (!argv[argc] || !*argv[argc]) + argv[argc] = "/"; @@ -51,10 +52,10 @@ diff -ur rpm-5.4.0.orig/lib/psm.c rpm-5.4.0/lib/psm.c +#endif + + if (Phe->p.argv == NULL) { -+ argv[argc++] = "/bin/sh"; ++ argv[argc++] = "/bin/sh"; ldconfig_done = 0; } else { -- argv = alloca((Phe->c + 4) * sizeof(*argv)); +- argv = (const char **) alloca((Phe->c + 4) * sizeof(*argv)); - memcpy(argv, Phe->p.argv, Phe->c * sizeof(*argv)); - argc = Phe->c; + memcpy((argv + argc), Phe->p.argv, Phe->c * sizeof(*argv)); @@ -62,7 +63,7 @@ diff -ur rpm-5.4.0.orig/lib/psm.c rpm-5.4.0/lib/psm.c ldconfig_done = (ldconfig_path && !strcmp(argv[0], ldconfig_path) ? 1 : 0); } -@@ -916,7 +935,12 @@ +@@ -925,7 +944,12 @@ assert(he->p.str != NULL); goto exit; if (rpmIsDebug() && @@ -76,7 +77,7 @@ diff -ur rpm-5.4.0.orig/lib/psm.c rpm-5.4.0/lib/psm.c { static const char set_x[] = "set -x\n"; nw = Fwrite(set_x, sizeof(set_x[0]), sizeof(set_x)-1, fd); -@@ -1051,12 +1075,22 @@ +@@ -1060,12 +1084,22 @@ assert(he->p.str != NULL); { const char * rootDir = rpmtsRootDir(ts); if (!rpmtsChrootDone(ts) && rootDir != NULL && @@ -99,7 +100,7 @@ diff -ur rpm-5.4.0.orig/lib/psm.c rpm-5.4.0/lib/psm.c xx = Chdir("/"); rpmlog(RPMLOG_DEBUG, D_("%s: %s(%s)\texecv(%s) pid %d\n"), psm->stepName, sln, NVRA, -@@ -2961,6 +2995,13 @@ +@@ -2977,6 +3011,13 @@ assert(psm->te != NULL); case PSM_SCRIPT: /* Run current package scriptlets. */ /* XXX running %verifyscript/%sanitycheck doesn't have psm->te */ { rpmtxn _parent = (psm && psm->te ? psm->te->txn : NULL); @@ -113,7 +114,7 @@ diff -ur rpm-5.4.0.orig/lib/psm.c rpm-5.4.0/lib/psm.c xx = rpmtxnBegin(rpmtsGetRdb(ts), _parent, NULL); rc = runInstScript(psm); if (rc) -@@ -2968,11 +3009,24 @@ +@@ -2984,11 +3025,24 @@ assert(psm->te != NULL); else xx = rpmtxnCommit(rpmtsGetRdb(ts)->db_txn); rpmtsGetRdb(ts)->db_txn = NULL; @@ -138,7 +139,7 @@ diff -ur rpm-5.4.0.orig/lib/psm.c rpm-5.4.0/lib/psm.c break; case PSM_IMMED_TRIGGERS: /* Run triggers in this package other package(s) set off. */ -@@ -2982,7 +3036,18 @@ +@@ -2998,7 +3052,18 @@ assert(psm->te != NULL); F_SET(psm, GOTTRIGGERS); } if (psm->triggers != NULL) diff --git a/meta/recipes-devtools/rpm/rpm/rpmdeps-oecore.patch b/meta/recipes-devtools/rpm/rpm/rpmdeps-oecore.patch index 1667901b63..f29866b934 100644 --- a/meta/recipes-devtools/rpm/rpm/rpmdeps-oecore.patch +++ b/meta/recipes-devtools/rpm/rpm/rpmdeps-oecore.patch @@ -16,20 +16,20 @@ RP 2012/2/7 2 files changed, 152 insertions(+), 1 deletions(-) create mode 100644 tools/rpmdeps-oecore.c -diff --git a/tools/Makefile.am b/tools/Makefile.am -index f520843..2eba9bf 100644 ---- a/tools/Makefile.am -+++ b/tools/Makefile.am +Index: rpm-5.4.9/tools/Makefile.am +=================================================================== +--- rpm-5.4.9.orig/tools/Makefile.am ++++ rpm-5.4.9/tools/Makefile.am @@ -58,7 +58,7 @@ pkgbin_PROGRAMS = \ @WITH_AUGEAS_AUGTOOL@ chroot cp @WITH_CUDF_CUDFTOOL@ find mtree \ @WITH_SEMANAGE_SEMODULE@ wget \ rpmcache rpmdigest rpmrepo rpmspecdump \ - rpmcmp rpmdeps sqlite3 @WITH_KEYUTILS_RPMKEY@ @WITH_LIBELF_DEBUGEDIT@ + rpmcmp rpmdeps rpmdeps-oecore sqlite3 @WITH_KEYUTILS_RPMKEY@ @WITH_LIBELF_DEBUGEDIT@ - dist_man_MANS = rpmgrep.1 - - augtool_SOURCES = augtool.c -@@ -155,6 +155,10 @@ rpmdeps_SOURCES = rpmdeps.c + if WITH_DB + pkgbin_PROGRAMS += dbconvert + endif +@@ -168,6 +168,10 @@ rpmdeps_SOURCES = rpmdeps.c rpmdeps_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS) rpmdeps_LDADD = $(RPM_LDADD_COMMON) @@ -40,11 +40,10 @@ index f520843..2eba9bf 100644 rpmdigest_SOURCES = rpmdigest.c rpmdigest_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS) rpmdigest_LDADD = $(RPMIO_LDADD_COMMON) -diff --git a/tools/rpmdeps-oecore.c b/tools/rpmdeps-oecore.c -new file mode 100644 -index 0000000..e646da9 +Index: rpm-5.4.9/tools/rpmdeps-oecore.c +=================================================================== --- /dev/null -+++ b/tools/rpmdeps-oecore.c ++++ rpm-5.4.9/tools/rpmdeps-oecore.c @@ -0,0 +1,147 @@ +#include "system.h" +const char *__progname; @@ -193,6 +192,3 @@ index 0000000..e646da9 + optCon = rpmcliFini(optCon); + return ec; +} --- -1.7.4.1 - diff --git a/meta/recipes-devtools/rpm/rpm_5.4.8.bb b/meta/recipes-devtools/rpm/rpm_5.4.8.bb deleted file mode 100644 index ac86ff3cd4..0000000000 --- a/meta/recipes-devtools/rpm/rpm_5.4.8.bb +++ /dev/null @@ -1,462 +0,0 @@ -SUMMARY = "The RPM package management system" -DESCRIPTION = "The RPM Package Manager (RPM) is a powerful command line driven \ -package management system capable of installing, uninstalling, \ -verifying, querying, and updating software packages. Each software \ -package consists of an archive of files along with information about \ -the package like its version, a description, etc." - -SUMMARY_${PN}-libs = "Libraries for manipulating RPM packages." -DESCRIPTION_${PN}-libs = "This package contains the RPM shared libraries." - -SUMMARY_${PN}-dev = "Development files for manipulating RPM packages." -DESCRIPTION_${PN}-dev = "This package contains the RPM C library and header files. These \ -development files will simplify the process of writing programs that \ -manipulate RPM packages and databases. These files are intended to \ -simplify the process of creating graphical package managers or any \ -other tools that need an intimate knowledge of RPM packages in order \ -to function." - -SUMMARY_${PN}-common = "Common RPM paths, scripts, documentation and configuration." -DESCRIPTION_${PN}-common = "The rpm-common package contains paths, scripts, documentation \ -and configuration common between RPM Package Manager." - -SUMMARY_${PN}-build = "Scripts and executable programs used to build packages." -DESCRIPTION_${PN}-build = "The rpm-build packagec ontains the scripts and executable programs \ -that are used to build packages using the RPM Package Manager." - -SUMMARY_python-rpm = "Python bindings for apps which will manupulate RPM packages." -DESCRIPTION_python-rpm = "The rpm-python package contains a module that permits applications \ -written in the Python programming language to use the interface \ -supplied by the RPM Package Manager libraries." - -SUMMARY_perl-module-rpm = "Perl bindings for apps which will manipulate RPM packages." -DESCRIPTION_perl-modules-rpm = "The perl-modules-rpm package contains a module that permits applications \ -written in the Perl programming language to use the interface \ -supplied by the RPM Package Manager libraries." - -SUMMARY_perl-module-rpm-dev = "Development components for perl bindings" -DESCRIPTION_perl-modules-rpm-dev = "Development items such as man pages for use with the Perl \ -language bindings." - -HOMEPAGE = "http://rpm5.org/" -LICENSE = "LGPLv2.1" -LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1" - -DEPENDS = "beecrypt bzip2 zlib db openssl elfutils expat libpcre attr acl popt ${extrarpmdeps}" -extrarpmdeps = "python perl file" -extrarpmdeps_virtclass-native = "python-native file-native" -PR = "r39" - -# rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed -# in order to extract the distribution SRPM into a format we can extract... -SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.8-0.20120401.src.rpm;extract=rpm-5.4.8.tar.gz \ - file://rpm-log-auto-rm.patch \ - file://rpm-db-reduce.patch \ - file://perfile_rpmdeps.sh \ - file://rpm-autogen.patch \ - file://rpm-libsql-fix.patch \ - file://header-include-fix.patch \ - file://rpm-platform.patch \ - file://rpm-showrc.patch \ - file://rpm-solvedb.patch \ - file://rpm-tools-mtree-LDFLAGS.patch \ - file://rpm-fileclass.patch \ - file://rpm-canonarch.patch \ - file://rpm-no-loopmsg.patch \ - file://rpm-scriptletexechelper.patch \ - file://pythondeps.sh \ - file://rpmdeps-oecore.patch \ - file://rpm-resolvedep.patch \ - file://rpm-respect-arch.patch \ - file://rpm-no-perl-urpm.patch \ - file://rpm-macros.patch \ - " - -SRC_URI[md5sum] = "424b60bf2e0a624a218440d943861644" -SRC_URI[sha256sum] = "56eb5033d4de98c217475fb34d466d551f8912959389e7854a806e2bd9e13380" - -inherit autotools gettext - -acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java" - -# Specify the default rpm macros in terms of adjustable variables -rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:%{_etcrpm}/macros.*:%{_etcrpm}/macros:%{_etcrpm}/%{_target}/macros:~/.oerpmmacros" -rpm_macros_virtclass-native = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros" - -# Configure values taken from rpm.spec -WITH_BZIP2 = "--with-bzip2" - -WITH_XZ = "--with-xz=none" - -WITH_Z = "--with-zlib $WITH_BZIP2 $WITH_XZ" - -WITH_PYTHON = " --with-python=${PYTHON_BASEVERSION} \ - --with-python-inc-dir=${STAGING_INCDIR}/python${PYTHON_BASEVERSION} \ - --with-python-lib-dir=${libdir}/python${PYTHON_BASEVERSION} \ - --without-pythonembed \ - " - -# Perl modules are not built, but they could be enabled fairly easily -# the perl module creation and installation would need to be patched. -# (currently has host perl contamination issues) -#WITH_PERL = " --with-perl --without-perlembed" -WITH_PERL = " --without-perl --without-perl-urpm" - -WITH_PERL_virtclass-native = " --without-perl --without-perl-urpm" - -WITH_DB = "--with-db --with-dbsql --without-db-tools-integrated --without-sqlite" - -WITH_CRYPTO = "--with-beecrypt --with-openssl --without-nss --without-gcrypt" - -WITH_KEYUTILS = "--without-keyutils" -WITH_LIBELF = "--with-libelf" -WITH_SELINUX = "--without-selinux --without-sepol --without-semanage" -#WITH_NEON = "--with-neon=internal --without-libproxy --with-expat --without-gssapi" -WITH_NEON = "--without-neon --without-libproxy --without-expat --without-gssapi" - -EXTRA_OECONF = "--verbose \ - --sysconfdir=/etc \ - ${WITH_DB} \ - ${WITH_Z} \ - --with-file \ - --with-path-magic=%{_usrlibrpm}/../../share/misc/magic.mgc \ - --without-lua \ - --without-tcl \ - --with-syck=internal \ - --without-readline \ - --without-augeas \ - ${WITH_CRYPTO} \ - --without-libtasn1 \ - --without-pakchois \ - --without-gnutls \ - ${WITH_NEON} \ - --with-pcre \ - --enable-utf8 \ - --without-uuid \ - --with-attr \ - --with-acl \ - --without-xar \ - --with-popt=external \ - ${WITH_KEYUTILS} \ - --with-pthreads \ - ${WITH_LIBELF} \ - --without-cudf \ - --without-ficl \ - --without-aterm \ - --without-nix \ - --without-bash \ - --without-rc \ - --without-js \ - --without-gpsee \ - ${WITH_PYTHON} \ - ${WITH_PERL} \ - --without-ruby \ - --without-squirrel \ - --with-build-extlibdep \ - --with-build-maxextlibdep \ - --without-valgrind \ - --without-xz \ - --disable-openmp \ - --enable-build-pic \ - --enable-build-versionscript \ - --enable-build-warnings \ - --enable-build-debug \ - --enable-maintainer-mode \ - --with-path-macros=${rpm_macros} \ - --with-path-lib=${libdir}/rpm \ - --with-bugreport=http://bugzilla.yoctoproject.org \ - --program-prefix=" - -CFLAGS_append = " -DRPM_VENDOR_WINDRIVER -DRPM_VENDOR_POKY" - -PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-libs ${PN}-dev ${PN}-staticdev ${PN}-common ${PN}-build python-rpm-dbg python-rpm-staticdev python-rpm perl-module-rpm perl-module-rpm-dev ${PN}-locale" - -SOLIBS = "5.4.so" - -# Based on %files section in the rpm.spec - -FILES_${PN} = "${bindir}/rpm \ - ${bindir}/rpmconstant \ - ${libdir}/rpm/rpm.* \ - ${libdir}/rpm/tgpg \ - ${libdir}/rpm/macros \ - ${libdir}/rpm/rpmpopt \ - ${libdir}/rpm/rpmdb_loadcvt \ - ${libdir}/rpm/rpm2cpio \ - ${libdir}/rpm/vcheck \ - ${libdir}/rpm/helpers \ - ${libdir}/rpm/qf \ - ${libdir}/rpm/cpuinfo.yaml \ - ${libdir}/rpm/bin/mtree \ - ${libdir}/rpm/bin/rpmkey \ - ${libdir}/rpm/bin/rpmrepo \ - ${libdir}/rpm/bin/rpmspecdump \ - ${libdir}/rpm/bin/wget \ - /var/lib/rpm \ - " - -# ${libdir}/rpm/magic -# ${libdir}/rpm/magic.mgc -# ${libdir}/rpm/magic.mime -# ${libdir}/rpm/magic.mime.mgc -# ${libdir}/rpm/bin/db_* -# ${libdir}/rpm/bin/grep - -FILES_${PN}-dbg += "${libdir}/rpm/.debug \ - ${libdir}/rpm/bin/.debug \ - " - -FILES_${PN}-common = "${bindir}/rpm2cpio \ - ${bindir}/gendiff \ - /etc/rpm \ - /var/spool/repackage \ - " - -FILES_${PN}-libs = "${libdir}/librpm-*.so \ - ${libdir}/librpmconstant-*.so \ - ${libdir}/librpmdb-*.so \ - ${libdir}/librpmio-*.so \ - ${libdir}/librpmmisc-*.so \ - ${libdir}/librpmbuild-*.so \ - " - -###%{_rpmhome}/lib/libxar.so.* -###%{_rpmhome}/lib/libjs.so.* -###%{_rpmhome}/lib/librpmjsm.so.* -###%{_rpmhome}/lib/rpmjsm.so - - -FILES_${PN}-build = "${prefix}/src/rpm \ - ${bindir}/rpmbuild \ - ${libdir}/rpm/brp-* \ - ${libdir}/rpm/check-files \ - ${libdir}/rpm/cross-build \ - ${libdir}/rpm/find-debuginfo.sh \ - ${libdir}/rpm/find-lang.sh \ - ${libdir}/rpm/find-prov.pl \ - ${libdir}/rpm/find-provides.perl \ - ${libdir}/rpm/find-req.pl \ - ${libdir}/rpm/find-requires.perl \ - ${libdir}/rpm/getpo.sh \ - ${libdir}/rpm/http.req \ - ${libdir}/rpm/javadeps.sh \ - ${libdir}/rpm/mono-find-provides \ - ${libdir}/rpm/mono-find-requires \ - ${libdir}/rpm/executabledeps.sh \ - ${libdir}/rpm/libtooldeps.sh \ - ${libdir}/rpm/osgideps.pl \ - ${libdir}/rpm/perldeps.pl \ - ${libdir}/rpm/perl.prov \ - ${libdir}/rpm/perl.req \ - ${libdir}/rpm/php.prov \ - ${libdir}/rpm/php.req \ - ${libdir}/rpm/pkgconfigdeps.sh \ - ${libdir}/rpm/pythondeps.sh \ - ${libdir}/rpm/bin/debugedit \ - ${libdir}/rpm/bin/rpmcache \ - ${libdir}/rpm/bin/rpmcmp \ - ${libdir}/rpm/bin/rpmdeps \ - ${libdir}/rpm/bin/rpmdeps-oecore \ - ${libdir}/rpm/bin/rpmdigest \ - ${libdir}/rpm/bin/abi-compliance-checker.pl \ - ${libdir}/rpm/bin/api-sanity-autotest.pl \ - ${libdir}/rpm/bin/chroot \ - ${libdir}/rpm/bin/cp \ - ${libdir}/rpm/bin/dbsql \ - ${libdir}/rpm/bin/find \ - ${libdir}/rpm/bin/install-sh \ - ${libdir}/rpm/bin/lua \ - ${libdir}/rpm/bin/luac \ - ${libdir}/rpm/bin/mkinstalldirs \ - ${libdir}/rpm/bin/rpmlua \ - ${libdir}/rpm/bin/rpmluac \ - ${libdir}/rpm/bin/sqlite3 \ - ${libdir}/rpm/lib/liblua.a \ - ${libdir}/rpm/lib/liblua.la \ - ${libdir}/rpm/macros.d/cmake \ - ${libdir}/rpm/macros.d/java \ - ${libdir}/rpm/macros.d/libtool \ - ${libdir}/rpm/macros.d/mandriva \ - ${libdir}/rpm/macros.d/mono \ - ${libdir}/rpm/macros.d/perl \ - ${libdir}/rpm/macros.d/php \ - ${libdir}/rpm/macros.d/pkgconfig \ - ${libdir}/rpm/macros.d/python \ - ${libdir}/rpm/macros.d/ruby \ - ${libdir}/rpm/macros.d/selinux \ - ${libdir}/rpm/macros.d/tcl \ - ${libdir}/rpm/macros.rpmbuild \ - ${libdir}/rpm/u_pkg.sh \ - ${libdir}/rpm/vpkg-provides.sh \ - ${libdir}/rpm/vpkg-provides2.sh \ - ${libdir}/rpm/perfile_rpmdeps.sh \ - " -RDEPENDS_${PN}-build = "file" - -#%rpmattr %{_rpmhome}/gem_helper.rb -#%rpmattr %{_rpmhome}/symclash.* - -FILES_python-rpm-dbg = "${libdir}/python*/rpm/.debug/_*" -FILES_python-rpm-staticdev = "${libdir}/python*/rpm/*.a" -FILES_python-rpm = "${libdir}/python*/rpm" - -FILES_perl-module-rpm = "${libdir}/perl/*/* \ - " - -FILES_perl-module-rpm-dev = "${prefix}/share/man/man3/RPM* \ - " - -FILES_${PN}-dev = "${includedir}/rpm \ - ${libdir}/librpm.la \ - ${libdir}/librpm.so \ - ${libdir}/librpmconstant.la \ - ${libdir}/librpmconstant.so \ - ${libdir}/librpmdb.la \ - ${libdir}/librpmdb.so \ - ${libdir}/librpmio.la \ - ${libdir}/librpmio.so \ - ${libdir}/librpmmisc.la \ - ${libdir}/librpmmisc.so \ - ${libdir}/librpmbuild.la \ - ${libdir}/librpmbuild.so \ - ${libdir}/pkgconfig/rpm.pc \ - " - -FILES_${PN}-staticdev = " \ - ${libdir}/librpm.a \ - ${libdir}/librpmconstant.a \ - ${libdir}/librpmdb.a \ - ${libdir}/librpmio.a \ - ${libdir}/librpmmisc.a \ - ${libdir}/librpmbuild.a \ - " - -###%{_rpmhome}/lib/libxar.a -###%{_rpmhome}/lib/libxar.la -###%{_rpmhome}/lib/libxar.so -###%{_rpmhome}/lib/libjs.a -###%{_rpmhome}/lib/libjs.la -###%{_rpmhome}/lib/libjs.so -###%{_rpmhome}/lib/librpmjsm.a -###%{_rpmhome}/lib/librpmjsm.la -###%{_rpmhome}/lib/librpmjsm.so - -do_configure() { - # Disable tests! - echo "all:" > tests/Makefile.am - - ./autogen.sh - - export varprefix=${localstatedir} - oe_runconf -} - -do_install_append() { - 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,%_repackage_all_erasures[^_].*,%_repackage_all_erasures 0,' ${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}/pythondeps.sh ${D}/${libdir}/rpm/pythondeps.sh - install -m 0755 ${WORKDIR}/perfile_rpmdeps.sh ${D}/${libdir}/rpm/perfile_rpmdeps.sh - - # Remove unpackaged files (based on list in rpm.spec) - rm -f ${D}/${libdir}/rpm/{Specfile.pm,cpanflute,cpanflute2,rpmdiff,rpmdiff.cgi,sql.prov,sql.req,tcl.req,trpm} - - rm -f ${D}/${mandir}/man8/rpmcache.8* - rm -f ${D}/${mandir}/man8/rpmgraph.8* - rm -f ${D}/${mandir}/*/man8/rpmcache.8* - rm -f ${D}/${mandir}/*/man8/rpmgraph.8* - rm -rf ${D}/${mandir}/{fr,ko} - - rm -f ${D}/${includedir}/popt.h - rm -f ${D}/${libdir}/libpopt.* - rm -f ${D}/${libdir}/pkgconfig/popt.pc - rm -f ${D}/${datadir}/locale/*/LC_MESSAGES/popt.mo - rm -f ${D}/${mandir}/man3/popt.3 - - rm -f ${D}/${mandir}/man1/xar.1* - rm -f ${D}/${bindir}/xar - rm -rf ${D}/${includedir}/xar - rm -f ${D}/${libdir}/libxar* - - rm -f ${D}/${bindir}/lz* - rm -f ${D}/${bindir}/unlzma - rm -f ${D}/${bindir}/unxz - rm -f ${D}/${bindir}/xz* - rm -rf ${D}/${includedir}/lzma* - rm -f ${D}/${mandir}/man1/lz*.1 - rm -f ${D}/${libdir}/pkgconfig/liblzma* - - rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.{a,la} - rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.{a,la} - - #find ${D}/${libdir}/perl5 -type f -a \( -name perllocal.pod -o -name .packlist \ - # -o \( -name '*.bs' -a -empty \) \) -exec rm -f {} ';' - #find ${D}/${libdir}/perl5 -type d -depth -exec rmdir {} 2>/dev/null ';' - - # We don't want the default macro set - rm -rf ${D}/${libdir}/rpm/{i[3456]86*,athlon*,pentium*,x86_64*,alpha*,sparc*,ia64*,ppc*,s390*,armv[34][lb]*,armv[345]*,mips*,noarch*} - - rm -f ${D}/${libdir}/rpm/dbconvert.sh - - rm -f ${D}/${libdir}/rpm/libsqldb.* - - # We don't want, nor need the Mandriva multiarch items - rm -f ${D}/${bindir}/multiarch-dispatch - rm -f ${D}/${bindir}/multiarch-platform - rm -f ${D}/${libdir}/rpm/check-multiarch-files - rm -f ${D}/${libdir}/rpm/mkmultiarch - rm -f ${D}/${includedir}/multiarch-dispatch.h - - rm -f ${D}/${libdir}/rpm/gstreamer.sh - rm -f ${D}/${libdir}/rpm/gem_helper.rb - rm -f ${D}/${libdir}/rpm/rubygems.rb - rm -f ${D}/${libdir}/rpm/kmod-deps.sh - rm -f ${D}/${libdir}/rpm/pythoneggs.py - rm -f ${D}/${libdir}/rpm/macros.d/kernel - rm -f ${D}/${libdir}/rpm/macros.d/gstreamer - rm -f ${D}/${libdir}/rpm/bin/mgo - rm -f ${D}/${libdir}/rpm/bin/dbconvert - rm -f ${D}/${libdir}/rpm/bin/pom2spec - -} - -do_install_append_virtclass-native() { - create_wrapper ${D}/${bindir}/rpm \ - RPM_USRLIBRPM=${STAGING_LIBDIR_NATIVE}/rpm \ - RPM_ETCRPM=${STAGING_ETCDIR_NATIVE}/rpm \ - RPM_LOCALEDIRRPM=${STAGING_DATADIR_NATIVE}/locale - - create_wrapper ${D}/${bindir}/rpm2cpio \ - RPM_USRLIBRPM=${STAGING_LIBDIR_NATIVE}/rpm \ - RPM_ETCRPM=${STAGING_ETCDIR_NATIVE}/rpm \ - RPM_LOCALEDIRRPM=${STAGING_DATADIR_NATIVE}/locale - - create_wrapper ${D}/${bindir}/rpmbuild \ - RPM_USRLIBRPM=${STAGING_LIBDIR_NATIVE}/rpm \ - RPM_ETCRPM=${STAGING_ETCDIR_NATIVE}/rpm \ - RPM_LOCALEDIRRPM=${STAGING_DATADIR_NATIVE}/locale - - create_wrapper ${D}/${bindir}/rpmconstant \ - RPM_USRLIBRPM=${STAGING_LIBDIR_NATIVE}/rpm \ - RPM_ETCRPM=${STAGING_ETCDIR_NATIVE}/rpm \ - RPM_LOCALEDIRRPM=${STAGING_DATADIR_NATIVE}/locale - - for rpm_binary in ${D}/${libdir}/rpm/bin/rpm*; do - create_wrapper $rpm_binary - RPM_USRLIBRPM=${STAGING_LIBDIR_NATIVE}/rpm \ - RPM_ETCRPM=${STAGING_ETCDIR_NATIVE}/rpm \ - RPM_LOCALEDIRRPM=${STAGING_DATADIR_NATIVE}/locale - done - - # Adjust popt macros to match... - cat ${D}/${libdir}/rpm/rpmpopt | sed -e "s,^\(rpm[^ ]*\)\([ ]\),\1.real\2," > ${D}/${libdir}/rpm/rpmpopt.new - mv ${D}/${libdir}/rpm/rpmpopt.new ${D}/${libdir}/rpm/rpmpopt -} - -BBCLASSEXTEND = "native" diff --git a/meta/recipes-devtools/rpm/rpm_5.4.9.bb b/meta/recipes-devtools/rpm/rpm_5.4.9.bb new file mode 100644 index 0000000000..6eba802d8a --- /dev/null +++ b/meta/recipes-devtools/rpm/rpm_5.4.9.bb @@ -0,0 +1,448 @@ +SUMMARY = "The RPM package management system" +DESCRIPTION = "The RPM Package Manager (RPM) is a powerful command line driven \ +package management system capable of installing, uninstalling, \ +verifying, querying, and updating software packages. Each software \ +package consists of an archive of files along with information about \ +the package like its version, a description, etc." + +SUMMARY_${PN}-libs = "Libraries for manipulating RPM packages." +DESCRIPTION_${PN}-libs = "This package contains the RPM shared libraries." + +SUMMARY_${PN}-dev = "Development files for manipulating RPM packages." +DESCRIPTION_${PN}-dev = "This package contains the RPM C library and header files. These \ +development files will simplify the process of writing programs that \ +manipulate RPM packages and databases. These files are intended to \ +simplify the process of creating graphical package managers or any \ +other tools that need an intimate knowledge of RPM packages in order \ +to function." + +SUMMARY_${PN}-common = "Common RPM paths, scripts, documentation and configuration." +DESCRIPTION_${PN}-common = "The rpm-common package contains paths, scripts, documentation \ +and configuration common between RPM Package Manager." + +SUMMARY_${PN}-build = "Scripts and executable programs used to build packages." +DESCRIPTION_${PN}-build = "The rpm-build packagec ontains the scripts and executable programs \ +that are used to build packages using the RPM Package Manager." + +SUMMARY_python-rpm = "Python bindings for apps which will manupulate RPM packages." +DESCRIPTION_python-rpm = "The rpm-python package contains a module that permits applications \ +written in the Python programming language to use the interface \ +supplied by the RPM Package Manager libraries." + +SUMMARY_perl-module-rpm = "Perl bindings for apps which will manipulate RPM packages." +DESCRIPTION_perl-modules-rpm = "The perl-modules-rpm package contains a module that permits applications \ +written in the Perl programming language to use the interface \ +supplied by the RPM Package Manager libraries." + +SUMMARY_perl-module-rpm-dev = "Development components for perl bindings" +DESCRIPTION_perl-modules-rpm-dev = "Development items such as man pages for use with the Perl \ +language bindings." + +HOMEPAGE = "http://rpm5.org/" +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1" + +DEPENDS = "libpcre attr acl popt file" +PR = "r40" + +# rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed +# in order to extract the distribution SRPM into a format we can extract... +SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.9-0.20120508.src.rpm;extract=rpm-5.4.9.tar.gz \ + file://rpm-log-auto-rm.patch \ + file://rpm-db-reduce.patch \ + file://perfile_rpmdeps.sh \ + file://rpm-autogen.patch \ + file://rpm-libsql-fix.patch \ + file://header-include-fix.patch \ + file://rpm-platform.patch \ + file://rpm-showrc.patch \ + file://rpm-solvedb.patch \ + file://rpm-tools-mtree-LDFLAGS.patch \ + file://rpm-fileclass.patch \ + file://rpm-canonarch.patch \ + file://rpm-no-loopmsg.patch \ + file://rpm-scriptletexechelper.patch \ + file://pythondeps.sh \ + file://rpmdeps-oecore.patch \ + file://rpm-resolvedep.patch \ + file://rpm-respect-arch.patch \ + file://rpm-no-perl-urpm.patch \ + file://rpm-macros.patch \ + file://rpm-lua.patch \ + " + +SRC_URI[md5sum] = "60d56ace884340c1b3fcac6a1d58e768" +SRC_URI[sha256sum] = "bac7cc5bd9d0e8262fdc0099349924608da8f680f5cb243751f696552239dde8" + +inherit autotools gettext + +acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java" + +# Specify the default rpm macros in terms of adjustable variables +rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:%{_etcrpm}/macros.*:%{_etcrpm}/macros:%{_etcrpm}/%{_target}/macros:~/.oerpmmacros" +rpm_macros_virtclass-native = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros" + +# sqlite lua tcl augeas nss gcrypt neon xz xar keyutils perl selinux + +# Note: perl and sqlite w/o db specified does not currently work. +# tcl, augeas, nss, gcrypt, xar and keyutils support is untested. +PACKAGECONFIG_virtclass-native ??= "db bzip2 zlib beecrypt openssl libelf python" +PACKAGECONFIG ??= "db bzip2 zlib beecrypt openssl libelf python" + +PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2," +PACKAGECONFIG[xz] = "--with-xz,--without-xz,xz," +PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib," +PACKAGECONFIG[xar] = "--with-xar,--without-xar,xar," + +WITH_PYTHON = " --with-python=${PYTHON_BASEVERSION} \ + --with-python-inc-dir=${STAGING_INCDIR}/python${PYTHON_BASEVERSION} \ + --with-python-lib-dir=${libdir}/python${PYTHON_BASEVERSION} \ + --without-pythonembed" +PACKAGECONFIG[python] = "${WITH_PYTHON},--without-python,python," + +# Perl modules are not built, but they could be enabled fairly easily +# the perl module creation and installation would need to be patched. +# (currently has host perl contamination issues) +WITH_PERL = "--with-perl --without-perlembed --without-perl-urpm" +WITHOUT_PERL = "--without-perl --without-perl-urpm" +PACKAGECONFIG[perl] = "${WITH_PERL},${WITHOUT_PERL},perl," + +# The --with-dbsql will only tell RPM to check for support, db +# may or may not be built w/ the dbsql support. +WITH_DB = "--with-db --with-dbsql --without-db-tools-integrated" +PACKAGECONFIG[db] = "${WITH_DB},--without-db,db," + +PACKAGECONFIG[sqlite] = "--with-sqlite,--without-sqlite,sqlite3," + +PACKAGECONFIG[beecrypt] = "--with-beecrypt,--without-beecrypt,beecrypt," +PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl," +PACKAGECONFIG[nss] = "--with-nss,--without-nss,nss," +PACKAGECONFIG[gcrypt] = "--with-gcrypt,--without-gcrypt,gcrypt," +PACKAGECONFIG[keyutils] = "--with-keyutils,--without-keyutils,keyutils," +PACKAGECONFIG[libelf] = "--with-libelf,--without-libelf,elfutils," + +WITH_SELINUX = "--with-selinux --with-sepol --with-semanage" +WITHOUT_SELINUX = "--without-selinux --without-sepol --without-semanage" +PACKAGECONFIG[selinux] = "${WITH_SELINUX},${WITHOUT_SELINUX},selinux," + +WITH_NEON = "--with-neon --with-libproxy --with-expat --without-gssapi" +WITHOUT_NEON = "--without-neon --without-libproxy --without-expat --without-gssapi" +PACKAGECONFIG[neon] = "${WITH_NEON},${WITHOUT_NEON},neon," + +PACKAGECONFIG[lua] = "--with-lua,--without-lua," +PACKAGECONFIG[tcl] = "--with-tcl,--without-tcl,tcl," + +PACAKGECONFIG[augeas] = "--with-augeas,--without-augeas,augeas," + +EXTRA_OECONF += "--verbose \ + --sysconfdir=/etc \ + --with-file \ + --with-path-magic=%{_usrlibrpm}/../../share/misc/magic.mgc \ + --with-syck=internal \ + --without-readline \ + --without-libtasn1 \ + --without-pakchois \ + --without-gnutls \ + --with-pcre \ + --enable-utf8 \ + --without-uuid \ + --with-attr \ + --with-acl \ + --with-popt=external \ + --with-pthreads \ + --without-cudf \ + --without-ficl \ + --without-aterm \ + --without-nix \ + --without-bash \ + --without-rc \ + --without-js \ + --without-gpsee \ + --without-ruby \ + --without-squirrel \ + --with-build-extlibdep \ + --with-build-maxextlibdep \ + --without-valgrind \ + --disable-openmp \ + --enable-build-pic \ + --enable-build-versionscript \ + --enable-build-warnings \ + --enable-build-debug \ + --enable-maintainer-mode \ + --with-path-macros=${rpm_macros} \ + --with-path-lib=${libdir}/rpm \ + --with-bugreport=http://bugzilla.yoctoproject.org \ + --program-prefix=" + +CFLAGS_append = " -DRPM_VENDOR_WINDRIVER -DRPM_VENDOR_POKY -DRPM_VENDOR_OE" + +PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-libs ${PN}-dev ${PN}-staticdev ${PN}-common ${PN}-build python-rpm-dbg python-rpm-staticdev python-rpm perl-module-rpm perl-module-rpm-dev ${PN}-locale" + +SOLIBS = "5.4.so" + +# Based on %files section in the rpm.spec + +FILES_${PN} = "${bindir}/rpm \ + ${bindir}/rpmconstant \ + ${libdir}/rpm/rpm.* \ + ${libdir}/rpm/tgpg \ + ${libdir}/rpm/macros \ + ${libdir}/rpm/rpmpopt \ + ${libdir}/rpm/rpmdb_loadcvt \ + ${libdir}/rpm/rpm2cpio \ + ${libdir}/rpm/vcheck \ + ${libdir}/rpm/helpers \ + ${libdir}/rpm/qf \ + ${libdir}/rpm/cpuinfo.yaml \ + ${libdir}/rpm/bin/mtree \ + ${libdir}/rpm/bin/rpmkey \ + ${libdir}/rpm/bin/rpmrepo \ + ${libdir}/rpm/bin/rpmspecdump \ + ${libdir}/rpm/bin/wget \ + /var/lib/rpm \ + /var/cache/rpm \ + /var/volatile/cache/rpm \ + " + +FILES_${PN}-dbg += "${libdir}/rpm/.debug \ + ${libdir}/rpm/bin/.debug \ + " + +FILES_${PN}-common = "${bindir}/rpm2cpio \ + ${bindir}/gendiff \ + /etc/rpm \ + /var/spool/repackage \ + " + +FILES_${PN}-libs = "${libdir}/librpm-*.so \ + ${libdir}/librpmconstant-*.so \ + ${libdir}/librpmdb-*.so \ + ${libdir}/librpmio-*.so \ + ${libdir}/librpmmisc-*.so \ + ${libdir}/librpmbuild-*.so \ + " + +FILES_${PN}-build = "${prefix}/src/rpm \ + ${bindir}/rpmbuild \ + ${libdir}/rpm/brp-* \ + ${libdir}/rpm/check-files \ + ${libdir}/rpm/cross-build \ + ${libdir}/rpm/find-debuginfo.sh \ + ${libdir}/rpm/find-lang.sh \ + ${libdir}/rpm/find-prov.pl \ + ${libdir}/rpm/find-provides.perl \ + ${libdir}/rpm/find-req.pl \ + ${libdir}/rpm/find-requires.perl \ + ${libdir}/rpm/getpo.sh \ + ${libdir}/rpm/http.req \ + ${libdir}/rpm/javadeps.sh \ + ${libdir}/rpm/mono-find-provides \ + ${libdir}/rpm/mono-find-requires \ + ${libdir}/rpm/executabledeps.sh \ + ${libdir}/rpm/libtooldeps.sh \ + ${libdir}/rpm/osgideps.pl \ + ${libdir}/rpm/perldeps.pl \ + ${libdir}/rpm/perl.prov \ + ${libdir}/rpm/perl.req \ + ${libdir}/rpm/php.prov \ + ${libdir}/rpm/php.req \ + ${libdir}/rpm/pkgconfigdeps.sh \ + ${libdir}/rpm/pythondeps.sh \ + ${libdir}/rpm/bin/debugedit \ + ${libdir}/rpm/bin/rpmcache \ + ${libdir}/rpm/bin/rpmcmp \ + ${libdir}/rpm/bin/rpmdeps \ + ${libdir}/rpm/bin/rpmdeps-oecore \ + ${libdir}/rpm/bin/rpmdigest \ + ${libdir}/rpm/bin/abi-compliance-checker.pl \ + ${libdir}/rpm/bin/api-sanity-autotest.pl \ + ${libdir}/rpm/bin/chroot \ + ${libdir}/rpm/bin/cp \ + ${libdir}/rpm/bin/dbsql \ + ${libdir}/rpm/bin/find \ + ${libdir}/rpm/bin/install-sh \ + ${libdir}/rpm/bin/lua \ + ${libdir}/rpm/bin/luac \ + ${libdir}/rpm/bin/mkinstalldirs \ + ${libdir}/rpm/bin/rpmlua \ + ${libdir}/rpm/bin/rpmluac \ + ${libdir}/rpm/bin/sqlite3 \ + ${libdir}/rpm/macros.d/cmake \ + ${libdir}/rpm/macros.d/java \ + ${libdir}/rpm/macros.d/libtool \ + ${libdir}/rpm/macros.d/mandriva \ + ${libdir}/rpm/macros.d/mono \ + ${libdir}/rpm/macros.d/perl \ + ${libdir}/rpm/macros.d/php \ + ${libdir}/rpm/macros.d/pkgconfig \ + ${libdir}/rpm/macros.d/python \ + ${libdir}/rpm/macros.d/ruby \ + ${libdir}/rpm/macros.d/selinux \ + ${libdir}/rpm/macros.d/tcl \ + ${libdir}/rpm/macros.rpmbuild \ + ${libdir}/rpm/u_pkg.sh \ + ${libdir}/rpm/vpkg-provides.sh \ + ${libdir}/rpm/vpkg-provides2.sh \ + ${libdir}/rpm/perfile_rpmdeps.sh \ + " +RDEPENDS_${PN}-build = "file" + +FILES_python-rpm-dbg = "${libdir}/python*/rpm/.debug/_*" +FILES_python-rpm-staticdev = "${libdir}/python*/rpm/*.a" +FILES_python-rpm = "${libdir}/python*/rpm" + +FILES_perl-module-rpm = "${libdir}/perl/*/* \ + " + +FILES_perl-module-rpm-dev = "${prefix}/share/man/man3/RPM* \ + " + +FILES_${PN}-dev = "${includedir}/rpm \ + ${libdir}/librpm.la \ + ${libdir}/librpm.so \ + ${libdir}/librpmconstant.la \ + ${libdir}/librpmconstant.so \ + ${libdir}/librpmdb.la \ + ${libdir}/librpmdb.so \ + ${libdir}/librpmio.la \ + ${libdir}/librpmio.so \ + ${libdir}/librpmmisc.la \ + ${libdir}/librpmmisc.so \ + ${libdir}/librpmbuild.la \ + ${libdir}/librpmbuild.so \ + ${libdir}/rpm/lib/liblua.la \ + ${libdir}/pkgconfig/rpm.pc \ + " + +FILES_${PN}-staticdev = " \ + ${libdir}/librpm.a \ + ${libdir}/librpmconstant.a \ + ${libdir}/librpmdb.a \ + ${libdir}/librpmio.a \ + ${libdir}/librpmmisc.a \ + ${libdir}/librpmbuild.a \ + ${libdir}/rpm/lib/liblua.a \ + " + +do_configure() { + # Disable tests! + echo "all:" > tests/Makefile.am + + ./autogen.sh + + export varprefix=${localstatedir} + export CC_FOR_BUILD="${BUILD_CC}" + oe_runconf +} + +do_install_append() { + 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,%_repackage_all_erasures[^_].*,%_repackage_all_erasures 0,' ${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}/pythondeps.sh ${D}/${libdir}/rpm/pythondeps.sh + install -m 0755 ${WORKDIR}/perfile_rpmdeps.sh ${D}/${libdir}/rpm/perfile_rpmdeps.sh + + # Remove unpackaged files (based on list in rpm.spec) + rm -f ${D}/${libdir}/rpm/{Specfile.pm,cpanflute,cpanflute2,rpmdiff,rpmdiff.cgi,sql.prov,sql.req,tcl.req,trpm} + + rm -f ${D}/${mandir}/man8/rpmcache.8* + rm -f ${D}/${mandir}/man8/rpmgraph.8* + rm -f ${D}/${mandir}/*/man8/rpmcache.8* + rm -f ${D}/${mandir}/*/man8/rpmgraph.8* + rm -rf ${D}/${mandir}/{fr,ko} + + rm -f ${D}/${includedir}/popt.h + rm -f ${D}/${libdir}/libpopt.* + rm -f ${D}/${libdir}/pkgconfig/popt.pc + rm -f ${D}/${datadir}/locale/*/LC_MESSAGES/popt.mo + rm -f ${D}/${mandir}/man3/popt.3 + + rm -f ${D}/${mandir}/man1/xar.1* + rm -f ${D}/${bindir}/xar + rm -rf ${D}/${includedir}/xar + rm -f ${D}/${libdir}/libxar* + + rm -f ${D}/${bindir}/lz* + rm -f ${D}/${bindir}/unlzma + rm -f ${D}/${bindir}/unxz + rm -f ${D}/${bindir}/xz* + rm -rf ${D}/${includedir}/lzma* + rm -f ${D}/${mandir}/man1/lz*.1 + rm -f ${D}/${libdir}/pkgconfig/liblzma* + + rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.{a,la} + rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.{a,la} + + #find ${D}/${libdir}/perl5 -type f -a \( -name perllocal.pod -o -name .packlist \ + # -o \( -name '*.bs' -a -empty \) \) -exec rm -f {} ';' + #find ${D}/${libdir}/perl5 -type d -depth -exec rmdir {} 2>/dev/null ';' + + # We don't want the default macro set + rm -rf ${D}/${libdir}/rpm/{i[3456]86*,athlon*,pentium*,x86_64*,alpha*,sparc*,ia64*,ppc*,s390*,armv[34][lb]*,armv[345]*,mips*,noarch*} + + rm -f ${D}/${libdir}/rpm/dbconvert.sh + + rm -f ${D}/${libdir}/rpm/libsqldb.* + + # We don't want, nor need the Mandriva multiarch items + rm -f ${D}/${bindir}/multiarch-dispatch + rm -f ${D}/${bindir}/multiarch-platform + rm -f ${D}/${libdir}/rpm/check-multiarch-files + rm -f ${D}/${libdir}/rpm/mkmultiarch + rm -f ${D}/${includedir}/multiarch-dispatch.h + + rm -f ${D}/${libdir}/rpm/gstreamer.sh + rm -f ${D}/${libdir}/rpm/gem_helper.rb + rm -f ${D}/${libdir}/rpm/rubygems.rb + rm -f ${D}/${libdir}/rpm/kmod-deps.sh + rm -f ${D}/${libdir}/rpm/pythoneggs.py + rm -f ${D}/${libdir}/rpm/macros.d/kernel + rm -f ${D}/${libdir}/rpm/macros.d/gstreamer + rm -f ${D}/${libdir}/rpm/bin/mgo + rm -f ${D}/${libdir}/rpm/bin/dbconvert + rm -f ${D}/${libdir}/rpm/bin/pom2spec + + rm -rf ${D}/var/lib/wdj ${D}/var/cache/wdj + rm -f ${D}/usr/lib/rpm/bin/api-sanity-checker.pl +} + +do_install_append_virtclass-native() { + create_wrapper ${D}/${bindir}/rpm \ + RPM_USRLIBRPM=${STAGING_LIBDIR_NATIVE}/rpm \ + RPM_ETCRPM=${STAGING_ETCDIR_NATIVE}/rpm \ + RPM_LOCALEDIRRPM=${STAGING_DATADIR_NATIVE}/locale + + create_wrapper ${D}/${bindir}/rpm2cpio \ + RPM_USRLIBRPM=${STAGING_LIBDIR_NATIVE}/rpm \ + RPM_ETCRPM=${STAGING_ETCDIR_NATIVE}/rpm \ + RPM_LOCALEDIRRPM=${STAGING_DATADIR_NATIVE}/locale + + create_wrapper ${D}/${bindir}/rpmbuild \ + RPM_USRLIBRPM=${STAGING_LIBDIR_NATIVE}/rpm \ + RPM_ETCRPM=${STAGING_ETCDIR_NATIVE}/rpm \ + RPM_LOCALEDIRRPM=${STAGING_DATADIR_NATIVE}/locale + + create_wrapper ${D}/${bindir}/rpmconstant \ + RPM_USRLIBRPM=${STAGING_LIBDIR_NATIVE}/rpm \ + RPM_ETCRPM=${STAGING_ETCDIR_NATIVE}/rpm \ + RPM_LOCALEDIRRPM=${STAGING_DATADIR_NATIVE}/locale + + for rpm_binary in ${D}/${libdir}/rpm/bin/rpm*; do + create_wrapper $rpm_binary + RPM_USRLIBRPM=${STAGING_LIBDIR_NATIVE}/rpm \ + RPM_ETCRPM=${STAGING_ETCDIR_NATIVE}/rpm \ + RPM_LOCALEDIRRPM=${STAGING_DATADIR_NATIVE}/locale + done + + # Adjust popt macros to match... + cat ${D}/${libdir}/rpm/rpmpopt | sed -e "s,^\(rpm[^ ]*\)\([ ]\),\1.real\2," > ${D}/${libdir}/rpm/rpmpopt.new + mv ${D}/${libdir}/rpm/rpmpopt.new ${D}/${libdir}/rpm/rpmpopt +} + +BBCLASSEXTEND = "native" diff --git a/meta/recipes-extended/libzypp/libzypp/libzypp-rpm549.patch b/meta/recipes-extended/libzypp/libzypp/libzypp-rpm549.patch new file mode 100644 index 0000000000..8268a2d51d --- /dev/null +++ b/meta/recipes-extended/libzypp/libzypp/libzypp-rpm549.patch @@ -0,0 +1,28 @@ +commit 6c47ad415246cc3a3edac2e1637106d330574c85 +Author: Mark Hatle +Date: Fri May 11 19:05:09 2012 -0500 + + RpmHeader.cc: RPM 5.4.9 integration + + _RPMVSF_xxx - NODIGEST, NOSIGNATURES, NOHEADER, and NOPAYLOAD + are now obsolete and no longer supported. + + Signed-off-by: Mark Hatle + +diff --git a/zypp/target/rpm/RpmHeader.cc b/zypp/target/rpm/RpmHeader.cc +index 1224ecd..c96dae6 100644 +--- a/zypp/target/rpm/RpmHeader.cc ++++ b/zypp/target/rpm/RpmHeader.cc +@@ -230,10 +230,12 @@ RpmHeader::constPtr RpmHeader::readPackage( const Pathname & path_r, + librpmDb::globalInit(); + rpmts ts = ::rpmtsCreate(); + unsigned vsflag = RPMVSF_DEFAULT; ++#if !defined(_RPM_5) + if ( verification_r & NODIGEST ) + vsflag |= _RPMVSF_NODIGESTS; + if ( verification_r & NOSIGNATURE ) + vsflag |= _RPMVSF_NOSIGNATURES; ++#endif + ::rpmtsSetVSFlags( ts, rpmVSFlags(vsflag) ); + + Header nh = 0; diff --git a/meta/recipes-extended/libzypp/libzypp_git.bb b/meta/recipes-extended/libzypp/libzypp_git.bb index 3c3a9f09ec..c5761d5784 100644 --- a/meta/recipes-extended/libzypp/libzypp_git.bb +++ b/meta/recipes-extended/libzypp/libzypp_git.bb @@ -11,7 +11,7 @@ DEPENDS = "rpm boost curl libxml2 zlib sat-solver expat openssl udev libproxy" S = "${WORKDIR}/git" SRCREV = "15b6c52260bbc52b3d8e585e271b67e10cc7c433" PV = "0.0-git${SRCPV}" -PR = "r20" +PR = "r21" SRC_URI = "git://github.com/openSUSE/libzypp.git;protocol=git \ file://no-doc.patch \ @@ -23,6 +23,7 @@ SRC_URI = "git://github.com/openSUSE/libzypp.git;protocol=git \ file://fix_for_compile_wth_gcc-4.6.0.patch \ file://hardcode-lib-fix.patch \ file://close.patch \ + file://libzypp-rpm549.patch \ " SRC_URI_append_mips = " file://mips-workaround-gcc-tribool-error.patch" -- cgit v1.2.3-54-g00ecf