View previous topic :: View next topic |
Author |
Message |
norange_ n00b
Joined: 18 Jul 2022 Posts: 22
|
Posted: Fri Jul 22, 2022 3:18 am Post subject: [SOLVED] Installing kernel headers from custom source |
|
|
I installed a custom source (xanmod-sources-5.18.10) from the src_prepare-overlay, and along with the kernel, I used the headers that came with it because someone told me to...
Here's what I did:
1. sudo make headers_install
2. cd'ed into the generated headers directory, in this case the default ./usr/include because I forgot to put INSTALL_HDR_PATH
3. removed and replaced all the directories inside /usr/include that were identical to the generated header directories (asm, asm-generic, drm, linux, misc, mtd, rdma, scsi, sound, video, and xen)
The question is, did I do this correctly?
Last edited by norange_ on Sun Jul 24, 2022 5:19 pm; edited 1 time in total |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 23069
|
Posted: Fri Jul 22, 2022 2:40 pm Post subject: |
|
|
No. The correct way to manage any files under /usr (other than under /usr/local) is to have Portage install what you need, where you need it, under the control of an ebuild. If there is not an ebuild that will do what you want, make one. By replacing the directories as you did, you now have headers different from what Portage believes you have, and you may have orphaned files that will cause collisions later.
Additionally, when "someone told you to" do something, you should link us to where you were told that so we can read the original advice and evaluate it, even if only after the fact. |
|
Back to top |
|
|
norange_ n00b
Joined: 18 Jul 2022 Posts: 22
|
Posted: Sat Jul 23, 2022 3:35 am Post subject: |
|
|
Hu wrote: | By replacing the directories as you did, you now have headers different from what Portage believes you have, and you may have orphaned files that will cause collisions later. |
As long as I avoid using Portage operations on the headers package, this won't be an issue, right? And, if this is indeed a problem, how do I undo what I just did? Can I simply remove or move the directories that I've replaced to a new directory before reinstalling the header package with Portage? |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 23069
|
Posted: Sat Jul 23, 2022 4:01 pm Post subject: |
|
|
Yes, if you avoid using Portage on any package that would otherwise touch the files you created by hand, you will be fine. Eventually, a glibc upgrade will probably insist on a linux-headers upgrade, at which point you will need to deal with this.
Yes, reinstalling linux-headers after cleaning out all the added files should suffice. |
|
Back to top |
|
|
norange_ n00b
Joined: 18 Jul 2022 Posts: 22
|
Posted: Sun Jul 24, 2022 3:28 pm Post subject: |
|
|
Hu wrote: | Yes, reinstalling linux-headers after cleaning out all the added files should suffice. |
Apparently scsi belongs to the glibc package. Does removing the directory and reinstalling glibc do the job? |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 23069
|
Posted: Sun Jul 24, 2022 4:25 pm Post subject: |
|
|
I would expect that to work. |
|
Back to top |
|
|
norange_ n00b
Joined: 18 Jul 2022 Posts: 22
|
Posted: Sun Jul 24, 2022 5:19 pm Post subject: |
|
|
Hu wrote: | I would expect that to work. |
Thank you for your input regarding this post. I appreciate it a lot! |
|
Back to top |
|
|
|