summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* linux-info.eclass: Drop reference to BUILD_FIXES variableUlrich Müller2024-07-081-2/+1
| | | | | | Undocumented, and not used by any ebuilds inheriting this eclass. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* linux-info.eclass: Drop support for EAPI 6Ulrich Müller2024-07-081-12/+8
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* linux-info.eclass: Drop temporary fix for powerpcUlrich Müller2024-07-081-6/+0
| | | | | | | | Apparently there is no reference to a .tmp_gas_check file or to a TOUT variable in Linux sources any more. Bug: https://bugs.gentoo.org/75034#c14 Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* linux-info.eclass: respect eselect kernel setting in binpkgsAndrew Ammerlaan2024-05-171-3/+11
| | | | | | | | | | | | | | | | | | Commit f51cd5b64c14ddfb83488a12d538c66a4a309376 resets kernel environment variables when binpkgs are merged, this makes sense since we care about the system that the binpkg will be installed on, not the system the binpkg was built on. This introduced Bug 931213 as a side-effect, which will be fixed in a separate commit to linux-mod-r1.eclass. In preparation of that, we document and rename the LINUX_INFO_BINARY_RESET to SKIP_KERNEL_BINPKG_ENV_RESET. However, commit f51cd5b64c14ddfb83488a12d538c66a4a309376 also makes binpkgs always use the running kernel version. This behaviour is surprising and confusing. In principle the 'eselect kernel' setting should still be respected when binpkgs are used. Bug: https://bugs.gentoo.org/926063 Bug: https://bugs.gentoo.org/931213 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
* linux-info.eclass: improve binpkg handlingMike Gilbert2024-03-111-5/+11
| | | | | | | | | | | | | | | | When installing a binpkg, Portage will restore the ebuild environment from when the binpkg was built. The stored values for KV_* may be different from the values that would be detected on the current system. To work around this, unset some key variables in linux-info_get_any_version when MERGE_TYPE == binary. Also, only look for the running kernel version: we can't possibly need a full kernel source tree when installing a package that has already been compiled. This gives a nice speedup as well. Closes: https://bugs.gentoo.org/926063 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* linux-info.eclass: fix @AUTHOR eclassdocSam James2023-03-291-1/+1
| | | | | | | This breaks our brittle eclass2manpages script for now. Fixes: 8435a16eb3e375dfe0a37f076eb6a1ebfed0a55b Signed-off-by: Sam James <sam@gentoo.org>
* linux-info.eclass: fix spellingSam James2023-03-261-3/+3
| | | | | | | Thanks to codespell. Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* linux-info.eclass: Quote argument of ":" commandUlrich Müller2023-03-261-4/+4
| | | | | | This avoids globbing, see: https://www.shellcheck.net/wiki/SC2223 Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* linux-info.eclass: remove EAPI 0-5David Seifert2023-03-171-5/+15
| | | | Signed-off-by: David Seifert <soap@gentoo.org>
* linux-info.eclass: Chk for existance of .config/config.gz when opts reqMike Pagano2023-01-161-2/+8
| | | | | | | | | In the instance where CONFIG_* settings are required and not optional, make sure there is either a .config or a config.gz to check Closes: https://bugs.gentoo.org/890720 Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* linux-info.eclass: use consistent styleSam James2022-12-271-76/+66
| | | | | | | | | - Use Bash tests (i.e. [[ ]] instead of [ ]) - Use consistent newlines for if/while - Drop unnecessary ; line terminators Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: David Seifert <soap@gentoo.org>
* linux-info.eclass: getfilevar: pass 'need-compiler=' to makeMike Gilbert2022-12-021-1/+3
| | | | | | | | | This avoids some unnecessary Makefile logic and gives a nice speed up. Before the change, linux-info_pkg_setup takes 11 to 15 seconds on my AMD Phenom II. After, it takes 3 to 4 seconds. Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* linux-info.eclass: Add SKIP_KERNEL_CHECK in addl funcs to support tinderboxMike Pagano2022-09-041-0/+5
| | | | Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* linux-info.eclass: Var to not check for running kern ver or installled verMike Pagano2022-08-141-0/+18
| | | | | | | This change was requested to have the ability to not check for either a running or installed kernel Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* linux-info: Remove deprecated eclass func after warning period expirationMike Pagano2022-08-071-15/+0
| | | | | | Bug: https://bugs.gentoo.org/843686 Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* linux-info.eclass: Provide ability to skip CONFIG_* checksMike Pagano2022-08-071-1/+10
| | | | | | | | | Provide support for users who requested the ability to skip CONFIG_* checks. (e.g. from within a chroot for testing purposes) Closes: https://bugs.gentoo.org/862315 Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* linux-info.eclass: Documentation updatesMike Pagano2022-05-161-5/+30
| | | | Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* inux-info.eclass: Remove local function.Calling code removed on Aug 3,2010Mike Pagano2022-05-131-20/+0
| | | | | | | | | | This function was only called locally and the last use was almost 12 years ago See: https://gitlab.com/rindeal/gentoo-cvs-history-archive/-/commit/1715ad cd9e404075340e5a5ed82f88928feeffd9 Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* linux-info.eclass: Fix func name to comply with pms, dep old with deadlineMike Pagano2022-05-121-1/+17
| | | | | | | | | | | According to PMS certain words are reserved for package manager use and may not be used or relied upon by ebuilds. See: https://projects.gentoo.org/pms/8/pms.html#x1-13700012.3.17 Closes: https://bugs.gentoo.org/843686 Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* linux-info.eclass: Call ebegin, properly close with eendThomas Bracht Laumann Jespersen2022-04-151-1/+3
| | | | | | | | | | | | | | | | | A recent QA check added to portage informs of eend being called without a preceding call to ebegin. This warning was emitted during pkg_setup for net-vpn/openvpn, and was traced back to the check_extra_config() function in linux-info.eclass. The preference is here to call ebegin (instead of dropping the lone eend) and in each of the possible exit branches for check_extra_config() call eend appropriately. Reported-by: Sam James <sam@gentoo.org> Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz> Closes: https://github.com/gentoo/gentoo/pull/25019 Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* *.eclass: @ECLASS-VARIABLE renamed to @ECLASS_VARIABLEUlrich Müller2022-03-241-14/+14
| | | | | Bug: https://bugs.gentoo.org/835396 Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* linux-info.eclass: drop unnecessary IUSE="kernel_linux"Sam James2022-01-041-3/+1
| | | | | | It's already an implicit IUSE, so we don't need this. Signed-off-by: Sam James <sam@gentoo.org>
* linux-info.eclass: add --no-print-directory to emakeMike Pagano2021-10-181-1/+1
| | | | | | | | | | | | | | Thanks to Jocelyn Mayer for the report and the patch. When MAKEOPTS contains '-w' or '--print-directory', getfilevar echoed value contains make: Entering directory 'xxx' and make: Leaving directory 'xxx' which result in a wrong multiline version string thus making kernel versions comparisons always fail. Closes: https://bugs.gentoo.org/816888 Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* linux-info.eclass: getfilevar: pass dot-config=0 to makeMike Gilbert2021-09-141-1/+2
| | | | | | | This disables the kernel config check for versions prior to 5.4. Closes: https://bugs.gentoo.org/811726 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* linux-info.eclass: rework get_running_versionMike Gilbert2021-09-141-27/+20
| | | | | | | | | | | | | | This function may fail if the version cannot be parsed from a Makefile found by following the /lib/modules/${KV_FULL}/{source,build} symlinks. Instead of failing, we should just split KV_FULL as a fallback. Also, simplify the existance checks for the kernel Makefile; if we can't find the kernel source directory, there is really no point in checking for the kernel build directory. The latter will probably contain a Makefile with no version information. Bug: https://bugs.gentoo.org/811726 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* linux-info.eclass : Remove log references to linux 2.4 and gcc 4Mike Pagano2021-09-081-15/+0
| | | | Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* linux-info.eclass: getfilevar: pass need-config= to makeMike Gilbert2021-09-061-1/+2
| | | | | | | This bypasses the config check in the kernel Makefile. Closes: https://bugs.gentoo.org/811726 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* linux-info.eclass: Properly return when makefile foundMike Pagano2021-09-041-3/+3
| | | | Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* Thanks to Sam, mgorny and Ulm for the review.Mike Pagano2021-09-041-4/+26
| | | | | | | | | | | | | | | Support the possibility that the Makefile could be one of the following and should be checked in the order described here: https://www.gnu.org/software/make/manual/make.html Order of checking and valid Makefiles names: GNUMakefile, makefile, Makefile Closes: https://bugs.gentoo.org/663368 Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* linux-info.eclass: Support Makefiles that set vars to a non-static valueMike Pagano2021-09-021-8/+5
| | | | | | | | | | Previously, the Makefile had to define version variables be a string literal. This change will support both methods. Closes: https://bugs.gentoo.org/490328 Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* linux-info.eclass: Replace bit-shift arithmetic by ver_testUlrich Müller2021-08-301-4/+5
| | | | | | | There are kernel versions like 4.9.280, therefore shifting version components by 8 bits in kernel_is() may fail. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Revert "linux-info.eclass: Replace bit-shift arithmetic by ver_test"Ulrich Müller2021-08-271-5/+4
| | | | | | This reverts commit 4b48b038fa23b5580fa2b916b34c646c155db93a. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* linux-info.eclass: Replace bit-shift arithmetic by ver_testUlrich Müller2021-08-271-4/+5
| | | | | | | | There are kernel versions like 4.9.280, therefore shifting version components by 8 bits in kernel_is() may fail. Reviewed-by: Alice Ferrazzi <alicef@gentoo.org> Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Linux-info.eclass : Fix typo in commentMike Pagano2021-08-271-1/+1
| | | | | | Closes: https://bugs.gentoo.org/669026 Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* eclass/linux-info: Properly document CONFIG_CHECK and ERROR_<CFG>Mike Pagano2021-06-181-1/+6
| | | | | | Closes: https://bugs.gentoo.org/409207 Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* eclass/linux-info: eclassdoc fixes. Mark variables correctlyMike Pagano2021-06-181-8/+8
| | | | Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* eclass/linux-info: eclassdoc fixesMike Pagano2021-06-181-5/+12
| | | | | | Closes: https://bugs.gentoo.org/637780 Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* linux-info.eclass: fix grammar in elogSam James2021-03-311-3/+3
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* linux-info.eclass: Pass M=${T} to the Linux Makefile unconditionally.Ulrich Müller2020-06-261-6/+3
| | | | | | | | | | | | Using M="${S}" breaks in the pkg_setup phase where the S variable is not valid. Previous commit messages don't give any rationale why some phases would need the dir pointing to ${S}. Therefore, use ${T} in all phases unconditionally. Closes: https://bugs.gentoo.org/729178 Bug: https://bugs.gentoo.org/469210 Acked-by: Thomas Deutschmann <whissi@gentoo.org> Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* linux-info.eclass: avoid lexicographical compare on numbers, bug #705248Sergei Trofimovich2020-05-231-3/+3
| | | | | | | | | | | | | | | | | Originally found in bug #705240 as: ``` error=0 ... if [[ ${error} > 0 ]]; then ... ``` '>' are string comparisons. They are benign in this case, but let's be consistent and use integer comparison. Closes: https://bugs.gentoo.org/705248 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* linux-info.eclass: minor @USAGE syntax fixesBen Kohler2020-03-311-7/+7
| | | | | | Use the recommended <required args> [optional args] syntax Signed-off-by: Ben Kohler <bkohler@gentoo.org>
* linux-info.eclass: CONFIG_LOCALVERSION for out of source buildsFrancesco Riosa2018-10-021-13/+13
| | | | | Closes: https://bugs.gentoo.org/662772 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* linux-info.eclass: respect kernel CONFIG_LOCALVERSIONDmitry Derevyanko2018-07-301-25/+25
| | | | | Closes: https://bugs.gentoo.org/460996 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* linux-info.eclass: fix for prematurely merged patchMarty E. Plummer2018-07-171-1/+1
| | | | | | https://github.com/gentoo/gentoo/pull/9222 was merged prematurely, and included the first iteration of my linux-info EAPI 7 patch, and requires this patch on top to avoid a double slash.
* linux-info.eclass: account for lack of trailing slashMarty E. Plummer2018-07-171-9/+9
| | | | | | | | | | | In EAPI 7, D, ED, ROOT, EROOT no longer have a trailing slash[1]. This makes finding /usr/src/linux not work properly as it currently stands. Use the form "${ROOT%/}/" where apropos in order to unify behavior across EAPIs. 1: https://dev.gentoo.org/~ulm/pms/head/pms.html#x1-113001r7 Closes: https://github.com/gentoo/gentoo/pull/9222
* linux-info.eclass: use eapi7-verMarty E. Plummer2018-07-141-4/+5
| | | | | | | versionator is banned in EAPI 7, so switch to either native EAPI 7 version functions or inherit eapi7-ver on EAPI 0-6. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* linux-info.eclass: Skip linux_config_*_exists on non-LinuxMichał Górny2018-07-091-2/+2
| | | | | | The linux_config_src_exists and linux_config_bin_exists always return false on non-Linux systems by design. Short-circuit it via 'kernel_linux' check.
* linux-info.eclass: Die in most of public-ish APIs on non-LinuxMichał Górny2018-07-091-0/+36
| | | | | | | | | Add appropriate 'die' calls in most of the seemingly public APIs of the eclass that could be called by ebuilds and that are going to fail horribly when used on non-Linux systems. This means that e.g. 'kernel_is' calls need to be explicitly guarded in ebuilds, as we can't really reasonably return 'true' or 'false' if there is no Linux kernel in the first place.
* linux-info.eclass: Ignore check_extra_config on non-LinuxMichał Górny2018-07-091-1/+7
| | | | | | | | | | Make the check_extra_config and pkg_setup calls no-op on non-Linux systems. Those systems don't have a Linux kernel, so they obviously can't satisfy the requirements. This currently results in a lot of useless warnings about missing Linux kernel sources on FreeBSD. We could make it conditional per-package but there is really no point in adding a lot of conditionals everywhere if this eclass can't ever work on non-Linux.
* linux-info.eclass: require_configured_kernel, improve error handlingMichał Górny2018-07-091-1/+1
| | | | | | Add error handling for failing get_version call in require_configured_kernel. Give just a simple 'die' message since the get_version function should verbosely explain the problem.