Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 473332 - Remove bindist useflag from default make.conf
Summary: Remove bindist useflag from default make.conf
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Release Media
Classification: Unclassified
Component: Stages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Release Team
URL:
Whiteboard:
Keywords:
Depends on: 608058
Blocks:
  Show dependency tree
 
Reported: 2013-06-15 03:52 UTC by Patrick Lauer
Modified: 2018-01-10 11:31 UTC (History)
10 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 Patrick Lauer gentoo-dev 2013-06-15 03:52:11 UTC
I can understand the reasoning to set USE="bindist" for release media, but:

Most users will have to disable that "useless" useflag set in the default make.conf, it leads to confusion (openssh, firefox).

I suggest explicitly disabling USE="bindist" in the make.conf of all currently distributed stage3 to make life easier for users.
Comment 1 Matt Turner gentoo-dev 2013-07-26 05:12:04 UTC
It's not totally clear to me how this is happening, but I agree, we shouldn't set it.

Worse, it's not even always set. It's not set in recent mips stages, but it is set in recent amd64 stages for instance.

I think it might be because amd64 sets some HOSTUSE flags and mips (and other architectures) do not, which cause make.conf to be created. Catalyst contains some [ -e /etc/portage/make.conf ] && <write USE flags including bindist> code, so.
Comment 2 Rick Farina (Zero_Chaos) gentoo-dev 2013-08-28 03:03:52 UTC
the flag ends up set by the catalyst option "bindist".  I didn't realize it was polluting the system make.conf, I'll fix it.
Comment 3 Rick Farina (Zero_Chaos) gentoo-dev 2013-09-05 05:23:31 UTC
Okay, so after some short research it looks like due the places catalyst already has hooks, I basically have to add a line to each of the chroot scripts to remove bindist use flag.  It's trivial, but it's a little ugly.

If no one objects, very shortly I'll land a patch that does this at EVERY STAGE, even though it isn't strictly required after stage[12] and possibly not even after stage3 (if you are distributing a stage4 or livecd).  It seems cleanest to me to simply clean it completely every time just like we reset the flags at the start of the next stage.
Comment 4 Matt Turner gentoo-dev 2013-09-05 23:59:43 UTC
(In reply to Rick Farina (Zero_Chaos) from comment #3)
> If no one objects, very shortly I'll land a patch that does this at EVERY
> STAGE, even though it isn't strictly required after stage[12] and possibly
> not even after stage3 (if you are distributing a stage4 or livecd).  It
> seems cleanest to me to simply clean it completely every time just like we
> reset the flags at the start of the next stage.

This sounds like the right thing to do. Please send a patch to the mailing list and I'll review it.
Comment 5 Tobias Heinlein (RETIRED) gentoo-dev 2014-11-04 20:58:42 UTC
Any news on this? I was pretty surprised right now when I realized that my OpenSSL didn't support EECDH ciphers (useful for Perfect Forward Secrecy) and that it was due to USE="bindist".
Comment 6 Rick Farina (Zero_Chaos) gentoo-dev 2014-11-05 05:15:31 UTC
(In reply to Tobias Heinlein from comment #5)
> Any news on this? I was pretty surprised right now when I realized that my
> OpenSSL didn't support EECDH ciphers (useful for Perfect Forward Secrecy)
> and that it was due to USE="bindist".

At the moment I haven't sent a patch because it's really really ugly.  At the present we don't add bindist to every stage, we would need to add and remove bindist from every stage, but the removal would likely be optional (since for instance I don't want it removed from my stages).

It's really ugly to do this, I'm honestly a bit sad that gentoo users can't figure out how to handle use flags. Is this really something we need to be "solving"? Even more so, do we want to ship stages that will immediately rebuild packages because use flags changed?
Comment 7 Ulrich Müller gentoo-dev 2015-02-26 06:15:43 UTC
CCing licenses team.

My advice would be to enable the bindist flag in every stage that we distribute. 
Users should not by chance distribute binaries that they are not allowed to distribute, therefore being exposed to possible legal problems. It is another issue if they actively disable the flag, because then the responsibility is entirely with them.
Comment 8 Jorge Manuel B. S. Vicetto Gentoo Infrastructure gentoo-dev 2015-02-26 11:34:22 UTC
(In reply to Ulrich Müller from comment #7)
> CCing licenses team.
> 
> My advice would be to enable the bindist flag in every stage that we
> distribute. 
> Users should not by chance distribute binaries that they are not allowed to
> distribute, therefore being exposed to possible legal problems. It is
> another issue if they actively disable the flag, because then the
> responsibility is entirely with them.

My plan is to split USE in USE and STAGE_USE. The latter is meant to be used during stage build, but removed from make.conf USE at the end. I also plan to have STAGE_USE set on catalyst specs, so users can choose whether to have the "bindist" use flag or not. The release team will enable "bindist" in all official specs.
Comment 9 Ulrich Müller gentoo-dev 2015-02-26 17:43:57 UTC
(In reply to Jorge Manuel B. S. Vicetto from comment #8)
> My plan is to split USE in USE and STAGE_USE. The latter is meant to be used
> during stage build, but removed from make.conf USE at the end. I also plan
> to have STAGE_USE set on catalyst specs, so users can choose whether to have
> the "bindist" use flag or not. The release team will enable "bindist" in all
> official specs.

Fine with me, as long as stages are not built with -bindist.
Comment 10 Alexander Berntsen (RETIRED) gentoo-dev 2015-03-02 09:58:16 UTC
(In reply to Ulrich Müller from comment #7)
> CCing licenses team.
> 
> My advice would be to enable the bindist flag in every stage that we
> distribute. 
I agree with this.
Comment 11 SpanKY gentoo-dev 2015-10-22 17:43:55 UTC
the current catalyst code in git does this now -- it'll write USE to make.conf before building, then delete it when it's done and before packaging.  so now it's a matter of waiting for the next major release ;).
Comment 12 Jorge Manuel B. S. Vicetto Gentoo Infrastructure gentoo-dev 2015-10-23 00:19:22 UTC
(In reply to SpanKY from comment #11)
> the current catalyst code in git does this now -- it'll write USE to
> make.conf before building, then delete it when it's done and before
> packaging.  so now it's a matter of waiting for the next major release ;).

The problem is that catalyst is now "throwing out" the make.conf generated in the end of a stage and creating a new one in the beginning of a new stage.
What we need is to keep the old behaviour and add a way to specify USE flags to be used during the stage build, but not kept in the make.conf.
Comment 13 Rick Farina (Zero_Chaos) gentoo-dev 2015-10-23 01:14:03 UTC
(In reply to Jorge Manuel B. S. Vicetto from comment #12)
> (In reply to SpanKY from comment #11)
> > the current catalyst code in git does this now -- it'll write USE to
> > make.conf before building, then delete it when it's done and before
> > packaging.  so now it's a matter of waiting for the next major release ;).
> 
> The problem is that catalyst is now "throwing out" the make.conf generated
> in the end of a stage and creating a new one in the beginning of a new stage.
> What we need is to keep the old behaviour and add a way to specify USE flags
> to be used during the stage build, but not kept in the make.conf.

sigh, it doesn't "throw out" make.conf between stages.  it just throws out USE=bindist when making the tarball.
Comment 14 Nathan Shearer 2016-05-19 17:58:08 UTC
This still hasn't been fixed in several of the stage3 tarballs: amd64, i486, and i686 . And a related problem which is potentially even worse is the inclusion of mmx sse sse2 in the amd64 make.conf file too. Those USE flags are being moved to CPU_FLAGS_X86 and we can't assume all architectures will have those features.

amd64:
USE="bindist mmx sse sse2"

i486:
USE="bindist"

i686:
USE="bindist"
Comment 15 Jorge Manuel B. S. Vicetto Gentoo Infrastructure gentoo-dev 2017-02-06 20:59:19 UTC
https://gitweb.gentoo.org/proj/catalyst.git/log/?h=catalyst_use

We're finally adding a CATALYST_USE spec variable to address this issue.
Comment 16 Ben Kohler gentoo-dev 2017-10-12 18:07:02 UTC
This will be resolved once we're doing autobuilds with catalyst-3
Comment 17 Jorge Manuel B. S. Vicetto Gentoo Infrastructure gentoo-dev 2018-01-10 11:31:14 UTC
We finally fixed this by using portage_prefix in the catalyst spec files[1]:

 [1] - https://gitweb.gentoo.org/proj/releng.git/commit/?id=73dfdcaca31dd32d560a7e042cd2147542025ec2

http://distfiles.gentoo.org/releases/amd64/autobuilds/20180109T214501Z/