Re: [gentoo-dev] [RFC] sys-meta/* to own and control /bin/{cpio,sh,tar,...} symlinks (alternatives-ish)

2022-11-24 Thread Alec Warner
On Thu, Nov 24, 2022 at 9:25 AM Maciej Barć  wrote:
>
> > Let's go for a compromise, and combine your naming suggestions into
> > "alt-symlinks".
>
> Perfect, the worst of both worlds! :^D

You know a compromise is when everyone leaves unhappy ;)

-A

>
> On 11/24/22 17:29, Michał Górny wrote:
> > On Wed, 2022-11-23 at 08:38 +0100, Michał Górny wrote:
> >> Hello, everyone.
> >>
> >> TL;DR: I'd like to add sys-meta/{cpio,sh,tar} to install and control
> >> (via USE flags) /bin/{cpio,sh,tar} symlinks.
> >>
> >> Draft PR: https://github.com/gentoo/gentoo/pull/28390
> >>
> >
> > Let's go for a compromise, and combine your naming suggestions into
> > "alt-symlinks".
> >
> > /me hides.
> >
>
> --
> Have a great day!
>
> ~ Maciej XGQT Barć



Re: [gentoo-dev] [RFC] sys-meta/* to own and control /bin/{cpio,sh,tar,...} symlinks (alternatives-ish)

2022-11-24 Thread Maciej Barć

Let's go for a compromise, and combine your naming suggestions into
"alt-symlinks".


Perfect, the worst of both worlds! :^D

On 11/24/22 17:29, Michał Górny wrote:

On Wed, 2022-11-23 at 08:38 +0100, Michał Górny wrote:

Hello, everyone.

TL;DR: I'd like to add sys-meta/{cpio,sh,tar} to install and control
(via USE flags) /bin/{cpio,sh,tar} symlinks.

Draft PR: https://github.com/gentoo/gentoo/pull/28390



Let's go for a compromise, and combine your naming suggestions into
"alt-symlinks".

/me hides.



--
Have a great day!

~ Maciej XGQT Barć


OpenPGP_0x14D74A1F43A6AC3C.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Re: [gentoo-dev] [RFC] sys-meta/* to own and control /bin/{cpio,sh,tar,...} symlinks (alternatives-ish)

2022-11-24 Thread Michał Górny
On Wed, 2022-11-23 at 08:38 +0100, Michał Górny wrote:
> Hello, everyone.
> 
> TL;DR: I'd like to add sys-meta/{cpio,sh,tar} to install and control
> (via USE flags) /bin/{cpio,sh,tar} symlinks.
> 
> Draft PR: https://github.com/gentoo/gentoo/pull/28390
> 

Let's go for a compromise, and combine your naming suggestions into
"alt-symlinks".

/me hides.

-- 
Best regards,
Michał Górny




Re: [gentoo-dev] [RFC] sys-meta/* to own and control /bin/{cpio,sh,tar,...} symlinks (alternatives-ish)

2022-11-23 Thread Maciej Barć

app -> what if it's library alternatives?


Maybe split to "app-" and "lib-" then?

Also, what about "-alt"? So "app-alt" and "lib-alt".

On 11/24/22 03:05, Ionen Wolkens wrote:

On Thu, Nov 24, 2022 at 01:32:04AM +, Alexey Sokolov wrote:

However, I tend to agree that the category should be named app-meta
rather than sys-meta, because chances are that non-system packages will
also make use of it.

Ulrich


Since these packages manage symlinks, make it app-symlink?


Mentioned this in another post, but this is limiting what would make
sense to be in there further.

app -> what if it's library alternatives?
symlink -> what if we need to use wrappers or some other solution?

Not that we ever really match categories perfectly either way, but
may as well stay generic rather than mismatch or create multiple
sub-types.

Some random ideas I had were 'alternatives', 'meta', 'select'
'select-meta', not that I thought much about it.

'meta' would essentially be like an entirely generic 'virtual' but
just without PMS restrictions. While the ones with alternatives or
select are more descriptive of what it's for without saying anything
about how we're doing it or for what type of package.


--
Have a great day!

~ Maciej XGQT Barć


OpenPGP_0x14D74A1F43A6AC3C.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Re: [gentoo-dev] [RFC] sys-meta/* to own and control /bin/{cpio,sh,tar,...} symlinks (alternatives-ish)

2022-11-23 Thread Ionen Wolkens
On Wed, Nov 23, 2022 at 09:05:47PM -0500, Ionen Wolkens wrote:
> On Thu, Nov 24, 2022 at 01:32:04AM +, Alexey Sokolov wrote:
> > > However, I tend to agree that the category should be named app-meta
> > > rather than sys-meta, because chances are that non-system packages will
> > > also make use of it.
> > > 
> > > Ulrich
> > 
> > Since these packages manage symlinks, make it app-symlink?
> 
> Mentioned this in another post, but this is limiting what would make
> sense to be in there further.
> 
> app -> what if it's library alternatives?
> symlink -> what if we need to use wrappers or some other solution?

Then again, I guess installing a wrapper / config files, etc... won't
fall under metapackage anymore, given installing code vs just making a
symlink.

> 
> Not that we ever really match categories perfectly either way, but
> may as well stay generic rather than mismatch or create multiple
> sub-types.
> 
> Some random ideas I had were 'alternatives', 'meta', 'select'
> 'select-meta', not that I thought much about it.
> 
> 'meta' would essentially be like an entirely generic 'virtual' but
> just without PMS restrictions. While the ones with alternatives or
> select are more descriptive of what it's for without saying anything
> about how we're doing it or for what type of package.
> -- 
> ionen



-- 
ionen


signature.asc
Description: PGP signature


Re: [gentoo-dev] [RFC] sys-meta/* to own and control /bin/{cpio,sh,tar,...} symlinks (alternatives-ish)

2022-11-23 Thread Ionen Wolkens
On Thu, Nov 24, 2022 at 01:32:04AM +, Alexey Sokolov wrote:
> > However, I tend to agree that the category should be named app-meta
> > rather than sys-meta, because chances are that non-system packages will
> > also make use of it.
> > 
> > Ulrich
> 
> Since these packages manage symlinks, make it app-symlink?

Mentioned this in another post, but this is limiting what would make
sense to be in there further.

app -> what if it's library alternatives?
symlink -> what if we need to use wrappers or some other solution?

Not that we ever really match categories perfectly either way, but
may as well stay generic rather than mismatch or create multiple
sub-types.

Some random ideas I had were 'alternatives', 'meta', 'select'
'select-meta', not that I thought much about it.

'meta' would essentially be like an entirely generic 'virtual' but
just without PMS restrictions. While the ones with alternatives or
select are more descriptive of what it's for without saying anything
about how we're doing it or for what type of package.
-- 
ionen


signature.asc
Description: PGP signature


Re: [gentoo-dev] [RFC] sys-meta/* to own and control /bin/{cpio,sh,tar,...} symlinks (alternatives-ish)

2022-11-23 Thread Alexey Sokolov

23.11.2022 16:45, Ulrich Mueller пишет:

On Wed, 23 Nov 2022, Michael Orlitzky wrote:



The main reason the new category is distasteful to me is because it's
*so close* to being a virtual. For one, having these packages be
virtuals would make them somewhat self-explanatory to end users. If
we're collectively willing to overlook the "no files" bit, are there
any other reasons to avoid using virtual/ ?


They have a nonempty installation image and at least one phase function,
therefore they're not virtuals. IIRC there are also some optimisations
for the virtual category in Portage as well as in our QA tools which
rely on this.

However, I tend to agree that the category should be named app-meta
rather than sys-meta, because chances are that non-system packages will
also make use of it.

Ulrich


Since these packages manage symlinks, make it app-symlink?

--
Best regards,
Alexey "DarthGandalf" Sokolov




Re: [gentoo-dev] [RFC] sys-meta/* to own and control /bin/{cpio,sh,tar,...} symlinks (alternatives-ish)

2022-11-23 Thread Yuan Liao (Leo)
On Wed, Nov 23, 2022 at 7:49 AM Ionen Wolkens  wrote:
> Not sure for a better name though, alternatives/tar? Haven't really
> thought about it, but technically no need for a prefix- like virtual.

What about 'sys-symlinks' or something similar which indicates that
packages in the category just install symlinks?  Pretty
self-explanatory.

Leo3418



Re: [gentoo-dev] [RFC] sys-meta/* to own and control /bin/{cpio,sh,tar,...} symlinks (alternatives-ish)

2022-11-23 Thread Michael Orlitzky
On Wed, 2022-11-23 at 08:38 +0100, Michał Górny wrote:
> 
> What are the advantages of proposed solution over eselect?
> ==

I think it's also worth mentioning the advantages over the usual
virtual approach, where we have a virtual pull in one implementation
and the implementations be responsible for the symlink. Because
otherwise that would tick the same boxes.

Here's one: the sys-meta approach allows you to switch the
implementation quickly without rebuilding an entire package. For
example, if I meet a package that's broken with /bin/sh -> /bin/dash, I
don't want to have to emerge bash to get past that.

Maybe there are others.




Re: [gentoo-dev] [RFC] sys-meta/* to own and control /bin/{cpio,sh,tar,...} symlinks (alternatives-ish)

2022-11-23 Thread Ionen Wolkens
On Wed, Nov 23, 2022 at 10:49:20AM -0500, Ionen Wolkens wrote:
> Not sure for a better name though, alternatives/tar? Haven't really
> thought about it, but technically no need for a prefix- like virtual.

For something shorter, select/tar maybe. Or select-meta if want
to keep a more common - style.

app-meta could also get awkward if we do this with libraries.

Kind of like the idea of having something to describe what users
should expect from this (select/alt). But if we want a general
purpose meta category that could be used for about anything like
virtual but without PMS restrictions, then that doesn't really work
(could even go ahead and call it 'meta').

-- 
ionen


signature.asc
Description: PGP signature


Re: [gentoo-dev] [RFC] sys-meta/* to own and control /bin/{cpio,sh,tar,...} symlinks (alternatives-ish)

2022-11-23 Thread Ulrich Mueller
> On Wed, 23 Nov 2022, Michael Orlitzky wrote:

> The main reason the new category is distasteful to me is because it's
> *so close* to being a virtual. For one, having these packages be
> virtuals would make them somewhat self-explanatory to end users. If
> we're collectively willing to overlook the "no files" bit, are there
> any other reasons to avoid using virtual/ ?

They have a nonempty installation image and at least one phase function,
therefore they're not virtuals. IIRC there are also some optimisations
for the virtual category in Portage as well as in our QA tools which
rely on this.

However, I tend to agree that the category should be named app-meta
rather than sys-meta, because chances are that non-system packages will
also make use of it.

Ulrich


signature.asc
Description: PGP signature


Re: [gentoo-dev] [RFC] sys-meta/* to own and control /bin/{cpio,sh,tar,...} symlinks (alternatives-ish)

2022-11-23 Thread Ionen Wolkens
On Wed, Nov 23, 2022 at 02:58:14PM +0100, Piotr Karbowski wrote:
> I am very much in favour to have a package that controls those symlinks. 
> What is not immediately clear to me is what would that mean for eselect 
> in long run. Is it so that you'd like to keep eselect around and alive 
> parallel to those sys-meta category packages, or would there be push to 
> eventually get rid of most of eselect and where possible switch to sys-meta?

There's some that do nothing but modify config files (e.g. eselect
editor, even has freestyle which couldn't express as USE), and there's
other over-the-top stuff like Wine or gcc (between wine variants, and
crossdev gcc, feel managing sys-meta and switching on the fly would
get annoying).

So yeah, think both type have a place.

On Wine note, new eselect-wine-2 won't modify /usr anymore and it's
easy to track/cleanup/reset what it modifies now -- something eselect
can try to aim for in general.

-- 
ionen


signature.asc
Description: PGP signature


Re: [gentoo-dev] [RFC] sys-meta/* to own and control /bin/{cpio,sh,tar,...} symlinks (alternatives-ish)

2022-11-23 Thread Ionen Wolkens
On Wed, Nov 23, 2022 at 03:37:57PM +0100, Michał Górny wrote:
> >   * The name also suggests to me that it will control sys-* 
> > implementations, but the victims so far are all app-*. Obviously,
> > we don't want twenty *-meta categories though.
> > 
> >   * The -meta prefix is already used in a bunch of ebuilds to mean
> > something different. The packages in sys-meta won't be 
> > "metapackages" in the same sense.
> 
> I don't really care how it's named.  I've chosen "sys-" because in my
> PoC it happens to control tools that are part of the base system.
> I suppose we could also want it for less important stuff like notify-
> send (though I guess I'll lastrite that eselect anyway).  I think we
> should just use one category for all of them, and I'm open to a better
> name.

Not seeing an issue with a new category myself, I'd rather these
be split to avoid confusion and it be clear for users what it is.

Not sure for a better name though, alternatives/tar? Haven't really
thought about it, but technically no need for a prefix- like virtual.

-- 
ionen


signature.asc
Description: PGP signature


Re: [gentoo-dev] [RFC] sys-meta/* to own and control /bin/{cpio,sh,tar,...} symlinks (alternatives-ish)

2022-11-23 Thread Michael Orlitzky
On Wed, 2022-11-23 at 15:37 +0100, Michał Górny wrote:

> 
> 
> PMS doesn't say anything about (new-style) virtuals.  It's a Gentoo
> policy entirely.

This is listed as a retroactive change,

  Note: A ‘new-style virtual’ is a normal package that installs no 
  files and uses its dependency requirements to pull in a ‘provider’.


> Do you have any specific concerns about having an extra category?
> I'm not aware of any real costs involved, or real reasons to use
> categories scarcely.
>  
> ...
> 
> I don't really care how it's named.  I've chosen "sys-" because in my
> PoC it happens to control tools that are part of the base system.
> I suppose we could also want it for less important stuff like notify-
> send (though I guess I'll lastrite that eselect anyway).  I think we
> should just use one category for all of them, and I'm open to a
> better name.

The main reason the new category is distasteful to me is because it's
*so close* to being a virtual. For one, having these packages be
virtuals would make them somewhat self-explanatory to end users. If
we're collectively willing to overlook the "no files" bit, are there
any other reasons to avoid using virtual/ ?

Regardless, since I specifically called out the "meta" suffix, let me
put forward sys-alternatives as an alternative.




Re: [gentoo-dev] [RFC] sys-meta/* to own and control /bin/{cpio,sh,tar,...} symlinks (alternatives-ish)

2022-11-23 Thread Michał Górny
On Wed, 2022-11-23 at 08:47 -0500, Michael Orlitzky wrote:
> On Wed, 2022-11-23 at 08:38 +0100, Michał Górny wrote:
> > Hello, everyone.
> > 
> > TL;DR: I'd like to add sys-meta/{cpio,sh,tar} to install and control
> > (via USE flags) /bin/{cpio,sh,tar} symlinks.
> > 
> > Draft PR: https://github.com/gentoo/gentoo/pull/28390
> > 
> 
> I generally favor using the package manager in these situations, but
> there's a lot of user-facing documentation (and user configurations)
> that will need updating. We should probably have a GLEP -- and
> eventually a news item -- for this.
> 
> A few comments:
> 
>   * The new category is a bit annoying. I know the PMS says that  
> virtuals can't install files, but having an entirely separate 
> category for virtuals that install a symlink feels excessive.
> Not that I have a better idea.

Do you have any specific concerns about having an extra category?
I'm not aware of any real costs involved, or real reasons to use
categories scarcely.

>   * The name also suggests to me that it will control sys-* 
> implementations, but the victims so far are all app-*. Obviously,
> we don't want twenty *-meta categories though.
> 
>   * The -meta prefix is already used in a bunch of ebuilds to mean
> something different. The packages in sys-meta won't be 
> "metapackages" in the same sense.

I don't really care how it's named.  I've chosen "sys-" because in my
PoC it happens to control tools that are part of the base system.
I suppose we could also want it for less important stuff like notify-
send (though I guess I'll lastrite that eselect anyway).  I think we
should just use one category for all of them, and I'm open to a better
name.

>   * Should we replace app-arch/tar with sys-meta/tar in @system?

I think that makes sense for a long-term goal, unless there's a good
reason to always have gtar around.  It should be noted that this will
require adding explicitly dependencies to some packages.

> 
>   * Having to specify the relationship twice (once in the sys-meta 
> package and once in each implementation) is also a bit ugly, as is 
> having to account for the symlink not being installed (yet) in 
> each implementation's pkg_postinst. This made me wonder, could 
> the RDEPEND/PDEPEND be reversed? In other words, could (say) GNU 
> tar require that the symlink be present immediately, but the 
> metapackage only require that some implementation be merged 
> eventually?
> 
> To answer my own question, the PMS says that PDEPENDs "must be 
> installed at some point before the package manager finishes the 
> batch of installs," which would be problematic if some later 
> package in the batch actually needed a tar implementation 
> available to build. We can't change the PMS, so installing a 
> symlink in the implementation ebuilds avoids the issue, but still 
>     eventually cedes control to the sys-meta package.
> 
> I guess you already thought through all of that? If so, it would be
> nice to have the rationale written down somewhere that we can refer
> back to.

Yes, I thought how to do it and I think the current implementation is
the best we can.  The most important point is avoiding a long period
without system tools being available during the transition, and I think
pkg_postinst() approach handles that best.

>   * Is it worth thinking about improvements to EAPI=? that could help 
> us here? By e.g. allowing virtuals to install symlinks, or by 
> making PDEPEND kick in sooner (after this package, but before the 
> rest of the batch)?
> 

PMS doesn't say anything about (new-style) virtuals.  It's a Gentoo
policy entirely.

Improving PDEPEND would be also helpful e.g. for clang/clang-runtime
cycle.  Unfortunately, it's non-trivial since PDEPENDs can have their
own dependencies that can affect the build order in mysterious ways. 
Dependency resolver is not really my area of expertise.

-- 
Best regards,
Michał Górny




Re: [gentoo-dev] [RFC] sys-meta/* to own and control /bin/{cpio,sh,tar,...} symlinks (alternatives-ish)

2022-11-23 Thread Michał Górny
On Wed, 2022-11-23 at 14:58 +0100, Piotr Karbowski wrote:
> Hi,
> 
> On 23/11/2022 08.38, Michał Górny wrote:
> > Hello, everyone.
> > 
> > TL;DR: I'd like to add sys-meta/{cpio,sh,tar} to install and control
> > (via USE flags) /bin/{cpio,sh,tar} symlinks.
> 
> I am very much in favour to have a package that controls those symlinks. 
> What is not immediately clear to me is what would that mean for eselect 
> in long run. Is it so that you'd like to keep eselect around and alive 
> parallel to those sys-meta category packages, or would there be push to 
> eventually get rid of most of eselect and where possible switch to sys-meta?

No, I don't think that's going to happen.  Sure, switching that will
make sense for some packages; for others, eselect will probably be
better.

-- 
Best regards,
Michał Górny




Re: [gentoo-dev] [RFC] sys-meta/* to own and control /bin/{cpio,sh,tar,...} symlinks (alternatives-ish)

2022-11-23 Thread Piotr Karbowski

Hi,

On 23/11/2022 08.38, Michał Górny wrote:

Hello, everyone.

TL;DR: I'd like to add sys-meta/{cpio,sh,tar} to install and control
(via USE flags) /bin/{cpio,sh,tar} symlinks.


I am very much in favour to have a package that controls those symlinks. 
What is not immediately clear to me is what would that mean for eselect 
in long run. Is it so that you'd like to keep eselect around and alive 
parallel to those sys-meta category packages, or would there be push to 
eventually get rid of most of eselect and where possible switch to sys-meta?


-- Piotr.



Re: [gentoo-dev] [RFC] sys-meta/* to own and control /bin/{cpio,sh,tar,...} symlinks (alternatives-ish)

2022-11-23 Thread Michael Orlitzky
On Wed, 2022-11-23 at 08:38 +0100, Michał Górny wrote:
> Hello, everyone.
> 
> TL;DR: I'd like to add sys-meta/{cpio,sh,tar} to install and control
> (via USE flags) /bin/{cpio,sh,tar} symlinks.
> 
> Draft PR: https://github.com/gentoo/gentoo/pull/28390
> 

I generally favor using the package manager in these situations, but
there's a lot of user-facing documentation (and user configurations)
that will need updating. We should probably have a GLEP -- and
eventually a news item -- for this.

A few comments:

  * The new category is a bit annoying. I know the PMS says that  
virtuals can't install files, but having an entirely separate 
category for virtuals that install a symlink feels excessive.
Not that I have a better idea.

  * The name also suggests to me that it will control sys-* 
implementations, but the victims so far are all app-*. Obviously,
we don't want twenty *-meta categories though.

  * The -meta prefix is already used in a bunch of ebuilds to mean
something different. The packages in sys-meta won't be 
"metapackages" in the same sense.

  * Should we replace app-arch/tar with sys-meta/tar in @system?

  * Having to specify the relationship twice (once in the sys-meta 
package and once in each implementation) is also a bit ugly, as is 
having to account for the symlink not being installed (yet) in 
each implementation's pkg_postinst. This made me wonder, could 
the RDEPEND/PDEPEND be reversed? In other words, could (say) GNU 
tar require that the symlink be present immediately, but the 
metapackage only require that some implementation be merged 
eventually?

To answer my own question, the PMS says that PDEPENDs "must be 
installed at some point before the package manager finishes the 
batch of installs," which would be problematic if some later 
package in the batch actually needed a tar implementation 
available to build. We can't change the PMS, so installing a 
symlink in the implementation ebuilds avoids the issue, but still 
    eventually cedes control to the sys-meta package.

I guess you already thought through all of that? If so, it would be
nice to have the rationale written down somewhere that we can refer
back to.

  * Is it worth thinking about improvements to EAPI=? that could help 
us here? By e.g. allowing virtuals to install symlinks, or by 
making PDEPEND kick in sooner (after this package, but before the 
rest of the batch)?

Despite all the skeptical-sounding feedback, I think this is a good
idea, and an improvement over eselect.