View previous topic :: View next topic |
Author |
Message |
slamno7 n00b
Joined: 09 Jan 2003 Posts: 2
|
Posted: Thu Jan 09, 2003 4:31 pm Post subject: sudo emerge problem -> learning portage system |
|
|
Hello,
I had a problem installing sudo today, namely during the ebuild install step, sudo was compiled to look for sudoers under /var/portage... etc instead of just under /etc. This was based on a bad $FILESDIR.
I was able to fix this by just setting the environment variable, of course, but it leads me to the question of - where did this get set originally? And the larger question of - how do you go about looking for this kind of thing in the portage system? The user docs cover things at the level of use variables, etc., but where do you start looking for where this sort of thing could have been defined badly (it was not set in root's environment)? it's not clear from the ebuild - I'm really just wondering what the next step is. The developer howto is helpful but from the standpoint of trying to investigate a package I didn't develop, I don't know where to start looking. A few pointers to speed things up would be very helpful.
Thanks
Sam |
|
Back to top |
|
|
keratos68 Guru
Joined: 27 Dec 2002 Posts: 561 Location: Blackpool, Lancashire, UK.
|
Posted: Fri Jan 10, 2003 12:12 am Post subject: |
|
|
There are a number of configuration files for Portage itself, these are typically (but not always - depends if you've changed anything):
/etc/make.conf
/etc/make.profile/...
/etc/make.globals
/usr/portage/profiles/default/...
These are just the 'make' associated configs, there are others for masking unstable/invalid or just plain duff packages.
Generally, the configurations for packages themselves - i.e. when the "./configure" scripts are run following a download, are within the ebuild directories in your Portage tree:
/usr/portage/...
So, sudo is in:
/usr/portage/app-admin/sudo
And the ebuild file(s) takes on the ".ebuild" suffix.
So, if I entered:
Code: | dazzle68 root # emerge -s sudo
Searching...
[ Results for search key : sudo ]
[ Applications found : 1 ]
* app-admin/sudo
Latest version available: 1.6.6
Latest version installed: [ Not Installed ]
Size of downloaded files: 325 kB
Homepage: http://www.sudo.ws/
Description: Allows certain users/groups to run commands as root
dazzle68 sudo # vdir /usr/portage/app-admin/sudo/
total 9
-rw-r--r-- 1 root root 1513 Jan 1 16:20 ChangeLog
drwxr-xr-x 2 root root 112 Dec 30 06:29 files
-rw-r--r-- 1 root root 855 Jan 1 16:20 sudo-1.6.6.ebuild |
Then we see the .ebuild file. In here, you will find options that can be passed to the "./configure" script for a given tarball (downloaded for you) within the "econf" function. They are clearly package dependent, but maybe you should look here to define the correct $FILESDIR
K? _________________ Someone told me that "..they only ever made one mistake...."
...and that's when they said they were wrong!! |
|
Back to top |
|
|
slamno7 n00b
Joined: 09 Jan 2003 Posts: 2
|
Posted: Fri Jan 10, 2003 6:16 pm Post subject: this case might be a little different |
|
|
Ok, so I have done basically what you have said, this is a case where I am looking for a little more -
I had looked in the files in /etc, then at the ebuild. In this case, it doesn't help me that much. FILESDIR is set somewhere else outside of the ebuild, and the options there don't cover all of the options that sudo is compiled with, for instance the equivalent of -DSUDOERS_LOC=$FILESDIR... where does that come from? How do I go about looking for this kind of thing in a systematic way without poking around for an hour or two? The docs don't really cover everything you need to know to really get into it.
Thanks for the help
Sam |
|
Back to top |
|
|
keratos68 Guru
Joined: 27 Dec 2002 Posts: 561 Location: Blackpool, Lancashire, UK.
|
Posted: Fri Jan 10, 2003 7:06 pm Post subject: Re: this case might be a little different |
|
|
slamno7 wrote: | ..How do I go about looking for this kind of thing in a systematic way without poking around for an hour or two? The docs don't really cover everything you need to know to really get into it.. |
Well I must say that debugging SW is a methodical, logical and analytical process. I dont think this sort of comment helps as we have to propose points of possible errors/issues and investigate such areas in an ordered fashion. If you knew where the problem lied initially then you wouldn't be here would you !!!?
Now, lets re-focus on the problem, we've elimiated one possibility - another is that the autoconf and automake and configure and install scripts for your package are hard-coding these options from somewhere. I suggest you locate your downloaded files (possibly in /usr/portage/distfiles if you haven't changed this), unzip the tgz and hunt for these scripts. If the flags are not in the ebuild script then it is difficult to see where else (other than these other scripts) they originate from. _________________ Someone told me that "..they only ever made one mistake...."
...and that's when they said they were wrong!! |
|
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
|
|