Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 899604 Details for
Bug 937566
virtual/linux-sources do not provide sources for dist kernels
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
proof of concept patch for kernel-build.eclass
patch (text/plain), 3.08 KB, created by
Nowa Ammerlaan
on 2024-08-08 12:54:53 UTC
(
hide
)
Description:
proof of concept patch for kernel-build.eclass
Filename:
MIME Type:
Creator:
Nowa Ammerlaan
Created:
2024-08-08 12:54:53 UTC
Size:
3.08 KB
patch
obsolete
>diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass >index c4f3db0028a9..43786c5aa6db 100644 >--- a/eclass/kernel-build.eclass >+++ b/eclass/kernel-build.eclass >@@ -55,7 +55,7 @@ BDEPEND=" > riscv? ( sys-apps/dtc ) > " > >-IUSE="+strip" >+IUSE="+strip source" > > # @ECLASS_VARIABLE: KERNEL_IUSE_MODULES_SIGN > # @PRE_INHERIT >@@ -381,21 +381,26 @@ kernel-build_src_install() { > doins "arch/${kern_arch}/kernel/module.lds" > fi > >- # remove everything but Makefile* and Kconfig* >- find -type f '!' '(' -name 'Makefile*' -o -name 'Kconfig*' ')' \ >- -delete || die >- find -type l -delete || die >+ if ! use source; then >+ # remove everything but Makefile* and Kconfig* >+ find -type f '!' '(' -name 'Makefile*' -o -name 'Kconfig*' ')' \ >+ -delete || die >+ find -type l -delete || die >+ fi > cp -p -R * "${ED}${kernel_dir}/" || die > > cd "${WORKDIR}" || die >- # strip out-of-source build stuffs from modprep >- # and then copy built files as well >- find modprep -type f '(' \ >- -name Makefile -o \ >- -name '*.[ao]' -o \ >- '(' -name '.*' -a -not -name '.config' ')' \ >- ')' -delete || die >- rm modprep/source || die >+ >+ if ! use source; then >+ # strip out-of-source build stuffs from modprep >+ # and then copy built files as well >+ find modprep -type f '(' \ >+ -name Makefile -o \ >+ -name '*.[ao]' -o \ >+ '(' -name '.*' -a -not -name '.config' ')' \ >+ ')' -delete || die >+ rm modprep/source || die >+ fi > cp -p -R modprep/. "${ED}${kernel_dir}"/ || die > # If CONFIG_MODULES=y, then kernel.release will be found in modprep as well, but not > # in case of CONFIG_MODULES is not set. >@@ -432,22 +437,24 @@ kernel-build_src_install() { > dostrip -x "${kernel_dir}/vmlinux" > fi > >- # strip empty directories >- find "${D}" -type d -empty -exec rmdir {} + || die >- >- # warn when trying to "make" a dist-kernel >- cat <<-EOF >> "${ED}${kernel_dir}/Makefile" || die >- >- _GENTOO_IS_USER_SHELL:=\$(shell [ -t 0 ] && echo 1) >- ifdef _GENTOO_IS_USER_SHELL >- \$(warning !!!! WARNING !!!!) >- \$(warning This kernel was configured and installed by the package manager.) >- \$(warning "make" should not be run manually here.) >- \$(warning See also: https://wiki.gentoo.org/wiki/Project:Distribution_Kernel) >- \$(warning See also: https://wiki.gentoo.org/wiki/Kernel/Configuration) >- \$(warning !!!! WARNING !!!!) >- endif >- EOF >+ if ! use source; then >+ # strip empty directories >+ find "${D}" -type d -empty -exec rmdir {} + || die >+ >+ # warn when trying to "make" a dist-kernel >+ cat <<-EOF >> "${ED}${kernel_dir}/Makefile" || die >+ >+ _GENTOO_IS_USER_SHELL:=\$(shell [ -t 0 ] && echo 1) >+ ifdef _GENTOO_IS_USER_SHELL >+ \$(warning !!!! WARNING !!!!) >+ \$(warning This kernel was configured and installed by the package manager.) >+ \$(warning "make" should not be run manually here.) >+ \$(warning See also: https://wiki.gentoo.org/wiki/Project:Distribution_Kernel) >+ \$(warning See also: https://wiki.gentoo.org/wiki/Kernel/Configuration) >+ \$(warning !!!! WARNING !!!!) >+ endif >+ EOF >+ fi > # add a dist-kernel identifier file > echo "${CATEGORY}/${PF}:${SLOT}" > "${ED}${kernel_dir}/dist-kernel" || die >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 937566
:
899603
| 899604