Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] How to check kernel config for installed packages
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
emc
Guru
Guru


Joined: 02 Jul 2004
Posts: 387
Location: Cracow, Poland

PostPosted: Thu May 16, 2013 8:33 am    Post subject: [solved] How to check kernel config for installed packages Reply with quote

Hi,
I have a question, let's say I emerge package which need specific kernel configuration (some CONFIG_* needs to be selected) and later on during kernel upgrade I will unchecked this option.

How to check whole system (all packages) if all kernel configuration is provided, is there any gentool for it?


Last edited by emc on Thu May 16, 2013 3:06 pm; edited 1 time in total
Back to top
View user's profile Send private message
TomWij
Developer
Developer


Joined: 04 Jul 2012
Posts: 1546

PostPosted: Thu May 16, 2013 1:17 pm    Post subject: Reply with quote

Don't think so, guess it should be reasonable to do a `grep -r CONFIG_CHECK /var/db/pkg -l` and then have some algorithm that sources these ebuilds and parses those CONFIG_CHECK variables. Not sure if CONFIG_CHECK is the sole way to check config parameters.
Back to top
View user's profile Send private message
khayyam
Advocate
Advocate


Joined: 07 Jun 2012
Posts: 2187

PostPosted: Thu May 16, 2013 1:23 pm    Post subject: Re: How to check kernel config for installed packages Reply with quote

emc wrote:
I have a question, let's say I emerge package which need specific kernel configuration (some CONFIG_* needs to be selected) and later on during kernel upgrade I will unchecked this option. How to check whole system (all packages) if all kernel configuration is provided, is there any gentool for it?

emc ... there isn't such a tool, it would be extremely difficult to make such a thing. Take for example a package like wpa_supplicant, it can run as a ieee802.1x supplicant, and so only require an ethernet driver, in other usage it might require CFG80211/MAC80211, a wireless driver, RFKILL, and other CONFIG options perhaps specific to that card (LEDS, or USB_SERIAL, for instance). Then there is the question of which driver, and all the dependencies of that driver (eg, for a USB ethernet/wireless card, PCI, etc, etc). How would such a tool figure out which specific usage you had in mind when installing wpa_supplicant (and note, this is just one package of many).

Other packages such as say net-libs/libpcap have a netlink useflag and so would require CONFIG_NETFILTER_NETLINK, but it would require a lot of checks against packages, useflags, etc, to then come to the conclusion that this was in fact needed, and some useflags such as 'hardened' can be used without having grsec or selinux enabled in the kernel, so it makes the whole process of parsing out data from useflags and correlating them with config option next to impossible.

So, such a tool (should someone try to code such a thing) would more likely come up with false positives, suggest the wrong options, etc, etc ... and as the kernel is a moving target the tool would need to be constantly updated and know and understand each kernel revision, in all quite an impossible task, specifically if such a tool was for use with portage (another moving target).

best ... khay
Back to top
View user's profile Send private message
emc
Guru
Guru


Joined: 02 Jul 2004
Posts: 387
Location: Cracow, Poland

PostPosted: Thu May 16, 2013 3:06 pm    Post subject: Reply with quote

I see...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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