All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/44] Replace Smart package manager with DNF package manager
@ 2017-03-10 11:23 Alexander Kanavin
  2017-03-10 11:23 ` [PATCH 01/44] package.bbclass: fix locations of debugedit and rpmdeps utilities Alexander Kanavin
                   ` (44 more replies)
  0 siblings, 45 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:23 UTC (permalink / raw)
  To: openembedded-core

This patchset replaces the outdated, unsupported Smart package manager with
DNF package manager (Fedora's successor to yum). This is not a trivial change
and there are many consequences:

- DNF is API incompatible with rpm5; therefore rpm5 is replaced with rpm4.

- There are various non-default features that aren't yet supported or tested:
such as signing packages and repositories, RPM_PREFER_ELF_ARCH and possibly others

- db 6.x is removed from oe-core; db 5.x is replacing it

- Although I did my very best to test this patchset locally, 
the whole thing may break down in surprising ways. I would appreaciate all the help
you can provide here. The patchset touches many things in many places and has
more than the usual share of side effects.

Please see specific commits for further information and explanations. There is also
a longer email explaining user-visible changes and rationale behind them in
http://lists.openembedded.org/pipermail/openembedded-architecture/2017-February/000419.html
(note that section 6 in that email is no longer valid.

Changes in version 2 of the patchset:

- addressed review comments received for the first version of the pachset;
in particular the controversial pkg_postinst changes are removed (but they'll
be back as a separate change). Please check that I didn't forget anything.

- rpm package signing with gpg is now fixed, and should be working

Changes in version 3 of the patchset:

- a massive amount of fixes for issues that were found by Yocto autobuilder testing.
Particularly multilib support is now working properly. I believe that from the AB
perspective the patchset is ready for merging :)

The following changes since commit d454dc2fc17711d3efe6dbe5aca3c734f0ed158b:

  gcc-runtime: Fix QA issue (2017-03-08 11:52:57 +0000)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib akanavin/dnf-rpm4
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=akanavin/dnf-rpm4

Alexander Kanavin (44):
  package.bbclass: fix locations of debugedit and rpmdeps utilities
  libsolv: enable rpm support
  rpmresolve: remove the recipe
  createrepo-c: add a recipe
  createrepo: remove the recipe
  rpm: add a 4.x recipe
  rpm: remove 5.x recipe
  python-pygpgme: add a recipe
  python-iniparse: add a recipe
  python-backports-lzma: add a recipe
  librepo: add a recipe
  libcomps: add a recipe
  libdnf: add a recipe
  dnf: add a recipe
  python-smartpm: remove the recipe
  db: remove the 6.x recipe
  package_rpm.bbclass: make architecture-independent .rpm packages
    "noarch" instead of "all"
  package_manager.py: improve the API for insert_feed_uris()
  package_rpm.bbclass: correctly map RRECOMMENDS and RSUGGESTS to rpm
    tags
  nativesdk-packagegroup-sdk-host: replace smartpm with dnf
  rootfs_rpm.bbclass: migrate image creation to dnf
  scripts/rpm2cpio.sh: replace 5.x version with 4.x version
  scripts/oe-setup-rpmrepo: replace createrepo with createrepo_c
  package_rpm.bbclass: replace createrepo reference with createrepo_c
  package_rpm.bbclass: no need to specify the magic file location
  testimage.bbclass: fix runtime test for rpm, port smart tests to dnf
  package_rpm.bbclass: instruct rpm to not remove the buildroot
    directory
  selftest: do not perform a full build in test_continue
  selftest: update output checks in incremental image test to match what
    dnf prints
  byacc: remove the recipe
  gpg_sign.py: fix signing of rpm files using gpg
  oe-selftest: no need to parse gpg output to determine the name of the
    signing key
  run-postinsts: simplify the logic of whether to install it to images
  package_rpm.bbclass: add a /bin/sh Provides for nativesdk- packages
  security_flags.inc: update to reflect smart->dnf transition
  package_rpm.bbclass: do not set the OS dynamically when building rpms
  nspr: do not use shared library symbol resolution with musl
  package_rpm.bbclass: do not strip multilib prefixes from package
    names, do not add multilib prefix to package arch
  package.bbclass: don't exclude package groups from runtime mapping
  glibc: do the multilib_header magic also for bits/long-double.h
  bash: package bashbug separately
  db: do the multilib_header processing for db.h
  base-files: do not write the current date into /etc/issue and
    /etc/issue.net
  gpgme: fix python module build and installation

 .../recipes-test/images/oe-selftest-image.bb       |    2 +-
 .../recipes-test/images/wic-image-minimal.bb       |    2 +-
 meta/classes/image.bbclass                         |    2 +-
 meta/classes/package.bbclass                       |    7 +-
 meta/classes/package_rpm.bbclass                   |   86 +-
 meta/classes/rootfs_deb.bbclass                    |    1 -
 meta/classes/rootfs_ipk.bbclass                    |    1 -
 meta/classes/rootfs_rpm.bbclass                    |   22 +-
 meta/classes/sstate.bbclass                        |    2 +-
 meta/classes/testimage.bbclass                     |   25 +-
 meta/conf/distro/include/default-versions.inc      |    3 -
 meta/conf/distro/include/security_flags.inc        |    5 +-
 meta/lib/oe/gpg_sign.py                            |    7 +-
 meta/lib/oe/manifest.py                            |    2 +-
 meta/lib/oe/package_manager.py                     | 1223 ++++----------------
 meta/lib/oe/rootfs.py                              |   23 +-
 meta/lib/oe/sdk.py                                 |    7 +-
 meta/lib/oeqa/oetest.py                            |    7 -
 meta/lib/oeqa/runtime/cases/dnf.py                 |  111 ++
 meta/lib/oeqa/runtime/cases/parselogs.py           |    1 +
 meta/lib/oeqa/runtime/cases/rpm.py                 |   21 +-
 meta/lib/oeqa/runtime/cases/smart.py               |  196 ----
 meta/lib/oeqa/selftest/bbtests.py                  |    2 +-
 meta/lib/oeqa/selftest/buildoptions.py             |    4 +-
 meta/lib/oeqa/selftest/signing.py                  |   16 +-
 meta/recipes-core/base-files/base-files_3.0.14.bb  |    5 +-
 meta/recipes-core/glibc/glibc-package.inc          |    2 +-
 meta/recipes-core/images/core-image-minimal.bb     |    2 +-
 .../nativesdk-packagegroup-sdk-host.bb             |    2 +-
 ...0001-Correctly-install-the-shared-library.patch |   28 +
 ...-set-PYTHON_INSTALL_DIR-by-running-python.patch |   27 +
 .../createrepo-c/createrepo-c_git.bb               |   31 +
 ...Corretly-install-tmpfiles.d-configuration.patch |   21 +
 ...hardcode-etc-and-systemd-unit-directories.patch |   29 +
 ...0001-Do-not-prepend-installroot-to-logdir.patch |   31 +
 .../dnf/dnf/0028-Use-backports.lzma-not-lzma.patch |   30 +
 ...-set-PYTHON_INSTALL_DIR-by-running-python.patch |   27 +
 .../dnf/0030-Run-python-scripts-using-env.patch    |   48 +
 meta/recipes-devtools/dnf/dnf_git.bb               |   44 +
 meta/recipes-devtools/dpkg/dpkg.inc                |    2 +-
 ...-set-PYTHON_INSTALL_DIR-by-running-python.patch |   41 +
 ...2-Set-library-installation-path-correctly.patch |   27 +
 meta/recipes-devtools/libcomps/libcomps_git.bb     |   23 +
 ...cmake-drop-the-requirement-for-GTKDOC_SCA.patch |   31 +
 ...ers-for-both-libsolv-and-libsolvext-libdn.patch |   28 +
 ...-sysroot-path-to-introspection-tools-path.patch |   36 +
 ...-library-installation-directory-correctly.patch |   29 +
 ...-variables-with-pkg-config-cmake-s-own-mo.patch |   29 +
 meta/recipes-devtools/libdnf/libdnf_git.bb         |   40 +
 ...ly-set-the-library-installation-directory.patch |   28 +
 ...to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch |   41 +
 ...-race-when-deleting-temporary-directories.patch |   41 +
 ...ariables-with-pkg-config-not-with-cmake-m.patch |   29 +
 meta/recipes-devtools/librepo/librepo_git.bb       |   24 +
 meta/recipes-devtools/opkg/opkg_0.3.4.bb           |    2 +-
 ...-not-add-include-and-library-directories-.patch |   32 +
 .../python-backports-lzma_git.bb                   |   21 +
 .../recipes-devtools/python/python-iniparse_0.4.bb |   17 +
 meta/recipes-devtools/python/python-pygpgme_0.3.bb |   18 +
 ...m_sys-use-md5sum-instead-of-mtime-as-the-.patch |   38 -
 ...art-add-deugging-when-targetpath-is-empty.patch |   47 -
 .../smart-add-for-rpm-ignoresize-check.patch       |   35 -
 .../smart-already-installed-message.patch          |   54 -
 .../python/python-smartpm/smart-attempt-fix.patch  |  158 ---
 .../python/python-smartpm/smart-attempt.patch      |  185 ---
 ...cache.py-getPackages-matches-name-version.patch |   43 -
 .../python-smartpm/smart-channel-remove-all.patch  |   33 -
 .../python/python-smartpm/smart-channelsdir.patch  |   24 -
 .../python/python-smartpm/smart-locale.patch       |   27 -
 .../python/python-smartpm/smart-recommends.patch   |  381 ------
 .../smart-rpm-transaction-failure-check.patch      |   57 -
 .../smart-set-noprogress-for-pycurl.patch          |   20 -
 .../smartpm-rpm5-support-check-signatures.patch    |  112 --
 meta/recipes-devtools/python/python-smartpm_git.bb |  141 ---
 ...d-a-color-setting-for-mips64_n32-binaries.patch |   40 +
 ...an-unsatisfiable-dependency-when-building.patch |   33 +
 ...code-lib-rpm-as-the-installation-path-for.patch |   61 +
 .../0001-Do-not-read-config-files-from-HOME.patch  |   38 +
 ...t-the-PATH-environment-variable-before-ru.patch |   30 +
 .../files/0001-Fix-build-with-musl-C-library.patch |   74 ++
 ...installing-execute-package-scriptlets-wit.patch |   37 +
 ...alue-cannot-be-reset-issue-a-notice-inste.patch |   31 +
 ...-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch |   72 ++
 ...1-Disable-__sync_add_and_fetch_8-on-nios2.patch |   30 -
 .../rpm/rpm/0001-define-EM_AARCH64.patch           |   35 -
 .../0001-macros-add-_gpg_sign_cmd_extra_args.patch |   43 -
 .../rpm/rpm/0001-rpm-Fix-build-on-musl.patch       |  294 -----
 ...0001-system.h-query.c-support-nosignature.patch |   63 -
 ...arseArgvString-to-parse-the-_gpg_check_pa.patch |   49 -
 .../configure.ac-check-for-both-gpg2-and-gpg.patch |   29 -
 meta/recipes-devtools/rpm/rpm/dbconvert.patch      |   27 -
 meta/recipes-devtools/rpm/rpm/debugedit-segv.patch |  100 --
 ...debugedit-valid-file-to-fix-segment-fault.patch |   65 --
 meta/recipes-devtools/rpm/rpm/gcc6-stdlib.patch    |   54 -
 .../rpm/rpm/header-include-fix.patch               |   36 -
 .../rpm/rpm/makefile-am-exec-hook.patch            |   33 -
 .../rpm/rpm/no-ldflags-in-pkgconfig.patch          |   14 -
 meta/recipes-devtools/rpm/rpm/perfile_rpmdeps.sh   |   50 -
 .../rpm/popt-disable-auto-stack-protector.patch    |   27 -
 .../rpm/rpm/python-rpm-rpmsense.patch              |   31 -
 meta/recipes-devtools/rpm/rpm/pythondeps.sh        |   16 -
 meta/recipes-devtools/rpm/rpm/rpm-atomic-ops.patch |   73 --
 .../rpm/rpm/rpm-autogen-force.patch                |   78 --
 meta/recipes-devtools/rpm/rpm/rpm-autogen.patch    |   25 -
 meta/recipes-devtools/rpm/rpm/rpm-canonarch.patch  |  136 ---
 .../rpm/rpm-check-rootpath-reasonableness.patch    |   96 --
 meta/recipes-devtools/rpm/rpm/rpm-db-reduce.patch  |   19 -
 meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch |  174 ---
 meta/recipes-devtools/rpm/rpm/rpm-db60.patch       |   56 -
 .../rpm/rpm/rpm-db_buffer_small.patch              |   77 --
 .../rpm/rpm/rpm-debug-platform.patch               |   65 --
 .../rpm/rpm/rpm-disable-auto-stack-protector.patch |   24 -
 .../rpm/rpm/rpm-disable-blaketest.patch            |   28 -
 ...-ensure-rpm2cpio-call-rpm-relocation-code.patch |   25 -
 meta/recipes-devtools/rpm/rpm/rpm-fileclass.patch  |   36 -
 .../rpm/rpm/rpm-fix-logio-cp.patch                 |   30 -
 .../rpm-fix-lua-tests-compilation-failure.patch    |   43 -
 .../rpm/rpm/rpm-fix-parseEmbedded.patch            |   27 -
 meta/recipes-devtools/rpm/rpm/rpm-gnu-atomic.patch |   64 -
 .../rpm/rpm/rpm-hardlink-segfault-fix.patch        |   43 -
 .../rpm/rpm/rpm-keccak-sse-intrin.patch            |   27 -
 ...ction.c-fix-file-conflicts-for-mips64-N32.patch |   52 -
 meta/recipes-devtools/rpm/rpm/rpm-libsql-fix.patch |   22 -
 .../recipes-devtools/rpm/rpm/rpm-log-auto-rm.patch |   15 -
 .../rpm/rpm/rpm-lsb-compatibility.patch            |   24 -
 meta/recipes-devtools/rpm/rpm/rpm-lua.patch        |   33 -
 ...rpm-macros.in-disable-external-key-server.patch |   31 -
 meta/recipes-devtools/rpm/rpm/rpm-macros.patch     |   64 -
 .../rpm/rpm/rpm-mongodb-sasl.patch                 |   69 --
 meta/recipes-devtools/rpm/rpm/rpm-no-loopmsg.patch |   19 -
 .../rpm/rpm/rpm-no-perl-urpm.patch                 |   47 -
 ...b-before-verifyscript-to-avoid-null-point.patch |   24 -
 meta/recipes-devtools/rpm/rpm/rpm-ossp-uuid.patch  |   23 -
 .../rpm/rpm/rpm-packageorigin.patch                |   25 -
 .../rpm/rpm/rpm-payload-use-hashed-inode.patch     |  126 --
 .../rpm/rpm/rpm-pkgconfigdeps.patch                |   37 -
 .../rpm/rpm/rpm-platform-file-fix.patch            |   28 -
 meta/recipes-devtools/rpm/rpm/rpm-platform.patch   |  137 ---
 meta/recipes-devtools/rpm/rpm/rpm-platform2.patch  |  105 --
 meta/recipes-devtools/rpm/rpm/rpm-py-init.patch    |   29 -
 .../rpm/rpm/rpm-python-AddErase.patch              |   35 -
 .../rpm/rpm/rpm-python-restore-origin.patch        |   49 -
 .../rpm/rpm/rpm-python-tagname.patch               |   24 -
 meta/recipes-devtools/rpm/rpm/rpm-realpath.patch   |   24 -
 .../rpm/rpm/rpm-reloc-macros.patch                 |   31 -
 meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch |   40 -
 .../rpm/rpm/rpm-rpmdb-grammar.patch                |  124 --
 .../rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch   |   34 -
 .../rpm/rpm/rpm-rpmio-headers.patch                |   19 -
 .../recipes-devtools/rpm/rpm/rpm-rpmpgp-popt.patch |   26 -
 .../rpm/rpm/rpm-scriptletexechelper.patch          |  159 ---
 meta/recipes-devtools/rpm/rpm/rpm-showrc.patch     |   26 -
 .../rpm/rpm/rpm-syck-fix-gram.patch                | 1081 -----------------
 .../rpm-tag-generate-endian-conversion-fix.patch   |   50 -
 .../rpm/rpm/rpm-tagname-type.patch                 |   25 -
 .../rpm/rpm/rpm-tools-mtree-LDFLAGS.patch          |   24 -
 .../rpm/rpm/rpm-uuid-include.patch                 |   40 -
 meta/recipes-devtools/rpm/rpm/rpm2cpio             |   39 -
 meta/recipes-devtools/rpm/rpm/rpmatch.patch        |   34 -
 ...more-verbose-error-logging-in-rpmTempFile.patch |   31 -
 .../rpmdb-prevent-race-in-tmpdir-creation.patch    |   41 -
 meta/recipes-devtools/rpm/rpm/rpmdeps-oecore.patch |  194 ----
 ...heck-_gpg_passphrase-before-ask-for-input.patch |   70 --
 .../recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch |   50 -
 meta/recipes-devtools/rpm/rpm/uclibc-support.patch |   63 -
 meta/recipes-devtools/rpm/rpm_5.4.16.bb            |  712 ------------
 meta/recipes-devtools/rpm/rpm_git.bb               |  108 ++
 meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c  |  426 -------
 meta/recipes-devtools/rpm/rpmresolve_1.0.bb        |   29 -
 meta/recipes-extended/bash/bash.inc                |    4 +
 meta/recipes-extended/byacc/byacc.inc              |   22 -
 .../0001-byacc-do-not-reorder-CC-and-CFLAGS.patch  |  161 ---
 meta/recipes-extended/byacc/byacc/byacc-open.patch |   25 -
 meta/recipes-extended/byacc/byacc_20161202.bb      |   12 -
 meta/recipes-extended/libsolv/libsolv_0.6.24.bb    |    4 +-
 .../packagegroup-core-full-cmdline.bb              |    1 -
 meta/recipes-gnome/gtk-doc/gtk-doc_1.25.bb         |    2 +-
 .../createrepo/createrepo/createrepo-dbpath.patch  |   61 -
 .../createrepo/createrepo/createrepo-rpm549.patch  |   22 -
 ...dumpMetadata-disable-signature-validation.patch |   31 -
 .../createrepo/createrepo/fix-native-install.patch |  163 ---
 .../createrepo/createrepo/fixstat.patch            |   19 -
 ...n-scripts-should-use-interpreter-from-env.patch |   47 -
 .../createrepo/createrepo/recommends.patch         |   71 --
 .../createrepo/createrepo/rpm-createsolvedb.py     |   64 -
 .../createrepo/createrepo_0.4.11.bb                |   51 -
 ...Makefile-let-libdb-6.0.la-depend-os_map.l.patch |   29 -
 ...akefile-let-libso_target-depend-on-bt_rec.patch |   30 -
 meta/recipes-support/db/db_5.3.28.bb               |    5 +-
 meta/recipes-support/db/db_6.0.35.bb               |  111 --
 ...-Avoid-host-contamination-from-gpg-config.patch |   30 +
 .../0001-Correctly-install-python-modules.patch    |   26 +
 meta/recipes-support/gpgme/gpgme_1.8.0.bb          |    4 +-
 meta/recipes-support/libassuan/libassuan_2.4.3.bb  |    2 +-
 meta/recipes-support/libcheck/libcheck_0.10.0.bb   |    1 +
 meta/recipes-support/nspr/nspr_4.13.1.bb           |    2 +-
 scripts/oe-setup-rpmrepo                           |    2 +-
 scripts/rpm2cpio.sh                                |  108 +-
 198 files changed, 1952 insertions(+), 10233 deletions(-)
 create mode 100644 meta/lib/oeqa/runtime/cases/dnf.py
 delete mode 100644 meta/lib/oeqa/runtime/cases/smart.py
 create mode 100644 meta/recipes-devtools/createrepo-c/createrepo-c/0001-Correctly-install-the-shared-library.patch
 create mode 100644 meta/recipes-devtools/createrepo-c/createrepo-c/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
 create mode 100644 meta/recipes-devtools/createrepo-c/createrepo-c_git.bb
 create mode 100644 meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch
 create mode 100644 meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch
 create mode 100644 meta/recipes-devtools/dnf/dnf/0001-Do-not-prepend-installroot-to-logdir.patch
 create mode 100644 meta/recipes-devtools/dnf/dnf/0028-Use-backports.lzma-not-lzma.patch
 create mode 100644 meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
 create mode 100644 meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch
 create mode 100644 meta/recipes-devtools/dnf/dnf_git.bb
 create mode 100644 meta/recipes-devtools/libcomps/libcomps/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
 create mode 100644 meta/recipes-devtools/libcomps/libcomps/0002-Set-library-installation-path-correctly.patch
 create mode 100644 meta/recipes-devtools/libcomps/libcomps_git.bb
 create mode 100644 meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch
 create mode 100644 meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch
 create mode 100644 meta/recipes-devtools/libdnf/libdnf/0002-Prefix-sysroot-path-to-introspection-tools-path.patch
 create mode 100644 meta/recipes-devtools/libdnf/libdnf/0003-Set-the-library-installation-directory-correctly.patch
 create mode 100644 meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch
 create mode 100644 meta/recipes-devtools/libdnf/libdnf_git.bb
 create mode 100644 meta/recipes-devtools/librepo/librepo/0001-Correctly-set-the-library-installation-directory.patch
 create mode 100644 meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch
 create mode 100644 meta/recipes-devtools/librepo/librepo/0003-tests-fix-a-race-when-deleting-temporary-directories.patch
 create mode 100644 meta/recipes-devtools/librepo/librepo/0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch
 create mode 100644 meta/recipes-devtools/librepo/librepo_git.bb
 create mode 100644 meta/recipes-devtools/python-backports-lzma/python-backports-lzma/0001-setup.py-do-not-add-include-and-library-directories-.patch
 create mode 100644 meta/recipes-devtools/python-backports-lzma/python-backports-lzma_git.bb
 create mode 100644 meta/recipes-devtools/python/python-iniparse_0.4.bb
 create mode 100644 meta/recipes-devtools/python/python-pygpgme_0.3.bb
 delete mode 100644 meta/recipes-devtools/python/python-smartpm/channels-rpm_sys-use-md5sum-instead-of-mtime-as-the-.patch
 delete mode 100644 meta/recipes-devtools/python/python-smartpm/smart-add-deugging-when-targetpath-is-empty.patch
 delete mode 100644 meta/recipes-devtools/python/python-smartpm/smart-add-for-rpm-ignoresize-check.patch
 delete mode 100644 meta/recipes-devtools/python/python-smartpm/smart-already-installed-message.patch
 delete mode 100644 meta/recipes-devtools/python/python-smartpm/smart-attempt-fix.patch
 delete mode 100644 meta/recipes-devtools/python/python-smartpm/smart-attempt.patch
 delete mode 100644 meta/recipes-devtools/python/python-smartpm/smart-cache.py-getPackages-matches-name-version.patch
 delete mode 100644 meta/recipes-devtools/python/python-smartpm/smart-channel-remove-all.patch
 delete mode 100644 meta/recipes-devtools/python/python-smartpm/smart-channelsdir.patch
 delete mode 100644 meta/recipes-devtools/python/python-smartpm/smart-locale.patch
 delete mode 100644 meta/recipes-devtools/python/python-smartpm/smart-recommends.patch
 delete mode 100644 meta/recipes-devtools/python/python-smartpm/smart-rpm-transaction-failure-check.patch
 delete mode 100644 meta/recipes-devtools/python/python-smartpm/smart-set-noprogress-for-pycurl.patch
 delete mode 100644 meta/recipes-devtools/python/python-smartpm/smartpm-rpm5-support-check-signatures.patch
 delete mode 100644 meta/recipes-devtools/python/python-smartpm_git.bb
 create mode 100644 meta/recipes-devtools/rpm/files/0001-Add-a-color-setting-for-mips64_n32-binaries.patch
 create mode 100644 meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
 create mode 100644 meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
 create mode 100644 meta/recipes-devtools/rpm/files/0001-Do-not-read-config-files-from-HOME.patch
 create mode 100644 meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch
 create mode 100644 meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch
 create mode 100644 meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch
 create mode 100644 meta/recipes-devtools/rpm/files/0001-When-nice-value-cannot-be-reset-issue-a-notice-inste.patch
 create mode 100644 meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/0001-Disable-__sync_add_and_fetch_8-on-nios2.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/0001-define-EM_AARCH64.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/0001-macros-add-_gpg_sign_cmd_extra_args.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/0001-rpm-Fix-build-on-musl.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/0001-system.h-query.c-support-nosignature.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/configure.ac-check-for-both-gpg2-and-gpg.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/dbconvert.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/debugedit-segv.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/debugedit-valid-file-to-fix-segment-fault.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/gcc6-stdlib.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/header-include-fix.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/makefile-am-exec-hook.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/no-ldflags-in-pkgconfig.patch
 delete mode 100755 meta/recipes-devtools/rpm/rpm/perfile_rpmdeps.sh
 delete mode 100644 meta/recipes-devtools/rpm/rpm/popt-disable-auto-stack-protector.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/python-rpm-rpmsense.patch
 delete mode 100755 meta/recipes-devtools/rpm/rpm/pythondeps.sh
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-atomic-ops.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-autogen-force.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-autogen.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-canonarch.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-check-rootpath-reasonableness.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-db-reduce.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-db60.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-db_buffer_small.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-debug-platform.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-disable-auto-stack-protector.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-disable-blaketest.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-ensure-rpm2cpio-call-rpm-relocation-code.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-fileclass.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-fix-logio-cp.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-fix-lua-tests-compilation-failure.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-fix-parseEmbedded.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-gnu-atomic.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-hardlink-segfault-fix.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-keccak-sse-intrin.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-libsql-fix.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-log-auto-rm.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-lsb-compatibility.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-lua.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-macros.in-disable-external-key-server.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-macros.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-mongodb-sasl.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-no-loopmsg.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-no-perl-urpm.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-opendb-before-verifyscript-to-avoid-null-point.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-ossp-uuid.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-packageorigin.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-payload-use-hashed-inode.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-pkgconfigdeps.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-platform-file-fix.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-platform.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-platform2.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-py-init.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-python-AddErase.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-python-restore-origin.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-python-tagname.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-realpath.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-reloc-macros.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-rpmdb-grammar.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-rpmio-headers.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-popt.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-showrc.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-syck-fix-gram.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-tag-generate-endian-conversion-fix.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-tagname-type.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-tools-mtree-LDFLAGS.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-uuid-include.patch
 delete mode 100755 meta/recipes-devtools/rpm/rpm/rpm2cpio
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpmatch.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpmdb-more-verbose-error-logging-in-rpmTempFile.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpmdb-prevent-race-in-tmpdir-creation.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpmdeps-oecore.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpmqv.c-check-_gpg_passphrase-before-ask-for-input.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/uclibc-support.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm_5.4.16.bb
 create mode 100644 meta/recipes-devtools/rpm/rpm_git.bb
 delete mode 100644 meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c
 delete mode 100644 meta/recipes-devtools/rpm/rpmresolve_1.0.bb
 delete mode 100644 meta/recipes-extended/byacc/byacc.inc
 delete mode 100644 meta/recipes-extended/byacc/byacc/0001-byacc-do-not-reorder-CC-and-CFLAGS.patch
 delete mode 100644 meta/recipes-extended/byacc/byacc/byacc-open.patch
 delete mode 100644 meta/recipes-extended/byacc/byacc_20161202.bb
 delete mode 100644 meta/recipes-support/createrepo/createrepo/createrepo-dbpath.patch
 delete mode 100644 meta/recipes-support/createrepo/createrepo/createrepo-rpm549.patch
 delete mode 100644 meta/recipes-support/createrepo/createrepo/dumpMetadata-disable-signature-validation.patch
 delete mode 100644 meta/recipes-support/createrepo/createrepo/fix-native-install.patch
 delete mode 100644 meta/recipes-support/createrepo/createrepo/fixstat.patch
 delete mode 100644 meta/recipes-support/createrepo/createrepo/python-scripts-should-use-interpreter-from-env.patch
 delete mode 100644 meta/recipes-support/createrepo/createrepo/recommends.patch
 delete mode 100755 meta/recipes-support/createrepo/createrepo/rpm-createsolvedb.py
 delete mode 100644 meta/recipes-support/createrepo/createrepo_0.4.11.bb
 delete mode 100644 meta/recipes-support/db/db/Makefile-let-libdb-6.0.la-depend-os_map.l.patch
 delete mode 100644 meta/recipes-support/db/db/Makefile-let-libso_target-depend-on-bt_rec.patch
 delete mode 100644 meta/recipes-support/db/db_6.0.35.bb
 create mode 100644 meta/recipes-support/gpgme/gpgme/0001-Avoid-host-contamination-from-gpg-config.patch
 create mode 100644 meta/recipes-support/gpgme/gpgme/0001-Correctly-install-python-modules.patch

-- 
2.11.0



^ permalink raw reply	[flat|nested] 75+ messages in thread

* [PATCH 01/44] package.bbclass: fix locations of debugedit and rpmdeps utilities
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
@ 2017-03-10 11:23 ` Alexander Kanavin
  2017-03-10 11:23 ` [PATCH 02/44] libsolv: enable rpm support Alexander Kanavin
                   ` (43 subsequent siblings)
  44 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:23 UTC (permalink / raw)
  To: openembedded-core

rpm4 installs them in different locations than rpm5. This also replaces
our custom rpmdeps-oecore with standard rpmdeps; I'm not seeing a
significant performance penalty.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/classes/package.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 299ea120d9f..f4c2b5514c5 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -345,7 +345,7 @@ def splitdebuginfo(file, debugfile, debugsrcdir, sourcefile, d):
 
     dvar = d.getVar('PKGD')
     objcopy = d.getVar("OBJCOPY")
-    debugedit = d.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit")
+    debugedit = d.expand("${STAGING_LIBDIR_NATIVE}/rpm/debugedit")
 
     # We ignore kernel modules, we don't generate debug info files.
     if file.find("/lib/modules/") != -1 and file.endswith(".ko"):
@@ -1436,7 +1436,7 @@ if [ x"$D" = "x" ]; then
 fi
 }
 
-RPMDEPS = "${STAGING_LIBDIR_NATIVE}/rpm/bin/rpmdeps-oecore --macros ${STAGING_LIBDIR_NATIVE}/rpm/macros --define '_rpmfc_magic_path ${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc' --rpmpopt ${STAGING_LIBDIR_NATIVE}/rpm/rpmpopt"
+RPMDEPS = "${STAGING_LIBDIR_NATIVE}/rpm/rpmdeps --macros ${STAGING_LIBDIR_NATIVE}/rpm/macros --define '_rpmfc_magic_path ${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc' --rpmpopt ${STAGING_LIBDIR_NATIVE}/rpm/rpmpopt"
 
 # Collect perfile run-time dependency metadata
 # Output:
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 02/44] libsolv: enable rpm support
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
  2017-03-10 11:23 ` [PATCH 01/44] package.bbclass: fix locations of debugedit and rpmdeps utilities Alexander Kanavin
@ 2017-03-10 11:23 ` Alexander Kanavin
  2017-03-10 11:23 ` [PATCH 03/44] rpmresolve: remove the recipe Alexander Kanavin
                   ` (42 subsequent siblings)
  44 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:23 UTC (permalink / raw)
  To: openembedded-core

This is required by libdnf.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/recipes-extended/libsolv/libsolv_0.6.24.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-extended/libsolv/libsolv_0.6.24.bb b/meta/recipes-extended/libsolv/libsolv_0.6.24.bb
index 6de38b59157..3d8b581f851 100644
--- a/meta/recipes-extended/libsolv/libsolv_0.6.24.bb
+++ b/meta/recipes-extended/libsolv/libsolv_0.6.24.bb
@@ -5,7 +5,7 @@ SECTION = "devel"
 LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE.BSD;md5=62272bd11c97396d4aaf1c41bc11f7d8"
 
-DEPENDS = "expat zlib"
+DEPENDS = "expat zlib rpm"
 
 SRC_URI = "git://github.com/openSUSE/libsolv.git \
            file://0001-Split-libsolvext-into-it-s-own-pkg-config-file.patch \
@@ -19,7 +19,7 @@ S = "${WORKDIR}/git"
 
 inherit cmake
 
-EXTRA_OECMAKE = "-DLIB=${baselib} -DMULTI_SEMANTICS=ON"
+EXTRA_OECMAKE = "-DLIB=${baselib} -DMULTI_SEMANTICS=ON -DENABLE_RPMMD=ON -DENABLE_RPMDB=ON"
 
 PACKAGES =+ "${PN}-tools ${PN}ext"
 
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 03/44] rpmresolve: remove the recipe
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
  2017-03-10 11:23 ` [PATCH 01/44] package.bbclass: fix locations of debugedit and rpmdeps utilities Alexander Kanavin
  2017-03-10 11:23 ` [PATCH 02/44] libsolv: enable rpm support Alexander Kanavin
@ 2017-03-10 11:23 ` Alexander Kanavin
  2017-03-10 11:23 ` [PATCH 04/44] createrepo-c: add a recipe Alexander Kanavin
                   ` (41 subsequent siblings)
  44 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:23 UTC (permalink / raw)
  To: openembedded-core

The source code is incompatible with rpm4 API - let's use rpm
binary itself for now.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c | 426 ----------------------
 meta/recipes-devtools/rpm/rpmresolve_1.0.bb       |  29 --
 2 files changed, 455 deletions(-)
 delete mode 100644 meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c
 delete mode 100644 meta/recipes-devtools/rpm/rpmresolve_1.0.bb

diff --git a/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c b/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c
deleted file mode 100644
index c0b4d567fb0..00000000000
--- a/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c
+++ /dev/null
@@ -1,426 +0,0 @@
-/* OpenEmbedded RPM resolver utility
-
-  Written by: Paul Eggleton <paul.eggleton@linux.intel.com>
-
-  Copyright 2012 Intel Corporation
-
-  This program is free software; you can redistribute it and/or modify
-  it under the terms of the GNU General Public License version 2 as
-  published by the Free Software Foundation.
-
-  This program is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License along
-  with this program; if not, write to the Free Software Foundation, Inc.,
-  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-*/
-
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-
-#include <rpmdb.h>
-#include <rpmtypes.h>
-#include <rpmtag.h>
-#include <rpmts.h>
-#include <rpmmacro.h>
-#include <rpmcb.h>
-#include <rpmlog.h>
-#include <argv.h>
-#include <mire.h>
-
-int debugmode;
-FILE *outf;
-
-int getPackageStr(rpmts ts, const char *NVRA, rpmTag tag, char **value)
-{
-    int rc = -1;
-    rpmmi mi = rpmmiInit(rpmtsGetRdb(ts), RPMTAG_NVRA, NVRA, 0);
-    Header h;
-    if ((h = rpmmiNext(mi)) != NULL) {
-        HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he));
-        he->tag = tag;
-        rc = (headerGet(h, he, 0) != 1);
-        if(rc==0)
-            *value = strdup((char *)he->p.ptr);
-    }
-    (void)rpmmiFree(mi);
-    return rc;
-}
-
-int loadTs(rpmts **ts, int *tsct, const char *dblistfn)
-{
-    int count = 0;
-    int sz = 5;
-    int rc = 0;
-    int listfile = 1;
-    struct stat st_buf;
-
-    rc = stat(dblistfn, &st_buf);
-    if(rc != 0) {
-        perror("stat");
-        return 1;
-    }
-    if(S_ISDIR(st_buf.st_mode))
-        listfile = 0;
-
-    if(listfile) {
-        if(debugmode)
-            printf("DEBUG: reading database list file '%s'\n", dblistfn);
-        *ts = malloc(sz * sizeof(rpmts));
-        FILE *f = fopen(dblistfn, "r" );
-        if(f) {
-            char line[2048];
-            while(fgets(line, sizeof(line), f)) {
-                int len = strlen(line) - 1;
-                if(len > 0)
-                    // Trim trailing whitespace
-                    while(len > 0 && isspace(line[len]))
-                        line[len--] = '\0';
-
-                if(len > 0) {
-                    // Expand array if needed
-                    if(count == sz) {
-                        sz += 5;
-                        *ts = (rpmts *)realloc(*ts, sz);
-                    }
-
-                    if(debugmode)
-                        printf("DEBUG: opening database '%s'\n", line);
-                    char *dbpathm = malloc(strlen(line) + 10);
-                    sprintf(dbpathm, "_dbpath %s", line);
-                    rpmDefineMacro(NULL, dbpathm, RMIL_CMDLINE);
-                    free(dbpathm);
-
-                    rpmts tsi = rpmtsCreate();
-                    (*ts)[count] = tsi;
-                    rc = rpmtsOpenDB(tsi, O_RDONLY);
-                    if( rc ) {
-                        fprintf(stderr, "Failed to open database %s\n", line);
-                        rc = -1;
-                        break;
-                    }
-
-                    count++;
-                }
-            }
-            fclose(f);
-            *tsct = count;
-        }
-        else {
-            perror(dblistfn);
-            rc = -1;
-        }
-    }
-    else {
-        if(debugmode)
-            printf("DEBUG: opening database '%s'\n", dblistfn);
-        // Load from single database
-        *ts = malloc(sizeof(rpmts));
-        char *dbpathm = malloc(strlen(dblistfn) + 10);
-        sprintf(dbpathm, "_dbpath %s", dblistfn);
-        rpmDefineMacro(NULL, dbpathm, RMIL_CMDLINE);
-        free(dbpathm);
-
-        rpmts tsi = rpmtsCreate();
-        (*ts)[0] = tsi;
-        rc = rpmtsOpenDB(tsi, O_RDONLY);
-        if( rc ) {
-            fprintf(stderr, "Failed to open database %s\n", dblistfn);
-            rc = -1;
-        }
-        *tsct = 1;
-    }
-
-    return rc;
-}
-
-int processPackages(rpmts *ts, int tscount, const char *packagelistfn, int ignoremissing)
-{
-    int rc = 0;
-    int count = 0;
-    int sz = 100;
-    int i = 0;
-    int missing = 0;
-
-    FILE *f = fopen(packagelistfn, "r" );
-    if(f) {
-        char line[255];
-        while(fgets(line, sizeof(line), f)) {
-            int len = strlen(line) - 1;
-            if(len > 0)
-                // Trim trailing whitespace
-                while(len > 0 && isspace(line[len]))
-                    line[len--] = '\0';
-
-            if(len > 0) {
-                int found = 0;
-                for(i=0; i<tscount; i++) {
-                    ARGV_t keys = NULL;
-                    rpmdb db = rpmtsGetRdb(ts[i]);
-                    rc = rpmdbMireApply(db, RPMTAG_NAME,
-                                RPMMIRE_STRCMP, line, &keys);
-                    if (keys) {
-                        int nkeys = argvCount(keys);
-                        if( nkeys == 1 ) {
-                            char *value = NULL;
-                            rc = getPackageStr(ts[i], keys[0], RPMTAG_PACKAGEORIGIN, &value);
-                            if(rc == 0)
-                                fprintf(outf, "%s\n", value);
-                            else
-                                fprintf(stderr, "Failed to get package origin for %s\n", line);
-                            found = 1;
-                        }
-                        else if( nkeys > 1 ) {
-                            int keyindex = 0;
-                            fprintf(stderr, "Multiple matches for %s:\n", line);
-                            for( keyindex=0; keyindex<nkeys; keyindex++) {
-                                char *value = NULL;
-                                rc = getPackageStr(ts[i], keys[keyindex], RPMTAG_PACKAGEORIGIN, &value);
-                                if(rc == 0)
-                                    fprintf(stderr, "  %s\n", value);
-                                else
-                                    fprintf(stderr, "  (%s)\n", keys[keyindex]);
-                            }
-                        }
-                    }
-                    if(found)
-                        break;
-                }
-
-                if( !found ) {
-                    if( ignoremissing ) {
-                        fprintf(stderr, "Unable to resolve package %s - ignoring\n", line);
-                    }
-                    else {
-                        fprintf(stderr, "Unable to resolve package %s\n", line);
-                        missing = 1;
-                    }
-                }
-            }
-            count++;
-        }
-        fclose(f);
-
-        if( missing ) {
-            fprintf(stderr, "ERROR: some packages were missing\n");
-            rc = 1;
-        }
-    }
-    else {
-        perror(packagelistfn);
-        rc = -1;
-    }
-
-    return rc;
-}
-
-int lookupProvider(rpmts ts, const char *req, char **provider)
-{
-    int rc = 0;
-    rpmmi provmi = rpmmiInit(rpmtsGetRdb(ts), RPMTAG_PROVIDENAME, req, 0);
-    if(provmi) {
-        Header h;
-        if ((h = rpmmiNext(provmi)) != NULL) {
-            HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he));
-            he->tag = RPMTAG_NAME;
-            rc = (headerGet(h, he, 0) != 1);
-            if(rc==0)
-                *provider = strdup((char *)he->p.ptr);
-        }
-        (void)rpmmiFree(provmi);
-    }
-    else {
-        rc = -1;
-    }
-    return rc;
-}
-
-int printDepList(rpmts *ts, int tscount)
-{
-    int rc = 0;
-
-    if( tscount > 1 )
-        fprintf(stderr, ">1 database specified with dependency list, using first only\n");
-
-    /* Get list of names */
-    rpmdb db = rpmtsGetRdb(ts[0]);
-    ARGV_t names = NULL;
-    rc = rpmdbMireApply(db, RPMTAG_NAME,
-                RPMMIRE_STRCMP, NULL, &names);
-    int nnames = argvCount(names);
-
-    /* Get list of NVRAs */
-    ARGV_t keys = NULL;
-    rc = rpmdbMireApply(db, RPMTAG_NVRA,
-                RPMMIRE_STRCMP, NULL, &keys);
-    if (keys) {
-        int i, j;
-        HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he));
-        int nkeys = argvCount(keys);
-        for(i=0; i<nkeys; i++) {
-            rpmmi mi = rpmmiInit(db, RPMTAG_NVRA, keys[i], 0);
-            Header h;
-            if ((h = rpmmiNext(mi)) != NULL) {
-                /* Get name of package */
-                he->tag = RPMTAG_NAME;
-                rc = (headerGet(h, he, 0) != 1);
-                char *name = strdup((char *)he->p.ptr);
-                /* Get its requires */
-                he->tag = RPMTAG_REQUIRENAME;
-                if (rc = (headerGet(h, he, 0) != 1)) {
-                    if (debugmode) {
-                        printf("DEBUG: %s requires null\n", name);
-                    }
-                    rc = 0;
-                    free(name);
-                    (void)rpmmiFree(mi);
-                    continue;
-                }
-                ARGV_t reqs = (ARGV_t)he->p.ptr;
-                /* Get its requireflags */
-                he->tag = RPMTAG_REQUIREFLAGS;
-                rc = (headerGet(h, he, 0) != 1);
-                rpmuint32_t *reqflags = (rpmuint32_t *)he->p.ui32p;
-                for(j=0; j<he->c; j++) {
-                    int k;
-                    char *prov = NULL;
-                    for(k=0; k<nnames; k++) {
-                        if(strcmp(names[k], reqs[j]) == 0) {
-                            prov = names[k];
-                            break;
-                        }
-                    }
-                    if(prov) {
-                        if((int)reqflags[j] & 0x80000)
-                            fprintf(outf, "%s|%s [REC]\n", name, prov);
-                        else
-                            fprintf(outf, "%s|%s\n", name, prov);
-                    }
-                    else {
-                        rc = lookupProvider(ts[0], reqs[j], &prov);
-                        if(rc==0 && prov) {
-                            if((int)reqflags[j] & 0x80000)
-                                fprintf(outf, "%s|%s [REC]\n", name, prov);
-                            else
-                                fprintf(outf, "%s|%s\n", name, prov);
-                            free(prov);
-                        }
-                    }
-                }
-                free(name);
-            }
-            (void)rpmmiFree(mi);
-        }
-    }
-
-    return rc;
-}
-
-void usage()
-{
-    fprintf(stderr, "OpenEmbedded rpm resolver utility\n");
-    fprintf(stderr, "syntax: rpmresolve [-i] [-d] [-t] <dblistfile> <packagelistfile>\n");
-}
-
-int main(int argc, char **argv)
-{
-    rpmts *ts = NULL;
-    int tscount = 0;
-    int rc = 0;
-    int i;
-    int c;
-    int ignoremissing = 0;
-    int deplistmode = 0;
-    char *outfile = NULL;
-
-    debugmode = 0;
-    outf = stdout;
-
-    opterr = 0;
-    while ((c = getopt (argc, argv, "itdo:")) != -1) {
-        switch (c) {
-            case 'i':
-                ignoremissing = 1;
-                break;
-            case 't':
-                deplistmode = 1;
-                break;
-            case 'd':
-                debugmode = 1;
-                break;
-            case 'o':
-                outfile = strdup(optarg);
-                break;
-            case '?':
-                if(isprint(optopt))
-                    fprintf(stderr, "Unknown option `-%c'.\n", optopt);
-                else
-                    fprintf(stderr, "Unknown option character `\\x%x'.\n",
-                        optopt);
-                usage();
-                return 1;
-            default:
-                abort();
-        }
-    }
-
-    if( argc - optind < 1 ) {
-        usage();
-        return 1;
-    }
-
-    if( outfile ) {
-        if(debugmode)
-            printf("DEBUG: Using output file %s\n", outfile);
-        outf = fopen(outfile, "w");
-    }
-
-    const char *dblistfn = argv[optind];
-
-    rpmcliInit(argc, argv, NULL);
-
-    if(debugmode)
-        rpmSetVerbosity(RPMLOG_DEBUG);
-
-    rpmDefineMacro(NULL, "__dbi_txn create nofsync", RMIL_CMDLINE);
-
-    rc = loadTs(&ts, &tscount, dblistfn);
-    if( rc )
-        return 1;
-    if( tscount == 0 ) {
-        fprintf(stderr, "Please specify database list file or database location\n");
-        return 1;
-    }
-
-    if(deplistmode) {
-        rc = printDepList(ts, tscount);
-    }
-    else {
-        if( argc - optind < 2 ) {
-            fprintf(stderr, "Please specify package list file\n");
-        }
-        else {
-            const char *pkglistfn = argv[optind+1];
-            rc = processPackages(ts, tscount, pkglistfn, ignoremissing);
-        }
-    }
-
-    for(i=0; i<tscount; i++)
-        (void)rpmtsFree(ts[i]);
-    free(ts);
-
-    if( outfile ) {
-        fclose(outf);
-        free(outfile);
-    }
-
-    return rc;
-}
diff --git a/meta/recipes-devtools/rpm/rpmresolve_1.0.bb b/meta/recipes-devtools/rpm/rpmresolve_1.0.bb
deleted file mode 100644
index 0c13a67107a..00000000000
--- a/meta/recipes-devtools/rpm/rpmresolve_1.0.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-SUMMARY = "OpenEmbedded RPM resolver utility"
-DESCRIPTION = "OpenEmbedded RPM resolver - performs RPM database lookups in batches to avoid \
- repeated invocations of rpm on the command line."
-DEPENDS = "rpm"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
-PR = "r2"
-
-SRC_URI = "file://rpmresolve.c"
-
-S = "${WORKDIR}"
-
-do_compile() {
-	${CC} ${CFLAGS} -ggdb -I${STAGING_INCDIR}/rpm ${LDFLAGS} rpmresolve.c -o rpmresolve -lrpmbuild -lrpm -lrpmio -lrpmdb
-}
-
-do_install() {
-	install -d ${D}${bindir}
-	install -m 0755 rpmresolve ${D}${bindir}
-}
-
-do_install_append_class-native() {
-	create_wrapper ${D}/${bindir}/rpmresolve \
-			RPM_USRLIBRPM=${STAGING_LIBDIR_NATIVE}/rpm \
-			RPM_ETCRPM=${STAGING_ETCDIR_NATIVE}/rpm \
-			RPM_LOCALEDIRRPM=${STAGING_DATADIR_NATIVE}/locale
-}
-
-BBCLASSEXTEND = "native nativesdk"
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 04/44] createrepo-c: add a recipe
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (2 preceding siblings ...)
  2017-03-10 11:23 ` [PATCH 03/44] rpmresolve: remove the recipe Alexander Kanavin
@ 2017-03-10 11:23 ` Alexander Kanavin
  2017-03-10 11:23 ` [PATCH 05/44] createrepo: remove the recipe Alexander Kanavin
                   ` (40 subsequent siblings)
  44 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:23 UTC (permalink / raw)
  To: openembedded-core

This is the current C reimplementation/replacement of the original createrepo.
https://github.com/rpm-software-management/createrepo_c/wiki

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 ...0001-Correctly-install-the-shared-library.patch | 28 +++++++++++++++++++
 ...-set-PYTHON_INSTALL_DIR-by-running-python.patch | 27 +++++++++++++++++++
 .../createrepo-c/createrepo-c_git.bb               | 31 ++++++++++++++++++++++
 3 files changed, 86 insertions(+)
 create mode 100644 meta/recipes-devtools/createrepo-c/createrepo-c/0001-Correctly-install-the-shared-library.patch
 create mode 100644 meta/recipes-devtools/createrepo-c/createrepo-c/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
 create mode 100644 meta/recipes-devtools/createrepo-c/createrepo-c_git.bb

diff --git a/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Correctly-install-the-shared-library.patch b/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Correctly-install-the-shared-library.patch
new file mode 100644
index 00000000000..01271246a22
--- /dev/null
+++ b/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Correctly-install-the-shared-library.patch
@@ -0,0 +1,28 @@
+From fef835e1fdedc72c97d9c3e5704302e56e1bdef0 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 2 Jan 2017 17:23:59 +0200
+Subject: [PATCH] Correctly install the shared library
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ src/CMakeLists.txt | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index f3635e8..46dc037 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -110,7 +110,8 @@ CONFIGURE_FILE("deltarpms.h.in" "${CMAKE_CURRENT_SOURCE_DIR}/deltarpms.h" @ONLY)
+ IF (CMAKE_SIZEOF_VOID_P MATCHES "8")
+     SET (LIB_SUFFIX "64")
+ ENDIF (CMAKE_SIZEOF_VOID_P MATCHES "8")
+-SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
++#SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
++SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}")
+ 
+ INSTALL(FILES ${headers} DESTINATION "include/createrepo_c")
+ INSTALL(FILES "createrepo_c.pc" DESTINATION "${LIB_INSTALL_DIR}/pkgconfig")
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch b/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
new file mode 100644
index 00000000000..9531070937c
--- /dev/null
+++ b/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
@@ -0,0 +1,27 @@
+From bef487b5c2515062c5dd73c21082ce42f69aa717 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 30 Dec 2016 18:31:02 +0200
+Subject: [PATCH] Do not set PYTHON_INSTALL_DIR by running python
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ src/python/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt
+index 9f1ac64..eae0cbb 100644
+--- a/src/python/CMakeLists.txt
++++ b/src/python/CMakeLists.txt
+@@ -19,7 +19,7 @@ else()
+     FIND_PACKAGE(PythonInterp 3.0 REQUIRED)
+ endif()
+ 
+-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
++#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+ INCLUDE_DIRECTORIES (${PYTHON_INCLUDE_PATH})
+ 
+ MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}")
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/createrepo-c/createrepo-c_git.bb b/meta/recipes-devtools/createrepo-c/createrepo-c_git.bb
new file mode 100644
index 00000000000..1e69067eebf
--- /dev/null
+++ b/meta/recipes-devtools/createrepo-c/createrepo-c_git.bb
@@ -0,0 +1,31 @@
+DESCRIPTION = "C implementation of createrepo."
+HOMEPAGE = "https://github.com/rpm-software-management/createrepo_c/wiki"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRC_URI = "git://github.com/rpm-software-management/createrepo_c \
+           file://0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \
+           file://0001-Correctly-install-the-shared-library.patch \
+           "
+
+PV = "0.10.0+git${SRCPV}"
+SRCREV = "748891ff8ee524c2d37926c608cd2794f88013f3"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "expat curl glib-2.0 libxml2 openssl bzip2 zlib file sqlite3 xz rpm"
+DEPENDS_append_class-native = " file-replacement-native"
+
+inherit cmake pkgconfig bash-completion distutils-base
+
+EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR}"
+
+BBCLASSEXTEND = "native"
+
+# Direct createrepo to read rpm configuration from our sysroot, not the one it was compiled in
+do_install_append_class-native() {
+        create_wrapper ${D}/${bindir}/createrepo_c \
+                RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm
+}
+
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 05/44] createrepo: remove the recipe
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (3 preceding siblings ...)
  2017-03-10 11:23 ` [PATCH 04/44] createrepo-c: add a recipe Alexander Kanavin
@ 2017-03-10 11:23 ` Alexander Kanavin
  2017-03-10 11:23 ` [PATCH 06/44] rpm: add a 4.x recipe Alexander Kanavin
                   ` (39 subsequent siblings)
  44 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:23 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 .../createrepo/createrepo/createrepo-dbpath.patch  |  61 --------
 .../createrepo/createrepo/createrepo-rpm549.patch  |  22 ---
 ...dumpMetadata-disable-signature-validation.patch |  31 ----
 .../createrepo/createrepo/fix-native-install.patch | 163 ---------------------
 .../createrepo/createrepo/fixstat.patch            |  19 ---
 ...n-scripts-should-use-interpreter-from-env.patch |  47 ------
 .../createrepo/createrepo/recommends.patch         |  71 ---------
 .../createrepo/createrepo/rpm-createsolvedb.py     |  64 --------
 .../createrepo/createrepo_0.4.11.bb                |  51 -------
 9 files changed, 529 deletions(-)
 delete mode 100644 meta/recipes-support/createrepo/createrepo/createrepo-dbpath.patch
 delete mode 100644 meta/recipes-support/createrepo/createrepo/createrepo-rpm549.patch
 delete mode 100644 meta/recipes-support/createrepo/createrepo/dumpMetadata-disable-signature-validation.patch
 delete mode 100644 meta/recipes-support/createrepo/createrepo/fix-native-install.patch
 delete mode 100644 meta/recipes-support/createrepo/createrepo/fixstat.patch
 delete mode 100644 meta/recipes-support/createrepo/createrepo/python-scripts-should-use-interpreter-from-env.patch
 delete mode 100644 meta/recipes-support/createrepo/createrepo/recommends.patch
 delete mode 100755 meta/recipes-support/createrepo/createrepo/rpm-createsolvedb.py
 delete mode 100644 meta/recipes-support/createrepo/createrepo_0.4.11.bb

diff --git a/meta/recipes-support/createrepo/createrepo/createrepo-dbpath.patch b/meta/recipes-support/createrepo/createrepo/createrepo-dbpath.patch
deleted file mode 100644
index 72755981a91..00000000000
--- a/meta/recipes-support/createrepo/createrepo/createrepo-dbpath.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-createrepo: Implement --dbpath command line option
-
---dbpath option allows to specify path to the directory
-with rpm database. By default createrepo uses or creates
-rpm database in /var/lib/rpm/
-
-Upstream-Status: Pending
-
-Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
-
---- createrepo-0.4.11.orig/genpkgmetadata.py 2015-03-30 22:18:19.904000000 +0300
-+++ createrepo-0.4.11/genpkgmetadata.py 2015-03-30 22:28:49.208000000 +0300
-@@ -65,6 +65,7 @@
-      -p, --pretty = output xml files in pretty format.
-      --update = update existing metadata (if present)
-      -d, --database = generate the sqlite databases.
-+     --dbpath <dir> = specify path to rpm db directory.
-     """)
- 
-     sys.exit(retval)
-@@ -72,10 +73,13 @@
- class MetaDataGenerator:
-     def __init__(self, cmds):
-         self.cmds = cmds
--        self.ts = rpm.TransactionSet()
-         self.pkgcount = 0
-         self.files = []
- 
-+        if self.cmds['dbpath']:
-+            rpm.addMacro("_dbpath", self.cmds['dbpath'])
-+        self.ts = rpm.TransactionSet()
-+
-     def _os_path_walk(self, top, func, arg):
-         """Directory tree walk with callback function.
-          copy of os.path.walk, fixes the link/stating problem
-@@ -435,6 +439,7 @@
-     cmds['dir-pattern-match'] = ['.*bin\/.*', '^\/etc\/.*']
-     cmds['skip-symlinks'] = False
-     cmds['pkglist'] = []
-+    cmds['dbpath'] = None
- 
-     try:
-         gopts, argsleft = getopt.getopt(args, 'phqVvndg:s:x:u:c:o:CSi:', ['help', 'exclude=',
-@@ -442,7 +447,7 @@
-                                                                   'baseurl=', 'groupfile=', 'checksum=',
-                                                                   'version', 'pretty', 'split', 'outputdir=',
-                                                                   'noepoch', 'checkts', 'database', 'update',
--                                                                  'skip-symlinks', 'pkglist='])
-+                                                                  'skip-symlinks', 'pkglist=', 'dbpath='])
-     except getopt.error, e:
-         errorprint(_('Options Error: %s.') % e)
-         usage()
-@@ -516,6 +521,8 @@
-                 cmds['skip-symlinks'] = True
-             elif arg in ['-i', '--pkglist']:
-                 cmds['pkglist'] = a
-+            elif arg == '--dbpath':
-+                cmds['dbpath'] = os.path.realpath(a)
-                                 
-     except ValueError, e:
-         errorprint(_('Options Error: %s') % e)
diff --git a/meta/recipes-support/createrepo/createrepo/createrepo-rpm549.patch b/meta/recipes-support/createrepo/createrepo/createrepo-rpm549.patch
deleted file mode 100644
index bc7200d0722..00000000000
--- a/meta/recipes-support/createrepo/createrepo/createrepo-rpm549.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-dumpMetadata.py: Fix for RPM5 - 5.4.9 integration
-
-RPM5 no longer has a switch to disable signature validation.  (Due to security
-validation concerns.)
-
-Upstream-Status: Inappropriate [other]
-  createrepo does not support RPM5 upstream
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-diff -u createrepo-0.4.11.orig/dumpMetadata.py createrepo-0.4.11/dumpMetadata.py
---- createrepo-0.4.11.orig/dumpMetadata.py	2012-06-05 10:12:55.687964222 -0500
-+++ createrepo-0.4.11/dumpMetadata.py	2012-06-05 10:40:08.154060600 -0500
-@@ -92,7 +92,7 @@
-             fdno = package # let's assume this is an fdno and go with it :)
-     except OSError:
-         raise MDError, "Error opening file"
--    ts.setVSFlags((rpm._RPMVSF_NOSIGNATURES|rpm.RPMVSF_NOMD5|rpm.RPMVSF_NEEDPAYLOAD))
-+    ts.setVSFlags((rpm.RPMVSF_NOMD5|rpm.RPMVSF_NEEDPAYLOAD))
-     try:
-         hdr = ts.hdrFromFdno(fdno)
-     except rpm.error:
diff --git a/meta/recipes-support/createrepo/createrepo/dumpMetadata-disable-signature-validation.patch b/meta/recipes-support/createrepo/createrepo/dumpMetadata-disable-signature-validation.patch
deleted file mode 100644
index 905531f848a..00000000000
--- a/meta/recipes-support/createrepo/createrepo/dumpMetadata-disable-signature-validation.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-dumpMetadata: disable signature validation
-
-Makes it possible to work on RPM repositories that contain signed packages
-without the need of importing the public part of the signing key into the RPM
-database.
-
-Upstream-Status: Pending
-
-Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
----
- dumpMetadata.py | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/dumpMetadata.py b/dumpMetadata.py
-index e40e8ac..ca6a82d 100644
---- a/dumpMetadata.py
-+++ b/dumpMetadata.py
-@@ -92,7 +92,9 @@ def returnHdr(ts, package):
-             fdno = package # let's assume this is an fdno and go with it :)
-     except OSError:
-         raise MDError, "Error opening file"
--    ts.setVSFlags((rpm.RPMVSF_NOMD5|rpm.RPMVSF_NEEDPAYLOAD))
-+    ts.setVSFlags((rpm.RPMVSF_NOMD5|rpm.RPMVSF_NEEDPAYLOAD|
-+                   rpm.RPMVSF_NODSA|rpm.RPMVSF_NORSA|
-+                   rpm.RPMVSF_NODSAHEADER|rpm.RPMVSF_NORSAHEADER))
-     try:
-         hdr = ts.hdrFromFdno(fdno)
-     except rpm.error:
--- 
-2.1.4
-
diff --git a/meta/recipes-support/createrepo/createrepo/fix-native-install.patch b/meta/recipes-support/createrepo/createrepo/fix-native-install.patch
deleted file mode 100644
index d8202a4f7cd..00000000000
--- a/meta/recipes-support/createrepo/createrepo/fix-native-install.patch
+++ /dev/null
@@ -1,163 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Date: Jan 31, 2011
-
-There are two fixes:
-  1. -native needs to customize prefix
-  2. needs to change python reference in binaries
-
-Signed-off-by: Qing He <qing.he@intel.com>
-
-diff --git a/Makefile b/Makefile
-index b2d1a32..3c3639f 100644
---- a/Makefile
-+++ b/Makefile
-@@ -3,22 +3,22 @@ VERSION = 0.4.11
- SHELL = /bin/sh
- top_srcdir = .
- srcdir = .
--prefix = /usr
--exec_prefix = ${prefix}
--
--bindir = ${exec_prefix}/bin
--sbindir = ${exec_prefix}/sbin
--libexecdir = ${exec_prefix}/libexec
--datadir = ${prefix}/share
--sysconfdir = ${prefix}/etc
--sharedstatedir = ${prefix}/com
--localstatedir = ${prefix}/var
--libdir = ${exec_prefix}/lib
--infodir = ${prefix}/info
-+prefix ?= /usr
-+exec_prefix ?= ${prefix}
-+
-+bindir ?= ${exec_prefix}/bin
-+sbindir ?= ${exec_prefix}/sbin
-+libexecdir ?= ${exec_prefix}/libexec
-+datadir ?= ${prefix}/share
-+sysconfdir ?= ${prefix}/etc
-+sharedstatedir ?= ${prefix}/com
-+localstatedir ?= ${prefix}/var
-+libdir ?= ${exec_prefix}/lib
-+infodir ?= ${prefix}/info
- docdir = 
--includedir = ${prefix}/include
-+includedir ?= ${prefix}/include
- oldincludedir = /usr/include
--mandir = ${prefix}/share/man
-+mandir ?= ${prefix}/share/man
- 
- pkgdatadir = $(datadir)/$(PACKAGE)
- pkglibdir = $(libdir)/$(PACKAGE)
-diff --git a/bin/Makefile b/bin/Makefile
-index 52c1f50..e30610e 100644
---- a/bin/Makefile
-+++ b/bin/Makefile
-@@ -1,22 +1,22 @@
- SHELL = /bin/sh
- top_srcdir = ..
- srcdir = ../bin
--prefix = /usr
--exec_prefix = ${prefix}
--
--bindir = ${exec_prefix}/bin
--sbindir = ${exec_prefix}/sbin
--libexecdir = ${exec_prefix}/libexec
--datadir = ${prefix}/share
--sysconfdir = ${prefix}/etc
--sharedstatedir = ${prefix}/com
--localstatedir = ${prefix}/var
--libdir = ${exec_prefix}/lib
--infodir = ${prefix}/info
-+prefix ?= /usr
-+exec_prefix ?= ${prefix}
-+
-+bindir ?= ${exec_prefix}/bin
-+sbindir ?= ${exec_prefix}/sbin
-+libexecdir ?= ${exec_prefix}/libexec
-+datadir ?= ${prefix}/share
-+sysconfdir ?= ${prefix}/etc
-+sharedstatedir ?= ${prefix}/com
-+localstatedir ?= ${prefix}/var
-+libdir ?= ${exec_prefix}/lib
-+infodir ?= ${prefix}/info
- docdir = 
--includedir = ${prefix}/include
-+includedir ?= ${prefix}/include
- oldincludedir = /usr/include
--mandir = ${prefix}/man
-+mandir ?= ${prefix}/man
- 
- pkgdatadir = $(datadir)/$(PACKAGE)
- pkglibdir = $(libdir)/$(PACKAGE)
-@@ -40,8 +40,11 @@ all: $(srcdir)/$(PACKAGE)
- 
- 
- install: all installdirs
--	$(INSTALL_BIN) $(srcdir)/$(PACKAGE) $(DESTDIR)$(bindir)/$(PACKAGE)
--	$(INSTALL_BIN) $(srcdir)/modifyrepo $(DESTDIR)$(bindir)/modifyrepo
-+	sed -e "s|@DATADIR@|$(datadir)|" $(srcdir)/$(PACKAGE) > $(srcdir)/$(PACKAGE).tmp
-+	sed -e "s|@DATADIR@|$(datadir)|" $(srcdir)/modifyrepo > $(srcdir)/modifyrepo.tmp
-+	$(INSTALL_BIN) $(srcdir)/$(PACKAGE).tmp $(DESTDIR)$(bindir)/$(PACKAGE)
-+	$(INSTALL_BIN) $(srcdir)/modifyrepo.tmp $(DESTDIR)$(bindir)/modifyrepo
-+	rm -f $(srcdir)/$(PACKAGE).tmp $(srcdir)/modifyrepo.tmp
- 
- 
- uninstall:
-diff --git a/bin/createrepo b/bin/createrepo
-index b0de515..eaacb39 100755
---- a/bin/createrepo
-+++ b/bin/createrepo
-@@ -1,2 +1,2 @@
- #!/bin/sh
--exec /usr/share/createrepo/genpkgmetadata.py "$@"
-+exec @DATADIR@/createrepo/genpkgmetadata.py "$@"
-diff --git a/bin/modifyrepo b/bin/modifyrepo
-index c9732d8..6f7c1d4 100755
---- a/bin/modifyrepo
-+++ b/bin/modifyrepo
-@@ -1,2 +1,2 @@
- #!/bin/sh
--exec /usr/share/createrepo/modifyrepo.py "$@"
-+exec @DATADIR@/createrepo/modifyrepo.py "$@"
-diff --git a/docs/Makefile b/docs/Makefile
-index 0a41179..e128c85 100644
---- a/docs/Makefile
-+++ b/docs/Makefile
-@@ -1,22 +1,22 @@
- SHELL = /bin/sh
- top_srcdir = ..
- srcdir = ../docs
--prefix = /usr
--exec_prefix = ${prefix}
--
--bindir = ${exec_prefix}/bin
--sbindir = ${exec_prefix}/sbin
--libexecdir = ${exec_prefix}/libexec
--datadir = ${prefix}/share
--sysconfdir = ${prefix}/etc
--sharedstatedir = ${prefix}/com
--localstatedir = ${prefix}/var
--libdir = ${exec_prefix}/lib
--infodir = ${prefix}/info
-+prefix ?= /usr
-+exec_prefix ?= ${prefix}
-+
-+bindir ?= ${exec_prefix}/bin
-+sbindir ?= ${exec_prefix}/sbin
-+libexecdir ?= ${exec_prefix}/libexec
-+datadir ?= ${prefix}/share
-+sysconfdir ?= ${prefix}/etc
-+sharedstatedir ?= ${prefix}/com
-+localstatedir ?= ${prefix}/var
-+libdir ?= ${exec_prefix}/lib
-+infodir ?= ${prefix}/info
- docdir = 
--includedir = ${prefix}/include
-+includedir ?= ${prefix}/include
- oldincludedir = /usr/include
--mandir = ${datadir}/man
-+mandir ?= ${datadir}/man
- 
- pkgdatadir = $(datadir)/$(PACKAGE)
- pkglibdir = $(libdir)/$(PACKAGE)
diff --git a/meta/recipes-support/createrepo/createrepo/fixstat.patch b/meta/recipes-support/createrepo/createrepo/fixstat.patch
deleted file mode 100644
index d34eb56a8e7..00000000000
--- a/meta/recipes-support/createrepo/createrepo/fixstat.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-When reading the mtime from disk, the system can get a floating point 
-value. Convert this to an int for comparision purposes, else some
-packages always get reindexed as the value in the index is an int.
-RP 2016/3/2
-Upstream-Status: Pending
-
-Index: createrepo-0.4.11/readMetadata.py
-===================================================================
---- createrepo-0.4.11.orig/readMetadata.py
-+++ createrepo-0.4.11/readMetadata.py
-@@ -126,7 +126,7 @@ class MetadataIndex(object):
-             if self.opts.get('verbose'):
-                 print _("Size (%i -> %i) changed for file %s") % (size,st.st_size,filepath)
-             return
--        if st.st_mtime != mtime:
-+        if int(st.st_mtime) != mtime:
-             if self.opts.get('verbose'):
-                 print _("Modification time changed for %s") % filepath
-             return
diff --git a/meta/recipes-support/createrepo/createrepo/python-scripts-should-use-interpreter-from-env.patch b/meta/recipes-support/createrepo/createrepo/python-scripts-should-use-interpreter-from-env.patch
deleted file mode 100644
index 80205a1507f..00000000000
--- a/meta/recipes-support/createrepo/createrepo/python-scripts-should-use-interpreter-from-env.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-Author: Andrei Gherzan <andrei@gherzan.ro>
-
-Python interpreter should be use from PATH - native python - and not the one from
-host.
-
-Upstream-Status: Inappropriate [configuration]
-
-Index: createrepo-0.4.11/genpkgmetadata.py
-===================================================================
---- createrepo-0.4.11.orig/genpkgmetadata.py	2012-04-10 17:14:05.278649384 +0300
-+++ createrepo-0.4.11/genpkgmetadata.py	2012-04-10 17:14:22.290648886 +0300
-@@ -1,4 +1,4 @@
--#!/usr/bin/python -t
-+#! /usr/bin/env python
- # primary functions and glue for generating the repository metadata
- #
- 
-Index: createrepo-0.4.11/modifyrepo.py
-===================================================================
---- createrepo-0.4.11.orig/modifyrepo.py	2012-04-10 17:14:09.106649272 +0300
-+++ createrepo-0.4.11/modifyrepo.py	2012-04-10 17:14:27.818648725 +0300
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#! /usr/bin/env python
- # $Id$
- #
- # This tools is used to insert arbitrary metadata into an RPM repository.
-Index: createrepo-0.4.11/dumpMetadata.py
-===================================================================
---- createrepo-0.4.11.orig/dumpMetadata.py	2012-04-10 17:19:23.874640068 +0300
-+++ createrepo-0.4.11/dumpMetadata.py	2012-04-10 17:19:34.502639756 +0300
-@@ -1,4 +1,4 @@
--#!/usr/bin/python -t
-+#! /usr/bin/env python
- # base classes and functions for dumping out package Metadata
- #
- # This program is free software; you can redistribute it and/or modify
-Index: createrepo-0.4.11/readMetadata.py
-===================================================================
---- createrepo-0.4.11.orig/readMetadata.py	2012-04-10 17:19:19.626640193 +0300
-+++ createrepo-0.4.11/readMetadata.py	2012-04-10 17:19:40.198639590 +0300
-@@ -1,4 +1,4 @@
--#!/usr/bin/python -t
-+#! /usr/bin/env python
- 
- # This program is free software; you can redistribute it and/or modify
- # it under the terms of the GNU General Public License as published by
diff --git a/meta/recipes-support/createrepo/createrepo/recommends.patch b/meta/recipes-support/createrepo/createrepo/recommends.patch
deleted file mode 100644
index dc5de2b5b01..00000000000
--- a/meta/recipes-support/createrepo/createrepo/recommends.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-createrepo: implement recommends support
-
-Record against the corresponding requires entry in the output metadata
-if a dependency relationship is marked with the RPMSENSE_MISSINGOK flag
-(indicating it is a recommendation, rather than a hard dependency).
-
-Upstream-Status: Pending
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-
-diff --git a/dumpMetadata.py b/dumpMetadata.py
-index 70bb2d8..e40e8ac 100644
---- a/dumpMetadata.py
-+++ b/dumpMetadata.py
-@@ -319,6 +319,23 @@ class RpmMetaData:
-                     reqs.append(0)
-         return reqs
- 
-+    def _checkMissingOk(self, flags):
-+        reqs=[]
-+        if flags is None:
-+            return reqs
-+
-+        if type(flags) is not types.ListType:
-+            flags = [flags]
-+        for flag in flags:
-+            newflag = flag
-+            if flag is not None:
-+                newflag = flag & rpm.RPMSENSE_MISSINGOK
-+                if newflag:
-+                    reqs.append(1)
-+                else:
-+                    reqs.append(0)
-+        return reqs
-+
- 
-     def _correctVersion(self, vers):
-         returnvers = []
-@@ -537,9 +554,10 @@ class RpmMetaData:
-         tmpflags = self.hdr[rpm.RPMTAG_REQUIREFLAGS]
-         flags = self._correctFlags(tmpflags)
-         prereq = self._checkPreReq(tmpflags)
-+        missingok = self._checkMissingOk(tmpflags)
-         ver = self._correctVersion(self.hdr[rpm.RPMTAG_REQUIREVERSION])
-         if names is not None:
--            lst = zip(names, flags, ver, prereq)
-+            lst = zip(names, flags, ver, prereq, missingok)
-         return self._uniq(lst)
-         
-     def obsoletesList(self):
-@@ -692,7 +710,7 @@ def generateXML(doc, node, formatns, rpmObj, sumtype):
-     depsList = rpmObj.depsList()
-     if len(depsList) > 0:
-         rpconode = format.newChild(formatns, 'requires', None)    
--        for (name, flags, (e,v,r), prereq) in depsList:
-+        for (name, flags, (e,v,r), prereq, missingok) in depsList:
-             entry = rpconode.newChild(formatns, 'entry', None)
-             entry.newProp('name', name)
-             if flags != 0:
-@@ -711,6 +729,8 @@ def generateXML(doc, node, formatns, rpmObj, sumtype):
-                     entry.newProp('rel', str(r))
-             if prereq == 1:
-                 entry.newProp('pre', str(prereq))
-+            if missingok:
-+                entry.newProp('missingok', '1')
-         
-     for file in rpmObj.usefulFiles():
-         files = format.newChild(None, 'file', None)
--- 
-1.7.9.5
-
diff --git a/meta/recipes-support/createrepo/createrepo/rpm-createsolvedb.py b/meta/recipes-support/createrepo/createrepo/rpm-createsolvedb.py
deleted file mode 100755
index a5b61bade74..00000000000
--- a/meta/recipes-support/createrepo/createrepo/rpm-createsolvedb.py
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/env python
-#
-# This script generates a solution database for a directory containing rpm packages
-# but tries to be efficient about this, only doing so when the packages have changed
-# in some way.
-#
-# It is assumed something already went through and removed all the solvedb.done stamp files
-# in advance.
-#
-# First argument - the rpm binary to use
-# Subsequent arguments - paths to process solution databases for
-#
-
-import sys, os
-import hashlib
-import stat
-import subprocess
-
-if len(sys.argv) < 1:
-    print("Error, rpm command not specified")
-    sys.exit(1)
-
-if len(sys.argv) < 2:
-    print("Error, no paths specified")
-    sys.exit(1)
-
-paths = sys.argv[2:]
-
-for path in paths:
-    if os.path.exists(path + "/solvedb.done"):
-        continue
-    data = ""
-    manifest = []
-    for root, dirs, files in os.walk(path):
-        for file in files:
-            f = os.path.join(root, file)
-            if f.startswith(path + "/" + "solvedb"):
-                continue
-            data = data + str(os.stat(f)[stat.ST_MTIME])
-            manifest.append(f)
-    checksum = hashlib.md5(data).hexdigest()
-
-    if os.path.exists(path + "/solvedb.checksum") and open(path + "/solvedb.checksum", "r").read() == checksum:
-        open(path + "/solvedb.done", "w")
-        continue
-
-    if os.path.exists(path + "/solvedb"):
-        subprocess.call("rm -rf %s" % (path + "/solvedb"), shell=True)
-    os.mkdir(path + "/solvedb")
-    m = open(path + "/solvedb/manifest", "w")
-    m.write("# Dynamically generated solve manifest\n")
-    for f in manifest:
-        m.write(f + "\n")
-    m.close()
-
-    cmd = sys.argv[1] + ' -i --replacepkgs --replacefiles --oldpackage -D "_dbpath ' + path + '/solvedb" --justdb \
-			--noaid --nodeps --noorder --noscripts --notriggers --noparentdirs --nolinktos --stats \
-			--ignoresize --nosignature --nodigest -D "__dbi_txn create nofsync" \
-			' + path + '/solvedb/manifest'
-    subprocess.call(cmd, shell=True)
-
-    open(path + "/solvedb.checksum", "w").write(checksum)
-    open(path + "/solvedb.done", "w")
-
diff --git a/meta/recipes-support/createrepo/createrepo_0.4.11.bb b/meta/recipes-support/createrepo/createrepo_0.4.11.bb
deleted file mode 100644
index 2a3231b3a4a..00000000000
--- a/meta/recipes-support/createrepo/createrepo_0.4.11.bb
+++ /dev/null
@@ -1,51 +0,0 @@
-SUMMARY = "Creates metadata indexes for RPM package repositories"
-HOMEPAGE = "http://createrepo.baseurl.org/"
-
-RECIPE_NO_UPDATE_REASON = "Versions after 0.9.* use YUM, so we hold at 0.4.11"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760"
-
-DEPENDS_class-native += "libxml2-native rpm-native"
-RDEPENDS_${PN}_class-target = "libxml2-python"
-
-PR = "r9"
-
-SRC_URI = "http://createrepo.baseurl.org/download/${BP}.tar.gz \
-           file://fix-native-install.patch \
-           file://python-scripts-should-use-interpreter-from-env.patch \
-           file://createrepo-rpm549.patch \
-           file://recommends.patch \
-           file://createrepo-dbpath.patch \
-           file://dumpMetadata-disable-signature-validation.patch \
-           file://rpm-createsolvedb.py \
-           file://fixstat.patch \
-           "
-
-SRC_URI[md5sum] = "3e9ccf4abcffe3f49af078c83611eda2"
-SRC_URI[sha256sum] = "a73ae11a0dcde8bde36d900bc3f7f8f1083ba752c70a5c61b72d1e1e7608f21b"
-
-BBCLASSEXTEND = "native"
-
-do_install () {
-	oe_runmake -e 'DESTDIR=${D}' install
-	install -m 0755 ${WORKDIR}/rpm-createsolvedb.py ${D}${bindir}/
-}
-
-# Wrap the python script since the native python is
-# ${bindir}/python-native/python, and the "#! /usr/bin/env python" can't
-# find it since it is not in PATH.
-do_install_append_class-native () {
-	# Not all the python scripts should be wrapped since some of
-	# them are modules (be imported).
-	for i in ${D}${datadir}/createrepo/genpkgmetadata.py \
-		 ${D}${datadir}/createrepo/modifyrepo.py \
-		 ${D}${bindir}/rpm-createsolvedb.py ; do
-		sed -i -e 's|^#!.*/usr/bin/env python|#! /usr/bin/env nativepython|' $i
-	done
-
-	create_wrapper ${D}/${bindir}/createrepo \
-			RPM_USRLIBRPM=${STAGING_LIBDIR_NATIVE}/rpm \
-			RPM_ETCRPM=${STAGING_ETCDIR_NATIVE}/rpm \
-			RPM_LOCALEDIRRPM=${STAGING_DATADIR_NATIVE}/locale
-}
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 06/44] rpm: add a 4.x recipe
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (4 preceding siblings ...)
  2017-03-10 11:23 ` [PATCH 05/44] createrepo: remove the recipe Alexander Kanavin
@ 2017-03-10 11:23 ` Alexander Kanavin
  2017-03-10 11:23 ` [PATCH 07/44] rpm: remove 5.x recipe Alexander Kanavin
                   ` (38 subsequent siblings)
  44 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:23 UTC (permalink / raw)
  To: openembedded-core

The dnf stack is written and tested against rpm 4.x. So if we want to use dnf for packaging,
we should also use rpm 4 - there's simply too much work involved in making rpm 5 work with it due
to significant API differences, and supporting that going forward.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 ...d-a-color-setting-for-mips64_n32-binaries.patch |  40 ++++++++
 ...an-unsatisfiable-dependency-when-building.patch |  33 +++++++
 ...code-lib-rpm-as-the-installation-path-for.patch |  61 ++++++++++++
 .../0001-Do-not-read-config-files-from-HOME.patch  |  38 ++++++++
 ...t-the-PATH-environment-variable-before-ru.patch |  30 ++++++
 .../files/0001-Fix-build-with-musl-C-library.patch |  74 ++++++++++++++
 ...installing-execute-package-scriptlets-wit.patch |  37 +++++++
 ...alue-cannot-be-reset-issue-a-notice-inste.patch |  31 ++++++
 ...-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch |  72 ++++++++++++++
 meta/recipes-devtools/rpm/rpm_git.bb               | 108 +++++++++++++++++++++
 10 files changed, 524 insertions(+)
 create mode 100644 meta/recipes-devtools/rpm/files/0001-Add-a-color-setting-for-mips64_n32-binaries.patch
 create mode 100644 meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
 create mode 100644 meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
 create mode 100644 meta/recipes-devtools/rpm/files/0001-Do-not-read-config-files-from-HOME.patch
 create mode 100644 meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch
 create mode 100644 meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch
 create mode 100644 meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch
 create mode 100644 meta/recipes-devtools/rpm/files/0001-When-nice-value-cannot-be-reset-issue-a-notice-inste.patch
 create mode 100644 meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch
 create mode 100644 meta/recipes-devtools/rpm/rpm_git.bb

diff --git a/meta/recipes-devtools/rpm/files/0001-Add-a-color-setting-for-mips64_n32-binaries.patch b/meta/recipes-devtools/rpm/files/0001-Add-a-color-setting-for-mips64_n32-binaries.patch
new file mode 100644
index 00000000000..ac6dcaf101d
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-Add-a-color-setting-for-mips64_n32-binaries.patch
@@ -0,0 +1,40 @@
+From e3eff024826550aec4a6a5baef7210a29faf299d Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 9 Mar 2017 18:54:02 +0200
+Subject: [PATCH] Add a color setting for mips64_n32 binaries
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ build/rpmfc.c | 1 +
+ rpmrc.in      | 2 ++
+ 2 files changed, 3 insertions(+)
+
+diff --git a/build/rpmfc.c b/build/rpmfc.c
+index d38a10916..c8e2f876a 100644
+--- a/build/rpmfc.c
++++ b/build/rpmfc.c
+@@ -622,6 +622,7 @@ exit:
+ static const struct rpmfcTokens_s rpmfcTokens[] = {
+   { "directory",		RPMFC_INCLUDE },
+ 
++  { "N32 MIPS64",		RPMFC_ELFMIPSN32|RPMFC_INCLUDE },
+   { "ELF 32-bit",		RPMFC_ELF32|RPMFC_INCLUDE },
+   { "ELF 64-bit",		RPMFC_ELF64|RPMFC_INCLUDE },
+ 
+diff --git a/rpmrc.in b/rpmrc.in
+index abc08fc31..f5bc820d8 100644
+--- a/rpmrc.in
++++ b/rpmrc.in
+@@ -133,6 +133,8 @@ archcolor: mipsr6el 1
+ archcolor: mips64r6 2
+ archcolor: mips64r6el 2
+ 
++archcolor: mips64_n32 4
++
+ archcolor: m68k 1
+ 
+ archcolor: m68kmint 1
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch b/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
new file mode 100644
index 00000000000..80e2f0fad70
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
@@ -0,0 +1,33 @@
+From 87cfc0db1ed6fe381a5ed5f0016d8c3344a31a11 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 9 Jan 2017 18:52:11 +0200
+Subject: [PATCH] Do not add an unsatisfiable dependency when building rpms in
+ a short-circuited way.
+
+Upstream permits short-circuiting only for local testing; Yocto on the other
+hand produces rpms that way by design.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ build/pack.c | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/build/pack.c b/build/pack.c
+index 1261cdbba..bb2d6f4f6 100644
+--- a/build/pack.c
++++ b/build/pack.c
+@@ -595,10 +595,6 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
+ 	    headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16);
+ 	}
+ 
+-	if (cheating) {
+-	    (void) rpmlibNeedsFeature(pkg, "ShortCircuited", "4.9.0-1");
+-	}
+-	
+ 	{   char *binFormat = rpmGetPath("%{_rpmfilename}", NULL);
+ 	    char *binRpm, *binDir;
+ 	    binRpm = headerFormat(pkg->header, binFormat, &errorString);
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch b/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
new file mode 100644
index 00000000000..d99ddeb9ea9
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
@@ -0,0 +1,61 @@
+From d82691b8d58201dd03e30585daacd8ffd1556ae2 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 27 Feb 2017 09:43:30 +0200
+Subject: [PATCH] Do not hardcode "lib/rpm" as the installation path for
+ default configuration and macros.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ configure.ac | 2 +-
+ macros.in    | 2 +-
+ rpm.am       | 4 ++--
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4f3be8770..92ffd3d68 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -875,7 +875,7 @@ else
+     usrprefix=$prefix
+ fi
+ 
+-RPMCONFIGDIR="`echo ${usrprefix}/lib/rpm`"
++RPMCONFIGDIR="`echo ${libdir}/rpm`"
+ AC_SUBST(RPMCONFIGDIR)
+ 
+ AC_SUBST(OBJDUMP)
+diff --git a/macros.in b/macros.in
+index c6d5a6b03..84ae25275 100644
+--- a/macros.in
++++ b/macros.in
+@@ -877,7 +877,7 @@ package or when debugging this package.\
+ %_sharedstatedir	%{_prefix}/com
+ %_localstatedir		%{_prefix}/var
+ %_lib			lib
+-%_libdir		%{_exec_prefix}/%{_lib}
++%_libdir		@libdir@
+ %_includedir		%{_prefix}/include
+ %_infodir		%{_datadir}/info
+ %_mandir		%{_datadir}/man
+diff --git a/rpm.am b/rpm.am
+index 1f43ad8a0..6854ff6ba 100644
+--- a/rpm.am
++++ b/rpm.am
+@@ -1,10 +1,10 @@
+ # Internal binaries
+ ## HACK: It probably should be $(libexecdir)/rpm or $(libdir)/rpm
+-rpmlibexecdir = $(prefix)/lib/rpm
++rpmlibexecdir = $(libdir)/rpm
+ 
+ # Host independent config files
+ ## HACK: it probably should be $(datadir)/rpm
+-rpmconfigdir = $(prefix)/lib/rpm
++rpmconfigdir = $(libdir)/rpm
+ 
+ # Libtool version (current-revision-age) for all our libraries
+ rpm_version_info = 7:0:0
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/rpm/files/0001-Do-not-read-config-files-from-HOME.patch b/meta/recipes-devtools/rpm/files/0001-Do-not-read-config-files-from-HOME.patch
new file mode 100644
index 00000000000..96eb4189520
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-Do-not-read-config-files-from-HOME.patch
@@ -0,0 +1,38 @@
+From 35381b6cd6c1b571bf7e6b0640de0f54dbf94386 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 10 Jan 2017 14:11:30 +0200
+Subject: [PATCH] Do not read config files from $HOME
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ lib/rpmrc.c | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/lib/rpmrc.c b/lib/rpmrc.c
+index 4ed991321..19fe80f98 100644
+--- a/lib/rpmrc.c
++++ b/lib/rpmrc.c
+@@ -458,8 +458,7 @@ static void setDefaults(void)
+     if (!defrcfiles) {
+ 	defrcfiles = rstrscat(NULL, confdir, "/rpmrc", ":",
+ 				confdir, "/" RPMCANONVENDOR "/rpmrc", ":",
+-				SYSCONFDIR "/rpmrc", ":",
+-			  	"~/.rpmrc", NULL);
++				SYSCONFDIR "/rpmrc", ":");
+     }
+ 
+ #ifndef MACROFILES
+@@ -471,8 +470,7 @@ static void setDefaults(void)
+   				confdir, "/" RPMCANONVENDOR "/macros", ":",
+ 				SYSCONFDIR "/rpm/macros.*", ":",
+ 				SYSCONFDIR "/rpm/macros", ":",
+-				SYSCONFDIR "/rpm/%{_target}/macros", ":",
+-				"~/.rpmmacros", NULL);
++				SYSCONFDIR "/rpm/%{_target}/macros", ":");
+     }
+ #else
+     macrofiles = MACROFILES;
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch b/meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch
new file mode 100644
index 00000000000..a38675f89c9
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch
@@ -0,0 +1,30 @@
+From ffb5301a8594140ad7a58bc0f2053be8ca2b2946 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 20 Jan 2017 13:32:06 +0200
+Subject: [PATCH 1/2] Do not reset the PATH environment variable before running
+ scriptlets.
+
+We add lots of native stuff into it and scriptlets rely on that.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ lib/rpmscript.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/rpmscript.c b/lib/rpmscript.c
+index 92f949fa2..7c1aa75a8 100644
+--- a/lib/rpmscript.c
++++ b/lib/rpmscript.c
+@@ -201,7 +201,7 @@ static void doScriptExec(ARGV_const_t argv, ARGV_const_t prefixes,
+ 	if (ipath && ipath[5] != '%')
+ 	    path = ipath;
+ 
+-	xx = setenv("PATH", path, 1);
++	//xx = setenv("PATH", path, 1);
+ 	free(ipath);
+     }
+ 
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch b/meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch
new file mode 100644
index 00000000000..95c70136bd6
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch
@@ -0,0 +1,74 @@
+From 211c2d11200e6657132c52e7ac68f8c118231262 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 27 Feb 2017 14:43:21 +0200
+Subject: [PATCH] Fix build with musl C library.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ configure.ac        | 3 ++-
+ misc/Makefile.am    | 3 +--
+ misc/rpmxprogname.c | 3 +--
+ 3 files changed, 4 insertions(+), 5 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 92ffd3d68..9c58467c1 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -229,6 +229,7 @@ AC_SEARCH_LIBS(dlopen, [dl])
+ # Check for libelf library. Prefer external, otherwise none.
+ WITH_LIBELF_LIB=
+ AC_CHECK_HEADER([libelf.h])
++AC_CHECK_HEADERS([error.h], [WITH_ERROR_H=yes])
+ AC_CHECK_HEADERS([gelf.h], [
+ 	AC_CHECK_LIB(elf, gelf_getvernaux, [
+ 	    AC_DEFINE(HAVE_LIBELF, 1, [Define to 1 if you have the 'elf' library (-lelf).])
+@@ -237,7 +238,7 @@ AC_CHECK_HEADERS([gelf.h], [
+ 	])
+ ])
+ AC_SUBST(WITH_LIBELF_LIB)
+-AM_CONDITIONAL(LIBELF,[test "$WITH_LIBELF" = yes])
++AM_CONDITIONAL(LIBELF,[test "$WITH_LIBELF" = yes && test "$WITH_ERROR_H" = yes])
+ 
+ AC_CHECK_HEADERS([dwarf.h], [
+   WITH_LIBDWARF=yes
+diff --git a/misc/Makefile.am b/misc/Makefile.am
+index 8bf0093d9..b9db3d31a 100644
+--- a/misc/Makefile.am
++++ b/misc/Makefile.am
+@@ -5,10 +5,9 @@ AM_CPPFLAGS += -I$(top_srcdir)/misc
+ 
+ EXTRA_DIST = \
+ 	fnmatch.c	fnmatch.h \
+-	rpmxprogname.c	rpmxprogname.h \
+ 	stpcpy.c	stpncpy.c
+ 
+ noinst_LTLIBRARIES = libmisc.la
+ 
+-libmisc_la_SOURCES = fts.c fts.h
++libmisc_la_SOURCES = fts.c fts.h rpmxprogname.c rpmxprogname.h
+ libmisc_la_LIBADD = @LTLIBOBJS@
+diff --git a/misc/rpmxprogname.c b/misc/rpmxprogname.c
+index f89600613..e94625ea8 100644
+--- a/misc/rpmxprogname.c
++++ b/misc/rpmxprogname.c
+@@ -13,7 +13,7 @@ char *_rpmxgetprogname(void)
+ {
+   const char *empty = "";
+ 
+-  if (_rpmxprognam != NULL) /* never return NULL string */
++  if (_rpmxprogname != NULL) /* never return NULL string */
+     return _rpmxprogname;
+   else
+     return empty;
+@@ -30,4 +30,3 @@ void _rpmxsetprogname(const char *pn)
+   }
+ }
+ 
+-#endif /* _RPMXPROGNAME_H */
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch b/meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch
new file mode 100644
index 00000000000..2be3cb5af3c
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch
@@ -0,0 +1,37 @@
+From a6f269f879221f2777169c5f7291322afe6b661b Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 17 Jan 2017 14:07:17 +0200
+Subject: [PATCH] When cross-installing, execute package scriptlets without
+ chrooting into destination rootfs
+
+This is triggered only when RPM_NO_CHROOT_FOR_SCRIPTS environment variable is defined.
+Otherwise they will trigger an explosion of failures, obviously.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ lib/rpmscript.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/lib/rpmscript.c b/lib/rpmscript.c
+index 98d3f420d..b95b5d606 100644
+--- a/lib/rpmscript.c
++++ b/lib/rpmscript.c
+@@ -467,7 +467,13 @@ rpmRC rpmScriptRun(rpmScript script, int arg1, int arg2, FD_t scriptFd,
+ 
+     if (rc != RPMRC_FAIL) {
+ 	if (script_type & RPMSCRIPTLET_EXEC) {
+-	    rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, &script->nextFileFunc);
++	    if (getenv("RPM_NO_CHROOT_FOR_SCRIPTS") != NULL) {
++		rpmChrootOut();
++		rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, &script->nextFileFunc);
++		rpmChrootIn();
++	    } else {
++		rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, &script->nextFileFunc);
++	    }
+ 	} else {
+ 	    rc = runLuaScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, &script->nextFileFunc);
+ 	}
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/rpm/files/0001-When-nice-value-cannot-be-reset-issue-a-notice-inste.patch b/meta/recipes-devtools/rpm/files/0001-When-nice-value-cannot-be-reset-issue-a-notice-inste.patch
new file mode 100644
index 00000000000..9648cac7c9b
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-When-nice-value-cannot-be-reset-issue-a-notice-inste.patch
@@ -0,0 +1,31 @@
+From d42ece6fa15b98d7f9221b90b85b78631df2c0a0 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 14 Feb 2017 13:51:19 +0200
+Subject: [PATCH] When nice value cannot be reset, issue a notice instead of a
+ warning
+
+Otherwise build logs on the autobuilder get very clutter, as it
+doesn't allow the nice value to be reset for some reason.
+
+Upstream-Status: Inappropriate [oe specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ lib/rpmscript.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/rpmscript.c b/lib/rpmscript.c
+index 5e1e99906..3975aead8 100644
+--- a/lib/rpmscript.c
++++ b/lib/rpmscript.c
+@@ -347,7 +347,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes,
+         int ret;
+         ret = setpriority(PRIO_PROCESS, 0, 0);
+         if (ret == -1) {
+-            rpmlog(RPMLOG_WARNING, _("Unable to reset nice value: %s"),
++            rpmlog(RPMLOG_NOTICE, _("Unable to reset nice value: %s\n"),
+                 strerror(errno));
+         }
+ 
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch b/meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch
new file mode 100644
index 00000000000..b3dbc319b6a
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch
@@ -0,0 +1,72 @@
+From 383c0b097b7eba16801a9e3c4b8e36a4b6de74ab Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 20 Jan 2017 13:33:05 +0200
+Subject: [PATCH 2/2] Add support for prefixing /etc from RPM_ETCCONFIGDIR
+ environment variable
+
+This is needed so that rpm can pick up target-specific configuration
+from target rootfs instead of its own native sysroot.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ lib/rpmrc.c | 19 ++++++++++++++-----
+ 1 file changed, 14 insertions(+), 5 deletions(-)
+
+diff --git a/lib/rpmrc.c b/lib/rpmrc.c
+index 19fe80f98..6b27b3941 100644
+--- a/lib/rpmrc.c
++++ b/lib/rpmrc.c
+@@ -455,10 +455,14 @@ const char * lookupInDefaultTable(const char * name,
+ static void setDefaults(void)
+ {
+     const char *confdir = rpmConfigDir();
++    const char *etcconfdir = getenv("RPM_ETCCONFIGDIR");
++    if (etcconfdir == NULL)
++        etcconfdir = "";
++
+     if (!defrcfiles) {
+ 	defrcfiles = rstrscat(NULL, confdir, "/rpmrc", ":",
+ 				confdir, "/" RPMCANONVENDOR "/rpmrc", ":",
+-				SYSCONFDIR "/rpmrc", ":");
++				etcconfdir, SYSCONFDIR "/rpmrc", ":", NULL);
+     }
+ 
+ #ifndef MACROFILES
+@@ -468,9 +472,9 @@ static void setDefaults(void)
+ 				confdir, "/platform/%{_target}/macros", ":",
+ 				confdir, "/fileattrs/*.attr", ":",
+   				confdir, "/" RPMCANONVENDOR "/macros", ":",
+-				SYSCONFDIR "/rpm/macros.*", ":",
+-				SYSCONFDIR "/rpm/macros", ":",
+-				SYSCONFDIR "/rpm/%{_target}/macros", ":");
++				etcconfdir, SYSCONFDIR "/rpm/macros.*", ":",
++				etcconfdir, SYSCONFDIR "/rpm/macros", ":",
++				etcconfdir, SYSCONFDIR "/rpm/%{_target}/macros", ":", NULL);
+     }
+ #else
+     macrofiles = MACROFILES;
+@@ -989,7 +993,11 @@ static void read_auxv(void)
+  */
+ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os)
+ {
+-    const char * const platform_path = SYSCONFDIR "/rpm/platform";
++    const char *etcconfdir = getenv("RPM_ETCCONFIGDIR");
++    if (etcconfdir == NULL)
++        etcconfdir = "";
++
++    const char * const platform_path = rstrscat(NULL, etcconfdir, SYSCONFDIR "/rpm/platform", NULL);
+     static struct utsname un;
+     char * chptr;
+     canonEntry canon;
+@@ -1286,6 +1294,7 @@ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os)
+ 
+     if (arch) *arch = un.machine;
+     if (os) *os = un.sysname;
++    free(platform_path);
+ }
+ 
+ static
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/rpm/rpm_git.bb b/meta/recipes-devtools/rpm/rpm_git.bb
new file mode 100644
index 00000000000..22a4e71a806
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm_git.bb
@@ -0,0 +1,108 @@
+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}-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_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."
+
+HOMEPAGE = "http://www.rpm.org"
+
+# libraries are also LGPL - how to express this?
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f5259151d26ff18e78023450a5ac8d96"
+
+SRC_URI = "git://github.com/rpm-software-management/rpm \
+           file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \
+           file://0001-Do-not-read-config-files-from-HOME.patch \
+           file://0001-When-cross-installing-execute-package-scriptlets-wit.patch \
+           file://0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch \
+           file://0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch \
+           file://0001-When-nice-value-cannot-be-reset-issue-a-notice-inste.patch \
+           file://0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch \
+           file://0001-Fix-build-with-musl-C-library.patch \
+           file://0001-Add-a-color-setting-for-mips64_n32-binaries.patch \
+           "
+
+PV = "4.13.90+git${SRCPV}"
+PE = "1"
+SRCREV = "a8e51b3bb05c6acb1d9b2e3d34f859ddda1677be"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "nss libarchive db file popt xz dbus elfutils python"
+DEPENDS_append_class-native = " file-replacement-native"
+
+inherit autotools gettext pkgconfig pythonnative
+
+# OE-core patches autoreconf to additionally run gnu-configize, which fails with this recipe
+EXTRA_AUTORECONF_append = " --exclude=gnu-configize"
+
+EXTRA_OECONF_append = " --without-lua --enable-python"
+EXTRA_OECONF_append_libc-musl = " --disable-nls"
+
+# --sysconfdir prevents rpm from attempting to access machine-specific configuration in sysroot/etc; we need to have it in rootfs
+#
+# --localstatedir prevents rpm from writing its database to native sysroot when building images
+#
+# Also disable plugins, so that rpm doesn't attempt to inhibit shutdown via session dbus
+EXTRA_OECONF_append_class-native = " --sysconfdir=/etc --localstatedir=/var --disable-plugins"
+
+BBCLASSEXTEND = "native"
+
+# Direct rpm-native to read configuration from our sysroot, not the one it was compiled in
+# libmagic also has sysroot path contamination, so override it
+do_install_append_class-native() {
+        create_wrapper ${D}/${bindir}/rpmbuild \
+                RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
+                RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
+                MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
+                RPM_NO_CHROOT_FOR_SCRIPTS=1
+
+        create_wrapper ${D}/${bindir}/rpmsign \
+                RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
+                RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
+                MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
+                RPM_NO_CHROOT_FOR_SCRIPTS=1
+
+        create_wrapper ${D}/${bindir}/rpmkeys \
+                RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
+                RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
+                MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
+                RPM_NO_CHROOT_FOR_SCRIPTS=1
+
+        create_wrapper ${D}/${bindir}/rpm \
+                RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
+                RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
+                MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
+                RPM_NO_CHROOT_FOR_SCRIPTS=1
+}
+
+
+# Rpm's make install creates var/tmp which clashes with base-files packaging
+do_install_append_class-target() {
+    rm -rf ${D}/var
+}
+
+FILES_${PN} += "${libdir}/rpm-plugins/*.so \
+               "
+
+FILES_${PN}-dev += "${libdir}/rpm-plugins/*.la \
+                    "
+
+PACKAGES += "python-rpm"
+PROVIDES += "python-rpm"
+FILES_python-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm/*"
+
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 07/44] rpm: remove 5.x recipe
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (5 preceding siblings ...)
  2017-03-10 11:23 ` [PATCH 06/44] rpm: add a 4.x recipe Alexander Kanavin
@ 2017-03-10 11:23 ` Alexander Kanavin
  2017-03-10 11:23 ` [PATCH 08/44] python-pygpgme: add a recipe Alexander Kanavin
                   ` (37 subsequent siblings)
  44 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:23 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 ...1-Disable-__sync_add_and_fetch_8-on-nios2.patch |   30 -
 .../rpm/rpm/0001-define-EM_AARCH64.patch           |   35 -
 .../0001-macros-add-_gpg_sign_cmd_extra_args.patch |   43 -
 .../rpm/rpm/0001-rpm-Fix-build-on-musl.patch       |  294 ------
 ...0001-system.h-query.c-support-nosignature.patch |   63 --
 ...arseArgvString-to-parse-the-_gpg_check_pa.patch |   49 -
 .../configure.ac-check-for-both-gpg2-and-gpg.patch |   29 -
 meta/recipes-devtools/rpm/rpm/dbconvert.patch      |   27 -
 meta/recipes-devtools/rpm/rpm/debugedit-segv.patch |  100 --
 ...debugedit-valid-file-to-fix-segment-fault.patch |   65 --
 meta/recipes-devtools/rpm/rpm/gcc6-stdlib.patch    |   54 -
 .../rpm/rpm/header-include-fix.patch               |   36 -
 .../rpm/rpm/makefile-am-exec-hook.patch            |   33 -
 .../rpm/rpm/no-ldflags-in-pkgconfig.patch          |   14 -
 meta/recipes-devtools/rpm/rpm/perfile_rpmdeps.sh   |   50 -
 .../rpm/popt-disable-auto-stack-protector.patch    |   27 -
 .../rpm/rpm/python-rpm-rpmsense.patch              |   31 -
 meta/recipes-devtools/rpm/rpm/pythondeps.sh        |   16 -
 meta/recipes-devtools/rpm/rpm/rpm-atomic-ops.patch |   73 --
 .../rpm/rpm/rpm-autogen-force.patch                |   78 --
 meta/recipes-devtools/rpm/rpm/rpm-autogen.patch    |   25 -
 meta/recipes-devtools/rpm/rpm/rpm-canonarch.patch  |  136 ---
 .../rpm/rpm-check-rootpath-reasonableness.patch    |   96 --
 meta/recipes-devtools/rpm/rpm/rpm-db-reduce.patch  |   19 -
 meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch |  174 ----
 meta/recipes-devtools/rpm/rpm/rpm-db60.patch       |   56 -
 .../rpm/rpm/rpm-db_buffer_small.patch              |   77 --
 .../rpm/rpm/rpm-debug-platform.patch               |   65 --
 .../rpm/rpm/rpm-disable-auto-stack-protector.patch |   24 -
 .../rpm/rpm/rpm-disable-blaketest.patch            |   28 -
 ...-ensure-rpm2cpio-call-rpm-relocation-code.patch |   25 -
 meta/recipes-devtools/rpm/rpm/rpm-fileclass.patch  |   36 -
 .../rpm/rpm/rpm-fix-logio-cp.patch                 |   30 -
 .../rpm-fix-lua-tests-compilation-failure.patch    |   43 -
 .../rpm/rpm/rpm-fix-parseEmbedded.patch            |   27 -
 meta/recipes-devtools/rpm/rpm/rpm-gnu-atomic.patch |   64 --
 .../rpm/rpm/rpm-hardlink-segfault-fix.patch        |   43 -
 .../rpm/rpm/rpm-keccak-sse-intrin.patch            |   27 -
 ...ction.c-fix-file-conflicts-for-mips64-N32.patch |   52 -
 meta/recipes-devtools/rpm/rpm/rpm-libsql-fix.patch |   22 -
 .../recipes-devtools/rpm/rpm/rpm-log-auto-rm.patch |   15 -
 .../rpm/rpm/rpm-lsb-compatibility.patch            |   24 -
 meta/recipes-devtools/rpm/rpm/rpm-lua.patch        |   33 -
 ...rpm-macros.in-disable-external-key-server.patch |   31 -
 meta/recipes-devtools/rpm/rpm/rpm-macros.patch     |   64 --
 .../rpm/rpm/rpm-mongodb-sasl.patch                 |   69 --
 meta/recipes-devtools/rpm/rpm/rpm-no-loopmsg.patch |   19 -
 .../rpm/rpm/rpm-no-perl-urpm.patch                 |   47 -
 ...b-before-verifyscript-to-avoid-null-point.patch |   24 -
 meta/recipes-devtools/rpm/rpm/rpm-ossp-uuid.patch  |   23 -
 .../rpm/rpm/rpm-packageorigin.patch                |   25 -
 .../rpm/rpm/rpm-payload-use-hashed-inode.patch     |  126 ---
 .../rpm/rpm/rpm-pkgconfigdeps.patch                |   37 -
 .../rpm/rpm/rpm-platform-file-fix.patch            |   28 -
 meta/recipes-devtools/rpm/rpm/rpm-platform.patch   |  137 ---
 meta/recipes-devtools/rpm/rpm/rpm-platform2.patch  |  105 --
 meta/recipes-devtools/rpm/rpm/rpm-py-init.patch    |   29 -
 .../rpm/rpm/rpm-python-AddErase.patch              |   35 -
 .../rpm/rpm/rpm-python-restore-origin.patch        |   49 -
 .../rpm/rpm/rpm-python-tagname.patch               |   24 -
 meta/recipes-devtools/rpm/rpm/rpm-realpath.patch   |   24 -
 .../rpm/rpm/rpm-reloc-macros.patch                 |   31 -
 meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch |   40 -
 .../rpm/rpm/rpm-rpmdb-grammar.patch                |  124 ---
 .../rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch   |   34 -
 .../rpm/rpm/rpm-rpmio-headers.patch                |   19 -
 .../recipes-devtools/rpm/rpm/rpm-rpmpgp-popt.patch |   26 -
 .../rpm/rpm/rpm-scriptletexechelper.patch          |  159 ---
 meta/recipes-devtools/rpm/rpm/rpm-showrc.patch     |   26 -
 .../rpm/rpm/rpm-syck-fix-gram.patch                | 1081 --------------------
 .../rpm-tag-generate-endian-conversion-fix.patch   |   50 -
 .../rpm/rpm/rpm-tagname-type.patch                 |   25 -
 .../rpm/rpm/rpm-tools-mtree-LDFLAGS.patch          |   24 -
 .../rpm/rpm/rpm-uuid-include.patch                 |   40 -
 meta/recipes-devtools/rpm/rpm/rpm2cpio             |   39 -
 meta/recipes-devtools/rpm/rpm/rpmatch.patch        |   34 -
 ...more-verbose-error-logging-in-rpmTempFile.patch |   31 -
 .../rpmdb-prevent-race-in-tmpdir-creation.patch    |   41 -
 meta/recipes-devtools/rpm/rpm/rpmdeps-oecore.patch |  194 ----
 ...heck-_gpg_passphrase-before-ask-for-input.patch |   70 --
 .../recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch |   50 -
 meta/recipes-devtools/rpm/rpm/uclibc-support.patch |   63 --
 meta/recipes-devtools/rpm/rpm_5.4.16.bb            |  712 -------------
 83 files changed, 6097 deletions(-)
 delete mode 100644 meta/recipes-devtools/rpm/rpm/0001-Disable-__sync_add_and_fetch_8-on-nios2.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/0001-define-EM_AARCH64.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/0001-macros-add-_gpg_sign_cmd_extra_args.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/0001-rpm-Fix-build-on-musl.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/0001-system.h-query.c-support-nosignature.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/configure.ac-check-for-both-gpg2-and-gpg.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/dbconvert.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/debugedit-segv.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/debugedit-valid-file-to-fix-segment-fault.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/gcc6-stdlib.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/header-include-fix.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/makefile-am-exec-hook.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/no-ldflags-in-pkgconfig.patch
 delete mode 100755 meta/recipes-devtools/rpm/rpm/perfile_rpmdeps.sh
 delete mode 100644 meta/recipes-devtools/rpm/rpm/popt-disable-auto-stack-protector.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/python-rpm-rpmsense.patch
 delete mode 100755 meta/recipes-devtools/rpm/rpm/pythondeps.sh
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-atomic-ops.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-autogen-force.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-autogen.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-canonarch.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-check-rootpath-reasonableness.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-db-reduce.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-db60.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-db_buffer_small.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-debug-platform.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-disable-auto-stack-protector.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-disable-blaketest.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-ensure-rpm2cpio-call-rpm-relocation-code.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-fileclass.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-fix-logio-cp.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-fix-lua-tests-compilation-failure.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-fix-parseEmbedded.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-gnu-atomic.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-hardlink-segfault-fix.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-keccak-sse-intrin.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-libsql-fix.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-log-auto-rm.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-lsb-compatibility.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-lua.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-macros.in-disable-external-key-server.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-macros.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-mongodb-sasl.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-no-loopmsg.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-no-perl-urpm.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-opendb-before-verifyscript-to-avoid-null-point.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-ossp-uuid.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-packageorigin.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-payload-use-hashed-inode.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-pkgconfigdeps.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-platform-file-fix.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-platform.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-platform2.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-py-init.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-python-AddErase.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-python-restore-origin.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-python-tagname.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-realpath.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-reloc-macros.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-rpmdb-grammar.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-rpmio-headers.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-popt.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-showrc.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-syck-fix-gram.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-tag-generate-endian-conversion-fix.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-tagname-type.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-tools-mtree-LDFLAGS.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-uuid-include.patch
 delete mode 100755 meta/recipes-devtools/rpm/rpm/rpm2cpio
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpmatch.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpmdb-more-verbose-error-logging-in-rpmTempFile.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpmdb-prevent-race-in-tmpdir-creation.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpmdeps-oecore.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpmqv.c-check-_gpg_passphrase-before-ask-for-input.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm/uclibc-support.patch
 delete mode 100644 meta/recipes-devtools/rpm/rpm_5.4.16.bb

diff --git a/meta/recipes-devtools/rpm/rpm/0001-Disable-__sync_add_and_fetch_8-on-nios2.patch b/meta/recipes-devtools/rpm/rpm/0001-Disable-__sync_add_and_fetch_8-on-nios2.patch
deleted file mode 100644
index e9b73b8bfc3..00000000000
--- a/meta/recipes-devtools/rpm/rpm/0001-Disable-__sync_add_and_fetch_8-on-nios2.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 06967a50f20095f5ca30b8214f4c98ba0f5262bf Mon Sep 17 00:00:00 2001
-From: Marek Vasut <marex@denx.de>
-Date: Sun, 3 Apr 2016 06:55:25 +0200
-Subject: [PATCH] Disable __sync_add_and_fetch_8 on nios2
-
-The NIOS2 softcore does not implement the __sync_add_and_fetch_8,
-so disable it accordingly.
-
-Signed-off-by: Marek Vasut <marex@denx.de>
-Upstream-Status: Submitted
----
- rpmio/bson.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/rpmio/bson.h b/rpmio/bson.h
-index 57023f1..60c7d02 100644
---- a/rpmio/bson.h
-+++ b/rpmio/bson.h
-@@ -880,7 +880,7 @@ BSON_END_DECLS
- BSON_BEGIN_DECLS
- 
- /* Some architectures do not support __sync_add_and_fetch_8 */
--#if (__mips == 32) || (defined(__PPC__) && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8))
-+#if (__mips == 32) || (__nios2__) || (defined(__PPC__) && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8))
- # define __BSON_NEED_ATOMIC_64 1
- #endif
- 
--- 
-2.8.0.rc3
-
diff --git a/meta/recipes-devtools/rpm/rpm/0001-define-EM_AARCH64.patch b/meta/recipes-devtools/rpm/rpm/0001-define-EM_AARCH64.patch
deleted file mode 100644
index c9fb2686876..00000000000
--- a/meta/recipes-devtools/rpm/rpm/0001-define-EM_AARCH64.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-[PATCH] define EM_AARCH64
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-EM_AARCH64 maybe not be defined due to old version elf.h, and lead to
-that debugedit can not work on aarch64 elf object files, since there is
-no other dependence, except these two macro, define them to make
-debugedit work on aarch64 elf files.
-
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
----
- tools/debugedit.c | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/tools/debugedit.c b/tools/debugedit.c
-index de693ed..d16a641 100644
---- a/tools/debugedit.c
-+++ b/tools/debugedit.c
-@@ -35,6 +35,13 @@
- 
- #include <gelf.h>
- 
-+#ifndef EM_AARCH64
-+#define EM_AARCH64      183             /* ARM AARCH64 */
-+#endif
-+#ifndef R_AARCH64_ABS32
-+#define R_AARCH64_ABS32 258
-+#endif 
-+
- /* some defines taken from the dwarf standard */
- 
- #define DW_TAG_compile_unit	0x11
--- 
-1.9.1
-
diff --git a/meta/recipes-devtools/rpm/rpm/0001-macros-add-_gpg_sign_cmd_extra_args.patch b/meta/recipes-devtools/rpm/rpm/0001-macros-add-_gpg_sign_cmd_extra_args.patch
deleted file mode 100644
index eb43a873465..00000000000
--- a/meta/recipes-devtools/rpm/rpm/0001-macros-add-_gpg_sign_cmd_extra_args.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From fa9726ff69f86d6a87c4c4bd7e3d2881999a872a Mon Sep 17 00:00:00 2001
-From: Markus Lehtonen <markus.lehtonen@linux.intel.com>
-Date: Thu, 23 Feb 2017 11:14:20 +0200
-Subject: [PATCH] macros: add %_gpg_sign_cmd_extra_args
-
-Similar to what rpm4 has. This macro can be used to customize the
-gpg command line options when signing packages. This is needed for
-gpg 2.1 which requires "--pinentry-mode loopback" to allow
-non-interactive signing.
-
-Upstream-Status: Pending
-
-Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
----
- macros/macros.in | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/macros/macros.in b/macros/macros.in
-index 8bc5840..fda3c66 100644
---- a/macros/macros.in
-+++ b/macros/macros.in
-@@ -524,7 +524,9 @@ $_arbitrary_tags_tests	Foo:Bar
- %_gpg_passphrase_way %{?_gpg_passphrase:--passphrase "%{_gpg_passphrase}"}%{!?_gpg_passphrase:--passphrase-fd 3}
- 
- %__gpg_check_password_cmd	%{__gpg} \
--	gpg --batch --no-verbose %{_gpg_passphrase_way} -u "%{_gpg_name}" -so -
-+	gpg --batch --no-verbose %{_gpg_passphrase_way} \
-+	%{?_gpg_sign_cmd_extra_args:%{_gpg_sign_cmd_extra_args}} \
-+	-u "%{_gpg_name}" -so -
- #%__pgp_check_password_cmd	%{__pgp} \
- #	pgp +batchmode=on +verbose=0 "%{_pgp_name}" -sf
- #%__pgp5_check_password_cmd	%{__pgp} \
-@@ -532,6 +534,7 @@ $_arbitrary_tags_tests	Foo:Bar
- 
- %__gpg_sign_cmd			%{__gpg} \
- 	gpg --batch --no-verbose --no-armor %{_gpg_passphrase_way}  --no-secmem-warning \
-+	%{?_gpg_sign_cmd_extra_args:%{_gpg_sign_cmd_extra_args}} \
- 	-u "%{_gpg_name}" -sbo %{__signature_filename} %{__plaintext_filename}
- #%__pgp_sign_cmd			%{__pgp} \
- #	pgp +batchmode=on +verbose=0 +armor=off \
--- 
-2.10.2
-
diff --git a/meta/recipes-devtools/rpm/rpm/0001-rpm-Fix-build-on-musl.patch b/meta/recipes-devtools/rpm/rpm/0001-rpm-Fix-build-on-musl.patch
deleted file mode 100644
index 70dd4ff532c..00000000000
--- a/meta/recipes-devtools/rpm/rpm/0001-rpm-Fix-build-on-musl.patch
+++ /dev/null
@@ -1,294 +0,0 @@
-From 0af17c2ae86c1e8e42b96f6dface08f535bb55ad Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 14 Feb 2016 08:33:24 +0000
-Subject: [PATCH] rpm: Fix build on musl
-
-Provide alternatives to assumptions about glibc
-on linux
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Updated to 5.4.16 (CVS)
-
-The patch will likely need additional rework before it can be accepted upsteam
-due to the way MUSL changes are patched in.
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
----
-Upstream-Status: Pending
-
- lib/poptALL.c          |    2 ++
- rpmio/fts.c            |    4 ++++
- rpmio/poptIO.c         |    2 ++
- rpmqv.c                |    2 ++
- system.h               |   13 ++++++-------
- tools/debugedit.c      |   47 +++++++++++++++++++++++++++++++++++++++++++++++
- tools/rpm2cpio.c       |    2 ++
- tools/rpmcache.c       |    2 ++
- tools/rpmcmp.c         |    2 ++
- tools/rpmdeps-oecore.c |    2 ++
- tools/rpmdeps.c        |    2 ++
- tools/rpmdigest.c      |    2 ++
- tools/rpmfind.c        |    6 +++---
- 13 files changed, 78 insertions(+), 10 deletions(-)
-
-Index: rpm-5.4.15/rpmio/fts.c
-===================================================================
---- rpm-5.4.15.orig/rpmio/fts.c
-+++ rpm-5.4.15/rpmio/fts.c
-@@ -124,6 +124,10 @@ static char sccsid[] = "@(#)fts.c	8.6 (B
- #   define __fxstat64(_stat_ver, _fd, _sbp)    fstat((_fd), (_sbp))
- #endif
- 
-+#ifndef _STAT_VER
-+#   define _STAT_VER      0
-+#endif
-+
- #if !defined(_D_EXACT_NAMLEN)
- #   define _D_EXACT_NAMLEN(d) (strlen((d)->d_name))
- #endif
-Index: rpm-5.4.15/tools/debugedit.c
-===================================================================
---- rpm-5.4.15.orig/tools/debugedit.c
-+++ rpm-5.4.15/tools/debugedit.c
-@@ -22,7 +22,12 @@
- #include <byteswap.h>
- #include <endian.h>
- #include <errno.h>
-+#ifdef __GLIBC__
- #include <error.h>
-+#else
-+#include <stdarg.h>
-+void error(int, int, const char *, ...);
-+#endif
- #include <limits.h>
- #include <string.h>
- #include <stdlib.h>
-@@ -1535,6 +1540,48 @@ handle_build_id (DSO *dso, Elf_Data *bui
-     puts (hex);
-   }
- }
-+#ifndef __GLIBC__
-+extern char *__progname;
-+
-+void (*error_print_progname)(void) = 0;
-+unsigned int error_message_count = 0;
-+int error_one_per_line = 0;
-+
-+static void eprint(int status, int e, const char *file, unsigned int line, const char *fmt, va_list ap)
-+{
-+       if (file && error_one_per_line) {
-+               static const char *oldfile;
-+               static unsigned int oldline;
-+               if (line == oldline && strcmp(file, oldfile) == 0)
-+                       return;
-+               oldfile = file;
-+               oldline = line;
-+       }
-+       if (error_print_progname)
-+               error_print_progname();
-+       else
-+               fprintf(stderr, "%s: ", __progname);
-+       if (file)
-+               fprintf(stderr, "%s:%u: ", file, line);
-+       vfprintf(stderr, fmt, ap);
-+      if (e)
-+               fprintf(stderr, ": %s", strerror(e));
-+       putc('\n', stderr);
-+       fflush(stderr);
-+       error_message_count++;
-+       if (status)
-+               exit(status);
-+}
-+
-+void error(int status, int e, const char *fmt, ...)
-+{
-+       va_list ap;
-+       va_start(ap,fmt);
-+       eprint(status, e, 0, 0, fmt, ap);
-+       va_end(ap);
-+}
-+
-+#endif
- 
- /* It avoided the segment fault while file's bss offset have a large number.
-    See https://bugzilla.redhat.com/show_bug.cgi?id=1019707
-Index: rpm-5.4.15/tools/rpmfind.c
-===================================================================
---- rpm-5.4.15.orig/tools/rpmfind.c
-+++ rpm-5.4.15/tools/rpmfind.c
-@@ -1175,7 +1175,7 @@ find_parsenum(PLAN *plan, const char *op
-      * and endchar points to the beginning of the string we know we have
-      * a syntax error.
-      */
--#if defined(__sun)
-+#if defined(__sun) || !defined(__GLIBC_)
-     value = strtoll(str, &endchar, 10);
- #else
-     value = strtoq(str, &endchar, 10);
-@@ -1215,7 +1215,7 @@ find_parsetime(PLAN *plan, const char *o
- 	break;
-     }
- 
--#if defined(__sun)
-+#if defined(__sun) || !defined(__GLIBC_)
-     value = strtoll(str, &unit, 10);
- #else
-     value = strtoq(str, &unit, 10);
-@@ -1253,7 +1253,7 @@ find_parsetime(PLAN *plan, const char *o
- 	str = unit + 1;
- 	if (*str == '\0')	/* EOS */
- 	    break;
--#if defined(__sun)
-+#if defined(__sun) || !defined(__GLIBC_)
- 	value = strtoll(str, &unit, 10);
- #else
- 	value = strtoq(str, &unit, 10);
-Index: rpm-5.4.15/system.h
-===================================================================
---- rpm-5.4.15.orig/system.h
-+++ rpm-5.4.15/system.h
-@@ -372,16 +372,15 @@ extern int _tolower(int) __THROW	/*@*/;
- #define	__progname	__assert_program_name
- #endif
- #define	setprogname(pn)
-+/*@unchecked@*/
-+extern const char *__progname;
- #else
--#define	__progname	program_name
--#define	setprogname(pn)	\
--  { if ((__progname = strrchr(pn, '/')) != NULL) __progname++; \
--    else __progname = pn;		\
--  }
--#endif
-+#define	setprogname(pn)
-+#define	progname	__progname
- 
- /*@unchecked@*/
--extern const char *__progname;
-+extern char *__progname;
-+#endif
- 
- /* -- Retrofit missing prototypes (if needed). */
- #ifdef __cplusplus
-Index: rpm-5.4.15/rpmio/poptIO.c
-===================================================================
---- rpm-5.4.15.orig/rpmio/poptIO.c
-+++ rpm-5.4.15/rpmio/poptIO.c
-@@ -65,7 +65,9 @@ extern int _rpmsvn_debug;
- GENfree(rpmioP)
- #endif	/* __cplusplus */
- 
-+#ifdef __GLIBC__
- const char *__progname;
-+#endif
- 
- #if !defined(POPT_ARGFLAG_TOGGLE)	/* XXX compat with popt < 1.15 */
- #define	POPT_ARGFLAG_TOGGLE	0
-Index: rpm-5.4.15/lib/poptALL.c
-===================================================================
---- rpm-5.4.15.orig/lib/poptALL.c
-+++ rpm-5.4.15/lib/poptALL.c
-@@ -4,7 +4,9 @@
-  */
- 
- #include "system.h"
-+#ifdef __GLIBC__
- extern const char *__progname;
-+#endif
- 
- #if defined(RPM_VENDOR_WINDRIVER)
- const char *__usrlibrpm = USRLIBRPM;
-Index: rpm-5.4.15/tools/rpm2cpio.c
-===================================================================
---- rpm-5.4.15.orig/tools/rpm2cpio.c
-+++ rpm-5.4.15/tools/rpm2cpio.c
-@@ -1,7 +1,9 @@
- /* rpmarchive: spit out the main archive portion of a package */
- 
- #include "system.h"
-+#ifdef __GLIBC__
- const char *__progname;
-+#endif
- 
- #include <rpmio.h>
- #include <rpmiotypes.h>	/* XXX fnpyKey */
-Index: rpm-5.4.15/tools/rpmcache.c
-===================================================================
---- rpm-5.4.15.orig/tools/rpmcache.c
-+++ rpm-5.4.15/tools/rpmcache.c
-@@ -3,7 +3,9 @@
-  */
- 
- #include "system.h"
-+#ifdef __GLIBC__
- const char *__progname;
-+#endif
- 
- #include <fnmatch.h>
- #include <fts.h>
-Index: rpm-5.4.15/tools/rpmdeps-oecore.c
-===================================================================
---- rpm-5.4.15.orig/tools/rpmdeps-oecore.c
-+++ rpm-5.4.15/tools/rpmdeps-oecore.c
-@@ -1,5 +1,7 @@
- #include "system.h"
-+#ifdef __GLIBC__
- const char *__progname;
-+#endif
- 
- #include <rpmio.h>
- #include <rpmiotypes.h>
-Index: rpm-5.4.15/tools/rpmdeps.c
-===================================================================
---- rpm-5.4.15.orig/tools/rpmdeps.c
-+++ rpm-5.4.15/tools/rpmdeps.c
-@@ -1,5 +1,7 @@
- #include "system.h"
-+#ifdef __GLIBC__
- const char *__progname;
-+#endif
- 
- #include <rpmio.h>
- #include <rpmiotypes.h>
-Index: rpm-5.4.15/tools/rpmdigest.c
-===================================================================
---- rpm-5.4.15.orig/tools/rpmdigest.c
-+++ rpm-5.4.15/tools/rpmdigest.c
-@@ -1,6 +1,8 @@
- #include "system.h"
-+#ifdef __GLIBC__
- /*@unchecked@*/
- extern const char * __progname;
-+#endif
- 
- #define	_RPMIOB_INTERNAL
- #include <rpmiotypes.h>
-Index: rpm-5.4.15/tools/rpmcmp.c
-===================================================================
---- rpm-5.4.15.orig/tools/rpmcmp.c
-+++ rpm-5.4.15/tools/rpmcmp.c
-@@ -13,8 +13,10 @@
- 
- #include "debug.h"
- 
-+#ifdef __GLIBC__
- const char *__progname;
- #define	progname	__progname
-+#endif
- 
- static int pointRpmEVR(ARGV_t av)
- {
-Index: rpm-5.4.15/rpmqv.c
-===================================================================
---- rpm-5.4.15.orig/rpmqv.c
-+++ rpm-5.4.15/rpmqv.c
-@@ -1,5 +1,7 @@
- #include "system.h"
-+#ifdef __GLIBC__
- extern const char *__progname;
-+#endif
- 
- /* Copyright (C) 1998-2002 - Red Hat, Inc. */
- 
diff --git a/meta/recipes-devtools/rpm/rpm/0001-system.h-query.c-support-nosignature.patch b/meta/recipes-devtools/rpm/rpm/0001-system.h-query.c-support-nosignature.patch
deleted file mode 100644
index 77dc5b67d22..00000000000
--- a/meta/recipes-devtools/rpm/rpm/0001-system.h-query.c-support-nosignature.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From d8fcc3cbeec4defb5babde5bd09ea294dd3fd08b Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Sun, 3 Jul 2016 19:01:59 -0700
-Subject: [PATCH] system.h/query.c: support nosignature
-
-* Define SUPPORT_NOSIGNATURES to 1 in system.h
-* !QVA_ISSET(qva->qva_flags, SIGNATURE) -> QVA_ISSET(qva->qva_flags, SIGNATURE),
-  otherwise, when use --nosignature would read database and verify
-  signature, this is not expected.
-
-Upstream-Status: Submitted [Sent email to rpm-devel@rpm5.org]
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- lib/query.c | 6 +++---
- system.h    | 4 ++--
- 2 files changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/lib/query.c b/lib/query.c
-index 50a7453..b761d76 100644
---- a/lib/query.c
-+++ b/lib/query.c
-@@ -954,19 +954,19 @@ JBJDEBUG((stderr, "--> %s(%p,%p,%p)\n", __FUNCTION__, ts, qva, argv));
-     vsflags = (rpmVSFlags) rpmExpandNumeric("%{?_vsflags_query}");
-     vsflags = (rpmVSFlags) 0;	/* XXX FIXME: ignore default disablers. */
- #if defined(SUPPORT_NOSIGNATURES)
--    if (!QVA_ISSET(qva->qva_flags, DIGEST)) {
-+    if (QVA_ISSET(qva->qva_flags, DIGEST)) {
- 	VSF_SET(vsflags, NOSHA1HEADER);
- 	VSF_SET(vsflags, NOMD5HEADER);
- 	VSF_SET(vsflags, NOSHA1);
- 	VSF_SET(vsflags, NOMD5);
-     }
--    if (!QVA_ISSET(qva->qva_flags, SIGNATURE)) {
-+    if (QVA_ISSET(qva->qva_flags, SIGNATURE)) {
- 	VSF_SET(vsflags, NODSAHEADER);
- 	VSF_SET(vsflags, NORSAHEADER);
- 	VSF_SET(vsflags, NODSA);
- 	VSF_SET(vsflags, NORSA);
-     }
--    if (!QVA_ISSET(qva->qva_flags, HDRCHK)) {
-+    if (QVA_ISSET(qva->qva_flags, HDRCHK)) {
- 	VSF_SET(vsflags, NOHDRCHK);
-     }
-     VSF_CLR(vsflags, NEEDPAYLOAD);	/* XXX needed? */
-diff --git a/system.h b/system.h
-index 2ff8906..ad4619a 100644
---- a/system.h
-+++ b/system.h
-@@ -787,9 +787,9 @@ static inline const char *rcsid(const char *p) { \
- #define SUPPORT_I18NSTRING_TYPE	1
- 
- /**
-- * Eliminate signature/digest disablers.
-+ * Signature/digest disablers.
-  */
--#undef	SUPPORT_NOSIGNATURES
-+#define SUPPORT_NOSIGNATURES 1
- 
- /**
-  * Permit ar(1) payloads. Disabled while rpmio/iosm.c is under development.
--- 
-2.9.0
diff --git a/meta/recipes-devtools/rpm/rpm/0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch b/meta/recipes-devtools/rpm/rpm/0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch
deleted file mode 100644
index 7128250093b..00000000000
--- a/meta/recipes-devtools/rpm/rpm/0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 64851c6622aff64787a9fcea26cccde183b7c743 Mon Sep 17 00:00:00 2001
-From: "Roy.Li" <rongqing.li@windriver.com>
-Date: Tue, 11 Nov 2014 16:28:22 +0800
-Subject: [PATCH] using poptParseArgvString to parse the
- _gpg_check_password_cmd
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Both __gpg_check_password_cmd and __gpg_sign_cmd include "%{_gpg_name}", but
-strace shows that gpg_name has a quote when run _gpg_check_password,
-but not when run __gpg_sign_cmd; for example, if gpg_name is "tester"
-
-    execve("/usr/bin/gpg", ["gpg", "--batch", "--no-verbose",
-    "--passphrase-fd", "3", "-u", "\"tester\"", "-so", "-"], [/* 20 vars */]) = 0
-
-    execve("/usr/bin/gpg", ["gpg", "--batch", "--no-verbose", "--no-armor",
-    "--passphrase-fd", "3", "--no-secmem-warning", "-u", "tester", "-sbo"..,) = 0
-
-it can be fixed by removing the quote around %{gpg_name} when define
-__gpg_check_password_cmd in macros/macros, like below, but if gpg_name includes
-space, it will not work.
-
-     %__gpg_check_password_cmd       %{__gpg} \
-        gpg --batch --no-verbose --passphrase-fd 3 -u %{_gpg_name} -so -
-
-The poptParseArgvString function is used to parse _gpg_sign_cmd, so using
-poptParseArgvString to parse __gpg_check_password_cmd to fix this issue.
-
-Signed-off-by: Roy.Li <rongqing.li@windriver.com>
----
- rpmdb/signature.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/rpmdb/signature.c b/rpmdb/signature.c
-index c35e0ab..016e8d1 100644
---- a/rpmdb/signature.c
-+++ b/rpmdb/signature.c
-@@ -529,7 +529,7 @@ int rpmCheckPassPhrase(const char * passPhrase)
-   		(void) setenv("GNUPGHOME", gpg_path, 1);
- 
- 	    cmd = rpmExpand("%{?__gpg_check_password_cmd}", NULL);
--	    rc = argvSplit(&av, cmd, NULL);
-+	    rc = poptParseArgvString(cmd, NULL, (const char ***)&av);
- 	    if (!rc)
- 		rc = execve(av[0], (char *const *)av+1, environ);
- 
--- 
-1.9.1
-
diff --git a/meta/recipes-devtools/rpm/rpm/configure.ac-check-for-both-gpg2-and-gpg.patch b/meta/recipes-devtools/rpm/rpm/configure.ac-check-for-both-gpg2-and-gpg.patch
deleted file mode 100644
index 7894a4263d6..00000000000
--- a/meta/recipes-devtools/rpm/rpm/configure.ac-check-for-both-gpg2-and-gpg.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-configure.ac: search for both gpg2 and gpg
-
-On some platforms the GnuPG binary is named 'gpg2' whereas others have 'gpg'.
-This patch increases compatibility by searching for 'gpg' in addition to
-'gpg2'.
-
-Upstream-Status: Pending
-
-Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 6746b4c..f6922ae 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -562,7 +562,7 @@ AC_PATH_PROG(__DIFF, diff, /bin/diff, $MYPATH)
- AC_PATH_PROG(__DITTO, ditto, %{_bindir}/ditto, $MYPATH)
- AC_PATH_PROG(__FILE, file, %{_bindir}/file, $MYPATH)
- AC_PATH_PROG(__GIT, git, %{_bindir}/git, $MYPATH)
--AC_PATH_PROG(__GPG, gpg2, %{_bindir}/gpg2, $MYPATH)
-+AC_PATH_PROGS(__GPG, [gpg2 gpg], %{_bindir}/gpg2, $MYPATH)
- AC_PATH_PROG(__GSR, gsr, %{_bindir}/gsr, $MYPATH)
- AC_PATH_PROG(__GST_INSPECT, gst-inspect-0.10, %{_bindir}/gst-inspect-0.10, $MYPATH)
- AC_PATH_PROG(__GZIP, gzip, /bin/gzip, $MYPATH)
--- 
-2.1.4
-
diff --git a/meta/recipes-devtools/rpm/rpm/dbconvert.patch b/meta/recipes-devtools/rpm/rpm/dbconvert.patch
deleted file mode 100644
index 1fdbf0908a7..00000000000
--- a/meta/recipes-devtools/rpm/rpm/dbconvert.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Upstream-Status: Inappropriate
-
-Hack to prevent unneeded demo app from building on older libc
-where it will break the build
-
-Index: rpm-5.4.14/tools/Makefile.am
-===================================================================
---- rpm-5.4.14.orig/tools/Makefile.am
-+++ rpm-5.4.14/tools/Makefile.am
-@@ -29,7 +29,7 @@ EXTRA_PROGRAMS = nix-copy-closure nix-en
- 	xiu-instantiate xiu-store
- noinst_PROGRAMS =
- 
--EXTRA_PROGRAMS += augtool cudftool dbconvert debugedit \
-+EXTRA_PROGRAMS += augtool cudftool debugedit \
- 	nix-build nix-channel nix-collect-garbage \
- 	nix-log2xml nix-prefetch-url nix-pull nix-push \
- 	xiu-echo xiu-hash \
-@@ -64,7 +64,7 @@ pkgbin_PROGRAMS =	\
- 	rpmcache rpmdigest rpmrepo rpmspecdump \
- 	rpmcmp rpmdeps rpmdeps-oecore sqlite3 @WITH_KEYUTILS_RPMKEY@ @WITH_LIBELF_DEBUGEDIT@
- if WITH_DB
--pkgbin_PROGRAMS +=	dbconvert
-+pkgbin_PROGRAMS +=	
- endif
- dist_man_MANS =		rpmgrep.1
- 
diff --git a/meta/recipes-devtools/rpm/rpm/debugedit-segv.patch b/meta/recipes-devtools/rpm/rpm/debugedit-segv.patch
deleted file mode 100644
index c83c8b5f3fc..00000000000
--- a/meta/recipes-devtools/rpm/rpm/debugedit-segv.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-During the recalculation of the buildid, it's necessary to change the word
-back to the original endian.  However, if we do this in-place, we've also
-affected the headers that we're also working on.  The side effect of this is
-we can no longer rely on 'sh_type' as it may have been changed.
-
-This patch ensures that any time we translate the loaded data to the machine
-format, we only do it in a backup copy and never the original copy.
-
-Note: in all other places a backup copy was used, just not buildid processing.
-
-Also the process (...) function was modified to verify the data is not
-NULL as well.  This is an extra check and is not strictly necessary.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm/tools/debugedit.c
-===================================================================
---- rpm.orig/tools/debugedit.c
-+++ rpm/tools/debugedit.c
-@@ -1403,7 +1403,8 @@ static inline void process (hashFunction
- 		const void *data, size_t size)
- {
-     memchunk chunk = { .data = (void *) data, .size = size };
--    hashFunctionContextUpdateMC (ctx, &chunk);
-+    if (data != NULL && size != 0)
-+      hashFunctionContextUpdateMC (ctx, &chunk);
- }
- 
- /* Compute a fresh build ID bit-string from the editted file contents.  */
-@@ -1456,14 +1457,16 @@ handle_build_id (DSO *dso, Elf_Data *bui
-       GElf_Ehdr ehdr;
-       GElf_Phdr phdr;
-       GElf_Shdr shdr;
--    } u;
--    Elf_Data x = { .d_version = EV_CURRENT, .d_buf = &u };
--
--    x.d_type = ELF_T_EHDR;
--    x.d_size = sizeof u.ehdr;
--    u.ehdr = dso->ehdr;
--    u.ehdr.e_phoff = u.ehdr.e_shoff = 0;
--    if (elf64_xlatetom (&x, &x, dso->ehdr.e_ident[EI_DATA]) == NULL)
-+    } u1, u2;
-+    Elf_Data src  = { .d_version = EV_CURRENT, .d_buf = &u1 };
-+    Elf_Data dest = { .d_version = EV_CURRENT, .d_buf = &u2 };
-+
-+    src.d_type = ELF_T_EHDR;
-+    src.d_size = sizeof u1.ehdr;
-+    dest.d_size = sizeof u2.ehdr;
-+    u1.ehdr = dso->ehdr;
-+    u1.ehdr.e_phoff = u1.ehdr.e_shoff = 0;
-+    if (elf64_xlatetom (&dest, &src, dso->ehdr.e_ident[EI_DATA]) == NULL)
-       {
-       bad:
- 	fprintf (stderr, "Failed to compute header checksum: %s\n",
-@@ -1471,29 +1474,31 @@ handle_build_id (DSO *dso, Elf_Data *bui
- 	exit (1);
-       }
- 
--    x.d_type = ELF_T_PHDR;
--    x.d_size = sizeof u.phdr;
-+    src.d_type = ELF_T_PHDR;
-+    src.d_size = sizeof u1.phdr;
-+    dest.d_size = sizeof u2.phdr;
-     for (i = 0; i < dso->ehdr.e_phnum; ++i)
-       {
--	if (gelf_getphdr (dso->elf, i, &u.phdr) == NULL)
-+	if (gelf_getphdr (dso->elf, i, &u1.phdr) == NULL)
- 	  goto bad;
--	if (elf64_xlatetom (&x, &x, dso->ehdr.e_ident[EI_DATA]) == NULL)
-+	if (elf64_xlatetom (&dest, &src, dso->ehdr.e_ident[EI_DATA]) == NULL)
- 	  goto bad;
--	process (&ctx, x.d_buf, x.d_size);
-+	process (&ctx, dest.d_buf, dest.d_size);
-       }
- 
--    x.d_type = ELF_T_SHDR;
--    x.d_size = sizeof u.shdr;
-+    src.d_type = ELF_T_SHDR;
-+    src.d_size = sizeof u1.shdr;
-+    dest.d_size = sizeof u2.shdr;
-     for (i = 0; i < dso->ehdr.e_shnum; ++i)
-       if (dso->scn[i] != NULL)
- 	{
--	  u.shdr = dso->shdr[i];
--	  u.shdr.sh_offset = 0;
--	  if (elf64_xlatetom (&x, &x, dso->ehdr.e_ident[EI_DATA]) == NULL)
-+	  u1.shdr = dso->shdr[i];
-+	  u1.shdr.sh_offset = 0;
-+	  if (elf64_xlatetom (&dest, &src, dso->ehdr.e_ident[EI_DATA]) == NULL)
- 	    goto bad;
--	  process (&ctx, x.d_buf, x.d_size);
-+	  process (&ctx, dest.d_buf, dest.d_size);
- 
--	  if (u.shdr.sh_type != SHT_NOBITS)
-+	  if (u1.shdr.sh_type != SHT_NOBITS)
- 	    {
- 	      Elf_Data *d = elf_rawdata (dso->scn[i], NULL);
- 	      if (d == NULL)
diff --git a/meta/recipes-devtools/rpm/rpm/debugedit-valid-file-to-fix-segment-fault.patch b/meta/recipes-devtools/rpm/rpm/debugedit-valid-file-to-fix-segment-fault.patch
deleted file mode 100644
index 80404825361..00000000000
--- a/meta/recipes-devtools/rpm/rpm/debugedit-valid-file-to-fix-segment-fault.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-debugedit: fix segment fault while file's bss offset have a large number
-
-While ELF_C_RDWR_MMAP was used, elf_begin invoked mmap() to map file
-into memory. While the file's bss Offset has a large number, elf_update
-caculated file size by __elf64_updatenull_wrlock and the size was
-enlarged.
-
-In this situation, elf_update invoked ftruncate to enlarge the file,
-and memory size (elf->maximum_size) also was incorrectly updated.
-There was segment fault in elf_end which invoked munmap with the
-length is the enlarged file size, not the mmap's length.
-
-Before the above operations, invoke elf_begin/elf_update/elf_end
-with ELF_C_RDWR and ELF_F_LAYOUT set to enlarge the above file, it
-could make sure the file is safe for the following elf operations.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- tools/debugedit.c | 25 +++++++++++++++++++++++++
- 1 file changed, 25 insertions(+)
-
-Index: rpm-5.4.14/tools/debugedit.c
-===================================================================
---- rpm-5.4.14.orig/tools/debugedit.c
-+++ rpm-5.4.14/tools/debugedit.c
-@@ -1525,6 +1525,28 @@ handle_build_id (DSO *dso, Elf_Data *bui
-   }
- }
- 
-+/* It avoided the segment fault while file's bss offset have a large number.
-+   See https://bugzilla.redhat.com/show_bug.cgi?id=1019707
-+       https://bugzilla.redhat.com/show_bug.cgi?id=1020842 for detail. */
-+void valid_file(int fd)
-+{
-+  Elf *elf = elf_begin (fd, ELF_C_RDWR, NULL);
-+  if (elf == NULL)
-+  {
-+    error (1, 0, "elf_begin: %s", elf_errmsg (-1));
-+    return;
-+  }
-+
-+  elf_flagelf (elf, ELF_C_SET, ELF_F_LAYOUT);
-+
-+  if (elf_update (elf, ELF_C_WRITE) < 0)
-+    error (1, 0, "elf_update: %s", elf_errmsg (-1));
-+
-+  elf_end (elf);
-+
-+  return;
-+}
-+
- int
- main (int argc, char *argv[])
- {
-@@ -1621,6 +1643,9 @@ main (int argc, char *argv[])
-       exit (1);
-     }
- 
-+  /* Make sure the file is valid. */
-+  valid_file(fd);
-+
-   dso = fdopen_dso (fd, file);
-   if (dso == NULL)
-     exit (1);
diff --git a/meta/recipes-devtools/rpm/rpm/gcc6-stdlib.patch b/meta/recipes-devtools/rpm/rpm/gcc6-stdlib.patch
deleted file mode 100644
index 0a372c6dad8..00000000000
--- a/meta/recipes-devtools/rpm/rpm/gcc6-stdlib.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-gcc6 has fixed a long standing c++ include issue where <cheader>
-was different from <header.h> inclusion via
-
-https://gcc.gnu.org/ml/libstdc++/2016-01/msg00025.html
-
-and its also descibed in https://gcc.gnu.org/gcc-6/porting_to.html
-rpmio component uses some .cpp and .cc fies which need to use
-C stdlib.h from C library and not the C++ libstdc++ header
-therefore we pass _GLIBCXX_INCLUDE_NEXT_C_HEADERS so that it
-keeps the old behavior
-
-/a/build/tmp/sysroots/raspberrypi2/usr/include/c++/6.0.1/cstdlib:143:11: error: '::getenv' has not been declared
-   using ::getenv;
-           ^~~~~~
-In file included from ../../rpm-5.4.15/system.h:201:0,
-                 from ../../rpm-5.4.15/rpmio/rpmjs.cpp:1:
-/a/build/tmp/sysroots/raspberrypi2/usr/include/c++/6.0.1/stdlib.h:62:12: error: 'std::getenv' has not been declared
- using std::getenv;
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: rpm-5.4.15/rpmio/Makefile.am
-===================================================================
---- rpm-5.4.15.orig/rpmio/Makefile.am
-+++ rpm-5.4.15/rpmio/Makefile.am
-@@ -151,7 +151,7 @@ librpmio_la_SOURCES = \
- 	groestl.c hamsi.c jh.c keccak.c lane.c luffa.c md2.c md6.c radiogatun.c\
- 	salsa10.c salsa20.c shabal.c shavite3.c simd.c skein.c tib3.c tiger.c \
- 	rpmgit.c rpmio-stub.c \
--	rpmjs.cpp rpmjsio.c rpmkeyring.c \
-+	rpmjni.cc rpmjs.cpp rpmjsio.c rpmkeyring.c \
- 	rpmnix.c rpmodbc.c rpmsql.c set.c \
- 	ar.c \
- 	argv.c \
-@@ -195,7 +195,6 @@ librpmio_la_SOURCES = \
- 	rpmhook.c \
- 	rpmio.c \
- 	rpmiob.c \
--	rpmjni.cc \
- 	rpmku.c \
- 	rpmlog.c \
- 	rpmltc.c \
-@@ -279,7 +278,9 @@ keccak.lo: $(top_srcdir)/rpmio/keccak.c
- #rpmjs.lo: $(top_srcdir)/rpmio/rpmjs.c
- #	@$(LTCOMPILE) -O0 -c $<
- rpmjs.lo: $(top_srcdir)/rpmio/rpmjs.cpp
--	@$(LTCOMPILE) -O0 -c $<
-+	@$(LTCOMPILE) -O0 -c -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS $<
-+rpmjni.lo: $(top_srcdir)/rpmio/rpmjni.cc
-+	@$(LTCOMPILE) -O0 -c -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS $<
- 
- YACC = byacc -d
- getdate.c: getdate.y
diff --git a/meta/recipes-devtools/rpm/rpm/header-include-fix.patch b/meta/recipes-devtools/rpm/rpm/header-include-fix.patch
deleted file mode 100644
index e72df45b5a4..00000000000
--- a/meta/recipes-devtools/rpm/rpm/header-include-fix.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Update two rpm headers to include other headers.
-
-Using rpmdb.h w/o including errno.h may result in a warning.
-
-Using rpmtag.h w/o also adding stdint.h will result in numerous failures
-about unknown types on modern compilers.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Qing He <qing.he@intel.com>
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/rpmdb/rpmdb.h
-===================================================================
---- rpm-5.4.14.orig/rpmdb/rpmdb.h
-+++ rpm-5.4.14/rpmdb/rpmdb.h
-@@ -9,6 +9,7 @@
- 
- #include <assert.h>
- #include <mire.h>
-+#include <errno.h>
- 
- #include <rpmtypes.h>
- #include <rpmtag.h>	/* XXX Header typedef */
-Index: rpm-5.4.14/rpmdb/rpmtag.h
-===================================================================
---- rpm-5.4.14.orig/rpmdb/rpmtag.h
-+++ rpm-5.4.14/rpmdb/rpmtag.h
-@@ -7,6 +7,7 @@
- 
- #include <rpmiotypes.h>
- #include <rpmsw.h>
-+#include <stdint.h>
- 
- #ifdef __cplusplus
- extern "C" {
diff --git a/meta/recipes-devtools/rpm/rpm/makefile-am-exec-hook.patch b/meta/recipes-devtools/rpm/rpm/makefile-am-exec-hook.patch
deleted file mode 100644
index 5d936db5a33..00000000000
--- a/meta/recipes-devtools/rpm/rpm/makefile-am-exec-hook.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-rpm: Resolve parallel install issue when installing lua
-
-When lua is being installed on some systems that are being run with high levels
-of parallelization there are cases where install-data-am and install-exec-hook
-are processed at the same or a very short time apart. This causes
-install-pkgbinPROGRAMS, which is a dependency of both, to be run at around the
-same time This sometimes causes file contention and will sometimes be in a state
-where install-exec-hook is looking for a file that is being installed or both
-install-pkgbinPROGRAMS being run are installing the same file and fail because
-it cannon create a new file.
-
-This patch allows install-exec-hook to be called by install-data-am instead of
-install-exec-am. It also removed the dependency in install-data-hook on
-install-pkgbinPROGRAMS. This means install-pkgbinPROGRAMS will only be run once
-so there whould be any file contention.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Morgan Little <morgan.little@windriver.com>
-
-Index: rpm-5.4.14/lua/Makefile.am
-===================================================================
---- rpm-5.4.14.orig/lua/Makefile.am
-+++ rpm-5.4.14/lua/Makefile.am
-@@ -326,7 +326,7 @@ clean-local:
- # XXX Build & install as rpmlua/rpmluac with hardlinks to lua/luac post install.
- # XXX CVS has lua/luac sub-directories in the Attic that collide with the
- # XXX lua/luac executable names when using cvs update.
--install-exec-hook:	install-pkgbinPROGRAMS
-+install-data-hook:	
- 	mkdir -p $(DESTDIR)$(pkgbindir)
- 	$(__RM) -f $(DESTDIR)$(pkgbindir)/lua
- 	$(__LN) $(DESTDIR)$(pkgbindir)/rpmlua $(DESTDIR)$(pkgbindir)/lua
diff --git a/meta/recipes-devtools/rpm/rpm/no-ldflags-in-pkgconfig.patch b/meta/recipes-devtools/rpm/rpm/no-ldflags-in-pkgconfig.patch
deleted file mode 100644
index 410623fab2b..00000000000
--- a/meta/recipes-devtools/rpm/rpm/no-ldflags-in-pkgconfig.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Don't put LDFLAGS into the Libs.private, all it generally contains is a linker
-hash selection (harmless) and the absolute path to the libdir in the sysroot
-(actively harmful).
-
-Upstream-Status: Pending
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-diff --git a/scripts/rpm.pc.in b/scripts/rpm.pc.in
-index 8293471..2ea469c 100644
---- a/scripts/rpm.pc.in
-+++ b/scripts/rpm.pc.in
-@@ -17 +17 @@ Libs: -L${libdir} -lrpmbuild${suffix} -lrpm${suffix} -lrpmdb${suffix} -lrpmio${s
--Libs.private: @LDFLAGS@ @LIBS@
-+Libs.private: @LIBS@
diff --git a/meta/recipes-devtools/rpm/rpm/perfile_rpmdeps.sh b/meta/recipes-devtools/rpm/rpm/perfile_rpmdeps.sh
deleted file mode 100755
index b72c9f0265b..00000000000
--- a/meta/recipes-devtools/rpm/rpm/perfile_rpmdeps.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/bash
-
-: ${RPMDEPS:=rpmdeps}
-
-process() {
-	while read file_name ; do
-		printf "%s\t" ${file_name}
-		if [ ! -d $file_name ]; then
-			printf "%s " $($RPMDEPS $1 $file_name | sed -e 's,rpmlib(.*,,' -e 's,\([<>\=]\+ \+[^ ]*\),(\1),g')
-		fi
-		printf "\n"
-	done
-}
-
-usage() {
-	echo "$0 {-P|--provides} {-R|--requires} FILE ..."
-}
-
-while [ $# -gt 0 ]; do
-   case "$1" in
-	--rpmdeps)
-		RPMDEPS=$2
-		shift
-		shift
-		;;
-	-R|--requires)
-		process_type=--requires
-		shift
-		;;
-	-P|--provides)
-		process_type=--provides
-		shift
-		;;
-	*)
-		break;
-		;;
-   esac
-done
-
-if [ -z "$process_type" ]; then
-	usage
-	exit 1
-fi
-
-if [ $# -gt 0 ]; then
-	find "$@" | process $process_type
-	exit $?
-fi
-
-process $process_type
diff --git a/meta/recipes-devtools/rpm/rpm/popt-disable-auto-stack-protector.patch b/meta/recipes-devtools/rpm/rpm/popt-disable-auto-stack-protector.patch
deleted file mode 100644
index bcad8dcb731..00000000000
--- a/meta/recipes-devtools/rpm/rpm/popt-disable-auto-stack-protector.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-popt: Disable default stack protection on internal version of popt
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.15/popt/configure.ac
-===================================================================
---- rpm-5.4.15.orig/popt/configure.ac
-+++ rpm-5.4.15/popt/configure.ac
-@@ -123,7 +123,6 @@ AS_IF([test "x$popt_gcc_warnings" = xyes
-   popt_CFLAGS_ADD([-Wjump-misses-init],[POPT_CFLAGS])
-   popt_CFLAGS_ADD([-Wno-format-nonliteral],[POPT_CFLAGS])
-   popt_CFLAGS_ADD([-Wframe-larger-than=$MAX_STACK_SIZE],[POPT_CFLAGS])
--  popt_CFLAGS_ADD([-fstack-protector-all],[POPT_CFLAGS])
-   popt_CFLAGS_ADD([-fasynchronous-unwind-tables],[POPT_CFLAGS])
-   popt_CFLAGS_ADD([-fdiagnostics-show-option],[POPT_CFLAGS])
-   popt_CFLAGS_ADD([-funit-at-a-time],[POPT_CFLAGS])
-@@ -203,7 +202,7 @@ AC_SUBST([POPT_LDFLAGS])
- # -fno-delete-null-pointer as the kernel does http://patchwork.kernel.org/patch/36060/
- # GNU GCC (usually "gcc")
- AS_IF([test "x$GCC" != x],
-- [ for c in -fno-delete-null-pointer-checks -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector -fexceptions
-+ [ for c in -fno-delete-null-pointer-checks -fexceptions
-    do
-   	popt_CFLAGS_ADD([$c], [POPT_CFLAGS])
-    done
diff --git a/meta/recipes-devtools/rpm/rpm/python-rpm-rpmsense.patch b/meta/recipes-devtools/rpm/rpm/python-rpm-rpmsense.patch
deleted file mode 100644
index 590f58d8936..00000000000
--- a/meta/recipes-devtools/rpm/rpm/python-rpm-rpmsense.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-rpmmodule.c: Export a few additional RPMSENSE values
-
-We want to see the RPMSENSE_SCRIPT values for use with SMART.  We also
-want to see the MISSINGOK value so we can avoid recommended packages causing
-failures.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm/python/rpmmodule.c
-===================================================================
---- rpm.orig/python/rpmmodule.c
-+++ rpm/python/rpmmodule.c
-@@ -525,12 +525,15 @@ static int initModule(PyObject *m)
-     REGISTER_ENUM(RPMSENSE_PREREQ);
-     REGISTER_ENUM(RPMSENSE_PRETRANS);
-     REGISTER_ENUM(RPMSENSE_INTERP);
-+#else
-+ #if defined(RPM_VENDOR_WINDRIVER) || defined(RPM_VENDOR_OE)
-     REGISTER_ENUM(RPMSENSE_SCRIPT_PRE);
-     REGISTER_ENUM(RPMSENSE_SCRIPT_POST);
-     REGISTER_ENUM(RPMSENSE_SCRIPT_PREUN);
-     REGISTER_ENUM(RPMSENSE_SCRIPT_POSTUN);
-     REGISTER_ENUM(RPMSENSE_SCRIPT_VERIFY);
--#else
-+    REGISTER_ENUM(RPMSENSE_MISSINGOK);
-+ #endif
-     REGISTER_ENUM(RPMSENSE_NOTEQUAL);
- #endif
-     REGISTER_ENUM(RPMSENSE_FIND_REQUIRES);
diff --git a/meta/recipes-devtools/rpm/rpm/pythondeps.sh b/meta/recipes-devtools/rpm/rpm/pythondeps.sh
deleted file mode 100755
index 083b174f175..00000000000
--- a/meta/recipes-devtools/rpm/rpm/pythondeps.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-
-[ $# -ge 1 ] || {
-    cat > /dev/null
-    exit 0
-}
-
-case $1 in
--R|--requires)
-    shift
-    grep "/usr/\(lib[^/]*\|share\)/python[^/]*/" >/dev/null && echo "python"
-    exit 0
-    ;;
-esac
-
-exit 0
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-atomic-ops.patch b/meta/recipes-devtools/rpm/rpm/rpm-atomic-ops.patch
deleted file mode 100644
index cc241f4f16b..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-atomic-ops.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-Some architectures do not have __sync_add_and_fetch_8 implemented.
-
-MIPS (32-bit) and some PPC systems do not have sync_add_and_fetch_8.
-
-Provide an alternative.  This alternative function is based on code from:
-  https://github.com/mongodb/libbson/blob/master/src/bson/bson-atomic.c
-
-Code is under an Apache 2.0 License.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.15/rpmio/bson.h
-===================================================================
---- rpm-5.4.15.orig/rpmio/bson.h
-+++ rpm-5.4.15/rpmio/bson.h
-@@ -879,10 +879,18 @@ BSON_END_DECLS
- 
- BSON_BEGIN_DECLS
- 
-+/* Some architectures do not support __sync_add_and_fetch_8 */
-+#if (__mips == 32) || (defined(__PPC__) && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8))
-+# define __BSON_NEED_ATOMIC_64 1
-+#endif
- 
- #if defined(__GNUC__)
- # define bson_atomic_int_add(p, v)   (__sync_add_and_fetch(p, v))
--# define bson_atomic_int64_add(p, v) (__sync_add_and_fetch_8(p, v))
-+#ifndef __BSON_NEED_ATOMIC_64
-+#  define bson_atomic_int64_add(p, v) (__sync_add_and_fetch_8(p, v))
-+# else
-+   int64_t bson_atomic_int64_add (volatile int64_t *p, int64_t n);
-+# endif
- # define bson_memory_barrier         __sync_synchronize
- #elif defined(_MSC_VER) || defined(_WIN32)
- # define bson_atomic_int_add(p, v)   (InterlockedExchangeAdd((long int *)(p), v))
-Index: rpm-5.4.15/rpmio/bson.c
-===================================================================
---- rpm-5.4.15.orig/rpmio/bson.c
-+++ rpm-5.4.15/rpmio/bson.c
-@@ -3863,13 +3863,30 @@ _bson_context_get_oid_seq64_threadsafe (
- #elif defined BSON_OS_WIN32
-    uint64_t seq = InterlockedIncrement64 ((int64_t *)&context->seq64);
- #else
--   uint64_t seq = __sync_fetch_and_add_8 (&context->seq64, 1);
-+   uint64_t seq = bson_atomic_int64_add (&context->seq64, 1);
- #endif
- 
-    seq = BSON_UINT64_TO_BE (seq);
-    memcpy (&oid->bytes[4], &seq, 8);
- }
- 
-+#ifdef __BSON_NEED_ATOMIC_64
-+#include <pthread.h>
-+static pthread_mutex_t gSync64 = PTHREAD_MUTEX_INITIALIZER;
-+int64_t
-+bson_atomic_int64_add (volatile int64_t *p,
-+                       int64_t           n)
-+{
-+   int64_t ret;
-+
-+   pthread_mutex_lock (&gSync64);
-+   *p += n;
-+   ret = *p;
-+   pthread_mutex_unlock (&gSync64);
-+
-+   return ret;
-+}
-+#endif
- 
- /**
-  * bson_context_new:
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-autogen-force.patch b/meta/recipes-devtools/rpm/rpm/rpm-autogen-force.patch
deleted file mode 100644
index 258a7f6e721..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-autogen-force.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-In order to enable musl or other libc support, force update the config.guess
-
-In order to reliably replace config.guess and config.sub, we need to remove
-them prior to the call to automake.  Adding the --force-missing is likely
-not necessary, but matching normal OE autoreconf usage.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.15/autogen.sh
-===================================================================
---- rpm-5.4.15.orig/autogen.sh
-+++ rpm-5.4.15/autogen.sh
-@@ -73,7 +73,8 @@ rm -f aclocal.m4
- aclocal -I m4
- autoheader -I m4
- echo "---> generate files via GNU automake (automake)"
--automake -Wall -Wno-override -a -c
-+rm -f config.guess config.sub
-+automake -Wall -Wno-override -a -c --force-missing
- echo "---> generate files via GNU autoconf (autoconf)"
- autoconf -I m4
- echo "<=== rpm"
-Index: rpm-5.4.15/beecrypt/autogen.sh
-===================================================================
---- rpm-5.4.15.orig/beecrypt/autogen.sh
-+++ rpm-5.4.15/beecrypt/autogen.sh
-@@ -25,6 +25,7 @@ libtoolize () {
- 
- libtoolize --force --copy
- aclocal
--automake -a -c
-+rm -f config.guess config.sub
-+automake -a -c --force-missing
- autoconf
- autoheader
-Index: rpm-5.4.15/libtpm/autogen.sh
-===================================================================
---- rpm-5.4.15.orig/libtpm/autogen.sh
-+++ rpm-5.4.15/libtpm/autogen.sh
-@@ -46,7 +46,8 @@ echo "---> generate files via GNU autoco
- aclocal
- autoheader
- echo "---> generate files via GNU automake (automake)"
--automake -Wall -Wno-override -a -c
-+rm -f config.guess config.sub
-+automake -Wall -Wno-override -a -c --force-missing
- echo "---> generate files via GNU autoconf (autoconf)"
- autoconf
- 
-Index: rpm-5.4.15/neon/autogen.sh
-===================================================================
---- rpm-5.4.15.orig/neon/autogen.sh
-+++ rpm-5.4.15/neon/autogen.sh
-@@ -63,7 +63,8 @@ echo "---> generate files via GNU autoco
- ${ACLOCAL:-aclocal} -I macros
- ${AUTOHEADER:-autoheader}
- echo "---> generate files via GNU automake (automake)"
--${AUTOMAKE:-automake} -Wall -Wno-override -a -c
-+rm -f config.guess config.sub
-+${AUTOMAKE:-automake} -Wall -Wno-override -a -c --force-missing
- echo "---> generate files via GNU autoconf (autoconf)"
- ${AUTOCONF:-autoconf} -Wall
- 
-Index: rpm-5.4.15/syck/autogen.sh
-===================================================================
---- rpm-5.4.15.orig/syck/autogen.sh
-+++ rpm-5.4.15/syck/autogen.sh
-@@ -40,6 +40,7 @@ echo "---> generate files via GNU autoco
- aclocal
- autoheader
- echo "---> generate files via GNU automake (automake)"
--automake -Wall -Wno-override -a -c
-+rm -f config.guess config.sub
-+automake -Wall -Wno-override -a -c --force-missing
- echo "---> generate files via GNU autoconf (autoconf)"
- autoconf
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-autogen.patch b/meta/recipes-devtools/rpm/rpm/rpm-autogen.patch
deleted file mode 100644
index 8771235d309..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-autogen.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Remove the sanity checking from the rpm autogen.sh.  This is required because
-we may have slightly different, but yet compatible versions.  If we do end
-up breaking things, we'll deal with it at that time.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/syck/autogen.sh
-===================================================================
---- rpm-5.4.14.orig/syck/autogen.sh
-+++ rpm-5.4.14/syck/autogen.sh
-@@ -34,12 +34,6 @@ libtoolize () {
-     eval $_libtoolize $_libtoolize_args
- }
- 
--#   requirements sanity check
--[ "`automake   --version | head -1`" != "$AMV" ] && echo "$USAGE" # && exit 1
--[ "`autoconf   --version | head -1`" != "$ACV" ] && echo "$USAGE" # && exit 1
--[ "`libtoolize --version | head -1`" != "$LTV" ] && echo "$USAGE" # && exit 1
--[ "`gettextize --version | head -1 | sed -e 's;^.*/\\(gettextize\\);\\1;'`" != "$GTT" ] && echo "$USAGE" # && exit 1
--
- echo "---> generate files via GNU libtool (libtoolize)"
- libtoolize --quiet --copy --force --install
- echo "---> generate files via GNU autoconf (aclocal, autoheader)"
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-canonarch.patch b/meta/recipes-devtools/rpm/rpm/rpm-canonarch.patch
deleted file mode 100644
index 81fc84937a1..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-canonarch.patch
+++ /dev/null
@@ -1,136 +0,0 @@
-lib/rpmrc.c: Update --target processing to support full GNU canonical arch
-
-Prior to this patch, when using --target, RPM supported the format:
-  <arch>
-  <arch>-<os>
-  <arch>-<os>-gnu
-  <arch>-<arbitrary items>-<os>
-  <arch>-<arbitrary items>-<os>-gnu
-
-This patch changes the list of supported items to:
-  <arch>
-  <arch>-<os>
-  <arch>-<os>-gnu
-  <arch>-<vendor>-<os>
-  <arch>-<vendor>-<os>-<extension>
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/lib/rpmrc.c
-===================================================================
---- rpm-5.4.14.orig/lib/rpmrc.c
-+++ rpm-5.4.14/lib/rpmrc.c
-@@ -925,8 +925,8 @@ static void getMachineInfo(int type, /*@
- 
- static void rpmRebuildTargetVars(const char ** target, const char ** canontarget)
- {
--
--    char *ca = NULL, *co = NULL, *ct = NULL;
-+    /* ca = arch, cv = vendor, co = os, ce = extension, ct = canon target */
-+    char *ca = NULL, *cv = NULL, *co = NULL, *ce = NULL, *ct = NULL;
-     int x;
- 
-     /* Rebuild the compat table to recalculate the current target arch.  */
-@@ -936,23 +936,60 @@ static void rpmRebuildTargetVars(const c
-     rpmSetTables(RPM_MACHTABLE_BUILDARCH, RPM_MACHTABLE_BUILDOS);
- 
-     if (target && *target) {
-+	/* GNU canonical format is:
-+	 *  <arch>-<vendor>-<os>[-extension]
-+	 *
-+	 * We support the both the GNU canonical format
-+	 * as well as the traditional RPM formats: 
-+	 *  <arch>
-+	 *  <arch>-<os>[-gnu]
-+	 */
- 	char *c;
- 	/* Set arch and os from specified build target */
- 	ca = xstrdup(*target);
--	if ((c = strchr(ca, '-')) != NULL) {
-+	if ((c = strchr(ca, '-')) == NULL) {
-+	    /* Format is <arch> */
-+	    ;
-+	} else {
- 	    *c++ = '\0';
--	    
--	    if ((co = strrchr(c, '-')) == NULL) {
--		co = c;
-+	    cv = c;
-+
-+	    if ((c = strchr(c, '-')) == NULL) {
-+		/* Format is <arch>-<os> */
-+		co = cv;
-+		cv = NULL;
- 	    } else {
--		if (!xstrcasecmp(co, "-gnu"))
--		    *co = '\0';
--		if ((co = strrchr(c, '-')) == NULL)
--		    co = c;
--		else
--		    co++;
-+		*c++ = '\0';
-+		co = c;
-+
-+		if ((c = strchr(c, '-')) == NULL) {
-+		    /* Might be:
-+		     *  <arch>-<vendor>-<os>
-+		     *  <arch>-<os>-gnu
-+		     */
-+		    if (!xstrcasecmp(co, "gnu")) {
-+			/* Format was <arch>-<os>-gnu */
-+			ce = co;
-+			co = cv;
-+			cv = NULL;
-+		    }
-+		} else {
-+		    /* Format was <arch>-<vendor>-<os>-<extension> */
-+		    *c++ = '\0';
-+		    ce = c;
-+		}
- 	    }
-+	    if (cv != NULL) cv = xstrdup(cv);
- 	    if (co != NULL) co = xstrdup(co);
-+	    if (ce != NULL) {
-+		/* We need to prefix it with a "-" */
-+		char * lce = NULL;
-+
-+		lce = xmalloc(strlen(ce) + sizeof("-"));
-+		sprintf(lce, "-%s", ce);
-+
-+		ce = lce;
-+	    }
- 	}
-     } else {
- 	const char *a = NULL;
-@@ -995,8 +1032,16 @@ static void rpmRebuildTargetVars(const c
-     addMacro(NULL, "_target", NULL, ct, RMIL_RPMRC);
-     delMacro(NULL, "_target_cpu");
-     addMacro(NULL, "_target_cpu", NULL, ca, RMIL_RPMRC);
-+    if (cv) {
-+	delMacro(NULL, "_target_vendor");
-+	addMacro(NULL, "_target_vendor", NULL, cv, RMIL_RPMRC);
-+    }
-     delMacro(NULL, "_target_os");
-     addMacro(NULL, "_target_os", NULL, co, RMIL_RPMRC);
-+    if (ce) {
-+	delMacro(NULL, "_gnu");
-+	addMacro(NULL, "_gnu", NULL, ce, RMIL_RPMRC);
-+    }
- 
-     if (canontarget)
- 	*canontarget = ct;
-@@ -1004,8 +1049,12 @@ static void rpmRebuildTargetVars(const c
- 	ct = _free(ct);
-     ca = _free(ca);
-     /*@-usereleased@*/
-+    cv = _free(cv);
-+    /*@-usereleased@*/
-     co = _free(co);
-     /*@=usereleased@*/
-+    ce = _free(ce);
-+    /*@-usereleased@*/
- }
- 
- void rpmFreeRpmrc(void)
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-check-rootpath-reasonableness.patch b/meta/recipes-devtools/rpm/rpm/rpm-check-rootpath-reasonableness.patch
deleted file mode 100644
index 3d8d645a776..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-check-rootpath-reasonableness.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-rpm: check if the argument(rootpath) exists or be writable
-
-When user execute the command "rpm -qai --root=$dir",if $dir doesn't
-exist or is unwritable as result of making a typo in rootpath,then
-it will create dirent $dir and subdirectory.
-So we should add the check function to fix it before creating relational
-subdirectory,and warn the incorrect rootpath to user. It just checks the
-rootpath reasonableness when the user input the argument(--root=/-r=).
-
-Upstream-Status: Pending
-
-Signed-off-by: Zhixiong Chi <zchi@windriver.com>
----
- rpmqv.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 45 insertions(+)
-
-diff --git a/rpmqv.c b/rpmqv.c
-index 40c42bd..88d85ab 100644
---- a/rpmqv.c
-+++ b/rpmqv.c
-@@ -206,6 +206,8 @@ static struct poptOption optionsTable[] = {
-    POPT_TABLEEND
- };
- 
-+static int _rpmqv_rootpath_state = 0;
-+
- #ifdef __MINT__
- /* MiNT cannot dynamically increase the stack.  */
- long _stksize = 64 * 1024L;
-@@ -427,6 +429,41 @@ static void integrity_check(const char *progname, enum modes progmode_num)
- }
- #endif
- 
-+/*check if the rootdir is writable or exists */
-+int access_file(const char *rootdir)
-+{
-+    int ret,rootdir_len;
-+
-+    if(rootdir == NULL) {
-+        return -1;
-+    }
-+
-+    rootdir_len = strlen(rootdir);
-+    /*make sure that dirent argument trailing is "/" */
-+    if(!(rootdir_len && rootdir[rootdir_len - 1] == '/')){
-+        char *t = (char *)malloc(rootdir_len + 2);
-+        *t = '\0';
-+        (void)stpcpy(stpcpy(t,rootdir),"/");
-+        ret = access(t,F_OK|W_OK);
-+        free(t);
-+    }else{
-+        ret = access(rootdir,F_OK|W_OK);
-+    }
-+    return ret;
-+}
-+
-+/*check if input the argument "--root/-r"  */
-+void check_argument_root(int argc,char * const argv[])
-+{
-+    int i;
-+    for (i = 0; i < argc; i++) {
-+        if(strncmp(argv[i],"--root=",7) == 0 || strncmp(argv[i],"-r=",3) == 0) {
-+            _rpmqv_rootpath_state = 1;
-+            break;
-+        }
-+    }
-+}
-+
- /*@-bounds@*/ /* LCL: segfault */
- /*@-mods@*/ /* FIX: shrug */
- #if !defined(__GLIBC__) && !defined(__LCLINT__)
-@@ -476,6 +513,8 @@ int main(int argc, const char ** argv)
-     int xx;
- #endif
- 	
-+    check_argument_root(argc,(char *const *)argv);
-+
- #if !defined(__GLIBC__) && !defined(__LCLINT__)
-     environ = envp;
- #else
-@@ -715,6 +754,12 @@ int main(int argc, const char ** argv)
- 		argerror(_("arguments to --root (-r) must begin with a /"));
- 	    break;
- 	}
-+        if (_rpmqv_rootpath_state) {
-+            if (access_file(rpmioRootDir)) {
-+                fprintf(stderr, _("Invalid directory:%s, ensure it exists or be writable\n"),rpmioRootDir);
-+                exit(EXIT_FAILURE);
-+            }
-+        }
-     }
- 
- #if defined(RPM_VENDOR_OPENPKG) /* integrity-checking */
--- 
-1.9.1
-
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-db-reduce.patch b/meta/recipes-devtools/rpm/rpm/rpm-db-reduce.patch
deleted file mode 100644
index c869376538f..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-db-reduce.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Change cache size to reduce the usage of disk space from 62MB to 26MB. 
-
-Signed-off-by: Mei Lei <lei.mei@intel.com>
-
-Index: rpm-5.4.14/rpmdb/DB_CONFIG.in
-===================================================================
---- rpm-5.4.14.orig/rpmdb/DB_CONFIG.in
-+++ rpm-5.4.14/rpmdb/DB_CONFIG.in
-@@ -29,7 +29,7 @@ set_thread_count 64
- 
- # ================ Memory Pool
- #XXX initializing dbenv with set_cachesize has unimplemented prerequsites
--#set_cachesize 0 1048576 0 
-+set_cachesize 0 1048576 0 
- set_mp_mmapsize 268435456
- 
- # ================ Locking
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch b/meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch
deleted file mode 100644
index 5d08d279ae6..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch
+++ /dev/null
@@ -1,174 +0,0 @@
-From 7bad268de8b32281e2a12ccd88038b3ec5eb1be3 Mon Sep 17 00:00:00 2001
-From: Yuanjie Huang <Yuanjie.Huang@windriver.com>
-Date: Tue, 15 Dec 2015 18:50:21 +0800
-Subject: [PATCH] Support both db5 and db6.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Yuanjie Huang <Yuanjie.Huang@windriver.com>
----
- configure.ac | 103 ++++++++++++++++++++++++++++++++++++++++++++++-------------
- 1 file changed, 81 insertions(+), 22 deletions(-)
-
-Index: rpm/configure.ac
-===================================================================
---- rpm.orig/configure.ac
-+++ rpm/configure.ac
-@@ -871,8 +871,6 @@ else
-     MYPATH=$PATH
- fi
- 
--DBXY=db61
--
- AC_PATH_PROG(__BASH, bash, %{_bindir}/bash, $MYPATH)
- AC_PATH_PROG(__BZIP2, bzip2, %{_bindir}/bzip2, $MYPATH)
- AC_PATH_PROG(__CAT, cat, /bin/cat, $MYPATH)
-@@ -884,22 +882,6 @@ AC_PATH_PROG(__CMAKE, cmake, %{_bindir}/
- AC_PATH_PROG(__CPIO, cpio, /bin/cpio, $MYPATH)
- AC_PATH_PROG(__CURL, curl, %{_bindir}/curl, $MYPATH)
- AC_PATH_PROG(__CVS, cvs, %{_bindir}/cvs, $MYPATH)
--AC_PATH_PROG(__DB_ARCHIVE, ${DBXY}_archive, %{_bindir}/${DBXY}_archive, $MYPATH)
--AC_PATH_PROG(__DB_CHECKPOINT, ${DBXY}_checkpoint, %{_bindir}/${DBXY}_checkpoint, $MYPATH)
--AC_PATH_PROG(__DB_DEADLOCK, ${DBXY}_deadlock, %{_bindir}/${DBXY}_deadlock, $MYPATH)
--AC_PATH_PROG(__DB_DUMP, ${DBXY}_dump, %{_bindir}/${DBXY}_dump, $MYPATH)
--AC_PATH_PROG(__DB_HOTBACKUP, ${DBXY}_hotbackup, %{_bindir}/${DBXY}_hotbackup, $MYPATH)
--AC_PATH_PROG(__DB_LOAD, ${DBXY}_load, %{_bindir}/${DBXY}_load, $MYPATH)
--AC_PATH_PROG(__DB_LOG_VERIFY, ${DBXY}_log_verify, %{_bindir}/${DBXY}_log_verify, $MYPATH)
--AC_PATH_PROG(__DB_PRINTLOG, ${DBXY}_printlog, %{_bindir}/${DBXY}_printlog, $MYPATH)
--AC_PATH_PROG(__DB_RECOVER, ${DBXY}_recover, %{_bindir}/${DBXY}_recover, $MYPATH)
--AC_PATH_PROG(__DB_REPLICATE, ${DBXY}_replicate, %{_bindir}/${DBXY}_replicate, $MYPATH)
--AC_PATH_PROG(__DBSQL, ${DBXY}sql, %{_bindir}/${DBXY}sql, $MYPATH)
--AC_PATH_PROG(__DB_SQL_CODEGEN, ${DBXY}_sql_codegen, %{_bindir}/${DBXY}_sql_codegen, $MYPATH)
--AC_PATH_PROG(__DB_STAT, ${DBXY}_stat, %{_bindir}/${DBXY}_stat, $MYPATH)
--AC_PATH_PROG(__DB_TUNER, ${DBXY}_tuner, %{_bindir}/${DBXY}_tuner, $MYPATH)
--AC_PATH_PROG(__DB_UPGRADE, ${DBXY}_upgrade, %{_bindir}/${DBXY}_upgrade, $MYPATH)
--AC_PATH_PROG(__DB_VERIFY, ${DBXY}_verify, %{_bindir}/${DBXY}_verify, $MYPATH)
- AC_PATH_PROG(__DIFF, diff, /bin/diff, $MYPATH)
- AC_PATH_PROG(__DITTO, ditto, %{_bindir}/ditto, $MYPATH)
- AC_PATH_PROG(__FILE, file, %{_bindir}/file, $MYPATH)
-@@ -2050,13 +2032,46 @@ RPM_CHECK_LIB(
- 
- dnl # Berkeley-DB & SQLite
- DBLIBSRCS=""
-+DBXY=db
-+
- # XXX won't handle --includedir override
--CPPFLAGS="${CPPFLAGS} -I${prefix}/include/${DBXY}"
--RPM_CHECK_LIB(
-+CPPFLAGS_save="${CPPFLAGS}"
-+CPPFLAGS="${CPPFLAGS_save}"
-+with_db_save="${with_db}"
-+
-+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-+#include <db.h>
-+]],
-+[[
-+#if DB_VERSION_MAJOR < 6
-+#error DB_VERSION_MAJOR is below 6
-+#endif
-+]])],
-+[RPM_CHECK_LIB(
-     [Berkeley-DB], [db],
-     [db-6.1], [db_create], [db.h],
--    [yes,external], [db3],
-+    [yes,external], [db6],
-     [ DBLIBSRCS="$DBLIBSRCS db3.c"
-+      DBXY=db61
-+      AM_CONDITIONAL(WITH_DB, [ true ])
-+      AM_CONDITIONAL(WITH_DB_INTERNAL, [ test ".$RPM_CHECK_LIB_LOCATION" = .internal ])
-+      if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then
-+          AC_DEFINE(HAVE_DB_H, 1, [Have <db.h> header])
-+      else
-+          WITH_DB_SUBDIR=""
-+      fi
-+    ],
-+    [ AM_CONDITIONAL(WITH_DB, [ false ])
-+      AM_CONDITIONAL(WITH_DB_INTERNAL, [ false ])
-+    ])],
-+[with_db="${with_db_save}"
-+ CPPFLAGS="${CPPFLAGS_save}"
-+ RPM_CHECK_LIB(
-+    [Berkeley-DB], [db],
-+    [db-5.3], [db_create], [db.h],
-+    [yes,external], [db53],
-+    [ DBLIBSRCS="$DBLIBSRCS db3.c"
-+      DBXY=db53
-       AM_CONDITIONAL(WITH_DB, [ true ])
-       AM_CONDITIONAL(WITH_DB_INTERNAL, [ test ".$RPM_CHECK_LIB_LOCATION" = .internal ])
-       if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then
-@@ -2068,6 +2083,11 @@ RPM_CHECK_LIB(
-     [ AM_CONDITIONAL(WITH_DB, [ false ])
-       AM_CONDITIONAL(WITH_DB_INTERNAL, [ false ])
-     ])
-+])
-+
-+if test ".$ac_cv_lib_db_6_1_db_create" != .yes -a ".$ac_cv_lib_db_5_3_db_create" != .yes; then
-+    CPPFLAGS="${CPPFLAGS_save}"
-+fi
- 
- dnl # Sqlite external
- RPM_CHECK_LIB(
-@@ -2078,10 +2098,11 @@ RPM_CHECK_LIB(
-     [])
- 
- dnl # Sqlite 3.8.3.1 from db-6.1.19
-+if test ".$ac_cv_lib_db_6_1_db_create" = .yes; then
- RPM_CHECK_LIB(
-     [Berkeley-DB (+SQLite3)], [dbsql],
-     [db_sql-6.1], [sqlite3_open], [dbsql.h],
--    [yes,external], [db3/sql],
-+    [yes,external], [db6/sql],
-     [
-       AM_CONDITIONAL(WITH_DBSQL, [ true ])
-       AC_DEFINE(WITH_SQLITE, 1, [Define as 1 if building with SQLite library])
-@@ -2095,12 +2116,50 @@ RPM_CHECK_LIB(
-     ], [
-       AM_CONDITIONAL(WITH_DBSQL, [ false ])
-     ])
-+elif test ".$ac_cv_lib_db_5_3_db_create" = .yes; then
-+RPM_CHECK_LIB(
-+    [Berkeley-DB (+SQLite3)], [dbsql],
-+    [db_sql-5.3], [sqlite3_open], [dbsql.h],
-+    [yes,external], [db53/sql],
-+    [
-+      AM_CONDITIONAL(WITH_DBSQL, [ true ])
-+      AC_DEFINE(WITH_SQLITE, 1, [Define as 1 if building with SQLite library])
-+      if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then
-+        WITH_DB_CPPFLAGS="${WITH_DB_CPPFLAGS} -I\$(top_srcdir)/db/sql/generated"
-+        WITH_DB_LIBS="${WITH_DBSQL_LIBS}"
-+        DBLIBSRCS="$DBLIBSRCS sqlite.c"
-+      else
-+        WITH_DBSQL_SUBDIR=""
-+      fi
-+    ], [
-+      AM_CONDITIONAL(WITH_DBSQL, [ false ])
-+    ])
-+else
-+AM_CONDITIONAL(WITH_DBSQL, [ false ])
-+fi
- 
- DBLIBOBJS=`echo $DBLIBSRCS | sed -e "s/\.c/\.lo/g"`
- 
- AC_SUBST(DBLIBSRCS)
- AC_SUBST(DBLIBOBJS)
- 
-+AC_PATH_PROG(__DB_ARCHIVE, ${DBXY}_archive, %{_bindir}/${DBXY}_archive, $MYPATH)
-+AC_PATH_PROG(__DB_CHECKPOINT, ${DBXY}_checkpoint, %{_bindir}/${DBXY}_checkpoint, $MYPATH)
-+AC_PATH_PROG(__DB_DEADLOCK, ${DBXY}_deadlock, %{_bindir}/${DBXY}_deadlock, $MYPATH)
-+AC_PATH_PROG(__DB_DUMP, ${DBXY}_dump, %{_bindir}/${DBXY}_dump, $MYPATH)
-+AC_PATH_PROG(__DB_HOTBACKUP, ${DBXY}_hotbackup, %{_bindir}/${DBXY}_hotbackup, $MYPATH)
-+AC_PATH_PROG(__DB_LOAD, ${DBXY}_load, %{_bindir}/${DBXY}_load, $MYPATH)
-+AC_PATH_PROG(__DB_LOG_VERIFY, ${DBXY}_log_verify, %{_bindir}/${DBXY}_log_verify, $MYPATH)
-+AC_PATH_PROG(__DB_PRINTLOG, ${DBXY}_printlog, %{_bindir}/${DBXY}_printlog, $MYPATH)
-+AC_PATH_PROG(__DB_RECOVER, ${DBXY}_recover, %{_bindir}/${DBXY}_recover, $MYPATH)
-+AC_PATH_PROG(__DB_REPLICATE, ${DBXY}_replicate, %{_bindir}/${DBXY}_replicate, $MYPATH)
-+AC_PATH_PROG(__DBSQL, ${DBXY}sql, %{_bindir}/${DBXY}sql, $MYPATH)
-+AC_PATH_PROG(__DB_SQL_CODEGEN, ${DBXY}_sql_codegen, %{_bindir}/${DBXY}_sql_codegen, $MYPATH)
-+AC_PATH_PROG(__DB_STAT, ${DBXY}_stat, %{_bindir}/${DBXY}_stat, $MYPATH)
-+AC_PATH_PROG(__DB_TUNER, ${DBXY}_tuner, %{_bindir}/${DBXY}_tuner, $MYPATH)
-+AC_PATH_PROG(__DB_UPGRADE, ${DBXY}_upgrade, %{_bindir}/${DBXY}_upgrade, $MYPATH)
-+AC_PATH_PROG(__DB_VERIFY, ${DBXY}_verify, %{_bindir}/${DBXY}_verify, $MYPATH)
-+
- AC_ARG_WITH(db-largefile, AS_HELP_STRING([--with-db-largefile], [build Berkeley-DB with LARGEFILE support]))
- AC_ARG_WITH(db-mutex,     AS_HELP_STRING([--with-db-mutex=ARG], [build Berkeley-DB with MUTEX type ARG]))
- 
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-db60.patch b/meta/recipes-devtools/rpm/rpm/rpm-db60.patch
deleted file mode 100644
index b4df8b751b9..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-db60.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-Set the DB 6 version to match oe-core db 6.0.30
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm/configure.ac
-===================================================================
---- rpm.orig/configure.ac
-+++ rpm/configure.ac
-@@ -2049,10 +2049,10 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- ]])],
- [RPM_CHECK_LIB(
-     [Berkeley-DB], [db],
--    [db-6.1], [db_create], [db.h],
-+    [db-6.0], [db_create], [db.h],
-     [yes,external], [db6],
-     [ DBLIBSRCS="$DBLIBSRCS db3.c"
--      DBXY=db61
-+      DBXY=db60
-       AM_CONDITIONAL(WITH_DB, [ true ])
-       AM_CONDITIONAL(WITH_DB_INTERNAL, [ test ".$RPM_CHECK_LIB_LOCATION" = .internal ])
-       if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then
-@@ -2085,7 +2085,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-     ])
- ])
- 
--if test ".$ac_cv_lib_db_6_1_db_create" != .yes -a ".$ac_cv_lib_db_5_3_db_create" != .yes; then
-+if test ".$ac_cv_lib_db_6_0_db_create" != .yes -a ".$ac_cv_lib_db_5_3_db_create" != .yes; then
-     CPPFLAGS="${CPPFLAGS_save}"
- fi
- 
-@@ -2097,11 +2097,11 @@ RPM_CHECK_LIB(
-     [ DBLIBSRCS="$DBLIBSRCS sqlite.c" ],
-     [])
- 
--dnl # Sqlite 3.8.3.1 from db-6.1.19
--if test ".$ac_cv_lib_db_6_1_db_create" = .yes; then
-+dnl # Sqlite 3.8.3.1 from db-6.0.30
-+if test ".$ac_cv_lib_db_6_0_db_create" = .yes; then
- RPM_CHECK_LIB(
-     [Berkeley-DB (+SQLite3)], [dbsql],
--    [db_sql-6.1], [sqlite3_open], [dbsql.h],
-+    [db_sql-6.0], [sqlite3_open], [dbsql.h],
-     [yes,external], [db6/sql],
-     [
-       AM_CONDITIONAL(WITH_DBSQL, [ true ])
-@@ -2253,7 +2253,7 @@ AC_SUBST(WITH_RUBY_CPPFLAGS)
- AC_SUBST(WITH_RUBY_SUBDIR)
- AC_SUBST(WITH_RUBY_VENDORARCHDIR)
- 
--dnl # Java prerequisites (swiped from db-6.1.19/dist/aclocal_java et al)
-+dnl # Java prerequisites (swiped from db-6.0.30/dist/aclocal_java et al)
- WITH_JAVA=no
- AC_ARG_WITH([java],
-     AS_HELP_STRING([--with-java], [build RPM with java support]),
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-db_buffer_small.patch b/meta/recipes-devtools/rpm/rpm/rpm-db_buffer_small.patch
deleted file mode 100644
index 16b8e30a1d2..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-db_buffer_small.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-In certain cases with BerkleyDB 5.3.x we are getting the error:
-
-db3.c:1443: dbcursor->pget(-30999): BDB0063 DB_BUFFER_SMALL: User memory too small for return value
-
-See https://bugs.launchpad.net/rpm/+bug/934420 for more information.
-
-It appears to be some type of a bug in the BerkleyDB 5.3.x.  In an attempt
-to workaround the problem, when we encounter this situation we attempt
-to adjust the size of the mmap buffer until the call works, or we
-end up trying 10 times.  The new size is either the updated vp->size
-from the failed pget call, or the previous size + 1024.
-
-If DBI debugging is enabled, additional diagnostics are printed, otherwise
-a basic retry and success message is added to show that the failure was
-resolved.
-
-Upstream-Status: Inappropriate (workaround)
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/rpmdb/rpmdb.c
-===================================================================
---- rpm-5.4.14.orig/rpmdb/rpmdb.c
-+++ rpm-5.4.14/rpmdb/rpmdb.c
-@@ -2212,8 +2212,12 @@ static int rpmmiGet(dbiIndex dbi, DBC *
- 	vp->flags |= DB_DBT_USERMEM;
- 	rc = dbiGet(dbi, dbcursor, kp, vp, flags);
- 	if (rc == DB_BUFFER_SMALL) {
-+	    int retry = 0;
-+	    size_t origlen = vp->size;
- 	    size_t uhlen = vp->size;
--	    void * uh = mmap(NULL, uhlen, _prot, _flags, _fdno, _off);
-+	    void * uh;
-+retry_get:
-+	    uh = mmap(NULL, uhlen, _prot, _flags, _fdno, _off);
- 	    if (uh == NULL || uh == (void *)-1)
- 		fprintf(stderr,
- 		    "==> mmap(%p[%u], 0x%x, 0x%x, %d, 0x%x) error(%d): %s\n",
-@@ -2235,6 +2239,25 @@ static int rpmmiGet(dbiIndex dbi, DBC *
- 		if (munmap(uh, uhlen) != 0)
- 		    fprintf(stderr, "==> munmap(%p[%u]) error(%d): %s\n",
-                 	uh, (unsigned)uhlen, errno, strerror(errno));
-+	        /* We want to be sure to limit the number of retry attempts to avoid a loop! */
-+	        if (rc == DB_BUFFER_SMALL && retry < 10) {
-+		   /* If we got a largr vp-size back, use that, otherwise increment the size by 1k */
-+	           uhlen = vp->size > uhlen ? vp->size : uhlen + 1024;
-+		   retry++;
-+	           if ((dbi)->dbi_debug)
-+	               fprintf(stderr, "==> DB_BUFFER_SMALL orig requested (%d), configured (%d), forcing larger buffer (%d), new size (%d)\n",
-+	                    origlen, vp->ulen, uhlen, vp->size);
-+	           else
-+	               fprintf(stderr, "==> retry (%d) db3cpget (%d)\n", retry, uhlen);
-+	           goto retry_get;
-+	        }
-+	    }
-+	    if (retry) {
-+	        if ((dbi)->dbi_debug)
-+	           fprintf(stderr, "==> success orig requested (%d), configured buffer (%d), buffer (%d), size after dbiGet (%d)\n",
-+			origlen, vp->ulen, uhlen, vp->size);
-+	        else
-+	           fprintf(stderr, "==> success\n");
- 	    }
- 	}
-     } else
-Index: rpm-5.4.14/rpmdb/db3.c
-===================================================================
---- rpm-5.4.14.orig/rpmdb/db3.c
-+++ rpm-5.4.14/rpmdb/db3.c
-@@ -1509,7 +1509,7 @@ assert(db != NULL);
- #endif
-     }
- 
--DBIDEBUG(dbi, (stderr, "<-- %s(%p,%p,%p,%p,%p,0x%x) rc %d %s%s\n", __FUNCTION__, dbi, dbcursor, key, pkey, data, flags, rc, _DBCFLAGS(flags), _KEYDATA(key, pkey, data, NULL)));
-+DBIDEBUG(dbi, (stderr, "<-- %s(%p,%p,%p,%p,%p,0x%x) rc %d %s%s\n", __FUNCTION__, dbi, dbcursor, key, pkey, data, flags, rc, _DBCFLAGS(flags), _KEYDATA(key, pkey, rc == DB_BUFFER_SMALL ? NULL : data, NULL)));
-     return rc;
- }
- /*@=mustmod@*/
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-debug-platform.patch b/meta/recipes-devtools/rpm/rpm/rpm-debug-platform.patch
deleted file mode 100644
index 2eb6e0f26bf..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-debug-platform.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-Debug the platform score generation...
-
-Index: rpm-5.4.14/lib/rpmrc.c
-===================================================================
---- rpm-5.4.14.orig/lib/rpmrc.c
-+++ rpm-5.4.14/lib/rpmrc.c
-@@ -465,6 +465,8 @@ static rpmRC rpmPlatform(const char * pl
- 
-     rc = (rpmRC) rpmiobSlurp(platform, &iob);
- 
-+    fprintf(stderr, "D: rpmPlatform file %s\n", platform);
-+
-     if (rc || iob == NULL) {
- 	rc = RPMRC_FAIL;
- 	goto exit;
-@@ -486,6 +488,7 @@ static rpmRC rpmPlatform(const char * pl
- 	    while (--t > p && xisspace(*t))
- 		*t = '\0';
- 	    if (t > p) {
-+		fprintf(stderr, "D: rpmPlatform mireAppend REGEX %s\n", p);
- 		xx = mireAppend(RPMMIRE_REGEX, 0, p, NULL, &mi_re, &mi_nre);
- 	    }
- 	    continue;
-@@ -503,6 +506,11 @@ static rpmRC rpmPlatform(const char * pl
- 		_gnu = rpmExpand("-", cvog->gnu, NULL);
- 
- 	    addMacro(NULL, "_platform_gnu", NULL, (_gnu ? _gnu : ""), -1);
-+	    fprintf(stderr, "D: rpmPlatform addMacro %s-%s-%s(%s)\n",
-+	    	rpmExpand("%{_platform_cpu}", NULL),
-+		rpmExpand("%{_platform_vendor}", NULL),
-+		rpmExpand("%{_platform_os}", NULL),
-+		rpmExpand("%{_platform_gnu}", NULL));
- #else
- 	    addMacro(NULL, "_host_cpu", NULL, cvog->cpu, -1);
- 	    addMacro(NULL, "_host_vendor", NULL, cvog->vendor, -1);
-@@ -510,6 +518,7 @@ static rpmRC rpmPlatform(const char * pl
- #endif
- 	}
- 
-+	fprintf(stderr, "D: rpmPlatform mireAppend STRCMP %s -- ", p);
- #if !defined(RPM_VENDOR_OE) /* Skip the explicit-platform */
- #if defined(RPM_VENDOR_OPENPKG) /* explicit-platform */
- 	/* do not use vendor and GNU attribution */
-@@ -519,6 +528,7 @@ static rpmRC rpmPlatform(const char * pl
- 		(cvog && *cvog->gnu ? "-" : NULL),
- 		(cvog ? cvog->gnu : NULL), NULL);
- #endif
-+	fprintf(stderr, "%s\n", p);
- 	xx = mireAppend(RPMMIRE_STRCMP, 0, p, NULL, &mi_re, &mi_nre);
- 	p = _free(p);
- #endif
-@@ -688,9 +698,12 @@ int rpmPlatformScore(const char * platfo
- 
-     if ((mire = (miRE) mi_re) != NULL)
-     for (i = 0; i < mi_nre; i++) {
--	if (mireRegexec(mire + i, platform, 0) >= 0)
-+	if (mireRegexec(mire + i, platform, 0) >= 0) {
-+	    fprintf(stderr, "D: rpmPlatformScore %s (%d)\n", platform, i + 1);
- 	    return (i + 1);
-+	}
-     }
-+    fprintf(stderr, "D: rpmPlatformScore %s (%d)\n", platform, 0);
-     return 0;
- }
- /*@=onlytrans@*/
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-disable-auto-stack-protector.patch b/meta/recipes-devtools/rpm/rpm/rpm-disable-auto-stack-protector.patch
deleted file mode 100644
index 124606c0d17..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-disable-auto-stack-protector.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Make security switches manual settings
-
-RPM checks for the availability of the stack protector switch and
-transactional-memory support.  If supported it unconditionally
-enables the compiler options which can cause errors if the support has
-not been built into the compiler.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.15/configure.ac
-===================================================================
---- rpm-5.4.15.orig/configure.ac
-+++ rpm-5.4.15/configure.ac
-@@ -425,7 +425,7 @@ dnl #  rpm_CFLAGS_ADD([-fstack-arrays],[
- dnl # build RPM instrumented for extra optimization/security (GCC only)
- dnl # --- other optimizations
-   rpm_CFLAGS_ADD([-fexceptions], [RPM_CFLAGS])
--  rpm_CFLAGS_ADD([-D_FORTIFY_SOURCE=2 -fstack-protector], [RPM_CFLAGS])
-+dnl  rpm_CFLAGS_ADD([-D_FORTIFY_SOURCE=2 -fstack-protector], [RPM_CFLAGS])
- dnl #  rpm_CFLAGS_ADD([-fstack-protector-all],[RPM_CFLAGS])
- 
-      if test \( ".`$CC --version 2>&1 | grep 'GCC'`" != . \); then
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-disable-blaketest.patch b/meta/recipes-devtools/rpm/rpm/rpm-disable-blaketest.patch
deleted file mode 100644
index adbef6df885..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-disable-blaketest.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-rpmio: Disable building of the tblake2 test(s).
-
-There is some type of a dependency fault here that can occasionally result in:
-
-gcc: error: tblake2b.o: No such file or directory
-or
-gcc: error: tblake2bp.o: No such file or directory
-
-These items are simply test cases that are not packaged, so they can be
-safely disabled to resolve the dependency issue.
-
-Upstream-Status: Inappropriate [workaround]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.15/rpmio/Makefile.am
-===================================================================
---- rpm-5.4.15.orig/rpmio/Makefile.am
-+++ rpm-5.4.15/rpmio/Makefile.am
-@@ -29,7 +29,7 @@ EXTRA_PROGRAMS += bsdiff bspatch pcrsed
- 	tmire todbc toid tperl tpython tput trpmio tsexp tsvn tsw ttcl \
- 	dumpasn1 lookup3 trel twitter github tmicrojson duk
- 
--noinst_PROGRAMS += b2sum tset tblake2b tblake2bp tblake2s tblake2sp tgfs
-+#noinst_PROGRAMS += b2sum tset tblake2b tblake2bp tblake2s tblake2sp tgfs
- if WITH_LIBGIT2
- noinst_PROGRAMS += tgit
- else
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-ensure-rpm2cpio-call-rpm-relocation-code.patch b/meta/recipes-devtools/rpm/rpm/rpm-ensure-rpm2cpio-call-rpm-relocation-code.patch
deleted file mode 100644
index 63af1002457..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-ensure-rpm2cpio-call-rpm-relocation-code.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-We need to call rpmcliInit to ensure the rpm relocation code is called
-and it correctly honours the relocation environmental variables.
-
-when we export the wrsdk and source the sdk, then execute rpm2cpio xxx.rpm|cpio -t.
-we will get the following error :
-"rpm-5.4.14/rpmdb/dbconfig.c:493:
-db3New: Assertion `dbOpts != ((void *)0) && *dbOpts != '\0'' failed.
-
-Upstream-Status: Pending
-
-Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
-Index: rpm-5.4.15/tools/rpm2cpio.c
-===================================================================
---- rpm-5.4.15.orig/tools/rpm2cpio.c	2012-04-27 01:46:51.000000000 +0800
-+++ rpm-5.4.15/tools/rpm2cpio.c	2016-09-05 11:07:30.419903338 +0800
-@@ -87,6 +87,8 @@
- #endif
- 	(void) rpmtsSetVSFlags(ts, vsflags);
- 
-+	rpmcliInit(argc, argv, NULL);
-+
- 	/*@-mustmod@*/      /* LCL: segfault */
- 	rc = rpmReadPackageFile(ts, fdi, "rpm2cpio", &h);
- 	/*@=mustmod@*/
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-fileclass.patch b/meta/recipes-devtools/rpm/rpm/rpm-fileclass.patch
deleted file mode 100644
index b1db6fff72c..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-fileclass.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-rpmfc.c:  Always generate per-file information
-
-Even when the per-file dependency generate is disabled, we want to generate
-per file classification and other associated data.
-
-Note: this is a temporary workaround.  Eventually we will want to have a way
-to seed per-file dependency and other information in order to generate a
-package from previously determined information.
-
-Upstream-Status: Pending
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/lib/rpmfc.c
-===================================================================
---- rpm-5.4.14.orig/lib/rpmfc.c
-+++ rpm-5.4.14/lib/rpmfc.c
-@@ -1734,7 +1734,6 @@ rpmRC rpmfcGenerateDepends(void * _spec,
- 	/* ... then generate dependencies using %{__find_requires} et al. */
- 	rc = rpmfcGenerateDependsHelper(spec, pkg, fi);
- 	printDeps(pkg->header);
--	return rc;
-     }
- 
-     /* Generate scriptlet Dependencies. */
-@@ -1762,8 +1761,8 @@ rpmRC rpmfcGenerateDepends(void * _spec,
-     av[ac] = NULL;
- 
-     fc = rpmfcNew();
--    fc->skipProv = !pkg->autoProv;
--    fc->skipReq = !pkg->autoReq;
-+    fc->skipProv = !pkg->autoProv || !internaldeps;
-+    fc->skipReq = !pkg->autoReq || !internaldeps;
-     fc->tracked = 0;
- 
-     {	const char * buildRootURL;
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-fix-logio-cp.patch b/meta/recipes-devtools/rpm/rpm/rpm-fix-logio-cp.patch
deleted file mode 100644
index 290ec1aa143..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-fix-logio-cp.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Occasionally the cp -p fails with a non-zero return code.  This will cause
-the system abort the build.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm/rpmdb/Makefile.am
-===================================================================
---- rpm.orig/rpmdb/Makefile.am
-+++ rpm/rpmdb/Makefile.am
-@@ -234,11 +234,14 @@ lcov-report:
- #lcov-upload: lcov
- #	rsync -rvz -e ssh --delete lcov/* ???
- 
-+$(builddir)/logio_recover_template: $(srcdir)/logio_recover_template
-+	@if test ".$(builddir)" != ".$(srcdir)"; then \
-+		cp -fp $(srcdir)/logio_recover_template \
-+		      $(builddir)/logio_recover_template ; \
-+	 fi
-+
- logio_BUILT = logio_auto.c logio_autop.c logio_auto.h logio_template
--$(logio_BUILT):	logio.awk logio.src logio_recover_template
--	@test -e $(builddir)/logio_recover_template || \
--		cp -p $(srcdir)/logio_recover_template \
--		      $(builddir)/logio_recover_template
-+$(logio_BUILT):	logio.awk logio.src $(builddir)/logio_recover_template
- 	@rm -f $(logio_BUILT)
- 	@$(AWK) -f $(srcdir)/logio.awk \
- 		-v header_file=logio_auto.h \
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-fix-lua-tests-compilation-failure.patch b/meta/recipes-devtools/rpm/rpm/rpm-fix-lua-tests-compilation-failure.patch
deleted file mode 100644
index 1a08243ab16..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-fix-lua-tests-compilation-failure.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-Upstream-Status: Pending
-
-Subject: lua: fix to build test libs correctly
-
-This patch fixes errors like below.
-
-  | gcc: error: lib21.c: No such file or directory
-  | gcc: fatal error: no input files
-
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- lua/tests/libs/Makefile.am | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/lua/tests/libs/Makefile.am b/lua/tests/libs/Makefile.am
-index 19d1a0b..1e5de72 100644
---- a/lua/tests/libs/Makefile.am
-+++ b/lua/tests/libs/Makefile.am
-@@ -28,16 +28,16 @@ clean:
- 	rm -f lib1.so lib11.so lib2.so lib21.so lib2-v2.so
- 
- lib1.so: lib1.c
--	$(CC) $(CFLAGS) -o lib1.so lib1.c
-+	$(CC) $(CFLAGS) -o lib1.so $(top_srcdir)/lua/tests/libs/lib1.c
- 
- lib11.so: lib11.c
--	$(CC) $(CFLAGS) -o lib11.so lib11.c
-+	$(CC) $(CFLAGS) -o lib11.so $(top_srcdir)/lua/tests/libs/lib11.c
- 
- lib2.so: lib2.c
--	$(CC) $(CFLAGS) -o lib2.so lib2.c
-+	$(CC) $(CFLAGS) -o lib2.so $(top_srcdir)/lua/tests/libs/lib2.c
- 
- lib21.so: lib21.c
--	$(CC) $(CFLAGS) -o lib21.so lib21.c
-+	$(CC) $(CFLAGS) -o lib21.so $(top_srcdir)/lua/tests/libs/lib21.c
- 
- lib2-v2.so: lib2.so
- 	mv lib2.so ./lib2-v2.so
--- 
-1.9.1
-
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-fix-parseEmbedded.patch b/meta/recipes-devtools/rpm/rpm/rpm-fix-parseEmbedded.patch
deleted file mode 100644
index c57f24cd726..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-fix-parseEmbedded.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Fix an issue where parseEmbedded is not defined, but is still used.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm/rpmio/macro.c
-===================================================================
---- rpm.orig/rpmio/macro.c
-+++ rpm/rpmio/macro.c
-@@ -1616,8 +1616,6 @@ exit:
-  * @retval *avp		invocation args
-  * @return		script string
-  */
--#if defined(WITH_AUGEAS) || defined(WITH_FICL) || defined(WITH_MOZJS) || defined(WITH_JNIEMBED) || defined(WITH_PERLEMBED) || defined(WITH_PYTHONEMBED) || defined(WITH_RUBYEMBED) || defined(WITH_MRUBY_EMBED) || defined(WITH_SQLITE) || defined(WITH_SQUIRREL) || defined(WITH_TCL)
--
- static char _FIXME_embedded_interpreter_eval_returned_null[] =
-     "FIXME: embedded interpreter eval returned null.";
- 
-@@ -1668,7 +1666,6 @@ bingo:
-     script[nb] = '\0';
-     return script;
- }
--#endif
- 
- /**
-  * The main macro recursion loop.
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-gnu-atomic.patch b/meta/recipes-devtools/rpm/rpm/rpm-gnu-atomic.patch
deleted file mode 100644
index 36a418fc6a7..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-gnu-atomic.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-configure.ac: Check if the current compiler supports the transactions
-
-Some distributions appear to have compilers that are built without support
-for transactions, even though they are GCC 4.7 or newer.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.15/configure.ac
-===================================================================
---- rpm-5.4.15.orig/configure.ac
-+++ rpm-5.4.15/configure.ac
-@@ -425,9 +425,34 @@ dnl # --- other optimizations
-   rpm_CFLAGS_ADD([-D_FORTIFY_SOURCE=2 -fstack-protector], [RPM_CFLAGS])
- dnl #  rpm_CFLAGS_ADD([-fstack-protector-all],[RPM_CFLAGS])
- 
--     if test \( ".`$CC --version 2>&1 | grep 'GCC'`" != . \); then
--         rpm_CFLAGS_ADD([-fgnu-tm], [RPM_CFLAGS])
--     fi
-+dnl # Check if the current gcc supports -fgnu-tm and __transaction_atomic
-+AC_MSG_CHECKING([If the compiler supports __transaction_atomic])
-+save_CFLAGS="$CFLAGS"
-+save_LDFLAGS="$LDFLAGS"
-+CFLAGS="${CFLAGS} -fgnu-tm -litm"
-+LDFLAGS="${LDFLAGS} -litm"
-+AC_LINK_IFELSE([AC_LANG_SOURCE([[
-+int
-+main()
-+{
-+#if !__clang__ &&  ((__GNUC__ == 4 && __GNUC_MINOR__ >= 7) || (__GNUC__ > 4)) /* XXX gud enuf? */
-+        int i = 0;
-+        __transaction_atomic { i++; }
-+#else
-+# error Compiler does not support __transaction_atomic
-+#endif
-+        return 0;
-+}
-+]])], [
-+        AC_DEFINE([HAVE_GNUC_TM_ATOMIC], [1],
-+                [Define to 1 if the compiler supports __transaction_atomic.])
-+        AC_MSG_RESULT([yes])
-+], [
-+	CFLAGS="$save_CFLAGS"
-+	LDFLAGS="$save_LDFLAGS"
-+	AC_MSG_RESULT([no])
-+])
-+
- 
- dnl # --- options below are added to RPM_CFLAGS but _NOT_ added to CFLAGS
-             CPPFLAGS="$CPPFLAGS $RPM_CPPFLAGS"
-Index: rpm-5.4.15/rpmio/rpmutil.h
-===================================================================
---- rpm-5.4.15.orig/rpmio/rpmutil.h
-+++ rpm-5.4.15/rpmio/rpmutil.h
-@@ -105,7 +105,7 @@
- #  define RPM_GNUC_INTERNAL
- #endif
- 
--#if !__clang__ &&  __GNUC__ == 4 && __GNUC_MINOR__ >= 7	/* XXX gud enuf? */
-+#ifdef HAVE_GNUC_TM_ATOMIC
- #  define RPM_GNUC_TM_SAFE	__attribute__((transaction_safe))
- #  define RPM_GNUC_TM_PURE	__attribute__((transaction_pure))
- #  define RPM_GNUC_TM_CALLABLE	__attribute__((transaction_callable))
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-hardlink-segfault-fix.patch b/meta/recipes-devtools/rpm/rpm/rpm-hardlink-segfault-fix.patch
deleted file mode 100644
index 057925fb647..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-hardlink-segfault-fix.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-We need to sanity check that the nlink size and our linksLeft counter
-do match. If an rpm is badly constructed with identical inode values
-for multiple hardlinked files, such an rpm will otherwise access memory
-out of array bounds and cause memory corruption and crashes.
-
-The fix is to add in the sanity check and exit if bad circumstances
-are found. We need to fix the caller to check the return code too.
-
-RP 2014/6/10
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Index: rpm-5.4.14/lib/fsm.c
-===================================================================
---- rpm-5.4.14.orig/lib/fsm.c
-+++ rpm-5.4.14/lib/fsm.c
-@@ -495,6 +495,11 @@ static int saveHardLink(/*@special@*/ /*
-     }
- 
-     if (fsm->goal == IOSM_PKGBUILD) --fsm->li->linksLeft;
-+    if (fsm->li->linksLeft > st->st_nlink) {
-+	rpmlog(RPMLOG_ERR, _("Corrupted hardlinks found (count %d does not match %d), exiting.\n"), fsm->li->linksLeft, st->st_nlink);
-+	return -1;
-+    }
-+
-     fsm->li->filex[fsm->li->linksLeft] = fsm->ix;
-     /*@-observertrans -dependenttrans@*/
-     fsm->li->nsuffix[fsm->li->linksLeft] = fsm->nsuffix;
-@@ -1878,8 +1883,13 @@ if (!(fsmGetFi(fsm)->mapflags & IOSM_PAY
- 	fsm->postpone = iosmFileActionSkipped(fsm->action);
- 	if (fsm->goal == IOSM_PKGINSTALL || fsm->goal == IOSM_PKGBUILD) {
- 	    /*@-evalorder@*/ /* FIX: saveHardLink can modify fsm */
--	    if (S_ISREG(st->st_mode) && st->st_nlink > 1)
-+	    if (S_ISREG(st->st_mode) && st->st_nlink > 1) {
- 		fsm->postpone = saveHardLink(fsm);
-+		if (fsm->postpone < 0) {
-+		    rc = RPMRC_FAIL;
-+		    break;
-+		}
-+	    }
- 	    /*@=evalorder@*/
- 	}
- if (fsmGetFi(fsm)->mapflags & IOSM_PAYLOAD_LIST) fsm->postpone = 1;
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-keccak-sse-intrin.patch b/meta/recipes-devtools/rpm/rpm/rpm-keccak-sse-intrin.patch
deleted file mode 100644
index 72884d4ad4e..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-keccak-sse-intrin.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-rpm - rpmio/keccak.c: make SSE/MMX dependent upon gcc config
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.15/rpmio/keccak.c
-===================================================================
---- rpm-5.4.15.orig/rpmio/keccak.c
-+++ rpm-5.4.15/rpmio/keccak.c
-@@ -17,9 +17,13 @@ http://keccak.noekeon.org/
- #if OPTIMIZED == 64
- /* ===== "KeccakOpt64-settings.h" */
- #define Unrolling 18
--//#define UseBebigokimisa
--#define UseSSE
--//#define UseMMX
-+#if defined(__SSE2__)
-+ #define UseSSE
-+#elif defined(__MMX__)
-+ #define UseMMX
-+#else
-+ #define UseBebigokimisa
-+#endif
- /* ===== */
- #endif
- 
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch b/meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch
deleted file mode 100644
index 1a48db63c65..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 67ec7531e6297200eaa97ef917d49b0a75876cb4 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Wed, 2 Dec 2015 00:56:07 -0800
-Subject: [PATCH] lib/transaction.c: fix file conflicts for MIPS64 N32
-
-The following error can occur:
-  smart install libc6-2.22-r0.1@lib32_mips32r2octeon3 libc6-dbg-2.22-r0.1@lib32_mips32r2octeon3
-error: file /sbin/ldconfig conflicts between attempted installs of libc6-2.22-r0.1.lib32_mips32r2octeon3 and libc6-2.22-r0.1.octeon3_n32
-error: file /sbin/.debug/ldconfig conflicts between attempted installs of libc6-dbg-2.22-r0.1.lib32_mips32r2octeon3 and libc6-dbg-2.22-r0.1.octeon3_n32
-
-This was because:
-transactions_color = 001 (ELF32) & 010 (ELF64) & 100 (ELF32 N32 MIPS64)
-FColor = Current file color (001) & transaction_color (111)
-oFcolor = Previous file color (100) & transaction_color (111)
-
-There are two places where the conflict comparisons occur.  In both places
-the 'else' clause was too restrictive (opposite of the 'positive' clause).
-This caused the system to only permit a binary comparison - "new preferred" or
-"old preferred".  It did not permissing "neither preferred".  By removing the
-else comparison the system will now perform a 'last-in-wins' resolution when
-"neither is preferred".
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
----
- lib/transaction.c |    3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-Index: rpm-5.4.14/lib/transaction.c
-===================================================================
---- rpm-5.4.14.orig/lib/transaction.c
-+++ rpm-5.4.14/lib/transaction.c
-@@ -154,7 +154,7 @@ static int handleInstInstalledFile(const
- 		fi->actions[fx] = FA_SKIPCOLOR;
- #endif
- 		rConflicts = 0;
--	    } else if (FColor & prefcolor) {
-+	    } else {
- #ifdef	REFERENCE
- 		rpmfsSetAction(fs, fx, FA_CREATE);
- #else
-@@ -420,7 +420,7 @@ assert(otherFi != NULL);
- 			fi->actions[i] = FA_SKIPCOLOR;
- 			rConflicts = 0;
- 		    } else
--		    if (FColor == 0 && oFColor == 0) {
-+		    {
- 			/* ... otherwise, do both, last in wins. */
- 			otherFi->actions[otherFileNum] = FA_CREATE;
- 			fi->actions[i] = FA_CREATE;
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-libsql-fix.patch b/meta/recipes-devtools/rpm/rpm/rpm-libsql-fix.patch
deleted file mode 100644
index e87e02b69b9..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-libsql-fix.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-During installation, the libtool relink attempts to link to -lrpm...
-The problem is that it hasn't been installed yet!  So small change causes
-the libtool to instead use the build version.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/lib/Makefile.am
-===================================================================
---- rpm-5.4.14.orig/lib/Makefile.am
-+++ rpm-5.4.14/lib/Makefile.am
-@@ -120,6 +120,9 @@ librpm.la: $(librpm_la_OBJECTS) $(librpm
- #libsql_la_SOURCES	= libsql.c
- #libsql_la_LIBADD	= librpm.la $(RPMDB_LDADD_COMMON)
- 
-+# pkglib libraries needs to have usrlib libraries already installed!
-+install-pkglibLTLIBRARIES: install-usrlibLTLIBRARIES
-+
- install-data-hook:
- if !ENABLE_BUILD_LAFILES
- 	-for l in $(usrlib_LTLIBRARIES); do \
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-log-auto-rm.patch b/meta/recipes-devtools/rpm/rpm/rpm-log-auto-rm.patch
deleted file mode 100644
index 3153f7a3865..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-log-auto-rm.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-
-Upstream-Status: Inappropriate [configuration]
-
-Index: rpm-5.4.14/rpmdb/DB_CONFIG.in
-===================================================================
---- rpm-5.4.14.orig/rpmdb/DB_CONFIG.in
-+++ rpm-5.4.14/rpmdb/DB_CONFIG.in
-@@ -4,6 +4,7 @@ set_data_dir .
- set_create_dir .
- set_lg_dir ./log
- set_tmp_dir ./tmp
-+set_flags db_log_autoremove on
- 
- # -- thread_count must be >= 8
- set_thread_count 64
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-lsb-compatibility.patch b/meta/recipes-devtools/rpm/rpm/rpm-lsb-compatibility.patch
deleted file mode 100644
index a87518ba3a3..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-lsb-compatibility.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Enable platform tag matching workaround in OE.
-
-When installing some LSB packages the 'platform' field in the package
-appears to be invalid.  Instead of relying solely on the platform comparison
-we also want to generate a perceived platform based on the valid rpm contents
-of arch and os.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/lib/depends.c
-===================================================================
---- rpm-5.4.14.orig/lib/depends.c
-+++ rpm-5.4.14/lib/depends.c
-@@ -595,7 +595,7 @@ int rpmtsAddInstallElement(rpmts ts, Hea
- 	    platform = rpmExpand(arch, "-unknown-", os, NULL);
- 
- 	rc = rpmPlatformScore(platform, platpat, nplatpat);
--#if defined(RPM_VENDOR_MANDRIVA)
-+#if defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_OE)
- 	/*
- 	 * If no match on platform tag, we'll try again with arch tag
- 	 * in case platform tag is inconsistent with it, which is the case
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-lua.patch b/meta/recipes-devtools/rpm/rpm/rpm-lua.patch
deleted file mode 100644
index a9930d6705f..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-lua.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Add support for cross compiling lua
-
-Upstream-Status: Pending
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/configure.ac
-===================================================================
---- rpm-5.4.14.orig/configure.ac
-+++ rpm-5.4.14/configure.ac
-@@ -121,6 +121,9 @@ AC_PROG_YACC
- 
- 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,
-Index: rpm-5.4.14/lua/Makefile.am
-===================================================================
---- rpm-5.4.14.orig/lua/Makefile.am
-+++ rpm-5.4.14/lua/Makefile.am
-@@ -41,7 +41,7 @@ rpmluac_LDADD = liblua.la
- 
- # --- 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-macros.in-disable-external-key-server.patch b/meta/recipes-devtools/rpm/rpm/rpm-macros.in-disable-external-key-server.patch
deleted file mode 100644
index a08412aa916..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-macros.in-disable-external-key-server.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-disable external key server
-
-Upstream-Status: Pending
-
-When RPM experiences a signed package, with a signature that it does NOT know.
-By default it will send the -fingerprint- (and only the 16 digit fingerprint) to
-an external HKP server, trying to get the key down.
-
-This is probably not a reasonable default behavior for the system to do, instead
-it should simply fail the key lookup.  If someone wants to enable the HKP server
-it's easy enough to do by enabling the necessary macros.
-
-Signed-off-by: yzhu1 <yanjun.zhu@windriver.com>
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Index: rpm/macros/macros.in
-===================================================================
---- rpm.orig/macros/macros.in
-+++ rpm/macros/macros.in
-@@ -563,10 +563,10 @@ $_arbitrary_tags_tests	Foo:Bar
- 
- # Horowitz Key Protocol server configuration
- #
--%_hkp_keyserver         hkp://keys.rpm5.org
-+#%_hkp_keyserver         hkp://keys.rpm5.org
- #%_hkp_keyserver         hkp://keys.n3npq.net
- #%_hkp_keyserver         hkp://pool.sks-keyservers.net
--%_hkp_keyserver_query   %{_hkp_keyserver}/pks/lookup?op=get&search=
-+#%_hkp_keyserver_query   %{_hkp_keyserver}/pks/lookup?op=get&search=
- 
- 
- # NSS_InitContext() parameter configuration
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-macros.patch b/meta/recipes-devtools/rpm/rpm/rpm-macros.patch
deleted file mode 100644
index c7ab2d2bb7a..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-macros.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-macros/macros.in: Revert settings to the same as RPM 5.4.0
-
-Enable a reasonable set of rpmdeps dependency helper macros.  These sets
-were used by RPM 5.4.0.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/macros/macros.in
-===================================================================
---- rpm-5.4.14.orig/macros/macros.in
-+++ rpm-5.4.14/macros/macros.in
-@@ -1022,7 +1022,7 @@ $_arbitrary_tags_tests	Foo:Bar
- 
- #==============================================================================
- # ---- rpmbuild macros.
--#%%{load:%{_usrlibrpm}/macros.rpmbuild}
-+%{load:%{_usrlibrpm}/macros.rpmbuild}
- 
- #------------------------------------------------------------------------
- # cmake(...) configuration
-@@ -1038,15 +1038,15 @@ $_arbitrary_tags_tests	Foo:Bar
- 
- #------------------------------------------------------------------------
- # perl(...) configuration
--#%%{load:%{_usrlibrpm}/macros.d/perl}
-+%{load:%{_usrlibrpm}/macros.d/perl}
- 
- #------------------------------------------------------------------------
- # python(...) configuration.
--#%%{load:%{_usrlibrpm}/macros.d/python}
-+%{load:%{_usrlibrpm}/macros.d/python}
- 
- #------------------------------------------------------------------------
- # php(...) configuration.
--#%%{load:%{_usrlibrpm}/macros.d/php}
-+%{load:%{_usrlibrpm}/macros.d/php}
- 
- #------------------------------------------------------------------------
- # java(...) configuration.
-@@ -1054,11 +1054,11 @@ $_arbitrary_tags_tests	Foo:Bar
- 
- #------------------------------------------------------------------------
- # libtool(...) configuration.
--#%%{load:%{_usrlibrpm}/macros.d/libtool}
-+%{load:%{_usrlibrpm}/macros.d/libtool}
- 
- #------------------------------------------------------------------------
- # pkgconfig(...) configuration.
--#%%{load:%{_usrlibrpm}/macros.d/pkgconfig}
-+%{load:%{_usrlibrpm}/macros.d/pkgconfig}
- 
- #------------------------------------------------------------------------
- # mono(...) configuration.
-@@ -1070,7 +1070,7 @@ $_arbitrary_tags_tests	Foo:Bar
- 
- #------------------------------------------------------------------------
- # tcl(...) configuration.
--#%%{load:%{_usrlibrpm}/macros.d/tcl}
-+%{load:%{_usrlibrpm}/macros.d/tcl}
- 
- #------------------------------------------------------------------------
- # typelib(...) configuration.
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-mongodb-sasl.patch b/meta/recipes-devtools/rpm/rpm/rpm-mongodb-sasl.patch
deleted file mode 100644
index 6c3e4718b95..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-mongodb-sasl.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-Fix errors when building with sasl2 disabled
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm/rpmio/mongoc.c
-===================================================================
---- rpm.orig/rpmio/mongoc.c
-+++ rpm/rpmio/mongoc.c
-@@ -39,8 +39,10 @@
- # include <winerror.h>
- #endif
- 
-+#ifdef HAVE_LIBSASL2
- #include <sasl/sasl.h>
- #include <sasl/saslutil.h>
-+#endif
- 
- #include <openssl/bio.h>
- #include <openssl/ssl.h>
-@@ -14228,6 +14230,7 @@ mongoc_read_prefs_copy (const mongoc_rea
-    return ret;
- }
- 
-+#ifdef MONGOC_ENABLE_SASL
- /*==============================================================*/
- /* --- mongoc-sasl.c */
- 
-@@ -14555,6 +14558,7 @@ _mongoc_sasl_step (mongoc_sasl_t *sasl,
- 
-    return true;
- }
-+#endif
- 
- /*==============================================================*/
- /* --- mongoc-socket.c */
-Index: rpm/rpmio/mongoc.h
-===================================================================
---- rpm.orig/rpmio/mongoc.h
-+++ rpm/rpmio/mongoc.h
-@@ -38,8 +38,10 @@
- # include <sys/un.h>
- #endif
- 
-+#ifdef HAVE_LIBSASL2
- #include <sasl/sasl.h>
- #include <sasl/saslutil.h>
-+#endif
- 
- #include <openssl/bio.h>
- #include <openssl/ssl.h>
-@@ -2455,6 +2457,8 @@ BSON_END_DECLS
- /*==============================================================*/
- /* --- mongoc-sasl-private.h */
- 
-+#ifdef MONGOC_ENABLE_SASL
-+
- BSON_BEGIN_DECLS
- 
- 
-@@ -2498,6 +2502,7 @@ bool _mongoc_sasl_step             (mong
- 
- 
- BSON_END_DECLS
-+#endif
- 
- /*==============================================================*/
- /* --- mongoc-ssl-private.h */
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-no-loopmsg.patch b/meta/recipes-devtools/rpm/rpm/rpm-no-loopmsg.patch
deleted file mode 100644
index e58cc13a6fd..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-no-loopmsg.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-lib/order.c: Make the dependency loop messages into debug msgs
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/lib/order.c
-===================================================================
---- rpm-5.4.14.orig/lib/order.c
-+++ rpm-5.4.14/lib/order.c
-@@ -2175,7 +2175,7 @@ rescan:
- 		const char * dp;
- 		rpmlogLvl msglvl = (anaconda || (rpmtsDFlags(ts) & RPMDEPS_FLAG_DEPLOOPS))
- 			? RPMLOG_WARNING : RPMLOG_ERR;
--#if defined(RPM_VENDOR_MANDRIVA) /* loop-detection-optional-loglevel */
-+#if defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_OE) /* loop-detection-optional-loglevel */
- 		// Report loops as debug-level message by default (7 = RPMLOG_DEBUG), overridable
- 		msglvl = rpmExpandNumeric("%{?_loop_detection_loglevel}%{?!_loop_detection_loglevel:7}");
- #endif
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-no-perl-urpm.patch b/meta/recipes-devtools/rpm/rpm/rpm-no-perl-urpm.patch
deleted file mode 100644
index 58182296cfb..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-no-perl-urpm.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-Disable perl-URPM support
-
-This causes a configure failure when perl-URPM is not used.
-
-| configure.ac:1159: required file `perl-URPM/Makefile.PL.in' not found
-| configure.ac:1159: required file `perl-URPM/Makefile.in' not found
-
-Upstream-Status: Inappropriate [disable feature]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/configure.ac
-===================================================================
---- rpm-5.4.14.orig/configure.ac
-+++ rpm-5.4.14/configure.ac
-@@ -1186,30 +1186,10 @@ AC_SUBST(WITH_PERL_SUBDIR)
- AC_SUBST(WITH_PERL_SUBPACKAGE)
- AC_SUBST(WITH_PERL_LIBS)
- 
--dnl # optional Perl-URPM language bindings
-+dnl # disable Perl-URPM language bindings
- WITH_PERL_URPM_SUBDIR=""
- WITH_PERL_URPM_SUBPACKAGE=0
- WITH_PERL_URPM_LIBS=""
--if test ".$WITH_PTHREADS" = .yes; then
--    WITH_PERL_URPM_LIBS="$LIBS"
--fi
--AC_ARG_WITH(perl-urpm, AS_HELP_STRING([--with-perl-urpm], [build with Perl URPM language bindings]), [
--    if test ".$withval" != .no; then
--	PERL_URPM_INSTALLDIRS=""
--	   if test "$withval" == "vendor"; then
--		    PERL_URPM_INSTALLDIRS="'INSTALLDIRS'	=> 'vendor',"
--	    fi
--	    if test "$withval" == "site"; then
--		    PERL_URPM_INSTALLDIRS="'INSTALLDIRS'     => 'site',"
--	    fi
--	    AC_DEFINE_UNQUOTED([PERL_URPM_INSTALLDIRS], [$PERL_URPM_INSTALLDIRS], [Perl install directory (vendor/site)])
--	    AC_SUBST(PERL_URPM_INSTALLDIRS)
--        WITH_PERL_URPM_SUBDIR=perl-URPM
--        WITH_PERL_URPM_SUBPACKAGE=1
--        AC_CONFIG_FILES([perl-URPM/Makefile.PL])
--        AC_CONFIG_FILES([perl-URPM/Makefile])
--    fi
--])
- AC_SUBST(WITH_PERL_URPM_SUBDIR)
- AC_SUBST(WITH_PERL_URPM_SUBPACKAGE)
- AC_SUBST(WITH_PERL_URPM_LIBS)
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-opendb-before-verifyscript-to-avoid-null-point.patch b/meta/recipes-devtools/rpm/rpm/rpm-opendb-before-verifyscript-to-avoid-null-point.patch
deleted file mode 100644
index e2191245f87..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-opendb-before-verifyscript-to-avoid-null-point.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-rpm: opendb before rpmverifyscript to avoid null point input
-
-If the command is "rpm -V" and the return value of (headerIsEntry(h, RPMTAG_VERIFYSCRIPT) 
-|| headerIsEntry(h, RPMTAG_SANITYCHECK)) located in /lib/verify.c is true, it will call
-rpmpsmStage function(rpmVerifyScript->rpmpsmScriptStage->rpmpsmStage) and occur segment
-fault because of null point(rpmtsGetRdb(ts) == NULL and rpmtsGetRdb(ts)->db_txn).
-So we open rpmdb to avoid bad input when find headerIsEntry true.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
-Index: rpm-5.4.14/lib/verify.c
-===================================================================
---- rpm-5.4.14.orig/lib/verify.c	2015-07-22 22:09:59.992895355 +0800
-+++ rpm-5.4.14/lib/verify.c	2015-08-13 10:20:33.752177906 +0800
-@@ -613,6 +613,8 @@
- 	{
- 	    FD_t fdo = fdDup(STDOUT_FILENO);
- 
-+	    rpmtsOpenDB(ts, O_RDONLY);            /*Open the DB to avoid null point input in function rpmpsmStage()*/
-+
- 	    rc = rpmfiSetHeader(fi, h);
- 	    if ((rc = rpmVerifyScript(qva, ts, fi, fdo)) != 0)
- 		ec += rc;
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-ossp-uuid.patch b/meta/recipes-devtools/rpm/rpm/rpm-ossp-uuid.patch
deleted file mode 100644
index 691aba9ea3d..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-ossp-uuid.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Fix integration of ossp-uuid
-
-We need to avoid including the util-linux uuid library, instead
-we need ossp-uuid.  There is a related hack in do_configure to
-make sure that we use the right .pc file as well.
-
-Upstream-Status: Inappropriate [disable feature]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/configure.ac
-===================================================================
---- rpm-5.4.14.orig/configure.ac
-+++ rpm-5.4.14/configure.ac
-@@ -1951,7 +1951,7 @@ grep -v 'define HAVE_UNISTD_H' confdefs.
- esac
- RPM_CHECK_LIB(
-     [OSSP uuid], [uuid],
--    [ossp-uuid uuid], [uuid_import], [uuid.h],
-+    [ossp-uuid], [uuid_import], [uuid.h],
-     [no,external:none], [],
-     [ dnl # enable OSSP uuid native API support for embedded Lua
-       if test ".$WITH_LUA" = .yes; then
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-packageorigin.patch b/meta/recipes-devtools/rpm/rpm/rpm-packageorigin.patch
deleted file mode 100644
index 57fc6ce88ce..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-packageorigin.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Add the ability to query the packageorigin
-
-Written by jbj at rpm5.org
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/rpmdb/hdrfmt.c
-===================================================================
---- rpm-5.4.14.orig/rpmdb/hdrfmt.c
-+++ rpm-5.4.14/rpmdb/hdrfmt.c
-@@ -2409,8 +2409,10 @@ static int pkgoriginTag(Header h, HE_t h
-     int rc = 1;
- 
-     he->tag = RPMTAG_PACKAGEORIGIN;
--    if (!headerGet(h, he, HEADERGET_NOEXTENSION)
--     && (origin = headerGetOrigin(h)) != NULL)
-+    /* XXX two sources for tag data: what search precedence? */
-+    if (headerGet(h, he, HEADERGET_NOEXTENSION))
-+	rc = 0;
-+    else if ((origin = headerGetOrigin(h)) != NULL)
-     {
- 	he->t = RPM_STRING_TYPE;
- 	he->p.str = xstrdup(origin);
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-payload-use-hashed-inode.patch b/meta/recipes-devtools/rpm/rpm/rpm-payload-use-hashed-inode.patch
deleted file mode 100644
index af643b1c62f..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-payload-use-hashed-inode.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-If we run builds on a filesystem with 64 bit inodes like XFS, we need to
-map the inode numbers to something 32 bit since the cpio header only allows
-for 32 bit inode values. If we don't do this:
-
-#define SET_NUM_FIELD(phys, val, space) \
-        sprintf(space, "%8.8lx", (unsigned long) (val)); \
-        memcpy(phys, space, 8)
-
-from cpio.c will print larger that 8 character values and then truncate the 
-LSBs. This generates cpio files where hardlinked files may have the same
-inode number. The resulting rpms are then corrupted.
-
-There is a separate patch for the crash the identical inode numbers causes
-when extracting the rpm.
-
-Patch taken from http://git.pld-linux.org/?p=packages/rpm.git;a=commitdiff;h=10526c23aac60b7b636e4c93862887dbef8e8f15
-
-RP 2014/6/10
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Index: rpm-5.4.14/build/files.c
-===================================================================
---- rpm-5.4.14.orig/build/files.c
-+++ rpm-5.4.14/build/files.c
-@@ -1328,6 +1328,26 @@ static rpmuint32_t getDigestAlgo(Header
-     return dalgo;
- }
- 
-+static int isHardLink(FileListRec flp, FileListRec tlp)
-+{
-+    return ((S_ISREG(flp->fl_mode) && S_ISREG(tlp->fl_mode)) &&
-+            ((flp->fl_nlink > 1) && (flp->fl_nlink == tlp->fl_nlink)) &&
-+            (flp->fl_ino == tlp->fl_ino) &&
-+            (flp->fl_dev == tlp->fl_dev));
-+}
-+
-+static int seenHardLink(FileList fl, FileListRec flp, ino_t *fileid)
-+{
-+    FileListRec ilp;
-+    for (ilp = fl->fileList; ilp < flp; ilp++) {
-+        if (isHardLink(flp, ilp)) {
-+            *fileid = ilp - fl->fileList;
-+            return 1;
-+        }
-+    }
-+    return 0;
-+}
-+
- /**
-  * Add file entries to header.
-  * @todo Should directories have %doc/%config attributes? (#14531)
-@@ -1374,6 +1394,7 @@ memset(buf, 0, sizeof(buf));	/* XXX valg
- 
-     for (i = 0, flp = fl->fileList; i < fl->fileListRecsUsed; i++, flp++) {
- 	const char *s;
-+	ino_t fileid = flp - fl->fileList;
- 
-  	/* Merge duplicate entries. */
- 	while (i < (fl->fileListRecsUsed - 1) &&
-@@ -1436,6 +1457,13 @@ memset(buf, 0, sizeof(buf));	/* XXX valg
- 	/* Leave room for both dirname and basename NUL's */
- 	dpathlen += (strlen(flp->diskURL) + 2);
- 
-+	/* Excludes and dupes have been filtered out by now. */
-+	if (S_ISREG(flp->fl_mode)) {
-+	    if (flp->fl_nlink == 1 || !seenHardLink(fl, flp, &fileid)) {
-+		fl->totalFileSize += flp->fl_size;
-+	    }
-+	}
-+
- 	/*
- 	 * Make the header, the OLDFILENAMES will get converted to a 
- 	 * compressed file list write before we write the actual package to
-@@ -1518,7 +1546,11 @@ memset(buf, 0, sizeof(buf));	/* XXX valg
- 
- 	/* XXX Hash instead of 64b->32b truncate to prevent aliasing. */
- 	{   ino_t _ino = flp->fl_ino;
-+	/* don't use hash here, as hash collisions which happen on large packages
-+	   cause bus errors in rpmbuild
- 	    ui32 = hashFunctionString(0, &_ino, sizeof(_ino));
-+	*/
-+	    ui32 = fileid + 1;
- 	}
- 	he->tag = RPMTAG_FILEINODES;
- 	he->t = RPM_UINT32_TYPE;
-@@ -1751,39 +1783,6 @@ if (_rpmbuildFlags & 4) {
- 		IOSM_MAP_TYPE | IOSM_MAP_MODE | IOSM_MAP_UID | IOSM_MAP_GID;
- 	if (isSrc)
- 	    fi->fmapflags[i] |= IOSM_FOLLOW_SYMLINKS;
--
--	if (S_ISREG(flp->fl_mode)) {
--	    int bingo = 1;
--	    /* Hard links need be tallied only once. */
--	    if (flp->fl_nlink > 1) {
--		FileListRec jlp = flp + 1;
--		int j = i + 1;
--		for (; (unsigned)j < fi->fc; j++, jlp++) {
--		    /* follow outer loop logic */
--		    while (((jlp - fl->fileList) < (fl->fileListRecsUsed - 1)) &&
--			    !strcmp(jlp->fileURL, jlp[1].fileURL))
--			jlp++;
--		    if (jlp->flags & RPMFILE_EXCLUDE) {
--			j--;
--			/*@innercontinue@*/ continue;
--		    }
--		    if (jlp->flags & RPMFILE_GHOST)
--		        /*@innercontinue@*/ continue;
--		    if (!S_ISREG(jlp->fl_mode))
--			/*@innercontinue@*/ continue;
--		    if (flp->fl_nlink != jlp->fl_nlink)
--			/*@innercontinue@*/ continue;
--		    if (flp->fl_ino != jlp->fl_ino)
--			/*@innercontinue@*/ continue;
--		    if (flp->fl_dev != jlp->fl_dev)
--			/*@innercontinue@*/ continue;
--		    bingo = 0;	/* don't tally hardlink yet. */
--		    /*@innerbreak@*/ break;
--		}
--	    }
--	    if (bingo)
--		fl->totalFileSize += flp->fl_size;
--	}
-     }
- 
-     ui32 = fl->totalFileSize;
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-pkgconfigdeps.patch b/meta/recipes-devtools/rpm/rpm/rpm-pkgconfigdeps.patch
deleted file mode 100644
index 656de86d709..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-pkgconfigdeps.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-pkgconfigdeps.sh: Change to restricting pkgconfig to the local directory
-
-Using PKG_CONFIG_PATH will allow pkg-config to fall back to the system paths,
-we don't want this as it may lead to inaccurate results in some corner cases.
-
-PKG_CONFIG_LIBDIR will ensure pkg-config stays within the install directory.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm/scripts/pkgconfigdeps.sh
-===================================================================
---- rpm.orig/scripts/pkgconfigdeps.sh
-+++ rpm/scripts/pkgconfigdeps.sh
-@@ -18,8 +18,8 @@ case $1 in
-     *.pc)
- 	# Query the dependencies of the package.
- 	DIR=$(dirname ${filename})
--	PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig"
--	export PKG_CONFIG_PATH
-+	PKG_CONFIG_LIBDIR="$DIR:$DIR/../../share/pkgconfig"
-+	export PKG_CONFIG_LIBDIR
- 	$pkgconfig --print-provides "$filename" 2> /dev/null | while read n r v ; do
- 	    [ -n "$n" ] || continue
- 	    # We have a dependency.  Make a note that we need the pkgconfig
-@@ -42,8 +42,8 @@ case $1 in
- 	[ -n "$oneshot" ] && echo "$oneshot"; oneshot=""
- 	# Query the dependencies of the package.
- 	DIR=$(dirname ${filename})
--	PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig"
--	export PKG_CONFIG_PATH
-+	PKG_CONFIG_LIBDIR="$DIR:$DIR/../../share/pkgconfig"
-+	export PKG_CONFIG_LIBDIR
- 	$pkgconfig --print-requires "$filename" 2> /dev/null | while read n r v ; do
- 	    [ -n "$n" ] || continue
- 	    if  [ -n "$r" ] && [ -n "$v" ]; then
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-platform-file-fix.patch b/meta/recipes-devtools/rpm/rpm/rpm-platform-file-fix.patch
deleted file mode 100644
index 200964f39d9..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-platform-file-fix.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Don't add the first line of /etc/rpm/platform to the list of patterns
-to match when computing an arch score, use it just for getting
-information about the platform (cpu/vendor/os). Fixes #3864.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Index: rpm-5.4.14/lib/rpmrc.c
-===================================================================
---- rpm-5.4.14.orig/lib/rpmrc.c
-+++ rpm-5.4.14/lib/rpmrc.c
-@@ -510,6 +510,7 @@ static rpmRC rpmPlatform(const char * pl
- #endif
- 	}
- 
-+#if !defined(RPM_VENDOR_OE) /* Skip the explicit-platform */
- #if defined(RPM_VENDOR_OPENPKG) /* explicit-platform */
- 	/* do not use vendor and GNU attribution */
- 	p = rpmExpand("%{_host_cpu}-%{_host_os}", NULL);
-@@ -520,7 +521,8 @@ static rpmRC rpmPlatform(const char * pl
- #endif
- 	xx = mireAppend(RPMMIRE_STRCMP, 0, p, NULL, &mi_re, &mi_nre);
- 	p = _free(p);
--	
-+#endif
-+
- 	init_platform++;
-     }
-     rc = (init_platform ? RPMRC_OK : RPMRC_FAIL);
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-platform.patch b/meta/recipes-devtools/rpm/rpm/rpm-platform.patch
deleted file mode 100644
index 3b40fea0eb0..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-platform.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-Fix up platform and related sysinfo file loading.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-This ensures that RPM knows the compatible set of package types at all times.
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/lib/depends.c
-===================================================================
---- rpm-5.4.14.orig/lib/depends.c
-+++ rpm-5.4.14/lib/depends.c
-@@ -250,7 +250,7 @@ static int rpmtsAddUpgrades(rpmts ts, rp
- 	    he->p.ptr = _free(he->p.ptr);
- 	}
- 
--#if defined(RPM_VENDOR_WINDRIVER)
-+#if defined(RPM_VENDOR_WINDRIVER) && !defined(RPM_VENDOR_OE)
- 	/*
- 	 * If we're capable of installing multiple colors
- 	 * but at least one of the packages are white (0), we
-@@ -507,7 +507,7 @@ assert(lastx >= 0 && lastx < ts->orderCo
-     return 0;
- }
- 
--#if defined(RPM_VENDOR_WINDRIVER)
-+#if defined(RPM_VENDOR_WINDRIVER) && !defined(RPM_VENDOR_OE)
- /* Is "compat" compatible w/ arch? */
- int _isCompatibleArch(const char * arch, const char * compat)
- {
-@@ -663,7 +663,7 @@ assert(he->p.str != NULL);
- 
- 	    if (arch == NULL || (parch = rpmteA(p)) == NULL)
- 		continue;
--#if defined(RPM_VENDOR_WINDRIVER)
-+#if defined(RPM_VENDOR_WINDRIVER) && !defined(RPM_VENDOR_OE)
- 	    /* XXX hackery for alias matching. */
- 	    if (!_isCompatibleArch(arch, parch))
- 		continue;
-@@ -829,6 +829,12 @@ int rpmtsAddEraseElement(rpmts ts, Heade
-     return rc;
- }
- 
-+#if defined(RPM_VENDOR_WINDRIVER) || defined(RPM_VENDOR_OE)
-+#define _ETC_RPM_SYSINFO        "%{_etcrpm}/sysinfo"
-+#else
-+#define _ETC_RPM_SYSINFO        SYSCONFIGDIR "/sysinfo"
-+#endif
-+
- /*@only@*/ /*@null@*/ /*@unchecked@*/
- static char *sysinfo_path = NULL;
- 
-@@ -1311,7 +1317,7 @@ retry:
- 	sysinfo_path = rpmExpand("%{?_rpmds_sysinfo_path}", NULL);
- 	if (!(sysinfo_path != NULL && *sysinfo_path == '/')) {
- 	    sysinfo_path = _free(sysinfo_path);
--	    sysinfo_path = xstrdup(SYSCONFIGDIR "/sysinfo");
-+	    sysinfo_path = rpmExpand(_ETC_RPM_SYSINFO, NULL);
- 	}
-     }
- 
-Index: rpm-5.4.14/lib/rpmds.c
-===================================================================
---- rpm-5.4.14.orig/lib/rpmds.c
-+++ rpm-5.4.14/lib/rpmds.c
-@@ -1759,7 +1759,7 @@ int rpmdsSysinfo(rpmPRCO PRCO, const cha
- /*@-observertrans @*/
- 	    _sysinfo_path = _free(_sysinfo_path);
- /*@=observertrans @*/
--	    _sysinfo_path = xstrdup(_ETC_RPM_SYSINFO);
-+	    _sysinfo_path = rpmExpand(_ETC_RPM_SYSINFO, NULL);
- 	}
-     }
- /*@=modobserver@*/
-Index: rpm-5.4.14/lib/rpmrc.c
-===================================================================
---- rpm-5.4.14.orig/lib/rpmrc.c
-+++ rpm-5.4.14/lib/rpmrc.c
-@@ -38,7 +38,13 @@
- static const char * configTarget = NULL;
- 
- /*@observer@*/ /*@unchecked@*/
--static const char * platform = SYSCONFIGDIR "/platform";
-+#if defined(RPM_VENDOR_WINDRIVER)
-+#define _ETC_RPM_PLATFORM        "%{_etcrpm}/platform"
-+#else
-+#define _ETC_RPM_PLATFORM        SYSCONFIGDIR "/platform"
-+#endif
-+
-+static const char * _platform = NULL;
- 
- /*@only@*/ /*@relnull@*/ /*@unchecked@*/
- void * platpat = NULL;
-@@ -694,16 +700,17 @@ static void defaultMachine(/*@out@*/ con
-     int rc;
- 
-     while (!gotDefaults) {
--#if defined(RPM_VENDOR_WINDRIVER)
--	const char * _platform = rpmGetPath(__etcrpm, "/platform", NULL);
--#else
--	const char * _platform = platform;
--#endif
-+	if (_platform == NULL) {
-+	    _platform = rpmExpand("%{?_rpmrc_platform_path}", NULL);
-+	    /* XXX may need to validate path existence somewhen. */
-+	    if (!(_platform != NULL && *_platform == '/')) {
-+		_platform = _free(_platform);
-+		_platform = rpmExpand(_ETC_RPM_PLATFORM, NULL);
-+	    }
-+	}
- 	CVOG_t cvog = NULL;
- #if defined(RPM_VENDOR_OPENPKG) /* larger-utsname */
- 	const char *cp;
--#endif
--#if defined(RPM_VENDOR_OPENPKG) /* larger-utsname */
- 	/* utsname fields on some platforms (like HP-UX) are very small
- 	   (just about 8 characters). This is too small for OpenPKG, so cheat! */
- 	rc = uname(&un_real);
-@@ -780,9 +787,7 @@ static void defaultMachine(/*@out@*/ con
- 	if (cp != NULL && cp != _platform)
- 	    cp = _free(cp);
- #endif
--#if defined(RPM_VENDOR_WINDRIVER)
- 	_platform = _free(_platform);
--#endif
- 
- 	if (configTarget && !parseCVOG(configTarget, &cvog) && cvog != NULL) {
- 	    gotDefaults = 1;
-@@ -1101,6 +1106,8 @@ int rpmReadConfigFiles(/*@unused@*/ cons
- 
- #ifdef PREMACROFILES
-     if (rpmReadRC(PREMACROFILES)) return -1;
-+#else
-+    if (rpmReadRC(NULL)) return -1;
- #endif
- 
-     /* Reset umask to its default umask(2) value. */
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-platform2.patch b/meta/recipes-devtools/rpm/rpm/rpm-platform2.patch
deleted file mode 100644
index b9675c71bed..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-platform2.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-Fix up platform and related sysinfo file loading (part 2).
-
-We need to ensure that we set the _gnu flag somehow.  We do this by reading
-from the platform file, and setting a new _platform_gnu and related vars.
-
-The default values of _host_cpu, _host_vendor and _host_os are changed to
-reference either the automatically determined _target_... or _platform_...
-values.  The macros file uses the configure time defaults in _platform_...
-versions have not been defined.  This preserves existing behavior, but
-ensures reasonable defaults are always available.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/lib/rpmrc.c
-===================================================================
---- rpm-5.4.14.orig/lib/rpmrc.c
-+++ rpm-5.4.14/lib/rpmrc.c
-@@ -328,10 +328,15 @@ static void setDefaults(void)
- 	/*@modifies rpmGlobalMacroContext, internalState @*/
- {
- 
--#if defined(RPM_VENDOR_WINDRIVER)
-+#if defined(RPM_VENDOR_WINDRIVER) || defined(RPM_VENDOR_OE)
-     addMacro(NULL, "_usrlibrpm", NULL, __usrlibrpm, RMIL_DEFAULT);
-     addMacro(NULL, "_etcrpm", NULL, __etcrpm, RMIL_DEFAULT);
-     addMacro(NULL, "_vendor", NULL, "%{?_host_vendor}%{!?_host_vendor:wrs}", RMIL_DEFAULT);
-+
-+    addMacro(NULL, "_host_cpu", NULL, "%{?_platform_cpu}%{!?_platform_cpu:%{?_target_cpu}}", RMIL_DEFAULT);
-+    addMacro(NULL, "_host_vendor", NULL, "%{?_platform_vendor}%{!?_platform_cpu:%{?_target_vendor}}", RMIL_DEFAULT);
-+    addMacro(NULL, "_host_os", NULL, "%{?_platform_os}%{!?_platform_os:%{?_target_os}}", RMIL_DEFAULT);
-+    addMacro(NULL, "_host_gnu", NULL, "%{?_platform_gnu}%{!?_platform_gnu:%{?_gnu}}", RMIL_DEFAULT);
- #endif
- 
-     addMacro(NULL, "_usr", NULL, USRPREFIX, RMIL_DEFAULT);
-@@ -487,9 +492,22 @@ static rpmRC rpmPlatform(const char * pl
- 	}
- 
- 	if (!parseCVOG(p, &cvog) && cvog != NULL) {
-+#if defined(RPM_VENDOR_OE)
-+	    char * _gnu = NULL;
-+
-+	    addMacro(NULL, "_platform_cpu", NULL, cvog->cpu, -1);
-+	    addMacro(NULL, "_platform_vendor", NULL, cvog->vendor, -1);
-+	    addMacro(NULL, "_platform_os", NULL, cvog->os, -1);
-+
-+	    if (cvog->gnu && cvog->gnu[0] != '\0')
-+		_gnu = rpmExpand("-", cvog->gnu, NULL);
-+
-+	    addMacro(NULL, "_platform_gnu", NULL, (_gnu ? _gnu : ""), -1);
-+#else
- 	    addMacro(NULL, "_host_cpu", NULL, cvog->cpu, -1);
- 	    addMacro(NULL, "_host_vendor", NULL, cvog->vendor, -1);
- 	    addMacro(NULL, "_host_os", NULL, cvog->os, -1);
-+#endif
- 	}
- 
- #if defined(RPM_VENDOR_OPENPKG) /* explicit-platform */
-Index: rpm-5.4.14/macros/macros.in
-===================================================================
---- rpm-5.4.14.orig/macros/macros.in
-+++ rpm-5.4.14/macros/macros.in
-@@ -900,9 +900,9 @@ $_arbitrary_tags_tests	Foo:Bar
- %_os			@RPMCANONOS@
- %_gnu			@RPMCANONGNU@
- 
--%_host_platform		%{_host_cpu}-%{_host_vendor}-%{_host_os}%{?_gnu}
--%_build_platform	%{_build_cpu}-%{_build_vendor}-%{_build_os}%{?_gnu}
--%_target_platform	%{_target_cpu}-%{_target_vendor}-%{_target_os}%{?_gnu}
-+%_host_platform		%{_host_cpu}-%{_host_vendor}-%{_host_os}%{?_host_gnu}%{!?_host_gnu:%{?_gnu}}
-+%_build_platform	%{_build_cpu}-%{_build_vendor}-%{_build_os}%{?_host_gnu}%{!?_host_gnu:%{?_gnu}}
-+%_target_platform	%{_target_cpu}-%{_target_vendor}-%{_target_os}%{?_host_gnu}%{!?_host_gnu:%{?_gnu}}
- 
- #==============================================================================
- # ---- configure macros.
-@@ -945,9 +945,10 @@ $_arbitrary_tags_tests	Foo:Bar
- %_build_os		%{_host_os}
- %_host			@host@
- %_host_alias		@host_alias@%{nil}
--%_host_cpu		@host_cpu@
--%_host_vendor		@host_vendor@
--%_host_os		@host_os@
-+%_host_cpu		%{?_platform_cpu}%{!?_platform_cpu:%{_arch}}
-+%_host_vendor		%{?_platform_vendor}%{!?_platform_vendor:%{_vendor}}
-+%_host_os		%{?_platform_os}%{!?_platform_os:%{_os}}
-+%_host_gnu		%{?_platform_gnu}%{!?_platform_gnu:%{_gnu}}
- %_target		%{_host}
- %_target_alias		%{_host_alias}
- %_target_cpu		%{_host_cpu}
-Index: rpm-5.4.14/python/rpmmodule.c
-===================================================================
---- rpm-5.4.14.orig/python/rpmmodule.c
-+++ rpm-5.4.14/python/rpmmodule.c
-@@ -65,8 +65,8 @@ static PyObject * archScore(PyObject * s
-     if (!PyArg_ParseTupleAndKeywords(args, kwds, "s", kwlist, &arch))
- 	return NULL;
- 
--#if defined(RPM_VENDOR_WINDRIVER)
--    platform = rpmExpand(arch, "-%{_host_vendor}", "-%{_host_os}%{?_gnu}", NULL);
-+#if defined(RPM_VENDOR_WINDRIVER) || defined(RPM_VENDOR_OE)
-+    platform = rpmExpand(arch, "-%{_host_vendor}", "-%{_host_os}%{?_host_gnu}%{!?_host_gnu:%{?_gnu}}", NULL);
- #else
-     platform = rpmExpand(arch, "-", "%{_vendor}", "-", "%{_os}", NULL);
- #endif
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch b/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch
deleted file mode 100644
index 92ef1dc50e5..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-python/rpmmodules.c: Change the way the python module loads the RPM config
-
-In order to support the RPM_VENDOR_WINDRIVER enhancement of dynamic
-runtime relocation paths, we need to call rpmcliInit instead of 
-rpmReadConfigFiles.  The rpmcliInit will end up calling rpmReadConfigFiles
-after the necessary relocation processing (if enabled).
-
-Code derived from changes suggested by Paul Eggleton.
-
-Upstream-Status: Pending
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm/python/rpmmodule.c
-===================================================================
---- rpm.orig/python/rpmmodule.c
-+++ rpm/python/rpmmodule.c
-@@ -382,9 +382,8 @@ static int initModule(PyObject *m)
-     /* XXX add --noparentdirs --nolinktos to rpmtsCheck() */
-     global_depFlags = (RPMDEPS_FLAG_NOPARENTDIRS | RPMDEPS_FLAG_NOLINKTOS);
- 
--    /* failure to initialize rpm (crypto and all) is rather fatal too... */
--    if (rpmReadConfigFiles(NULL, NULL) == -1)
--	return 0;
-+    const char *argv[1] = {"rpmmodule", 0};
-+    rpmcliInit(1, argv, NULL);
- 
-     d = PyModule_GetDict(m);
- 
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-python-AddErase.patch b/meta/recipes-devtools/rpm/rpm/rpm-python-AddErase.patch
deleted file mode 100644
index df6f4722eec..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-python-AddErase.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-rpm/python: The RPM5 API requires a hdrNum to be passed in
-
-The former behavior of passing in -1 as the hdrNum resulting in erase
-operations that did not complete, but also did not error.  Changing to
-using the header instance resolves this problem.
-
-Upstream-Status: Pending
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.15/python/rpmts-py.c
-===================================================================
---- rpm-5.4.15.orig/python/rpmts-py.c
-+++ rpm-5.4.15/python/rpmts-py.c
-@@ -241,12 +241,19 @@ static PyObject *
- rpmts_AddErase(rpmtsObject * s, PyObject * args)
- {
-     Header h;
-+    uint32_t hdrNum;
- 
-     if (!PyArg_ParseTuple(args, "O&:AddErase", hdrFromPyObject, &h))
-         return NULL;
- 
--SPEW((stderr, "*** %s(%p,%p) ts %p\n", __FUNCTION__, s, h, s->ts));
-+    hdrNum = headerGetInstance(h);
-+
-+SPEW((stderr, "*** %s(%p,%p) ts %p hdrNum %ld\n", __FUNCTION__, s, h, s->ts, hdrNum));
-+#ifdef REFERENCE /* this doesn't work, RPM5 requires a unique hdrNum */
-     return PyBool_FromLong(rpmtsAddEraseElement(s->ts, h, -1) == 0);
-+#else
-+    return PyBool_FromLong(rpmtsAddEraseElement(s->ts, h, hdrNum) == 0);
-+#endif
- }
- 
- static int
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-python-restore-origin.patch b/meta/recipes-devtools/rpm/rpm/rpm-python-restore-origin.patch
deleted file mode 100644
index 7a473db1adb..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-python-restore-origin.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-Fix an issue where the PACKAGEORIGIN is not properly stored.
-
-Restore the rpmtsCallback fdSetOpen call and related code.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm/python/rpmts-py.c
-===================================================================
---- rpm.orig/python/rpmts-py.c
-+++ rpm/python/rpmts-py.c
-@@ -672,6 +672,8 @@ rpmtsCallback(const void * hd, const rpm
-     Header h = (Header) hd;
-     struct rpmtsCallbackType_s * cbInfo = data;
-     PyObject * pkgObj = (PyObject *) pkgKey;
-+    PyObject * oh = NULL;
-+    const char * origin = NULL;
-     PyObject * args, * result;
-     static FD_t fd;
- 
-@@ -693,8 +695,16 @@ rpmtsCallback(const void * hd, const rpm
- 	    pkgObj = Py_None;
- 	    Py_INCREF(pkgObj);
- 	}
--    } else
-+    } else {
- 	Py_INCREF(pkgObj);
-+	/* XXX yum has (h, rpmloc) tuple as pkgKey. Extract the path. */
-+	if (!(PyTuple_Check(pkgObj) && PyArg_ParseTuple(pkgObj, "|Os", &oh, &origin)))
-+	    origin = NULL;
-+	/* XXX clean up the path, yum paths start "//..." */
-+	if (origin && origin[0] == '/' && origin[1] == '/')
-+	    origin++;
-+    }
-+
- 
-     PyEval_RestoreThread(cbInfo->_save);
- 
-@@ -723,6 +733,9 @@ SPEW((stderr, "\t%p = fdDup(%d)\n", fd,
- 
- 	fcntl(Fileno(fd), F_SETFD, FD_CLOEXEC);
- 
-+	if (origin != NULL)
-+	    (void) fdSetOpen(fd, origin, 0, 0);
-+
- 	return fd;
-     } else
-     if (what == RPMCALLBACK_INST_CLOSE_FILE) {
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-python-tagname.patch b/meta/recipes-devtools/rpm/rpm/rpm-python-tagname.patch
deleted file mode 100644
index dfb551377e8..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-python-tagname.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-rpm-python-module: Change the extension tag from PyCObject to PyInt
-
-Use the tagValue to determine the custom PyInt value to use for the extension
-tag.  Without this, any custom tag extensions will be returned in a format
-that the tagNumFromPyObject and related functions like hdr_subscript will
-failed to process.  Usually the failure is error: expected a string or integer
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.15/python/rpmmodule.c
-===================================================================
---- rpm-5.4.15.orig/python/rpmmodule.c
-+++ rpm-5.4.15/python/rpmmodule.c
-@@ -316,7 +316,7 @@ static void addRpmTags(PyObject *module)
-     {
- 	if (ext->name == NULL || ext->type != HEADER_EXT_TAG)
- 	    continue;
--	PyDict_SetItemString(d, (char *) ext->name, to=PyCObject_FromVoidPtr((void *)ext, NULL));
-+	PyDict_SetItemString(d, (char *) ext->name, to=PyInt_FromLong(tagValue(ext->name)));
- 	Py_XDECREF(to);
-         PyDict_SetItem(dict, to, o=PyString_FromString(ext->name + 7));
- 	Py_XDECREF(o);
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-realpath.patch b/meta/recipes-devtools/rpm/rpm/rpm-realpath.patch
deleted file mode 100644
index a810123ba89..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-realpath.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-chroot: realpath is required before expanding _dbpath
-
-_usr turned out to be a relative path to support dyanmic config, but it's
-being used somewhere as a indicator to locate substrings, so we must get
-the real path of it in advance.
-
-Upstream-Status: Inappropriate (OpenEmbedded specific)
-
-Signed-off-by: Ming Liu <ming.liu@windriver.com>
-
-diff -urpN a/rpmio/rpmrpc.c b/rpmio/rpmrpc.c
---- a/rpmio/rpmrpc.c
-+++ b/rpmio/rpmrpc.c
-@@ -257,7 +257,9 @@ int Open(const char * path, int flags, m
-     /* XXX if the open(2) fails, try to strip a possible chroot(2) prefix. */
-     if (fdno < 0 && errno == ENOENT) {
- 	const char *dbpath = rpmExpand("%{?_dbpath}/", NULL);
--	const char * fn = strstr(path + 1, dbpath);
-+	char resolved_dbpath[PATH_MAX];
-+	realpath(dbpath, resolved_dbpath);
-+	const char * fn = strstr(path + 1, resolved_dbpath);
- 	if (fn)
- 	    fdno = open(fn, flags, mode);
- 	dbpath = _free(dbpath);
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-reloc-macros.patch b/meta/recipes-devtools/rpm/rpm/rpm-reloc-macros.patch
deleted file mode 100644
index 59fe524df3b..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-reloc-macros.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-macros: Use dyanmic config vs hard coded settings
-
-When the dynamic, runtime relocation is enables we need to make sure that the 
-RPM macro file does not override the dynamic settings.  Fix this by forcing the
-dynamic version to be used in all cases.
-
-Upstream-Status: Inappropriate (OpenEmbedded specific)
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/macros/macros.in
-===================================================================
---- rpm-5.4.14.orig/macros/macros.in
-+++ rpm-5.4.14/macros/macros.in
-@@ -27,11 +27,12 @@
- #==============================================================================
- # ---- filesystem macros.
- #
--%_usr			@usrprefix@
-+%_usr			%{_usrlibrpm}/../..
- %_usrsrc		%{_usr}/src
--%_var			@varprefix@
--%_usrlibrpm		@USRLIBRPM@
--%_etcrpm		@SYSCONFIGDIR@
-+%_var			%{_usr}/../var
-+# The dynamic relocation code sets the following two items
-+#%_usrlibrpm		@USRLIBRPM@
-+#%_etcrpm		@SYSCONFIGDIR@
- 
- %__objext		@objext@
- %__libext		@libext@
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch b/meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch
deleted file mode 100644
index 526106d1e3c..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-lib/rpmts.c: Ensure that we check both providename and filepaths
-
-When looking up a missing dependencies, such as /bin/sh, we need to lookup
-in both the providename and filepaths DB, not just the filepaths DB.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/lib/rpmts.c
-===================================================================
---- rpm-5.4.14.orig/lib/rpmts.c
-+++ rpm-5.4.14/lib/rpmts.c
-@@ -410,8 +410,8 @@ fprintf(stderr, "--> %s(%p,%p,%p)\n", __
- 	if (sdb == NULL)
- 	    continue;
- 
--	/* Look for a matching Provides: in suggested universe. */
--	rpmtag = (*keyp == '/' ? RPMTAG_FILEPATHS : RPMTAG_PROVIDENAME);
-+	rpmtag = RPMTAG_PROVIDENAME;
-+       do {
- 	mi = rpmmiInit(sdb, rpmtag, keyp, keylen);
- 	while ((h = rpmmiNext(mi)) != NULL) {
- 	    size_t hnamelen;
-@@ -446,6 +446,15 @@ fprintf(stderr, "--> %s(%p,%p,%p)\n", __
- 	    bhnamelen = hnamelen;
- 	}
- 	mi = rpmmiFree(mi);
-+
-+	if (bh == NULL && *keyp == '/' && rpmtag == RPMTAG_PROVIDENAME) {
-+	   rpmtag = RPMTAG_FILEPATHS;
-+	   continue;
-+        }
-+
-+        break;
-+      } while (1);
-+
-     }
- 
-     /* Is there a suggested resolution? */
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-rpmdb-grammar.patch b/meta/recipes-devtools/rpm/rpm/rpm-rpmdb-grammar.patch
deleted file mode 100644
index 71dae4939a7..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-rpmdb-grammar.patch
+++ /dev/null
@@ -1,124 +0,0 @@
-Disable various items that do not cross compile well.
-
-Upstream-Status: Inappropriate [Configuration]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm/rpmdb/Makefile.am
-===================================================================
---- rpm.orig/rpmdb/Makefile.am
-+++ rpm/rpmdb/Makefile.am
-@@ -34,10 +34,10 @@ EXTRA_DIST = \
- 	db3.c sqlite.c db_emu.h librpmdb.vers bdb.sql libsqldb.c \
- 	logio.awk logio.src logio_recover_template logio_template logio.c \
- 	logio_rec.c logio_auto.c logio_autop.c logio_auto.h \
--	qf.l qf.y qf.inp tqf.l tqf.y tqf.inp grammar.y scanner.l json1.js
-+	tqf.l tqf.y tqf.inp grammar.y scanner.l json1.js
- 
--EXTRA_PROGRAMS = qfcalc qfgraph logio tjfn tqf # tbdb
--noinst_PROGRAMS = json
-+EXTRA_PROGRAMS = qfcalc qfgraph logio # tjfn tqf tbdb
-+noinst_PROGRAMS = # json
- 
- RPMMISC_LDADD_COMMON = \
- 	$(top_builddir)/misc/librpmmisc.la \
-@@ -321,54 +321,39 @@ BUILT_SOURCES += .syntastic_c_config
- .syntastic_c_config: Makefile
- 	@echo $(COMPILE) | tr ' ' '\n' | sed -e '1d' > $@
- 
--tjfn_SOURCES = tjfn.c
--tjfn_LDADD = $(mylibs)
--
--LEX =	flex
--LFLAGS=	-d -T -v -8 -b --yylineno --reentrant --bison-bridge --perf-report
--YACC =	bison
--YFLAGS=	-Dapi.pure -t -d -v --report=all
--
--BUILT_SOURCES += Jgrammar.c Jgrammar.h Jscanner.c
--Jgrammar.c: grammar.y
--	$(YACC) $(YFLAGS) -o $@ $<
--Jscanner.c: scanner.l
--	$(LEX) -R -o $@ $<
--json_SOURCES = Jgrammar.c Jscanner.c json.c
--
--testjson: json1.js json
--	./json json1.js
--
--BUILT_SOURCES += Qgrammar.c Qgrammar.h Qscanner.c
--Qgrammar.c: qf.y
--	$(YACC) $(YFLAGS) -o $@ $<
--Qscanner.c: qf.l
--	$(LEX) -R -o $@ $<
--qfcalc_SOURCES = Qgrammar.c Qscanner.c interpreter.c
--qfgraph_SOURCES = Qgrammar.c Qscanner.c graph.c
--
--testqf: qfcalc qfgraph
--	./qfcalc < qf.inp
--	./qfgraph < qf.inp
--
--BUILT_SOURCES += Tgrammar.c Tgrammar.h Tscanner.c
--Tgrammar.c Tgrammar.h: tqf.y
--	$(YACC) $(YFLAGS) -o $@ $<
--Tscanner.c Tscanner.h: tqf.l
--	$(LEX) --prefix="Tyy" $(LFLAGS) -o $@ $<
--tqf_SOURCES =	Tgrammar.c Tscanner.c tgraph.c
--tqf_CFLAGS =	$(CFLAGS) -fsanitize=address # -DTSCANNER_MAIN
--tqf_LDADD =	../lib/librpm.la \
--		./librpmdb.la \
--		../popt/libpopt.la
--
--testdir =	$(abs_top_builddir)/tests
--foo: tqf
--	-../libtool --mode=execute \
--	    ./tqf \
--		--dbpath=$(testdir) \
--		-r $(testdir)/fodder/*.rpm \
--		   $(testdir)/fodder/fmtmod.qf
-+#tjfn_SOURCES = tjfn.c
-+#tjfn_LDADD = $(mylibs)
-+#
-+#LFLAGS=	-d -T -v -8 -b --yylineno --reentrant --bison-bridge --perf-report
-+#
-+#BUILT_SOURCES += Jgrammar.c Jgrammar.h Jscanner.c
-+#Jgrammar.c Jgrammar.h: grammar.y
-+#	$(YACC) $(YFLAGS) -t -d -v -o $@ $<
-+#Jscanner.c: scanner.l
-+#	$(LEX) -R -o $@ $<
-+#json_SOURCES = Jgrammar.c Jscanner.c json.c
-+#
-+#testjson: json1.js json
-+#	./json json1.js
-+#
-+#BUILT_SOURCES += Tgrammar.c Tgrammar.h Tscanner.c
-+#Tgrammar.c Tgrammar.h: tqf.y
-+#	$(YACC) $(YFLAGS) -t -d -v -o $@ $<
-+#Tscanner.c Tscanner.h: tqf.l
-+#	$(LEX) --prefix="Tyy" $(LFLAGS) -o $@ $<
-+#tqf_SOURCES =	Tgrammar.c Tscanner.c tgraph.c
-+#tqf_CFLAGS =	$(CFLAGS) -fsanitize=address # -DTSCANNER_MAIN
-+#tqf_LDADD =	../lib/librpm.la \
-+#		./librpmdb.la \
-+#		../popt/libpopt.la
-+
-+#testdir =	$(abs_top_builddir)/tests
-+#foo: tqf
-+#	-../libtool --mode=execute \
-+#	    ./tqf \
-+#		--dbpath=$(testdir) \
-+#		-r $(testdir)/fodder/*.rpm \
-+#		   $(testdir)/fodder/fmtmod.qf
- 
- #tbdb_SOURCES = tbdb.c bdb.c
- #tbdb_LDADD = $(mylibs)
-Index: rpm/configure.ac
-===================================================================
---- rpm.orig/configure.ac
-+++ rpm/configure.ac
-@@ -119,6 +119,7 @@ AC_PROG_MAKE_SET
- AC_PROG_LIBTOOL
- AC_PROG_RANLIB
- AC_PROG_YACC
-+AM_PROG_LEX
- 
- AC_PATH_PROG(AS, as, as)
- 
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch b/meta/recipes-devtools/rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch
deleted file mode 100644
index b9a2cbce254..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 16dc683aa50be9789d1674734b06a8a955ff22ad Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Thu, 26 Nov 2015 01:36:40 -0800
-Subject: [PATCH] lib/rpmfc.c: fix for N32 MIPS64
-
-It is 'N32 MIPS64', not 'N32 MIPS32' as command file shows:
-$ file image/usr/bin/getent
-getent: ELF 32-bit MSB executable, MIPS, N32 MIPS64 [snip]
-
-And "rpm -qp --filecolor" was wrong (it was 1, but should be 4).
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- lib/rpmfc.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/rpmfc.c b/lib/rpmfc.c
-index fde00c7..49779f8 100644
---- a/lib/rpmfc.c
-+++ b/lib/rpmfc.c
-@@ -575,7 +575,7 @@ static struct rpmfcTokens_s rpmfcTokens[] = {
-   { " not stripped",		RPMFC_NOTSTRIPPED },
-   { " archive",			RPMFC_ARCHIVE },
- 
--  { "MIPS, N32 MIPS32",		RPMFC_ELFMIPSN32|RPMFC_INCLUDE },
-+  { "MIPS, N32 MIPS64",		RPMFC_ELFMIPSN32|RPMFC_INCLUDE },
-   { "ELF 32-bit",		RPMFC_ELF32|RPMFC_INCLUDE },
-   { "ELF 64-bit",		RPMFC_ELF64|RPMFC_INCLUDE },
- 
--- 
-1.7.9.5
-
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-rpmio-headers.patch b/meta/recipes-devtools/rpm/rpm/rpm-rpmio-headers.patch
deleted file mode 100644
index 93645766c2b..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-rpmio-headers.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Fix a typo in the rpmio Makefile.am
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm/rpmio/Makefile.am
-===================================================================
---- rpm.orig/rpmio/Makefile.am
-+++ rpm/rpmio/Makefile.am
-@@ -121,7 +121,7 @@ luaLPATHdir =	${pkgsharedir)/lua
- 
- pkgincdir = $(pkgincludedir)$(WITH_PATH_VERSIONED_SUFFIX)
- pkginc_HEADERS = argv.h mire.h rpmzlog.h yarn.h \
--	rpmbf.h rpmcb.h rpmio.h rpmlog.h rpmiotypes.h rpmmacro.h
-+	rpmbf.h rpmcb.h rpmio.h rpmlog.h rpmiotypes.h rpmmacro.h \
- 	rpmpgp.h rpmsw.h rpmutil.h
- noinst_HEADERS = \
- 	ar.h bcon.h bson.h cpio.h crc.h envvar.h fnmatch.h fts.h glob.h iosm.h \
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-popt.patch b/meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-popt.patch
deleted file mode 100644
index 915d7efe6fe..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-popt.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-rpmpgp.h: We do not require the popt header in order to use rpmpgp functions
-
-This can cause failures if the internal libpopt is used, as it's header is
-not exported.
-
-Upstream-Status: Pending
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/rpmio/rpmpgp.h
-===================================================================
---- rpm-5.4.14.orig/rpmio/rpmpgp.h
-+++ rpm-5.4.14/rpmio/rpmpgp.h
-@@ -11,11 +11,11 @@
-  */
- 
- #include <string.h>
--#include <popt.h>
- #include <rpmiotypes.h>
- #include <yarn.h>
- 
- #if defined(_RPMPGP_INTERNAL)
-+#include <popt.h>
- #include <rpmsw.h>
- 
- /*@unchecked@*/
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch b/meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch
deleted file mode 100644
index b55fe22c6ac..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch
+++ /dev/null
@@ -1,159 +0,0 @@
-Enable a cross-install scriptlet helper.
-
-The helper is called from outside of the chroot with the arguments:
-
-<root> <prog> <script> <arg1> [<arg2> ... <argN>]
-
-The helper script is used by oe-core to facilitate shell script actions that
-can not be run from within a chroot on a foreign target system during a
-cross install.
-
-Upstream-Status: Pending
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm/lib/psm.c
-===================================================================
---- rpm.orig/lib/psm.c
-+++ rpm/lib/psm.c
-@@ -846,6 +846,9 @@ static rpmRC runScript(rpmpsm psm, Heade
-     pid_t pid;
-     int xx;
-     int i;
-+#ifdef RPM_VENDOR_OE
-+    const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL);
-+#endif
- 
- #ifdef	__clang__
- #pragma clang diagnostic push
-@@ -923,14 +926,29 @@ assert(he->p.str != NULL);
- 		(F_ISSET(psm, UNORDERED) ? "a" : ""));
- 
-     if (Phe->p.argv == NULL) {
--	argv = (const char **) alloca(5 * sizeof(*argv));
--	argv[0] = "/bin/sh";
--	argc = 1;
-+	argv = (const char **) alloca(7 * sizeof(*argv));
-+	argc = 0;
-+    } else {
-+	argv = (const char **) alloca((Phe->c + 6) * sizeof(*argv));
-+	argc = 0;
-+    }
-+
-+#ifdef RPM_VENDOR_OE
-+    if (scriptletWrapper && *scriptletWrapper) {
-+	argv[argc++] = scriptletWrapper;
-+	argv[argc] = rpmtsRootDir(ts);
-+	if (!argv[argc] || !*argv[argc])
-+	   argv[argc] = "/";
-+	argc++;
-+    }
-+#endif
-+
-+    if (Phe->p.argv == NULL) {
-+	argv[argc++] = "/bin/sh";
- 	ldconfig_done = 0;
-     } else {
--	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));
-+	argc += Phe->c;
- 	ldconfig_done = (ldconfig_path && !strcmp(argv[0], ldconfig_path)
- 		? 1 : 0);
-     }
-@@ -981,7 +999,12 @@ assert(he->p.str != NULL);
- 	    goto exit;
- 
- 	if (rpmIsDebug() &&
--	    (!strcmp(argv[0], "/bin/sh") || !strcmp(argv[0], "/bin/bash")))
-+	    (!strcmp(argv[0], "/bin/sh") || !strcmp(argv[0], "/bin/bash"))
-+#ifdef RPM_VENDOR_OE
-+	    || (scriptletWrapper && *scriptletWrapper && !strcmp(argv[1], "/bin/sh"))
-+	    || (scriptletWrapper && *scriptletWrapper && !strcmp(argv[1], "/bin/bash"))
-+#endif
-+	   )
- 	{
- 	    static const char set_x[] = "set -x\n";
- 	    nw = Fwrite(set_x, sizeof(set_x[0]), sizeof(set_x)-1, fd);
-@@ -1116,12 +1139,22 @@ assert(he->p.str != NULL);
- 
- 	{   const char * rootDir = rpmtsRootDir(ts);
- 	    if (!rpmtsChrootDone(ts) && rootDir != NULL &&
-+#ifdef RPM_VENDOR_OE
-+		!(scriptletWrapper && *scriptletWrapper) &&
-+#endif
- 		!(rootDir[0] == '/' && rootDir[1] == '\0'))
- 	    {
- 		/*@-modobserver@*/
- 		xx = Chroot(rootDir);
- 		/*@=modobserver@*/
- 	    }
-+#ifdef RPM_VENDOR_OE
-+	    if (!rpmtsChrootDone(ts) && rootDir != NULL &&
-+		(scriptletWrapper && *scriptletWrapper) &&
-+		!(rootDir[0] == '/' && rootDir[1] == '\0'))
-+		xx = Chdir(rootDir);
-+	    else 
-+#endif
- 	    xx = Chdir("/");
- 	    rpmlog(RPMLOG_DEBUG, D_("%s: %s(%s)\texecv(%s) pid %d\n"),
- 			psm->stepName, sln, NVRA,
-@@ -3052,6 +3085,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);
-+
-+#ifdef RPM_VENDOR_OE
-+        const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL);
-+	if (scriptletWrapper && *scriptletWrapper)
-+	     rc = rpmpsmNext(psm, PSM_CHROOT_OUT);
-+#endif
-+
- 	xx = rpmtxnBegin(rpmtsGetRdb(ts), _parent, NULL);
- 	rc = runInstScript(psm);
- 	if (rc)
-@@ -3059,11 +3099,24 @@ assert(psm->te != NULL);
- 	else
- 	     xx = rpmtxnCommit(rpmtsGetRdb(ts)->db_txn);
- 	rpmtsGetRdb(ts)->db_txn = NULL;
-+#ifdef RPM_VENDOR_OE
-+	if (scriptletWrapper && *scriptletWrapper)
-+	     rc = rpmpsmNext(psm, PSM_CHROOT_IN);
-+#endif
-     }	break;
-     case PSM_TRIGGERS:
- 	/* Run triggers in other package(s) this package sets off. */
- 	if (rpmtsFlags(ts) & RPMTRANS_FLAG_TEST)	break;
-+#ifdef RPM_VENDOR_OE
-+        const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL);
-+	if (scriptletWrapper && *scriptletWrapper)
-+	     rc = rpmpsmNext(psm, PSM_CHROOT_OUT);
-+#endif
- 	rc = runTriggers(psm);
-+#ifdef RPM_VENDOR_OE
-+	if (scriptletWrapper && *scriptletWrapper)
-+	     rc = rpmpsmNext(psm, PSM_CHROOT_IN);
-+#endif
- 	break;
-     case PSM_IMMED_TRIGGERS:
- 	/* Run triggers in this package other package(s) set off. */
-@@ -3073,7 +3126,18 @@ assert(psm->te != NULL);
- 	    F_SET(psm, GOTTRIGGERS);
- 	}
- 	if (psm->triggers != NULL)
-+#ifdef RPM_VENDOR_OE
-+	{
-+            const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL);
-+	    if (scriptletWrapper && *scriptletWrapper)
-+	         rc = rpmpsmNext(psm, PSM_CHROOT_OUT);
-+#endif
- 	    rc = runImmedTriggers(psm);
-+#ifdef RPM_VENDOR_OE
-+	    if (scriptletWrapper && *scriptletWrapper)
-+	         rc = rpmpsmNext(psm, PSM_CHROOT_IN);
-+	}
-+#endif
- 	break;
- 
-     case PSM_RPMIO_FLAGS:
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-showrc.patch b/meta/recipes-devtools/rpm/rpm/rpm-showrc.patch
deleted file mode 100644
index ec38b95f2eb..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-showrc.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Workaround for a memory leak in --showrc.
-
-Upstream-Status: Pending
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/lib/rpmrc.c
-===================================================================
---- rpm-5.4.14.orig/lib/rpmrc.c
-+++ rpm-5.4.14/lib/rpmrc.c
-@@ -1228,11 +1228,15 @@ int rpmShowRC(FILE * fp)
- 		if (DNEVR != NULL)
- 		    fprintf(fp, "    %s\n", DNEVR+2);
- 	    }
-+#if 0
- 	    (void)rpmdsFree(ds);
- 	    ds = NULL;
-+#endif
- 	    fprintf(fp, "\n");
- 	}
-+#if 0
- 	PRCO = rpmdsFreePRCO(PRCO);
-+#endif
-     }
- 
-     if (rpmIsVerbose()) {
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-syck-fix-gram.patch b/meta/recipes-devtools/rpm/rpm/rpm-syck-fix-gram.patch
deleted file mode 100644
index d6493c197e1..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-syck-fix-gram.patch
+++ /dev/null
@@ -1,1081 +0,0 @@
-Fix the syck/lib/gram.y
-
-This resolves a problem during compilation:
-
-../../../rpm/syck/lib/gram.y:66:27: error: 'parser' undeclared (first use in this function)
-            ((SyckParser *)parser)->root = syck_hdlr_add_node( (SyckParser *)parser, $1 );
-                           ^
-../../../rpm/syck/lib/gram.y:66:27: note: each undeclared identifier is reported only once for each function it appears in
-../../../rpm/syck/lib/syck.c: In function 'syck_parse':
-../../../rpm/syck/lib/syck.c:516:5: warning: implicit declaration of function 'syckparse' [-Wimplicit-function-declaration]
-     syckparse( p );
-     ^
-
-This patch was generated by reverting the grammer back to a previous
-version.
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm/syck/lib/gram.y
-===================================================================
---- rpm.orig/syck/lib/gram.y
-+++ rpm/syck/lib/gram.y
-@@ -9,18 +9,10 @@
- 
- %start doc
- %pure-parser
--%parse-param {void* parser}
--%lex-param {void* parser}
- 
- 
- %{
- 
--#define YYDEBUG 1
--#define YYERROR_VERBOSE 1
--#ifndef YYSTACK_USE_ALLOCA
--#define YYSTACK_USE_ALLOCA 0
--#endif
--
- #include "system.h"
- #include "syck.h"
- #include "debug.h"
-@@ -28,6 +20,9 @@
- void apply_seq_in_map( SyckParser *parser, SyckNode *n )
- 	/*@*/;
- 
-+#define YYPARSE_PARAM   parser
-+#define YYLEX_PARAM     parser
-+
- #define NULL_NODE(parser, node) \
-         SyckNode *node = syck_new_str( "", scalar_plain ); \
-         if ( ((SyckParser *)parser)->taguri_expansion == 1 ) \
-Index: rpm/syck/lib/Makefile.am
-===================================================================
---- rpm.orig/syck/lib/Makefile.am
-+++ rpm/syck/lib/Makefile.am
-@@ -49,25 +49,25 @@ SYCK_SPLINT_SRCS = \
- 	token.c \
- 	implicit.c
- 
--#gram.c:	gram.y
--#	$(YACC) -d -t -v -p syck -o $@ $<
--#	-@if test -f gram.c; then \
--#	{ echo "/*@-globs -mods -modnomods -moduncon -modunconnomods @*/";\
--#	  echo "/*@-noeffect -noeffectuncon @*/";\
--#	  echo "/*@-nullassign @*/";\
--#	  echo "/*@-readonlytrans @*/";\
--#	  echo "/*@-uniondef @*/";\
--#	  echo "/*@-warnlintcomments @*/";\
--#	  cat gram.c;\
--#	  echo "/*@=warnlintcomments @*/";\
--#	  echo "/*@=uniondef @*/";\
--#	  echo "/*@=readonlytrans @*/";\
--#	  echo "/*@=nullassign @*/";\
--#	  echo "/*@=noeffect =noeffectuncon @*/";\
--#	  echo "/*@=globs =mods =modnomods =moduncon =modunconnomods @*/";\
--#	} > _gram.c ;\
--#	  mv -f _gram.c gram.c; \
--#	fi
-+gram.c:	gram.y
-+	$(YACC) -d -t -v -p syck -o $@ $<
-+	-@if test -f gram.c; then \
-+	{ echo "/*@-globs -mods -modnomods -moduncon -modunconnomods @*/";\
-+	  echo "/*@-noeffect -noeffectuncon @*/";\
-+	  echo "/*@-nullassign @*/";\
-+	  echo "/*@-readonlytrans @*/";\
-+	  echo "/*@-uniondef @*/";\
-+	  echo "/*@-warnlintcomments @*/";\
-+	  cat gram.c;\
-+	  echo "/*@=warnlintcomments @*/";\
-+	  echo "/*@=uniondef @*/";\
-+	  echo "/*@=readonlytrans @*/";\
-+	  echo "/*@=nullassign @*/";\
-+	  echo "/*@=noeffect =noeffectuncon @*/";\
-+	  echo "/*@=globs =mods =modnomods =moduncon =modunconnomods @*/";\
-+	} > _gram.c ;\
-+	  mv -f _gram.c gram.c; \
-+	fi
- 
- BUILT_SOURCES = gram.c gram.h
- 
-Index: rpm/syck/lib/implicit.c
-===================================================================
---- rpm.orig/syck/lib/implicit.c
-+++ rpm/syck/lib/implicit.c
-@@ -19,11 +19,6 @@
- #define YYLIMIT     limit
- #define YYFILL(n)
- 
--#ifdef  __clang__
--#pragma clang diagnostic push
--#pragma clang diagnostic ignored "-Wempty-body"
--#endif
--
- void
- try_tag_implicit( SyckNode *n, int taguri )
- {
-@@ -3000,8 +2995,4 @@ yy270:	++YYCURSOR;
- 
- }
- 
--#ifdef  __clang__
--#pragma clang diagnostic pop
--#endif
--
- /*@=noret@*/
-Index: rpm/syck/lib/syck.c
-===================================================================
---- rpm.orig/syck/lib/syck.c
-+++ rpm/syck/lib/syck.c
-@@ -519,7 +519,7 @@ syck_parse( SyckParser *p )
- }
- 
- void
--syck_default_error_handler( SyckParser *p, const char *msg )
-+syck_default_error_handler( SyckParser *p, char *msg )
- {
-     printf( "Error at [Line %d, Col %ld]: %s\n", 
-         p->linect,
-Index: rpm/syck/lib/syck.h
-===================================================================
---- rpm.orig/syck/lib/syck.h
-+++ rpm/syck/lib/syck.h
-@@ -175,7 +175,7 @@ typedef struct _syck_str SyckIoStr;
- typedef struct _syck_level SyckLevel;
- 
- typedef SYMID (*SyckNodeHandler)(SyckParser *p, SyckNode *n);
--typedef void (*SyckErrorHandler)(SyckParser *p, const char *);
-+typedef void (*SyckErrorHandler)(SyckParser *p, char *);
- typedef SyckNode * (*SyckBadAnchorHandler)(SyckParser *p, char *);
- typedef long (*SyckIoFileRead)(char *, SyckIoFile *, long, long); 
- typedef long (*SyckIoStrRead)(char *, SyckIoStr *, long, long);
-@@ -546,7 +546,7 @@ long syck_parser_readlen( SyckParser *p,
- SYMID syck_parse( SyckParser *p )
- 	/*@globals fileSystem @*/
- 	/*@modifies p, fileSystem @*/;
--void syck_default_error_handler( SyckParser *p, const char * )
-+void syck_default_error_handler( SyckParser *p, char * )
- 	/*@globals fileSystem @*/
- 	/*@modifies p, fileSystem @*/;
- SYMID syck_yaml2byte_handler( SyckParser *p, SyckNode *n )
-@@ -619,7 +619,7 @@ long syck_seq_count( SyckNode *seq )
- /*
-  * Lexer prototypes
-  */
--void syckerror( void *, const char *msg )
-+void syckerror( char *msg )
- 	/*@*/;
- /* XXX union YYSTYPE *sycklval has issues on Mac OS X. */
- int sycklex( void *_sycklval, SyckParser *parser )
-Index: rpm/syck/lib/token.c
-===================================================================
---- rpm.orig/syck/lib/token.c
-+++ rpm/syck/lib/token.c
-@@ -270,11 +270,11 @@ sycklex( void * _sycklval, SyckParser *p
-         return sycklex_yaml_utf8( sycklval, parser );
- 
-         case syck_yaml_utf16:
--            syckerror( parser, "UTF-16 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
-+            syckerror( "UTF-16 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
-         break;
- 
-         case syck_yaml_utf32:
--            syckerror( parser, "UTF-32 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
-+            syckerror( "UTF-32 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
-         break;
- 
-         case syck_bytecode_utf8:
-@@ -2739,15 +2739,14 @@ syckwrap(void)
- }
- 
- void 
--syckerror( void *p, const char *msg )
-+syckerror( char *msg )
- {
--    SyckParser * parser = (SyckParser *)p;
- /*@-mods@*/
--    if ( parser->error_handler == NULL )
--        parser->error_handler = syck_default_error_handler;
-+    if ( syck_parser_ptr->error_handler == NULL )
-+        syck_parser_ptr->error_handler = syck_default_error_handler;
- 
--    parser->root = parser->root_on_error;
-+    syck_parser_ptr->root = syck_parser_ptr->root_on_error;
- /*@=mods@*/
--    (parser->error_handler)(parser, msg);
-+    (syck_parser_ptr->error_handler)(syck_parser_ptr, msg);
- }
- 
-Index: rpm/syck/lib/bytecode.c
-===================================================================
---- rpm.orig/syck/lib/bytecode.c
-+++ rpm/syck/lib/bytecode.c
-@@ -1,10 +1,10 @@
--/* Generated by re2c 0.9.12 on Tue Mar 14 00:14:53 2006 */
-+/* Generated by re2c 0.13.5 on Tue Feb 23 12:04:00 2016 */
- #line 1 "bytecode.re"
- /*
-  * bytecode.re
-  *
-  * $Author: why $
-- * $Date: 2005-09-20 08:21:06 +0300 (Tue, 20 Sep 2005) $
-+ * $Date: 2005/09/20 05:21:06 $
-  *
-  * Copyright (C) 2003 why the lucky stiff
-  */
-@@ -27,14 +27,11 @@
- #define YYLINEPTR   parser->lineptr
- #define YYLINECTPTR parser->linectptr
- #define YYLINE      parser->linect
--#define YYFILL(n)   (void) syck_parser_read(parser)
-+#define YYFILL(n)   syck_parser_read(parser)
- 
--/*@unchecked@*/ /*@null@*/
- extern SyckParser *syck_parser_ptr;
- 
--/*@null@*/
--char *get_inline( SyckParser *parser )
--	/*@modifies parser @*/;
-+char *get_inline( SyckParser *parser );
- 
- /*
-  * Repositions the cursor at `n' offset from the token start.
-@@ -137,14 +134,12 @@ char *get_inline( SyckParser *parser )
-  */
- int
- sycklex_bytecode_utf8( YYSTYPE *sycklval, SyckParser *parser )
--	/*@globals syck_parser_ptr @*/
--	/*@modifies sycklval, parser, syck_parser_ptr @*/
- {
-     SyckLevel *lvl;
-     syck_parser_ptr = parser;
-     if ( YYCURSOR == NULL ) 
-     {
--        (void) syck_parser_read( parser );
-+        syck_parser_read( parser );
-     }
- 
-     if ( parser->force_token != 0 )
-@@ -171,42 +166,37 @@ sycklex_bytecode_utf8( YYSTYPE *sycklval
- #line 165 "<stdout>"
- {
- 	YYCTYPE yych;
--	unsigned int yyaccept = 0;
--	goto yy0;
--	/*@notreached@*/
--	++YYCURSOR;
--yy0:
--	if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
-+
-+	if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
- 	yych = *YYCURSOR;
--	switch(yych){
-+	switch (yych) {
- 	case 0x00:	goto yy2;
- 	case 'D':	goto yy3;
- 	default:	goto yy5;
- 	}
--yy2:	YYCURSOR = YYMARKER;
--	switch(yyaccept){
--	case 0:	goto yy4;
--	}
--yy3:	yyaccept = 0;
-+yy2:
-+	YYCURSOR = YYMARKER;
-+	goto yy4;
-+yy3:
- 	yych = *(YYMARKER = ++YYCURSOR);
--	switch(yych){
--	case 0x0A:	goto yy6;
--	case 0x0D:	goto yy8;
-+	switch (yych) {
-+	case '\n':	goto yy6;
-+	case '\r':	goto yy8;
- 	default:	goto yy4;
- 	}
- yy4:
- #line 199 "bytecode.re"
--{   YYPOS(0);
-+	{   YYPOS(0);
-             goto Document;
-         }
--#line 195 "<stdout>"
--yy5:	yych = *++YYCURSOR;
-+#line 191 "<stdout>"
-+yy5:
-+	yych = *++YYCURSOR;
- 	goto yy4;
--yy6:	++YYCURSOR;
--	goto yy7;
--yy7:
-+yy6:
-+	++YYCURSOR;
- #line 186 "bytecode.re"
--{   if ( lvl->status == syck_lvl_header )
-+	{   if ( lvl->status == syck_lvl_header )
-             {
-                 CHK_NL(YYCURSOR);
-                 goto Directive;
-@@ -218,10 +208,11 @@ yy7:
-                 return 0;
-             }
-         }
--#line 214 "<stdout>"
--yy8:	++YYCURSOR;
--	switch((yych = *YYCURSOR)) {
--	case 0x0A:	goto yy6;
-+#line 210 "<stdout>"
-+yy8:
-+	++YYCURSOR;
-+	switch ((yych = *YYCURSOR)) {
-+	case '\n':	goto yy6;
- 	default:	goto yy2;
- 	}
- }
-@@ -239,19 +230,15 @@ Document:
-         YYTOKEN = YYCURSOR;
- 
- 
--#line 235 "<stdout>"
-+#line 232 "<stdout>"
- {
- 	YYCTYPE yych;
--	goto yy9;
--	/*@notreached@*/
--	++YYCURSOR;
--yy9:
--	if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
-+	if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
- 	yych = *YYCURSOR;
--	switch(yych){
-+	switch (yych) {
- 	case 0x00:	goto yy30;
--	case 0x0A:	goto yy27;
--	case 0x0D:	goto yy29;
-+	case '\n':	goto yy27;
-+	case '\r':	goto yy29;
- 	case 'A':	goto yy19;
- 	case 'D':	goto yy12;
- 	case 'E':	goto yy16;
-@@ -264,71 +251,73 @@ yy9:
- 	case 'c':	goto yy25;
- 	default:	goto yy11;
- 	}
--yy11:yy12:	yych = *++YYCURSOR;
--	switch(yych){
--	case 0x0A:	goto yy41;
--	case 0x0D:	goto yy44;
-+yy11:
-+yy12:
-+	yych = *++YYCURSOR;
-+	switch (yych) {
-+	case '\n':	goto yy41;
-+	case '\r':	goto yy44;
- 	default:	goto yy11;
- 	}
--yy13:	yych = *++YYCURSOR;
--	switch(yych){
--	case 0x0A:	goto yy41;
--	case 0x0D:	goto yy43;
-+yy13:
-+	yych = *++YYCURSOR;
-+	switch (yych) {
-+	case '\n':	goto yy41;
-+	case '\r':	goto yy43;
- 	default:	goto yy11;
- 	}
--yy14:	yych = *++YYCURSOR;
--	switch(yych){
--	case 0x0A:	goto yy38;
--	case 0x0D:	goto yy40;
-+yy14:
-+	yych = *++YYCURSOR;
-+	switch (yych) {
-+	case '\n':	goto yy38;
-+	case '\r':	goto yy40;
- 	default:	goto yy11;
- 	}
--yy15:	yych = *++YYCURSOR;
--	switch(yych){
--	case 0x0A:	goto yy35;
--	case 0x0D:	goto yy37;
-+yy15:
-+	yych = *++YYCURSOR;
-+	switch (yych) {
-+	case '\n':	goto yy35;
-+	case '\r':	goto yy37;
- 	default:	goto yy11;
- 	}
--yy16:	yych = *++YYCURSOR;
--	switch(yych){
--	case 0x0A:	goto yy32;
--	case 0x0D:	goto yy34;
-+yy16:
-+	yych = *++YYCURSOR;
-+	switch (yych) {
-+	case '\n':	goto yy32;
-+	case '\r':	goto yy34;
- 	default:	goto yy11;
- 	}
--yy17:	++YYCURSOR;
--	goto yy18;
--yy18:
-+yy17:
-+	++YYCURSOR;
- #line 288 "bytecode.re"
--{   ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str); 
-+	{   ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str); 
-             goto Scalar;
-         }
--#line 296 "<stdout>"
--yy19:	++YYCURSOR;
--	goto yy20;
--yy20:
-+#line 295 "<stdout>"
-+yy19:
-+	++YYCURSOR;
- #line 292 "bytecode.re"
--{   ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_open);
-+	{   ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_open);
-             sycklval->name = get_inline( parser );
-             syck_hdlr_remove_anchor( parser, sycklval->name );
-             CHK_NL(YYCURSOR);
-             return YAML_ANCHOR;
-         }
--#line 307 "<stdout>"
--yy21:	++YYCURSOR;
--	goto yy22;
--yy22:
-+#line 305 "<stdout>"
-+yy21:
-+	++YYCURSOR;
- #line 299 "bytecode.re"
--{   ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
-+	{   ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
-             sycklval->name = get_inline( parser );
-             POP_LEVEL();
-             if ( *( YYCURSOR - 1 ) == '\n' ) YYCURSOR--;
-             return YAML_ALIAS;
-         }
--#line 318 "<stdout>"
--yy23:	++YYCURSOR;
--	goto yy24;
--yy24:
-+#line 315 "<stdout>"
-+yy23:
-+	++YYCURSOR;
- #line 306 "bytecode.re"
--{   char *qstr;
-+	{   char *qstr;
-             ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_open);
-             qstr = get_inline( parser );
-             CHK_NL(YYCURSOR);
-@@ -387,18 +376,16 @@ yy24:
-             sycklval->name = qstr;
-             return YAML_TAGURI;
-         }
--#line 382 "<stdout>"
--yy25:	++YYCURSOR;
--	goto yy26;
--yy26:
-+#line 378 "<stdout>"
-+yy25:
-+	++YYCURSOR;
- #line 366 "bytecode.re"
--{   goto Comment; }
--#line 388 "<stdout>"
--yy27:	++YYCURSOR;
--	goto yy28;
--yy28:
-+	{   goto Comment; }
-+#line 383 "<stdout>"
-+yy27:
-+	++YYCURSOR;
- #line 368 "bytecode.re"
--{   CHK_NL(YYCURSOR);
-+	{   CHK_NL(YYCURSOR);
-             if ( lvl->status == syck_lvl_seq )
-             {
-                 return YAML_INDENT; 
-@@ -410,26 +397,25 @@ yy28:
-             }
-             goto Document;
-         }
--#line 405 "<stdout>"
--yy29:	yych = *++YYCURSOR;
--	switch(yych){
--	case 0x0A:	goto yy27;
-+#line 399 "<stdout>"
-+yy29:
-+	yych = *++YYCURSOR;
-+	switch (yych) {
-+	case '\n':	goto yy27;
- 	default:	goto yy11;
- 	}
--yy30:	++YYCURSOR;
--	goto yy31;
--yy31:
-+yy30:
-+	++YYCURSOR;
- #line 381 "bytecode.re"
--{   ENSURE_YAML_IEND(lvl, -1);
-+	{   ENSURE_YAML_IEND(lvl, -1);
-             YYPOS(0);
-             return 0;
-         }
--#line 419 "<stdout>"
--yy32:	++YYCURSOR;
--	goto yy33;
--yy33:
-+#line 413 "<stdout>"
-+yy32:
-+	++YYCURSOR;
- #line 252 "bytecode.re"
--{   if ( lvl->status == syck_lvl_seq && lvl->ncount == 0 )
-+	{   if ( lvl->status == syck_lvl_seq && lvl->ncount == 0 )
-             {
-                 lvl->ncount++;
-                 YYPOS(0);
-@@ -464,17 +450,17 @@ yy33:
-             CHK_NL(YYCURSOR);
-             return YAML_IEND;
-         }
--#line 459 "<stdout>"
--yy34:	yych = *++YYCURSOR;
--	switch(yych){
--	case 0x0A:	goto yy32;
-+#line 452 "<stdout>"
-+yy34:
-+	yych = *++YYCURSOR;
-+	switch (yych) {
-+	case '\n':	goto yy32;
- 	default:	goto yy11;
- 	}
--yy35:	++YYCURSOR;
--	goto yy36;
--yy36:
-+yy35:
-+	++YYCURSOR;
- #line 237 "bytecode.re"
--{   int complex = 0;
-+	{   int complex = 0;
-             if ( lvl->ncount % 2 == 0 && ( lvl->status == syck_lvl_map || lvl->status == syck_lvl_seq ) )
-             {
-                 complex = 1;
-@@ -488,17 +474,17 @@ yy36:
-             }
-             return YAML_IOPEN;
-         }
--#line 483 "<stdout>"
--yy37:	yych = *++YYCURSOR;
--	switch(yych){
--	case 0x0A:	goto yy35;
-+#line 476 "<stdout>"
-+yy37:
-+	yych = *++YYCURSOR;
-+	switch (yych) {
-+	case '\n':	goto yy35;
- 	default:	goto yy11;
- 	}
--yy38:	++YYCURSOR;
--	goto yy39;
--yy39:
-+yy38:
-+	++YYCURSOR;
- #line 222 "bytecode.re"
--{   int complex = 0;
-+	{   int complex = 0;
-             if ( lvl->ncount % 2 == 0 && ( lvl->status == syck_lvl_map || lvl->status == syck_lvl_seq ) )
-             {
-                 complex = 1;
-@@ -512,29 +498,31 @@ yy39:
-             }
-             return YAML_IOPEN;
-         }
--#line 507 "<stdout>"
--yy40:	yych = *++YYCURSOR;
--	switch(yych){
--	case 0x0A:	goto yy38;
-+#line 500 "<stdout>"
-+yy40:
-+	yych = *++YYCURSOR;
-+	switch (yych) {
-+	case '\n':	goto yy38;
- 	default:	goto yy11;
- 	}
--yy41:	++YYCURSOR;
--	goto yy42;
--yy42:
-+yy41:
-+	++YYCURSOR;
- #line 217 "bytecode.re"
--{   ENSURE_YAML_IEND(lvl, -1);
-+	{   ENSURE_YAML_IEND(lvl, -1);
-                 YYPOS(0);
-                 return 0;
-             }
--#line 521 "<stdout>"
--yy43:	yych = *++YYCURSOR;
--	switch(yych){
--	case 0x0A:	goto yy41;
-+#line 514 "<stdout>"
-+yy43:
-+	yych = *++YYCURSOR;
-+	switch (yych) {
-+	case '\n':	goto yy41;
- 	default:	goto yy11;
- 	}
--yy44:	++YYCURSOR;
--	switch((yych = *YYCURSOR)) {
--	case 0x0A:	goto yy41;
-+yy44:
-+	++YYCURSOR;
-+	switch ((yych = *YYCURSOR)) {
-+	case '\n':	goto yy41;
- 	default:	goto yy11;
- 	}
- }
-@@ -548,28 +536,22 @@ Directive:
-         YYTOKEN = YYCURSOR;
- 
- 
--#line 543 "<stdout>"
-+#line 538 "<stdout>"
- {
- 	YYCTYPE yych;
--	unsigned int yyaccept = 0;
--	goto yy45;
--	/*@notreached@*/
--	++YYCURSOR;
--yy45:
--	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
-+	if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
- 	yych = *YYCURSOR;
--	switch(yych){
-+	switch (yych) {
- 	case 0x00:	goto yy47;
- 	case 'V':	goto yy48;
- 	default:	goto yy50;
- 	}
--yy47:	YYCURSOR = YYMARKER;
--	switch(yyaccept){
--	case 0:	goto yy49;
--	}
--yy48:	yyaccept = 0;
-+yy47:
-+	YYCURSOR = YYMARKER;
-+	goto yy49;
-+yy48:
- 	yych = *(YYMARKER = ++YYCURSOR);
--	switch(yych){
-+	switch (yych) {
- 	case '.':
- 	case '/':
- 	case '0':
-@@ -619,7 +601,8 @@ yy48:	yyaccept = 0;
- 	case '\\':
- 	case ']':
- 	case '^':
--	case '_':	case 'a':
-+	case '_':
-+	case 'a':
- 	case 'b':
- 	case 'c':
- 	case 'd':
-@@ -649,17 +632,18 @@ yy48:	yyaccept = 0;
- 	}
- yy49:
- #line 399 "bytecode.re"
--{   YYCURSOR = YYTOKEN;
-+	{   YYCURSOR = YYTOKEN;
-                return YAML_DOCSEP;
-            }
--#line 646 "<stdout>"
--yy50:	yych = *++YYCURSOR;
-+#line 637 "<stdout>"
-+yy50:
-+	yych = *++YYCURSOR;
- 	goto yy49;
--yy51:	++YYCURSOR;
--	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
-+yy51:
-+	++YYCURSOR;
-+	if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
- 	yych = *YYCURSOR;
--	goto yy52;
--yy52:	switch(yych){
-+	switch (yych) {
- 	case '.':
- 	case '/':
- 	case '0':
-@@ -671,7 +655,8 @@ yy52:	switch(yych){
- 	case '6':
- 	case '7':
- 	case '8':
--	case '9':	case ';':
-+	case '9':
-+	case ';':
- 	case '<':
- 	case '=':
- 	case '>':
-@@ -707,7 +692,8 @@ yy52:	switch(yych){
- 	case '\\':
- 	case ']':
- 	case '^':
--	case '_':	case 'a':
-+	case '_':
-+	case 'a':
- 	case 'b':
- 	case 'c':
- 	case 'd':
-@@ -736,8 +722,9 @@ yy52:	switch(yych){
- 	case ':':	goto yy53;
- 	default:	goto yy47;
- 	}
--yy53:	yych = *++YYCURSOR;
--	switch(yych){
-+yy53:
-+	yych = *++YYCURSOR;
-+	switch (yych) {
- 	case '.':
- 	case '/':
- 	case '0':
-@@ -787,7 +774,8 @@ yy53:	yych = *++YYCURSOR;
- 	case '\\':
- 	case ']':
- 	case '^':
--	case '_':	case 'a':
-+	case '_':
-+	case 'a':
- 	case 'b':
- 	case 'c':
- 	case 'd':
-@@ -815,13 +803,13 @@ yy53:	yych = *++YYCURSOR;
- 	case 'z':	goto yy54;
- 	default:	goto yy47;
- 	}
--yy54:	++YYCURSOR;
--	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
-+yy54:
-+	++YYCURSOR;
-+	if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
- 	yych = *YYCURSOR;
--	goto yy55;
--yy55:	switch(yych){
--	case 0x0A:	goto yy56;
--	case 0x0D:	goto yy58;
-+	switch (yych) {
-+	case '\n':	goto yy56;
-+	case '\r':	goto yy58;
- 	case '.':
- 	case '/':
- 	case '0':
-@@ -871,7 +859,8 @@ yy55:	switch(yych){
- 	case '\\':
- 	case ']':
- 	case '^':
--	case '_':	case 'a':
-+	case '_':
-+	case 'a':
- 	case 'b':
- 	case 'c':
- 	case 'd':
-@@ -899,16 +888,16 @@ yy55:	switch(yych){
- 	case 'z':	goto yy54;
- 	default:	goto yy47;
- 	}
--yy56:	++YYCURSOR;
--	goto yy57;
--yy57:
-+yy56:
-+	++YYCURSOR;
- #line 396 "bytecode.re"
--{   CHK_NL(YYCURSOR);
-+	{   CHK_NL(YYCURSOR);
-                goto Directive; }
--#line 899 "<stdout>"
--yy58:	++YYCURSOR;
--	switch((yych = *YYCURSOR)) {
--	case 0x0A:	goto yy56;
-+#line 895 "<stdout>"
-+yy58:
-+	++YYCURSOR;
-+	switch ((yych = *YYCURSOR)) {
-+	case '\n':	goto yy56;
- 	default:	goto yy47;
- 	}
- }
-@@ -922,40 +911,40 @@ Comment:
-         YYTOKEN = YYCURSOR;
- 
- 
--#line 916 "<stdout>"
-+#line 913 "<stdout>"
- {
- 	YYCTYPE yych;
--	goto yy59;
--	/*@notreached@*/
--	++YYCURSOR;
--yy59:
--	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
-+	if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
- 	yych = *YYCURSOR;
--	switch(yych){
-+	switch (yych) {
- 	case 0x00:	goto yy61;
--	case 0x0A:	goto yy62;
--	case 0x0D:	goto yy64;
-+	case '\n':	goto yy62;
-+	case '\r':	goto yy64;
- 	default:	goto yy66;
- 	}
--yy61:yy62:	++YYCURSOR;
--	goto yy63;
-+yy61:
-+yy62:
-+	++YYCURSOR;
- yy63:
- #line 412 "bytecode.re"
--{   CHK_NL(YYCURSOR);
-+	{   CHK_NL(YYCURSOR);
-                 goto Document; }
--#line 936 "<stdout>"
--yy64:	++YYCURSOR;
--	switch((yych = *YYCURSOR)) {
--	case 0x0A:	goto yy67;
-+#line 931 "<stdout>"
-+yy64:
-+	++YYCURSOR;
-+	switch ((yych = *YYCURSOR)) {
-+	case '\n':	goto yy67;
- 	default:	goto yy65;
- 	}
- yy65:
- #line 415 "bytecode.re"
--{   goto Comment; }
--#line 945 "<stdout>"
--yy66:	yych = *++YYCURSOR;
-+	{   goto Comment; }
-+#line 941 "<stdout>"
-+yy66:
-+	yych = *++YYCURSOR;
- 	goto yy65;
--yy67:	++YYCURSOR;
-+yy67:
-+	++YYCURSOR;
- 	yych = *YYCURSOR;
- 	goto yy63;
- }
-@@ -977,23 +966,20 @@ Scalar2:
-     tok = YYCURSOR;
- 
- 
--#line 970 "<stdout>"
-+#line 968 "<stdout>"
- {
- 	YYCTYPE yych;
--	goto yy68;
--	/*@notreached@*/
--	++YYCURSOR;
--yy68:
--	if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
-+	if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
- 	yych = *YYCURSOR;
--	switch(yych){
-+	switch (yych) {
- 	case 0x00:	goto yy74;
--	case 0x0A:	goto yy70;
--	case 0x0D:	goto yy72;
-+	case '\n':	goto yy70;
-+	case '\r':	goto yy72;
- 	default:	goto yy76;
- 	}
--yy70:	++YYCURSOR;
--	switch((yych = *YYCURSOR)) {
-+yy70:
-+	++YYCURSOR;
-+	switch ((yych = *YYCURSOR)) {
- 	case 'C':	goto yy78;
- 	case 'N':	goto yy80;
- 	case 'Z':	goto yy83;
-@@ -1001,50 +987,51 @@ yy70:	++YYCURSOR;
- 	}
- yy71:
- #line 461 "bytecode.re"
--{   YYCURSOR = tok;
-+	{   YYCURSOR = tok;
-             goto ScalarEnd; 
-         }
--#line 996 "<stdout>"
--yy72:	++YYCURSOR;
--	switch((yych = *YYCURSOR)) {
--	case 0x0A:	goto yy77;
-+#line 992 "<stdout>"
-+yy72:
-+	++YYCURSOR;
-+	switch ((yych = *YYCURSOR)) {
-+	case '\n':	goto yy77;
- 	default:	goto yy73;
- 	}
- yy73:
- #line 469 "bytecode.re"
--{   CAT(str, cap, idx, tok[0]);
-+	{   CAT(str, cap, idx, tok[0]);
-             goto Scalar2; 
-         }
--#line 1007 "<stdout>"
--yy74:	++YYCURSOR;
--	goto yy75;
--yy75:
-+#line 1004 "<stdout>"
-+yy74:
-+	++YYCURSOR;
- #line 465 "bytecode.re"
--{   YYCURSOR = tok;
-+	{   YYCURSOR = tok;
-             goto ScalarEnd;
-         }
--#line 1015 "<stdout>"
--yy76:	yych = *++YYCURSOR;
-+#line 1011 "<stdout>"
-+yy76:
-+	yych = *++YYCURSOR;
- 	goto yy73;
--yy77:	yych = *++YYCURSOR;
--	switch(yych){
-+yy77:
-+	yych = *++YYCURSOR;
-+	switch (yych) {
- 	case 'C':	goto yy78;
- 	case 'N':	goto yy80;
- 	case 'Z':	goto yy83;
- 	default:	goto yy71;
- 	}
--yy78:	++YYCURSOR;
--	goto yy79;
--yy79:
-+yy78:
-+	++YYCURSOR;
- #line 435 "bytecode.re"
--{   CHK_NL(tok+1);
-+	{   CHK_NL(tok+1);
-             goto Scalar2; }
--#line 1031 "<stdout>"
--yy80:	++YYCURSOR;
--	if(YYLIMIT == YYCURSOR) YYFILL(1);
-+#line 1028 "<stdout>"
-+yy80:
-+	++YYCURSOR;
-+	if (YYLIMIT <= YYCURSOR) YYFILL(1);
- 	yych = *YYCURSOR;
--	goto yy81;
--yy81:	switch(yych){
-+	switch (yych) {
- 	case '0':
- 	case '1':
- 	case '2':
-@@ -1059,7 +1046,7 @@ yy81:	switch(yych){
- 	}
- yy82:
- #line 438 "bytecode.re"
--{   CHK_NL(tok+1);
-+	{   CHK_NL(tok+1);
-             if ( tok + 2 < YYCURSOR )
-             {
-                 char *count = tok + 2;
-@@ -1076,16 +1063,15 @@ yy82:
-             }
-             goto Scalar2;
-         }
--#line 1068 "<stdout>"
--yy83:	++YYCURSOR;
--	goto yy84;
--yy84:
-+#line 1065 "<stdout>"
-+yy83:
-+	++YYCURSOR;
- #line 456 "bytecode.re"
--{   CHK_NL(tok+1);
-+	{   CHK_NL(tok+1);
-             CAT(str, cap, idx, '\0');
-             goto Scalar2; 
-         }
--#line 1077 "<stdout>"
-+#line 1073 "<stdout>"
- }
- #line 473 "bytecode.re"
- 
-@@ -1122,50 +1108,48 @@ Inline:
-         tok = YYCURSOR;
- 
- 
--#line 1114 "<stdout>"
-+#line 1110 "<stdout>"
- {
- 	YYCTYPE yych;
--	goto yy85;
--	/*@notreached@*/
--	++YYCURSOR;
--yy85:
--	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
-+	if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
- 	yych = *YYCURSOR;
--	switch(yych){
-+	switch (yych) {
- 	case 0x00:	goto yy91;
--	case 0x0A:	goto yy87;
--	case 0x0D:	goto yy89;
-+	case '\n':	goto yy87;
-+	case '\r':	goto yy89;
- 	default:	goto yy93;
- 	}
--yy87:	++YYCURSOR;
--	goto yy88;
-+yy87:
-+	++YYCURSOR;
- yy88:
- #line 508 "bytecode.re"
--{   CHK_NL(YYCURSOR);
-+	{   CHK_NL(YYCURSOR);
-                 return str; }
--#line 1134 "<stdout>"
--yy89:	++YYCURSOR;
--	switch((yych = *YYCURSOR)) {
--	case 0x0A:	goto yy94;
-+#line 1127 "<stdout>"
-+yy89:
-+	++YYCURSOR;
-+	switch ((yych = *YYCURSOR)) {
-+	case '\n':	goto yy94;
- 	default:	goto yy90;
- 	}
- yy90:
- #line 515 "bytecode.re"
--{   CAT(str, cap, idx, tok[0]);
-+	{   CAT(str, cap, idx, tok[0]);
-                 goto Inline; 
-             }
--#line 1145 "<stdout>"
--yy91:	++YYCURSOR;
--	goto yy92;
--yy92:
-+#line 1139 "<stdout>"
-+yy91:
-+	++YYCURSOR;
- #line 511 "bytecode.re"
--{   YYCURSOR = tok;
-+	{   YYCURSOR = tok;
-                 return str;
-             }
--#line 1153 "<stdout>"
--yy93:	yych = *++YYCURSOR;
-+#line 1146 "<stdout>"
-+yy93:
-+	yych = *++YYCURSOR;
- 	goto yy90;
--yy94:	++YYCURSOR;
-+yy94:
-+	++YYCURSOR;
- 	yych = *YYCURSOR;
- 	goto yy88;
- }
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-tag-generate-endian-conversion-fix.patch b/meta/recipes-devtools/rpm/rpm/rpm-tag-generate-endian-conversion-fix.patch
deleted file mode 100644
index 5fb40b6fefe..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-tag-generate-endian-conversion-fix.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-fix a endian incompatible error in generating rpm tag
-
-A flaw was found in the way rpm generating arbitrary tags, which leads to a
-incorrect query result, this issue is introduced by a incompatible endianess
-when the generating process is executed on different architectures.
-
-This patch resolves it by taking the byte order that host uses.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Ming Liu <ming.liu@windriver.com>
----
- tagname.c |   16 ++++++++++++++++
- 1 file changed, 16 insertions(+)
-
-Index: rpm-5.4.14/rpmdb/tagname.c
-===================================================================
---- rpm-5.4.14.orig/rpmdb/tagname.c
-+++ rpm-5.4.14/rpmdb/tagname.c
-@@ -3,6 +3,19 @@
-  */
- 
- #include "system.h"
-+#include <endian.h>
-+
-+/* Don't redefine this macro if it already exists */
-+#ifndef le32toh
-+#ifdef __USE_BSD
-+#include <byteswap.h>
-+#if __BYTE_ORDER == __LITTLE_ENDIAN
-+#define le32toh(x) (x)
-+#else
-+#define le32toh(x) __bswap_32(x)
-+#endif
-+#endif /* __USE_BSD */
-+#endif /* le32toh */
- 
- #include <rpmio_internal.h>	/* XXX DIGEST_CTX, xtolower, xstrcasecmp */
- #include <rpmmacro.h>
-@@ -152,7 +165,10 @@ static rpmTag _tagGenerate(const char *s
-     xx = rpmDigestUpdate(ctx, s, nb);
-     xx = rpmDigestFinal(ctx, &digest, &digestlen, 0);
-     if (digest && digestlen > 4) {
-+	/* The tag is stored in a uniform byte order for cross-endian compatibility.
-+	   Swap to the host uses. */
- 	memcpy(&tag, digest + (digestlen - 4), 4);
-+	tag = le32toh(tag);
- 	tag = (rpmTag) (tag & 0x3fffffff);
- 	tag = (rpmTag) (tag | 0x40000000);
-     }
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-tagname-type.patch b/meta/recipes-devtools/rpm/rpm/rpm-tagname-type.patch
deleted file mode 100644
index 9eb675ba291..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-tagname-type.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-rpmdb/tagname.c: Add the 0x54aafb71 (filenames) type to rpmTagGetType
-
-There is already a workaround in the _tagName function to show that the
-special 'filenames' item is value.  This adds a similar patch to the
-_tagType to return the proper type, otherwise it comes back as a simple
-RPM_STRING_ARRAY_TYPE which limits the response to the first element.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.15/rpmdb/tagname.c
-===================================================================
---- rpm-5.4.15.orig/rpmdb/tagname.c
-+++ rpm-5.4.15/rpmdb/tagname.c
-@@ -353,6 +353,9 @@ static unsigned int _tagType(rpmTag tag)
-     case RPMDBI_RECNO:
-     case RPMDBI_HEAP:
- 	break;
-+    /* XXX make sure that h.['filenames'] in python "works". */
-+    case 0x54aafb71:
-+	return (RPM_STRING_ARRAY_TYPE + RPM_ARRAY_RETURN_TYPE);
-     default:
- 	if (_rpmTags.byValue == NULL)
- 	    break;
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-tools-mtree-LDFLAGS.patch b/meta/recipes-devtools/rpm/rpm/rpm-tools-mtree-LDFLAGS.patch
deleted file mode 100644
index 72d35092918..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-tools-mtree-LDFLAGS.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Source: None
-Upstream-Status: Submitted [RPM5 maintainer]
-Author: Khem Raj <raj.khem@gmail.com>
-Date: 2011-03-03
-Description:
-This patch fixes build issue found when compiling rpm-native on ubuntu
-11.04-alpha. Problem is that linker does not get correct set of dependent
-libraries when linking mtree binary which results in undefined symbols
-in librpmio.so. This patch adds correct flags to mtree_LDADD to account
-for rpmio deps
-
-Index: rpm-5.4.14/tools/Makefile.am
-===================================================================
---- rpm-5.4.14.orig/tools/Makefile.am
-+++ rpm-5.4.14/tools/Makefile.am
-@@ -186,7 +186,7 @@ grep_LDADD =		$(RPMIO_LDADD_COMMON)
- 
- mtree_SOURCES =		rpmmtree.c
- mtree_LDFLAGS =		@LDFLAGS_STATIC@ $(LDFLAGS)
--mtree_LDADD =		$(RPM_LDADD_COMMON)
-+mtree_LDADD =		$(RPMIO_LDADD_COMMON)
- 
- rpmrepo_SOURCES =	rpmrepo.c
- rpmrepo_CPPFLAGS =	$(AM_CPPFLAGS) -I$(top_srcdir)/scripts -I$(top_builddir)/scripts $(CPPFLAGS)
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-uuid-include.patch b/meta/recipes-devtools/rpm/rpm/rpm-uuid-include.patch
deleted file mode 100644
index 713f84ee27b..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm-uuid-include.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-A patch to fix a problem when compiling with uuid.
-
-When attempting to build with uuid and all tests compiling will error because
-uuid.h doesn't exist in the rpm tarball. Fix this by changing the include to
-use the one in ossp which solves the issue. 
-
-The recipe already depends on ossp so ossp/uuid.h will be there when rpm-native
-is built.
-
-Upstream-Status: Pending
-
-Signed-off-by: Morgan Little <morgan.little@windriver.com>
-
-
-Index: rpm-5.4.14/lua/local/luuid.c
-===================================================================
---- rpm-5.4.14.orig/lua/local/luuid.c
-+++ rpm-5.4.14/lua/local/luuid.c
-@@ -21,7 +21,7 @@
- 
- #ifdef LUA_USE_UUID
- 
--#include "uuid.h"
-+#include <ossp/uuid.h>
- 
- /*  Lua method: <uuid> = uuid.generate(<version>[, <uuid-namespace>, <data>])  */
- static int luuid_generate(lua_State *L)
-Index: rpm-5.4.14/rpmio/rpmuuid.c
-===================================================================
---- rpm-5.4.14.orig/rpmio/rpmuuid.c
-+++ rpm-5.4.14/rpmio/rpmuuid.c
-@@ -16,7 +16,7 @@
- #include "rpmlog.h"
- #include "rpmuuid.h"
- #ifdef WITH_UUID
--#include "uuid.h"
-+#include <ossp/uuid.h>
- #endif
- #include "debug.h"
- 
diff --git a/meta/recipes-devtools/rpm/rpm/rpm2cpio b/meta/recipes-devtools/rpm/rpm/rpm2cpio
deleted file mode 100755
index 6bcef6a4ce5..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpm2cpio
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh
-
-# Prevent gawk >= 4.0.x from getting funny ideas wrt UTF in printf()
-LANG=C
-
-pkg=$1
-if [ "$pkg" = "" -o ! -e "$pkg" ]; then
-    echo "no package supplied" 1>&2
-   exit 1
-fi
-
-leadsize=96
-o=`expr $leadsize + 8`
-set `od -j $o -N 8 -t u1 $pkg`
-il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`
-dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`
-# echo "sig il: $il dl: $dl"
-
-sigsize=`expr 8 + 16 \* $il + $dl`
-o=`expr $o + $sigsize + \( 8 - \( $sigsize \% 8 \) \) \% 8 + 8`
-set `od -j $o -N 8 -t u1 $pkg`
-il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`
-dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`
-# echo "hdr il: $il dl: $dl"
-
-hdrsize=`expr 8 + 16 \* $il + $dl`
-o=`expr $o + $hdrsize`
-comp=`dd if=$pkg ibs=$o skip=1 count=1 2>/dev/null | dd bs=3 count=1 2> /dev/null`
-
-gz="`echo . | awk '{ printf("%c%c", 0x1f, 0x8b); }'`"
-lzma="`echo . | awk '{ printf("%cLZ", 0xff); }'`"
-xz="`echo . | awk '{ printf("%c7z", 0xfd); }'`"
-case "$comp" in
-    BZh)      dd if="$pkg" ibs=$o skip=1 2>/dev/null | bunzip2 ;;
-    "$gz"*)   dd if="$pkg" ibs=$o skip=1 2>/dev/null | gunzip ;;
-    "$xz"*)   dd if="$pkg" ibs=$o skip=1 2>/dev/null | xzcat ;;
-    "$lzma"*) dd if="$pkg" ibs=$o skip=1 2>/dev/null | unlzma ;;
-    *)        echo "Unrecognized rpm file: $pkg"; exit 1 ;;
-esac
diff --git a/meta/recipes-devtools/rpm/rpm/rpmatch.patch b/meta/recipes-devtools/rpm/rpm/rpmatch.patch
deleted file mode 100644
index 9bbf580e464..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpmatch.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Create a compatable macro if rpmatch() is not provided by the C library.
-
-This uses an existing configure check.
-
-This is needed for uclibc since it does not have the above function
-implemented.
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Updated to rpm 5.4.15+.
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm/system.h
-===================================================================
---- rpm.orig/system.h
-+++ rpm/system.h
-@@ -358,6 +358,14 @@ extern int _tolower(int) __THROW	/*@*/;
- #include <libgen.h>
- #endif
- 
-+#ifndef HAVE_RPMATCH
-+#define rpmatch(line) \
-+	( (line == NULL)? -1 : \
-+	  (*line == 'y' || *line == 'Y')? 1 : \
-+	  (*line == 'n' || *line == 'N')? 0 : \
-+	  -1 )
-+#endif
-+
- /* -- Retrofit glibc __progname */
- #if defined __GLIBC__ && __GLIBC__ >= 2
- #if __GLIBC_MINOR__ >= 1
diff --git a/meta/recipes-devtools/rpm/rpm/rpmdb-more-verbose-error-logging-in-rpmTempFile.patch b/meta/recipes-devtools/rpm/rpm/rpmdb-more-verbose-error-logging-in-rpmTempFile.patch
deleted file mode 100644
index 3a6f8746cc7..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpmdb-more-verbose-error-logging-in-rpmTempFile.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-rpmdb: more verbose error logging in rpmTempFile()
-
-Upstream-Status: Inappropriate [debugging]
-
-Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
-
-diff --git a/rpmdb/signature.c b/rpmdb/signature.c
-index 100204b..e56ab3d 100644
---- a/rpmdb/signature.c
-+++ b/rpmdb/signature.c
-@@ -72,12 +72,16 @@ int rpmTempFile(const char * prefix, const char ** fnptr, void * fdptr)
- #endif
- 
- 	temput = urlPath(tempfn, &tfn);
--	if (*tfn == '\0') goto errxit;
-+	if (*tfn == '\0') {
-+            rpmlog(RPMLOG_ERR, _("error creating tempfile: empty filename\n"));
-+            goto errxit;
-+        }
- 
- 	switch (temput) {
- 	case URL_IS_DASH:
- 	case URL_IS_HKP:
- 	case URL_IS_MONGO:	/* XXX FIXME */
-+            rpmlog(RPMLOG_ERR, _("error creating temporary file, invalid uri type: %d\n"), temput);
- 	    goto errxit;
- 	    /*@notreached@*/ /*@switchbreak@*/ break;
- 	case URL_IS_HTTPS:
--- 
-2.6.6
-
diff --git a/meta/recipes-devtools/rpm/rpm/rpmdb-prevent-race-in-tmpdir-creation.patch b/meta/recipes-devtools/rpm/rpm/rpmdb-prevent-race-in-tmpdir-creation.patch
deleted file mode 100644
index f483f3ad90e..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpmdb-prevent-race-in-tmpdir-creation.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-rpmdb: prevent race in tmpdir creation
-
-If two (or more) instances of rpm are running at the same time they may
-be trying to create the same (base-)temporary directory at the same time
-which causes the other mkdir to fail with EEXIST. This patch prevents a
-failure caused by this race by ignoring EEXIST error on directory
-creation.
-
-Upstream-Status: Pending
-
-Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
-
-diff --git a/rpmdb/signature.c b/rpmdb/signature.c
-index dce6c4e..100204b 100644
---- a/rpmdb/signature.c
-+++ b/rpmdb/signature.c
-@@ -37,6 +37,7 @@ int rpmTempFile(const char * prefix, const char ** fnptr, void * fdptr)
-     int temput;
-     FD_t fd = NULL;
-     unsigned int ran;
-+    int ret = 0;
- 
-     if (!prefix) prefix = "";
- 
-@@ -44,8 +45,11 @@ int rpmTempFile(const char * prefix, const char ** fnptr, void * fdptr)
-     if (!_initialized) {
- 	_initialized = 1;
- 	tempfn = rpmGenPath(prefix, tpmacro, NULL);
--	if (rpmioMkpath(tempfn, 0755, (uid_t) -1, (gid_t) -1))
--	    goto errxit;
-+        ret = rpmioMkpath(tempfn, 0755, (uid_t) -1, (gid_t) -1);
-+        if (ret && ret != EEXIST) {
-+            rpmlog(RPMLOG_ERR, _("error creating temporary directory %s: %d\n"), tempfn, ret);
-+            goto errxit;
-+        }
-     }
- 
-     /* XXX should probably use mkstemp here */
--- 
-2.6.6
-
diff --git a/meta/recipes-devtools/rpm/rpm/rpmdeps-oecore.patch b/meta/recipes-devtools/rpm/rpm/rpmdeps-oecore.patch
deleted file mode 100644
index 9bdd1d49088..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpmdeps-oecore.patch
+++ /dev/null
@@ -1,194 +0,0 @@
-Add an "rpmdeps-oecore" binary which allows batch processing of individual file
-dependencies in a similar manner to rpmdeps --provides --requires -v, prefixing
-each line of output with the filename that has the dependency.
-
-This is much faster than individually calling rpmdeps on each file.
-
-This binary is used by package.bbclass.
-
-Upstream-Status: Inappropriate [OE Specific]
-
-RP 2012/2/7
-
----
- tools/Makefile.am      |    6 ++-
- tools/rpmdeps-oecore.c |  147 ++++++++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 152 insertions(+), 1 deletions(-)
- create mode 100644 tools/rpmdeps-oecore.c
-
-Index: rpm-5.4.14/tools/Makefile.am
-===================================================================
---- rpm-5.4.14.orig/tools/Makefile.am
-+++ rpm-5.4.14/tools/Makefile.am
-@@ -62,7 +62,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@
- if WITH_DB
- pkgbin_PROGRAMS +=	dbconvert
- endif
-@@ -172,6 +172,10 @@ rpmdeps_SOURCES =	rpmdeps.c
- rpmdeps_LDFLAGS =	@LDFLAGS_STATIC@ $(LDFLAGS)
- rpmdeps_LDADD =		$(RPM_LDADD_COMMON)
- 
-+rpmdeps_oecore_SOURCES =  rpmdeps-oecore.c
-+rpmdeps_oecore_LDFLAGS =  @LDFLAGS_STATIC@ $(LDFLAGS)
-+rpmdeps_oecore_LDADD =    $(RPM_LDADD_COMMON)
-+
- rpmdigest_SOURCES =	rpmdigest.c
- rpmdigest_LDFLAGS =	@LDFLAGS_STATIC@ $(LDFLAGS)
- rpmdigest_LDADD =	$(RPMIO_LDADD_COMMON)
-Index: rpm-5.4.14/tools/rpmdeps-oecore.c
-===================================================================
---- /dev/null
-+++ rpm-5.4.14/tools/rpmdeps-oecore.c
-@@ -0,0 +1,147 @@
-+#include "system.h"
-+const char *__progname;
-+
-+#include <rpmio.h>
-+#include <rpmiotypes.h>
-+#include <rpmcb.h>
-+#include <argv.h>
-+#include <rpmtypes.h>
-+#include <rpmtag.h>
-+
-+#include <rpmds.h>
-+#define   _RPMFC_INTERNAL     /* XXX for debugging */
-+#include <rpmfc.h>
-+
-+#include <rpmcli.h>
-+
-+#include "debug.h"
-+
-+/*@unchecked@*/
-+char *progname;
-+
-+#define   RPMDEP_RPMFC        1
-+
-+static int rpmdepPrint(char *filename, rpmds ds, FILE * fp)
-+{
-+    if (fp == NULL) fp = stderr;
-+
-+    ds = rpmdsInit(ds);
-+    while (rpmdsNext(ds) >= 0) {
-+  fprintf(fp, "%s %s: %s\n", filename, rpmdsType(ds), rpmdsDNEVR(ds)+2);
-+    }
-+    return 0;
-+}
-+
-+static struct poptOption optionsTable[] = {
-+
-+ { NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmcliAllPoptTable, 0,
-+  N_("Common options:"),
-+  NULL }, 
-+
-+   POPT_AUTOALIAS
-+   POPT_AUTOHELP
-+   POPT_TABLEEND
-+};
-+
-+
-+int
-+main(int argc, char *argv[])
-+{
-+    poptContext optCon;
-+    ARGV_t av = NULL;
-+    rpmfc fc = NULL;
-+    FILE * fp = NULL;
-+    int flags = 0;
-+    int ac = 0;
-+    int ec = 1;
-+    int xx;
-+    int i;
-+    char buf[BUFSIZ];
-+    int nddict;
-+    const char * s;
-+    char * se;
-+    const char * fn;
-+    const char * N;
-+    const char * EVR;
-+    evrFlags Flags;
-+    unsigned char deptype;
-+    int ix;
-+    rpmds ds;
-+
-+/*@-modobserver@*/
-+    if ((progname = strrchr(argv[0], '/')) != NULL)
-+  progname++;
-+    else
-+  progname = argv[0];
-+/*@=modobserver@*/
-+
-+    optCon = rpmcliInit(argc, argv, optionsTable);
-+    if (optCon == NULL)
-+  goto exit;
-+
-+    av = poptGetArgs(optCon);
-+    ac = argvCount(av);
-+
-+    if (ac == 0) {
-+  av = NULL;
-+  xx = argvFgets(&av, NULL);
-+  ac = argvCount(av);
-+    }
-+
-+    /* Make sure file names are sorted. */
-+    xx = argvSort(av, NULL);
-+
-+    /* Build file class dictionary. */
-+    fc = rpmfcNew();
-+    xx = rpmfcClassify(fc, av, NULL);
-+
-+    /* Build file/package dependency dictionary. */
-+    xx = rpmfcApply(fc);
-+
-+    /* Generate per-file indices into package dependencies. */
-+    nddict = argvCount(fc->ddict);
-+
-+    for (i = 0; i < nddict; i++) {
-+  s = fc->ddict[i];
-+
-+  /* Parse out (file#,deptype,N,EVR,Flags) */
-+  ix = strtol(s, &se, 10);
-+  assert(se != NULL);
-+  deptype = *se++;
-+  se++;
-+  N = se;
-+  while (*se && *se != ' ')
-+      se++;
-+  *se++ = '\0';
-+  EVR = se;
-+  while (*se && *se != ' ')
-+      se++;
-+  *se++ = '\0';
-+  Flags = strtol(se, NULL, 16);
-+
-+  switch (deptype) {
-+  default:
-+      /*@switchbreak@*/ break;
-+  case 'P':   
-+      ds = rpmdsSingle(RPMTAG_PROVIDENAME, N, EVR, Flags);
-+      rpmdepPrint((char *)fc->fn[ix], ds, stdout);
-+      (void)rpmdsFree(ds);
-+      ds = NULL;
-+      /*@switchbreak@*/ break;
-+  case 'R':
-+      ds = rpmdsSingle(RPMTAG_REQUIRENAME, N, EVR, Flags);
-+      rpmdepPrint((char *)fc->fn[ix], ds, stdout);
-+      (void)rpmdsFree(ds);
-+      ds = NULL;
-+      /*@switchbreak@*/ break;
-+  }
-+    }
-+
-+    fc = rpmfcFree(fc);
-+
-+    ec = 0;
-+
-+exit:
-+    optCon = rpmcliFini(optCon);
-+    return ec;
-+}
diff --git a/meta/recipes-devtools/rpm/rpm/rpmqv.c-check-_gpg_passphrase-before-ask-for-input.patch b/meta/recipes-devtools/rpm/rpm/rpmqv.c-check-_gpg_passphrase-before-ask-for-input.patch
deleted file mode 100644
index c68681c1ed5..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpmqv.c-check-_gpg_passphrase-before-ask-for-input.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From bb48dbc88a58bc05a43d71a3375fb05358119ec5 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Sun, 20 Mar 2016 20:20:16 -0700
-Subject: [PATCH] rpmqv.c: check _gpg_passphrase before ask for input
-
-rpm always asked for pass phrasae when add signature, which made it
-can't work non-interactively, this patch fix the problem. It will work
-non-interactively if _gpg_passphrase is defined, and work as before if
-not.
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- macros/macros.in |    7 +++++--
- rpmqv.c          |   17 ++++++++++-------
- 2 files changed, 15 insertions(+), 9 deletions(-)
-
-diff --git a/macros/macros.in b/macros/macros.in
-index 2e5b07d..01b3aad 100644
---- a/macros/macros.in
-+++ b/macros/macros.in
-@@ -520,15 +520,18 @@ $_arbitrary_tags_tests	Foo:Bar
- #	Macro(s) to hold the arguments passed to GPG/PGP for package
- #	signing and verification.
- #
-+
-+%_gpg_passphrase_way %{?_gpg_passphrase:--passphrase "%{_gpg_passphrase}"}%{!?_gpg_passphrase:--passphrase-fd 3}
-+
- %__gpg_check_password_cmd	%{__gpg} \
--	gpg --batch --no-verbose --passphrase-fd 3 -u "%{_gpg_name}" -so -
-+	gpg --batch --no-verbose %{_gpg_passphrase_way} -u "%{_gpg_name}" -so -
- #%__pgp_check_password_cmd	%{__pgp} \
- #	pgp +batchmode=on +verbose=0 "%{_pgp_name}" -sf
- #%__pgp5_check_password_cmd	%{__pgp} \
- #	pgps +batchmode=on +verbose=0 +armor=off "%{_pgp_name}" -f
- 
- %__gpg_sign_cmd			%{__gpg} \
--	gpg --batch --no-verbose --no-armor --passphrase-fd 3 --no-secmem-warning \
-+	gpg --batch --no-verbose --no-armor %{_gpg_passphrase_way}  --no-secmem-warning \
- 	-u "%{_gpg_name}" -sbo %{__signature_filename} %{__plaintext_filename}
- #%__pgp_sign_cmd			%{__pgp} \
- #	pgp +batchmode=on +verbose=0 +armor=off \
-diff --git a/rpmqv.c b/rpmqv.c
-index b306486..7604396 100644
---- a/rpmqv.c
-+++ b/rpmqv.c
-@@ -831,13 +831,16 @@ int main(int argc, const char ** argv)
- #endif
- 	    )
- 	    {
--		passPhrase = Getpass(_("Enter pass phrase: "));
--		if (rpmCheckPassPhrase(passPhrase)) {
--		    fprintf(stderr, _("Pass phrase check failed\n"));
--		    ec = EXIT_FAILURE;
--		    goto exit;
-+		passPhrase = rpmExpand("%{?_gpg_passphrase}", NULL);
-+		if (passPhrase == NULL || passPhrase[0] == '\0') {
-+			passPhrase = Getpass(_("Enter pass phrase: "));
-+			if (rpmCheckPassPhrase(passPhrase)) {
-+			    fprintf(stderr, _("Pass phrase check failed\n"));
-+			    ec = EXIT_FAILURE;
-+			    goto exit;
-+			}
-+			fprintf(stderr, _("Pass phrase is good.\n"));
- 		}
--		fprintf(stderr, _("Pass phrase is good.\n"));
- 		/* XXX Getpass() should realloc instead. */
- 		passPhrase = xstrdup(passPhrase);
- 	    }
diff --git a/meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch b/meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch
deleted file mode 100644
index b2437a87235..00000000000
--- a/meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From e8bae261615e19ff8a28683765c9539cfb22a086 Mon Sep 17 00:00:00 2001
-From: Joe Slater <jslater@windriver.com>
-Date: Thu, 17 Jul 2014 18:14:54 -0700
-Subject: [PATCH 1/9] rpm: compile rpmqv.c instead of rpmqv.cc
-
-Some versions of gcc, 4.4.5 for example, will put a reference to __gxx_personality_v0
-into rpm.o and rpmbuild.o.  This means we must link with g++, and the Makefile we
-generate does not.
-
-So, go back to using rpmqv.c (which is currently identical to rpmqv.cc).
-
-Upstream-Status: Inappropriate [other]
-
-   When linking with g++ is really necessary, the upstream package will do that.
-
-Also instead of symlinking files in two places, which can and does race in
-parallel builds, simply refer to the file's full location [RB]
-
-Signed-off-by: Joe Slater <joe.slater@windriver.com>
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
----
- Makefile.am | 6 ++----
- 1 file changed, 2 insertions(+), 4 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 1dade0a..55f8669 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -201,15 +201,13 @@ rpm_SOURCES =		build.c
- rpm_LDFLAGS =		@LDFLAGS_STATIC@ $(LDFLAGS)
- rpm_LDADD =		rpm.o $(myLDADD)
- rpm.o:	$(top_srcdir)/rpmqv.c
--	ln -sf $< rpmqv.cc
--	$(COMPILE) -DIAM_RPMBT -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV -o $@ -c rpmqv.cc
-+	$(COMPILE) -DIAM_RPMBT -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV -o $@ -c $^
- 
- rpmbuild_SOURCES =	build.c
- rpmbuild_LDFLAGS =	@LDFLAGS_STATIC@ $(LDFLAGS)
- rpmbuild_LDADD =	rpmbuild.o $(myLDADD)
- rpmbuild.o:	$(top_srcdir)/rpmqv.c
--	ln -sf $< rpmqv.cc
--	$(COMPILE) -DIAM_RPMBT -o $@ -c rpmqv.cc
-+	$(COMPILE) -DIAM_RPMBT -o $@ -c $^
- 
- .syntastic_c_config: Makefile
- 	@echo $(COMPILE) | tr ' ' '\n' | sed -e '1d' > $@
--- 
-2.7.0
-
diff --git a/meta/recipes-devtools/rpm/rpm/uclibc-support.patch b/meta/recipes-devtools/rpm/rpm/uclibc-support.patch
deleted file mode 100644
index dc7b0488a53..00000000000
--- a/meta/recipes-devtools/rpm/rpm/uclibc-support.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-Define the x* wrappers for uclibc as well
-
-Upstream-Status: Submitted [RPM5 maintainer]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: rpm/rpmio/rpmio.h
-===================================================================
---- rpm.orig/rpmio/rpmio.h
-+++ rpm/rpmio/rpmio.h
-@@ -23,7 +23,8 @@
-  */
- /*@{*/
- #if !defined(__LCLINT__) && !defined(__UCLIBC__) && defined(__GLIBC__) && \
--	(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2))
-+	(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) && \
-+	!defined(__UCLIBC__)
- #define USE_COOKIE_SEEK_POINTER 1
- typedef _IO_off64_t 	_libio_off_t;
- typedef _libio_off_t *	_libio_pos_t;
-Index: rpm/system.h
-===================================================================
---- rpm.orig/system.h
-+++ rpm/system.h
-@@ -489,7 +489,7 @@ extern void muntrace (void)
- #endif /* defined(__LCLINT__) */
- 
- /* Memory allocation via macro defs to get meaningful locations from mtrace() */
--#if defined(__GNUC__)
-+#if defined(__GNUC__) || defined(__UCLIBC__)
- #define	xmalloc(_size) 		(malloc(_size) ? : vmefail(_size))
- #define	xcalloc(_nmemb, _size)	(calloc((_nmemb), (_size)) ? : vmefail(_size))
- #define	xrealloc(_ptr, _size)	(realloc((_ptr), (_size)) ? : vmefail(_size))
-Index: rpm/lib/librpm.vers
-===================================================================
---- rpm.orig/lib/librpm.vers
-+++ rpm/lib/librpm.vers
-@@ -406,6 +406,10 @@ LIBRPM_0
-     specedit;
-     strict_erasures;
-     XrpmtsiInit;
-+    xmalloc;
-+    xrealloc;
-+    xcalloc;
-+    xstrdup;
-   local:
-     *;
- };
-Index: rpm/rpmio/librpmio.vers
-===================================================================
---- rpm.orig/rpmio/librpmio.vers
-+++ rpm/rpmio/librpmio.vers
-@@ -1455,6 +1455,10 @@ LIBRPMIO_0
-     _mongoc_write_result_init;
-     _mongoc_write_result_merge;
-     _mongoc_write_result_merge_legacy;
-+    xmalloc;
-+    xrealloc;
-+    xcalloc;
-+    xstrdup;
-   local:
-     *;
- };
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.16.bb b/meta/recipes-devtools/rpm/rpm_5.4.16.bb
deleted file mode 100644
index 17c58186f8c..00000000000
--- a/meta/recipes-devtools/rpm/rpm_5.4.16.bb
+++ /dev/null
@@ -1,712 +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."
-
-HOMEPAGE = "http://rpm5.org/"
-LICENSE = "LGPLv2.1 & Apache-2.0"
-LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
-LIC_FILES_CHKSUM += "file://rpmio/mongo.c;begin=5;end=18;md5=d8327ba2c71664c059143e6d333b8901"
-
-# We must have gettext-native, we need gettextize, which may not be provided
-DEPENDS = "libpcre attr acl ossp-uuid file byacc-native gettext-native"
-DEPENDS_append_class-native = " file-replacement-native"
-
-# 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...
-
-# There is no official 5.4.16 release yet, so start w/ 5.4.15 and patch it
-# based on CVS
-S = "${WORKDIR}/rpm-5.4.15"
-
-SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.15-0.20140824.src.rpm;name=srpm;extract=rpm-5.4.15.tar.gz \
-	   http://downloads.yoctoproject.org/releases/rpm5/rpm-5.4.15-to-5.4.16-20160225.patch.gz;name=rpm-patch \
-	   http://downloads.yoctoproject.org/releases/rpm5/syck-5.4.15-to-5.4.16-20160225.patch.gz;name=syck-patch \
-	   http://downloads.yoctoproject.org/releases/rpm5/beecrypt-5.4.15-to-5.4.16-20160225.patch.gz;name=beecrypt-patch \
-	   http://downloads.yoctoproject.org/releases/rpm5/lua-5.4.15-to-5.4.16-20160225.patch.gz;name=lua-patch \
-	   file://perfile_rpmdeps.sh \
-	   file://pythondeps.sh \
-"
-
-SRC_URI[srpm.md5sum] = "d53782842ac11b3100a43fb2958c9bc0"
-SRC_URI[srpm.sha256sum] = "d4ae5e9ed5df8ab9931b660f491418d20ab5c4d72eb17ed9055b80b71ef6c4ee"
-
-SRC_URI[rpm-patch.md5sum] = "8b7deb1c9574d3d47ed8ba8c690fd8bf"
-SRC_URI[rpm-patch.sha256sum] = "1c1983d001b04eaa23eb2c8d9598b9d0899acb0a89f54a2d4c4e974086fd17a5"
-
-SRC_URI[syck-patch.md5sum] = "f31d7a32105a364688354419ec3559e4"
-SRC_URI[syck-patch.sha256sum] = "4dd1d04489206d8b5d1970f2a8d143a002f2895cefbe15d73459785096545e8a"
-
-SRC_URI[beecrypt-patch.md5sum] = "9e71ee3ccb0a52985a071dd250279132"
-SRC_URI[beecrypt-patch.sha256sum] ="df7c0708a7fab9bdf6d46194519b42e736f99cb0599dcc1c3c1bf1b228705cde"
-
-SRC_URI[lua-patch.md5sum] = "ca10d03d83b1fc1c31a0b50819534cd7"
-SRC_URI[lua-patch.sha256sum] = "6bde435cc827a7d4b2520e8f3e1c9bd2ca74375de0a4402aa99ef4d48eab9a7e"
-
-# Bug fixes
-SRC_URI += " \
-	   file://header-include-fix.patch \
-	   file://rpm-libsql-fix.patch \
-	   file://rpm-platform.patch \
-	   file://rpm-platform2.patch \
-	   file://rpm-tools-mtree-LDFLAGS.patch \
-	   file://rpm-canonarch.patch \
-	   file://rpm-no-loopmsg.patch \
-	   file://rpm-resolvedep.patch \
-	   file://rpm-packageorigin.patch \
-	   file://uclibc-support.patch \
-	   file://rpmatch.patch \
-	   file://makefile-am-exec-hook.patch \
-	   file://python-rpm-rpmsense.patch \
-	   file://debugedit-segv.patch \
-	   file://debugedit-valid-file-to-fix-segment-fault.patch \
-	   file://rpm-platform-file-fix.patch \
-	   file://rpm-lsb-compatibility.patch \
-	   file://rpm-tag-generate-endian-conversion-fix.patch \
-	   file://rpm-hardlink-segfault-fix.patch \
-	   file://rpm-payload-use-hashed-inode.patch \
-	   file://rpm-fix-logio-cp.patch \
-	   file://0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch \
-	   file://rpm-opendb-before-verifyscript-to-avoid-null-point.patch \
-	   file://0001-define-EM_AARCH64.patch \
-	   file://rpm-rpmfc.c-fix-for-N32-MIPS64.patch \
-	   file://rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch \
-	   file://rpm-mongodb-sasl.patch \
-	   file://rpm-fix-parseEmbedded.patch \
-	   file://rpm-rpmio-headers.patch \
-	   file://rpm-python-restore-origin.patch \
-	   file://rpm-keccak-sse-intrin.patch \
-	   file://rpm-atomic-ops.patch \
-	   file://rpm-gnu-atomic.patch \
-	   file://rpm-tagname-type.patch \
-	   file://rpm-python-tagname.patch \
-	   file://rpm-python-AddErase.patch \
-	   file://rpm-rpmpgp-popt.patch \
-	   file://rpm-fix-lua-tests-compilation-failure.patch \
-	   file://rpmqv.c-check-_gpg_passphrase-before-ask-for-input.patch \
-	   file://0001-Disable-__sync_add_and_fetch_8-on-nios2.patch \
-	   file://gcc6-stdlib.patch \
-	   file://0001-system.h-query.c-support-nosignature.patch \
-	   file://rpm-ensure-rpm2cpio-call-rpm-relocation-code.patch \
-	   file://0001-macros-add-_gpg_sign_cmd_extra_args.patch \
-"
-
-# OE specific changes
-SRC_URI += " \
-	   file://rpm-log-auto-rm.patch \
-	   file://rpm-db-reduce.patch \
-	   file://rpm-autogen.patch \
-	   file://rpm-showrc.patch \
-	   file://rpm-fileclass.patch \
-	   file://rpm-scriptletexechelper.patch \
-	   file://rpmdeps-oecore.patch \
-	   file://rpm-no-perl-urpm.patch \
-	   file://rpm-macros.patch \
-	   file://rpm-lua.patch \
-	   file://rpm-ossp-uuid.patch \
-	   file://rpm-uuid-include.patch \
-	   file://rpm-pkgconfigdeps.patch \
-	   file://no-ldflags-in-pkgconfig.patch \
-	   file://dbconvert.patch \
-	   file://rpm-db_buffer_small.patch \
-	   file://rpm-py-init.patch \
-	   file://rpm-reloc-macros.patch \
-	   file://rpm-db5-or-db6.patch \
-	   file://rpm-db60.patch \
-	   file://rpmqv_cc_b_gone.patch \
-	   file://rpm-realpath.patch \
-	   file://rpm-check-rootpath-reasonableness.patch \
-	   file://rpm-macros.in-disable-external-key-server.patch \
-	   file://configure.ac-check-for-both-gpg2-and-gpg.patch \
-	   file://rpm-disable-auto-stack-protector.patch \
-	   file://popt-disable-auto-stack-protector.patch \
-	   file://rpm-syck-fix-gram.patch \
-	   file://rpm-rpmdb-grammar.patch \
-	   file://rpm-disable-blaketest.patch \
-	   file://rpm-autogen-force.patch \
-	   file://rpmdb-prevent-race-in-tmpdir-creation.patch \
-	   file://rpmdb-more-verbose-error-logging-in-rpmTempFile.patch \
-"
-
-SRC_URI_append_libc-musl = "\
-           file://0001-rpm-Fix-build-on-musl.patch \
-"
-# Uncomment the following line to enable platform score debugging
-# This is useful when identifying issues with Smart being unable
-# to process certain package feeds.
-#SRC_URI += "file://rpm-debug-platform.patch"
-
-UPSTREAM_CHECK_REGEX = "rpm-(?P<pver>(\d+[\.\-_]*)+)-.*$"
-
-inherit autotools gettext pkgconfig python-dir
-
-acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java"
-
-# The local distribution macro directory
-distromacrodir = "${libdir}/rpm/poky"
-
-# Specify the default rpm macros in terms of adjustable variables
-rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:%{_etcrpm}/macros.*:%{_etcrpm}/macros:%{_etcrpm}/%{_target}/macros:~/.oerpmmacros"
-rpm_macros_class-native = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:~/.oerpmmacros"
-rpm_macros_class-nativesdk = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:~/.oerpmmacros"
-
-# sqlite lua tcl augeas nss gcrypt neon xz xar keyutils perl selinux
-
-# Set the digest algorithm used for verifying file integrity
-# If this value changes, and two different packages have different values
-# the "same file" validation (two packages have a non-conflict file)
-# will fail.  This may lead to upgrade problems.  You should treat this
-# value as a distribution wide setting, and only change it when you intend
-# a full system upgrade!
-#
-# Defined file digest algorithm values (note: not all are available!):
-#       1       MD5 (legacy RPM default)
-#       2       SHA1
-#       3       RIPEMD-160
-#       5       MD2
-#       6       TIGER-192
-#       8       SHA256
-#       9       SHA384
-#       10      SHA512
-#       11      SHA224
-#       104     MD4
-#       105     RIPEMD-128
-#       106     CRC-32
-#       107     ADLER-32
-#       108     CRC-64 (ECMA-182 polynomial, untested uint64_t problems)
-#       109     Jenkins lookup3.c hashlittle()
-#       111     RIPEMD-256
-#       112     RIPEMD-320
-#       188     BLAKE2B
-#       189     BLAKE2BP
-#       190     BLAKE2S
-#       191     BLAKE2SP
-RPM_FILE_DIGEST_ALGO ?= "1"
-
-# All packages build with RPM5 contain a non-repudiable signature.
-# The purpose of this signature is not to show authenticity of a package,
-# but instead act as a secondary package wide validation that shows it
-# wasn't damaged by accident in transport.  (When later you sign the package, 
-# this signature may or may not be replaced as there are three signature 
-# slots, one for DSA/RSA, one for ECSDA, and one reserved.)
-#
-# There is a known issue w/ RSA signatures that if they start with an 0x00
-# the signing and validation may fail.
-#
-# The following is the list of choices for the non-rpudiable signature
-# (note: not all of these are implemented):
-#       DSA             (default)
-#       RSA             (implies SHA1)
-#       ECDSA           (implies SHA256)
-#       DSA/SHA1
-#       DSA/SHA224
-#       DSA/SHA256
-#       DSA/SHA384
-#       DSA/SHA512
-#       RSA/SHA1
-#       RSA/SHA224
-#       RSA/SHA256
-#       RSA/SHA384
-#       RSA/SHA512
-#       ECDSA/SHA224    (using NIST P-224)
-#       ECDSA/SHA256    (using NIST P-256)
-#       ECDSA/SHA384    (using NIST P-384)
-#       ECDSA/SHA512    (using NIST P-521)
-RPM_SELF_SIGN_ALGO ?= "DSA"
-
-# Note: perl and sqlite w/o db specified does not currently work.
-#       tcl, augeas, nss, gcrypt, xar and keyutils support is untested.
-PACKAGECONFIG ??= "db bzip2 zlib popt openssl libelf python"
-
-# Note: switching to internal popt may not work, as it will generate
-# a shared library which will intentionally not be packaged.
-#
-# If you intend to use the internal version, additional work may be required.
-PACKAGECONFIG[popt] = "--with-popt=external,--with-popt=internal,popt,"
-
-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=${PYTHON_SITEPACKAGES_DIR} \
-		--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,"
-
-# This switch simply disables external beecrypt, RPM5 always uses beecrypt
-# for base64 processing and various digest algorithms.
-# Beecrypt is only the preferred crypto engine if it's the only engine enabled.
-PACKAGECONFIG[beecrypt] = "--with-beecrypt=external,--with-beecrypt=internal,beecrypt,"
-
-# --with-usecrypto= setting defined the item as the preferred system
-# crypto engine, which will take priority over the included beecrypt
-PACKAGECONFIG[openssl] = "--with-openssl --with-usecrypto=openssl,--without-openssl,openssl,"
-PACKAGECONFIG[nss] = "--with-nss --with-usecrypto=nss,--without-nss,nss,"
-PACKAGECONFIG[gcrypt] = "--with-gcrypt --with-usecrypto=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},libselinux,"
-
-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 expat,"
-
-PACKAGECONFIG[lua] = "--with-lua,--without-lua,expat,"
-PACKAGECONFIG[tcl] = "--with-tcl,--without-tcl,tcl,"
-
-PACKAGECONFIG[augeas] = "--with-augeas,--without-augeas,augeas,"
-
-EXTRA_OECONF += "--verbose \
-		--sysconfdir=${sysconfdir} \
-		--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 \
-		--with-uuid \
-		--with-attr \
-		--with-acl \
-		--with-pthreads \
-		--without-cudf \
-		--without-ficl \
-		--without-aterm \
-		--without-nix \
-		--without-bash \
-		--without-rc \
-		--without-js \
-		--without-gpsee \
-		--without-ruby \
-		--without-squirrel \
-		--without-sasl2 \
-		--without-tomcrypt \
-		--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= \
-		YACC=byacc"
-
-CFLAGS_append = " -DRPM_VENDOR_WINDRIVER -DRPM_VENDOR_POKY -DRPM_VENDOR_OE -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS"
-
-LDFLAGS_append_libc-uclibc = "-lrt -lpthread"
-
-PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-libs ${PN}-dev ${PN}-staticdev ${PN}-common ${PN}-build python-rpm perl-module-rpm ${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/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/rpmrepo.real \
-		${libdir}/rpm/bin/rpmspecdump \
-		${libdir}/rpm/bin/rpmspecdump.real \
-		${libdir}/rpm/bin/wget \
-		${localstatedir}/cache \
-		${localstatedir}/cache/rpm \
-		${localstatedir}/cache/wdj \
-		${localstatedir}/lib \
-		${localstatedir}/lib/rpm \
-		${localstatedir}/lib/wdj \
-		${bindir}/rpm.real \
-		${bindir}/rpmconstant.real \
-		"
-
-FILES_${PN}-common = "${bindir}/rpm2cpio \
-		${bindir}/rpm2cpio.real \
-		${bindir}/gendiff \
-		${sysconfdir}/rpm \
-		${localstatedir}/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 \
-		${bindir}/rpmbuild.real \
-		${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/debugedit.real \
-		${libdir}/rpm/bin/rpmcache \
-		${libdir}/rpm/bin/rpmcache.real \
-		${libdir}/rpm/bin/rpmcmp \
-		${libdir}/rpm/bin/rpmcmp.real \
-		${libdir}/rpm/bin/rpmdeps \
-		${libdir}/rpm/bin/rpmdeps.real \
-		${libdir}/rpm/bin/rpmdeps-oecore \
-		${libdir}/rpm/bin/rpmdeps-oecore.real \
-		${libdir}/rpm/bin/rpmdigest \
-		${libdir}/rpm/bin/rpmdigest.real \
-		${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 \
-		${distromacrodir} \
-		"
-RDEPENDS_${PN} = "base-files run-postinsts"
-RDEPENDS_${PN}_class-native = ""
-RDEPENDS_${PN}_class-nativesdk = ""
-RDEPENDS_${PN}-build = "file bash perl"
-
-RDEPENDS_python-rpm = "${PN} python"
-
-FILES_python-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm"
-PROVIDES += "python-rpm"
-
-FILES_perl-module-rpm = "${libdir}/perl/*/* \
-		"
-
-RDEPENDS_${PN}-dev += "bash"
-
-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 \
-		${libdir}/rpm/rpmdb_loadcvt \
-		${libdir}/rpm/include \
-		"
-
-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 \
-		${PYTHON_SITEPACKAGES_DIR}/rpm/*.a \
-		"
-
-do_configure() {
-	# Disable tests!
-	echo "all:" > ${S}/tests/Makefile.am
-	sed -e 's/@__MKDIR_P@/%{__mkdir} -p/' -i ${S}/macros/macros.in
-
-	( cd ${S}; ${S}/autogen.sh )
-
-	# NASTY hack to make sure configure files the right pkg-config file...
-	sed -e 's/pkg-config --exists uuid/pkg-config --exists ossp-uuid/g' \
-	    -e 's/pkg-config uuid/pkg-config ossp-uuid/g' -i ${S}/configure
-
-	( cd ${S}/syck ; set +e ; rm -- -l* ; rm Makefile config.h config.status lib/Makefile libtool stamp-h1 tests/.deps tests/Makefile  ) || :
-
-	export varprefix=${localstatedir}
-	oe_runconf
-}
-
-do_install_append() {
-	# Configure -distribution wide- package crypto settings
-	# If these change, effectively all packages have to be upgraded!
-	sed -i -e 's,%_build_file_digest_algo.*,%_build_sign ${RPM_FILE_DIGEST_ALGO},' ${D}/${libdir}/rpm/macros.rpmbuild
-	sed -i -e 's,%_build_sign.*,%_build_sign ${RPM_SELF_SIGN_ALGO},' ${D}/${libdir}/rpm/macros.rpmbuild
-
-	sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros
-	sed -i -e 's,%__perl_provides,#%%__perl_provides,' ${D}/${libdir}/rpm/macros ${D}/${libdir}/rpm/macros.d/*
-	sed -i -e 's,%__perl_requires,#%%__perl_requires,' ${D}/${libdir}/rpm/macros ${D}/${libdir}/rpm/macros.d/*
-	sed -i -e 's,%_repackage_all_erasures[^_].*,%_repackage_all_erasures 0,' ${D}/${libdir}/rpm/macros
-	sed -i -e 's,^#%_openall_before_chroot.*,%_openall_before_chroot\t1,' ${D}/${libdir}/rpm/macros
-
-	# Enable MIPS64 N32 transactions.  (This is a no-op on non-MIPS targets.)
-	sed -i -e 's,%_transaction_color[^_].*,%_transaction_color 7,' ${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
-
-	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}${PYTHON_SITEPACKAGES_DIR}/*.a
-	rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/*.la
-	rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/rpm/*.a
-	rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/rpm/*.la
-
-	rm -f ${D}/${libdir}/rpm/dbconvert.sh
-	rm -f ${D}/${libdir}/rpm/libsqldb.*
-
-	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/pom2spec
-
-	rm -rf ${D}/var/lib/wdj ${D}/var/cache/wdj
-	rm -f ${D}/${libdir}/rpm/bin/api-sanity-checker.pl
-}
-
-do_install_append_class-target() {
-	# Create and install distribution specific macros
-	mkdir -p ${D}/${distromacrodir}
-	cat << EOF > ${D}/${distromacrodir}/macros
-%_defaultdocdir		${docdir}
-
-%_prefix                ${prefix}
-%_exec_prefix           ${exec_prefix}
-%_datarootdir           ${datadir}
-%_bindir                ${bindir}
-%_sbindir               ${sbindir}
-%_libexecdir            %{_libdir}/%{name}
-%_datadir               ${datadir}
-%_sysconfdir            ${sysconfdir}
-%_sharedstatedir        ${sharedstatedir}
-%_localstatedir         ${localstatedir}
-%_lib                   lib
-%_libdir                %{_exec_prefix}/%{_lib}
-%_includedir            ${includedir}
-%_oldincludedir         ${oldincludedir}
-%_infodir               ${infodir}
-%_mandir                ${mandir}
-%_localedir             %{_libdir}/locale
-EOF
-
-	# Create and install multilib specific macros
-	${@multilib_rpmmacros(d)}
-}
-
-do_install_append_class-native () {
-	sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env nativepython|' ${D}${PYTHON_SITEPACKAGES_DIR}/rpm/transaction.py
-}
-
-do_install_append_class-nativesdk () {
-	sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env python|' ${D}${PYTHON_SITEPACKAGES_DIR}/rpm/transaction.py
-}
-
-def multilib_rpmmacros(d):
-    localdata = d.createCopy()
-    # We need to clear the TOOLCHAIN_OPTIONS (--sysroot)
-    localdata.delVar('TOOLCHAIN_OPTIONS')
-
-    # Set 'localdata' values to be consistent with 'd' values.
-    distromacrodirVal = d.getVar('distromacrodir')
-    workdirVal = d.getVar('WORKDIR')
-    dval = d.getVar('D')
-
-    ret = gen_arch_macro(localdata)
-
-    variants = d.getVar("MULTILIB_VARIANTS") or ""
-    for item in variants.split():
-        # Load overrides from 'd' to avoid having to reset the value...
-        localdata = d.createCopy()
-        overrides = d.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
-        localdata.setVar("OVERRIDES", overrides)
-        localdata.setVar("MLPREFIX", item + "-")
-        localdata.setVar('WORKDIR', workdirVal)
-        localdata.setVar('distromacrodir', distromacrodirVal)
-        localdata.setVar('D', dval)
-        ret += gen_arch_macro(localdata)
-    return ret
-
-def gen_arch_macro(d):
-    # Generate shell script to produce the file as part of do_install
-    val  = "mkdir -p ${D}/${distromacrodir}/${TARGET_ARCH}-${TARGET_OS}\n"
-    val += "cat << EOF > ${D}/${distromacrodir}/${TARGET_ARCH}-${TARGET_OS}/macros\n"
-    val += "%_lib               ${baselib}\n"
-    val += "%_libdir            ${libdir}\n"
-    val += "%_localedir         ${localedir}\n"
-    val += "\n"
-    val += "# Toolchain configuration\n"
-    val += "%TOOLCHAIN_OPTIONS  %{nil}\n"
-    val += "%__ar               ${@d.getVar('AR').replace('$','%')}\n"
-    val += "%__as               ${@d.getVar('AS').replace('$','%')}\n"
-    val += "%__cc               ${@d.getVar('CC').replace('$','%')}\n"
-    val += "%__cpp              ${@d.getVar('CPP').replace('$','%')}\n"
-    val += "%__cxx              ${@d.getVar('CXX').replace('$','%')}\n"
-    val += "%__ld               ${@d.getVar('LD').replace('$','%')}\n"
-    val += "%__nm               ${@d.getVar('NM').replace('$','%')}\n"
-    val += "%__objcopy          ${@d.getVar('OBJCOPY').replace('$','%')}\n"
-    val += "%__objdump          ${@d.getVar('OBJDUMP').replace('$','%')}\n"
-    val += "%__ranlib           ${@d.getVar('RANLIB').replace('$','%')}\n"
-    val += "%__strip            ${@d.getVar('STRIP').replace('$','%')}\n"
-    val += "EOF\n"
-    val += "\n"
-    return d.expand(val)
-
-
-add_native_wrapper() {
-        create_wrapper ${D}/${bindir}/rpm \
-		RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir'), d.getVar('bindir'))}/rpm \
-		RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir'), d.getVar('bindir'))}/rpm} \
-		RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir'), d.getVar('bindir'))}/locale
-
-        create_wrapper ${D}/${bindir}/rpm2cpio \
-		RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir'), d.getVar('bindir'))}/rpm \
-		RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir'), d.getVar('bindir'))}/rpm} \
-		RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir'), d.getVar('bindir'))}/locale
-
-        create_wrapper ${D}/${bindir}/rpmbuild \
-		RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir'), d.getVar('bindir'))}/rpm \
-		RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir'), d.getVar('bindir'))}/rpm} \
-		RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir'), d.getVar('bindir'))}/locale
-
-        create_wrapper ${D}/${bindir}/rpmconstant \
-		RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir'), d.getVar('bindir'))}/rpm \
-		RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir'), d.getVar('bindir'))}/rpm} \
-		RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir'), d.getVar('bindir'))}/locale
-
-	for rpm_binary in ${D}/${libdir}/rpm/bin/rpm* ${D}/${libdir}/rpm/bin/debugedit; do
-        	create_wrapper $rpm_binary \
-			RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir'), d.getVar('bindir'))}/rpm \
-			RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir'), d.getVar('bindir'))}/rpm} \
-			RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir'), d.getVar('bindir'))}/locale
-	done
-}
-
-do_install_append_class-native() {
-	add_native_wrapper
-}
-
-do_install_append_class-nativesdk() {
-	add_native_wrapper
-}
-
-BBCLASSEXTEND = "native nativesdk"
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 08/44] python-pygpgme: add a recipe
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (6 preceding siblings ...)
  2017-03-10 11:23 ` [PATCH 07/44] rpm: remove 5.x recipe Alexander Kanavin
@ 2017-03-10 11:23 ` Alexander Kanavin
  2017-03-10 11:23 ` [PATCH 09/44] python-iniparse: " Alexander Kanavin
                   ` (36 subsequent siblings)
  44 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:23 UTC (permalink / raw)
  To: openembedded-core

python-pygpgme is required by dnf.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/recipes-devtools/python/python-pygpgme_0.3.bb | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python-pygpgme_0.3.bb

diff --git a/meta/recipes-devtools/python/python-pygpgme_0.3.bb b/meta/recipes-devtools/python/python-pygpgme_0.3.bb
new file mode 100644
index 00000000000..f7dd835eee9
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pygpgme_0.3.bb
@@ -0,0 +1,18 @@
+SUMMARY = "A Python module for working with OpenPGP messages"
+HOMEPAGE = "https://launchpad.net/pygpgme"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://README;md5=2dc15a76acf01e126188c8de634ae4b3"
+
+SRC_URI = "https://launchpad.net/pygpgme/trunk/${PV}/+download/pygpgme-${PV}.tar.gz"
+SRC_URI[md5sum] = "d38355af73f0352cde3d410b25f34fd0"
+SRC_URI[sha256sum] = "5fd887c407015296a8fd3f4b867fe0fcca3179de97ccde90449853a3dfb802e1"
+
+S = "${WORKDIR}/pygpgme-${PV}"
+
+inherit distutils
+
+DEPENDS = "gpgme python"
+
+RDEPENDS_${PN} += "python-core"
+
+BBCLASSEXTEND = "native"
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 09/44] python-iniparse: add a recipe
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (7 preceding siblings ...)
  2017-03-10 11:23 ` [PATCH 08/44] python-pygpgme: add a recipe Alexander Kanavin
@ 2017-03-10 11:23 ` Alexander Kanavin
  2017-03-10 11:23 ` [PATCH 10/44] python-backports-lzma: " Alexander Kanavin
                   ` (35 subsequent siblings)
  44 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:23 UTC (permalink / raw)
  To: openembedded-core

python-iniparse is required by dnf.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/recipes-devtools/python/python-iniparse_0.4.bb | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python-iniparse_0.4.bb

diff --git a/meta/recipes-devtools/python/python-iniparse_0.4.bb b/meta/recipes-devtools/python/python-iniparse_0.4.bb
new file mode 100644
index 00000000000..f2515759b13
--- /dev/null
+++ b/meta/recipes-devtools/python/python-iniparse_0.4.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Accessing and Modifying INI files"
+HOMEPAGE = "https://pypi.python.org/pypi/iniparse/"
+LICENSE = "MIT & PSF"
+LIC_FILES_CHKSUM = "file://LICENSE-PSF;md5=1c78a5bb3584b353496d5f6f34edb4b2 \
+                    file://LICENSE;md5=52f28065af11d69382693b45b5a8eb54"
+
+SRC_URI = "https://files.pythonhosted.org/packages/source/i/iniparse/iniparse-${PV}.tar.gz"
+SRC_URI[md5sum] = "5e573e9e9733d97623881ce9bbe5eca6"
+SRC_URI[sha256sum] = "abc1ee12d2cfb2506109072d6c21e40b6c75a3fe90a9c924327d80bc0d99c054"
+
+inherit distutils
+
+RDEPENDS_${PN} += "python-core"
+
+BBCLASSEXTEND = "native"
+
+S = "${WORKDIR}/iniparse-${PV}"
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 10/44] python-backports-lzma: add a recipe
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (8 preceding siblings ...)
  2017-03-10 11:23 ` [PATCH 09/44] python-iniparse: " Alexander Kanavin
@ 2017-03-10 11:23 ` Alexander Kanavin
  2017-03-10 11:23 ` [PATCH 11/44] librepo: " Alexander Kanavin
                   ` (34 subsequent siblings)
  44 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:23 UTC (permalink / raw)
  To: openembedded-core

It is needed by dnf, and only when using Python 2.x, so can
be dropped after moving dnf/rpm4 stack to Python 3.x.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 ...-not-add-include-and-library-directories-.patch | 32 ++++++++++++++++++++++
 .../python-backports-lzma_git.bb                   | 21 ++++++++++++++
 2 files changed, 53 insertions(+)
 create mode 100644 meta/recipes-devtools/python-backports-lzma/python-backports-lzma/0001-setup.py-do-not-add-include-and-library-directories-.patch
 create mode 100644 meta/recipes-devtools/python-backports-lzma/python-backports-lzma_git.bb

diff --git a/meta/recipes-devtools/python-backports-lzma/python-backports-lzma/0001-setup.py-do-not-add-include-and-library-directories-.patch b/meta/recipes-devtools/python-backports-lzma/python-backports-lzma/0001-setup.py-do-not-add-include-and-library-directories-.patch
new file mode 100644
index 00000000000..0eb904a8a70
--- /dev/null
+++ b/meta/recipes-devtools/python-backports-lzma/python-backports-lzma/0001-setup.py-do-not-add-include-and-library-directories-.patch
@@ -0,0 +1,32 @@
+From e5e3196cf69172b625c8c6ccca991c02fd18137c Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 30 Dec 2016 18:02:12 +0200
+Subject: [PATCH] setup.py: do not add include and library directories from the
+ host
+
+This avoids host contamination.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ setup.py | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 7886cf7..9a0356a 100644
+--- a/setup.py
++++ b/setup.py
+@@ -31,9 +31,7 @@ packages = ["backports", "backports.lzma"]
+ home = os.path.expanduser("~")
+ extens = [Extension('backports/lzma/_lzma',
+                     ['backports/lzma/_lzmamodule.c'],
+-                    libraries = ['lzma'],
+-                    include_dirs = [os.path.join(home, 'include'), '/opt/local/include', '/usr/local/include'],
+-                    library_dirs = [os.path.join(home, 'lib'), '/opt/local/lib', '/usr/local/lib']
++                    libraries = ['lzma']
+                     )]
+ 
+ descr = "Backport of Python 3.3's 'lzma' module for XZ/LZMA compressed files."
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/python-backports-lzma/python-backports-lzma_git.bb b/meta/recipes-devtools/python-backports-lzma/python-backports-lzma_git.bb
new file mode 100644
index 00000000000..6d3b8d569de
--- /dev/null
+++ b/meta/recipes-devtools/python-backports-lzma/python-backports-lzma_git.bb
@@ -0,0 +1,21 @@
+HOMEPAGE = "https://github.com/peterjc/backports.lzma"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=846e05e7e9e1c886b2637c230cfcd5dd"
+
+SRC_URI = "git://github.com/peterjc/backports.lzma.git \
+           file://0001-setup.py-do-not-add-include-and-library-directories-.patch \
+           "
+
+PV = "0.0.6+git${SRCPV}"
+SRCREV = "718b3316ae7aee8e03c02e7e110108779ce3aec8"
+
+S = "${WORKDIR}/git"
+
+inherit distutils
+
+DEPENDS_append = " xz"
+
+RDEPENDS_${PN} += "python-core python-io python-pkgutil"
+RDEPENDS_${PN}_class-native += "python-core"
+
+BBCLASSEXTEND = "native"
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 11/44] librepo: add a recipe
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (9 preceding siblings ...)
  2017-03-10 11:23 ` [PATCH 10/44] python-backports-lzma: " Alexander Kanavin
@ 2017-03-10 11:23 ` Alexander Kanavin
  2017-03-10 11:23 ` [PATCH 12/44] libcomps: " Alexander Kanavin
                   ` (33 subsequent siblings)
  44 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:23 UTC (permalink / raw)
  To: openembedded-core

librepo is needed by dnf and libdnf.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 ...ly-set-the-library-installation-directory.patch | 28 +++++++++++++++
 ...to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch | 41 ++++++++++++++++++++++
 ...-race-when-deleting-temporary-directories.patch | 41 ++++++++++++++++++++++
 ...ariables-with-pkg-config-not-with-cmake-m.patch | 29 +++++++++++++++
 meta/recipes-devtools/librepo/librepo_git.bb       | 24 +++++++++++++
 5 files changed, 163 insertions(+)
 create mode 100644 meta/recipes-devtools/librepo/librepo/0001-Correctly-set-the-library-installation-directory.patch
 create mode 100644 meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch
 create mode 100644 meta/recipes-devtools/librepo/librepo/0003-tests-fix-a-race-when-deleting-temporary-directories.patch
 create mode 100644 meta/recipes-devtools/librepo/librepo/0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch
 create mode 100644 meta/recipes-devtools/librepo/librepo_git.bb

diff --git a/meta/recipes-devtools/librepo/librepo/0001-Correctly-set-the-library-installation-directory.patch b/meta/recipes-devtools/librepo/librepo/0001-Correctly-set-the-library-installation-directory.patch
new file mode 100644
index 00000000000..01fea40467e
--- /dev/null
+++ b/meta/recipes-devtools/librepo/librepo/0001-Correctly-set-the-library-installation-directory.patch
@@ -0,0 +1,28 @@
+From 36d87919223db9b054862ad38cdda8d9222a2bab Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 30 Dec 2016 18:04:35 +0200
+Subject: [PATCH 1/4] Correctly set the library installation directory
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ librepo/CMakeLists.txt | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/librepo/CMakeLists.txt b/librepo/CMakeLists.txt
+index 2fe76d8..5026def 100644
+--- a/librepo/CMakeLists.txt
++++ b/librepo/CMakeLists.txt
+@@ -60,7 +60,8 @@ CONFIGURE_FILE("version.h.in" "${CMAKE_CURRENT_SOURCE_DIR}/version.h" @ONLY)
+ IF (CMAKE_SIZEOF_VOID_P MATCHES "8")
+   SET (LIB_SUFFIX "64")
+ ENDIF (CMAKE_SIZEOF_VOID_P MATCHES "8")
+-SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
++#SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
++SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}")
+ 
+ INSTALL(FILES ${librepo_HEADERS} DESTINATION include/librepo)
+ INSTALL(TARGETS librepo LIBRARY DESTINATION ${LIB_INSTALL_DIR})
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch b/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch
new file mode 100644
index 00000000000..7138dfce21d
--- /dev/null
+++ b/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch
@@ -0,0 +1,41 @@
+From 1570ad33dd7e5d83f3ee80bd104b114709ac1e34 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 30 Dec 2016 18:05:36 +0200
+Subject: [PATCH 2/4] Do not try to obtain PYTHON_INSTALL_DIR by running
+ python.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ librepo/python/python2/CMakeLists.txt | 2 +-
+ librepo/python/python3/CMakeLists.txt | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/librepo/python/python2/CMakeLists.txt b/librepo/python/python2/CMakeLists.txt
+index 3615e17..cffa99f 100644
+--- a/librepo/python/python2/CMakeLists.txt
++++ b/librepo/python/python2/CMakeLists.txt
+@@ -1,6 +1,6 @@
+ FIND_PACKAGE (PythonLibs 2 )
+ FIND_PACKAGE (PythonInterp 2 REQUIRED)
+-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
++#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+ INCLUDE_DIRECTORIES (${PYTHON_INCLUDE_PATH})
+ 
+ MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}")
+diff --git a/librepo/python/python3/CMakeLists.txt b/librepo/python/python3/CMakeLists.txt
+index dfecac9..38bcc72 100644
+--- a/librepo/python/python3/CMakeLists.txt
++++ b/librepo/python/python3/CMakeLists.txt
+@@ -10,7 +10,7 @@ message("--- ${PYTHON_INCLUDE_DIR}")
+ 
+ FIND_PACKAGE(PythonLibs 3.0)
+ FIND_PACKAGE(PythonInterp 3.0 REQUIRED)
+-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
++#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+ INCLUDE_DIRECTORIES (${PYTHON_INCLUDE_PATH})
+ 
+ MESSAGE(STATUS "Python3 install dir is ${PYTHON_INSTALL_DIR}")
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/librepo/librepo/0003-tests-fix-a-race-when-deleting-temporary-directories.patch b/meta/recipes-devtools/librepo/librepo/0003-tests-fix-a-race-when-deleting-temporary-directories.patch
new file mode 100644
index 00000000000..0d2fae434ad
--- /dev/null
+++ b/meta/recipes-devtools/librepo/librepo/0003-tests-fix-a-race-when-deleting-temporary-directories.patch
@@ -0,0 +1,41 @@
+From b1a5c92dbd1d11f1afdc094fccea64de334d2783 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 30 Dec 2016 18:06:24 +0200
+Subject: [PATCH 3/4] tests: fix a race when deleting temporary directories
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ tests/python/tests/test_yum_repo_downloading.py | 2 +-
+ tests/python/tests/test_yum_repo_locating.py    | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/python/tests/test_yum_repo_downloading.py b/tests/python/tests/test_yum_repo_downloading.py
+index ad597dc..4a32519 100644
+--- a/tests/python/tests/test_yum_repo_downloading.py
++++ b/tests/python/tests/test_yum_repo_downloading.py
+@@ -32,7 +32,7 @@ class TestCaseYumRepoDownloading(TestCaseWithFlask):
+             os.environ.pop('GNUPGHOME')
+         else:
+             os.environ['GNUPGHOME'] = self._gnupghome
+-        shutil.rmtree(self.tmpdir)
++        shutil.rmtree(self.tmpdir, True)
+ 
+     def test_download_repo_01(self):
+         h = librepo.Handle()
+diff --git a/tests/python/tests/test_yum_repo_locating.py b/tests/python/tests/test_yum_repo_locating.py
+index 8f4bea5..db4294c 100644
+--- a/tests/python/tests/test_yum_repo_locating.py
++++ b/tests/python/tests/test_yum_repo_locating.py
+@@ -34,7 +34,7 @@ class TestCaseYumRepoLocating(TestCase):
+             os.environ.pop('GNUPGHOME')
+         else:
+             os.environ['GNUPGHOME'] = self._gnupghome
+-        shutil.rmtree(self.tmpdir)
++        shutil.rmtree(self.tmpdir, True)
+ 
+     def test_read_mirrorlist(self):
+         h = librepo.Handle()
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/librepo/librepo/0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch b/meta/recipes-devtools/librepo/librepo/0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch
new file mode 100644
index 00000000000..6665b316cbb
--- /dev/null
+++ b/meta/recipes-devtools/librepo/librepo/0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch
@@ -0,0 +1,29 @@
+From a36be8192615e2a1fb5a5856d44565277f15583b Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 30 Dec 2016 18:23:27 +0200
+Subject: [PATCH 4/4] Set gpgme variables with pkg-config, not with cmake
+ module (which doesn't work properly)
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ CMakeLists.txt | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ef07d2d..f1fa09b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -31,7 +31,8 @@ PKG_CHECK_MODULES(GLIB2 glib-2.0 REQUIRED)
+ PKG_SEARCH_MODULE(LIBCRYPTO REQUIRED libcrypto openssl)
+ FIND_PACKAGE(EXPAT REQUIRED)
+ FIND_PACKAGE(CURL REQUIRED)
+-FIND_PACKAGE(Gpgme REQUIRED)
++PKG_CHECK_MODULES(GPGME gpgme REQUIRED)
++set(GPGME_VANILLA_LIBRARIES ${GPGME_LIBRARIES})
+ FIND_PACKAGE(Xattr REQUIRED)
+ 
+ INCLUDE_DIRECTORIES(${GLIB2_INCLUDE_DIRS})
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/librepo/librepo_git.bb b/meta/recipes-devtools/librepo/librepo_git.bb
new file mode 100644
index 00000000000..70e88c47b9e
--- /dev/null
+++ b/meta/recipes-devtools/librepo/librepo_git.bb
@@ -0,0 +1,24 @@
+SUMMARY = " A library providing C and Python (libcURL like) API for downloading linux repository metadata and packages."
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+SRC_URI = "git://github.com/rpm-software-management/librepo.git \
+           file://0001-Correctly-set-the-library-installation-directory.patch \
+           file://0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch \
+           file://0003-tests-fix-a-race-when-deleting-temporary-directories.patch \
+           file://0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch \
+           "
+
+PV = "1.7.20+git${SRCPV}"
+SRCREV = "e1137cbbda78fecb192146300790680a5bc811b1"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "curl expat glib-2.0 openssl attr libcheck gpgme"
+
+inherit cmake distutils-base pkgconfig
+
+EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR}"
+
+BBCLASSEXTEND = "native"
+
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 12/44] libcomps: add a recipe
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (10 preceding siblings ...)
  2017-03-10 11:23 ` [PATCH 11/44] librepo: " Alexander Kanavin
@ 2017-03-10 11:23 ` Alexander Kanavin
  2017-03-10 11:23 ` [PATCH 13/44] libdnf: " Alexander Kanavin
                   ` (32 subsequent siblings)
  44 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:23 UTC (permalink / raw)
  To: openembedded-core

libcomps is required by dnf.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 ...-set-PYTHON_INSTALL_DIR-by-running-python.patch | 41 ++++++++++++++++++++++
 ...2-Set-library-installation-path-correctly.patch | 27 ++++++++++++++
 meta/recipes-devtools/libcomps/libcomps_git.bb     | 23 ++++++++++++
 3 files changed, 91 insertions(+)
 create mode 100644 meta/recipes-devtools/libcomps/libcomps/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
 create mode 100644 meta/recipes-devtools/libcomps/libcomps/0002-Set-library-installation-path-correctly.patch
 create mode 100644 meta/recipes-devtools/libcomps/libcomps_git.bb

diff --git a/meta/recipes-devtools/libcomps/libcomps/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch b/meta/recipes-devtools/libcomps/libcomps/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
new file mode 100644
index 00000000000..26e8b06f378
--- /dev/null
+++ b/meta/recipes-devtools/libcomps/libcomps/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
@@ -0,0 +1,41 @@
+From ff4aae4c8beaf17cb8e7a3431f6c541eccfae244 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 30 Dec 2016 18:22:09 +0200
+Subject: [PATCH 1/2] Do not set PYTHON_INSTALL_DIR by running python.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ libcomps/src/python/src/python2/CMakeLists.txt | 2 +-
+ libcomps/src/python/src/python3/CMakeLists.txt | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libcomps/src/python/src/python2/CMakeLists.txt b/libcomps/src/python/src/python2/CMakeLists.txt
+index 3ad9e18..0e7dd4b 100644
+--- a/libcomps/src/python/src/python2/CMakeLists.txt
++++ b/libcomps/src/python/src/python2/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ find_package (PythonLibs 2.6)
+ find_package (PythonInterp 2.6 REQUIRED)
+ 
+-execute_process (COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
++#execute_process (COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+ 
+ include_directories(${PYTHON_INCLUDE_PATH})
+ include_directories(${LIBCOMPS_INCLUDE_PATH})
+diff --git a/libcomps/src/python/src/python3/CMakeLists.txt b/libcomps/src/python/src/python3/CMakeLists.txt
+index 7fafa9f..ed82d3d 100644
+--- a/libcomps/src/python/src/python3/CMakeLists.txt
++++ b/libcomps/src/python/src/python3/CMakeLists.txt
+@@ -2,7 +2,7 @@ find_package (PythonLibs 3.0)
+ find_package (PythonInterp 3.0)
+ #add_custom_target(py3-copy)
+ 
+-execute_process (COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
++#execute_process (COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+ 
+ include_directories(${PYTHON_INCLUDE_PATH})
+ include_directories(${LIBCOMPS_INCLUDE_PATH})
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/libcomps/libcomps/0002-Set-library-installation-path-correctly.patch b/meta/recipes-devtools/libcomps/libcomps/0002-Set-library-installation-path-correctly.patch
new file mode 100644
index 00000000000..ec1fdc409bf
--- /dev/null
+++ b/meta/recipes-devtools/libcomps/libcomps/0002-Set-library-installation-path-correctly.patch
@@ -0,0 +1,27 @@
+From b1f61296e2f16c2b9a39c5501e4538628ff01ab4 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 30 Dec 2016 18:26:00 +0200
+Subject: [PATCH 2/2] Set library installation path correctly
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ libcomps/src/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libcomps/src/CMakeLists.txt b/libcomps/src/CMakeLists.txt
+index e553d77..e2eef9c 100644
+--- a/libcomps/src/CMakeLists.txt
++++ b/libcomps/src/CMakeLists.txt
+@@ -52,7 +52,7 @@ add_dependencies(libcomps src-copy)
+ IF (CMAKE_SIZEOF_VOID_P MATCHES "8")
+     SET (LIB_SUFFIX "64")
+ ENDIF (CMAKE_SIZEOF_VOID_P MATCHES "8")
+-set (LIB_INST_DIR ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
++set (LIB_INST_DIR ${CMAKE_INSTALL_LIBDIR})
+ 
+ 
+ install (FILES ${libcomps_HEADERS} DESTINATION include/libcomps)
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/libcomps/libcomps_git.bb b/meta/recipes-devtools/libcomps/libcomps_git.bb
new file mode 100644
index 00000000000..448ea62f67c
--- /dev/null
+++ b/meta/recipes-devtools/libcomps/libcomps_git.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Libcomps is alternative for yum.comps library (which is for managing rpm package groups)."
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRC_URI = "git://github.com/rpm-software-management/libcomps.git \
+           file://0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \
+           file://0002-Set-library-installation-path-correctly.patch \
+           "
+
+PV = "0.1.8+git${SRCPV}"
+SRCREV = "01a4759894cccff64d2561614a58281adf5ce859"
+
+S = "${WORKDIR}/git"
+
+inherit cmake distutils-base
+
+DEPENDS = "libxml2 expat libcheck"
+
+EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR}"
+OECMAKE_SOURCEPATH = "${S}/libcomps"
+
+BBCLASSEXTEND = "native"
+
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 13/44] libdnf: add a recipe
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (11 preceding siblings ...)
  2017-03-10 11:23 ` [PATCH 12/44] libcomps: " Alexander Kanavin
@ 2017-03-10 11:23 ` Alexander Kanavin
  2017-03-10 11:23 ` [PATCH 14/44] dnf: " Alexander Kanavin
                   ` (31 subsequent siblings)
  44 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:23 UTC (permalink / raw)
  To: openembedded-core

libdnf is required by dnf.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 ...cmake-drop-the-requirement-for-GTKDOC_SCA.patch | 31 +++++++++++++++++
 ...ers-for-both-libsolv-and-libsolvext-libdn.patch | 28 +++++++++++++++
 ...-sysroot-path-to-introspection-tools-path.patch | 36 +++++++++++++++++++
 ...-library-installation-directory-correctly.patch | 29 ++++++++++++++++
 ...-variables-with-pkg-config-cmake-s-own-mo.patch | 29 ++++++++++++++++
 meta/recipes-devtools/libdnf/libdnf_git.bb         | 40 ++++++++++++++++++++++
 6 files changed, 193 insertions(+)
 create mode 100644 meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch
 create mode 100644 meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch
 create mode 100644 meta/recipes-devtools/libdnf/libdnf/0002-Prefix-sysroot-path-to-introspection-tools-path.patch
 create mode 100644 meta/recipes-devtools/libdnf/libdnf/0003-Set-the-library-installation-directory-correctly.patch
 create mode 100644 meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch
 create mode 100644 meta/recipes-devtools/libdnf/libdnf_git.bb

diff --git a/meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch b/meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch
new file mode 100644
index 00000000000..73acda6af8a
--- /dev/null
+++ b/meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch
@@ -0,0 +1,31 @@
+From 9bb7630915c3e787732463a3e2064fe0e177101b Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 24 Nov 2016 14:33:07 +0200
+Subject: [PATCH 1/4] FindGtkDoc.cmake: drop the requirement for
+ GTKDOC_SCANGOBJ_WRAPPER
+
+For some reason cmake is not able to find it when building in openembedded,
+and it's bundled with the source code anyway.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ cmake/modules/FindGtkDoc.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmake/modules/FindGtkDoc.cmake b/cmake/modules/FindGtkDoc.cmake
+index 92b2cc7..39f34bd 100644
+--- a/cmake/modules/FindGtkDoc.cmake
++++ b/cmake/modules/FindGtkDoc.cmake
+@@ -52,7 +52,7 @@ find_program(GTKDOC_MKHTML_EXE gtkdoc-mkhtml PATH "${GLIB_PREFIX}/bin")
+ find_program(GTKDOC_FIXXREF_EXE gtkdoc-fixxref PATH "${GLIB_PREFIX}/bin")
+ 
+ find_package_handle_standard_args(GtkDoc
+-    REQUIRED_VARS GTKDOC_SCAN_EXE GTKDOC_SCANGOBJ_EXE GTKDOC_SCANGOBJ_WRAPPER GTKDOC_MKDB_EXE GTKDOC_MKHTML_EXE GTKDOC_FIXXREF_EXE
++    REQUIRED_VARS GTKDOC_SCAN_EXE GTKDOC_SCANGOBJ_EXE GTKDOC_MKDB_EXE GTKDOC_MKHTML_EXE GTKDOC_FIXXREF_EXE
+     VERSION_VAR GtkDoc_VERSION)
+ 
+ # ::
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch b/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch
new file mode 100644
index 00000000000..954add6e738
--- /dev/null
+++ b/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch
@@ -0,0 +1,28 @@
+From 5958b151a4dbb89114e90c971a34b74f873b7beb Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 7 Feb 2017 12:16:03 +0200
+Subject: [PATCH] Get parameters for both libsolv and libsolvext (libdnf is
+ using both)
+
+Upstream-Status: Pending [depends on whether https://github.com/openSUSE/libsolv/pull/177 is accepted]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b531da1..e512da0 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -28,7 +28,7 @@ find_package (PkgConfig REQUIRED)
+ SET (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
+ PKG_CHECK_MODULES(GLIB gio-unix-2.0>=2.44.0 REQUIRED)
+ FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb)
+-PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv)
++PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv libsolvext)
+ set(LIBSOLV_LIBRARY ${LIBSOLV_LIBRARIES})
+ pkg_check_modules (CHECK REQUIRED check)
+ pkg_check_modules (REPO REQUIRED librepo)
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/libdnf/libdnf/0002-Prefix-sysroot-path-to-introspection-tools-path.patch b/meta/recipes-devtools/libdnf/libdnf/0002-Prefix-sysroot-path-to-introspection-tools-path.patch
new file mode 100644
index 00000000000..3d772a5f8a3
--- /dev/null
+++ b/meta/recipes-devtools/libdnf/libdnf/0002-Prefix-sysroot-path-to-introspection-tools-path.patch
@@ -0,0 +1,36 @@
+From c8211ad99ccaa4af4a75e0ba639527267fcfd69e Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 30 Dec 2016 18:17:19 +0200
+Subject: [PATCH 2/4] Prefix sysroot path to introspection tools path.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ libdnf/CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libdnf/CMakeLists.txt b/libdnf/CMakeLists.txt
+index 63f07bf..837792b 100644
+--- a/libdnf/CMakeLists.txt
++++ b/libdnf/CMakeLists.txt
+@@ -133,7 +133,7 @@ if (GOBJECT_INTROSPECTION_FOUND)
+         set(GIR_TYPELIB "${GIR_PREFIX}.typelib")
+ 
+         add_custom_command(OUTPUT ${GIR_XML}
+-            COMMAND env CFLAGS=${CMAKE_C_FLAGS} ${GOBJECT_INTROSPECTION_1.0_G_IR_SCANNER}
++            COMMAND env CFLAGS=${CMAKE_C_FLAGS} $ENV{PKG_CONFIG_SYSROOT_DIR}${GOBJECT_INTROSPECTION_1.0_G_IR_SCANNER}
+                     --namespace=Dnf
+                     --nsversion=${DNF_SO_VERSION}.0
+                     --library-path=${CMAKE_CURRENT_BINARY_DIR}
+@@ -153,7 +153,7 @@ if (GOBJECT_INTROSPECTION_FOUND)
+             WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+ 
+         add_custom_command(OUTPUT ${GIR_TYPELIB}
+-            COMMAND ${GOBJECT_INTROSPECTION_1.0_G_IR_COMPILER}
++            COMMAND $ENV{PKG_CONFIG_SYSROOT_DIR}${GOBJECT_INTROSPECTION_1.0_G_IR_COMPILER}
+                     -o ${GIR_TYPELIB}
+                     ${GIR_XML}
+             DEPENDS ${GIR_XML}
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/libdnf/libdnf/0003-Set-the-library-installation-directory-correctly.patch b/meta/recipes-devtools/libdnf/libdnf/0003-Set-the-library-installation-directory-correctly.patch
new file mode 100644
index 00000000000..d7e59d8333a
--- /dev/null
+++ b/meta/recipes-devtools/libdnf/libdnf/0003-Set-the-library-installation-directory-correctly.patch
@@ -0,0 +1,29 @@
+From 8d29879fe3606c78769c1bcdddf0bcfc7191c710 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 30 Dec 2016 18:20:01 +0200
+Subject: [PATCH 3/4] Set the library installation directory correctly.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ CMakeLists.txt | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d35f0d7..8edb627 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -62,7 +62,9 @@ ADD_DEFINITIONS(-DPACKAGE_VERSION=\\"${LIBDNF_VERSION}\\")
+ IF (CMAKE_SIZEOF_VOID_P MATCHES "8")
+   SET (LIB_SUFFIX "64")
+ ENDIF (CMAKE_SIZEOF_VOID_P MATCHES "8")
+-SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
++#SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
++SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}")
++
+ 
+ ADD_SUBDIRECTORY (libdnf)
+ ENABLE_TESTING()
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch b/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch
new file mode 100644
index 00000000000..931959b5f38
--- /dev/null
+++ b/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch
@@ -0,0 +1,29 @@
+From 6d2718b925453f9a6915001f489606eb8e4086c8 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 30 Dec 2016 18:24:50 +0200
+Subject: [PATCH 4/4] Set libsolv variables with pkg-config (cmake's own module
+ doesn't work properly).
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ CMakeLists.txt | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8edb627..b531da1 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -28,7 +28,8 @@ find_package (PkgConfig REQUIRED)
+ SET (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
+ PKG_CHECK_MODULES(GLIB gio-unix-2.0>=2.44.0 REQUIRED)
+ FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb)
+-find_package (LibSolv 0.6.21 REQUIRED COMPONENTS ext)
++PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv)
++set(LIBSOLV_LIBRARY ${LIBSOLV_LIBRARIES})
+ pkg_check_modules (CHECK REQUIRED check)
+ pkg_check_modules (REPO REQUIRED librepo)
+ FIND_PROGRAM (VALGRIND_PROGRAM NAMES valgrind PATH /usr/bin /usr/local/bin)
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/libdnf/libdnf_git.bb b/meta/recipes-devtools/libdnf/libdnf_git.bb
new file mode 100644
index 00000000000..681c0029c5f
--- /dev/null
+++ b/meta/recipes-devtools/libdnf/libdnf_git.bb
@@ -0,0 +1,40 @@
+SUMMARY = "Library providing simplified C and Python API to libsolv"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+SRC_URI = "git://github.com/rpm-software-management/libdnf \
+           file://0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch \
+           file://0002-Prefix-sysroot-path-to-introspection-tools-path.patch \
+           file://0003-Set-the-library-installation-directory-correctly.patch \
+           file://0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch \
+           file://0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch \
+           "
+
+PV = "0.2.3+git${SRCPV}"
+SRCREV = "367545629cc01a8e622890d89bd13d062ce60d7b"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "glib-2.0 libsolv libcheck librepo rpm gtk-doc"
+
+inherit gtk-doc gobject-introspection cmake pkgconfig
+
+# We cannot inherit pythonnative (or descendant classes like distutils etc.) 
+# because that would conflict with inheriting python3native
+# (which is done by inheriting gobject-introspection). 
+# But libdnf only needs the path to native Python 2.x binary
+# so we simply set it explicitly here.
+#
+# These lines can be dropped when dnf stack is moved to python 3.x
+EXTRANATIVEPATH += "python-native"
+FILES_${PN} += " ${libdir}/python2.7/*"
+DEPENDS += "python-native"
+
+EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DWITH_MAN=OFF \
+                  ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DWITH_GIR=ON', '-DWITH_GIR=OFF', d)} \
+                "
+EXTRA_OECMAKE_append_class-native = " -DWITH_GIR=OFF"
+EXTRA_OECMAKE_append_class-nativesdk = " -DWITH_GIR=OFF"
+
+BBCLASSEXTEND = "native"
+
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 14/44] dnf: add a recipe
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (12 preceding siblings ...)
  2017-03-10 11:23 ` [PATCH 13/44] libdnf: " Alexander Kanavin
@ 2017-03-10 11:23 ` Alexander Kanavin
  2017-03-10 11:23 ` [PATCH 15/44] python-smartpm: remove the recipe Alexander Kanavin
                   ` (30 subsequent siblings)
  44 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:23 UTC (permalink / raw)
  To: openembedded-core

This is replacing Smart package manager, which is unsupported upstream, and has a growing
amount of issues (lack of python 3.x support in particular). We identified dnf as
the only feasible replacement.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 ...Corretly-install-tmpfiles.d-configuration.patch | 21 ++++++++++
 ...hardcode-etc-and-systemd-unit-directories.patch | 29 +++++++++++++
 ...0001-Do-not-prepend-installroot-to-logdir.patch | 31 ++++++++++++++
 .../dnf/dnf/0028-Use-backports.lzma-not-lzma.patch | 30 ++++++++++++++
 ...-set-PYTHON_INSTALL_DIR-by-running-python.patch | 27 ++++++++++++
 .../dnf/0030-Run-python-scripts-using-env.patch    | 48 ++++++++++++++++++++++
 meta/recipes-devtools/dnf/dnf_git.bb               | 45 ++++++++++++++++++++
 7 files changed, 231 insertions(+)
 create mode 100644 meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch
 create mode 100644 meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch
 create mode 100644 meta/recipes-devtools/dnf/dnf/0001-Do-not-prepend-installroot-to-logdir.patch
 create mode 100644 meta/recipes-devtools/dnf/dnf/0028-Use-backports.lzma-not-lzma.patch
 create mode 100644 meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
 create mode 100644 meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch
 create mode 100644 meta/recipes-devtools/dnf/dnf_git.bb

diff --git a/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch b/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch
new file mode 100644
index 00000000000..c9df4589746
--- /dev/null
+++ b/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch
@@ -0,0 +1,21 @@
+From 8ce181714640315d2dd37ee794acbb22063cd669 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 26 Jan 2017 16:36:20 +0200
+Subject: [PATCH] Corretly install tmpfiles.d configuration
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ etc/tmpfiles.d/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/etc/tmpfiles.d/CMakeLists.txt b/etc/tmpfiles.d/CMakeLists.txt
+index f69c773e..3eb6d0e8 100644
+--- a/etc/tmpfiles.d/CMakeLists.txt
++++ b/etc/tmpfiles.d/CMakeLists.txt
+@@ -1 +1 @@
+-INSTALL (FILES dnf.conf DESTINATION /usr/lib/tmpfiles.d/)
++INSTALL (FILES dnf.conf DESTINATION ${SYSCONFDIR}/tmpfiles.d/)
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch b/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch
new file mode 100644
index 00000000000..0f261e5c5d6
--- /dev/null
+++ b/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch
@@ -0,0 +1,29 @@
+From 4313ced1320594013795f11f6db00381e3f4cc45 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 26 Jan 2017 16:25:47 +0200
+Subject: [PATCH] Do not hardcode /etc and systemd unit directories
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6a319935..db20ccd4 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -7,8 +7,8 @@ if (NOT PYTHON_DESIRED)
+     set (PYTHON_DESIRED "2")
+ endif()
+ 
+-SET( SYSCONFDIR /etc)
+-SET( SYSTEMD_DIR /usr/lib/systemd/system)
++SET( SYSCONFDIR ${CMAKE_INSTALL_SYSCONFDIR})
++SET( SYSTEMD_DIR $ENV{systemd_system_unitdir})
+ 
+ if (${PYTHON_DESIRED} STREQUAL "2")
+ 	FIND_PACKAGE (PythonInterp REQUIRED)
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/dnf/dnf/0001-Do-not-prepend-installroot-to-logdir.patch b/meta/recipes-devtools/dnf/dnf/0001-Do-not-prepend-installroot-to-logdir.patch
new file mode 100644
index 00000000000..a90e77cbf10
--- /dev/null
+++ b/meta/recipes-devtools/dnf/dnf/0001-Do-not-prepend-installroot-to-logdir.patch
@@ -0,0 +1,31 @@
+From 31653d324cf8c7b1f2f9e49d22676bd2ac546331 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 11 Jan 2017 15:10:13 +0200
+Subject: [PATCH] Do not prepend installroot to logdir.
+
+This would otherwise write the logs into rootfs/var/log
+(whereas we want them in $T),
+and will break installation of base-files rpm.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ dnf/cli/cli.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dnf/cli/cli.py b/dnf/cli/cli.py
+index b764801a..893f4bda 100644
+--- a/dnf/cli/cli.py
++++ b/dnf/cli/cli.py
+@@ -881,7 +881,7 @@ class Cli(object):
+         subst = conf.substitutions
+         subst.update_from_etc(conf.installroot)
+ 
+-        for opt in ('cachedir', 'logdir', 'persistdir'):
++        for opt in ('cachedir', 'persistdir'):
+             conf.prepend_installroot(opt)
+ 
+         self.base._logging._setup_from_dnf_conf(conf)
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/dnf/dnf/0028-Use-backports.lzma-not-lzma.patch b/meta/recipes-devtools/dnf/dnf/0028-Use-backports.lzma-not-lzma.patch
new file mode 100644
index 00000000000..57038a8c7d5
--- /dev/null
+++ b/meta/recipes-devtools/dnf/dnf/0028-Use-backports.lzma-not-lzma.patch
@@ -0,0 +1,30 @@
+From 89af5c84d4b920d22ae882fcc5ab71ba09443cea Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 30 Dec 2016 18:28:18 +0200
+Subject: [PATCH 28/30] Use backports.lzma, not lzma
+
+This is needed when using Python 2.x and should be dropped
+after moving to Python 3.x
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ dnf/yum/misc.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dnf/yum/misc.py b/dnf/yum/misc.py
+index 441b0148..6b4aea0a 100644
+--- a/dnf/yum/misc.py
++++ b/dnf/yum/misc.py
+@@ -37,7 +37,7 @@ import gpgme.editutil
+ import gzip
+ import hashlib
+ import io
+-import lzma
++import backports.lzma
+ import os
+ import os.path
+ import pwd
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch b/meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
new file mode 100644
index 00000000000..8c59f9f670e
--- /dev/null
+++ b/meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
@@ -0,0 +1,27 @@
+From 3ddaa930cda57a62a2174faebcc87aebc59591d1 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 30 Dec 2016 18:29:07 +0200
+Subject: [PATCH 29/30] Do not set PYTHON_INSTALL_DIR by running python
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6a319935..466ca1e6 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -18,7 +18,7 @@ else()
+ 	FIND_PACKAGE(PythonInterp 3.0 REQUIRED)
+ endif()
+ 
+-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib())" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
++#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib())" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+ EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; sys.stdout.write('%s.%s' % (sys.version_info.major, sys.version_info.minor))" OUTPUT_VARIABLE PYTHON_MAJOR_DOT_MINOR_VERSION)
+ MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}")
+ 
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch b/meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch
new file mode 100644
index 00000000000..7fc8afef535
--- /dev/null
+++ b/meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch
@@ -0,0 +1,48 @@
+From 9c8d545152b35d8943be72b9503414a53e1ebf7c Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 30 Dec 2016 18:29:37 +0200
+Subject: [PATCH 30/30] Run python scripts using env
+
+Otherwise the build tools hardcode the python path into them.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ bin/dnf-automatic.in | 2 +-
+ bin/dnf.in           | 2 +-
+ bin/yum.in           | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/bin/dnf-automatic.in b/bin/dnf-automatic.in
+index 5b06aa26..9f6f703e 100755
+--- a/bin/dnf-automatic.in
++++ b/bin/dnf-automatic.in
+@@ -1,4 +1,4 @@
+-#!@PYTHON_EXECUTABLE@
++#!/usr/bin/env python
+ # dnf-automatic executable.
+ #
+ # Copyright (C) 2014-2016 Red Hat, Inc.
+diff --git a/bin/dnf.in b/bin/dnf.in
+index 645d0f06..ab141abd 100755
+--- a/bin/dnf.in
++++ b/bin/dnf.in
+@@ -1,4 +1,4 @@
+-#!@PYTHON_EXECUTABLE@
++#!/usr/bin/env python
+ # The dnf executable script.
+ #
+ # Copyright (C) 2012-2016 Red Hat, Inc.
+diff --git a/bin/yum.in b/bin/yum.in
+index f1fee071..013dc8c5 100755
+--- a/bin/yum.in
++++ b/bin/yum.in
+@@ -1,4 +1,4 @@
+-#!@PYTHON_EXECUTABLE@
++#!/usr/bin/env python
+ # The dnf executable script.
+ #
+ # Copyright (C) 2016 Red Hat, Inc.
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/dnf/dnf_git.bb b/meta/recipes-devtools/dnf/dnf_git.bb
new file mode 100644
index 00000000000..ff22d6f5f0d
--- /dev/null
+++ b/meta/recipes-devtools/dnf/dnf_git.bb
@@ -0,0 +1,45 @@
+SUMMARY = "Package manager forked from Yum, using libsolv as a dependency resolver"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://PACKAGE-LICENSING;md5=bfc29916e11321be06924c4fb096fdcc \
+                   "
+
+SRC_URI = "git://github.com/rpm-software-management/dnf.git \
+           file://0028-Use-backports.lzma-not-lzma.patch \
+           file://0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \
+           file://0030-Run-python-scripts-using-env.patch \
+           file://0001-Do-not-prepend-installroot-to-logdir.patch \
+           file://0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch \
+           file://0001-Corretly-install-tmpfiles.d-configuration.patch \
+           "
+
+PV = "2.0.0+git${SRCPV}"
+SRCREV = "f0093d672d3069cfee8447973ae70ef615fd8886"
+
+S = "${WORKDIR}/git"
+
+inherit cmake gettext bash-completion distutils-base systemd
+
+DEPENDS += "libdnf librepo libcomps python-pygpgme python-iniparse"
+# python 2.x only, drop when moving to python 3.x
+DEPENDS += "python-backports-lzma"
+
+# manpages generation requires http://www.sphinx-doc.org/
+EXTRA_OECMAKE = " -DWITH_MAN=0 -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR}"
+
+BBCLASSEXTEND = "native nativesdk"
+
+RDEPENDS_${PN}_class-target += "python-core python-codecs python-netclient python-email python-threading python-distutils librepo python-shell python-subprocess libcomps libdnf python-sqlite3 python-compression python-pygpgme python-backports-lzma python-rpm python-iniparse python-json python-importlib python-curses python-argparse"
+
+# Direct dnf-native to read rpm configuration from our sysroot, not the one it was compiled in
+do_install_append_class-native() {
+        create_wrapper ${D}/${bindir}/dnf-2 \
+                RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
+                RPM_NO_CHROOT_FOR_SCRIPTS=1
+}
+
+SYSTEMD_SERVICE_${PN} = "dnf-makecache.service dnf-makecache.timer \
+                         dnf-automatic-download.service dnf-automatic-download.timer \
+                         dnf-automatic-install.service dnf-automatic-install.timer \
+                         dnf-automatic-notifyonly.service dnf-automatic-notifyonly.timer \
+"
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 15/44] python-smartpm: remove the recipe
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (13 preceding siblings ...)
  2017-03-10 11:23 ` [PATCH 14/44] dnf: " Alexander Kanavin
@ 2017-03-10 11:23 ` Alexander Kanavin
  2017-03-10 11:23 ` [PATCH 16/44] db: remove the 6.x recipe Alexander Kanavin
                   ` (29 subsequent siblings)
  44 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:23 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 ...m_sys-use-md5sum-instead-of-mtime-as-the-.patch |  38 --
 ...art-add-deugging-when-targetpath-is-empty.patch |  47 ---
 .../smart-add-for-rpm-ignoresize-check.patch       |  35 --
 .../smart-already-installed-message.patch          |  54 ---
 .../python/python-smartpm/smart-attempt-fix.patch  | 158 ---------
 .../python/python-smartpm/smart-attempt.patch      | 185 ----------
 ...cache.py-getPackages-matches-name-version.patch |  43 ---
 .../python-smartpm/smart-channel-remove-all.patch  |  33 --
 .../python/python-smartpm/smart-channelsdir.patch  |  24 --
 .../python/python-smartpm/smart-locale.patch       |  27 --
 .../python/python-smartpm/smart-recommends.patch   | 381 ---------------------
 .../smart-rpm-transaction-failure-check.patch      |  57 ---
 .../smart-set-noprogress-for-pycurl.patch          |  20 --
 .../smartpm-rpm5-support-check-signatures.patch    | 112 ------
 meta/recipes-devtools/python/python-smartpm_git.bb | 141 --------
 15 files changed, 1355 deletions(-)
 delete mode 100644 meta/recipes-devtools/python/python-smartpm/channels-rpm_sys-use-md5sum-instead-of-mtime-as-the-.patch
 delete mode 100644 meta/recipes-devtools/python/python-smartpm/smart-add-deugging-when-targetpath-is-empty.patch
 delete mode 100644 meta/recipes-devtools/python/python-smartpm/smart-add-for-rpm-ignoresize-check.patch
 delete mode 100644 meta/recipes-devtools/python/python-smartpm/smart-already-installed-message.patch
 delete mode 100644 meta/recipes-devtools/python/python-smartpm/smart-attempt-fix.patch
 delete mode 100644 meta/recipes-devtools/python/python-smartpm/smart-attempt.patch
 delete mode 100644 meta/recipes-devtools/python/python-smartpm/smart-cache.py-getPackages-matches-name-version.patch
 delete mode 100644 meta/recipes-devtools/python/python-smartpm/smart-channel-remove-all.patch
 delete mode 100644 meta/recipes-devtools/python/python-smartpm/smart-channelsdir.patch
 delete mode 100644 meta/recipes-devtools/python/python-smartpm/smart-locale.patch
 delete mode 100644 meta/recipes-devtools/python/python-smartpm/smart-recommends.patch
 delete mode 100644 meta/recipes-devtools/python/python-smartpm/smart-rpm-transaction-failure-check.patch
 delete mode 100644 meta/recipes-devtools/python/python-smartpm/smart-set-noprogress-for-pycurl.patch
 delete mode 100644 meta/recipes-devtools/python/python-smartpm/smartpm-rpm5-support-check-signatures.patch
 delete mode 100644 meta/recipes-devtools/python/python-smartpm_git.bb

diff --git a/meta/recipes-devtools/python/python-smartpm/channels-rpm_sys-use-md5sum-instead-of-mtime-as-the-.patch b/meta/recipes-devtools/python/python-smartpm/channels-rpm_sys-use-md5sum-instead-of-mtime-as-the-.patch
deleted file mode 100644
index 2f14a124efc..00000000000
--- a/meta/recipes-devtools/python/python-smartpm/channels-rpm_sys-use-md5sum-instead-of-mtime-as-the-.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-channels/rpm_sys: use md5sum instead of mtime as the digest
-
-Use the internal getFileDigest() function (which defaults to md5) instead of
-mtime for getting the file digest. On some systems mtime proved to be
-unreliable because of delayed update. This caused smart to miss rpm db updates
-and thus get its understanding of installed packages out of sync.
-
-Upstream-Status: Pending
-
-Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
----
- smart/channels/rpm_sys.py | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/smart/channels/rpm_sys.py b/smart/channels/rpm_sys.py
-index b9fda27..6f1fe94 100644
---- a/smart/channels/rpm_sys.py
-+++ b/smart/channels/rpm_sys.py
-@@ -22,6 +22,7 @@
- from smart.backends.rpm.header import RPMDBLoader
- from smart.backends.rpm.base import getTS, rpm_join_dbpath
- from smart.channel import PackageChannel
-+from smart.util.filetools import getFileDigest
- from smart import *
- import os
- 
-@@ -35,7 +36,7 @@ class RPMSysChannel(PackageChannel):
-         dbdir = rpm_join_dbpath(sysconf.get("rpm-root", "/"),
-                             sysconf.get("rpm-dbpath", "var/lib/rpm"))
-         path = os.path.join(dbdir, "Packages")
--        digest = os.path.getmtime(path)
-+        digest = getFileDigest(path)
-         if digest == self._digest:
-             return True
-         self.removeLoaders()
--- 
-2.6.6
-
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-add-deugging-when-targetpath-is-empty.patch b/meta/recipes-devtools/python/python-smartpm/smart-add-deugging-when-targetpath-is-empty.patch
deleted file mode 100644
index 5e80804bf42..00000000000
--- a/meta/recipes-devtools/python/python-smartpm/smart-add-deugging-when-targetpath-is-empty.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 01e51afd03131947f8d74b9a23fdbc0078249499 Mon Sep 17 00:00:00 2001
-From: Mariano Lopez <mariano.lopez@linux.intel.com>
-Date: Wed, 3 Aug 2016 07:47:09 +0000
-Subject: [PATCH] fetcher.py: Add debugging when targetpath is empty
-
-There are several errors when openining files or manipulating
-path strings, those errors point targetpath passed to
-setSucceeded() is empty. This patch won't solve the problems,
-but will add debugging to give an idea why is failing.
-
-Upstream-Status: Inappropriate [debugging]
-
-Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
----
- smart/fetcher.py | 16 ++++++++++++++++
- 1 file changed, 16 insertions(+)
-
-diff --git a/smart/fetcher.py b/smart/fetcher.py
-index dd3ff6b..64aa979 100644
---- a/smart/fetcher.py
-+++ b/smart/fetcher.py
-@@ -594,6 +594,22 @@ class FetchItem(object):
-                 self._eta = None
- 
-     def setSucceeded(self, targetpath, fetchedsize=0):
-+        # It seems the in some odd cases targetpath here
-+        # is empty, this will lead to bugs in several places
-+        if not targetpath:
-+            import traceback
-+            tb_str = ""
-+            for threadId, stack in sys._current_frames().items():
-+                tb_str += '\nThreadID: %s' % threadId
-+                for filename, lineno, name, line in traceback.extract_stack(stack):
-+                    tb_str += '\nFile: "%s", line %d, in %s' % (filename, lineno, name)
-+                    if line:
-+                        tb_str += "\n  %s" % line.strip()
-+            error_string = ["No file path specified",
-+                            "URL: %s" % self._url,
-+                            "Status: %s" % self._status,
-+                            "Traceback: %s" % tb_str]
-+            raise Error, _("\n".join(error_string))
-         if self._status is not FAILED:
-             self._status = SUCCEEDED
-             self._targetpath = targetpath
--- 
-2.6.6
-
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-add-for-rpm-ignoresize-check.patch b/meta/recipes-devtools/python/python-smartpm/smart-add-for-rpm-ignoresize-check.patch
deleted file mode 100644
index fe98d070d33..00000000000
--- a/meta/recipes-devtools/python/python-smartpm/smart-add-for-rpm-ignoresize-check.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-python-smartpm: Add checking for "rpm-ignoresize" option
-
-The do_rootfs takes a very long time when build host has mounted many NFS
-devices. syscall lstat() was being called on every filesystem mounted on the
-build host during building.
-The reason for the lstat() is that rpm is verifying that enough free disk space
-is available to do the install. However, since the install is into the target
-rootfs it should not matter how much free space there is in the host mounts.
-Add checking for "rpm-ignoresize", by it, smart can make whether RPM skip
-checking for diskspace when install a rpm package.
-
-Upstream-Status: Pending
-
-Signed-off-by: wenlin.kang <wenlin.kang@windriver.com>
-Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
----
- smart/backends/rpm/pm.py | 4 ++++
- 1 file changed, 4 insertions(+)
-
-Index: git/smart/backends/rpm/pm.py
-===================================================================
---- git.orig/smart/backends/rpm/pm.py
-+++ git/smart/backends/rpm/pm.py
-@@ -233,6 +233,11 @@ class RPMPackageManager(PackageManager):
-         if sysconf.get("rpm-order"):
-             ts.order()
-         probfilter = rpm.RPMPROB_FILTER_OLDPACKAGE
-+
-+        if sysconf.get("rpm-ignoresize", False):
-+            probfilter |= rpm.RPMPROB_FILTER_DISKNODES
-+            probfilter |= rpm.RPMPROB_FILTER_DISKSPACE
-+
-         if force or reinstall:
-             probfilter |= rpm.RPMPROB_FILTER_REPLACEPKG
-             probfilter |= rpm.RPMPROB_FILTER_REPLACEOLDFILES
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-already-installed-message.patch b/meta/recipes-devtools/python/python-smartpm/smart-already-installed-message.patch
deleted file mode 100644
index 9055555cd08..00000000000
--- a/meta/recipes-devtools/python/python-smartpm/smart-already-installed-message.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From a74a9a9eb9d75964a0e978950e8b191d7a18d763 Mon Sep 17 00:00:00 2001
-From: Paul Eggleton <paul.eggleton@linux.intel.com>
-Date: Fri, 5 Jun 2015 17:07:16 +0100
-Subject: [PATCH] smart: change "is already installed" message from warning to
- info
-
-This doesn't need to be a warning.
-
-Upstream-Status: Pending
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
----
- smart/commands/install.py            | 4 ++--
- smart/interfaces/text/interactive.py | 2 +-
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/smart/commands/install.py b/smart/commands/install.py
-index 6ef9682..80d456b 100644
---- a/smart/commands/install.py
-+++ b/smart/commands/install.py
-@@ -152,7 +152,7 @@ def main(ctrl, opts):
-             for obj in results:
-                 for pkg in obj.packages:
-                     if pkg.installed:
--                        iface.warning(_("%s (for %s) is already installed")
-+                        iface.info(_("%s (for %s) is already installed")
-                                       % (pkg, arg))
-                         installed = True
-                         break
-@@ -184,7 +184,7 @@ def main(ctrl, opts):
-         for name in names:
-             pkg = names[name][0]
-             if pkg.installed:
--                iface.warning(_("%s is already installed") % pkg)
-+                iface.info(_("%s is already installed") % pkg)
-             else:
-                 trans.enqueue(pkg, INSTALL)
- 
-diff --git a/smart/interfaces/text/interactive.py b/smart/interfaces/text/interactive.py
-index 9865584..190867b 100644
---- a/smart/interfaces/text/interactive.py
-+++ b/smart/interfaces/text/interactive.py
-@@ -278,7 +278,7 @@ class Interpreter(Cmd):
-             for name in names:
-                 pkg = names[name][0]
-                 if pkg.installed:
--                    iface.warning(_("%s is already installed") % pkg)
-+                    iface.info(_("%s is already installed") % pkg)
-                 else:
-                     found = True
-                     transaction.enqueue(pkg, INSTALL)
--- 
-2.1.0
-
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-attempt-fix.patch b/meta/recipes-devtools/python/python-smartpm/smart-attempt-fix.patch
deleted file mode 100644
index 6e672b3321e..00000000000
--- a/meta/recipes-devtools/python/python-smartpm/smart-attempt-fix.patch
+++ /dev/null
@@ -1,158 +0,0 @@
-Sadly, smart is not deterministic so the same build can go down multiple different
-pathways. We'd expect to see the same warnings however depending on the pathway
-taken, it may or may not warn, particularly with Recommends since they're optional.
-
-For example, where a Recommended package is available but has Conflicts, we'd expect
-to see an warning that we couldn't install it. Some code paths silently hide this
-(its a LOCKED_CONFLICT). We add printing of warnings for this case.
-
-Also, if there are two compatible feeds available (e.g. i586 and core2_32), this 
-changes the code path from direct _install() to _pending() since there are multiple
-providers. This patch adds warning handling to _pending() so we don't hit hard 
-failures there. This is as seen with the mysterious libspeexdsp failures for x86-lsb
-on the autobuilder.
-
-Upstream-Status: Pending
-RP
-2015/7/16
-
-Index: git/smart/transaction.py
-===================================================================
---- git.orig/smart/transaction.py
-+++ git/smart/transaction.py
-@@ -651,13 +651,14 @@ class Transaction(object):
- 
-             if not prvpkgs:
-                 # No packages provide it at all. Give up.
-+
-+                reasons = []
-+                for prv in req.providedby:
-+                    for prvpkg in prv.packages:
-+                        lockedres = lockedpkgs.get(prvpkg, None)
-+                        if lockedres:
-+                            reasons.append(lock_reason(prvpkg, lockedres))
-                 if reqrequired:
--                    reasons = []
--                    for prv in req.providedby:
--                        for prvpkg in prv.packages:
--                            lockedres = lockedpkgs.get(prvpkg, None)
--                            if lockedres:
--                                reasons.append(lock_reason(prvpkg, lockedres))
-                     if reasons:
-                         raise Failed, _("Can't install %s: unable to install provider for %s:\n    %s") % \
-                                 (pkg, req, '\n    '.join(reasons))
-@@ -665,7 +666,11 @@ class Transaction(object):
-                         raise Failed, _("Can't install %s: no package provides %s") % \
-                                 (pkg, req)
-                 else:
-+                    if reasons:
-+                        iface.warning(_("Can't install %s: unable to install provider for %s:\n    %s") % \
-+                                (pkg, req, '\n    '.join(reasons)))
-+
-                     # It's only a recommend, skip
-                     continue
- 
-             if len(prvpkgs) == 1:
-@@ -846,6 +852,14 @@ class Transaction(object):
-         isinst = changeset.installed
-         getweight = self._policy.getWeight
- 
-+        attempt = sysconf.has("attempt-install", soft=True)
-+
-+        def handle_failure(msg):
-+            if attempt:
-+                iface.warning(msg)
-+            else:
-+                raise Failed, msg
-+
-         updown = []
-         while pending:
-             item = pending.pop(0)
-@@ -870,8 +884,9 @@ class Transaction(object):
- 
-                 if not prvpkgs:
-                     # No packages provide it at all. Give up.
--                    raise Failed, _("Can't install %s: no package "
--                                    "provides %s") % (pkg, req)
-+                    handle_failure(_("Can't install %s: no package "
-+                                    "provides %s") % (pkg, req))
-+                    continue
- 
-                 if len(prvpkgs) > 1:
-                     # More than one package provide it. We use _pending here,
-@@ -894,9 +909,10 @@ class Transaction(object):
-                                                  keeporder, cs, lk))
-                             keeporder += 0.000001
-                     if not alternatives:
--                        raise Failed, _("Can't install %s: all packages "
-+                        handle_failure(_("Can't install %s: all packages "
-                                         "providing %s failed to install:\n%s")\
--                                      % (pkg, req,  "\n".join(failures))
-+                                      % (pkg, req,  "\n".join(failures)))
-+                        continue
-                     alternatives.sort()
-                     changeset.setState(alternatives[0][1])
-                     if len(alternatives) == 1:
-@@ -954,18 +970,20 @@ class Transaction(object):
- 
-                     for reqpkg in reqpkgs:
-                         if reqpkg in locked and isinst(reqpkg):
--                            raise Failed, _("Can't remove %s: requiring "
-+                            handle_failure(_("Can't remove %s: requiring "
-                                             "package %s is locked") % \
--                                          (pkg, reqpkg)
-+                                          (pkg, reqpkg))
-+                            continue
-                     for reqpkg in reqpkgs:
-                         # We check again, since other actions may have
-                         # changed their state.
-                         if not isinst(reqpkg):
-                             continue
-                         if reqpkg in locked:
--                            raise Failed, _("Can't remove %s: requiring "
-+                            handle_failure(_("Can't remove %s: requiring "
-                                             "package %s is locked") % \
--                                          (pkg, reqpkg)
-+                                          (pkg, reqpkg))
-+                            continue
-                         self._remove(reqpkg, changeset, locked,
-                                      pending, depth)
-                     continue
-@@ -978,12 +996,14 @@ class Transaction(object):
-                 try:
-                     for reqpkg in reqpkgs:
-                         if reqpkg in locked and isinst(reqpkg):
--                            raise Failed, _("%s is locked") % reqpkg
-+                            handle_failure(_("%s is locked") % reqpkg)
-+                            continue
-                     for reqpkg in reqpkgs:
-                         if not cs.installed(reqpkg):
-                             continue
-                         if reqpkg in lk:
--                            raise Failed, _("%s is locked") % reqpkg
-+                            handle_failure(_("%s is locked") % reqpkg)
-+                            continue
-                         self._remove(reqpkg, cs, lk, None, depth)
-                 except Failed, e:
-                     failures.append(unicode(e))
-@@ -991,9 +1011,10 @@ class Transaction(object):
-                     alternatives.append((getweight(cs), cs, lk))
- 
-                 if not alternatives:
--                    raise Failed, _("Can't install %s: all packages providing "
-+                    handle_failure(_("Can't install %s: all packages providing "
-                                     "%s failed to install:\n%s") \
--                                  % (pkg, prv,  "\n".join(failures))
-+                                  % (pkg, prv,  "\n".join(failures)))
-+                    continue
- 
-                 alternatives.sort()
-                 changeset.setState(alternatives[0][1])
-@@ -1246,6 +1267,7 @@ class Transaction(object):
-                             changeset.setRequested(pkg, True)
-                     except Failed, e:
-                         if sysconf.has("attempt-install", soft=True):
-+                            iface.warning(_("Can't install %s: %s") % (pkg, str(e)))
-                             if pkg in changeset:
-                                 del changeset[pkg]
-                             continue
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-attempt.patch b/meta/recipes-devtools/python/python-smartpm/smart-attempt.patch
deleted file mode 100644
index e1182041bce..00000000000
--- a/meta/recipes-devtools/python/python-smartpm/smart-attempt.patch
+++ /dev/null
@@ -1,185 +0,0 @@
-From b105e7fe812da3ccaf7155c0fe14c8728b0d39a5 Mon Sep 17 00:00:00 2001
-From: Mark Hatle <mark.hatle@windriver.com>
-Date: Mon, 20 Jan 2014 14:30:52 +0000
-Subject: [PATCH] Add mechanism to attempt install without failing
-
-In OpenEmbedded, for complementary and 'attemptonly' package processing,
-we need a way to instruct smart to try to install, but ignore any
-failures (usually conflicts).
-
-This option only works for the install operation.
-
-If a complementary install fails, an actual error occurred, one that
-we can't ignore without losing the entire attempted transaction.  Keep
-this as an error so that we can catch these cases in the futre.
-
-Upstream-Status: Pending
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
----
- backends/rpm/pm.py |   35 ++++++++++++++++++++++++++++++++++-
- transaction.py     |   50 +++++++++++++++++++++++++++++++++++++-------------
- 2 files changed, 71 insertions(+), 14 deletions(-)
-
-diff --git a/smart/backends/rpm/pm.py b/smart/backends/rpm/pm.py
-index 9bbd952..ba6405a 100644
---- a/smart/backends/rpm/pm.py
-+++ b/smart/backends/rpm/pm.py
-@@ -241,15 +241,56 @@ class RPMPackageManager(PackageManager):
-         cb = RPMCallback(prog, upgradednames)
-         cb.grabOutput(True)
-         probs = None
-+        retry = 0
-         try:
-             probs = ts.run(cb, None)
-         finally:
-             del getTS.ts
-             cb.grabOutput(False)
-+            # If there are file conflicts, and we're attempting installation,
-+            # remove conflicting packages from the transaction and retry
-+            # If there are other problems returned by ts.run(), that are not
-+            # linked with packages/files conflicts (the returned list is empty),
-+            # then don't retry
-+            if (probs is not None) and (len(probs) != 0) and sysconf.has("attempt-install", soft=True):
-+                def remove_conflict(pkgNEVR):
-+                    for key in changeset.keys():
-+                        if pkgNEVR == str(key):
-+                            del changeset[key]
-+                            del pkgpaths[key]
-+                            iface.warning("Removing %s due to file %s conflicting with %s" % (pkgNEVR, fname, altNEVR))
-+                            break
-+
-+                retry = 1
-+                for prob in probs:
-+                    if prob[1][0] == rpm.RPMPROB_NEW_FILE_CONFLICT:
-+                        msg = prob[0].split()
-+                        fname = msg[1]
-+                        pkgNEVR = msg[7]
-+                        altNEVR = msg[9]
-+                        pkgNEVR = pkgNEVR.rsplit('.', 1)[0] + '@' + pkgNEVR.rsplit('.', 1)[1]
-+                        altNEVR = altNEVR.rsplit('.', 1)[0] + '@' + altNEVR.rsplit('.', 1)[1]
-+                        remove_conflict(pkgNEVR)
-+                    elif prob[1][0] == rpm.RPMPROB_FILE_CONFLICT:
-+                        msg = prob[0].split()
-+                        fname = msg[1]
-+                        pkgNEVR = msg[5]
-+                        altNEVR = msg[11]
-+                        pkgNEVR = pkgNEVR.rsplit('.', 1)[0] + '@' + pkgNEVR.rsplit('.', 1)[1]
-+                        altNEVR = altNEVR.rsplit('.', 1)[0] + '@' + altNEVR.rsplit('.', 1)[1]
-+                        remove_conflict(pkgNEVR)
-+                    else:
-+                        retry = 0
-+
-             prog.setDone()
--            if probs is not None:
-+            # If there are other problems than packages/files conflicts
-+            # returned by ts.run(), the returned list is empty, and if
-+            # we're only attempting installation, then don't raise any error
-+            if (probs is not None) and ((len(probs) != 0) or not sysconf.has("attempt-install", soft=True)) and (not retry):
-                 raise Error, "\n".join([x[0] for x in probs])
-             prog.stop()
-+            if retry and len(changeset):
-+                self.commit(changeset, pkgpaths)
- 
- class RPMCallback:
-     def __init__(self, prog, upgradednames):
-diff --git a/smart/transaction.py b/smart/transaction.py
-index 4b90cb7..3e043e9 100644
---- a/smart/transaction.py
-+++ b/smart/transaction.py
-@@ -555,6 +555,8 @@ class Transaction(object):
-         changeset.set(pkg, INSTALL)
-         isinst = changeset.installed
- 
-+        attempt = sysconf.has("attempt-install", soft=True)
-+
-         # Remove packages conflicted by this one.
-         for cnf in pkg.conflicts:
-             for prv in cnf.providedby:
-@@ -564,11 +566,16 @@ class Transaction(object):
-                     if not isinst(prvpkg):
-                         locked[prvpkg] = (LOCKED_CONFLICT_BY, pkg)
-                         continue
--                    if prvpkg in locked:
--                        raise Failed, _("Can't install %s: conflicted package "
--                                        "%s is locked") % (pkg, prvpkg)
--                    self._remove(prvpkg, changeset, locked, pending, depth)
--                    pending.append((PENDING_UPDOWN, prvpkg))
-+                    if attempt:
-+                        del changeset[pkg]
-+                        raise Failed, _("Can't install %s: it conflicts with package "
-+                                        "%s") % (pkg, prvpkg)
-+                    else:
-+                        if prvpkg in locked:
-+                            raise Failed, _("Can't install %s: conflicted package "
-+                                            "%s is locked") % (pkg, prvpkg)
-+                        self._remove(prvpkg, changeset, locked, pending, depth)
-+                        pending.append((PENDING_UPDOWN, prvpkg))
- 
-         # Remove packages conflicting with this one.
-         for prv in pkg.provides:
-@@ -579,12 +586,18 @@ class Transaction(object):
-                     if not isinst(cnfpkg):
-                         locked[cnfpkg] = (LOCKED_CONFLICT, pkg)
-                         continue
--                    if cnfpkg in locked:
-+                    if attempt:
-+                        del changeset[pkg]
-                         raise Failed, _("Can't install %s: it's conflicted by "
--                                        "the locked package %s") \
--                                      % (pkg, cnfpkg)
--                    self._remove(cnfpkg, changeset, locked, pending, depth)
--                    pending.append((PENDING_UPDOWN, cnfpkg))
-+                                        "the package %s") \
-+                                    % (pkg, cnfpkg)
-+                    else:
-+                        if cnfpkg in locked:
-+                            raise Failed, _("Can't install %s: it's conflicted by "
-+                                            "the locked package %s") \
-+                                        % (pkg, cnfpkg)
-+                        self._remove(cnfpkg, changeset, locked, pending, depth)
-+                        pending.append((PENDING_UPDOWN, cnfpkg))
- 
-         # Remove packages with the same name that can't
-         # coexist with this one.
-@@ -594,10 +607,15 @@ class Transaction(object):
-                 if not isinst(namepkg):
-                     locked[namepkg] = (LOCKED_NO_COEXIST, pkg)
-                     continue
--                if namepkg in locked:
-+                if attempt:
-+                    del changeset[pkg]
-                     raise Failed, _("Can't install %s: it can't coexist "
-                                     "with %s") % (pkg, namepkg)
--                self._remove(namepkg, changeset, locked, pending, depth)
-+                else:
-+                    if namepkg in locked:
-+                        raise Failed, _("Can't install %s: it can't coexist "
-+                                        "with %s") % (pkg, namepkg)
-+                    self._remove(namepkg, changeset, locked, pending, depth)
- 
-         # Install packages required by this one.
-         for req in pkg.requires + pkg.recommends:
-@@ -1176,6 +1194,8 @@ class Transaction(object):
- 
-         self._policy.runStarting()
- 
-+        attempt = sysconf.has("attempt-install", soft=True)
-+
-         try:
-             changeset = self._changeset.copy()
-             isinst = changeset.installed
-@@ -1190,7 +1210,11 @@ class Transaction(object):
-                     locked[pkg] = (LOCKED_KEEP, None)
-                 elif op is INSTALL:
-                     if not isinst(pkg) and pkg in locked:
--                        raise Failed, _("Can't install %s: it's locked") % pkg
-+                        if attempt:
-+                            iface.warning(_("Can't install %s: it's locked") % pkg)
-+                            del changeset[pkg]
-+                        else:
-+                            raise Failed, _("Can't install %s: it's locked") % pkg
-                     changeset.set(pkg, INSTALL)
-                     locked[pkg] = (LOCKED_INSTALL, None)
-                 elif op is REMOVE:
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-cache.py-getPackages-matches-name-version.patch b/meta/recipes-devtools/python/python-smartpm/smart-cache.py-getPackages-matches-name-version.patch
deleted file mode 100644
index 225b02f964c..00000000000
--- a/meta/recipes-devtools/python/python-smartpm/smart-cache.py-getPackages-matches-name-version.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From ee05e55e84b53f4bb0d0baba13ca47a8f84b7cb4 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Wed, 30 Sep 2015 01:12:52 -0700
-Subject: [PATCH] smart:cache.py: getPackages() matches name + arch
-
-It only matched name ony in the past, for example:
-smart install busybox (matched)
-but:
-smart install busybox@core2_64 (didn't match)
-
-The installation is very slow when no match since it would seach all the
-packages in the repo
-This patch makes it match both.
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- smart/cache.py |    3 ++-
- smart/ccache.c |    9 ++++++++-
- 2 files changed, 10 insertions(+), 2 deletions(-)
-
-diff --git a/smart/control.py b/smart/control.py
-index d44abe7..f23a604 100644
---- a/smart/control.py
-+++ b/smart/control.py
-@@ -876,9 +876,13 @@ class Control(object):
-         objects = []
- 
-         # If we find packages with exactly the given
--        # name or name-version, use them.
--        for pkg in self._cache.getPackages(s):
--            if pkg.name == s or "%s-%s" % (pkg.name, pkg.version) == s:
-+        # name, name-version, or name@arch, use them.
-+        s_name = s
-+        if "@" in s:
-+            s_name = s.split("@")[0]
-+        for pkg in self._cache.getPackages(s_name):
-+            if pkg.name == s or "%s-%s" % (pkg.name, pkg.version) == s \
-+                    or "%s@%s" % (pkg.name, pkg.version.split('@')[1]) == s:
-                 objects.append((1.0, pkg))
-          
-         if not objects:
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-channel-remove-all.patch b/meta/recipes-devtools/python/python-smartpm/smart-channel-remove-all.patch
deleted file mode 100644
index da23e7ce42f..00000000000
--- a/meta/recipes-devtools/python/python-smartpm/smart-channel-remove-all.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 6d2363a705697f615d9e5af5d6703b291e618b46 Mon Sep 17 00:00:00 2001
-From: Daniel Klauer <daniel.klauer@gin.de>
-Date: Thu, 12 May 2016 17:55:01 +0200
-Subject: [PATCH] Fix channel command --remove-all option parsing
-
-Option.take_action() stores a list of options given for validation later.
-It strips leading dashes and turns remaining dashes into underscores.
-This list is what ensure_action() will compare its arguments against,
-thus we must use underscores here.
-
-Upstream-Status: Pending
-
-Signed-off-by: Daniel Klauer <daniel.klauer@gin.de>
----
- smart/commands/channel.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/smart/commands/channel.py b/smart/commands/channel.py
-index 108f3f1..6234f69 100644
---- a/smart/commands/channel.py
-+++ b/smart/commands/channel.py
-@@ -164,7 +164,7 @@ def main(ctrl, opts):
-     opts.check_args_of_option("edit", 0)
-     opts.check_args_of_option("enable", -1)
-     opts.check_args_of_option("disable", -1)
--    opts.ensure_action("channel", ["add", "set", "remove", "remove-all",
-+    opts.ensure_action("channel", ["add", "set", "remove", "remove_all",
-                        "list", "show", "yaml", "enable", "disable"])
-     opts.check_remaining_args()
- 
--- 
-1.9.1
-
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-channelsdir.patch b/meta/recipes-devtools/python/python-smartpm/smart-channelsdir.patch
deleted file mode 100644
index e621b338758..00000000000
--- a/meta/recipes-devtools/python/python-smartpm/smart-channelsdir.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Make CHANNELSDIR in smart empty, since this causes host contamination issues
-on some RPM-based hosts on which smart is already installed.
-
-[YOCTO #3881]
-
-Upstream-Status: Inappropriate [embedded specific]
-
-diff --git a/smart/plugins/channelsync.py b/smart/plugins/channelsync.py
-index 3ba95ff..646d696 100644
---- a/smart/plugins/channelsync.py
-+++ b/smart/plugins/channelsync.py
-@@ -23,7 +23,11 @@ from smart.channel import *
- from smart import *
- import os
- 
--CHANNELSDIR = "/etc/smart/channels/"
-+# For now, we leave the definition of CHANNELSDIR empty. This prevents smart
-+# from erroneously consider the  build host's channels while setting up its
-+# channels [YOCTO #3881]. If this feature will be used in the future, CHANNELSDIR
-+# should be set to a proper value.
-+CHANNELSDIR = ""
- 
- def syncChannels(channelsdir, force=None):
- 
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-locale.patch b/meta/recipes-devtools/python/python-smartpm/smart-locale.patch
deleted file mode 100644
index 0f1dfb91d51..00000000000
--- a/meta/recipes-devtools/python/python-smartpm/smart-locale.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-rpm or commands run by rpm can use output which isn't strictly acsii such
-as quotation characters around expression which are character 0xe2.
-
-Use utf-8 as an encoding rather than whatever the system suggests to
-ensure smart copes with this rather than erroring with unicode errors.
-
-RP 2016/5/19
-Upstream-Status: Pending
-
-
-Index: git/smart/backends/rpm/pm.py
-===================================================================
---- git.orig/smart/backends/rpm/pm.py
-+++ git/smart/backends/rpm/pm.py
-@@ -32,11 +32,7 @@ from smart.pm import PackageManager
- from smart import sysconf, iface, Error, _
- 
- 
--try:
--    ENCODING = locale.getpreferredencoding()
--except locale.Error:
--    ENCODING = "ascii"
--
-+ENCODING = "utf-8"
- 
- def get_public_key(header):
-     return header.sprintf("%|DSAHEADER?{%{DSAHEADER:pgpsig}}:"
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-recommends.patch b/meta/recipes-devtools/python/python-smartpm/smart-recommends.patch
deleted file mode 100644
index d607fc4752b..00000000000
--- a/meta/recipes-devtools/python/python-smartpm/smart-recommends.patch
+++ /dev/null
@@ -1,381 +0,0 @@
-Handle recommended packages in core and rpm backends
-
-Identify and store recommended packages in the cache, add a query option
-to read them and ignore them if they are not present when installing.
-
-Initial identification code from Mark Hatle <mark.hatle@windriver.com>.
-
-Upstream-Status: Pending
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-
-diff --git a/smart/backends/rpm/base.py b/smart/backends/rpm/base.py
-index 9332ea0..4fcfbee 100644
---- a/smart/backends/rpm/base.py
-+++ b/smart/backends/rpm/base.py
-@@ -225,6 +225,52 @@ class RPMPackage(Package):
-                         break
-                 else:
-                     return False
-+        srecs = fk(self.recommends)
-+        orecs = fk(other.recommends)
-+        if srecs != orecs:
-+            for srec in srecs:
-+                if srec.name[0] == "/" or srec in orecs:
-+                    continue
-+                for orec in orecs:
-+                    if (srec.name == orec.name and
-+                        srec.relation == orec.relation and
-+                        checkver(srec.version, orec.version)):
-+                        break
-+                else:
-+                    return False
-+            for orec in orecs:
-+                if orec.name[0] == "/" or orec in srecs:
-+                    continue
-+                for srec in srecs:
-+                    if (srec.name == orec.name and
-+                        srec.relation == orec.relation and
-+                        checkver(srec.version, orec.version)):
-+                        break
-+                else:
-+                    return False
-+        srecs = fk(self.recommends)
-+        orecs = fk(other.recommends)
-+        if srecs != orecs:
-+            for srec in srecs:
-+                if srec.name[0] == "/" or srec in orecs:
-+                    continue
-+                for orec in orecs:
-+                    if (srec.name == orec.name and
-+                        srec.relation == orec.relation and
-+                        checkver(srec.version, orec.version)):
-+                        break
-+                else:
-+                    return False
-+            for orec in orecs:
-+                if orec.name[0] == "/" or orec in srecs:
-+                    continue
-+                for srec in srecs:
-+                    if (srec.name == orec.name and
-+                        srec.relation == orec.relation and
-+                        checkver(srec.version, orec.version)):
-+                        break
-+                else:
-+                    return False
-         return True
- 
-     def coexists(self, other):
-diff --git a/smart/ccache.c b/smart/ccache.c
-index 7193185..8b66515 100644
---- a/smart/ccache.c
-+++ b/smart/ccache.c
-@@ -500,6 +500,46 @@ Package_equals(PackageObject *self, PackageObject *other)
-         }
-     }
- 
-+    ilen = 0;
-+    jlen = 0;
-+    for (i = 0; i != PyList_GET_SIZE(self->recommends); i++) {
-+        PyObject *item = PyList_GET_ITEM(self->recommends, i);
-+        if (!PyObject_IsInstance(item, (PyObject *)&Depends_Type)) {
-+            PyErr_SetString(PyExc_TypeError, "Depends instance expected");
-+            return NULL;
-+        }
-+        if (STR(((DependsObject *)item)->name)[0] != '/')
-+            ilen += 1;
-+    }
-+    for (j = 0; j != PyList_GET_SIZE(other->recommends); j++) {
-+        PyObject *item = PyList_GET_ITEM(other->recommends, j);
-+        if (!PyObject_IsInstance(item, (PyObject *)&Depends_Type)) {
-+            PyErr_SetString(PyExc_TypeError, "Depends instance expected");
-+            return NULL;
-+        }
-+        if (STR(((DependsObject *)item)->name)[0] != '/')
-+            jlen += 1;
-+    }
-+    if (ilen != jlen) {
-+        ret = Py_False;
-+        goto exit;
-+    }
-+
-+    ilen = PyList_GET_SIZE(self->recommends);
-+    jlen = PyList_GET_SIZE(other->recommends);
-+    for (i = 0; i != ilen; i++) {
-+        PyObject *item = PyList_GET_ITEM(self->recommends, i);
-+        if (STR(((DependsObject *)item)->name)[0] != '/') {
-+            for (j = 0; j != jlen; j++)
-+                if (item == PyList_GET_ITEM(other->recommends, j))
-+                    break;
-+            if (j == jlen) {
-+                ret = Py_False;
-+                goto exit;
-+            }
-+        }
-+    }
-+
- exit:
-     Py_INCREF(ret);
-     return ret;
-@@ -1813,6 +1853,59 @@ Loader_buildPackage(LoaderObject *self, PyObject *args)
-         }
-     }
- 
-+    /* if recargs: */
-+    if (recargs) {
-+        int i = 0;
-+        int len = PyList_GET_SIZE(recargs);
-+        /* pkg.recommends = [] */
-+        Py_DECREF(pkgobj->recommends);
-+        pkgobj->recommends = PyList_New(len);
-+        /* for args in recargs: */
-+        for (; i != len; i++) {
-+            PyObject *args = PyList_GET_ITEM(recargs, i);
-+            DependsObject *recobj;
-+            PyObject *rec;
-+            
-+            if (!PyTuple_Check(args)) {
-+                PyErr_SetString(PyExc_TypeError,
-+                                "Item in recargs is not a tuple");
-+                return NULL;
-+            }
-+
-+            /* rec = cache._objmap.get(args) */
-+            rec = PyDict_GetItem(cache->_objmap, args);
-+            recobj = (DependsObject *)rec;
-+
-+            /* if not rec: */
-+            if (!rec) {
-+                if (!PyTuple_Check(args) || PyTuple_GET_SIZE(args) < 2) {
-+                    PyErr_SetString(PyExc_ValueError, "Invalid recargs tuple");
-+                    return NULL;
-+                }
-+                /* rec = args[0](*args[1:]) */
-+                callargs = PyTuple_GetSlice(args, 1, PyTuple_GET_SIZE(args));
-+                rec = PyObject_CallObject(PyTuple_GET_ITEM(args, 0), callargs);
-+                Py_DECREF(callargs);
-+                if (!rec) return NULL;
-+                recobj = (DependsObject *)rec;
-+
-+                /* cache._objmap[args] = rec */
-+                PyDict_SetItem(cache->_objmap, args, rec);
-+                Py_DECREF(rec);
-+
-+                /* cache._recommends.append(rec) */
-+                PyList_Append(cache->_recommends, rec);
-+            }
-+
-+            /* relpkgs.append(rec.packages) */
-+            PyList_Append(relpkgs, recobj->packages);
-+
-+            /* pkg.recommends.append(rec) */
-+            Py_INCREF(rec);
-+            PyList_SET_ITEM(pkgobj->recommends, i, rec);
-+        }
-+    }
-+
-     /* if upgargs: */
-     if (upgargs) {
-         int i = 0;
-@@ -2592,6 +2685,16 @@ Cache_reset(CacheObject *self, PyObject *args)
-         if (PyList_Check(reqobj->providedby))
-             LIST_CLEAR(reqobj->providedby);
-     }
-+    len = PyList_GET_SIZE(self->_recommends);
-+    for (i = 0; i != len; i++) {
-+        DependsObject *reqobj;
-+        PyObject *req;
-+        req = PyList_GET_ITEM(self->_recommends, i);
-+        reqobj = (DependsObject *)req;
-+        LIST_CLEAR(reqobj->packages);
-+        if (PyList_Check(reqobj->providedby))
-+            LIST_CLEAR(reqobj->providedby);
-+    }
-     len = PyList_GET_SIZE(self->_upgrades);
-     for (i = 0; i != len; i++) {
-         DependsObject *upgobj;
-@@ -2834,6 +2937,30 @@ Cache__reload(CacheObject *self, PyObject *args)
-                 }
- 
-                 /*
-+                   for rec in pkg.recommends:
-+                       rec.packages.append(pkg)
-+                       if rec not in recommends:
-+                           recommends[rec] = True
-+                           objmap[rec.getInitArgs()] = rec
-+                */
-+                if (PyList_Check(pkg->recommends)) {
-+                    klen = PyList_GET_SIZE(pkg->recommends);
-+                    for (k = 0; k != klen; k++) {
-+                        PyObject *rec = PyList_GET_ITEM(pkg->recommends, k);
-+                        PyList_Append(((DependsObject *)rec)->packages,
-+                                      (PyObject *)pkg);
-+                        if (!PyDict_GetItem(recommends, rec)) {
-+                            PyDict_SetItem(recommends, rec, Py_True);
-+                            args = PyObject_CallMethod(rec, "getInitArgs",
-+                                                       NULL);
-+                            if (!args) return NULL;
-+                            PyDict_SetItem(objmap, args, rec);
-+                            Py_DECREF(args);
-+                        }
-+                    }
-+                }
-+
-+                /*
-                    for upg in pkg.upgrades:
-                        upg.packages.append(pkg)
-                        if upg not in upgrades:
-@@ -3097,6 +3224,47 @@ Cache_linkDeps(CacheObject *self, PyObject *args)
-         Py_DECREF(seq);
-     }
- 
-+    /* recnames = {} */
-+    recnames = PyDict_New();
-+    /* for rec in self._recommends: */
-+    len = PyList_GET_SIZE(self->_recommends);
-+    for (i = 0; i != len; i++) {
-+        PyObject *rec = PyList_GET_ITEM(self->_recommends, i);
-+
-+        /* for name in rec.getMatchNames(): */
-+        PyObject *names = PyObject_CallMethod(rec, "getMatchNames", NULL);
-+        PyObject *seq = PySequence_Fast(names, "getMatchNames() returned "
-+                                               "non-sequence object");
-+        int nameslen;
-+        if (!seq) return NULL;
-+        nameslen = PySequence_Fast_GET_SIZE(seq);
-+        for (j = 0; j != nameslen; j++) {
-+            PyObject *name = PySequence_Fast_GET_ITEM(seq, j);
-+            
-+            /* lst = recnames.get(name) */
-+            lst = PyDict_GetItem(recnames, name);
-+
-+            /* 
-+               if lst:
-+                   lst.append(rec)
-+               else:
-+                   recnames[name] = [rec]
-+            */
-+            if (lst) {
-+                PyList_Append(lst, rec);
-+            } else {
-+                lst = PyList_New(1);
-+                Py_INCREF(rec);
-+                PyList_SET_ITEM(lst, 0, rec);
-+                PyDict_SetItem(recnames, name, lst);
-+                Py_DECREF(lst);
-+            }
-+        }
-+
-+        Py_DECREF(names);
-+        Py_DECREF(seq);
-+    }
-+
-     /* upgnames = {} */
-     upgnames = PyDict_New();
-     /* for upg in self._upgrades: */
-@@ -3286,6 +3454,56 @@ Cache_linkDeps(CacheObject *self, PyObject *args)
-             }
-         }
- 
-+        /* lst = recnames.get(prv.name) */
-+        lst = PyDict_GetItem(recnames, prv->name);
-+
-+        /* if lst: */
-+        if (lst) {
-+            /* for rec in lst: */
-+            int reclen = PyList_GET_SIZE(lst);
-+            for (j = 0; j != reclen; j++) {
-+                DependsObject *rec = (DependsObject *)PyList_GET_ITEM(lst, j);
-+                /* if rec.matches(prv): */
-+                PyObject *ret = PyObject_CallMethod((PyObject *)rec, "matches",
-+                                                    "O", (PyObject *)prv);
-+                if (!ret) return NULL;
-+                if (PyObject_IsTrue(ret)) {
-+                    /*
-+                       if rec.providedby:
-+                           rec.providedby.append(prv)
-+                       else:
-+                           rec.providedby = [prv]
-+                    */
-+                    if (PyList_Check(rec->providedby)) {
-+                        PyList_Append(rec->providedby, (PyObject *)prv);
-+                    } else {
-+                        PyObject *_lst = PyList_New(1);
-+                        Py_INCREF(prv);
-+                        PyList_SET_ITEM(_lst, 0, (PyObject *)prv);
-+                        Py_DECREF(rec->providedby);
-+                        rec->providedby = _lst;
-+                    }
-+
-+                    /*
-+                       if prv.recommendedby:
-+                           prv.recommendedby.append(prv)
-+                       else:
-+                           prv.recommendedby = [prv]
-+                    */
-+                    if (PyList_Check(prv->recommendedby)) {
-+                        PyList_Append(prv->recommendedby, (PyObject *)rec);
-+                    } else {
-+                        PyObject *_lst = PyList_New(1);
-+                        Py_INCREF(rec);
-+                        PyList_SET_ITEM(_lst, 0, (PyObject *)rec);
-+                        Py_DECREF(prv->recommendedby);
-+                        prv->recommendedby = _lst;
-+                    }
-+                }
-+                Py_DECREF(ret);
-+            }
-+        }
-+
-         /* lst = upgnames.get(prv.name) */
-         lst = PyDict_GetItem(upgnames, prv->name);
- 
-@@ -3821,6 +4094,21 @@ Cache__setstate__(CacheObject *self, PyObject *state)
-         }
- 
-         /*
-+           for rec in pkg.recommends:
-+               rec.packages.append(pkg)
-+               recommends[rec] = True
-+        */
-+        if (PyList_Check(pkgobj->recommends)) {
-+            jlen = PyList_GET_SIZE(pkgobj->recommends);
-+            for (j = 0; j != jlen; j++) {
-+                PyObject *rec = PyList_GET_ITEM(pkgobj->recommends, j);
-+                DependsObject *recobj = (DependsObject *)rec;
-+                PyList_Append(recobj->packages, pkg);
-+                PyDict_SetItem(recommends, rec, Py_True);
-+            }
-+        }
-+
-+        /*
-            for upg in pkg.upgrades:
-                upg.packages.append(pkg)
-                upgrades[upg] = True
-diff --git a/smart/commands/query.py b/smart/commands/query.py
-index 9265cd9..b6f5697 100644
---- a/smart/commands/query.py
-+++ b/smart/commands/query.py
-@@ -750,6 +750,22 @@ class TextOutput(NullOutput):
-             name = str(prvpkg)
-         print "       ", "%s (%s)" % (name, prv)
- 
-+    def showRecommends(self, pkg, rec):
-+        if self._firstrecommends:
-+            self._firstrecommends = False
-+            print " ", _("Recommends:")
-+        print "   ", rec
-+
-+    def showRecommendsProvidedBy(self, pkg, req, prv, prvpkg):
-+        if self._firstrecommendsprovidedby:
-+            self._firstrecommendsprovidedby = False
-+            print "     ", _("Provided By:")
-+        if self.opts.hide_version:
-+            name = prvpkg.name
-+        else:
-+            name = str(prvpkg)
-+        print "       ", "%s (%s)" % (name, prv)
-+
-     def showUpgrades(self, pkg, upg):
-         if self._firstupgrades:
-             self._firstupgrades = False
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-rpm-transaction-failure-check.patch b/meta/recipes-devtools/python/python-smartpm/smart-rpm-transaction-failure-check.patch
deleted file mode 100644
index bb8c3afdb71..00000000000
--- a/meta/recipes-devtools/python/python-smartpm/smart-rpm-transaction-failure-check.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 0c55d7e18f40465e95e8e4bf22af01f5d4477d3c Mon Sep 17 00:00:00 2001
-From: Daniel Klauer <daniel.klauer@gin.de>
-Date: Wed, 11 May 2016 17:22:49 +0200
-Subject: [PATCH] rpm: Don't ignore transaction error with empty problems list
-
-SmartPM could misinterpret RPM transaction error as success,
-if ts.run() (RPM Python API) returns an empty problems list,
-because of incorrect check for None which treated empty list
-to be the same as None when it has different meaning.
-
-ts.run() returns:
-* None in case of success
-* problems list in case of error, may be empty
-(look at rpmts_Run() in rpm-5.4.14/python/rpmts-py.c [1])
-
-"if mylist" is not good enough to check for error here, because it will
-treat an empty list as "false" because its len() == 0 [2].
-
-ts.check() seems to be different (it's ok for it to return an empty list),
-but for consistency it should be made clear that it can return either None,
-an empty list or a non-empty list.
-
-[1] http://rpm5.org/cvs/fileview?f=rpm/python/rpmts-py.c&v=1.111.2.3
-[2] https://docs.python.org/2/library/stdtypes.html#truth-value-testing
-
-Upstream-Status: Pending
-
-Signed-off-by: Daniel Klauer <daniel.klauer@gin.de>
----
- smart/backends/rpm/pm.py | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/smart/backends/rpm/pm.py b/smart/backends/rpm/pm.py
-index 9bbd952..635f726 100644
---- a/smart/backends/rpm/pm.py
-+++ b/smart/backends/rpm/pm.py
-@@ -208,7 +208,7 @@ class RPMPackageManager(PackageManager):
-         force = sysconf.get("rpm-force", False)
-         if not force:
-             probs = ts.check()
--            if probs:
-+            if (probs is not None) and (len(probs) != 0):
-                 problines = []
-                 for prob in probs:
-                     name1 = "%s-%s-%s" % prob[0]
-@@ -247,7 +247,7 @@ class RPMPackageManager(PackageManager):
-             del getTS.ts
-             cb.grabOutput(False)
-             prog.setDone()
--            if probs:
-+            if probs is not None:
-                 raise Error, "\n".join([x[0] for x in probs])
-             prog.stop()
-
---
-1.9.1
-
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-set-noprogress-for-pycurl.patch b/meta/recipes-devtools/python/python-smartpm/smart-set-noprogress-for-pycurl.patch
deleted file mode 100644
index 2885998acc6..00000000000
--- a/meta/recipes-devtools/python/python-smartpm/smart-set-noprogress-for-pycurl.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Set NOPROGRESS for pycurl just as same as default operation in pycurl module itself.
-If set NOPROGRESS with 0 for pycurl, it causes dead lock issue of Python GIL when
-call smart library by python gui just like pygtk.
-
-Upstream-Status: Pending
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-diff -u smart-1.4.1/smart.orig/fetcher.py smart-1.4.1/smart/fetcher.py
---- smart-1.4.1/smart.orig/fetcher.py	2014-07-15 16:42:19.240437080 +0800
-+++ smart-1.4.1/smart/fetcher.py	2014-07-15 17:02:37.812470289 +0800
-@@ -1720,7 +1720,7 @@
-                         handle.setopt(pycurl.OPT_FILETIME, 1)
-                         handle.setopt(pycurl.LOW_SPEED_LIMIT, 1)
-                         handle.setopt(pycurl.LOW_SPEED_TIME, SOCKETTIMEOUT)
--                        handle.setopt(pycurl.NOPROGRESS, 0)
-+                        handle.setopt(pycurl.NOPROGRESS, 1)
-                         handle.setopt(pycurl.PROGRESSFUNCTION, progress)
-                         handle.setopt(pycurl.WRITEDATA, local)
-                         handle.setopt(pycurl.FOLLOWLOCATION, 1)
diff --git a/meta/recipes-devtools/python/python-smartpm/smartpm-rpm5-support-check-signatures.patch b/meta/recipes-devtools/python/python-smartpm/smartpm-rpm5-support-check-signatures.patch
deleted file mode 100644
index 4067a90a08e..00000000000
--- a/meta/recipes-devtools/python/python-smartpm/smartpm-rpm5-support-check-signatures.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-From 5b79e28bd70a0ec5b34c5ff19b66cbbdd1e48835 Mon Sep 17 00:00:00 2001
-From: Haiqing Bai <Haiqing.Bai@windriver.com>
-Date: Fri, 18 Mar 2016 13:34:07 +0800
-Subject: [PATCH] Make smartpm to support check signatures of rpmv5.
-
-The original support for 'rpm-check-signatures' has been
-disabled for the RPMv5 does not support '_RPMVSF_NOSIGNATURES'
-now. This fix replaces the '_RPMVSF_NOSIGNATURES' with
-rpm VS flags set:RPMVSF_NODSAHEADER|RPMVSF_NORSAHEADER|
-RPMVSF_NODSA|RPMVSF_NORSA.
-
-Upstream-Status: Pending
-Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
----
- smart/backends/rpm/base.py      | 43 +++++++++++++++++++++++++++++++----------
- smart/backends/rpm/pm.py        |  2 +-
- smart/plugins/yumchannelsync.py |  5 +++--
- 3 files changed, 37 insertions(+), 13 deletions(-)
-
-diff --git a/smart/backends/rpm/base.py b/smart/backends/rpm/base.py
-index 85f4d49..dbd6165 100644
---- a/smart/backends/rpm/base.py
-+++ b/smart/backends/rpm/base.py
-@@ -63,11 +63,23 @@ def getTS(new=False):
-         if sysconf.get("rpm-dbpath"):
-             rpm.addMacro('_dbpath', "/" + sysconf.get("rpm-dbpath"))
-         getTS.ts = rpm.ts(getTS.root)
--        if not sysconf.get("rpm-check-signatures", False):
--            if hasattr(rpm, '_RPMVSF_NOSIGNATURES'):
--                getTS.ts.setVSFlags(rpm._RPMVSF_NOSIGNATURES)
--            else:
--                raise Error, _("rpm requires checking signatures")
-+
-+        # _RPMVSF_NOSIGNATURES is not supported in RPMv5, so here uses
-+        # RPMVSF_NODSAHEADER|RPMVSF_NORSAHEADER|RPMVSF_NODSA|RPMVSF_NORSA
-+        # to replace '_RPMVSF_NOSIGNATURES' to continue to support check
-+        # rpm signatures
-+
-+        #if not sysconf.get("rpm-check-signatures", False):
-+        #    if hasattr(rpm, '_RPMVSF_NOSIGNATURES'):
-+        #        getTS.ts.setVSFlags(rpm._RPMVSF_NOSIGNATURES)
-+        #    else:
-+        #        raise Error, _("rpm requires checking signatures")
-+        if sysconf.get("rpm-check-signatures") == False:
-+            getTS.ts.setVSFlags(rpm.RPMVSF_NODSAHEADER|rpm.RPMVSF_NORSAHEADER|\
-+                                rpm.RPMVSF_NODSA|rpm.RPMVSF_NORSA)
-+        else:
-+            getTS.ts.setVSFlags(0)
-+
-         rpm_dbpath = sysconf.get("rpm-dbpath", "var/lib/rpm")
-         dbdir = rpm_join_dbpath(getTS.root, rpm_dbpath)
-         if not os.path.isdir(dbdir):
-@@ -89,11 +101,22 @@ def getTS(new=False):
-         if sysconf.get("rpm-dbpath"):
-             rpm.addMacro('_dbpath', "/" + sysconf.get("rpm-dbpath"))
-         ts = rpm.ts(getTS.root)
--        if not sysconf.get("rpm-check-signatures", False):
--            if hasattr(rpm, '_RPMVSF_NOSIGNATURES'):
--                ts.setVSFlags(rpm._RPMVSF_NOSIGNATURES)
--            else:
--                raise Error, _("rpm requires checking signatures")
-+
-+        # _RPMVSF_NOSIGNATURES is not supported in RPMv5, so here uses
-+        # RPMVSF_NODSAHEADER|RPMVSF_NORSAHEADER|RPMVSF_NODSA|RPMVSF_NORSA
-+        # to replace '_RPMVSF_NOSIGNATURES' to continue to support check
-+        # rpm signatures
-+
-+        #if not sysconf.get("rpm-check-signatures", False):
-+        #    if hasattr(rpm, '_RPMVSF_NOSIGNATURES'):
-+        #        ts.setVSFlags(rpm._RPMVSF_NOSIGNATURES)
-+        #    else:
-+        #        raise Error, _("rpm requires checking signatures")
-+        if sysconf.get("rpm-check-signatures") == False:
-+            ts.setVSFlags(rpm.RPMVSF_NODSAHEADER|rpm.RPMVSF_NORSAHEADER|\
-+                                rpm.RPMVSF_NODSA|rpm.RPMVSF_NORSA)
-+        else:
-+            ts.setVSFlags(0)
-         return ts
-     else:
-         return getTS.ts
-diff --git a/smart/backends/rpm/pm.py b/smart/backends/rpm/pm.py
-index b57a844..7b651b5 100644
---- a/smart/backends/rpm/pm.py
-+++ b/smart/backends/rpm/pm.py
-@@ -180,7 +180,7 @@ class RPMPackageManager(PackageManager):
-                 fd = os.open(path, os.O_RDONLY)
-                 try:
-                     h = ts.hdrFromFdno(fd)
--                    if sysconf.get("rpm-check-signatures", False):
-+                    if sysconf.get("rpm-check-signatures", True):
-                          if get_public_key(h) == '(none)':
-                              raise rpm.error('package is not signed')
-                 except rpm.error, e:
-diff --git a/smart/plugins/yumchannelsync.py b/smart/plugins/yumchannelsync.py
-index f8107e6..2dc5482 100644
---- a/smart/plugins/yumchannelsync.py
-+++ b/smart/plugins/yumchannelsync.py
-@@ -56,8 +56,9 @@ def _getreleasever():
- 
-     rpmroot = sysconf.get("rpm-root", "/")
-     ts = rpmUtils.transaction.initReadOnlyTransaction(root=rpmroot)
--    if hasattr(rpm, '_RPMVSF_NOSIGNATURES') and hasattr(rpm, '_RPMVSF_NODIGESTS'):
--        ts.pushVSFlags(~(rpm._RPMVSF_NOSIGNATURES|rpm._RPMVSF_NODIGESTS))
-+    #_RPMVSF_NOSIGNATURES is not supported in RPMv5
-+    #if hasattr(rpm, '_RPMVSF_NOSIGNATURES') and hasattr(rpm, '_RPMVSF_NODIGESTS'):
-+    #    ts.pushVSFlags(~(rpm._RPMVSF_NOSIGNATURES|rpm._RPMVSF_NODIGESTS))
-     releasever = None
-     # HACK: we're hard-coding the most used distros, will add more if needed
-     idx = ts.dbMatch('provides', 'fedora-release')
--- 
-1.9.1
-
diff --git a/meta/recipes-devtools/python/python-smartpm_git.bb b/meta/recipes-devtools/python/python-smartpm_git.bb
deleted file mode 100644
index 31c273deaf0..00000000000
--- a/meta/recipes-devtools/python/python-smartpm_git.bb
+++ /dev/null
@@ -1,141 +0,0 @@
-SUMMARY = "The Smart Package Manager"
-DESCRIPTION = "The Smart Package Manager project has the ambitious objective of creating \
-smart and portable algorithms for solving adequately the problem of managing software \
-upgrades and installation."
-
-HOMEPAGE = "http://labix.org/smart/"
-SECTION = "devel/python"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=393a5ca445f6965873eca0259a17f833"
-
-DEPENDS = "python rpm gettext-native python-rpm"
-SRCNAME = "smart"
-
-SRC_URI = "\
-          git://github.com/smartpm/smart.git \
-          file://smart-recommends.patch \
-          file://smart-channelsdir.patch \
-          file://smart-rpm-transaction-failure-check.patch \
-          file://smart-attempt.patch \
-          file://smart-attempt-fix.patch \
-          file://smart-add-for-rpm-ignoresize-check.patch \
-          file://smart-already-installed-message.patch \
-          file://smart-set-noprogress-for-pycurl.patch \
-          file://smart-cache.py-getPackages-matches-name-version.patch \
-          file://smart-channel-remove-all.patch \
-          file://smart-locale.patch \
-          file://smartpm-rpm5-support-check-signatures.patch \
-          file://smart-add-deugging-when-targetpath-is-empty.patch \
-          file://channels-rpm_sys-use-md5sum-instead-of-mtime-as-the-.patch \
-         "
-
-SRCREV = "407a7eca766431257dcd1da15175cc36a1bb22d0"
-PV = "1.5+git${SRCPV}"
-
-S = "${WORKDIR}/git"
-
-# Options - rpm, qt4, gtk
-PACKAGECONFIG ??= "rpm"
-
-RPM_RDEP = "${PN}-backend-rpm"
-QT_RDEP = "${PN}-interface-qt4"
-GTK_RDEP = "${PN}-interface-gtk"
-
-RPM_RDEP_class-native = ""
-QT_RDEP_class-native = ""
-GTK_RDEP_class-native = ""
-
-RPM_RDEP_class-nativesdk = ""
-QT_RDEP_class-nativesdk = ""
-GTK_RDEP_class-nativesdk = ""
-
-PACKAGECONFIG[rpm] = ",,rpm,${RPM_RDEP}"
-PACKAGECONFIG[qt4] = ",,qt4-x11,${QT_RDEP}"
-PACKAGECONFIG[gtk] = ",,gtk+,${GTK_RDEP}"
-
-inherit distutils
-
-do_install_append() {
-   # We don't support the following items
-   rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/backends/slack
-   rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/backends/arch
-   rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/interfaces/qt
-
-   # Temporary, debian support in OE is missing the python module
-   rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/aptchannelsync.py*
-   rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/debdir.py*
-   rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/backends/deb
-
-   # Disable automatic channel detection
-   rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/detectsys.py*
-
-   # Disable landscape support
-   rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/landscape.py*
-
-   # Disable urpmi channel support
-   rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/urpmichannelsync.py*
-
-   # Disable yum channel support
-   rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/yumchannelsync.py*
-
-   # Disable zypper channel support
-   rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/zyppchannelsync.py*
-
-   if [ -z "${@bb.utils.filter('PACKAGECONFIG', 'rpm', d)}" ]; then
-      rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/rpmdir.py*
-      rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/backends/rpm
-   fi
-
-   if [ -z "${@bb.utils.filter('PACKAGECONFIG', 'qt4', d)}" ]; then
-      rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/interfaces/qt4
-   fi
-
-   if [ -z "${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'gtk', '', d)}" ]; then
-      rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/interfaces/gtk
-   fi
-}
-
-add_native_wrapper() {
-        create_wrapper ${D}/${bindir}/smart \
-		RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir'), d.getVar('bindir'))}/rpm \
-		RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir'), d.getVar('bindir'))}/rpm} \
-		RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir'), d.getVar('bindir'))}/locale
-}
-
-do_install_append_class-native() {
-        sed -i -e 's|^#!.*/usr/bin/env python|#! /usr/bin/env nativepython|' ${D}${bindir}/smart
-        add_native_wrapper
-}
-
-do_install_append_class-nativesdk() {
-        add_native_wrapper
-}
-
-PACKAGES = "${PN}-dev ${PN}-dbg ${PN}-doc smartpm \
-            ${@bb.utils.contains('PACKAGECONFIG', 'rpm', '${PN}-backend-rpm', '', d)} \
-            ${@bb.utils.contains('PACKAGECONFIG', 'qt4', '${PN}-interface-qt4', '', d)} \
-            ${@bb.utils.contains('PACKAGECONFIG', 'gtk', '${PN}-interface-gtk', '', d)} \
-            ${PN}-interface-images ${PN}"
-
-RDEPENDS_smartpm = "${PN}"
-
-RDEPENDS_${PN} += "${PN}-backend-rpm python-codecs python-textutils python-xml python-fcntl \
-                   python-pickle python-crypt python-compression python-shell \
-                   python-resource python-netclient python-threading python-unixadmin python-pprint"
-RDEPENDS_${PN}_class-native = ""
-
-RDEPENDS_${PN}-backend-rpm = "python-rpm"
-
-RDEPENDS_${PN}-interface-qt4 = "qt4-x11 ${PN}-interface-images"
-RDEPENDS_${PN}-interface-gtk = "gtk+ ${PN}-interface-images"
-
-FILES_smartpm = "${bindir}/smart"
-
-FILES_${PN}-backend-rpm = "${PYTHON_SITEPACKAGES_DIR}/smart/backends/rpm"
-
-FILES_${PN}-interface-qt4 = "${PYTHON_SITEPACKAGES_DIR}/smart/interfaces/qt4"
-FILES_${PN}-interface-gtk = "${PYTHON_SITEPACKAGES_DIR}/smart/interfaces/gtk"
-FILES_${PN}-interface-images = "${datadir}/${baselib}/python*/site-packages/smart/interfaces/images"
-
-BBCLASSEXTEND = "native nativesdk"
-
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 16/44] db: remove the 6.x recipe
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (14 preceding siblings ...)
  2017-03-10 11:23 ` [PATCH 15/44] python-smartpm: remove the recipe Alexander Kanavin
@ 2017-03-10 11:23 ` Alexander Kanavin
  2017-03-10 11:23 ` [PATCH 17/44] package_rpm.bbclass: make architecture-independent .rpm packages "noarch" instead of "all" Alexander Kanavin
                   ` (28 subsequent siblings)
  44 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:23 UTC (permalink / raw)
  To: openembedded-core

Version 6.x of Berkeley DB has been rejected by open source community due to its hostile
AGPLv3 license; both Fedora and Debian are sticking with db 5.x - and by extension,
all the open source projects are still developed and tested with db 5.x

In oe-core the only thing that was requiring db 6.x was rpm 5.x, and so there's no reason
to continue carrying db 6.x in oe-core. If someone needs API features that are only available in
db 6.x, it can be re-added to meta-oe.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/conf/distro/include/default-versions.inc      |   3 -
 ...Makefile-let-libdb-6.0.la-depend-os_map.l.patch |  29 ------
 ...akefile-let-libso_target-depend-on-bt_rec.patch |  30 ------
 meta/recipes-support/db/db_5.3.28.bb               |   1 +
 meta/recipes-support/db/db_6.0.35.bb               | 111 ---------------------
 5 files changed, 1 insertion(+), 173 deletions(-)
 delete mode 100644 meta/recipes-support/db/db/Makefile-let-libdb-6.0.la-depend-os_map.l.patch
 delete mode 100644 meta/recipes-support/db/db/Makefile-let-libso_target-depend-on-bt_rec.patch
 delete mode 100644 meta/recipes-support/db/db_6.0.35.bb

diff --git a/meta/conf/distro/include/default-versions.inc b/meta/conf/distro/include/default-versions.inc
index cc8c533d4c0..d976508ff51 100644
--- a/meta/conf/distro/include/default-versions.inc
+++ b/meta/conf/distro/include/default-versions.inc
@@ -5,6 +5,3 @@
 # Force the older version of liberation-fonts until we fix the fontforge issue
 PREFERRED_VERSION_liberation-fonts ?= "1.04"
 
-# Force db-native's version to keep sync with db while
-# 'AGPL-3.0' in ${INCOMPATIBLE_LICENSE} blacklist
-PREFERRED_VERSION_db-native = "${@incompatible_license_contains('AGPL-3.0', '5.%', '6.%', d)}"
diff --git a/meta/recipes-support/db/db/Makefile-let-libdb-6.0.la-depend-os_map.l.patch b/meta/recipes-support/db/db/Makefile-let-libdb-6.0.la-depend-os_map.l.patch
deleted file mode 100644
index 68a213136b6..00000000000
--- a/meta/recipes-support/db/db/Makefile-let-libdb-6.0.la-depend-os_map.l.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 2902dda6e3f7b2cd5796a96af20deece610e2eb9 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Mon, 16 Nov 2015 22:20:49 -0800
-Subject: [PATCH] build_unix/Makefile: let libdb-6.0.la depend os_map.lo
-
-Fixed parallel issue:
-libtool: link: `os_map.lo' is not a valid libtool object
-Makefile:867: recipe for target 'libdb-6.0.la' failed
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- dist/Makefile.in |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: db-6.0.30/dist/Makefile.in
-===================================================================
---- db-6.0.30.orig/dist/Makefile.in
-+++ db-6.0.30/dist/Makefile.in
-@@ -863,7 +863,7 @@ $(libdb_version): $(C_OBJS)
- 	$(LN) -s $(libdb_version) $(libdb)
- 
- # Shared C library.
--$(libso_target): $(C_OBJS) bt_rec@o@
-+$(libso_target): $(C_OBJS) bt_rec@o@ os_map@o@
- 	$(SOLINK) $(SOFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) \
- 		$(LIBCSO_LIBS)
- 	$(RM) $(libdb)
diff --git a/meta/recipes-support/db/db/Makefile-let-libso_target-depend-on-bt_rec.patch b/meta/recipes-support/db/db/Makefile-let-libso_target-depend-on-bt_rec.patch
deleted file mode 100644
index 86804083472..00000000000
--- a/meta/recipes-support/db/db/Makefile-let-libso_target-depend-on-bt_rec.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From c640ff9340f358a00835816d0fea03d27a7be978 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Tue, 31 Mar 2015 00:56:44 -0700
-Subject: [PATCH] Makefile: let libso_target depend on bt_rec
-
-Fixed parallel issue:
-libtool: link: `bt_rec.lo' is not a valid libtool object
-Makefile:867: recipe for target 'libdb-6.0.la' failed
-make: *** [libdb-6.0.la] Error 1
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- Makefile.in |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: db-6.0.30/dist/Makefile.in
-===================================================================
---- db-6.0.30.orig/dist/Makefile.in
-+++ db-6.0.30/dist/Makefile.in
-@@ -863,7 +863,7 @@ $(libdb_version): $(C_OBJS)
- 	$(LN) -s $(libdb_version) $(libdb)
- 
- # Shared C library.
--$(libso_target): $(C_OBJS)
-+$(libso_target): $(C_OBJS) bt_rec@o@
- 	$(SOLINK) $(SOFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) \
- 		$(LIBCSO_LIBS)
- 	$(RM) $(libdb)
diff --git a/meta/recipes-support/db/db_5.3.28.bb b/meta/recipes-support/db/db_5.3.28.bb
index 0b51a1d4403..4f5aae60132 100644
--- a/meta/recipes-support/db/db_5.3.28.bb
+++ b/meta/recipes-support/db/db_5.3.28.bb
@@ -16,6 +16,7 @@ VIRTUAL_NAME ?= "virtual/db"
 RCONFLICTS_${PN} = "db3"
 
 PR = "r1"
+PE = "1"
 
 SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz"
 SRC_URI += "file://arm-thumb-mutex_db5.patch \
diff --git a/meta/recipes-support/db/db_6.0.35.bb b/meta/recipes-support/db/db_6.0.35.bb
deleted file mode 100644
index b1bec0e4875..00000000000
--- a/meta/recipes-support/db/db_6.0.35.bb
+++ /dev/null
@@ -1,111 +0,0 @@
-# Version 6 of the Berkeley DB from Oracle (formerly Sleepycat)
-#
-# At present this package only installs the DB code
-# itself (shared libraries, .a in the dev package),
-# documentation and headers.
-#
-# The headers have the same names as those as v3
-# of the DB, only one version can be used *for dev*
-# at once - DB3 and DB6 can both be installed on the
-# same system at the same time if really necessary.
-SECTION = "libs"
-SUMMARY = "Berkeley Database v6"
-HOMEPAGE = "http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
-LICENSE = "AGPL-3.0"
-VIRTUAL_NAME ?= "virtual/db"
-RCONFLICTS_${PN} = "db3"
-
-PR = "r1"
-
-# Note, when upgraded to 6.1.x, a patch in RPM will need to be removed to activate db 6.1 support.
-SRC_URI = "http://distfiles.gentoo.org/distfiles/db-${PV}.tar.gz \
-           file://arm-thumb-mutex_db5.patch \
-           file://fix-parallel-build.patch \
-           file://Makefile-let-libso_target-depend-on-bt_rec.patch \
-           file://Makefile-let-libdb-6.0.la-depend-os_map.l.patch \
-           "
-
-SRC_URI[md5sum] = "c65a4d3e930a116abaaf69edfc697f25"
-SRC_URI[sha256sum] = "24421affa8ae436fe427ae4f5f2d1634da83d3d55a5ad6354a98eeedb825de55"
-
-# Exclude NC versions which lack AES encryption
-UPSTREAM_CHECK_REGEX = "db-(?P<pver>\d+\.\d+(\.\d+)?).tar"
-UPSTREAM_CHECK_URI = "http://www.oracle.com/technetwork/products/berkeleydb/downloads/index-082944.html"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=1ec8b0b17cc31513fe35ab10716f8490"
-
-# Put virtual/db in any appropriate provider of a
-# relational database, use it as a dependency in
-# place of a specific db and use:
-#
-# PREFERRED_PROVIDER_virtual/db
-#
-# to select the correct db in the build (distro) .conf
-PROVIDES += "${VIRTUAL_NAME}"
-
-inherit autotools
-
-# The executables go in a separate package - typically there
-# is no need to install these unless doing real database
-# management on the system.
-inherit lib_package
-
-PACKAGES =+ "${PN}-cxx"
-FILES_${PN}-cxx = "${libdir}/*cxx*so"
-
-# The dev package has the .so link (as in db3) and the .a's -
-# it is therefore incompatible (cannot be installed at the
-# same time) as the db3 package
-# sort out the .so since they do version prior to the .so
-SOLIBS = "-6*.so"
-FILES_SOLIBSDEV = "${libdir}/libdb.so ${libdir}/libdb_cxx.so"
-
-#configuration - set in local.conf to override
-# All the --disable-* options replace --enable-smallbuild, which breaks a bunch of stuff (eg. postfix)
-DB6_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-verify --disable-compat185 --disable-sql"
-
-EXTRA_OECONF = "${DB6_CONFIG} --enable-shared --enable-cxx --with-sysroot"
-
-# Cancel the site stuff - it's set for db3 and destroys the configure.
-CONFIG_SITE = ""
-
-AUTOTOOLS_SCRIPT_PATH = "${S}/dist"
-
-do_configure() {
-	cd ${B}
-	gnu-configize --force ${AUTOTOOLS_SCRIPT_PATH}
-	oe_runconf
-}
-
-EXTRA_OEMAKE_append_class-target = " LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool"
-EXTRA_OEMAKE += "STRIP=true docdir=${docdir}/db/"
-
-do_compile_prepend() {
-	# Stop libtool adding RPATHs
-	sed -i -e 's|hardcode_into_libs=yes|hardcode_into_libs=no|' ${B}/libtool
-}
-
-do_install_append() {
-	mkdir -p ${D}/${includedir}/db60
-	mv ${D}/${includedir}/db.h ${D}/${includedir}/db60/.
-	mv ${D}/${includedir}/db_cxx.h ${D}/${includedir}/db60/.
-	ln -s db60/db.h ${D}/${includedir}/db.h
-	ln -s db60/db_cxx.h ${D}/${includedir}/db_cxx.h
-
-	# Prune the documentation to remove large (PDF) or pointless (Java) files.
-	find ${D}${docdir} -name *.pdf -delete
-	rm -rf ${D}${docdir}/db/java
-	rm -rf ${D}${docdir}/db/csharp
-
-	# The makefiles use cp -p, so we need to chmod until that is fixed.
-	chown -R root:root ${D}
-}
-
-# libdb isn't versioned in the typical manner (libdb-6.0.so is the full library
-# name) so skip these checks.
-INSANE_SKIP_${PN} = "dev-so"
-INSANE_SKIP_${PN}-cxx = "dev-so"
-
-BBCLASSEXTEND = "native nativesdk"
-
-RECIPE_NO_UPDATE_REASON = "latest db does not work with RPM-5.x due to changes in locking semantics"
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 17/44] package_rpm.bbclass: make architecture-independent .rpm packages "noarch" instead of "all"
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (15 preceding siblings ...)
  2017-03-10 11:23 ` [PATCH 16/44] db: remove the 6.x recipe Alexander Kanavin
@ 2017-03-10 11:23 ` Alexander Kanavin
  2017-03-10 11:23 ` [PATCH 18/44] package_manager.py: improve the API for insert_feed_uris() Alexander Kanavin
                   ` (27 subsequent siblings)
  44 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:23 UTC (permalink / raw)
  To: openembedded-core

Too many places in dnf/rpm4 stack make that assumption; let's not fight against it.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/classes/package_rpm.bbclass | 4 +++-
 meta/classes/sstate.bbclass      | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index db448ab8d1d..07eb974f736 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -684,7 +684,9 @@ python do_package_rpm () {
     rpmbuild = d.getVar('RPMBUILD')
     targetsys = d.getVar('TARGET_SYS')
     targetvendor = d.getVar('HOST_VENDOR')
-    package_arch = (d.getVar('PACKAGE_ARCH') or "").replace("-", "_")
+    # Too many places in dnf stack assume that arch-independent packages are "noarch".
+    # Let's not fight against this.
+    package_arch = (d.getVar('PACKAGE_ARCH') or "").replace("-", "_").replace("all", "noarch")
     sdkpkgsuffix = (d.getVar('SDKPKGSUFFIX') or "nativesdk").replace("-", "_")
     if package_arch not in "all any noarch".split() and not package_arch.endswith(sdkpkgsuffix):
         ml_prefix = (d.getVar('MLPREFIX') or "").replace("-", "_")
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 23dda082ca4..b7d8e610f07 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -25,7 +25,7 @@ PV[vardepvalue] = "${PV}"
 SSTATE_EXTRAPATH[vardepvalue] = ""
 
 # For multilib rpm the allarch packagegroup files can overwrite (in theory they're identical)
-SSTATE_DUPWHITELIST = "${DEPLOY_DIR_IMAGE}/ ${DEPLOY_DIR}/licenses/ ${DEPLOY_DIR_RPM}/all/"
+SSTATE_DUPWHITELIST = "${DEPLOY_DIR_IMAGE}/ ${DEPLOY_DIR}/licenses/ ${DEPLOY_DIR_RPM}/noarch/"
 # Avoid docbook/sgml catalog warnings for now
 SSTATE_DUPWHITELIST += "${STAGING_ETCDIR_NATIVE}/sgml ${STAGING_DATADIR_NATIVE}/sgml"
 # Archive the sources for many architectures in one deploy folder
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 18/44] package_manager.py: improve the API for insert_feed_uris()
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (16 preceding siblings ...)
  2017-03-10 11:23 ` [PATCH 17/44] package_rpm.bbclass: make architecture-independent .rpm packages "noarch" instead of "all" Alexander Kanavin
@ 2017-03-10 11:23 ` Alexander Kanavin
  2017-03-10 11:23 ` [PATCH 19/44] package_rpm.bbclass: correctly map RRECOMMENDS and RSUGGESTS to rpm tags Alexander Kanavin
                   ` (26 subsequent siblings)
  44 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:23 UTC (permalink / raw)
  To: openembedded-core

No need to store the configuration as class members,
just pass it directly into the method.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/lib/oe/package_manager.py | 41 ++++++++++++++++++++++-------------------
 meta/lib/oe/rootfs.py          |  5 ++++-
 2 files changed, 26 insertions(+), 20 deletions(-)

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 79f0a8b9f1b..725997ce334 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -513,9 +513,6 @@ class PackageManager(object, metaclass=ABCMeta):
         self.d = d
         self.deploy_dir = None
         self.deploy_lock = None
-        self.feed_uris = self.d.getVar('PACKAGE_FEED_URIS') or ""
-        self.feed_base_paths = self.d.getVar('PACKAGE_FEED_BASE_PATHS') or ""
-        self.feed_archs = self.d.getVar('PACKAGE_FEED_ARCHS')
 
     """
     Update the package manager package database.
@@ -555,8 +552,14 @@ class PackageManager(object, metaclass=ABCMeta):
     def list_installed(self):
         pass
 
+    """
+    Add remote package feeds into repository manager configuration. The parameters
+    for the feeds are set by feed_uris, feed_base_paths and feed_archs.
+    See http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-PACKAGE_FEED_URIS
+    for their description.
+    """
     @abstractmethod
-    def insert_feeds_uris(self):
+    def insert_feeds_uris(self, feed_uris, feed_base_paths, feed_archs):
         pass
 
     """
@@ -691,14 +694,14 @@ class RpmPM(PackageManager):
 
         self.ml_prefix_list, self.ml_os_list = self.indexer.get_ml_prefix_and_os_list(arch_var, os_var)
 
-    def insert_feeds_uris(self):
-        if self.feed_uris == "":
+    def insert_feeds_uris(self, feed_uris, feed_base_paths, feed_archs):
+        if feed_uris == "":
             return
 
         arch_list = []
-        if self.feed_archs is not None:
+        if feed_archs is not None:
             # User define feed architectures
-            arch_list = self.feed_archs.split()
+            arch_list = feed_archs.split()
         else:
             # List must be prefered to least preferred order
             default_platform_extra = list()
@@ -721,7 +724,7 @@ class RpmPM(PackageManager):
                     continue
                 arch_list.append(arch)
 
-        feed_uris = self.construct_uris(self.feed_uris.split(), self.feed_base_paths.split())
+        feed_uris = self.construct_uris(feed_uris.split(), feed_base_paths.split())
 
         uri_iterator = 0
         channel_priority = 10 + 5 * len(feed_uris) * (len(arch_list) if arch_list else 1)
@@ -1707,22 +1710,22 @@ class OpkgPM(OpkgDpkgPM):
                 config_file.write("option info_dir     %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'info'))
                 config_file.write("option status_file  %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'status'))
 
-    def insert_feeds_uris(self):
-        if self.feed_uris == "":
+    def insert_feeds_uris(self, feed_uris, feed_base_paths, feed_archs):
+        if feed_uris == "":
             return
 
         rootfs_config = os.path.join('%s/etc/opkg/base-feeds.conf'
                                   % self.target_rootfs)
 
-        feed_uris = self.construct_uris(self.feed_uris.split(), self.feed_base_paths.split())
-        archs = self.pkg_archs.split() if self.feed_archs is None else self.feed_archs.split()
+        feed_uris = self.construct_uris(feed_uris.split(), feed_base_paths.split())
+        archs = self.pkg_archs.split() if feed_archs is None else feed_archs.split()
 
         with open(rootfs_config, "w+") as config_file:
             uri_iterator = 0
             for uri in feed_uris:
                 if archs:
                     for arch in archs:
-                        if (self.feed_archs is None) and (not os.path.exists(os.path.join(self.deploy_dir, arch))):
+                        if (feed_archs is None) and (not os.path.exists(os.path.join(self.deploy_dir, arch))):
                             continue
                         bb.note('Adding opkg feed url-%s-%d (%s)' %
                             (arch, uri_iterator, uri))
@@ -2111,23 +2114,23 @@ class DpkgPM(OpkgDpkgPM):
         if result is not None:
             bb.fatal(result)
 
-    def insert_feeds_uris(self):
-        if self.feed_uris == "":
+    def insert_feeds_uris(self, feed_uris, feed_base_paths, feed_archs):
+        if feed_uris == "":
             return
 
         sources_conf = os.path.join("%s/etc/apt/sources.list"
                                     % self.target_rootfs)
         arch_list = []
 
-        if self.feed_archs is None:
+        if feed_archs is None:
             for arch in self.all_arch_list:
                 if not os.path.exists(os.path.join(self.deploy_dir, arch)):
                     continue
                 arch_list.append(arch)
         else:
-            arch_list = self.feed_archs.split()
+            arch_list = feed_archs.split()
 
-        feed_uris = self.construct_uris(self.feed_uris.split(), self.feed_base_paths.split())
+        feed_uris = self.construct_uris(feed_uris.split(), feed_base_paths.split())
 
         with open(sources_conf, "w+") as sources_file:
             for uri in feed_uris:
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index cc111ff3c88..74c643b3b98 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -87,7 +87,10 @@ class Rootfs(object, metaclass=ABCMeta):
     def _insert_feed_uris(self):
         if bb.utils.contains("IMAGE_FEATURES", "package-management",
                          True, False, self.d):
-            self.pm.insert_feeds_uris()
+            self.pm.insert_feeds_uris(self.d.getVar('PACKAGE_FEED_URIS') or "",
+                self.d.getVar('PACKAGE_FEED_BASE_PATHS') or "",
+                self.d.getVar('PACKAGE_FEED_ARCHS'))
+
 
     @abstractmethod
     def _handle_intercept_failure(self, failed_script):
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 19/44] package_rpm.bbclass: correctly map RRECOMMENDS and RSUGGESTS to rpm tags
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (17 preceding siblings ...)
  2017-03-10 11:23 ` [PATCH 18/44] package_manager.py: improve the API for insert_feed_uris() Alexander Kanavin
@ 2017-03-10 11:23 ` Alexander Kanavin
  2017-03-10 16:41   ` Mark Hatle
  2017-03-10 11:23 ` [PATCH 20/44] nativesdk-packagegroup-sdk-host: replace smartpm with dnf Alexander Kanavin
                   ` (25 subsequent siblings)
  44 siblings, 1 reply; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:23 UTC (permalink / raw)
  To: openembedded-core

Previously they were swapped, not sure why. Their meaning, as far as rpm
world goes, is different:

- Recommends is a soft dependency and will be installed by default; there is
an option not to do that.

- Suggests is a suggestion to be picked up and presented to end user by
package management tools; it has no special meaning otherwise.

OE packages use RRECOMMENDS, which should be mapped to Recommends rpm tag,
so that the packages will be picked up as dependencies.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/classes/package_rpm.bbclass | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 07eb974f736..480c6d58d39 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -450,10 +450,8 @@ python write_specfile () {
         if splitrpostrm:
             print_deps(splitrdepends, "Requires(postun)", spec_preamble_bottom, d)
 
-        # Suggests in RPM are like recommends in OE-core!
-        print_deps(splitrrecommends, "Suggests", spec_preamble_bottom, d)
-        # While there is no analog for suggests... (So call them recommends for now)
-        print_deps(splitrsuggests,  "Recommends", spec_preamble_bottom, d)
+        print_deps(splitrrecommends, "Recommends", spec_preamble_bottom, d)
+        print_deps(splitrsuggests,  "Suggests", spec_preamble_bottom, d)
         print_deps(splitrprovides,  "Provides", spec_preamble_bottom, d)
         print_deps(splitrobsoletes, "Obsoletes", spec_preamble_bottom, d)
 
@@ -560,10 +558,8 @@ python write_specfile () {
     if srcrpostrm:
         print_deps(srcrdepends, "Requires(postun)", spec_preamble_top, d)
 
-    # Suggests in RPM are like recommends in OE-core!
-    print_deps(srcrrecommends, "Suggests", spec_preamble_top, d)
-    # While there is no analog for suggests... (So call them recommends for now)
-    print_deps(srcrsuggests, "Recommends", spec_preamble_top, d)
+    print_deps(srcrrecommends, "Recommends", spec_preamble_top, d)
+    print_deps(srcrsuggests, "Suggests", spec_preamble_top, d)
     print_deps(srcrprovides, "Provides", spec_preamble_top, d)
     print_deps(srcrobsoletes, "Obsoletes", spec_preamble_top, d)
     
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 20/44] nativesdk-packagegroup-sdk-host: replace smartpm with dnf
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (18 preceding siblings ...)
  2017-03-10 11:23 ` [PATCH 19/44] package_rpm.bbclass: correctly map RRECOMMENDS and RSUGGESTS to rpm tags Alexander Kanavin
@ 2017-03-10 11:23 ` Alexander Kanavin
  2017-03-10 11:24 ` [PATCH 21/44] rootfs_rpm.bbclass: migrate image creation to dnf Alexander Kanavin
                   ` (24 subsequent siblings)
  44 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:23 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb      | 2 +-
 meta/recipes-devtools/dnf/dnf_git.bb                                    | 1 -
 meta/recipes-devtools/libcomps/libcomps_git.bb                          | 2 +-
 meta/recipes-devtools/libdnf/libdnf_git.bb                              | 2 +-
 meta/recipes-devtools/librepo/librepo_git.bb                            | 2 +-
 .../recipes-devtools/python-backports-lzma/python-backports-lzma_git.bb | 2 +-
 meta/recipes-devtools/python/python-iniparse_0.4.bb                     | 2 +-
 meta/recipes-devtools/python/python-pygpgme_0.3.bb                      | 2 +-
 meta/recipes-devtools/rpm/rpm_git.bb                                    | 2 +-
 meta/recipes-gnome/gtk-doc/gtk-doc_1.25.bb                              | 2 +-
 meta/recipes-support/gpgme/gpgme_1.8.0.bb                               | 2 +-
 meta/recipes-support/libassuan/libassuan_2.4.3.bb                       | 2 +-
 meta/recipes-support/libcheck/libcheck_0.10.0.bb                        | 1 +
 13 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
index 2c2abed33cd..3283e7370e8 100644
--- a/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
+++ b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
@@ -22,7 +22,7 @@ RDEPENDS_${PN} = "\
     nativesdk-automake \
     nativesdk-shadow \
     nativesdk-makedevs \
-    nativesdk-smartpm \
+    nativesdk-dnf \
     nativesdk-postinst-intercept \
     ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'nativesdk-wayland', '', d)} \
     "
diff --git a/meta/recipes-devtools/dnf/dnf_git.bb b/meta/recipes-devtools/dnf/dnf_git.bb
index ff22d6f5f0d..018352a6c9b 100644
--- a/meta/recipes-devtools/dnf/dnf_git.bb
+++ b/meta/recipes-devtools/dnf/dnf_git.bb
@@ -28,7 +28,6 @@ DEPENDS += "python-backports-lzma"
 EXTRA_OECMAKE = " -DWITH_MAN=0 -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR}"
 
 BBCLASSEXTEND = "native nativesdk"
-
 RDEPENDS_${PN}_class-target += "python-core python-codecs python-netclient python-email python-threading python-distutils librepo python-shell python-subprocess libcomps libdnf python-sqlite3 python-compression python-pygpgme python-backports-lzma python-rpm python-iniparse python-json python-importlib python-curses python-argparse"
 
 # Direct dnf-native to read rpm configuration from our sysroot, not the one it was compiled in
diff --git a/meta/recipes-devtools/libcomps/libcomps_git.bb b/meta/recipes-devtools/libcomps/libcomps_git.bb
index 448ea62f67c..8ff13b26b62 100644
--- a/meta/recipes-devtools/libcomps/libcomps_git.bb
+++ b/meta/recipes-devtools/libcomps/libcomps_git.bb
@@ -19,5 +19,5 @@ DEPENDS = "libxml2 expat libcheck"
 EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR}"
 OECMAKE_SOURCEPATH = "${S}/libcomps"
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
 
diff --git a/meta/recipes-devtools/libdnf/libdnf_git.bb b/meta/recipes-devtools/libdnf/libdnf_git.bb
index 681c0029c5f..6e9cfcc8627 100644
--- a/meta/recipes-devtools/libdnf/libdnf_git.bb
+++ b/meta/recipes-devtools/libdnf/libdnf_git.bb
@@ -36,5 +36,5 @@ EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DWITH_MAN=OFF
 EXTRA_OECMAKE_append_class-native = " -DWITH_GIR=OFF"
 EXTRA_OECMAKE_append_class-nativesdk = " -DWITH_GIR=OFF"
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
 
diff --git a/meta/recipes-devtools/librepo/librepo_git.bb b/meta/recipes-devtools/librepo/librepo_git.bb
index 70e88c47b9e..3f3c5fbcf51 100644
--- a/meta/recipes-devtools/librepo/librepo_git.bb
+++ b/meta/recipes-devtools/librepo/librepo_git.bb
@@ -20,5 +20,5 @@ inherit cmake distutils-base pkgconfig
 
 EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR}"
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
 
diff --git a/meta/recipes-devtools/python-backports-lzma/python-backports-lzma_git.bb b/meta/recipes-devtools/python-backports-lzma/python-backports-lzma_git.bb
index 6d3b8d569de..93c6684be6c 100644
--- a/meta/recipes-devtools/python-backports-lzma/python-backports-lzma_git.bb
+++ b/meta/recipes-devtools/python-backports-lzma/python-backports-lzma_git.bb
@@ -18,4 +18,4 @@ DEPENDS_append = " xz"
 RDEPENDS_${PN} += "python-core python-io python-pkgutil"
 RDEPENDS_${PN}_class-native += "python-core"
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/python/python-iniparse_0.4.bb b/meta/recipes-devtools/python/python-iniparse_0.4.bb
index f2515759b13..c6d98c2fdfc 100644
--- a/meta/recipes-devtools/python/python-iniparse_0.4.bb
+++ b/meta/recipes-devtools/python/python-iniparse_0.4.bb
@@ -12,6 +12,6 @@ inherit distutils
 
 RDEPENDS_${PN} += "python-core"
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
 
 S = "${WORKDIR}/iniparse-${PV}"
diff --git a/meta/recipes-devtools/python/python-pygpgme_0.3.bb b/meta/recipes-devtools/python/python-pygpgme_0.3.bb
index f7dd835eee9..ac8bc9d62e7 100644
--- a/meta/recipes-devtools/python/python-pygpgme_0.3.bb
+++ b/meta/recipes-devtools/python/python-pygpgme_0.3.bb
@@ -15,4 +15,4 @@ DEPENDS = "gpgme python"
 
 RDEPENDS_${PN} += "python-core"
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/rpm/rpm_git.bb b/meta/recipes-devtools/rpm/rpm_git.bb
index 22a4e71a806..c71a41064c1 100644
--- a/meta/recipes-devtools/rpm/rpm_git.bb
+++ b/meta/recipes-devtools/rpm/rpm_git.bb
@@ -60,7 +60,7 @@ EXTRA_OECONF_append_libc-musl = " --disable-nls"
 # Also disable plugins, so that rpm doesn't attempt to inhibit shutdown via session dbus
 EXTRA_OECONF_append_class-native = " --sysconfdir=/etc --localstatedir=/var --disable-plugins"
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
 
 # Direct rpm-native to read configuration from our sysroot, not the one it was compiled in
 # libmagic also has sysroot path contamination, so override it
diff --git a/meta/recipes-gnome/gtk-doc/gtk-doc_1.25.bb b/meta/recipes-gnome/gtk-doc/gtk-doc_1.25.bb
index 6af996e3593..7de36ae9e52 100644
--- a/meta/recipes-gnome/gtk-doc/gtk-doc_1.25.bb
+++ b/meta/recipes-gnome/gtk-doc/gtk-doc_1.25.bb
@@ -29,7 +29,7 @@ SRC_URI_append_class-native = " file://pkg-config-native.patch"
 SRC_URI[archive.md5sum] = "0dc6570953112a464a409fb99258ccbc"
 SRC_URI[archive.sha256sum] = "1ea46ed400e6501f975acaafea31479cea8f32f911dca4dff036f59e6464fd42"
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
 
 # Do not check for XML catalogs when building because that
 # information is not used for anything during build. Recipe
diff --git a/meta/recipes-support/gpgme/gpgme_1.8.0.bb b/meta/recipes-support/gpgme/gpgme_1.8.0.bb
index 728e247a185..86922f6fd98 100644
--- a/meta/recipes-support/gpgme/gpgme_1.8.0.bb
+++ b/meta/recipes-support/gpgme/gpgme_1.8.0.bb
@@ -45,7 +45,7 @@ inherit autotools texinfo binconfig-disabled pkgconfig ${PYTHON_INHERIT}
 
 export PKG_CONFIG='pkg-config'
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
 
 PACKAGES =+ "${PN}-cpp"
 PACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'python2-gpg ', '', d)}"
diff --git a/meta/recipes-support/libassuan/libassuan_2.4.3.bb b/meta/recipes-support/libassuan/libassuan_2.4.3.bb
index 1b3916d7343..926c279f90b 100644
--- a/meta/recipes-support/libassuan/libassuan_2.4.3.bb
+++ b/meta/recipes-support/libassuan/libassuan_2.4.3.bb
@@ -28,4 +28,4 @@ do_configure_prepend () {
 	rm -f ${S}/m4/*.m4
 }
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/libcheck/libcheck_0.10.0.bb b/meta/recipes-support/libcheck/libcheck_0.10.0.bb
index 9d34198a962..4db2d7528cc 100644
--- a/meta/recipes-support/libcheck/libcheck_0.10.0.bb
+++ b/meta/recipes-support/libcheck/libcheck_0.10.0.bb
@@ -20,5 +20,6 @@ CACHED_CONFIGUREVARS += "ac_cv_path_AWK_PATH=${bindir}/gawk"
 RREPLACES_${PN} = "check (<= 0.9.5)"
 RDEPENDS_${PN} += "gawk"
 RDEPENDS_${PN}_class-native = ""
+RDEPENDS_${PN}_class-nativesdk = ""
 
 BBCLASSEXTEND = "native nativesdk"
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 21/44] rootfs_rpm.bbclass: migrate image creation to dnf
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (19 preceding siblings ...)
  2017-03-10 11:23 ` [PATCH 20/44] nativesdk-packagegroup-sdk-host: replace smartpm with dnf Alexander Kanavin
@ 2017-03-10 11:24 ` Alexander Kanavin
  2017-03-13 14:25   ` Burton, Ross
  2017-03-10 11:24 ` [PATCH 22/44] scripts/rpm2cpio.sh: replace 5.x version with 4.x version Alexander Kanavin
                   ` (23 subsequent siblings)
  44 siblings, 1 reply; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:24 UTC (permalink / raw)
  To: openembedded-core

To properly look at this patch, you probably need a side-by-side diff viewing tool.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/classes/rootfs_rpm.bbclass |   21 +-
 meta/lib/oe/package_manager.py  | 1192 ++++++++-------------------------------
 meta/lib/oe/rootfs.py           |   18 +-
 meta/lib/oe/sdk.py              |    7 +-
 4 files changed, 239 insertions(+), 999 deletions(-)

diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index b8ff4cb7b6a..65881a60a7b 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -2,20 +2,23 @@
 # Creates a root filesystem out of rpm packages
 #
 
-ROOTFS_PKGMANAGE = "rpm smartpm"
+ROOTFS_PKGMANAGE = "rpm dnf"
 ROOTFS_PKGMANAGE_BOOTSTRAP = "run-postinsts"
 
-# Add 100Meg of extra space for Smart
-IMAGE_ROOTFS_EXTRA_SPACE_append = "${@bb.utils.contains("PACKAGE_INSTALL", "smartpm", " + 102400", "" ,d)}"
+# dnf is using our custom distutils, and so will fail without these
+export STAGING_INCDIR
+export STAGING_LIBDIR
 
-# Smart is python based, so be sure python-native is available to us.
+# Add 100Meg of extra space for dnf
+IMAGE_ROOTFS_EXTRA_SPACE_append = "${@bb.utils.contains("PACKAGE_INSTALL", "dnf", " + 102400", "" ,d)}"
+
+# Dnf is python based, so be sure python-native is available to us.
 EXTRANATIVEPATH += "python-native"
 
 # opkg is needed for update-alternatives
 RPMROOTFSDEPENDS = "rpm-native:do_populate_sysroot \
-    rpmresolve-native:do_populate_sysroot \
-    python-smartpm-native:do_populate_sysroot \
-    createrepo-native:do_populate_sysroot \
+    dnf-native:do_populate_sysroot \
+    createrepo-c-native:do_populate_sysroot \
     opkg-native:do_populate_sysroot"
 
 do_rootfs[depends] += "${RPMROOTFSDEPENDS}"
@@ -35,7 +38,3 @@ python () {
         d.setVar('RPM_POSTPROCESS_COMMANDS', '')
 
 }
-# Smart is python based, so be sure python-native is available to us.
-EXTRANATIVEPATH += "python-native"
-
-rpmlibdir = "/var/lib/rpm"
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 725997ce334..d51609189d0 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -102,109 +102,14 @@ class Indexer(object, metaclass=ABCMeta):
 
 
 class RpmIndexer(Indexer):
-    def get_ml_prefix_and_os_list(self, arch_var=None, os_var=None):
-        package_archs = collections.OrderedDict()
-        target_os = collections.OrderedDict()
-
-        if arch_var is not None and os_var is not None:
-            package_archs['default'] = self.d.getVar(arch_var).split()
-            package_archs['default'].reverse()
-            target_os['default'] = self.d.getVar(os_var).strip()
-        else:
-            package_archs['default'] = self.d.getVar("PACKAGE_ARCHS").split()
-            # arch order is reversed.  This ensures the -best- match is
-            # listed first!
-            package_archs['default'].reverse()
-            target_os['default'] = self.d.getVar("TARGET_OS").strip()
-            multilibs = self.d.getVar('MULTILIBS') or ""
-            for ext in multilibs.split():
-                eext = ext.split(':')
-                if len(eext) > 1 and eext[0] == 'multilib':
-                    localdata = bb.data.createCopy(self.d)
-                    default_tune_key = "DEFAULTTUNE_virtclass-multilib-" + eext[1]
-                    default_tune = localdata.getVar(default_tune_key, False)
-                    if default_tune is None:
-                        default_tune_key = "DEFAULTTUNE_ML_" + eext[1]
-                        default_tune = localdata.getVar(default_tune_key, False)
-                    if default_tune:
-                        localdata.setVar("DEFAULTTUNE", default_tune)
-                        package_archs[eext[1]] = localdata.getVar('PACKAGE_ARCHS').split()
-                        package_archs[eext[1]].reverse()
-                        target_os[eext[1]] = localdata.getVar("TARGET_OS").strip()
-
-        ml_prefix_list = collections.OrderedDict()
-        for mlib in package_archs:
-            if mlib == 'default':
-                ml_prefix_list[mlib] = package_archs[mlib]
-            else:
-                ml_prefix_list[mlib] = list()
-                for arch in package_archs[mlib]:
-                    if arch in ['all', 'noarch', 'any']:
-                        ml_prefix_list[mlib].append(arch)
-                    else:
-                        ml_prefix_list[mlib].append(mlib + "_" + arch)
-
-        return (ml_prefix_list, target_os)
-
     def write_index(self):
-        sdk_pkg_archs = (self.d.getVar('SDK_PACKAGE_ARCHS') or "").replace('-', '_').split()
-        all_mlb_pkg_archs = (self.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS') or "").replace('-', '_').split()
-
-        mlb_prefix_list = self.get_ml_prefix_and_os_list()[0]
-
-        archs = set()
-        for item in mlb_prefix_list:
-            archs = archs.union(set(i.replace('-', '_') for i in mlb_prefix_list[item]))
-
-        if len(archs) == 0:
-            archs = archs.union(set(all_mlb_pkg_archs))
-
-        archs = archs.union(set(sdk_pkg_archs))
-
-        rpm_createrepo = bb.utils.which(os.environ['PATH'], "createrepo")
-        if not rpm_createrepo:
-            bb.error("Cannot rebuild index as createrepo was not found in %s" % os.environ['PATH'])
-            return
-
         if self.d.getVar('PACKAGE_FEED_SIGN') == '1':
-            signer = get_signer(self.d, self.d.getVar('PACKAGE_FEED_GPG_BACKEND'))
-        else:
-            signer = None
-        index_cmds = []
-        repomd_files = []
-        rpm_dirs_found = False
-        for arch in archs:
-            dbpath = os.path.join(self.d.getVar('WORKDIR'), 'rpmdb', arch)
-            if os.path.exists(dbpath):
-                bb.utils.remove(dbpath, True)
-            arch_dir = os.path.join(self.deploy_dir, arch)
-            if not os.path.isdir(arch_dir):
-                continue
-
-            index_cmds.append("%s --dbpath %s --update -q %s" % \
-                             (rpm_createrepo, dbpath, arch_dir))
-            repomd_files.append(os.path.join(arch_dir, 'repodata', 'repomd.xml'))
-
-            rpm_dirs_found = True
-
-        if not rpm_dirs_found:
-            bb.note("There are no packages in %s" % self.deploy_dir)
-            return
+            raise NotImplementedError('Package feed signing not yet implementd for rpm')
 
-        # Create repodata
-        result = oe.utils.multiprocess_exec(index_cmds, create_index)
+        createrepo_c = bb.utils.which(os.environ['PATH'], "createrepo_c")
+        result = create_index("%s --update -q %s" % (createrepo_c, self.deploy_dir))
         if result:
-            bb.fatal('%s' % ('\n'.join(result)))
-        # Sign repomd
-        if signer:
-            for repomd in repomd_files:
-                feed_sig_type = self.d.getVar('PACKAGE_FEED_GPG_SIGNATURE_TYPE')
-                is_ascii_sig = (feed_sig_type.upper() != "BIN")
-                signer.detach_sign(repomd,
-                                   self.d.getVar('PACKAGE_FEED_GPG_NAME'),
-                                   self.d.getVar('PACKAGE_FEED_GPG_PASSPHRASE_FILE'),
-                                   armor=is_ascii_sig)
-
+            bb.fatal(result)
 
 class OpkgIndexer(Indexer):
     def write_index(self):
@@ -347,117 +252,9 @@ class PkgsList(object, metaclass=ABCMeta):
     def list_pkgs(self):
         pass
 
-
 class RpmPkgsList(PkgsList):
-    def __init__(self, d, rootfs_dir, arch_var=None, os_var=None):
-        super(RpmPkgsList, self).__init__(d, rootfs_dir)
-
-        self.rpm_cmd = bb.utils.which(os.getenv('PATH'), "rpm")
-        self.image_rpmlib = os.path.join(self.rootfs_dir, 'var/lib/rpm')
-
-        self.ml_prefix_list, self.ml_os_list = \
-            RpmIndexer(d, rootfs_dir).get_ml_prefix_and_os_list(arch_var, os_var)
-
-        # Determine rpm version
-        try:
-            output = subprocess.check_output([self.rpm_cmd, "--version"], stderr=subprocess.STDOUT).decode("utf-8")
-        except subprocess.CalledProcessError as e:
-            bb.fatal("Getting rpm version failed. Command '%s' "
-                     "returned %d:\n%s" % (self.rpm_cmd, e.returncode, e.output.decode("utf-8")))
-
-    '''
-    Translate the RPM/Smart format names to the OE multilib format names
-    '''
-    def _pkg_translate_smart_to_oe(self, pkg, arch):
-        new_pkg = pkg
-        new_arch = arch
-        fixed_arch = arch.replace('_', '-')
-        found = 0
-        for mlib in self.ml_prefix_list:
-            for cmp_arch in self.ml_prefix_list[mlib]:
-                fixed_cmp_arch = cmp_arch.replace('_', '-')
-                if fixed_arch == fixed_cmp_arch:
-                    if mlib == 'default':
-                        new_pkg = pkg
-                        new_arch = cmp_arch
-                    else:
-                        new_pkg = mlib + '-' + pkg
-                        # We need to strip off the ${mlib}_ prefix on the arch
-                        new_arch = cmp_arch.replace(mlib + '_', '')
-
-                    # Workaround for bug 3565. Simply look to see if we
-                    # know of a package with that name, if not try again!
-                    filename = os.path.join(self.d.getVar('PKGDATA_DIR'),
-                                            'runtime-reverse',
-                                            new_pkg)
-                    if os.path.exists(filename):
-                        found = 1
-                        break
-
-            if found == 1 and fixed_arch == fixed_cmp_arch:
-                break
-        #bb.note('%s, %s -> %s, %s' % (pkg, arch, new_pkg, new_arch))
-        return new_pkg, new_arch
-
-    def _list_pkg_deps(self):
-        cmd = [bb.utils.which(os.getenv('PATH'), "rpmresolve"),
-               "-t", self.image_rpmlib]
-
-        try:
-            output = subprocess.check_output(cmd, stderr=subprocess.STDOUT).strip().decode("utf-8")
-        except subprocess.CalledProcessError as e:
-            bb.fatal("Cannot get the package dependencies. Command '%s' "
-                     "returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
-
-        return output
-
     def list_pkgs(self):
-        cmd = [self.rpm_cmd, '--root', self.rootfs_dir]
-        cmd.extend(['-D', '_dbpath /var/lib/rpm'])
-        cmd.extend(['-qa', '--qf', '[%{NAME} %{ARCH} %{VERSION} %{PACKAGEORIGIN}\n]'])
-
-        try:
-            tmp_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT).strip().decode("utf-8")
-        except subprocess.CalledProcessError as e:
-            bb.fatal("Cannot get the installed packages list. Command '%s' "
-                     "returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
-
-        output = dict()
-        deps = dict()
-        dependencies = self._list_pkg_deps()
-
-        # Populate deps dictionary for better manipulation
-        for line in dependencies.splitlines():
-            try:
-                pkg, dep = line.split("|")
-                if not pkg in deps:
-                    deps[pkg] = list()
-                if not dep in deps[pkg]:
-                    deps[pkg].append(dep)
-            except:
-                # Ignore any other lines they're debug or errors
-                pass
-
-        for line in tmp_output.split('\n'):
-            if len(line.strip()) == 0:
-                continue
-            pkg = line.split()[0]
-            arch = line.split()[1]
-            ver = line.split()[2]
-            dep = deps.get(pkg, [])
-
-            # Skip GPG keys
-            if pkg == 'gpg-pubkey':
-                continue
-
-            pkgorigin = line.split()[3]
-            new_pkg, new_arch = self._pkg_translate_smart_to_oe(pkg, arch)
-
-            output[new_pkg] = {"arch":new_arch, "ver":ver,
-                        "filename":pkgorigin, "deps":dep}
-
-        return output
-
+        return RpmPM(self.d, self.rootfs_dir, self.d.getVar('TARGET_VENDOR')).list_installed()
 
 class OpkgPkgsList(PkgsList):
     def __init__(self, d, rootfs_dir, config_file):
@@ -553,6 +350,16 @@ class PackageManager(object, metaclass=ABCMeta):
         pass
 
     """
+    Returns the path to a tmpdir where resides the contents of a package.
+
+    Deleting the tmpdir is responsability of the caller.
+
+    """
+    @abstractmethod
+    def extract(self, pkg):
+        pass
+
+    """
     Add remote package feeds into repository manager configuration. The parameters
     for the feeds are set by feed_uris, feed_base_paths and feed_archs.
     See http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-PACKAGE_FEED_URIS
@@ -661,821 +468,264 @@ class RpmPM(PackageManager):
         self.target_rootfs = target_rootfs
         self.target_vendor = target_vendor
         self.task_name = task_name
-        self.providename = providename
-        self.fullpkglist = list()
-        self.deploy_dir = self.d.getVar('DEPLOY_DIR_RPM')
-        self.etcrpm_dir = os.path.join(self.target_rootfs, "etc/rpm")
-        self.install_dir_name = "oe_install"
-        self.install_dir_path = os.path.join(self.target_rootfs, self.install_dir_name)
-        self.rpm_cmd = bb.utils.which(os.getenv('PATH'), "rpm")
-        self.smart_cmd = bb.utils.which(os.getenv('PATH'), "smart")
-        # 0 = --log-level=warning, only warnings
-        # 1 = --log-level=info (includes information about executing scriptlets and their output), default
-        # 2 = --log-level=debug
-        # 3 = --log-level=debug plus dumps of scriplet content and command invocation
-        self.debug_level = int(d.getVar('ROOTFS_RPM_DEBUG') or "1")
-        self.smart_opt = ["--log-level=%s" %
-                         ("warning" if self.debug_level == 0 else
-                          "info" if self.debug_level == 1 else
-                          "debug"), "--data-dir=%s" %
-                          os.path.join(target_rootfs, 'var/lib/smart')]
-        self.scriptlet_wrapper = self.d.expand('${WORKDIR}/scriptlet_wrapper')
+        if arch_var == None:
+            self.archs = self.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS').replace("-","_")
+        else:
+            self.archs = self.d.getVar(arch_var).replace("-","_")
+        if task_name == "host":
+            self.primary_arch = self.d.getVar('SDK_ARCH')
+        else:
+            self.primary_arch = self.d.getVar('MACHINE_ARCH')
+
+        self.rpm_repo_dir = oe.path.join(self.d.getVar('WORKDIR'), "oe-rootfs-repo")
+        bb.utils.mkdirhier(self.rpm_repo_dir)
+        oe.path.symlink(self.d.getVar('DEPLOY_DIR_RPM'), oe.path.join(self.rpm_repo_dir, "rpm"), True)
+
+        self.saved_packaging_data = self.d.expand('${T}/saved_packaging_data/%s' % self.task_name)
+        if not os.path.exists(self.d.expand('${T}/saved_packaging_data')):
+            bb.utils.mkdirhier(self.d.expand('${T}/saved_packaging_data'))
+        self.packaging_data_dirs = ['var/lib/rpm', 'var/lib/dnf', 'var/cache/dnf']
         self.solution_manifest = self.d.expand('${T}/saved/%s_solution' %
                                                self.task_name)
-        self.saved_rpmlib = self.d.expand('${T}/saved/%s' % self.task_name)
-        self.image_rpmlib = os.path.join(self.target_rootfs, 'var/lib/rpm')
-
         if not os.path.exists(self.d.expand('${T}/saved')):
             bb.utils.mkdirhier(self.d.expand('${T}/saved'))
 
-        packageindex_dir = os.path.join(self.d.getVar('WORKDIR'), 'rpms')
-        self.indexer = RpmIndexer(self.d, packageindex_dir)
-        self.pkgs_list = RpmPkgsList(self.d, self.target_rootfs, arch_var, os_var)
+    def _configure_dnf(self):
+        # libsolv handles 'noarch' internally, we don't need to specify it explicitly
+        archs = [i for i in self.archs.split() if i not in ["any", "all", "noarch"]]
+        # This prevents accidental matching against libsolv's built-in policies
+        if len(archs) <= 1:
+            archs = archs + ["bogusarch"]
+        archconfdir = "%s/%s" %(self.target_rootfs, "etc/dnf/vars/")
+        bb.utils.mkdirhier(archconfdir)
+        open(archconfdir + "arch", 'w').write(":".join(archs))
+
+        open(oe.path.join(self.target_rootfs, "etc/dnf/dnf.conf"), 'w').write("")
+
+
+    def _configure_rpm(self):
+        # We need to configure rpm to use our primary package architecture as the installation architecture,
+        # and to make it compatible with other package architectures that we use.
+        # Otherwise it will refuse to proceed with packages installation.
+        platformconfdir = "%s/%s" %(self.target_rootfs, "etc/rpm/")
+        rpmrcconfdir = "%s/%s" %(self.target_rootfs, "etc/")
+        bb.utils.mkdirhier(platformconfdir)
+        open(platformconfdir + "platform", 'w').write("%s-pc-linux" % self.primary_arch)
+        open(rpmrcconfdir + "rpmrc", 'w').write("arch_compat: %s: %s\n" % (self.primary_arch, self.archs if len(self.archs) > 0 else self.primary_arch))
+
+        open(platformconfdir + "macros", 'w').write("%_transaction_color 7\n")
+        if self.d.getVar('RPM_PREFER_ELF_ARCH'):
+            open(platformconfdir + "macros", 'a').write("%%_prefer_color %s" % (self.d.getVar('RPM_PREFER_ELF_ARCH')))
+        else:
+            open(platformconfdir + "macros", 'a').write("%_prefer_color 7")
+
+        if self.d.getVar('RPM_SIGN_PACKAGES') == '1':
+            raise NotImplementedError("Signature verification with rpm not yet supported.")
+
+    def create_configs(self):
+        self._configure_dnf()
+        self._configure_rpm()
 
-        self.ml_prefix_list, self.ml_os_list = self.indexer.get_ml_prefix_and_os_list(arch_var, os_var)
+    def write_index(self):
+        lockfilename = self.d.getVar('DEPLOY_DIR_RPM') + "/rpm.lock"
+        lf = bb.utils.lockfile(lockfilename, False)
+        RpmIndexer(self.d, self.rpm_repo_dir).write_index()
+        bb.utils.unlockfile(lf)
 
     def insert_feeds_uris(self, feed_uris, feed_base_paths, feed_archs):
         if feed_uris == "":
             return
 
-        arch_list = []
-        if feed_archs is not None:
-            # User define feed architectures
-            arch_list = feed_archs.split()
-        else:
-            # List must be prefered to least preferred order
-            default_platform_extra = list()
-            platform_extra = list()
-            bbextendvariant = self.d.getVar('BBEXTENDVARIANT') or ""
-            for mlib in self.ml_os_list:
-                for arch in self.ml_prefix_list[mlib]:
-                    plt = arch.replace('-', '_') + '-.*-' + self.ml_os_list[mlib]
-                    if mlib == bbextendvariant:
-                        if plt not in default_platform_extra:
-                            default_platform_extra.append(plt)
-                    else:
-                        if plt not in platform_extra:
-                            platform_extra.append(plt)
-            platform_extra = default_platform_extra + platform_extra
-
-            for canonical_arch in platform_extra:
-                arch = canonical_arch.split('-')[0]
-                if not os.path.exists(os.path.join(self.deploy_dir, arch)):
-                    continue
-                arch_list.append(arch)
+        raise NotImplementedError("Adding remote dnf feeds not yet supported.")
 
-        feed_uris = self.construct_uris(feed_uris.split(), feed_base_paths.split())
+    def _prepare_pkg_transaction(self):
+        os.environ['D'] = self.target_rootfs
+        os.environ['OFFLINE_ROOT'] = self.target_rootfs
+        os.environ['IPKG_OFFLINE_ROOT'] = self.target_rootfs
+        os.environ['OPKG_OFFLINE_ROOT'] = self.target_rootfs
+        os.environ['INTERCEPT_DIR'] = oe.path.join(self.d.getVar('WORKDIR'),
+                                                   "intercept_scripts")
+        os.environ['NATIVE_ROOT'] = self.d.getVar('STAGING_DIR_NATIVE')
 
-        uri_iterator = 0
-        channel_priority = 10 + 5 * len(feed_uris) * (len(arch_list) if arch_list else 1)
-
-        for uri in feed_uris:
-            if arch_list:
-                for arch in arch_list:
-                    bb.note('Adding Smart channel url%d%s (%s)' %
-                            (uri_iterator, arch, channel_priority))
-                    self._invoke_smart(['channel', '--add', 'url%d-%s' % (uri_iterator, arch),
-                        'type=rpm-md', 'baseurl=%s/%s' % (uri, arch), '-y'])
-                    self._invoke_smart(['channel', '--set', 'url%d-%s' % (uri_iterator, arch),
-                        'priority=%d' % channel_priority])
-                    channel_priority -= 5
-            else:
-                bb.note('Adding Smart channel url%d (%s)' %
-                        (uri_iterator, channel_priority))
-                self._invoke_smart(['channel', '--add', 'url%d' % uri_iterator,
-                    'type=rpm-md', 'baseurl=%s' % uri, '-y'])
-                self._invoke_smart(['channel', '--set', 'url%d' % uri_iterator, 
-                    'priority=%d' % channel_priority])
-                channel_priority -= 5
 
-            uri_iterator += 1
+    def install(self, pkgs, attempt_only = False):
+        if len(pkgs) == 0:
+            return
+        self._prepare_pkg_transaction()
 
-    '''
-    Create configs for rpm and smart, and multilib is supported
-    '''
-    def create_configs(self):
-        target_arch = self.d.getVar('TARGET_ARCH')
-        platform = '%s%s-%s' % (target_arch.replace('-', '_'),
-                                self.target_vendor,
-                                self.ml_os_list['default'])
-
-        # List must be prefered to least preferred order
-        default_platform_extra = list()
-        platform_extra = list()
-        bbextendvariant = self.d.getVar('BBEXTENDVARIANT') or ""
-        for mlib in self.ml_os_list:
-            for arch in self.ml_prefix_list[mlib]:
-                plt = arch.replace('-', '_') + '-.*-' + self.ml_os_list[mlib]
-                if mlib == bbextendvariant:
-                    if plt not in default_platform_extra:
-                        default_platform_extra.append(plt)
-                else:
-                    if plt not in platform_extra:
-                        platform_extra.append(plt)
-        platform_extra = default_platform_extra + platform_extra
+        bad_recommendations = self.d.getVar('BAD_RECOMMENDATIONS')
+        package_exclude = self.d.getVar('PACKAGE_EXCLUDE')
+        exclude_pkgs = (bad_recommendations.split() if bad_recommendations else []) + (package_exlcude.split() if package_exclude else [])
 
-        self._create_configs(platform, platform_extra)
+        output = self._invoke_dnf((["--skip-broken"] if attempt_only else []) +
+                         (["-x", ",".join(exclude_pkgs)] if len(exclude_pkgs) > 0 else []) +
+                         (["--setopt=install_weak_deps=False"] if self.d.getVar('NO_RECOMMENDATIONS') == 1 else []) +
+                         ["--nogpgcheck", "install"] +
+                         pkgs)
 
-    #takes array args
-    def _invoke_smart(self, args):
-        cmd = [self.smart_cmd] + self.smart_opt + args
-        # bb.note(cmd)
-        try:
-            complementary_pkgs = subprocess.check_output(cmd,stderr=subprocess.STDOUT).decode("utf-8")
-            # bb.note(complementary_pkgs)
-            return complementary_pkgs
-        except subprocess.CalledProcessError as e:
-            bb.fatal("Could not invoke smart. Command "
-                     "'%s' returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
+        failed_scriptlets_pkgnames = collections.OrderedDict()
+        for line in output.splitlines():
+            if line.startswith("Non-fatal POSTIN scriptlet failure in rpm package"):
+                failed_scriptlets_pkgnames[line.split()[-1]] = True
 
-    def _search_pkg_name_in_feeds(self, pkg, feed_archs):
-        for arch in feed_archs:
-            arch = arch.replace('-', '_')
-            regex_match = re.compile(r"^%s-[^-]*-[^-]*@%s$" % \
-                (re.escape(pkg), re.escape(arch)))
-            for p in self.fullpkglist:
-                if regex_match.match(p) is not None:
-                    # First found is best match
-                    # bb.note('%s -> %s' % (pkg, pkg + '@' + arch))
-                    return pkg + '@' + arch
-
-        # Search provides if not found by pkgname.
-        bb.note('Not found %s by name, searching provides ...' % pkg)
-        cmd = [self.smart_cmd] + self.smart_opt + ["query", "--provides", pkg,
-                "--show-format=$name-$version"]
-        bb.note('cmd: %s' % ' '.join(cmd))
-        ps = subprocess.Popen(cmd, stdout=subprocess.PIPE)
-        try:
-            output = subprocess.check_output(["sed", "-ne", "s/ *Provides://p"],
-                stdin=ps.stdout, stderr=subprocess.STDOUT).decode("utf-8")
-            # Found a provider
-            if output:
-                bb.note('Found providers for %s: %s' % (pkg, output))
-                for p in output.split():
-                    for arch in feed_archs:
-                        arch = arch.replace('-', '_')
-                        if p.rstrip().endswith('@' + arch):
-                            return p
-        except subprocess.CalledProcessError as e:
-            bb.error("Failed running smart query on package %s." % pkg)
+        for pkg in failed_scriptlets_pkgnames.keys():
+            self.save_rpmpostinst(pkg)
 
-        return ""
+    def remove(self, pkgs, with_dependencies = True):
+        if len(pkgs) == 0:
+            return
+        self._prepare_pkg_transaction()
 
-    '''
-    Translate the OE multilib format names to the RPM/Smart format names
-    It searched the RPM/Smart format names in probable multilib feeds first,
-    and then searched the default base feed.
-    '''
-    def _pkg_translate_oe_to_smart(self, pkgs, attempt_only=False):
-        new_pkgs = list()
-
-        for pkg in pkgs:
-            new_pkg = pkg
-            # Search new_pkg in probable multilibs first
-            for mlib in self.ml_prefix_list:
-                # Jump the default archs
-                if mlib == 'default':
-                    continue
+        if with_dependencies:
+            self._invoke_dnf(["remove"] + pkgs)
+        else:
+            cmd = bb.utils.which(os.getenv('PATH'), "rpm")
+            args = ["-e", "--nodeps", "--root=%s" %self.target_rootfs]
 
-                subst = pkg.replace(mlib + '-', '')
-                # if the pkg in this multilib feed
-                if subst != pkg:
-                    feed_archs = self.ml_prefix_list[mlib]
-                    new_pkg = self._search_pkg_name_in_feeds(subst, feed_archs)
-                    if not new_pkg:
-                        # Failed to translate, package not found!
-                        err_msg = '%s not found in the %s feeds (%s) in %s.' % \
-                                  (pkg, mlib, " ".join(feed_archs), self.d.getVar('DEPLOY_DIR_RPM'))
-                        if not attempt_only:
-                            bb.error(err_msg)
-                            bb.fatal("This is often caused by an empty package declared " \
-                                     "in a recipe's PACKAGES variable. (Empty packages are " \
-                                     "not constructed unless ALLOW_EMPTY_<pkg> = '1' is used.)")
-                        bb.warn(err_msg)
-                    else:
-                        new_pkgs.append(new_pkg)
-
-                    break
-
-            # Apparently not a multilib package...
-            if pkg == new_pkg:
-                # Search new_pkg in default archs
-                default_archs = self.ml_prefix_list['default']
-                new_pkg = self._search_pkg_name_in_feeds(pkg, default_archs)
-                if not new_pkg:
-                    err_msg = '%s not found in the feeds (%s) in %s.' % \
-                                  (pkg, " ".join(default_archs), self.d.getVar('DEPLOY_DIR_RPM'))
-                    if not attempt_only:
-                        bb.error(err_msg)
-                        bb.fatal("This is often caused by an empty package declared " \
-                                 "in a recipe's PACKAGES variable. (Empty packages are " \
-                                 "not constructed unless ALLOW_EMPTY_<pkg> = '1' is used.)")
-                    bb.warn(err_msg)
-                else:
-                    new_pkgs.append(new_pkg)
-
-        return new_pkgs
-
-    def _create_configs(self, platform, platform_extra):
-        # Setup base system configuration
-        bb.note("configuring RPM platform settings")
-
-        # Configure internal RPM environment when using Smart
-        os.environ['RPM_ETCRPM'] = self.etcrpm_dir
-        bb.utils.mkdirhier(self.etcrpm_dir)
-
-        # Setup temporary directory -- install...
-        if os.path.exists(self.install_dir_path):
-            bb.utils.remove(self.install_dir_path, True)
-        bb.utils.mkdirhier(os.path.join(self.install_dir_path, 'tmp'))
-
-        channel_priority = 5
-        platform_dir = os.path.join(self.etcrpm_dir, "platform")
-        sdkos = self.d.getVar("SDK_OS")
-        with open(platform_dir, "w+") as platform_fd:
-            platform_fd.write(platform + '\n')
-            for pt in platform_extra:
-                channel_priority += 5
-                if sdkos:
-                    tmp = re.sub("-%s$" % sdkos, "-%s\n" % sdkos, pt)
-                tmp = re.sub("-linux.*$", "-linux.*\n", tmp)
-                platform_fd.write(tmp)
-
-        # Tell RPM that the "/" directory exist and is available
-        bb.note("configuring RPM system provides")
-        sysinfo_dir = os.path.join(self.etcrpm_dir, "sysinfo")
-        bb.utils.mkdirhier(sysinfo_dir)
-        with open(os.path.join(sysinfo_dir, "Dirnames"), "w+") as dirnames:
-            dirnames.write("/\n")
-
-        if self.providename:
-            providename_dir = os.path.join(sysinfo_dir, "Providename")
-            if not os.path.exists(providename_dir):
-                providename_content = '\n'.join(self.providename)
-                providename_content += '\n'
-                open(providename_dir, "w+").write(providename_content)
-
-        # Configure RPM... we enforce these settings!
-        bb.note("configuring RPM DB settings")
-        # After change the __db.* cache size, log file will not be
-        # generated automatically, that will raise some warnings,
-        # so touch a bare log for rpm write into it.
-        rpmlib_log = os.path.join(self.image_rpmlib, 'log', 'log.0000000001')
-        if not os.path.exists(rpmlib_log):
-            bb.utils.mkdirhier(os.path.join(self.image_rpmlib, 'log'))
-            open(rpmlib_log, 'w+').close()
-
-        DB_CONFIG_CONTENT = "# ================ Environment\n" \
-            "set_data_dir .\n" \
-            "set_create_dir .\n" \
-            "set_lg_dir ./log\n" \
-            "set_tmp_dir ./tmp\n" \
-            "set_flags db_log_autoremove on\n" \
-            "\n" \
-            "# -- thread_count must be >= 8\n" \
-            "set_thread_count 64\n" \
-            "\n" \
-            "# ================ Logging\n" \
-            "\n" \
-            "# ================ Memory Pool\n" \
-            "set_cachesize 0 1048576 0\n" \
-            "set_mp_mmapsize 268435456\n" \
-            "\n" \
-            "# ================ Locking\n" \
-            "set_lk_max_locks 16384\n" \
-            "set_lk_max_lockers 16384\n" \
-            "set_lk_max_objects 16384\n" \
-            "mutex_set_max 163840\n" \
-            "\n" \
-            "# ================ Replication\n"
-
-        db_config_dir = os.path.join(self.image_rpmlib, 'DB_CONFIG')
-        if not os.path.exists(db_config_dir):
-            open(db_config_dir, 'w+').write(DB_CONFIG_CONTENT)
-
-        # Create database so that smart doesn't complain (lazy init)
-        cmd = [self.rpm_cmd, '--root', self.target_rootfs, '--dbpath', '/var/lib/rpm', '-qa']
-        try:
-            subprocess.check_output(cmd, stderr=subprocess.STDOUT)
-        except subprocess.CalledProcessError as e:
-            bb.fatal("Create rpm database failed. Command '%s' "
-                     "returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
-        # Import GPG key to RPM database of the target system
-        if self.d.getVar('RPM_SIGN_PACKAGES') == '1':
-            pubkey_path = self.d.getVar('RPM_GPG_PUBKEY')
-            cmd = [self.rpm_cmd, '--root', self.target_rootfs, '--dbpath', '/var/lib/rpm', '--import', pubkey_path]
             try:
-                subprocess.check_output(cmd, stderr=subprocess.STDOUT)
+                output = subprocess.check_output([cmd] + args + pkgs, stderr=subprocess.STDOUT).decode("utf-8")
             except subprocess.CalledProcessError as e:
-                bb.fatal("Import GPG key failed. Command '%s' "
-                        "returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
-
-
-        # Configure smart
-        bb.note("configuring Smart settings")
-        bb.utils.remove(os.path.join(self.target_rootfs, 'var/lib/smart'),
-                        True)
-        self._invoke_smart(['config', '--set', 'rpm-root=%s' % self.target_rootfs])
-        self._invoke_smart(['config', '--set', 'rpm-dbpath=/var/lib/rpm'])
-        self._invoke_smart(['config', '--set', 'rpm-extra-macros._var=%s' %
-                           self.d.getVar('localstatedir')])
-        cmd = ["config", "--set", "rpm-extra-macros._tmppath=/%s/tmp" % self.install_dir_name]
-
-        prefer_color = self.d.getVar('RPM_PREFER_ELF_ARCH')
-        if prefer_color:
-            if prefer_color not in ['0', '1', '2', '4']:
-                bb.fatal("Invalid RPM_PREFER_ELF_ARCH: %s, it should be one of:\n"
-                        "\t1: ELF32 wins\n"
-                        "\t2: ELF64 wins\n"
-                        "\t4: ELF64 N32 wins (mips64 or mips64el only)" %
-                        prefer_color)
-            if prefer_color == "4" and self.d.getVar("TUNE_ARCH") not in \
-                                    ['mips64', 'mips64el']:
-                bb.fatal("RPM_PREFER_ELF_ARCH = \"4\" is for mips64 or mips64el "
-                         "only.")
-            self._invoke_smart(['config', '--set', 'rpm-extra-macros._prefer_color=%s'
-                        % prefer_color])
-
-        self._invoke_smart(cmd)
-        self._invoke_smart(['config', '--set', 'rpm-ignoresize=1'])
-
-        # Write common configuration for host and target usage
-        self._invoke_smart(['config', '--set', 'rpm-nolinktos=1'])
-        self._invoke_smart(['config', '--set', 'rpm-noparentdirs=1'])
-        check_signature = self.d.getVar('RPM_CHECK_SIGNATURES')
-        if check_signature and check_signature.strip() == "0":
-            self._invoke_smart(['config', '--set rpm-check-signatures=false'])
-        for i in self.d.getVar('BAD_RECOMMENDATIONS').split():
-            self._invoke_smart(['flag', '--set', 'ignore-recommends', i])
-
-        # Do the following configurations here, to avoid them being
-        # saved for field upgrade
-        if self.d.getVar('NO_RECOMMENDATIONS').strip() == "1":
-            self._invoke_smart(['config', '--set', 'ignore-all-recommends=1'])
-        pkg_exclude = self.d.getVar('PACKAGE_EXCLUDE') or ""
-        for i in pkg_exclude.split():
-            self._invoke_smart(['flag', '--set', 'exclude-packages', i])
-
-        # Optional debugging
-        # self._invoke_smart(['config', '--set', 'rpm-log-level=debug'])
-        # cmd = ['config', '--set', 'rpm-log-file=/tmp/smart-debug-logfile']
-        # self._invoke_smart(cmd)
-        ch_already_added = []
-        for canonical_arch in platform_extra:
-            arch = canonical_arch.split('-')[0]
-            arch_channel = os.path.join(self.d.getVar('WORKDIR'), 'rpms', arch)
-            oe.path.remove(arch_channel)
-            deploy_arch_dir = os.path.join(self.deploy_dir, arch)
-            if not os.path.exists(deploy_arch_dir):
-                    continue
-
-            lockfilename = self.d.getVar('DEPLOY_DIR_RPM') + "/rpm.lock"
-            lf = bb.utils.lockfile(lockfilename, False)
-            oe.path.copyhardlinktree(deploy_arch_dir, arch_channel)
-            bb.utils.unlockfile(lf)
-
-            if not arch in ch_already_added:
-                bb.note('Adding Smart channel %s (%s)' %
-                        (arch, channel_priority))
-                self._invoke_smart(['channel', '--add', arch, 'type=rpm-md',
-                    'baseurl=%s' % arch_channel, '-y'])
-                self._invoke_smart(['channel', '--set', arch, 'priority=%d' %
-                                   channel_priority])
-                channel_priority -= 5
-
-                ch_already_added.append(arch)
-
-        bb.note('adding Smart RPM DB channel')
-        self._invoke_smart(['channel', '--add', 'rpmsys', 'type=rpm-sys', '-y'])
-
-        # Construct install scriptlet wrapper.
-        # Scripts need to be ordered when executed, this ensures numeric order.
-        # If we ever run into needing more the 899 scripts, we'll have to.
-        # change num to start with 1000.
-        #
-        scriptletcmd = "$2 $1/$3 $4\n"
-        scriptpath = "$1/$3"
-
-        # When self.debug_level >= 3, also dump the content of the
-        # executed scriptlets and how they get invoked.  We have to
-        # replace "exit 1" and "ERR" because printing those as-is
-        # would trigger a log analysis failure.
-        if self.debug_level >= 3:
-            dump_invocation = 'echo "Executing ${name} ${kind} with: ' + scriptletcmd + '"\n'
-            dump_script = 'cat ' + scriptpath + '| sed -e "s/exit 1/exxxit 1/g" -e "s/ERR/IRR/g"; echo\n'
-        else:
-            dump_invocation = 'echo "Executing ${name} ${kind}"\n'
-            dump_script = ''
-
-        SCRIPTLET_FORMAT = "#!/bin/bash\n" \
-            "\n" \
-            "export PATH=%s\n" \
-            "export D=%s\n" \
-            'export OFFLINE_ROOT="$D"\n' \
-            'export IPKG_OFFLINE_ROOT="$D"\n' \
-            'export OPKG_OFFLINE_ROOT="$D"\n' \
-            "export INTERCEPT_DIR=%s\n" \
-            "export NATIVE_ROOT=%s\n" \
-            "\n" \
-            "name=`head -1 " + scriptpath + " | cut -d\' \' -f 2`\n" \
-            "kind=`head -1 " + scriptpath + " | cut -d\' \' -f 4`\n" \
-            + dump_invocation \
-            + dump_script \
-            + scriptletcmd + \
-            "ret=$?\n" \
-            "echo Result of ${name} ${kind}: ${ret}\n" \
-            "if [ ${ret} -ne 0 ]; then\n" \
-            "  if [ $4 -eq 1 ]; then\n" \
-            "    mkdir -p $1/etc/rpm-postinsts\n" \
-            "    num=100\n" \
-            "    while [ -e $1/etc/rpm-postinsts/${num}-* ]; do num=$((num + 1)); done\n" \
-            '    echo "#!$2" > $1/etc/rpm-postinsts/${num}-${name}\n' \
-            '    echo "# Arg: $4" >> $1/etc/rpm-postinsts/${num}-${name}\n' \
-            "    cat " + scriptpath + " >> $1/etc/rpm-postinsts/${num}-${name}\n" \
-            "    chmod +x $1/etc/rpm-postinsts/${num}-${name}\n" \
-            '    echo "Info: deferring ${name} ${kind} install scriptlet to first boot"\n' \
-            "  else\n" \
-            '    echo "Error: ${name} ${kind} remove scriptlet failed"\n' \
-            "  fi\n" \
-            "fi\n"
-
-        intercept_dir = self.d.expand('${WORKDIR}/intercept_scripts')
-        native_root = self.d.getVar('STAGING_DIR_NATIVE')
-        scriptlet_content = SCRIPTLET_FORMAT % (os.environ['PATH'],
-                                                self.target_rootfs,
-                                                intercept_dir,
-                                                native_root)
-        open(self.scriptlet_wrapper, 'w+').write(scriptlet_content)
-
-        bb.note("configuring RPM cross-install scriptlet_wrapper")
-        os.chmod(self.scriptlet_wrapper, 0o755)
-        cmd = ['config', '--set', 'rpm-extra-macros._cross_scriptlet_wrapper=%s' %
-              self.scriptlet_wrapper]
-        self._invoke_smart(cmd)
-
-        # Debug to show smart config info
-        # bb.note(self._invoke_smart(['config', '--show']))
-
-    def update(self):
-        self._invoke_smart(['update', 'rpmsys'])
-
-    def get_rdepends_recursively(self, pkgs):
-        # pkgs will be changed during the loop, so use [:] to make a copy.
-        for pkg in pkgs[:]:
-            sub_data = oe.packagedata.read_subpkgdata(pkg, self.d)
-            sub_rdep = sub_data.get("RDEPENDS_" + pkg)
-            if not sub_rdep:
-                continue
-            done = list(bb.utils.explode_dep_versions2(sub_rdep).keys())
-            next = done
-            # Find all the rdepends on dependency chain
-            while next:
-                new = []
-                for sub_pkg in next:
-                    sub_data = oe.packagedata.read_subpkgdata(sub_pkg, self.d)
-                    sub_pkg_rdep = sub_data.get("RDEPENDS_" + sub_pkg)
-                    if not sub_pkg_rdep:
-                        continue
-                    for p in bb.utils.explode_dep_versions2(sub_pkg_rdep):
-                        # Already handled, skip it.
-                        if p in done or p in pkgs:
-                            continue
-                        # It's a new dep
-                        if oe.packagedata.has_subpkgdata(p, self.d):
-                            done.append(p)
-                            new.append(p)
-                next = new
-            pkgs.extend(done)
-        return pkgs
-
-    '''
-    Install pkgs with smart, the pkg name is oe format
-    '''
-    def install(self, pkgs, attempt_only=False):
-
-        if not pkgs:
-            bb.note("There are no packages to install")
-            return
-        bb.note("Installing the following packages: %s" % ' '.join(pkgs))
-        if not attempt_only:
-            # Pull in multilib requires since rpm may not pull in them
-            # correctly, for example,
-            # lib32-packagegroup-core-standalone-sdk-target requires
-            # lib32-libc6, but rpm may pull in libc6 rather than lib32-libc6
-            # since it doesn't know mlprefix (lib32-), bitbake knows it and
-            # can handle it well, find out the RDEPENDS on the chain will
-            # fix the problem. Both do_rootfs and do_populate_sdk have this
-            # issue.
-            # The attempt_only packages don't need this since they are
-            # based on the installed ones.
-            #
-            # Separate pkgs into two lists, one is multilib, the other one
-            # is non-multilib.
-            ml_pkgs = []
-            non_ml_pkgs = pkgs[:]
-            for pkg in pkgs:
-                for mlib in (self.d.getVar("MULTILIB_VARIANTS") or "").split():
-                    if pkg.startswith(mlib + '-'):
-                        ml_pkgs.append(pkg)
-                        non_ml_pkgs.remove(pkg)
-
-            if len(ml_pkgs) > 0 and len(non_ml_pkgs) > 0:
-                # Found both foo and lib-foo
-                ml_pkgs = self.get_rdepends_recursively(ml_pkgs)
-                non_ml_pkgs = self.get_rdepends_recursively(non_ml_pkgs)
-                # Longer list makes smart slower, so only keep the pkgs
-                # which have the same BPN, and smart can handle others
-                # correctly.
-                pkgs_new = []
-                for pkg in non_ml_pkgs:
-                    for mlib in (self.d.getVar("MULTILIB_VARIANTS") or "").split():
-                        mlib_pkg = mlib + "-" + pkg
-                        if mlib_pkg in ml_pkgs:
-                            pkgs_new.append(pkg)
-                            pkgs_new.append(mlib_pkg)
-                for pkg in pkgs:
-                    if pkg not in pkgs_new:
-                        pkgs_new.append(pkg)
-                pkgs = pkgs_new
-                new_depends = {}
-                deps = bb.utils.explode_dep_versions2(" ".join(pkgs))
-                for depend in deps:
-                    data = oe.packagedata.read_subpkgdata(depend, self.d)
-                    key = "PKG_%s" % depend
-                    if key in data:
-                        new_depend = data[key]
-                    else:
-                        new_depend = depend
-                    new_depends[new_depend] = deps[depend]
-                pkgs = bb.utils.join_deps(new_depends, commasep=True).split(', ')
-        pkgs = self._pkg_translate_oe_to_smart(pkgs, attempt_only)
-        if not pkgs:
-            bb.note("There are no packages to install")
-            return
-        if not attempt_only:
-            bb.note('to be installed: %s' % ' '.join(pkgs))
-            cmd = [self.smart_cmd] + self.smart_opt + ["install", "-y"] + pkgs
-            bb.note(' '.join(cmd))
-        else:
-            bb.note('installing attempt only packages...')
-            bb.note('Attempting %s' % ' '.join(pkgs))
-            cmd = [self.smart_cmd] + self.smart_opt + ["install", "--attempt",
-                    "-y"] + pkgs
-        try:
-            output = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode("utf-8")
-            bb.note(output)
-        except subprocess.CalledProcessError as e:
-            bb.fatal("Unable to install packages. Command '%s' "
-                     "returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
-
-    '''
-    Remove pkgs with smart, the pkg name is smart/rpm format
-    '''
-    def remove(self, pkgs, with_dependencies=True):
-        bb.note('to be removed: ' + ' '.join(pkgs))
-
-        if not with_dependencies:
-            cmd = [self.rpm_cmd] + ["-e", "--nodeps", "--root=%s" %
-                    self.target_rootfs, "--dbpath=/var/lib/rpm",
-                    "--define='_cross_scriptlet_wrapper %s'" %
-                    self.scriptlet_wrapper,
-                    "--define='_tmppath /%s/tmp'" % self.install_dir_name] + pkgs
-        else:
-            # for pkg in pkgs:
-            #   bb.note('Debug: What required: %s' % pkg)
-            #   bb.note(self._invoke_smart(['query', pkg, '--show-requiredby']))
-            cmd = [self.smart_cmd] + self.smart_opt + ["remove", "-y"] + pkgs
-        try:
-            bb.note(' '.join(cmd))
-            output = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode("utf-8")
-            bb.note(output)
-        except subprocess.CalledProcessError as e:
-            bb.note("Unable to remove packages. Command '%s' "
-                    "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
+                bb.fatal("Could not invoke rpm. Command "
+                     "'%s' returned %d:\n%s" % (' '.join([cmd] + args + pkgs), e.returncode, e.output.decode("utf-8")))
 
     def upgrade(self):
-        bb.note('smart upgrade')
-        self._invoke_smart(['upgrade'])
-
-    def write_index(self):
-        result = self.indexer.write_index()
+        self._prepare_pkg_transaction()
+        self._invoke_dnf(["upgrade"])
 
-        if result is not None:
-            bb.fatal(result)
+    def autoremove(self):
+        self._prepare_pkg_transaction()
+        self._invoke_dnf(["autoremove"])
 
     def remove_packaging_data(self):
-        bb.utils.remove(self.image_rpmlib, True)
-        bb.utils.remove(os.path.join(self.target_rootfs, 'var/lib/smart'),
-                        True)
-        bb.utils.remove(os.path.join(self.target_rootfs, 'var/lib/opkg'), True)
-
-        # remove temp directory
-        bb.utils.remove(self.install_dir_path, True)
+        self._invoke_dnf(["clean", "all"])
+        for dir in self.packaging_data_dirs:
+            bb.utils.remove(oe.path.join(self.target_rootfs, dir), True)
 
     def backup_packaging_data(self):
-        # Save the rpmlib for increment rpm image generation
-        if os.path.exists(self.saved_rpmlib):
-            bb.utils.remove(self.saved_rpmlib, True)
-        shutil.copytree(self.image_rpmlib,
-                        self.saved_rpmlib,
-                        symlinks=True)
+        # Save the packaging dirs for increment rpm image generation
+        if os.path.exists(self.saved_packaging_data):
+            bb.utils.remove(self.saved_packaging_data, True)
+        for i in self.packaging_data_dirs:
+            source_dir = oe.path.join(self.target_rootfs, i)
+            target_dir = oe.path.join(self.saved_packaging_data, i)
+            shutil.copytree(source_dir, target_dir, symlinks=True)
 
     def recovery_packaging_data(self):
         # Move the rpmlib back
-        if os.path.exists(self.saved_rpmlib):
-            if os.path.exists(self.image_rpmlib):
-                bb.utils.remove(self.image_rpmlib, True)
-
-            bb.note('Recovery packaging data')
-            shutil.copytree(self.saved_rpmlib,
-                            self.image_rpmlib,
+        if os.path.exists(self.saved_packaging_data):
+            for i in self.packaging_data_dirs:
+                target_dir = oe.path.join(self.target_rootfs, i)
+                if os.path.exists(target_dir):
+                    bb.utils.remove(target_dir, True)
+                source_dir = oe.path.join(self.saved_packaging_data, i)
+                shutil.copytree(source_dir,
+                            target_dir,
                             symlinks=True)
 
     def list_installed(self):
-        return self.pkgs_list.list_pkgs()
-
-    '''
-    If incremental install, we need to determine what we've got,
-    what we need to add, and what to remove...
-    The dump_install_solution will dump and save the new install
-    solution.
-    '''
-    def dump_install_solution(self, pkgs):
-        bb.note('creating new install solution for incremental install')
-        if len(pkgs) == 0:
-            return
-
-        pkgs = self._pkg_translate_oe_to_smart(pkgs, False)
-        install_pkgs = list()
+        output = self._invoke_dnf(["repoquery", "--installed", "--queryformat", "Package: %{name} %{arch} %{version} %{sourcerpm}\nDependencies:\n%{requires}\nRecommendations:\n%{recommends}\nDependenciesEndHere:\n"],
+                                  print_output = False)
+        packages = {}
+        current_package = None
+        current_deps = None
+        current_state = "initial"
+        for line in output.splitlines():
+            if line.startswith("Package:"):
+                package_info = line.split(" ")[1:]
+                current_package = package_info[0]
+                package_arch = package_info[1]
+                package_version = package_info[2]
+                package_srpm = package_info[3]
+                packages[current_package] = {"arch":package_arch, "ver":package_version, "filename":package_srpm}
+                current_deps = []
+            elif line.startswith("Dependencies:"):
+                current_state = "dependencies"
+            elif line.startswith("Recommendations"):
+                current_state = "recommendations"
+            elif line.startswith("DependenciesEndHere:"):
+                current_state = "initial"
+                packages[current_package]["deps"] = current_deps
+            elif len(line) > 0:
+                if current_state == "dependencies":
+                    current_deps.append(line)
+                elif current_state == "recommendations":
+                    current_deps.append("%s [REC]" % line)
+
+        return packages
 
-        cmd = [self.smart_cmd] + self.smart_opt + ['install', '-y', '--dump'] + pkgs
+    def update(self):
+        self._invoke_dnf(["makecache"])
+
+    def _invoke_dnf(self, dnf_args, fatal = True, print_output = True ):
+        os.environ['RPM_ETCCONFIGDIR'] = self.target_rootfs
+
+        dnf_cmd = bb.utils.which(os.getenv('PATH'), "dnf-2")
+        standard_dnf_args = (["-v", "--rpmverbosity=debug"] if self.d.getVar('ROOTFS_RPM_DEBUG') else []) + ["-y",
+                             "-c", oe.path.join(self.target_rootfs, "etc/dnf/dnf.conf"),
+                             "--setopt=reposdir=%s" %(oe.path.join(self.target_rootfs, "etc/yum.repos.d")),
+                             "--repofrompath=oe-repo,%s" % (self.rpm_repo_dir),
+                             "--installroot=%s" % (self.target_rootfs),
+                             "--setopt=logdir=%s" % (self.d.getVar('T'))
+                            ]
+        cmd = [dnf_cmd] + standard_dnf_args + dnf_args
         try:
-            # Disable rpmsys channel for the fake install
-            self._invoke_smart(['channel', '--disable', 'rpmsys'])
-
-            output = subprocess.check_output(cmd,stderr=subprocess.STDOUT).decode('utf-8')
-            f = open(self.solution_manifest, 'w')
-            f.write(output)
-            f.close()
-            with open(self.solution_manifest, 'r') as manifest:
-                for pkg in manifest.read().split('\n'):
-                    if '@' in pkg:
-                        install_pkgs.append(pkg.strip())
+            output = subprocess.check_output(cmd,stderr=subprocess.STDOUT).decode("utf-8")
+            if print_output:
+                bb.note(output)
+            return output
         except subprocess.CalledProcessError as e:
-            bb.note("Unable to dump install packages. Command '%s' "
-                    "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
-        # Recovery rpmsys channel
-        self._invoke_smart(['channel', '--enable', 'rpmsys'])
-        return install_pkgs
+            if print_output:
+                (bb.note, bb.fatal)[fatal]("Could not invoke dnf. Command "
+                     "'%s' returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
+            else:
+                (bb.note, bb.fatal)[fatal]("Could not invoke dnf. Command "
+                     "'%s' returned %d:" % (' '.join(cmd), e.returncode))
+            return e.output.decode("utf-8")
+
+    def dump_install_solution(self, pkgs):
+        open(self.solution_manifest, 'w').write(" ".join(pkgs))
+        return pkgs
 
-    '''
-    If incremental install, we need to determine what we've got,
-    what we need to add, and what to remove...
-    The load_old_install_solution will load the previous install
-    solution
-    '''
     def load_old_install_solution(self):
-        bb.note('load old install solution for incremental install')
-        installed_pkgs = list()
         if not os.path.exists(self.solution_manifest):
-            bb.note('old install solution not exist')
-            return installed_pkgs
-
-        with open(self.solution_manifest, 'r') as manifest:
-            for pkg in manifest.read().split('\n'):
-                if '@' in pkg:
-                    installed_pkgs.append(pkg.strip())
-
-        return installed_pkgs
-
-    '''
-    Dump all available packages in feeds, it should be invoked after the
-    newest rpm index was created
-    '''
-    def dump_all_available_pkgs(self):
-        available_manifest = self.d.expand('${T}/saved/available_pkgs.txt')
-        available_pkgs = list()
-        cmd = [self.smart_cmd] + self.smart_opt + ['query', '--output', available_manifest]
-        try:
-            subprocess.check_output(cmd, stderr=subprocess.STDOUT)
-            with open(available_manifest, 'r') as manifest:
-                for pkg in manifest.read().split('\n'):
-                    if '@' in pkg:
-                        available_pkgs.append(pkg.strip())
-        except subprocess.CalledProcessError as e:
-            bb.note("Unable to list all available packages. Command '%s' "
-                    "returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
+            return []
 
-        self.fullpkglist = available_pkgs
+        return open(self.solution_manifest, 'r').read().split()
 
-        return
+    def _script_num_prefix(self, path):
+        files = os.listdir(path)
+        numbers = set()
+        numbers.add(99)
+        for f in files:
+            numbers.add(int(f.split("-")[0]))
+        return max(numbers) + 1
 
     def save_rpmpostinst(self, pkg):
-        mlibs = (self.d.getVar('MULTILIB_GLOBAL_VARIANTS', False) or "").split()
-
-        new_pkg = pkg
-        # Remove any multilib prefix from the package name
-        for mlib in mlibs:
-            if mlib in pkg:
-                new_pkg = pkg.replace(mlib + '-', '')
-                break
-
-        bb.note('  * postponing %s' % new_pkg)
-        saved_dir = self.target_rootfs + self.d.expand('${sysconfdir}/rpm-postinsts/') + new_pkg
-
-        cmd = self.rpm_cmd + ' -q --scripts --root ' + self.target_rootfs
-        cmd += ' --dbpath=/var/lib/rpm ' + new_pkg
-        cmd += ' | sed -n -e "/^postinstall scriptlet (using .*):$/,/^.* scriptlet (using .*):$/ {/.*/p}"'
-        cmd += ' | sed -e "/postinstall scriptlet (using \(.*\)):$/d"'
-        cmd += ' -e "/^.* scriptlet (using .*):$/d" > %s' % saved_dir
-
-        try:
-            bb.note(cmd)
-            output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).strip().decode("utf-8")
-            bb.note(output)
-            os.chmod(saved_dir, 0o755)
-        except subprocess.CalledProcessError as e:
-            bb.fatal("Invoke save_rpmpostinst failed. Command '%s' "
-                     "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
-
-    '''Write common configuration for target usage'''
-    def rpm_setup_smart_target_config(self):
-        bb.utils.remove(os.path.join(self.target_rootfs, 'var/lib/smart'),
-                        True)
-
-        self._invoke_smart(['config', '--set', 'rpm-nolinktos=1'])
-        self._invoke_smart(['config', '--set', 'rpm-noparentdirs=1'])
-        for i in self.d.getVar('BAD_RECOMMENDATIONS').split():
-            self._invoke_smart(['flag', '--set', 'ignore-recommends', i])
-        self._invoke_smart(['channel', '--add', 'rpmsys', 'type=rpm-sys', '-y'])
-
-    '''
-    The rpm db lock files were produced after invoking rpm to query on
-    build system, and they caused the rpm on target didn't work, so we
-    need to unlock the rpm db by removing the lock files.
-    '''
-    def unlock_rpm_db(self):
-        # Remove rpm db lock files
-        rpm_db_locks = glob.glob('%s/var/lib/rpm/__db.*' % self.target_rootfs)
-        for f in rpm_db_locks:
-            bb.utils.remove(f, True)
+        bb.note("Saving postinstall script of %s" % (pkg))
+        cmd = bb.utils.which(os.getenv('PATH'), "rpm")
+        args = ["-q", "--root=%s" % self.target_rootfs, "--queryformat", "%{postin}", pkg]
 
-    """
-    Returns a dictionary with the package info.
-    """
-    def package_info(self, pkg):
-        cmd = [self.smart_cmd] + self.smart_opt + ['info', '--urls', pkg]
         try:
-            output = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode("utf-8")
+            output = subprocess.check_output([cmd] + args,stderr=subprocess.STDOUT).decode("utf-8")
         except subprocess.CalledProcessError as e:
-            bb.fatal("Unable to list available packages. Command '%s' "
-                     "returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
+            bb.fatal("Could not invoke rpm. Command "
+                     "'%s' returned %d:\n%s" % (' '.join([cmd] + args), e.returncode, e.output.decode("utf-8")))
 
-        # Set default values to avoid UnboundLocalError
-        arch = ""
-        ver = ""
-        filename = ""
+        # may need to prepend #!/bin/sh to output
 
-        #Parse output
-        for line in output.splitlines():
-            line = line.rstrip()
-            if line.startswith("Name:"):
-                pkg = line.split(": ")[1]
-            elif line.startswith("Version:"):
-                tmp_str = line.split(": ")[1]
-                ver, arch = tmp_str.split("@")
-                break
-
-        # Get filename
-        index = re.search("^URLs", output, re.MULTILINE)
-        tmp_str = output[index.end():]
-        for line in tmp_str.splitlines():
-            if "/" in line:
-                line = line.lstrip()
-                filename = line.split(" ")[0]
-                break
-
-        # To have the same data type than other package_info methods
-        filepath = os.path.join(self.deploy_dir, arch, filename)
-        pkg_dict = {}
-        pkg_dict[pkg] = {"arch":arch, "ver":ver, "filename":filename,
-                         "filepath": filepath}
-
-        return pkg_dict
-
-    """
-    Returns the path to a tmpdir where resides the contents of a package.
-
-    Deleting the tmpdir is responsability of the caller.
+        target_path = oe.path.join(self.target_rootfs, self.d.expand('${sysconfdir}/rpm-postinsts/'))
+        bb.utils.mkdirhier(target_path)
+        num = self._script_num_prefix(target_path)
+        saved_script_name = oe.path.join(target_path, "%d-%s" % (num, pkg))
+        open(saved_script_name, 'w').write(output)
+        os.chmod(saved_script_name, 0o755)
 
-    """
     def extract(self, pkg):
-        pkg_info = self.package_info(pkg)
-        if not pkg_info:
-            bb.fatal("Unable to get information for package '%s' while "
-                     "trying to extract the package."  % pkg)
-
-        pkg_path = pkg_info[pkg]["filepath"]
+        output = self._invoke_dnf(["repoquery", "--queryformat", "%{location}", pkg])
+        pkg_name = output.splitlines()[-1]
+        if not pkg_name.endswith(".rpm"):
+            bb.fatal("dnf could not find package %s in repository: %s" %(pkg, output))
+        pkg_path = oe.path.join(self.rpm_repo_dir, pkg_name)
 
         cpio_cmd = bb.utils.which(os.getenv("PATH"), "cpio")
         rpm2cpio_cmd = bb.utils.which(os.getenv("PATH"), "rpm2cpio")
@@ -1725,7 +975,7 @@ class OpkgPM(OpkgDpkgPM):
             for uri in feed_uris:
                 if archs:
                     for arch in archs:
-                        if (feed_archs is None) and (not os.path.exists(os.path.join(self.deploy_dir, arch))):
+                        if (feed_archs is None) and (not os.path.exists(oe.path.join(self.deploy_dir, arch))):
                             continue
                         bb.note('Adding opkg feed url-%s-%d (%s)' %
                             (arch, uri_iterator, uri))
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index 74c643b3b98..5e1c09762ab 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -431,6 +431,8 @@ class RpmRootfs(Rootfs):
                 bb.note('incremental removed: %s' % ' '.join(pkg_to_remove))
                 self.pm.remove(pkg_to_remove)
 
+            self.pm.autoremove()
+
     def _create(self):
         pkgs_to_install = self.manifest.parse_initial_manifest()
         rpm_pre_process_cmds = self.d.getVar('RPM_PREPROCESS_COMMANDS')
@@ -444,8 +446,6 @@ class RpmRootfs(Rootfs):
         if self.progress_reporter:
             self.progress_reporter.next_stage()
 
-        self.pm.dump_all_available_pkgs()
-
         if self.inc_rpm_image_gen == "1":
             self._create_incremental(pkgs_to_install)
 
@@ -480,15 +480,13 @@ class RpmRootfs(Rootfs):
         if self.progress_reporter:
             self.progress_reporter.next_stage()
 
-        self._setup_dbg_rootfs(['/etc/rpm', '/var/lib/rpm', '/var/lib/smart'])
+        self._setup_dbg_rootfs(['/etc', '/var/lib/rpm', '/var/cache/dnf', '/var/lib/dnf'])
 
         execute_pre_post_process(self.d, rpm_post_process_cmds)
 
         if self.inc_rpm_image_gen == "1":
             self.pm.backup_packaging_data()
 
-        self.pm.rpm_setup_smart_target_config()
-
         if self.progress_reporter:
             self.progress_reporter.next_stage()
 
@@ -526,15 +524,7 @@ class RpmRootfs(Rootfs):
             self.pm.save_rpmpostinst(pkg)
 
     def _cleanup(self):
-        # during the execution of postprocess commands, rpm is called several
-        # times to get the files installed, dependencies, etc. This creates the
-        # __db.00* (Berkeley DB files that hold locks, rpm specific environment
-        # settings, etc.), that should not get into the final rootfs
-        self.pm.unlock_rpm_db()
-        if os.path.isdir(self.pm.install_dir_path + "/tmp") and not os.listdir(self.pm.install_dir_path + "/tmp"):
-           bb.utils.remove(self.pm.install_dir_path + "/tmp", True)
-        if os.path.isdir(self.pm.install_dir_path) and not os.listdir(self.pm.install_dir_path):
-           bb.utils.remove(self.pm.install_dir_path, True)
+        pass
 
 class DpkgOpkgRootfs(Rootfs):
     def __init__(self, d, progress_reporter=None, logcatcher=None):
diff --git a/meta/lib/oe/sdk.py b/meta/lib/oe/sdk.py
index fef02d0777e..deb823b6ec1 100644
--- a/meta/lib/oe/sdk.py
+++ b/meta/lib/oe/sdk.py
@@ -130,7 +130,6 @@ class RpmSdk(Sdk):
 
         pm.create_configs()
         pm.write_index()
-        pm.dump_all_available_pkgs()
         pm.update()
 
         pkgs = []
@@ -188,7 +187,9 @@ class RpmSdk(Sdk):
                                                         True).strip('/'),
                                           )
         self.mkdirhier(native_sysconf_dir)
-        for f in glob.glob(os.path.join(self.sdk_output, "etc", "*")):
+        for f in glob.glob(os.path.join(self.sdk_output, "etc", "rpm*")):
+            self.movefile(f, native_sysconf_dir)
+        for f in glob.glob(os.path.join(self.sdk_output, "etc", "dnf", "*")):
             self.movefile(f, native_sysconf_dir)
         self.remove(os.path.join(self.sdk_output, "etc"), True)
 
@@ -350,7 +351,7 @@ def sdk_list_installed_packages(d, target, rootfs_dir=None):
     if img_type == "rpm":
         arch_var = ["SDK_PACKAGE_ARCHS", None][target is True]
         os_var = ["SDK_OS", None][target is True]
-        return RpmPkgsList(d, rootfs_dir, arch_var, os_var).list_pkgs()
+        return RpmPkgsList(d, rootfs_dir).list_pkgs()
     elif img_type == "ipk":
         conf_file_var = ["IPKGCONF_SDK", "IPKGCONF_TARGET"][target is True]
         return OpkgPkgsList(d, rootfs_dir, d.getVar(conf_file_var)).list_pkgs()
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 22/44] scripts/rpm2cpio.sh: replace 5.x version with 4.x version
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (20 preceding siblings ...)
  2017-03-10 11:24 ` [PATCH 21/44] rootfs_rpm.bbclass: migrate image creation to dnf Alexander Kanavin
@ 2017-03-10 11:24 ` Alexander Kanavin
  2017-03-10 17:26   ` Mark Hatle
  2017-03-10 11:24 ` [PATCH 23/44] scripts/oe-setup-rpmrepo: replace createrepo with createrepo_c Alexander Kanavin
                   ` (22 subsequent siblings)
  44 siblings, 1 reply; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:24 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 scripts/rpm2cpio.sh | 108 ++++++++++++++++++++++++++--------------------------
 1 file changed, 55 insertions(+), 53 deletions(-)

diff --git a/scripts/rpm2cpio.sh b/scripts/rpm2cpio.sh
index 5df8c0f7054..cf23472ba95 100755
--- a/scripts/rpm2cpio.sh
+++ b/scripts/rpm2cpio.sh
@@ -1,53 +1,55 @@
-#!/bin/sh
-
-# This comes from the RPM5 5.4.0 distribution.
-
-pkg=$1
-if [ "$pkg" = "" -o ! -e "$pkg" ]; then
-    echo "no package supplied" 1>&2
-   exit 1
-fi
-
-leadsize=96
-o=`expr $leadsize + 8`
-set `od -j $o -N 8 -t u1 $pkg`
-il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`
-dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`
-# echo "sig il: $il dl: $dl"
-
-sigsize=`expr 8 + 16 \* $il + $dl`
-o=`expr $o + $sigsize + \( 8 - \( $sigsize \% 8 \) \) \% 8 + 8`
-set `od -j $o -N 8 -t u1 $pkg`
-il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`
-dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`
-# echo "hdr il: $il dl: $dl"
-
-hdrsize=`expr 8 + 16 \* $il + $dl`
-o=`expr $o + $hdrsize`
-EXTRACTOR="dd if=$pkg ibs=$o skip=1"
-
-COMPRESSION=`($EXTRACTOR |file -) 2>/dev/null`
-if echo $COMPRESSION |grep -iq gzip; then
-	DECOMPRESSOR=gunzip
-elif echo $COMPRESSION |grep -iq bzip2; then
-	DECOMPRESSOR=bunzip2
-elif echo $COMPRESSION |grep -iq xz; then
-	DECOMPRESSOR=unxz
-elif echo $COMPRESSION |grep -iq cpio; then
-	DECOMPRESSOR=cat
-else
-	# Most versions of file don't support LZMA, therefore we assume
-	# anything not detected is LZMA
-	DECOMPRESSOR=`which unlzma 2>/dev/null`
-	case "$DECOMPRESSOR" in
-	    /* ) ;;
-	    *  ) DECOMPRESSOR=`which lzmash 2>/dev/null`
-	         case "$DECOMPRESSOR" in
-	             /* ) DECOMPRESSOR="lzmash -d -c" ;;
-	             *  ) DECOMPRESSOR=cat ;;
-	         esac
-	         ;;
-	esac
-fi
-
-$EXTRACTOR 2>/dev/null | $DECOMPRESSOR
+#!/bin/sh -efu
+
+# This file comes from rpm 4.x distribution
+
+fatal() {
+	echo "$*" >&2
+	exit 1
+}
+
+pkg="$1"
+[ -n "$pkg" -a -e "$pkg" ] ||
+	fatal "No package supplied"
+
+_dd() {
+	local o="$1"; shift
+	dd if="$pkg" skip="$o" iflag=skip_bytes status=none $*
+}
+
+calcsize() {
+	offset=$(($1 + 8))
+
+	local i b b0 b1 b2 b3 b4 b5 b6 b7
+
+	i=0
+	while [ $i -lt 8 ]; do
+		b="$(_dd $(($offset + $i)) bs=1 count=1)"
+		[ -z "$b" ] &&
+			b="0" ||
+			b="$(exec printf '%u\n' "'$b")"
+		eval "b$i=\$b"
+		i=$(($i + 1))
+	done
+
+	rsize=$((8 + ((($b0 << 24) + ($b1 << 16) + ($b2 << 8) + $b3) << 4) + ($b4 << 24) + ($b5 << 16) + ($b6 << 8) + $b7))
+	offset=$(($offset + $rsize))
+}
+
+case "$(_dd 0 bs=8 count=1)" in
+	"$(printf '\355\253\356\333')"*) ;; # '\xed\xab\xee\xdb'
+	*) fatal "File doesn't look like rpm: $pkg" ;;
+esac
+
+calcsize 96
+sigsize=$rsize
+
+calcsize $(($offset + (8 - ($sigsize % 8)) % 8))
+hdrsize=$rsize
+
+case "$(_dd $offset bs=3 count=1)" in
+	"$(printf '\102\132')"*) _dd $offset | bunzip2 ;; # '\x42\x5a'
+	"$(printf '\037\213')"*) _dd $offset | gunzip  ;; # '\x1f\x8b'
+	"$(printf '\375\067')"*) _dd $offset | xzcat   ;; # '\xfd\x37'
+	"$(printf '\135\000')"*) _dd $offset | unlzma  ;; # '\x5d\x00'
+	*) fatal "Unrecognized rpm file: $pkg" ;;
+esac
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 23/44] scripts/oe-setup-rpmrepo: replace createrepo with createrepo_c
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (21 preceding siblings ...)
  2017-03-10 11:24 ` [PATCH 22/44] scripts/rpm2cpio.sh: replace 5.x version with 4.x version Alexander Kanavin
@ 2017-03-10 11:24 ` Alexander Kanavin
  2017-03-10 11:24 ` [PATCH 24/44] package_rpm.bbclass: replace createrepo reference " Alexander Kanavin
                   ` (21 subsequent siblings)
  44 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:24 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 scripts/oe-setup-rpmrepo | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/oe-setup-rpmrepo b/scripts/oe-setup-rpmrepo
index 7dcded8f1d4..df1c61435c1 100755
--- a/scripts/oe-setup-rpmrepo
+++ b/scripts/oe-setup-rpmrepo
@@ -89,7 +89,7 @@ if [ ! -d "$RPM_DIR" ]; then
 	exit 1
 fi
 
-CREATEREPO=$OECORE_NATIVE_SYSROOT/usr/bin/createrepo
+CREATEREPO=$OECORE_NATIVE_SYSROOT/usr/bin/createrepo_c
 if [ ! -e "$CREATEREPO" ]; then
    	echo "Error: can't find createrepo binary"
 	echo "please run bitbake createrepo-native first"
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 24/44] package_rpm.bbclass: replace createrepo reference with createrepo_c
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (22 preceding siblings ...)
  2017-03-10 11:24 ` [PATCH 23/44] scripts/oe-setup-rpmrepo: replace createrepo with createrepo_c Alexander Kanavin
@ 2017-03-10 11:24 ` Alexander Kanavin
  2017-03-10 11:24 ` [PATCH 25/44] package_rpm.bbclass: no need to specify the magic file location Alexander Kanavin
                   ` (20 subsequent siblings)
  44 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:24 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/classes/package_rpm.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 480c6d58d39..27a2bb479a2 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -763,6 +763,6 @@ do_package_write_rpm[depends] += "${@oe.utils.build_depends_string(d.getVar('PAC
 addtask package_write_rpm after do_packagedata do_package
 
 PACKAGEINDEXDEPS += "rpm-native:do_populate_sysroot"
-PACKAGEINDEXDEPS += "createrepo-native:do_populate_sysroot"
+PACKAGEINDEXDEPS += "createrepo-c-native:do_populate_sysroot"
 
 do_build[recrdeptask] += "do_package_write_rpm"
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 25/44] package_rpm.bbclass: no need to specify the magic file location
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (23 preceding siblings ...)
  2017-03-10 11:24 ` [PATCH 24/44] package_rpm.bbclass: replace createrepo reference " Alexander Kanavin
@ 2017-03-10 11:24 ` Alexander Kanavin
  2017-03-10 11:24 ` [PATCH 26/44] testimage.bbclass: fix runtime test for rpm, port smart tests to dnf Alexander Kanavin
                   ` (19 subsequent siblings)
  44 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:24 UTC (permalink / raw)
  To: openembedded-core

It's handled by the rpm wrapper command, created in rpm recipe.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/classes/package_rpm.bbclass | 2 --
 1 file changed, 2 deletions(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 27a2bb479a2..9b634e583b8 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -693,7 +693,6 @@ python do_package_rpm () {
     d.setVar('RPM_PKGWRITEDIR', pkgwritedir)
     bb.debug(1, 'PKGWRITEDIR: %s' % d.getVar('RPM_PKGWRITEDIR'))
     pkgarch = d.expand('${PACKAGE_ARCH_EXTEND}${HOST_VENDOR}-${HOST_OS}')
-    magicfile = d.expand('${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc')
     bb.utils.mkdirhier(pkgwritedir)
     os.chmod(pkgwritedir, 0o755)
 
@@ -711,7 +710,6 @@ python do_package_rpm () {
         cmd = cmd + " --define '__find_provides %{nil}'"
     cmd = cmd + " --define '_unpackaged_files_terminate_build 0'"
     cmd = cmd + " --define 'debug_package %{nil}'"
-    cmd = cmd + " --define '_rpmfc_magic_path " + magicfile + "'"
     cmd = cmd + " --define '_tmppath " + workdir + "'"
     if d.getVarFlag('ARCHIVER_MODE', 'srpm') == '1' and bb.data.inherits_class('archiver', d):
         cmd = cmd + " --define '_sourcedir " + d.getVar('ARCHIVER_OUTDIR') + "'"
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 26/44] testimage.bbclass: fix runtime test for rpm, port smart tests to dnf
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (24 preceding siblings ...)
  2017-03-10 11:24 ` [PATCH 25/44] package_rpm.bbclass: no need to specify the magic file location Alexander Kanavin
@ 2017-03-10 11:24 ` Alexander Kanavin
  2017-03-10 11:24 ` [PATCH 27/44] package_rpm.bbclass: instruct rpm to not remove the buildroot directory Alexander Kanavin
                   ` (18 subsequent siblings)
  44 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:24 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/classes/testimage.bbclass           |  25 ++--
 meta/lib/oeqa/oetest.py                  |   7 --
 meta/lib/oeqa/runtime/cases/dnf.py       | 111 +++++++++++++++++
 meta/lib/oeqa/runtime/cases/parselogs.py |   1 +
 meta/lib/oeqa/runtime/cases/rpm.py       |  21 ++--
 meta/lib/oeqa/runtime/cases/smart.py     | 196 -------------------------------
 6 files changed, 133 insertions(+), 228 deletions(-)
 create mode 100644 meta/lib/oeqa/runtime/cases/dnf.py
 delete mode 100644 meta/lib/oeqa/runtime/cases/smart.py

diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 8d8443ca848..07744aff92f 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -35,7 +35,7 @@ TEST_NEEDED_PACKAGES_DIR ?= "${WORKDIR}/testimage/packages"
 TEST_EXTRACTED_DIR ?= "${TEST_NEEDED_PACKAGES_DIR}/extracted"
 TEST_PACKAGED_DIR ?= "${TEST_NEEDED_PACKAGES_DIR}/packaged"
 
-RPMTESTSUITE = "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'smart rpm', '', d)}"
+RPMTESTSUITE = "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'dnf rpm', '', d)}"
 SYSTEMDSUITE = "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
 MINTESTSUITE = "ping"
 NETTESTSUITE = "${MINTESTSUITE} ssh df date scp oe_syslog ${SYSTEMDSUITE}"
@@ -74,12 +74,11 @@ TESTIMAGEDEPENDS = ""
 TESTIMAGEDEPENDS_qemuall = "qemu-native:do_populate_sysroot qemu-helper-native:do_populate_sysroot"
 TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'cpio-native:do_populate_sysroot', '', d)}"
 TESTIMAGEDEPENDS_qemuall += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'cpio-native:do_populate_sysroot', '', d)}"
-TESTIMAGEDEPENDS_qemuall += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'createrepo-native:do_populate_sysroot', '', d)}"
-TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'python-smartpm-native:do_populate_sysroot', '', d)}"
+TESTIMAGEDEPENDS_qemuall += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'createrepo-c-native:do_populate_sysroot', '', d)}"
+TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'dnf-native:do_populate_sysroot', '', d)}"
 TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'ipk', 'opkg-utils-native:do_populate_sysroot', '', d)}"
 TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'deb', 'apt-native:do_populate_sysroot', '', d)}"
-TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'python-smartpm-native:do_populate_sysroot', '', d)}"
-TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'createrepo-native:do_populate_sysroot', '', d)}"
+TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'createrepo-c-native:do_populate_sysroot', '', d)}"
 
 TESTIMAGELOCK = "${TMPDIR}/testimage.lock"
 TESTIMAGELOCK_qemuall = ""
@@ -120,7 +119,7 @@ python do_testimage() {
     testimage_sanity(d)
 
     if (d.getVar('IMAGE_PKGTYPE') == 'rpm'
-       and 'smart' in d.getVar('TEST_SUITES')):
+       and 'dnf' in d.getVar('TEST_SUITES')):
         create_rpm_index(d)
 
     testimage_main(d)
@@ -324,30 +323,26 @@ def create_index(arg):
 
 def create_rpm_index(d):
     # Index RPMs
-    rpm_createrepo = bb.utils.which(os.getenv('PATH'), "createrepo")
+    rpm_createrepo = bb.utils.which(os.getenv('PATH'), "createrepo_c")
     index_cmds = []
     archs = (d.getVar('ALL_MULTILIB_PACKAGE_ARCHS') or '').replace('-', '_')
 
     for arch in archs.split():
         rpm_dir = os.path.join(d.getVar('DEPLOY_DIR_RPM'), arch)
-        idx_path = os.path.join(d.getVar('WORKDIR'), 'rpm', arch)
-        db_path = os.path.join(d.getVar('WORKDIR'), 'rpmdb', arch)
+        idx_path = os.path.join(d.getVar('WORKDIR'), 'oe-testimage-repo', arch)
 
         if not os.path.isdir(rpm_dir):
             continue
-        if os.path.exists(db_path):
-            bb.utils.remove(dbpath, True)
 
         lockfilename = os.path.join(d.getVar('DEPLOY_DIR_RPM'), 'rpm.lock')
         lf = bb.utils.lockfile(lockfilename, False)
         oe.path.copyhardlinktree(rpm_dir, idx_path)
         # Full indexes overload a 256MB image so reduce the number of rpms
-        # in the feed. Filter to p* since we use the psplash packages and
+        # in the feed. Filter to r* since we use the run-postinst packages and
         # this leaves some allarch and machine arch packages too.
-        bb.utils.remove(idx_path + "*/[a-oq-z]*.rpm")
+        bb.utils.remove(idx_path + "*/[a-qs-z]*.rpm")
         bb.utils.unlockfile(lf)
-        cmd = '%s --dbpath %s --update -q %s' % (rpm_createrepo,
-                                                 db_path, idx_path)
+        cmd = '%s --update -q %s' % (rpm_createrepo, idx_path)
 
         # Create repodata
         result = create_index(cmd)
diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py
index 1dad763ff14..f7171260e74 100644
--- a/meta/lib/oeqa/oetest.py
+++ b/meta/lib/oeqa/oetest.py
@@ -128,13 +128,6 @@ class oeRuntimeTest(oeTest):
     def tearDownLocal(self):
         pass
 
-    #TODO: use package_manager.py to install packages on any type of image
-    def install_packages(self, packagelist):
-        for package in packagelist:
-            (status, result) = self.target.run("smart install -y "+package)
-            if status != 0:
-                return status
-
 def getmodule(pos=2):
     # stack returns a list of tuples containg frame information
     # First element of the list the is current frame, caller is 1
diff --git a/meta/lib/oeqa/runtime/cases/dnf.py b/meta/lib/oeqa/runtime/cases/dnf.py
new file mode 100644
index 00000000000..77e7eb94507
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/dnf.py
@@ -0,0 +1,111 @@
+import os
+import re
+import subprocess
+from oeqa.utils.httpserver import HTTPService
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.core.decorator.oeid import OETestID
+from oeqa.core.decorator.data import skipIfNotDataVar, skipIfNotFeature
+from oeqa.runtime.decorator.package import OEHasPackage
+
+class DnfTest(OERuntimeTestCase):
+
+    def dnf(self, command, expected = 0):
+        command = 'dnf-2 %s' % command
+        status, output = self.target.run(command, 1500)
+        message = os.linesep.join([command, output])
+        self.assertEqual(status, expected, message)
+        return output
+
+class DnfBasicTest(DnfTest):
+
+    @skipIfNotFeature('package-management',
+                      'Test requires package-management to be in IMAGE_FEATURES')
+    @skipIfNotDataVar('IMAGE_PKGTYPE', 'rpm',
+                      'RPM is not the primary package manager')
+    @OEHasPackage(['dnf'])
+    @OETestDepends(['ssh.SSHTest.test_ssh'])
+    def test_dnf_help(self):
+        self.dnf('--help')
+
+    @OETestDepends(['dnf.DnfBasicTest.test_dnf_help'])
+    def test_dnf_version(self):
+        self.dnf('--version')
+
+    @OETestDepends(['dnf.DnfBasicTest.test_dnf_help'])
+    def test_dnf_info(self):
+        self.dnf('info dnf')
+
+    @OETestDepends(['dnf.DnfBasicTest.test_dnf_help'])
+    def test_dnf_search(self):
+        self.dnf('search dnf')
+
+    @OETestDepends(['dnf.DnfBasicTest.test_dnf_help'])
+    def test_dnf_history(self):
+        self.dnf('history')
+
+class DnfRepoTest(DnfTest):
+
+    @classmethod
+    def setUpClass(cls):
+        cls.repo_server = HTTPService(os.path.join(cls.tc.td['WORKDIR'], 'oe-testimage-repo'),
+                                      cls.tc.target.server_ip)
+        cls.repo_server.start()
+
+    @classmethod
+    def tearDownClass(cls):
+        cls.repo_server.stop()
+
+    def dnf_with_repo(self, command):
+        pkgarchs = os.listdir(os.path.join(self.tc.td['WORKDIR'], 'oe-testimage-repo'))
+        deploy_url = 'http://%s:%s/' %(self.target.server_ip, self.repo_server.port)
+        cmdlinerepoopts = ["--repofrompath=oe-testimage-repo-%s,%s%s" %(arch, deploy_url, arch) for arch in pkgarchs]
+
+        self.dnf(" ".join(cmdlinerepoopts) + " --nogpgcheck " + command)
+
+    @OETestDepends(['dnf.DnfBasicTest.test_dnf_help'])
+    def test_dnf_makecache(self):
+        self.dnf_with_repo('makecache')
+
+
+# Does not work when repo is specified on the command line
+#    @OETestDepends(['dnf.DnfRepoTest.test_dnf_makecache'])
+#    def test_dnf_repolist(self):
+#        self.dnf_with_repo('repolist')
+
+    @OETestDepends(['dnf.DnfRepoTest.test_dnf_makecache'])
+    def test_dnf_repoinfo(self):
+        self.dnf_with_repo('repoinfo')
+
+    @OETestDepends(['dnf.DnfRepoTest.test_dnf_makecache'])
+    def test_dnf_install(self):
+        self.dnf_with_repo('install -y run-postinsts-dev')
+
+    @OETestDepends(['dnf.DnfRepoTest.test_dnf_install'])
+    def test_dnf_install_dependency(self):
+        self.dnf_with_repo('remove -y run-postinsts')
+        self.dnf_with_repo('install -y run-postinsts-dev')
+
+    @OETestDepends(['dnf.DnfRepoTest.test_dnf_install_dependency'])
+    def test_dnf_install_from_disk(self):
+        self.dnf_with_repo('remove -y run-postinsts-dev')
+        self.dnf_with_repo('install -y --downloadonly run-postinsts-dev')
+        status, output = self.target.run('find /var/cache/dnf -name run-postinsts-dev*rpm', 1500)
+        self.assertEqual(status, 0, output)
+        self.dnf_with_repo('install -y %s' % output)
+
+    @OETestDepends(['dnf.DnfRepoTest.test_dnf_install_from_disk'])
+    def test_dnf_install_from_http(self):
+        output = subprocess.check_output('%s %s -name run-postinsts-dev*' % (bb.utils.which(os.getenv('PATH'), "find"),
+                                                                           self.tc.td['DEPLOY_DIR_RPM']), shell=True).decode("utf-8")
+        rpm_path = output.split("/")[-2] + "/" + output.split("/")[-1]
+        url = 'http://%s:%s/%s' %(self.target.server_ip, self.repo_server.port, rpm_path)
+        self.dnf_with_repo('remove -y run-postinsts-dev')
+        self.dnf_with_repo('install -y %s' % url)
+
+    @OETestDepends(['dnf.DnfRepoTest.test_dnf_install'])
+    def test_dnf_reinstall(self):
+        self.dnf_with_repo('reinstall -y run-postinsts-dev')
+
+
diff --git a/meta/lib/oeqa/runtime/cases/parselogs.py b/meta/lib/oeqa/runtime/cases/parselogs.py
index a53a3608bde..6e929469c4f 100644
--- a/meta/lib/oeqa/runtime/cases/parselogs.py
+++ b/meta/lib/oeqa/runtime/cases/parselogs.py
@@ -48,6 +48,7 @@ common_errors = [
     "stmmac_dvr_probe: warning: cannot get CSR clock",
     "error: couldn\'t mount because of unsupported optional features",
     "GPT: Use GNU Parted to correct GPT errors",
+    "Cannot set xattr user.Librepo.DownloadInProgress",
     ]
 
 video_related = [
diff --git a/meta/lib/oeqa/runtime/cases/rpm.py b/meta/lib/oeqa/runtime/cases/rpm.py
index 532fbf82ebf..05b94c7b40e 100644
--- a/meta/lib/oeqa/runtime/cases/rpm.py
+++ b/meta/lib/oeqa/runtime/cases/rpm.py
@@ -102,14 +102,15 @@ class RpmInstallRemoveTest(OERuntimeTestCase):
     @OETestDepends(['rpm.RpmInstallRemoveTest.test_rpm_remove'])
     def test_check_rpm_install_removal_log_file_size(self):
         """
-        Summary:     Check rpm install/removal log file size
-        Expected:    There should be some method to keep rpm log in a small size .
+        Summary:     Check that rpm writes into /var/log/messages
+        Expected:    There should be some RPM prefixed entries in the above file.
         Product:     BSPs
         Author:      Alexandru Georgescu <alexandru.c.georgescu@intel.com>
+        Author:      Alexander Kanavin <alexander.kanavin@intel.com>
         AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
         """
         db_files_cmd = 'ls /var/lib/rpm/__db.*'
-        get_log_size_cmd = "du /var/lib/rpm/log/log.* | awk '{print $1}'"
+        check_log_cmd = "grep RPM /var/log/messages | wc -l"
 
         # Make sure that some database files are under /var/lib/rpm as '__db.xxx'
         status, output = self.target.run(db_files_cmd)
@@ -129,13 +130,13 @@ class RpmInstallRemoveTest(OERuntimeTestCase):
             msg = 'Failed to remove rpm-doc package. Reason: {}'.format(output)
             self.assertEqual(0, status, msg=msg)
 
-        # Get the size of log file
-        status, output = self.target.run(get_log_size_cmd)
+        # if using systemd this should ensure all entries are flushed to /var
+        status, output = self.target.run("journalctl --sync")
+        # Get the amount of entries in the log file
+        status, output = self.target.run(check_log_cmd)
         msg = 'Failed to get the final size of the log file.'
         self.assertEqual(0, status, msg=msg)
 
-        # Compare each log size
-        for log_file_size in output:
-            msg = ('Log file size is greater that expected (~10MB), '
-                    'found {} bytes'.format(log_file_size))
-            self.assertLessEqual(int(log_file_size), 11264, msg=msg)
+        # Check that there's enough of them
+        self.assertGreaterEqual(int(output), 80,
+                                   'Cound not find sufficient amount of rpm entries in /var/log/messages, found {} entries'.format(output))
diff --git a/meta/lib/oeqa/runtime/cases/smart.py b/meta/lib/oeqa/runtime/cases/smart.py
deleted file mode 100644
index 79bd9c8af7a..00000000000
--- a/meta/lib/oeqa/runtime/cases/smart.py
+++ /dev/null
@@ -1,196 +0,0 @@
-import os
-import re
-import subprocess
-from oeqa.utils.httpserver import HTTPService
-
-from oeqa.runtime.case import OERuntimeTestCase
-from oeqa.core.decorator.depends import OETestDepends
-from oeqa.core.decorator.oeid import OETestID
-from oeqa.core.decorator.data import skipIfNotDataVar, skipIfNotFeature
-from oeqa.runtime.decorator.package import OEHasPackage
-
-class SmartTest(OERuntimeTestCase):
-
-    def smart(self, command, expected = 0):
-        command = 'smart %s' % command
-        status, output = self.target.run(command, 1500)
-        message = os.linesep.join([command, output])
-        self.assertEqual(status, expected, message)
-        self.assertFalse('Cannot allocate memory' in output, message)
-        return output
-
-class SmartBasicTest(SmartTest):
-
-    @skipIfNotFeature('package-management',
-                      'Test requires package-management to be in IMAGE_FEATURES')
-    @skipIfNotDataVar('IMAGE_PKGTYPE', 'rpm',
-                      'RPM is not the primary package manager')
-    @OEHasPackage(['smartpm'])
-    @OETestID(716)
-    @OETestDepends(['ssh.SSHTest.test_ssh'])
-    def test_smart_help(self):
-        self.smart('--help')
-
-    @OETestID(968)
-    @OETestDepends(['smart.SmartBasicTest.test_smart_help'])
-    def test_smart_version(self):
-        self.smart('--version')
-
-    @OETestID(721)
-    @OETestDepends(['smart.SmartBasicTest.test_smart_help'])
-    def test_smart_info(self):
-        self.smart('info python-smartpm')
-
-    @OETestID(421)
-    @OETestDepends(['smart.SmartBasicTest.test_smart_help'])
-    def test_smart_query(self):
-        self.smart('query python-smartpm')
-
-    @OETestID(720)
-    @OETestDepends(['smart.SmartBasicTest.test_smart_help'])
-    def test_smart_search(self):
-        self.smart('search python-smartpm')
-
-    @OETestID(722)
-    @OETestDepends(['smart.SmartBasicTest.test_smart_help'])
-    def test_smart_stats(self):
-        self.smart('stats')
-
-class SmartRepoTest(SmartTest):
-
-    @classmethod
-    def setUpClass(cls):
-        cls.repolist = []
-        cls.repo_server = HTTPService(cls.tc.td['WORKDIR'],
-                                      cls.tc.target.server_ip)
-        cls.repo_server.start()
-
-    @classmethod
-    def tearDownClass(cls):
-        cls.repo_server.stop()
-        for repo in cls.repolist:
-            cls.tc.target.run('smart channel -y --remove %s' % repo)
-
-    @OETestID(1143)
-    @OETestDepends(['smart.SmartBasicTest.test_smart_help'])
-    def test_smart_channel(self):
-        self.smart('channel', 1)
-
-    @OETestID(719)
-    @OETestDepends(['smart.SmartBasicTest.test_smart_help'])
-    def test_smart_channel_add(self):
-        image_pkgtype = self.tc.td['IMAGE_PKGTYPE']
-        deploy_url = 'http://%s:%s/%s' % (self.target.server_ip,
-                                          self.repo_server.port,
-                                          image_pkgtype)
-        pkgarchs = self.tc.td['PACKAGE_ARCHS'].replace("-","_").split()
-        archs = os.listdir(os.path.join(self.repo_server.root_dir,
-                                        image_pkgtype))
-        for arch in archs:
-            if arch in pkgarchs:
-                cmd = ('channel -y --add {a} type=rpm-md '
-                      'baseurl={u}/{a}'.format(a=arch, u=deploy_url))
-                self.smart(cmd)
-                self.repolist.append(arch)
-        self.smart('update')
-
-    @OETestID(969)
-    @OETestDepends(['smart.SmartBasicTest.test_smart_help'])
-    def test_smart_channel_help(self):
-        self.smart('channel --help')
-
-    @OETestID(970)
-    @OETestDepends(['smart.SmartBasicTest.test_smart_help'])
-    def test_smart_channel_list(self):
-        self.smart('channel --list')
-
-    @OETestID(971)
-    @OETestDepends(['smart.SmartBasicTest.test_smart_help'])
-    def test_smart_channel_show(self):
-        self.smart('channel --show')
-
-    @OETestID(717)
-    @OETestDepends(['smart.SmartBasicTest.test_smart_help'])
-    def test_smart_channel_rpmsys(self):
-        self.smart('channel --show rpmsys')
-        self.smart('channel --disable rpmsys')
-        self.smart('channel --enable rpmsys')
-
-    @OETestID(1144)
-    @OETestDepends(['smart.SmartRepoTest.test_smart_channel_add'])
-    def test_smart_install(self):
-        self.smart('remove -y psplash-default')
-        self.smart('install -y psplash-default')
-
-    @OETestID(728)
-    @OETestDepends(['smart.SmartRepoTest.test_smart_install'])
-    def test_smart_install_dependency(self):
-        self.smart('remove -y psplash')
-        self.smart('install -y psplash-default')
-
-    @OETestID(723)
-    @OETestDepends(['smart.SmartRepoTest.test_smart_channel_add'])
-    def test_smart_install_from_disk(self):
-        self.smart('remove -y psplash-default')
-        self.smart('download psplash-default')
-        self.smart('install -y ./psplash-default*')
-
-    @OETestID(725)
-    @OETestDepends(['smart.SmartRepoTest.test_smart_channel_add'])
-    def test_smart_install_from_http(self):
-        output = self.smart('download --urls psplash-default')
-        url = re.search('(http://.*/psplash-default.*\.rpm)', output)
-        self.assertTrue(url, msg="Couln't find download url in %s" % output)
-        self.smart('remove -y psplash-default')
-        self.smart('install -y %s' % url.group(0))
-
-    @OETestID(729)
-    @OETestDepends(['smart.SmartRepoTest.test_smart_install'])
-    def test_smart_reinstall(self):
-        self.smart('reinstall -y psplash-default')
-
-    @OETestID(727)
-    @OETestDepends(['smart.SmartRepoTest.test_smart_channel_add'])
-    def test_smart_remote_repo(self):
-        self.smart('update')
-        self.smart('install -y psplash')
-        self.smart('remove -y psplash')
-
-    @OETestID(726)
-    @OETestDepends(['smart.SmartBasicTest.test_smart_help'])
-    def test_smart_local_dir(self):
-        self.target.run('mkdir /tmp/myrpmdir')
-        self.smart('channel --add myrpmdir type=rpm-dir path=/tmp/myrpmdir -y')
-        self.target.run('cd /tmp/myrpmdir')
-        self.smart('download psplash')
-        output = self.smart('channel --list')
-        for i in output.split("\n"):
-            if ("rpmsys" != str(i)) and ("myrpmdir" != str(i)):
-                self.smart('channel --disable '+str(i))
-        self.target.run('cd $HOME')
-        self.smart('install psplash')
-        for i in output.split("\n"):
-            if ("rpmsys" != str(i)) and ("myrpmdir" != str(i)):
-                self.smart('channel --enable '+str(i))
-        self.smart('channel --remove myrpmdir -y')
-        self.target.run("rm -rf /tmp/myrpmdir")
-
-    @OETestID(718)
-    @OETestDepends(['smart.SmartBasicTest.test_smart_help'])
-    def test_smart_add_rpmdir(self):
-        self.target.run('mkdir /tmp/myrpmdir')
-        self.smart('channel --add myrpmdir type=rpm-dir path=/tmp/myrpmdir -y')
-        self.smart('channel --disable myrpmdir -y')
-        output = self.smart('channel --show myrpmdir')
-        self.assertTrue("disabled = yes" in output, msg="Failed to disable rpm dir")
-        self.smart('channel --enable  myrpmdir -y')
-        output = self.smart('channel --show myrpmdir')
-        self.assertFalse("disabled = yes" in output, msg="Failed to enable rpm dir")
-        self.smart('channel --remove myrpmdir -y')
-        self.target.run("rm -rf /tmp/myrpmdir")
-
-    @OETestID(731)
-    @OETestDepends(['smart.SmartRepoTest.test_smart_channel_add'])
-    def test_smart_remove_package(self):
-        self.smart('install -y psplash')
-        self.smart('remove -y psplash')
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 27/44] package_rpm.bbclass: instruct rpm to not remove the buildroot directory
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (25 preceding siblings ...)
  2017-03-10 11:24 ` [PATCH 26/44] testimage.bbclass: fix runtime test for rpm, port smart tests to dnf Alexander Kanavin
@ 2017-03-10 11:24 ` Alexander Kanavin
  2017-03-10 11:24 ` [PATCH 28/44] selftest: do not perform a full build in test_continue Alexander Kanavin
                   ` (17 subsequent siblings)
  44 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:24 UTC (permalink / raw)
  To: openembedded-core

This is the ${W}/package directory which may be reused in subsequent builds.

Also clean up various default directories rpm 4 creates.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/classes/package_rpm.bbclass | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 9b634e583b8..ff86dc87980 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -697,7 +697,7 @@ python do_package_rpm () {
     os.chmod(pkgwritedir, 0o755)
 
     cmd = rpmbuild
-    cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + " --buildroot " + pkgd
+    cmd = cmd + " --noclean --nodeps --short-circuit --target " + pkgarch + " --buildroot " + pkgd
     cmd = cmd + " --define '_topdir " + workdir + "' --define '_rpmdir " + pkgwritedir + "'"
     cmd = cmd + " --define '_builddir " + d.getVar('S') + "'"
     cmd = cmd + " --define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm'"
@@ -721,8 +721,11 @@ python do_package_rpm () {
         bb.build.exec_func('SBUILDSPEC', d)
     cmd = cmd + " -bb " + outspecfile
 
+    # rpm 4 creates various empty directories in _topdir, let's clean them up
+    cleanupcmd = "rm -rf %s/BUILDROOT %s/SOURCES %s/SPECS %s/SRPMS" % (workdir, workdir, workdir, workdir)
+
     # Build the rpm package!
-    d.setVar('BUILDSPEC', cmd + "\n")
+    d.setVar('BUILDSPEC', cmd + "\n" + cleanupcmd + "\n")
     d.setVarFlag('BUILDSPEC', 'func', '1')
     bb.build.exec_func('BUILDSPEC', d)
 
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 28/44] selftest: do not perform a full build in test_continue
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (26 preceding siblings ...)
  2017-03-10 11:24 ` [PATCH 27/44] package_rpm.bbclass: instruct rpm to not remove the buildroot directory Alexander Kanavin
@ 2017-03-10 11:24 ` Alexander Kanavin
  2017-03-10 11:24 ` [PATCH 29/44] selftest: update output checks in incremental image test to match what dnf prints Alexander Kanavin
                   ` (16 subsequent siblings)
  44 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:24 UTC (permalink / raw)
  To: openembedded-core

This was fetching and building the toolchain and everything else
against empty download dir and sstate cache, and so was enormously slow.
The test does not need that, it only checks that one fetch task fails and
another succeeds when using bitbake's -k option.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/lib/oeqa/selftest/bbtests.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/selftest/bbtests.py b/meta/lib/oeqa/selftest/bbtests.py
index 4d9eec130ad..09e3d0d8461 100644
--- a/meta/lib/oeqa/selftest/bbtests.py
+++ b/meta/lib/oeqa/selftest/bbtests.py
@@ -222,7 +222,7 @@ INHERIT_remove = \"report-error\"
         self.track_for_cleanup(os.path.join(self.builddir, "download-selftest"))
         self.write_recipeinc('man',"\ndo_fail_task () {\nexit 1 \n}\n\naddtask do_fail_task before do_fetch\n" )
         runCmd('bitbake -c cleanall man xcursor-transparent-theme')
-        result = runCmd('bitbake man xcursor-transparent-theme -k', ignore_status=True)
+        result = runCmd('bitbake -c unpack -k man xcursor-transparent-theme', ignore_status=True)
         errorpos = result.output.find('ERROR: Function failed: do_fail_task')
         manver = re.search("NOTE: recipe xcursor-transparent-theme-(.*?): task do_unpack: Started", result.output)
         continuepos = result.output.find('NOTE: recipe xcursor-transparent-theme-%s: task do_unpack: Started' % manver.group(1))
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 29/44] selftest: update output checks in incremental image test to match what dnf prints
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (27 preceding siblings ...)
  2017-03-10 11:24 ` [PATCH 28/44] selftest: do not perform a full build in test_continue Alexander Kanavin
@ 2017-03-10 11:24 ` Alexander Kanavin
  2017-03-10 11:24 ` [PATCH 30/44] byacc: remove the recipe Alexander Kanavin
                   ` (15 subsequent siblings)
  44 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:24 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/lib/oeqa/selftest/buildoptions.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oeqa/selftest/buildoptions.py b/meta/lib/oeqa/selftest/buildoptions.py
index 568882ba8f3..a97257e4177 100644
--- a/meta/lib/oeqa/selftest/buildoptions.py
+++ b/meta/lib/oeqa/selftest/buildoptions.py
@@ -22,12 +22,12 @@ class ImageOptionsTests(oeSelfTest):
         bitbake("core-image-minimal")
         log_data_file = os.path.join(get_bb_var("WORKDIR", "core-image-minimal"), "temp/log.do_rootfs")
         log_data_created = ftools.read_file(log_data_file)
-        incremental_created = re.search("NOTE: load old install solution for incremental install\nNOTE: old install solution not exist\nNOTE: creating new install solution for incremental install(\n.*)*NOTE: Installing the following packages:.*packagegroup-core-ssh-openssh", log_data_created)
+        incremental_created = re.search("Installing  : packagegroup-core-ssh-openssh", log_data_created)
         self.remove_config('IMAGE_FEATURES += "ssh-server-openssh"')
         self.assertTrue(incremental_created, msg = "Match failed in:\n%s" % log_data_created)
         bitbake("core-image-minimal")
         log_data_removed = ftools.read_file(log_data_file)
-        incremental_removed = re.search("NOTE: load old install solution for incremental install\nNOTE: creating new install solution for incremental install(\n.*)*NOTE: incremental removed:.*openssh-sshd-.*", log_data_removed)
+        incremental_removed = re.search("Erasing     : packagegroup-core-ssh-openssh", log_data_removed)
         self.assertTrue(incremental_removed, msg = "Match failed in:\n%s" % log_data_removed)
 
     @testcase(286)
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 30/44] byacc: remove the recipe
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (28 preceding siblings ...)
  2017-03-10 11:24 ` [PATCH 29/44] selftest: update output checks in incremental image test to match what dnf prints Alexander Kanavin
@ 2017-03-10 11:24 ` Alexander Kanavin
  2017-03-10 16:37   ` Mark Hatle
  2017-03-10 11:24 ` [PATCH 31/44] gpg_sign.py: fix signing of rpm files using gpg Alexander Kanavin
                   ` (14 subsequent siblings)
  44 siblings, 1 reply; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:24 UTC (permalink / raw)
  To: openembedded-core

It was used only by rpm5 and will be moved to meta-oe

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/recipes-extended/byacc/byacc.inc              |  22 ---
 .../0001-byacc-do-not-reorder-CC-and-CFLAGS.patch  | 161 ---------------------
 meta/recipes-extended/byacc/byacc/byacc-open.patch |  25 ----
 meta/recipes-extended/byacc/byacc_20161202.bb      |  12 --
 .../packagegroup-core-full-cmdline.bb              |   1 -
 5 files changed, 221 deletions(-)
 delete mode 100644 meta/recipes-extended/byacc/byacc.inc
 delete mode 100644 meta/recipes-extended/byacc/byacc/0001-byacc-do-not-reorder-CC-and-CFLAGS.patch
 delete mode 100644 meta/recipes-extended/byacc/byacc/byacc-open.patch
 delete mode 100644 meta/recipes-extended/byacc/byacc_20161202.bb

diff --git a/meta/recipes-extended/byacc/byacc.inc b/meta/recipes-extended/byacc/byacc.inc
deleted file mode 100644
index adb07193d73..00000000000
--- a/meta/recipes-extended/byacc/byacc.inc
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "Berkeley LALR Yacc parser generator"
-DESCRIPTION = "A parser generator utility that reads a grammar specification from a file and generates an LR(1) \
-parser for it.  The parsers consist of a set of LALR(1) parsing tables and a driver routine written in the C \
-programming language."
-SECTION = "devel"
-LICENSE = "PD"
-
-SRC_URI = "ftp://invisible-island.net/byacc/byacc-${PV}.tgz \
-           file://byacc-open.patch \
-           file://0001-byacc-do-not-reorder-CC-and-CFLAGS.patch"
-
-EXTRA_OECONF += "--program-transform-name='s,^,b,'"
-
-BBCLASSEXTEND = "native"
-
-inherit autotools
-
-do_configure() {
-	install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
-	install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
-	oe_runconf
-}
diff --git a/meta/recipes-extended/byacc/byacc/0001-byacc-do-not-reorder-CC-and-CFLAGS.patch b/meta/recipes-extended/byacc/byacc/0001-byacc-do-not-reorder-CC-and-CFLAGS.patch
deleted file mode 100644
index 7cd2510c8ed..00000000000
--- a/meta/recipes-extended/byacc/byacc/0001-byacc-do-not-reorder-CC-and-CFLAGS.patch
+++ /dev/null
@@ -1,161 +0,0 @@
-Subject: byacc: do not reorder $CC and $CFLAGS
-
-byacc tries to process $CC and decide which part should belong to CC and which
-part should below to CFLAGS and then do reordering. It doesn't make much sense
-for OE. And it doesn't do its work correctly. Some options are dropped.
-
-Delete all these stuff so that we could have all options we need.
-
-Upstream-Status: Inappropriate [OE Specific]
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- aclocal.m4 |   1 -
- configure  | 119 -------------------------------------------------------------
- 2 files changed, 120 deletions(-)
-
-diff --git a/aclocal.m4 b/aclocal.m4
-index 917a848..62ef241 100644
---- a/aclocal.m4
-+++ b/aclocal.m4
-@@ -1021,7 +1021,6 @@ CF_GCC_VERSION
- CF_ACVERSION_CHECK(2.52,
- 	[AC_PROG_CC_STDC],
- 	[CF_ANSI_CC_REQD])
--CF_CC_ENV_FLAGS
- ])dnl
- dnl ---------------------------------------------------------------------------
- dnl CF_PROG_GROFF version: 2 updated: 2015/07/04 11:16:27
-diff --git a/configure b/configure
-index 9707e50..4f0497c 100755
---- a/configure
-+++ b/configure
-@@ -1946,125 +1946,6 @@ esac
- # This should have been defined by AC_PROG_CC
- : ${CC:=cc}
- 
--echo "$as_me:1949: checking \$CC variable" >&5
--echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
--case "$CC" in
--(*[\ \	]-*)
--	echo "$as_me:1953: result: broken" >&5
--echo "${ECHO_T}broken" >&6
--	{ echo "$as_me:1955: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
--echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
--	# humor him...
--	cf_flags=`echo "$CC" | sed -e 's/^.*[ 	]\(-[^ 	]\)/\1/'`
--	CC=`echo "$CC " | sed -e 's/[ 	]-[^ 	].*$//' -e 's/[ 	]*$//'`
--	for cf_arg in $cf_flags
--	do
--		case "x$cf_arg" in
--		(x-[IUDfgOW]*)
--
--cf_fix_cppflags=no
--cf_new_cflags=
--cf_new_cppflags=
--cf_new_extra_cppflags=
--
--for cf_add_cflags in $cf_flags
--do
--case $cf_fix_cppflags in
--(no)
--	case $cf_add_cflags in
--	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
--		case $cf_add_cflags in
--		(-D*)
--			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
--
--			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
--				&& test -z "${cf_tst_cflags}" \
--				&& cf_fix_cppflags=yes
--
--			if test $cf_fix_cppflags = yes ; then
--				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
--				continue
--			elif test "${cf_tst_cflags}" = "\"'" ; then
--				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
--				continue
--			fi
--			;;
--		esac
--		case "$CPPFLAGS" in
--		(*$cf_add_cflags)
--			;;
--		(*)
--			case $cf_add_cflags in
--			(-D*)
--				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
--
--CPPFLAGS=`echo "$CPPFLAGS" | \
--	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
--		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
--
--				;;
--			esac
--			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
--			;;
--		esac
--		;;
--	(*)
--		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
--		;;
--	esac
--	;;
--(yes)
--	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
--
--	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
--
--	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
--		&& test -z "${cf_tst_cflags}" \
--		&& cf_fix_cppflags=no
--	;;
--esac
--done
--
--if test -n "$cf_new_cflags" ; then
--
--	CFLAGS="$CFLAGS $cf_new_cflags"
--fi
--
--if test -n "$cf_new_cppflags" ; then
--
--	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
--fi
--
--if test -n "$cf_new_extra_cppflags" ; then
--
--	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
--fi
--
--			;;
--		(*)
--			CC="$CC $cf_arg"
--			;;
--		esac
--	done
--	test -n "$verbose" && echo "	resulting CC: '$CC'" 1>&6
--
--echo "${as_me:-configure}:2051: testing resulting CC: '$CC' ..." 1>&5
--
--	test -n "$verbose" && echo "	resulting CFLAGS: '$CFLAGS'" 1>&6
--
--echo "${as_me:-configure}:2055: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
--
--	test -n "$verbose" && echo "	resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
--
--echo "${as_me:-configure}:2059: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
--
--	;;
--(*)
--	echo "$as_me:2063: result: ok" >&5
--echo "${ECHO_T}ok" >&6
--	;;
--esac
--
- echo "$as_me:2068: checking whether ${MAKE-make} sets \${MAKE}" >&5
- echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
- set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
--- 
-2.8.3
-
diff --git a/meta/recipes-extended/byacc/byacc/byacc-open.patch b/meta/recipes-extended/byacc/byacc/byacc-open.patch
deleted file mode 100644
index 005831130b3..00000000000
--- a/meta/recipes-extended/byacc/byacc/byacc-open.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Ubuntu defaults to passing _FORTIFY_SOURCE=2 which breaks byacc as it doesn't
-pass enough arguments to open():
-
- inlined from 'open_tmpfile' at byacc-20150711/main.c:588:5:
- /usr/include/x86_64-linux-gnu/bits/fcntl2.h:50:24: error: call to '__open_missing_mode' declared with attribute error:
- open with O_CREAT in second argument needs 3 arguments
-
-Add a mode of 0666 to fix this.
-
-Upstream-Status: Pending
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-diff --git a/main.c b/main.c
-index 620ce3f..82071a4 100644
---- a/main.c
-+++ b/main.c
-@@ -526,7 +526,7 @@ my_mkstemp(char *temp)
-     }
-     if ((name = tempnam(dname, fname)) != 0)
-     {
--	fd = open(name, O_CREAT | O_EXCL | O_RDWR);
-+      fd = open(name, O_CREAT | O_EXCL | O_RDWR, 0666);
- 	strcpy(temp, name);
-     }
-     else
diff --git a/meta/recipes-extended/byacc/byacc_20161202.bb b/meta/recipes-extended/byacc/byacc_20161202.bb
deleted file mode 100644
index 755f8ab515c..00000000000
--- a/meta/recipes-extended/byacc/byacc_20161202.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-# Sigh. This is one of those places where everyone licenses it differently. Someone
-# even apply UCB to it (Free/Net/OpenBSD). The maintainer states that:
-# "I've found no reliable source which states that byacc must bear a UCB copyright."
-# Setting to PD as this is what the upstream has it as.
-
-LICENSE = "PD"
-LIC_FILES_CHKSUM = "file://package/debian/copyright;md5=74533d32ffd38bca4cbf1f1305f8bc60"
-require byacc.inc
-
-
-SRC_URI[md5sum] = "48ef38447f2cc864c70ef864b26cf817"
-SRC_URI[sha256sum] = "30dc58cfcdb708eea7ba022db29b41d2d392f20727491b956954366f2f2117f0"
diff --git a/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb b/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb
index d8975f21572..9379fb91998 100644
--- a/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb
+++ b/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb
@@ -110,7 +110,6 @@ RDEPENDS_packagegroup-core-full-cmdline-extended = "\
     "
 
 RDEPENDS_packagegroup-core-full-cmdline-dev-utils = "\
-    byacc \
     diffutils \
     m4 \
     make \
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 31/44] gpg_sign.py: fix signing of rpm files using gpg
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (29 preceding siblings ...)
  2017-03-10 11:24 ` [PATCH 30/44] byacc: remove the recipe Alexander Kanavin
@ 2017-03-10 11:24 ` Alexander Kanavin
  2017-03-10 11:24 ` [PATCH 32/44] oe-selftest: no need to parse gpg output to determine the name of the signing key Alexander Kanavin
                   ` (13 subsequent siblings)
  44 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:24 UTC (permalink / raw)
  To: openembedded-core

This means
a) calling rpmkeys and rpmsign instead of rpm
b) instructing gpg to run non-interactively; otherwise on my machine
it pops up windows requesting a key passphrase

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/lib/oe/gpg_sign.py           | 7 ++++---
 meta/lib/oeqa/selftest/signing.py | 8 ++++----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/meta/lib/oe/gpg_sign.py b/meta/lib/oe/gpg_sign.py
index f7f96c6d5e3..7ce767ee0a0 100644
--- a/meta/lib/oe/gpg_sign.py
+++ b/meta/lib/oe/gpg_sign.py
@@ -11,7 +11,7 @@ class LocalSigner(object):
                   bb.utils.which(os.getenv('PATH'), 'gpg')
         self.gpg_path = d.getVar('GPG_PATH')
         self.gpg_version = self.get_gpg_version()
-        self.rpm_bin = bb.utils.which(os.getenv('PATH'), "rpm")
+        self.rpm_bin = bb.utils.which(os.getenv('PATH'), "rpmsign")
 
     def export_pubkey(self, output_file, keyid, armor=True):
         """Export GPG public key to a file"""
@@ -31,9 +31,10 @@ class LocalSigner(object):
         """Sign RPM files"""
 
         cmd = self.rpm_bin + " --addsign --define '_gpg_name %s'  " % keyid
-        cmd += "--define '_gpg_passphrase %s' " % passphrase
+        gpg_args = '--batch --passphrase=%s' % passphrase
         if self.gpg_version > (2,1,):
-            cmd += "--define '_gpg_sign_cmd_extra_args --pinentry-mode=loopback' "
+            gpg_args += ' --pinentry-mode=loopback'
+        cmd += "--define '_gpg_sign_cmd_extra_args %s' " % gpg_args
         if self.gpg_bin:
             cmd += "--define '%%__gpg %s' " % self.gpg_bin
         if self.gpg_path:
diff --git a/meta/lib/oeqa/selftest/signing.py b/meta/lib/oeqa/selftest/signing.py
index 006afbef15a..a9b135aab44 100644
--- a/meta/lib/oeqa/selftest/signing.py
+++ b/meta/lib/oeqa/selftest/signing.py
@@ -27,7 +27,7 @@ class Signing(oeSelfTest):
         cls.pub_key_path = os.path.join(cls.testlayer_path, 'files', 'signing', "key.pub")
         cls.secret_key_path = os.path.join(cls.testlayer_path, 'files', 'signing', "key.secret")
 
-        runCmd('gpg --homedir %s --import %s %s' % (cls.gpg_dir, cls.pub_key_path, cls.secret_key_path))
+        runCmd('gpg --batch --homedir %s --import %s %s' % (cls.gpg_dir, cls.pub_key_path, cls.secret_key_path))
 
     @testcase(1362)
     def test_signing_packages(self):
@@ -76,13 +76,13 @@ class Signing(oeSelfTest):
         # Use a temporary rpmdb
         rpmdb = tempfile.mkdtemp(prefix='oeqa-rpmdb')
 
-        runCmd('%s/rpm --define "_dbpath %s" --import %s' %
+        runCmd('%s/rpmkeys --define "_dbpath %s" --import %s' %
                (staging_bindir_native, rpmdb, self.pub_key_path))
 
-        ret = runCmd('%s/rpm --define "_dbpath %s" --checksig %s' %
+        ret = runCmd('%s/rpmkeys --define "_dbpath %s" --checksig %s' %
                      (staging_bindir_native, rpmdb, pkg_deploy))
         # tmp/deploy/rpm/i586/ed-1.9-r0.i586.rpm: rsa sha1 md5 OK
-        self.assertIn('rsa sha1 md5 OK', ret.output, 'Package signed incorrectly.')
+        self.assertIn('rsa sha1 (md5) pgp md5 OK', ret.output, 'Package signed incorrectly.')
         shutil.rmtree(rpmdb)
 
     @testcase(1382)
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 32/44] oe-selftest: no need to parse gpg output to determine the name of the signing key
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (30 preceding siblings ...)
  2017-03-10 11:24 ` [PATCH 31/44] gpg_sign.py: fix signing of rpm files using gpg Alexander Kanavin
@ 2017-03-10 11:24 ` Alexander Kanavin
  2017-03-10 11:24 ` [PATCH 33/44] run-postinsts: simplify the logic of whether to install it to images Alexander Kanavin
                   ` (12 subsequent siblings)
  44 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:24 UTC (permalink / raw)
  To: openembedded-core

The parsing fails on my machine, and we use a key with a hardcoded name,
and so can provide it directly.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/lib/oeqa/selftest/signing.py | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/meta/lib/oeqa/selftest/signing.py b/meta/lib/oeqa/selftest/signing.py
index a9b135aab44..38b2fca8cf9 100644
--- a/meta/lib/oeqa/selftest/signing.py
+++ b/meta/lib/oeqa/selftest/signing.py
@@ -103,13 +103,7 @@ class Signing(oeSelfTest):
         self.add_command_to_tearDown('bitbake -c clean %s' % test_recipe)
         self.add_command_to_tearDown('rm -rf %s' % sstatedir)
 
-        # Determine the pub key signature
-        ret = runCmd('gpg --homedir %s --list-keys' % self.gpg_dir)
-        pub_key = re.search(r'^pub\s+\S+/(\S+)\s+', ret.output, re.M)
-        self.assertIsNotNone(pub_key, 'Failed to determine the public key signature.')
-        pub_key = pub_key.group(1)
-
-        feature = 'SSTATE_SIG_KEY ?= "%s"\n' % pub_key
+        feature = 'SSTATE_SIG_KEY ?= "testuser"\n'
         feature += 'SSTATE_SIG_PASSPHRASE ?= "test123"\n'
         feature += 'SSTATE_VERIFY_SIG ?= "1"\n'
         feature += 'GPG_PATH = "%s"\n' % self.gpg_dir
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 33/44] run-postinsts: simplify the logic of whether to install it to images
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (31 preceding siblings ...)
  2017-03-10 11:24 ` [PATCH 32/44] oe-selftest: no need to parse gpg output to determine the name of the signing key Alexander Kanavin
@ 2017-03-10 11:24 ` Alexander Kanavin
  2017-03-10 11:24 ` [PATCH 34/44] package_rpm.bbclass: add a /bin/sh Provides for nativesdk- packages Alexander Kanavin
                   ` (11 subsequent siblings)
  44 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:24 UTC (permalink / raw)
  To: openembedded-core

The logic is scattered all over the place, but amounts to
"install, unless the rootfs is read only". Let's express that directly.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta-selftest/recipes-test/images/oe-selftest-image.bb | 2 +-
 meta-selftest/recipes-test/images/wic-image-minimal.bb | 2 +-
 meta/classes/image.bbclass                             | 2 +-
 meta/classes/rootfs_deb.bbclass                        | 1 -
 meta/classes/rootfs_ipk.bbclass                        | 1 -
 meta/classes/rootfs_rpm.bbclass                        | 1 -
 meta/lib/oe/manifest.py                                | 2 +-
 meta/recipes-core/images/core-image-minimal.bb         | 2 +-
 meta/recipes-devtools/dpkg/dpkg.inc                    | 2 +-
 meta/recipes-devtools/opkg/opkg_0.3.4.bb               | 2 +-
 10 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/meta-selftest/recipes-test/images/oe-selftest-image.bb b/meta-selftest/recipes-test/images/oe-selftest-image.bb
index f17094c5d08..5d4d10eef69 100644
--- a/meta-selftest/recipes-test/images/oe-selftest-image.bb
+++ b/meta-selftest/recipes-test/images/oe-selftest-image.bb
@@ -1,6 +1,6 @@
 SUMMARY = "An image used during oe-selftest tests"
 
-IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP} dropbear"
+IMAGE_INSTALL = "packagegroup-core-boot dropbear"
 IMAGE_FEATURES = "debug-tweaks"
 
 IMAGE_LINGUAS = " "
diff --git a/meta-selftest/recipes-test/images/wic-image-minimal.bb b/meta-selftest/recipes-test/images/wic-image-minimal.bb
index b687935c496..95946971c2c 100644
--- a/meta-selftest/recipes-test/images/wic-image-minimal.bb
+++ b/meta-selftest/recipes-test/images/wic-image-minimal.bb
@@ -2,7 +2,7 @@ SUMMARY = "An example of partitioned image."
 
 SRC_URI = "file://${FILE_DIRNAME}/${BPN}.wks"
 
-IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP}"
+IMAGE_INSTALL = "packagegroup-core-boot"
 
 IMAGE_FSTYPES = "wic"
 
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 127e62d5d95..405fd73c043 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -29,7 +29,7 @@ IMAGE_FEATURES[validitems] += "debug-tweaks read-only-rootfs empty-root-password
 IMAGE_GEN_DEBUGFS ?= "0"
 
 # rootfs bootstrap install
-ROOTFS_BOOTSTRAP_INSTALL = "${@bb.utils.contains("IMAGE_FEATURES", "package-management", "", "${ROOTFS_PKGMANAGE_BOOTSTRAP}",d)}"
+ROOTFS_BOOTSTRAP_INSTALL = "run-postinsts"
 
 # These packages will be removed from a read-only rootfs after all other
 # packages have been installed
diff --git a/meta/classes/rootfs_deb.bbclass b/meta/classes/rootfs_deb.bbclass
index e8facd43687..10af4b5ff0f 100644
--- a/meta/classes/rootfs_deb.bbclass
+++ b/meta/classes/rootfs_deb.bbclass
@@ -3,7 +3,6 @@
 #
 
 ROOTFS_PKGMANAGE = "dpkg apt"
-ROOTFS_PKGMANAGE_BOOTSTRAP  = "run-postinsts"
 
 do_rootfs[depends] += "dpkg-native:do_populate_sysroot apt-native:do_populate_sysroot"
 do_populate_sdk[depends] += "dpkg-native:do_populate_sysroot apt-native:do_populate_sysroot bzip2-native:do_populate_sysroot"
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index 6b60c466386..a57b1d34f7b 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -7,7 +7,6 @@
 
 EXTRAOPKGCONFIG ?= ""
 ROOTFS_PKGMANAGE = "opkg ${EXTRAOPKGCONFIG}"
-ROOTFS_PKGMANAGE_BOOTSTRAP  = "run-postinsts"
 
 do_rootfs[depends] += "opkg-native:do_populate_sysroot opkg-utils-native:do_populate_sysroot"
 do_populate_sdk[depends] += "opkg-native:do_populate_sysroot opkg-utils-native:do_populate_sysroot"
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index 65881a60a7b..af0f23877ac 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -3,7 +3,6 @@
 #
 
 ROOTFS_PKGMANAGE = "rpm dnf"
-ROOTFS_PKGMANAGE_BOOTSTRAP = "run-postinsts"
 
 # dnf is using our custom distutils, and so will fail without these
 export STAGING_INCDIR
diff --git a/meta/lib/oe/manifest.py b/meta/lib/oe/manifest.py
index 6ec9b1af8bc..60c49be0e99 100644
--- a/meta/lib/oe/manifest.py
+++ b/meta/lib/oe/manifest.py
@@ -104,7 +104,7 @@ class Manifest(object, metaclass=ABCMeta):
             pkg_list['lgp'] = \
                 "locale-base-en-us locale-base-en-gb"
         elif image_rootfs.find("core-image-minimal") > 0:
-            pkg_list[self.PKG_TYPE_MUST_INSTALL] = "run-postinsts packagegroup-core-boot"
+            pkg_list[self.PKG_TYPE_MUST_INSTALL] = "packagegroup-core-boot"
 
         with open(self.initial_manifest, "w+") as manifest:
             manifest.write(self.initial_manifest_file_header)
diff --git a/meta/recipes-core/images/core-image-minimal.bb b/meta/recipes-core/images/core-image-minimal.bb
index 8dd77b3472e..4630026aa9d 100644
--- a/meta/recipes-core/images/core-image-minimal.bb
+++ b/meta/recipes-core/images/core-image-minimal.bb
@@ -1,6 +1,6 @@
 SUMMARY = "A small image just capable of allowing a device to boot."
 
-IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP} ${CORE_IMAGE_EXTRA_INSTALL}"
+IMAGE_INSTALL = "packagegroup-core-boot ${CORE_IMAGE_EXTRA_INSTALL}"
 
 IMAGE_LINGUAS = " "
 
diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc
index bd1fc9ec799..6abe3ae0626 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -4,7 +4,7 @@ SECTION = "base"
 
 DEPENDS = "zlib bzip2 perl ncurses"
 DEPENDS_class-native = "bzip2-replacement-native zlib-native virtual/update-alternatives-native gettext-native perl-native"
-RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} xz run-postinsts perl"
+RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} xz perl"
 RDEPENDS_${PN}_class-native = "xz-native"
 
 UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/dpkg/"
diff --git a/meta/recipes-devtools/opkg/opkg_0.3.4.bb b/meta/recipes-devtools/opkg/opkg_0.3.4.bb
index 6ac94382683..24151899098 100644
--- a/meta/recipes-devtools/opkg/opkg_0.3.4.bb
+++ b/meta/recipes-devtools/opkg/opkg_0.3.4.bb
@@ -59,7 +59,7 @@ do_install_append () {
 	fi
 }
 
-RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config run-postinsts libarchive"
+RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config libarchive"
 RDEPENDS_${PN}_class-native = ""
 RDEPENDS_${PN}_class-nativesdk = ""
 RREPLACES_${PN} = "opkg-nogpg opkg-collateral"
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 34/44] package_rpm.bbclass: add a /bin/sh Provides for nativesdk- packages
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (32 preceding siblings ...)
  2017-03-10 11:24 ` [PATCH 33/44] run-postinsts: simplify the logic of whether to install it to images Alexander Kanavin
@ 2017-03-10 11:24 ` Alexander Kanavin
  2017-03-10 16:54   ` Mark Hatle
  2017-03-10 11:24 ` [PATCH 35/44] security_flags.inc: update to reflect smart->dnf transition Alexander Kanavin
                   ` (10 subsequent siblings)
  44 siblings, 1 reply; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:24 UTC (permalink / raw)
  To: openembedded-core

nativesdk-* rpm packages all require /bin/sh because postinst scriptlets
are run with it. We can either teach rpm4 and dnf to ignore that dependency
(a lot of non-upstreamable work), or add auto-satisfy the dependency
in each package. I've chosen to do the latter.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/classes/package_rpm.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index ff86dc87980..2cdaae0ff25 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -560,7 +560,7 @@ python write_specfile () {
 
     print_deps(srcrrecommends, "Recommends", spec_preamble_top, d)
     print_deps(srcrsuggests, "Suggests", spec_preamble_top, d)
-    print_deps(srcrprovides, "Provides", spec_preamble_top, d)
+    print_deps(srcrprovides + (" /bin/sh" if srcname.startswith("nativesdk-") else ""), "Provides", spec_preamble_top, d)
     print_deps(srcrobsoletes, "Obsoletes", spec_preamble_top, d)
     
     # conflicts can not be in a provide!  We will need to filter it.
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 35/44] security_flags.inc: update to reflect smart->dnf transition
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (33 preceding siblings ...)
  2017-03-10 11:24 ` [PATCH 34/44] package_rpm.bbclass: add a /bin/sh Provides for nativesdk- packages Alexander Kanavin
@ 2017-03-10 11:24 ` Alexander Kanavin
  2017-03-10 11:24 ` [PATCH 36/44] package_rpm.bbclass: do not set the OS dynamically when building rpms Alexander Kanavin
                   ` (9 subsequent siblings)
  44 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:24 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/conf/distro/include/security_flags.inc | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/meta/conf/distro/include/security_flags.inc b/meta/conf/distro/include/security_flags.inc
index 5a1cbb13192..b0a775450fe 100644
--- a/meta/conf/distro/include/security_flags.inc
+++ b/meta/conf/distro/include/security_flags.inc
@@ -72,14 +72,13 @@ SECURITY_CFLAGS_pn-openssl = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-opensp = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-ppp = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-python = "${SECURITY_NO_PIE_CFLAGS}"
+SECURITY_CFLAGS_pn-python-backports-lzma = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-python-pycurl = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-python-smartpm = "${SECURITY_NO_PIE_CFLAGS}"
+SECURITY_CFLAGS_pn-python-pygpgme = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-python-numpy = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-python3-numpy = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-python3-pycairo = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-python3 = "${SECURITY_NO_PIE_CFLAGS}"
-# Revert RPM to using internally supported values
-SECURITY_CFLAGS_pn-rpm = "${lcl_maybe_fortify} -fstack-protector"
 SECURITY_CFLAGS_pn-syslinux = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-slang = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-source-highlight = "${SECURITY_NO_PIE_CFLAGS}"
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 36/44] package_rpm.bbclass: do not set the OS dynamically when building rpms
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (34 preceding siblings ...)
  2017-03-10 11:24 ` [PATCH 35/44] security_flags.inc: update to reflect smart->dnf transition Alexander Kanavin
@ 2017-03-10 11:24 ` Alexander Kanavin
  2017-03-10 16:57   ` Mark Hatle
  2017-03-10 11:24 ` [PATCH 37/44] nspr: do not use shared library symbol resolution with musl Alexander Kanavin
                   ` (8 subsequent siblings)
  44 siblings, 1 reply; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:24 UTC (permalink / raw)
  To: openembedded-core

Packages need to contain just one value for the os field, otherwise
rpm will refuse to install them if they don't match what is in
/etc/rpm/platform.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/classes/package_rpm.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 2cdaae0ff25..4f4f8e4e11c 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -692,7 +692,7 @@ python do_package_rpm () {
     pkgwritedir = d.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH_EXTEND}')
     d.setVar('RPM_PKGWRITEDIR', pkgwritedir)
     bb.debug(1, 'PKGWRITEDIR: %s' % d.getVar('RPM_PKGWRITEDIR'))
-    pkgarch = d.expand('${PACKAGE_ARCH_EXTEND}${HOST_VENDOR}-${HOST_OS}')
+    pkgarch = d.expand('${PACKAGE_ARCH_EXTEND}${HOST_VENDOR}-linux')
     bb.utils.mkdirhier(pkgwritedir)
     os.chmod(pkgwritedir, 0o755)
 
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 37/44] nspr: do not use shared library symbol resolution with musl
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (35 preceding siblings ...)
  2017-03-10 11:24 ` [PATCH 36/44] package_rpm.bbclass: do not set the OS dynamically when building rpms Alexander Kanavin
@ 2017-03-10 11:24 ` Alexander Kanavin
  2017-03-10 11:24 ` [PATCH 38/44] package_rpm.bbclass: do not strip multilib prefixes from package names, do not add multilib prefix to package arch Alexander Kanavin
                   ` (7 subsequent siblings)
  44 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:24 UTC (permalink / raw)
  To: openembedded-core

It breaks rpm 4.x because musl is printing an error message
when the symbol is not found, and rpm takes it as an actual error.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/recipes-support/nspr/nspr_4.13.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-support/nspr/nspr_4.13.1.bb b/meta/recipes-support/nspr/nspr_4.13.1.bb
index 343800c80fc..9c15a8b40ba 100644
--- a/meta/recipes-support/nspr/nspr_4.13.1.bb
+++ b/meta/recipes-support/nspr/nspr_4.13.1.bb
@@ -16,7 +16,7 @@ SRC_URI = "http://ftp.mozilla.org/pub/nspr/releases/v${PV}/src/nspr-${PV}.tar.gz
 CACHED_CONFIGUREVARS_append_libc-musl = " CFLAGS='${CFLAGS} -D_PR_POLL_AVAILABLE \
                                           -D_PR_HAVE_OFF64_T -D_PR_INET6 -D_PR_HAVE_INET_NTOP \
                                           -D_PR_HAVE_GETHOSTBYNAME2 -D_PR_HAVE_GETADDRINFO \
-                                          -D_PR_INET6_PROBE'"
+                                          -D_PR_INET6_PROBE -DNO_DLOPEN_NULL'"
 
 UPSTREAM_CHECK_URI = "http://ftp.mozilla.org/pub/nspr/releases/"
 UPSTREAM_CHECK_REGEX = "v(?P<pver>\d+(\.\d+)+)/"
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 38/44] package_rpm.bbclass: do not strip multilib prefixes from package names, do not add multilib prefix to package arch
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (36 preceding siblings ...)
  2017-03-10 11:24 ` [PATCH 37/44] nspr: do not use shared library symbol resolution with musl Alexander Kanavin
@ 2017-03-10 11:24 ` Alexander Kanavin
  2017-03-10 17:04   ` Mark Hatle
  2017-03-10 11:24 ` [PATCH 39/44] package.bbclass: don't exclude package groups from runtime mapping Alexander Kanavin
                   ` (6 subsequent siblings)
  44 siblings, 1 reply; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:24 UTC (permalink / raw)
  To: openembedded-core

This is done for reasons I cannot establish, and greatly complicates the code
that installs packages into rootfs.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/classes/package_rpm.bbclass | 55 ++++++++--------------------------------
 1 file changed, 11 insertions(+), 44 deletions(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 4f4f8e4e11c..07ab5cdd9e0 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -101,27 +101,6 @@ python write_specfile () {
                 os.chown(f, 0, 0)
                 spec_preamble_top.append('Source%s: %s' % (source_number, source))
                 source_number += 1
-    # We need a simple way to remove the MLPREFIX from the package name,
-    # and dependency information...
-    def strip_multilib(name, d):
-        multilibs = d.getVar('MULTILIBS') or ""
-        for ext in multilibs.split():
-            eext = ext.split(':')
-            if len(eext) > 1 and eext[0] == 'multilib' and name and name.find(eext[1] + '-') >= 0:
-                name = "".join(name.split(eext[1] + '-'))
-        return name
-
-    def strip_multilib_deps(deps, d):
-        depends = bb.utils.explode_dep_versions2(deps or "")
-        newdeps = {}
-        for dep in depends:
-            newdeps[strip_multilib(dep, d)] = depends[dep]
-        return bb.utils.join_deps(newdeps)
-
-#        ml = d.getVar("MLPREFIX")
-#        if ml and name and len(ml) != 0 and name.find(ml) == 0:
-#            return ml.join(name.split(ml, 1)[1:])
-#        return name
 
     # In RPM, dependencies are of the format: pkg <>= Epoch:Version-Release
     # This format is similar to OE, however there are restrictions on the
@@ -283,7 +262,7 @@ python write_specfile () {
         bb.fatal("No OUTSPECFILE")
 
     # Construct the SPEC file...
-    srcname    = strip_multilib(d.getVar('PN'), d)
+    srcname    = d.getVar('PN')
     srcsummary = (d.getVar('SUMMARY') or d.getVar('DESCRIPTION') or ".")
     srcversion = d.getVar('PKGV').replace('-', '+')
     srcrelease = d.getVar('PKGR')
@@ -295,7 +274,7 @@ python write_specfile () {
     srcdescription = d.getVar('DESCRIPTION') or "."
     srccustomtagschunk = get_package_additional_metadata("rpm", d)
 
-    srcdepends     = strip_multilib_deps(d.getVar('DEPENDS'), d)
+    srcdepends     = d.getVar('DEPENDS')
     srcrdepends    = []
     srcrrecommends = []
     srcrsuggests   = []
@@ -340,7 +319,7 @@ python write_specfile () {
         if dirfiles is not None:
             dirfiles = dirfiles.split()
 
-        splitname    = strip_multilib(pkgname, d)
+        splitname    = pkgname
 
         splitsummary = (localdata.getVar('SUMMARY') or localdata.getVar('DESCRIPTION') or ".")
         splitversion = (localdata.getVar('PKGV') or "").replace('-', '+')
@@ -361,12 +340,12 @@ python write_specfile () {
         # Map the dependencies into their final form
         mapping_rename_hook(localdata)
 
-        splitrdepends    = strip_multilib_deps(localdata.getVar('RDEPENDS'), d)
-        splitrrecommends = strip_multilib_deps(localdata.getVar('RRECOMMENDS'), d)
-        splitrsuggests   = strip_multilib_deps(localdata.getVar('RSUGGESTS'), d)
-        splitrprovides   = strip_multilib_deps(localdata.getVar('RPROVIDES'), d)
-        splitrreplaces   = strip_multilib_deps(localdata.getVar('RREPLACES'), d)
-        splitrconflicts  = strip_multilib_deps(localdata.getVar('RCONFLICTS'), d)
+        splitrdepends    = localdata.getVar('RDEPENDS')
+        splitrrecommends = localdata.getVar('RRECOMMENDS')
+        splitrsuggests   = localdata.getVar('RSUGGESTS')
+        splitrprovides   = localdata.getVar('RPROVIDES')
+        splitrreplaces   = localdata.getVar('RREPLACES')
+        splitrconflicts  = localdata.getVar('RCONFLICTS')
         splitrobsoletes  = []
 
         splitrpreinst  = localdata.getVar('pkg_preinst')
@@ -640,14 +619,6 @@ python write_specfile () {
 write_specfile[vardepsexclude] = "OVERRIDES"
 
 python do_package_rpm () {
-    # We need a simple way to remove the MLPREFIX from the package name,
-    # and dependency information...
-    def strip_multilib(name, d):
-        ml = d.getVar("MLPREFIX")
-        if ml and name and len(ml) != 0 and name.find(ml) >= 0:
-            return "".join(name.split(ml))
-        return name
-
     workdir = d.getVar('WORKDIR')
     tmpdir = d.getVar('TMPDIR')
     pkgd = d.getVar('PKGD')
@@ -665,7 +636,7 @@ python do_package_rpm () {
     # If the spec file already exist, and has not been stored into 
     # pseudo's files.db, it maybe cause rpmbuild src.rpm fail,
     # so remove it before doing rpmbuild src.rpm.
-    srcname    = strip_multilib(d.getVar('PN'), d)
+    srcname    = d.getVar('PN')
     outspecfile = workdir + "/" + srcname + ".spec"
     if os.path.isfile(outspecfile):
         os.remove(outspecfile)
@@ -684,11 +655,7 @@ python do_package_rpm () {
     # Let's not fight against this.
     package_arch = (d.getVar('PACKAGE_ARCH') or "").replace("-", "_").replace("all", "noarch")
     sdkpkgsuffix = (d.getVar('SDKPKGSUFFIX') or "nativesdk").replace("-", "_")
-    if package_arch not in "all any noarch".split() and not package_arch.endswith(sdkpkgsuffix):
-        ml_prefix = (d.getVar('MLPREFIX') or "").replace("-", "_")
-        d.setVar('PACKAGE_ARCH_EXTEND', ml_prefix + package_arch)
-    else:
-        d.setVar('PACKAGE_ARCH_EXTEND', package_arch)
+    d.setVar('PACKAGE_ARCH_EXTEND', package_arch)
     pkgwritedir = d.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH_EXTEND}')
     d.setVar('RPM_PKGWRITEDIR', pkgwritedir)
     bb.debug(1, 'PKGWRITEDIR: %s' % d.getVar('RPM_PKGWRITEDIR'))
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 39/44] package.bbclass: don't exclude package groups from runtime mapping
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (37 preceding siblings ...)
  2017-03-10 11:24 ` [PATCH 38/44] package_rpm.bbclass: do not strip multilib prefixes from package names, do not add multilib prefix to package arch Alexander Kanavin
@ 2017-03-10 11:24 ` Alexander Kanavin
  2017-03-10 17:12   ` Mark Hatle
  2017-03-10 11:24 ` [PATCH 40/44] glibc: do the multilib_header magic also for bits/long-double.h Alexander Kanavin
                   ` (5 subsequent siblings)
  44 siblings, 1 reply; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:24 UTC (permalink / raw)
  To: openembedded-core

This ensures that remapping happens correctly, particularly
when package groups list noarch packages, and multilib is in use. Previously
this was masked by rpm doing *another* layer of remapping on top of this.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/classes/package.bbclass | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index f4c2b5514c5..48fef97251b 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -479,9 +479,6 @@ def get_package_additional_metadata (pkg_type, d):
 def runtime_mapping_rename (varname, pkg, d):
     #bb.note("%s before: %s" % (varname, d.getVar(varname)))
 
-    if bb.data.inherits_class('packagegroup', d):
-        return
-
     new_depends = {}
     deps = bb.utils.explode_dep_versions2(d.getVar(varname) or "")
     for depend in deps:
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 40/44] glibc: do the multilib_header magic also for bits/long-double.h
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (38 preceding siblings ...)
  2017-03-10 11:24 ` [PATCH 39/44] package.bbclass: don't exclude package groups from runtime mapping Alexander Kanavin
@ 2017-03-10 11:24 ` Alexander Kanavin
  2017-03-10 11:24 ` [PATCH 41/44] bash: package bashbug separately Alexander Kanavin
                   ` (4 subsequent siblings)
  44 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:24 UTC (permalink / raw)
  To: openembedded-core

Otherwise it will cause conflicts in mutlilib setting, as it
varies from one machine to another.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/recipes-core/glibc/glibc-package.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc
index a674c237993..5316bb1fdbf 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -82,7 +82,7 @@ do_install_append () {
 		rmdir --ignore-fail-on-non-empty ${D}${libexecdir}
 	fi
 
-	oe_multilib_header bits/syscall.h
+	oe_multilib_header bits/syscall.h bits/long-double.h
 
 	if [ -f ${D}${bindir}/mtrace ]; then
 		sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' -e '2s,exec.*perl,exec ${USRBINPATH}/env perl,' ${D}${bindir}/mtrace
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 41/44] bash: package bashbug separately
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (39 preceding siblings ...)
  2017-03-10 11:24 ` [PATCH 40/44] glibc: do the multilib_header magic also for bits/long-double.h Alexander Kanavin
@ 2017-03-10 11:24 ` Alexander Kanavin
  2017-03-10 17:13   ` Mark Hatle
  2017-03-10 11:24 ` [PATCH 42/44] db: do the multilib_header processing for db.h Alexander Kanavin
                   ` (3 subsequent siblings)
  44 siblings, 1 reply; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:24 UTC (permalink / raw)
  To: openembedded-core

It's a machine-specific script, which is causing conflicts
when multiple versions of bash are installed in multilib setting,
and it also does not really make sense for embedded systems anyway.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/recipes-extended/bash/bash.inc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes-extended/bash/bash.inc
index a05b987b87b..3e9c6625693 100644
--- a/meta/recipes-extended/bash/bash.inc
+++ b/meta/recipes-extended/bash/bash.inc
@@ -65,3 +65,7 @@ pkg_postinst_${PN} () {
 pkg_postrm_${PN} () {
 	printf "$(grep -v "^${base_bindir}/bash$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells
 }
+
+PACKAGES += "${PN}-bashbug"
+FILES_${PN} = "${bindir}/bash ${base_bindir}/bash.bash"
+FILES_${PN}-bashbug = "${bindir}/bashbug"
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 42/44] db: do the multilib_header processing for db.h
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (40 preceding siblings ...)
  2017-03-10 11:24 ` [PATCH 41/44] bash: package bashbug separately Alexander Kanavin
@ 2017-03-10 11:24 ` Alexander Kanavin
  2017-03-10 11:24 ` [PATCH 43/44] base-files: do not write the current date into /etc/issue and /etc/issue.net Alexander Kanavin
                   ` (2 subsequent siblings)
  44 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:24 UTC (permalink / raw)
  To: openembedded-core

As it varies from one machine to another.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/recipes-support/db/db_5.3.28.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-support/db/db_5.3.28.bb b/meta/recipes-support/db/db_5.3.28.bb
index 4f5aae60132..b7232fc8942 100644
--- a/meta/recipes-support/db/db_5.3.28.bb
+++ b/meta/recipes-support/db/db_5.3.28.bb
@@ -28,7 +28,7 @@ SRC_URI[sha256sum] = "e0a992d740709892e81f9d93f06daf305cf73fb81b545afe7247804317
 
 LIC_FILES_CHKSUM = "file://LICENSE;md5=ed1158e31437f4f87cdd4ab2b8613955"
 
-inherit autotools
+inherit autotools multilib_header
 
 # Put virtual/db in any appropriate provider of a
 # relational database, use it as a dependency in
@@ -96,6 +96,8 @@ do_install_append() {
 	ln -s db51/db.h ${D}/${includedir}/db.h
 	ln -s db51/db_cxx.h ${D}/${includedir}/db_cxx.h
 
+        oe_multilib_header db51/db.h
+
 	# The docs end up in /usr/docs - not right.
 	if test -d "${D}/${prefix}/docs"
 	then
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 43/44] base-files: do not write the current date into /etc/issue and /etc/issue.net
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (41 preceding siblings ...)
  2017-03-10 11:24 ` [PATCH 42/44] db: do the multilib_header processing for db.h Alexander Kanavin
@ 2017-03-10 11:24 ` Alexander Kanavin
  2017-03-11 11:22   ` Richard Purdie
  2017-03-10 11:24 ` [PATCH 44/44] gpgme: fix python module build and installation Alexander Kanavin
  2017-03-14 15:14 ` [PATCH 00/44] Replace Smart package manager with DNF package manager Richard Purdie
  44 siblings, 1 reply; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:24 UTC (permalink / raw)
  To: openembedded-core

This is causing a problem in multilib where base-files and lib64/32-base-files
clash because they may have different dates. Also, if the package is coming
from sstate it has an incorrect date anyway.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/recipes-core/base-files/base-files_3.0.14.bb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
index d1380053115..c7a9e803cb1 100644
--- a/meta/recipes-core/base-files/base-files_3.0.14.bb
+++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -145,8 +145,9 @@ do_install_basefilesissue () {
 		printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue
 		printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue.net
 		if [ -n "${DISTRO_VERSION}" ]; then
-			printf "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue
-			printf "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue.net
+			distro_version_nodate=${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot').replace('${DATE}','')}
+			printf "%s " $distro_version_nodate >> ${D}${sysconfdir}/issue
+			printf "%s " $distro_version_nodate >> ${D}${sysconfdir}/issue.net
 		fi
 		printf "\\\n \\\l\n" >> ${D}${sysconfdir}/issue
 		echo >> ${D}${sysconfdir}/issue
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 44/44] gpgme: fix python module build and installation
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (42 preceding siblings ...)
  2017-03-10 11:24 ` [PATCH 43/44] base-files: do not write the current date into /etc/issue and /etc/issue.net Alexander Kanavin
@ 2017-03-10 11:24 ` Alexander Kanavin
  2017-03-14 15:14 ` [PATCH 00/44] Replace Smart package manager with DNF package manager Richard Purdie
  44 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-10 11:24 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 ...-Avoid-host-contamination-from-gpg-config.patch | 30 ++++++++++++++++++++++
 .../0001-Correctly-install-python-modules.patch    | 26 +++++++++++++++++++
 meta/recipes-support/gpgme/gpgme_1.8.0.bb          |  2 ++
 3 files changed, 58 insertions(+)
 create mode 100644 meta/recipes-support/gpgme/gpgme/0001-Avoid-host-contamination-from-gpg-config.patch
 create mode 100644 meta/recipes-support/gpgme/gpgme/0001-Correctly-install-python-modules.patch

diff --git a/meta/recipes-support/gpgme/gpgme/0001-Avoid-host-contamination-from-gpg-config.patch b/meta/recipes-support/gpgme/gpgme/0001-Avoid-host-contamination-from-gpg-config.patch
new file mode 100644
index 00000000000..6ce58ba3f65
--- /dev/null
+++ b/meta/recipes-support/gpgme/gpgme/0001-Avoid-host-contamination-from-gpg-config.patch
@@ -0,0 +1,30 @@
+From 96cfc76def123141d0cecaab857da3880396d5ef Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 9 Mar 2017 22:11:00 +0200
+Subject: [PATCH] Avoid host contamination from gpg-config
+
+getconfig is calling gpgme-config (from the source tree) and it
+gives -L{libdir} (i.e. -L/usr/lib) as the first item for linking.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ lang/python/setup.py.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lang/python/setup.py.in b/lang/python/setup.py.in
+index 213fe33..22629e2 100755
+--- a/lang/python/setup.py.in
++++ b/lang/python/setup.py.in
+@@ -86,7 +86,7 @@ subprocess.check_call([sys.executable, "gpgme-h-clean.py", gpg_error_h],
+                       stdout=open("errors.i", "w"))
+ 
+ define_macros = []
+-libs = getconfig('libs')
++libs = getconfig('libs')[1:]
+ 
+ # Define extra_macros for both the SWIG and C code
+ for k, v in extra_macros.items():
+-- 
+2.11.0
+
diff --git a/meta/recipes-support/gpgme/gpgme/0001-Correctly-install-python-modules.patch b/meta/recipes-support/gpgme/gpgme/0001-Correctly-install-python-modules.patch
new file mode 100644
index 00000000000..42655fbbe68
--- /dev/null
+++ b/meta/recipes-support/gpgme/gpgme/0001-Correctly-install-python-modules.patch
@@ -0,0 +1,26 @@
+From 4d714c097e497b63d2e8b22a834c671045e215e9 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 9 Mar 2017 21:34:55 +0200
+Subject: [PATCH] Correctly install python modules
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ lang/python/Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am
+index e32fd12..5ecf6fb 100644
+--- a/lang/python/Makefile.am
++++ b/lang/python/Makefile.am
+@@ -102,6 +102,7 @@ install-exec-local:
+ 	for PYTHON in $(PYTHONS); do \
+ 	  $$PYTHON setup.py install \
+ 	  --prefix $(DESTDIR)$(prefix) \
++          --install-lib=$(DESTDIR)${pythondir} \
+ 	  --record files.txt \
+ 	  --verbose ; \
+ 	  cat files.txt >> install_files.txt ; \
+-- 
+2.11.0
+
diff --git a/meta/recipes-support/gpgme/gpgme_1.8.0.bb b/meta/recipes-support/gpgme/gpgme_1.8.0.bb
index 86922f6fd98..d3e7880a47b 100644
--- a/meta/recipes-support/gpgme/gpgme_1.8.0.bb
+++ b/meta/recipes-support/gpgme/gpgme_1.8.0.bb
@@ -13,6 +13,8 @@ UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
 SRC_URI = "${GNUPG_MIRROR}/gpgme/${BP}.tar.bz2 \
            file://pkgconfig.patch \
            file://python-lang-config.patch \
+           file://0001-Correctly-install-python-modules.patch \
+           file://0001-Avoid-host-contamination-from-gpg-config.patch \
           "
 
 SRC_URI[md5sum] = "722a4153904b9b5dc15485a22d29263b"
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 75+ messages in thread

* Re: [PATCH 30/44] byacc: remove the recipe
  2017-03-10 11:24 ` [PATCH 30/44] byacc: remove the recipe Alexander Kanavin
@ 2017-03-10 16:37   ` Mark Hatle
  2017-03-13 13:18     ` Alexander Kanavin
  0 siblings, 1 reply; 75+ messages in thread
From: Mark Hatle @ 2017-03-10 16:37 UTC (permalink / raw)
  To: Alexander Kanavin, openembedded-core

byacc, until recently, was required by the LSB / LSB Test Suite.

So I'd rather is be kept in oe-core through the 2.3 release.

--Mark

On 3/10/17 5:24 AM, Alexander Kanavin wrote:
> It was used only by rpm5 and will be moved to meta-oe
> 
> Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
> ---
>  meta/recipes-extended/byacc/byacc.inc              |  22 ---
>  .../0001-byacc-do-not-reorder-CC-and-CFLAGS.patch  | 161 ---------------------
>  meta/recipes-extended/byacc/byacc/byacc-open.patch |  25 ----
>  meta/recipes-extended/byacc/byacc_20161202.bb      |  12 --
>  .../packagegroup-core-full-cmdline.bb              |   1 -
>  5 files changed, 221 deletions(-)
>  delete mode 100644 meta/recipes-extended/byacc/byacc.inc
>  delete mode 100644 meta/recipes-extended/byacc/byacc/0001-byacc-do-not-reorder-CC-and-CFLAGS.patch
>  delete mode 100644 meta/recipes-extended/byacc/byacc/byacc-open.patch
>  delete mode 100644 meta/recipes-extended/byacc/byacc_20161202.bb
> 
> diff --git a/meta/recipes-extended/byacc/byacc.inc b/meta/recipes-extended/byacc/byacc.inc
> deleted file mode 100644
> index adb07193d73..00000000000
> --- a/meta/recipes-extended/byacc/byacc.inc
> +++ /dev/null
> @@ -1,22 +0,0 @@
> -SUMMARY = "Berkeley LALR Yacc parser generator"
> -DESCRIPTION = "A parser generator utility that reads a grammar specification from a file and generates an LR(1) \
> -parser for it.  The parsers consist of a set of LALR(1) parsing tables and a driver routine written in the C \
> -programming language."
> -SECTION = "devel"
> -LICENSE = "PD"
> -
> -SRC_URI = "ftp://invisible-island.net/byacc/byacc-${PV}.tgz \
> -           file://byacc-open.patch \
> -           file://0001-byacc-do-not-reorder-CC-and-CFLAGS.patch"
> -
> -EXTRA_OECONF += "--program-transform-name='s,^,b,'"
> -
> -BBCLASSEXTEND = "native"
> -
> -inherit autotools
> -
> -do_configure() {
> -	install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
> -	install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
> -	oe_runconf
> -}
> diff --git a/meta/recipes-extended/byacc/byacc/0001-byacc-do-not-reorder-CC-and-CFLAGS.patch b/meta/recipes-extended/byacc/byacc/0001-byacc-do-not-reorder-CC-and-CFLAGS.patch
> deleted file mode 100644
> index 7cd2510c8ed..00000000000
> --- a/meta/recipes-extended/byacc/byacc/0001-byacc-do-not-reorder-CC-and-CFLAGS.patch
> +++ /dev/null
> @@ -1,161 +0,0 @@
> -Subject: byacc: do not reorder $CC and $CFLAGS
> -
> -byacc tries to process $CC and decide which part should belong to CC and which
> -part should below to CFLAGS and then do reordering. It doesn't make much sense
> -for OE. And it doesn't do its work correctly. Some options are dropped.
> -
> -Delete all these stuff so that we could have all options we need.
> -
> -Upstream-Status: Inappropriate [OE Specific]
> -
> -Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ----
> - aclocal.m4 |   1 -
> - configure  | 119 -------------------------------------------------------------
> - 2 files changed, 120 deletions(-)
> -
> -diff --git a/aclocal.m4 b/aclocal.m4
> -index 917a848..62ef241 100644
> ---- a/aclocal.m4
> -+++ b/aclocal.m4
> -@@ -1021,7 +1021,6 @@ CF_GCC_VERSION
> - CF_ACVERSION_CHECK(2.52,
> - 	[AC_PROG_CC_STDC],
> - 	[CF_ANSI_CC_REQD])
> --CF_CC_ENV_FLAGS
> - ])dnl
> - dnl ---------------------------------------------------------------------------
> - dnl CF_PROG_GROFF version: 2 updated: 2015/07/04 11:16:27
> -diff --git a/configure b/configure
> -index 9707e50..4f0497c 100755
> ---- a/configure
> -+++ b/configure
> -@@ -1946,125 +1946,6 @@ esac
> - # This should have been defined by AC_PROG_CC
> - : ${CC:=cc}
> - 
> --echo "$as_me:1949: checking \$CC variable" >&5
> --echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
> --case "$CC" in
> --(*[\ \	]-*)
> --	echo "$as_me:1953: result: broken" >&5
> --echo "${ECHO_T}broken" >&6
> --	{ echo "$as_me:1955: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
> --echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
> --	# humor him...
> --	cf_flags=`echo "$CC" | sed -e 's/^.*[ 	]\(-[^ 	]\)/\1/'`
> --	CC=`echo "$CC " | sed -e 's/[ 	]-[^ 	].*$//' -e 's/[ 	]*$//'`
> --	for cf_arg in $cf_flags
> --	do
> --		case "x$cf_arg" in
> --		(x-[IUDfgOW]*)
> --
> --cf_fix_cppflags=no
> --cf_new_cflags=
> --cf_new_cppflags=
> --cf_new_extra_cppflags=
> --
> --for cf_add_cflags in $cf_flags
> --do
> --case $cf_fix_cppflags in
> --(no)
> --	case $cf_add_cflags in
> --	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
> --		case $cf_add_cflags in
> --		(-D*)
> --			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
> --
> --			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
> --				&& test -z "${cf_tst_cflags}" \
> --				&& cf_fix_cppflags=yes
> --
> --			if test $cf_fix_cppflags = yes ; then
> --				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
> --				continue
> --			elif test "${cf_tst_cflags}" = "\"'" ; then
> --				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
> --				continue
> --			fi
> --			;;
> --		esac
> --		case "$CPPFLAGS" in
> --		(*$cf_add_cflags)
> --			;;
> --		(*)
> --			case $cf_add_cflags in
> --			(-D*)
> --				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
> --
> --CPPFLAGS=`echo "$CPPFLAGS" | \
> --	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
> --		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
> --
> --				;;
> --			esac
> --			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
> --			;;
> --		esac
> --		;;
> --	(*)
> --		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
> --		;;
> --	esac
> --	;;
> --(yes)
> --	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
> --
> --	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
> --
> --	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
> --		&& test -z "${cf_tst_cflags}" \
> --		&& cf_fix_cppflags=no
> --	;;
> --esac
> --done
> --
> --if test -n "$cf_new_cflags" ; then
> --
> --	CFLAGS="$CFLAGS $cf_new_cflags"
> --fi
> --
> --if test -n "$cf_new_cppflags" ; then
> --
> --	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
> --fi
> --
> --if test -n "$cf_new_extra_cppflags" ; then
> --
> --	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
> --fi
> --
> --			;;
> --		(*)
> --			CC="$CC $cf_arg"
> --			;;
> --		esac
> --	done
> --	test -n "$verbose" && echo "	resulting CC: '$CC'" 1>&6
> --
> --echo "${as_me:-configure}:2051: testing resulting CC: '$CC' ..." 1>&5
> --
> --	test -n "$verbose" && echo "	resulting CFLAGS: '$CFLAGS'" 1>&6
> --
> --echo "${as_me:-configure}:2055: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
> --
> --	test -n "$verbose" && echo "	resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
> --
> --echo "${as_me:-configure}:2059: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
> --
> --	;;
> --(*)
> --	echo "$as_me:2063: result: ok" >&5
> --echo "${ECHO_T}ok" >&6
> --	;;
> --esac
> --
> - echo "$as_me:2068: checking whether ${MAKE-make} sets \${MAKE}" >&5
> - echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
> - set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
> --- 
> -2.8.3
> -
> diff --git a/meta/recipes-extended/byacc/byacc/byacc-open.patch b/meta/recipes-extended/byacc/byacc/byacc-open.patch
> deleted file mode 100644
> index 005831130b3..00000000000
> --- a/meta/recipes-extended/byacc/byacc/byacc-open.patch
> +++ /dev/null
> @@ -1,25 +0,0 @@
> -Ubuntu defaults to passing _FORTIFY_SOURCE=2 which breaks byacc as it doesn't
> -pass enough arguments to open():
> -
> - inlined from 'open_tmpfile' at byacc-20150711/main.c:588:5:
> - /usr/include/x86_64-linux-gnu/bits/fcntl2.h:50:24: error: call to '__open_missing_mode' declared with attribute error:
> - open with O_CREAT in second argument needs 3 arguments
> -
> -Add a mode of 0666 to fix this.
> -
> -Upstream-Status: Pending
> -Signed-off-by: Ross Burton <ross.burton@intel.com>
> -
> -diff --git a/main.c b/main.c
> -index 620ce3f..82071a4 100644
> ---- a/main.c
> -+++ b/main.c
> -@@ -526,7 +526,7 @@ my_mkstemp(char *temp)
> -     }
> -     if ((name = tempnam(dname, fname)) != 0)
> -     {
> --	fd = open(name, O_CREAT | O_EXCL | O_RDWR);
> -+      fd = open(name, O_CREAT | O_EXCL | O_RDWR, 0666);
> - 	strcpy(temp, name);
> -     }
> -     else
> diff --git a/meta/recipes-extended/byacc/byacc_20161202.bb b/meta/recipes-extended/byacc/byacc_20161202.bb
> deleted file mode 100644
> index 755f8ab515c..00000000000
> --- a/meta/recipes-extended/byacc/byacc_20161202.bb
> +++ /dev/null
> @@ -1,12 +0,0 @@
> -# Sigh. This is one of those places where everyone licenses it differently. Someone
> -# even apply UCB to it (Free/Net/OpenBSD). The maintainer states that:
> -# "I've found no reliable source which states that byacc must bear a UCB copyright."
> -# Setting to PD as this is what the upstream has it as.
> -
> -LICENSE = "PD"
> -LIC_FILES_CHKSUM = "file://package/debian/copyright;md5=74533d32ffd38bca4cbf1f1305f8bc60"
> -require byacc.inc
> -
> -
> -SRC_URI[md5sum] = "48ef38447f2cc864c70ef864b26cf817"
> -SRC_URI[sha256sum] = "30dc58cfcdb708eea7ba022db29b41d2d392f20727491b956954366f2f2117f0"
> diff --git a/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb b/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb
> index d8975f21572..9379fb91998 100644
> --- a/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb
> +++ b/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb
> @@ -110,7 +110,6 @@ RDEPENDS_packagegroup-core-full-cmdline-extended = "\
>      "
>  
>  RDEPENDS_packagegroup-core-full-cmdline-dev-utils = "\
> -    byacc \
>      diffutils \
>      m4 \
>      make \
> 



^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 19/44] package_rpm.bbclass: correctly map RRECOMMENDS and RSUGGESTS to rpm tags
  2017-03-10 11:23 ` [PATCH 19/44] package_rpm.bbclass: correctly map RRECOMMENDS and RSUGGESTS to rpm tags Alexander Kanavin
@ 2017-03-10 16:41   ` Mark Hatle
  0 siblings, 0 replies; 75+ messages in thread
From: Mark Hatle @ 2017-03-10 16:41 UTC (permalink / raw)
  To: Alexander Kanavin, openembedded-core

On 3/10/17 5:23 AM, Alexander Kanavin wrote:
> Previously they were swapped, not sure why. Their meaning, as far as rpm
> world goes, is different:

Just an FYI -- In RPM5 (well before rpm4 had support for recommended packages)
it was implemented as 'suggests'.  I have no idea why.

--Mark

> - Recommends is a soft dependency and will be installed by default; there is
> an option not to do that.
> 
> - Suggests is a suggestion to be picked up and presented to end user by
> package management tools; it has no special meaning otherwise.
> 
> OE packages use RRECOMMENDS, which should be mapped to Recommends rpm tag,
> so that the packages will be picked up as dependencies.
> 
> Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
> ---
>  meta/classes/package_rpm.bbclass | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
> index 07eb974f736..480c6d58d39 100644
> --- a/meta/classes/package_rpm.bbclass
> +++ b/meta/classes/package_rpm.bbclass
> @@ -450,10 +450,8 @@ python write_specfile () {
>          if splitrpostrm:
>              print_deps(splitrdepends, "Requires(postun)", spec_preamble_bottom, d)
>  
> -        # Suggests in RPM are like recommends in OE-core!
> -        print_deps(splitrrecommends, "Suggests", spec_preamble_bottom, d)
> -        # While there is no analog for suggests... (So call them recommends for now)
> -        print_deps(splitrsuggests,  "Recommends", spec_preamble_bottom, d)
> +        print_deps(splitrrecommends, "Recommends", spec_preamble_bottom, d)
> +        print_deps(splitrsuggests,  "Suggests", spec_preamble_bottom, d)
>          print_deps(splitrprovides,  "Provides", spec_preamble_bottom, d)
>          print_deps(splitrobsoletes, "Obsoletes", spec_preamble_bottom, d)
>  
> @@ -560,10 +558,8 @@ python write_specfile () {
>      if srcrpostrm:
>          print_deps(srcrdepends, "Requires(postun)", spec_preamble_top, d)
>  
> -    # Suggests in RPM are like recommends in OE-core!
> -    print_deps(srcrrecommends, "Suggests", spec_preamble_top, d)
> -    # While there is no analog for suggests... (So call them recommends for now)
> -    print_deps(srcrsuggests, "Recommends", spec_preamble_top, d)
> +    print_deps(srcrrecommends, "Recommends", spec_preamble_top, d)
> +    print_deps(srcrsuggests, "Suggests", spec_preamble_top, d)
>      print_deps(srcrprovides, "Provides", spec_preamble_top, d)
>      print_deps(srcrobsoletes, "Obsoletes", spec_preamble_top, d)
>      
> 



^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 34/44] package_rpm.bbclass: add a /bin/sh Provides for nativesdk- packages
  2017-03-10 11:24 ` [PATCH 34/44] package_rpm.bbclass: add a /bin/sh Provides for nativesdk- packages Alexander Kanavin
@ 2017-03-10 16:54   ` Mark Hatle
  2017-03-13 14:21     ` Alexander Kanavin
  0 siblings, 1 reply; 75+ messages in thread
From: Mark Hatle @ 2017-03-10 16:54 UTC (permalink / raw)
  To: Alexander Kanavin, openembedded-core

On 3/10/17 5:24 AM, Alexander Kanavin wrote:
> nativesdk-* rpm packages all require /bin/sh because postinst scriptlets
> are run with it. We can either teach rpm4 and dnf to ignore that dependency
> (a lot of non-upstreamable work), or add auto-satisfy the dependency
> in each package. I've chosen to do the latter.
> 
> Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
> ---
>  meta/classes/package_rpm.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
> index ff86dc87980..2cdaae0ff25 100644
> --- a/meta/classes/package_rpm.bbclass
> +++ b/meta/classes/package_rpm.bbclass
> @@ -560,7 +560,7 @@ python write_specfile () {
>  
>      print_deps(srcrrecommends, "Recommends", spec_preamble_top, d)
>      print_deps(srcrsuggests, "Suggests", spec_preamble_top, d)
> -    print_deps(srcrprovides, "Provides", spec_preamble_top, d)
> +    print_deps(srcrprovides + (" /bin/sh" if srcname.startswith("nativesdk-") else ""), "Provides", spec_preamble_top, d)
>      print_deps(srcrobsoletes, "Obsoletes", spec_preamble_top, d)

I'm confused as to what this is doing...   I see this is only affecting the
virtual 'src package' (or the one built for archiving?)..

But providing /bin/sh as any type of provide seems wrong.  Either --nodeps to
the rpmbuild or there should be a configuration file that the (host/cross) rpm
can use to say "yes I really just have /bin/sh.

(rpm5 has a single file you could put arbitrary file provides into, at one point
rpm4 did as well -- but I don't know if it's still there.)

Doing this runs the risk of someone asking for '/bin/sh' and getting a source
package (a random one) as part of their build process using the DNF sources
option and such.  Definitely not what is expected.

>      
>      # conflicts can not be in a provide!  We will need to filter it.
> 



^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 36/44] package_rpm.bbclass: do not set the OS dynamically when building rpms
  2017-03-10 11:24 ` [PATCH 36/44] package_rpm.bbclass: do not set the OS dynamically when building rpms Alexander Kanavin
@ 2017-03-10 16:57   ` Mark Hatle
  2017-03-13 14:24     ` Alexander Kanavin
  0 siblings, 1 reply; 75+ messages in thread
From: Mark Hatle @ 2017-03-10 16:57 UTC (permalink / raw)
  To: Alexander Kanavin, openembedded-core

On 3/10/17 5:24 AM, Alexander Kanavin wrote:
> Packages need to contain just one value for the os field, otherwise
> rpm will refuse to install them if they don't match what is in
> /etc/rpm/platform.

How will this work with nativesdk for things like targeting mingw (windows),
darwin, or even alternative OS like Zephyr?

I'm thinking if 'linux-gnu' is invalid, then a simple conversion to 'linux'
would be better then hard coding everything to 'linux'.

--Mark

> Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
> ---
>  meta/classes/package_rpm.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
> index 2cdaae0ff25..4f4f8e4e11c 100644
> --- a/meta/classes/package_rpm.bbclass
> +++ b/meta/classes/package_rpm.bbclass
> @@ -692,7 +692,7 @@ python do_package_rpm () {
>      pkgwritedir = d.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH_EXTEND}')
>      d.setVar('RPM_PKGWRITEDIR', pkgwritedir)
>      bb.debug(1, 'PKGWRITEDIR: %s' % d.getVar('RPM_PKGWRITEDIR'))
> -    pkgarch = d.expand('${PACKAGE_ARCH_EXTEND}${HOST_VENDOR}-${HOST_OS}')
> +    pkgarch = d.expand('${PACKAGE_ARCH_EXTEND}${HOST_VENDOR}-linux')
>      bb.utils.mkdirhier(pkgwritedir)
>      os.chmod(pkgwritedir, 0o755)
>  
> 



^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 38/44] package_rpm.bbclass: do not strip multilib prefixes from package names, do not add multilib prefix to package arch
  2017-03-10 11:24 ` [PATCH 38/44] package_rpm.bbclass: do not strip multilib prefixes from package names, do not add multilib prefix to package arch Alexander Kanavin
@ 2017-03-10 17:04   ` Mark Hatle
  2017-03-13 14:35     ` Alexander Kanavin
  0 siblings, 1 reply; 75+ messages in thread
From: Mark Hatle @ 2017-03-10 17:04 UTC (permalink / raw)
  To: Alexander Kanavin, openembedded-core

On 3/10/17 5:24 AM, Alexander Kanavin wrote:
> This is done for reasons I cannot establish, and greatly complicates the code
> that installs packages into rootfs.

RPM internally resolves ELF dependencies through a resolution system.

If you look at a typical Fedora, SuSe, etc system you will often see:

glibc-x.y.i386.rpm
glibc-x.y.x86-64.rpm

When a package asks for 'glibc', the system will go out and match the one for
the arch that is being requested.

This permits you to have an i386 feed for i386 machines and an x86-64 feed that
can use both.  (This is much less of an issue on x86 these days then it used to
be.  However, it is still an issue on ARM big/LITTLE and some combination
hardware that may have an aarch64 system and an armv7 in the same chassis.)

The typical OE approach is:

glibc-x.y.i386.rpm

and

lib32-glibc-x.y.i386.rpm
glibc-x.y.x86-64.rpm

This means the '32-bit' feeds can not be shared in any way.  The system naming
is also more confusing to people familiar with other RPM distirbutions, as they
are expecting to be able to say 'give me glibc i386' are, and not have to just
know it starts with 'lib32-'.  (This is because internally to RPM, the arch is
treated as part of the naming fields, as long as the contents do not conflict.
So you SHOULD be able to have two non-conflicting glibc* packages installed at
the same time -- the resolver will decide which ELF file to install.)

This is very different in practice to deb/ipkg naming that is required to be unique.


The other problem this introduces for people trying to use ISP packages and
other external (non YP sources) is the naming scheme is suddenly wildly
different.  So they may ask (depend on) the wrong named packages.

If you do want to remove this, I would really prefer a switch to full OE/YP
styling naming -- so those that need to keep 'Red Hat style' can do so.

(If having this code in places cause DNF/RPM4 to break, chances are there is a
problem in the configuration or resolving code -- since everything should be
automatic.)

--Mark

> Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
> ---
>  meta/classes/package_rpm.bbclass | 55 ++++++++--------------------------------
>  1 file changed, 11 insertions(+), 44 deletions(-)
> 
> diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
> index 4f4f8e4e11c..07ab5cdd9e0 100644
> --- a/meta/classes/package_rpm.bbclass
> +++ b/meta/classes/package_rpm.bbclass
> @@ -101,27 +101,6 @@ python write_specfile () {
>                  os.chown(f, 0, 0)
>                  spec_preamble_top.append('Source%s: %s' % (source_number, source))
>                  source_number += 1
> -    # We need a simple way to remove the MLPREFIX from the package name,
> -    # and dependency information...
> -    def strip_multilib(name, d):
> -        multilibs = d.getVar('MULTILIBS') or ""
> -        for ext in multilibs.split():
> -            eext = ext.split(':')
> -            if len(eext) > 1 and eext[0] == 'multilib' and name and name.find(eext[1] + '-') >= 0:
> -                name = "".join(name.split(eext[1] + '-'))
> -        return name
> -
> -    def strip_multilib_deps(deps, d):
> -        depends = bb.utils.explode_dep_versions2(deps or "")
> -        newdeps = {}
> -        for dep in depends:
> -            newdeps[strip_multilib(dep, d)] = depends[dep]
> -        return bb.utils.join_deps(newdeps)
> -
> -#        ml = d.getVar("MLPREFIX")
> -#        if ml and name and len(ml) != 0 and name.find(ml) == 0:
> -#            return ml.join(name.split(ml, 1)[1:])
> -#        return name
>  
>      # In RPM, dependencies are of the format: pkg <>= Epoch:Version-Release
>      # This format is similar to OE, however there are restrictions on the
> @@ -283,7 +262,7 @@ python write_specfile () {
>          bb.fatal("No OUTSPECFILE")
>  
>      # Construct the SPEC file...
> -    srcname    = strip_multilib(d.getVar('PN'), d)
> +    srcname    = d.getVar('PN')
>      srcsummary = (d.getVar('SUMMARY') or d.getVar('DESCRIPTION') or ".")
>      srcversion = d.getVar('PKGV').replace('-', '+')
>      srcrelease = d.getVar('PKGR')
> @@ -295,7 +274,7 @@ python write_specfile () {
>      srcdescription = d.getVar('DESCRIPTION') or "."
>      srccustomtagschunk = get_package_additional_metadata("rpm", d)
>  
> -    srcdepends     = strip_multilib_deps(d.getVar('DEPENDS'), d)
> +    srcdepends     = d.getVar('DEPENDS')
>      srcrdepends    = []
>      srcrrecommends = []
>      srcrsuggests   = []
> @@ -340,7 +319,7 @@ python write_specfile () {
>          if dirfiles is not None:
>              dirfiles = dirfiles.split()
>  
> -        splitname    = strip_multilib(pkgname, d)
> +        splitname    = pkgname
>  
>          splitsummary = (localdata.getVar('SUMMARY') or localdata.getVar('DESCRIPTION') or ".")
>          splitversion = (localdata.getVar('PKGV') or "").replace('-', '+')
> @@ -361,12 +340,12 @@ python write_specfile () {
>          # Map the dependencies into their final form
>          mapping_rename_hook(localdata)
>  
> -        splitrdepends    = strip_multilib_deps(localdata.getVar('RDEPENDS'), d)
> -        splitrrecommends = strip_multilib_deps(localdata.getVar('RRECOMMENDS'), d)
> -        splitrsuggests   = strip_multilib_deps(localdata.getVar('RSUGGESTS'), d)
> -        splitrprovides   = strip_multilib_deps(localdata.getVar('RPROVIDES'), d)
> -        splitrreplaces   = strip_multilib_deps(localdata.getVar('RREPLACES'), d)
> -        splitrconflicts  = strip_multilib_deps(localdata.getVar('RCONFLICTS'), d)
> +        splitrdepends    = localdata.getVar('RDEPENDS')
> +        splitrrecommends = localdata.getVar('RRECOMMENDS')
> +        splitrsuggests   = localdata.getVar('RSUGGESTS')
> +        splitrprovides   = localdata.getVar('RPROVIDES')
> +        splitrreplaces   = localdata.getVar('RREPLACES')
> +        splitrconflicts  = localdata.getVar('RCONFLICTS')
>          splitrobsoletes  = []
>  
>          splitrpreinst  = localdata.getVar('pkg_preinst')
> @@ -640,14 +619,6 @@ python write_specfile () {
>  write_specfile[vardepsexclude] = "OVERRIDES"
>  
>  python do_package_rpm () {
> -    # We need a simple way to remove the MLPREFIX from the package name,
> -    # and dependency information...
> -    def strip_multilib(name, d):
> -        ml = d.getVar("MLPREFIX")
> -        if ml and name and len(ml) != 0 and name.find(ml) >= 0:
> -            return "".join(name.split(ml))
> -        return name
> -
>      workdir = d.getVar('WORKDIR')
>      tmpdir = d.getVar('TMPDIR')
>      pkgd = d.getVar('PKGD')
> @@ -665,7 +636,7 @@ python do_package_rpm () {
>      # If the spec file already exist, and has not been stored into 
>      # pseudo's files.db, it maybe cause rpmbuild src.rpm fail,
>      # so remove it before doing rpmbuild src.rpm.
> -    srcname    = strip_multilib(d.getVar('PN'), d)
> +    srcname    = d.getVar('PN')
>      outspecfile = workdir + "/" + srcname + ".spec"
>      if os.path.isfile(outspecfile):
>          os.remove(outspecfile)
> @@ -684,11 +655,7 @@ python do_package_rpm () {
>      # Let's not fight against this.
>      package_arch = (d.getVar('PACKAGE_ARCH') or "").replace("-", "_").replace("all", "noarch")
>      sdkpkgsuffix = (d.getVar('SDKPKGSUFFIX') or "nativesdk").replace("-", "_")
> -    if package_arch not in "all any noarch".split() and not package_arch.endswith(sdkpkgsuffix):
> -        ml_prefix = (d.getVar('MLPREFIX') or "").replace("-", "_")
> -        d.setVar('PACKAGE_ARCH_EXTEND', ml_prefix + package_arch)
> -    else:
> -        d.setVar('PACKAGE_ARCH_EXTEND', package_arch)
> +    d.setVar('PACKAGE_ARCH_EXTEND', package_arch)
>      pkgwritedir = d.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH_EXTEND}')
>      d.setVar('RPM_PKGWRITEDIR', pkgwritedir)
>      bb.debug(1, 'PKGWRITEDIR: %s' % d.getVar('RPM_PKGWRITEDIR'))
> 



^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 39/44] package.bbclass: don't exclude package groups from runtime mapping
  2017-03-10 11:24 ` [PATCH 39/44] package.bbclass: don't exclude package groups from runtime mapping Alexander Kanavin
@ 2017-03-10 17:12   ` Mark Hatle
  0 siblings, 0 replies; 75+ messages in thread
From: Mark Hatle @ 2017-03-10 17:12 UTC (permalink / raw)
  To: Alexander Kanavin, openembedded-core

On 3/10/17 5:24 AM, Alexander Kanavin wrote:
> This ensures that remapping happens correctly, particularly
> when package groups list noarch packages, and multilib is in use. Previously
> this was masked by rpm doing *another* layer of remapping on top of this.

This change is definitely NOT rpm specific.

I'm not sure I understand either why this line was there or why it was removed.

Looking at the history, there was a lot of work being done in this section about
generic package work at the time.

See oe commits:
9c826962ec8fa45c2b035427442b90a41517144e
to
a0cd18ff5405b63b8296b8ef1fc2a488b906f576

--Mark

> Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
> ---
>  meta/classes/package.bbclass | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> index f4c2b5514c5..48fef97251b 100644
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass
> @@ -479,9 +479,6 @@ def get_package_additional_metadata (pkg_type, d):
>  def runtime_mapping_rename (varname, pkg, d):
>      #bb.note("%s before: %s" % (varname, d.getVar(varname)))
>  
> -    if bb.data.inherits_class('packagegroup', d):
> -        return
> -
>      new_depends = {}
>      deps = bb.utils.explode_dep_versions2(d.getVar(varname) or "")
>      for depend in deps:
> 



^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 41/44] bash: package bashbug separately
  2017-03-10 11:24 ` [PATCH 41/44] bash: package bashbug separately Alexander Kanavin
@ 2017-03-10 17:13   ` Mark Hatle
  2017-03-13 14:39     ` Alexander Kanavin
  0 siblings, 1 reply; 75+ messages in thread
From: Mark Hatle @ 2017-03-10 17:13 UTC (permalink / raw)
  To: Alexander Kanavin, openembedded-core

On 3/10/17 5:24 AM, Alexander Kanavin wrote:
> It's a machine-specific script, which is causing conflicts
> when multiple versions of bash are installed in multilib setting,
> and it also does not really make sense for embedded systems anyway.

Out of curiosity what is machine specific here?

(The bashbug shouldn't be part of the main recipe, no disagreement.)  But in the
past we had a single bashbug that would not conflict in multilibs -- that must
have broken at some point.

--Mark

> Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
> ---
>  meta/recipes-extended/bash/bash.inc | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes-extended/bash/bash.inc
> index a05b987b87b..3e9c6625693 100644
> --- a/meta/recipes-extended/bash/bash.inc
> +++ b/meta/recipes-extended/bash/bash.inc
> @@ -65,3 +65,7 @@ pkg_postinst_${PN} () {
>  pkg_postrm_${PN} () {
>  	printf "$(grep -v "^${base_bindir}/bash$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells
>  }
> +
> +PACKAGES += "${PN}-bashbug"
> +FILES_${PN} = "${bindir}/bash ${base_bindir}/bash.bash"
> +FILES_${PN}-bashbug = "${bindir}/bashbug"
> 



^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 22/44] scripts/rpm2cpio.sh: replace 5.x version with 4.x version
  2017-03-10 11:24 ` [PATCH 22/44] scripts/rpm2cpio.sh: replace 5.x version with 4.x version Alexander Kanavin
@ 2017-03-10 17:26   ` Mark Hatle
  2017-03-14 12:44     ` Burton, Ross
  0 siblings, 1 reply; 75+ messages in thread
From: Mark Hatle @ 2017-03-10 17:26 UTC (permalink / raw)
  To: openembedded-core

Just an FYI, I was concerned that $(( ))  (in the new script) was a bash-ism,
but I was able to run the script on an Ubuntu machine using 'dash' as /bin/sh.

--Mark

On 3/10/17 5:24 AM, Alexander Kanavin wrote:
> Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
> ---
>  scripts/rpm2cpio.sh | 108 ++++++++++++++++++++++++++--------------------------
>  1 file changed, 55 insertions(+), 53 deletions(-)
> 
> diff --git a/scripts/rpm2cpio.sh b/scripts/rpm2cpio.sh
> index 5df8c0f7054..cf23472ba95 100755
> --- a/scripts/rpm2cpio.sh
> +++ b/scripts/rpm2cpio.sh
> @@ -1,53 +1,55 @@
> -#!/bin/sh
> -
> -# This comes from the RPM5 5.4.0 distribution.
> -
> -pkg=$1
> -if [ "$pkg" = "" -o ! -e "$pkg" ]; then
> -    echo "no package supplied" 1>&2
> -   exit 1
> -fi
> -
> -leadsize=96
> -o=`expr $leadsize + 8`
> -set `od -j $o -N 8 -t u1 $pkg`
> -il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`
> -dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`
> -# echo "sig il: $il dl: $dl"
> -
> -sigsize=`expr 8 + 16 \* $il + $dl`
> -o=`expr $o + $sigsize + \( 8 - \( $sigsize \% 8 \) \) \% 8 + 8`
> -set `od -j $o -N 8 -t u1 $pkg`
> -il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`
> -dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`
> -# echo "hdr il: $il dl: $dl"
> -
> -hdrsize=`expr 8 + 16 \* $il + $dl`
> -o=`expr $o + $hdrsize`
> -EXTRACTOR="dd if=$pkg ibs=$o skip=1"
> -
> -COMPRESSION=`($EXTRACTOR |file -) 2>/dev/null`
> -if echo $COMPRESSION |grep -iq gzip; then
> -	DECOMPRESSOR=gunzip
> -elif echo $COMPRESSION |grep -iq bzip2; then
> -	DECOMPRESSOR=bunzip2
> -elif echo $COMPRESSION |grep -iq xz; then
> -	DECOMPRESSOR=unxz
> -elif echo $COMPRESSION |grep -iq cpio; then
> -	DECOMPRESSOR=cat
> -else
> -	# Most versions of file don't support LZMA, therefore we assume
> -	# anything not detected is LZMA
> -	DECOMPRESSOR=`which unlzma 2>/dev/null`
> -	case "$DECOMPRESSOR" in
> -	    /* ) ;;
> -	    *  ) DECOMPRESSOR=`which lzmash 2>/dev/null`
> -	         case "$DECOMPRESSOR" in
> -	             /* ) DECOMPRESSOR="lzmash -d -c" ;;
> -	             *  ) DECOMPRESSOR=cat ;;
> -	         esac
> -	         ;;
> -	esac
> -fi
> -
> -$EXTRACTOR 2>/dev/null | $DECOMPRESSOR
> +#!/bin/sh -efu
> +
> +# This file comes from rpm 4.x distribution
> +
> +fatal() {
> +	echo "$*" >&2
> +	exit 1
> +}
> +
> +pkg="$1"
> +[ -n "$pkg" -a -e "$pkg" ] ||
> +	fatal "No package supplied"
> +
> +_dd() {
> +	local o="$1"; shift
> +	dd if="$pkg" skip="$o" iflag=skip_bytes status=none $*
> +}
> +
> +calcsize() {
> +	offset=$(($1 + 8))
> +
> +	local i b b0 b1 b2 b3 b4 b5 b6 b7
> +
> +	i=0
> +	while [ $i -lt 8 ]; do
> +		b="$(_dd $(($offset + $i)) bs=1 count=1)"
> +		[ -z "$b" ] &&
> +			b="0" ||
> +			b="$(exec printf '%u\n' "'$b")"
> +		eval "b$i=\$b"
> +		i=$(($i + 1))
> +	done
> +
> +	rsize=$((8 + ((($b0 << 24) + ($b1 << 16) + ($b2 << 8) + $b3) << 4) + ($b4 << 24) + ($b5 << 16) + ($b6 << 8) + $b7))
> +	offset=$(($offset + $rsize))
> +}
> +
> +case "$(_dd 0 bs=8 count=1)" in
> +	"$(printf '\355\253\356\333')"*) ;; # '\xed\xab\xee\xdb'
> +	*) fatal "File doesn't look like rpm: $pkg" ;;
> +esac
> +
> +calcsize 96
> +sigsize=$rsize
> +
> +calcsize $(($offset + (8 - ($sigsize % 8)) % 8))
> +hdrsize=$rsize
> +
> +case "$(_dd $offset bs=3 count=1)" in
> +	"$(printf '\102\132')"*) _dd $offset | bunzip2 ;; # '\x42\x5a'
> +	"$(printf '\037\213')"*) _dd $offset | gunzip  ;; # '\x1f\x8b'
> +	"$(printf '\375\067')"*) _dd $offset | xzcat   ;; # '\xfd\x37'
> +	"$(printf '\135\000')"*) _dd $offset | unlzma  ;; # '\x5d\x00'
> +	*) fatal "Unrecognized rpm file: $pkg" ;;
> +esac
> 



^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 43/44] base-files: do not write the current date into /etc/issue and /etc/issue.net
  2017-03-10 11:24 ` [PATCH 43/44] base-files: do not write the current date into /etc/issue and /etc/issue.net Alexander Kanavin
@ 2017-03-11 11:22   ` Richard Purdie
  2017-03-11 16:22     ` Richard Purdie
  0 siblings, 1 reply; 75+ messages in thread
From: Richard Purdie @ 2017-03-11 11:22 UTC (permalink / raw)
  To: Alexander Kanavin, openembedded-core

On Fri, 2017-03-10 at 13:24 +0200, Alexander Kanavin wrote:
> This is causing a problem in multilib where base-files and lib64/32-
> base-files
> clash because they may have different dates. Also, if the package is
> coming
> from sstate it has an incorrect date anyway.
> 
> Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
> ---
>  meta/recipes-core/base-files/base-files_3.0.14.bb | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb
> b/meta/recipes-core/base-files/base-files_3.0.14.bb
> index d1380053115..c7a9e803cb1 100644
> --- a/meta/recipes-core/base-files/base-files_3.0.14.bb
> +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
> @@ -145,8 +145,9 @@ do_install_basefilesissue () {
>  		printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue
>  		printf "${DISTRO_NAME} " >>
> ${D}${sysconfdir}/issue.net
>  		if [ -n "${DISTRO_VERSION}" ]; then
> -			printf "${DISTRO_VERSION} " >>
> ${D}${sysconfdir}/issue
> -			printf "${DISTRO_VERSION} " >>
> ${D}${sysconfdir}/issue.net
> +			distro_version_nodate=${@'${DISTRO_VERSION}'
> .replace('snapshot-${DATE}','snapshot').replace('${DATE}','')}
> +			printf "%s " $distro_version_nodate >>
> ${D}${sysconfdir}/issue
> +			printf "%s " $distro_version_nodate >>
> ${D}${sysconfdir}/issue.net
>  		fi
>  		printf "\\\n \\\l\n" >> ${D}${sysconfdir}/issue
>  		echo >> ${D}${sysconfdir}/issue


https://autobuilder.yocto.io/builders/nightly-oe-selftest/builds/213/steps/Running%20oe-selftest/logs/stdio

You probably need a vardepsexclude on DATE here...

Cheers,

Richard



^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 43/44] base-files: do not write the current date into /etc/issue and /etc/issue.net
  2017-03-11 11:22   ` Richard Purdie
@ 2017-03-11 16:22     ` Richard Purdie
  0 siblings, 0 replies; 75+ messages in thread
From: Richard Purdie @ 2017-03-11 16:22 UTC (permalink / raw)
  To: Alexander Kanavin, openembedded-core

On Sat, 2017-03-11 at 11:22 +0000, Richard Purdie wrote:
> On Fri, 2017-03-10 at 13:24 +0200, Alexander Kanavin wrote:
> > diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb
> > b/meta/recipes-core/base-files/base-files_3.0.14.bb
> > index d1380053115..c7a9e803cb1 100644
> > --- a/meta/recipes-core/base-files/base-files_3.0.14.bb
> > +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
> > @@ -145,8 +145,9 @@ do_install_basefilesissue () {
> >  		printf "${DISTRO_NAME} " >>
> > ${D}${sysconfdir}/issue
> >  		printf "${DISTRO_NAME} " >>
> > ${D}${sysconfdir}/issue.net
> >  		if [ -n "${DISTRO_VERSION}" ]; then
> > -			printf "${DISTRO_VERSION} " >>
> > ${D}${sysconfdir}/issue
> > -			printf "${DISTRO_VERSION} " >>
> > ${D}${sysconfdir}/issue.net
> > +			distro_version_nodate=${@'${DISTRO_VERSION
> > }'
> > .replace('snapshot-${DATE}','snapshot').replace('${DATE}','')}
> > +			printf "%s " $distro_version_nodate >>
> > ${D}${sysconfdir}/issue
> > +			printf "%s " $distro_version_nodate >>
> > ${D}${sysconfdir}/issue.net
> >  		fi
> >  		printf "\\\n \\\l\n" >> ${D}${sysconfdir}/issue
> >  		echo >> ${D}${sysconfdir}/issue
> 
> https://autobuilder.yocto.io/builders/nightly-oe-selftest/builds/213/
> steps/Running%20oe-selftest/logs/stdio
> 
> You probably need a vardepsexclude on DATE here...

I fixed that and merged this...

Cheers,

Richard


^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 30/44] byacc: remove the recipe
  2017-03-10 16:37   ` Mark Hatle
@ 2017-03-13 13:18     ` Alexander Kanavin
  2017-03-13 14:02       ` Mark Hatle
  0 siblings, 1 reply; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-13 13:18 UTC (permalink / raw)
  To: Mark Hatle, openembedded-core

On 03/10/2017 06:37 PM, Mark Hatle wrote:
> byacc, until recently, was required by the LSB / LSB Test Suite.
>
> So I'd rather is be kept in oe-core through the 2.3 release.

I couldn't find it in the LSB 5 standard. Is it something from earlier 
versions?

Alex



^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 30/44] byacc: remove the recipe
  2017-03-13 13:18     ` Alexander Kanavin
@ 2017-03-13 14:02       ` Mark Hatle
  0 siblings, 0 replies; 75+ messages in thread
From: Mark Hatle @ 2017-03-13 14:02 UTC (permalink / raw)
  To: Alexander Kanavin, openembedded-core

On 3/13/17 8:18 AM, Alexander Kanavin wrote:
> On 03/10/2017 06:37 PM, Mark Hatle wrote:
>> byacc, until recently, was required by the LSB / LSB Test Suite.
>>
>> So I'd rather is be kept in oe-core through the 2.3 release.
> 
> I couldn't find it in the LSB 5 standard. Is it something from earlier 
> versions?

It is in the instructions for the LSB Test Suite.  Byacc was required until
fairly recently.  From what I've found it was needed up until about September of
last year.  (There may be people doing CGL certification and such that still
need to use older versions of the LSB Test Suite for the time being.)

I have no objections (at this time) to remove it in 2.4, but I think it's too
later in 2.3 to remove/move it on someone.

--Mark

> Alex
> 



^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 34/44] package_rpm.bbclass: add a /bin/sh Provides for nativesdk- packages
  2017-03-10 16:54   ` Mark Hatle
@ 2017-03-13 14:21     ` Alexander Kanavin
  2017-03-13 14:27       ` Mark Hatle
  0 siblings, 1 reply; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-13 14:21 UTC (permalink / raw)
  To: Mark Hatle, openembedded-core

On 03/10/2017 06:54 PM, Mark Hatle wrote:
> On 3/10/17 5:24 AM, Alexander Kanavin wrote:
>> nativesdk-* rpm packages all require /bin/sh because postinst scriptlets
>> are run with it. We can either teach rpm4 and dnf to ignore that dependency
>> (a lot of non-upstreamable work), or add auto-satisfy the dependency
>> in each package. I've chosen to do the latter.

>>      print_deps(srcrrecommends, "Recommends", spec_preamble_top, d)
>>      print_deps(srcrsuggests, "Suggests", spec_preamble_top, d)
>> -    print_deps(srcrprovides, "Provides", spec_preamble_top, d)
>> +    print_deps(srcrprovides + (" /bin/sh" if srcname.startswith("nativesdk-") else ""), "Provides", spec_preamble_top, d)
>>      print_deps(srcrobsoletes, "Obsoletes", spec_preamble_top, d)
>
> I'm confused as to what this is doing...   I see this is only affecting the
> virtual 'src package' (or the one built for archiving?)..

The variable name is misleading. That line up there is printing the 
Provides list into the top section of the .spec file which is then given 
to rpm so it can create binary packages.

> But providing /bin/sh as any type of provide seems wrong.  Either --nodeps to
> the rpmbuild or there should be a configuration file that the (host/cross) rpm
> can use to say "yes I really just have /bin/sh.

> (rpm5 has a single file you could put arbitrary file provides into, at one point
> rpm4 did as well -- but I don't know if it's still there.)

I checked - rpm 4 does not have that feature now, or I couldn't find it.

> Doing this runs the risk of someone asking for '/bin/sh' and getting a source
> package (a random one) as part of their build process using the DNF sources
> option and such.  Definitely not what is expected.

This only affects nativesdk- packages, which are well isolated from all 
other packages during installation time. I haven't seen any issues with 
it either in my local testing or in the autobuilder run. If it pops up 
somehow, we can do more to isolate the package sets.


Alex



^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 36/44] package_rpm.bbclass: do not set the OS dynamically when building rpms
  2017-03-10 16:57   ` Mark Hatle
@ 2017-03-13 14:24     ` Alexander Kanavin
  2017-03-13 14:29       ` Mark Hatle
  0 siblings, 1 reply; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-13 14:24 UTC (permalink / raw)
  To: Mark Hatle, openembedded-core

On 03/10/2017 06:57 PM, Mark Hatle wrote:
> On 3/10/17 5:24 AM, Alexander Kanavin wrote:
>> Packages need to contain just one value for the os field, otherwise
>> rpm will refuse to install them if they don't match what is in
>> /etc/rpm/platform.
>
> How will this work with nativesdk for things like targeting mingw (windows),
> darwin, or even alternative OS like Zephyr?
>
> I'm thinking if 'linux-gnu' is invalid, then a simple conversion to 'linux'
> would be better then hard coding everything to 'linux'.

I don't believe that the OS name embedded into packages is actually used 
anywhere to make decisions about which package to install. It's just 
that some packages have one value for it, others have another, and rpm 4 
does not allow that (rpm 5 does, and so several OS values gets written 
into /etc). So I bring them all to a common value.

Alex


^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 21/44] rootfs_rpm.bbclass: migrate image creation to dnf
  2017-03-10 11:24 ` [PATCH 21/44] rootfs_rpm.bbclass: migrate image creation to dnf Alexander Kanavin
@ 2017-03-13 14:25   ` Burton, Ross
  2017-03-13 14:52     ` Alexander Kanavin
  0 siblings, 1 reply; 75+ messages in thread
From: Burton, Ross @ 2017-03-13 14:25 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 256 bytes --]

On 10 March 2017 at 11:24, Alexander Kanavin <
alexander.kanavin@linux.intel.com> wrote:

> +        raise NotImplementedError("Adding remote dnf feeds not yet
> supported.")
>

I think this is a 2.4M4 blocker if the series merges into M3.

Ross

[-- Attachment #2: Type: text/html, Size: 709 bytes --]

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 34/44] package_rpm.bbclass: add a /bin/sh Provides for nativesdk- packages
  2017-03-13 14:21     ` Alexander Kanavin
@ 2017-03-13 14:27       ` Mark Hatle
  0 siblings, 0 replies; 75+ messages in thread
From: Mark Hatle @ 2017-03-13 14:27 UTC (permalink / raw)
  To: Alexander Kanavin, openembedded-core

On 3/13/17 9:21 AM, Alexander Kanavin wrote:
> On 03/10/2017 06:54 PM, Mark Hatle wrote:
>> On 3/10/17 5:24 AM, Alexander Kanavin wrote:
>>> nativesdk-* rpm packages all require /bin/sh because postinst scriptlets
>>> are run with it. We can either teach rpm4 and dnf to ignore that dependency
>>> (a lot of non-upstreamable work), or add auto-satisfy the dependency
>>> in each package. I've chosen to do the latter.
> 
>>>      print_deps(srcrrecommends, "Recommends", spec_preamble_top, d)
>>>      print_deps(srcrsuggests, "Suggests", spec_preamble_top, d)
>>> -    print_deps(srcrprovides, "Provides", spec_preamble_top, d)
>>> +    print_deps(srcrprovides + (" /bin/sh" if srcname.startswith("nativesdk-") else ""), "Provides", spec_preamble_top, d)
>>>      print_deps(srcrobsoletes, "Obsoletes", spec_preamble_top, d)
>>
>> I'm confused as to what this is doing...   I see this is only affecting the
>> virtual 'src package' (or the one built for archiving?)..
> 
> The variable name is misleading. That line up there is printing the 
> Provides list into the top section of the .spec file which is then given 
> to rpm so it can create binary packages.
> 
>> But providing /bin/sh as any type of provide seems wrong.  Either --nodeps to
>> the rpmbuild or there should be a configuration file that the (host/cross) rpm
>> can use to say "yes I really just have /bin/sh.
> 
>> (rpm5 has a single file you could put arbitrary file provides into, at one point
>> rpm4 did as well -- but I don't know if it's still there.)
> 
> I checked - rpm 4 does not have that feature now, or I couldn't find it.

We may need to add this feature.  It really is useful to deal with situations
like this.

>> Doing this runs the risk of someone asking for '/bin/sh' and getting a source
>> package (a random one) as part of their build process using the DNF sources
>> option and such.  Definitely not what is expected.
> 
> This only affects nativesdk- packages, which are well isolated from all 
> other packages during installation time. I haven't seen any issues with 
> it either in my local testing or in the autobuilder run. If it pops up 
> somehow, we can do more to isolate the package sets.
> 

Thank you.  I understand now.

--Mark

> Alex
> 



^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 36/44] package_rpm.bbclass: do not set the OS dynamically when building rpms
  2017-03-13 14:24     ` Alexander Kanavin
@ 2017-03-13 14:29       ` Mark Hatle
  0 siblings, 0 replies; 75+ messages in thread
From: Mark Hatle @ 2017-03-13 14:29 UTC (permalink / raw)
  To: Alexander Kanavin, openembedded-core

On 3/13/17 9:24 AM, Alexander Kanavin wrote:
> On 03/10/2017 06:57 PM, Mark Hatle wrote:
>> On 3/10/17 5:24 AM, Alexander Kanavin wrote:
>>> Packages need to contain just one value for the os field, otherwise
>>> rpm will refuse to install them if they don't match what is in
>>> /etc/rpm/platform.
>>
>> How will this work with nativesdk for things like targeting mingw (windows),
>> darwin, or even alternative OS like Zephyr?
>>
>> I'm thinking if 'linux-gnu' is invalid, then a simple conversion to 'linux'
>> would be better then hard coding everything to 'linux'.
> 
> I don't believe that the OS name embedded into packages is actually used 
> anywhere to make decisions about which package to install. It's just 
> that some packages have one value for it, others have another, and rpm 4 
> does not allow that (rpm 5 does, and so several OS values gets written 
> into /etc). So I bring them all to a common value.

In the past there was both a (Smart/YUM/DNF) and RPM check for OS to prevent
packages for one OS to be installed onto another OS.

While out mingw SDK does not contain RPM (not IMHO should it ever), I'd hate to
accidentally try to install one of the mingw packages onto a Linux system.

Darwin (OS X) as well.

This is likely something we need to look into and understand.

--Mark

> Alex
> 



^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 38/44] package_rpm.bbclass: do not strip multilib prefixes from package names, do not add multilib prefix to package arch
  2017-03-10 17:04   ` Mark Hatle
@ 2017-03-13 14:35     ` Alexander Kanavin
  0 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-13 14:35 UTC (permalink / raw)
  To: Mark Hatle, openembedded-core

On 03/10/2017 07:04 PM, Mark Hatle wrote:
> On 3/10/17 5:24 AM, Alexander Kanavin wrote:
>> This is done for reasons I cannot establish, and greatly complicates the code
>> that installs packages into rootfs.
>
> RPM internally resolves ELF dependencies through a resolution system.
>
> If you look at a typical Fedora, SuSe, etc system you will often see:
>
> glibc-x.y.i386.rpm
> glibc-x.y.x86-64.rpm
>
> When a package asks for 'glibc', the system will go out and match the one for
> the arch that is being requested.

I don't know the core reason for it, but it actually does not happen, 
and I saw it firsthand. When a package needs a library, the resolver 
will pick the library package with the architecture that has the higher 
priority in the list of architectures, not the architecture that would 
match the package correctly.


When using smart, there seems to be a similar issue:

# Pull in multilib requires since rpm may not pull in them
# correctly, for example,
# lib32-packagegroup-core-standalone-sdk-target requires
# lib32-libc6, but rpm may pull in libc6 rather than lib32-libc6
# since it doesn't know mlprefix (lib32-), bitbake knows it and
# can handle it well, find out the RDEPENDS on the chain will
# fix the problem. Both do_rootfs and do_populate_sdk have this
# issue.
# The attempt_only packages don't need this since they are
# based on the installed ones.
#
# Separate pkgs into two lists, one is multilib, the other one
# is non-multilib.

... which is then followed by the most hackish, impementrable code that 
recursively walks RDEPENDS and massages that into a list that is given 
to smart, effectively subverting smart's own dependency resolution. I do 
not want to carry this into rpm4/dnf (or even spend time understanding 
it), and so I dropped both the multilib prefix stripping, and the code 
that works around it.

By the way, I don't know about Fedora, but SuSE does use -32bit suffixes 
in package names.


Alex


^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 41/44] bash: package bashbug separately
  2017-03-10 17:13   ` Mark Hatle
@ 2017-03-13 14:39     ` Alexander Kanavin
  0 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-13 14:39 UTC (permalink / raw)
  To: Mark Hatle, openembedded-core

On 03/10/2017 07:13 PM, Mark Hatle wrote:
> On 3/10/17 5:24 AM, Alexander Kanavin wrote:
>> It's a machine-specific script, which is causing conflicts
>> when multiple versions of bash are installed in multilib setting,
>> and it also does not really make sense for embedded systems anyway.
>
> Out of curiosity what is machine specific here?

--- 
./tmp/work/x86_64-pokymllib64-linux/lib64-bash/4.3.30-r0/packages-split/lib64-bash-bashbug/usr/bin/bashbug 
2017-03-09 16:10:27.000000000 +0200
+++ 
./tmp/work/i586-poky-linux/bash/4.3.30-r0/packages-split/bash-bashbug/usr/bin/bashbug 
2017-03-09 16:03:49.000000000 +0200
@@ -26,14 +26,14 @@
  # configuration section:
  #	these variables are filled in by the make target in Makefile
  #
-MACHINE="x86_64"
+MACHINE="i586"
  OS="linux-gnu"
-CC="x86_64-pokymllib64-linux-gcc  -m64 "
-CFLAGS=" -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pokymllib64-linux-gnu' 
-DCONF_VENDOR='pokymllib64' -DLOCALEDIR='/usr/share/locale' 
-DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H   -I.  -I../bash-4.3.30 
-I../bash-4.3.30/include -I../bash-4.3.30/lib   -O2 -pipe -g 
-feliminate-unused-debug-types 
-fdebug-prefix-map=/home/ak/development/poky/build-multilib/tmp/work/x86_64-pokymllib64-linux/lib64-bash/4.3.30-r0=/usr/src/debug/lib64-bash/4.3.30-r0 
-fdebug-prefix-map=/home/ak/development/poky/build-multilib/tmp/work/x86_64-pokymllib64-linux/lib64-bash/4.3.30-r0/recipe-sysroot-native= 
-fdebug-prefix-map=/home/ak/development/poky/build-multilib/tmp/work/x86_64-pokymllib64-linux/lib64-bash/4.3.30-r0/lib64-recipe-sysroot= 
  -DNON_INTERACTIVE_LOGIN_SHELLS"
+CC="i586-poky-linux-gcc  -m32 -march=i586 "
+CFLAGS=" -DPROGRAM='bash' -DCONF_HOSTTYPE='i586' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i586-poky-linux-gnu' 
-DCONF_VENDOR='poky' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' 
-DSHELL -DHAVE_CONFIG_H   -I.  -I../bash-4.3.30 -I../bash-4.3.30/include 
-I../bash-4.3.30/lib   -O2 -pipe -g -feliminate-unused-debug-types 
-fdebug-prefix-map=/home/ak/development/poky/build-multilib/tmp/work/i586-poky-linux/bash/4.3.30-r0=/usr/src/debug/bash/4.3.30-r0 
-fdebug-prefix-map=/home/ak/development/poky/build-multilib/tmp/work/i586-poky-linux/bash/4.3.30-r0/recipe-sysroot-native= 
-fdebug-prefix-map=/home/ak/development/poky/build-multilib/tmp/work/i586-poky-linux/bash/4.3.30-r0/recipe-sysroot= 
  -DNON_INTERACTIVE_LOGIN_SHELLS"
  RELEASE="4.3"
  PATCHLEVEL="46"
  RELSTATUS="release"
-MACHTYPE="x86_64-pokymllib64-linux-gnu"
+MACHTYPE="i586-poky-linux-gnu"

  PATH=/bin:/usr/bin:/usr/local/bin:$PATH
  export PATH


Alex



^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 21/44] rootfs_rpm.bbclass: migrate image creation to dnf
  2017-03-13 14:25   ` Burton, Ross
@ 2017-03-13 14:52     ` Alexander Kanavin
  2017-03-13 15:04       ` Alexander Kanavin
  0 siblings, 1 reply; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-13 14:52 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

On 03/13/2017 04:25 PM, Burton, Ross wrote:

>
>     +        raise NotImplementedError("Adding remote dnf feeds not yet
>     supported.")
>
>
> I think this is a 2.4M4 blocker if the series merges into M3.

Yes. There is no runtime/selftest test for this, and I didn't want to 
implement things that are not enabled by default and cannot be 
automatically tested. I don't want to take the risk of unnoticed 
regressions in code that was tested only once when it was initially written.

Creating an image from signed rpms is currently not supported for the 
same reason (but signing rpms in the first place *is* supported, because 
it actually is tested in oe-selftest, and I can use that to verify that 
it works and keeps working).


Alex


^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 21/44] rootfs_rpm.bbclass: migrate image creation to dnf
  2017-03-13 14:52     ` Alexander Kanavin
@ 2017-03-13 15:04       ` Alexander Kanavin
  2017-03-13 15:07         ` Alexander Kanavin
  0 siblings, 1 reply; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-13 15:04 UTC (permalink / raw)
  To: openembedded-core

On 03/13/2017 04:52 PM, Alexander Kanavin wrote:
> On 03/13/2017 04:25 PM, Burton, Ross wrote:
>
>>
>>     +        raise NotImplementedError("Adding remote dnf feeds not yet
>>     supported.")
>>
>>
>> I think this is a 2.4M4 blocker if the series merges into M3.
>
> Yes. There is no runtime/selftest test for this, and I didn't want to
> implement things that are not enabled by default and cannot be
> automatically tested. I don't want to take the risk of unnoticed
> regressions in code that was tested only once when it was initially
> written.
>
> Creating an image from signed rpms is currently not supported for the
> same reason (but signing rpms in the first place *is* supported, because
> it actually is tested in oe-selftest, and I can use that to verify that
> it works and keeps working).

Forgot to add - I'll try to fix both of these this week, with 
corresponding tests of course.

Alex


^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 21/44] rootfs_rpm.bbclass: migrate image creation to dnf
  2017-03-13 15:04       ` Alexander Kanavin
@ 2017-03-13 15:07         ` Alexander Kanavin
  0 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-13 15:07 UTC (permalink / raw)
  To: openembedded-core, Lehtonen, Markus

On 03/13/2017 05:04 PM, Alexander Kanavin wrote:
>
> Forgot to add - I'll try to fix both of these this week, with
> corresponding tests of course.

Oh, and: Markus Lehtonen is looking into package feed signing, which is 
a separate thing from rpm signing. Also Fedora does not sign their 
feeds, and so the feature has apparently bitrotted somewhat and will be 
more difficult to get working.

Alex



^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 22/44] scripts/rpm2cpio.sh: replace 5.x version with 4.x version
  2017-03-10 17:26   ` Mark Hatle
@ 2017-03-14 12:44     ` Burton, Ross
  0 siblings, 0 replies; 75+ messages in thread
From: Burton, Ross @ 2017-03-14 12:44 UTC (permalink / raw)
  To: Mark Hatle; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 410 bytes --]

On 10 March 2017 at 17:26, Mark Hatle <mark.hatle@windriver.com> wrote:

> Just an FYI, I was concerned that $(( ))  (in the new script) was a
> bash-ism,
> but I was able to run the script on an Ubuntu machine using 'dash' as
> /bin/sh.
>

http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_04

bash adds more operators such as ++, but basic maths is POSIX.

Ross

[-- Attachment #2: Type: text/html, Size: 1019 bytes --]

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 00/44] Replace Smart package manager with DNF package manager
  2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
                   ` (43 preceding siblings ...)
  2017-03-10 11:24 ` [PATCH 44/44] gpgme: fix python module build and installation Alexander Kanavin
@ 2017-03-14 15:14 ` Richard Purdie
  2017-03-14 16:48   ` Otavio Salvador
  2017-03-14 21:12   ` Robert P. J. Day
  44 siblings, 2 replies; 75+ messages in thread
From: Richard Purdie @ 2017-03-14 15:14 UTC (permalink / raw)
  To: Alexander Kanavin, openembedded-core, Mark Hatle, Burton Ross

On Fri, 2017-03-10 at 13:23 +0200, Alexander Kanavin wrote:
> This patchset replaces the outdated, unsupported Smart package
> manager with DNF package manager (Fedora's successor to yum). This is
> not a trivial change and there are many consequences:

I've been pondering this for a while, whether it should go into 2.3 or
not. For better or worse, I've ended up deciding to push it in.

I'm not 100% sure every piece of this is ready. In particular:

* the /bin/sh nativesdk hack - really need to find a better way of 
  doing that
* the packagegroup change makes me nervous
* the rpm package naming also makes me nervous although I don't mind 
  being different to the rest of the world if that works for us 
  (unlike Mark who has more concern with that)
* I found relocation issues in my own testing

Despite this I merged it on the basis that I'd rather have this in pyro
rather than waiting another 6 months to get this in and having to tell
people we were changing soon and having to deal with any more smart
issues.

This could mean more work in backporting to fix issues in the stable
release and point releases but so be it.

Lets hope I've made the right call! :)

Cheers,

Richard


^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 00/44] Replace Smart package manager with DNF package manager
  2017-03-14 15:14 ` [PATCH 00/44] Replace Smart package manager with DNF package manager Richard Purdie
@ 2017-03-14 16:48   ` Otavio Salvador
  2017-03-14 17:14     ` Richard Purdie
  2017-03-14 21:12   ` Robert P. J. Day
  1 sibling, 1 reply; 75+ messages in thread
From: Otavio Salvador @ 2017-03-14 16:48 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Patches and discussions about the oe-core layer

On Tue, Mar 14, 2017 at 12:14 PM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
...
> Despite this I merged it on the basis that I'd rather have this in pyro
> rather than waiting another 6 months to get this in and having to tell
> people we were changing soon and having to deal with any more smart
> issues.
...

This kind of change should have been merged in November, not less of
two months of release. One more time heavy changes been commited late
on release.


-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 00/44] Replace Smart package manager with DNF package manager
  2017-03-14 16:48   ` Otavio Salvador
@ 2017-03-14 17:14     ` Richard Purdie
  2017-03-14 17:17       ` Otavio Salvador
  0 siblings, 1 reply; 75+ messages in thread
From: Richard Purdie @ 2017-03-14 17:14 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: Patches and discussions about the oe-core layer

On Tue, 2017-03-14 at 13:48 -0300, Otavio Salvador wrote:
> On Tue, Mar 14, 2017 at 12:14 PM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> ...
> > 
> > Despite this I merged it on the basis that I'd rather have this in
> > pyro
> > rather than waiting another 6 months to get this in and having to
> > tell
> > people we were changing soon and having to deal with any more smart
> > issues.
> ...
> 
> This kind of change should have been merged in November, not less of
> two months of release. One more time heavy changes been commited late
> on release.

In this case the patches have been talked about and in review on the
mailing list for months so I really don't think anyone can be
surprised. It was also a stated release objective to do something about
smart.

Also, nobody replied to the status reports where I discussed merging or
not merging either so I could only assume nobody had opinions.

Cheers,

Richard



^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 00/44] Replace Smart package manager with DNF package manager
  2017-03-14 17:14     ` Richard Purdie
@ 2017-03-14 17:17       ` Otavio Salvador
  2017-03-14 17:35         ` Richard Purdie
  0 siblings, 1 reply; 75+ messages in thread
From: Otavio Salvador @ 2017-03-14 17:17 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Patches and discussions about the oe-core layer

On Tue, Mar 14, 2017 at 2:14 PM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Tue, 2017-03-14 at 13:48 -0300, Otavio Salvador wrote:
>> On Tue, Mar 14, 2017 at 12:14 PM, Richard Purdie
>> <richard.purdie@linuxfoundation.org> wrote:
>> ...
>> >
>> > Despite this I merged it on the basis that I'd rather have this in
>> > pyro
>> > rather than waiting another 6 months to get this in and having to
>> > tell
>> > people we were changing soon and having to deal with any more smart
>> > issues.
>> ...
>>
>> This kind of change should have been merged in November, not less of
>> two months of release. One more time heavy changes been commited late
>> on release.
>
> In this case the patches have been talked about and in review on the
> mailing list for months so I really don't think anyone can be
> surprised. It was also a stated release objective to do something about
> smart.
>
> Also, nobody replied to the status reports where I discussed merging or
> not merging either so I could only assume nobody had opinions.

I remember Mark sending a reply with some considerations and to be
honest, I did not anticipate it was being considered such late on
release.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 00/44] Replace Smart package manager with DNF package manager
  2017-03-14 17:17       ` Otavio Salvador
@ 2017-03-14 17:35         ` Richard Purdie
  0 siblings, 0 replies; 75+ messages in thread
From: Richard Purdie @ 2017-03-14 17:35 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: Patches and discussions about the oe-core layer

On Tue, 2017-03-14 at 14:17 -0300, Otavio Salvador wrote:
> On Tue, Mar 14, 2017 at 2:14 PM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > 
> > On Tue, 2017-03-14 at 13:48 -0300, Otavio Salvador wrote:
> > > 
> > > On Tue, Mar 14, 2017 at 12:14 PM, Richard Purdie
> > > <richard.purdie@linuxfoundation.org> wrote:
> > > ...
> > > > 
> > > > 
> > > > Despite this I merged it on the basis that I'd rather have this
> > > > in
> > > > pyro
> > > > rather than waiting another 6 months to get this in and having
> > > > to
> > > > tell
> > > > people we were changing soon and having to deal with any more
> > > > smart
> > > > issues.
> > > ...
> > > 
> > > This kind of change should have been merged in November, not less
> > > of
> > > two months of release. One more time heavy changes been commited
> > > late
> > > on release.
> > In this case the patches have been talked about and in review on
> > the
> > mailing list for months so I really don't think anyone can be
> > surprised. It was also a stated release objective to do something
> > about
> > smart.
> > 
> > Also, nobody replied to the status reports where I discussed
> > merging or
> > not merging either so I could only assume nobody had opinions.
> I remember Mark sending a reply with some considerations and to be
> honest, I did not anticipate it was being considered such late on
> release.

FWIW I do agree it is late in the cycle, almost too late and if things
hadn't been delayed for other reasons it wouldn't have made it.

That said, I do believe we'd potentially hurt OE more by waiting given
the stage the patchset had got to rather than merging it now and
dealing with whatever we need to deal with.

Its a judgement call, I have to make them on a regular basis. Some you
never need to notice, some like this one are controversial and can be
argued both ways. I can think of at least one in the past that went
badly wrong. 

So I appreciate the concern and I do have some of my own but I have now
made the decision and we'll now get to see how that works out. It
wasn't an easy one...

Cheers,

Richard



^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 00/44] Replace Smart package manager with DNF package manager
  2017-03-14 15:14 ` [PATCH 00/44] Replace Smart package manager with DNF package manager Richard Purdie
  2017-03-14 16:48   ` Otavio Salvador
@ 2017-03-14 21:12   ` Robert P. J. Day
  2017-03-15  9:04     ` Alexander Kanavin
  1 sibling, 1 reply; 75+ messages in thread
From: Robert P. J. Day @ 2017-03-14 21:12 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

On Tue, 14 Mar 2017, Richard Purdie wrote:

... snip ...

> Lets hope I've made the right call! :)

  is there, somewhere, a short writeup/summary on this? i can see
emails to this list back in october of last year, just wondering if
there is a wrap-up to this that one can read to pull all the threads
together to understand the consequences.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================



^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 00/44] Replace Smart package manager with DNF package manager
  2017-03-14 21:12   ` Robert P. J. Day
@ 2017-03-15  9:04     ` Alexander Kanavin
  0 siblings, 0 replies; 75+ messages in thread
From: Alexander Kanavin @ 2017-03-15  9:04 UTC (permalink / raw)
  To: Robert P. J. Day, Richard Purdie; +Cc: openembedded-core

On 03/14/2017 11:12 PM, Robert P. J. Day wrote:
>   is there, somewhere, a short writeup/summary on this? i can see
> emails to this list back in october of last year, just wondering if
> there is a wrap-up to this that one can read to pull all the threads
> together to understand the consequences.

Yes there is. It's in the cover letter of the patchset (look at the 
latest version, so the information is most up to date). There's also a 
link there to the more detailed writeup I posted to 
openembedded-architecture.

Alex



^ permalink raw reply	[flat|nested] 75+ messages in thread

end of thread, other threads:[~2017-03-15  9:05 UTC | newest]

Thread overview: 75+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-10 11:23 [PATCH 00/44] Replace Smart package manager with DNF package manager Alexander Kanavin
2017-03-10 11:23 ` [PATCH 01/44] package.bbclass: fix locations of debugedit and rpmdeps utilities Alexander Kanavin
2017-03-10 11:23 ` [PATCH 02/44] libsolv: enable rpm support Alexander Kanavin
2017-03-10 11:23 ` [PATCH 03/44] rpmresolve: remove the recipe Alexander Kanavin
2017-03-10 11:23 ` [PATCH 04/44] createrepo-c: add a recipe Alexander Kanavin
2017-03-10 11:23 ` [PATCH 05/44] createrepo: remove the recipe Alexander Kanavin
2017-03-10 11:23 ` [PATCH 06/44] rpm: add a 4.x recipe Alexander Kanavin
2017-03-10 11:23 ` [PATCH 07/44] rpm: remove 5.x recipe Alexander Kanavin
2017-03-10 11:23 ` [PATCH 08/44] python-pygpgme: add a recipe Alexander Kanavin
2017-03-10 11:23 ` [PATCH 09/44] python-iniparse: " Alexander Kanavin
2017-03-10 11:23 ` [PATCH 10/44] python-backports-lzma: " Alexander Kanavin
2017-03-10 11:23 ` [PATCH 11/44] librepo: " Alexander Kanavin
2017-03-10 11:23 ` [PATCH 12/44] libcomps: " Alexander Kanavin
2017-03-10 11:23 ` [PATCH 13/44] libdnf: " Alexander Kanavin
2017-03-10 11:23 ` [PATCH 14/44] dnf: " Alexander Kanavin
2017-03-10 11:23 ` [PATCH 15/44] python-smartpm: remove the recipe Alexander Kanavin
2017-03-10 11:23 ` [PATCH 16/44] db: remove the 6.x recipe Alexander Kanavin
2017-03-10 11:23 ` [PATCH 17/44] package_rpm.bbclass: make architecture-independent .rpm packages "noarch" instead of "all" Alexander Kanavin
2017-03-10 11:23 ` [PATCH 18/44] package_manager.py: improve the API for insert_feed_uris() Alexander Kanavin
2017-03-10 11:23 ` [PATCH 19/44] package_rpm.bbclass: correctly map RRECOMMENDS and RSUGGESTS to rpm tags Alexander Kanavin
2017-03-10 16:41   ` Mark Hatle
2017-03-10 11:23 ` [PATCH 20/44] nativesdk-packagegroup-sdk-host: replace smartpm with dnf Alexander Kanavin
2017-03-10 11:24 ` [PATCH 21/44] rootfs_rpm.bbclass: migrate image creation to dnf Alexander Kanavin
2017-03-13 14:25   ` Burton, Ross
2017-03-13 14:52     ` Alexander Kanavin
2017-03-13 15:04       ` Alexander Kanavin
2017-03-13 15:07         ` Alexander Kanavin
2017-03-10 11:24 ` [PATCH 22/44] scripts/rpm2cpio.sh: replace 5.x version with 4.x version Alexander Kanavin
2017-03-10 17:26   ` Mark Hatle
2017-03-14 12:44     ` Burton, Ross
2017-03-10 11:24 ` [PATCH 23/44] scripts/oe-setup-rpmrepo: replace createrepo with createrepo_c Alexander Kanavin
2017-03-10 11:24 ` [PATCH 24/44] package_rpm.bbclass: replace createrepo reference " Alexander Kanavin
2017-03-10 11:24 ` [PATCH 25/44] package_rpm.bbclass: no need to specify the magic file location Alexander Kanavin
2017-03-10 11:24 ` [PATCH 26/44] testimage.bbclass: fix runtime test for rpm, port smart tests to dnf Alexander Kanavin
2017-03-10 11:24 ` [PATCH 27/44] package_rpm.bbclass: instruct rpm to not remove the buildroot directory Alexander Kanavin
2017-03-10 11:24 ` [PATCH 28/44] selftest: do not perform a full build in test_continue Alexander Kanavin
2017-03-10 11:24 ` [PATCH 29/44] selftest: update output checks in incremental image test to match what dnf prints Alexander Kanavin
2017-03-10 11:24 ` [PATCH 30/44] byacc: remove the recipe Alexander Kanavin
2017-03-10 16:37   ` Mark Hatle
2017-03-13 13:18     ` Alexander Kanavin
2017-03-13 14:02       ` Mark Hatle
2017-03-10 11:24 ` [PATCH 31/44] gpg_sign.py: fix signing of rpm files using gpg Alexander Kanavin
2017-03-10 11:24 ` [PATCH 32/44] oe-selftest: no need to parse gpg output to determine the name of the signing key Alexander Kanavin
2017-03-10 11:24 ` [PATCH 33/44] run-postinsts: simplify the logic of whether to install it to images Alexander Kanavin
2017-03-10 11:24 ` [PATCH 34/44] package_rpm.bbclass: add a /bin/sh Provides for nativesdk- packages Alexander Kanavin
2017-03-10 16:54   ` Mark Hatle
2017-03-13 14:21     ` Alexander Kanavin
2017-03-13 14:27       ` Mark Hatle
2017-03-10 11:24 ` [PATCH 35/44] security_flags.inc: update to reflect smart->dnf transition Alexander Kanavin
2017-03-10 11:24 ` [PATCH 36/44] package_rpm.bbclass: do not set the OS dynamically when building rpms Alexander Kanavin
2017-03-10 16:57   ` Mark Hatle
2017-03-13 14:24     ` Alexander Kanavin
2017-03-13 14:29       ` Mark Hatle
2017-03-10 11:24 ` [PATCH 37/44] nspr: do not use shared library symbol resolution with musl Alexander Kanavin
2017-03-10 11:24 ` [PATCH 38/44] package_rpm.bbclass: do not strip multilib prefixes from package names, do not add multilib prefix to package arch Alexander Kanavin
2017-03-10 17:04   ` Mark Hatle
2017-03-13 14:35     ` Alexander Kanavin
2017-03-10 11:24 ` [PATCH 39/44] package.bbclass: don't exclude package groups from runtime mapping Alexander Kanavin
2017-03-10 17:12   ` Mark Hatle
2017-03-10 11:24 ` [PATCH 40/44] glibc: do the multilib_header magic also for bits/long-double.h Alexander Kanavin
2017-03-10 11:24 ` [PATCH 41/44] bash: package bashbug separately Alexander Kanavin
2017-03-10 17:13   ` Mark Hatle
2017-03-13 14:39     ` Alexander Kanavin
2017-03-10 11:24 ` [PATCH 42/44] db: do the multilib_header processing for db.h Alexander Kanavin
2017-03-10 11:24 ` [PATCH 43/44] base-files: do not write the current date into /etc/issue and /etc/issue.net Alexander Kanavin
2017-03-11 11:22   ` Richard Purdie
2017-03-11 16:22     ` Richard Purdie
2017-03-10 11:24 ` [PATCH 44/44] gpgme: fix python module build and installation Alexander Kanavin
2017-03-14 15:14 ` [PATCH 00/44] Replace Smart package manager with DNF package manager Richard Purdie
2017-03-14 16:48   ` Otavio Salvador
2017-03-14 17:14     ` Richard Purdie
2017-03-14 17:17       ` Otavio Salvador
2017-03-14 17:35         ` Richard Purdie
2017-03-14 21:12   ` Robert P. J. Day
2017-03-15  9:04     ` Alexander Kanavin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.