A Look at PureDarwin – An OS Based on the Open Source Core of macOS
jamieweb.net
jamieweb.net
https://superuser.com/questions/546151/is-it-possible-to-com...
I'm super excited that people are still working on this! I miss having the time to go down rabbit holes, but for those that are there's are people out there watching!
They are the spiritual successors to Amit Singh's Mac OS X Internals: A Systems Approach (http://osxbook.com).
Do you know where I can read about what it would take to replace WindowManager and the rest of the desktop environment on macOS?
I would like to make my own implementation of the desktop environment, including replacing the top bar with the menus and stuff, and replacing the dock with a dock of my own, as well as replace spotlight search and Finder. Furthermore to also replace the open file dialog that is called to from programs when they open files.
I know. I was speaking about the broader part of macOS, and of replacing the desktop environment.
Specifically I need to know how to prevent the default desktop environment with all the parts I mentioned from launching on log in.
WindowManager on macOS is started by launchd at least. Don’t know how intertwined the desktop environment as a whole is.
But yeah, how to prevent the stuff I mentioned from running, and then what I need to implement in my own DE so that I can have my own working DE on my MacBook Air where I can still run all of the applications that I have installed such as CLion, Photoshop, etc.
What KDE does is not of interest to me in this context. That being said I run KDE neon on my desktop so it’s not like I have anything against it. In fact I like it a lot. But it’s not relevant to what I am talking about here.
It is almost certainly /possible/, but most people in a position to do so haven't thought it was worth the amount of effort involved.
While they may seem like a unified application, these are all separate components. Dock, Spotlight, and Finder are apps, and the open dialog is an XPC service.
For example, when an application is started from the spotlight search, its icon pops up in the dock (if not already there) and becomes active, and when applications exit they become inactive in the dock and optionally disappear.
Maybe take a look at Default Folder X or contact the dev to see how they go about this. I think they just inject into the existing implementation, but it might provide a starting point.
That being said, DFX does look interesting and it looks like it is doing some of the kinds of things that I had in mind for my own imagined DE so I will have a close look at it for sure.
That seems like a necessary first step towards eventually getting a bootable ISO that can install a PureDarwin system on a blank machine, physical or virtual.
Why is PureDarwin on an older version? Lack of volunteers? Too many hacks required?
macOS has some UI advantages, its the largest reason I use it - but without cocoa, and all of the core foundations that make OSX, OSX, I just dont see the point.
(Some people will question whether z/OS really counts as a "Unix", but like macOS, it is actually a certified Unix, and as such has greater official claim to be Unix than FreeBSD or most Linux does.)
(Addendum: I say "most Linux", because while the vast majority of Linux distributions are not certified Unix, some have been. Right now, Huawei EulerOS is a certified Unix based on a Linux distribution. Inspur K-UX is another Linux distribution which used to have Unix certification, although the certification has expired–I guess they failed to pay the renewal fees.)
UNIX 2003 is not the latest version of the certification, the latest UNIX certification is (somewhat confusingly) named UNIX V7 (different thing from the classic Bell Labs V7 UNIX), but thus far only Oracle Solaris is certified to that.
z/OS is still only UNIX 95 – https://www.opengroup.org/openbrand/register/brand3601.htm – maybe one day IBM will upgrade that to the newer UNIX 98, UNIX 03, or UNIX V7 certifications, although I suspect not. IBM has decided to focus on running Linux Docker containers under z/OS instead (which it calls zCX).
But we usually not used this but use posix. In fact i think that is what linux originally built against.
What is certified as UNIX is the POSIX personality.
And strictly speaking, z/OS as a whole is a certified UNIX. Look at the registration certificate [1], it never mentions UNIX System Services. Obviously without that component z/OS would fail to pass the certification tests, but the certification is for the operating system as a whole not just that component of it.
[1] https://www.opengroup.org/openbrand/certificates/1199p.pdf
Compare this to Windows NT, where each executable was marked as belonging to a primary subsystem (Win32, POSIX, OS/2, etc) which is fixed from the time of process startup. In contrast, z/OS offers the flexibility that any MVS task can potentially be "dubbed" as a UNIX process at any time. Or similarly, look at WSL1 in Windows 10 – a process is either a Win32 process which is allowed to call the Win32 API, or a picoprocess which can call Linux system calls, you can't mix Win32 calls and Linux calls in the same process. (You can do it via two processes, one Win32 and one WSL, communicating over IPC; by contrast, z/OS allows mixing UNIX and classic MVS APIs in the same process/task running in a single address space). So the separation between "UNIX" and "classic MVS" in z/OS is actually a lot weaker than in Windows NT, which is why the "personality" term which was used in the later isn't really applicable to z/OS.
Another approach I've heard used was just faking the library from the headers - as long nothing from it is called in the course of your testing, your program wouldn't notice.
It would make me terribly happy if Oracle would refrain from doing so. I think this case is ridiculous. The same developer implemented a range check in the same way he did 10 years ago. Yes, copyright for software is broken...
And the lines in question were even removed, which is a tragedy itself, but I cannot see Oracle as anything but hugely detrimental to software. Developers should ignore anything they touch.
If they do indeed rule in favor of Oracle, it wouldn't be undermining OSS, it would undermine the whole judiciary system. It would be scientifically proven bullshit.
private static void rangeCheck(int arrayLen, int fromIndex, int toIndex {
if (fromIndex > toIndex)
throw new IllegalArgumentException("fromIndex(" + fromIndex +
") > toIndex(" + toIndex+")");
if (fromIndex < 0)
throw new ArrayIndexOutOfBoundsException(fromIndex);
if (toIndex > arrayLen)
throw new ArrayIndexOutOfBoundsException(toIndex);
}Why port that kind of stuff to macOS? Obviously it isn't going to be the deployment platform, but developers will want to run that stuff locally during development. (Less important than it used to be with the popularity of Docker on Mac, although still it can be a bit more developer-friendly to run things directly on macOS instead of under Docker.)
You know that there's entire data centers just running Mac Minis as VM hosts, in order to comply with Apple's OS licensing requirements? PureDarwin can just run on AWS.
Sure, running the XCode GUI needs Cocoa. But running xcodebuild doesn't, IIRC. It just needs some other, lower-level libs, ones that (reimplementations of) are in scope for PureDarwin.
Self-service test VM provisioning, CI build/test environments, QA machine labs -- all of these would benefit immensely from not having to run on a farm of Mac Minis in order to stay compliant, while their Windows and Linux counterparts are able to run on large on-premise racked server environments with high-performance, high-availability storage and fast networking.
But, surely it is in their business interest to make life easy for developers, especially if doing so isn't undercutting their end-user-focused hardware business? A cloud server running PureDarwin+Xcode is not undercutting their end-user-focused hardware business, and while it might mean they sell slightly less hardware units for that cloud use case (not a core market for them), surely the added ease for their developer community (who develop apps which make those end-user-focused hardware units so attractive) more than makes up for that?
They've pretty well demonstrated through questionable deprecations and hoops they make people go through with each release that ease for the developer community is not what they optimize for, but I agree it would lead to better end user experience.
And yes, that includes notarization support.
It's similar to reactos sharing userspace code with wine.
chocolate ice cream has some taste advantages, it's the largest reason I eat it - but without cocoa, and all of the core flavor that makes chocolate, chocolate, I just don't see the point. (like your post)
[1] https://www.amazon.com/Mac-OS-Internals-Approach-paperback/d...
> What are the big architectural differences or cool features not in Linux?
Darwin is based on XNU from NeXT, which itself is comprised of OSFMK Mach microkernel but with many of the things pulled into the kernel itself for performance. A lot of the stuff with Mach tasks/ports/messages is still there.
> Also, how hard is it to upstream changes/get drivers in mainline?
You can write your own using IOKit but they're not going to be in the mainline tree, because Apple.
And amusingly, the syscall interface from FreeBSD 4 or so.
There is not even a proper repository with version history, as far as I can tell. Just this stuff: https://github.com/apple/darwin-xnu/commits/master
That's literally a code dump.
Your argument is pedantic where pedantry isn't warranted or necessary -- Darwin is a BSD and is BSD licensed, Apple doesn't have to share anything, but they do.
Imported from https://opensource.apple.com/tarballs/xnu/xnu-4903.221.2.tar.gz
I mean, this is a response to an article that illustrates the severe limitations of Darwin as an operating system.It doesn’t seem like it’s of much use to Apple—there isn't some large community of outside contributors submitting pull requests. So why do they bother?
The problem wound up being that we leaked a sticky bit directory into part of our install, the installer inspector hid this from us, and apple changed dyld's behavior in a patch release to silently bail if it saw a directory with sticky bit set.
http://osx86drivers.sourceforge.net/ (Older) https://github.com/Mieze/IntelMausiEthernet (Latest)
I'm glad to see it continues to be maintained and published though I share the frustration other's have mentioned about how incomplete it is. There is no "more", no "less", no "halt", no "shutdown" -those are just a few of the "wtf" finds that pop up on casual examination.
I wonder if it can run OSX command line programs?