Projeto-Pindorama / heirloom-ng

A collection of standard Unix utilities that is intended to provide maximum compatibility with traditional Unix while incorporating additional features necessary today.
http://heirloom-ng.pindorama.dob.jp
Other
24 stars 7 forks source link

Update the default ``rm``(1) to conform to the new POSIX 1003.1(2008) standard. #17

Closed takusuman closed 1 year ago

takusuman commented 1 year ago

The default rm --- not the -DSUS one --- shall be updated to conform to the new POSIX standard, so the error below will stop happening:

copacabana% ./configure --prefix=/usr \
> --libdir=/lib \
> --docdir=/usr/share/doc/$(basename $(pwd)) \
> --disable-kill \
> --disable-modern-top \
> --without-systemd
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking how to create a pax tar archive... pax
usage: rm [-fir] file ...
Oops!

Your 'rm' program seems unable to run without file operands specified
on the command line, even when the '-f' option is present.  This is contrary
to the behaviour of most rm programs out there, and not conforming with
the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>

Please tell bug-automake@gnu.org about your system, including the value
of your $PATH and any error possibly output before this message.  This
can help us improve future automake versions.

Aborting the configuration process, to ensure you take notice of the issue.

You can download and install GNU coreutils to get an 'rm' implementation
that behaves properly: <https://www.gnu.org/software/coreutils/>.

If you want to complete the configuration process using your problematic
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
to "yes", and re-run configure.

configure: error: Your 'rm' program is bad, sorry.
copacabana%

(The error above happened when compiling Procps-ng, version 3.3.16, but it will happen in any project that uses the modern auto*tools build system and/or that isn't aware of old-POSIX conforming tools)

This error also appears in Linux kernel's build system, making impossible to compile the kernel without modifying the build scripts that use rm or without using Busybox or other set of tools. For now, in Copacabana, this is being workaround'ed with lobase being compiled and installed in an alternative location. This is far from ideal, and it brings back the bad memories that one could have of some proprietary UNIX with uncompatible tools.

PS: It'd be nice to add a verbose option later on too. \:^)