I have a very complex application that needs a directory in /usr. By complex, I mean it would take thousands of changes to rid the code of /usr references. It has to be done, but I need a newer OS X immediately. When I attempted to upgrade an older OS X system, it wiped this directory as part of the installation. If I run the csrutil disable on the system, place the /usr subdirectory back where it goes, will ongoing OS X security updates within the Mojave version (10.14, not OS major upgrades) purge the directory when applied, or leave it in place?
There is no way of knowing in advance. Security and minor upgrades replace these parts of the system which Apple considers relevant/in need of fixing. While the chance that the whole /usr
gets replaced is probably small it may not be very wise to rely on it.
-
I was afraid of that. The answer makes sense. I have not been watching how updates might impact this and was hoping that historically, even though they could, only major upgrades have wiped /usr sub-directories as had happened when I attempted upgrade of another Yosemite system to El Capitan long ago. If no other responses come in with information concerning past occurrences of updates wiping the subs, I will mark this as the answer. Thank you. – TreedEagle Oct 3 '18 at 18:57
-
@TreedEagle Even if historically
/usr
remained untouched there is no guarantee that it would remain so in the future. In your position I probably would just write a script which rebuilds whatever I need in/usr
and then rerun it after each update. – nohillside♦ Oct 4 '18 at 14:03 -
1Good approach if I were to continue on the upgrade path. This discussion has convinced me that just bringing the server up on ssl first, then addressing the move to a non-/usr sub-directory is most prudent. – TreedEagle Oct 4 '18 at 16:03
/usr
is protected, but/usr/local
is excluded from SIP. See: support.apple.com/en-us/HT204899 – Allan Oct 3 '18 at 18:36