summaryrefslogtreecommitdiffstats
path: root/scripts/rpm2cpio.sh
AgeCommit message (Collapse)Author
2020-02-19rpm2cpio.sh: fix to handle newline characterLori Hikichi
This script is attempting to read binary data from an rpm file. If any of the bytes it is attempt to read is the binary value 0xa (i.e. a newline) then the script does not properly deal with this special case. Due to the behavior of command substitution, instead of fetching the value 0xa, the script makes an error and get the value 0 instead. The fix and the following explantion was taken from this post... https://unix.stackexchange.com/questions/10801/ how-to-use-bash-script-to-read-binary-file-content Command substitution $(…) strips final newlines in the command output. There's a fairly easy workaround. Make sure the output ends in a character other than a newline, then strip that one character. Signed-off-by: Lori Hikichi <lori.hikichi@broadcom.com> Signed-off-by: Scott Branden <scott.branden@broadcom.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-09meta/lib+scripts: Convert to SPDX license headersRichard Purdie
This adds SPDX license headers in place of the wide assortment of things currently in our script headers. We default to GPL-2.0-only except for the oeqa code where it was clearly submitted and marked as MIT on the most part or some scripts which had the "or later" GPL versioning. The patch also drops other obsolete bits of file headers where they were encoountered such as editor modelines, obsolete maintainer information or the phrase "All rights reserved" which is now obsolete and not required in copyright headers (in this case its actually confusing for licensing as all rights were not reserved). More work is needed for OE-Core but this takes care of the bulk of the scripts and meta/lib directories. The top level LICENSE files are tweaked to match the new structure and the SPDX naming. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-13scripts/rpm2cpio.sh: replace 5.x version with 4.x versionAlexander Kanavin
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
2012-01-03rpm2cpio.sh: make compression tests case-insensitiveTom Zanussi
In the rpm2cpio.sh script, the output of $COMPRESSION is tested for certain lowercase strings such as 'xz' in order to determine the decompression to use. The problem is that the output strings tested are from the output of 'file', which uses different cases in different versions e.g. file-5.09 prints: tmp/sysroots/x86_64-linux/usr/bin$ ./file xxx.tar.xz: XZ compressed data while file-5.03 prints: tmp/sysroots/x86_64-linux/usr/bin$ ./file xxx.tar.xz: xz compressed data In the former, the XZ string causes xz compressed payloads to incorrectly fall through to the catch-all lzma case. Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
2011-02-08fetch2: Add SRPM knowledgeMark Hatle
Enable the fetcher to be able to unpack and SRPM. By default the system will unpack the contents of the SRPM into the WORKDIR. A new syntax "unpack=file" was developed for the SRC_URI, to allow for a recipe to extract a specific file within an SRPM. An unpack operation will then be executed on the extracted file. In order to apply extracted patches (or unpack files not specified with unpack), you must specify the path using WORKDIR, i.e.: file://${WORKDIR}/mypatch.patch Signed-off-by: Mark Hatle <mark.hatle@windriver.com>