summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm
Commit message (Collapse)AuthorAgeFilesLines
* rpm: keep leading `/' from sed operationHongxu Jia7 days1-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For /usr/lib/rpm/macros, Yocto explicitly set OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM = "ONLY" [1][2] to search tools from CMAKE_FIND_ROOT_PATH [5] which locates in native recipe sysroot or HOSTTOOLS_DIR. If found in native recipe sysroot or HOSTTOOLS_DIR, the sed operation removed leading `/' root@qemux86-64:~# vi /usr/lib/rpm/macros ... %__xz usr/bin/xz %__make usr/bin/make %__zstd usr/bin/zstd %__quilt usr/bin/quilt %__patch usr/bin/patch ... root@qemux86-64:~# rpm --eval "%{__xz} %{__make} %{__zstd} %{__quilt} %{__patch}" usr/bin/xz usr/bin/make usr/bin/zstd usr/bin/quilt usr/bin/patch This commit keeps leading `/' from sed operation, and similar reason for /usr/lib/cmake/rpm/rpm-targets.cmake After applying this commit: root@qemux86-64:~# rpm --eval "%{__xz} %{__make} %{__zstd} %{__quilt} %{__patch}" /usr/bin/xz /usr/bin/make /usr/bin/zstd /usr/bin/quilt /usr/bin/patch [1] https://git.openembedded.org/openembedded-core/commit/?id=f4ea12f6635125ee793f4dd801c538c0186f9dc3 [2] https://cmake.org/cmake/help/latest/variable/CMAKE_FIND_ROOT_PATH_MODE_PROGRAM.html (From OE-Core rev: 0d0773879ab9520c475c4a8c930b2e663de0e032) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: Update 0001-CMakeLists.txt-Fix-checking-for-CFLAGS.patchRobert Yang2025-06-231-27/+15
| | | | | | | | | The patch merged by upstream is different, so backport the one from upstream. (From OE-Core rev: 65fd3c93285e0a166f0d77a92cc42680d72a6bd1) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: remove consecutive blank linesAlexander Kanavin2025-06-201-1/+0
| | | | | | | | | | | | | | | | | Some of them were introduced by mass-removal of S = WORKDIR/git assignments; rather than try to fix up (or redo) just these, I've run this sed command over the whole tree: sed -i -z -E 's/([ \t\f\v\r]*\n){3,}/\n\n/g' `find . -name *.bb -o -name *.inc` The rationale is that more than one empty line is wasting vertical screen space, and does nothing for readability. (From OE-Core rev: cedc4ff7c9bcfb22a20e43e47f9759f4007a4f1a) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: remove S in recipes that fetch from git via setting ↵Alexander Kanavin2025-06-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BB_GIT_DEFAULT_DESTSUFFIX Removing all the S = ${WORKDIR}/git assignments works because BB_GIT_DEFAULT_DESTSUFFIX is set to match S from bitbake.conf (which itself is set to match typical tarball releases). A few recipes are setting S to a sub-directory of the git tree and need to be adjusted accordingly. bzip2 recipe is fetching a tarball and separately cloning tests; adjust the recipe to put the latter into 'bzip2-tests', instead of 'git'. devupstream.bbclass no longer needs to rewrite S, and is adjusted accordingly. Adjust scripts/lib/recipetool/append.py to not hardcode 'git' as unpack destination. Adjust kernel-yocto.bbclass to use the git unpack variable instead of hardcoding 'git' (there's also removal of repetition of string constants and a correction of workdir/unpackdir mismatch in one of the if-else branches). Ensure build-appliance-image recipe does not use 'git' as checkout directory for poky repo, but rather explicitly name it 'poky'. Ensure reproducible.py code that looks for git repositories does not hardcode 'git' but uses the destination set by BB_GIT_DEFAULT_DESTSUFFIX. Ensure recipetool does not write out unneeded S settings into newly created recipes that fetch from git. Adjust selftest to not hardcode 'git' as unpack directory. (From OE-Core rev: f80c07019ddadaf9c5fb890faabfda7920ecd15e) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: 4.20.0 -> 4.20.1Robert Yang2025-06-095-83/+89
| | | | | | | | | | | | | | | | | | | | | * Rebased: 0001-When-cross-installing-execute-package-scriptlets-wit.patch 0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch * Removed the one which already merged: 0001-Set-RPM_PLUGINDIR-in-top-level-CMakeLists.txt.patch * Added a patch to fix rpm-native build error: gcc: error: unrecognized command-line option -fhardened 0001-CMakeLists.txt-Fix-checking-for-CFLAGS.patch * License-Update: Minor formatting changes as the commit messages said in 41143b27b6f7320f280aea6014e8f532eb0239d6 (From OE-Core rev: 5d25e1ba4d8850e2c281fc7f24493239bf2f9866) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: correct tool path in macros for no usrmergehongxu2025-06-091-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While no usrmerge in sysvinit, some tools defined in rpm macro have wrong path $ echo 'INIT_MANAGER="sysvinit"' >> conf/local.conf $ echo 'IMAGE_INSTALL:append = " rpm busybox"' >> conf/local.conf $ bitbake core-image-minimal $ runqemu tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.rootfs.qemuboot.conf root@qemux86-64:~# which sed tar rm mkdir cp cat chown chmod gzip grep mv /bin/sed /bin/tar /bin/rm /bin/mkdir /bin/cp /bin/cat /bin/chown /bin/chmod /bin/gzip /bin/grep /bin/mv root@qemux86-64:~# rpm --eval "%{__sed} %{__tar} %{__rm} %{__mkdir} %{__cp} %{__cat} %{__chown} %{__chmod} %{__gzip} %{__grep} %{__mv}" /usr/bin/sed /usr/bin/tar /usr/bin/rm /usr/bin/mkdir /usr/bin/cp /usr/bin/cat /usr/bin/chown /usr/bin/chmod /usr/bin/gzip /usr/bin/grep /usr/bin/mv Here to explain how __rm was set in rpm during build. The build system of rpm is cmake. Take rpm rpm-4.19.x for example: The '__RM rm' is defected by findutil [1], and function findutil calls find_program to search for tool, if not found on host, then hardcode with "/usr/bin" prefix [2] Yocto explicitly set OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM = "ONLY" [3][4] to search tools from CMAKE_FIND_ROOT_PATH [5] which locates in recipe sysroot, if not found in recipe sysroot, hardcode with "/usr/bin" prefix If "${base_bindir}" != "${bindir}, explicitly correct tools in rpm macros, use ${base_bindir} to instead original ${bindir}. Only do the operation for target, it is not necessary for native and nativesdk, because most host distribution supports usrmerge After applying this commit, on target: root@qemux86-64:~# rpm --eval "%{__sed} %{__tar} %{__rm} %{__mkdir} %{__cp} %{__cat} %{__chown} %{__chmod} %{__gzip} %{__grep} %{__mv}" /bin/sed /bin/tar /bin/rm /bin/mkdir /bin/cp /bin/cat /bin/chown /bin/chmod /bin/gzip /bin/grep /bin/mv root@qemux86-64:~# ls /bin/sed /bin/tar /bin/rm /bin/mkdir /bin/cp /bin/cat /bin/chown /bin/chmod /bin/gzip /bin/grep /bin/mv /bin/cat /bin/chmod /bin/chown /bin/cp /bin/grep /bin/gzip /bin/mkdir /bin/mv /bin/rm /bin/sed /bin/tar In order to save size, this commit does not add these tools to runtime depends, user should explicitly add them if necessary (such as use rpm to build packages) [1] https://github.com/rpm-software-management/rpm/blob/rpm-4.19.x/CMakeLists.txt#L121 [2] https://github.com/rpm-software-management/rpm/blob/rpm-4.19.x/CMakeLists.txt#L59 [3] https://git.openembedded.org/openembedded-core/commit/?id=f4ea12f6635125ee793f4dd801c538c0186f9dc3 [4] https://cmake.org/cmake/help/latest/variable/CMAKE_FIND_ROOT_PATH_MODE_PROGRAM.html [5] https://git.openembedded.org/openembedded-core/tree/meta/classes-recipe/cmake.bbclass?id=f4ea12f6635125ee793f4dd801c538c0186f9dc3#n123 (From OE-Core rev: c89c7177be2df5d2be44478a6ac43b35ad46db9e) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: Always use gcc compilerKhem Raj2025-05-221-0/+4
| | | | | | | | | | | | | | clang can build it ok but the openmp directives get emitted with full paths into binaries [1] until thats fixed in clang/openmp stick to gcc [1] https://github.com/llvm/llvm-project/issues/82541 (From OE-Core rev: 89d2401ab0484478aa582fbdda21fd1d287605c4) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: Set SEQUOIA_CRYPTO_POLICY in wrapped toolsZoltán Böszörményi2025-02-181-0/+1
| | | | | | | | | Point to the crypto policy file so RPM signing may work. (From OE-Core rev: 23083b72e3e6587dca9ca5a16762676e981b4a3b) Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: add PACKAGECONFIG dependenciesDaniel McGregor2025-02-101-2/+2
| | | | | | | | | | | The cap and acl configs were missing dependency specifications. They could get satisfied transitively if archive was also used, but alone get missed. (From OE-Core rev: 7e89209fd52b1b1652c65013eb3bcc40cb24cda5) Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: avoid empty plugindir errorChen Qi2025-01-042-0/+58
| | | | | | | | | | | | | | | | | When using dnf/rpm, we'll see error messages like below: error: /usr/lib64/rpm/macros: line 1183: Macro %__plugindir has empty body The problem was introduced by the following commit in RPM upstream: https://github.com/rpm-software-management/rpm/commit/ab28534f9e68aff8be65cd1adbac86b5a2cafde4 We'll need to move RPM_PLUGINDIR definition to top-level CMakefile.txt to solve this problem. (From OE-Core rev: 3a54d93052cb7f3d591517a873e516136e965ba8) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: replace use of rpm2cpio with rpm2archiveAlexander Kanavin2024-12-121-1/+1
| | | | | | | | | | | | | | rpm2cpio has been deprecated upstream, so this prepares for its eventual removal. rpm2archive produces a tar archive which can be uncompressed with tar executable from the host. (From OE-Core rev: ed824d3fb23f0c89d8dfdacb2c4ef0b7c21a5144) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: update 4.19.1.1 -> 4.20.0Alexander Kanavin2024-12-1215-118/+75
| | | | | | | | | | | | | | | | | | | | | With this release, as expected, deprecated openpgp support has been fully removed and replaced with sequoia: https://github.com/rpm-software-management/rpm-sequoia/ Alas, it's written in rust, and has no recipe, so for now signing rpm packages has to be disabled. Remove package name parameter to %prep in source archiving, as it's been dropped in the new rpm, and wasn't needed to begin with. Drop 0001-perl-disable-auto-reqs.patch (files removed upstream). (From OE-Core rev: 8c15b4577d5e554cc2dd5adfb88b816894b05a9a) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: fix expansion of %_libdir in macrosYi Zhao2024-08-062-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a patch in oe-core[1] to avoid hardcoded paths in macros. It tries to use libdir to expand %_libdir in macros.in. However, in upstream commit[2], libdir for macros in CMakeLists.txt is set to ${prefix}/=LIB=, which causes %_libdir to expand to ${prefix}/=LIB= instead of the correct path in the final macros. On target: $ rpm --showrc | grep _libdir [snip] -13: _libdir ${prefix}/=LIB= [snip] This also causes %__pkgconfig_path in fileattrs/pkgconfig.attr to become an invalid regular expression when building rpm packages. This results a warning in log.do_package_write_rpm in all packages: Warning: Ignoring invalid regular expression ^((${prefix}/=LIB=|usr/share)/pkgconfig/.*.pc|usr/bin/pkg-config)$ Set libdir to ${CMAKE_INSTALL_FULL_LIBDIR} instead of ${prefix}/=LIB= to make sure it is expanded to the correct path in macros. After the patch: On target: $ rpm --showrc | grep _libdir [snip] -13: _libdir /usr/lib [snip] [1] https://git.openembedded.org/openembedded-core/tree/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch [2] https://github.com/rpm-software-management/rpm/commit/d2abb7a48760418aacd7f17c8b64e39c25ca50c9 (From OE-Core rev: ae0e217145f45d065124aeb0a7d72a0c25f621ef) Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: update 4.19.1 -> 4.19.1.1Alexander Kanavin2024-04-1617-169/+32
| | | | | | | | | | | | | | | Drop patches: files/0002-docs-CMakeLists.txt-do-not-install-non-existent-docs.patch (upstream resolved the issue) files/0001-CMakeLists.txt-restore-readline-support-as-an-explic.patch files/0001-Fix-unconditional-dependency-on-non-POSIX-GLOB_ONLYD.patch (backports) (From OE-Core rev: d233e33a5ca12f95878c3ee9e34d9d9c61e49f68) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: Fix the following error when run nativesdk-rpm in nativesdk environment.Lei Maohui2024-02-291-1/+1
| | | | | | | | | | | | | | | | package busybox-inittab-1.36.1-r0.ubinux_x86_64 is intended for a different architecture package busybox-udhcpc-1.36.1-r0.core2_64 is intended for a different architecture package ldconfig-2.39+git0+312e159626-r0.core2_64 is intended for a different architecture ...... CMAKE_INSTALL_SYSCONFDIR is necessary. If not set CMAKE_INSTALL_SYSCONFDIR, nativesdk-rpm will use the default setting: /usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-ubinuxsdk-linux/etc to find rpmrc file. (From OE-Core rev: c9cb2eb2e662e19d68d27f2eec791986715c3abe) Signed-off-by: Lei Maohui <leimaohui@fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: add missing dependencies for packageconfigYi Zhao2024-02-031-2/+2
| | | | | | | | | | | Add depenency libselinux for PACKAGECONFIG[selinux]. Add depenency audit for PACKAGECONFIG[audit]. (From OE-Core rev: 97b5d0c85af0b667854eea90ace0a8c2f51ecefe) Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: fix dependency for package config imaevmKai Kang2024-02-031-1/+1
| | | | | | | | | | | The dependency `ima-evm-utils` of package config `imaevm` has been removed during rpm upgrade. Add it back, otherwise it fails to run do_configure when the package config `imaevm` enabled. (From OE-Core rev: 15df110b79bfa2428f70453aa6aabe7239f8e25a) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: override curl executable search with just 'curl'Alexander Kanavin2024-02-031-0/+1
| | | | | | | | | | | | rpm is searching for curl executable at do_configure time and result is non-deterministic, depending on whether curl is in native sysroot or not: https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20240201-8dcic6ea/packages/diff-html/ (From OE-Core rev: 785c39701ea17e6a539709b9ae905f7b0667bceb) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: update 4.18.1 -> 4.19.1Alexander Kanavin2024-01-2723-383/+328
| | | | | | | | | | | | | | | | | Upstream has replaced autoconf with cmake, which necessitates a rewrite of the recipe and available options, and a rebase to cmake of 0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch Correct a mistake in 0001-Do-not-read-config-files-from-HOME.patch : the patch was removing the NULL marker at the end of function arguments, and 0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch was restoring it (in addition to the actual change the patch was making). Now both patches preserve the NULL terminator. (From OE-Core rev: 38549d462b399e3a63335f60a44c8bbced98639a) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: Fix build with muslKhem Raj2024-01-073-0/+68
| | | | | | | | (From OE-Core rev: cd610101dc8fcb0cabe351085d36823c5bd7eb19) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: backport fix to prevent crashes with latest sqliteAnuj Mittal2023-07-102-0/+52
| | | | | | | | | | SQLite 3.42.0 causes crashes when installing RPM packages at rootfs creation time. Backport an upstream fix to resolve the issue. (From OE-Core rev: f6e4227efb29ed9b1680a1c516e4487804f6e64c) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: write macros under libdirChen Qi2023-06-201-3/+2
| | | | | | | | | | | | | | | | | | | | | | If we create a macros file under etc/, the populate_sdk task would fail if 'package-management' is in SDKIMAGE_FEATURES and nativesdk-rpm-build is installed.. The error message is like below: unable to place /.../sdk/image/etc/rpm in final SDK location This is because it's trying to move the etc/rpm dictory into the host sysroot but the <host_sysroot>/etc/rpm has already exists. To solve this problem, avoid creating /etc/rpm/macros for nativesdk-rpm-build, use ${libdir}/macros instead. In this way, the macros file is hold in nativesdk-rpm. As nativesdk-rpm-build depends on nativesdk-rpm, the 'rpmbuild' command inside SDK can still correctly find find-debuginfo binary. (From OE-Core rev: 5fde0eadf16d34d88a599009013913fe55d89283) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: drop unused 0001-Rip-out-partial-support-for-unused-MD2-and-RIPEMD160.patchMartin Jansa2023-05-251-81/+0
| | | | | | | | | | | | | | | | * it was removed from SRC_URI in oe-core commit: commit 67257ca87c6fa8e6050a20ecea50daf834c7e869 Author: Alexander Kanavin <alex.kanavin@gmail.com> Date: Sat Apr 25 19:28:00 2020 +0200 Subject: rpm: upgrade to 4.15.1 and it's unused since then (From OE-Core rev: c801a215fb2d53bdec7f4c9a20ff7969e8071e5c) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: update 4.18.0 -> 4.18.1Alexander Kanavin2023-05-226-77/+70
| | | | | | | | | | | | | | Drop: 0001-docs-do-not-build-manpages-requires-pandoc.patch (pandoc is now detected from $PATH) fifofix.patch (upstream fixed the issue) (From OE-Core rev: d8d673b2dc86e04cc278dc111b36d52d60bc25f7) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: add back find-debuginfo supportChen Qi2023-03-271-3/+5
| | | | | | | | | | | | | | | | | RPM upstream removed find-debuginfo and switched to use debugedit since the following commit. https://github.com/rpm-software-management/rpm/commit/04b0805a756cdd9466fb9dc717846f5bf15518cc According to https://github.com/rpm-software-management/rpm/blob/master/INSTALL, debugedit is needed by rpm. More specifically it's needed by rpmbuild to supporting generating debuginfo package when %debug_package is enabled. (From OE-Core rev: d06c7c0d288cafa75f14a841f9cb31dcd0714644) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: fix RPM_ETCCONFIGDIR value in SDKChen Qi2023-03-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The RPM_ETCCONFIGDIR should be some root directory instead of the etc directory as in patch 0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch RPM_ETCCONFIGDIR is used to prefix /etc. The regression was introduced in the following patch. """ nativesdk-rpm: export RPM_ETCCONFIGDIR and MAGIC in environment like RPM_CONFIGDIR """ The patch incorrectly set RPM_ETCCONFIGDIR, maybe because this variable's name is a little misleading. Note that this patch modifies both RPM_ETCCONFIGDIR and RPM_CONFIGDIR. The RPM_CONFIGDIR's value happened to be correct because of the ${libdir}, not $OECORE_NATIVE_SYSROOT. In fact, due to the substitution mechanism, the $OECORE_NATIVE_SYSROOT is empty. (From OE-Core rev: 2c6388e5bbf45a71891aa90047eef980d8a27c9d) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: Fix hdr_hash function prototypeKhem Raj2023-03-062-0/+36
| | | | | | | | (From OE-Core rev: 0e812b4c22ac077f2defd6842f82b5c993db24c2) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: do not export MAGIC in SDKChen Qi2023-01-181-1/+0
| | | | | | | | | | | | | | | | | | This MAGIC variable is used by libmagic (file), and should be exported by the file recipe. As the rpm recipe has 'file' in its DEPENDS, its sub-packages which links to libmagic will be automatically added the 'file' runtime dependency. More specifically, it's the rpm-build package. So in case components in nativesdk-rpm-build package uses libmagic, the nativesdk-file package will be installed and the MAGIC var will be exported. (From OE-Core rev: 6e2147ab1d0f3aad2dfe8180a3896c9c9bcfdac8) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* nativesdk-rpm: don't create wrappers for WRAPPER_TOOLSMartin Jansa2022-12-311-8/+0
| | | | | | | | | | * environment.d/rpm.sh sets the right environment in SDK and we don't need to use them (From OE-Core rev: 34f1121ba9684b1ab978438db2b16c1e42ea5973) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* nativesdk-rpm: export RPM_ETCCONFIGDIR and MAGIC in environment like ↵Martin Jansa2022-12-312-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RPM_CONFIGDIR * the paths in wrapper don't work for rpmdeps which is installed in ${libdir}/rpm unlike other wrapped bins from ${bindir} these relative paths don't work there * replace environment.d-rpm.sh with here-doc so that we can use OE variables * in the end it might be better to just get rid of the wrappers at this point and depend on environment.d to always set right values * the wrappers were added in: commit 760103cdaed3e820888d8984ec0b76cfc831d534 Author: Ovidiu Panait <ovidiu.panait@windriver.com> Date: Fri May 25 10:48:29 2018 +0800 nativesdk-rpm: Add wrappers for nativesdk support 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. * the rpm.sh in environment.d a bit later: commit 5f16fd0bf774314c79572daf4ba7e4a8ae209ba1 Author: hongxu <hongxu.jia@windriver.com> Date: Wed Jul 29 01:22:06 2020 -0700 nativesdk-rpm: adjust RPM_CONFIGDIR paths dynamically While installing/extracting SDK to a non-default dir(not /opt), run rpm failed: $ python3 -c "import rpm" |error: Unable to open /opt/windriver/wrlinux-graphics/20.31/sysroots/ x86_64-wrlinuxsdk-linux/usr/lib/rpm/rpmrc for reading: No such file or directory. This patch adds a flexible way to configure RPM_CONFIGDIR in SDK. (From OE-Core rev: f40a2658f5be6739c5dddab7f9f11e1f85a17102) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: update 4.18.0-rc1 -> 4.18.0-releaseAlexander Kanavin2022-09-291-4/+1
| | | | | | | (From OE-Core rev: 0e9594bdd95a70580e5c10d5b362eb149876ed34) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: Upgrade 4.17.1 -> 4.18rc1Richard Purdie2022-09-2015-171/+113
| | | | | | | | | | | | | | | | | | rpm is close to release and give our release timings, update to the rc1 of 4.18. Includes fixes for CVE-2021-35937, CVE-2021-35938 and CVE-2021-35939 which can't be easily backported. Add a PACKAGECONFIG option for a new readline dependency and disable it by default since it pulls in GPLv3 and that breaks a number of our test configurations as things stand. Refresh patches and drop the error.h patch as error() no longer used. (From OE-Core rev: 4b31e4f2aea490bd5056c97742b5e25a8dcc8b36) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: Remove -Wimplicit-function-declaration warningsKhem Raj2022-08-211-7/+11
| | | | | | | (From OE-Core rev: 9f2dbfc51ef2faf1b6154856adb69ca9f764573b) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: update 4.17.0 -> 4.17.1Alexander Kanavin2022-08-106-461/+40
| | | | | | | | (From OE-Core rev: 826eb17fe741d38be24d31f3bba35074e404a414) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/meta-selftest/meta-skeleton: Update LICENSE variable to use SPDX ↵Richard Purdie2022-02-201-1/+1
| | | | | | | | | | | | | license identifiers An automated conversion using scripts/contrib/convert-spdx-licenses.py to convert to use the standard SPDX license identifiers. Two recipes in meta-selftest were not converted as they're that way specifically for testing. A change in linux-firmware was also skipped and may need a more manual tweak. (From OE-Core rev: ceda3238cdbf1beb216ae9ddb242470d5dfc25e0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: remove tmp folder created during installSamuli Piippo2022-01-041-0/+3
| | | | | | | | | | | nativesdk-rpm build is also affected by the stray /var/tmp created during the rpm install. Remove it to fix QA Issue: nativesdk-rpm installs files in /usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/var/volatile, but it is expected to be empty [empty-dirs] (From OE-Core rev: 28dd1e1a0965646c5736e3de91aad830311a797b) Signed-off-by: Samuli Piippo <samuli.piippo@qt.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: fix CVE-2021-3521Changqing Li2022-01-044-0/+453
| | | | | | | (From OE-Core rev: 938dd031bc2577417266f032e53490909654220c) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipes: Update github.com urls to use httpsRichard Purdie2021-11-031-1/+1
| | | | | | | | | | | | | | Github has announced there will be no more git:// fetching from their servers: https://github.blog/2021-09-01-improving-git-protocol-security-github/#no-more-unauthenticated-git and they're about to start having brownout periods to encourage people to update. This runs the conversion script over OE-Core to update our urls to use https instead of git. (From OE-Core rev: b37b61e9a1e448a34957db9ae39285d21352552e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: update 4.16.1.3 -> 4.17.0Alexander Kanavin2021-10-117-194/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The flagship features are migration from bdb to sqlite and zstd support, both are enabled and taken into use. The relationship and upstream preference between sqlite and ndb formats isn't quite clear. Lua is now a hard dependency. Added packageconfig option for r/o support for bdb (that doesn't need bdb itself), but not enabled it as upstream marks it EXPERIMENTAL in capital letters. Drop sed adjustment for a file that is not anymore installed. Adjust oeqa test to check for sqlite database instead of bdb. Drop 0001-Fix-build-with-musl-C-library.patch (nss support removed upstream) 0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch (difficult to undersand and rebase; obsolete with the move to zstd) 0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch (upstream made the same change) Portions of 0001-tools-Add-error.h-for-non-glibc-case.patch dropped (upstream moved the files to a separate component). Added 0001-docs-do-not-build-manpages-requires-pandoc.patch to avoid pandoc dependency. Added 0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch to restore reproducibility when compression thread amount varies between hosts. (From OE-Core rev: 6080fcf7e4f64faedd98ed26b65a3bc29ef08238) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: Deterministically set vendor macro entryRichard Purdie2021-10-081-1/+2
| | | | | | | | | | | | | On an aarch64 build host, vendor is found to be "unknown", on x86 systems it is "pc". This filters through to the PLATFORM tag in target rpms. We saw reproducibility test failures where the PLATFORM tags in noarch rpms were changing depending upon which host built them. Forcing the vendor value to a consistent one makes things deterministic. (From OE-Core rev: f6434075b2bdfc23c683d22281b674b1e6abde77) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Add processing for full build paths in sysroot filesRichard Purdie2021-10-041-0/+5
| | | | | | | | | | | | | | | | | | | | | Some files in the populate_sysroot tasks have hardcoded paths in them, particularly if they are postinst-useradd- files or crossscripts. Add some filtering logic to remove these paths. This means that the hashequiv "outhash" matches correcting in more cases allowing for better build artefact reuse. To make this work a new variable is added SSTATE_HASHEQUIV_FILEMAP which maps file globbing to replacement patterns (paths or regex) on a per sstate task basis. It is hoped this shouldn't be needed in many cases. We are in the process to developing QA tests which will better detect issues in this area to allow optimal sstate reuse. (From OE-Core rev: d9852ffbbe728dac33dc081538a08af98f52fd4a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: Ensure compression parallelism isn't coded into rpmsRichard Purdie2021-10-022-0/+29
| | | | | | | | | | | We don't want the compression thread numbers to be encoded into the rpm since this results in the rpm not being deterministic. Add a patch from Alex Kanavin which addresses this issue (was queued for rpm 4.17 but we need to fix this with 4.16 too). (From OE-Core rev: 1ba0bf50c72f2506dfa507559c49a70e16cd5124) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: Handle proper return value to avoid major issuesRanjitsinh Rathod2021-09-111-11/+14
| | | | | | | | | | | | | | 0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch changed to avoid critical issues Handled return values of getrlimit() and lzma_cputhreads() functions to avoid unexpected behaviours like devide by zero and potential read of uninitialized variable 'virtual_memory' Upstream-Status: Pending [merge of multithreading patches to upstream] (From OE-Core rev: 5aae9c2cb464350bc443a0f60fd6602942e61f46) Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: do not RRECOMMEND rpm-buildAlexander Kanavin2021-08-021-1/+1
| | | | | | | | | | | This avoids pulling in perl, python and (especially) bash; rpm building functionality should be neither hard nor soft dependency of rpm package management. (From OE-Core rev: ff0e05241a3b61415dc24a8bc2104b4be04b8fc7) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Convert to new override syntaxRichard Purdie2021-08-021-26/+26
| | | | | | | | | | | | This is the result of automated script conversion: scripts/contrib/convert-overrides.py <oe-core directory> converting the metadata to use ":" as the override character instead of "_". (From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: Drop CVE exclusion as database fixed to handleRichard Purdie2021-05-201-4/+0
| | | | | | | | Didn't think this might make it in but it has, we can drop the exclusion. (From OE-Core rev: 64456aed7514d611a242c210375c01d7f4048de2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: turn Berkeley DB hard dependency into PACKAGECONFIGRoss Burton2021-05-181-2/+3
| | | | | | | | | | | In the future we hope to switch to sqlite instead of Berkeley DB, so prepare for this by adding an (enabled by default) PACKAGECONFIG for Berkeley DB. (From OE-Core rev: 365f0804a0726fe4be9eb7ef3515fea2dd38bef1) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: Exclude CVE-2021-20271 from cve-checkRichard Purdie2021-05-131-0/+4
| | | | | | | | | This is included in the release we have, it was the reason for the last rpm point release. (From OE-Core rev: 117feb358c81b6b852dee24268eac0a1a47c1701) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: Upgrade to 4.16.1.3Mingli Yu2021-04-232-5/+5
| | | | | | | | | | | | | Fixes some security vulnerabilities such as CVE-2021-3421 and CVE-2021-20271. Rebase 0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch to avoid fuzz warnings. (From OE-Core rev: 5dcd9c673502dab276b4fb4e6b4c7c1d1d9425ef) Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: split build and extra functionality into separate packagesDiego Santa Cruz2021-03-061-4/+35
| | | | | | | | | | | | | | | | | | | | | Having all the rpm build related tools in the main package requires adding runtime dependencies on perl and python3-core, so adding rpm to a target image can pull quite many unneeded packages to satisfy the dependencies. This splits all the build related tools into rpm-build and moves the bash, perl and python3-core runtime dependencies to that package. Also, the rpmsign tool is split into rpm-sign and rpm2archive (only built if archive is in PACKAGECONFIG) into rpm-archive. These are separate packages since they are not really related to building, so do not belong in rpm-build, but are not necessarily wanted in target images when rpm is included. (From OE-Core rev: 0dea6cccc1c638078846e6eb8e48e8ef69c87618) Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@spinetix.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>