• Binary conflict between Midnight Commander and MinIO Client

    From Mathias Gibbens@21:1/5 to All on Sun Apr 21 18:40:01 2024
    Currently, Midnight Commander is packaged for Debian as `mc`. I am
    looking at packaging the MinIO Client (needed for a future release of
    Incus), which also unfortunately names its binary `mc`. MinIO upstream
    has been pretty clear that they don't consider this a bug[1].

    While that might work for them, it obviously doesn't at a higher
    packaging level. Per Policy Section 10.1, I'm bringing this to d-devel
    for any comments or suggestions on my plan for packaging the MinIO
    Client. Following what several other distributions have done[2], I'm
    planning to name the source/binary packages "minio-client" and the
    binary provided from that package will be `mcli`.

    Thanks,
    Mathias

    [1] -- https://github.com/minio/mc/blob/master/CONFLICT.md
    [2] -- https://repology.org/project/minio-client/versions

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEE1Bp60H32xfynSJ8cKe7i1uz0QvkFAmYlP1wACgkQKe7i1uz0 QvlrmA/+I+g0JOBhEzv9m0Gvme+NYpeChJhCOq72e2enUxunKxK9VLt9IUVtOV4t lxLXk/j65q25uQm1qm/ZwEziR6kWd5wPVeLcD3cbpIoQaw069Q1yDZPkpd/c8T+e ZWGRVeWr1KLGoLwtAuhPE/uBjAmGZiuE3bWMpbAWJlaU2CTVWxOyxlrzFw01PTHy SDQf38e7Yhe/5OPJT6pEPXzyG5WxUHR9T1TKRiROJ/LTvsx4YCkxRcMR7l3aKHIS lUVsDFWV+Y9E5xGE7KDWY8GRlRbt5EJAGv2HBdxf+jNbPBKxRaliZ4mAw2HH6TKh YSMB6xdl942mM90NoRalsrnWErUubP2GWfLdcuLAkC+JoHgBCEdXIQP0k/So7dle qMVYBmh3GNnuaW9QmLhGIwDTtqiToxHw/dvTluMRlunmA9UAgnJUgO7FJNq14xPK 8p6R/DAN2WafV70+6WvNJfoIlFfoK2SfnBdsiOWJB4sPIn3ZSqG9xht4z7XKxa4n HzmS73DhpfdYIH1Bv7ep8T1q7Syrdb8Aj1/0vb4T4uEL53on+MyNiIurKeVPh3eM jUWLLqVtIezG8Z8CU7BHYpIuXKWxOm6XU0CHRRAf0ZE1xjOlgjuVxcN3AYEzUlSc glm2QWsDAvCH8CmxeSxVWrflLA7g7iSEBYYJqs+KLmlP0M/Xrrw=
    =jLNw
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marco d'Itri@21:1/5 to Mathias Gibbens on Sun Apr 21 18:40:02 2024
    On Apr 21, Mathias Gibbens <gibmat@debian.org> wrote:

    While that might work for them, it obviously doesn't at a higher
    packaging level. Per Policy Section 10.1, I'm bringing this to d-devel
    for any comments or suggestions on my plan for packaging the MinIO
    Client. Following what several other distributions have done[2], I'm
    planning to name the source/binary packages "minio-client" and the
    binary provided from that package will be `mcli`.
    Go for it, I think that there is no good solution for this case.
    Everybody who cares then will manually create a mc -> mcli symlink.

    --
    ciao,
    Marco

    -----BEGIN PGP SIGNATURE-----

    iHUEABYIAB0WIQQnKUXNg20437dCfobLPsM64d7XgQUCZiVAvQAKCRDLPsM64d7X gXB8AQCLPVEW/vLp5C8gmWlz5q15ystbJHHW+LwTibzyAbGGZAEArAJQ9DBBG2BY lhC01LUZ9AQT3lKqJGLo/ZQ/CHSGBg8=
    =GtSx
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Josefsson@21:1/5 to Marco d'Itri on Sun Apr 21 18:50:01 2024
    Marco d'Itri <md@Linux.IT> writes:

    On Apr 21, Mathias Gibbens <gibmat@debian.org> wrote:

    While that might work for them, it obviously doesn't at a higher
    packaging level. Per Policy Section 10.1, I'm bringing this to d-devel
    for any comments or suggestions on my plan for packaging the MinIO
    Client. Following what several other distributions have done[2], I'm
    planning to name the source/binary packages "minio-client" and the
    binary provided from that package will be `mcli`.

    +1

    Go for it, I think that there is no good solution for this case.
    Everybody who cares then will manually create a mc -> mcli symlink.

    Several Homebrew packages uses an approach that I regard as superior to
    what the debian ecosystem provides for this problem: putting files in a
    path that users can add to their $PATH to get upstreams' desired binary
    name, when there is a conflict with a historically established name. So
    for this example, minio-client could create a symlink like this

    /usr/libexec/minio-client/bin/mc -> /usr/bin/mcli

    and users who really want the upstream behaviour can solve this by
    modifying environment variables.

    /Simon

    -----BEGIN PGP SIGNATURE-----

    iIoEARYIADIWIQSjzJyHC50xCrrUzy9RcisI/kdFogUCZiVDChQcc2ltb25Aam9z ZWZzc29uLm9yZwAKCRBRcisI/kdFomKVAQCyUTpZLhQ0b6JKopXp1JOcHPJ1tKMh leUv4sZU6KC1PQEAxxvAxDGjldN7u4uIwd8KjJCPRYfQraPivWXQIhrJogg=
    =uaPz
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mathias Gibbens@21:1/5 to Simon Josefsson on Sun Apr 21 19:40:01 2024
    On Sun, 2024-04-21 at 18:47 +0200, Simon Josefsson wrote:
    Marco d'Itri <md@Linux.IT> writes:

    On Apr 21, Mathias Gibbens <gibmat@debian.org> wrote:

      While that might work for them, it obviously doesn't at a higher packaging level. Per Policy Section 10.1, I'm bringing this to d-devel for any comments or suggestions on my plan for packaging the MinIO Client. Following what several other distributions have done[2], I'm planning to name the source/binary packages "minio-client" and the
    binary provided from that package will be `mcli`.

    +1

    Go for it, I think that there is no good solution for this case.
    Everybody who cares then will manually create a mc -> mcli symlink.

    Several Homebrew packages uses an approach that I regard as superior to
    what the debian ecosystem provides for this problem: putting files in a
    path that users can add to their $PATH to get upstreams' desired binary
    name, when there is a conflict with a historically established name.  So
    for this example, minio-client could create a symlink like this

    /usr/libexec/minio-client/bin/mc -> /usr/bin/mcli

    and users who really want the upstream behaviour can solve this by
    modifying environment variables.

    I like that idea, thanks! It would be easy enough to add that to
    Incus' $PATH while making it simple for an end user to modify their
    local environment to directly use `mc` if they wish.

    Mathias

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEE1Bp60H32xfynSJ8cKe7i1uz0QvkFAmYlTbUACgkQKe7i1uz0 QvlJuA//V3yr7GyVaQpK+/3F2BbiE5Wa8Ht5+o1oJa44drhMPGtnVgnABWJgUQ7w LOxeMVgAdqZiawHt9SW+Pl0T6uYS+/WUr4y629qg1keHAqND6KiHeIC/6ulH6vwN GblWdK4oPrvu+keKPSogza7SSpipBid8LSrnl1mBtG/Is05iIN8MggwVowPnP1Fq NO9Wy8tUFh15PNtqx8zU9lpI3kC7gZcO6LLNZZv9ovwDSrvs+0WfMcv0JohgxR14 qTNb8udPj5tMhtzEstgQx8+rgQaSxEoIWuW+8bN6GVs6PwtTGRAUmgeDi6QTCz9X eV6dwfxo880K/FC3b0n3EwrerpZe6WwPPoaDzWBkoc4DGfxbX6AjoAum+4w8xH2J N90NEJYwMKZK1mss31pZXp5cSfFY2L2mNpcvSKxrMZWsCZol4iK6GtwHpwNJSg3r YTGmrsfbwkyxcJGzbtXzarp5feprGap8Ieq28JaOE1yxHFN3AlhVijwoFBlwLxWY ZTWx5rRh4ozBQezEihE/M2AmHZRwAGsAIGTylfhhq875JY+KimSN/ewQpQ81JWC3 /bE6t6K3ffywh6dMi3FJoWnDXINABdDPG+L8rrzwYM/4w6Fz3H172jVqxpW9q36C 8noH20/87OZ8b2StiFgDLokRjY6P//Jw6/w3dSi7aa56yHT75Ik=
    =WLN2
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Josefsson@21:1/5 to Philip Hands on Mon Apr 22 09:50:02 2024
    Philip Hands <phil@hands.com> writes:

    Mathias Gibbens <gibmat@debian.org> writes:

    On Sun, 2024-04-21 at 18:47 +0200, Simon Josefsson wrote:
    ...
    /usr/libexec/minio-client/bin/mc -> /usr/bin/mcli

    Might I suggest that the link goes the other way, so that the symlink
    lives in /usr/bin? That way the existence of the lib directory is
    somewhat self-documenting.

    If you're looking for examples, it seems that fd-find and binutils-avr
    do something like this (although they seem to be linking into ../lib/ presumably for historical reasons).

    It seems this approach could use some documentation, if we want to have
    some consistent implementation of this idea in Debian. While I usually
    dislike symlinks in /usr/bin/ I think there is some advantages. I'm
    also not sure where a good path component to store such binaries are,
    libexec or lib? Or share?

    /Simon

    -----BEGIN PGP SIGNATURE-----

    iIoEARYIADIWIQSjzJyHC50xCrrUzy9RcisI/kdFogUCZiYVTBQcc2ltb25Aam9z ZWZzc29uLm9yZwAKCRBRcisI/kdFolCzAP95UhrI/T5rxOQg793kpyn/QIQp8KPS y+H8qUbucC8yrwEA3JXCygma1zv62b4f7xWvrqIeGMu5x5lqHa2WeVOuZQg=
    =8rnH
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Philip Hands@21:1/5 to Mathias Gibbens on Mon Apr 22 09:30:01 2024
    Mathias Gibbens <gibmat@debian.org> writes:

    On Sun, 2024-04-21 at 18:47 +0200, Simon Josefsson wrote:
    ...
    /usr/libexec/minio-client/bin/mc -> /usr/bin/mcli

    Might I suggest that the link goes the other way, so that the symlink
    lives in /usr/bin? That way the existence of the lib directory is
    somewhat self-documenting.

    If you're looking for examples, it seems that fd-find and binutils-avr
    do something like this (although they seem to be linking into ../lib/ presumably for historical reasons).

    Cheers, Phil.
    --
    Philip Hands -- https://hands.com/~phil

    --=-=-Content-Type: application/pgp-signature; name="signature.asc"

    -----BEGIN PGP SIGNATURE-----

    iQIzBAEBCgAdFiEE3/FBWs4yJ/zyBwfW0EujoAEl1cAFAmYmEZ0ACgkQ0EujoAEl 1cDX4w//SmVrB0sFqa1eccfY4MawcmPY3n+yUAUEDuaQuOuCg3IVzmh+7+loUlVB YdhU03UARhcUaWAC35tTOtSohBS2j1/cq8w/ARU9jP9lskhIAv+mKZM4WStUH3tL O/d1jgU/faltbzDFaLYcoruU6Z3bIqEow4yEnvPL9/BgQJQQziRYpHO80RVyqFRz RNmVXXHd1mXCnuxQlNZ47TEvoe3cy9Db56EGAHSmU9q5QA0O8bxASrcYOqDLDw5d 1IOPbFqRNrFDrTCpm99UkkKejnx8ppzKKP1wxoEX4IMD7xvMYe0ZrQq6XFGDOpa4 QKbZ850SjJPzo57BhwyFBVcZtyedj9Yka6xWijQyE/Yj/3S+zP5/iTmelJXZmXVS SyxkQ5Atke9p8UOwAhEqmBm3563AHCk77a2bEnemM3WsqGEAsIn9q53CBTgSHIZr MD8Ta4QRAUu84r7P8cHxpxU8S3DDEXO86zVg0gEcyTYnryIhbFe1dvWCRAQqpDbD XgyvoBJ69h8Rc+GvF0rLmC3nHin+TK4Pp6ei7Es0owCtAhr/0r/SceN7cvgJJLoD 59qedfJvCq1OCRFWesuIzy62Xm8irol97zEFyL/P2tIoZX2Wr+UAf1fYwH599Knj JjEhpNOmZrFzC77iXZ5HUdtf4qnrdJ5rJMGyc7BHZG6Aulpb/Bk=Qi2A
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gatewa
  • From Simon McVittie@21:1/5 to Simon Josefsson on Mon Apr 22 11:10:01 2024
    On Mon, 22 Apr 2024 at 09:44:12 +0200, Simon Josefsson wrote:
    Philip Hands <phil@hands.com> writes:
    Might I suggest that the link goes the other way, so that the symlink
    lives in /usr/bin? That way the existence of the lib directory is
    somewhat self-documenting.

    Having the real executable in /usr/lib(exec) and the symlink in /usr/bin
    also makes it possible to be somewhat consistent with packages that don't normally add themselves to the PATH at all, but could be added to the PATH
    by a system integrator, sysadmin or user on specialized systems.

    For example flatpak-xdg-utils contains reimplementations of
    xdg-email and xdg-open which are probably too limited for use on
    ordinary desktop systems, but very suitable for use inside Flatpak,
    Toolbx or similar containers. At the moment it installs them into /usr/libexec/flatpak-xdg-utils/, with nothing in /usr/bin. The
    Debian-derived Steam Runtime container environment installs
    flatpak-xdg-utils, and also creates non-dpkg-managed symlinks in /usr/bin pointing to those executables.

    (On a normal read/write dpkg system it would not be desirable to create non-dpkg-managed symlinks in /usr/bin, but in a "write-once" container
    image it seems acceptable.)

    Adding symlinks like
    /usr/bin/flatpak-xdg-open -> ../libexec/flatpak-xdg-utils/xdg-open
    seems like a reasonable thing to do, and I might do that in a future version
    of flatpak-xdg-utils.

    I'm also not sure where a good path component to store such binaries are, libexec or lib? Or share?

    To me, this technique seems most in line with how the FHS and GNU Coding Standards define /usr/libexec.

    /usr/share could be used for scripts, but not for native executables,
    so we need to choose a location for native executables that are handled
    like this (like the ones in flatpak-xdg-utils) in any case; and having
    chosen that location, we might as well use that same location for scripts
    (in the same way that /usr/bin holds both native executables and scripts) rather than needing to invent a second path just for scripts.

    Older packages use /usr/lib as a substitute for /usr/libexec because the
    FHS (and therefore Debian) didn't document /usr/libexec until relatively recently.

    smcv

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jonathan Dowland@21:1/5 to Marco d'Itri on Mon Apr 22 11:30:01 2024
    On Sun Apr 21, 2024 at 5:37 PM BST, Marco d'Itri wrote:
    Go for it, I think that there is no good solution for this case.
    Everybody who cares then will manually create a mc -> mcli symlink.

    Indeed, they will: so I would suggest that the chosen binary name for minio-client should *not* be mcli, which doesn't appear to clash with
    anything in Debian already, but almost certainly clashes with something
    outside Debian (which might be packaged in the future), and has no
    currency upstream. I'd go with "minio-client" as the binary name, which
    also aligns with the binary package name (which as an end-user I always appreciate), is more discoverable, and very unlikely to clash with
    anything else. Then set up a /usr/libexec/mc as suggested else-thread,
    and end-users will either use that or set up their own shell alias.


    --
    Please do not CC me for listmail.

    👱🏻 Jonathan Dowland
    jmtd@debian.org
    🔗 https://jmtd.net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marvin Renich@21:1/5 to All on Mon Apr 22 14:50:01 2024
    * Simon McVittie <smcv@debian.org> [240422 05:02]:
    On Mon, 22 Apr 2024 at 09:44:12 +0200, Simon Josefsson wrote:
    Philip Hands <phil@hands.com> writes:
    Might I suggest that the link goes the other way, so that the symlink lives in /usr/bin? That way the existence of the lib directory is somewhat self-documenting.

    Having the real executable in /usr/lib(exec) and the symlink in /usr/bin
    also makes it possible to be somewhat consistent with packages that don't normally add themselves to the PATH at all, but could be added to the PATH
    by a system integrator, sysadmin or user on specialized systems.

    I don't think either way is best for all situations, but I think that
    having the mc symlink in a directory other than /usr/bin (or /usr/sbin)
    is the only way that is compatible with Debian's policies.

    If a package puts the symlink in /usr/bin (e.g. having an additional
    package minio-client-compat), that package must declare a Conflicts: mc,
    and while this is still technically against policy (IIUC), there is
    already precedent for this method (or at least there has been in the
    past).

    If the sysadmin puts the symlink there, it goes against FHS and then the sysadmin is responsible for ensuring that mc is never installed.

    On the other hand, if a symlink named mc is placed in
    /usr/lib/minio-client, with the binary named minio-client in /usr/bin,
    there is no policy violation, the choice of which binary is invoked by
    mc at the command line is entirely up to individual users (either
    through modifying $PATH or placing a symlink in ~/bin or ~/.local/bin/),
    and both packages are co-installable. If the sysadmin desires, a
    symlink can be placed in /usr/local/bin.

    In fact, I think /usr/lib/minio-client/mc -> /usr/bin/minio-client is completely unnecessary. Whatever is done must be documented (at least
    in /usr/share/doc/minio-client/README.Debian, and possibly also in the
    man page). It is just as easy to document placing a symlink in ~/bin or ~/.local/bin as it is to document modifying $PATH in ~/.profile.

    I think this should become the standard way to deal with this situation:
    the package should not create any compatibility symlink, and the
    documentation should describe that individual users can place a symlink
    in ~/bin or ~/.local/bin or that the sysadmin can place a symlink in /usr/local/bin, giving a non-standard default for all users.

    A script in /usr/share/doc/minio-client/examples/ can help the user get
    this correct, checking for the existence of ~/bin and ~/.local/bin and
    setting up the symlink.

    <rant>
    I believe upstream's reluctance to change the executable name is grossly self-centered. The current use of mc has a long history and is still
    very popular. I think the FLOSS community should do everything they can
    to discourage this type of behavior, and any upstream behaving this way
    should be called out loudly as being anti-social. A lot of time gets
    wasted every time this situation comes up.
    </rant>

    ...Marvin

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andreas Tille@21:1/5 to All on Wed Apr 24 15:50:01 2024
    Hi,

    Am Mon, Apr 22, 2024 at 09:28:29AM +0200 schrieb Philip Hands:
    /usr/libexec/minio-client/bin/mc -> /usr/bin/mcli

    Might I suggest that the link goes the other way, so that the symlink
    lives in /usr/bin? That way the existence of the lib directory is
    somewhat self-documenting.

    That's an interesting hint. In Debian Med we are using a common
    directories

    /usr/lib/debian-med/bin/
    /usr/lib/debian-med/man/

    where those binaries will be moved to and have some kind of a
    README.Debian template[1]. Changing this to have the real executable /
    manpage to /usr/lib/debian-med/* makes sense.

    We simply advise Debian Med users to set PATH to that dir and have
    all the name-clashed binaries inside Debian Med without additional
    interaction.

    Kind regards
    Andreas.

    [1] https://salsa.debian.org/med-team/ea-utils/-/blob/master/debian/README.Debian?ref_type=heads

    --
    https://fam-tille.de

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Jeremy_B=C3=ADcha?=@21:1/5 to andreas@an3as.eu on Wed Apr 24 17:20:01 2024
    On Wed, Apr 24, 2024 at 9:42 AM Andreas Tille <andreas@an3as.eu> wrote:
    Am Mon, Apr 22, 2024 at 09:28:29AM +0200 schrieb Philip Hands:
    /usr/libexec/minio-client/bin/mc -> /usr/bin/mcli

    Might I suggest that the link goes the other way, so that the symlink
    lives in /usr/bin? That way the existence of the lib directory is
    somewhat self-documenting.

    That's an interesting hint. In Debian Med we are using a common
    directories

    /usr/lib/debian-med/bin/
    /usr/lib/debian-med/man/

    where those binaries will be moved to and have some kind of a
    README.Debian template[1]. Changing this to have the real executable / manpage to /usr/lib/debian-med/* makes sense.

    I believe moving those binaries to a subdirectory of /usr/libexec/
    would better comply with FHS 3.0. Maybe this could be done for the
    Trixie release?

    I guess a subdirectory of /usr/share/ would be appropriate for the
    extra manpages.

    Thank you,
    Jeremy Bícha

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)