
How much GNU is there in GNU/Linux? - pedrocr
http://pedrocr.net/text/how-much-gnu-in-gnu-linux
======
cookiecaper
FSF's insistence on "GNU/Linux" has always been childish, but now it's just
silly really. For years the proportion of GNU software that actually gets run
has been dwarfed by the code from Mozilla, KDE and/or GNOME, and other major
desktop software vendors. The GNU/Linux argument has never been persuasive and
I'd say it's high time they let it go.

~~~
zohebv
I looked at the article and it seems to strengthen the argument for calling it
a GNU/Linux distribution. The top contributors as per the chart.

1\. kernel 9% 2\. gnu 8% 3\. kde 8% 4,5 java, mozilla 6% 6\. gnome 3%

If you combine gnu with gnome, we have 1\. gnu 13% 2\. kernel 9%

Also considering that java/mozilla are platform agnostic, the candidate names
we have are

linux-gnu-kde OR gnu-linux(-kde)

If you are not running KDE, then gnu-linux seems like a very strong candidate
for the name. The argument for calling it linux would revolve around the
availability of GNU software on other non-linux distributions in some form or
the other, thus making GNU a not very distinctive moniker. But MacOS/BSD
doesn't really carry as much GNU as Linux distros do.

But the kernel is running all the time when booted up. A better argument would
be that only a fraction of GNU software is active at any moment, so by
percentage of GNU v/s kernel code executed in any given time interval, the
kernel should win handily. This pie chart, as it stands, actually makes a case
for calling it GNU\Linux.

~~~
caf
Warning: angels-dancing-on-the-head-of-a-pin argument ahead.

It's true that the kernel is loaded all the time (though not usually _running_
more than a small fraction of the time), but so is glibc. It's far from
obvious that more cycles are spent in the kernel than are spent in glibc
(though of course in both cases the goal is to run as _little_ as possible,
allowing more application code to run).

It's also worth considering that only a fraction of the kernel's LOC are even
compiled in the average distribution's kernel (are the LOC dedicated to
Itanium, Alpha and PA-RISC support really useful to Ubuntu?).

~~~
nitrogen
_It's also worth considering that only a fraction of the kernel's LOC are even
compiled in the average distribution's kernel (are the LOC dedicated to
Itanium, Alpha and PA-RISC support really useful to Ubuntu?)._

Does the kernel spend more lines of code on platform support or on drivers? I
was under the impression that drivers made up the vast majority of the kernel,
most of which are enabled in distribution kernels.

Sloccount seems to confirm this on kernel 2.6.35:

    
    
      4796735 drivers           ansic=4791978,yacc=1688,asm=1428,perl=792,lex=779,
                              sh=57,awk=13
      1677610 arch              ansic=1449312,asm=226905,sh=674,awk=470,pascal=116,
                              perl=58,python=45,sed=30

------
rwl
"I picked Ubuntu natty (released in April) as a reference, ... and am
considering only the “main” repository, supposedly the core of the
distribution, actually packaged by Ubuntu and not repackaged from Debian."

I'm not sure I understand Ubuntu's "main," or what's "packaged by Ubuntu and
not repackaged from Debian." Does this mean the author is _not_ counting code
that appears in both Debian and Ubuntu? Because I would expect a lot of that
code to be GNU, and I would expect GNU code to make up a small proportion of
the Ubuntu-only code.

But that must not be what it means, right? I thought nearly all of Ubuntu's
"main" was just repackaged from Debian, in which case the remainder would be a
very strange sample to draw on.

~~~
pedrocr
Pretty much everything that is in Ubuntu is also in Debian. What Ubuntu "main"
means is those packages are actually built by Ubuntu with their own patches
and quality control. Wheres "universe" has everything that is not in main and
is repackaged from debian to Ubuntu by the community without official support.

The assumption is that the "main" archive is a fairer representation of the
important stuff in the distribution than including "universe" as well. You
actually have to manually enable universe on an Ubuntu install to be able to
use it.

See <https://help.ubuntu.com/community/Repositories/Ubuntu> for more details

~~~
rwl
"What Ubuntu "main" means is those packages are actually built by Ubuntu with
their own patches and quality control."

I guess this is where I was confused. My understanding is that the packages in
main still originate as .debs from Debian (i.e., they are _not_ directly
packaged from upstream sources), even if Ubuntu applies their own patches and
such, so it sounds strange to say that these are not "repackaged." (I can't
find an Ubuntu page confirming this, but Wikipedia says, "Ubuntu packages are
based on packages from Debian's unstable branch..." [1])

So, I think the mapping from your terminology to mine is:

"built by Ubuntu" => "repackaged by Canonical from Debian"

"repackaged from Debian" => "repackaged by Ubuntu community from Debian"

[1]
[https://secure.wikimedia.org/wikipedia/en/wiki/Ubuntu_%28ope...](https://secure.wikimedia.org/wikipedia/en/wiki/Ubuntu_%28operating_system%29)

------
lawfulfalafel
Okay, how about this: build a Linux distribution using no GNU software.

If you don't think it's critical, try to get by without it.

RMS is a good guy, and I think that his effort to make foundational efforts
remembered is equally laudable.

~~~
omouse
I wanted to say that Haiku OS has done it but then again...I'm sure they use
_some_ GNU code somewhere.

~~~
lamnk
Haiku OS is not based on linux kernel

~~~
omouse
No, but it does rely on GNU.

------
moomin
I remember back in the early 90s, I often had the choice of using the local
tools or the GNU tools. I went for the GNU versions every time: they were
stable, predictable and worked the same everywhere I went. It felt like they'd
built their own Unix then, despite the fact that Hurd was still not much more
than some really ambitious design documents.

My point is, I fully appreciate the importance of the GNU work to the
development of free and open-source software, especially Linux. That said, I
can't see that most of the arguments being put forward here make any sense. I
mean, should everything compiled in gcc have a gnu prefix? (GNU/Google,
anyone?)

------
frodwith
If the point is supposed to be "why insist on calling it GNU/Linux when xx% of
it isn't even produced by GNU?", it's an ill-made point. Most of the userland
(and certainly what we could call the "core" userland, especially in terms of
development tools) is GNU software. The system would be pretty unusable libc,
gcc, ld, make, etc.

~~~
Locke1689
BSD libc and BSD make are pretty much drop in replacements for glibc and GNU
make. LLVM is a drop-in replacement for gcc.

It seems like it would be pretty straightforward to build a Linux userland
without GNU.

~~~
nwmcsween
I don't think bsd libc supports linux specifics such as fanotify and such, the
libc is usually tied to a kernel. (I haven't looked at bsd libc so I may be
wrong)

------
woodrow
Some friends of mine were working on a project to make a non-GNU linux
distribution (well maybe not actually for distribution) just to see if they
could: <https://github.com/burke/non-gnu-linux/wiki>

I don't think much has happened with it recently, but they were working to
build the kernel with icc (the Intel C compiler).

~~~
justincormack
As of a few weeks ago, Gentoo-Bionic is up at <https://gitorious.org/gentoo-
bionic> which is as far as I know the first attempt at a Linux system built
with a BSD licensed libc, Bionic being the Andoid libc. All the other glibc
alternatives like uclibc tend to also be GPL licensed.

Bionic is missing a fair amount of stuff, as it only has to run a limited
subset on Android, but has enough to run much software.

------
nwmcsween
The author didn't consider the extensions gcc introduces? or all the userland
gnuisms that Linux relies on? LOC is not a measurement of use.

------
ryanpetrich
Lines of code is a poor way to measure contribution.

~~~
cookiecaper
The whole argument around the "GNU/Linux" terminology is that the FSF deserved
part of the glory because they contributed the userspace to Linux's system
code. I think the persistence of those pushing this point of view is a
projection of their disappointment over Hurd and demands for subsequent glory
"because we deserve it!" This is a really childish stance from the start.

A kernel is of course useless without userspace. However, almost since its
inception the percentage and importance of the GNU contribution has been
steadily dwindling; in the course of a normal day, my wife, who is a KDE user,
uses much more software provided by KDE e.V. than software provided by
GNU/FSF. Should we call all of her Linux installs KDE/Linux?

~~~
Confusion
That she 'uses more software provided by KDE' is an unsubstantiated claim that
people make way to fast. Is it possible to build KDE without GNU tools? If
not, every use of KDE is an indirect use of GNU tools. While running, how many
times are glibc and related foundational components called?

The problem of GNU tools is their invisibility. But by that metric (what users
see), your wife should call the system KDE, since the kernel is entirely
invisible to her. Surely no one here suggest dropping Linux as the appropriate
name for the system? But if so, doesn't GNU deserve to be mentioned as well,
for making Linux actually usable by things such as KDE? The foundation is
Linux + GNU tools. Neither can do without the other, but nothing can do
anything without the two of them. That's as foundational as you can get in a
GNU/Linux system, which is why people call it that.

~~~
maethorechannen
Isn't the "you couldn't build it without GNU tools" argument somewhat silly,
as no other OS out there includes the toolchain as part of the name? I doubt
the folks over at Microsoft would seriously consider renaming Windows "Visual
Studio/Windows" or "TFS/Windows", yet they would be hard pressed to build
Windows without it. I'm also fairly sure Linux isn't the only OS out there
that can be built with GNU tools (I thought Solaris was using it, at least
during the brief period of time that they were open), yet it does seem to be
the main target of the "GNU's contribution should be specially recognized"
crowd - it's hard to see this as anything but sour grapes over Linux pretty
much taking over the GPL licensed Unix-like kernel market away from Hurd.

"Surely no one here suggest dropping Linux as the appropriate name for the
system?"

Linux based Android doesn't use Linux. Arguably the distro name is now the
"primary" name (though this would still leave the FSF people feeling unloved).
Thinking about it, I mostly say I use Ubuntu on the Desktop and Android on the
phone and tablet and barely ever mention I run Linux nowadays.

------
a3_nm
Interesting. I would be quite interested what the chart looks like if it is
restricted to the packages that are part of the default install.

~~~
pedrocr
That should be an easy change. Do you happen to know how where to look up the
list of default packages?

I'd assume the percentage of GNU would go down as gcc and gdb are probably not
in the default install. The interpretation is a little more dubious though as
gcc and gdb are definitely used to _produce_ the software in the default
install.

~~~
a3_nm
You could look at a [http://ftp-stud.hs-
esslingen.de/pub/Mirrors/releases.ubuntu....](http://ftp-stud.hs-
esslingen.de/pub/Mirrors/releases.ubuntu.com/natty/ubuntu-11.04-desktop-
amd64.manifest) or something of the kind.

~~~
pedrocr
Yep, I asked on IRC and apparently the livecd manifest is a good list to use.
Stay tuned

------
ianloic
Comparing the size of Ubuntu 'main' isn't interesting.

A more thoughtful assessment would have examined what packages were installed
& used rather than which ones existed. That data is really easy to find:
<http://popcon.ubuntu.com/>

~~~
pedrocr
I do have that data and have been using it in these kinds of analysis. There
are two big problems with it. The first is that it's not given out in any kind
of time-series or by distro-version so some analysis are very hard to do (this
one would work though). The second is that the data gathering is opt-in so the
sample will have a bias, probably towards power users.

------
46Bit
No expert, but I always thought Ubuntu was probably the distro least likely to
have a large % of GNU thanks to all the extra stuff that comes with it. Would
be interested to see this for Debian or etc.

~~~
phlyingpenguin
I think in terms of a standard desktop user's install, a Debian machine
configured for usual use is not going to differ all that greatly from an
Ubuntu machine. A server config forsaking much of the user-friendly stuff,
maybe.

I think my point there is that I don't think actual distribution "names"
matter so much as what their intended purposes are for varying the "what" that
is measured for this metric.

------
lgp171188
Ubuntu doesn't even call itself Ubuntu Linux let alone Ubuntu
GNU/Linux."Ubuntu is a fast, secure and easy-to-use operating system used by
millions of people around the world."

------
silentbicycle
Yet another case of pie charts being a poor choice for presenting data.

Besides, GNU mainly shows up because lines-of-code is the metric. If cat -v is
considered harmful, what is cat --verbose? ;)

------
varjag
Try not installing glibc someday.

~~~
simias
There are viable alternatives. Debian for instance uses eglibc, which is LGPL
but AFAIK not part of GNU. The BSDs use their own libc as well.

~~~
MostAwesomeDude
Protip: eglibc is a fork of glibc, considers glibc an upstream, and
communicates patches with glibc, requiring copyright reassignment for
contributed code. This makes them roughly as GNU as glibc itself, which is
maintained by a Redhat employee.

------
smackfu
I think when Other is the majority, it makes it less meaningful.

~~~
pedrocr
Things in other are basically all individual projects. So they're not included
in any overarching project or grouping. And I actually find that very
interesting as it means that development is highly fragmented and
distributions do an essential job in putting it all together.

------
veyron
Why wasn't the kernel part separated from the support stuff?

It would seem the correct division (based on article) is

6% kernel

3% kernel support (i guess it would fall in "other")

~~~
pedrocr
There's a line there somewhere. Clearly udev is very tightly linked to the
kernel and it was built to replace devfs which _was_ inside the kernel. On the
other extreme maybe the filesystem programs (e.g., reiserfsprogs or xfsprogs)
aren't as tight a coupling and would make sense outside. I put the split into
the footnote to make that clearer.

------
fragsworth
I don't quite think it makes sense to say that _all_ of the software in a
Ubuntu distribution should fall under the label of "GNU/Linux". Just because
it runs on it doesn't mean it IS that thing.

That said, it is somewhat interesting to see the proportion of software.

~~~
masterzora
I'm not the author or the submitter, but it seems to me that this article is
more or less in response to FSF's "We developed most of the central
components, forming the largest single contribution to the whole system."[1]

[1] <http://www.gnu.org/gnu/gnu-linux-faq.html#why>

~~~
mkr-hn
I think it's more useful to look at the impact of a contribution. Apache, KDE,
and GNOME are a bigger deal than GNU by that metric. But I also think it's a
bad idea to try and put one over another when they all do their part.

~~~
rwl
I don't know how you measure "impact," but this doesn't sound right to me. If
you took away all the GNU code from a GNU/Linux system, my guess is that you
would no longer have a working Unix system. I don't think that can be said of
the other organizations you mention.

And if you mean social impact, I think it would be hard to overstate the role
of GNU in getting the free software movement going. Yes, there is an ecosystem
of self-sustaining projects and organizations now; but I have my doubts
whether any of that would be there without the initial efforts of GNU.

~~~
mkr-hn
Why does GNU need to be in the title? That's the purpose of the CREDITS file.
No one is trying to diminish GNU's contribution.

~~~
rwl
By that line of thinking, why call it "Linux" (or anything else) either? I
agree that "GNU/Linux" sounds kind of dumb, if that's what you're driving at
-- but I'd be happy to call the operating system "GNU".

~~~
mkr-hn
Why do we call it aspirin instead of acetylsalicylic acid? It's familiar, easy
to spell, and easy to remember. It's an accident of history. What would be
accomplished by renaming it?

~~~
halostatue
Most people in the world don't call it Aspirin, as that's a registered
trademark of Bayer AG. The trademark was voided in the U.S. during WWI and
never re-granted.

Here in Canada, we call it ASA.

~~~
dedward
Umm.. what?

Bayer holds the trademark for Aspirin (Capital A) in Canada (and others). The
trademark is void in the US (and others)

When Canadians that I know (incluidng me) say "aspirin" we mean very
deliberately "Any kind of ASA - and if it's not the generic stuff you're some
kind of weirdo who likes to waste money" - but we still call it aspirin. Brand
names don't, of course - they list ASA as an ingredient... but I've never in
my life heard someone ask if I had any ASA.

~~~
halostatue
Different experiences. The first time I had someone ask me for some, I was
confused: I didn't know what it was (I had just immigrated from the US). But
I've had more than a few people refer to it as ASA in the thirteen years I've
been here.

------
FlowerPower
LinesOfCode to determine how much "GNU" there is is like counting number of
screws in a car to determine how much "car" it is.

Without GCC to compile the kernel and all the other tools, there would be no
kernel. A free open source compiler which has existed for decades now, and its
competition, Clang, is it even stable yet?

~~~
ryannielsen
Is clang stable? Well, it can build the Linux kernel as of last October:
[http://lists.cs.uiuc.edu/pipermail/cfe-
dev/2010-October/0117...](http://lists.cs.uiuc.edu/pipermail/cfe-
dev/2010-October/011711.html)

And, seeing as Clang is the default compiler in Xcode 4, and can also build
FreeBSD[1], yes, I believe it's stable.

[1]
[http://www.freebsd.org/news/status/report-2010-04-2010-06.ht...](http://www.freebsd.org/news/status/report-2010-04-2010-06.html#Clang-
Replacing-GCC-in-the-Base-System)

~~~
justincormack
It still cant build a fully working out of the box Linux kernel for x86, eg no
16 bit early boot stuff, patches for various stuff, some things not working.

It is stable though. Linux is just a hard target...

~~~
s0li
why is linux a hard target? Don't know much about compilers/how kernel
compilation goes but still would appreciate some basic explanation.

~~~
justincormack
1\. It has always been targetted at gcc, so no serious portability work has
been done, more of a co-development thing. Linux will only compile correctly
on a few recent versions of gcc, you cant compile old kernels on new gcc or
vice versa. 2\. There is a lot of inline assembler (including oddities like
x86 16 bit code) that has to work exactly as specified, such as for creating
memory barriers say, or other low level constructs. Inline assembler is non
standard, although clang does now implement the gcc stuff. 3\. You are making
an ABI, so everything must be laid out exactly the same way. Portable C does
not give you exact control of padding, again there are gcc extensions. 4\.
Testing is hard - there are a huge number of optional modules, as well as SMP
and non SMP builds, so even if you build the code with a new compiler without
a lot of people using it it is hard to be sure it really works. There is no
test suite...

Probably some more reasons too...

------
user911302966
I think that the GNU+Linux attribution is accurate and deserved. The author of
this page thought it fair to use SLOC as his unit of measurement; I think that
"fundamentality" is a far fairer unit.

Anyone that thinks that "GNU" should be dropped from the "GNU/LINUX" should be
using alternate cp, rm, ln, etc. Or just use NetBSD (do this anyway).

~~~
forensic
The biggest GNU contributions are gcc, gdb and emacs.

Command line stuff is trivial. GNU made them for free first, but if they
hadn't, someone else would have. The same cannot be said for gcc, gdb and
emacs.

~~~
evgen
> GNU made them for free first, but if they hadn't, someone else would have.

Chnage that to "GNU re-packaged or re-wrote versions of utilities that had
existed for quite a while in the BSD world, but if they hadn't, someone would
have just used the BSD version" and you would be closer to reality. GCC is
really the only lingering semi-dependency and as clang improves to the point
where it takes fewer patches to build around GCC-specific bits of the kernel
the remaining contributions will become nice to have but not essential.

------
mareizio
How much GNU is there in GNU/Linux?[...]

[...]I picked Ubuntu natty as a reference[...]

Ridiculous. If you want to give a minimum of credibility to the article,
analyze other distros too!

