Discussion:
Why does Debian not include POSIX-specified commands like bc and ed by default?
(too old to reply)
Lone Learner
2020-09-12 07:10:02 UTC
Permalink
POSIX.1-2001 Utilities[1] and POSIX.1-2008 Utilities[2] both list the
commands "bc" and "ed" to be part of POSIX.

Yet, in a brand new Debian installation (version 10 for example),
these commands are missing by default:

$ bc
bash: bc: command not found
$ ed
bash: ed: command not found

Why does Debian not include these commands by default? Of course, I
can install them with "apt-get" and I did that.

apt-get install bc ed

The "bc" binary is only 87K in size. The entire package including the
man page and documentation is only 209K in size.

Similarly the "ed" binary is only 55K in size. The entire package is
only 93K in size.

What good reason is there not to include these tiny packages even
though they are specified in POSIX?

[1]: https://pubs.opengroup.org/onlinepubs/009695399/idx/utilities.html

[2]: https://pubs.opengroup.org/onlinepubs/9699919799/idx/utilities.html
Fabrice Bauzac
2020-09-12 08:00:01 UTC
Permalink
Why does Debian not include these [posix] commands by default?
I guess many debian users don't care about these commands, so it would be rude to impose something wanted by only a part of the users.  And there's the case of tiny embedded scarce systems too. If posix compliance is needed, these packages (and maybe others) can be easily installed, though an additional POSIXLY_CORRECT global setting would need to be done also. Maybe we could decide to create a package called "posix" that woult depend on all of them, if really needed and someone cares to spend time on that. But if you need to use software that need e.g. bc, the package certainly already depends on bc anyway.

Best regards
Fabrice
Alex Mestiashvili
2020-09-12 08:20:02 UTC
Permalink
Post by Lone Learner
POSIX.1-2001 Utilities[1] and POSIX.1-2008 Utilities[2] both list the
commands "bc" and "ed" to be part of POSIX.
Yet, in a brand new Debian installation (version 10 for example),
$ bc
bash: bc: command not found
$ ed
bash: ed: command not found
Why does Debian not include these commands by default? Of course, I
can install them with "apt-get" and I did that.
apt-get install bc ed
The "bc" binary is only 87K in size. The entire package including the
man page and documentation is only 209K in size.
Similarly the "ed" binary is only 55K in size. The entire package is
only 93K in size.
What good reason is there not to include these tiny packages even
though they are specified in POSIX?
[1]: https://pubs.opengroup.org/onlinepubs/009695399/idx/utilities.html
[2]: https://pubs.opengroup.org/onlinepubs/9699919799/idx/utilities.html
Why should it include? POSIX is just a standard and Debian is even not POSIX
compliant AFAIK :) Also the certification is kind of costly.
But looking from the technical point of view, obviously none of reverse
dependencies of ed or bc are installed on your system and thus theses packages
are not needed. See apt-cache rdepends ed for example.

Best,
Alex
Nate Bargmann
2020-09-12 13:00:02 UTC
Permalink
Post by Lone Learner
POSIX.1-2001 Utilities[1] and POSIX.1-2008 Utilities[2] both list the
commands "bc" and "ed" to be part of POSIX.
Yet, in a brand new Debian installation (version 10 for example),
$ bc
bash: bc: command not found
$ ed
bash: ed: command not found
Why does Debian not include these commands by default?
It's likely because the focus of the Debian Project is not that of
shipping a strict POSIX compliant system out of the box.
Post by Lone Learner
Of course, I can install them with "apt-get" and I did that.
apt-get install bc ed
I believe that 'apt' is preferred over "apt-get" these days. Simple
"apt" works well for me.
Post by Lone Learner
The "bc" binary is only 87K in size. The entire package including the
man page and documentation is only 209K in size.
Similarly the "ed" binary is only 55K in size. The entire package is
only 93K in size.
What good reason is there not to include these tiny packages even
though they are specified in POSIX?
Debian has an opt-in survey of the most used packages/files via the
"popularity-contest" package:

https://popcon.debian.org/

It likely shows that the utilities in question are not used often so why
include something that is seldom used? Those that need them know how to
install them and packages that depend on them will install them.
Including them by default apparently does little to further the goals
of the Debian Project.

Of course, as one interested in Debian, you are free to create your own
spin that is as POSIX compliant as you can make it.

Good luck!

- Nate
--
"The optimist proclaims that we live in the best of all
possible worlds. The pessimist fears this is true."

Web: https://www.n0nb.us
Projects: https://github.com/N0NB
GPG fingerprint: 82D6 4F6B 0E67 CD41 F689 BBA6 FB2C 5130 D55A 8819
David Wright
2020-09-17 01:10:01 UTC
Permalink
Post by Nate Bargmann
Post by Lone Learner
POSIX.1-2001 Utilities[1] and POSIX.1-2008 Utilities[2] both list the
commands "bc" and "ed" to be part of POSIX.
Yet, in a brand new Debian installation (version 10 for example),
[…]
Why does Debian not include these commands by default?
It's likely because the focus of the Debian Project is not that of
shipping a strict POSIX compliant system out of the box.
Post by Lone Learner
Of course, I can install them with "apt-get" and I did that.
apt-get install bc ed
I believe that 'apt' is preferred over "apt-get" these days. Simple
"apt" works well for me.
Some might prefer it for interactive use, but apt-get has a more
stable command line interface, so is better for scripting when,
say, installing all one's preferred packages on a new system.

Cheers,
David.

Loading...