Skip to content

Commit

Permalink
Remove command-line Git from Mac and Windows binaries
Browse files Browse the repository at this point in the history
TODO fix coreutils dependent tests on Windows
  • Loading branch information
tkelman committed Jul 6, 2016
1 parent fa5af23 commit 9647f1e
Show file tree
Hide file tree
Showing 21 changed files with 24 additions and 222 deletions.
7 changes: 3 additions & 4 deletions DISTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Note that while the code for Julia is
[MIT-licensed, with a few exceptions](https://github.com/JuliaLang/julia/blob/master/LICENSE.md),
the distribution created by the techniques described herein will be
GPL licensed, as various dependent libraries such as `FFTW`, `Rmath`,
`SuiteSparse`, and `git` are GPL licensed. We do hope to have a
and `SuiteSparse` are GPL licensed. We do hope to have a
non-GPL distribution of Julia in the future.

Versioning and Git
Expand Down Expand Up @@ -84,9 +84,8 @@ to force the installation into a temporary directory.

By default, Julia loads `$prefix/etc/julia/juliarc.jl` as an
installation-wide initialization file. This file can be used by
distribution managers to provide paths to various binaries such as a
bundled `git` executable (as we do on OS X), or to setup paths (as
we do on Windows). For Linux distribution packages, if `$prefix` is
distribution managers to set up custom paths or initialization code.
For Linux distribution packages, if `$prefix` is
set to `/usr`, there is no `/usr/etc` to look into. This requires
the path to Julia's private `etc` directory to be changed. This can
be done via the `sysconfdir` make variable when building. Simply
Expand Down
1 change: 0 additions & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ Julia's build process uses the following external tools:
Julia bundles the following external programs and libraries on some platforms:

- [7-Zip](http://www.7-zip.org/license.txt)
- [GIT](http://git-scm.com/about/free-and-open-source)
- [ZLIB](http://zlib.net/zlib_license.html)
- [LIBEXPAT](http://expat.cvs.sourceforge.net/viewvc/expat/expat/README)
- [OPENSSL](https://github.com/openssl/openssl/blob/master/LICENSE)
Expand Down
18 changes: 3 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -426,12 +426,6 @@ distclean dist-clean:
dist:
@echo \'dist\' target is deprecated: use \'binary-dist\' instead.

ifeq ($(ARCH),x86_64)
GITCONFIG := $(BUILDROOT)/julia-$(JULIA_COMMIT)/Git/mingw64/etc/gitconfig
else
GITCONFIG := $(BUILDROOT)/julia-$(JULIA_COMMIT)/Git/mingw32/etc/gitconfig
endif

binary-dist: distclean
ifeq ($(USE_SYSTEM_BLAS),0)
ifeq ($(ISX86),1)
Expand Down Expand Up @@ -468,11 +462,7 @@ endif

ifeq ($(OS), WINNT)
[ ! -d $(JULIAHOME)/dist-extras ] || ( cd $(JULIAHOME)/dist-extras && \
cp 7z.exe 7z.dll libexpat-1.dll zlib1.dll libgfortran-3.dll libquadmath-0.dll libstdc++-6.dll libgcc_s_s*-1.dll libssp-0.dll $(BUILDROOT)/julia-$(JULIA_COMMIT)/bin && \
mkdir $(BUILDROOT)/julia-$(JULIA_COMMIT)/Git && \
7z x PortableGit.7z -o"$(BUILDROOT)/julia-$(JULIA_COMMIT)/Git" && \
echo "[core] eol = lf" >> "$(GITCONFIG)" && \
sed -i "s/\bautocrlf = true$$/autocrlf = input/" "$(GITCONFIG)" )
cp 7z.exe 7z.dll libexpat-1.dll zlib1.dll libgfortran-3.dll libquadmath-0.dll libstdc++-6.dll libgcc_s_s*-1.dll libssp-0.dll $(BUILDROOT)/julia-$(JULIA_COMMIT)/bin )
cd $(BUILDROOT)/julia-$(JULIA_COMMIT)/bin && rm -f llvm* llc.exe lli.exe opt.exe LTO.dll bugpoint.exe macho-dump.exe

# create file listing for uninstall. note: must have Windows path separators and line endings.
Expand Down Expand Up @@ -605,8 +595,7 @@ ifneq (,$(filter $(ARCH), i386 i486 i586 i686))
$(JLDOWNLOAD) https://juliacache.s3.amazonaws.com/mingw32-libssp0-5.3.0-1.1.noarch.rpm && \
for i in *.rpm; do 7z x -y $$i; done && \
for i in *.cpio; do 7z x -y $$i; done && \
cp usr/i686-w64-mingw32/sys-root/mingw/bin/*.dll . && \
$(JLDOWNLOAD) PortableGit.7z https://github.com/git-for-windows/git/releases/download/v2.6.1.windows.1/PortableGit-2.6.1-32-bit.7z.exe
cp usr/i686-w64-mingw32/sys-root/mingw/bin/*.dll .
else ifeq ($(ARCH),x86_64)
cd $(JULIAHOME)/dist-extras && \
$(JLDOWNLOAD) 7z920-x64.msi http://downloads.sourceforge.net/sevenzip/7z920-x64.msi && \
Expand All @@ -622,8 +611,7 @@ else ifeq ($(ARCH),x86_64)
$(JLDOWNLOAD) https://juliacache.s3.amazonaws.com/mingw64-libssp0-5.3.0-1.1.noarch.rpm && \
for i in *.rpm; do 7z x -y $$i; done && \
for i in *.cpio; do 7z x -y $$i; done && \
cp usr/x86_64-w64-mingw32/sys-root/mingw/bin/*.dll . && \
$(JLDOWNLOAD) PortableGit.7z https://github.com/git-for-windows/git/releases/download/v2.6.1.windows.1/PortableGit-2.6.1-64-bit.7z.exe
cp usr/x86_64-w64-mingw32/sys-root/mingw/bin/*.dll .
else
$(error no win-extras target for ARCH=$(ARCH))
endif
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ Building Julia requires that the following software be installed:
- **[GNU make]** — building dependencies.
- **[gcc & g++][gcc]** (>= 4.7) or **[Clang][clang]** (>= 3.1, Xcode 4.3.3 on OS X) — compiling and linking C, C++
- **[gfortran]** — compiling and linking Fortran libraries
- **[git]** — version control and package management (version 1.7.3+ required)
- **[perl]** — preprocessing of header files of libraries.
- **[wget]**, **[curl]**, or **[fetch]** (FreeBSD) — to automatically download external libraries.
- **[m4]** — needed to build GMP.
Expand Down Expand Up @@ -299,7 +298,6 @@ For a longer overview of Julia's dependencies, see these [slides](https://github
[gfortran]: https://gcc.gnu.org/fortran/
[curl]: http://curl.haxx.se
[fetch]: http://www.freebsd.org/cgi/man.cgi?fetch(1)
[git]: http://git-scm.com
[perl]: http://www.perl.org
[cmake]: http://www.cmake.org
[OpenLibm]: https://github.com/JuliaLang/openlibm
Expand Down
6 changes: 5 additions & 1 deletion README.windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,11 @@ replace `config.vm.provision :shell, privileged: false, :inline => $script_msys2

## After compiling

Compiling using one of the options above creates a basic Julia build, but not some extra components (like a built-in git installation) that are included if you run the full Julia binary installer. If you need these components, the easiest way to get them is to build the installer yourself using ```make win-extras``` followed by ```make binary-dist```, and then running the resulting installer.
Compiling using one of the options above creates a basic Julia build, but not some
extra components that are included if you run the full Julia binary installer.
If you need these components, the easiest way to get them is to build the installer
yourself using ```make win-extras``` followed by ```make binary-dist```, and then
running the resulting installer.

## Windows Build Debugging

Expand Down
1 change: 0 additions & 1 deletion base/exports.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export
Meta,
Operators,
Pkg,
Git,
LibGit2,
StackTraces,
Profile,
Expand Down
124 changes: 0 additions & 124 deletions base/pkg/git.jl

This file was deleted.

4 changes: 2 additions & 2 deletions base/pkg/pkg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Pkg

export Dir, Types, Reqs, Cache, Read, Query, Resolve, Write, Entry, Git
export Dir, Types, Reqs, Cache, Read, Query, Resolve, Write, Entry
export dir, init, rm, add, available, installed, status, clone, checkout,
update, resolve, test, build, free, pin, PkgError, setprotocol!

Expand Down Expand Up @@ -30,7 +30,7 @@ function Base.showerror(io::IO, pkgerr::PkgError)
end
end

for file in split("dir types reqs cache read query resolve write entry git")
for file in split("dir types reqs cache read query resolve write entry")
include("$file.jl")
end
const cd = Dir.cd
Expand Down
1 change: 0 additions & 1 deletion base/sysimg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,6 @@ include("libgit2/libgit2.jl")

# package manager
include("pkg/pkg.jl")
const Git = Pkg.Git

# Stack frames and traces
include("stacktraces.jl")
Expand Down
3 changes: 0 additions & 3 deletions contrib/mac/app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,10 @@ $(DMG_NAME): dmg/$(APP_NAME)
sudo hdiutil create $(DMG_NAME) -size 500m -ov -volname "$(VOL_NAME)" -imagekey zlib-level=9 -srcfolder dmg

dmg/$(APP_NAME): julia.icns
make -C ../../../deps install-git
make -C ../../.. binary-dist
tar zxf ../../../julia-*.tar.gz
mv julia-* julia
-mkdir -p ./julia/libexec ./julia/share
-cp -a $(build_libexecdir)/git* ./julia/libexec
-cp -a $(build_datarootdir)/git* ./julia/share
rm -f julia/lib/*.{a,la}
-mkdir dmg
platypus -a Julia -p /bin/bash -V $(JULIA_VERSION) -R -u "The Julia Project" -i julia.icns -Q julia.icns -o "None" -I org.julialang.julia -x -f julia script ./dmg/$(APP_NAME)
Expand Down
4 changes: 1 addition & 3 deletions contrib/mac/juliarc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
# Set up environment for Julia OSX binary distribution
let
ROOT = abspath(JULIA_HOME,"..")
ENV["PATH"]="$JULIA_HOME:$(joinpath(ROOT, "libexec", "git-core")):$(ENV["PATH"])"
ENV["PATH"]="$JULIA_HOME:$(ENV["PATH"])"
ENV["FONTCONFIG_PATH"] = joinpath(ROOT, "etc", "fonts")
ENV["GIT_EXEC_PATH"] = joinpath(ROOT, "libexec", "git-core")
ENV["GIT_TEMPLATE_DIR"] = joinpath(ROOT, "share", "git-core")
ENV["TK_LIBRARY"] = "/System/Library/Frameworks/Tk.framework/Versions/8.5/Resources/Scripts"
end
2 changes: 1 addition & 1 deletion contrib/windows/juliarc.jl
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Set up environment for Julia Windows binary distribution
ENV["PATH"] = JULIA_HOME*";"*joinpath(JULIA_HOME,"..","Git","bin")*";"*ENV["PATH"]
ENV["PATH"] = JULIA_HOME*";"*ENV["PATH"]
6 changes: 1 addition & 5 deletions contrib/windows/msys_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,25 +86,21 @@ case $(uname) in
esac

# Download most recent Julia binary for dependencies
# Fix directory not found error during decompression on msys2
mkdir -p usr/Git/usr
if ! [ -e julia-installer.exe ]; then
f=julia-latest-win$bits.exe
echo "Downloading $f"
$curlflags -O https://s3.amazonaws.com/julianightlies/bin/winnt/x$archsuffix/$f
echo "Extracting $f"
$SEVENZIP x -y $f >> get-deps.log
fi
for i in bin/*.dll Git/usr/bin/*.dll Git/usr/bin/*.exe; do
for i in bin/*.dll; do
$SEVENZIP e -y julia-installer.exe "$i" \
-ousr\\`dirname $i | sed -e 's|/julia||' -e 's|/|\\\\|g'` >> get-deps.log
done
for i in share/julia/base/pcre_h.jl; do
$SEVENZIP e -y julia-installer.exe "$i" -obase >> get-deps.log
done
echo "override PCRE_INCL_PATH =" >> Make.user
# suppress "bash.exe: warning: could not find /tmp, please create!"
mkdir -p usr/Git/tmp
# Remove libjulia.dll if it was copied from downloaded binary
rm -f usr/bin/libjulia.dll
rm -f usr/bin/libjulia-debug.dll
Expand Down
3 changes: 1 addition & 2 deletions deps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ include $(SRCDIR)/llvm-ver.make
# additionally all targets should be listed in the getall target for easier off-line compilation
# if you are adding a new target, it can help to copy an similar, existing target
#
# autoconf configure-driven scripts: llvm pcre arpack fftw unwind gmp mpfr patchelf libuv git
# autoconf configure-driven scripts: llvm pcre arpack fftw unwind gmp mpfr patchelf libuv
# custom Makefile rules: openlibm Rmath-julia dsfmt suitesparse-wrapper suitesparse lapack openblas utf8proc objconv osxunwind
# entirely custom: virtualenv
# CMake libs: libgit2
Expand Down Expand Up @@ -263,7 +263,6 @@ include $(SRCDIR)/unwind.mk
include $(SRCDIR)/gmp.mk
include $(SRCDIR)/mpfr.mk
include $(SRCDIR)/patchelf.mk
include $(SRCDIR)/git.mk
include $(SRCDIR)/libgit2.mk
include $(SRCDIR)/virtualenv.mk

Expand Down
1 change: 0 additions & 1 deletion deps/Versions.make
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@ OSXUNWIND_VER = 0.0.3
GMP_VER = 6.1.0
MPFR_VER = 3.1.4
PATCHELF_VER = 0.9
GIT_VER = 1.8.5.6
VIRTUALENV_VER = 15.0.0
RMATH_JULIA_VER = 0.1
1 change: 0 additions & 1 deletion deps/checksums/git-1.8.5.6.tar.gz/md5

This file was deleted.

1 change: 0 additions & 1 deletion deps/checksums/git-1.8.5.6.tar.gz/sha512

This file was deleted.

37 changes: 0 additions & 37 deletions deps/git.mk

This file was deleted.

2 changes: 1 addition & 1 deletion doc/manual/packages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ Once again, this is equivalent to editing the ``REQUIRE`` file to remove the lin
While :func:`Pkg.add` and :func:`Pkg.rm` are convenient for adding and removing requirements for a single package, when you want to add or remove multiple packages, you can call :func:`Pkg.edit` to manually change the contents of ``REQUIRE`` and then update your packages accordingly.
:func:`Pkg.edit` does not roll back the contents of ``REQUIRE`` if :func:`Pkg.resolve` fails – rather, you have to run :func:`Pkg.edit` again to fix the files contents yourself.

Because the package manager uses git internally to manage the package git repositories, users may run into protocol issues (if behind a firewall, for example), when running :func:`Pkg.add`. By default, all GitHub-hosted packages wil be accessed via 'https'; this default can be modified by calling :func:`Pkg.setprotocol!`. The following command can be run from the command line in order to tell git to use 'https' instead of the 'git' protocol when cloning all repositories, wherever they are hosted::
Because the package manager uses libgit2 internally to manage the package git repositories, users may run into protocol issues (if behind a firewall, for example), when running :func:`Pkg.add`. By default, all GitHub-hosted packages wil be accessed via 'https'; this default can be modified by calling :func:`Pkg.setprotocol!`. The following command can be run from the command line in order to tell git to use 'https' instead of the 'git' protocol when cloning all repositories, wherever they are hosted::

git config --global url."https://".insteadOf git://

Expand Down
Loading

0 comments on commit 9647f1e

Please sign in to comment.