-
Notifications
You must be signed in to change notification settings - Fork 216
Add option to disable gui in tuned #783
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: T K Sourab <[email protected]>
Signed-off-by: T K Sourab <[email protected]>
@yarda Could I get some opinion on this change? It would be really beneficial if we can add an option to add an option to specify whether the user wants to build tuned with GUI or not. This is what I'm trying to address with this change. |
I'm not sure I understand the problem here.
Which distribution are you using? I quickly checked Fedora, RHEL, Debian, Ubuntu, Alpine; all of them ship the GUI in a separate package ( Also, with your proposed changes, the build breaks on
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like @adriaan42 I really don't see the point of this, for the reasons given, but even if it is going to be done I'm not sure this is the right way. For one thing, this will still include all of the %{python_sitelib}/tuned/gtk/
files in the install.
The packaging separates those out into a GUI subpackage, but they're not easily separated from the base install. Which is why it doesn't really make sense to have a "non-gui" install mode. (Nor, fortunately, is it really necessary.)
tuned-ppd.py functions compile_plugin_docs.py $(VERSIONED_NAME) | ||
ifeq ($(INSTALL_GUI),1) | ||
cp -a tuned-gui.py tuned-gui.glade tuned-gui.desktop $(VERSIONED_NAME) | ||
endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, this is gonna break hard. release-cp
is the target for creating the release tarball, it should NOT be conditional on INSTALL_GUI
or anything else.
|
||
%install | ||
make install DESTDIR="%{buildroot}" BINDIR="%{_bindir}" SBINDIR="%{_sbindir}" \ | ||
make install INSTALL_GUI="%{?gui}" DESTDIR="%{buildroot}" BINDIR="%{_bindir}" SBINDIR="%{_sbindir}" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should use the %(with_foo}
inline macro, with %bcond_{with,without} foo
and %{with foo}
/ %{without foo}
.
make install INSTALL_GUI="%{?gui}" DESTDIR="%{buildroot}" BINDIR="%{_bindir}" SBINDIR="%{_sbindir}" \ | |
make install %{!?with_gui:INSTALL_GUI=0} DESTDIR="%{buildroot}" BINDIR="%{_bindir}" SBINDIR="%{_sbindir}" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might even be better to have a DISABLE_GUI
option instead, no default value, and ifndef
that in the Makefile. ifeq
is a pain when testing optional configs.
The other thing is, the GUI portion of tuned is insignificant. It has no meaningful "footprint". The main |
I agree:
Nevertheless, I am not against support in the
But I think in the future we will need to switch to |
Thank you for the comments. This PR can be closed. |
Allow users to control whether they want to install tuned gui or not.
Having gui in tuned is not beneficial in cloud environment and we can reduce the footprint by removing the files which are not needed. This ensure various Linux distributions to control whether a gui is needed or not.