Mailing List Archive

[PATCH] profiles/default/linux: Add USE="bzip2 lzma zstd" to defaults
Enable these flags by default, since they effectively add no additional
dependencies:

USE=bzip2 only ever adds a dependency on:
app-arch/bzip2 - part of @system
dev-ml/camlbz2 - to dev-ml/dose3's RDEPEND
USE=lzma only ever adds a dependency on:
app-arch/xz-utils - part of @system
virtual/pkgconfig - to sys-apps/kmod's BDEPEND
USE=zstd only ever adds a dependency on:
app-arch/zstd - an unconditional RDEPEND of sys-apps/portage
virtual/pkgconfig - to kde-frameworks/karchive's BDEPEND

Signed-off-by: Matt Turner <mattst88@gentoo.org>
---
profiles/default/linux/make.defaults | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/profiles/default/linux/make.defaults b/profiles/default/linux/make.defaults
index 168f895eaf7..cbc5092cb2b 100644
--- a/profiles/default/linux/make.defaults
+++ b/profiles/default/linux/make.defaults
@@ -11,7 +11,7 @@


# Default starting set of USE flags for all default/linux profiles.
-USE="crypt ipv6 ncurses nls pam readline ssl tcpd zlib"
+USE="bzip2 crypt ipv6 lzma ncurses nls pam readline ssl tcpd zlib zstd"

# make sure toolchain has sane defaults <toolchain@gentoo.org>
USE="${USE} fortran openmp"
--
2.31.1
Re: [PATCH] profiles/default/linux: Add USE="bzip2 lzma zstd" to defaults [ In reply to ]
I've included this in a larger PR that contains some other compression
flag simplifications: https://github.com/gentoo/gentoo/pull/21558
Re: [PATCH] profiles/default/linux: Add USE="bzip2 lzma zstd" to defaults [ In reply to ]
On Wed, 2021-07-07 at 22:01 -0700, Matt Turner wrote:
> Enable these flags by default, since they effectively add no additional
> dependencies:

Why? This list should be getting smaller, not larger.

Polluting the base profiles makes running a minimal system that much
harder, and only "adds no dependencies" because people omit the
corresponding dependencies -- a situation that has to change
eventually.

If they're actually important to a particular package, you should
change the defaults for that package.
Re: [PATCH] profiles/default/linux: Add USE="bzip2 lzma zstd" to defaults [ In reply to ]
On 7/8/21 6:54 AM, Michael Orlitzky wrote:
> On Wed, 2021-07-07 at 22:01 -0700, Matt Turner wrote:
>> Enable these flags by default, since they effectively add no additional
>> dependencies:
> Why? This list should be getting smaller, not larger.

That's a valid opinion/viewpoint, but it's not a fact.


Someone may have wanted these features to be optional, but that doesn't
automatically imply that they should be disabled for everyone out of the
box.


Not everyone wants minimalism, some people want the expected features to
just be enabled by default.


-Ben
Re: [PATCH] profiles/default/linux: Add USE="bzip2 lzma zstd" to defaults [ In reply to ]
On Thu, 2021-07-08 at 07:19 -0500, Ben Kohler wrote:
> On 7/8/21 6:54 AM, Michael Orlitzky wrote:
> > On Wed, 2021-07-07 at 22:01 -0700, Matt Turner wrote:
> > > Enable these flags by default, since they effectively add no additional
> > > dependencies:
> > Why? This list should be getting smaller, not larger.
>
> That's a valid opinion/viewpoint, but it's not a fact.
>
>

It is a fact. If you want to enable these features by default in some
packages (WHY?), there are better ways to do that now. Adding global
defaults into the profiles is sloppy and should be avoided.
Re: [PATCH] profiles/default/linux: Add USE="bzip2 lzma zstd" to defaults [ In reply to ]
On Thu, Jul 8, 2021 at 4:54 AM Michael Orlitzky <mjo@gentoo.org> wrote:
>
> On Wed, 2021-07-07 at 22:01 -0700, Matt Turner wrote:
> > Enable these flags by default, since they effectively add no additional
> > dependencies:
>
> Why? This list should be getting smaller, not larger.
>
> Polluting the base profiles makes running a minimal system that much
> harder, and only "adds no dependencies" because people omit the
> corresponding dependencies -- a situation that has to change
> eventually.
>
> If they're actually important to a particular package, you should
> change the defaults for that package.

Not the file I'm changing, but I think the sentiment of the comment is
correct: profiles/prefix/make.defaults says:

# Some USE-flags that only die-hards don't want:

So, the thing about running a minimal system is... you already have
these dependencies installed. This doesn't change that...

I could of course change the default of every bzip2/lzma/zstd in IUSE
(and might as well handle zlib too so we can remove it from
make.defaults!) but what practical advantage does that bring?

I doubt there's a sensible reason to build without any of these USE
flags enabled. I think the claim that most people will want them
enabled is not really a question. So we should enable them by default.
I think that logic is pretty straightforward. If someone wants to
disable the flags for some reason, they of course still have that
option.

If you can find a case where you wouldn't want to enable one of these
USE flags, please let me know and I'll reconsider my position.
Re: [PATCH] profiles/default/linux: Add USE="bzip2 lzma zstd" to defaults [ In reply to ]
On Thu, 2021-07-08 at 11:15 -0700, Matt Turner wrote:
>
> So, the thing about running a minimal system is... you already have
> these dependencies installed. This doesn't change that...
>
> I could of course change the default of every bzip2/lzma/zstd in IUSE
> (and might as well handle zlib too so we can remove it from
> make.defaults!) but what practical advantage does that bring?

There's more to being a dependency than just being installed. Not all
of these packages have e.g. USE=zstd so that they can run
/usr/bin/zstd. Some link against libzstd, which now bloats them to use
a tiny bit more space and memory, as well as exposing you to any
security problems in the library. Your dependency tree gets a little
bit more complicated, and your package manager has to figure out how to
do subslot rebuilds for everything when libzstd gets upgraded.

Per-package defaults are easier to override, since I don't have to undo
everything before setting the USE-flags that I wanted to enable in the
first place.

Per-package defaults are easier to revert if we change our collective
minds later, since we don't have to test the entire tree for breakage
first.

Global flags have essentially undefined behaviour, since e.g. USE=bzip2
does different things for each package. As an extreme example, global
flags affect packages that aren't even in the tree yet and that may use
USE=bzip2 in a way you don't expect. As a less extreme example,
USE=bzip2 may open your crypto library up to compression attacks. It
definitely makes your dev-lang/php more vulnerable. (The same goes for
USE=zlib, which should be removed in favor of per-package defaults.)

Global flag settings increase complexity because they all interact with
each other, creating a combinatorial explosion of interaction points.
Figuring out how to turn a global flag off for a subset of packages can
be a nightmare. Do you change the file where it's enabled? Or the arch
profile where the enabling is reverted? Or the arch/desktop profile
where the disabling is disabled? Or the hardened profile where the
disabled disabling is disabled? Any argument against global variables
in a program is an argument against global profile changes.


> I doubt there's a sensible reason to build without any of these USE
> flags enabled. I think the claim that most people will want them
> enabled is not really a question. So we should enable them by default.
> I think that logic is pretty straightforward. If someone wants to
> disable the flags for some reason, they of course still have that
> option.
>
> If you can find a case where you wouldn't want to enable one of these
> USE flags, please let me know and I'll reconsider my position.
>

I don't have them enabled for any packages where they're not IUSE-
defaulted, and haven't noticed any problems. Not not having a reason to
do something isn't a good justification to do it. If it ain't broke and
all that. If anyone wants them set, it's as easy as USE="lzma bzip2
zstd", and we are apparently all okay without them.

If you have a good reason to do it for certain packages, setting per-
package defaults is the way to do it. The base profile defaults are
only there because we didn't always have per-package defaults.

But, if you really look, I think you'll find that most of these flags
do completely useless things. Do you REALLY need libpcre to build and
install you a special executable called "pcregrep-libbz2" that just
pipes bunzip2 to pcregrep? No, nobody does. And most other uses are
comparably stupid.
Re: [PATCH] profiles/default/linux: Add USE="bzip2 lzma zstd" to defaults [ In reply to ]
On 7/8/21 11:15 AM, Matt Turner wrote:
> On Thu, Jul 8, 2021 at 4:54 AM Michael Orlitzky <mjo@gentoo.org> wrote:
>> On Wed, 2021-07-07 at 22:01 -0700, Matt Turner wrote:
>>> Enable these flags by default, since they effectively add no additional
>>> dependencies:
>> Why? This list should be getting smaller, not larger.
>>
>> Polluting the base profiles makes running a minimal system that much
>> harder, and only "adds no dependencies" because people omit the
>> corresponding dependencies -- a situation that has to change
>> eventually.
>>
>> If they're actually important to a particular package, you should
>> change the defaults for that package.
> Not the file I'm changing, but I think the sentiment of the comment is
> correct: profiles/prefix/make.defaults says:
>
> # Some USE-flags that only die-hards don't want:
>
> So, the thing about running a minimal system is... you already have
> these dependencies installed. This doesn't change that...
>
> I could of course change the default of every bzip2/lzma/zstd in IUSE
> (and might as well handle zlib too so we can remove it from
> make.defaults!) but what practical advantage does that bring?
>
> I doubt there's a sensible reason to build without any of these USE
> flags enabled. I think the claim that most people will want them
> enabled is not really a question. So we should enable them by default.
> I think that logic is pretty straightforward. If someone wants to
> disable the flags for some reason, they of course still have that
> option.

I recently found exactly a sensible reason to build without these
flags.  I was cleaning up my abi_x86_32 use flags on an otherwise mostly
x86_64 ~amd64 desktop system.  Lots of things depend on these with
${MULTILIB_USEDEP}.  I of course have the actual programs themselves,
but I don't need 32-bit versions of them for linking.  So I now have

```

a@gen5 ~/code $ grep "\-lzma" /etc/portage/package.use/*
/etc/portage/package.use/package.use:dev-libs/elfutils valgrind -lzma
-bzip2    #avoid multilib usedep on xz-utils and bzip2
/etc/portage/package.use/package.use:dev-libs/libxml2 -lzma -dbus      
#avoid multilib dep on xz-utils and dbus
a@gen5 ~/code $ grep "\-bzip" /etc/portage/package.use/*
/etc/portage/package.use/package.use:dev-libs/elfutils valgrind -lzma
-bzip2    #avoid multilib usedep on xz-utils and bzip2
/etc/portage/package.use/package.use:media-libs/freetype -bzip2 #avoid
multilib usedeps on bzip2 cairo requires [png]

```

in package.use.

>
> If you can find a case where you wouldn't want to enable one of these
> USE flags, please let me know and I'll reconsider my position.
>
Re: [PATCH] profiles/default/linux: Add USE="bzip2 lzma zstd" to defaults [ In reply to ]
On Thu, Jul 8, 2021 at 12:36 PM Michael Orlitzky <mjo@gentoo.org> wrote:
>
> On Thu, 2021-07-08 at 11:15 -0700, Matt Turner wrote:
> >
> > So, the thing about running a minimal system is... you already have
> > these dependencies installed. This doesn't change that...
> >
> > I could of course change the default of every bzip2/lzma/zstd in IUSE
> > (and might as well handle zlib too so we can remove it from
> > make.defaults!) but what practical advantage does that bring?
>
> There's more to being a dependency than just being installed. Not all
> of these packages have e.g. USE=zstd so that they can run
> /usr/bin/zstd. Some link against libzstd, which now bloats them to use
> a tiny bit more space and memory, as well as exposing you to any
> security problems in the library. Your dependency tree gets a little
> bit more complicated, and your package manager has to figure out how to
> do subslot rebuilds for everything when libzstd gets upgraded.
>
> Per-package defaults are easier to override, since I don't have to undo
> everything before setting the USE-flags that I wanted to enable in the
> first place.
>
> Per-package defaults are easier to revert if we change our collective
> minds later, since we don't have to test the entire tree for breakage
> first.
>
> Global flags have essentially undefined behaviour, since e.g. USE=bzip2
> does different things for each package. As an extreme example, global
> flags affect packages that aren't even in the tree yet and that may use
> USE=bzip2 in a way you don't expect. As a less extreme example,
> USE=bzip2 may open your crypto library up to compression attacks. It
> definitely makes your dev-lang/php more vulnerable. (The same goes for
> USE=zlib, which should be removed in favor of per-package defaults.)
>
> Global flag settings increase complexity because they all interact with
> each other, creating a combinatorial explosion of interaction points.
> Figuring out how to turn a global flag off for a subset of packages can
> be a nightmare. Do you change the file where it's enabled? Or the arch
> profile where the enabling is reverted? Or the arch/desktop profile
> where the disabling is disabled? Or the hardened profile where the
> disabled disabling is disabled? Any argument against global variables
> in a program is an argument against global profile changes.

I hear you, and I appreciate the theoretical concerns.

I could maybe even support this position if you were actively working
towards this new and glorious future, but the only time I hear
anything about it is when you're arguing that someone else should do
something the way you want.

> > I doubt there's a sensible reason to build without any of these USE
> > flags enabled. I think the claim that most people will want them
> > enabled is not really a question. So we should enable them by default.
> > I think that logic is pretty straightforward. If someone wants to
> > disable the flags for some reason, they of course still have that
> > option.
> >
> > If you can find a case where you wouldn't want to enable one of these
> > USE flags, please let me know and I'll reconsider my position.
> >
>
> I don't have them enabled for any packages where they're not IUSE-
> defaulted, and haven't noticed any problems. Not not having a reason to
> do something isn't a good justification to do it. If it ain't broke and
> all that. If anyone wants them set, it's as easy as USE="lzma bzip2
> zstd", and we are apparently all okay without them.

Well, you're okay without them until you need them: E.g., enable
CONFIG_MODULE_COMPRESS / MODULE_COMPRESS_XZ without knowing that you
need sys-apps/kmod[lzma] and your system becomes unbootable.

But you're of course right that some die-hards might rather accept
this risk and save the 8 KiB of disk space (424 KiB ? 436 KiB) they'd
lose out on by enabling USE=lzma for the package. But the good news
is.. they still can!

> If you have a good reason to do it for certain packages, setting per-
> package defaults is the way to do it. The base profile defaults are
> only there because we didn't always have per-package defaults.

Yes, things are the way they are because of history.

> But, if you really look, I think you'll find that most of these flags
> do completely useless things. Do you REALLY need libpcre to build and
> install you a special executable called "pcregrep-libbz2" that just
> pipes bunzip2 to pcregrep? No, nobody does. And most other uses are
> comparably stupid.

I mean, you could make that argument for bzless or any other version
of these tools. I don't find that compelling.

But also, I have USE=bzip2 on libpcre and I don't have
pcregrep-libbz2. Regardless, I'm not going to lose any sleep over it
if it appears with the next upgrade.

Maybe you'd like to audit the compression USE flags and make
recommendations for which you think do completely useless things? I
can pretty easily replace this patch with a set of
automatically-generated patches that enable these USE flags by default
for all packages but on a per-package basis.

FWIW, I generally agree that there are a lot of USE flags that should
not exist -- we should reduce the complexity of configuring the system
by removing USE flags that don't have a downside. I'd claim most of
these packages' bzip2/lzma/zstd USE flags should be removed in favor
of statically enabling them, but that probably would garner a stronger
response than this patch.
Re: [PATCH] profiles/default/linux: Add USE="bzip2 lzma zstd" to defaults [ In reply to ]
Matt Turner wrote:
> If you can find a case where you wouldn't want to enable one of these
> USE flags, please let me know and I'll reconsider my position.

My catalyst spec files all have use: -* foo bar x y z
specifically because the defaults are never what I want for any given
system. I build desktops, servers, containers, VM appliance images and
embedded system, and I know what I want in each one. Especially the
latter frequently have only very few USE flags set and I want zero
extra dependencies.

I completely agree that the default USEs should rather be reduced,
not increased. Isn't this what profile inheritance is for? It would
be great if I didn't essentially have to create my own profile when I
want a very minimal system.


Matt Turner wrote:
> I'd claim most of these packages' bzip2/lzma/zstd USE flags should
> be removed in favor of statically enabling them

That is the direct opposite of Gentoo's single most core value: choice

Just don't do it. Kthx.


//Peter
Re: [PATCH] profiles/default/linux: Add USE="bzip2 lzma zstd" to defaults [ In reply to ]
On Thu, Jul 8, 2021 at 1:17 PM Matt Turner <mattst88@gentoo.org> wrote:
> On Thu, Jul 8, 2021 at 12:36 PM Michael Orlitzky <mjo@gentoo.org> wrote:
> > If you have a good reason to do it for certain packages, setting per-
> > package defaults is the way to do it. The base profile defaults are
> > only there because we didn't always have per-package defaults.
>
> Yes, things are the way they are because of history.

Sorry, I shouldn't have been flippant here. You're making a legitimate point.
Re: [PATCH] profiles/default/linux: Add USE="bzip2 lzma zstd" to defaults [ In reply to ]
On Thu, Jul 8, 2021 at 1:41 PM Peter Stuge <peter@stuge.se> wrote:
>
> Matt Turner wrote:
> > If you can find a case where you wouldn't want to enable one of these
> > USE flags, please let me know and I'll reconsider my position.
>
> My catalyst spec files all have use: -* foo bar x y z
> specifically because the defaults are never what I want for any given
> system. I build desktops, servers, containers, VM appliance images and
> embedded system, and I know what I want in each one. Especially the
> latter frequently have only very few USE flags set and I want zero
> extra dependencies.

I think you're making a great argument that you'd be completely
unaffected by any of the suggestions in this thread.

> I completely agree that the default USEs should rather be reduced,
> not increased. Isn't this what profile inheritance is for? It would
> be great if I didn't essentially have to create my own profile when I
> want a very minimal system.
>
>
> Matt Turner wrote:
> > I'd claim most of these packages' bzip2/lzma/zstd USE flags should
> > be removed in favor of statically enabling them
>
> That is the direct opposite of Gentoo's single most core value: choice

Choice makes sense when there's a legitimate trade-off to be made.
Choice isn't dogma.

> Just don't do it. Kthx.

This kind of thing is nothing but irritating. Please don't do this.
Re: [PATCH] profiles/default/linux: Add USE="bzip2 lzma zstd" to defaults [ In reply to ]
On July 8, 2021 8:50:39 PM UTC, Matt Turner <mattst88@gentoo.org> wrote:
>On Thu, Jul 8, 2021 at 1:41 PM Peter Stuge <peter@stuge.se> wrote:
>>
>> Matt Turner wrote:
>> > If you can find a case where you wouldn't want to enable one of
>these
>> > USE flags, please let me know and I'll reconsider my position.
>>
>> My catalyst spec files all have use: -* foo bar x y z
>> specifically because the defaults are never what I want for any given
>> system. I build desktops, servers, containers, VM appliance images
>and
>> embedded system, and I know what I want in each one. Especially the
>> latter frequently have only very few USE flags set and I want zero
>> extra dependencies.
>
>I think you're making a great argument that you'd be completely
>unaffected by any of the suggestions in this thread.
>
>> I completely agree that the default USEs should rather be reduced,
>> not increased. Isn't this what profile inheritance is for? It would
>> be great if I didn't essentially have to create my own profile when I
>> want a very minimal system.
>>
>>
>> Matt Turner wrote:
>> > I'd claim most of these packages' bzip2/lzma/zstd USE flags should
>> > be removed in favor of statically enabling them
>>
>> That is the direct opposite of Gentoo's single most core value:
>choice
>
>Choice makes sense when there's a legitimate trade-off to be made.
>Choice isn't dogma.

Well the legitimate trade-off is complexity as stated previously. Gentoo is not supposed to be batteries included. It is supposed to be building blocks for each persons own thing.

Instead of adding the use flag what would ne more in Gentoo spirit would be to add to handbook a guide for common use flags.

Plus just because people disagree here with the proposal doesnt mean its dogma. It may be just disagreement.

>
>> Just don't do it. Kthx.
>
>This kind of thing is nothing but irritating. Please don't do this.

Agreed.

I think it would be better to look into reexamining the default use flags and how we handle them. It may be more time consuming but it seems like the correct way forward instead of just adding one flag.

Since it is indeed a historical tech debt that we have here.

MSavoritias
Re: [PATCH] profiles/default/linux: Add USE="bzip2 lzma zstd" to defaults [ In reply to ]
On Thu, Jul 8, 2021 at 2:34 PM MSavoritias
<marinus.savoritias@oezhayl.dev> wrote:
> On July 8, 2021 8:50:39 PM UTC, Matt Turner <mattst88@gentoo.org> wrote:
> >On Thu, Jul 8, 2021 at 1:41 PM Peter Stuge <peter@stuge.se> wrote:
> >>
> >> Matt Turner wrote:
> >> > If you can find a case where you wouldn't want to enable one of
> >these
> >> > USE flags, please let me know and I'll reconsider my position.
> >>
> >> My catalyst spec files all have use: -* foo bar x y z
> >> specifically because the defaults are never what I want for any given
> >> system. I build desktops, servers, containers, VM appliance images
> >and
> >> embedded system, and I know what I want in each one. Especially the
> >> latter frequently have only very few USE flags set and I want zero
> >> extra dependencies.
> >
> >I think you're making a great argument that you'd be completely
> >unaffected by any of the suggestions in this thread.
> >
> >> I completely agree that the default USEs should rather be reduced,
> >> not increased. Isn't this what profile inheritance is for? It would
> >> be great if I didn't essentially have to create my own profile when I
> >> want a very minimal system.
> >>
> >>
> >> Matt Turner wrote:
> >> > I'd claim most of these packages' bzip2/lzma/zstd USE flags should
> >> > be removed in favor of statically enabling them
> >>
> >> That is the direct opposite of Gentoo's single most core value:
> >choice
> >
> >Choice makes sense when there's a legitimate trade-off to be made.
> >Choice isn't dogma.
>
> Well the legitimate trade-off is complexity as stated previously. Gentoo is not supposed to be batteries included. It is supposed to be building blocks for each persons own thing.
>
> Instead of adding the use flag what would ne more in Gentoo spirit would be to add to handbook a guide for common use flags.
>
> Plus just because people disagree here with the proposal doesnt mean its dogma. It may be just disagreement.

That's not my claim.

It's akin to defending what you said by saying "Well, we have free
speech so I can say whatever I want!". Of course you can, but that's
not the point. You're not defending the substance of the speech. It's
a lazy argument.

Similarly, people say "Well, Gentoo is about choice!" even when the
choice is absolutely meaningless. Of course Gentoo offers a lot of
choice, but that's not the point. You're not defending the value of
the choice. It's a lazy argument.

It's easy for people who don't respond to bug reports to discount the
overhead every configuration knob adds.
Re: [PATCH] profiles/default/linux: Add USE="bzip2 lzma zstd" to defaults [ In reply to ]
On Thu, 2021-07-08 at 13:17 -0700, Matt Turner wrote:
>
> I hear you, and I appreciate the theoretical concerns.
>
> I could maybe even support this position if you were actively working
> towards this new and glorious future, but the only time I hear
> anything about it is when you're arguing that someone else should do
> something the way you want.

I've spent a great deal of time in the past moving flags from the base
profiles into package defaults. Not that I see what that has to do with
anything. I'm not arguing that you should do things the way I want
except insofar as I'd prefer you to choose the way of doing things that
has all of the benefits for you and none of the downsides for the rest
of us.


> >
> > I don't have them enabled for any packages where they're not IUSE-
> > defaulted, and haven't noticed any problems. Not not having a reason to
> > do something isn't a good justification to do it. If it ain't broke and
> > all that. If anyone wants them set, it's as easy as USE="lzma bzip2
> > zstd", and we are apparently all okay without them.
>
> Well, you're okay without them until you need them: E.g., enable
> CONFIG_MODULE_COMPRESS / MODULE_COMPRESS_XZ without knowing that you
> need sys-apps/kmod[lzma] and your system becomes unbootable.
>
> But you're of course right that some die-hards might rather accept
> this risk and save the 8 KiB of disk space (424 KiB ? 436 KiB) they'd
> lose out on by enabling USE=lzma for the package. But the good news
> is.. they still can!

No, this is a great case for the package default. Save some people a
headache, and include the batteries for kmod. I'll disable that one
manually if I know what I'm doing. But, the kmod situation is not a
good reason to enable lzma support in FFmpeg.

Given the above, it is maybe not surprising that sys-apps/kmod already
has IUSE="+lzma +zlib".


>
> > But, if you really look, I think you'll find that most of these flags
> > do completely useless things. Do you REALLY need libpcre to build and
> > install you a special executable called "pcregrep-libbz2" that just
> > pipes bunzip2 to pcregrep? No, nobody does. And most other uses are
> > comparably stupid.
>
> I mean, you could make that argument for bzless or any other version
> of these tools. I don't find that compelling.

You don't find it compelling that changing the default globally has no
additional benefits but a bunch of negative side effects? I *am* making
that argument about all of the other tools. The bzip2/lzma/zstd support
is mostly junk and should not be enabled by default, especially not
globally. (If individual maintainers want to enable junk features by
default, there's not much I can do except point out how unusually
difficult it is to override.)




> Maybe you'd like to audit the compression USE flags and make
> recommendations for which you think do completely useless things? I
> can pretty easily replace this patch with a set of
> automatically-generated patches that enable these USE flags by default
> for all packages but on a per-package basis.

You're the one trying to do something here but you haven't really said
what yet. No, I don't want to spend hours reverse engineering what
you're trying to accomplish when you could just tell us. Which packages
do you think need these flags on by default, and why? If their
maintainers agree, you don't need anyone else's approval.
Re: [PATCH] profiles/default/linux: Add USE="bzip2 lzma zstd" to defaults [ In reply to ]
On July 8, 2021 9:46:11 PM UTC, Matt Turner <mattst88@gentoo.org> wrote:
>On Thu, Jul 8, 2021 at 2:34 PM MSavoritias
><marinus.savoritias@oezhayl.dev> wrote:
>> On July 8, 2021 8:50:39 PM UTC, Matt Turner <mattst88@gentoo.org>
>wrote:
>> >On Thu, Jul 8, 2021 at 1:41 PM Peter Stuge <peter@stuge.se> wrote:
>> >>
>> >> Matt Turner wrote:
>> >> > If you can find a case where you wouldn't want to enable one of
>> >these
>> >> > USE flags, please let me know and I'll reconsider my position.
>> >>
>> >> My catalyst spec files all have use: -* foo bar x y z
>> >> specifically because the defaults are never what I want for any
>given
>> >> system. I build desktops, servers, containers, VM appliance images
>> >and
>> >> embedded system, and I know what I want in each one. Especially
>the
>> >> latter frequently have only very few USE flags set and I want zero
>> >> extra dependencies.
>> >
>> >I think you're making a great argument that you'd be completely
>> >unaffected by any of the suggestions in this thread.
>> >
>> >> I completely agree that the default USEs should rather be reduced,
>> >> not increased. Isn't this what profile inheritance is for? It
>would
>> >> be great if I didn't essentially have to create my own profile
>when I
>> >> want a very minimal system.
>> >>
>> >>
>> >> Matt Turner wrote:
>> >> > I'd claim most of these packages' bzip2/lzma/zstd USE flags
>should
>> >> > be removed in favor of statically enabling them
>> >>
>> >> That is the direct opposite of Gentoo's single most core value:
>> >choice
>> >
>> >Choice makes sense when there's a legitimate trade-off to be made.
>> >Choice isn't dogma.
>>
>> Well the legitimate trade-off is complexity as stated previously.
>Gentoo is not supposed to be batteries included. It is supposed to be
>building blocks for each persons own thing.
>>
>> Instead of adding the use flag what would ne more in Gentoo spirit
>would be to add to handbook a guide for common use flags.
>>
>> Plus just because people disagree here with the proposal doesnt mean
>its dogma. It may be just disagreement.
>
>That's not my claim.
>
>It's akin to defending what you said by saying "Well, we have free
>speech so I can say whatever I want!". Of course you can, but that's
>not the point. You're not defending the substance of the speech. It's
>a lazy argument.
>
>Similarly, people say "Well, Gentoo is about choice!" even when the
>choice is absolutely meaningless. Of course Gentoo offers a lot of
>choice, but that's not the point. You're not defending the value of
>the choice. It's a lazy argument.

As far as your first point goes as it has been stated adding flags increases complexity along with the size of the packages. Plus not everybody wants these flags so it brings more work to these cases too. What are actually the things missing that we need this flag? Is there actually something required or broken from somewhere?

Just because a use flag doesnt break stuff if its enabled doesnt mean it doesnt have its trade offs. Especially system wide
>
>It's easy for people who don't respond to bug reports to discount the
>overhead every configuration knob adds.

Please dont assume stuff like this. It devalues the conversation.

MSavoritias
Re: [PATCH] profiles/default/linux: Add USE="bzip2 lzma zstd" to defaults [ In reply to ]
>>>>> On Thu, 08 Jul 2021, Michael Orlitzky wrote:

> Why? This list should be getting smaller, not larger.

> Polluting the base profiles makes running a minimal system that much
> harder, and only "adds no dependencies" because people omit the
> corresponding dependencies -- a situation that has to change
> eventually.

> If they're actually important to a particular package, you should
> change the defaults for that package.

Sorry, but that doesn't make sense. These are global USE flags, and
the aim here is to set a _global_ default for them, based on the fact
that these libraries are present on every Gentoo system.

So if we agree that e.g. zlib should be on by default, then this belongs
in profiles. It is not a package specific default, therefore it doesn't
belong in IUSE of hundreds of ebuilds.

Ulrich
Re: [PATCH] profiles/default/linux: Add USE="bzip2 lzma zstd" to defaults [ In reply to ]
On Fri, 2021-07-09 at 12:05 +0200, Ulrich Mueller wrote:
> > > > > >
>
> Sorry, but that doesn't make sense. These are global USE flags, and
> the aim here is to set a _global_ default for them, based on the fact
> that these libraries are present on every Gentoo system.
>
> So if we agree that e.g. zlib should be on by default, then this
> belongs
> in profiles.

We don't agree that it belongs on by default. And I never said they
shouldn't be enabled in a profile. I said they shouldn't be enabled in
the BASE profile. If you enable them in, say, the desktop profile that
I have the option of not using, I'm fine with that.
Re: [PATCH] profiles/default/linux: Add USE="bzip2 lzma zstd" to defaults [ In reply to ]
>>>>> On Fri, 09 Jul 2021, Michael Orlitzky wrote:

>> So if we agree that e.g. zlib should be on by default, then this
>> belongs in profiles.

> We don't agree that it belongs on by default.

Well, that doesn't change the conclusion that it doesn't belong in IUSE
defaults. If anything, it strengthens my arguement.
Re: [PATCH] profiles/default/linux: Add USE="bzip2 lzma zstd" to defaults [ In reply to ]
Matt Turner wrote:
> > > If you can find a case where you wouldn't want to enable one of these
> > > USE flags, please let me know and I'll reconsider my position.
> >
> > My catalyst spec files all have use: -* foo bar x y z
> > specifically because the defaults are never what I want for any given
> > system. I build desktops, servers, containers, VM appliance images and
> > embedded system, and I know what I want in each one. Especially the
> > latter frequently have only very few USE flags set and I want zero
> > extra dependencies.
>
> I think you're making a great argument that you'd be completely
> unaffected by any of the suggestions in this thread.

I don't consider needing "use: -*" at all a desirable situation. This
catalyst warning might support that:

Warning!!!
The use of -* in $stage/use will cause portage to ignore
package.use in the profile and portage_confdir. You've been warned!


I see it as a shortcoming of the standard profiles that I have to
essentially create my own in order to get what I want, as opposed
to being able to build upon something truly minimal.


> > > I'd claim most of these packages' bzip2/lzma/zstd USE flags should
> > > be removed in favor of statically enabling them
> >
> > That is the direct opposite of Gentoo's single most core value: choice
>
> Choice makes sense when there's a legitimate trade-off to be made.

I explained that and why I frequently do not want those USE flags set,
demonstrating that I want choice here.

You can of course dismiss any concern which disagrees with your opinion as
illegitimate. Please do not bother asking questions if that's your style.


> Choice isn't dogma.

Is there a difference between dogma and value? I understand choice to be
a core value in Gentoo. Maybe that's wrong (now)? Core values are more
important than pretty much anything else.

Choice isn't always possible. That's not this case. If choice is indeed
a core value then where choice is pretty easy (this case) in my mind
there needs to be an overwhelmingly strong argument to conciously and
intentionally disable choice.


> > Just don't do it. Kthx.
>
> This kind of thing is nothing but irritating. Please don't do this.

I'm sorry if it wasn't clear that "Just don't do it. Kthx." meant
exactly what you wrote:

This kind of thing (increase default USE-flags) is nothing but irritating.
Please don't do this.


Kind regards

//Peter
Re: [PATCH] profiles/default/linux: Add USE="bzip2 lzma zstd" to defaults [ In reply to ]
On 7/12/21 10:30 AM, Peter Stuge wrote:
> Matt Turner wrote:
>>>> If you can find a case where you wouldn't want to enable one of these
>>>> USE flags, please let me know and I'll reconsider my position.
>>>
>>> My catalyst spec files all have use: -* foo bar x y z
>>> specifically because the defaults are never what I want for any given
>>> system. I build desktops, servers, containers, VM appliance images and
>>> embedded system, and I know what I want in each one. Especially the
>>> latter frequently have only very few USE flags set and I want zero
>>> extra dependencies.
>>
>> I think you're making a great argument that you'd be completely
>> unaffected by any of the suggestions in this thread.
>
> I don't consider needing "use: -*" at all a desirable situation. This
> catalyst warning might support that:
>
> Warning!!!
> The use of -* in $stage/use will cause portage to ignore
> package.use in the profile and portage_confdir. You've been warned!
>
>
> I see it as a shortcoming of the standard profiles that I have to
> essentially create my own in order to get what I want, as opposed
> to being able to build upon something truly minimal.
>
>
>>>> I'd claim most of these packages' bzip2/lzma/zstd USE flags should
>>>> be removed in favor of statically enabling them
>>>
>>> That is the direct opposite of Gentoo's single most core value: choice
>>
>> Choice makes sense when there's a legitimate trade-off to be made.
>
> I explained that and why I frequently do not want those USE flags set,
> demonstrating that I want choice here.
>
> You can of course dismiss any concern which disagrees with your opinion as
> illegitimate. Please do not bother asking questions if that's your style.
>
>
>> Choice isn't dogma.
>
> Is there a difference between dogma and value? I understand choice to be
> a core value in Gentoo. Maybe that's wrong (now)? Core values are more
> important than pretty much anything else.
>
> Choice isn't always possible. That's not this case. If choice is indeed
> a core value then where choice is pretty easy (this case) in my mind
> there needs to be an overwhelmingly strong argument to conciously and
> intentionally disable choice.
>
>
>>> Just don't do it. Kthx.
>>
>> This kind of thing is nothing but irritating. Please don't do this.
>
> I'm sorry if it wasn't clear that "Just don't do it. Kthx." meant
> exactly what you wrote:
>
> This kind of thing (increase default USE-flags) is nothing but irritating.
> Please don't do this.
>
>
> Kind regards
>
> //Peter
>
Hi Peter,

Nobody is "disabling choice" here, a change in defaults doesn't remove
your ability to choose something else.

And I understand your sentiment that adding more default-on flags goes
against YOUR goals of a minimal gentoo, but I'd like to remind you and
others that this minimalism is not the goal of every gentoo user.

More default features might irritate you and other minimalists, but it
may significantly improve the gentoo experiences of everyone else.

I want to be clear that I'm not saying you are wrong, but remember that
your perspective is not the only correct one on this topic.

-Ben
Re: [PATCH] profiles/default/linux: Add USE="bzip2 lzma zstd" to defaults [ In reply to ]
On Mon, 2021-07-12 at 10:46 -0500, Ben Kohler wrote:
>
> Nobody is "disabling choice" here, a change in defaults doesn't remove
> your ability to choose something else.

I think what you're suggesting is that default-on is not any worse for
choice than default-off, since both can be changed?

Consider the one legitimate example given: sys-apps/kmod. How can we
disable lzma for everything except packages that have +lzma defaulted?
(Ignoring the open pull request, that is usually done for a good
reason.) In other words, how do people undo this patch, without
potentially breaking their systems?

I hesitate to speak for anyone else, but all I personally want is to be
reasonably sure what my configurations are going to do without having
to list every individual package and USE flag explicitly. I don't think
it's written in stone anywhere, but the repo relies on the fact that
USE flags are disabled by default. As a result, it's much easier for
users to add things to USE than it is to remove them.

If we assume that most IUSE default-ons exist for a good reason
(roughly true), then you can imagine two groups of people.

Person 1: wants everything enabled by default.
Person 2: wants only important things (determined by chosen profile and
IUSE defaults) enabled by default.

Before the patch,

Person 1: adds USE="bzip2 lzma zstd" to make.conf. Requires no ongoing
maintenance.
Person 2: does nothing.

After the patch,

Person 1: does nothing.
Person 2: lists a hundred different packages in all of his package.use
files, after checking each of them to see which ones have important
IUSE defaults. Requires ongoing maintenance as new packages are added.

We've kept things the same level of difficulty for one group of people,
but made them much harder for another. In no situation can anyone who
wants everything enabled have a harder time than 'adds USE="bzip2 lzma
zstd" to make.conf', but everyone else suffers to some degree. That's
discouraging choice overall.
Re: [PATCH] profiles/default/linux: Add USE="bzip2 lzma zstd" to defaults [ In reply to ]
On 7/12/21 12:25 PM, Michael Orlitzky wrote:
> We've kept things the same level of difficulty for one group of people,
> but made them much harder for another. In no situation can anyone who
> wants everything enabled have a harder time than 'adds USE="bzip2 lzma
> zstd" to make.conf', but everyone else suffers to some degree. That's
> discouraging choice overall.

Point taken.  If IUSE="-flag" were actually common in reality, I'd use
it as evidence that MY way is better, but alas.. =)


-Ben
Re: [PATCH] profiles/default/linux: Add USE="bzip2 lzma zstd" to defaults [ In reply to ]
Ben Kohler wrote:
> Nobody is "disabling choice" here,

Fair! Sorry about the hyperbole.


> a change in defaults doesn't remove your ability to choose something else.

True. My argument is more specificically that setting USE flags by
default in a "low-level" profile goes in the wrong direction.


> And I understand your sentiment that adding more default-on flags goes
> against YOUR goals of a minimal gentoo, but I'd like to remind you and
> others that this minimalism is not the goal of every gentoo user.

It's important that this is a low-ish-level profile. Unfortunately Matt
didn't respond to my question/point about profile inheritance.

I don't expect a gentoo desktop system to be minimal. I would however
like being able to build upon a minimal profile (not a desktop one)
with nothing in it, as opposed to having to essentially create a new
profile for each of my configurations.


> I want to be clear that I'm not saying you are wrong, but remember that
> your perspective is not the only correct one on this topic.

Maybe the discussion should focus on different kinds of profiles?

I'm not concerned about typical "user-facing" profiles here, it can
make plenty sense to enable these USE flags by default in those.


Michael Orlitzky wrote:
> all I personally want is to be reasonably sure what my configurations
> are going to do without having to list every individual package and
> USE flag explicitly.

Exactly this. Unfortunately I've had to give up on it, as USE flags
are set by default here and there, but I'd love to be able to rely
on a minimal starting point that will stay minimal.

Thank you for your mail Michael, you expressed my concern very well.


Kind regards

//Peter