From ca04ebdb7314ef69eddb1497f6b2cd64ae0869ee Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Sep 2021 16:56:00 +0200 Subject: [PATCH 1/4] eclass/kernel-2: Sync with gentoo --- .../portage-stable/eclass/kernel-2.eclass | 618 +++++++----------- 1 file changed, 222 insertions(+), 396 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/kernel-2.eclass b/sdk_container/src/third_party/portage-stable/eclass/kernel-2.eclass index db7e6a7246..adc1425bc2 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/kernel-2.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/kernel-2.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: kernel-2.eclass @@ -8,7 +8,7 @@ # John Mylchreest # Mike Pagano # -# @SUPPORTED_EAPIS: 2 3 4 5 6 +# @SUPPORTED_EAPIS: 6 7 8 # @BLURB: Eclass for kernel packages # @DESCRIPTION: # This is the kernel.eclass rewrite for a clean base regarding the 2.6 @@ -25,6 +25,13 @@ # this is useful for things like wolk. IE: # EXTRAVERSION would be something like : -wolk-4.19-r1 +# @ECLASS-VARIABLE: K_NODRYRUN +# @DEFAULT_UNSET +# @DESCRIPTION: +# if this is set then patch --dry-run will not +# be run. Certain patches will fail with this parameter +# See bug #507656 + # @ECLASS-VARIABLE: K_NOSETEXTRAVERSION # @DEFAULT_UNSET # @DESCRIPTION: @@ -46,10 +53,10 @@ # @ECLASS-VARIABLE: K_PREPATCHED # @DEFAULT_UNSET # @DESCRIPTION: -# if the patchset is prepatched (ie: mm-sources, -# ck-sources, ac-sources) it will use PR (ie: -r5) as -# the patchset version for -# and not use it as a true package revision +# if the patchset is prepatched (ie: pf-sources, +# zen-sources etc) it will use PR (ie: -r5) as the +# patchset version for and not use it as a true package +# revision # @ECLASS-VARIABLE: K_EXTRAEINFO # @DEFAULT_UNSET @@ -191,36 +198,27 @@ # If you do change them, there is a chance that we will not fix resulting bugs; # that of course does not mean we're not willing to help. -PYTHON_COMPAT=( python{2_6,2_7} ) +inherit estack toolchain-funcs +[[ ${EAPI} == 6 ]] && inherit eapi7-ver -inherit toolchain-funcs python-any-r1 -[[ ${EAPI:-0} == [012345] ]] && inherit epatch -[[ ${EAPI:-0} == [0123456] ]] && inherit estack eapi7-ver -case ${EAPI:-0} in - 2|3|4|5|6) - EXPORT_FUNCTIONS src_{unpack,prepare,compile,install,test} \ - pkg_{setup,preinst,postinst,postrm} ;; - *) die "${ECLASS}: EAPI ${EAPI} not supported" ;; +case ${EAPI} in + 6|7|8) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac # Added by Daniel Ostrow # This is an ugly hack to get around an issue with a 32-bit userland on ppc64. # I will remove it when I come up with something more reasonable. -[[ ${PROFILE_ARCH} == "ppc64" ]] && CHOST="powerpc64-${CHOST#*-}" +[[ ${PROFILE_ARCH} == ppc64 ]] && CHOST="powerpc64-${CHOST#*-}" export CTARGET=${CTARGET:-${CHOST}} if [[ ${CTARGET} == ${CHOST} && ${CATEGORY/cross-} != ${CATEGORY} ]]; then export CTARGET=${CATEGORY/cross-} fi -HOMEPAGE="https://www.kernel.org/ https://www.gentoo.org/ ${HOMEPAGE}" +HOMEPAGE="https://www.kernel.org/ https://wiki.gentoo.org/wiki/Kernel ${HOMEPAGE}" : ${LICENSE:="GPL-2"} -# This is the latest KV_PATCH of the deblob tool available from the -# libre-sources upstream. If you bump this, you MUST regenerate the Manifests -# for ALL kernel-2 consumer packages where deblob is available. -: ${DEBLOB_MAX_VERSION:=38} - # No need to run scanelf/strip on kernel sources/headers (bug #134453). RESTRICT="binchecks strip" @@ -285,19 +283,19 @@ handle_genpatches() { local use_cond_start="" use_cond_end="" - if [[ "${i}" == "experimental" && -z ${K_EXP_GENPATCHES_PULL} && -z ${K_EXP_GENPATCHES_NOUSE} ]] ; then + if [[ ${i} == experimental && -z ${K_EXP_GENPATCHES_PULL} && -z ${K_EXP_GENPATCHES_NOUSE} ]]; then use_cond_start="experimental? ( " use_cond_end=" )" - if [[ -n ${want_unipatch_list} ]] && use experimental ; then + if [[ -n ${want_unipatch_list} ]] && use experimental; then UNIPATCH_LIST_GENPATCHES+=" ${DISTDIR}/${tarball}" - debug-print "genpatches tarball: $tarball" + debug-print "genpatches tarball: ${tarball}" fi elif [[ -n ${want_unipatch_list} ]]; then UNIPATCH_LIST_GENPATCHES+=" ${DISTDIR}/${tarball}" - debug-print "genpatches tarball: $tarball" + debug-print "genpatches tarball: ${tarball}" fi - GENPATCHES_URI+=" ${use_cond_start}mirror://gentoo/${tarball}${use_cond_end}" + GENPATCHES_URI+=" ${use_cond_start}$(echo https://dev.gentoo.org/~{alicef,mpagano,whissi}/dist/genpatches/${tarball})${use_cond_end}" done } @@ -309,7 +307,6 @@ handle_genpatches() { # - KV: Kernel Version (2.6.0-gentoo/2.6.0-test11-gentoo-r1) # - EXTRAVERSION: The additional version appended to OKV (-gentoo/-gentoo-r1) detect_version() { - # We've already run, so nothing to do here. [[ -n ${KV_FULL} ]] && return 0 @@ -362,7 +359,7 @@ detect_version() { done fi - [[ $n -eq 1 ]] && \ + [[ ${n} -eq 1 ]] && \ eerror "Missing variables: ${missing}" && \ die "Failed to extract kernel version (try explicit CKV in ebuild)!" unset v n missing @@ -375,7 +372,7 @@ detect_version() { # 3.x directory, may need to revisit when 4.x is released KERNEL_BASE_URI="https://www.kernel.org/pub/linux/kernel/v${KV_MAJOR}.x" - [[ -n "${K_LONGTERM}" ]] && + [[ -n ${K_LONGTERM} ]] && KERNEL_BASE_URI="${KERNEL_BASE_URI}/longterm/v${KV_MAJOR}.${KV_PATCH_ARR}" else #KERNEL_BASE_URI="https://www.kernel.org/pub/linux/kernel/v${KV_MAJOR}.0" @@ -386,14 +383,14 @@ detect_version() { KERNEL_BASE_URI="https://www.kernel.org/pub/linux/kernel/v${KV_MAJOR}.${KV_MINOR}" fi - [[ -n "${K_LONGTERM}" ]] && + [[ -n ${K_LONGTERM} ]] && #KERNEL_BASE_URI="${KERNEL_BASE_URI}/longterm" KERNEL_BASE_URI="${KERNEL_BASE_URI}/longterm/v${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" fi debug-print "KERNEL_BASE_URI is ${KERNEL_BASE_URI}" - if [[ ${#OKV_ARRAY[@]} -ge 3 ]] && [[ ${KV_MAJOR} -ge 3 ]]; then + if [[ ${#OKV_ARRAY[@]} -ge 3 && ${KV_MAJOR} -ge 3 ]]; then # handle non genpatch using sources correctly if [[ -z ${K_WANT_GENPATCHES} && -z ${K_GENPATCHES_VER} && ${KV_PATCH} -gt 0 ]]; then KERNEL_URI="${KERNEL_BASE_URI}/patch-${OKV}.xz" @@ -411,7 +408,7 @@ detect_version() { # We cannot trivally call kernel_is here, because it calls us to detect the # version #kernel_is ge 2 6 && RELEASE=${RELEASE/-pre/-git} - [ $(($KV_MAJOR * 1000 + ${KV_MINOR:-0})) -ge 2006 ] && RELEASE=${RELEASE/-pre/-git} + (( KV_MAJOR * 1000 + ${KV_MINOR:-0} >= 2006 )) && RELEASE=${RELEASE/-pre/-git} RELEASETYPE=${RELEASE//[0-9]} # Now we know that RELEASE is the -rc/-git @@ -420,16 +417,16 @@ detect_version() { # first of all, we add the release EXTRAVERSION="${RELEASE}" debug-print "0 EXTRAVERSION:${EXTRAVERSION}" - [[ -n ${KV_EXTRA} ]] && [[ ${KV_MAJOR} -lt 3 ]] && EXTRAVERSION=".${KV_EXTRA}${EXTRAVERSION}" + [[ -n ${KV_EXTRA} && ${KV_MAJOR} -lt 3 ]] && EXTRAVERSION=".${KV_EXTRA}${EXTRAVERSION}" debug-print "1 EXTRAVERSION:${EXTRAVERSION}" - if [[ -n "${K_NOUSEPR}" ]]; then + if [[ -n ${K_NOUSEPR} ]]; then # Don't add anything based on PR to EXTRAVERSION debug-print "1.0 EXTRAVERSION:${EXTRAVERSION}" elif [[ -n ${K_PREPATCHED} ]]; then debug-print "1.1 EXTRAVERSION:${EXTRAVERSION}" EXTRAVERSION="${EXTRAVERSION}-${PN/-*}${PR/r}" - elif [[ "${ETYPE}" = "sources" ]]; then + elif [[ ${ETYPE} = sources ]]; then debug-print "1.2 EXTRAVERSION:${EXTRAVERSION}" # For some sources we want to use the PV in the extra version # This is because upstream releases with a completely different @@ -439,9 +436,9 @@ detect_version() { vserver) K_USEPV=1;; esac - [[ -z "${K_NOUSENAME}" ]] && EXTRAVERSION="${EXTRAVERSION}-${PN/-*}" - [[ -n "${K_USEPV}" ]] && EXTRAVERSION="${EXTRAVERSION}-${PV//_/-}" - [[ -n "${PR//r0}" ]] && EXTRAVERSION="${EXTRAVERSION}-${PR}" + [[ -z ${K_NOUSENAME} ]] && EXTRAVERSION="${EXTRAVERSION}-${PN/-*}" + [[ -n ${K_USEPV} ]] && EXTRAVERSION="${EXTRAVERSION}-${PV//_/-}" + [[ -n ${PR//r0} ]] && EXTRAVERSION="${EXTRAVERSION}-${PR}" fi debug-print "2 EXTRAVERSION:${EXTRAVERSION}" @@ -476,7 +473,7 @@ detect_version() { if [[ ${KV_MAJOR}${KV_MINOR} -eq 26 ]]; then - if [[ ${RELEASETYPE} == -rc ]] || [[ ${RELEASETYPE} == -pre ]]; then + if [[ ${RELEASETYPE} == -rc || ${RELEASETYPE} == -pre ]]; then OKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_PATCH} - 1))" KERNEL_URI="${KERNEL_BASE_URI}/testing/patch-${CKV//_/-}.xz ${KERNEL_BASE_URI}/linux-${OKV}.tar.xz" @@ -503,9 +500,9 @@ detect_version() { # the different majorminor versions have different patch start versions OKV_DICT=(["2"]="${KV_MAJOR}.$((${KV_PATCH_ARR} - 1))" ["3"]="2.6.39" ["4"]="3.19") - if [[ ${RELEASETYPE} == -rc ]] || [[ ${RELEASETYPE} == -pre ]]; then + if [[ ${RELEASETYPE} == -rc || ${RELEASETYPE} == -pre ]]; then - OKV=${K_BASE_VER:-$OKV_DICT["${KV_MAJOR}"]} + OKV=${K_BASE_VER:-${OKV_DICT["${KV_MAJOR}"]}} # as of 12/5/2017, the rc patch is no longer offered as a compressed # file, and no longer is it mirrored on kernel.org @@ -527,15 +524,13 @@ detect_version() { fi if [[ ${RELEASETYPE} == -rc-git ]]; then - OKV=${K_BASE_VER:-$OKV_DICT["${KV_MAJOR}"]} + OKV=${K_BASE_VER:-${OKV_DICT["${KV_MAJOR}"]}} KERNEL_URI="${KERNEL_BASE_URI}/snapshots/patch-${KV_MAJOR}.${KV_PATCH}${RELEASE}.xz ${KERNEL_BASE_URI}/testing/patch-${KV_MAJOR}.${KV_PATCH}${RELEASE/-git*}.xz ${KERNEL_BASE_URI}/linux-${OKV}.tar.xz" UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${KV_MAJOR}.${KV_PATCH}${RELEASE/-git*}.xz ${DISTDIR}/patch-${KV_MAJOR}.${KV_PATCH}${RELEASE}.xz" fi - - fi debug-print-kernel2-variables @@ -556,11 +551,10 @@ kernel_is() { # some of the sources have in the past had only one set. local v n=0 for v in OKV KV_{MAJOR,MINOR,PATCH} ; do [[ -z ${!v} ]] && n=1 ; done - [[ $n -eq 1 ]] && detect_version - unset v n + [[ ${n} -eq 1 ]] && detect_version # Now we can continue - local operator test value + local operator case ${1#-} in lt) operator="-lt"; shift;; @@ -572,34 +566,18 @@ kernel_is() { esac [[ $# -gt 3 ]] && die "Error in kernel-2_kernel_is(): too many parameters" - : $(( test = (KV_MAJOR << 16) + (KV_MINOR << 8) + KV_PATCH )) - : $(( value = (${1:-${KV_MAJOR}} << 16) + (${2:-${KV_MINOR}} << 8) + ${3:-${KV_PATCH}} )) - [ ${test} ${operator} ${value} ] -} - -# @FUNCTION: kernel_is_2_4 -# @USAGE: -# @DESCRIPTION: -# return true if kernel is version 2.4 -kernel_is_2_4() { - kernel_is 2 4 -} - -# @FUNCTION: kernel_is_2_6 -# @USAGE: -# @DESCRIPTION: -# return true if kernel is version 2.6 -kernel_is_2_6() { - kernel_is 2 6 || kernel_is 2 5 + ver_test \ + "${KV_MAJOR:-0}.${KV_MINOR:-0}.${KV_PATCH:-0}" \ + "${operator}" \ + "${1:-${KV_MAJOR:-0}}.${2:-${KV_MINOR:-0}}.${3:-${KV_PATCH:-0}}" } # Capture the sources type and set DEPENDs if [[ ${ETYPE} == sources ]]; then - DEPEND="!build? ( - sys-apps/sed - >=sys-devel/binutils-2.11.90.0.31 - )" + [[ ${EAPI} == 6 ]] && DEPEND="!build? ( sys-apps/sed )" || + BDEPEND="!build? ( sys-apps/sed )" RDEPEND="!build? ( + app-arch/cpio dev-lang/perl sys-devel/bc sys-devel/bison @@ -607,6 +585,7 @@ if [[ ${ETYPE} == sources ]]; then sys-devel/make >=sys-libs/ncurses-5.2 virtual/libelf + virtual/pkgconfig )" SLOT="${PVR}" @@ -614,13 +593,16 @@ if [[ ${ETYPE} == sources ]]; then IUSE="symlink build" # Bug #266157, deblob for libre support - if [[ -z ${K_PREDEBLOBBED} ]] ; then - # Bug #359865, force a call to detect_version if needed - kernel_is ge 2 6 27 && \ - [[ -z "${K_DEBLOB_AVAILABLE}" ]] && \ - kernel_is le 2 6 ${DEBLOB_MAX_VERSION} && \ - K_DEBLOB_AVAILABLE=1 - if [[ ${K_DEBLOB_AVAILABLE} == "1" ]] ; then + if [[ -z ${K_PREDEBLOBBED} ]]; then + # deblob less than 5.10 require python 2.7 + if kernel_is lt 5 10; then + K_DEBLOB_AVAILABLE=0 + fi + if [[ ${K_DEBLOB_AVAILABLE} == 1 ]]; then + PYTHON_COMPAT=( python3_{8..10} ) + + inherit python-any-r1 + IUSE="${IUSE} deblob" # Reflect that kernels contain firmware blobs unless otherwise @@ -628,7 +610,7 @@ if [[ ${ETYPE} == sources ]]; then # tree has been dropped from the kernel. kernel_is lt 4 14 && LICENSE+=" !deblob? ( linux-firmware )" - DEPEND+=" deblob? ( ${PYTHON_DEPS} )" + BDEPEND+=" deblob? ( ${PYTHON_DEPS} )" if [[ -n KV_MINOR ]]; then DEBLOB_PV="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" @@ -656,8 +638,8 @@ if [[ ${ETYPE} == sources ]]; then ${DEBLOB_CHECK_URI} )" elif kernel_is lt 4 14; then - # We have no way to deblob older kernels, so just mark them as - # tainted with non-libre materials. + # Deblobbing is not available, so just mark kernels older + # than 4.14 as tainted with non-libre materials. LICENSE+=" linux-firmware" fi fi @@ -705,53 +687,15 @@ env_setup_xmakeopts() { # When cross-compiling, we need to set the ARCH/CROSS_COMPILE # variables properly or bad things happen ! xmakeopts="ARCH=${KARCH}" - if [[ ${CTARGET} != ${CHOST} ]] && ! cross_pre_c_headers ; then + if [[ ${CTARGET} != ${CHOST} ]] && ! cross_pre_c_headers; then xmakeopts="${xmakeopts} CROSS_COMPILE=${CTARGET}-" - elif type -p ${CHOST}-ar > /dev/null ; then + elif type -p ${CHOST}-ar >/dev/null; then xmakeopts="${xmakeopts} CROSS_COMPILE=${CHOST}-" fi + xmakeopts="${xmakeopts} HOSTCC=$(tc-getBUILD_CC)" export xmakeopts } -# @FUNCTION: unpack_2_4 -# @USAGE: -# @DESCRIPTION: -# unpack and generate .config for 2.4 kernels - -unpack_2_4() { - # this file is required for other things to build properly, - # so we autogenerate it - make -s mrproper ${xmakeopts} || die "make mrproper failed" - make -s symlinks ${xmakeopts} || die "make symlinks failed" - make -s include/linux/version.h ${xmakeopts} || die "make include/linux/version.h failed" - echo ">>> version.h compiled successfully." -} - -# @FUNCTION: unpack_2_6 -# @USAGE: -# @DESCRIPTION: -# unpack and generate .config for 2.6 kernels - -unpack_2_6() { - # this file is required for other things to build properly, so we - # autogenerate it ... generate a .config to keep version.h build from - # spitting out an annoying warning - make -s mrproper ${xmakeopts} 2>/dev/null \ - || die "make mrproper failed" - - # quick fix for bug #132152 which triggers when it cannot include linux - # headers (ie, we have not installed it yet) - if ! make -s defconfig ${xmakeopts} &>/dev/null 2>&1 ; then - touch .config - eerror "make defconfig failed." - eerror "assuming you dont have any headers installed yet and continuing" - fi - - make -s include/linux/version.h ${xmakeopts} 2>/dev/null \ - || die "make include/linux/version.h failed" - rm -f .config >/dev/null -} - # @FUNCTION: universal_unpack # @USAGE: # @DESCRIPTION: @@ -763,20 +707,20 @@ universal_unpack() { local OKV_ARRAY IFS="." read -r -a OKV_ARRAY <<<"${OKV}" - cd "${WORKDIR}" - if [[ ${#OKV_ARRAY[@]} -ge 3 ]] && [[ ${KV_MAJOR} -ge 3 ]]; then + cd "${WORKDIR}" || die + if [[ ${#OKV_ARRAY[@]} -ge 3 && ${KV_MAJOR} -ge 3 ]]; then unpack linux-${KV_MAJOR}.${KV_MINOR}.tar.xz else unpack linux-${OKV}.tar.xz fi - if [[ -d "linux" ]]; then + if [[ -d linux ]]; then debug-print "Moving linux to linux-${KV_FULL}" mv linux linux-${KV_FULL} \ || die "Unable to move source tree to ${KV_FULL}." - elif [[ "${OKV}" != "${KV_FULL}" ]]; then - if [[ ${#OKV_ARRAY[@]} -ge 3 ]] && [[ ${KV_MAJOR} -ge 3 ]] && - [[ "${ETYPE}" = "sources" ]]; then + elif [[ ${OKV} != ${KV_FULL} ]]; then + if [[ ${#OKV_ARRAY[@]} -ge 3 && ${KV_MAJOR} -ge 3 ]] && + [[ ${ETYPE} = sources ]]; then debug-print "moving linux-${KV_MAJOR}.${KV_MINOR} to linux-${KV_FULL} " mv linux-${KV_MAJOR}.${KV_MINOR} linux-${KV_FULL} \ || die "Unable to move source tree to ${KV_FULL}." @@ -785,14 +729,14 @@ universal_unpack() { mv linux-${OKV} linux-${KV_FULL} \ || die "Unable to move source tree to ${KV_FULL}." fi - elif [[ ${#OKV_ARRAY[@]} -ge 3 ]] && [[ ${KV_MAJOR} -ge 3 ]]; then + elif [[ ${#OKV_ARRAY[@]} -ge 3 && ${KV_MAJOR} -ge 3 ]]; then mv linux-${KV_MAJOR}.${KV_MINOR} linux-${KV_FULL} \ || die "Unable to move source tree to ${KV_FULL}." fi - cd "${S}" + cd "${S}" || die # remove all backup files - find . -iname "*~" -exec rm {} \; 2> /dev/null + find . -iname "*~" -exec rm {} \; 2>/dev/null } @@ -802,9 +746,7 @@ universal_unpack() { # handle EXTRAVERSION unpack_set_extraversion() { - cd "${S}" - sed -i -e "s:^\(EXTRAVERSION =\).*:\1 ${EXTRAVERSION}:" Makefile - cd "${OLDPWD}" + sed -i -e "s:^\(EXTRAVERSION =\).*:\1 ${EXTRAVERSION}:" "${S}"/Makefile || die } # @FUNCTION: unpack_fix_install_path @@ -814,85 +756,7 @@ unpack_set_extraversion() { # Otherwise patches that modify the same area of Makefile will fail unpack_fix_install_path() { - cd "${S}" - sed -i -e 's:#export\tINSTALL_PATH:export\tINSTALL_PATH:' Makefile -} - -# Compile Functions - -# @FUNCTION: compile_headers -# @USAGE: -# @DESCRIPTION: -# header compilation - -compile_headers() { - env_setup_xmakeopts - - # if we couldnt obtain HOSTCFLAGS from the Makefile, - # then set it to something sane - local HOSTCFLAGS=$(getfilevar HOSTCFLAGS "${S}"/Makefile) - HOSTCFLAGS=${HOSTCFLAGS:--Wall -Wstrict-prototypes -O2 -fomit-frame-pointer} - - if kernel_is 2 4; then - yes "" | make oldconfig ${xmakeopts} - echo ">>> make oldconfig complete" - make dep ${xmakeopts} - elif kernel_is 2 6; then - # 2.6.18 introduces headers_install which means we dont need any - # of this crap anymore :D - kernel_is ge 2 6 18 && return 0 - - # autoconf.h isnt generated unless it already exists. plus, we have - # no guarantee that any headers are installed on the system... - [[ -f ${EROOT}usr/include/linux/autoconf.h ]] \ - || touch include/linux/autoconf.h - - # if K_DEFCONFIG isn't set, force to "defconfig" - # needed by mips - if [[ -z ${K_DEFCONFIG} ]]; then - if kernel_is ge 2 6 16 ; then - case ${CTARGET} in - powerpc64*) K_DEFCONFIG="ppc64_defconfig";; - powerpc*) K_DEFCONFIG="pmac32_defconfig";; - *) K_DEFCONFIG="defconfig";; - esac - else - K_DEFCONFIG="defconfig" - fi - fi - - # if there arent any installed headers, then there also isnt an asm - # symlink in /usr/include/, and make defconfig will fail, so we have - # to force an include path with $S. - HOSTCFLAGS="${HOSTCFLAGS} -I${S}/include/" - ln -sf asm-${KARCH} "${S}"/include/asm || die - cross_pre_c_headers && return 0 - - make ${K_DEFCONFIG} HOSTCFLAGS="${HOSTCFLAGS}" ${xmakeopts} || die "defconfig failed (${K_DEFCONFIG})" - if compile_headers_tweak_config ; then - yes "" | make oldconfig HOSTCFLAGS="${HOSTCFLAGS}" ${xmakeopts} || die "2nd oldconfig failed" - fi - make prepare HOSTCFLAGS="${HOSTCFLAGS}" ${xmakeopts} || die "prepare failed" - make prepare-all HOSTCFLAGS="${HOSTCFLAGS}" ${xmakeopts} || die "prepare failed" - fi -} - -# @FUNCTION: compile_headers_tweak_config -# @USAGE: -# @DESCRIPTION: -# some targets can be very very picky, so let's finesse the -# .config based upon any info we may have - -compile_headers_tweak_config() { - case ${CTARGET} in - sh*) - sed -i '/CONFIG_CPU_SH/d' .config || die - echo "CONFIG_CPU_SH${CTARGET:2:1}=y" >> .config - return 0;; - esac - - # no changes, so lets do nothing - return 1 + sed -i -e 's:#export\tINSTALL_PATH:export\tINSTALL_PATH:' "${S}"/Makefile || die } # install functions @@ -903,10 +767,8 @@ compile_headers_tweak_config() { # Fix permissions in tarball install_universal() { - cd "${WORKDIR}" - chown -R 0:0 * >& /dev/null - chmod -R a+r-w+X,u+w * - cd ${OLDPWD} + chown -R 0:0 "${WORKDIR}"/* &>/dev/null + chmod -R a+r-w+X,u+w "${WORKDIR}"/* } # @FUNCTION: install_headers @@ -917,36 +779,12 @@ install_universal() { install_headers() { local ddir=$(kernel_header_destdir) - # 2.6.18 introduces headers_install which means we dont need any - # of this crap anymore :D - if kernel_is ge 2 6 18 ; then - env_setup_xmakeopts - emake headers_install INSTALL_HDR_PATH="${ED}"${ddir}/.. ${xmakeopts} || die + env_setup_xmakeopts + emake headers_install INSTALL_HDR_PATH="${ED%/}"${ddir}/.. ${xmakeopts} - # let other packages install some of these headers - rm -rf "${ED}"${ddir}/scsi || die #glibc/uclibc/etc... - return 0 - fi - - # Do not use "linux/*" as that can cause problems with very long - # $S values where the cmdline to cp is too long - pushd "${S}" >/dev/null - dodir ${ddir}/linux - cp -pPR "${S}"/include/linux "${ED}"${ddir}/ || die - rm -rf "${ED}"${ddir}/linux/modules || die - - dodir ${ddir}/asm - cp -pPR "${S}"/include/asm/* "${ED}"${ddir}/asm || die - - if kernel_is 2 6 ; then - dodir ${ddir}/asm-generic - cp -pPR "${S}"/include/asm-generic/* "${ED}"${ddir}/asm-generic || die - fi - - # clean up - find "${D}" -name '*.orig' -exec rm -f {} \; - - popd >/dev/null + # let other packages install some of these headers + rm -rf "${ED%/}"${ddir}/scsi || die #glibc/uclibc/etc... + return 0 } # @FUNCTION: install_sources @@ -957,9 +795,9 @@ install_headers() { install_sources() { local file - cd "${S}" + cd "${S}" || die dodir /usr/src - echo ">>> Copying sources ..." + einfo ">>> Copying sources ..." file="$(find ${WORKDIR} -iname "docs" -type d)" if [[ -n ${file} ]]; then @@ -972,9 +810,9 @@ install_sources() { done fi - mv "${WORKDIR}"/linux* "${ED}"usr/src || die + mv "${WORKDIR}"/linux* "${ED%/}"/usr/src || die - if [[ -n "${UNIPATCH_DOCS}" ]] ; then + if [[ -n ${UNIPATCH_DOCS} ]]; then for i in ${UNIPATCH_DOCS}; do dodoc "${T}"/${i} done @@ -999,8 +837,6 @@ preinst_headers() { # see inline comments postinst_sources() { - local MAKELINK=0 - # if we have USE=symlink, then force K_SYMLINK=1 use symlink && K_SYMLINK=1 @@ -1008,42 +844,36 @@ postinst_sources() { # If some particular kernel version doesn't have security # supported because of USE=deblob or otherwise, one can still # set K_SECURITY_UNSUPPORTED on a per ebuild basis. - #[[ $K_DEBLOB_AVAILABLE == 1 ]] && \ + #[[ ${K_DEBLOB_AVAILABLE} == 1 ]] && \ # use deblob && \ # K_SECURITY_UNSUPPORTED=deblob # if we are to forcably symlink, delete it if it already exists first. - if [[ ${K_SYMLINK} > 0 ]]; then - [[ -h ${EROOT}usr/src/linux ]] && { rm "${EROOT}"usr/src/linux || die; } - MAKELINK=1 - fi + if [[ ${K_SYMLINK} -gt 0 ]]; then + if [[ -e ${EROOT%/}/usr/src/linux && ! -L ${EROOT%/}/usr/src/linux ]] ; then + die "${EROOT%/}/usr/src/linux exist and is not a symlink" + fi - # if the link doesnt exist, lets create it - [[ ! -h ${EROOT}usr/src/linux ]] && MAKELINK=1 - - if [[ ${MAKELINK} == 1 ]]; then - ln -sf linux-${KV_FULL} "${EROOT}"usr/src/linux || die + ln -snf linux-${KV_FULL} "${EROOT%/}"/usr/src/linux || die fi # Don't forget to make directory for sysfs - [[ ! -d ${EROOT}sys ]] && kernel_is 2 6 && { mkdir "${EROOT}"sys || die ; } + [[ ! -d ${EROOT%/}/sys ]] && kernel_is 2 6 && { mkdir "${EROOT%/}"/sys || die ; } - echo elog "If you are upgrading from a previous kernel, you may be interested" elog "in the following document:" elog " - General upgrade guide: https://wiki.gentoo.org/wiki/Kernel/Upgrade" - echo # if K_EXTRAEINFO is set then lets display it now if [[ -n ${K_EXTRAEINFO} ]]; then echo ${K_EXTRAEINFO} | fmt | - while read -s ELINE; do einfo "${ELINE}"; done + while read -s ELINE; do einfo "${ELINE}"; done fi # if K_EXTRAELOG is set then lets display it now if [[ -n ${K_EXTRAELOG} ]]; then echo ${K_EXTRAELOG} | fmt | - while read -s ELINE; do elog "${ELINE}"; done + while read -s ELINE; do elog "${ELINE}"; done fi # if K_EXTRAEWARN is set then lets display it now @@ -1060,12 +890,10 @@ postinst_sources() { # And now the general message. if [[ -n ${K_SECURITY_UNSUPPORTED} ]]; then ewarn "This means that it is likely to be vulnerable to recent security issues." - echo ewarn "Upstream kernel developers recommend always running the latest " ewarn "release of any current long term supported Linux kernel version." ewarn "To see a list of these versions, their most current release and " ewarn "long term support status, please go to https://www.kernel.org ." - echo ewarn "For specific information on why this kernel is unsupported, please read:" ewarn "https://wiki.gentoo.org/wiki/Project:Kernel_Security" fi @@ -1074,10 +902,9 @@ postinst_sources() { KV_MAJOR=$(ver_cut 1 ${OKV}) KV_MINOR=$(ver_cut 2 ${OKV}) KV_PATCH=$(ver_cut 3 ${OKV}) - if [[ "$(tc-arch)" = "sparc" ]]; then + if [[ $(tc-arch) = sparc ]]; then if [[ $(gcc-major-version) -lt 4 && $(gcc-minor-version) -lt 4 ]]; then - if [[ ${KV_MAJOR} -ge 3 || ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH} > 2.6.24 ]] ; then - echo + if [[ ${KV_MAJOR} -ge 3 ]] || ver_test ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH} -gt 2.6.24; then elog "NOTE: Since 2.6.25 the kernel Makefile has changed in a way that" elog "you now need to do" elog " make CROSS_COMPILE=sparc64-unknown-linux-gnu-" @@ -1085,7 +912,6 @@ postinst_sources() { elog " make" elog "to compile the kernel. For more information please browse to" elog "https://bugs.gentoo.org/show_bug.cgi?id=214765" - echo fi fi fi @@ -1101,11 +927,10 @@ postinst_sources() { setup_headers() { [[ -z ${H_SUPPORTEDARCH} ]] && H_SUPPORTEDARCH=${PN/-*/} for i in ${H_SUPPORTEDARCH}; do - [[ $(tc-arch) == "${i}" ]] && H_ACCEPT_ARCH="yes" + [[ $(tc-arch) == ${i} ]] && H_ACCEPT_ARCH="yes" done - if [[ ${H_ACCEPT_ARCH} != "yes" ]]; then - echo + if [[ ${H_ACCEPT_ARCH} != yes ]]; then eerror "This version of ${PN} does not support $(tc-arch)." eerror "Please merge the appropriate sources, in most cases" eerror "(but not all) this will be called $(tc-arch)-headers." @@ -1128,8 +953,8 @@ unipatch() { LC_ALL="C" LANG="" - [ -z "${KPATCH_DIR}" ] && KPATCH_DIR="${WORKDIR}/patches/" - [ ! -d ${KPATCH_DIR} ] && mkdir -p ${KPATCH_DIR} + [[ -z ${KPATCH_DIR} ]] && KPATCH_DIR="${WORKDIR}/patches/" + [[ ! -d ${KPATCH_DIR} ]] && mkdir -p ${KPATCH_DIR} # We're gonna need it when doing patches with a predefined patchlevel eshopts_push -s extglob @@ -1144,26 +969,26 @@ unipatch() { #unpack any passed tarballs for i in ${UNIPATCH_LIST}; do - if echo ${i} | grep -qs -e "\.tar" -e "\.tbz" -e "\.tgz" ; then - if [ -n "${UNIPATCH_STRICTORDER}" ]; then + if echo ${i} | grep -qs -e "\.tar" -e "\.tbz" -e "\.tgz"; then + if [[ -n ${UNIPATCH_STRICTORDER} ]]; then unset z - STRICT_COUNT=$((10#${STRICT_COUNT} + 1)) + STRICT_COUNT=$((10#${STRICT_COUNT:=0} + 1)) for((y=0; y<$((6 - ${#STRICT_COUNT})); y++)); do z="${z}0"; done PATCH_ORDER="${z}${STRICT_COUNT}" mkdir -p "${KPATCH_DIR}/${PATCH_ORDER}" - pushd "${KPATCH_DIR}/${PATCH_ORDER}" >/dev/null + pushd "${KPATCH_DIR}/${PATCH_ORDER}" >/dev/null || die unpack ${i##*/} - popd >/dev/null + popd >/dev/null || die else - pushd "${KPATCH_DIR}" >/dev/null + pushd "${KPATCH_DIR}" >/dev/null || die unpack ${i##*/} - popd >/dev/null + popd >/dev/null || die fi - [[ ${i} == *:* ]] && echo ">>> Strict patch levels not currently supported for tarballed patchsets" + [[ ${i} == *:* ]] && elog ">>> Strict patch levels not currently supported for tarballed patchsets" else extention=${i/*./} extention=${extention/:*/} @@ -1184,9 +1009,8 @@ unipatch() { x=${i/*\//} x=${x/\.${extention}/} - if [ -n "${PIPE_CMD}" ]; then - if [ ! -r "${i}" ]; then - echo + if [[ -n ${PIPE_CMD} ]]; then + if [[ ! -r ${i} ]]; then eerror "FATAL: unable to locate:" eerror "${i}" eerror "for read-only. The file either has incorrect permissions" @@ -1194,9 +1018,9 @@ unipatch() { die Unable to locate ${i} fi - if [ -n "${UNIPATCH_STRICTORDER}" ]; then + if [[ -n ${UNIPATCH_STRICTORDER} ]]; then unset z - STRICT_COUNT=$((10#${STRICT_COUNT} + 1)) + STRICT_COUNT=$((10#${STRICT_COUNT:=0} + 1)) for((y=0; y<$((6 - ${#STRICT_COUNT})); y++)); do z="${z}0"; done @@ -1211,7 +1035,7 @@ unipatch() { fi # If experimental was not chosen by the user, drop experimental patches not in K_EXP_GENPATCHES_LIST. - if [[ "${i}" == *"genpatches-"*".experimental."* && -n ${K_EXP_GENPATCHES_PULL} ]] ; then + if [[ ${i} == *genpatches-*.experimental.* && -n ${K_EXP_GENPATCHES_PULL} ]]; then if [[ -z ${K_EXP_GENPATCHES_NOUSE} ]] && use experimental; then continue fi @@ -1219,29 +1043,79 @@ unipatch() { local j for j in ${KPATCH_DIR}/*/50*_*.patch*; do for k in ${K_EXP_GENPATCHES_LIST} ; do - [[ "$(basename ${j})" == ${k}* ]] && continue 2 + [[ $(basename ${j}) == ${k}* ]] && continue 2 done UNIPATCH_DROP+=" $(basename ${j})" done else UNIPATCH_LIST_GENPATCHES+=" ${DISTDIR}/${tarball}" - debug-print "genpatches tarball: $tarball" + debug-print "genpatches tarball: ${tarball}" - local GCC_MAJOR_VER=$(gcc-major-version) + local GCC_MAJOR_VER=$(gcc-major-version) local GCC_MINOR_VER=$(gcc-minor-version) - # optimization patch for gcc < 8.X and kernel > 4.13 - if [[ ${GCC_MAJOR_VER} -lt 8 ]] && [[ ${GCC_MAJOR_VER} -gt 4 ]]; then - if kernel_is ge 4 13 ; then - UNIPATCH_DROP+=" 5011_enable-cpu-optimizations-for-gcc8.patch" + # this section should be the target state to handle the cpu opt + # patch for kernels > 4.19.189, 5.4.115, 5.10.33 and 5.11.17, + # 5.12.0 and gcc >= 9 The patch now handles the + # gcc version enabled on the system through the Kconfig file as + # 'depends'. The legacy section can hopefully be retired in the future + # Note the patch for 4.19-5.8 version are the same and the patch for + # 5.8+ version is the same + # eventually we can remove everything except the gcc ver <9 check + # based on stablization, time, kernel removals or a combo of all three + if ( kernel_is eq 4 19 && kernel_is gt 4 19 189 ) || + ( kernel_is eq 5 4 && kernel_is gt 5 4 115 ) || + ( kernel_is eq 5 10 && kernel_is gt 5 10 33 ) || + ( kernel_is eq 5 11 && kernel_is gt 5 11 17 ) || + ( kernel_is eq 5 12 && kernel_is gt 5 12 0 ) || + ( kernel_is ge 5 13); then + UNIPATCH_DROP+=" 5010_enable-additional-cpu-optimizations-for-gcc.patch" + UNIPATCH_DROP+=" 5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch" + UNIPATCH_DROP+=" 5011_enable-cpu-optimizations-for-gcc8.patch" + UNIPATCH_DROP+=" 5012_enable-cpu-optimizations-for-gcc91.patch" + UNIPATCH_DROP+=" 5013_enable-cpu-optimizations-for-gcc10.patch" + if [[ ${GCC_MAJOR_VER} -lt 9 ]]; then + UNIPATCH_DROP+=" 5010_enable-cpu-optimizations-universal.patch" fi - # optimization patch for gcc >= 8 and kernel ge 4.13 - elif [[ "${GCC_MAJOR_VER}" -ge 8 ]]; then - if kernel_is ge 4 13; then + # this legacy section should be targeted for removal + # optimization patch for gcc < 8.X and kernel > 4.13 and < 4.19 + elif kernel_is ge 4 13; then + UNIPATCH_DROP+=" 5010_enable-cpu-optimizations-universal.patch" + if [[ ${GCC_MAJOR_VER} -lt 8 && ${GCC_MAJOR_VER} -gt 4 ]]; then + UNIPATCH_DROP+=" 5011_enable-cpu-optimizations-for-gcc8.patch" + UNIPATCH_DROP+=" 5012_enable-cpu-optimizations-for-gcc91.patch" + UNIPATCH_DROP+=" 5013_enable-cpu-optimizations-for-gcc10.patch" + # optimization patch for gcc >= 8 and kernel ge 4.13 + elif [[ ${GCC_MAJOR_VER} -eq 8 ]]; then # support old kernels for a period. For now, remove as all gcc versions required are masked UNIPATCH_DROP+=" 5010_enable-additional-cpu-optimizations-for-gcc.patch" UNIPATCH_DROP+=" 5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch" + UNIPATCH_DROP+=" 5012_enable-cpu-optimizations-for-gcc91.patch" + UNIPATCH_DROP+=" 5013_enable-cpu-optimizations-for-gcc10.patch" + elif [[ ${GCC_MAJOR_VER} -eq 9 && ${GCC_MINOR_VER} -ge 1 ]]; then + UNIPATCH_DROP+=" 5010_enable-additional-cpu-optimizations-for-gcc.patch" + UNIPATCH_DROP+=" 5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch" + UNIPATCH_DROP+=" 5011_enable-cpu-optimizations-for-gcc8.patch" + UNIPATCH_DROP+=" 5013_enable-cpu-optimizations-for-gcc10.patch" + elif [[ ${GCC_MAJOR_VER} -eq 10 && ${GCC_MINOR_VER} -ge 1 ]]; then + UNIPATCH_DROP+=" 5010_enable-additional-cpu-optimizations-for-gcc.patch" + UNIPATCH_DROP+=" 5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch" + UNIPATCH_DROP+=" 5011_enable-cpu-optimizations-for-gcc8.patch" + UNIPATCH_DROP+=" 5012_enable-cpu-optimizations-for-gcc91.patch" + else + UNIPATCH_DROP+=" 5010_enable-additional-cpu-optimizations-for-gcc.patch" + UNIPATCH_DROP+=" 5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch" + UNIPATCH_DROP+=" 5011_enable-cpu-optimizations-for-gcc8.patch" + UNIPATCH_DROP+=" 5012_enable-cpu-optimizations-for-gcc91.patch" + UNIPATCH_DROP+=" 5013_enable-cpu-optimizations-for-gcc10.patch" fi + else + UNIPATCH_DROP+=" 5010_enable-cpu-optimizations-universal.patch" + UNIPATCH_DROP+=" 5010_enable-additional-cpu-optimizations-for-gcc.patch" + UNIPATCH_DROP+=" 5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch" + UNIPATCH_DROP+=" 5011_enable-cpu-optimizations-for-gcc8.patch" + UNIPATCH_DROP+=" 5012_enable-cpu-optimizations-for-gcc91.patch" + UNIPATCH_DROP+=" 5013_enable-cpu-optimizations-for-gcc10.patch" fi fi done @@ -1253,21 +1127,6 @@ unipatch() { KPATCH_DIR="${KPATCH_DIR} ${i}" done - # do not apply fbcondecor patch to sparc/sparc64 as it breaks boot - # bug #272676 - if [[ "$(tc-arch)" = "sparc" || "$(tc-arch)" = "sparc64" ]]; then - if [[ ${KV_MAJOR} -ge 3 || ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH} > 2.6.28 ]]; then - if [[ ! -z ${K_WANT_GENPATCHES} ]] ; then - UNIPATCH_DROP="${UNIPATCH_DROP} *_fbcondecor*.patch" - echo - ewarn "fbcondecor currently prevents sparc/sparc64 from booting" - ewarn "for kernel versions >= 2.6.29. Removing fbcondecor patch." - ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=272676 for details" - echo - fi - fi - fi - #so now lets get rid of the patchno's we want to exclude UNIPATCH_DROP="${UNIPATCH_EXCLUDE} ${UNIPATCH_DROP}" for i in ${UNIPATCH_DROP}; do @@ -1282,49 +1141,49 @@ unipatch() { STDERR_T="${T}/${i/*\//}" STDERR_T="${STDERR_T/.patch*/.err}" - [ -z ${i/*.patch*/} ] && PATCH_DEPTH=${i/*.patch/} - #[ -z ${i/*.diff*/} ] && PATCH_DEPTH=${i/*.diff/} + [[ -z ${i/*.patch*/} ]] && PATCH_DEPTH=${i/*.patch/} + #[[ -z ${i/*.diff*/} ]] && PATCH_DEPTH=${i/*.diff/} - if [ -z "${PATCH_DEPTH}" ]; then PATCH_DEPTH=0; fi + if [[ -z ${PATCH_DEPTH} ]]; then PATCH_DEPTH=0; fi #################################################################### - # IMPORTANT: This is temporary code to support Linux git 3.15_rc1! # + # IMPORTANT: This code is to support kernels which cannot be # + # tested with the --dry-run parameter # # # - # The patch contains a removal of a symlink, followed by addition # - # of a file with the same name as the symlink in the same # - # location; this causes the dry-run to fail, filed bug #507656. # + # These patches contain a removal of a symlink, followed by # + # addition of a file with the same name as the symlink in the # + # same location; this causes the dry-run to fail, see bug #507656. # # # # https://bugs.gentoo.org/show_bug.cgi?id=507656 # #################################################################### - if [[ -n ${K_FROM_GIT} ]] ; then - if [[ ${KV_MAJOR} -gt 3 || ( ${KV_MAJOR} -eq 3 && ${KV_PATCH} -gt 15 ) && - ${RELEASETYPE} == -rc ]] ; then - ebegin "Applying ${i/*\//} (-p1)" - if [ $(patch -p1 --no-backup-if-mismatch -f < ${i} >> ${STDERR_T}) "$?" -le 2 ]; then - eend 0 - rm ${STDERR_T} || die - break - else - eend 1 - eerror "Failed to apply patch ${i/*\//}" - eerror "Please attach ${STDERR_T} to any bug you may post." - eshopts_pop - die "Failed to apply ${i/*\//} on patch depth 1." - fi + if [[ -n ${K_NODRYRUN} ]]; then + ebegin "Applying ${i/*\//} (-p1)" + patch -p1 --no-backup-if-mismatch -f < ${i} >> ${STDERR_T} + if [[ $? -le 2 ]]; then + eend 0 + rm ${STDERR_T} || die + else + eend 1 + eerror "Failed to apply patch ${i/*\//}" + eerror "Please attach ${STDERR_T} to any bug you may post." + eshopts_pop + die "Failed to apply ${i/*\//} on patch depth 1." fi fi #################################################################### - while [ ${PATCH_DEPTH} -lt 5 ]; do + while [[ ${PATCH_DEPTH} -lt 5 && -z ${K_NODRYRUN} ]]; do echo "Attempting Dry-run:" >> ${STDERR_T} echo "cmd: patch -p${PATCH_DEPTH} --no-backup-if-mismatch --dry-run -f < ${i}" >> ${STDERR_T} echo "=======================================================" >> ${STDERR_T} - if [ $(patch -p${PATCH_DEPTH} --no-backup-if-mismatch --dry-run -f < ${i} >> ${STDERR_T}) $? -eq 0 ]; then + patch -p${PATCH_DEPTH} --no-backup-if-mismatch --dry-run -f < ${i} >> ${STDERR_T} + if [[ $? -eq 0 ]]; then ebegin "Applying ${i/*\//} (-p${PATCH_DEPTH})" echo "Attempting patch:" > ${STDERR_T} echo "cmd: patch -p${PATCH_DEPTH} --no-backup-if-mismatch -f < ${i}" >> ${STDERR_T} echo "=======================================================" >> ${STDERR_T} - if [ $(patch -p${PATCH_DEPTH} --no-backup-if-mismatch -f < ${i} >> ${STDERR_T}) "$?" -eq 0 ]; then + patch -p${PATCH_DEPTH} --no-backup-if-mismatch -f < ${i} >> ${STDERR_T} + if [[ $? -eq 0 ]]; then eend 0 rm ${STDERR_T} || die break @@ -1339,7 +1198,7 @@ unipatch() { PATCH_DEPTH=$((${PATCH_DEPTH} + 1)) fi done - if [ ${PATCH_DEPTH} -eq 5 ]; then + if [[ ${PATCH_DEPTH} -eq 5 ]]; then eerror "Failed to dry-run patch ${i/*\//}" eerror "Please attach ${STDERR_T} to any bug you may post." eshopts_pop @@ -1350,7 +1209,7 @@ unipatch() { # When genpatches is used, we want to install 0000_README which documents # the patches that were used; such that the user can see them, bug #301478. - if [[ ! -z ${K_WANT_GENPATCHES} ]] ; then + if [[ ! -z ${K_WANT_GENPATCHES} ]]; then UNIPATCH_DOCS="${UNIPATCH_DOCS} 0000_README" fi @@ -1360,7 +1219,7 @@ unipatch() { local tmp for x in ${KPATCH_DIR}; do for i in ${UNIPATCH_DOCS}; do - if [[ -f ${x}/${i} ]] ; then + if [[ -f ${x}/${i} ]]; then tmp="${tmp} ${i}" cp -f "${x}/${i}" "${T}"/ || die fi @@ -1382,22 +1241,18 @@ unipatch() { # pulled from linux-info getfilevar() { - local workingdir basefname basedname xarch=$(tc-arch-kernel) + local basefname basedname xarch=$(tc-arch-kernel) - if [[ -z ${1} ]] && [[ ! -f ${2} ]]; then - echo -e "\n" + if [[ -z ${1} && ! -f ${2} ]]; then eerror "getfilevar requires 2 variables, with the second a valid file." eerror " getfilevar " else - workingdir=${PWD} basefname=$(basename ${2}) basedname=$(dirname ${2}) unset ARCH - cd ${basedname} - echo -e "include ${basefname}\ne:\n\t@echo \$(${1})" | \ - make ${BUILD_FIXES} -s -f - e 2>/dev/null - cd ${workingdir} + echo -e "include ${basefname}\ne:\n\t@echo \$(${1})" | + make -C "${basedname}" ${BUILD_FIXES} -s -f - e 2>/dev/null ARCH=${xarch} fi @@ -1411,7 +1266,6 @@ getfilevar() { # patchsets. detect_arch() { - local ALL_ARCH LOOP_ARCH LOOP_ARCH_L COMPAT_URI i TC_ARCH_KERNEL # COMPAT_URI is the contents of ${ARCH}_URI @@ -1485,18 +1339,9 @@ kernel-2_src_unpack() { # Setup xmakeopts and cd into sourcetree. env_setup_xmakeopts - cd "${S}" + cd "${S}" || die - # We dont need a version.h for anything other than headers - # at least, I should hope we dont. If this causes problems - # take out the if/fi block and inform me please. - # unpack_2_6 should now be 2.6.17 safe anyways - if [[ ${ETYPE} == headers ]]; then - kernel_is 2 4 && unpack_2_4 - kernel_is 2 6 && unpack_2_6 - fi - - if [[ $K_DEBLOB_AVAILABLE == 1 ]] && use deblob ; then + if [[ ${K_DEBLOB_AVAILABLE} == 1 ]] && use deblob; then cp "${DISTDIR}/${DEBLOB_A}" "${T}" || die "cp ${DEBLOB_A} failed" cp "${DISTDIR}/${DEBLOB_CHECK_A}" "${T}/deblob-check" || die "cp ${DEBLOB_CHECK_A} failed" chmod +x "${T}/${DEBLOB_A}" "${T}/deblob-check" || die "chmod deblob scripts failed" @@ -1505,7 +1350,7 @@ kernel-2_src_unpack() { # fix a problem on ppc where TOUT writes to /usr/src/linux breaking sandbox # only do this for kernel < 2.6.27 since this file does not exist in later # kernels - if [[ -n ${KV_MINOR} && ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH} < 2.6.27 ]] ; then + if [[ -n ${KV_MINOR} ]] && ver_test ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH} -lt 2.6.27; then sed -i \ -e 's|TOUT := .tmp_gas_check|TOUT := $(T).tmp_gas_check|' \ "${S}"/arch/ppc/Makefile @@ -1522,14 +1367,8 @@ kernel-2_src_unpack() { # Apply any user patches kernel-2_src_prepare() { - debug-print "Applying any user patches" - - # apply any user patches - case ${EAPI:-0} in - 0|1|2|3|4|5) epatch_user ;; - 6) eapply_user ;; - esac + eapply_user } # @FUNCTION: kernel-2_src_compile @@ -1538,11 +1377,10 @@ kernel-2_src_prepare() { # conpile headers or run deblob script kernel-2_src_compile() { - cd "${S}" - [[ ${ETYPE} == headers ]] && compile_headers + cd "${S}" || die - if [[ $K_DEBLOB_AVAILABLE == 1 ]] && use deblob ; then - echo ">>> Running deblob script ..." + if [[ ${K_DEBLOB_AVAILABLE} == 1 ]] && use deblob; then + einfo ">>> Running deblob script ..." python_setup sh "${T}/${DEBLOB_A}" --force || die "Deblob script failed to run!!!" fi @@ -1594,27 +1432,15 @@ kernel-2_pkg_postinst() { # if necessary kernel-2_pkg_setup() { - if kernel_is 2 4; then - if [[ $(gcc-major-version) -ge 4 ]] ; then - echo - ewarn "Be warned !! >=sys-devel/gcc-4.0.0 isn't supported with linux-2.4!" - ewarn "Either switch to another gcc-version (via gcc-config) or use a" - ewarn "newer kernel that supports gcc-4." - echo - ewarn "Also be aware that bugreports about gcc-4 not working" - ewarn "with linux-2.4 based ebuilds will be closed as INVALID!" - echo - fi - fi ABI="${KERNEL_ABI}" - if [[ ${ETYPE} != sources ]] && [[ ${ETYPE} != headers ]]; then + if [[ ${ETYPE} != sources && ${ETYPE} != headers ]]; then eerror "Unknown ETYPE=\"${ETYPE}\", must be \"sources\" or \"headers\"" die "Unknown ETYPE=\"${ETYPE}\", must be \"sources\" or \"headers\"" fi [[ ${ETYPE} == headers ]] && setup_headers - [[ ${ETYPE} == sources ]] && echo ">>> Preparing to unpack ..." + [[ ${ETYPE} == sources ]] && einfo ">>> Preparing to unpack ..." } # @FUNCTION: kernel-2_pkg_postrm @@ -1628,15 +1454,15 @@ kernel-2_pkg_postrm() { [[ ${ETYPE} == headers ]] && return 0 # If there isn't anything left behind, then don't complain. - [[ -e ${EROOT}usr/src/linux-${KV_FULL} ]] || return 0 - echo + [[ -e ${EROOT%/}/usr/src/linux-${KV_FULL} ]] || return 0 ewarn "Note: Even though you have successfully unmerged " ewarn "your kernel package, directories in kernel source location: " - ewarn "${EROOT}usr/src/linux-${KV_FULL}" + ewarn "${EROOT%/}/usr/src/linux-${KV_FULL}" ewarn "with modified files will remain behind. By design, package managers" ewarn "will not remove these modified files and the directories they reside in." - echo ewarn "For more detailed kernel removal instructions, please see: " ewarn "https://wiki.gentoo.org/wiki/Kernel/Removal" - echo } + +EXPORT_FUNCTIONS src_{unpack,prepare,compile,install,test} \ + pkg_{setup,preinst,postinst,postrm} From 5400affa86f080612d362815d5c79d4a26c61916 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Sep 2021 16:57:24 +0200 Subject: [PATCH 2/4] eclass/kernel-2: Support python3.6 too --- .../src/third_party/portage-stable/eclass/kernel-2.eclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/kernel-2.eclass b/sdk_container/src/third_party/portage-stable/eclass/kernel-2.eclass index adc1425bc2..6d5dcca6e3 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/kernel-2.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/kernel-2.eclass @@ -599,7 +599,7 @@ if [[ ${ETYPE} == sources ]]; then K_DEBLOB_AVAILABLE=0 fi if [[ ${K_DEBLOB_AVAILABLE} == 1 ]]; then - PYTHON_COMPAT=( python3_{8..10} ) + PYTHON_COMPAT=( python3_{6..10} ) inherit python-any-r1 From 707aa2f758e1cf971146fc7a41116dc171b2628c Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 28 Sep 2021 15:48:37 +0200 Subject: [PATCH 3/4] sys-kernel/linux-headers: Sync with gentoo It's from gentoo commit 38b155fa1bf907617067c98eb4ba3a5d0790eb1a. kernel-2 eclass dropped support for old EAPIs, so the linux-headers package needs refreshing. --- .../sys-kernel/linux-headers/Manifest | 29 ++++----- .../linux-headers/linux-headers-3.18.ebuild | 36 ++++++----- .../linux-headers/linux-headers-4.13.ebuild | 55 ----------------- .../linux-headers-4.14-r1.ebuild | 31 ++++------ .../linux-headers-4.15-r1.ebuild | 57 ------------------ .../linux-headers-4.16-r2.ebuild | 60 ------------------- .../linux-headers/linux-headers-4.16.ebuild | 60 ------------------- .../linux-headers/linux-headers-4.17.ebuild | 57 ------------------ .../linux-headers/linux-headers-4.18.ebuild | 60 ------------------- .../linux-headers/linux-headers-4.19.ebuild | 31 ++++------ .../linux-headers/linux-headers-4.20.ebuild | 60 ------------------- .../linux-headers/linux-headers-4.4.ebuild | 35 +++++------ .../linux-headers/linux-headers-4.9.ebuild | 35 +++++------ ...s-5.8.ebuild => linux-headers-5.10.ebuild} | 21 ++++--- .../linux-headers/linux-headers-5.11.ebuild | 45 ++++++++++++++ .../linux-headers/linux-headers-5.12.ebuild | 44 ++++++++++++++ .../linux-headers/linux-headers-5.13.ebuild | 44 ++++++++++++++ .../linux-headers/linux-headers-5.14.ebuild | 45 ++++++++++++++ .../linux-headers/linux-headers-5.4-r1.ebuild | 45 ++++++++++++++ .../linux-headers/linux-headers-5.9.ebuild | 19 +++--- .../sys-kernel/linux-headers/metadata.xml | 2 +- 21 files changed, 323 insertions(+), 548 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.13.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.15-r1.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.16-r2.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.16.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.17.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.18.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.20.ebuild rename sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/{linux-headers-5.8.ebuild => linux-headers-5.10.ebuild} (75%) create mode 100644 sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.11.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.12.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.13.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.14.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.4-r1.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/Manifest b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/Manifest index 8633f5065a..11bc241576 100644 --- a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/Manifest @@ -1,27 +1,24 @@ DIST gentoo-headers-3.18-1.tar.xz 3628 BLAKE2B 9e677389139e8e3e42508171593797b78f24368ceaba4f76c242b5827bf657444a65a0d3b334034cc54f7f14b00b9da7446356e1a5ffd9aacb05d5a336d4437f SHA512 89fb9b336fa3455752f6fe8626500d30245c04806890d4448a2895bbef2a5eae409940618fd4e0be57aa12784a198a695c32479f12d76450e16f2af1536e7a1f -DIST gentoo-headers-4.13-1.tar.xz 4096 BLAKE2B a0506c6aec14d8d710863cc3f7b5ce6cc067af245cc96dbf83f10f02ba83d580f900c9cf8b09b496370d580a9b9cd935738d8b4b0cb987836490894fba01cf23 SHA512 14236185c8810b88d94ff0533fe59e84599c2d4e5c7507c37cb458b6728eed69b581df7f8654d5323454ec359e93490c4dcbbb1ee58a66f2586047c93f0f1aa6 DIST gentoo-headers-4.14-1.tar.xz 4080 BLAKE2B 5d8bb4453d3b0b739922a86e0e45120fe5ad57c3310ff6a94830a3a7561fb3b5eef7805ff171bdf0d5582fc91848fad948162e63ec4922280c8ed68ba58d50e1 SHA512 e0f806db641c99f3f71e27fde29705685745c9c03b901c943cab5af84e2e9c3af96f5d2d10d8f5328ec7e4dba28b378f534317bf1bee597d429557b981f0a865 -DIST gentoo-headers-4.15-1.tar.xz 4068 BLAKE2B fc99b99637a11dc0cc6b4d79be3e32242f4b4f3c86a4618b3a51839e902ebad045b335f531ca41c10a6a597111f2cf77a0ae17518fb17a8441b26f1bd98c19e7 SHA512 cb973625381ac0115344d9aa1ddd927d75f0c11961526844a9da6a0aebcd28b488a7af3b423ac8358808d998d9d00d51156780905a04c01c6c512215cad6de7d -DIST gentoo-headers-4.16-1.tar.xz 4044 BLAKE2B c35efb14266d7d7f06de79f584c6e13a700c38793d7df399e668d5de269088d8a441a10e9d0b7acc5b6d1a116343d516aba58a4823cf51845fe9913dea81cb76 SHA512 a1fdf775bc27e5db2ccf1f86f12e78a25a4127673eb0a87639d548dc6246b81e5df0e8d56c0314ba833fe82d2825f8620addd408782e2f5152fb0b056b870d7c -DIST gentoo-headers-4.17-1.tar.xz 4072 BLAKE2B 7de125ac87b0344a5ff7dfbbe3d15d62cd3364116750e35b72d9e404512267a497df1ce8c52df0ba97c836df68287fe239bf29fec25d43b11be67aa17833c097 SHA512 0a837b227b7e923232438f1961535fc9becb6ed4c95290da76631489ce318a875bd3cd12ec110dedf77026c5cb9761cf8ae5c9fcf2abd736f0f7b7249228efdd -DIST gentoo-headers-4.18-1.tar.xz 4040 BLAKE2B fc4462bc8e59a58658c6bd2669840d7105f6bcde5e7cc2633f53ae4aaf44a67aebef24d944d9d3edb95abb4110ddeeb86a6fc0cbebcf6cbe23b59b97c16a0daf SHA512 8f58df3a5e5bf26e06c300354ec1e468f40593601e6645dc1b51491f5a678020598c1c72f72e616b499f503d98da4d4bf9cdf804a15cac73f51b7877756dd7fb DIST gentoo-headers-4.19-1.tar.xz 4040 BLAKE2B 4ccaf4fb6bde84f0b1f29534cf2f6effca48cb81d63b33086a1ec667069bcb57a3c3d5697c50bff8521343954d01d9c27139d62a9cf2c9f5f12bc0461441f4af SHA512 511accdfd104d9cc84b568132f1eb822f97d35120a438768c313c2cc2651197414dae7af05db81e26b32fb4febbf1e0812030fcb98395f6f65271f6605dc7bb6 -DIST gentoo-headers-4.20-1.tar.xz 4040 BLAKE2B 05f8cae4014a6f0ad926e704d5272b05228b91e29a4e14269695cd665110c054a69f0ecab5dec5d23c430cce0726aa7c5c34c85edde0df34dd0e7f8dd5ff7cb6 SHA512 19fa005b648e7dead85edc1b779595c392c28b4699cc4352e6996bbe37fb49de4d2d6b632303338e4db99a4e2e01b56ba1f3777646a416358dc509fb15623f99 DIST gentoo-headers-4.4-1.tar.xz 6624 BLAKE2B 9cdf0c22520e413f175942c4994dd90b0fed8f72c67332a05e7ed72b901ee04594f4e4a3c0252e0a6e057d9c08c4d653387dc36cda82ce9ef8a16e7317ba9ea0 SHA512 dd8a5c627a9cd373022d7afa1beb126f15694f80452821f31fc5c1a3439635814d205bcbc873a5869946472d86cdec872a44f4870751b96d42e89893fca1b983 DIST gentoo-headers-4.9-1.tar.xz 5416 BLAKE2B 2538870b340d4e4b260ada37b0571ba770a4bf93b0f0cf78819b4bf68b8ddc43c314d7fc5d12a78bc71c9bb12306d986ae0ae74159ec7edc7deea371f6b5f015 SHA512 1069f50c58f25ceb8a13c8e53dce6a21e352e2a624da3b9a6d139939e7613e9a97226eb0173fa060ee69443c6a50b53b6d5c6d752dcaebffbe2a78f06cfbe2b6 +DIST gentoo-headers-5.10-1.tar.xz 4304 BLAKE2B b5006ff13c8ef8394806919d547f1b15ac32cc4d290e8c5f5a5073f54112db194a9e743177ae54941d8a504e15b662751258259183c47c574936744d7c51b405 SHA512 3154558df20e3a8821af23b2a585eaccb6c40877850b1cf752c435c170f7f322a48e77cee63bcc061b69aff8602987f4506d803c73f394929716295aface4f3d +DIST gentoo-headers-5.11-1.tar.xz 3624 BLAKE2B 378eed88876a911e47ea08563f4fea840bfc11def916bce47c3268029ba926ced06e621edb53c9248fed4de547cfb447cc25da2222a864983a746fec06fb60d9 SHA512 896cacd48e9965ea724c13ca5a69b8c9aa4f47e631b539c71e4936462d50da3d34863e7419217ba434bcd97ebf8b05d2fc65bc9e60a584a108e864f4cf7f02fc +DIST gentoo-headers-5.12-1.tar.xz 3624 BLAKE2B 71206e81c9df3c26b93384231094f2e7762cc3b957261a18999b4e3c782ca3edd2ba25461dcb308b938f515495aabbf5d34234f2b9f072fc344a1c8eb1c3a001 SHA512 f15f31116e81114794de8d2ff30e60ff3844a2202837753754b8ee2c2a56dffcfacc6f873d3d67bc313367ad678d00d84410bf6ced0a32cf391e2978d9eaed6a +DIST gentoo-headers-5.13-1.tar.xz 2164 BLAKE2B bd2a7454111961c29134087801c5bcf88c9d0ff9d066c87ba8e81b9004c89290ebec46508324f2062e52166c0e4f82a1a740a66e48140030ce8adc7f4b4c9ccd SHA512 9f7fc903c7ad5142322e83a15a356acfbddd0b8f67c998dd03d74c57816eca7eb54f4b8b02c31f92bb9cf63b3285ff98ad9fe09a5fb8f0864a88da2ec80d3da5 +DIST gentoo-headers-5.14-1.tar.xz 1496 BLAKE2B f58c7079fdc95a4f0add255b3aca6f39554349369930364d1d67df9a2020213c1dd3f24f00e1992877d69839a28183a2139c26ac52db42b9edfff7a2254ee333 SHA512 1c1052405e2ec7bc0b32ed3036d173ca8f471ea2997f52cd5915a5a0963c86ec263beb63615f14267cb473ec2e5d047fd78960718a6866b64f84b634a0062b07 +DIST gentoo-headers-5.4-2.tar.xz 11352 BLAKE2B 0ff989dbfff9070c291efe1a8b925462770e71d0c3faeb2e53581dcce02abe45969ec293a7293b6d843f483927b15f4accc1f24ee4966483164e8f72727cfad8 SHA512 b460e4d00bdd9ec2ecf229f3b2dde7c6468f775399ba6a49fa0533c0688628c7b27d83835c21eab07407fd98c220043cd1b20e37cc4decbd08a3f2fd9cf6c2be +DIST gentoo-headers-5.9-1.tar.xz 4304 BLAKE2B 5dda91dac529cf3afca220d0ec323f679eae00e850e127ca6fb7dd42313afe7d4e2b23860a5b58673c070456e1ebd6b0d48efd681a764eef1bab996de579fd11 SHA512 3522d25e4d13f703e69a7e8da1813b38c8977821363b56af1988d78c446087dea4c3499283a2fdef2dc000fde29b945abb821a01f53ac0ac6c2b551699b3b18c DIST gentoo-headers-base-3.18.tar.xz 3776668 BLAKE2B 837a675ecf05ec270549d0ba6b9dcb98fb0e40f22007ebfa3e430152b7149dcfa29c8bbe38c737add07f75642234f1633c1d5ae0170788e8d4f765faf00bbdbe SHA512 6615c604e5e618d26fff5a61691f7827bb05be9790db6c9f8e16e3842bce8f056f9928f85ae5714710b75743b0d0804faba4ba9c76e934e1de22dc03ef6d5535 -DIST gentoo-headers-base-4.13.tar.xz 7951980 BLAKE2B 8b3b5d9152455b08bf06c275a69168f8a2418584058e23f784d3ab956d72b100b89d398bfeb351d8faa8285cd9ae8942726099ce9aa3fd94b8e0e92b8de1c217 SHA512 3b528e18199d43db3f51c8fb9a5a4c67b9317ea7e9b9fd82fe2cb4d704bbc1253f2af64dc79377ee8ec26511d0893409e3dddbb9a6ae11e8bb7f4ca4d8d3ac9a DIST gentoo-headers-base-4.14.tar.xz 8017944 BLAKE2B e967a3f26fa002f62af72c165cf960e855f5d84dd105b3f136e5ae24f4cdfc9e5f8b217a83955b325ca4bd6bda0a9d4c4de02d8d79fd4aa72191bc63db96183a SHA512 2a4e83a9ee36ffa85b59ebac1e12f4f1c572825b767928a42c4748d924d04f0536bab4d9375ca68c11ad867c226f386c40c7c4d0158d1ab00c838eb5b2f9f21a -DIST gentoo-headers-base-4.15.tar.xz 8199628 BLAKE2B 79a4f694a8335ed4bf1df94ab7829f41d3476165d0ce822a13e47461d7e3ee4cdb5e88acb9960a92ba1142adeb9951c19e17405c37b80d461b8577c7d1dfa37a SHA512 7698ae90e356cb6105d3b1fc5351264774428b5caa405e8695925965ab2ff3a08c0dfe3587a69a87405ecc45c6cd3040c3a9f751d6e6dc8eddf8b28ded4e2584 -DIST gentoo-headers-base-4.16-r1.tar.xz 8227040 BLAKE2B 95b2d64a614430e49d849ab54c58cbc3a850faea1bb5d9f7f43733d7b745ceb5ea3d1f8cc4dbb36c20797ae7d10bd736b99d17f5bfd0cdb90ecedb4eeb0f8610 SHA512 9b7cc82a322bd43dbf07c63d465200c87b838252e449028a363f3ff10921fe3889b503f20184168c7413d792c3d33b4324d89c89b95c8143a4a3c9c3e7e2d28e -DIST gentoo-headers-base-4.16.tar.xz 8222256 BLAKE2B a5065cb49b549ea5eff33bc3a60ed070511cc463258666c30681aceaba97a108be059e4fc175bd6ba4dd0b27cf8bab14e0a8225346811eaacb4ddf8b2ba5a147 SHA512 2a5beadc61532d23f999c24101f3ab6db5d184a7327fa26330e318ac6b5b38b14c0e73ead2f550707b4e24c1f4f1a11c306c97608d98d530978fdeb43b4d58d9 -DIST gentoo-headers-base-4.17.tar.xz 7908432 BLAKE2B b0f39145db10dba1998e3facfb0565dd240ba26ce4b2744cfaaca8cfa2890f70a69cf65464163e053a05b0bf4d464f251d90f1cc266de604da2f8dc0889b34c3 SHA512 4d1f8f7a392a8ffdd1144c1d3126473f91cddfe1f750e9c7916e75aec4c571c1c3d2508c0967db12d8ed3e27623c8b2a5e2a47ff1710d55fbba91a84ec8434d4 -DIST gentoo-headers-base-4.18.tar.xz 7878256 BLAKE2B 9a97fed9ae4d16af57bb4aa069cceeb357ca79314ab57b6fbaec0dde75f9504b166a3b0017582bc00fc10b74298fcd4468332ef210e90e1e3daa4681b88e45f2 SHA512 c623b3962fe06150ecad60fa6c7c89e0ad83fad4c8886513f9948352ce0044420d8eb8ccdaa08f7bc957b892472041dd42709fbf396c93a0d0292ff7edbc713e DIST gentoo-headers-base-4.19.tar.xz 7956220 BLAKE2B 5b6868188b6cb505556b8f307972be6b27c0201e8287f6a2c4d0ac8bf16cfe048cb05afacf879731ba81de5e2a8c5afc4adad007e00b12efb8b2a158a666f4dd SHA512 ef0f159cb31651bf8e00c31d8ac807e64413c7bf88807e1ab4779524db10eec4726b65af0fad034a0cb2e000cd61a6008bcc174828061ffaf633c170dd09645c -DIST gentoo-headers-base-4.20.tar.xz 8041716 BLAKE2B 09e95aedfd4288fb27ad6c1e4f53992d205e9402efb315a8c764a2836ba856c7ec3f509d30c21e656e1ca9fdeb4530d807a10e0a74e3510c8e90aa82b222bafe SHA512 705c0cf3244039ef319002f17ea702fa91673eac6bb6a790c8451cad1f16951328e1ca1e3d26043708fcdc78bfaa1ff065322947e23b41c4acb9ed2b8acba427 DIST gentoo-headers-base-4.4.tar.xz 3911752 BLAKE2B 5031ecd48b99cb0c9c35ca935fa6a62cc36c076bab193ec397fc0d543170f29c6d5a0827a2ea5517eb68fc838819cbe3e5abd125bb920992492369d5e5c1e7cb SHA512 1cd3de58ff790c3730bea38138c7a45ef95d04288c69ffeabebb884fab3add13bd9c99785ddd87a3ee467a0e1b1cdc457bbd28da349e7c178b4d2374c5fb78a3 DIST gentoo-headers-base-4.9.tar.xz 4052748 BLAKE2B e279954c56170fbfa4ebae8dade731825b3d5f0cd5d73a5b33cd93a9c8f5fa140e14edf0d5ac26a452fe8a61b16fdcc851f5329f56e4c8dcf4472a995de44c4c SHA512 a03418cfba7fa4531279d9122411af3e285e962506e8df9279fbbb27ae08a4e30725bd1cf03f48ad523f61f2889195e6c844fa4c7b4ef2f828baf47ef402abfa -DIST gentoo-headers-5.8-1.tar.xz 4304 BLAKE2B f4b1b1746def90903b504f5a8a485af0769bf7af90ddac68718c5041c0372785c05ab1c7e4c229c500a56f5835b41a505ffee3a4a07dd3093903a3e47ea6bcf0 SHA512 58d96e2dcce272e3b21f7e6f592f75916cb25b4aecd604a5d3aa45b1275ebe258022c3a00419814600dcadef8f289c343247a8cb8b2526b17baa56b9139b6fd4 -DIST linux-5.8.tar.xz 114459324 BLAKE2B 7bd97f8fa4527840754434414c07283e89731dc8ebb1e95fa5bc1469a60af1122582c0d3b6e262e77882f023190068df3537bd8b65964b3caa820bb2c8e579c7 SHA512 45a53ecf351096ef6e98242cca4228b8da9b9139ecc6963695791ea6fb7a9484a4e1c19dcca7ce7cbfdfa49de0451b70973bb078f12bdae9cbaddbc3f8092556 -DIST gentoo-headers-5.9-1.tar.xz 4304 BLAKE2B 5dda91dac529cf3afca220d0ec323f679eae00e850e127ca6fb7dd42313afe7d4e2b23860a5b58673c070456e1ebd6b0d48efd681a764eef1bab996de579fd11 SHA512 3522d25e4d13f703e69a7e8da1813b38c8977821363b56af1988d78c446087dea4c3499283a2fdef2dc000fde29b945abb821a01f53ac0ac6c2b551699b3b18c +DIST linux-5.10.tar.xz 116606704 BLAKE2B b923d7b66309224f42f35f8a5fa219421b0a9362d2adacdadd8d96251f61f7230878ea297a269a7f3b3c56830f0b177e068691e1d7f88501a05653b0a13274d1 SHA512 95bc137d0cf9148da6a9d1f1a878698dc27b40f68e22c597544010a6c591ce1b256f083489d3ff45ff77753289b535135590194d88ef9f007d0ddab3d74de70e +DIST linux-5.11.tar.xz 117619104 BLAKE2B 81300c27bd5476387a83123aaeb4163c73eb61e9245806c23660cb5e6a4fa88ffc9def027031335fa0270fc4080506cd415990014364e3a98b9d2e8c58a29524 SHA512 a567ec133018bb5ec00c60281479b466c26e02137a93a9c690e83997947df02b6fd94e76e8df748f6d70ceb58a19bacc3b1467de10b7a1fad2763db32b3f1330 +DIST linux-5.12.tar.xz 118112412 BLAKE2B 842d921b9a73d2aaade763dbd2ec67bdfe0275baa6d628b775f5c87574ad7dc86f0419afcd48c10c1235f4bffa16084243f2cf4556e6afcd391e975fe8ba530b SHA512 be03b6fee1d1ea8087b09874d27c0a602c0b04fd90ad38b975bd2c8455a07e83c29b56814aaf1389e82305fae0e4c2d1701075a7f0a7295dd28149f967ec5b3d +DIST linux-5.13.tar.xz 119297284 BLAKE2B 9c4c12e2394dec064adff51f7ccdf389192eb27ba7906db5eda543afe3d04afca6b9ea0848a057571bf2534eeb98e1e3a67734deff82c0d3731be205ad995668 SHA512 a8edf97e9d38a49f1be2bde1e29ad96274bb2c6f7e8a2bebaa1161dd4df9cabcbaec4ff644c45bee94f86ae47725087d6deed0cd954209cec717621d137db85e +DIST linux-5.14.tar.xz 120669872 BLAKE2B 0047f5aaa3940dff97f4055ef544faafbbb5282128e6afe21d2f47d8dc8c395806a17016febfa050117d16f59e74b882cb8b9c5011d68f119c230d0a4d120524 SHA512 8e4f3ec3d36f774280f75dc7b004a43e09417af58f12e9c9f8348976659d4cfda7ad905f306f43fed66a27922e5c45db22e46bbfa7a0b9f365012380de3b6f64 +DIST linux-5.4.tar.xz 109441440 BLAKE2B 193bc4a3147e147d5529956164ec4912fad5d5c6fb07f909ff1056e57235834173194afc686993ccd785c1ff15804de0961b625f3008cca0e27493efc8f27b13 SHA512 9f60f77e8ab972b9438ac648bed17551c8491d6585a5e85f694b2eaa4c623fbc61eb18419b2656b6795eac5deec0edaa04547fc6723fbda52256bd7f3486898f DIST linux-5.9.tar.xz 115507140 BLAKE2B e8d11472d63a9f8409ca12a2e8c97c6963a3d4516b5a398b627d6ece565584526f9b5a1377a2fa4bd184c09c7db94c987428bc5d52df0c788464a67e9e8d6dcb SHA512 d3d92ce4246bad74c9a784212f160d98449b1e8793970c2c308276568d852b8effe0528686bdb87d55d691f09a826abf7938d69bdd4759ce65ddd5c05ffe4eca diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-3.18.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-3.18.ebuild index b3b0981216..e3c8213b46 100644 --- a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-3.18.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-3.18.ebuild @@ -1,22 +1,22 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="4" +EAPI=6 ETYPE="headers" H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 bfin cris frv hexagon hppa ia64 m32r m68k metag microblaze mips mn10300 openrisc ppc ppc64 s390 score sh sparc tile x86 xtensa" -inherit kernel-2 +inherit kernel-2 toolchain-funcs detect_version PATCH_VER="1" SRC_URI="mirror://gentoo/gentoo-headers-base-${PV}.tar.xz ${PATCH_VER:+mirror://gentoo/gentoo-headers-${PV}-${PATCH_VER}.tar.xz}" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" DEPEND="app-arch/xz-utils dev-lang/perl" -RDEPEND="!!media-sound/alsa-headers" +RDEPEND="" S=${WORKDIR}/gentoo-headers-base-${PV} @@ -25,18 +25,9 @@ src_unpack() { } src_prepare() { - [[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/${PV} -} + default -src_install() { - kernel-2_src_install - - # hrm, build system sucks - find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete - find "${ED}" -depth -type d -delete 2>/dev/null - - # provided by libdrm (for now?) - rm -rf "${ED}"/$(kernel_header_destdir)/drm + [[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}/${PV}"/*.patch } src_test() { @@ -46,8 +37,15 @@ src_test() { -e '\<([us](8|16|32|64))\>' \ . - einfo "Missing linux/types.h include" - egrep -l -r -e '__[us](8|16|32|64)' "${ED}" | xargs grep -L linux/types.h - emake ARCH=$(tc-arch-kernel) headers_check } + +src_install() { + kernel-2_src_install + + find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete + find "${ED}" -depth -type d -delete 2>/dev/null + + # provided by libdrm (for now?) + rm -rf "${ED}"/$(kernel_header_destdir)/drm +} diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.13.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.13.ebuild deleted file mode 100644 index 6d6eaf890d..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.13.ebuild +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -ETYPE="headers" -H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 bfin cris frv hexagon hppa ia64 m32r m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 s390 score sh sparc tile x86 xtensa" -inherit kernel-2 -detect_version - -PATCH_VER="1" -SRC_URI="mirror://gentoo/gentoo-headers-base-${PV}.tar.xz - ${PATCH_VER:+mirror://gentoo/gentoo-headers-${PV}-${PATCH_VER}.tar.xz}" - -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux" - -DEPEND="app-arch/xz-utils - dev-lang/perl" -RDEPEND="!!media-sound/alsa-headers" - -S=${WORKDIR}/gentoo-headers-base-${PV} - -src_unpack() { - unpack ${A} -} - -src_prepare() { - [[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/${PV} -} - -src_install() { - kernel-2_src_install - - # hrm, build system sucks - find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete - find "${ED}" -depth -type d -delete 2>/dev/null -} - -src_test() { - # Make sure no uapi/ include paths are used by accident. - egrep -r \ - -e '# *include.*["<]uapi/' \ - "${D}" && die "#include uapi/xxx detected" - - einfo "Possible unescaped attribute/type usage" - egrep -r \ - -e '(^|[[:space:](])(asm|volatile|inline)[[:space:](]' \ - -e '\<([us](8|16|32|64))\>' \ - . - - einfo "Missing linux/types.h include" - egrep -l -r -e '__[us](8|16|32|64)' "${ED}" | xargs grep -L linux/types.h - - emake ARCH=$(tc-arch-kernel) headers_check -} diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.14-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.14-r1.ebuild index 5e39a6ce99..a0a0c46682 100644 --- a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.14-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.14-r1.ebuild @@ -1,22 +1,22 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 ETYPE="headers" H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 bfin cris frv hexagon hppa ia64 m32r m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 s390 score sh sparc tile x86 xtensa" -inherit kernel-2 +inherit kernel-2 toolchain-funcs detect_version PATCH_VER="1" SRC_URI="mirror://gentoo/gentoo-headers-base-${PV}.tar.xz ${PATCH_VER:+mirror://gentoo/gentoo-headers-${PV}-${PATCH_VER}.tar.xz}" -KEYWORDS="~alpha amd64 ~arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" DEPEND="app-arch/xz-utils dev-lang/perl" -RDEPEND="!!media-sound/alsa-headers" +RDEPEND="" S=${WORKDIR}/gentoo-headers-base-${PV} @@ -30,28 +30,19 @@ src_prepare() { [[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}/${PV}"/*.patch } -src_install() { - kernel-2_src_install - - # hrm, build system sucks - find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete - find "${ED}" -depth -type d -delete 2>/dev/null -} - src_test() { - # Make sure no uapi/ include paths are used by accident. - egrep -r \ - -e '# *include.*["<]uapi/' \ - "${D}" && die "#include uapi/xxx detected" - einfo "Possible unescaped attribute/type usage" egrep -r \ -e '(^|[[:space:](])(asm|volatile|inline)[[:space:](]' \ -e '\<([us](8|16|32|64))\>' \ . - einfo "Missing linux/types.h include" - egrep -l -r -e '__[us](8|16|32|64)' "${ED}" | xargs grep -L linux/types.h - emake ARCH=$(tc-arch-kernel) headers_check } + +src_install() { + kernel-2_src_install + + find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete + find "${ED}" -depth -type d -delete 2>/dev/null +} diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.15-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.15-r1.ebuild deleted file mode 100644 index 40da92cde1..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.15-r1.ebuild +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -ETYPE="headers" -H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 bfin cris frv hexagon hppa ia64 m32r m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 riscv s390 score sh sparc tile x86 xtensa" -inherit kernel-2 -detect_version - -PATCH_VER="1" -SRC_URI="mirror://gentoo/gentoo-headers-base-${PV}.tar.xz - ${PATCH_VER:+mirror://gentoo/gentoo-headers-${PV}-${PATCH_VER}.tar.xz}" - -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux" - -DEPEND="app-arch/xz-utils - dev-lang/perl" -RDEPEND="!!media-sound/alsa-headers" - -S=${WORKDIR}/gentoo-headers-base-${PV} - -src_unpack() { - unpack ${A} -} - -src_prepare() { - default - - [[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}/${PV}"/*.patch -} - -src_install() { - kernel-2_src_install - - # hrm, build system sucks - find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete - find "${ED}" -depth -type d -delete 2>/dev/null -} - -src_test() { - # Make sure no uapi/ include paths are used by accident. - egrep -r \ - -e '# *include.*["<]uapi/' \ - "${D}" && die "#include uapi/xxx detected" - - einfo "Possible unescaped attribute/type usage" - egrep -r \ - -e '(^|[[:space:](])(asm|volatile|inline)[[:space:](]' \ - -e '\<([us](8|16|32|64))\>' \ - . - - einfo "Missing linux/types.h include" - egrep -l -r -e '__[us](8|16|32|64)' "${ED}" | xargs grep -L linux/types.h - - emake ARCH=$(tc-arch-kernel) headers_check -} diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.16-r2.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.16-r2.ebuild deleted file mode 100644 index a8906fa894..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.16-r2.ebuild +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -ETYPE="headers" -H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 bfin cris frv hexagon hppa ia64 m32r m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 riscv s390 score sh sparc tile x86 xtensa" -inherit kernel-2 -detect_version - -PATCH_VER="1" -SRC_URI="mirror://gentoo/gentoo-headers-base-${PV}-r1.tar.xz - ${PATCH_VER:+mirror://gentoo/gentoo-headers-${PV}-${PATCH_VER}.tar.xz} - https://dev.gentoo.org/~slyfox/distfiles/gentoo-headers-base-${PV}-r1.tar.xz - ${PATCH_VER:+https://dev.gentoo.org/~slyfox/distfiles/gentoo-headers-${PV}-${PATCH_VER}.tar.xz} -" - -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux" - -DEPEND="app-arch/xz-utils - dev-lang/perl" -RDEPEND="!!media-sound/alsa-headers" - -S=${WORKDIR}/gentoo-headers-base-${PV} - -src_unpack() { - unpack ${A} -} - -src_prepare() { - default - - [[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}/${PV}"/*.patch -} - -src_install() { - kernel-2_src_install - - # hrm, build system sucks - find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete - find "${ED}" -depth -type d -delete 2>/dev/null -} - -src_test() { - # Make sure no uapi/ include paths are used by accident. - egrep -r \ - -e '# *include.*["<]uapi/' \ - "${D}" && die "#include uapi/xxx detected" - - einfo "Possible unescaped attribute/type usage" - egrep -r \ - -e '(^|[[:space:](])(asm|volatile|inline)[[:space:](]' \ - -e '\<([us](8|16|32|64))\>' \ - . - - einfo "Missing linux/types.h include" - egrep -l -r -e '__[us](8|16|32|64)' "${ED}" | xargs grep -L linux/types.h - - emake ARCH=$(tc-arch-kernel) headers_check -} diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.16.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.16.ebuild deleted file mode 100644 index d8d375b40a..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.16.ebuild +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -ETYPE="headers" -H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 bfin cris frv hexagon hppa ia64 m32r m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 riscv s390 score sh sparc tile x86 xtensa" -inherit kernel-2 -detect_version - -PATCH_VER="1" -SRC_URI="mirror://gentoo/gentoo-headers-base-${PV}.tar.xz - ${PATCH_VER:+mirror://gentoo/gentoo-headers-${PV}-${PATCH_VER}.tar.xz} - https://dev.gentoo.org/~slyfox/distfiles/gentoo-headers-base-${PV}.tar.xz - ${PATCH_VER:+https://dev.gentoo.org/~slyfox/distfiles/gentoo-headers-${PV}-${PATCH_VER}.tar.xz} -" - -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux" - -DEPEND="app-arch/xz-utils - dev-lang/perl" -RDEPEND="!!media-sound/alsa-headers" - -S=${WORKDIR}/gentoo-headers-base-${PV} - -src_unpack() { - unpack ${A} -} - -src_prepare() { - default - - [[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/${PV} -} - -src_install() { - kernel-2_src_install - - # hrm, build system sucks - find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete - find "${ED}" -depth -type d -delete 2>/dev/null -} - -src_test() { - # Make sure no uapi/ include paths are used by accident. - egrep -r \ - -e '# *include.*["<]uapi/' \ - "${D}" && die "#include uapi/xxx detected" - - einfo "Possible unescaped attribute/type usage" - egrep -r \ - -e '(^|[[:space:](])(asm|volatile|inline)[[:space:](]' \ - -e '\<([us](8|16|32|64))\>' \ - . - - einfo "Missing linux/types.h include" - egrep -l -r -e '__[us](8|16|32|64)' "${ED}" | xargs grep -L linux/types.h - - emake ARCH=$(tc-arch-kernel) headers_check -} diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.17.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.17.ebuild deleted file mode 100644 index e8a619480c..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.17.ebuild +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -ETYPE="headers" -H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 cris frv hexagon hppa ia64 m32r m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 riscv s390 score sh sparc x86 xtensa" -inherit kernel-2 -detect_version - -PATCH_VER="1" -SRC_URI="mirror://gentoo/gentoo-headers-base-${PV}.tar.xz - ${PATCH_VER:+mirror://gentoo/gentoo-headers-${PV}-${PATCH_VER}.tar.xz}" - -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux" - -DEPEND="app-arch/xz-utils - dev-lang/perl" -RDEPEND="!!media-sound/alsa-headers" - -S=${WORKDIR}/gentoo-headers-base-${PV} - -src_unpack() { - unpack ${A} -} - -src_prepare() { - default - - [[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}"/${PV}/*.patch -} - -src_install() { - kernel-2_src_install - - # hrm, build system sucks - find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete - find "${ED}" -depth -type d -delete 2>/dev/null -} - -src_test() { - # Make sure no uapi/ include paths are used by accident. - egrep -r \ - -e '# *include.*["<]uapi/' \ - "${D}" && die "#include uapi/xxx detected" - - einfo "Possible unescaped attribute/type usage" - egrep -r \ - -e '(^|[[:space:](])(asm|volatile|inline)[[:space:](]' \ - -e '\<([us](8|16|32|64))\>' \ - . - - einfo "Missing linux/types.h include" - egrep -l -r -e '__[us](8|16|32|64)' "${ED}" | xargs grep -L linux/types.h - - emake ARCH=$(tc-arch-kernel) headers_check -} diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.18.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.18.ebuild deleted file mode 100644 index 1d8f8e6123..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.18.ebuild +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -ETYPE="headers" -H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 cris frv hexagon hppa ia64 m32r m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 riscv s390 score sh sparc x86 xtensa" -inherit kernel-2 -detect_version - -PATCH_VER="1" -SRC_URI="mirror://gentoo/gentoo-headers-base-${PV}.tar.xz - https://dev.gentoo.org/~slyfox/distfiles/gentoo-headers-base-${PV}.tar.xz - ${PATCH_VER:+mirror://gentoo/gentoo-headers-${PV}-${PATCH_VER}.tar.xz} - ${PATCH_VER:+https://dev.gentoo.org/~slyfox/distfiles/gentoo-headers-${PV}-${PATCH_VER}.tar.xz} -" - -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux" - -DEPEND="app-arch/xz-utils - dev-lang/perl" -RDEPEND="" - -S=${WORKDIR}/gentoo-headers-base-${PV} - -src_unpack() { - unpack ${A} -} - -src_prepare() { - default - - [[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}"/${PV}/*.patch -} - -src_install() { - kernel-2_src_install - - # hrm, build system sucks - find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete - find "${ED}" -depth -type d -delete 2>/dev/null -} - -src_test() { - # Make sure no uapi/ include paths are used by accident. - egrep -r \ - -e '# *include.*["<]uapi/' \ - "${D}" && die "#include uapi/xxx detected" - - einfo "Possible unescaped attribute/type usage" - egrep -r \ - -e '(^|[[:space:](])(asm|volatile|inline)[[:space:](]' \ - -e '\<([us](8|16|32|64))\>' \ - . - - einfo "Missing linux/types.h include" - egrep -l -r -e '__[us](8|16|32|64)' "${ED}" | xargs grep -L linux/types.h - - emake ARCH=$(tc-arch-kernel) headers_check -} diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.19.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.19.ebuild index 1d8f8e6123..054c22728d 100644 --- a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.19.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.19.ebuild @@ -1,11 +1,11 @@ -# Copyright 1999-2018 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI="6" ETYPE="headers" -H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 cris frv hexagon hppa ia64 m32r m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 riscv s390 score sh sparc x86 xtensa" -inherit kernel-2 +H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 cris frv hexagon hppa ia64 m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 riscv s390 score sh sparc x86 xtensa" +inherit kernel-2 toolchain-funcs detect_version PATCH_VER="1" @@ -15,7 +15,7 @@ SRC_URI="mirror://gentoo/gentoo-headers-base-${PV}.tar.xz ${PATCH_VER:+https://dev.gentoo.org/~slyfox/distfiles/gentoo-headers-${PV}-${PATCH_VER}.tar.xz} " -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" DEPEND="app-arch/xz-utils dev-lang/perl" @@ -33,28 +33,19 @@ src_prepare() { [[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}"/${PV}/*.patch } -src_install() { - kernel-2_src_install - - # hrm, build system sucks - find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete - find "${ED}" -depth -type d -delete 2>/dev/null -} - src_test() { - # Make sure no uapi/ include paths are used by accident. - egrep -r \ - -e '# *include.*["<]uapi/' \ - "${D}" && die "#include uapi/xxx detected" - einfo "Possible unescaped attribute/type usage" egrep -r \ -e '(^|[[:space:](])(asm|volatile|inline)[[:space:](]' \ -e '\<([us](8|16|32|64))\>' \ . - einfo "Missing linux/types.h include" - egrep -l -r -e '__[us](8|16|32|64)' "${ED}" | xargs grep -L linux/types.h - emake ARCH=$(tc-arch-kernel) headers_check } + +src_install() { + kernel-2_src_install + + find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete + find "${ED}" -depth -type d -delete 2>/dev/null +} diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.20.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.20.ebuild deleted file mode 100644 index 1d8f8e6123..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.20.ebuild +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -ETYPE="headers" -H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 cris frv hexagon hppa ia64 m32r m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 riscv s390 score sh sparc x86 xtensa" -inherit kernel-2 -detect_version - -PATCH_VER="1" -SRC_URI="mirror://gentoo/gentoo-headers-base-${PV}.tar.xz - https://dev.gentoo.org/~slyfox/distfiles/gentoo-headers-base-${PV}.tar.xz - ${PATCH_VER:+mirror://gentoo/gentoo-headers-${PV}-${PATCH_VER}.tar.xz} - ${PATCH_VER:+https://dev.gentoo.org/~slyfox/distfiles/gentoo-headers-${PV}-${PATCH_VER}.tar.xz} -" - -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux" - -DEPEND="app-arch/xz-utils - dev-lang/perl" -RDEPEND="" - -S=${WORKDIR}/gentoo-headers-base-${PV} - -src_unpack() { - unpack ${A} -} - -src_prepare() { - default - - [[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}"/${PV}/*.patch -} - -src_install() { - kernel-2_src_install - - # hrm, build system sucks - find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete - find "${ED}" -depth -type d -delete 2>/dev/null -} - -src_test() { - # Make sure no uapi/ include paths are used by accident. - egrep -r \ - -e '# *include.*["<]uapi/' \ - "${D}" && die "#include uapi/xxx detected" - - einfo "Possible unescaped attribute/type usage" - egrep -r \ - -e '(^|[[:space:](])(asm|volatile|inline)[[:space:](]' \ - -e '\<([us](8|16|32|64))\>' \ - . - - einfo "Missing linux/types.h include" - egrep -l -r -e '__[us](8|16|32|64)' "${ED}" | xargs grep -L linux/types.h - - emake ARCH=$(tc-arch-kernel) headers_check -} diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.4.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.4.ebuild index bcde8d816d..a0a0c46682 100644 --- a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.4.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.4.ebuild @@ -1,22 +1,22 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="4" +EAPI=6 ETYPE="headers" H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 bfin cris frv hexagon hppa ia64 m32r m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 s390 score sh sparc tile x86 xtensa" -inherit kernel-2 +inherit kernel-2 toolchain-funcs detect_version PATCH_VER="1" SRC_URI="mirror://gentoo/gentoo-headers-base-${PV}.tar.xz ${PATCH_VER:+mirror://gentoo/gentoo-headers-${PV}-${PATCH_VER}.tar.xz}" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" DEPEND="app-arch/xz-utils dev-lang/perl" -RDEPEND="!!media-sound/alsa-headers" +RDEPEND="" S=${WORKDIR}/gentoo-headers-base-${PV} @@ -25,31 +25,24 @@ src_unpack() { } src_prepare() { - [[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/${PV} -} + default -src_install() { - kernel-2_src_install - - # hrm, build system sucks - find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete - find "${ED}" -depth -type d -delete 2>/dev/null + [[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}/${PV}"/*.patch } src_test() { - # Make sure no uapi/ include paths are used by accident. - egrep -r \ - -e '# *include.*["<]uapi/' \ - "${D}" && die "#include uapi/xxx detected" - einfo "Possible unescaped attribute/type usage" egrep -r \ -e '(^|[[:space:](])(asm|volatile|inline)[[:space:](]' \ -e '\<([us](8|16|32|64))\>' \ . - einfo "Missing linux/types.h include" - egrep -l -r -e '__[us](8|16|32|64)' "${ED}" | xargs grep -L linux/types.h - emake ARCH=$(tc-arch-kernel) headers_check } + +src_install() { + kernel-2_src_install + + find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete + find "${ED}" -depth -type d -delete 2>/dev/null +} diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.9.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.9.ebuild index 8bf00710ad..caa72fcf23 100644 --- a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.9.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.9.ebuild @@ -1,22 +1,22 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="5" +EAPI=6 ETYPE="headers" H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 bfin cris frv hexagon hppa ia64 m32r m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 s390 score sh sparc tile x86 xtensa" -inherit kernel-2 +inherit kernel-2 toolchain-funcs detect_version PATCH_VER="1" SRC_URI="mirror://gentoo/gentoo-headers-base-${PV}.tar.xz ${PATCH_VER:+mirror://gentoo/gentoo-headers-${PV}-${PATCH_VER}.tar.xz}" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" DEPEND="app-arch/xz-utils dev-lang/perl" -RDEPEND="!!media-sound/alsa-headers" +RDEPEND="" S=${WORKDIR}/gentoo-headers-base-${PV} @@ -25,31 +25,24 @@ src_unpack() { } src_prepare() { - [[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/${PV} -} + default -src_install() { - kernel-2_src_install - - # hrm, build system sucks - find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete - find "${ED}" -depth -type d -delete 2>/dev/null + [[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}/${PV}"/*.patch } src_test() { - # Make sure no uapi/ include paths are used by accident. - egrep -r \ - -e '# *include.*["<]uapi/' \ - "${D}" && die "#include uapi/xxx detected" - einfo "Possible unescaped attribute/type usage" egrep -r \ -e '(^|[[:space:](])(asm|volatile|inline)[[:space:](]' \ -e '\<([us](8|16|32|64))\>' \ . - einfo "Missing linux/types.h include" - egrep -l -r -e '__[us](8|16|32|64)' "${ED}" | xargs grep -L linux/types.h - emake ARCH=$(tc-arch-kernel) headers_check } + +src_install() { + kernel-2_src_install + + find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete + find "${ED}" -depth -type d -delete 2>/dev/null +} diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.8.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.10.ebuild similarity index 75% rename from sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.8.ebuild rename to sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.10.ebuild index b1804f8d21..7bb1f871f1 100644 --- a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.8.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.10.ebuild @@ -1,10 +1,10 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI="6" ETYPE="headers" -H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 cris frv hexagon hppa ia64 m32r m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 riscv s390 score sh sparc x86 xtensa" +H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 cris frv hexagon hppa ia64 m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 riscv s390 score sh sparc x86 xtensa" inherit kernel-2 toolchain-funcs detect_version @@ -15,7 +15,7 @@ SRC_URI="${KERNEL_URI} ${PATCH_VER:+https://dev.gentoo.org/~slyfox/distfiles/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz} " -KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 amd64-linux ~x86-linux" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" DEPEND="app-arch/xz-utils dev-lang/perl" @@ -33,14 +33,13 @@ src_prepare() { default } -src_install() { - kernel-2_src_install - - # hrm, build system sucks - find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete - find "${ED}" -depth -type d -delete 2>/dev/null -} - src_test() { emake headers_check ${xmakeopts} } + +src_install() { + kernel-2_src_install + + find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete + find "${ED}" -depth -type d -delete 2>/dev/null +} diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.11.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.11.ebuild new file mode 100644 index 0000000000..47598e3e96 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.11.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +ETYPE="headers" +H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 cris frv hexagon hppa ia64 m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 riscv s390 score sh sparc x86 xtensa" +inherit kernel-2 toolchain-funcs +detect_version + +PATCH_PV=${PV} # to ease testing new versions against not existing patches +PATCH_VER="1" +SRC_URI="${KERNEL_URI} + ${PATCH_VER:+mirror://gentoo/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz} + ${PATCH_VER:+https://dev.gentoo.org/~slyfox/distfiles/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz} +" + +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" + +DEPEND="app-arch/xz-utils + dev-lang/perl" +RDEPEND="" + +S=${WORKDIR}/linux-${PV} + +src_unpack() { + unpack ${A} +} + +src_prepare() { + [[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}"/${PATCH_PV}/*.patch + + default +} + +src_test() { + emake headers_check ${xmakeopts} +} + +src_install() { + kernel-2_src_install + + find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete + find "${ED}" -depth -type d -delete 2>/dev/null +} diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.12.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.12.ebuild new file mode 100644 index 0000000000..d17f51addf --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.12.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +ETYPE="headers" +H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 cris frv hexagon hppa ia64 m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 riscv s390 score sh sparc x86 xtensa" +inherit kernel-2 toolchain-funcs +detect_version + +PATCH_PV=${PV} # to ease testing new versions against not existing patches +PATCH_VER="1" +SRC_URI="${KERNEL_URI} + ${PATCH_VER:+mirror://gentoo/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz} + ${PATCH_VER:+https://dev.gentoo.org/~slyfox/distfiles/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz} +" + +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" + +BDEPEND="app-arch/xz-utils + dev-lang/perl" + +S=${WORKDIR}/linux-${PV} + +src_unpack() { + unpack ${A} +} + +src_prepare() { + [[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}"/${PATCH_PV}/*.patch + + default +} + +src_test() { + emake headers_check ${xmakeopts} +} + +src_install() { + kernel-2_src_install + + find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete + find "${ED}" -depth -type d -delete 2>/dev/null +} diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.13.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.13.ebuild new file mode 100644 index 0000000000..ae7ecd30fe --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.13.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +ETYPE="headers" +H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 cris frv hexagon hppa ia64 m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 riscv s390 score sh sparc x86 xtensa" +inherit kernel-2 toolchain-funcs +detect_version + +PATCH_PV=${PV} # to ease testing new versions against not existing patches +PATCH_VER="1" +SRC_URI=" + ${KERNEL_URI} + ${PATCH_VER:+https://dev.gentoo.org/~soap/distfiles/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz}" +S="${WORKDIR}/linux-${PV}" + +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" + +BDEPEND=" + app-arch/xz-utils + dev-lang/perl" + +[[ -n ${PATCH_VER} ]] && PATCHES=( "${WORKDIR}"/${PATCH_PV} ) + +src_unpack() { + # avoid kernel-2_src_unpack + default +} + +src_prepare() { + # avoid kernel-2_src_prepare + default +} + +src_test() { + emake headers_check ${xmakeopts} +} + +src_install() { + kernel-2_src_install + + find "${ED}" \( -name '.install' -o -name '*.cmd' \) -delete || die +} diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.14.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.14.ebuild new file mode 100644 index 0000000000..248b467715 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.14.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +ETYPE="headers" +H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 cris frv hexagon hppa ia64 m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 riscv s390 score sh sparc x86 xtensa" +inherit kernel-2 toolchain-funcs +detect_version + +PATCH_PV=${PV} # to ease testing new versions against not existing patches +PATCH_VER="1" +PATCH_DEV="sam" +SRC_URI=" + ${KERNEL_URI} + ${PATCH_VER:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${CATEGORY}/${PN}/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz}" +S="${WORKDIR}/linux-${PV}" + +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" + +BDEPEND=" + app-arch/xz-utils + dev-lang/perl" + +[[ -n ${PATCH_VER} ]] && PATCHES=( "${WORKDIR}"/${PATCH_PV} ) + +src_unpack() { + # avoid kernel-2_src_unpack + default +} + +src_prepare() { + # avoid kernel-2_src_prepare + default +} + +src_test() { + emake headers_check ${xmakeopts} +} + +src_install() { + kernel-2_src_install + + find "${ED}" \( -name '.install' -o -name '*.cmd' \) -delete || die +} diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.4-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.4-r1.ebuild new file mode 100644 index 0000000000..1d60107656 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.4-r1.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +ETYPE="headers" +H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 cris frv hexagon hppa ia64 m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 riscv s390 score sh sparc x86 xtensa" +inherit kernel-2 toolchain-funcs +detect_version + +PATCH_PV=${PV} # to ease testing new versions against not existing patches +PATCH_VER="2" +SRC_URI="${KERNEL_URI} + ${PATCH_VER:+mirror://gentoo/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz} + ${PATCH_VER:+https://dev.gentoo.org/~slyfox/distfiles/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz} +" + +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" + +DEPEND="app-arch/xz-utils + dev-lang/perl" +RDEPEND="" + +S=${WORKDIR}/linux-${PV} + +src_unpack() { + unpack ${A} +} + +src_prepare() { + [[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}"/${PATCH_PV}/*.patch + + default +} + +src_test() { + emake ARCH=$(tc-arch-kernel) headers_check +} + +src_install() { + kernel-2_src_install + + find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete + find "${ED}" -depth -type d -delete 2>/dev/null +} diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.9.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.9.ebuild index 3c7e3cd2bc..47598e3e96 100644 --- a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.9.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.9.ebuild @@ -1,10 +1,10 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI="6" ETYPE="headers" -H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 cris frv hexagon hppa ia64 m32r m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 riscv s390 score sh sparc x86 xtensa" +H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 cris frv hexagon hppa ia64 m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 riscv s390 score sh sparc x86 xtensa" inherit kernel-2 toolchain-funcs detect_version @@ -33,14 +33,13 @@ src_prepare() { default } -src_install() { - kernel-2_src_install - - # hrm, build system sucks - find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete - find "${ED}" -depth -type d -delete 2>/dev/null -} - src_test() { emake headers_check ${xmakeopts} } + +src_install() { + kernel-2_src_install + + find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete + find "${ED}" -depth -type d -delete 2>/dev/null +} diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/metadata.xml b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/metadata.xml index fcf3f047e8..a40f7ecdd3 100644 --- a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/metadata.xml @@ -1,5 +1,5 @@ - + toolchain@gentoo.org From 5415cf771dd5efa5062b3dadb2ec24b7b8a4728c Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 28 Sep 2021 16:04:40 +0200 Subject: [PATCH 4/4] virtual/os-headers: Sync with gentoo It's from gentoo commit 38b155fa1bf907617067c98eb4ba3a5d0790eb1a. We bumped sys-kernel/linux-headers. Then also bump the virtual package for it. --- .../virtual/os-headers/ChangeLog | 27 ------------------- .../virtual/os-headers/Manifest | 20 -------------- .../virtual/os-headers/metadata.xml | 9 ++++--- .../virtual/os-headers/os-headers-0-r2.ebuild | 23 ++++++++++++++++ .../virtual/os-headers/os-headers-0.ebuild | 17 ------------ 5 files changed, 29 insertions(+), 67 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/virtual/os-headers/ChangeLog delete mode 100644 sdk_container/src/third_party/portage-stable/virtual/os-headers/Manifest create mode 100644 sdk_container/src/third_party/portage-stable/virtual/os-headers/os-headers-0-r2.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/virtual/os-headers/os-headers-0.ebuild diff --git a/sdk_container/src/third_party/portage-stable/virtual/os-headers/ChangeLog b/sdk_container/src/third_party/portage-stable/virtual/os-headers/ChangeLog deleted file mode 100644 index 171cb2ebd0..0000000000 --- a/sdk_container/src/third_party/portage-stable/virtual/os-headers/ChangeLog +++ /dev/null @@ -1,27 +0,0 @@ -# ChangeLog for virtual/os-headers -# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/virtual/os-headers/ChangeLog,v 1.9 2014/03/31 07:43:05 ulm Exp $ - - 31 Mar 2014; Ulrich Müller os-headers-0.ebuild: - Update to EAPI 5. Remove empty variable assignments. - - 18 Jan 2014; Mike Frysinger os-headers-0.ebuild: - Add arm64 love. - - 19 Feb 2013; Zac Medico os-headers-0.ebuild: - Add ~arm-linux keyword. - - 26 Apr 2012; Alexis Ballier os-headers-0.ebuild: - keyword ~amd64-fbsd - - 23 Mar 2012; Jeremy Olexa os-headers-0.ebuild: - fix up some linux dependency issues for Gentoo Prefix, bug 409357 - - 25 Sep 2011; Ulrich Mueller metadata.xml: - Remove myself as maintainer. - -*os-headers-0 (14 Apr 2011) - - 14 Apr 2011; Ulrich Mueller +os-headers-0.ebuild, - +metadata.xml: - Initial import, bug 358999. diff --git a/sdk_container/src/third_party/portage-stable/virtual/os-headers/Manifest b/sdk_container/src/third_party/portage-stable/virtual/os-headers/Manifest deleted file mode 100644 index 90e1ae9c50..0000000000 --- a/sdk_container/src/third_party/portage-stable/virtual/os-headers/Manifest +++ /dev/null @@ -1,20 +0,0 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA256 - -EBUILD os-headers-0.ebuild 832 SHA256 08d3f9c6ba5968b48536c649233613a3eb106248a2a2ea24508f924884b24b76 SHA512 f8a05ef78f4f0429a264263e83b7085d184708d019626f39ce440b77f56197e7faf3b79b3eae960f2d5d9618f25a16a52a39642db40b1436e43c39b9a0b1b562 WHIRLPOOL 2905aa7a7b444383ec32a6363c9a013d463991239ad55835c3b9dfac195d168c1bcb417375618605061aa394ffcdec5ea78040fefc038868f7a9c7c155456b81 -MISC ChangeLog 989 SHA256 1c0a1bcd1966d42a69539c35880603dcc6f4415355aa01981340288badc3f058 SHA512 620a59bca24d6bf8f52985f3c699fa2db80df5e90a3486638df96e36eab982bda9d3883412466ee651a1e8275ba2b1f74dc3dd94b590a47cb9f312a7ba572f96 WHIRLPOOL 74c00e73ee0334115554361d8eb6f9738e92b4a139c2145a31c4d318b98ed10f9817fce96d35d685be9fc4228fa89f0344e343409a534e82db5b64da5eaf4bc1 -MISC metadata.xml 179 SHA256 09fc0c8bb89359b67449ff1c2cccaf4cbf5fe016fe5d69e80f9d4b1acb68fe59 SHA512 b775e337b6c2bf7b613c5916d5472edba52eef7e008ef00e873867a65c0a0ace8ac67004e020714153643fb9acfbb55571e596cc3fc319ca2e8bde9b29588c60 WHIRLPOOL 84e7d9c117f9878a272a2385133fa8f954560033e686d9d5a993ac1123c35fc067f295560200320e52fcbede2e252f21c676643e61d21491ccb17ac9bbc25562 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.22 (GNU/Linux) - -iQGcBAEBCAAGBQJTOR4aAAoJEJQzkH1pP7W4gbMMAI8ZbJMgpYCOrRdywh0IMlVF -8u0toZ6ZmYjBLDGaMkJc9Ec4Gfba56zQDesQTtGGg5U8nGPkAr5wP0EkEeGq/us3 -ykDFKapLUI3RegG9H5OJkboH5hB7s9/R2pbAT48GcYkDcfaEEqIDLa9GkZNscs7L -jZ59FFv7Tn2BxL2LDK4h+WmS2VnMcPGTxGw+9a3ETtaMkEA2BqAzXeL+b6DZEXhc -pW5EY5Hrox35PFUS26mxO9lRom33ALX54CqEx1k/y9PzbQVO4yLFlqydgKGLhQVb -OxZt0ii/0JVhLzH+9EZAe+23vEiRHCvBr/TXQGz1rZXvFGaQyTdv1AzDn0gZ0Yco -oN/nsgdOYsKnrlgLF+6fclHgSFdHNbeoDORXEXNxWZnSwzA/ZePupcaiGcrCu7PO -0PhTDXuHauvmBFx8pMXjtxFi4xflccuYauvdjotpLq2RoqSlbd7lBvRLGXkh8srX -KKkMReFaiA+ylO9fO/rvTyFscEePM3cxI+ndWOio5Q== -=Hmuo ------END PGP SIGNATURE----- diff --git a/sdk_container/src/third_party/portage-stable/virtual/os-headers/metadata.xml b/sdk_container/src/third_party/portage-stable/virtual/os-headers/metadata.xml index 73b74513bc..d65b2dff50 100644 --- a/sdk_container/src/third_party/portage-stable/virtual/os-headers/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/virtual/os-headers/metadata.xml @@ -1,6 +1,9 @@ - + -toolchain -bsd + + toolchain@gentoo.org + Gentoo Toolchain Project + + diff --git a/sdk_container/src/third_party/portage-stable/virtual/os-headers/os-headers-0-r2.ebuild b/sdk_container/src/third_party/portage-stable/virtual/os-headers/os-headers-0-r2.ebuild new file mode 100644 index 0000000000..f13ba726a1 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/virtual/os-headers/os-headers-0-r2.ebuild @@ -0,0 +1,23 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Virtual for operating system headers" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + +# depend on SLOT 0 of linux-headers, because kernel-2.eclass +# sets a different SLOT for cross-building +RDEPEND=" + !prefix-guest? ( + || ( + kernel_linux? ( sys-kernel/linux-headers:0 ) + kernel_Winnt? ( + elibc_mingw? ( dev-util/mingw64-runtime ) + ) + ) + ) + prefix-guest? ( + !sys-kernel/linux-headers + )" diff --git a/sdk_container/src/third_party/portage-stable/virtual/os-headers/os-headers-0.ebuild b/sdk_container/src/third_party/portage-stable/virtual/os-headers/os-headers-0.ebuild deleted file mode 100644 index 5d0290081d..0000000000 --- a/sdk_container/src/third_party/portage-stable/virtual/os-headers/os-headers-0.ebuild +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/virtual/os-headers/os-headers-0.ebuild,v 1.9 2014/03/31 07:43:05 ulm Exp $ - -EAPI=5 - -DESCRIPTION="Virtual for operating system headers" -SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" - -# depend on SLOT 0 of linux-headers, because kernel-2.eclass -# sets a different SLOT for cross-building -RDEPEND=" - || ( - kernel_linux? ( sys-kernel/linux-headers:0 ) - !prefix? ( sys-freebsd/freebsd-lib ) - )"