Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] Deprecating and removing groups(1) and id(1) #1005

Closed
alejandro-colomar opened this issue May 27, 2024 · 3 comments · Fixed by #1008
Closed

[RFC] Deprecating and removing groups(1) and id(1) #1005

alejandro-colomar opened this issue May 27, 2024 · 3 comments · Fixed by #1008

Comments

@alejandro-colomar
Copy link
Collaborator

alejandro-colomar commented May 27, 2024

Related: #999
Cc: @dkwo, @jubalh, @hallyn, @ikerexxe


coreutils/id and coreutils/groups have existed since back in 1992:

$ git show --stat ccbd1d7dc518 -- src/id.c src/groups.sh
commit ccbd1d7dc5189f4637468a8136f672e60ee0e531
Author: Jim Meyering <jim@meyering.net>
Date:   Sun Nov 1 05:44:29 1992 +0000

    Initial revision

 src/groups.sh |  31 ++++++
 src/id.c      | 346 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 377 insertions(+)

busybox/id has existed since 2000:

alx@debian:~/src/busybox/busybox/master$ git show --stat 94f5e0ba7ca7 -- coreutils/id.c
commit 94f5e0ba7ca7af260f4bf2d8c77b8e6f6f528b18
Author: Erik Andersen <andersen@codepoet.org>
Date:   Mon May 1 19:10:52 2000 +0000

    Some accrued fixes/updates.
        * cp/mv now accepts (and ignores) the -f flag, since it always
            does force anyway
        * tail can now accept -<num> commands (e.g. -10) for better
            compatibility with the standard tail command
        * added a simple id implementation; doesn't support supp. groups yet

 coreutils/id.c | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 92 insertions(+)

busybox/groups has existed since 2011:

alx@debian:~/src/busybox/busybox/master$ git show --stat 33092f100398
commit 33092f1003982fc26339c0fda66283805cfbcfb1
Author: Tito Ragusa <farmatito@tiscali.it>
Date:   Tue Jun 21 17:11:40 2011 +0200

    groups: new applet
    
    Signed-off-by: Tito Ragusa <farmatito@tiscali.it>
    Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>

 coreutils/Config.src  |  6 ------
 coreutils/Kbuild.src  |  1 -
 coreutils/id.c        | 40 ++++++++++++++++++++++++++++++++++++----
 include/applets.src.h |  1 -
 4 files changed, 36 insertions(+), 12 deletions(-)

Both coreutils/groups and shadow/groups have no options at all, so they should be identical. coreutils/id has a superset of shadow/id 's options (shadow only has -a).


Debian uses the GNU coreutils binaries. I don't know what other distros do.


I'm in favor of removing duplicate programs, which would reduce maintenance work, unless there are good reasons to keep them. Does anyone know of any reasons to keep these programs around?

@ikerexxe
Copy link
Collaborator

I'm in favor of removing duplicate programs, which would reduce maintenance work, unless there are good reasons to keep them. Does anyone know of any reasons to keep these programs around?

In general terms I'm not against having several projects providing the same functionality. They may have slight differences that make it worth maintaining two or more implementations. As an example, and from what I heard, busybox is tuned for systems with limited resources like embedded systems.

Debian uses the GNU coreutils binaries. I don't know what other distros do.

Fedora also uses id and groups binaries provided by coreutils.

Both coreutils/groups and shadow/groups have no options at all, so they should be identical. coreutils/id has a superset of shadow/id 's options (shadow only has -a).

From this analysis it seems like shadow's implementation is simpler and doesn't provide any additional options.

In addition, Debian and Fedora use coreutils implementation, so I'm in favour of deprecating and removing those binaries from this project.

@alejandro-colomar
Copy link
Collaborator Author

@thesamesam Any comments from Gentoo?

@jubalh
Copy link
Member

jubalh commented May 28, 2024

Debian uses the GNU coreutils binaries. I don't know what other distros do.

openSUSE also uses groups and id from coreutils.

alejandro-colomar added a commit to alejandro-colomar/shadow that referenced this issue May 29, 2024
Distributions use id(1) from GNU coreutils or BusyBox.  Drop ours.

Closes: <shadow-maint#1005>
Suggested-by: dkwo <nicolopiazzalunga@gmail.com>
Cc: "Serge E. Hallyn" <serge@hallyn.com>
Cc: Iker Pedrosa <ipedrosa@redhat.com>
Cc: Michael Vetter <jubalh@iodoru.org>
Cc: Sam James <sam@gentoo.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
This was referenced May 29, 2024
alejandro-colomar added a commit to alejandro-colomar/shadow that referenced this issue Jun 14, 2024
Distributions use id(1) from GNU coreutils or BusyBox.  Drop ours.

Closes: <shadow-maint#1005>
Suggested-by: dkwo <nicolopiazzalunga@gmail.com>
Cc: "Serge E. Hallyn" <serge@hallyn.com>
Cc: Iker Pedrosa <ipedrosa@redhat.com>
Cc: Michael Vetter <jubalh@iodoru.org>
Cc: Sam James <sam@gentoo.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
alejandro-colomar added a commit to alejandro-colomar/shadow that referenced this issue Jun 30, 2024
Distributions use id(1) from GNU coreutils or BusyBox.  Drop ours.

Closes: <shadow-maint#1005>
Suggested-by: dkwo <nicolopiazzalunga@gmail.com>
Cc: "Serge E. Hallyn" <serge@hallyn.com>
Cc: Iker Pedrosa <ipedrosa@redhat.com>
Cc: Michael Vetter <jubalh@iodoru.org>
Cc: Sam James <sam@gentoo.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
alejandro-colomar added a commit to alejandro-colomar/shadow that referenced this issue Jul 2, 2024
Distributions use id(1) from GNU coreutils or BusyBox.  Drop ours.

Closes: <shadow-maint#1005>
Suggested-by: dkwo <nicolopiazzalunga@gmail.com>
Cc: "Serge E. Hallyn" <serge@hallyn.com>
Cc: Iker Pedrosa <ipedrosa@redhat.com>
Cc: Michael Vetter <jubalh@iodoru.org>
Cc: Sam James <sam@gentoo.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
hallyn pushed a commit that referenced this issue Jul 2, 2024
Distributions use id(1) from GNU coreutils or BusyBox.  Drop ours.

Closes: <#1005>
Suggested-by: dkwo <nicolopiazzalunga@gmail.com>
Cc: "Serge E. Hallyn" <serge@hallyn.com>
Cc: Iker Pedrosa <ipedrosa@redhat.com>
Cc: Michael Vetter <jubalh@iodoru.org>
Cc: Sam James <sam@gentoo.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants