~alpine/devel

2 2

RFC: replacing -util and wrong usage of -bin with -utils

Details
Message ID
<bf7ab4943efc85b6139bc34d038c15620bbac45b.camel@gmail.com>
DKIM signature
missing
Download raw message
Hello

Looking at aports one of the most common way to separate utilities
provided alongside a library is by making a `-utils` subpackage.

This is followed by most aports but there are some that don't follow
it: instead they use `-util` or `-bin`.

Also worth noting that `-bin` is used for other purposes as well.

My proposals are:

1. replace all usage of `-util` with `-utils` and look at all usage of
`-bin` and replace, where appropriate, with `-utils`.
2. Make `*-util` a violation according to atools, and have apkbuild-
fixer automatically replace it with `-utils`.

Regards
Leo
Details
Message ID
<20210119214908.18cb9fc0@ncopa-desktop.lan>
In-Reply-To
<bf7ab4943efc85b6139bc34d038c15620bbac45b.camel@gmail.com> (view parent)
DKIM signature
missing
Download raw message
On Mon, 18 Jan 2021 06:32:45 -0300
maxice8 <thinkabit.ukim@gmail.com> wrote:

> Hello
> 
> Looking at aports one of the most common way to separate utilities
> provided alongside a library is by making a `-utils` subpackage.
> 
> This is followed by most aports but there are some that don't follow
> it: instead they use `-util` or `-bin`.
> 
> Also worth noting that `-bin` is used for other purposes as well.
> 
> My proposals are:
> 
> 1. replace all usage of `-util` with `-utils` and look at all usage of
> `-bin` and replace, where appropriate, with `-utils`.
> 2. Make `*-util` a violation according to atools, and have apkbuild-
> fixer automatically replace it with `-utils`.

I don't know if it makes sense to have a single utility in a subpackage
named -utils (plural).

There are also a number of packages that are named -util from upstream.
For example font-util, apr-util, aufs-util, xcb-util.

I did a quick search what packages this is about.

kodi-bin-18.9-r0 x86_64 {kodi} (GPL-2.0-only)

Seems to install kodi-x11 and kodi-xrandr. pkgdesc="X11 Kodi binary".
Not sure why its called '-bin'. I'd think kodi-x11 would make more
sense.

seabios-bin-1.13.0-r0 x86_64 {seabios} (LGPL-3.0)

Contains usr/share/seabios/bios*.bin. Name seems appropriate.

libproxy-bin-0.4.17-r0 x86_64 {libproxy} (LGPL-2.0-or-later)

contains a single usr/bin/proxy. Description is:

libproxy-bin-0.4.17-r0 description:
Binary to test libproxy

I think this could be renamed.

liblouis-bin-3.16.1-r0 x86_64 {liblouis} (GPL-3.0-or-later)

This could potentially be renambed to -utils. it contains a number of
/usr/bin/lou_* files. Looks like there also are
usr/bin/lou_maketable.d/* files, which does not look right.

libcouchbase-bin-2.10.6-r0 x86_64 {libcouchbase} (Apache-2.0)

pkgdesc says: C client library for Couchbase (command line utilities)

This contains usr/bin/cbc-* files. Could potentially be renamed to -utils.


sigrok-firmware-fx2lafw-bin-0.1.6-r0 x86_64
{sigrok-firmware-fx2lafw-bin} (GPL-2.0-or-later)

looks like firmware. should probably not be renamed.

But really, I don't think I understand why this is a problem worth spending time on.

Some of the -utils name was copied from corresponding fedora packages,
which makes it relatively easy to "feel home" if we have similar names.
And documentation and blog articles are easier "ported" to Alpine. That was the thinking at least, but I don't know if it actually makes any difference in real life.

What I do know for sure is that renaming packages requires end users to
rename their scripts/dockerfiles/wiki articles and adds friction when
upgrade, so I think we should avoid renaming packages unless there are
good reasons to do so.

I'm not convinced it is a good idea to add this to atools, which will
make people rename stuff without thinking of it makes sense or not.

But yeah... naming things is hard.

> 
> Regards
> Leo
> 
Details
Message ID
<99b787f98b71fe049d4a3ae3466beab9c24d5fe3.camel@gmail.com>
In-Reply-To
<20210119214908.18cb9fc0@ncopa-desktop.lan> (view parent)
DKIM signature
missing
Download raw message
On Tue, 2021-01-19 at 21:49 +0100, Natanael Copa wrote:
> On Mon, 18 Jan 2021 06:32:45 -0300
> maxice8 <thinkabit.ukim@gmail.com> wrote:
> 
> > Hello
> > 
> > Looking at aports one of the most common way to separate utilities
> > provided alongside a library is by making a `-utils` subpackage.
> > 
> > This is followed by most aports but there are some that don't
> > follow
> > it: instead they use `-util` or `-bin`.
> > 
> > Also worth noting that `-bin` is used for other purposes as well.
> > 
> > My proposals are:
> > 
> > 1. replace all usage of `-util` with `-utils` and look at all usage
> > of
> > `-bin` and replace, where appropriate, with `-utils`.
> > 2. Make `*-util` a violation according to atools, and have
> > apkbuild-
> > fixer automatically replace it with `-utils`.
> 
> I don't know if it makes sense to have a single utility in a
> subpackage
> named -utils (plural).
> 

I prefer the uniformity of having it be -utils for all, it also future
proofs against upstream adding more utilities.

Accepting -util also begs the question, should we rename subpackages
that are -utils but have a single binary ?

> There are also a number of packages that are named -util from
> upstream.
> For example font-util, apr-util, aufs-util, xcb-util.
> 
> I did a quick search what packages this is about.
> 
> kodi-bin-18.9-r0 x86_64 {kodi} (GPL-2.0-only)
> 
> Seems to install kodi-x11 and kodi-xrandr. pkgdesc="X11 Kodi binary".
> Not sure why its called '-bin'. I'd think kodi-x11 would make more
> sense.
> 

Yes, there is a kodi-wayland, it makes a lot of sense to have kodi-x11.

> seabios-bin-1.13.0-r0 x86_64 {seabios} (LGPL-3.0)
> 
> Contains usr/share/seabios/bios*.bin. Name seems appropriate.
> 

Yes

> libproxy-bin-0.4.17-r0 x86_64 {libproxy} (LGPL-2.0-or-later)
> 
> contains a single usr/bin/proxy. Description is:
> 
> libproxy-bin-0.4.17-r0 description:
> Binary to test libproxy
> 
> I think this could be renamed.
> 

I'd have to investigate more

> liblouis-bin-3.16.1-r0 x86_64 {liblouis} (GPL-3.0-or-later)
> 
> This could potentially be renambed to -utils. it contains a number of
> /usr/bin/lou_* files. Looks like there also are
> usr/bin/lou_maketable.d/* files, which does not look right.
> 

directories in $PATH doesn't look good

> libcouchbase-bin-2.10.6-r0 x86_64 {libcouchbase} (Apache-2.0)
> 
> pkgdesc says: C client library for Couchbase (command line utilities)
> 
> This contains usr/bin/cbc-* files. Could potentially be renamed to -
> utils.
> 

Yes.

> 
> sigrok-firmware-fx2lafw-bin-0.1.6-r0 x86_64
> {sigrok-firmware-fx2lafw-bin} (GPL-2.0-or-later)
> 
> looks like firmware. should probably not be renamed.
> 

Certainly

> But really, I don't think I understand why this is a problem worth
> spending time on.
> 
> Some of the -utils name was copied from corresponding fedora
> packages,
> which makes it relatively easy to "feel home" if we have similar
> names.
> And documentation and blog articles are easier "ported" to Alpine.
> That was the thinking at least, but I don't know if it actually makes
> any difference in real life.
> 
> What I do know for sure is that renaming packages requires end users
> to
> rename their scripts/dockerfiles/wiki articles and adds friction when
> upgrade, so I think we should avoid renaming packages unless there
> are
> good reasons to do so.
> 
> I'm not convinced it is a good idea to add this to atools, which will
> make people rename stuff without thinking of it makes sense or not.
> 
> But yeah... naming things is hard.
> 
> > 
> > Regards
> > Leo
> > 
> 
Reply to thread Export thread (mbox)