
MacOS 10.12 Open Source Components - Lwrless
https://opensource.apple.com/release/os-x-1012.html
======
gaxun
I have been drafting an 'Ideas' post about the following idea, but it's not
done yet and this looks like as good a place as any to look for some early
feedback. This might not have as much clarity as I'd like.

The general idea is to have a site that can track various projects that
release their own copy of GPL (especially, but other licenses as well)
software. So Apple ships their version of {bash, etc.}, and so does your
router, and someone else's refrigerator. And this site ("GPL Hub?") just links
to all the places that are hosting their own version of {bash, etc.}. Maybe it
could even show how they've diverged, although that might not be so easy.

Recently it has become very trendy to host all code in one centralized
location like GitHub. But GitHub isn't really that great at showing you the
"forks graph" anyway. Many companies that ship GPL code have archives like
this available on their own websites. This could help increase visibility and
give users an easier time finding the source code. I'd love to know how many
copies of different GPL projects are out in the wild. Maybe for the companies
that don't publicly host their GPL code, someone who makes a successful GPL
request could share the code on this same site.

Those are some of the ideas, I'd still love to finish the post sometime but
it's a bit too vague for me to say anything concrete yet. Any direction to
related works or explanations of why this is a bad (or good) idea would be
much appreciated!

~~~
pYQAJ6Zm
I really like the idea. Where free licenses are concerned, I believe this
would help “cross-pollination” among projects and facilitate the progress of
open source.

It could also work as a (perhaps curated) reference. Sort of like Rosetta
Code, but for more high-level features ­– “how have projects X and Y chosen to
implement this feature?”

Besides, it could serve an archival function. A quick search on the web
reveals a couple of projects on this vein, but they tend to rely on storing
official releases. The way I see your idea, it could be made to work in a way
closer to what archive.org does for the web, archiving everything it’s
permissible to, with the addition of meta information about the projects,
their relationships, etc.

Not a small undertaking, but a very inspiring one!

~~~
mlinksva
[https://www.softwareheritage.org/](https://www.softwareheritage.org/)
launched recently to do for software something like what archive.org does for
the web.

------
filereaper
Heh, I went spelunking through the bsd/mach layers of the code, was quite a
bit of fun.

Looks like they've only released the x86_64 and x86 versions of the code? I
don't see any ARM in there.

Anyways, found gems like this [1]:

    
    
      /*
       *	File:	sched_prim.c
       *	Author:	Avadis Tevanian, Jr.
       *	Date:	1986
       *
       *	Scheduling primitives
       *
       */
    

I hope to leave a legacy like this someday, hopefully someone will appreciate
the author's comments 30 years later!

[1]
[https://opensource.apple.com/source/xnu/xnu-3789.1.32/osfmk/...](https://opensource.apple.com/source/xnu/xnu-3789.1.32/osfmk/kern/sched_prim.c.auto.html)

~~~
minxomat
For giggles, here are some comments I grepped from the WinNT kernel:
[https://gist.github.com/turbo/75f0905275c29a3049f983cfe273ea...](https://gist.github.com/turbo/75f0905275c29a3049f983cfe273eae2)

~~~
SSLy
where did you get the source to grep through?

~~~
minxomat
Just look a few comments below.

------
Elv13
Long time ago, they used to also publish a bootable ISO of Darwin + all of
those OSS packages.

They did publish an updated Darwin core / kernel a few releases back, but it
seems to be closed again.

Too bad, I think someone with some determination could have gotten am
hypervisor based container tech running on this. Of course the test would not
run, but APIs shims could have made whole software compile (but not link).
This in itself would have been very useful for a lot of people. Being able to
compile in a container then link in the "real" macOS could also have been
implemented, making this much more useful.

~~~
huilee
If Apple open sourced all of macOS maybe that would put more pressure on
Microsoft to intentionally[1] open source Windows.

[1]: It has been open sourced in the past:

[https://torrentfreak.com/microsoft-takes-pirated-windows-
nt-...](https://torrentfreak.com/microsoft-takes-pirated-windows-
nt-4-0-source-code-offline-150415/)

[http://www.theinquirer.net/inquirer/news/1030335/leaked-
wind...](http://www.theinquirer.net/inquirer/news/1030335/leaked-
windows-2000-source-code-analysed)

~~~
bad_user
Leaked source code is not open source dude. Open source is software licensed
under terms compatible with these rules:
[https://opensource.org/osd](https://opensource.org/osd)

~~~
minxomat
Both the Windows Server 2003 x86 and the Windows XP amd64 kernel source code
have been available for academic purposes. They are governed under the WRT
License, which forbids re-distribution outside of the academic use. But yes,
MS provided that source code with full documentation on how to build and debug
each kernel.

I've built the WinXP kernel a few months ago just for nostalgic purposes,
here's a VM running the custom kernel with a KDBG hook on NTQSysInfo [1]. The
neat thing is that you can debug on the system itself, or via a serial port.

I also know that some people had success merging the /base/ code from the
above licensed kernel (but the x86 version) and the leaked WinNT4 code. One
even got so far as to manage a recompile of the NT setup, building a custom NT
OS from scratch. Though that's violating the WRK and NT license left and
right.

[1] [http://i.imgur.com/BeiME5X.png](http://i.imgur.com/BeiME5X.png)

~~~
bad_user
You're talking about cool things, no doubt about it, but code made available
for academic purposes only is still not open source.

This isn't just pedantry, we are scientists from different countries, with
many of us having learned English as a second or third language (I'm from
Romania, hi), so it's better to be precise in language.

And in this instance "open source" is a good term to be precise about, because
the OSI definition specifies exactly what you can and cannot do with it. And
in particular (1) you can use it for any purpose, even for evil ones and (2)
you can fork it and modify it in any way you wish.

So when I hear "open source", I don't have to go and read the license and
validate that these requirements are true, because OSI has already done that
for me and they have lawyers that know how to read licenses. This saves me
time, headaches and money.

And academic, non-commercial licenses do not qualify. Microsoft itself has
introduced an alternative term for such academic, non-commercial licenses and
I think it's a good one: Shared Source. Lets use it.

~~~
pksadiq
> So when I hear "open source", I don't have to go and read the license and
> validate that these requirements are true...... This saves me time,
> headaches and money.

Most of us have some vague understanding about Licenses.

Eg: MIT/X11 specifically says "...FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT..." but it is "open source"

That is, if you earn too much money from some MIT License software, the author
itself is free to sue you the way he/she can (eg, patents). One example could
be dotNet from M$.

So better stick to software pieces that are licensed under GNU [A]GPLv3 or
Apache v2 (If you care patent issues). Also, note that you can trust "free
software" guys more than "open source" ones.

edit: Also note that this can also be a reason why Apple didn't update any GNU
packages once they were relicensed to GPLv3+. (The main reason could be the
GPLv3 requirement that the user should be able to replace the software if
[s]he wish to. Apache doesn't have this requirement, and Apple used that for
swift)

~~~
bad_user
> _the author itself is free to sue you the way he /she can (eg, patents). One
> example could be dotNet from M$._

That's not actually true. In law, at least in the US, there's such a thing
called Estompel [1], and licenses like BSD / MIT do have an implicit patents
grant [2], unless the software is also accompanied by an explicit patents
license (like Microsoft is doing), in which case that license takes
precedence.

Of course, you can't be totally safe with an implicit patents grant, because
its applicability depends on jurisdiction, plus it's always unclear if you can
also count on it for derived works, etc. But then again, this is why GPL v2 is
still safe. Remember that the Linux kernel is licensed under GPL v2? So what,
are we all screwed?

> _note that you can trust "free software" guys more than "open source" ones._

With all due respect, but many "free software" guys tend to be zealots and I
can't take them seriously anymore. Not when the FSF starts doing stupid shit,
like preventing Emacs on MacOS from supporting emoji just because the "free
operating systems" would be at a disadvantage. Talk about crazy.

Also, in my opinion AGPL does not pass the OSI definition and it was probably
accepted only because it would have brought out the crazy, but that's a
personal opinion.

[1]
[https://en.wikipedia.org/wiki/Estoppel](https://en.wikipedia.org/wiki/Estoppel)

[2]
[http://en.swpat.org/wiki/Implicit_patent_grant](http://en.swpat.org/wiki/Implicit_patent_grant)

[3] [https://github.com/emacs-
mirror/emacs/blob/emacs-25.1/etc/NE...](https://github.com/emacs-
mirror/emacs/blob/emacs-25.1/etc/NEWS#L1723)

------
Benjamin_Dobell
Oh, how I miss having a working USB stack...

[https://opensource.apple.com/source/IOUSBFamily/IOUSBFamily-...](https://opensource.apple.com/source/IOUSBFamily/IOUSBFamily-560.4.2/)

They re-wrote IOUSBFamily (or at least they said they did) and it's buggy as
all heck whenever you try use a USB 3 hub (since the 10.9 rewrite).

I'd fix it myself, but it's no longer open source. Plus, to really rub salt in
the wound, there's no longer a USB debugging kext. Yay, Apple...

~~~
sdfjkl
I have some short USB 2.0 extension cables that I use to plug between the
Macbook and USB 3 devices - to reduce them to USB 2.0. Because if I for
example try to copy more than a few MB to a USB 3 external HD, the Mac
freezes. Every single time. So that's working well then.

~~~
contingencies
Try different powered hubs. Last week I discovered a USB key that eats so much
power it won't run without a powered hub! Numerous external hard drives and
optical drives are in this camp, too.

~~~
sdfjkl
Does the power requirement change between USB 2.0 and USB 3? If not, I don't
see why more power would change anything.

I also don't think a power problem on an attached USB device should give my
computer a kernel panic.

------
muterad_murilax
I wonder why they still write "OS X". Intentional or just due to somebody's
lack of attention to detail?

~~~
doomlaser
'macOS' is just too much of an affectation to ask for in styling
capitalization. You'll notice a lot of people resisting it, defiantly writing
'MacOS'.

~~~
Bud
Not really. "iOS" is standard and no resistance has been noted.

~~~
notmything
So if one thing is true then other similar things must be true!!!

------
tannhaeuser
Is there a functional, recent way to build this on VirtualBox and use it for
cross-compiling command line and server apps for Mac OS (macOS/X whatever)?

------
koko775
Except for launchd, which remains re-closed-source.

~~~
hoistbypetard
I didn't realized they'd closed that back up. Lame. When/why did they do that?

~~~
koko775
subsumed it into XPC which has never been open.

------
sashav
no USBAudio? Again? So much for open source

~~~
throwaway4891a
Either they don't want to release it or they can't (a third-party
contract/NDA), at least right now. Open sourcing is often seen by big-
businesses as potentially "helping" competitors undermine, replicate, sue,
make interoperable wares which may threaten the "Golden Goose." It sucks, but
that's the situation... lawyers can't force them to release other code unless
they're caught TiVoizing some GPL 3 code or something similar.

You'd think Apple would want to invent the next cool kids bandwagon, maybe
invite some community goodwill and crowdsource maybe some new features like
fixing time synchronization to have a high-precision ability or working on
another actual replacement for HFS+, or adding Windows compatibility. Maybe
developer pressure could sway them, and wouldn't it be a good PR move to
eventually relent after a long, drawn-out public debate which buys some time
for the Apple Car or whatever else is cooking next to be readied? Ive and Cook
have massive shoes to fill, which they and the Apple team helped fill, but
many people don't think that right now, at least not yet.

~~~
ta12345
I can't believe this is a serious comment.

The majority of open source is crap, like 80% of it. People build what they
need and forget about it. Often the code has no cohesion to the rest of the
project and often it is of poor quality. Not to mention the ego's and lack of
sociability of most projects.

Apple didn't become the most valuable company by following that principle.
Instead it took the approach of an egotistical maniac who demanded perfection
and required that all the pieces fit together as part of an elegant puzzle. No
small feat and not really replicated today -- except for Tesla and SpaceX.

If I'm missing something, please name one other company today has has a "hit"
product that unanimously loved (aka has insane sales and really high ratings)
to the extent of the iPod, iPhone, Model S, etc..

Furthermore, I'd challenge you to name one open source project that can be
shipped AS-IS as a product. Don't even say the Linux kernel, that has like
what 2% market share?

No doubt the majority of HN folks are sharp but there is a huge lack of
emotional intelligence. I've found this at many tech companies except Apple.
Even when talking with Apple engineers I find myself talking to another HUMAN
who happens to appreciate technology and understands it isn't the be all end
all. Its sad to see such a company lose it soul but it was inevitable.

Disclaimer: I'm a kernel developer and contributor.

~~~
MaxfordAndSons
> Furthermore, I'd challenge you to name one open source project that can be
> shipped AS-IS as a product. Don't even say the Linux kernel, that has like
> what 2% market share?

GitLab. Postgres. Atom. Docker (debatable). I could go on, but to be fair I am
a bit of a hoarder of interesting oss.

Re the Linux kernel: isn't it way higher than 2% if you count commercial and
industrial usage? Also Android devices.

~~~
BoorishBears
Calling Android devices Linux is not productive.

~~~
ovao
He was referring specifically to Android's use of the Linux kernel. He was not
calling Android "Linux", though I think doing so would be fair in a general
sense.

------
rdtsc
Heh emacs-22.1.

Wonder where that's used. Scripting in elisp?

~~~
__david__
It's included so the there's a nice editor in Terminal by default (yes, I'm
just kidding, I know vim is there). It's so old because it's the last version
of Emacs released under version 2 of the gpl (and Apple hates version 3). It's
the same reason the default Bash is so old.

~~~
eddieh
Bash defaults to Emacs keybindings which also work throughout macOS since it
began in the NeXT days. It is included because on macOS it is the universal
text editor.

~~~
rdtsc
I am new to macOS and I was just recently surprised by that - noticed Ctrl+k
worked in some un-expected places like a plain text box widget (not in emacs).
I thought it was a nice touch.

------
raimue
Interestingly this is not yet linked from the top-level page of the open
source site: [https://opensource.apple.com/](https://opensource.apple.com/)

------
sandstrom
I think Apple is missing out on both a lot of goodwill but also overall
progress of their Unix core by being so closed.

Instead they should actively contribute source-code to the BSD-ecosystem.
Apple has a lot to gain long-term from the BSD-ecosystem being healthy.

Also, the whole Hackintosh thing is completely overblown. So what if some
intrepid coder gets it running on a non-apple machine. It won't affect their
sales the tiniest bit.

------
JDevlieghere
Great news, this should also mean that Valgrind will soon be working again on
Sierra!

------
synthecypher
Was macOS always open source I thought it was just Darwin.

------
satyajeet23
You can hook exceptions in MACF now.

------
lukecowell
That title is clickbaity.

~~~
Yuioup
Yeah, a page with a list of downloadable tarballs can hardly be called Open
Source.

BTW, how useful is this code? Obviously you can't build anything with this.
It's useful for auditing, maybe?

~~~
Matthias247
That code is not there in order to be useful to someone.

It's there to meet the liabilities that they have through the licenses for the
used open source software. These licenses often say that if you use the
software you also need to allow the public to retrieve it. Even more so if you
make modifications to it.

~~~
vvhn
That's only true of GPL'ed components shipped as part of Mac OS X/ OS X /
macOS. A vast majority isn't - some are BSD and most are Apple originated
software under an Apple Open Source License (APSL)

~~~
Matthias247
Yeah, that might be true. But if you are a big organization you probably want
to have a standardized process on how to handle third party open source
software (how to document it, where to store it, etc...).

------
hanniabu
Any thoughts on why they wouldn't have released this under a Github repo?

~~~
peterkelly
Because not all open source software has to be distributed via GitHub.

Think about what happened to SourceForge, and be glad that the Internet hasn't
become _totally_ centralised around a few major websites yet.

~~~
threeseed
Seriously the over reliance on Github is a systemic risk to the industry.

~~~
mirekrusin
...just like over reliance on google.com to search internet?

some people say "yes", some people say "nonsense".

~~~
debaserab2
Who relies on google exactly, other than advertisers?

It works really well, but, if it fails... there's plenty waiting right there
to take it's place.

~~~
vetinari
Just this Tuesday I could observe, what happens when Google is down (their
routers were throwing away packets from Prague peering).

So, without further ado:

\- obviously, services like Search, Youtube, Gmail are unavailable. That
includes searching from the address bar in your browser ;)

\- people, who have their DNS set to 8.8.8.8 should reconsider their settings,

\- too many web pages use assets hosted on Google CDN, including analytics or
fonts, and when unavailable, the pages will load very slowly, waiting for
timeouts from CDN.

\- Android phones will say, that Internet is unavailable, even if it is.

Otherwise, everything is fine.

~~~
TomMarius
Also anything that uses Recaptcha was mostly unusable, including government
services.

------
shmerl
Someone should implement Vulkan for it.

