8 ms·
The /bin/true Command and Copyright (1990)
- paulddraper 9y agoThere is essentially no downside to overclaiming, whether in copyrights or patents. Worst consequence is wasting several dozen bytes.
- deleted 9y ago[deleted]
- waqf 9y agoSo you could say that the algorithm for "should I claim any given intellectual property right?" is the one implemented by /bin/true.
- wnissen 9y agoWhat's even more interesting is to see how much code is needed in the GNU true. http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/true.c http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/true... 4 includes, 3 ifdefs or define blocks, the whole thing is 80 lines, more than half of it code!
- ilanco 9y agoLooks like most of the code is processing the arguments.
- paulddraper 9y agoIt is. -h, -v
- jwilk 9y ago--help, --version. Short options are not recognized.
- belorn 9y agoSince those are just for argument parsing, should we not also include the extra code that the kernel run in order for proper execution? With that we can even include additional stuff like apparmor adding code to protect against exploits in True. I suspect that each invocation to True, regardless of implementation, spend in average a large amount of unnecessary cpu instruction for practically every OS.
- ams6110 9y agoBy comparison, OpenBSD's version: /* $OpenBSD: true.c,v 1.1 2015/11/11 19:05:28 deraadt Exp $ */ /* Public domain - Theo de Raadt */ int main(int argc, char *argv[]) { return (0); }
- kobeya 9y agoWhich is, actually, far too large due to the standard library, program state initialization, and stack frame management. If there's ever a practical use for code golf, this is probably it. /bin/true should be a bare minimum ELF executable with no stack or heap that does nothing except immediately make the system call to terminate.
- cat199 9y agoAs mentioned in the article: " This can be done with an empty file that's marked executable, and that's what it was in the earliest unix system libraries. " $ uname -sr OpenBSD 6.1 $ install -m 755 /dev/null /tmp/muhtrue && /tmp/muhtrue && echo yup yup not sure why it was ever switched.. probably the 'return 0;' version is cheaper than a shell fork? hmm..
- slezyr 9y agoWell this code might do exactly what you just said. Everything depends with which compiler flags you build this code. I know for sure there are MSVS flags to build this program with no runtime and other things with just return asm op in it.
- smhenderson 9y agoBut it implements true and false!
- Maakuth 9y agoThis is thought to be because of GNU Coding Standards: https://www.gnu.org/prep/standards/standards.html#Reading-Non_002dFree-Code https://www.gnu.org/prep/standards/standards.html#Reading-No... They wanted GNU implementers to be careful not to copy (even through their recall) AT&T UNIX implementation, but to do compatible solutions in different way. This allowed them to keep safe footing legally through the time when the original UNIX source code's copyright status wasn't clear. The point of the GNU project is to create independent UNIX compatible operating system. The BSD implementations are often referred in this discussion, but regarding them, you've got to keep in mind that it is continuation of the original UNIX source tree, after it's copyright status was clarified (https://en.wikipedia.org/wiki/UNIX_System_Laboratories,_Inc._v._Berkeley_Software_Design,_Inc. https://en.wikipedia.org/wiki/UNIX_System_Laboratories,_Inc....).
- TheRealPomax 9y agoI was hoping this would also go into whether AT&T actually acted to enforce this copyright, as copyright covers "The work" and "significant subsets", but will not cover things like newlines. For that kind of content (as well as "int i= 0" and the like) there is both prior art, and the claimed-copied content cannot be used to identify the work, and where in that work, the line would have been lifted from. The article seems mostly about the fact that AT&T intentionally added a copyright notice in their otherwise empty program's comment block, in an era that predates the era of widespread availability of software and copyright wars. Which is honestly not really all that surprising.
- cat199 9y ago> The article seems mostly about the fact that AT&T intentionally added a copyright notice in their otherwise empty program's comment block, in an era that predates the era of widespread availability of software and copyright wars. Which is honestly not really all that surprising. This page was likely written exactly because of the 'era of widespread availability of software and copyright wars' - e.g. the statement: "One of the fun examples among all the copyright fuss" combined with the edit dates (90,93) seem to me to indicate this was written exactly as a response to the UCB vs USL suit.. https://en.wikipedia.org/wiki/UNIX_System_Laboratories,_Inc._v._Berkeley_Software_Design,_Inc https://en.wikipedia.org/wiki/UNIX_System_Laboratories,_Inc..... as well as the 'unix wars' https://en.wikipedia.org/wiki/Unix_wars https://en.wikipedia.org/wiki/Unix_wars
- PopsiclePete 9y ago> I've pointed this out publicly on numerous occations, in various technical forums, since the early 1980's. So far I haven't heard a word from any AT&T lawyers. Anyone have any idea why they are ignoring such a violation? Ah, one of those people.
- wnoise 9y agoThose people who point out absurdities that almost everyone wants desperately to ignore?
- nobodyorother 9y agoImagine what a wonderful world it would be if someone took lawyers to task for every absurdity!
- habibalamin 9y agoWe'd have to do the same for developers. A program that does nothing is an absurdity. The equivalent function, `id`, is an absurdity. I'm sure I could think of more if I tried. ninjedit: I understand that they are a logical consequence of a reasonable way of doing things; my point is that law is basically the same (you could argue that a law is unreasonable, but a seemingly absurd law is not prima facie unreasonable).
- deleted 9y ago[deleted]
- jhauris 9y agoIt's more interesting that they incremented the version of the script. Apparently modifying comments justifies increasing the minor version.
- protomyth 9y agoAfter having seen a comment addition cause a bug[1], I appreciate the effort. 1) really damn weird compiler bug was all we could think of
- bonzini 9y agoThe number is placed there automatically by some old version control system (probably SCCS or RCS) and is incremented on every commit. The commits were likely just adding a new year to the copyright line.
- cat199 9y ago"@(#)true.sh 1.6 93/01/11 SMI" /* SVr4.0 1.4 */ is an sccs id. Anecdotally (wasn't there at the time): sccs was more common everywhere before RCS because sccs was part of all unix (e.g including BSD UNIX).. it was encumbered as part of the UCB USL suit and rcs use grew after that, then cvs, then svn, then git
- gkya 9y agoThat's the version of coreutils, not that of true. Try: (/bin/true --version; ls --version; cat --version) | grep coreutils all will be the same.
- mmagin 9y agoI recall last I looked at Solaris, it was far bigger than that. Microsoft was even in there (due to Xenix.)
- jasonkostempski 9y agoI find the man pages descriptions of both true and false zen like and have wanted to make t-shirts out of them for years. On Ubuntu, the man page copyright is claimed by FSF, can I make a shirt?
- fasquoika 9y agoOnly if you provide the source code for the shirt upon request
- nobodyorother 9y agoIt's provided on the shirt itself (self-evident), so it should be fine to distribute copies of the shirt.
- tedunangst 9y agoThe GPL also requires providing a copy of the license.
- jdormit 9y agoPut it on the back of the shirt.
- deleted 9y ago[deleted]
- wiml 9y agoYou could include it on the care instructions tag in tiny tiny print.
- tedunangst 9y agoProblematic if you wear the shirt in public and allow someone to take your picture. You must provide them a copy too or your license to wear the shirt is revoked.
- bjornsing 9y agoFrom a strictly legal perspective I suspect /bin/true (or at least AT&Ts implementation) do not live up to the law's requirements of originality and expressiveness.
- cat199 9y agoConsidering that they were the copyright holders for unix at the time, and that this 'default interpreter processing'/ return code mechanism was part of the kernel/userland interface, I'm not so sure that's the case.. not to defend AT&T over unix, as a BSD guy..
- KGIII 9y agoMy guess is that the copyright is for the whole body of work, and not just for the single file. The copyright notice in the single file is probably not a requirement from a legal standpoint and is merely indicative.
- morpheuskafka 9y agoThese days most IDEs automatically add a copyright/license default text to the top of each new file. It makes sense to instruct software engineers to follow a simple copyright rule rather than expecting them to play JDs and keep up with all the standards and developments in what was at the time (and still is) quickly changing copyright laws.
- ryanpcmcquen 9y agoI love seeing pieces of history like this, thank you for sharing it.
- jasonmp85 9y agoRandom thought: it's pretty absurd to claim copyright on an empty program, but if this behavior was sufficiently innovative, could one patent an empty program?
- bdowling 9y agoPatentable subject matter under U.S. law consists exclusively of "any new and useful process, machine, manufacture, or composition of matter, or any new and useful improvement thereof". 35 USC 101. So, a program may implement a patented process or it may be a piece of a patented machine, but it won't be patentable in itself.
- gkya 9y agoThis is really silly. Not fun or interesting at all. Gnu coreutils wants all the command line utilities to respond to --help and --version. The version number is that of the coreutils package, if your ls is Gnu ls, it'll say the same number too: [2] g@alpha (0)$ /bin/true --version true (GNU coreutils) 8.26 Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Jim Meyering. [3] g@alpha (0)$ ls --version ls (GNU coreutils) 8.26 Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Richard M. Stallman and David MacKenzie. [4] g@alpha (0)$ WRT AT&T true(1), well they probably were required to put a header in a certain format in every source file, and they put that in this one to. Probably the implementor just copied from a template and left it like that. Also I don't beleive they manually edit the years in copyright notices, one usually has a script to do that.
- unkown-unknowns 9y ago> Gnu coreutils wants all the command line utilities to respond to --true and --version. The version number is that of the coreutils package, You meant to say --help and --version.
- gkya 9y agoYes, thanks.
- racer-v 9y ago> Also I don't beleive they manually edit the years in copyright notices, one usually has a script to do that. It's not clear if you're referring to the copyright notices displayed to the user, or the copyright notices embedded in the source code. In the former case: I have been told to programmatically print $CURRENT_YEAR in a program's displayed copyright notice, which I refused to comply with. After all, someone running the program 200 years in the future should be able to determine that the copyright has long since expired.
- bdowling 9y agoThere is a lot of space between (1) a copyright notice, (2) a valid copyright, and (3) a valid claim against a third party for copyright infringement. On (1), authors can attach copyright notices to their work, but it isn't necessary to secure their copyright interests, nor is it sufficient to make the work protectable. On (2), validity will depend on whether the work is protectable expression and whether or not the expression merges with the idea. On (3), there are a whole host of defenses to infringement including Fair Use and a de minimis defense (copying is so small it doesn't matter). Here, I'd expect that an expression of an empty program would merge with the idea of an empty program, which would make it not copyrightable. Of course, that doesn't stop someone from putting a copyright notice on it anyway.
- nolemurs 9y agoThis is entirely the right way to see things. I'd like to emphasize that a copyright notice' purpose is to serve as evidence, should a copyright claim be made. As you said, it is neither necessary nor sufficient to establish a copyright. There's no harm in putting a copyright notice on uncopyrightable material. With that understanding, including a copyright notice just makes sense. If you're AT&T you have two options. You can tell your engineers to just always include the copyright notice, or you can ask your engineers to understand copyright law well enough to decide whether the notice is called for. The decision is pretty obvious. EDIT: Ohh, there is a third option. You can pay lawyers to review every code file.