summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/file
AgeCommit message (Collapse)Author
2024-02-08file: enable additional internal compressor supportAlexander Kanavin
This is an extension of https://git.yoctoproject.org/poky/commit/meta/recipes-devtools/file?h=master&id=52a31bd5ba90713af82822047c3813afc31421f8 and the rationale is the same. The issue was exposed by recent ptest support in xz, which packages .lz files into the xz-ptest package which resulted in reproducibility fails: http://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20240203-fdpg888c/packages/diff-html/ Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-29file: fix call to localtime_r()Joe Slater
Depending on the version of glibc, localtime_r() must be preceded by a call to tzset() or it will ignore any value of TZ in the environment. This problem will only be seen when building file-native on outdated hosts. Signed-off-by: Joe Slater <joe.slater@windriver.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-14file: upgrade 5.44 -> 5.45Wang Mingyu
Changelog: ========== -PR/465: psrok1: Avoid muslc asctime_r crash -add SIMH tape format support -bump the max size of the elf section notes to be read to 128K and make it configurable -PR/415: Fix decompression with program returning empty -PR/408: fix -p with seccomp -PR/412: fix MinGW compilation Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-27file: fix the way path is written to environment-setup.dOleksandr Hnatiuk
$OECORE_NATIVE_SYSROOT is not escaped, thus it is expanded to an empty string. This happens to work because we have ${datadir} which in this context is relocated to the buildtools sysroot after installation of buildtools. If the $ before OECORE_NATIVE_SYSROOT is escaped, it will be saved to file.sh as intended, but MAGIC will point to the wrong location because both OECORE_NATIVE_SYSROOT and datadir resolve to sysroot which doubles the path like so: /path/to/buildtools/sysroots/x86_64-xesdk-linux/path/to/buildtools/sysroots/x86_64-xesdk-linux/usr/share/misc/magic.mgc which does not exist. So, removing reference to OECORE_NATIVE_SYSROOT. Signed-off-by: Oleksandr Hnatiuk <ohnatiuk@cisco.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-07-25file: return wrapper to fix builds when file is in buildtools-tarballOleksandr Hnatiuk
Wrapper that adds proper path to magic file was removed in 47db876d09d9a4394048579c21d0b394450ce681 in favor of environment-setup.d/file.sh which now contains `MAGIC` environment variable. This breaks builds that rely on external buildtools with `file` included in buildtools-tarball (e.g. via TOOLCHAIN_HOST_TASK) because do_populate_sysroot task invokes `file` via `subprocess.check_output` (in is_elf function) and doesn't use variables from files in environment-setup.d. To address this use case, we need to preserve the wrapper, but also have environment-setup.d/file.sh for the purposes described in 47db876d09d9a4394048579c21d0b394450ce681. Signed-off-by: Oleksandr Hnatiuk <ohnatiuk@cisco.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-03-14file: add few more PACKAGECONFIGs to avoid autodetected deps from hostMartin Jansa
* there are few more autodetected compression libs --disable-zlib disable zlib compression support [default=auto] --disable-bzlib disable bz2lib compression support [default=auto] --disable-xzlib disable liblzma/xz compression support --disable-zstdlib disable zstdlib compression support [default=auto] --disable-lzlib disable liblz (lzip) compression support and lzlib was detected on my gentoo (even when it doesn't say that default is auto detection) I've noticed this, because I've reused sstate-cache from my gentoo build in docker container with ubuntu-23.04 and esdk.oeSDKExtSelfTest.test_install_libraries_headers test was now failing with: Exception: subprocess.CalledProcessError: Command '/OE/build/poky/build/build-st-2023-03-12-esdk-patch1/esdk.oeSDKExtSelfTest.test_install_libraries_headers/build-st/tmp/work/x86_64-nativesdk-pokysdk-linux/buildtools-tarball/1.0-r0/recipe-sysroot-native/usr/bin/createrepo_c --update -q /OE/build/poky/build/build-st-2023-03-12-esdk-patch1/esdk.oeSDKExtSelfTest.test_install_libraries_headers/build-st/tmp/work/x86_64-nativesdk-pokysdk-linux/buildtools-tarball/1.0-r0/oe-sdk-repo' returned non-zero exit status 127. Subprocess output: /OE/build/poky/build/build-st-2023-03-12-esdk-patch1/esdk.oeSDKExtSelfTest.test_install_libraries_headers/build-st/tmp/work/x86_64-nativesdk-pokysdk-linux/buildtools-tarball/1.0-r0/recipe-sysroot-native/usr/bin/createrepo_c: error while loading shared libraries: liblz.so.1: cannot open shared object file: No such file or directory and liblz.so.1 ended in createrepo_c.real because of libmagic.so from file-native-replacement. * use PACKAGECONFIG for seccomp as well and keep it disabled as it was explicitly disabled before (${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)} can be added to default PACKAGECONFIG later if someone finds it useful) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-18file: export MAGIC in SDKChen Qi
Previously, a wrapper is used for file, which adds '--magic-file' option to it. But other components might use libmagic and in such case, if there's no MAGIC environent variable set correctly, things do not work. For example, rpmbuild makes use of libmagic and it requries MAGIC to be set correctly. 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>
2023-01-06file: upgrade 5.43 -> 5.44Alexander Kanavin
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>
2022-09-17file: upgrade 5.42 -> 5.43Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-06-17file: upgrade 5.41 -> 5.42wangmy
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-11-03recipes: Update github.com urls to use httpsRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-30meta: Add explict branch to git SRC_URIsRichard Purdie
There is uncertainty about the default branch name in git going forward. To try and cover the different possible outcomes, add branch names to all git:// and gitsm:// SRC_URI entries. This update was made with the script added to contrib in this patch which aims to help others convert other layers. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-27file: upgrade 5.40 -> 5.41wangmy
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-30Convert to new override syntaxRichard Purdie
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 "_". Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-18file: upgrade 5.39 -> 5.40wangmy
0001-src-compress.c-correct-header-define-for-xz-lzma.patch removed since it is included in 5.40 Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-30file: enable all built-in compression checkersAlexander Kanavin
This allows re-enabling parallel file classification in rpm in particular, as otherwise libmagic calls out to external executables, which isn't implemented in a thread-safe way. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-24file: upgrade 5.38 -> 5.39Andreas Müller
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-22file: add bzip2-replacement-native to DEPENDS to fix sstate issueJan-Simon Moeller
file-native when built on a Debian 10 host will embed a dependency to 'libbz2.so.1.0' (instead of 'libbz2.so.1'). This can cause issues when sharing the sstate between hosts e.g.: recipe-sysroot-native/usr/lib/rpm/rpmdeps: error while loading shared libraries: libbz2.so.1.0: \ cannot open shared object file: No such file or directory To avoid this situation, let's add the bzip2-replacement-native to the file recipe's DEPENDS_class-native . Details in https://bugzilla.yoctoproject.org/show_bug.cgi?id=13915 . Signed-off-by: Jan-Simon Moeller <dl9pf@gmx.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-14file: Remove unneccessary override of PACKAGECONFIG for nativePeter Kjellerstedt
There is no reason to set PACKAGECONFIG_class-native to the same value as the default PACKAGECONFIG. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-12file: add PACKAGECONFIG for auto optionsKonrad Weihmann
A few options of file configure are set to auto, which can lead to unpredictable effects when something in the sysroot does provide things that satisfy the autotools checks. In the worst case this will lead to package-qa failures as libraries are not set in RDEPENDS but configured for the tool. To mitigate changes of accidental configure set explicit options via newly introduced PACKAGECONFIG variables for bzip, lzma and zlib support, where the default is just zlib, as it was before Signed-off-by: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-30file/elfutils: Adjust some appends to guarantee leading spacerpjday@crashcourse.ca
Add missing leading spaces or replace += usage with a leading space. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-27file: upgrade 5.37 -> 5.38Wang Mingyu
CVE-2019-18218.patch Removed since it is included in 5.38. Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-11-05file: run test suite when building nativelyRoss Burton
As we apply the same patches to native and target builds of file, we can verify that the patches are not breaking by executing the test suite during the build of file-native. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-05file: remove redundant upstream check workaroundRoss Burton
This tag has been removed, so we don't need to work around it anymore. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-05file: fix CVE-2019-18218Ross Burton
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-19file: explicitly disable seccompRoss Burton
file will automatically enable seccomp if the seccomp headers are available, but the build will fail on Opensuse Tumbleweed because the include paths are wrong. Enabling seccomp is a bad idea because it interacts badly with pseudo (causing build failures), so explicitly and globally disable seccomp. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-15file: Clarify BSD license variantChristophe PRIOUZEAU
The license of file is BSD-2-Clause. Signed-off-by: Christophe Priouzeau <christophe.priouzeau@st.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-29file: update to 5.37Oleksandr Kravchuk
Signed-off-by: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-08file: Stop adding -std=c99 to CFLAGSAdrian Bunk
Upstream now adds this automatically when required. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-05file: upgrade to 5.36Ross Burton
Upgrade to 5.36. Drop debian-742262.patch, this appears to have been fixed properly upstream some releases ago. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-11file: upgrade 5.34 -> 5.35Yi Zhao
License-Update: remove trailing whitespace from COPYING Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-18file: alternatify fileDan McGregor
file is also provided by toybox. Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-08file: Update to 5.34Khem Raj
Distros which have glibc 2.28 on them otherwsise fail to build due to some syscall mismatches Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-18file: fix regression for determining DB file typeYi Zhao
The version 5.33 introduced a regression bug for determining the DB file type. Backport a patch from upstream to fix it. Before apply the patch: $ file aliases.db aliases.db: created: Thu Jan 1 00:38:24 1970, modified: Thu Jan 1 00:00:00 1970 After apply the patch: $ file aliases.db aliases.db: Berkeley DB (Btree, version 9, native byte-order) Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-13file: Security fix CVE-2018-10360Yi Zhao
CVE-2018-10360: The do_core_note function in readelf.c in libmagic.a in file 5.33 allows remote attackers to cause a denial of service (out-of-bounds read and application crash) via a crafted ELF file. References: https://nvd.nist.gov/vuln/detail/CVE-2018-10360 Patch from: https://github.com/file/file/commit/a642587a9c9e2dd7feacdf513c3643ce26ad3c22 Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-06-28file: update to 5.33Yi Zhao
Drop 0001-Add-P-prompt-into-Usage-info.patch since it is already fixed upstream. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-21file: 5.31 -> 5.32Robert Yang
Rebase debian-742262.patch for new source. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-06-28file: 5.30 -> 5.31Fan Xin
1. Upgrade file from 5.30 to 5.31 2. Rebase the following patch file. debian-742262.patch Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-21Revert "file: update SRCREV for 5.30 to fix fetch fail on missing commit"Richard Purdie
This reverts commit adb71e06768adadda7b69c3b5e81ca3ad67237f4. Upstream restored the original hashes.
2017-03-17file: update SRCREV for 5.30 to fix fetch fail on missing commitPaul Gortmaker
Machines that cloned a while ago will have the commit, but new deployments won't because it seems the upstream changed/rebased and the old commit ID has been garbage-collected away. Hence the fetch fails to check out the named commit ID. Both the old (gone) commit, and the "new" commit show the same dates and commit log and point at 5.30, so hopefully this is the right thing to do. A git diff of the two seems to only show a blanket uprev of CVS tags and deletion of a couple autogen'd files, and no real source changes. Cc: Christos Zoulas <christos@zoulas.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01file: 5.29 -> 5.30Robert Yang
Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-22file: 5.28 -> 5.29Huang Qiyu
Upgrade file from 5.28 to 5.29. Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-08file: build with c std as c99Jack Mitchell
when using a toolchain not shipped by OE core such as linaro we can't be sure what the std will be set to. Set to compile as c99 which is the lowest version supported. Signed-off-by: Jack Mitchell <jack@embed.me.uk> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-12file: 5.27 -> 5.28Robert Yang
Remove host-file.patch which is already in the source. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-06-14file: 5.25 -> 5.27Robert Yang
Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-13file: 5.24 -> 5.25Robert Yang
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2015-12-08package_regex.inc: split GITTAGREGEX entries into recipe filesAlexander Kanavin
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-10-24file: don't replace host file when built nativelyRoss Burton
To avoid races over the file binaries being replaced mid-build we made file-native an assume-provided binary and check for it at startup, but target file still needs a native file binary of the same version to compile the magic data. The least invasive way of doing this is to build a native file don't put it on PATH, and tell the target build where to find the native binary. We do however want the native libmagic to be installed normally (as for example rpm and subversion need it) so we can't use NATIVE_PACKAGE_PATH_SUFFIX as that change libdir. [ YOCTO #8144 ] Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-09file: 5.23 -> 5.24Robert Yang
* Remove backported patch: - 0001-Fix-bug-with-long-options-and-explicitly-number-them.patch \ - 0002-fix-bug-with-5.23-long-options.patch \ * Use git repo rather than tarball since the original SRC_URI is not stable, it is not reachable sometimes. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2015-07-07file: fix long-optionsRobert Yang
Backport two patches to fix bug with long options: * 0001-Fix-bug-with-long-options-and-explicitly-number-them.patch * 0002-fix-bug-with-5.23-long-options.patch Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>