Commit Graph

232 Commits

Author SHA1 Message Date
Olof Johansson 0916235adf rpm: remove bashisms: [ x == x ] -> [ x = x ]
The postinst and postrm of rpm contained a bashism, that could in some
situations potentially cause ldconfig not be triggered when it should
be. If you use dash on host, test would fail because of syntax errors.
But on host, it should fail because of the comparison. On target, you
often use busybox ash, and it supports == as an alias for =. So in
practice, only if you use a shell like dash on target, you'll run into
issues with this.

(From OE-Core rev: 4fd33ca846ba9f61e72a176a6462443c9fb5ddc2)

Signed-off-by: Olof Johansson <olofjn@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19 17:40:20 +00:00
Mariano Lopez e5c011b041 Add "CVE:" tag to current patches in OE-core
The currnet patches in OE-core doesn't have the "CVE:"
tag, now part of the policy of the patches.

This is patch add this tag to several patches. There might
be patches that I miss; the tag can be added in the future.

(From OE-Core rev: 065ebeb3e15311d0d45385e15bf557b1c95b1669)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-11 23:26:32 +00:00
Mariano Lopez eda3947cf0 rpmresolve.c: Fix unfreed pointers that keep DB opened
There are some unfreed rpmmi pointers in printDepList()
function; this happens when the package have null as
the requirement.

This patch fixes these unfreed pointers and add small
changes to keep consistency with some variables.

[YOCTO #8028]

(From OE-Core rev: da7aa183f94adc1d0fff5bb81e827c584f9938ec)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-11 23:26:30 +00:00
Mark Hatle 907b87dd11 rpm: Generate per distribution and multilib macro files
The distribution and multilib macro files are required for rpmbuild, on the
target, to work properly.  These override the default settings from the
upstream macro files with the proper values for the OE configuration.

(From OE-Core rev: 65e160ae521386d80cd21df72d23814afb9e445c)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-28 09:25:19 +00:00
Yuanjie Huang 95a79a5035 rpm: Fix support for db5 and db6
The previous attempt to let rpm configuration support both db5 and db6
has a flaw that when the building host provides db6 without its header
the db_create test will false pass. This new patch addresses this issue
by test against the DB_VERSION_MAJOR macro value, which is defined in
both db5 and db6's header.

(From OE-Core rev: 59934080f8311a810e7b5ce82a264d4b9de650ec)

Signed-off-by: Yuanjie Huang <Yuanjie.Huang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-22 16:08:50 +00:00
Ross Burton 455ff32426 meta: more removals of redunant FILES_${PN}-dbg
In some recipes overly-split -dbg packages were merged into PN-dbg.  Unless
there's a very good reason, recipes should have a single -dev and -dbg package.

(From OE-Core rev: a3b000643898d7402b9e57c02e8d10e677cc9722)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-16 11:56:30 +00:00
Richard Purdie e0890b662e meta: Drop now pointless manual -dbg packaging
With the autodebug package generation logic, specifically setting FILES_${PN}-dbg
isn't needed in most cases, we can remove them.

(From OE-Core rev: 3ab59d49dd7c18e194b58d1248b4b87709b5a738)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-16 11:56:30 +00:00
Robert Yang bc26a7d34c rpm: fix file conflicts for MIPS64 N32
The following error can occur:
  smart install libc6-2.22-r0.1@lib32_mips32r2octeon3 libc6-dbg-2.22-r0.1@lib32_mips32r2octeon3
error: file /sbin/ldconfig conflicts between attempted installs of libc6-2.22-r0.1.lib32_mips32r2octeon3 and libc6-2.22-r0.1.octeon3_n32
error: file /sbin/.debug/ldconfig conflicts between attempted installs of libc6-dbg-2.22-r0.1.lib32_mips32r2octeon3 and libc6-dbg-2.22-r0.1.octeon3_n32

This was because:
transactions_color = 001 (ELF32) & 010 (ELF64) & 100 (ELF32 N32 MIPS64)
FColor = Current file color (001) & transaction_color (111)
oFcolor = Previous file color (100) & transaction_color (111)

There are two places where the conflict comparisons occur.  In both places
the 'else' clause was too restrictive (opposite of the 'positive' clause).
This caused the system to only permit a binary comparison - "new preferred" or
"old preferred".  It did not permissing "neither preferred".  By removing the
else comparison the system will now perform a 'last-in-wins' resolution when
"neither is preferred".

Note, if _transaction_color is 3, MIPS64 N32 will be skipped (pretend as
installed).

(From OE-Core rev: 36c225704daa58b98a4b7f2ef315eb944d8628b5)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-12 23:42:53 +00:00
Mark Hatle 01c0285677 rpm: Enable MIPS64 N32 transactions
In a multilib install RPM will break a conflict using the transaction color.
However, by default MIPS64 N32 transactions are not enabled.

This change always enables them.  This is effectively a no-op on non-MIPS
systems, and required if we need to support N32 on MIPS.

(From OE-Core rev: dd86624034574484574d75adfcf68c2df4a7a6b7)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-12 23:42:53 +00:00
Alexander Kanavin 976f0e35c6 package_regex.inc: split the rest of the entries to their recipes
(From OE-Core rev: 73e2555cc7d529a93362b3fcfea3fbc7a4c60ca1)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-08 10:20:52 +00:00
Robert Yang 39ecdcefbd rpm: fix for N32 MIPS64
It is 'N32 MIPS64', not 'N32 MIPS32' as command file shows:
$ file image/usr/bin/getent
getent: ELF 32-bit MSB executable, MIPS, N32 MIPS64 [snip]

And "rpm -qp --filecolor" was wrong (it was 1, but should be 4), which
caused multilib installation error.

(From OE-Core rev: a598f6ee369c2a55b080ac7cfc058c1d30c7be2e)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-01 21:32:14 +00:00
Roy Li ab123ef694 rpm: define EM_AARCH64 for debugedit
EM_AARCH64 maybe not be defined due to old version elf.h when compile
rpm-native, 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.

  debugedit: /bitbake_build/tmp/work/aarch64-wrs-linux/libvirt/1.2.19-r0/
  package/usr/lib64/libvirt/ptest/daemon/libvirtd_admin_la-admin_server.o:
  Unhandled relocation 258 in .debug_info section

(From OE-Core rev: 91a159e64d404653b2d9178caf027f797a4d3f3b)

Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-11-16 11:39:30 +00:00
Ross Burton 19358d0cb5 rpm: add explicit dependency on file-replacement-native for native builds
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-27 07:24:30 +00:00
Ross Burton 35c043b42b rpm: remove spurious build dependencies
make, patch and binutils are assumed to exist on the host, so there's no need to
have them in DEPENDS and can result in the building of make-native for no good
reason.

(From OE-Core rev: 4f48eeb9396ef904202ab1abeb38ec971feaeb4b)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-21 22:56:04 +01:00
Ross Burton a856580263 rpm: fix return without value in patch
The error patch in rpm-check-rootpath-reasonableness.patch did a bare return
from a function that should be returning an int.  As this is the error path,
return -1 instead.

(From OE-Core rev: 26e90d64b51e1e53e9314f9c56939f5f6d525449)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-07 00:11:21 +01:00
Markus Lehtonen cb24cbbb02 rpm: search for gpg if gpg2 is not found
Some (host) systems only have a binary named 'gpg' (e.g. Fedora) while
some only have 'gpg2' (Ubuntu) and others have both of them (openSUSE).
Currently the behavior of rpm-native with regards to GnuPG depends on
the host platform: rpm(-native) is configured to use GnuPG binary of the
host system if 'gpg2' is found in $PATH. Otherwise, rpm(-native) will
default to using '%{_bindir}/gpg2' which will be pointing to a sysroot
binary which usually does not exist.

This patch changes rpm to look for both 'gpg' and 'gpg2' when searching
for the GnuPG binary in PATH. This makes possible to create signed RPM
packages on different host platforms, using the GnuPG binary of the
host, without the need to explicitly define the gpg binary in bitbake
configuration (via GPG_BIN variable).

[YOCTO #8134]

(From OE-Core rev: eb76b668e815fbecd18271808b871fc3b0f15e65)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-28 12:00:19 +01:00
Ross Burton 1c914a844b meta: Fix Upstream-Status statements
Fix a variety of problems such as typos, bad punctuations, or incorrect
Upstream-Status values.

(From OE-Core rev: bd220fe6ce8c3a0805f13a14706d3130ea872604)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-12 23:01:53 +01:00
Alexander Kanavin c19225ade4 upstream_tracking.inc: deprecate and move contents to recipes
No-update reasons and manual version checks should be in the recipes
themselves because otherwise they're prone to getting out of date.

(From OE-Core rev: b384345d9a693cbc3fd0dbeed9edd8c24618259d)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-01 11:44:01 +01:00
Zhixiong Chi a21b0473ad 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.

workflow:
main()->rpmcliVerify()->rpmcliArgIter()->rpmQueryVerify()->rpmgiShowMatches()->showVerifyPackage()->
          rpmqv.c         verify.c        query.c             query.c           verify.c(headerIsEntry)
rpmVerifyScript()->rpmpsmScriptStage()->rpmpsmStage()->    rpmtxnCommit(rpmtsGetRdb(ts)->db_txn);
      verify.c            psm.c             psm.c                 psm.c

(From OE-Core rev: 91945b7fcb0c83ca72543e5327e965eca9c269c4)

Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:42 +01:00
Richard Purdie 613cbe5c10 rpm4: Drop native RDEPENDS
Native recipes should *never* depend on target recipes since this would
cause them to rebuild every time the target changes. Before the recent
datastore changes, this happened to work. Now, this makes rpm-native
unbuildable since base-files-native doesn't exist and the code remaps
the variable.

Dropping these dependencies here is the correct way to resolve this issue
and fix an autobuilder selftest failure.

(From OE-Core rev: ef84c4bf1d93e9fa674300b80d0442ae1069c473)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-23 08:48:37 +01:00
Robert Yang 911cb6882b rpm: remove invalid sed command
There is no __check_files in rpm/macros any more, so remove the sed
command.

(From OE-Core rev: 53c8c290e5d25976909a821eead31633b25b9952)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12 22:55:44 +01:00
yzhu1 8b3666ea2d rpm: disable external key server
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.

(From OE-Core rev: fdaa9115fb20d4af49ce8407b5785096c66ecf6c)

Signed-off-by: yzhu1 <yanjun.zhu@windriver.com>
Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-09 18:00:19 +01:00
Zhixiong Chi eb29cea729 rpm: check if the argument(rootpath) exists or be writable
When user execute the command "rpm -qai --root=$dir",if $dir doesn't
exist or is unwritable as result of making a typo in rootpath,then
it will create dirent $dir and subdirectory.
So we should add the check function to fix it before creating relational
subdirectory,and warn the incorrect rootpath to user. It just checks the
rootpath reasonableness when the user input the argument(--root=/-r=).

(From OE-Core rev: dded280d26b2a5ca2a1e4ac787d36cdd13b603d3)

Signed-off-by: Zhixiong Chi <zchi@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-08 00:01:21 +01:00
Andre McCurdy 3990d4228a rpm: fix typo in rpm-reloc-macros.patch
(From OE-Core rev: c8a1c3082f1c7cee535af490af58b4bce644f413)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-07 13:33:27 +01:00
Andre McCurdy 6fd8459234 rpm: fix typo in rpm-realpath.patch
(From OE-Core rev: 83e891d2f3e9ff858b0523c350ebe77265d51522)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-07 13:33:26 +01:00
Mark Hatle c0123e59a0 rpm: Rebrand rpm custom macro paths to be distro specific
RPM was previously hard coded to use the 'poky' directory.  We really want
the directory name to be distribution specific.

(From OE-Core rev: 2c2fd0391df377cb9151598569e7e7c4a622bc0e)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-23 11:47:40 +01:00
Mark Hatle a990d21aec rpm: Fix lua 'print' statement capture
The print statement should capture the output and send it to the script
processing engine, and not display it directly to the screen.

Note, this is only a bug if 'lua' support has been enabled in the RPM
recipe's PACKAGECONFIG.

This patch is from: http://rpm5.org/cvs/patchset?cn=17671

(From OE-Core rev: 6bc0e8207d0e7b1d6f2eac8ed1b75a3fd9fab87b)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-23 11:47:40 +01:00
Leonardo Sandoval db34474679 rpm: Fix CVE-2013-6435
Backport to fix CVE-2013-6435. Description on [1] and original
patch taken from [2].

[1] https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2013-6435
[2] https://bugzilla.redhat.com/attachment.cgi?id=956207

[YOCTO #7181]

(From OE-Core rev: 6bf846ed5ccd1a4d01b36630708b2b9aa9e69ed5)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-23 11:47:40 +01:00
Leonardo Sandoval 3886107521 rpm: Fix CVE-2014-8118
Backport patch to fix CVE-2014-8118. Description is on [1] and
original patch taken from [2].

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1168715
[2] https://bugzilla.redhat.com/attachment.cgi?id=962159

[YOCTO #7181]

(From OE-Core rev: 0a1f924157cb75d0f67cf534762c89dc8656d352)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-23 11:47:40 +01:00
Robert Yang 39abb871d0 rpm: remove extra dev and dbg packages
There should be only one dev and dbg package.

[YOCTO #7481]

(From OE-Core rev: b412306418c3915bb11e3d5201cafb68e2f2b453)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-08 17:34:03 +01:00
Ross Burton 8732930521 rpm: don't put LDFLAGS into the .pc file
The LDFLAGS are not generally useful with pkg-config and mean that the .pc file
contains references to the sysroot directory, so remove it.

(From OE-Core rev: f50c4c4e26edeaf01393fe7a06c42f86fd4680a5)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-10 10:47:45 +00:00
Robert Yang a7f4a3a3e6 rpm: separate B and S
It works well now, and bump the PR to avoid:
configure: error: source directory already configured; run "make distclean" there first

(From OE-Core rev: a73161c89e6de3e244f70afe746c4786ad5e982f)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-16 23:08:28 +00:00
Roy.Li 318730be2e rpm: fix the rpm addsign function
(From OE-Core rev: d382c1541bec301468119268f4940ae15c326b1c)

Signed-off-by: Roy.Li <rongqing.li@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-20 14:08:11 +00:00
Ming Liu 9f33c2858c rpm: realpath is required before expanding _dbpath in chroot
A regression is introduced by commit 66573093:
[ rpm: Fix rpm relocation macro usage ]

_usr turned out to be a relative path to support dyanmic config after
that, but it's being used somewhere as a indicator to locate substrings,
so we must get the real path of it in advance.

(From OE-Core rev: 1247955a907f51aac7efd305d26856e263c11a65)

Signed-off-by: Ming Liu <ming.liu@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-24 17:36:16 +01:00
Saul Wold 58d9c4e4ba rpm: add version 4.11.2
add patch to remove db3 from configure.ac
add inherit pkgconfig

(From OE-Core rev: 9a17f938e738a16a1ef9a00be6a8317d71f92573)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-30 21:36:13 +01:00
Saul Wold 5ad57f4562 rpm5: add python-rpm PROVIDES
Since python-smartpm depends on python-rpm, we should provide here as appropriate.

(From OE-Core rev: a3598f87bd22354cce2f2be06f09c2b24f2adb63)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-30 21:36:13 +01:00
Robert Yang c7541a25f4 rpmresolve: ignore null requires
It is not a problem if a package requires nothing (similar to RDEPENDS
is null), for example, these packages depends on nothing:

[snip]
alsa-conf-base
base-files
eglibc-binary-localedata-en-us
xserver-xf86-config
[snip]

The rpmresolve-native's algorithm is:
===fake code
for pkg in pkg1, pkg2, pkg3:
    rc = get_req(pkg)
return rc
===fake code

Suppose of the 3 pkgs requires null:
- We are lukcy if pkg1 or pkg2 is null, nothing happend.
- We are *not* lukcy if pkg3 is null, and will get the error when "INHERIT +=
  'buildhistory'":
  ERROR: Cannot get the package dependencies. Command
  '/path/to/x86_64-linux/usr/bin/rpmresolve -t /path/to/var/lib/rpm' returned 1:

This patch fixes the problem.

(From OE-Core rev: 2f234160ff4e9eccd8794a31df851b96328f6b74)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-03 16:00:28 +01:00
Robert Yang fb5f2bb6d9 rpm: add perl to RDEPENDS_rpm-build
Perl scripts:
rpm-build/usr/lib64/rpm/http.req
rpm-build/usr/lib64/rpm/php.prov
rpm-build/usr/lib64/rpm/osgideps.pl
rpm-build/usr/lib64/rpm/perl.prov
rpm-build/usr/lib64/rpm/bin/api-sanity-autotest.pl
rpm-build/usr/lib64/rpm/php.req
rpm-build/usr/lib64/rpm/perldeps.pl
rpm-build/usr/lib64/rpm/perl.req

(From OE-Core rev: c951d443daca22a3dd90897bf5b26cc113b9343d)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23 09:26:11 +01:00
Joe Slater 779f845469 rpm: compile rpmqv.c instead of rpmqv.cc
Some versions of gcc will put a reference to __gxx_personality_v0
into rpm.o and rpmbuild.o.  This means we must link using g++,
and Makefile does not.

Go back to using rpmqv.c (which is currently identical to rpmqv.cc).

(From OE-Core rev: a36327ee2d159b3791cc6ce0c36af4b9e0693e51)

Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-19 00:08:59 +01:00
Robert Yang ae33bda011 rpm: disable -Wno-override-init
Fixed rpm-native.do_configure error on CentOS 5.x:
cc1: error: unrecognized command line option "-Wno-override-init"

The -Wno-override-init was commented in rpm-5.4.9, but commented out in
rpm-5.4.14 thus it is failed to build on CentOS 5.x, comment it again to fix
the problem.

(From OE-Core rev: ad4a54a0f5bb667f5d5e3df2bcf841b05e0d0f2c)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-10 17:38:34 +01:00
Mark Hatle 5f27f553eb rpm_5.4+cvs: Add RPM community tree for future development
Enable the rpm-5_4 branch via a specific recipe to help track the latest
community development.  This should allow us to more quickly move to the next
release when it is available.

(From OE-Core rev: c461454d7f3a20ccf9ca20c5c41c80c9becd985c)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-08 11:20:12 +01:00
Mark Hatle f171799902 rpm: Replace patch with backport from SCM version of RPM5
(From OE-Core rev: 17419e4577eb4b5786d4c0120f070e1660fa28ec)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-08 11:20:12 +01:00
Mark Hatle fe483ca37c rpm: Upgrade to 5.4.14
Update various patches.  A few corrections to the patch descriptions,
otherwise simple quilt refresh or conflict resolution.

Remove rpm-solvedb.patch and rpm-respect-arch.patch.  These are both related
to the old solvedb package dependency solver.  This is no longer used since
we moved to smartpm.

rpm-stub-out-git_strerror was a backport and is no longer needed.

RPM 5.4.12 and newer normally requires Berkley DB 6.0 or newer.  A small
patch to configure allows RPM to dynamically select DB 5.3 or DB 6.0 based
on what is available at configure time.

(From OE-Core rev: 0c7b4a5e23836889196f85f472f081d51529e94e)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-08 11:20:12 +01:00
Richard Purdie dd50dfe27e rpm: Fix cpio 32 bit overflow issues on 64 bit inode filesystems
When building on XFS filesystems, the resulting rpms can be corrupted
with the same inode number being used for multiple hardlinked files.
There are two fixes, one to stop rpm crashing when accessing a broken
binary rpm, the other to stop generating them in the first places. Full
descriptions in the patch headers.

(From OE-Core rev: d20d3476157b7c949b0077cad0ab1e8716d6162a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-12 17:47:59 +01:00
Mark Hatle 9238e53b59 rpm: Fix rpm -V usage
[YOCTO #6309]

It appears a logic issue has caused rpm -V to no longer
verify the files on the filesystem match what was installed.

(From OE-Core rev: 117862cd0eebf6887c2ea6cc353432caee2653aa)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-13 19:32:06 +01:00
Matthieu Crapet b88321ac78 recipes: convert remaining SUMMARY/DESCRIPTION cosmetic issues (part 2)
Completes previous commit b5292d4115a4555a66b5e35acdc67dd71fb8577f.
Updates SUMMARY[doc] (meta/conf/documentation.conf).

Changes:
- rename DESCRIPTION with length < 80 to (non present tag) SUMMARY
- drop final point character at the end of SUMMARY string
- remove trailing whitespace of SUMMARY line

Note: don't bump PR

(From OE-Core rev: ad17dfd31a2b97b3e610a0ea0889f5ecb2a63b97)

Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-20 14:28:13 +00:00
Ming Liu c33c645953 rpm: fix a endian incompatible error in generating tag
A flaw was found in the way rpm generating arbitrary tags, which leads to a
incorrect query result, this issue is introduced by a incompatible endianess
when the generating process is executed on different architectures.

This patch resolves it by taking the byte order that host uses.

(From OE-Core rev: b4b79a78012c64e3a19545972512153b1fe64b4d)

Signed-off-by: Ming Liu <ming.liu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-17 15:37:17 +00:00
Chong Lu 511997535f meta/*: remove unnecessary patches
The following patches are found, but not used by any recipe, so we should
remove them.

	meta/recipes-connectivity/avahi/files/fix_for_automake_1.11.2.patch
	meta/recipes-connectivity/dhcp/dhcp/fix-client-path.patch
	meta/recipes-connectivity/libnss-mdns/files/alignment-fix.patch
	meta/recipes-core/dbus/dbus-1.6.10/test-run-path.patch
	meta/recipes-core/gettext/gettext-0.16.1/fixchicken.patch
	meta/recipes-core/gettext/gettext-0.16.1/getline.m4.patch
	meta/recipes-core/systemd/systemd/use-rootlibdir.patch
	meta/recipes-core/util-linux/util-linux/remove-lscpu.patch
	meta/recipes-core/util-linux/util-linux/remove_sigsetmark.patch
	meta/recipes-core/util-linux/util-linux/uclibc-compile.patch
	meta/recipes-devtools/autoconf/autoconf/autoconf-x.patch
	meta/recipes-devtools/btrfs-tools/btrfs-tools/btrfs-progs-fix-parallel-build.patch
	meta/recipes-devtools/btrfs-tools/btrfs-tools/btrfs-progs-fix-parallel-build2.patch
	meta/recipes-devtools/cdrtools/cdrtools-native/no_usr_src.patch
	meta/recipes-devtools/elfutils/elfutils-0.155/elfutils-robustify.patch
	meta/recipes-devtools/gdb/gdb/libiberty-cross.patch
	meta/recipes-devtools/perl/perl-5.14.3/asm-pageh-fix.patch
	meta/recipes-devtools/python/python-native/sys_platform_is_now_always_linux2.patch
	meta/recipes-devtools/python/python-pygobject/generate-constants.patch
	meta/recipes-devtools/qemu/files/3f08ffb4a4741d147634761dc053ed386243a0de.patch
	meta/recipes-devtools/qemu/files/enable-i386-linux-user.patch
	meta/recipes-devtools/qemu/files/init-info.patch
	meta/recipes-devtools/rpm/rpm/rpm_fix_for_automake-1.12.patch
	meta/recipes-devtools/tcf-agent/tcf-agent/fix_tcf-agent.init.patch
	meta/recipes-extended/iputils/files/arping-break-libsysfs-dependency.patch
	meta/recipes-extended/libarchive/libarchive/0003-Patch-from-upstream-rev-2516.patch
	meta/recipes-extended/procps/procps-3.2.8/pagesz-not-constant.patch
	meta/recipes-gnome/gtk+/gtk+-2.24.22/no-demos.patch
	meta/recipes-gnome/libglade/libglade-2.6.4/no-deprecation.patch
	meta/recipes-graphics/mesa/mesa/0005-llvmpipe-remove-the-power-of-two-sizeof-struct-cmd_b.patch
	meta/recipes-graphics/xorg-lib/libxxf86dga/libxxf86dga-1.1.3_fix_for_x32.patch
	meta/recipes-kernel/kmod/kmod/fix-undefined-O_CLOEXEC.patch
	meta/recipes-kernel/linux-libc-headers/linux-libc-headers/connector-msg-size-fix.patch
	meta/recipes-kernel/linux/linux-yocto/tools-perf-no-scripting.patch
	meta/recipes-support/gnutls/gnutls/gnutls-texinfo-euro.patch
	meta/recipes-support/nspr/nspr/fix-build-on-aarch64.patch

[YOCTO #5180]

(From OE-Core rev: e5d81f757de4bd1bfd37a96300edd50b77b0d21c)

Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-10 17:42:43 +00:00
David Nyström 77c1320175 rpm: Fixed Q&A Errors in netivesdk-rpm
ERROR: QA Issue: nativesdk-rpm: Files/directories were installed but not shipped
  /opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/lib/rpm/bin/rpmcmp.real
  /opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/lib/rpm/bin/rpmrepo.real
  /opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/lib/rpm/bin/rpmdigest.real
  /opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/lib/rpm/bin/rpmspecdump.real
  /opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/lib/rpm/bin/rpmcache.real
  /opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/lib/rpm/bin/debugedit.real
  /opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/lib/rpm/bin/rpmdeps-oecore.real
  /opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/lib/rpm/bin/rpmdeps.real
ERROR: QA run found fatal errors. Please consider fixing them.

(From OE-Core rev: 247d1803c76f1aad54a8bc7d447384d720a81839)

Signed-off-by: David Nyström <david.nystrom@enea.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-05 14:25:29 +00:00
Hongxu Jia cb5a224bd8 debugedit: fix segment fault while file's bss offset have a large number
While ELF_C_RDWR_MMAP was used, elf_begin invoked mmap() to map file
into memory. While the file's bss Offset has a large number, elf_update
caculated file size by __elf64_updatenull_wrlock and the size was
enlarged.

In this situation, elf_update invoked ftruncate to enlarge the file,
and memory size (elf->maximum_size) also was incorrectly updated.
There was segment fault in elf_end which invoked munmap with the
length is the enlarged file size, not the mmap's length.

Before the above operations, invoke elf_begin/elf_update/elf_end
with ELF_C_RDWR and ELF_F_LAYOUT set to enlarge the above file, it
could make sure the file is safe for the following elf operations.

[YOCTO #5356]
https://bugzilla.redhat.com/show_bug.cgi?id=1019707
https://bugzilla.redhat.com/show_bug.cgi?id=1020842

(From OE-Core rev: 35c8b1ac7c3b1e4209b1e30d1dbd1a457286b97b)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-30 13:39:08 +00:00
Richard Purdie 2588a0ff43 rpm: Fix FILES_${PN}
In a recent commit, the FILES expression for rpm accidently moved a
large portion of rpm-build into rpm:

http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=2e557556e03f4e86795cf331ccf06acd4c373045

Since rpm-build requires perl, this caused a number of build failures
when the rpm-build package was attempted to be used since it references
/usr/bin/perl. This commit restores the previous contents of the rpm
package.

(From OE-Core rev: a72ca9b8068f71cfed8b7cbe0f08247bd3f0fbe7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-30 13:06:20 +00:00
David Nyström 2e557556e0 rpm: Add nativesdk to BBCLASSEXTEND
Modified FILES-paths since nativesdk can't handle hardcoded paths,
Also added *.real binaries to packaging since this is not done when built
as native.

As far as /var having to be hardcoded, I have a hard time seeing someone
modifying bitbake.conf to place localstatedir somewhere else than /var.

If there exists a target/nativesdk portable way of hardcoding FILES,
please let me know, and we'll do it that way.

Cleanup of FEATURES, since it was the same for native & target.

(From OE-Core rev: 39383e9bf1aa5e29d33d8af7f8e690d2238fd14f)

Signed-off-by: David Nyström <david.nystrom@enea.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-26 15:59:18 +01:00
David Nyström a73f180ee9 rpmresolve: Add nativesdk in BBCLASSEXTEND
(From OE-Core rev: 068cfd27ff1bf31b110b68fee947624026b69a90)

Signed-off-by: David Nyström <david.nystrom@enea.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-18 15:58:17 +01:00
Chen Qi bf413add98 rpm: fix typo in PACKAGECONFIG
Fix typo, change PACAKGECONFIG to PACKAGECONFIG.

(From OE-Core rev: 77363d06121ceec264e06165ddda7b829c963301)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-17 14:35:18 +01:00
Mark Hatle c8879e23ab rpm: Enable compatibility with older RPM packages that have invalid platforms
Some LSB packages appear to have the platform set to '%{_target_platform}'
which is not a valid platform field.  This causes a failure of the type:

warning: package lsb-test-core-4.1.15-1.x86_64 is intended for a %{_target_platform} platform

When we detect an invalid platform, fall back and try to construct a new
platform name that may be valid based on the arch and os contents of the
package.  (This should only ever be needed by invalid or older RPM packages.)

(From OE-Core rev: 6513fa327aeb7e9fdd313290c205917952eed226)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-13 23:06:01 +01:00
Mark Hatle bef0aabeab rpm: Change references from RPM_VENDOR_POKY to RPM_VENDOR_OE
Change the #define references to match RPM_VENDOR_OE.

(From OE-Core rev: a84ecc5ad158a7529a904785de25ebfedf5767a7)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-13 23:06:01 +01:00
Chen Qi 7e34865498 rpm: remove the obsolete rpm-postinsts.bb
Now that the postinsts of rpm, deb and ipk are all handled in the one
central place, run-postinsts.bb, the rpm-postinsts.bb recipe is actually
obsolete now. Remove this recipe to avoid confusion.

(From OE-Core rev: 308185c215b8dd969d1230e52444ce3c11fc2c57)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-29 13:09:11 +01:00
Yi Zhao 16b411ee60 rpm-postinsts.bb: Fix typo
Fix a typo for stderr redirection.

(From OE-Core rev: cfe3bb097df2a9e6488b4d50f61311b97959ed26)

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-18 21:24:29 +01:00
Paul Eggleton 209f92b68f rpm: add wrapper for debugedit executable
This should fix sstate relocation issues with debugedit failing during
do_package on the Yocto Project autobuilder.

(From OE-Core rev: b7c2e01753e4a09388a3282e534bcbd163cd6ef7)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-02 22:26:57 +01:00
Laurentiu Palcu d5f593c25f rpm: replace rpm-postinsts dependency with run-postinsts
run-postinsts is generic and will handle rpm delayed postinsts just
fine. No need to use another recipe.

(From OE-Core rev: 1195a188f366fbbb04b9379d7ea3c7c02130cc98)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 15:38:05 +01:00
Ross Burton 73dae11852 rpm: remove .real hacks in argument parsing
The argument parser in RPM was patched to look for <binary>.real, but since the
wrapper now fakes the right argv[0] rpm wasn't able to parse any options.

(From OE-Core rev: a67b4cfc41819ed77ed2bc4246228e9d006a4317)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-31 14:02:45 +01:00
Chen Qi f7b639e527 rpm-postinsts.bb: enable postinst logging
Enable postinst logging by checking the configuration in ${sysconfdir}
/default/postinst.

In this way, the postinst logging is enabled if 'debug-tweaks' is
in IMAGE_FEATURES, and at the same time, we avoid unnecessary rebuild
if IMAGE_FEATURES is changed.

[YOCTO #4262]

(From OE-Core rev: 6f2aa32f10c24c84e581128bb3a976ef071197ac)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-23 10:28:05 +01:00
Saul Wold 6de55b6968 rpm-postinst: remove un-needed RDEPENDS on base-files
This was transferred un-intentionally when we split the rpm code,
the base-files then layed down additional files (specificaly /etc/mtab)
in the initramfs image and caused problems for the installer code.

Removing the RDEPENDS will fix the image generation issue and thus
the installer, so we will need to revert a previous patch that attempted
to fix the earlier issue #4229.

[YOCTO #4504]
[YOCTO #4229]

(From OE-Core rev: 6861eb34e903c5ddf491eca04011b2219fe14267)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-17 09:37:29 +03:00
Saul Wold ea89950ba8 Upstream-Status: Correct Capitalization
(From OE-Core rev: 43b2a2f375e2201be7a9bb6a9c5c0a9fc61f3361)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-12 09:37:31 +01:00
Saul Wold b34cf7ea4e rpm: ensure __mkdir_p matches __mkdir
They differ at times because one is set from the db_cv_path_mkdir and the other is
found during config time for the host (/usr/bin/mkdir), in the macros we should just
use __mkdir for the __mkdir_p variant.

[YOCTO #4452]

(From OE-Core rev: 2ab642056829aef675f75c05b9ac5bbc43c87cd1)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-10 11:43:12 +01:00
Bogdan Marinescu f2f835632c rpm: change arch scoring items
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).

[YOCTO #3864]

(From OE-Core rev: 9263a2192ccf8ca513cbf7f2f88473e267e6b945)

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-29 14:45:06 +01:00
Paul Eggleton 79c2485204 rpm-postinsts: remove erroneous call to /etc/default/rcS
This doesn't work when the initscripts package is not installed (e.g.
when using systemd only) and is not even needed.

(From OE-Core rev: 6c972598c6da17fbec7a4582eb593c31f4283275)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-15 09:35:40 +01:00
Paul Eggleton f3dbf8f674 dpkg, opkg, rpm-postinsts: avoid repackaging when changing IMAGE_FEATURES
Recipes cannot depend on the value of IMAGE_FEATURES; in this case the
result is do_package task signatures changing every time IMAGE_FEATURES
changes, causing a large number of task re-executions. The
implementation of the log capturing really needs to be changed to
capture these in a different place and possibly not even conditional
upon IMAGE_FEATURES at all, but this will be invasive at this point in
the development cycle. For now, remove the variable dependencies to fix
the immediate problem.

Fixes [YOCTO #4246].

(From OE-Core rev: b4fbe4095de447ef4e426128bafaf8a292fa63e1)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-11 16:13:58 +01:00
Laurentiu Palcu 8b29120a8c dpkg, opkg, rpm-postinst: fix overwriting the run-postinstall script
If multiple package managers are installed in the image, they will
overwrite each other's run-postinsts script, resulting in postinstalls
not beeing run at all at first boot.

What this patch does:
 * checks whether opkg/dpks/rpm is actually used to install
   the packages and, only after, creates the run-postinsts script;
 * brings dpkg recipe in sync with opkg: moves the script creation from
   do_install to postinstall;
 * move creation of run-postinsts script (rpm-postinsts recipe) to the
   postinstall scriptlet in order to better control the creation of the
   script according to the package manager used;

[YOCTO #4231]
[YOCTO #4179]

(From OE-Core rev: d7fd56df0a4954954d6d0764ae06beb869e6b99a)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-11 12:20:35 +01:00
Paul Eggleton cf569f5def rpm-postinsts: avoid errors during boot with read-only-rootfs enabled
* If /etc/rpm-postinsts doesn't exist, don't error
* If deleting the script errors, don't bother printing it (this will
  always happen if the root filesystem is read-only)

(From OE-Core rev: f787b8302ed61bdaf1767473b856f31fe5bba28e)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-10 16:49:24 +01:00
Paul Eggleton aa22868eba rpm-postinsts: don't create broken postinst script
Not only was the variable reference in this line broken, but it wasn't
going to work anyway - we install the script directly into /etc/rcS.d
and not into /etc/init.d, so the code in update-rc.d.bbclass couldn't
find anything there. This resulted in a postinstall script for
rpm-postinsts being created in /etc/rpm-postinsts which can't work when
the root filesystem is read-only. To simplify things just remove the use
of update-rc.d.bbclass since we don't really need the added complexity
here.

Fixes [YOCTO #4222].

(From OE-Core rev: d196d08acafe599c16a7ac8e04121039b1216ba6)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-10 16:49:24 +01:00
Laurentiu Palcu 51959f5662 rpm: fix RDEPENDS
The rpm-postinsts runtime dependency was overwritten.

(From OE-Core rev: 834ea4ed891c874e0336abb8f0b96664250208c9)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-09 13:16:52 +01:00
Saul Wold b450344ca7 rpm-postinsts: Split out run-postinsts
This patch allows for the run-postinsts script to be provided outside
of the rpm package itself and not pull in all the associated build
dependencies.

[YOCTO 4175]

(From OE-Core rev: 7841ee7041d04f11a3d879fb5bc60bb37de0a5c0)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-04 14:04:42 +01:00
Richard Purdie f802d7f0c4 rpm: Ensure rpm depends on rpm-postinsts
If package-management isn't in IMAGE_FEATURES, the postinstall handler
wasn't being installed. rpm needs to depend on this to ensure it does
get installed.

[YOCTO #4160]

(From OE-Core rev: 0c2778c36f521d019ab6ff0c458a1e117808d2e5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-02 17:57:06 +01:00
Zhenhua Luo 4b50385e2c rpm: split out run-postinsts
1. Split out run-postinsts script into separated package, sometimes only the
   postinsts script is required to run all postinsts scripts in /etc/rpm-postinsts/
   instead of the whole rpm package.
2. Set ROOTFS_PKGMANAGE_BOOTSTRAP to rpm-postinsts

(From OE-Core rev: 056490ddbfdbb6cc6fa0d8ff8716d64819d6b16c)

Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-29 10:40:54 +00:00
Mark Hatle 6da3aca59b rpm: Fix debugedit buildid processing
[ YOCTO #4089 ]

When constructing a new buildid, the items being hashed need to be
returned to their native endian.  In the process we were munging
the sh_type field that we relied on to determine if a section was
loadable or not.  The patch avoids this behavior by only modifying
a copy of the local endian data.

(From OE-Core rev: ac4d2d44c88cace8dbce0c8e7df3fd1f2ed244b4)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-26 17:53:46 +00:00
Mark Hatle 5a9d83de1f rpm: Add workaround for debugedit-segv
[ YOCTO #4089 ]

On PPC and MIPS, there appears to be a condition that causes
debugedit to segfault.  The segfault is related to a call into
the md5hash algorithm, an address of '0', and a size > 0 is passed
causing the access of the address to segv.

This workaround may prove to be the final fix, but it's currently
unclear what the actual cause of the 0 address is.

(From OE-Core rev: a046029eb96cd9307253937ceeadafaaa6d06dce)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-25 17:42:58 +00:00
Richard Purdie 902b785e93 rpm: Fix case where ${B} != ${S}
We need to run autogen.sh in the correct directory (${S}).

(From OE-Core rev: f352f9f25695635bbaad09774f02e66684971fc0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-22 16:54:36 +00:00
Richard Purdie 265320d5d0 rpm: Fix case where ${B} != ${S}
Fix out of tree builds by removing assumptions about cwd and using
full paths to files in ${S}.

(From OE-Core rev: 6c2d3ced1af4e7ebc63e9a9ac9353d565d1568bf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-18 13:18:24 +00:00
Kang Kai 9ed59a5d18 rpm: save output of postinstall scripts when image first boot
When image feature "debug-tweaks" is enabled, save output of post
install script to log file which can be configured when image first
boot.

[YOCTO #3223]

(From OE-Core rev: 94a58c153958002b117fcb5eeaef3d22be71a0f6)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-07 11:14:39 +00:00
Kang Kai c2fefcdc18 rootfs_rpm: move run-postinsts scripts to rpm recipe
Move run-postinsts scripts from rootfs_rpm.bbclass to rpm recipe. That
is the same way for dpkg and opkg to deal the post install scripts.

(From OE-Core rev: 04607b0cd496837f10ef78cf43597ec1d2e13f2e)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-01 13:03:26 +00:00
Laurentiu Palcu 2a9dcc49aa rpm: remove /var/volatiles/cache/rpm from the FILEs list
Since /var/cache is not in volatiles anymore, this entry has to go.

(From OE-Core rev: ed31c6442309eb2816e96d8565b52cf7cc28c803)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 09:37:29 +00:00
Richard Purdie 9a26b9c69c rpm: Ensure native binaries are correctly wrapped
(From OE-Core rev: 1cdeff2c50a13c7238543ee1e4e1eb60753120e2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-30 14:47:30 +00:00
Paul Eggleton 6930251f6c rpm: properly disable perl file dependency checking for rpmdeps
We don't want the perl module dependencies being added to each package
by rpmdeps because it causes too many problems when the modules aren't
available at install time (since they get added in do_package which is
too late for the build system to ensure they are available), and it
appears that the perl dependency gathering isn't working reliably in any
case judging by how they are detected on some build hosts and not
others.

This was being disabled previously but it seems like the macros moved
to a different file at some point and nobody noticed; thus make sure we
disable the macros in all RPM macro files.

Should fix [YOCTO #3699].

(From OE-Core rev: e43a72af9055b76eb2ad7e2e42e6a5f3c8854efa)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-25 12:42:08 +00:00
Saul Wold e9b73c0b01 rpm2cpio: Update to match rpm4 specs for decompression
[YOCTO #3753]

(From OE-Core rev: 1377278187d20853304fe2689105f2848d796d86)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-20 13:06:43 +00:00
Constantin Musca 296617d205 rpm: replace /usr/lib with ${libdir}
Fix the following warning:
WARNING: QA Issue: rpm: Files/directories were installed but not shipped
  /usr/lib64/rpm/bin/api-sanity-checker.pl

(From OE-Core rev: 625c93784940c0dcda4570258acf2183af7ec5f8)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-07 11:09:38 +00:00
Bogdan Marinescu 26b486f4b0 rpm: remove declaration of "sykcparse"
This is needed so rpm compiles with the latest update of bison
(2.7), otherwise compilations ends with a "function already declared"
error.

(From OE-Core rev: 6563a2a5ff7626177ea2cc68eda96e0caf2d320f)

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-26 11:34:09 +00:00
Mark Hatle e1345b76c0 rpm/smart: Fix runtime-relocation issues w/ RPM and Smart
Fix runtime-relocation issues with the RPM and Smart wrappers.

In addition the patches were necessary to fix related problems.
The changes to the includes three categories of issues:
  *) Incorrect pathname evaluations
  *) Incorrect evaluation of the /etc/rpm/platform file contents
  *) Confusing vendor #define checks

Finally, a simple way to debug the platformScore was added as
that is necessary to debug how this works and into the smart system.

(From OE-Core rev: 355a621caca66ed393d36fff6be8918921cf45ae)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-17 17:24:52 +00:00
Mark Hatle a8cee41b3d rpm: Fix Upstream-Status fields
(From OE-Core rev: ee65b00b4ce3f4c27c2a19f079576345d39efb22)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-06 12:31:04 +00:00
Mark Hatle f47fa1a8c0 rpm: Fixup platform matching code
On ARM systems the platform matching code could fail in some cases, as
the system macros file could override the 'platform' file settings.

(From OE-Core rev: e5f557b3bdaa5bbd632b50824d8f85d2d2aeb221)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-06 12:31:04 +00:00
Mark Hatle f8b2ec3c94 rpm: Fix rpm relocation macro usage
When RPM is setup to dynamically reconfigure itself at runtime, we need
to avoid hard coded settings for _usrlibrpm and _etcrpm.

(From OE-Core rev: 66573093c44aabbba96d82de9375158e4a4c6f32)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-06 12:31:04 +00:00
Mark Hatle a6c86d1664 rpm: Move rpmdb_loadcvt from base to dev package
This item is only useful when the various development components are
installed.

(From OE-Core rev: 54247297816e1d8f97667e662bf00d8fefceb6aa)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-06 12:31:03 +00:00
Paul Eggleton 140c7c810d rpm: enable _openall_before_chroot by default
We want this enabled especially for the native case.

(From OE-Core rev: e3c48c11dbe98958c7564f3fc6dbab36d7037973)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-06 12:31:03 +00:00
Mark Hatle 11af6b042c rpm: Add additional RPMSENSE values to python module
We add a number of additional RPMSENSE values to the python module to better
support the dependency calculations in SMART.

(From OE-Core rev: 431352d063b353ee0e0eaa5bfe24450962d71d6b)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-18 16:42:02 +00:00
Mark Hatle 4dd9d39dca rpm: Slightly change the way python-rpm is constructed
If python support is enabled we want to make sure that the RPM python support
is packaged properly.

Move the components into the site-packages directory, move the .la files to a
new -dev package.

Add "rpm" as a dependency of python-rpm, otherwise rpm and the associated
libraries won't be available.

Fixup python wrapper to handle automatic relocation, as supported by the
vendor WINDRIVER configuration.  (Based on a patch from Paul Eggleton)

(From OE-Core rev: cd0473a145cec51be736b6141b0b18a82b64d483)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-18 16:42:02 +00:00
Ross Burton 7ea8496ce0 meta: remove redundant _FOR_BUILD variables
(From OE-Core rev: acabd2158d9004dedfdfad8c170b77d32684f3fc)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-12 13:36:37 +00:00
Robert Yang aea2d8c02c recipes-devtools: replace virtclass-native(sdk) with class-native(sdk)
The overrides virtclass-native and virtclass-nativesdk are deprecated,
which should be replaced by class-native and class-nativesdk.

[YOCTO #3297]

(From OE-Core rev: bb67ddeb2eed3e25c626a279ef53a7e8c7bfe6f2)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-02 16:18:29 +00:00
Paul Eggleton 27c30e46d9 rpmresolve: fix reporting of multiple matches error
We were mistakenly writing what was meant to go to stderr into the
output file, so when the "Multiple matches" error showed we weren't
actually seeing the matches printed.

Also change the wording of the "Unable to find package..." to "Unable
to resolve package..." instead so that it makes more sense if it is
printed after the "Multiple matches" error.

(From OE-Core rev: c26542eb4e8707b9639ec309a44809a728839db8)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-03 17:18:30 +01:00
Mark Hatle eab4995400 rpm: Implement workaround for DB_BUFFER_SMALL error
In certain cases with BerkleyDB 5.3.x we are getting the error:

db3.c:1443: dbcursor->pget(-30999): BDB0063 DB_BUFFER_SMALL: User memory too small fo

See https://bugs.launchpad.net/rpm/+bug/934420 for more information.

It appears to be some type of a bug in the BerkleyDB 5.3.x.  In an attempt
to workaround the problem, when we encounter this situation we attempt
to adjust the size of the mmap buffer until the call works, or we
end up trying 10 times.  The new size is either the updated vp->size
from the failed pget call, or the previous size + 1024.

If DBI debugging is enabled, additional diagnostics are printed, otherwise
a basic retry and success message is added to show that the failure was
resolved.

(From OE-Core rev: bfb2906206158748d0be33baf7984cf885756da1)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-02 11:40:50 +01:00
Mark Hatle e602247c08 rpm: Add rpm patch to fix git_strerror issues
Remove the optimzation append from recipe and add the patch that is in the rpm
cvs repo, http://www.mail-archive.com/rpm-cvs@rpm5.org/msg08907.html. The -O2
optimzation append is removed since it can limit debugging options that are
provided when -O0 is used.

This was tested by setting: SELECTED_OPTIMIZATION = "-O0"

(From OE-Core rev: d109c6bd163469d6281d20174e4b79cb63483cd4)

Signed-off-by: Morgan Little <morgan.little@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-02 11:40:49 +01:00