After launching an upgrade of XCode on a MacOS Sierra, calling git
in a
terminal suprisingly results in:
$ git Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
and the command quits. This happens no matter what option git is given, including none or --version
. The command used to work normally before this upgrade.
I don't see how it's legit to do that. According to git README:
Git is an Open Source project covered by the GNU General Public License version 2 (some parts of it are under different licenses, compatible with the GPLv2)
This git binary is located in MacOS /usr/bin
, so it's from
Apple as far as I can tell.
EDIT: once the license is agreed upon, git --version
confirms it:
git version 2.10.1 (Apple Git-78)
It seems to me that forcing users to accept an incompatible license to be able to use a GPL software contradicts the GPL, for instance section 2b or section 6:
- b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
- Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
I assume that Apple has technically tied git
(and I believe other free-licensed command line tools) to its Xcode
closed-source product (which I
don't really know or use directly, I develop with Qt which depends on it), in a way that you can't use them until you accept the license of what they see as the "main product", the container.
Does that practice effectively violate the GPLv2?
Related questions on https://apple.stackexchange.com/
- git is broken: “Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo”
- How to properly update git on mac?
About strings
applied to the binary: strings /usr/bin/git
on MacOS curiously doesn't produce anything, but the strings
commands from linux binutils
extracts 94 lines from it, which are mostly related to Apple and licensing.
Those that consist of readable text are essentially:
com.apple.git com.apple.git Apple Inc.1&0$ Apple Certification Authority1 Apple Root CA0 Apple Certification Authority1301 *Apple Code Signing Certification Authority0 https://www.apple.com/appleca/0 Reliance on this certificate by any party assumes acceptance of the then applicable standard terms and conditions of use, certificate policy and certification practice statements.0 *Apple Code Signing Certification Authority0 Apple Inc.1 Apple Software1 Software Signing0 )http://www.apple.com/certificateauthority0
It seems that this binary (which is very small: 18KB) is only about checking the license stuff, and then it launches another binary which would be the real git
. I could not dtruss /usr/bin/git
(permission problems), but there's a 1.8MB /Library/Developer/CommandLineTools/usr/bin/git
that seems to be the real thing.
which git
and what is the type of the/usr/bin/git
by runningfile /usr/bin/git
and eventually if this is some text file tell us roughly what this file looks like (e.g which scripting language, etc)?which git
gives/usr/bin/git
andfile
tells it's a binary:/usr/bin/git: Mach-O 64-bit executable x86_64
strings /usr/bin/git | less
if this contains some typical strings for the git exe such asgit [--version] [--help]
or similar?