Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 184504 - app-emulation/virtualbox-9999 - move enewuser call to pkg_setup
Summary: app-emulation/virtualbox-9999 - move enewuser call to pkg_setup
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Markus Ullmann (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-07 12:23 UTC by .:deadhead:.
Modified: 2007-09-04 23:57 UTC (History)
2 users (show)

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 .:deadhead:. 2007-07-07 12:23:03 UTC
Installing VirtualBox from the live ebuild (9999) it tries to make a chown using group vboxusers at the end of compile time, during install time, but the group is created only at merge time.

Here's the output:
>>> Source compiled.
>>> Test phase [not enabled]: app-emulation/virtualbox-9999

>>> Install virtualbox-9999 into /var/tmp/portage/app-emulation/virtualbox-9999/image/ category app-emulation
 * Installing vboxdrv module
chown: `root:vboxusers': gruppo non valido
chown: `root:vboxusers': gruppo non valido
chown: `root:vboxusers': gruppo non valido
chown: `root:vboxusers': gruppo non valido
chown: `root:vboxusers': gruppo non valido
chown: `root:vboxusers': gruppo non valido
>>> Completed installing virtualbox-9999 into /var/tmp/portage/app-emulation/virtualbox-9999/image/

strip: i686-pc-linux-gnu-strip --strip-unneeded
   opt/VirtualBox/VirtualBox
   opt/VirtualBox/VBoxXPCOM.so
   opt/VirtualBox/VBoxXPCOMIPCD
   opt/VirtualBox/VBoxXPCOMIPCC.so
   opt/VirtualBox/VBoxXML.so
   opt/VirtualBox/VBoxVMM.so
   opt/VirtualBox/VBoxSVCM.so
   opt/VirtualBox/VBoxSVC
   opt/VirtualBox/VBoxSharedOpenGL.so
   opt/VirtualBox/VBoxSharedFolders.so
   opt/VirtualBox/VBoxSharedClipboard.so
   opt/VirtualBox/VBoxSDL
   opt/VirtualBox/VBoxRT.so
   opt/VirtualBox/VBoxREM.so
   opt/VirtualBox/VBoxREMImp.so
   opt/VirtualBox/VBoxManage
   opt/VirtualBox/VBoxDDU.so
   opt/VirtualBox/VBoxDD.so
   opt/VirtualBox/VBoxDD2.so
   opt/VirtualBox/VBoxC.so
   opt/VirtualBox/components/VBoxC.so
   opt/VirtualBox/components/VBoxSVCM.so
   opt/VirtualBox/components/VBoxXPCOMIPCC.so

 * QA Notice: The following files contain runtime text relocations
 *  Text relocations force the dynamic linker to perform extra
 *  work at startup, waste system resources, and may pose a security
 *  risk.  On some architectures, the code may not even function
 *  properly, if at all.
 *  For more information, see http://hardened.gentoo.org/pic-fix-guide.xml
 *  Please include this file in your report:
 *  /var/tmp/portage/app-emulation/virtualbox-9999/temp/scanelf-textrel.log
 * TEXTREL opt/VirtualBox/VBoxC.so
TEXTREL opt/VirtualBox/VBoxDD2.so
TEXTREL opt/VirtualBox/VBoxDD.so
TEXTREL opt/VirtualBox/VBoxDDU.so
TEXTREL opt/VirtualBox/VBoxREM.so
TEXTREL opt/VirtualBox/VBoxRT.so
TEXTREL opt/VirtualBox/VBoxSharedClipboard.so
TEXTREL opt/VirtualBox/VBoxSharedFolders.so
TEXTREL opt/VirtualBox/VBoxSharedOpenGL.so
TEXTREL opt/VirtualBox/VBoxSVCM.so
TEXTREL opt/VirtualBox/VBoxVMM.so
TEXTREL opt/VirtualBox/VBoxXML.so
TEXTREL opt/VirtualBox/components/VBoxSVCM.so
TEXTREL opt/VirtualBox/components/VBoxC.so


 * QA Notice: Package has poor programming practices which may compile
 *            fine but exhibit random runtime failures.
 * /var/tmp/portage/app-emulation/virtualbox-9999/work/virtualbox-9999/src/recompiler/exec.c:314: warning: dereferencing type-punned pointer will break strict-aliasing rules

>>> Merging app-emulation/virtualbox-9999 to /
 * Adding group 'vboxusers' to your system ...
 *  - Groupid: next available
--- /etc/
--- /etc/udev/
--- /etc/udev/rules.d/
>>> /etc/udev/rules.d/60-virtualbox.rules
--- /usr/
--- /usr/share/
--- /usr/share/applications/
>>> /usr/share/applications/virtualbox.desktop
--- /usr/share/pixmaps/
[...]


Reproducible: Always

Steps to Reproduce:
1.install virtualbox-9999
2.
3.

Actual Results:  
files are installed in the system with root:root permissions so nobody can run virtualbox

Expected Results:  
files installed in the system with root:vboxusers owner

this diff fix the things

78,80d77
<
<       enewgroup vboxusers
<
134a132,135
> pkg_preinst() {
>       enewgroup vboxusers
> }
>
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-07-07 12:31:59 UTC
(In reply to comment #0)

Please, use unified diffs. This is unreadable.
Comment 2 .:deadhead:. 2007-07-07 13:20:14 UTC
(In reply to comment #1)
> Please, use unified diffs. This is unreadable.
And it's even wrong :D

the problem is that all the "fowners root:vboxusers [...]" present in src_install should be moved in pkg_preinst() since from that moment there's a group called vboxusers, not before.

Or the "enewgroup 'vboxusers'" should have to be moved in pkg_setup .

Comment 3 .:deadhead:. 2007-07-07 13:23:27 UTC
(In reply to comment #2)
> Or the "enewgroup 'vboxusers'" should have to be moved in pkg_setup .
But that's against the ebuild writing guide: http://devmanual.gentoo.org/ebuild-writing/functions/index.html

Comment 4 Timothy Redaelli (RETIRED) gentoo-dev 2007-07-07 13:43:39 UTC
enewgroup should be in pkg_setup
Comment 5 Alessio Cassibba (X-Drum) 2007-07-09 21:48:08 UTC
Hi,
fixed the group creation issue in jokey's overlay[1]

Thanks for your report

[1] http://overlays.gentoo.org/dev/jokey/browser/trunk/app-emulation/virtualbox
Comment 6 Markus Ullmann (RETIRED) gentoo-dev 2007-09-04 23:57:17 UTC
Fix applied to cvs, thanks to all involved