Remix.run Logo
enricozb 3 days ago

I recently learned that macOS has a (by default) case insensitive filesystem. How does this line up with the certification?

lapsed_lisper 3 days ago | parent | next [-]

I don't know about the Unix certification process itself, but the Single Unix Specification explicitly mentions case-insensitivity among non-conforming file system behaviors that are allowed as extensions (in 2.1.1 item 4, third-to-last bullet):

https://pubs.opengroup.org/onlinepubs/9799919799/

So a conforming OS has to make case-sensitive file systems available (which MacOS does: you can create case-sensitive HFS or APFS volumes). But I'm not sure if a conforming OS instance (i.e., running system) has to have any case-sensitive mount points, and either way, AFAIK there's no practical and race-free way for a conforming application to detect whether any particular mount point behaves case-sensitively.

So I believe that as far as the standard goes, a conforming application might run on a conformingly-extended OS where no portion of the the file namespace behaves case-sensitively. IOW, a conforming application cannot rely on case-sensitivity for file names.

p_ing 3 days ago | parent | next [-]

Apple calls out case-sensitivity as a change they made to pass certification. [0]

> 3. APFS file systems can be formatted as either case-sensitive or case-insensitive. Always format as case-sensitive for UNIX Conformant behavior.

[0] https://www.opengroup.org/csq/repository/noreferences=1&RID=...

yjftsjthsd-h 3 days ago | parent | prev [-]

If they standardize mktemp ( https://www.austingroupbugs.net/view.php?id=1616 ) then I think you could just

  TESTDIR=$(mktemp -d -p ${WHEREVER})
  touch ${TESTDIR}/FOO
  ls ${TESTDIR}/foo && fail
Analemma_ 3 days ago | parent | prev [-]

There’s a specific “Unix mode” you have to turn on to be in the compliant state, it’s not the default. Presumably among other changes this puts APFS into case-sensitive mode.

Steltek 3 days ago | parent [-]

How much stuff breaks when you do that?

p_ing 3 days ago | parent [-]

There's commercial software that will not run on a case-sensitive file system, such as Photoshop.

If you're using 3rd party software, you don't want to format your default volume with case-sensitivity enabled.