In developing/testing OSS libraries I can replicate a clean Linux fs using containers. However, if I want to test oss libs for MacOS end users, I seem to be in a bit of a quandary. Is there any way to create a clean fs on MacOS that I can test libraries with? Perhaps using chroot
? Can someone explain exactly instead of just saying "use chroot"?
Asked
Active
Viewed 102 times
0

Alexander Mills
- 277
-
Or you can just run containers on Mac? – RibaldEddie Nov 19 '18 at 00:07
-
containers on macos have a linux fs tmk, but maybe you could get close, maybe there is a Docker image that attempts to be very close – Alexander Mills Nov 19 '18 at 00:18
-
It’s not clear from your question whether or not you need to test your library as running on macOS or on Linux. – RibaldEddie Nov 19 '18 at 00:21
-
1ultimately I am trying to create a barebones MacOS fs..i think chroot on MacOS is the cheapest and simplest? but idk how to use chroot. – Alexander Mills Nov 19 '18 at 00:24
-
1is it not clear what I am trying to do? i have a MacOS laptop, but i have things like coreutils installed and other MacOS users might not have that installed, etc. – Alexander Mills Nov 19 '18 at 00:25
-
1what do you mean by macOS fs? You need to create an empty APFS partition? Give a concrete and specific example of how you need to test your library. – RibaldEddie Nov 19 '18 at 00:26
-
i need to test the lib like a non-root user on the average barebones MacOS machine dogg, nothin too crazy – Alexander Mills Nov 19 '18 at 00:28
-
if those libraries are installed in your own user account, then just create a new user and switch to it when you want to test. – RibaldEddie Nov 19 '18 at 00:28
-
1yes but there a global tools that are available at that command line, other users on my machine would have access to those tools, which i want to avoid – Alexander Mills Nov 19 '18 at 00:59
-
can you modify how they are installed so they are localized to one user? I know that’s how I install Macports. – RibaldEddie Nov 19 '18 at 02:46
-
@RibaldEddie might work i am not sure – Alexander Mills Nov 19 '18 at 03:05
-
What problem are you trying to solve? Why do you need a blank disk? – Qix - MONICA WAS MISTREATED Nov 17 '19 at 00:56
2 Answers
1
Run MacOS as a virtual machine on Linux using VirtualBox? That might not be possible, since MacOS might only run on MacOS hardware. In that case, you might have to spin up a MacOS VM on a Mac computer.
https://www.quora.com/How-can-I-run-MacOS-on-Linux-in-a-Virtual-Machine

Alexander Mills
- 277
-
The first sentence in the link you shared says, "Like Keith Derrick writes running macOS on anything but apple hardware violates the eula". – oxr463 Jul 18 '19 at 23:43
-
@Lucas: Worse. It is a DMCA violation. Psystar who tried making money selling PCs with MacOS installed was ordered to pay $2,500 per PC due to DMCA violation. Didn’t matter though since they were broke and never paid anyone, including their lawyers. – gnasher729 Nov 16 '19 at 16:39
0
What do you actually want to achieve? You can take an external hard drive, attach it to a Mac, format it using Disk Utility. Or you can create a disk image on your hard drive. Or you can just partition your hard drive, and such a partition can be completely separate from other partitions (with its own login, no access to other partitions)

gnasher729
- 44,814
- 4
- 64
- 126