View previous topic :: View next topic |
Author |
Message |
whitt Apprentice
Joined: 28 Dec 2020 Posts: 154
|
Posted: Sat Nov 02, 2024 9:08 pm Post subject: genkernel Cannot determine KERNEL_ARCH without $VER! |
|
|
So I'm trying to update my kernel... have been using genkernel for a few years now. I ran: Code: | genkernel --oldconfig --xconfig --microcode=amd all | and received this: Code: |
* Gentoo Linux Genkernel; Version 4.3.10
* Using genkernel configuration from '/etc/genkernel.conf' ...
* Running with options: --oldconfig --xconfig --microcode=amd all
* ERROR: Kernel Makefile (/usr/src/linux/Makefile) missing. Maybe re-install the kernel sources.
* Please consult '/var/log/genkernel.log' for more information and any
* errors that were reported above.
*
* Report any genkernel bugs to bugs.gentoo.org and
* assign your bug to genkernel@gentoo.org. Please include
* as much information as you can in your bug report; attaching
* '/var/log/genkernel.log' so that your issue can be dealt with effectively.
*
* Please do *not* report kernel compilation failures as genkernel bugs! |
So: Code: | ~ » zcat /proc/config.gz > /usr/src/linux-6.9.3-gentoo/Makefile | and then tried genkernel again, then I got: Code: | Gentoo Linux Genkernel; Version 4.3.10
* Using genkernel configuration from '/etc/genkernel.conf' ...
* Running with options: --menuconfig all
/usr/share/genkernel/gen_determineargs.sh: line 112: * 1000 + : syntax error: operand expected (error token is "* 1000 + ")
* ERROR: Cannot determine KERNEL_ARCH without $VER!
* Please consult '/var/log/genkernel.log' for more information and any
* errors that were reported above.
*
* Report any genkernel bugs to bugs.gentoo.org and
* assign your bug to genkernel@gentoo.org. Please include
* as much information as you can in your bug report; attaching
* '/var/log/genkernel.log' so that your issue can be dealt with effectively.
*
* Please do *not* report kernel compilation failures as genkernel bugs! |
So here I am, with my generkenel log: Code: | ~ » cat /var/log/genkernel.log 127 ↵
>>> Started genkernel v4.3.10 on: 2024-11-02 17:00:03
* CMD_MENUCONFIG: yes
* Gentoo Linux Genkernel; Version 4.3.10
* Using genkernel configuration from '/etc/genkernel.conf' ...
* Running with options: --menuconfig all
* Resolving config file, command line, and arch default settings.
* TMPDIR defaulted to "/var/tmp/genkernel".
* LOGFILE set in config file to "/var/log/genkernel.log".
* KERNEL_DIR defaulted to "/usr/src/linux".
* KERNEL_MODULES_PREFIX not set.
* KERNEL_SOURCES defaulted to "yes".
* INITRAMFS_FILENAME defaulted to "initramfs-%%KV%%.img".
* INITRAMFS_SYMLINK_NAME defaulted to "initramfs".
* KERNEL_CONFIG_FILENAME defaulted to "kernel-config-%%KV%%".
* KERNEL_FILENAME defaulted to "vmlinuz-%%KV%%".
* KERNEL_SYMLINK_NAME defaulted to "kernel".
* SYSTEMMAP_FILENAME defaulted to "System.map-%%KV%%".
* SYSTEMMAP_SYMLINK_NAME defaulted to "System.map".
* CHECK_FREE_DISK_SPACE_BOOTDIR not set.
* CHECK_FREE_DISK_SPACE_KERNELOUTPUTDIR not set.
* COMPRESS_INITRD defaulted to "yes".
* COMPRESS_INITRD_TYPE defaulted to "best".
* CHOST defaulted to "x86_64-pc-linux-gnu".
* MAKEOPTS set in config file to "-j16".
* NICE defaulted to "10".
* KERNEL_CROSS_COMPILE not set.
* KERNEL_AS defaulted to "as".
* KERNEL_AR defaulted to "ar".
* KERNEL_CC defaulted to "gcc".
* KERNEL_CXX defaulted to "g++".
* KERNEL_CFLAGS not set.
* KERNEL_LD defaulted to "ld".
* KERNEL_MAKE defaulted to "make".
* KERNEL_NM defaulted to "nm".
* KERNEL_OBJCOPY defaulted to "objcopy".
* KERNEL_OBJDUMP defaulted to "objdump".
* KERNEL_RANLIB defaulted to "ranlib".
* KERNEL_READELF defaulted to "readelf".
* KERNEL_STRIP defaulted to "strip".
* UTILS_AS defaulted to "as".
* UTILS_AR defaulted to "ar".
* UTILS_CC defaulted to "gcc".
* UTILS_CFLAGS defaulted to "-Os -pipe -fomit-frame-pointer".
* UTILS_CXX defaulted to "g++".
* UTILS_LD defaulted to "ld".
* UTILS_NM defaulted to "nm".
* UTILS_MAKE defaulted to "make".
* UTILS_OBJCOPY defaulted to "objcopy".
* UTILS_OBJDUMP defaulted to "objdump".
* UTILS_RANLIB defaulted to "ranlib".
* UTILS_READELF defaulted to "readelf".
* UTILS_STRIP defaulted to "strip".
* CROSS_COMPILE not set.
* BOOTDIR defaulted to "/boot".
* KERNEL_APPEND_LOCALVERSION not set.
* KERNEL_LOCALVERSION defaulted to "-%%ARCH%%".
* MODPROBEDIR defaulted to "/etc/modprobe.d".
* SPLASH defaulted to "no".
* PLYMOUTH defaulted to "no".
* CLEAR_CACHEDIR set in config file to "yes".
* POSTCLEAR defaulted to "no".
* MRPROPER set in config file to "yes".
* MENUCONFIG set on command line to "yes".
* GCONFIG defaulted to "no".
* NCONFIG defaulted to "no".
* XCONFIG set in config file to "yes".
* CLEAN defaulted to "yes".
* MINKERNPACKAGE not set.
* MODULESPACKAGE not set.
* MODULEREBUILD defaulted to "yes".
* MODULEREBUILD_CMD defaulted to "emerge --ignore-default-opts --buildpkg=n --usepkg=n --quiet-build=y @module-rebuild".
* KERNCACHE not set.
* RAMDISKMODULES defaulted to "yes".
* ALLRAMDISKMODULES defaulted to "no".
* INITRAMFS_OVERLAY not set.
* LINUXRC not set.
* MOUNTBOOT set in config file to "yes".
* BUILD_STATIC defaulted to "no".
* SAVE_CONFIG set in config file to "yes".
* SYMLINK set in config file to "yes".
* OLDCONFIG set in config file to "yes".
* SANDBOX defaulted to "yes".
* SSH defaulted to "no".
* SSH_AUTHORIZED_KEYS_FILE defaulted to "/etc/dropbear/authorized_keys".
* SSH_HOST_KEYS defaulted to "create".
* STRACE defaulted to "no".
* BCACHE defaulted to "no".
* LVM defaulted to "no".
* DMRAID defaulted to "no".
* ISCSI defaulted to "no".
* HYPERV defaulted to "no".
* BOOTFONT defaulted to "none".
* BOOTLOADER set in config file to "grub2".
* B2SUM defaulted to "no".
* BUSYBOX defaulted to "yes".
* BUSYBOX_CONFIG not set.
* NFS defaulted to "yes".
* MICROCODE set in config file to "amd".
* MICROCODE_INITRAMFS defaulted to "no".
* UNIONFS defaulted to "no".
* NETBOOT defaulted to "no".
* REAL_ROOT not set.
* LUKS defaulted to "no".
* GPG defaulted to "no".
* KEYCTL defaulted to "no".
* MDADM defaulted to "no".
* MDADM_CONFIG not set.
* E2FSPROGS defaulted to "no".
* XFSPROGS defaulted to "no".
* ZFS defaulted to "no".
* BTRFS defaulted to "no".
* VIRTIO defaulted to "no".
* MULTIPATH defaulted to "no".
* FIRMWARE defaulted to "no".
* ALLFIRMWARE defaulted to "no".
* FIRMWARE_DIR defaulted to "/lib/firmware".
* FIRMWARE_FILES not set.
* FIRMWARE_INSTALL defaulted to "no".
* INTEGRATED_INITRAMFS defaulted to "no".
* WRAP_INITRD defaulted to "no".
* GENZIMAGE defaulted to "no".
* KEYMAP defaulted to "yes".
* DOKEYMAPAUTO defaulted to "no".
* STRIP_TYPE defaulted to "modules".
* INSTALL set in config file to "yes".
* CLEANUP defaulted to "yes".
* KERNEL_OUTPUTDIR defaulted to "/usr/src/linux".
* Read 'x86_64' from 'uname -m' ...
* ARCH 'x86_64' detected ...
* CBUILD set to 'x86_64-pc-linux-gnu' ...
* CHOST set to 'x86_64-pc-linux-gnu' ...
* Sourcing default modules_load from '/usr/share/genkernel/defaults/modules_load' ...
* Sourcing arch-specific config.sh from '/usr/share/genkernel/arch/x86_64/config.sh' ...
* Sourcing arch-specific modules_load from '/usr/share/genkernel/arch/x86_64/modules_load' ...
* Using '/usr/src/linux/include/config/kernel.release' to extract LOCALVERSION ...
* ERROR: Cannot determine KERNEL_ARCH without $VER!
* Please consult '/var/log/genkernel.log' for more information and any
* errors that were reported above.
*
* Report any genkernel bugs to bugs.gentoo.org and
* assign your bug to genkernel@gentoo.org. Please include
* as much information as you can in your bug report; attaching
* '/var/log/genkernel.log' so that your issue can be dealt with effectively.
*
* Please do *not* report kernel compilation failures as genkernel bugs! |
What's up with this? |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1290 Location: Richmond Hill, Canada
|
Posted: Sat Nov 02, 2024 10:14 pm Post subject: |
|
|
If you don't have linux source code installed on your machine genkernel cannot work.
/proc/config.gz is not Makefile.
your old kernel source code may got removed during world update. so likely you need to reinstall it. |
|
Back to top |
|
|
sMueggli Guru
Joined: 03 Sep 2022 Posts: 500
|
Posted: Sun Nov 03, 2024 10:14 am Post subject: |
|
|
What shows Code: | eselect kernel list | ? |
|
Back to top |
|
|
whitt Apprentice
Joined: 28 Dec 2020 Posts: 154
|
Posted: Sun Nov 03, 2024 2:28 pm Post subject: |
|
|
Oh weird... check this out: Code: | ~ » uname -r
6.9.3-gentoo-x86_64
~ » eselect kernel list
Available kernel symlink targets:
[1] linux-6.8.9-zen
[2] linux-6.10.8-zen
[3] linux-6.10.10-gentoo
[4] linux-6.10.10-zen
[5] linux-6.11.0-gentoo
[6] linux-6.11.3-gentoo
[7] linux-6.11.5-gentoo-r1
~ » ls /usr/src/lin* -dl
lrwxrwxrwx 1 root root 18 Jun 14 16:47 /usr/src/linux -> linux-6.9.3-gentoo
drwxr-xr-x 21 root root 4096 Jun 21 2023 /usr/src/linux-5.16.10-zen
drwxr-xr-x 21 root root 4096 Dec 10 2022 /usr/src/linux-5.18.16-zen
drwxr-xr-x 21 root root 4096 Jun 21 2023 /usr/src/linux-5.9.11-zen
drwxr-xr-x 22 root root 4096 Jun 24 2023 /usr/src/linux-6.0.12-zen
drwxr-xr-x 27 root root 4096 Sep 15 16:15 /usr/src/linux-6.10.10-gentoo
drwxr-xr-x 27 root root 4096 Sep 24 19:11 /usr/src/linux-6.10.10-zen
drwxr-xr-x 27 root root 4096 Sep 15 16:16 /usr/src/linux-6.10.8-zen
drwxr-xr-x 27 root root 4096 Sep 24 19:10 /usr/src/linux-6.11.0-gentoo
drwxr-xr-x 27 root root 4096 Oct 11 19:04 /usr/src/linux-6.11.3-gentoo
drwxr-xr-x 27 root root 4096 Oct 25 18:43 /usr/src/linux-6.11.5-gentoo-r1
drwxr-xr-x 22 root root 4096 Dec 23 2023 /usr/src/linux-6.2.13-zen
drwxr-xr-x 22 root root 4096 Jun 15 15:16 /usr/src/linux-6.6.3-zen
drwxr-xr-x 27 root root 4096 Jun 11 18:07 /usr/src/linux-6.8.9-zen
drwxr-xr-x 22 root root 4096 Nov 2 16:53 /usr/src/linux-6.9.3-gentoo
|
Multiple questions...
If /proc/config isn't a replacement for my Makefile, how do I recover it? I still have the source directory (it was always there), and never took steps to remove it... I actually manually work through depcleans in order to avoid removing kernel source directories, so am certain this directory has remained intact.
Why doesn't eselect show my current kernel in the list? 6.8.9 is still on the list, so it isn't because 6.9.3 is too old or something...
This is a first for me - never been down this road before... hmmmmm.....
Thanks for help!
Edited to add: Interestingly, the Makefiles for other sources are present - including ones that I haven't compiled, but not all. Code: | ~ » ls /usr/src/lin*/Makefile -l
-rw-r--r-- 1 root root 68494 Sep 15 16:14 /usr/src/linux-6.10.10-gentoo/Makefile
-rw-r--r-- 1 root root 68525 Sep 24 19:10 /usr/src/linux-6.10.10-zen/Makefile
-rw-r--r-- 1 root root 68524 Sep 15 16:15 /usr/src/linux-6.10.8-zen/Makefile
-rw-r--r-- 1 root root 68222 Sep 24 19:09 /usr/src/linux-6.11.0-gentoo/Makefile
-rw-r--r-- 1 root root 68591 Oct 11 19:03 /usr/src/linux-6.11.3-gentoo/Makefile
-rw-r--r-- 1 root root 68594 Oct 25 18:42 /usr/src/linux-6.11.5-gentoo-r1/Makefile
lrwxrwxrwx 1 root root 34 Dec 23 2023 /usr/src/linux-6.2.13-zen/Makefile -> /usr/src/linux-6.2.13-zen/Makefile
-rw-r--r-- 1 root root 67722 Jun 16 04:34 /usr/src/linux-6.8.9-zen/Makefile
-rw-r--r-- 1 root root 257064 Nov 2 16:52 /usr/src/linux-6.9.3-gentoo/Makefile
-rw-r--r-- 1 root root 257064 Nov 2 16:52 /usr/src/linux/Makefile |
It's only the 6.9.3-gentoo directory where it was missing... I'm utterly confused. |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1290 Location: Richmond Hill, Canada
|
Posted: Sun Nov 03, 2024 2:51 pm Post subject: |
|
|
I believe emerge update when it come to remove kernel source. it will leave some stuff that were not in original source code. So the directory will be kept. But it does not mean source code was kept. And the "Makefile" is part of original source.
However in you current situation I am not able to comment why eselect still have the version, since eselect kernel module is not will interrelated in to Gentoo maintenance cycle.
Hopefully your $DISTDIR is still have the version of source code and you can try to reinstall the version. |
|
Back to top |
|
|
whitt Apprentice
Joined: 28 Dec 2020 Posts: 154
|
Posted: Sun Nov 03, 2024 3:03 pm Post subject: |
|
|
Ugh - OK, so I want to reinstall gentoo-sources-6.9.3... but: Code: | ~ » equery list -po gentoo-sources
* Searching for gentoo-sources ...
[-P-] [ ] sys-kernel/gentoo-sources-5.10.226:5.10.226
[-P-] [ ] sys-kernel/gentoo-sources-5.10.227:5.10.227
[-P-] [ ] sys-kernel/gentoo-sources-5.10.228:5.10.228
[-P-] [ ] sys-kernel/gentoo-sources-5.15.167:5.15.167
[-P-] [ ] sys-kernel/gentoo-sources-5.15.168:5.15.168
[-P-] [ ] sys-kernel/gentoo-sources-5.15.169:5.15.169
[-P-] [ ] sys-kernel/gentoo-sources-5.15.170:5.15.170
[-P-] [ ] sys-kernel/gentoo-sources-6.1.111:6.1.111
[-P-] [ ] sys-kernel/gentoo-sources-6.1.112:6.1.112
[-P-] [ ] sys-kernel/gentoo-sources-6.1.113:6.1.113
[-P-] [ ] sys-kernel/gentoo-sources-6.1.114:6.1.114
[-P-] [ ] sys-kernel/gentoo-sources-6.1.115:6.1.115
[-P-] [ ] sys-kernel/gentoo-sources-6.6.52:6.6.52
[-P-] [ ] sys-kernel/gentoo-sources-6.6.57:6.6.57
[-P-] [ ] sys-kernel/gentoo-sources-6.6.58:6.6.58
[-P-] [ ] sys-kernel/gentoo-sources-6.6.58-r1:6.6.58-r1
[-P-] [ ] sys-kernel/gentoo-sources-6.6.59:6.6.59
[I--] [??] sys-kernel/gentoo-sources-6.10.10:6.10.10
[I--] [??] sys-kernel/gentoo-sources-6.11.0:6.11.0
[I--] [??] sys-kernel/gentoo-sources-6.11.3:6.11.3
[-P-] [ ] sys-kernel/gentoo-sources-6.11.4:6.11.4
[-P-] [ ] sys-kernel/gentoo-sources-6.11.5:6.11.5
[IP-] [ ] sys-kernel/gentoo-sources-6.11.5-r1:6.11.5-r1
[-P-] [ ] sys-kernel/gentoo-sources-6.11.6:6.11.6 |
Notice that 6.9.3 is NOT in the list...
How do I get an ebuild for 6.9.3? How did this happen?
Edit to add: Strangely enough, `ls /var/cache/distfiles/ -Raol |grep 6.9.3` returns no gentoo-sources-6.9.3... this had me wondering if I'd accidentally depcleaned it, but since I still have distfiles and patches for 6.8.9 (which is older) I have to doubt that... 6.8.9 remains in my eselect kernel list, and I have patches for it in my cached distfiles... so any depclean that would have nuked 6.9.3 would have nuked that as well, right?
Is there a tarball I can download and install to fix this?
How do I move on from this point? |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1290 Location: Richmond Hill, Canada
|
Posted: Sun Nov 03, 2024 4:04 pm Post subject: |
|
|
whitt wrote: | How do I get an ebuild for 6.9.3? | You can get it from Github history for sys-kernel/gentoo-sources/gentoo-sources-6.9.3.ebuild
Quote: | How did this happen? | You will have to search your memory/command history. I don't think anybody can tell. My guess will be you ran emerge --update @world which remove old and updated a new version. |
|
Back to top |
|
|
whitt Apprentice
Joined: 28 Dec 2020 Posts: 154
|
Posted: Sun Nov 03, 2024 4:08 pm Post subject: |
|
|
Thanks, but specifically how do I install from an old ebuild? I tried wgetting the ebuild and emerging it from shell, no dice. There has to be more to it...
How could an update have removed 6.9.3 but not all the older sources? I go out of my way to make sure the old sources aren't wiped out. Something strange happened here... It's obviously been a while since I updated the kernel, so going through my history is not going to be easy.
At this point, I'd be happy just to get into a state I can update to the latest...
Thanks for help |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22729
|
Posted: Sun Nov 03, 2024 4:17 pm Post subject: |
|
|
If you just want to update, you could switch to a currently supported kernel. I think the entire 6.9.x line is end-of-life, which is why the ebuilds for those versions are no longer in ::portage.
I think with the way the Gentoo kernels are slotted, updates will not remove older versions, so something must have removed this specific version. We would need to see what you did to understand why. |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1290 Location: Richmond Hill, Canada
|
Posted: Sun Nov 03, 2024 4:26 pm Post subject: |
|
|
whitt wrote: | I tried wgetting the ebuild and emerging it from shell, no dice. There has to be more to it... | You are correct, there are more to it. You will need to create a local repo and place the ebuild into the local repo and setup portage to use the local repo and emerge target that specific version.
If you wish you can learn above concept start from here.
Quote: | How could an update have removed 6.9.3 but not all the older sources? I go out of my way to make sure the old sources aren't wiped out. Something strange happened here... It's obviously been a while since I updated the kernel, so going through my history is not going to be easy. | No it is not going to be easy. Gentoo maintenance is NOT about running emerge -u @would. It is hard to tell how you "go out of my way to make sure the old sources aren't wiped out" without any information of what is that "way".
Quote: | At this point, I'd be happy just to get into a state I can update to the latest... | Just use eselect kernel set to the version you want and try to use right .config for your hardware.
Genkernel should be able work from there.
Basically the /usr/src/linux need to point to the right version of source code tree. |
|
Back to top |
|
|
Chiitoo Administrator
Joined: 28 Feb 2010 Posts: 2734 Location: Here and Away Again
|
Posted: Sun Nov 03, 2024 4:32 pm Post subject: |
|
|
If you don't keep logs for individual packages, you might at least have '/var/log/emerge.log' which should be able to tell you when it was removed (though indeed, the directory should stick around if there are any generated files such as '.config' in there, with said files intact).
As for why the others are around, are they in your '/var/lib/portage/world' file perhaps or do you manually exclude them usually from 'depclean'? _________________ Kindest of regardses. |
|
Back to top |
|
|
whitt Apprentice
Joined: 28 Dec 2020 Posts: 154
|
Posted: Sun Nov 03, 2024 9:32 pm Post subject: |
|
|
Oh boy... Well. I'll try the local repo route and see where I get.
As far as "the way" I don't let depclean remove my kernel sources, it's simple (I just don't let depclean do anything). I run depclean -pv to get a list of packages to remove, and then remove the packages in the list w/out removing my kernel sources (or other important stuff) manually, either with a list and quick & dirty script or just manually concatenating the package list into the arguments of a call to emerge -Cav.
Anyway - even if I had depcleaned gentoo-sources-6.9.3, why would it have only removed it from eselect's kernel list, nuked the Makefile, and left literally everything else? It quite literally didn't remove it... the sources are right in /usr/src/ with /usr/src/linux pointed directly at them.
Re world file, I do have gentoo-sources in world, because that's how I emerge the latest kernel... Not gentoo-sources-6.9.3 of course, just gentoo-sources.
Anyway - thanks for help. I suspect I'll be back with more stupid questions if I run into challenges... |
|
Back to top |
|
|
whitt Apprentice
Joined: 28 Dec 2020 Posts: 154
|
Posted: Sun Nov 03, 2024 10:16 pm Post subject: |
|
|
Agh! OK - so I added local repo, per instructions here.
I've got local_repo setup now: Code: | ➜ repos/local_repo/sys-kernel » eselect repository list -i 1 ↵
Available repositories:
[52] brave-overlay @
[71] crossdev @
[88] eclipse @
[133] gentoo # (https://gentoo.org/)
[152] guru * (https://wiki.gentoo.org/wiki/Project:GURU)
[204] local_repo @
[270] pinkbyte @
[328] snapd @
[339] steam-overlay # (https://github.com/anyc/steam-overlay) |
And I used wget to grab the ebuild: Code: | ➜ repos/local_repo/sys-kernel » cat ./gentoo-sources-6.9.3.ebuild
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
ETYPE="sources"
K_WANT_GENPATCHES="base extras experimental"
K_GENPATCHES_VER="4"
inherit kernel-2
detect_version
detect_arch
DESCRIPTION="Full sources including the Gentoo patchset for the ${KV_MAJOR}.${KV_MINOR} kernel tree"
HOMEPAGE="https://dev.gentoo.org/~mpagano/genpatches"
SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa -ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
IUSE="experimental"
pkg_postinst() {
kernel-2_pkg_postinst
einfo "For more info on this patchset, and how to report problems, see:"
einfo "${HOMEPAGE}"
}
pkg_postrm() {
kernel-2_pkg_postrm
} |
And I am unable to sync local_repo... Unsurprisingly, if I try to emerge it, I come up empty: Code: | ➜ repos/local_repo/sys-kernel » emerge -av =sys-kernel/gentoo-sources-6.9.3::local_repo
zsh: sys-kernel/gentoo-sources-6.9.3::local_repo not found |
When I try to sync, I get this: Code: | ➜ repos/local_repo/sys-kernel » emaint sync -r local_repo 1 ↵
* The specified repo(s) have sync disabled: local_repo
...returning |
And I have found no instructions on dealing with this... Other issues I'm finding are related to syncing remote repos, not local. Docs on repos.conf don't tell me what sync-type may be other than git - which I'm assuming is inapplicable to this, so sync-type and sync-uri are missing from this entry. Seems the documentation is not quite complete, or maybe I missed something??? My eselect-repo.conf entry for local_repo: Code: | [local_repo]
location = /var/db/repos/local_repo |
Which as far as I can tell, was automagically created when I created the repo...
Help? |
|
Back to top |
|
|
Chiitoo Administrator
Joined: 28 Feb 2010 Posts: 2734 Location: Here and Away Again
|
Posted: Mon Nov 04, 2024 10:20 am Post subject: |
|
|
whitt wrote: | Oh boy... Well. I'll try the local repo route and see where I get. |
Do you actually really want this version of the sources/ebuild back, though, or would upgrading work as well?
whitt wrote: | As far as "the way" I don't let depclean remove my kernel sources, it's simple (I just don't let depclean do anything). I run depclean -pv to get a list of packages to remove, and then remove the packages in the list w/out removing my kernel sources (or other important stuff) manually, either with a list and quick & dirty script or just manually concatenating the package list into the arguments of a call to emerge -Cav. |
There is the 'exclude' option, too, which works with 'depclean' as well. :]
whitt wrote: | Anyway - even if I had depcleaned gentoo-sources-6.9.3, why would it have only removed it from eselect's kernel list, nuked the Makefile, and left literally everything else? It quite literally didn't remove it... the sources are right in /usr/src/ with /usr/src/linux pointed directly at them. |
Are you quite sure about the actual sources being there?
Indeed, all the built files will be left behind, and need to be manually cleaned, and the symlink will not be updated until 'eselect kernel set $listNumber' is run.
whitt wrote: | And I am unable to sync local_repo... Unsurprisingly, if I try to emerge it, I come up empty: Code: | ➜ repos/local_repo/sys-kernel » emerge -av =sys-kernel/gentoo-sources-6.9.3::local_repo
zsh: sys-kernel/gentoo-sources-6.9.3::local_repo not found |
|
Is this a 'zsh' thing perhaps?
I'd more expect to see something like this:
Code: | # emerge -av =sys-kernel/gentoo-sources-6.9.3::local_repo
These are the packages that would be merged:
Calculating dependencies ... done!
Dependency resolution took 0.87 s (backtrack: 0/20).
emerge: there are no ebuilds to satisfy "=sys-kernel/gentoo-sources-6.9.3::local_repo". |
whitt wrote: | When I try to sync, I get this: Code: | ➜ repos/local_repo/sys-kernel » emaint sync -r local_repo 1 ↵
* The specified repo(s) have sync disabled: local_repo
...returning |
And I have found no instructions on dealing with this... Other issues I'm finding are related to syncing remote repos, not local. Docs on repos.conf don't tell me what sync-type may be other than git - which I'm assuming is inapplicable to this, so sync-type and sync-uri are missing from this entry. Seems the documentation is not quite complete, or maybe I missed something??? My eselect-repo.conf entry for local_repo: Code: | [local_repo]
location = /var/db/repos/local_repo |
Which as far as I can tell, was automagically created when I created the repo... |
A local repository need not be synced (since well, it is local, and should probably be always in sync), though of course it could be synced from another local locale.
Also looking at your working directory and
whitt wrote: | Code: | repos/local_repo/sys-kernel » cat ./gentoo-sources-6.9.3.ebuild |
|
You'll probably see something like
Code: | ebuild: /var/db/repos/local_repo/sys-kernel/gentoo-sources-6.9.3.ebuild: does not seem to have a valid PORTDIR structure |
at some point since the package directory is missing, though probably only if using the 'ebuild' command directly on the ebuild file. _________________ Kindest of regardses.
Last edited by Chiitoo on Tue Nov 05, 2024 8:04 am; edited 1 time in total |
|
Back to top |
|
|
whitt Apprentice
Joined: 28 Dec 2020 Posts: 154
|
Posted: Mon Nov 04, 2024 2:12 pm Post subject: |
|
|
Chiitoo wrote: | Do you actually really want this version of the sources/ebuild back, though, or would upgrading work as well? |
Honestly, I'm just trying to get genkernel to build the latest. How do I start from scratch w/out manually building my kernel? I've been leaning on genkernel for years...
Chiitoo wrote: | There is the 'exclude' option, too, which works with 'depclean' as well. :] |
Yeah - played with it, but I'm just used to my backward, inefficient way... I need to get with it I guess.
Chiitoo wrote: | Are you quite sure about the actual sources being there? |
OK - so I'm completely full of it. I'm an idiot. I'm an actual idiot. I was so positive they hadn't been unmerged, I didn't even check. But: Code: | ~ » cat /var/log/emerge.log|grep gentoo-sources-6.9.3
1718397903: >>> emerge (1 of 1) sys-kernel/gentoo-sources-6.9.3 to /
blah blah blah
1718397996: ::: completed emerge (1 of 1) sys-kernel/gentoo-sources-6.9.3 to /
blah blah blah
1718526804: === Unmerging... (sys-kernel/gentoo-sources-6.9.3)
1718526808: >>> unmerge success: sys-kernel/gentoo-sources-6.9.3
|
So... yeah. I nuked it. Probably my bad management of my depcleans... I did this to myself.
Chiitoo wrote: | Is this a 'zsh' thing perhaps?
I'd more expect to see something like this:
Code: | # emerge -av =sys-kernel/gentoo-sources-6.9.3::local_repo
These are the packages that would be merged:
Calculating dependencies ... done!
Dependency resolution took 0.87 s (backtrack: 0/20).
emerge: there are no ebuilds to satisfy "=sys-kernel/gentoo-sources-6.9.3::local_repo". |
|
Chiitoo wrote: | A local repository need not be synced (since well, it is local, and should probably be always in sync). |
It's absolutely a zsh thing - the best shell on the planet. And that's what I would expect to see, if emerge had found the ebuild. But it doesn't. It doesn't find it, won't install it.
That's why I went down the sync route - I'm trying to figure out why emerge isn't seeing the ebuild.
Chiitoo wrote: | Also looking at your working directory and
whitt wrote: | Code: | repos/local_repo/sys-kernel » cat ./gentoo-sources-6.9.3.ebuild |
|
You'll probably see something like
Code: | ebuild: /var/db/repos/local_repo/sys-kernel/gentoo-sources-6.9.3.ebuild: does not seem to have a valid PORTDIR structure |
at some point since the package directory is missing, though probably only if using the 'ebuild' command directly on the ebuild file. |
Not sure I understand - but I duplicated the structure in /var/db/pkg and no luck. After trying that, I followed the linked how-to for local repos, which illustrates locating an ebuild as I had.
I just redid that - have an ebuild at sys-kernel, and one at sys-kernel/gentoo-sources-6.9.3. Check this: Code: | » pwd && ls 1 ↵
/var/db/repos/local_repo/sys-kernel
gentoo-sources-6.9.3 gentoo-sources-6.9.3.ebuild
» ls -Raol
.:
total 16
drwxr-xr-x 3 portage 4096 Nov 4 09:02 .
drwxr-xr-x 6 portage 4096 Nov 3 16:35 ..
drwxr-xr-x 2 root 4096 Nov 4 08:58 gentoo-sources-6.9.3
-rw-r--r-- 1 portage 753 Nov 3 10:29 gentoo-sources-6.9.3.ebuild
./gentoo-sources-6.9.3:
total 12
drwxr-xr-x 2 root 4096 Nov 4 08:58 .
drwxr-xr-x 3 portage 4096 Nov 4 09:02 ..
-rw-r--r-- 1 root 753 Nov 4 08:58 gentoo-sources-6.9.3.ebuild
» emerge -av =sys-kernel/gentoo-sources-6.9.3::local_repo
zsh: sys-kernel/gentoo-sources-6.9.3::local_repo not found |
And for kicks: Code: | » bash 1 ↵
/var/db/repos/local_repo/sys-kernel # emerge -av =sys-kernel/gentoo-sources-6.9.3::local_repo
* IMPORTANT: 2 news items need reading for repository 'gentoo'.
* Use eselect news read to view new items.
These are the packages that would be merged, in order:
Calculating dependencies... done!
Dependency resolution took 2.33 s (backtrack: 0/20).
emerge: there are no ebuilds to satisfy "=sys-kernel/gentoo-sources-6.9.3::local_repo". |
So... what have I done wrong?
Or - should I just abandon genkernel for now? Come on... I'll probably end up bricking my PC. Look at my admin skills... You don't want me managing this machine ; )
Thanks for help! |
|
Back to top |
|
|
Chiitoo Administrator
Joined: 28 Feb 2010 Posts: 2734 Location: Here and Away Again
|
Posted: Mon Nov 04, 2024 2:56 pm Post subject: |
|
|
whitt wrote: | Chiitoo wrote: | Do you actually really want this version of the sources/ebuild back, though, or would upgrading work as well? |
Honestly, I'm just trying to get genkernel to build the latest. How do I start from scratch w/out manually building my kernel? I've been leaning on genkernel for years... |
For me, it has been probably over 11 years since I last looked at genkernel, so I'd best not advice on anything regarding that specifically, bit I believe you should be able to grab the most previous '.config' you have around, and run with it, or generate a new one as per the usual.
That said, there is the pre-built Gentoo kernel around nowadays too, but likewise, I haven't looked into that yet myself.
whitt wrote: | Not sure I understand - but I duplicated the structure in /var/db/pkg and no luck. After trying that, I followed the linked how-to for local repos, which illustrates locating an ebuild as I had.
I just redid that - have an ebuild at sys-kernel, and one at sys-kernel/gentoo-sources-6.9.3. Check this: Code: | » pwd && ls 1 ↵
/var/db/repos/local_repo/sys-kernel
gentoo-sources-6.9.3 gentoo-sources-6.9.3.ebuild
» ls -Raol
.:
total 16
drwxr-xr-x 3 portage 4096 Nov 4 09:02 .
drwxr-xr-x 6 portage 4096 Nov 3 16:35 ..
drwxr-xr-x 2 root 4096 Nov 4 08:58 gentoo-sources-6.9.3
-rw-r--r-- 1 portage 753 Nov 3 10:29 gentoo-sources-6.9.3.ebuild
./gentoo-sources-6.9.3:
total 12
drwxr-xr-x 2 root 4096 Nov 4 08:58 .
drwxr-xr-x 3 portage 4096 Nov 4 09:02 ..
-rw-r--r-- 1 root 753 Nov 4 08:58 gentoo-sources-6.9.3.ebuild
» emerge -av =sys-kernel/gentoo-sources-6.9.3::local_repo
zsh: sys-kernel/gentoo-sources-6.9.3::local_repo not found |
And for kicks: Code: | » bash 1 ↵
/var/db/repos/local_repo/sys-kernel # emerge -av =sys-kernel/gentoo-sources-6.9.3::local_repo
* IMPORTANT: 2 news items need reading for repository 'gentoo'.
* Use eselect news read to view new items.
These are the packages that would be merged, in order:
Calculating dependencies... done!
Dependency resolution took 2.33 s (backtrack: 0/20).
emerge: there are no ebuilds to satisfy "=sys-kernel/gentoo-sources-6.9.3::local_repo". |
So... what have I done wrong? |
If you tried to 'manifest' that ebuild using the 'ebuild' command while the file in this example is in the current working directory, like so:
Code: | ebuild gentoo-sources-6.9.3.ebuild manifest |
you should see the error I mentioned before, and this is because the ebuild is expected to be under a directory structure such as:
Code: | /var/db/repos/local_repo/sys-kernel/gentoo-sources/gentoo-sources-6.9.3.ebuild |
That is, it differs a little from the '/var/db/pkg/' structure, and indeed, 'emerge' will not find it. _________________ Kindest of regardses. |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22729
|
Posted: Mon Nov 04, 2024 3:21 pm Post subject: |
|
|
Chiitoo wrote: | whitt wrote: | And I am unable to sync local_repo... Unsurprisingly, if I try to emerge it, I come up empty: Code: | ➜ repos/local_repo/sys-kernel » emerge -av =sys-kernel/gentoo-sources-6.9.3::local_repo
zsh: sys-kernel/gentoo-sources-6.9.3::local_repo not found |
| Is this a 'zsh' thing perhaps? |
Yes. In bash, the command Chiitoo posted would work as expected. In zsh, leading = is special. I have seen other forum users get tripped up by this, so now I try to remember to single-quote package atoms whenever I tell people to use a version qualifier. As far as I know, zsh will not treat = as special (and thus not get confused and do the wrong thing) when the command is written as emerge -av '=sys-kernel/gentoo-sources-6.9.3::local_repo', whereas removing the single quotes will confuse zsh (but not bash). |
|
Back to top |
|
|
whitt Apprentice
Joined: 28 Dec 2020 Posts: 154
|
Posted: Mon Nov 04, 2024 7:11 pm Post subject: |
|
|
Chiitoo - thanks for the help!
The file location btw, is /var/db/repos/local_repo/sys-kernel/gentoo-sources-6.9.3 (the same as /var/db/pkg)
I ran ebuild manifest again.
Then I changed permissions - it's all owned by portage.
emerge found it, installed it, and I'm all set. We're good.
I'll look into proper management of depclean from now on... no more quick and dirty fixes on the fly because I don't want to RTFM.
But FWIW, the documentation I followed to get the local repo set up - it does not give adequate information to walk a user through a successful setup.
Love this forum. |
|
Back to top |
|
|
Chiitoo Administrator
Joined: 28 Feb 2010 Posts: 2734 Location: Here and Away Again
|
Posted: Mon Nov 04, 2024 9:36 pm Post subject: |
|
|
whitt wrote: | Chiitoo - thanks for the help!
The file location btw, is /var/db/repos/local_repo/sys-kernel/gentoo-sources-6.9.3 (the same as /var/db/pkg)
I ran ebuild manifest again.
Then I changed permissions - it's all owned by portage.
emerge found it, installed it, and I'm all set. We're good.
|
Apologies, my sleepy eyes did miss that you also had a directory named 'gentoo-sources-6.9.3', though with that said, I still don't think that it should work, and it doesn't seem to work for me testing it now locally, but I may be forgetting and/or missing something.
Regardless, good thing is that it works!
whitt wrote: | But FWIW, the documentation I followed to get the local repo set up - it does not give adequate information to walk a user through a successful setup. |
The discussion pages that wiki articles have are a good way to raise such issues up in, and users are free to edit most of the articles directly as well to improve them all up.
whitt wrote: | Love this forum. |
I am quite fond of it myself. :]
As a sidey-note, you mentioned 'sync-type' earlier, and what its values can be. One place I can think of where this is documented in, is 'man portage'. _________________ Kindest of regardses. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|