9 ms·
Toybox: All-in-one Linux command line
- synergy20 5y agoRob is a genius, who did busybox then wrote toybox so people(e.g. Android) can use it without concerning about GPL. It's a honor I know him in person.
- valvar 5y agoWhat's the issue with GPL here?
- wtallis 5y agoI think that comment is easier to parse if you replace "people" with "corporations". Toybox not using the GPL is an important advantage for Android vendors, not Android end users.
- young_unixer 5y agoAs a user, I'll always prefer a permissively licensed piece of software over a GPL one, ceteris paribus. I hate the whole idea of intellectual property, so the less time I (and everyone, really) have to spend caring about it, the better. MIT and BSD licenses allow everyone to care as little as legally possible about copyright, so in that regard any other choice is inferior. And the "companies will be forced to give back to the project" argument never made sense to me.
- wtallis 5y agoAs a user, the GPL doesn't do anything to restrict you. It only comes into play when you want to redistribute software. Hating the idea of intellectual property doesn't make it go away. Neither do permissive licenses. Which is why your "ceteris paribus" statement is effectively worthless. > And the "companies will be forced to give back to the project" argument never made sense to me. Care to explain where you think it falls apart? So far, it simply seems like you're fed up with the system and would rather rage in denial than try to improve the system or use it to your advantage. That may give you some degree of satisfaction, but it's silly for you to assert that everyone benefits from the same. And if you really just want to stop caring about copyright, I don't see why you'd bother advocating for MIT or BSD over GPL instead of just turning to casual piracy like most people who can't be bothered to respect software copyright.
- deleted 5y ago[deleted]
- Nursie 5y ago> MIT and BSD licenses allow everyone to care as little as legally possible about copyright Unless that person is in receipt of a binary, in which case they are SOL.
- drran 5y agoAs user, permissive license means "no source for you", because vendor is not obligated to share source with end user by permissive license. For end user, there is no difference between permissive and proprietary licenses. The GPL license is the only license which protects end-user rights to see and modify source code of the software they use.
- Seirdy 5y agoThe purpose of a permissive license is to encourage proprietary derivatives that come with intellectual property restrictions, EULAs, SaaS with vendor lock-in, etc. The purpose of a copyleft license is to encourage derivatives that don't come with such restrictions. Copyleft therefore helps reach a local maximum of freedom for everyone as a function of restrictions on redistribution.
- Brian_K_White 5y agogoogle "mit vs gpl"
- CameronNemo 5y agoYes, google is antagonistic to GPL licensed software.
- Brian_K_White 5y agoI don't understand this comment. Google have done countless things both for and against open software. any business that wants to use gpl software has a problem. It's not that gpl is bad either, or that it can't be used for commercial purposes, it's simply that the traditional business model doesn't include giving anything to anyone else. So like I said, google "mit vs gpl" to get countless articles and discussions explaining all about that. That is the answer to "what's the problem with gpl here?" This project is 0bsd not mit but mit will yield more hits, and is the same fundamental issue.
- valvar 5y agoBut the GPL is much better if you want to avoid having your work stolen.
- drran 5y agoRed Hat sells GPL'ed software for billions. Oracle tried to do the same. Amazon created a whole ecosystem (AWS) around GPL'ed code. Even M$ embraces GPL. Can you name the problem, please?
- phendrenad2 5y agoRed Hat sells support, their software is free of charge. This is the closest thing to a viable business model around GPL code, and if you look at most companies doing this they are struggling. Red Hat was lucky/smart enough to get i to the government space and sell based on their rock-solid security. If your GPL software is unappetizing or irrelevant to the government world, you can't get that revenue stream going. Amazon "commoditizes their complement" (https://news.ycombinator.com/item?id=25476266 https://news.ycombinator.com/item?id=25476266) by making open-source easy to use, and hopefully you'll exit through the gift shop and drop some chunky spend on their hosting services. If your code is the actual valuable thing (for instance, a spreadsheet program that makes Excel look like a joke), then giving the code away for free doesn't give you any path to make money.
- chubot 5y agoAndroid has a policy of "no GPL in user space". I think Google makes this concession to the desires of phone manufacturers (Samsung, LG, etc.), but someone else probably knows more ... Similarly, Apple has a policy against shipping GPLv3 code. When bash upgraded to GPLv3 from GPLv2 ~10 years ago, Apple stopped upgrading it, and then eventually migrated to zsh, which is MIT licensed. The issue is that GPL is a "viral" license, which hasn't been tested all that much in court, but they're erring on the safe side. They don't want to mix their proprietary code with GPL code.
- pjmlp 5y agoAnd when Fuchsia gets mature enough (already shipping on Nest devices), there will be no GPL in kernel space as well.
- szastamasta 5y agoSomeone should really rewrite it’s home page. Level of corporate bs without any actual information is astonishing.
- pjmlp 5y agoIf you want actual information, dive into https://fuchsia.dev/fuchsia-src https://fuchsia.dev/fuchsia-src instead.
- hnfong 5y ago> which hasn't been tested all that much in court Google LLC v. Oracle America, Inc. The code in question was Java code, which has been licensed under (among possibly other licenses) the GPL. The terms of the GPL has not been an issue in the case, but GPL's "virality" AFAIK is premised somewhat on things like API copyrightability. https://lore.kernel.org/all/20031206211900.GA9034@thunk.org/T/#m4b46b8b4401b17400047942341852adc1253478a https://lore.kernel.org/all/20031206211900.GA9034@thunk.org/... Quoting from Theodore Ts'o in 2003: But that aside, does the Open Source community really want to push for the legal principal that just because you write an independent program which uses a particular API, the license infects across the interface? That's essentially interface copyrights, and if say the FSF were to file an amicus curiae brief support that particular legal principle in an kernel modules case, it's worthwhile to think about how Microsoft and Apple could use that case law to f*ck us over very badly.
- robmusial 5y agoLandley's major issue with GPL is that there isn't "a" GPL anymore. To paraphrase a talk (or multiple talks) I've seen of his: "the GPL", even up to GPLv2 was seen as a universal receiver of source code. For the most part it didn't matter which free/open code was linked to it, GPLv2 could be compatible with it. Enter GPLv3 which wasn't even compatible with the unmodified GPLv2 and to Landley this made it no longer a universal receiver. Couple that with his disagreement over using the GPL in BusyBox to leverage source code from vendors, he created ToyBox and the 0BSD license. He sees the 0BSD license as a universal donor since GPL is no longer a universal receiver.
- deleted 5y ago[deleted]
- rwmj 5y agoThere are loads of BSD and MIT variants. But if this is a real objection why not settle on a specific version of the GPL, as Linux has done? List of variants of BSD: https://fedoraproject.org/wiki/Licensing:BSD?rd=Licensing/BSD#BSDwithAdvertising https://fedoraproject.org/wiki/Licensing:BSD?rd=Licensing/BS...
- numpad0 5y agoCan you mix "v3 or later" code with v2 code? I think that's violation of copyright.
- rwmj 5y agoDoes the toybox project mix their code with GPLv3+ code? The weird argument above was that there are apparently too many variations of the GPL (even though there are many, many more BSD and MIT variants). So I said, stick to a single GPL variant. And then you ask if you can mix GPL versions together.
- afiori 5y agothe argument was that there are incompatible variations of the gpl, in most cases those variations of MIT licenses can be mixed in any way
- jabl 5y agoApart from the "universal donor" vs. "universal receiver" argument explained in a sibling comment, Mr. Landley was apparently also involved (as a plaintiff) in the busybox lawsuits. He has explained in various talks etc. that, in his opinion, those lawsuits accomplished nothing except to drive away corporate users that had just started to dip their toes into the water with open source. So one motivation for creating toybox was apparently that he wanted it as a busybox alternative for users afraid of lawsuits.
- rwmj 5y agoPerhaps we don't want those kinds of companies that ignore software licenses? Do the companies think that if they shipped unlicensed Windows with their phones that Microsoft would be "this is fine" Bottom line is if you're shipping software with your phone that you didn't write, maybe spend the really minimal amount of time to make sure you're in compliance with the license, especially when the license (GPL) makes no onerous demands at all except you might need to put up an apache server somewhere with the source on it.
- jabl 5y agoI'm not disagreeing with you. I think you should follow the licenses of whatever software you're shipping, whether that software is closed-source proprietary software or open source, or something else. Unfortunately many companies seem to think that because they downloaded the software for free from the internet, they don't need to care about what the license text says. And if they disregard what some random person on the internet whines about them not following some license, a lawsuit seems perfectly in order. Now one could argue, as Landley seems to be doing, that a permissive license is more attractive to corporations as there is less risk that some mistake somewhere along the way gets them sued. Then one can of course counter that argument by asking whether such users are beneficial to open source in the longer term, or is the open source community just a bunch of suckers doing free work for corporations without getting anything in return.
- oefrha 5y agoREADME doesn't explain what it is beyond "all-in-one Linux command line". Here's the about page: http://landley.net/toybox/about.html http://landley.net/toybox/about.html (including comparison to busybox). And here's the list of commands currently supported: http://landley.net/toybox/status.html http://landley.net/toybox/status.html.
- nerdponx 5y agoIt does explain, but not at the top: > The toybox build produces a multicall binary, a "swiss-army-knife" program that acts differently depending on the name it was called by (cp, mv, cat...). Installing toybox adds symlinks for each command name to the $PATH. > The special "toybox" command treats its first argument as the command to run. With no arguments, it lists available commands. This allows you to use toybox without installing it, and is the only command that can have an arbitrary suffix (hence "toybox-armv5l").
- lucb1e 5y agoSo it's busybox, rewritten or forked for some reason? Edit: found it elsewhere in the thread. It's rewritten because they didn't like GPL for religious reasons. (Busybox is a completely separate binary from the rest of the system so there is no reason not to ship GPL-licensed software that I can see, but yeah if you've been bitten by making a closed source work derived from GPL once, I guess you don't want to try it again and Android has a lot of vendors with closed source components.)
- senzilla 5y agoChoosing fo rewrite software because of a license does not have to be "religious". There are very real reasons why license matters. Especially when it comes to GPLv3 and companies who hold patents. This is one of the reasons why Google Android, and probably many others, are using Toybox for their userland. Because it's distributed under a BSD license.
- jbhouse 5y agoThis seems really neat, but I'm struggling to think of what I would use it for
- timonoko 5y agoSpace and time saving measure. Instead of hundreds of programs you have one "box", which can do it all. Program names are the same but they all point to this box. The box reads the original command line and acts accordingly. If the line starts with "cat" it acts like a cat. If it starts with "cut" it acts like a cut.
- Nursie 5y agoSmall footprint basic system utils, good for constrained systems and early boot, basically. Where utilities themselves are very small, it avoids executable 'boilerplate' that would take up space.
- pmarin 5y agoCustom embedded Linux systems without GPL code in user space.
- tlamponi 5y ago> Toybox's main goal is to make Android self-hosting by improving Android's command line utilities so it can build an installable Android Open Source Project image entirely from source under a stock Android system. -- http://landley.net/toybox/about.html http://landley.net/toybox/about.html Possibly also interesting: Toyboy vs. Busybox https://www.youtube.com/watch?v=MkJkyMuBm3g#t=1m18s https://www.youtube.com/watch?v=MkJkyMuBm3g#t=1m18s
- forgotpwd16 5y agoWorth mentioning that toybox replaced Android's toolbox back in 2015 (with the release of ver. 6). Toolbox utilities were based on their NetBSD versions whereas toybox utilities works more like the common GNU coreutils. Edit: A list showing the change with what tools are supplied by each box in each version: https://android.googlesource.com/platform/system/core/+/master/shell_and_utilities/README.md https://android.googlesource.com/platform/system/core/+/mast...
- exsf0859 5y agoLandley's blog is interesting, too. http://landley.net/notes.html http://landley.net/notes.html He often describes the step-by-step development process for building the Toybox tools.
- ghoward 5y agotoybox is pretty cool, but there is one big problem (though I am biased): the `bc` it has is old and outdated and not much better than the GNU `bc`. The last update was several years ago because Rob wanted to maintain the version in toybox himself. It has not gotten much love since. Source: I am the author of the `bc` in toybox. My current version [1] is much faster and has more math libraries and extensions. Even Android uses my current version rather than the version in toybox. Edit: mistakenly said that toybox has my `dc`. It does not. Busybox does, and I mixed them up. I've corrected the above. [1]: https://git.yzena.com/gavin/bc https://git.yzena.com/gavin/bc
- marcodiego 5y agoWhy isn't it merged?
- ghoward 5y agoRob has a big goal in conflict with my goals: he wants as few lines of code as possible. Obviously, the performance and extra features require more lines of code. So he does not want my updates.
- ducktective 5y agoActually as of now, toybox does not contain bc or dc. There is a bc in community dir. Even busybox in many builds does not come with bc which is a posix requirement.
- ghoward 5y agoBusybox's bc and dc are also based on mine, by the way. And no, many people don't include them in builds, but that doesn't mean it doesn't have them. The reason is probably because bc is a much bigger utility than most utilities in busybox and "bloats" the binary size. ("Bloat" is a relative term. The busybox version is probably less than 100 kb.) While toybox does not have my dc, I don't know what you mean by toybox not having a bc. It does, and it is based on mine. It's not in the community directory, it's in the pending directory (bc.c), which just means it's not enabled by default. You can enable it if you wish. Rob himself does because it's what allows toybox to have all of the utilities necessary for building Linux. (Yes, Linux requires bc to build.) Edit: I've corrected my parent comment because you are right that toybox does not have my dc. But it does still have my bc.
- arpa 5y agodo one thing and do it well, huh?
- aasasd 5y agoAs I discovered in practice, it seems to be a trend with authors of such small-size software to also forgo any kind of documentation: what options are supported by specific commands, what behaviours they exhibit (which sometimes differs between GNU and BSD). The ‘usage’ messages are also terse and cryptic to the max. Doubly baffling when the audience of the software is supposedly corporations building their userspace. Do the authors sell the docs on the side, or what? Anyway, for users trying to do stuff with these utils, the available paths seem to be either finding StackOverflow answers from others who already messed with their own systems and survived, or being the first to do the trial-and-error.
- jml7c5 5y agoIt appears that each command is documented at the top of its respective source file. Though I may be misunderstanding and you mean that that documentation is insufficient. Regardless, I agree that there should be a proper man page with more detail.
- deleted 5y ago[deleted]
- 1vuio0pswjnm7 5y agoIts been said that the best documentation is source code. For UNIX I have always found this is solid advice. Whats nice about small programs, such as this one, is that its more feasible to use the source code as documentation. "Anyway, for users ..." Ah, thats me. I am a user. I personally love terse and cryptic, i.e., minimising the number of keys I have to press. IME, multicall binaries like the OP presume some pre-existing knowledge of how to use the utilities they contain. It seems nonsensical to complain about missing documentation given the purpose of a multicall binary is to conserve space. With BSD, the utilities in crunched binaries are generally the same ones, i.e., use the same source code, as in one in the userland. With GNU busybox, they are not, and one needs to read the source code to understand the differences. Even if I can figure out how to use a program from reading documentation I still look at the source code before using it for the first time.
- baggiponte 5y agoI did not understand what this, though
- nerdponx 5y agoIt's in the readme but not at the top: > The toybox build produces a multicall binary, a "swiss-army-knife" program that acts differently depending on the name it was called by (cp, mv, cat...). Installing toybox adds symlinks for each command name to the $PATH. > The special "toybox" command treats its first argument as the command to run. With no arguments, it lists available commands. This allows you to use toybox without installing it, and is the only command that can have an arbitrary suffix (hence "toybox-armv5l").
- hjek 5y agoBackground story[0] about Rob Landley's split with Busybox: --- Why did I switch from busybox to toybox? I left busybox due to an argument over GPLv3. - https://lwn.net/Articles/202106/ https://lwn.net/Articles/202106/ (busy busy busybox) Took all the fun out of it (reminded me of "SCO Disease") Did toybox as a hobby for a bit, no real expectation anybody use it. Even came back to busybox for a while, on and off, circa 2008-2011 sent toybox patch to busybox, fixed their vi, nbd-client... - http://lists.busybox.net/pipermail/busybox/2008-October/067397.html http://lists.busybox.net/pipermail/busybox/2008-October/0673... - http://lists.busybox.net/pipermail/busybox/2010-September/073311.html http://lists.busybox.net/pipermail/busybox/2010-September/07... - https://landley.net/notes-2015.html#30-07-2015 https://landley.net/notes-2015.html#30-07-2015 --- [0]: http://landley.net/talks/elc-2019.txt http://landley.net/talks/elc-2019.txt
- ComodoHacker 5y agoMore background: https://landley.net/aboriginal/history.html https://landley.net/aboriginal/history.html
- Ciantic 5y agoI dug up one of his latest YouTube videos, which I think as a whole is good watch. Here is the licensing part: - https://youtu.be/MkJkyMuBm3g?t=1525 https://youtu.be/MkJkyMuBm3g?t=1525 (at 25:25) Also I think it's worth to listen the first 10 minutes as an intro, and brief about licensing from 5 minutes forward. Where he explains how BusyBox's licensing was then used by other people as "beating tool" to get hardware specs.
- pmarin 5y agoOther alternatives are sbase from Suckless and 9base, a repacked version of the plan9 toolset. https://core.suckless.org/sbase/ https://core.suckless.org/sbase/ https://tools.suckless.org/9base/ https://tools.suckless.org/9base/
- Anonymous4272 5y agoSo can we install this along side busybox, and will android apps that require busybox work with this (like lucky patcher, viper etc)