Replace Smart package manager with DNF package manager
cover Replace Smart package manager with DNF package manager
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.
The following changes since commit e758547db9048d4aa1c1415d6af8072f519fae24:
nss: Fix nss-native so the checksum doesn't change with BUILD_ARCH (2017-02-09 10:52:03 +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 (35):
gpgme: allow building -native variant
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 package.bbclass: add support for pkg_postinst_ontarget() 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: prevent rpm from using sysroot paths that it was
originally compiled with
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 image.bbclass: do not uninstall update-alternatives from readonly
rootfs
selftest: allow bitbake to fail in test_options_warnqa_errorqa_switch
ossp-uuid: remove the recipe
byacc: remove the recipe
nativesdk.bbclass: add a /bin/sh RPROVIDES
Amarnath Valluri (1):
package_deb.bbclass: Ignore file paths in RPROVIDES
.../recipes-test/postinst/postinst_1.0.bb | 99 +- meta/classes/image.bbclass | 2 +- meta/classes/nativesdk.bbclass | 4 + meta/classes/package.bbclass | 24 +- meta/classes/package_deb.bbclass | 4 + meta/classes/package_rpm.bbclass | 36 +- meta/classes/rootfs_rpm.bbclass | 21 +- meta/classes/testimage.bbclass | 62 +- meta/conf/distro/include/default-versions.inc | 3 - meta/lib/oe/package_manager.py | 1215 ++++---------------- meta/lib/oe/rootfs.py | 62 +- meta/lib/oe/sdk.py | 7 +- meta/lib/oeqa/oetest.py | 7 - meta/lib/oeqa/runtime/cases/dnf.py | 109 ++ meta/lib/oeqa/runtime/cases/parselogs.py | 1 + meta/lib/oeqa/runtime/cases/rpm.py | 19 +- meta/lib/oeqa/runtime/cases/smart.py | 196 ---- meta/lib/oeqa/selftest/bbtests.py | 2 +- meta/lib/oeqa/selftest/buildoptions.py | 6 +- .../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 | 24 + ...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 | 31 + ...-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 | 25 + ...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 + .../ossp-uuid/0001-Change-library-name.patch | 119 -- ...erve-m-option-status-in-v-option-handling.patch | 62 - .../ossp-uuid/0003-Fix-whatis-entries.patch | 58 - .../ossp-uuid/0004-fix-data-uuid-from-string.patch | 43 - .../ossp-uuid/ossp-uuid/install-pc.patch | 19 - .../ossp-uuid/ossp-uuid/ldflags.patch | 26 - .../ossp-uuid/ossp-uuid/uuid-libtool.patch | 27 - .../ossp-uuid/ossp-uuid/uuid-nostrip.patch | 19 - meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb | 64 -- ...-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 | 177 --- ...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 --- ...an-unsatisfiable-dependency-when-building.patch | 33 + .../0001-Do-not-read-config-files-from-HOME.patch | 38 + ...t-the-PATH-environment-variable-before-ru.patch | 30 + ...installing-execute-package-scriptlets-wit.patch | 37 + ...-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 - .../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 | 73 ++ meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c | 426 ------- meta/recipes-devtools/rpm/rpmresolve_1.0.bb | 29 - 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 | 1 + meta/recipes-support/db/db_6.0.35.bb | 111 -- meta/recipes-support/gpgme/gpgme_1.6.0.bb | 2 + meta/recipes-support/libassuan/libassuan_2.4.3.bb | 2 +- meta/recipes-support/libcheck/libcheck_0.10.0.bb | 3 +- scripts/oe-setup-rpmrepo | 2 +- scripts/postinst-intercepts/delay_to_first_boot | 2 + scripts/rpm2cpio.sh | 108 +- 188 files changed, 1656 insertions(+), 10663 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 delete mode 100644 meta/recipes-devtools/ossp-uuid/ossp-uuid/0001-Change-library-name.patch delete mode 100644 meta/recipes-devtools/ossp-uuid/ossp-uuid/0002-uuid-preserve-m-option-status-in-v-option-handling.patch delete mode 100644 meta/recipes-devtools/ossp-uuid/ossp-uuid/0003-Fix-whatis-entries.patch delete mode 100644 meta/recipes-devtools/ossp-uuid/ossp-uuid/0004-fix-data-uuid-from-string.patch delete mode 100644 meta/recipes-devtools/ossp-uuid/ossp-uuid/install-pc.patch delete mode 100644 meta/recipes-devtools/ossp-uuid/ossp-uuid/ldflags.patch delete mode 100644 meta/recipes-devtools/ossp-uuid/ossp-uuid/uuid-libtool.patch delete mode 100644 meta/recipes-devtools/ossp-uuid/ossp-uuid/uuid-nostrip.patch delete mode 100644 meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.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-Do-not-add-an-unsatisfiable-dependency-when-building.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-When-cross-installing-execute-package-scriptlets-wit.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-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 scripts/postinst-intercepts/delay_to_first_boot
Signature · 1 line
2.11.0
PATCH 1/36 gpgme: allow building -native variant
This is required by various pieces in the dnf stack
--- meta/recipes-support/gpgme/gpgme_1.6.0.bb | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-support/gpgme/gpgme_1.6.0.bb +2 -0
@@ -24,6 +24,8 @@ BINCONFIG = "${bindir}/gpgme-config" inherit autotools texinfo binconfig-disabled pkgconfig +BBCLASSEXTEND = "native" + PACKAGES =+ "${PN}-pthread" FILES_${PN}-pthread = "${libdir}/libgpgme-pthread.so.*" FILES_${PN}-dev += "${datadir}/common-lisp/source/gpgme/*"
Signature · 1 line
2.11.0
PATCH 2/36 package.bbclass: fix locations of debugedit and rpmdeps utilities
In reply to Alexander Kanavinrpm4 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.
--- meta/classes/package.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/classes/package.bbclass +2 -2
@@ -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:
Signature · 1 line
2.11.0
PATCH 3/36 libsolv: enable rpm support
In reply to Alexander KanavinThis is required by libdnf.
--- meta/recipes-extended/libsolv/libsolv_0.6.24.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-extended/libsolv/libsolv_0.6.24.bb +2 -2
@@ -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"
Signature · 1 line
2.11.0
PATCH 4/36 rpmresolve: remove the recipe
In reply to Alexander KanavinThe source code is incompatible with rpm4 API - let's use rpm binary itself for now.
--- 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
meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c deleted +0 -426
@@ -1,426 +0,0 @@ -/* OpenEmbedded RPM resolver utility - -Written by: Paul Eggleton <[email protected]> - -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; -}
meta/recipes-devtools/rpm/rpmresolve_1.0.bb deleted +0 -29
@@ -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"
Signature · 1 line
2.11.0
PATCH 5/36 createrepo-c: add a recipe
In reply to Alexander KanavinThis is the current C reimplementation/replacement of the original createrepo.
https://github.com/rpm-software-management/createrepo_c/wiki
--- ...0001-Correctly-install-the-shared-library.patch | 28 ++++++++++++++++++++++ ...-set-PYTHON_INSTALL_DIR-by-running-python.patch | 27 +++++++++++++++++++++ .../createrepo-c/createrepo-c_git.bb | 24 +++++++++++++++++++ 3 files changed, 79 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
meta/recipes-devtools/createrepo-c/createrepo-c/0001-Correctly-install-the-shared-library.patch new file +28 -0
@@ -0,0 +1,28 @@ +From fef835e1fdedc72c97d9c3e5704302e56e1bdef0 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <[email protected]> +Date: Mon, 2 Jan 2017 17:23:59 +0200 +Subject: [PATCH] Correctly install the shared library + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin <[email protected]> +--- + 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 +
meta/recipes-devtools/createrepo-c/createrepo-c/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch new file +27 -0
@@ -0,0 +1,27 @@ +From bef487b5c2515062c5dd73c21082ce42f69aa717 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <[email protected]> +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 <[email protected]> +--- + 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 +
meta/recipes-devtools/createrepo-c/createrepo-c_git.bb new file +24 -0
@@ -0,0 +1,24 @@ +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"
Signature · 1 line
2.11.0
PATCH 6/36 createrepo: remove the recipe
In reply to Alexander Kanavin--- .../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
meta/recipes-support/createrepo/createrepo/createrepo-dbpath.patch deleted +0 -61
@@ -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 <[email protected]> - ---- 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)
meta/recipes-support/createrepo/createrepo/createrepo-rpm549.patch deleted +0 -22
@@ -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 <[email protected]> - -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:
meta/recipes-support/createrepo/createrepo/dumpMetadata-disable-signature-validation.patch deleted +0 -31
@@ -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 <[email protected]> ---- - 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 -
meta/recipes-support/createrepo/createrepo/fix-native-install.patch deleted +0 -163
163 lines not on this page · raw message
meta/recipes-support/createrepo/createrepo/fixstat.patch deleted +0 -19
@@ -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
meta/recipes-support/createrepo/createrepo/python-scripts-should-use-interpreter-from-env.patch deleted +0 -47
47 lines not on this page · raw message
meta/recipes-support/createrepo/createrepo/recommends.patch deleted +0 -71
71 lines not on this page · raw message
meta/recipes-support/createrepo/createrepo/rpm-createsolvedb.py deleted +0 -64
64 lines not on this page · raw message
meta/recipes-support/createrepo/createrepo_0.4.11.bb deleted +0 -51
51 lines not on this page · raw message
Signature · 1 line
2.11.0
PATCH 7/36 rpm: add a 4.x recipe
In reply to Alexander KanavinThe 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.
--- ...an-unsatisfiable-dependency-when-building.patch | 33 ++++++++++ .../0001-Do-not-read-config-files-from-HOME.patch | 38 +++++++++++ ...t-the-PATH-environment-variable-before-ru.patch | 30 +++++++++ ...installing-execute-package-scriptlets-wit.patch | 37 +++++++++++ ...-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch | 72 +++++++++++++++++++++ meta/recipes-devtools/rpm/rpm_git.bb | 73 ++++++++++++++++++++++ 6 files changed, 283 insertions(+) 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-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-When-cross-installing-execute-package-scriptlets-wit.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
meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch new file +33 -0
@@ -0,0 +1,33 @@ +From 87cfc0db1ed6fe381a5ed5f0016d8c3344a31a11 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <[email protected]> +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 <[email protected]> +--- + 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 +
meta/recipes-devtools/rpm/files/0001-Do-not-read-config-files-from-HOME.patch new file +38 -0
@@ -0,0 +1,38 @@ +From 35381b6cd6c1b571bf7e6b0640de0f54dbf94386 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <[email protected]> +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 <[email protected]> +--- + 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 +
meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch new file +30 -0
@@ -0,0 +1,30 @@ +From ffb5301a8594140ad7a58bc0f2053be8ca2b2946 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <[email protected]> +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 <[email protected]> +--- + 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 +
meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch new file +37 -0
@@ -0,0 +1,37 @@ +From a6f269f879221f2777169c5f7291322afe6b661b Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <[email protected]> +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 <[email protected]> +--- + 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 +
meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch new file +72 -0
72 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm_git.bb new file +73 -0
73 lines not on this page · raw message
Signature · 1 line
2.11.0
PATCH 8/36 rpm: remove 5.x recipe
In reply to Alexander Kanavin--- ...1-Disable-__sync_add_and_fetch_8-on-nios2.patch | 30 - .../rpm/rpm/0001-define-EM_AARCH64.patch | 35 - .../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 ------------- 82 files changed, 6054 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-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
meta/recipes-devtools/rpm/rpm/0001-Disable-__sync_add_and_fetch_8-on-nios2.patch deleted +0 -30
@@ -1,30 +0,0 @@ -From 06967a50f20095f5ca30b8214f4c98ba0f5262bf Mon Sep 17 00:00:00 2001 -From: Marek Vasut <[email protected]> -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 <[email protected]> -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 -
meta/recipes-devtools/rpm/rpm/0001-define-EM_AARCH64.patch deleted +0 -35
@@ -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 <[email protected]> ---- - 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 -
meta/recipes-devtools/rpm/rpm/0001-rpm-Fix-build-on-musl.patch deleted +0 -294
294 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm/0001-system.h-query.c-support-nosignature.patch deleted +0 -63
63 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm/0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch deleted +0 -49
49 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm/configure.ac-check-for-both-gpg2-and-gpg.patch deleted +0 -29
@@ -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 <[email protected]> ---- - 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 -
meta/recipes-devtools/rpm/rpm/dbconvert.patch deleted +0 -27
@@ -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 -
meta/recipes-devtools/rpm/rpm/debugedit-segv.patch deleted +0 -100
100 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm/debugedit-valid-file-to-fix-segment-fault.patch deleted +0 -65
65 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm/gcc6-stdlib.patch deleted +0 -54
54 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm/header-include-fix.patch deleted +0 -36
@@ -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 <[email protected]> -Signed-off-by: Mark Hatle <[email protected]> - -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" {
meta/recipes-devtools/rpm/rpm/makefile-am-exec-hook.patch deleted +0 -33
@@ -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 <[email protected]> - -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
meta/recipes-devtools/rpm/rpm/no-ldflags-in-pkgconfig.patch deleted +0 -14
@@ -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 <[email protected]> - -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@
meta/recipes-devtools/rpm/rpm/perfile_rpmdeps.sh deleted +0 -50
50 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm/popt-disable-auto-stack-protector.patch deleted +0 -27
@@ -1,27 +0,0 @@ -popt: Disable default stack protection on internal version of popt - -Upstream-Status: Inappropriate [configuration] - -Signed-off-by: Mark Hatle <[email protected]> - -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
meta/recipes-devtools/rpm/rpm/python-rpm-rpmsense.patch deleted +0 -31
@@ -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 <[email protected]> - -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);
meta/recipes-devtools/rpm/rpm/pythondeps.sh deleted +0 -16
@@ -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
meta/recipes-devtools/rpm/rpm/rpm-atomic-ops.patch deleted +0 -73
73 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm/rpm-autogen-force.patch deleted +0 -78
78 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm/rpm-autogen.patch deleted +0 -25
@@ -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 <[email protected]> - -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)"
meta/recipes-devtools/rpm/rpm/rpm-canonarch.patch deleted +0 -136
136 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm/rpm-check-rootpath-reasonableness.patch deleted +0 -96
96 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm/rpm-db-reduce.patch deleted +0 -19
@@ -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 <[email protected]> - -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
meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch deleted +0 -174
174 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm/rpm-db60.patch deleted +0 -56
56 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm/rpm-db_buffer_small.patch deleted +0 -77
77 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm/rpm-debug-platform.patch deleted +0 -65
65 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm/rpm-disable-auto-stack-protector.patch deleted +0 -24
@@ -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 <[email protected]> - -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
meta/recipes-devtools/rpm/rpm/rpm-disable-blaketest.patch deleted +0 -28
@@ -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 <[email protected]> - -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
meta/recipes-devtools/rpm/rpm/rpm-ensure-rpm2cpio-call-rpm-relocation-code.patch deleted +0 -25
@@ -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 <[email protected]> -Signed-off-by: Zhixiong Chi <[email protected]> -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@*/
meta/recipes-devtools/rpm/rpm/rpm-fileclass.patch deleted +0 -36
@@ -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 <[email protected]> - -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;
meta/recipes-devtools/rpm/rpm/rpm-fix-logio-cp.patch deleted +0 -30
@@ -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 <[email protected]> - -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 \
meta/recipes-devtools/rpm/rpm/rpm-fix-lua-tests-compilation-failure.patch deleted +0 -43
43 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm/rpm-fix-parseEmbedded.patch deleted +0 -27
@@ -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 <[email protected]> - -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.
meta/recipes-devtools/rpm/rpm/rpm-gnu-atomic.patch deleted +0 -64
64 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm/rpm-hardlink-segfault-fix.patch deleted +0 -43
43 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm/rpm-keccak-sse-intrin.patch deleted +0 -27
@@ -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 <[email protected]> - -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 -
meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch deleted +0 -52
52 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm/rpm-libsql-fix.patch deleted +0 -22
@@ -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 <[email protected]> - -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 \
meta/recipes-devtools/rpm/rpm/rpm-log-auto-rm.patch deleted +0 -15
@@ -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
meta/recipes-devtools/rpm/rpm/rpm-lsb-compatibility.patch deleted +0 -24
@@ -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 <[email protected]> - -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
meta/recipes-devtools/rpm/rpm/rpm-lua.patch deleted +0 -33
@@ -1,33 +0,0 @@ -Add support for cross compiling lua - -Upstream-Status: Pending - -Signed-off-by: Mark Hatle <[email protected]> - -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@
meta/recipes-devtools/rpm/rpm/rpm-macros.in-disable-external-key-server.patch deleted +0 -31
@@ -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 <[email protected]> -Signed-off-by: Mark Hatle <[email protected]> -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
meta/recipes-devtools/rpm/rpm/rpm-macros.patch deleted +0 -64
64 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm/rpm-mongodb-sasl.patch deleted +0 -69
69 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm/rpm-no-loopmsg.patch deleted +0 -19
@@ -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 <[email protected]> - -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
meta/recipes-devtools/rpm/rpm/rpm-no-perl-urpm.patch deleted +0 -47
47 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm/rpm-opendb-before-verifyscript-to-avoid-null-point.patch deleted +0 -24
@@ -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 <[email protected]> -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;
meta/recipes-devtools/rpm/rpm/rpm-ossp-uuid.patch deleted +0 -23
@@ -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 <[email protected]> - -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
meta/recipes-devtools/rpm/rpm/rpm-packageorigin.patch deleted +0 -25
@@ -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 <[email protected]> - -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);
meta/recipes-devtools/rpm/rpm/rpm-payload-use-hashed-inode.patch deleted +0 -126
126 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm/rpm-pkgconfigdeps.patch deleted +0 -37
@@ -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 <[email protected]> - -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
meta/recipes-devtools/rpm/rpm/rpm-platform-file-fix.patch deleted +0 -28
@@ -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);
meta/recipes-devtools/rpm/rpm/rpm-platform.patch deleted +0 -137
137 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm/rpm-platform2.patch deleted +0 -105
105 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm/rpm-py-init.patch deleted +0 -29
@@ -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 <[email protected]> - -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);
Lines of this file are not shown. View the raw message.
meta/recipes-devtools/rpm/rpm/rpm-python-AddErase.patch deleted +0 -35
Lines of this file are not shown. View the raw message.
meta/recipes-devtools/rpm/rpm/rpm-python-restore-origin.patch deleted +0 -49
49 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm/rpm-python-tagname.patch deleted +0 -24
Lines of this file are not shown. View the raw message.
meta/recipes-devtools/rpm/rpm/rpm-realpath.patch deleted +0 -24
Lines of this file are not shown. View the raw message.
meta/recipes-devtools/rpm/rpm/rpm-reloc-macros.patch deleted +0 -31
Lines of this file are not shown. View the raw message.
meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch deleted +0 -40
Lines of this file are not shown. View the raw message.
meta/recipes-devtools/rpm/rpm/rpm-rpmdb-grammar.patch deleted +0 -124
124 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch deleted +0 -34
Lines of this file are not shown. View the raw message.
meta/recipes-devtools/rpm/rpm/rpm-rpmio-headers.patch deleted +0 -19
Lines of this file are not shown. View the raw message.
meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-popt.patch deleted +0 -26
Lines of this file are not shown. View the raw message.
meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch deleted +0 -159
159 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm/rpm-showrc.patch deleted +0 -26
Lines of this file are not shown. View the raw message.
meta/recipes-devtools/rpm/rpm/rpm-syck-fix-gram.patch deleted +0 -1081
1,081 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm/rpm-tag-generate-endian-conversion-fix.patch deleted +0 -50
50 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm/rpm-tagname-type.patch deleted +0 -25
Lines of this file are not shown. View the raw message.
meta/recipes-devtools/rpm/rpm/rpm-tools-mtree-LDFLAGS.patch deleted +0 -24
Lines of this file are not shown. View the raw message.
meta/recipes-devtools/rpm/rpm/rpm-uuid-include.patch deleted +0 -40
Lines of this file are not shown. View the raw message.
meta/recipes-devtools/rpm/rpm/rpm2cpio deleted +0 -39
Lines of this file are not shown. View the raw message.
meta/recipes-devtools/rpm/rpm/rpmatch.patch deleted +0 -34
Lines of this file are not shown. View the raw message.
meta/recipes-devtools/rpm/rpm/rpmdb-more-verbose-error-logging-in-rpmTempFile.patch deleted +0 -31
Lines of this file are not shown. View the raw message.
meta/recipes-devtools/rpm/rpm/rpmdb-prevent-race-in-tmpdir-creation.patch deleted +0 -41
41 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm/rpmdeps-oecore.patch deleted +0 -194
194 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm/rpmqv.c-check-_gpg_passphrase-before-ask-for-input.patch deleted +0 -70
70 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch deleted +0 -50
50 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm/uclibc-support.patch deleted +0 -63
63 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm_5.4.16.bb deleted +0 -712
712 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.11.0
Part of the diff is not shown here. View the raw message.
PATCH 9/36 python-pygpgme: add a recipe
In reply to Alexander Kanavinpython-pygpgme is required by dnf.
--- 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
meta/recipes-devtools/python/python-pygpgme_0.3.bb new file +18 -0
@@ -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"
Signature · 1 line
2.11.0
PATCH 10/36 python-iniparse: add a recipe
In reply to Alexander Kanavinpython-iniparse is required by dnf.
--- 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
meta/recipes-devtools/python/python-iniparse_0.4.bb new file +17 -0
@@ -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}"
Signature · 1 line
2.11.0
PATCH 11/36 python-backports-lzma: add a recipe
In reply to Alexander KanavinIt is needed by dnf, and only when using Python 2.x, so can be dropped after moving dnf/rpm4 stack to Python 3.x.
--- ...-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
meta/recipes-devtools/python-backports-lzma/python-backports-lzma/0001-setup.py-do-not-add-include-and-library-directories-.patch new file +32 -0
@@ -0,0 +1,32 @@ +From e5e3196cf69172b625c8c6ccca991c02fd18137c Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <[email protected]> +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 <[email protected]> +--- + 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 +
meta/recipes-devtools/python-backports-lzma/python-backports-lzma_git.bb new file +21 -0
@@ -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"
Signature · 1 line
2.11.0
PATCH 12/36 librepo: add a recipe
In reply to Alexander Kanavinlibrepo is needed by dnf and libdnf.
--- ...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
meta/recipes-devtools/librepo/librepo/0001-Correctly-set-the-library-installation-directory.patch new file +28 -0
@@ -0,0 +1,28 @@ +From 36d87919223db9b054862ad38cdda8d9222a2bab Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <[email protected]> +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 <[email protected]> +--- + 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 +
meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch new file +41 -0
41 lines not on this page · raw message
meta/recipes-devtools/librepo/librepo/0003-tests-fix-a-race-when-deleting-temporary-directories.patch new file +41 -0
41 lines not on this page · raw message
meta/recipes-devtools/librepo/librepo/0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch new file +29 -0
@@ -0,0 +1,29 @@ +From a36be8192615e2a1fb5a5856d44565277f15583b Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <[email protected]> +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 <[email protected]> +--- + 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 +
meta/recipes-devtools/librepo/librepo_git.bb new file +24 -0
@@ -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" +
Signature · 1 line
2.11.0
PATCH 13/36 libcomps: add a recipe
In reply to Alexander Kanavinlibcomps is required by dnf.
--- ...-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
meta/recipes-devtools/libcomps/libcomps/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch new file +41 -0
@@ -0,0 +1,41 @@ +From ff4aae4c8beaf17cb8e7a3431f6c541eccfae244 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <[email protected]> +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 <[email protected]> +--- + 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 +
meta/recipes-devtools/libcomps/libcomps/0002-Set-library-installation-path-correctly.patch new file +27 -0
@@ -0,0 +1,27 @@ +From b1f61296e2f16c2b9a39c5501e4538628ff01ab4 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <[email protected]> +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 <[email protected]> +--- + 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 +
meta/recipes-devtools/libcomps/libcomps_git.bb new file +23 -0
@@ -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" +
Signature · 1 line
2.11.0
PATCH 14/36 libdnf: add a recipe
In reply to Alexander Kanavinlibdnf is required by dnf.
--- ...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 | 25 +++++++++++++++ 6 files changed, 178 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
meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch new file +31 -0
@@ -0,0 +1,31 @@ +From 9bb7630915c3e787732463a3e2064fe0e177101b Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <[email protected]> +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 <[email protected]> +--- + 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 +
meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch new file +28 -0
@@ -0,0 +1,28 @@ +From 5958b151a4dbb89114e90c971a34b74f873b7beb Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <[email protected]> +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 <[email protected]> +--- + 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 +
meta/recipes-devtools/libdnf/libdnf/0002-Prefix-sysroot-path-to-introspection-tools-path.patch new file +36 -0
@@ -0,0 +1,36 @@ +From c8211ad99ccaa4af4a75e0ba639527267fcfd69e Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <[email protected]> +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 <[email protected]> +--- + 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 +
meta/recipes-devtools/libdnf/libdnf/0003-Set-the-library-installation-directory-correctly.patch new file +29 -0
@@ -0,0 +1,29 @@ +From 8d29879fe3606c78769c1bcdddf0bcfc7191c710 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <[email protected]> +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 <[email protected]> +--- + 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 +
meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch new file +29 -0
@@ -0,0 +1,29 @@ +From 6d2718b925453f9a6915001f489606eb8e4086c8 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <[email protected]> +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 <[email protected]> +--- + 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 +
meta/recipes-devtools/libdnf/libdnf_git.bb new file +25 -0
@@ -0,0 +1,25 @@ +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 distutils-base pkgconfig + +EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DWITH_MAN=OFF" + +BBCLASSEXTEND = "native" +
Signature · 1 line
2.11.0
PATCH 15/36 dnf: add a recipe
In reply to Alexander KanavinThis 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.
--- ...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 | 32 +++++++++++++++ 7 files changed, 218 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
meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch new file +21 -0
@@ -0,0 +1,21 @@ +From 8ce181714640315d2dd37ee794acbb22063cd669 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <[email protected]> +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 <[email protected]> +--- + 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 +
meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch new file +29 -0
@@ -0,0 +1,29 @@ +From 4313ced1320594013795f11f6db00381e3f4cc45 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <[email protected]> +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 <[email protected]> +--- + 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 +
meta/recipes-devtools/dnf/dnf/0001-Do-not-prepend-installroot-to-logdir.patch new file +31 -0
@@ -0,0 +1,31 @@ +From 31653d324cf8c7b1f2f9e49d22676bd2ac546331 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <[email protected]> +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 <[email protected]> +--- + 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 +
meta/recipes-devtools/dnf/dnf/0028-Use-backports.lzma-not-lzma.patch new file +30 -0
@@ -0,0 +1,30 @@ +From 89af5c84d4b920d22ae882fcc5ab71ba09443cea Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <[email protected]> +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 <[email protected]> +--- + 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 +
meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch new file +27 -0
@@ -0,0 +1,27 @@ +From 3ddaa930cda57a62a2174faebcc87aebc59591d1 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <[email protected]> +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 <[email protected]> +--- + 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 +
meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch new file +48 -0
48 lines not on this page · raw message
meta/recipes-devtools/dnf/dnf_git.bb new file +32 -0
@@ -0,0 +1,32 @@ +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"
Signature · 1 line
2.11.0
PATCH 16/36 python-smartpm: remove the recipe
In reply to Alexander Kanavin--- ...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 | 177 ---------- ...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, 1347 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
meta/recipes-devtools/python/python-smartpm/channels-rpm_sys-use-md5sum-instead-of-mtime-as-the-.patch deleted +0 -38
@@ -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 <[email protected]> ---- - 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 -
meta/recipes-devtools/python/python-smartpm/smart-add-deugging-when-targetpath-is-empty.patch deleted +0 -47
47 lines not on this page · raw message
meta/recipes-devtools/python/python-smartpm/smart-add-for-rpm-ignoresize-check.patch deleted +0 -35
@@ -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 <[email protected]> -Signed-off-by: Chong Lu <[email protected]> ---- - 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
meta/recipes-devtools/python/python-smartpm/smart-already-installed-message.patch deleted +0 -54
54 lines not on this page · raw message
meta/recipes-devtools/python/python-smartpm/smart-attempt-fix.patch deleted +0 -158
158 lines not on this page · raw message
meta/recipes-devtools/python/python-smartpm/smart-attempt.patch deleted +0 -177
177 lines not on this page · raw message
meta/recipes-devtools/python/python-smartpm/smart-cache.py-getPackages-matches-name-version.patch deleted +0 -43
43 lines not on this page · raw message
meta/recipes-devtools/python/python-smartpm/smart-channel-remove-all.patch deleted +0 -33
@@ -1,33 +0,0 @@ -From 6d2363a705697f615d9e5af5d6703b291e618b46 Mon Sep 17 00:00:00 2001 -From: Daniel Klauer <[email protected]> -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 <[email protected]> ---- - 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 -
meta/recipes-devtools/python/python-smartpm/smart-channelsdir.patch deleted +0 -24
@@ -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): -
meta/recipes-devtools/python/python-smartpm/smart-locale.patch deleted +0 -27
@@ -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}}:"
meta/recipes-devtools/python/python-smartpm/smart-recommends.patch deleted +0 -381
381 lines not on this page · raw message
meta/recipes-devtools/python/python-smartpm/smart-rpm-transaction-failure-check.patch deleted +0 -57
57 lines not on this page · raw message
meta/recipes-devtools/python/python-smartpm/smart-set-noprogress-for-pycurl.patch deleted +0 -20
@@ -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 <[email protected]> ---- -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)
meta/recipes-devtools/python/python-smartpm/smartpm-rpm5-support-check-signatures.patch deleted +0 -112
112 lines not on this page · raw message
meta/recipes-devtools/python/python-smartpm_git.bb deleted +0 -141
141 lines not on this page · raw message
Signature · 1 line
2.11.0
PATCH 17/36 db: remove the 6.x recipe
In reply to Alexander KanavinVersion 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.
--- 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
meta/conf/distro/include/default-versions.inc +0 -3
@@ -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)}"
meta/recipes-support/db/db/Makefile-let-libdb-6.0.la-depend-os_map.l.patch deleted +0 -29
@@ -1,29 +0,0 @@ -From 2902dda6e3f7b2cd5796a96af20deece610e2eb9 Mon Sep 17 00:00:00 2001 -From: Robert Yang <[email protected]> -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 <[email protected]> ---- - 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)
meta/recipes-support/db/db/Makefile-let-libso_target-depend-on-bt_rec.patch deleted +0 -30
@@ -1,30 +0,0 @@ -From c640ff9340f358a00835816d0fea03d27a7be978 Mon Sep 17 00:00:00 2001 -From: Robert Yang <[email protected]> -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 <[email protected]> ---- - 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)
meta/recipes-support/db/db_5.3.28.bb +1 -0
@@ -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 \
meta/recipes-support/db/db_6.0.35.bb deleted +0 -111
111 lines not on this page · raw message
Signature · 1 line
2.11.0
PATCH 18/36 package_rpm.bbclass: make architecture-independent .rpm packages "noarch" instead of "all"
In reply to Alexander KanavinToo many places in dnf/rpm4 stack make that assumption; let's not fight against it.
--- meta/classes/package_rpm.bbclass | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
meta/classes/package_rpm.bbclass +3 -1
@@ -686,7 +686,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("-", "_")
Signature · 1 line
2.11.0
PATCH 19/36 package_manager.py: improve the API for insert_feed_uris()
In reply to Alexander KanavinNo need to store the configuration as class members, just pass it directly into the method.
--- meta/lib/oe/package_manager.py | 41 ++++++++++++++++++++++------------------- meta/lib/oe/rootfs.py | 5 ++++- 2 files changed, 26 insertions(+), 20 deletions(-)
meta/lib/oe/package_manager.py +22 -19
@@ -514,9 +514,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.
@@ -556,8 +553,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 """
@@ -692,14 +695,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()
@@ -722,7 +725,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)
@@ -1708,22 +1711,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))
@@ -2112,23 +2115,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:
meta/lib/oe/rootfs.py +4 -1
@@ -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):
Signature · 1 line
2.11.0
PATCH 20/36 package_rpm.bbclass: correctly map RRECOMMENDS and RSUGGESTS to rpm tags
In reply to Alexander KanavinPreviously 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.
--- meta/classes/package_rpm.bbclass | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
meta/classes/package_rpm.bbclass +4 -8
@@ -452,10 +452,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)
@@ -562,10 +560,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)
Signature · 1 line
2.11.0
PATCH 21/36 nativesdk-packagegroup-sdk-host: replace smartpm with dnf
In reply to Alexander Kanavin--- 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 +- .../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.6.0.bb | 2 +- meta/recipes-support/libassuan/libassuan_2.4.3.bb | 2 +- meta/recipes-support/libcheck/libcheck_0.10.0.bb | 3 ++- 13 files changed, 13 insertions(+), 13 deletions(-)
meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb +1 -1
@@ -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)} \ "
meta/recipes-devtools/dnf/dnf_git.bb +0 -1
@@ -28,5 +28,4 @@ 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"
meta/recipes-devtools/libcomps/libcomps_git.bb +1 -1
@@ -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"
meta/recipes-devtools/libdnf/libdnf_git.bb +1 -1
@@ -21,5 +21,5 @@ inherit gtk-doc gobject-introspection cmake distutils-base pkgconfig EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DWITH_MAN=OFF" -BBCLASSEXTEND = "native" +BBCLASSEXTEND = "native nativesdk"
meta/recipes-devtools/librepo/librepo_git.bb +1 -1
@@ -20,5 +20,5 @@ inherit cmake distutils-base pkgconfig EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR}" -BBCLASSEXTEND = "native" +BBCLASSEXTEND = "native nativesdk"
meta/recipes-devtools/python-backports-lzma/python-backports-lzma_git.bb +1 -1
@@ -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"
meta/recipes-devtools/python/python-iniparse_0.4.bb +1 -1
@@ -12,6 +12,6 @@ inherit distutils RDEPENDS_${PN} += "python-core" -BBCLASSEXTEND = "native" +BBCLASSEXTEND = "native nativesdk" S = "${WORKDIR}/iniparse-${PV}"
meta/recipes-devtools/python/python-pygpgme_0.3.bb +1 -1
@@ -15,4 +15,4 @@ DEPENDS = "gpgme python" RDEPENDS_${PN} += "python-core" -BBCLASSEXTEND = "native" +BBCLASSEXTEND = "native nativesdk"
meta/recipes-devtools/rpm/rpm_git.bb +1 -1
@@ -55,7 +55,7 @@ EXTRA_OECONF_append = " --without-lua --enable-python" # 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" # Rpm's make install creates var/tmp which clashes with base-files packaging do_install_append_class-target() {
meta/recipes-gnome/gtk-doc/gtk-doc_1.25.bb +1 -1
@@ -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
meta/recipes-support/gpgme/gpgme_1.6.0.bb +1 -1
@@ -24,7 +24,7 @@ BINCONFIG = "${bindir}/gpgme-config" inherit autotools texinfo binconfig-disabled pkgconfig -BBCLASSEXTEND = "native" +BBCLASSEXTEND = "native nativesdk" PACKAGES =+ "${PN}-pthread" FILES_${PN}-pthread = "${libdir}/libgpgme-pthread.so.*"
meta/recipes-support/libassuan/libassuan_2.4.3.bb +1 -1
@@ -28,4 +28,4 @@ do_configure_prepend () { rm -f ${S}/m4/*.m4 } -BBCLASSEXTEND = "native" +BBCLASSEXTEND = "native nativesdk"
meta/recipes-support/libcheck/libcheck_0.10.0.bb +2 -1
@@ -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" +BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.11.0
PATCH 22/36 package.bbclass: add support for pkg_postinst_ontarget()
In reply to Alexander KanavinAll commands that cannot be executed during cross-install and can only be run on target should go into this function. They will only be executed on first boot (if package was cross-installed) or immediately during package installation on target.
The previous approach was to check if we are cross-installing before executing these commands, and if so, exit the script with an error. This was not optimal for two reasons:
1) Code is hard to read; it is not obvious that 'exit 1' means 'defer what follows to first boot'.
2) Worse, this hides actual errors in the scriptlets; there is no difference between scriptlet failing because it's intended to be run on target and scriptlet failing because there's a bug or a regression somewhere.
Plain pkg_postinst() works as before: it is run during cross-install, if it fails, it's deferred to first boot (but from now on, the deferral produces a deprecation warning).
--- .../recipes-test/postinst/postinst_1.0.bb | 99 ++++++++-------------- meta/classes/package.bbclass | 20 +++++ meta/lib/oe/rootfs.py | 39 +++++---- scripts/postinst-intercepts/delay_to_first_boot | 2 + 4 files changed, 82 insertions(+), 78 deletions(-) create mode 100644 scripts/postinst-intercepts/delay_to_first_boot
meta-selftest/recipes-test/postinst/postinst_1.0.bb +37 -62
@@ -23,88 +23,68 @@ RDEPENDS_${PN}-delayed-t = "${PN}-delayed-p" # Main recipe post-install pkg_postinst_${PN}-at-rootfs () { - tfile="/etc/postinsta-test" - touch "$D"/this-was-created-at-rootfstime - if test "x$D" != "x" then - # Need to run on first boot - exit 1 - else - echo "lets write postinst" > $tfile + if test "x$D" != "x" ; then + touch "$D"/this-was-created-at-rootfstime fi } +pkg_postinst_ontarget_${PN}-at-rootfs () { + tfile="/etc/postinsta-test" + echo "lets write postinst" > $tfile +} + # Dependency recipes post-installs -pkg_postinst_${PN}-delayed-a () { +pkg_postinst_ontarget_${PN}-delayed-a () { efile="/etc/postinst-test" tfile="/etc/postinsta-test" rdeps="postinst" - if test "x$D" != "x"; then - # Need to run on first boot - exit 1 + touch /etc/this-was-created-at-first-boot + if test -e $efile ; then + echo 'success' > $tfile else - touch /etc/this-was-created-at-first-boot - if test -e $efile ; then - echo 'success' > $tfile - else - echo 'fail to install $rdeps first!' >&2 - exit 1 - fi - fi + echo 'fail to install $rdeps first!' >&2 + exit 1 + fi } -pkg_postinst_${PN}-delayed-b () { +pkg_postinst_ontarget_${PN}-delayed-b () { efile="/etc/postinsta-test" tfile="/etc/postinstb-test" rdeps="postinsta" - if test "x$D" != "x"; then - # Need to run on first boot - exit 1 + if test -e $efile ; then + echo 'success' > $tfile else - if test -e $efile ; then - echo 'success' > $tfile - else - echo 'fail to install $rdeps first!' >&2 - exit 1 - fi - fi + echo 'fail to install $rdeps first!' >&2 + exit 1 + fi } -pkg_postinst_${PN}-delayed-d () { +pkg_postinst_ontarget_${PN}-delayed-d () { efile="/etc/postinstb-test" tfile="/etc/postinstd-test" rdeps="postinstb" - if test "x$D" != "x"; then - # Need to run on first boot - exit 1 + if test -e $efile ; then + echo 'success' > $tfile else - if test -e $efile ; then - echo 'success' > $tfile - else - echo 'fail to install $rdeps first!' >&2 - exit 1 - fi - fi + echo 'fail to install $rdeps first!' >&2 + exit 1 + fi } -pkg_postinst_${PN}-delayed-p () { +pkg_postinst_ontarget_${PN}-delayed-p () { efile="/etc/postinstd-test" tfile="/etc/postinstp-test" rdeps="postinstd" - if test "x$D" != "x"; then - # Need to run on first boot - exit 1 + if test -e $efile ; then + echo 'success' > $tfile else - if test -e $efile ; then - echo 'success' > $tfile - else - echo 'fail to install $rdeps first!' >&2 - exit 1 - fi - fi + echo 'fail to install $rdeps first!' >&2 + exit 1 + fi } pkg_postinst_${PN}-delayed-t () {
@@ -112,15 +92,10 @@ pkg_postinst_${PN}-delayed-t () { tfile="/etc/postinstt-test" rdeps="postinstp" - if test "x$D" != "x"; then - # Need to run on first boot - exit 1 + if test -e $efile ; then + echo 'success' > $tfile else - if test -e $efile ; then - echo 'success' > $tfile - else - echo 'fail to install $rdeps first!' >&2 - exit 1 - fi - fi + echo 'fail to install $rdeps first!' >&2 + exit 1 + fi }
meta/classes/package.bbclass +20 -0
@@ -1289,6 +1289,25 @@ python emit_pkgdata() { from glob import glob import json + def process_postinst_on_target(pkg, mlprefix): + defer_fragment = """ +if [ -n "$D" ]; then + $INTERCEPT_DIR/postinst_intercept delay_to_first_boot %s mlprefix=%s + exit 0 +fi +""" % (pkg, mlprefix) + + postinst = d.getVar('pkg_postinst_%s' % pkg) + postinst_ontarget = d.getVar('pkg_postinst_ontarget_%s' % pkg) + + if postinst_ontarget: + bb.debug(1, 'adding deferred pkg_postinst_ontarget() to pkg_postinst() for %s' % pkg) + if not postinst: + postinst = '#!/bin/sh\n' + postinst += defer_fragment + postinst += postinst_ontarget + d.setVar('pkg_postinst_%s' % pkg, postinst) + def write_if_exists(f, pkg, var): def encode(str): import codecs
@@ -1383,6 +1402,7 @@ python emit_pkgdata() { write_if_exists(sf, pkg, 'PKG') write_if_exists(sf, pkg, 'ALLOW_EMPTY') write_if_exists(sf, pkg, 'FILES') + process_postinst_on_target(pkg, d.getVar("MLPREFIX")) write_if_exists(sf, pkg, 'pkg_postinst') write_if_exists(sf, pkg, 'pkg_postrm') write_if_exists(sf, pkg, 'pkg_preinst')
meta/lib/oe/rootfs.py +23 -16
@@ -290,6 +290,24 @@ class Rootfs(object, metaclass=ABCMeta): # Remove the package manager data files self.pm.remove_packaging_data() + def _postpone_to_first_boot(self, postinst_intercept_hook): + with open(postinst_intercept_hook) as intercept: + registered_pkgs = None + for line in intercept.read().split("\n"): + m = re.match("^##PKGS:(.*)", line) + if m is not None: + registered_pkgs = m.group(1).strip() + break + + if registered_pkgs is not None: + bb.warn("The postinstalls for the following packages " + "will be postponed for first boot: %s" % + registered_pkgs) + + # call the backend dependent handler + self._handle_intercept_failure(registered_pkgs) + + def _run_intercepts(self): intercepts_dir = os.path.join(self.d.getVar('WORKDIR'), "intercept_scripts")
@@ -303,6 +321,10 @@ class Rootfs(object, metaclass=ABCMeta): if script == "postinst_intercept" or not os.access(script_full, os.X_OK): continue + if script == "delay_to_first_boot": + self._postpone_to_first_boot(script_full) + continue + bb.note("> Executing %s intercept ..." % script) try:
@@ -310,22 +332,7 @@ class Rootfs(object, metaclass=ABCMeta): except subprocess.CalledProcessError as e: bb.warn("The postinstall intercept hook '%s' failed (exit code: %d)! See log for details! (Output: %s)" % (script, e.returncode, e.output)) - - with open(script_full) as intercept: - registered_pkgs = None - for line in intercept.read().split("\n"): - m = re.match("^##PKGS:(.*)", line) - if m is not None: - registered_pkgs = m.group(1).strip() - break - - if registered_pkgs is not None: - bb.warn("The postinstalls for the following packages " - "will be postponed for first boot: %s" % - registered_pkgs) - - # call the backend dependent handler - self._handle_intercept_failure(registered_pkgs) + self._postpone_to_first_boot(script_full) def _run_ldconfig(self): if self.d.getVar('LDCONFIGDEPEND'):
scripts/postinst-intercepts/delay_to_first_boot new file +2 -0
@@ -0,0 +1,2 @@ +#!/bin/sh +exit 1
Signature · 1 line
2.11.0
Re: [PATCH 22/36] package.bbclass: add support for pkg_postinst_ontarget()
Quoted 3 lines · Alexander Kanavin
All commands that cannot be executed during cross-install and can only be run on target should go into this function. They will only be executed on first boot (if package was cross-installed) or immediately during package installation on target.
How will this be handled when using ro-rootfs?
We don't need to make it easier to write on-first-boot only post_install scripts, rather, the goal has to be to be able to run all post_install scripts during rootfs creation...
Cheers,
Anders
Signature · 2 lines
Anders Darander, Senior System Architect ChargeStorm AB / eStorm AB
Re: [PATCH 22/36] package.bbclass: add support for pkg_postinst_ontarget()
Quoted 1 line · Anders Darander
How will this be handled when using ro-rootfs?
Same as it's handled now: by halting bitbake. See the email I just wrote to the oe-arch list for details.
Quoted 3 lines
We don't need to make it easier to write on-first-boot only
post_installscripts, rather, the goal has to be to be able to run allpost_installscripts during rootfs creation...
This is not always possible. Some things do have to run on target: because qemu emulation doesn't work for the target machine on the build host, or because the post_install has to interact with target hardware.
Alex
Re: [PATCH 22/36] package.bbclass: add support for pkg_postinst_ontarget()
Quoted 6 lines · Alexander Kanavin
Quoted 1 line · Anders Darander
How will this be handled when using ro-rootfs?
Same as it's handled now: by halting bitbake. See the email I just wrote to the oe-arch list for details.
Quoted 6 lines
Quoted 3 lines
We don't need to make it easier to write on-first-boot only
post_installscripts, rather, the goal has to be to be able to run allpost_installscripts during rootfs creation...This is not always possible. Some things do have to run on target: because qemu emulation doesn't work for the target machine on the build host, or
Well, if the qemu emulation isn't working for a particular target, but might work for another target, the post_install script can't be moved to pkg_postinst_ontarget_${PN} anyway, it'll break ro-rootfs for the 2nd machine as well..
Quoted 1 line
because the
post_installhas to interact with target hardware.
Sure, but this is really the minority of cases. In this case pkg_postinst_ontarget_${PN} might be OK, but I'm worried the it'll be used a lot more often, because it's simpler to deal with...
Cheers,
Anders
Signature · 2 lines
Anders Darander, Senior System Architect ChargeStorm AB / eStorm AB
Re: [PATCH 22/36] package.bbclass: add support for pkg_postinst_ontarget()
Quoted 4 lines · Anders Darander
Well, if the qemu emulation isn't working for a particular target, but might work for another target, the
post_installscript can't be moved to pkg_postinst_ontarget_${PN} anyway, it'll break ro-rootfs for the 2nd machine as well..
You still seem to misunderstand the purpose of _ontarget. It's meant only for situations where the script *has* to run on target, and not anything else. In particular, if qemu can be used, it should be; if it fails, the script is deferred to first boot.
Quoted 5 lines
Quoted 1 line
because the
post_installhas to interact with target hardware.Sure, but this is really the minority of cases. In this case pkg_postinst_ontarget_${PN} might be OK, but I'm worried the it'll be used a lot more often, because it's simpler to deal with...
This will be discouraged (same way as 'exit 1 trick' is discouraged now if there's no clear reason for it); we do have patch reviews :)
Alex
PATCH 23/36 rootfs_rpm.bbclass: migrate image creation to dnf
In reply to Alexander KanavinTo properly look at this patch, you probably need a side-by-side diff viewing tool.
--- meta/classes/rootfs_rpm.bbclass | 21 +- meta/lib/oe/package_manager.py | 1186 +++++++-------------------------------- meta/lib/oe/rootfs.py | 18 +- meta/lib/oe/sdk.py | 7 +- 4 files changed, 229 insertions(+), 1003 deletions(-)
meta/classes/rootfs_rpm.bbclass +10 -11
@@ -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"
meta/lib/oe/package_manager.py +211 -975
1,272 lines not on this page · raw message
meta/lib/oe/rootfs.py +4 -14
@@ -442,6 +442,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')
@@ -455,8 +457,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)
@@ -491,15 +491,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()
@@ -537,15 +535,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):
meta/lib/oe/sdk.py +4 -3
@@ -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()
Signature · 1 line
2.11.0
Re: [PATCH 23/36] rootfs_rpm.bbclass: migrate image creation to dnf
Quoted 2 lines · Alexander Kanavin
To properly look at this patch, you probably need a side-by-side diff viewing tool.
I don't normally use rpm, but it seems to me that the new 'remove' is not right.
Looking at the description, clean_requirements_on_remove is meant to tell DNF whether to remove packages that are no longer needed after the package given is uninstalled, not to tell it to force removal of a package even though other packages still depend on it http://dnf.readthedocs.io/en/latest
/command_ref.html#remove-command-
The with_dependencies flag is meant to say whether or not packages that depend on the package about to be removed should be removed as well or not.
Matching clean_requirements_on_remove with with_dependencies isn't right in other words.
Looking at the debian package manager, and at the previous version:
- The high level tool (apt/smart) is used to remove packages recursively if with_dependencies is True, i.e. the given package and all packages that depend on it
- The low level tool (dpkg/rpm) is forcefully used to remove packages if with_dependencies is False, i.e. the given package only
With this patch here, the high level tool is used in both cases, but this won't work, you should still use rpm -e --nodeps
I guess this is the reason you need patch 31 ("image.bbclass: do not uninstall update-alternatives from readonly rootfs")
Was there a specific reason to switch from rpm -e --nodeps to (the differently-working) dnf remove?
Cheers,
Andre'
Quoted 1,633 lines
Signed-off-by Alexander Kanavin <[email protected]>---
meta/classes/rootfs_rpm.bbclass | 21 +- meta/lib/oe/package_manager.py | 1186 +++++++---------------------------
-----
meta/lib/oe/rootfs.py | 18 +-
meta/lib/oe/sdk.py | 7 +-4 files changed, 229 insertions(+), 1003 deletions(-)meta/classes/rootfs_rpm.bbclass +0
-0@@ -2,20 +2,23 @@ # Creates a root filesystem out of rpm packages #meta/classes/rootfs_rpm.bbclass +1
-1-ROOTFS_PKGMANAGE = "rpm smartpm" +ROOTFS_PKGMANAGE = "rpm dnf"ROOTFS_PKGMANAGE_BOOTSTRAP = "run-postinsts"
meta/classes/rootfs_rpm.bbclass +0
-2-# Add 100Meg of extra space for Smart -IMAGE_ROOTFS_EXTRA_SPACE_append = "${@bb.utils.contains("PACKAGE_INSTALL", "smartpm", " + 102400", "" ,d)}"
meta/classes/rootfs_rpm.bbclass +3
-0+# dnf is using our custom distutils, and so will fail without these +export STAGING_INCDIR +export STAGING_LIBDIRmeta/classes/rootfs_rpm.bbclass +2
-1-# 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)}"
meta/classes/rootfs_rpm.bbclass +2
-0+ +# 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}"meta/classes/rootfs_rpm.bbclass +0
-0@@ -35,7 +38,3 @@ python () { d.setVar('RPM_POSTPROCESS_COMMANDS', '')
}meta/classes/rootfs_rpm.bbclass +0
-4-# Smart is python based, so be sure python-native is available to us. -EXTRANATIVEPATH += "python-native" - -rpmlibdir = "/var/lib/rpm"meta/lib/oe/package_manager.py +0
-0@@ -102,110 +102,16 @@ class Indexer(object, metaclass=ABCMeta):
class RpmIndexer(Indexer):
- defget_ml_prefix_and_os_list(self, arch_var=None, os_var=None):
- package_archs =collections.OrderedDict()
- target_os =collections.OrderedDict()
-
- ifarch_varis not None andos_varis 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 inmultilibs.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)
- ifdefault_tuneis None:
- default_tune_key = "DEFAULTTUNE_ML_" + eext[1] - default_tune =localdata.getVar(default_tune_key, False)
- ifdefault_tune:
- localdata.setVar("DEFAULTTUNE",default_tune) - bb.data.update_data(localdata)
- package_archs[eext[1]] = localdata.getVar('PACKAGE_ARCHS').split()
- package_archs[eext[1]].reverse()
- target_os[eext[1]] = localdata.getVar("TARGET_OS").strip()meta/lib/oe/package_manager.py +0
-15- - 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()meta/lib/oe/package_manager.py +0
-6- - 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 inmlb_prefix_list[item]))
meta/lib/oe/package_manager.py +0
-9- - 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
-
ifself.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)
- ifos.path.exists(dbpath):
- bb.utils.remove(dbpath, True)
- arch_dir =os.path.join(self.deploy_dir, arch)- if notos.path.isdir(arch_dir):
- continue
+ raise NotImplementedError('Package feed signing not yet implementd for rpm')
- 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'))
+ os.environ['RPM_CONFIGDIR'] =oe.path.join(self.d.getVar('STAGING_LIBDIR_NATIVE'), "rpm")
- rpm_dirs_found = Truemeta/lib/oe/package_manager.py +2
-7- - if not rpm_dirs_found: - bb.note("There are no packages in %s" % self.deploy_dir) - return - - # 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 inrepomd_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):
defwrite_index(self):meta/lib/oe/package_manager.py +0
-0@@ -348,117 +254,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)meta/lib/oe/package_manager.py +0
-6- - 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:
- forcmp_archin self.ml_prefix_list[mlib]:
- fixed_cmp_arch =cmp_arch.replace('_', '-')
- iffixed_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 + '_', '')meta/lib/oe/package_manager.py +0
-21- - # 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")))meta/lib/oe/package_manager.py +0
-3- - 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")))meta/lib/oe/package_manager.py +0
-31- - 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)
meta/lib/oe/package_manager.py +1
-6- - 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):meta/lib/oe/package_manager.py +0
-0@@ -554,6 +352,16 @@ class PackageManager(object, metaclass=ABCMeta):pass
"""
+ Returns the path to a tmpdir where resides the contents of a package.meta/lib/oe/package_manager.py +9
-0+ + 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 byfeed_uris,feed_base_pathsandfeed_archs. See http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.ht
ml#var-PACKAGE_FEED_URISmeta/lib/oe/package_manager.py +0
-0@@ -662,821 +470,249 @@ 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')
+ ifarch_var== None:
+ self.archs = self.d.getVar('PACKAGE_ARCHS').replace("-","_") + else:
+ self.archs = self.d.getVar(arch_var).replace("-","_") + iftask_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'), "rpm- 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)
-
- self.ml_prefix_list, self.ml_os_list =self.indexer.get_ml_prefix_and_os_list(arch_var, os_var)meta/lib/oe/package_manager.py +0
-17- - 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 indefault_platform_extra:
- default_platform_extra.append(plt) - else:
- if plt not inplatform_extra:
- platform_extra.append(plt)
- platform_extra =default_platform_extra+platform_extra+ def_configure_dnf(self):
+ # libsolv handles 'noarch' internally, we don't need to specify it explicitly
+ archs = [i for i inself.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("")meta/lib/oe/package_manager.py +4
-0+ + + def _configure_rpm(self): + # We need to configure rpm to use our primary packagearchitecture 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" % (self.primary_arch, self.archs if len(self.archs) > 0 else self.primary_arch))
- forcanonical_archinplatform_extra:
- arch = canonical_arch.split('-')[0]
- if notos.path.exists(os.path.join(self.deploy_dir, arch)):
- continue
- arch_list.append(arch)
-
- feed_uris =self.construct_uris(feed_uris.split(), feed_base_paths.split())
+ ifself.d.getVar('RPM_SIGN_PACKAGES')== '1':
+ raiseNotImplementedError("Signature verification with rpm not yet supported.")
- uri_iterator = 0
- channel_priority = 10 + 5 *len(feed_uris)* (len(arch_list)ifarch_listelse 1)
-
- for uri infeed_uris:
- ifarch_list:
- for arch inarch_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
+ ifself.d.getVar('RPM_PREFER_ELF_ARCH'):
+ raiseNotImplementedError("RPM_PREFER_ELF_ARCH not yet checked/tested/implemented with rpm4/dnf.")
- '''
- Create configs for rpm and smart, and multilib is supported - '''
defcreate_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 indefault_platform_extra:
- default_platform_extra.append(plt)
- else:
- if plt not inplatform_extra:
- platform_extra.append(plt)
- platform_extra =default_platform_extra+platform_extra-
- self._create_configs(platform,platform_extra)
+ self._configure_dnf()
+ self._configure_rpm()
- #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)
- returncomplementary_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")))meta/lib/oe/package_manager.py +0
-15- - 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 inoutput.split():
- for arch infeed_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) -
- return ""
+ defwrite_index(self):
+ RpmIndexer(self.d, self.rpm_repo_dir).write_index()
- '''
- 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
- # Searchnew_pkgin probable multilibs first
- for mlib in self.ml_prefix_list:
- # Jump the default archs
- if mlib == 'default':
- continue
+ definsert_feeds_uris(self, feed_uris, feed_base_paths, feed_archs):
+ iffeed_uris== "":
+ return
- 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 notnew_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 notattempt_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)meta/lib/oe/package_manager.py +0
-8- - 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 notnew_pkg:
- err_msg = '%s not found in the feeds (%s) in %s.' % \
- (pkg, " ".join(default_archs),self.d.getVar('DEPLOY_DIR_RPM'))
- if notattempt_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)meta/lib/oe/package_manager.py +0
-33- - 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+") asdirnames:
- dirnames.write("/\n")meta/lib/oe/package_manager.py +0
-14- - 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 notos.path.exists(rpmlib_log):
- bb.utils.mkdirhier(os.path.join(self.image_rpmlib, 'log')) - open(rpmlib_log, 'w+').close()meta/lib/oe/package_manager.py +0
-31- - 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 - ifself.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) - 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")))meta/lib/oe/package_manager.py +0
-5- - - # 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')
- ifprefer_color:
- ifprefer_colornot in ['0', '1', '2', '4']:
- bb.fatal("InvalidRPM_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)
- ifprefer_color== "4" andself.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])meta/lib/oe/package_manager.py +0
-10- - 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 inpkg_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 = []
- forcanonical_archinplatform_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 notos.path.exists(deploy_arch_dir):
- continue
+ raiseNotImplementedError("Adding remote dnf feeds not yet supported.")
- 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 inch_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 -= 5meta/lib/oe/package_manager.py +0
-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"meta/lib/oe/package_manager.py +0
-12- - 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_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')
- def update(self):
- self._invoke_smart(['update', 'rpmsys'])
-
- defget_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 notsub_rdep:
- continue
- done = list(bb.utils.explode_dep_versions2(sub_rdep).keys()) - next = done
- # Find all the rdepends on dependency chain
- while next:
- new = []
- forsub_pkgin next:
- sub_data =oe.packagedata.read_subpkgdata(sub_pkg, self.d)
- sub_pkg_rdep =sub_data.get("RDEPENDS_" + sub_pkg)- if notsub_pkg_rdep:
- continue
- for p inbb.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
- ifoe.packagedata.has_subpkgdata(p, self.d):
- done.append(p)
- new.append(p)
- next = new
- pkgs.extend(done)
- return pkgs
+ os.environ['RPM_NO_CHROOT_FOR_SCRIPTS'] = "1"
- '''
- Install pkgs with smart, the pkg name is oe format
- '''
- definstall(self, pkgs, attempt_only=False):
- if not pkgs:
- bb.note("There are no packages to install")
+ definstall(self, pkgs, attempt_only = False):
+ if len(pkgs) == 0:
return
- bb.note("Installing the following packages: %s" % ' '.join(pkgs)) - if notattempt_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. Bothdo_rootfsanddo_populate_sdkhave this
- # issue.
- # Theattempt_onlypackages 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():
- ifpkg.startswith(mlib + '-'):
- ml_pkgs.append(pkg)
- non_ml_pkgs.remove(pkg)
-
- iflen(ml_pkgs)> 0 andlen(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 innon_ml_pkgs:
- for mlib in (self.d.getVar("MULTILIB_VARIANTS")or "").split():
- mlib_pkg = mlib + "-" + pkg
- ifmlib_pkginml_pkgs:
- pkgs_new.append(pkg)
- pkgs_new.append(mlib_pkg)
- for pkg in pkgs:
- if pkg not inpkgs_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")
+ self._prepare_pkg_transaction()
+
+ bad_recommendations =self.d.getVar('BAD_RECOMMENDATIONS')+ package_exclude =self.d.getVar('PACKAGE_EXCLUDE')
+ exclude_pkgs = (bad_recommendations.split()ifbad_recommendationselse []) + (package_exlcude.split()ifpackage_excludeelse [])
+
+ output = self._invoke_dnf((["--skip-broken"] ifattempt_onlyelse []) +
+ (["-x", ",".join(exclude_pkgs)] iflen(exclude_pkgs)> 0 else []) +
+ (["--setopt=install_weak_deps=False"] ifself.d.getVar('NO_RECOMMENDATIONS')== 1 else []) +
+ ["--nogpgcheck", "install"] +
+ pkgs)
+ failed_scriptlets_pkgnames =collections.OrderedDict()+ for line inoutput.splitlines():
+ ifline.startswith("Non-fatal POSTIN scriptlet failure in rpm package"):
+ failed_scriptlets_pkgnames[line.split()[-1]] = True +
+ iflen(failed_scriptlets_pkgnames)> 0:
+ bb.warn("Intentionally using 'exit 1' to defer postinstall scriptlets of %s to first boot is deprecated. Please place them into pkg_postinst_ontarget_${PN} ()." %(list(failed_scriptlets_pkgnames.keys())))
+ bb.warn("If deferring to first boot wasn't the intent, then scriptlet failure may mean an issue in the recipe, or a regression elsewhere.")
+ for pkg infailed_scriptlets_pkgnames.keys():
+ # Path does not exist when building SDKs
+ ifos.path.exists(oe.path.join(os.environ['INTERCEPT_DIR'], "postinst_intercept")):
+ subprocess.check_output([oe.path.join(os.environ['INTERCEPT_DIR'], "postinst_intercept"), "delay_to_first_boot", pkg, "mlprefix=%s" %(self.d.getVar('MLPREFIX'))])
+
+ defremove(self, pkgs, with_dependencies = True):
+ if len(pkgs) == 0:
return
- if notattempt_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")))
+ self._prepare_pkg_transaction()
- '''
- Remove pkgs with smart, the pkg name is smart/rpm format - '''
- defremove(self, pkgs, with_dependencies=True):
- bb.note('to be removed: ' + ' '.join(pkgs))
-
- if notwith_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")))
+ self._invoke_dnf((["--setopt=clean_requirements_on_remove=False"] ifwith_dependencies== False else []) +
+ ["remove"] + pkgs)
def upgrade(self):
- bb.note('smart upgrade')
- self._invoke_smart(['upgrade'])
+ self._prepare_pkg_transaction()
+ self._invoke_dnf(["upgrade"])
- defwrite_index(self):
- result =self.indexer.write_index()
-
- if result is not None:
- bb.fatal(result)
+ def autoremove(self):
+ self._prepare_pkg_transaction()
+ self._invoke_dnf(["autoremove"])
defremove_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)
defbackup_packaging_data(self):
- # Save the rpmlib for increment rpm image generation - ifos.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 + ifos.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)
defrecovery_packaging_data(self):
# Move the rpmlib back
- ifos.path.exists(self.saved_rpmlib):
- ifos.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,
+ ifos.path.exists(self.saved_packaging_data):
+ for i in self.packaging_data_dirs:
+ target_dir =oe.path.join(self.target_rootfs, i)+ ifos.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)
deflist_installed(self):
- returnself.pkgs_list.list_pkgs()meta/lib/oe/package_manager.py +1
-15- - ''' - 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"],
+ bb_note = False)
+ packages = {}
+ current_package = None
+ current_deps = None
+ current_state = "initial"
+ for line inoutput.splitlines():
+ ifline.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 = []
+ elifline.startswith("Dependencies:"):
+ current_state = "dependencies"
+ elifline.startswith("Recommendations"):
+ current_state = "recommendations"
+ elifline.startswith("DependenciesEndHere:"):
+ current_state = "initial"
+ packages[current_package]["deps"] =current_deps+ elif len(line) > 0:
+ ifcurrent_state== "dependencies":
+ current_deps.append(line)
+ elifcurrent_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, bb_fatal = True, bb_note = True ):
+ os.environ['RPM_CONFIGDIR'] =oe.path.join(self.d.getVar('STAGING_LIBDIR_NATIVE'), "rpm")
+ os.environ['RPM_ETCCONFIGDIR'] = self.target_rootfs
+
+ dnf_cmd =bb.utils.which(os.getenv('PATH'), "dnf-2")+ standard_dnf_args = (["-v", "--rpmverbosity=debug"] ifself.d.getVar('ROOTFS_RPM_DEBUG')else []) + ["-y",
+ "-c",oe.path.join(self.target_rootfs, "etc/dnf/dnf.conf"),
+ "--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()
- withopen(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") + ifbb_note:
+ 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']) - returninstall_pkgs
+ (bb.note, bb.fatal)[bb_fatal]("Could not invoke dnf. Command "
+ "'%s' returned %d:\n%s" % (' '.join(cmd), e.returncode,e.output.decode("utf-8")))
+
+ defdump_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...
- Theload_old_install_solutionwill load the previous install - solution
- '''
defload_old_install_solution(self):
- bb.note('load old install solution for incremental install') - installed_pkgs =list()
if notos.path.exists(self.solution_manifest):
- bb.note('old install solution not exist')
- returninstalled_pkgs
+ return []
- withopen(self.solution_manifest, 'r')as manifest:
- for pkg in manifest.read().split('\n'):
- if '@' in pkg:
- installed_pkgs.append(pkg.strip())
+ returnopen(self.solution_manifest, 'r').read().split()
- returninstalled_pkgs
-
- '''
- Dump all available packages in feeds, it should be invoked after the - newest rpm index was created
- '''
- defdump_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) - withopen(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")))meta/lib/oe/package_manager.py +7
-4- - self.fullpkglist = available_pkgs - - 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
defsave_rpmpostinst(self, pkg):
- mlibs = (self.d.getVar('MULTILIB_GLOBAL_VARIANTS', False)or "").split()meta/lib/oe/package_manager.py +0
-10- - 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("Invokesave_rpmpostinstfailed. Command '%s' " - "returned %d:\n%s" % (cmd, e.returncode,e.output.decode("utf-8")))
-
- '''Write common configuration for target usage'''
- defrpm_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.
- '''
- defunlock_rpm_db(self):
- # Remove rpm db lock files
- rpm_db_locks =glob.glob('%s/var/lib/rpm/__db.*' % self.target_rootfs)
- for f inrpm_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.
- """
- defpackage_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 inoutput.splitlines():
- line =line.rstrip()
- ifline.startswith("Name:"):
- pkg =line.split(": ")[1]
- elifline.startswith("Version:"):
- tmp_str =line.split(": ")[1]
- ver, arch =tmp_str.split("@")
- breakmeta/lib/oe/package_manager.py +1
-20- - # 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. + target_path = oe.path.join(self.target_rootfs,
self.d.expand('${sysconfdir}/rpm-postinsts/'))
+ 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)
- Deleting the tmpdir is responsability of the caller.
-
- """
defextract(self, pkg):
- pkg_info =self.package_info(pkg)
- if notpkg_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 notpkg_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")meta/lib/oe/package_manager.py +0
-0@@ -1726,7 +962,7 @@ class OpkgPM(OpkgDpkgPM):for uri in
feed_uris:
if archs:
for arch in archs:
- if (feed_archsis None) and (notos.path.exists(os.path.join(self.deploy_dir, arch))):
+ if (feed_archsis None) and (notos.path.exists(oe.path.join(self.deploy_dir, arch))):
continue
bb.note('Adding opkg feed url-%s-%d (%s)' % (arch,uri_iterator, uri))meta/lib/oe/rootfs.py +0
-0@@ -442,6 +442,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')meta/lib/oe/rootfs.py +0
-0@@ -455,8 +457,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)meta/lib/oe/rootfs.py +0
-0@@ -491,15 +491,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()meta/lib/oe/rootfs.py +0
-0@@ -537,15 +535,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()
- ifos.path.isdir(self.pm.install_dir_path + "/tmp")and notos.listdir(self.pm.install_dir_path + "/tmp"):
- bb.utils.remove(self.pm.install_dir_path + "/tmp", True) - ifos.path.isdir(self.pm.install_dir_path)and notos.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):meta/lib/oe/sdk.py +0
-0@@ -130,7 +130,6 @@ class RpmSdk(Sdk):
pm.create_configs()
pm.write_index()
- pm.dump_all_available_pkgs()
pm.update()
pkgs = []meta/lib/oe/sdk.py +3
-1@@ -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)meta/lib/oe/sdk.py +0
-0@@ -350,7 +351,7 @@ def sdk_list_installed_packages(d, target,rootfs_dir=None):
ifimg_type== "rpm":
arch_var = ["SDK_PACKAGE_ARCHS", None][target is True]os_var= ["SDK_OS", None][target is True]
- returnRpmPkgsList(d, rootfs_dir, arch_var, os_var).list_pkgs() + returnRpmPkgsList(d, rootfs_dir).list_pkgs()
elifimg_type== "ipk":
conf_file_var = ["IPKGCONF_SDK", "IPKGCONF_TARGET"][target is True]
returnOpkgPkgsList(d, rootfs_dir, d.getVar(conf_file_var)).list_pkgs()
--
2.11.0
Re: [PATCH 23/36] rootfs_rpm.bbclass: migrate image creation to dnf
Quoted 2 lines · André Draszik
Was there a specific reason to switch from rpm -e --nodeps to (the differently-working) dnf remove?
No specific reason, just rewriting the code from scratch, coupled with poorly documented API for the class. There's too much cruft in the old code, so I only looked at it when things didn't work :)
I'll bring back them rpm -e --nodeps.
Alex
PATCH 24/36 scripts/rpm2cpio.sh: replace 5.x version with 4.x version
In reply to Alexander Kanavin--- scripts/rpm2cpio.sh | 108 ++++++++++++++++++++++++++-------------------------- 1 file changed, 55 insertions(+), 53 deletions(-)
scripts/rpm2cpio.sh +55 -53
@@ -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
Signature · 1 line
2.11.0
PATCH 25/36 scripts/oe-setup-rpmrepo: replace createrepo with createrepo_c
In reply to Alexander Kanavin--- scripts/oe-setup-rpmrepo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/oe-setup-rpmrepo +1 -1
@@ -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"
Signature · 1 line
2.11.0
PATCH 26/36 package_rpm.bbclass: replace createrepo reference with createrepo_c
In reply to Alexander Kanavin--- meta/classes/package_rpm.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/package_rpm.bbclass +1 -1
@@ -765,6 +765,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"
Signature · 1 line
2.11.0
PATCH 27/36 package_rpm.bbclass: prevent rpm from using sysroot paths that it was originally compiled with
In reply to Alexander Kanavin--- meta/classes/package_rpm.bbclass | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
meta/classes/package_rpm.bbclass +10 -3
@@ -699,6 +699,14 @@ python do_package_rpm () { bb.utils.mkdirhier(pkgwritedir) os.chmod(pkgwritedir, 0o755) + # 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 + export_cmd = """ +export RPM_CONFIGDIR=%s +export RPM_ETCCONFIGDIR=%s +export MAGIC=%s +""" %(oe.path.join(d.getVar('STAGING_LIBDIR_NATIVE'), "rpm"),d.getVar('STAGING_DIR_NATIVE'), magicfile) + cmd = rpmbuild cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + " --buildroot " + pkgd cmd = cmd + " --define '_topdir " + workdir + "' --define '_rpmdir " + pkgwritedir + "'"
@@ -713,20 +721,19 @@ 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') + "'" cmdsrpm = cmd + " --define '_srcrpmdir " + d.getVar('ARCHIVER_OUTDIR') + "'" cmdsrpm = cmdsrpm + " -bs " + outspecfile # Build the .src.rpm - d.setVar('SBUILDSPEC', cmdsrpm + "\n") + d.setVar('SBUILDSPEC', export_cmd + "\n"+ cmdsrpm + "\n") d.setVarFlag('SBUILDSPEC', 'func', '1') bb.build.exec_func('SBUILDSPEC', d) cmd = cmd + " -bb " + outspecfile # Build the rpm package! - d.setVar('BUILDSPEC', cmd + "\n") + d.setVar('BUILDSPEC', export_cmd + "\n" + cmd + "\n") d.setVarFlag('BUILDSPEC', 'func', '1') bb.build.exec_func('BUILDSPEC', d)
Signature · 1 line
2.11.0
PATCH 28/36 testimage.bbclass: fix runtime test for rpm, port smart tests to dnf
In reply to Alexander Kanavin--- meta/classes/testimage.bbclass | 62 +--------- meta/lib/oeqa/oetest.py | 7 -- meta/lib/oeqa/runtime/cases/dnf.py | 109 +++++++++++++++++ meta/lib/oeqa/runtime/cases/parselogs.py | 1 + meta/lib/oeqa/runtime/cases/rpm.py | 19 ++- meta/lib/oeqa/runtime/cases/smart.py | 196 ------------------------------- 6 files changed, 123 insertions(+), 271 deletions(-) create mode 100644 meta/lib/oeqa/runtime/cases/dnf.py delete mode 100644 meta/lib/oeqa/runtime/cases/smart.py
meta/classes/testimage.bbclass +4 -58
@@ -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.contains('DISTRO_FEATURES', 'systemd', '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 = ""
@@ -119,10 +118,6 @@ python do_testimage() { testimage_sanity(d) - if (d.getVar('IMAGE_PKGTYPE') == 'rpm' - and 'smart' in d.getVar('TEST_SUITES')): - create_rpm_index(d) - testimage_main(d) }
@@ -297,55 +292,6 @@ def get_runtime_paths(d): paths.append(path) return paths -def create_index(arg): - import subprocess - - index_cmd = arg - try: - bb.note("Executing '%s' ..." % index_cmd) - result = subprocess.check_output(index_cmd, - stderr=subprocess.STDOUT, - shell=True) - result = result.decode('utf-8') - except subprocess.CalledProcessError as e: - return("Index creation command '%s' failed with return code " - '%d:\n%s' % (e.cmd, e.returncode, e.output.decode("utf-8"))) - if result: - bb.note(result) - return None - -def create_rpm_index(d): - # Index RPMs - rpm_createrepo = bb.utils.which(os.getenv('PATH'), "createrepo") - 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) - - 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 - # this leaves some allarch and machine arch packages too. - bb.utils.remove(idx_path + "*/[a-oq-z]*.rpm") - bb.utils.unlockfile(lf) - cmd = '%s --dbpath %s --update -q %s' % (rpm_createrepo, - db_path, idx_path) - - # Create repodata - result = create_index(cmd) - if result: - bb.fatal('%s' % ('\n'.join(result))) - def package_extraction(d, test_suites): from oeqa.utils.package_manager import find_packages_to_extract from oeqa.utils.package_manager import extract_packages
meta/lib/oeqa/oetest.py +0 -7
@@ -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 - class OETestCalledProcessError(subprocess.CalledProcessError): def __str__(self): if hasattr(self, "stderr"):
meta/lib/oeqa/runtime/cases/dnf.py new file +109 -0
109 lines not on this page · raw message
meta/lib/oeqa/runtime/cases/parselogs.py +1 -0
@@ -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 = [
meta/lib/oeqa/runtime/cases/rpm.py +9 -10
@@ -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 <[email protected]> + Author: Alexander Kanavin <[email protected]> AutomatedBy: Daniel Istrate <[email protected]> """ 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,11 @@ 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) + # 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))
meta/lib/oeqa/runtime/cases/smart.py deleted +0 -196
196 lines not on this page · raw message
Signature · 1 line
2.11.0
PATCH 29/36 package_rpm.bbclass: instruct rpm to not remove the buildroot directory
In reply to Alexander KanavinThis is the ${W}/package directory which may be reused in subsequent builds.
Also clean up various default directories rpm 4 creates.
--- meta/classes/package_rpm.bbclass | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
meta/classes/package_rpm.bbclass +5 -2
@@ -708,7 +708,7 @@ export MAGIC=%s """ %(oe.path.join(d.getVar('STAGING_LIBDIR_NATIVE'), "rpm"),d.getVar('STAGING_DIR_NATIVE'), magicfile) 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'"
@@ -732,8 +732,11 @@ export MAGIC=%s 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', export_cmd + "\n" + cmd + "\n") + d.setVar('BUILDSPEC', export_cmd + "\n" + cmd + "\n" + cleanupcmd + "\n") d.setVarFlag('BUILDSPEC', 'func', '1') bb.build.exec_func('BUILDSPEC', d)
Signature · 1 line
2.11.0
PATCH 30/36 selftest: do not perform a full build in test_continue
In reply to Alexander KanavinThis 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.
--- meta/lib/oeqa/selftest/bbtests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oeqa/selftest/bbtests.py +1 -1
@@ -221,7 +221,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))
Signature · 1 line
2.11.0
Re: [PATCH 30/36] selftest: do not perform a full build in test_continue
Quoted 6 lines · Alexander Kanavin
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)
It's still doing a cleanall, which is removing stuff from DL_DIR.
If the test adds a function between fetch and unpack then it won't need to do anything apart from bitbake -c unpack -f to run the test, and then a cleanup -cclean to remove the tainted hashes.
Ross
Re: [PATCH 30/36] selftest: do not perform a full build in test_continue
Quoted 7 lines · Ross
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)
Quoted 5 lines
It's still doing a cleanall, which is removing stuff from
DL_DIR.If the test adds a function between fetch and unpack then it won't need to do anything apart from bitbake -c unpack -f to run the test, and then a cleanup -cclean to remove the tainted hashes.
The test is forcing its own private DL_DIR, so I really don't see why we should be concerned about avoiding doing cleanall:
@testcase(1035)
def test_continue(self):
self.write_config("""DL_DIR = \"${TOPDIR}/download-selftest\"SSTATE_DIR = \"${TOPDIR}/download-selftest\"INHERIT_remove = \"report-error\"
""")
Alex
Re: [PATCH 30/36] selftest: do not perform a full build in test_continue
Quoted 3 lines · Alexander Kanavin
The test is forcing its own private
DL_DIR, so I really don't see why we should be concerned about avoiding doing cleanall:
So it is! Still, overcomplicating things. No need to have a custom DL_DIR and clean it when you don't need to bother.
Ross
PATCH 31/36 image.bbclass: do not uninstall update-alternatives from readonly rootfs
In reply to Alexander Kanavindnf insists that it cannot be done:
Error: package libglib-2.0-0-1:2.50.2-r0.i586 requires /bin/sh, but none of the providers can be installed
- package libdnf1-0.2.3+git0+367545629c-r0.i586 requires libglib-2.0-0 >= 2.50.2, but none of the providers can be installed
- package bash-4.3.30-r0.i586 requires update-alternatives-opkg, but none of the providers can be installed
- package busybox-1.24.1-r0.i586 requires update-alternatives-opkg, but none of the providers can be installed
- package dnf-2.0.0+git0+f0093d672d-r0.i586 requires libdnf1, but none of the providers can be installed
- conflicting requests
- problem with installed package dnf-2.0.0+git0+f0093d672d-r0.i586
--- meta/classes/image.bbclass | 2 +- meta/lib/oeqa/selftest/buildoptions.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
meta/classes/image.bbclass +1 -1
@@ -33,7 +33,7 @@ ROOTFS_BOOTSTRAP_INSTALL = "${@bb.utils.contains("IMAGE_FEATURES", "package-mana # These packages will be removed from a read-only rootfs after all other # packages have been installed -ROOTFS_RO_UNNEEDED = "update-rc.d base-passwd shadow ${VIRTUAL-RUNTIME_update-alternatives} ${ROOTFS_BOOTSTRAP_INSTALL}" +ROOTFS_RO_UNNEEDED = "update-rc.d base-passwd shadow ${ROOTFS_BOOTSTRAP_INSTALL}" # packages to install from features FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}"
meta/lib/oeqa/selftest/buildoptions.py +2 -2
@@ -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)
Signature · 1 line
2.11.0
Re: [PATCH 31/36] image.bbclass: do not uninstall update-alternatives from readonly rootfs
Quoted 6 lines · Alexander Kanavin
dnf insists that it cannot be done:
Error: package libglib-2.0-0-1:2.50.2-r0.i586 requires
/bin/sh, but none of the providers can be installed
- package libdnf1-0.2.3+git0+367545629c-r0.i586 requires libglib-2.0-0Quoted 1 line
= 2.50.2, but none of the providers can be installed
Quoted 8 lines
- package bash-4.3.30-r0.i586 requires update-alternatives-opkg, but none of the providers can be installed
- package busybox-1.24.1-r0.i586 requires update-alternatives-opkg, but none of the providers can be installed
- package dnf-2.0.0+git0+f0093d672d-r0.i586 requires libdnf1, but none of the providers can be installed
- conflicting requests
- problem with installed package dnf-2.0.0+git0+f0093d672d-r0.i586
Can this change be made dependent on DNF, please?
Update-alternatives once run is not useful on read-only rootfs, and its database wastes a lot of space (in the target file system) for no benefit.
Cheers,
Andre'
Quoted 60 lines
Signed-off-by Alexander Kanavin <[email protected]>---
meta/classes/image.bbclass | 2 +-
meta/lib/oeqa/selftest/buildoptions.py | 4 ++--2 files changed, 3 insertions(+), 3 deletions(-)meta/classes/image.bbclass +0
-0@@ -33,7 +33,7 @@ ROOTFS_BOOTSTRAP_INSTALL = "${@bb.utils.contains("IMAGE_FEATURES", "package-mana
# These packages will be removed from a read-only rootfs after all other# packages have been installed -ROOTFS_RO_UNNEEDED = "update-rc.d base-passwd shadow ${VIRTUAL- RUNTIME_update-alternatives} ${ROOTFS_BOOTSTRAP_INSTALL}" +ROOTFS_RO_UNNEEDED = "update-rc.d base-passwd shadow ${ROOTFS_BOOTSTRAP_INSTALL}" # packages to install from features FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(oe.data.typed_value('IMAGE_FEATUR ES', d), d))}"meta/lib/oeqa/selftest/buildoptions.py +0
-0@@ -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
PATCH 32/36 selftest: allow bitbake to fail in test_options_warnqa_errorqa_switch
In reply to Alexander Kanavinrpm4 seems to be stricter about duplicate entries in .spec, and so we should let it fail for the test case to succeed.
--- meta/lib/oeqa/selftest/buildoptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oeqa/selftest/buildoptions.py +1 -1
@@ -91,7 +91,7 @@ class SanityOptionsTest(oeSelfTest): self.append_config('ERROR_QA_remove = "packages-list"') self.append_config('WARN_QA_append = " packages-list"') bitbake("xcursor-transparent-theme -ccleansstate") - res = bitbake("xcursor-transparent-theme") + res = bitbake("xcursor-transparent-theme", ignore_status = True) self.delete_recipeinc('xcursor-transparent-theme') line = self.getline(res, "QA Issue: xcursor-transparent-theme-dbg is listed in PACKAGES multiple times, this leads to packaging errors.") self.assertTrue(line and line.startswith("WARNING:"), msg=res.output)
Signature · 1 line
2.11.0
PATCH 33/36 ossp-uuid: remove the recipe
In reply to Alexander KanavinIt was used only by rpm5, and will be moved to meta-oe.
--- .../ossp-uuid/0001-Change-library-name.patch | 119 --------------------- ...erve-m-option-status-in-v-option-handling.patch | 62 ----------- .../ossp-uuid/0003-Fix-whatis-entries.patch | 58 ---------- .../ossp-uuid/0004-fix-data-uuid-from-string.patch | 43 -------- .../ossp-uuid/ossp-uuid/install-pc.patch | 19 ---- .../ossp-uuid/ossp-uuid/ldflags.patch | 26 ----- .../ossp-uuid/ossp-uuid/uuid-libtool.patch | 27 ----- .../ossp-uuid/ossp-uuid/uuid-nostrip.patch | 19 ---- meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb | 64 ----------- 9 files changed, 437 deletions(-) delete mode 100644 meta/recipes-devtools/ossp-uuid/ossp-uuid/0001-Change-library-name.patch delete mode 100644 meta/recipes-devtools/ossp-uuid/ossp-uuid/0002-uuid-preserve-m-option-status-in-v-option-handling.patch delete mode 100644 meta/recipes-devtools/ossp-uuid/ossp-uuid/0003-Fix-whatis-entries.patch delete mode 100644 meta/recipes-devtools/ossp-uuid/ossp-uuid/0004-fix-data-uuid-from-string.patch delete mode 100644 meta/recipes-devtools/ossp-uuid/ossp-uuid/install-pc.patch delete mode 100644 meta/recipes-devtools/ossp-uuid/ossp-uuid/ldflags.patch delete mode 100644 meta/recipes-devtools/ossp-uuid/ossp-uuid/uuid-libtool.patch delete mode 100644 meta/recipes-devtools/ossp-uuid/ossp-uuid/uuid-nostrip.patch delete mode 100644 meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb
meta/recipes-devtools/ossp-uuid/ossp-uuid/0001-Change-library-name.patch deleted +0 -119
@@ -1,119 +0,0 @@ -From: Piotr Roszatycki <[email protected]> -Date: Wed, 27 Jan 2010 16:53:11 +0100 -Subject: [PATCH] Change library name - -The soname was changed to ossp-uuid to prevend the name clash with e2fsprogs's -uuid library. ---- - Makefile.in | 6 +++--- - perl/Makefile.PL | 12 ++++++------ - php/config.m4 | 2 +- - uuid-config.in | 2 +- - uuid.pc.in | 4 ++-- - 5 files changed, 13 insertions(+), 13 deletions(-) - ----- -Upstream-Status: Inappropriate [not author] - -This patch is from debian ossp-uuid 1.6.2 integration. - -Signed-off-by: Mark Hatle <[email protected]> - -diff --git a/Makefile.in b/Makefile.in -index d28f4be..c2ba99d 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -62,13 +62,13 @@ PERL = @PERL@ - PHP = @PHP@ - PG_CONFIG = @PG_CONFIG@ - --LIB_NAME = libuuid.la -+LIB_NAME = libossp-uuid.la - LIB_OBJS = uuid.lo uuid_md5.lo uuid_sha1.lo uuid_prng.lo uuid_mac.lo uuid_time.lo uuid_ui64.lo uuid_ui128.lo uuid_str.lo - --DCE_NAME = libuuid_dce.la -+DCE_NAME = libossp-uuid_dce.la - DCE_OBJS = uuid_dce.lo $(LIB_OBJS) - --CXX_NAME = libuuid++.la -+CXX_NAME = libossp-uuid++.la - CXX_OBJS = uuid++.lo $(LIB_OBJS) - - PRG_NAME = uuid -diff --git a/perl/Makefile.PL b/perl/Makefile.PL -index 92f4494..9c6fee6 100644 ---- a/perl/Makefile.PL -+++ b/perl/Makefile.PL -@@ -33,9 +33,9 @@ use Config; - use ExtUtils::MakeMaker; - - # determine source directory --my ($srcdir) = map { my $d = $_; $d =~ s/\/libuuid\.la$//; $d } -- grep { -f $_ } ("../libuuid.la", glob("../*/libuuid.la")) -- or die "no source directory found (where libuuid.la is located)"; -+my ($srcdir) = map { my $d = $_; $d =~ s/\/libossp-uuid\.la$//; $d } -+ grep { -f $_ } ("../libossp-uuid.la", glob("../*/libossp-uuid.la")) -+ or die "no source directory found (where libossp-uuid.la is located)"; - - # determine extra build options - my $compat = 0; -@@ -47,15 +47,15 @@ WriteMakefile( - VERSION_FROM => 'uuid.pm', - ABSTRACT_FROM => 'uuid.pod', - PREREQ_PM => {}, -- LIBS => [ "-L$srcdir/.libs -L$srcdir -luuid" ], -+ LIBS => [ "-L$srcdir/.libs -L$srcdir -lossp-uuid" ], - DEFINE => '', - INC => "-I. -I$srcdir", - PM => { 'uuid.pm' => '$(INST_LIBDIR)/uuid.pm', - 'uuid.pod' => '$(INST_LIBDIR)/uuid.pod', - ($compat ? ('uuid_compat.pm' => '$(INST_LIBDIR)/../Data/UUID.pm') : ()), - ($compat ? ('uuid_compat.pod' => '$(INST_LIBDIR)/../Data/UUID.pod') : ()), }, -- MAN3PODS => { 'uuid.pod' => '$(INST_MAN3DIR)/OSSP::uuid.3', -- ($compat ? ('uuid_compat.pod' => '$(INST_MAN3DIR)/Data::UUID.3') : ()), }, -+ MAN3PODS => { 'uuid.pod' => '$(INST_MAN3DIR)/OSSP::uuid.3pm', -+ ($compat ? ('uuid_compat.pod' => '$(INST_MAN3DIR)/Data::UUID.3pm') : ()), }, - TYPEMAPS => [ 'uuid.tm' ], - test => { TESTS => 'uuid.ts' . ($compat ? ' uuid_compat.ts' : '') }, - NO_META => 1, -diff --git a/php/config.m4 b/php/config.m4 -index 5091b96..969b457 100644 ---- a/php/config.m4 -+++ b/php/config.m4 -@@ -34,7 +34,7 @@ if test "$PHP_UUID" != "no"; then - PHP_NEW_EXTENSION(uuid, uuid.c, $ext_shared) - AC_DEFINE(HAVE_UUID, 1, [Have OSSP uuid library]) - PHP_ADD_LIBPATH([..], ) -- PHP_ADD_LIBRARY([uuid],, UUID_SHARED_LIBADD) -+ PHP_ADD_LIBRARY([ossp-uuid],, UUID_SHARED_LIBADD) - PHP_ADD_INCLUDE([..]) - PHP_SUBST(UUID_SHARED_LIBADD) - -diff --git a/uuid-config.in b/uuid-config.in -index 8d2a063..5b58812 100644 ---- a/uuid-config.in -+++ b/uuid-config.in -@@ -121,7 +121,7 @@ do - output_extra="$output_extra $uuid_ldflags" - ;; - --libs) -- output="$output -luuid" -+ output="$output -lossp-uuid" - output_extra="$output_extra $uuid_libs" - ;; - * ) -diff --git a/uuid.pc.in b/uuid.pc.in -index c76ad1e..de00c2f 100644 ---- a/uuid.pc.in -+++ b/uuid.pc.in -@@ -36,7 +36,7 @@ Name: OSSP uuid - Description: Universally Unique Identifier (UUID) Library - Version: @UUID_VERSION_RAW@ - URL: http://www.ossp.org/pkg/lib/uuid/ --Cflags: -I${includedir} --Libs: -L${libdir} -luuid -+Cflags: -I${includedir}/ossp -+Libs: -L${libdir} -lossp-uuid - Libs.private: @LIBS@ - ---
meta/recipes-devtools/ossp-uuid/ossp-uuid/0002-uuid-preserve-m-option-status-in-v-option-handling.patch deleted +0 -62
62 lines not on this page · raw message
meta/recipes-devtools/ossp-uuid/ossp-uuid/0003-Fix-whatis-entries.patch deleted +0 -58
58 lines not on this page · raw message
meta/recipes-devtools/ossp-uuid/ossp-uuid/0004-fix-data-uuid-from-string.patch deleted +0 -43
43 lines not on this page · raw message
meta/recipes-devtools/ossp-uuid/ossp-uuid/install-pc.patch deleted +0 -19
@@ -1,19 +0,0 @@ -uuid.pc is generated at build time so should be installed from the current -directory, and not $S. - -Upstream-Status: Pending [should be submitted] -Signed-off-by: Ross Burton <[email protected]> - -Index: uuid-1.6.2/Makefile.in -=================================================================== ---- uuid-1.6.2.orig/Makefile.in 2012-11-13 16:58:28.624156000 +0000 -+++ uuid-1.6.2/Makefile.in 2012-11-13 17:05:24.224158670 +0000 -@@ -232,7 +232,7 @@ - $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man1 - $(SHTOOL) install -c -m 755 uuid-config $(DESTDIR)$(bindir)/ - $(SHTOOL) install -c -m 644 $(S)/uuid-config.1 $(DESTDIR)$(mandir)/man1/ -- $(SHTOOL) install -c -m 644 $(S)/uuid.pc $(DESTDIR)$(libdir)/pkgconfig/ -+ $(SHTOOL) install -c -m 644 uuid.pc $(DESTDIR)$(libdir)/pkgconfig/ - $(SHTOOL) install -c -m 644 uuid.h $(DESTDIR)$(includedir)/ - -@if [ ".$(WITH_DCE)" = .yes ]; then \ - echo "$(SHTOOL) install -c -m 644 $(S)/uuid_dce.h $(DESTDIR)$(includedir)/"; \
meta/recipes-devtools/ossp-uuid/ossp-uuid/ldflags.patch deleted +0 -26
@@ -1,26 +0,0 @@ -Obey LDFLAGS - -Signed-off-by: Christopher Larson <[email protected]> -Upstream-Status: Pending - ---- uuid-1.6.2.orig/Makefile.in -+++ uuid-1.6.2/Makefile.in -@@ -113,15 +113,15 @@ all: $(TARGETS) - @$(LIBTOOL) --mode=compile $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< - - $(LIB_NAME): $(LIB_OBJS) -- @$(LIBTOOL) --mode=link $(CC) -o $(LIB_NAME) $(LIB_OBJS) -rpath $(libdir) \ -+ @$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $(LIB_NAME) $(LIB_OBJS) -rpath $(libdir) \ - -version-info `$(SHTOOL) version -l c -d libtool $(S)/uuid_vers.h` - - $(DCE_NAME): $(DCE_OBJS) -- @$(LIBTOOL) --mode=link $(CC) -o $(DCE_NAME) $(DCE_OBJS) -rpath $(libdir) \ -+ @$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $(DCE_NAME) $(DCE_OBJS) -rpath $(libdir) \ - -version-info `$(SHTOOL) version -l c -d libtool $(S)/uuid_vers.h` - - $(CXX_NAME): $(CXX_OBJS) -- @$(LIBTOOL) --mode=link $(CXX) -o $(CXX_NAME) $(CXX_OBJS) -rpath $(libdir) \ -+ @$(LIBTOOL) --mode=link $(CXX) $(LDFLAGS) -o $(CXX_NAME) $(CXX_OBJS) -rpath $(libdir) \ - -version-info `$(SHTOOL) version -l c -d libtool $(S)/uuid_vers.h` - - $(PRG_NAME): $(PRG_OBJS) $(LIB_NAME)
meta/recipes-devtools/ossp-uuid/ossp-uuid/uuid-libtool.patch deleted +0 -27
@@ -1,27 +0,0 @@ -Remove hardcoded libtool name, fall back to generated name - -Upstream-Status: Inappropriate [no upstream] -The project appears to no longer be accepting changes. - -Signed-off-by: Mark Hatle <[email protected]> - -diff -ur uuid-1.6.2.orig/Makefile.in uuid-1.6.2/Makefile.in ---- uuid-1.6.2.orig/Makefile.in 2012-05-14 14:37:19.579672930 -0500 -+++ uuid-1.6.2/Makefile.in 2012-05-14 14:37:49.112733787 -0500 -@@ -32,6 +32,7 @@ - VPATH = @srcdir@ - srcdir = @srcdir@ - top_srcdir = @top_srcdir@ -+top_builddir = @top_builddir@ - S = $(srcdir) - C = . - -@@ -55,7 +56,7 @@ - CP = cp - RMDIR = rmdir - SHTOOL = $(S)/shtool --LIBTOOL = $(C)/libtool -+LIBTOOL = @LIBTOOL@ - TRUE = true - POD2MAN = pod2man - PERL = @PERL@
meta/recipes-devtools/ossp-uuid/ossp-uuid/uuid-nostrip.patch deleted +0 -19
@@ -1,19 +0,0 @@ -We don't want anything stripped - -Upstream-Status: Inappropriate [no upstream] -The project appears to no longer be accepting changes. - -Signed-off-by: Mark Hatle <[email protected]> - -diff -ur uuid-1.6.2.orig/Makefile.in uuid-1.6.2/Makefile.in ---- uuid-1.6.2.orig/Makefile.in 2012-05-14 14:42:42.225789456 -0500 -+++ uuid-1.6.2/Makefile.in 2012-05-14 15:03:03.119733400 -0500 -@@ -254,7 +254,7 @@ - -@if [ ".$(WITH_CXX)" = .yes ]; then \ - $(LIBTOOL) --mode=install $(SHTOOL) install -c -m 644 $(CXX_NAME) $(DESTDIR)$(libdir)/; \ - fi -- @$(LIBTOOL) --mode=install $(SHTOOL) install -c -s -m 755 uuid $(DESTDIR)$(bindir)/ -+ @$(LIBTOOL) --mode=install $(SHTOOL) install -c -m 755 uuid $(DESTDIR)$(bindir)/ - $(SHTOOL) install -c -m 644 $(S)/uuid.1 $(DESTDIR)$(mandir)/man1/ - -@if [ ".$(WITH_PERL)" = .yes ]; then \ - (cd $(S)/perl && $(MAKE) $(MFLAGS) install DESTDIR=$(DESTDIR)); \
meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb deleted +0 -64
64 lines not on this page · raw message
Signature · 1 line
2.11.0
PATCH 34/36 byacc: remove the recipe
In reply to Alexander KanavinIt was used only by rpm5 and will be moved to meta-oe
--- 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
meta/recipes-extended/byacc/byacc.inc deleted +0 -22
@@ -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 -}
meta/recipes-extended/byacc/byacc/0001-byacc-do-not-reorder-CC-and-CFLAGS.patch deleted +0 -161
161 lines not on this page · raw message
meta/recipes-extended/byacc/byacc/byacc-open.patch deleted +0 -25
@@ -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 <[email protected]> - -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
meta/recipes-extended/byacc/byacc_20161202.bb deleted +0 -12
@@ -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"
meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb +0 -1
@@ -110,7 +110,6 @@ RDEPENDS_packagegroup-core-full-cmdline-extended = "\ " RDEPENDS_packagegroup-core-full-cmdline-dev-utils = "\ - byacc \ diffutils \ m4 \ make \
Signature · 1 line
2.11.0
PATCH 35/36 nativesdk.bbclass: add a /bin/sh RPROVIDES
In reply to Alexander Kanavinnativesdk-* 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.
--- meta/classes/nativesdk.bbclass | 4 ++++ 1 file changed, 4 insertions(+)
meta/classes/nativesdk.bbclass +4 -0
@@ -97,3 +97,7 @@ do_packagedata[stamp-extra-info] = "" USE_NLS = "${SDKUSE_NLS}" OLDEST_KERNEL = "${SDK_OLDEST_KERNEL}" + +python populate_packages_prepend() { + d.appendVar(d.expand('RPROVIDES_${PN}'), ' /bin/sh') +}
Signature · 1 line
2.11.0
Re: [PATCH 35/36] nativesdk.bbclass: add a /bin/sh RPROVIDES
Quoted 5 lines · Alexander Kanavin
nativesdk-* rpm packages all require
/bin/shbecause 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.
Shouldn't there be a package that actually RPROVIDES /bin/sh, rather than having to add a fake RPROVIDES?
Alternatively, shouldn't this be added to package_rpm.bbclass instead?
Cheers,
Andre'
Quoted 22 lines
Signed-off-by Alexander Kanavin <[email protected]>---
meta/classes/nativesdk.bbclass | 4 ++++1 file changed, 4 insertions(+)meta/classes/nativesdk.bbclass +0
-0@@ -97,3 +97,7 @@ do_packagedata[stamp-extra-info] = ""USE_NLS = "${SDKUSE_NLS}"
OLDEST_KERNEL = "${SDK_OLDEST_KERNEL}"meta/classes/nativesdk.bbclass +4
-0+ +python populate_packages_prepend() { + d.appendVar(d.expand('RPROVIDES_${PN}'), ' /bin/sh') +}--
2.11.0
Re: [PATCH 35/36] nativesdk.bbclass: add a /bin/sh RPROVIDES
Quoted 2 lines · André Draszik
Shouldn't there be a package that actually RPROVIDES
/bin/sh, rather than having to add a fake RPROVIDES?
I tried that approach first, with a fake-sdkdeps package. It's too complicated to make it work with nativesdk packages and still have all the selftests pass. There's a million other issues to solve, and I'm working on this by myself, so when I see easy ways out, I take them.
Quoted 1 line
Alternatively, shouldn't this be added to package_rpm.bbclass instead?
Maybe, I can try and see if this is possible.
Alex
PATCH 36/36 package_deb.bbclass: Ignore file paths in RPROVIDES
In reply to Alexander KanavinFrom: Amarnath Valluri <[email protected]>
Unlike rpm, debian packaging does not allow file paths in 'Provides:' field. When 'usrmerge' distro feature enabled bash/busybox packages adds '/bin/sh' to it's RPROVIDES to satisfy build dependencies, this entry should be filtered out.
--- meta/classes/package_deb.bbclass | 4 ++++ 1 file changed, 4 insertions(+)
meta/classes/package_deb.bbclass +4 -0
@@ -237,6 +237,10 @@ python do_package_deb () { debian_cmp_remap(rsuggests) # Deliberately drop version information here, not wanted/supported by deb rprovides = dict.fromkeys(bb.utils.explode_dep_versions2(localdata.getVar("RPROVIDES") or ""), []) + # Remove file paths if any from rprovides, debian does not support custom providers + for key in list(rprovides.keys()): + if key.startswith('/'): + del rprovides[key] rprovides = collections.OrderedDict(sorted(rprovides.items(), key=lambda x: x[0])) debian_cmp_remap(rprovides) rreplaces = bb.utils.explode_dep_versions2(localdata.getVar("RREPLACES") or "")
Signature · 1 line
2.11.0
Re: [PATCH 36/36] package_deb.bbclass: Ignore file paths in RPROVIDES
Quoted 8 lines · Alexander Kanavin
From: Amarnath Valluri <[email protected]>
Unlike rpm, debian packaging does not allow file paths in 'Provides:' field.
When 'usrmerge' distro feature enabled bash/busybox packages adds '/bin/sh' to
it's RPROVIDES to satisfy build dependencies, this entry should be filtered out.
What about opkg - is it OK with PATHs (my blind guess would be no)? Has it been tested?
Cheers,
Andre'
Quoted 32 lines
Signed-off-by Amarnath Valluri <[email protected]>Signed-off-by Alexander Kanavin <[email protected]>---
meta/classes/package_deb.bbclass | 4 ++++1 file changed, 4 insertions(+)meta/classes/package_deb.bbclass +0
-0@@ -237,6 +237,10 @@ python do_package_deb () { debian_cmp_remap(rsuggests) # Deliberately drop version information here, notwanted/supported by deb
rprovides =dict.fromkeys(bb.utils.explode_dep_versions2(localdata.getVar("RPROVIDES") or ""), [])
+ # Remove file paths if any from rprovides, debian does not support custom providers
+ for key in list(rprovides.keys()):
+ ifkey.startswith('/'):
+ del rprovides[key]
rprovides =collections.OrderedDict(sorted(rprovides.items(), key=lambda x: x[0]))
debian_cmp_remap(rprovides)
rreplaces =bb.utils.explode_dep_versions2(localdata.getVar("RREPLACES") or "")--
2.11.0
Re: [PATCH 36/36] package_deb.bbclass: Ignore file paths in RPROVIDES
Quoted 11 lines · André Draszik
Quoted 8 lines · Alexander Kanavin
From: Amarnath Valluri<[email protected]>
Unlike rpm, debian packaging does not allow file paths in 'Provides:' field.
When 'usrmerge' distro feature enabled bash/busybox packages adds '/bin/sh' to
it's RPROVIDES to satisfy build dependencies, this entry should be filtered out.What about opkg - is it OK with PATHs (my blind guess would be no)? Has it been tested?
Yes, i tested wit 'ipk' packaging, it did not complain about file paths.
Amarnath
Re: [PATCH 36/36] package_deb.bbclass: Ignore file paths in RPROVIDES
Quoted 7 lines · avalluri
Quoted 3 lines · André Draszik
What about opkg - is it OK with PATHs (my blind guess would be no)? Has it
been tested?Yes, i tested wit 'ipk' packaging, it did not complain about file paths.
OK, thanks :-)
Cheers,
Andre'
Quoted 9 lines · Alexander Kanavin
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_ARCHand possibly others
Quoted 6 lines
- 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.
One thing I forgot to mention: previously the way to force something to run on target during package installation was to put 'if D is defined then exit 1' to pkg_postinst(). That behavior is still supported, but deprecated and produces a warning; the new way is to put target-specific postinst actions to pkg_postinst_ontarget(). The rationale is in the commit message:
http://lists.openembedded.org/pipermail/openembedded-core/2017-February/132654.html
Alex