Stories
Slash Boxes
Comments

SoylentNews is people

posted by Fnord666 on Monday June 10 2019, @01:25PM   Printer-friendly
from the fine-print dept.

Submitted via IRC for SoyCow4463

Why does macOS Catalina use Zsh instead of Bash? Licensing

Yesterday, at its WWDC developer conference, Apple unveiled the latest version of the MacOS operating system. Codenamed Catalina, it's a fairly significant update for the platform, not least because of the changes that have taken place under the hood. Take, for example, the default shell, which has been migrated from Bash to Zsh.

Bash has been the primary macOS shell since OS X 10.2 Jaguar. For almost sixteen years, MacOS developers have used it to write scripts and issue commands to the underlying operating system. It's deeply ingrained in how developers work. So, why the sudden change?

In a word: licensing.

[...] Newer versions of Bash are licensed under the GNU General Public License version 3 – or GPLv3 for short. This comes with several restrictions which could potentially have caused a few headaches for Apple further down the line.

Firstly, the GPLv3 include language that prohibits vendors from using GPL-licensed code on systems that prevent third parties from installing their own software. This controversial practice has a name: Tivoization, after the popular TiVo DVR boxes which are based on the Linux kernel, but only run software with an approved digital signature.

Secondly, the GPLv3 includes an explicit patent license. This can be hard to wrap your head around, but in a nutshell, it means that anyone who licenses code under the GPLv3 also explicitly grants a license to any of the associated patents. This isn't a comprehensive licensing deal; it only applies to the extent required to actually use the code.

[...] These two clauses are likely the reason why Apple's increasingly vary[sic] of GPL-licensed software, and is desperately trying to remove it from macOS. Between MacOS 10.5 Leopard and MacOS 10.12 Sierra, the number of GPL-licensed packages that came pre-installed decreased by an insane 66 percent – from 47 to just 16.


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 2) by TheRaven on Monday June 10 2019, @05:13PM (2 children)

    by TheRaven (270) on Monday June 10 2019, @05:13PM (#853757) Journal
    It's been a while since I looked at zsh, but I remember two features that were particularly nice (not sure if they're in recent bash):
    • The ** glob recursively expands directories and replaces a lot of find | xargs uses. For example, **/*.h will find all header files in a directory tree.
    • Global aliases work like aliases but can be expanded anywhere in the command line. This is useful if you have some things that go on the end of a pipeline that you often use.

    There were also some silly things, like a Tetris game implemented in zsh...

    --
    sudo mod me up
    Starting Score:    1  point
    Karma-Bonus Modifier   +1  

    Total Score:   2  
  • (Score: 1, Informative) by Anonymous Coward on Monday June 10 2019, @09:05PM

    by Anonymous Coward on Monday June 10 2019, @09:05PM (#853868)

    Bash (readline) has double asterisk too, added with v4. "shopt globstar" to check status (default is off, IIRC). shopt -s to set, or -u to unset.
    For alias expansion, I guess what you mean and need is alias-expand-line, not bind to anything by default.

  • (Score: 2) by boltronics on Tuesday June 11 2019, @03:12AM

    by boltronics (580) on Tuesday June 11 2019, @03:12AM (#854046) Homepage Journal

    I've never used zsh (never had a need, never liked the license), but It sounds like global aliases behave effectively the same as functions in Bash do. eg.


    $ function reverse { tr '[A-Za-z]' '[a-zA-Z]' ; }
    $ echo Hello | reverse
    hELLO


    $ function me { echo boltron ; }
    $ who | grep $(me)
    boltron tty7 2019-05-27 09:00 (:0)

    --
    It's GNU/Linux dammit!