Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Installing kernel headers from custom source
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
norange_
n00b
n00b


Joined: 18 Jul 2022
Posts: 22

PostPosted: Fri Jul 22, 2022 3:18 am    Post subject: [SOLVED] Installing kernel headers from custom source Reply with quote

​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
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23069

PostPosted: Fri Jul 22, 2022 2:40 pm    Post subject: Reply with quote

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
View user's profile Send private message
norange_
n00b
n00b


Joined: 18 Jul 2022
Posts: 22

PostPosted: Sat Jul 23, 2022 3:35 am    Post subject: Reply with quote

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
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23069

PostPosted: Sat Jul 23, 2022 4:01 pm    Post subject: Reply with quote

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
View user's profile Send private message
norange_
n00b
n00b


Joined: 18 Jul 2022
Posts: 22

PostPosted: Sun Jul 24, 2022 3:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23069

PostPosted: Sun Jul 24, 2022 4:25 pm    Post subject: Reply with quote

I would expect that to work.
Back to top
View user's profile Send private message
norange_
n00b
n00b


Joined: 18 Jul 2022
Posts: 22

PostPosted: Sun Jul 24, 2022 5:19 pm    Post subject: Reply with quote

Hu wrote:
I would expect that to work.

Thank you for your input regarding this post. I appreciate it a lot!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
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