Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Documenting USE="-*"
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 934
Location: Romania

PostPosted: Fri May 26, 2023 6:56 pm    Post subject: Documenting USE="-*" Reply with quote

As advised by our kernel/security expert, I will make a thread about using USE="-*" in make.conf.
It may not be complete as of now, but I am willing to amend it is something is pointed out.
I would not advise anyone who just installed gentoo to jump right into this, as you will need to know what USE flags you want, how to resolve portage blockers and general debugging.

Motivation:
When installing gentoo, one of the first things we do is chose a profile. That will set some USE flags and USE_EXPAND variables.
Most of those flags are easily modifiable through make.conf and package.use. There are also USE flags not modifiable through make.conf and package.use.
I will not be talking about those.
Profiles mostly set sane defaults that work with a lot of configurations. However, that also means that a lot of unneeded things get pulled in by default.
The usual way of dealing with this is to use the profile USE flags, unless specified otherwise in make.conf or pacakge.use.
While this mostly works, this fails when new use flags are added, which happens often enough.
This also fails when USE flags are toggled in the profile used.
To solve all this, I Have USE="-*" as the first USE flag in make.conf.
What this does is more or less ignore profile USE flags, by only enabling what I explicitly enable, regardless of USE flag changes.
So everything is disabled unless I enable it.
While it is possible to do this without USE="-*", you will have to follow USE flag changes and look really closely at updates.
Even then, it is very easy for things to slip through the cracks and you will likely have at least 3-4 lines on disabled USE flags in make.conf.
When I made the change from the default way of managing USE flags to using USE="-*", I got rid of 50-100 packages from my system.
As of writing this, I have 651 packages installed, which means I got rid of between 6.5 % and 13% of packages.
I would assume that most people here would want to get rid of that many useless packages from their systems.

How to:
PLEASE READ ALL OF THIS POST BEFORE STARTING. IT MIGHT SAVE YOUR SKIN LATER.
In case you didn't update recently, you will want to update @world to not have to deal with broken updates and to reduce sources of error.
You don't have to sync the repos before doing this.
You just want to make sure that no version updates happen when you update @world according to this guide, only USE flag changes.
The process is pretty self-explanatory.
You get rid of all the disabled use flags from make.conf and add -* as the first use flag.
I would also advise to switch to a minimal profile, but it's not needed.
I use:
Code:
$ eselect profile list
Available profile symlink targets:
  [1]   default/linux/amd64/17.1 (stable) *

You can also remove the disabled use flags from package.use, but they won't hurt.
Here is the USE= line in my make.conf:
Code:
USE="-* git verify-sig rsync-verify man alsa X samba grub ssl ipv6 lto pgo libressl olde-gentoo asm native-symlinks threads jit jumbo-build"

These are the USE flags I want to have enabled on all packages whenever they are available.
To manage USE-flags more than this, I use package.use.
Code:
$ wc -l /etc/portage/package.use
122 /etc/portage/package.use

Using USE="-*" in make.conf will force you to properly use package.use and to know what USE flags you actually need, instead of overly relying on make.conf and profiles.
After this, do a @world update. You will probably get a ton of blockers because you forgot to set a USE flag or because you didn't know you needed it.
When this happens, add the missing USE flags and try again. Rinse and repeat.
Another way to solve these is to remove everything that needs the missing USE flag.
You should double-check what USE flags get disabled when you update @world.
You may end up disabling a USE flag you didn't know you needed and break you system in hard to debug ways.
It might help you to note all the changes the @world update makes and maybe take a screenshot.

Possible pitfalls:
You will be among the first to know if someone improperly set USE flag dependencies.
One recent example was with imlib2, when after a reboot I was left without a wallpaper, because of a missing USE flag dependency.
In this particular case, USE="text" was needed, but the feh ebuild didn't have a dependency on it.
Another thing to keep in mind are USE_EXPAND variables.
You need to set these too.
If you don't, you will get a ton of blockers on @world updates.
Here are the USE_expand variables I have in make.conf:
Code:
PYTHON_TARGETS="python3_11"
PYTHON_SINGLE_TARGET="python3_11"
RUBY_TARGETS="ruby31"
LUA_SINGLE_TARGET="luajit"
FFTOOLS="aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart sidxindex trasher"
CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3"

The last line should be set on most setups, even those without USE="-*", using app-portage/cpuid2cpuflags.
You will also need to set on multilib systems
Code:
ABI_X86=

I prefer to set this per-package in package.use in order to have as few 32-bit libs as possible.
I still need this because I use steam and they don't have a 64-bit client. It may not be needed on a lot of systems.
You should also set these variables, regardless of whether you use USE="-*" or not:
Code:
VIDEO_CARDS="nvidia"
INPUT_DEVICES=""

There will possibly be more or less USE_EXPAND variables you will need to set, depending on your setup.

Cleanup and closing mention:
After doing this, remember to run emerge -ca or a variation of this, as you should after every @world update.
You can also remove all disabled USE flags from make.conf and package.use.
If something changes, investigate. You may have something you shouldn't in make.conf, or a USE flag listed twice, both enabled and disabled.
This will shift your system from managing everything through make.conf to using package.use.
This should be the case even without USE="-*", but a lot of people just use make.conf for everything, even at the price of extra bloat.
_________________
My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev"
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54578
Location: 56N 3W

PostPosted: Fri May 26, 2023 7:11 pm    Post subject: Reply with quote

stefan11111,

INPUT_DEVICES= is a USE_EXPAND. ="" is not what most user will want.
="libinput" is a good choice.

Its possibe to save time by running
Code:
emerge --info

Before setting USE="-* ..."
Then again and again to look at the damage, USE flags are added
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 934
Location: Romania

PostPosted: Fri May 26, 2023 7:22 pm    Post subject: Reply with quote

NeddySeagoon wrote:
stefan11111,
INPUT_DEVICES= is a USE_EXPAND. ="" is not what most user will want.
="libinput" is a good choice.

Like all other USE_EXPAND variables I listed, they are there because they may need to be set.
Whether or not they really need to be set and what they need to be set to depends on the specific environment.
_________________
My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev"
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


Joined: 10 Sep 2021
Posts: 1252
Location: Richmond Hill, Canada

PostPosted: Fri May 26, 2023 7:31 pm    Post subject: Reply with quote

stefan11111,

It seems to me your use case can be a "profile" may be call it "bare-minimal", have you consider design and/or implement one and contribute it to gentoo, or if not accepted by Gentoo. than just publish as an overlay?

I was thinking in this direction, As in design profile that is special purposed. Unlike current gentoo::profile that are target as general as possible.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5122
Location: Bavaria

PostPosted: Fri May 26, 2023 8:58 pm    Post subject: Reply with quote

Great work !

May I add that if you dont set INPUT_DEVICES="" in your make.conf then you have automatically the default set by portage: INPUT_DEVICES="libinput"
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54578
Location: 56N 3W

PostPosted: Fri May 26, 2023 9:10 pm    Post subject: Reply with quote

pietinger,

Care to test that with USE="-* ..." ?
I get
Code:
moriarty ~ # emerge --info | grep INPUT
moriarty ~ # emerge --info
Portage 3.0.47 (python 3.11.3-final-0, default/linux/arm64/17.0, gcc-13, glibc-2.37-r3, 6.3.1-gentoo aarch64)
=================================================================
System uname: Linux-6.3.1-gentoo-aarch64-with-glibc2.37
KiB Mem:   263112528 total,  37081008 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sat, 20 May 2023 10:00:01 +0000
Head commit of repository gentoo: 1a6de4e4410363656a2cb1bbd83715f8be2fbd78
sh bash 5.2_p15-r2
ld GNU ld (Gentoo 2.40 p5) 2.40.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p15-r2::gentoo
dev-lang/perl:             5.36.1-r1::gentoo
dev-lang/python:           3.11.3::gentoo
dev-util/cmake:            3.26.4-r1::gentoo
dev-util/meson:            1.1.0::gentoo
sys-apps/baselayout:       2.13-r1::gentoo
sys-apps/openrc:           0.47.1::gentoo
sys-apps/sandbox:          2.30-r1::gentoo
sys-devel/autoconf:        2.71-r6::gentoo
sys-devel/automake:        1.16.5-r1::gentoo
sys-devel/binutils:        2.40-r5::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/gcc:             12.2.1_p20230304::gentoo, 13.1.1_p20230513::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/make:            4.4.1::gentoo
sys-kernel/linux-headers:  6.3::gentoo (virtual/os-headers)
sys-libs/glibc:            2.37-r3::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: False
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts:
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24

ACCEPT_KEYWORDS="arm64 ~arm64"
ACCEPT_LICENSE="@FREE freedist"
CBUILD="aarch64-unknown-linux-gnu"
CFLAGS="-O2 -pipe -march=armv8-a+crypto+crc"
CHOST="aarch64-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=armv8-a+crypto+crc"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -pipe -march=armv8-a+crypto+crc"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=armv8-a+crypto+crc"
GENTOO_MIRRORS="http://mirrors.gethosted.online/gentoo                 http://www.mirrorservice.org/sites/distfiles.gentoo.org/                 http://mirrors.soeasyto.com/distfiles.gentoo.org/                 http://mirror.leaseweb.com/gentoo/                 http://gentoo.mirrors.ovh.net/gentoo-distfiles/                 http://ftp.snt.utwente.nl/pub/os/linux/gentoo                 https://www.mirrorservice.org/sites/distfiles.gentoo.org/                 http://mirror.bytemark.co.uk/gentoo/                  http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/                  http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/"
LANG="C.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j32"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="arm64 lvm split-usr test-rust thin" CPU_FLAGS_ARM="edsp thumb vfp vfpv3 vfpv4 vfp-d32 aes sha1 sha2 crc32 v4 v5 v6 v7 v8 thumb2" ELIBC="glibc" KERNEL="linux" QEMU_SOFTMMU_TARGETS="aarch64" QEMU_USER_TARGETS="aarch64"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS


So its unset.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5122
Location: Bavaria

PostPosted: Fri May 26, 2023 9:15 pm    Post subject: Reply with quote

NeddySeagoon wrote:
So its unset.

An "emerge --info" does not show INPUT_DEVICES. What happens if you use "emerge --info -v" ?
Back to top
View user's profile Send private message
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 934
Location: Romania

PostPosted: Fri May 26, 2023 9:51 pm    Post subject: Reply with quote

pietinger wrote:
Great work !

May I add that if you dont set INPUT_DEVICES="" in your make.conf then you have automatically the default set by portage: INPUT_DEVICES="libinput"

Code:
INPUT_DEVICES="mouse keyboard"

I would use this, but:
Code:
$ emerge -pqv x11-drivers/xf86-input-mouse::gentoo
!!! Repository 'gentoo-static' is missing masters attribute in '/var/db/repos/gentoo-static/metadata/layout.conf'
!!! Set 'masters = gentoo' in this file for future compatibility

emerge: there are no ebuilds to satisfy "x11-drivers/xf86-input-mouse::gentoo".

Code:
$ emerge -pqv x11-drivers/xf86-input-keyboard::gentoo
!!! Repository 'gentoo-static' is missing masters attribute in '/var/db/repos/gentoo-static/metadata/layout.conf'
!!! Set 'masters = gentoo' in this file for future compatibility

emerge: there are no ebuilds to satisfy "x11-drivers/xf86-input-keyboard::gentoo".

_________________
My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev"
Back to top
View user's profile Send private message
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 934
Location: Romania

PostPosted: Fri May 26, 2023 9:54 pm    Post subject: Reply with quote

pietinger wrote:
NeddySeagoon wrote:
So its unset.

An "emerge --info" does not show INPUT_DEVICES. What happens if you use "emerge --info -v" ?

Here.
Code:
$ emerge --info -v | grep -i input
!!! Repository 'gentoo-static' is missing masters attribute in '/var/db/repos/gentoo-static/metadata/layout.conf'
!!! Set 'masters = gentoo' in this file for future compatibility
INPUT_DEVICES=""
USE_EXPAND="ABI_MIPS ABI_S390 ABI_X86 ADA_TARGET ALSA_CARDS AMDGPU_TARGETS APACHE2_MODULES APACHE2_MPMS CALLIGRA_FEATURES CAMERAS COLLECTD_PLUGINS CPU_FLAGS_ARM CPU_FLAGS_PPC CPU_FLAGS_X86 CURL_SSL ELIBC FFTOOLS GPSD_PROTOCOLS GRUB_PLATFORMS INPUT_DEVICES KERNEL L10N LCD_DEVICES LIBREOFFICE_EXTENSIONS LLVM_TARGETS LUA_SINGLE_TARGET LUA_TARGETS MONKEYD_PLUGINS NGINX_MODULES_HTTP NGINX_MODULES_MAIL NGINX_MODULES_STREAM OFFICE_IMPLEMENTATION OPENMPI_FABRICS OPENMPI_OFED_FEATURES OPENMPI_RM PHP_TARGETS POSTGRES_TARGETS PYTHON_SINGLE_TARGET PYTHON_TARGETS QEMU_SOFTMMU_TARGETS QEMU_USER_TARGETS ROS_MESSAGES RUBY_TARGETS SANE_BACKENDS UWSGI_PLUGINS VIDEO_CARDS VOICEMAIL_STORAGE XTABLES_ADDONS"

Seems unset.
_________________
My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev"
Back to top
View user's profile Send private message
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 934
Location: Romania

PostPosted: Fri May 26, 2023 9:56 pm    Post subject: Reply with quote

pingtoo wrote:
stefan11111,

It seems to me your use case can be a "profile" may be call it "bare-minimal", have you consider design and/or implement one and contribute it to gentoo, or if not accepted by Gentoo. than just publish as an overlay?

I was thinking in this direction, As in design profile that is special purposed. Unlike current gentoo::profile that are target as general as possible.

Maybe, but is seems way easier to do it this way.
_________________
My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev"
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5122
Location: Bavaria

PostPosted: Fri May 26, 2023 10:02 pm    Post subject: Reply with quote

INPUT_DEVICES="mouse keyboard" is very outdated. Please dont use it. Usually you should have no problem with ="libinput" .. it is our default and gives you keyboard AND mouse access in X11

(see also: https://wiki.gentoo.org/wiki/Libinput )

There is also a kernel option necessary which is usually enabled by default: CONFIG_INPUT_EVDEV=y

(You would need other kernel options only with special keyboards or mouse)
Back to top
View user's profile Send private message
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 934
Location: Romania

PostPosted: Fri May 26, 2023 10:08 pm    Post subject: Reply with quote

pietinger wrote:
INPUT_DEVICES="mouse keyboard" is very outdated. Please dont use it. Usually you should have no problem with ="libinput" .. it is our default and gives you keyboard AND mouse access in X11

(see also: https://wiki.gentoo.org/wiki/Libinput )

There is also a kernel option necessary which is usually enabled by default: CONFIG_INPUT_EVDEV=y

(You would need other kernel options only with special keyboards or mouse)

xf86-input-libinput and xf86-input-evdev both need udev, and I use a static /dev.
Code:
$ grep EVDEV /usr/src/linux/.config
# CONFIG_INPUT_EVDEV is not set

Code:
$ doas emerge -pqv xf86-input-synaptics
!!! Repository 'gentoo-static' is missing masters attribute in '/var/db/repos/gentoo-static/metadata/layout.conf'
!!! Set 'masters = gentoo' in this file for future compatibility
[ebuild  N    ] dev-libs/libevdev-1.13.1  USE="-doc -test" ABI_X86="(64) -32 (-x32)"
[ebuild  N    ] x11-drivers/xf86-input-synaptics-1.9.2

This seems to work without udev, but I don't think it is actually useful on my system.
_________________
My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev"
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5122
Location: Bavaria

PostPosted: Fri May 26, 2023 10:39 pm    Post subject: Reply with quote

stefan11111 wrote:
xf86-input-libinput and xf86-input-evdev both need udev, [...]

Yes, you are right (I have forgotten about this) - Sorry for my nonsense :oops:
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3718
Location: Rasi, Finland

PostPosted: Sat May 27, 2023 5:48 am    Post subject: Reply with quote

pingtoo wrote:
stefan11111,

It seems to me your use case can be a "profile" may be call it "bare-minimal", have you consider design and/or implement one and contribute it to gentoo, or if not accepted by Gentoo. than just publish as an overlay?

I was thinking in this direction, As in design profile that is special purposed. Unlike current gentoo::profile that are target as general as possible.
Yes, please.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 934
Location: Romania

PostPosted: Sat May 27, 2023 11:30 am    Post subject: Reply with quote

Zucca wrote:
pingtoo wrote:
stefan11111,

It seems to me your use case can be a "profile" may be call it "bare-minimal", have you consider design and/or implement one and contribute it to gentoo, or if not accepted by Gentoo. than just publish as an overlay?

I was thinking in this direction, As in design profile that is special purposed. Unlike current gentoo::profile that are target as general as possible.
Yes, please.

What should that profile do that is preferable to USE="-*" ?
The profile would have every USE flag that is not forced with () disabled. That is exactly what USE="-*" does.
However, doing this with a profile would have the disadvantage that is will be harder to see the default USE flags in case something breaks.
Also, using USE="-*" makes it easier to switch between multilib/no-multilib, glibc/musl and whatever other things the ::gentoo profiles provide.
Even if I make the profile, what should I make it for? multilib? no-multilib?, etc
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54578
Location: 56N 3W

PostPosted: Sat May 27, 2023 12:14 pm    Post subject: Reply with quote

stefan11111,

Switching between multilib/no-multilib is a one way thing.
Its not possible to do the no-multilib to multilib switch without major work.
You need a multilib toolchain to build a multilib toolchain. The on disk layout for multilib and no-multilib is different ...
glibc/musl switching is a whole new install as almost everything uses libc and one is not a drop in replacement for the others.

In short. Those use cases don't matter.

You are now looking at a whole set of profiles. :)

For a single user, who knows what they are doing, USE="-* saves a lot of work.
If you want wider adoption, it needs to be one (or more) profiles.

I did give consideration to making a static-dev profile based on default/linux/amd64/17.1/no-multilib to be called default/linux/amd64/17.1/no-multilib/static-dev or something like that.
I've never gotten around to it.
I don't think is a lot of work. Use default/linux/amd64/17.1/no-multilib as the parent and add my /etc/portage/profile/* which is what does the profile change anyway.
It does require me to understand a bit more of profiles than i do at the moment.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


Joined: 10 Sep 2021
Posts: 1252
Location: Richmond Hill, Canada

PostPosted: Sat May 27, 2023 1:32 pm    Post subject: Reply with quote

stefan11111 wrote:
Zucca wrote:
pingtoo wrote:
stefan11111,

It seems to me your use case can be a "profile" may be call it "bare-minimal", have you consider design and/or implement one and contribute it to gentoo, or if not accepted by Gentoo. than just publish as an overlay?

I was thinking in this direction, As in design profile that is special purposed. Unlike current gentoo::profile that are target as general as possible.
Yes, please.

What should that profile do that is preferable to USE="-*" ?
The profile would have every USE flag that is not forced with () disabled. That is exactly what USE="-*" does.
However, doing this with a profile would have the disadvantage that is will be harder to see the default USE flags in case something breaks.
Also, using USE="-*" makes it easier to switch between multilib/no-multilib, glibc/musl and whatever other things the ::gentoo profiles provide.
Even if I make the profile, what should I make it for? multilib? no-multilib?, etc


In my mind a "profile" named a setting. It is not just use use flags. It would include some environment variables. it also made certain build with fixed setting. At the end the profile will give user a known configuration to base on.

For example, A specific version profile may choose to lock toolchain at one known stable state instead follow current rolling update. Such version profile mean when it is time for update it is a version number bump. (I understand this may not be reasonable, this is just to illustrate the idea of special purpose profile.)

Another example, I am thinking of is that I am using openwrt for few of my nodes. I kind like openwrt's init system which use entirely different set that normal linux distro use. openwrt use "procd" to replace "init", and some other small utility to manage. I would like to port some of them and use gentoo to build and create a "profile" to use them,
Back to top
View user's profile Send private message
zah21
n00b
n00b


Joined: 15 Jan 2021
Posts: 27

PostPosted: Tue Nov 28, 2023 5:04 am    Post subject: Reply with quote

pingtoo wrote:

kinda like openwrt's init system which use entirely different set that normal linux distro use. openwrt use "procd" to replace "init", and some other small utility to manage. I would like to port some of them and use gentoo to build and create a "profile" to use them,


What other small utility are you talking about? :|

Edit:
The idea of porting to gentoo seems nice, didn't realize storm troopers care that much about Linux lol.
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3873

PostPosted: Sat Mar 02, 2024 10:21 am    Post subject: Reply with quote

pietinger wrote:
Great work !

May I add that if you dont set INPUT_DEVICES="" in your make.conf then you have automatically the default set by portage: INPUT_DEVICES="libinput"
Checking here throws
Code:
[ebuild   R    ]    x11-base/xorg-drivers-21.1-r2::gentoo  INPUT_DEVICES="-elographics -evdev -joystick -libinput* -synaptics -vmmouse -void -wacom" VIDEO_CARDS="-amdgpu -ast -dummy -fbdev (-freedreno) (-geode) -i915 -intel -mga -nouveau -nvidia (-omap) -qxl -r128 -radeon -radeonsi -siliconmotion (-tegra) (-vc4) -vesa -via -virtualbox -vmware" 0 KiB
because USE=libinput switches to USE=-libinput.
Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
Leonardo.b
Guru
Guru


Joined: 10 Oct 2020
Posts: 308

PostPosted: Sun Mar 03, 2024 10:08 am    Post subject: Reply with quote

For extra fun, it's time to add "-*" in /etc/portage/profile/packages
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3873

PostPosted: Mon Mar 11, 2024 10:08 am    Post subject: Reply with quote

With packages having upgraded from eclass/llvm.eclass to recent eclass/llvm-r1.eclass,
LLVM_SLOT requires explicit definition here at package level as described in forum

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3873

PostPosted: Fri Mar 15, 2024 5:14 pm    Post subject: Reply with quote

Using USE="-* ..." in /etc/portage/make.conf will likely to be discredited on the forums, We can deal with it.
It has however the benefit to occasionally raise issues showing cases where ebuild(s) could be strengthened if bisected.

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22695

PostPosted: Fri Mar 15, 2024 6:17 pm    Post subject: Reply with quote

As a frequent detractor of USE="-*", I will note here that my complaint about it is the frequency with which I see forum posts which: (1) used USE=-*, (2) did not clearly document this in the body of the initial request for assistance, (3) request assistance with an issue that is ultimately determined to be caused by USE=-*, and (4) the poster did not understand prior to the thread in question that the problem is caused by USE=-*. When these conditions are all met, it means that the person using USE=-* encountered a problem, which they could not solve on their own, and asked volunteers to spend their limited time diagnosing a problem that the poster self-inflicted, and by failing to prominently mention the use of USE=-*, led those volunteers to think this was an ordinary system suffering from any of a variety of routine mistakes committed by users.

I would be more sympathetic if people using USE=-* approached this like a tinderbox: (1) clearly document in requests for help that this system has the unusual property of USE=-*, so that readers who are not interested in supporting this could immediately leave the thread; (2) make reasonable efforts prior to posting to determine whether USE=-* is relevant to the problem report.
Back to top
View user's profile Send private message
flexibeast
Guru
Guru


Joined: 04 Apr 2022
Posts: 458
Location: Naarm/Melbourne, Australia

PostPosted: Sat Mar 16, 2024 3:12 am    Post subject: Reply with quote

Hu wrote:
led those volunteers to think this was an ordinary system suffering from any of a variety of routine mistakes committed by users.

One day, on one of the the Void IRC channels, we had someone come on with some bizarre issues. The behaviours they were reporting didn't make any sense - there's output where one thinks "Yeah, that could happen if X, Y or Z", and then there's stuff like this.

After spending some time trying to figure out what was going on, we learned that the user had run some ricing script by some YouTuber (iirc, someone from the fundamentalist part of the anti-bloat crowd). And this script did something weird to various permissions, which did explain the behaviours.

Quote:
I would be more sympathetic if people using USE=-* approached this like a tinderbox: (1) clearly document in requests for help that this system has the unusual property of USE=-*, so that readers who are not interested in supporting this could immediately leave the thread; (2) make reasonable efforts prior to posting to determine whether USE=-* is relevant to the problem report.

Likewise. Personally, i really appreciate people willing to experiment and break their system in order to determine what stuff is and isn't needed - one of the reasons i'm running Gentoo is to be able to minimise the amount of stuff on my system i know i don't actually need or use (for both maintenance and security reasons).

But at the same time, i'm regularly frustrated by the extent to which the fundamentalist anti-bloat people seem (amongst other things) to be a bit careless about bracketing their advice with warnings, e.g. "Doing X hasn't resulted in any noticeable problems on my system, but your use-case might be different enough from mine that doing X might cause some problems for you." Which would possibly help keep X in someone's mind when they seek help from others.
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3873

PostPosted: Sat Mar 23, 2024 7:53 pm    Post subject: Reply with quote

USE="-* unicode" dev-lisp/clisp required to build here.

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
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