Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 373011 - app-admin/eselect-gnat allow to run binaries only to root
Summary: app-admin/eselect-gnat allow to run binaries only to root
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: ada team [OBSOLETE]
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-25 17:17 UTC by Alan Grimes
Modified: 2011-07-10 17:55 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Grimes 2011-06-25 17:17:13 UTC
Instead of having an ada use flag on regular GCC, a legacy version of gcc is downloaded and the ada portions are installed. That's tolerable but what really goes wrong is that when the gnat-gcc e-build is installed an eselect is used, the Ada binaries are hidden from the user. 

Reproducible: Always

Steps to Reproduce:
Just install the package and then try to use it as a non-root user. 
Actual Results:  
Gnat binaries are visible only to ROOT. =(

Expected Results:  
All ada binaries should be available to all users. 

tortoise ~ # eselect gnat show
Current gnat version:
  x86_64-pc-linux-gnu-gnat-gcc-4.4
Comment 1 Alan Grimes 2011-06-27 16:42:00 UTC
I tried shaking gnat's eselect record up and down. Here's what happened: 


tortoise src # eselect gnat unset 1 
tortoise src # eselect gnat list
Available gnat compilers:
  [1]   x86_64-pc-linux-gnu-gnat-gcc-4.4
Installed libs:
  (no libs)                 
tortoise src # eselect gnat set 1
!!! Error: I don't recognise the selection
exiting

So the eselect script is definitely broken, It is probably the root cause of the problem described above.
Comment 2 George Shapovalov (RETIRED) gentoo-dev 2011-07-10 17:55:18 UTC
> So the eselect script is definitely broken, It is probably the root cause of
> the problem described above.
No, it just does not recognize numericals. You need to pass it the name of the desired profile (x86_64-pc-linux-gnu-gnat-gcc-4.4 in your case). Yes, it is not optimal and I plan to update this this to take numericals as well. It just not a top priority now. As a reminder (so that I actually do get around to it), please open a specific bug about this. The present bug is off topic wrt this matter.

As to the original issue: as always with the stuff that touches environment (and eselect-gnat updates PATH and some other vars IIRC), you need to source /etc/profile (like you are asked to do 100 of times in the install instructions) for every user that you intend to have access to gnat; or logout from your sessions and login again. 

As for:
>Instead of having an ada use flag on regular GCC
This is simply not possible. Gnat is a "real compiler". That is it has code written in Ada, so it requires functional gnat to compile itself. (Like gcc but for C, you don't say "bash gotta have a C use flag and lets forget about separate C compilers..").  
Now, it would have been possible for the binary distro - there you just pull in more stuff. But here we have to compile things so, you would have to have Ada in gcc unconditionally, or things will break. I would not mind myself, but this definitely would be met with protests by toolchain people and majority of users as well in fact. So, its not just "tolerable", its the way things go..