Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 610344 - app-emulation/virtualbox-5* USE flag 'headless' is misleading
Summary: app-emulation/virtualbox-5* USE flag 'headless' is misleading
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Viorel Munteanu
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-21 07:33 UTC by Maxxim
Modified: 2022-11-20 08:20 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 Maxxim 2017-02-21 07:33:56 UTC
The USE flag 'headless' of the package 'app-emulation/virtualbox' is misleading since VirtualBox itself provides a 'headless' feature (i.e. running VMs without any GUI output on the host), but the USE flag got nothing to do with it and instead toggles whether the VirtualBox GUI is built/installed or not.

To clear this up, I would like to suggest removing the 'headless' USE flag and instead adding the USE flag 'gui' which should be enabled by default.

Also see the related discussion on the Gentoo Wiki:
https://wiki.gentoo.org/wiki/Talk:VirtualBox#headless_or_Qt..._why_not_both_.3F
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2017-02-21 10:37:37 UTC
Why introducing the "gui" USE flag when we already have the "qt4" (vbox-5.0.x) and "qt5" (vbox-5.1.x) USE flags?
Comment 2 Maxxim 2017-02-21 11:02:42 UTC
True, but as far as understand it the 'qt5' USE flag only enables support for Qt5, i.e. with -qt5 the Qt4 GUI will be built - correct?

Also, a USE flag 'gui' would be far more intuitive.
Comment 3 Maxxim 2017-02-21 11:20:15 UTC
Never mind, I just noticed that starting with version 5.1 it's Qt5 only. But judging from the build

        !headless? (
                media-libs/libsdl:0[X,video]
                x11-libs/libX11
                x11-libs/libXcursor
                x11-libs/libXext
                x11-libs/libXmu
                x11-libs/libXt
                opengl? ( virtual/opengl media-libs/freeglut )
                qt5? (
                        dev-qt/qtcore:5
                        dev-qt/qtgui:5
                        dev-qt/qtprintsupport:5
                        dev-qt/qtwidgets:5
                        dev-qt/qtx11extras:5
                        opengl? ( dev-qt/qtopengl:5 )
                        x11-libs/libXinerama
                )
        )

would it really be wise to use the qt5 USE flag as a replacement? What happens when emerging the package with '-headless -qt5'?
Comment 4 Georgy Yakovlev archtester gentoo-dev 2017-02-21 11:20:58 UTC
(In reply to Maxxim from comment #3)
> Never mind, I just noticed that starting with version 5.1 it's Qt5 only. But
> judging from the build
> 
>         !headless? (
>                 media-libs/libsdl:0[X,video]
>                 x11-libs/libX11
>                 x11-libs/libXcursor
>                 x11-libs/libXext
>                 x11-libs/libXmu
>                 x11-libs/libXt
>                 opengl? ( virtual/opengl media-libs/freeglut )
>                 qt5? (
>                         dev-qt/qtcore:5
>                         dev-qt/qtgui:5
>                         dev-qt/qtprintsupport:5
>                         dev-qt/qtwidgets:5
>                         dev-qt/qtx11extras:5
>                         opengl? ( dev-qt/qtopengl:5 )
>                         x11-libs/libXinerama
>                 )
>         )
> 
> would it really be wise to use the qt5 USE flag as a replacement? What
> happens when emerging the package with '-headless -qt5'?

Adding to what Lars said building virtualbox's gui should depend only on qt4/qt5 useflag, like media-video/vlc does it.

USE=headless is misleading and adding separate useflag that copies functionality of qt4/qt5 useflags is pointless.

Building with qt4 (or qt5 for newer versions) should build a gui. Headless functionality remains unaffected.


I think adding qt4/qt5 to IUSE where appropriate and dropping headless is the correct way.
Some versions only support qt4 and some support only qt5. 
Maybe even replace version specific qt flag with just plain qt.
Comment 5 Georgy Yakovlev archtester gentoo-dev 2017-02-21 11:30:22 UTC
(In reply to Georgy Yakovlev from comment #4)
> (In reply to Maxxim from comment #3)
> > Never mind, I just noticed that starting with version 5.1 it's Qt5 only. But
> > judging from the build
> > 
> >         !headless? (
> >                 media-libs/libsdl:0[X,video]
> >                 x11-libs/libX11
> >                 x11-libs/libXcursor
> >                 x11-libs/libXext
> >                 x11-libs/libXmu
> >                 x11-libs/libXt
> >                 opengl? ( virtual/opengl media-libs/freeglut )
> >                 qt5? (
> >                         dev-qt/qtcore:5
> >                         dev-qt/qtgui:5
> >                         dev-qt/qtprintsupport:5
> >                         dev-qt/qtwidgets:5
> >                         dev-qt/qtx11extras:5
> >                         opengl? ( dev-qt/qtopengl:5 )
> >                         x11-libs/libXinerama
> >                 )
> >         )
> > 
> > would it really be wise to use the qt5 USE flag as a replacement? What
> > happens when emerging the package with '-headless -qt5'?
> 
> Adding to what Lars said building virtualbox's gui should depend only on
> qt4/qt5 useflag, like media-video/vlc does it.
> 
> USE=headless is misleading and adding separate useflag that copies
> functionality of qt4/qt5 useflags is pointless.
> 
> Building with qt4 (or qt5 for newer versions) should build a gui. Headless
> functionality remains unaffected.
> 
> 
> I think adding qt4/qt5 to IUSE where appropriate and dropping headless is
> the correct way.
> Some versions only support qt4 and some support only qt5. 
> Maybe even replace version specific qt flag with just plain qt.

small update. qt useflag should be version-specific according to qt people.
so it seems having just {qt4,qt5} is the way to go.
Comment 6 Ben Kohler gentoo-dev 2017-08-31 19:35:30 UTC
If you set USE="-headless -qt4 -qt5", you still get some X-related stuff, just not the configuration GUI, right?
Comment 7 Viorel Munteanu gentoo-dev 2022-11-09 13:30:50 UTC
This is the policy: https://wiki.gentoo.org/wiki/Project:Qt/Policies#Optional_support_for_a_single_Qt_version

I will remove the `headless` flag and rename `qt5` to `gui`.  There is a `sdl` flag that enables SDL support, but that is not a GUI, it's only used as a display for a running virtual machine.

The current `headless` USE flag behaviour can be obtained by building with USE='-gui -sdl -opengl' (or with all flags disabled).
Comment 8 Maxxim 2022-11-09 13:59:33 UTC
Nice to see my initial suggestion is now being considered. Took a while, though :)
Comment 9 Larry the Git Cow gentoo-dev 2022-11-20 08:20:50 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c12419a862f8b292a8d3f81ecb83ee9c47e8e45

commit 4c12419a862f8b292a8d3f81ecb83ee9c47e8e45
Author:     Viorel Munteanu <ceamac@gentoo.org>
AuthorDate: 2022-11-09 13:31:20 +0000
Commit:     Viorel Munteanu <ceamac@gentoo.org>
CommitDate: 2022-11-20 08:16:37 +0000

    app-emulation/virtualbox: drop USE headless
    
    Also rename `qt5` to `gui`.
    
    To build a headless server simply disable all flags (-gui -sdl -opengl).
    
    Closes: https://bugs.gentoo.org/610344
    Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>

 app-emulation/virtualbox/virtualbox-7.0.4.ebuild | 129 ++++++++++++-----------
 1 file changed, 68 insertions(+), 61 deletions(-)