News for hackers. Stuff that matters.
Re:Suicide Linux (2009) by yjftsjthsd-h on Thursday October 01, 2020 @03:15PM (#24655067)
I've actually wished for something that takes it the other direction: Technically, everything it does is allowed, but it's designed to stress-test your assumptions. So, a distro that replaces half of coreutils with busybox, the other half with toybox or BSD ports or something, the system libc is musl, build tools are patched to randomly switch between using gcc or clang (both of which have `-Werror` enabled by default), user home directories are created like `/home/First Last/` (and if it doesn't have a last name for you it'll just leave a trailing space in the name), mktemp likewise is patched to stick temporary files somewhere other than `/tmp` by default (and always somewhere with a space in the name), /bin/sh is provided by dash (this isn't super rare, but some stuff still assumes that BASH is /bin/sh), normal programs are all in PATH but /usr/bin is empty (or maybe chmodded 000 or something)...

The idea is, if your code builds and works on this system, it'll run anywhere, correctly, because the system leaves no room for "oh, everybody does it this way, so it's fine to rely on this non-standard behavior".

Re:Suicide Linux (2009) by derefr on Thursday October 01, 2020 @07:57PM (#24657429)
I could imagine this being very useful in the form of a tool like debootstrap(8), intended for conformance fuzz-testing. Feed it a set of switches/enum values, and it'll install these various different odd technically-conformant things into a chroot for you, in any combination you like. Feed it a random seed instead, and it'll select the setup flags based on seeded PRNG output.

Now, set up your CI system so that your "POSIX build" builds N times, each time in a new one of these randomly-generated "technically POSIX" chroots.

Re:Suicide Linux (2009) by jacobwilliamroy on Thursday October 01, 2020 @05:17PM (#24656231)
I once got an hdd from a mac user. It had trailing spaces in filenames. Leading spaces. Asterisks. Question marks. Colon. Forward slash. :c

I needed 2 computers to fix that one.

Re:Suicide Linux (2009) by anthk on Friday October 02, 2020 @11:08AM (#24663403)
detox(1) fixes that.
Re:Suicide Linux (2009) by jasomill on Friday October 02, 2020 @02:41AM (#24659650)
IBM's z/OS UNIX System Services is very nearly this. Many UNIX systems have tons of utilities that more resemble BusyBox than GNU coreutils, and AFAIK no C compiler is anywhere near as compatible with GCC as clang (including, notably, slightly older versions of GCC itself).

But AFAIK z/OS is the only UNIX[1] variant that offers a "POSIX" environment

Where no subset of the native character set even resembles ASCII.

Where "everything is a file", but where many of these "files" — including, notably, both shared libraries and executable programs — are mostly inaccessible using anything resembling traditional byte-oriented UNIX utilities, library functions, and system calls.

Where process creation is not only "not cheap", but where it can in fact be so cripplingly expensive vis-à-vis conventional UNIX systems that the z/OS designers have (wisely) not only resurrected something akin to the traditional meaning of the "sticky bit" on executables, but have also made extensive provisions to allow both "subshell" scripts and executable subprocesses to be created within one's own address space, both via system calls and from within the POSIX shell itself[2].

On a related note, I was thinking the other day that an "evil", yet at least minimally standards-compliant filesystem in the spirit of your system might actually useful to have around for testing. Or, if not, would at least be fun to design.

Think a filesystem that imposes random per-directory length limitations on filenames and or file sizes, and occasionally allocates space for files in terms of random, per-file allocation unit sizes just because it can.

Or imagine a filesystem that flushes the overwhelming majority of data to disk promptly, but which also maintains a large "evil cache" containing a few blocks out out of the middle of every few million write calls that is flushed as infrequently as is permissible by the relevant standards.

And why let previously-allocated free space go to waste when, given careful planning, its contents could be used to present stale, yet technically "valid" data to applications that use I/O operations whose ordering with respect to one another is not formally defined for IPC (e.g., POSIX only explicitly defines ordering between its own read() and write() calls, so I/O by any means not passing through particular versions of these functions explicitly designated as POSIX-compliant can, in terms of standards-compliance, be "safely" ignored).

And so on.

[1] https://www.opengroup.org/openbrand/register/ [2] Google "_BPX_SHAREAS" for details.

Re:Suicide Linux (2009) by badgerigar on Thursday October 01, 2020 @05:32PM (#24656347)
Nix with --pure does most of what you want here.
Re:Suicide Linux (2009) by yjftsjthsd-h on Thursday October 01, 2020 @11:34PM (#24658560)
It does about half of what I want, which is to rip away implicit assumptions about where stuff lives, that's true. I don't think nix is inherently going to help with the other half, which is to leave gotchas for what is visible/accessible (i.e. lots of files with spaces in their names, maybe a few files named ex. `-h` or `-rf` sitting in common directories, or for that matter have something available by the same name, but a different version, ex. your PATH contains a grep, but it's from busybox, not GNU).
Re:Suicide Linux (2009) by pie_flavor on Friday October 02, 2020 @11:10AM (#24663429)
Bonus points for no procfs.
Re:Suicide Linux (2009) by thotsBgone on Thursday October 01, 2020 @04:45PM (#24655987)
Strange Linux