aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm
AgeCommit message (Collapse)Author
2019-01-28meta: remove True option to getVar calls (again)André Draszik
A couple have still been missed in the past despite multiple attempts at doing so (or simply have re-appeared?). Search & replace made using the following command: sed -e 's|\(d\.getVar \?\)( \?\([^,()]*\), \?True)|\1(\2)|g' \ -i $(git grep -E 'getVar ?\( ?([^,()]*), ?True\)' \ | cut -d':' -f1 \ | sort -u) (From OE-Core rev: 9f551d588693328e4d99d33be94f26684eafcaba) Signed-off-by: André Draszik <andre.draszik@jci.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-10-18rpm: handle virtual memory usage when limit is setPeter Bergin
Fix the situation where the task do_package_write_rpm ends up in "liblzma: memory allocation failed". This happens if the host environment has set a limit on virtual_memory for the user with 'ulimit -v' for packages with a lot of binary packages, e.g. glibc-locale. Signed-off-by: Peter Bergin <peter@berginkonsult.se> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-09-06rpm: update to 4.14.2Alexander Kanavin
Drop --disable-dbus option and patch: --disable-plugins is sufficient. Drop upstreamed patches. Drop a chunk of 0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch, as upstream fixed the issue. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-04rpm: Avoid leaking temporary scriplet filesOlof Johansson
RPM writes each package scriptlet (post-/preinstall) to /var/tmp/rpm-tmp.XXXXXX --- a lot of files potentially gets created. When debugging is enabled, these temporary scriptlet files aren't cleaned up at all and after a while this results in the filesystem resources are eaten up (like running out of available inodes). Normally, the temporary files would have been written to the tmp directory of the target sysroot (which we can easily clean up), but in this tree, you can't necessarily run the scriptlets. Fixes [YOCTO #12792] Signed-off-by: Olof Johansson <olofjn@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-07rpm: Fix patch to ensure variables aren't used uninitialisedRichard Purdie
Recent patches were applied which removed a function which set the xx variable. This means xx can be uninitalised and prerm functions can fail. This adjusts the patch to ensure the xx value isn't used in such a way. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-04rpm: Restore performance in Docker containersPeter Kjellerstedt
If the maximum number of open file descriptors is much greater than the usual 1024 (for example inside a Docker container), the performance drops significantly. This was reported upstream in: https://bugzilla.redhat.com/show_bug.cgi?id=1537564 which resulted in: https://github.com/rpm-software-management/rpm/pull/444 The pull request above has now been integrated and this commit contains a backport of its three patches, which together change the behavior of rpm so that its performance is now independent of the maximum number of open file descriptors. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-04Revert "rpm: add a patch to help with Docker performance issues"Peter Kjellerstedt
This reverts commit 6f1822e5f1eaafd8bc46e999de730c1fcca77f3a. This patch only solved a part of the problem. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-05-29nativesdk-rpm: Add wrappers for nativesdk supportOvidiu Panait
When installing the SDK to a non-default path, running "rpm --showrc" from the sdk will produce the following error: error: Unable to open /opt/windriver/wrlinux-small/10.17.41/sysroots/x86_64-wrlinuxsdk-linux/usr/lib/rpm/rpmrc for reading: No such file or directory. Fix this by adding wrappers that dynamically export the RPM_CONFIGDIR, RPM_ETCCONFIGDIR and MAGIC environment variables, pointing to the proper sdk locations. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-05-15rpm: move ASNEEDED over-ride into the rpm recipeAndre McCurdy
Move the recipe specific over-ride for ASNEEDED into the recipe to make it more apparent that the over-ride is being applied (and that it should be re-checked on version updates, etc). Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-04-09rpm: build without dbus for rpm-nativeChen Qi
Add option for dbus in configure.ac, and explicitly build without dbus for rpm-native. Previously, the rpm recipe tries to prevent rpm-native from attempting to inhibit shutdown via session dbus by appending '--disable-plugins' to EXTRA_OECONF in case of native. However, some layer may need some functionality via plugin support. And when it enables it, we would meet the following warning at rootfs time. Unable to get systemd shutdown inhibition lock: Socket name too long As plugins/systemd_inhibit.c is the only place that's related to this dependency, we can be sure that dbus is really not needed for rpm-native. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-02-06rpm: add a patch to help with Docker performance issuesAlexander Kanavin
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-02-06rpm: update to 4.14.1Alexander Kanavin
Drop two upstreamed patches. License-Update: grammar fixes Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-01-18rpm: backport configure fix for multiple users/groups with ID 0Mike Crowe
Backport upstream configure fix for hosts that have multiple users with UID 0 or groups with GID 0. Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-21rpm: update to 4.14.0Alexander Kanavin
Previously oe-core had a development snapshot of rpm, it's better to update to something more stable. Removed patches: 0001-Add-PYTHON_ABI-when-searching-for-python-libraries.patch (upstream is using pkg-config) 0001-When-nice-value-cannot-be-reset-issue-a-notice-inste.patch (functionality has been moved to a plugin, we disable plugins for rpm-native) 0012-Use-conditional-to-access-_docdir-in-macros.in.patch (merged upstream) Changed patches: 0001-Fix-build-with-musl-C-library.patch (one previous musl issue has been resolved upstream; another has been added) Rest of the patches are trivial rebases. Update the signing oe-selftest so that the reference output matches the upstream changes. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-12-10rpm: upstream version is now knownAlexander Kanavin
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08rpm: remove --sysroot from macros on targetJoe Slater
We do not want to specify --sysroot when defining __cc used on a target. Signed-off-by: Joe Slater <jslater@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-08-16rpm: Disable perl dependency generationMark Hatle
When rpmdeps files a perl script, it attempts to determine what it provides and what it requires. Often the requires are incorrect, within the context of Wind River Linux. This results in an error that DNF is unable to install a package due to one or more unresolved dependencies. In RPM5 we had disabled this behavior, the alternative is to require that all perl scripts be 'complete', in that they only require things they absolutely need and that OE provides. If we ever enforce that, this commit can be reverted. Until they fall back to prior behavior (which also matches ipkg and deb style packages.) (From OE-Core rev: 99376f602c997fec96dbb28ddbe3fa5f68fde2c3) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-16rpm: Add dependencies on bash, perl and python3-corePeter Kjellerstedt
Also modify a Python script (pythondistdeps.py) to use Python 3. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-16selftest: fix distrodata.py to use per-recipe UPSTREAM_VERSION_UNKNOWN settingAlexander Kanavin
... instead of a global exception list which was problematic. [YOCTO #11896] Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27rpm: allow to enable RPM file signingLans Zhang
RPM file signing is enabled with --with-imaevm during configuration. If enabled, the RPM signing tool rpmsign will call libimaevm.so provided by the recipe ima-evm-utils. Signed-off-by: Lans Zhang <jia.zhang@windriver.com> Signed-off-by: Jia Zhang <lans.zhang2008@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24rpm/dnf: fix Upstream-Status to reflect upstream submission statusAlexander Kanavin
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-06-13rpm: add explicit dependency on bzip2-replacement-native for native buildsMing Liu
This fixes a following error: | recipe-sysroot-native/usr/lib/rpm/debugedit: error while loading shared libraries: \ | libbz2.so.1: cannot open shared object file: No such file or directory Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-13rpm: run binary package generation via thread poolsAlexander Kanavin
This greatly reduces build times when there is a large amount of small rpm packages to produce. The patches are rather invasive, and so will be submitted upstream. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-12rpm: Add a new option --alldeps to rpmdepsPeter Kjellerstedt
This will send the output from rpmfcPrint() to stdout. This is an alternative to using the --rpmfcdebug option, which will send the same output to stderr. The two options have totally different use cases though. While --alldeps is used when the output from rpmfcPrint() is what is wanted, --rpmfcdebug can be used together with the other output options, e.g., --requires, without affecting their output. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-12rpm: Use conditional to access %{_docdir} in macros.inPeter Kjellerstedt
This avoids the following warning: warning: Ignoring invalid regex %{_docdir} when runing `rpmdeps -R <file>`, since %{_docdir} is only defined when parsing a spec file. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-12rpm: Do not require that ELF binaries are executable to be identifiablePeter Kjellerstedt
There is nothing that requires, e.g., a DSO to be executable, but it is still an ELF binary and should be identified as such. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-12rpm: Create a wrapper for the native rpmdeps toolPeter Kjellerstedt
Rather than trying to call rpmdeps with the correct arguments to work with the sysroot as was done in package.bbclass, create a wrapper for it like all the other native tools already had. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-12rpm: Simplify the creation of wrappers for the native toolsPeter Kjellerstedt
Use a loop rather than calling create_wrapper for each individual tool. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-05-11rpm: Ensure macros file doesn't reference HOSTTOOLSRichard Purdie
Currently the file encodes full paths to various host tools in the HOSTTOOLS directory which is bad in native and target cases. We can simply use the versions from PATH quite safely in OE. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-28rpm: properly relocate additional native toolsAlexander Kanavin
These tools are not currently used for anything, but we should still provide working versions of them. [YOCTO #11400] Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-28dnf: move the entire dnf/rpm4 stack to Python 3Alexander Kanavin
[YOCTO #11180] Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-27rpm: change PROVIDES rpm-build to RPROVIDESRobert Yang
The rpm 5 has a rpm-build package, so here should use RPROVIDES rather than PROVIDES to keep compatibility. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22rpm: add a "rpm-build" PROVIDESAlexander Kanavin
rpm 5.x was packaging build tools separately, so we need to unbreak things that relied on that. [YOCTO #11167] Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-13nativesdk-packagegroup-sdk-host: replace smartpm with dnfAlexander Kanavin
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
2017-03-13rpm: remove 5.x recipeAlexander Kanavin
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
2017-03-13rpm: add a 4.x recipeAlexander Kanavin
The dnf stack is written and tested against rpm 4.x. So if we want to use dnf for packaging, we should also use rpm 4 - there's simply too much work involved in making rpm 5 work with it due to significant API differences, and supporting that going forward. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
2017-03-13rpmresolve: remove the recipeAlexander Kanavin
The source code is incompatible with rpm4 API - let's use rpm binary itself for now. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
2017-03-01rpm: support customizing gpg command lineMarkus Lehtonen
Add a new %_gpg_sign_cmd_extra_args macro that allows customizing the gpg options used when signing rpm packages. This is needed to be able to sign packages with gpg 2.1 which requires "--pinentry-mode loopback" to allow non-interactive signing. [YOCTO #11054] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-15classes: Drop now unneeded update_data callsRichard Purdie
Now that the datastore works dynamically we don't need the update_data calls so we can just remove them. They're not actually done anything at all for a while. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31rpm: inherit pkgconfigMarkus Lehtonen
Rpm needs pkg-config in order to build successfully. Recipe specific sysroots revealed this missing dependency when trying to build on a host without pkg-config. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-16meta: remove True option to getVar callsJoshua Lock
getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-11-23rpm: fix multilib macro installationChen Qi
For now, the rpm macro for multilib is not installed correctly. For example, in x86-64 lib32 situation, the macro is installed under tmp/work/x86-pokymllib32-linux/rpm/5.4.16-r0/image/usr/lib/rpm/poky/i686-linux/. The directory is even not under WORKDIR. And it will of course not be packaged. We need to save necessary values before updating the localdata and restore them so that the macros could be installed into the correct directory. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-11-06rpm: fix file location of rpm2cpio.realChen Qi
rpm2cpio is in ${PN}-common, but rpm2cpio.real is in ${PN}. This seperation is really weird. Put them both in ${PN}-common. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-10-15rpm: prevent race in tempdir creationMarkus Lehtonen
This patch fixes an extramely rare race condition in creation of rpmdb temporary directory. The "rpmdb-more-verbose-error-logging" patch is still left in place, just for the case. [YOCTO #9416] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-13rpm: remove redundant removalsRoss Burton
These were noticed by the use of bashisms (rm *.{foo,bar}) and lots of these rm commands are deleting files which don't exist in the first place. Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-13rpm: manually cleanup sysckJérémy Rosen
version 5.4.1 of rpm was not properly distclean before release, which causes problems when cross-compiling. The previous version this recipe called make distclean, but that would trigger a call to ./configure which would fail when no gcc is available and make the whole do_configure fail further down the line This patch manually removes the files from the recipe. Signed-off-by: Jérémy Rosen <jeremy.rosen@smile.fr> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-06rpm: ensure rpm2cpio call rpm relocation codeZhixiong Chi
We need to call rpmcliInit to ensure the rpm relocation code is called. when we allow rpm2cpio to be relocatable, The adjusted path used to find the macro files was being built into the binary and this path was valid for the machine it was built on and some of our other build machines, but invalid on some others, and was not being properly overridden at runtime. 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. Signed-off-by: Zhixiong Chi <Zhixiong.Chi@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-17Use PYTHON_SITEPACKAGES_DIR insted of hard-coded *site-packages*Ming Liu
For thoese recipes that are inheriting python*-dir.bbclass, there is already a PYTHON_SITEPACKAGES_DIR present, use that definition replacing redundant "${libdir}/python*/site-packages". Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-04meta: add more missing patch tagsRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-25rpm: make --nosignature workRobert Yang
OE-core uses rpm's --nosignature, but it never worked: self._invoke_smart('config --set rpm-check-signatures=false') Now fix it with: * Define SUPPORT_NOSIGNATURES to 1 in system.h * !QVA_ISSET(qva->qva_flags, SIGNATURE) -> QVA_ISSET(qva->qva_flags, SIGNATURE), otherwise, when use --nosignature would read database and verify signature, this is not expected. This can fix some race issues, for example, when more than one process are querying rpm file with "rpm -qp --nosignature", they may hang up because of race issues (the processes are trying to get RW/RD lock on the database, but they shouldn't read the database at all since -qp and --nosignature are used). Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>