Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 906508 - sys-kernel/gentoo-kernel-bin: install on 64ul/32ul systems
Summary: sys-kernel/gentoo-kernel-bin: install on 64ul/32ul systems
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Distribution Kernel Project
URL:
Whiteboard:
Keywords: NeedPatch
Depends on:
Blocks:
 
Reported: 2023-05-15 23:12 UTC by Robin Johnson
Modified: 2023-07-08 07:51 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2023-05-15 23:12:47 UTC
Infra would like to switch 2 older systems to sys-kernel/gentoo-kernel-bin, but there is a hiccup: They are hosts w/ 32-bit userspace and 64-bit kernel (on amd64 hardware).

The package as it stands doesn't permit this install combination.

A similar project, sys-kernel/gentoo-infra-kernel, used a USE-flag setup to provide this support. I understand this is a niche ask, but it would improve migration for older systems.

KARCH_amd64="x86_64"
KARCH_x86="x86"
BINPKG_PVR="${PVR}-${INFRA_SUFFIX}"
BINPKG_KERNEL="${PN/-sources/}-kernel-KARCH-${BINPKG_PVR}"
BINPKG_MODULES="${PN/-sources/}-modules-KARCH-${BINPKG_PVR}"

URIBASE="mirror://local.gentoo.infra/"

for kw in $KEYWORDS ; do
    [[ "${kw:0:1}" == "-" ]] && continue
    [[ "${kw:0:1}" == "~" ]] && kw=${kw:1}
    karch="KARCH_$kw" karch=${!karch}
    URIS="${URIBASE}${BINPKG_KERNEL/KARCH/${karch}}.tar.bz2
            ${URIBASE}${BINPKG_MODULES/KARCH/${karch}}.tar.bz2"
    SRC_URI+=" force_${kw}? ( ${URIS} ) "
    SRC_URI+=" ${kw}? ( ${URIS} ) "
    IUSE_arch+=" force_${kw} "
done
IUSE=$IUSE_arch
REQUIRED_USE="?? ( $IUSE_arch )"
...

src_install() {
    # Use is not valid in global scope
    use amd64 && KARCH="${KARCH_amd64}"
    if use x86; then
        uname_m=$(uname -m)
        case ${uname_m} in
            x86_64) KARCH="${KARCH_amd64}" ;;
            i*86) KARCH="${KARCH_x86}" ;;
        esac
    fi
    ...
}
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-05-16 11:06:41 UTC
Which kernel versions do you need, i.e. how far back do we need to implement this?
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2023-05-17 04:27:28 UTC
I'm hoping to move many systems to 6.1.28, so that would be fine as a starting point.
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2023-07-06 23:59:08 UTC
dist-kernel: any luck on this request?
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-07-08 07:51:31 UTC
Unfortunately not.  I've tried a while ago and didn't manage to get through all the cross mess involved.

These days I'm swamped with work and I can't dedicate any time to this.