Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Remove command-line Git from Mac and Windows binaries #17294

Merged
merged 4 commits into from
Jul 14, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions DISTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ separated most of the notes by OS.
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`,
`SuiteSparse`, and `git` are GPL licensed. We do hope to have a
GPL licensed, as various dependent libraries such as `FFTW` 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
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ 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)
- [BUSYBOX](https://github.com/rmyorston/busybox-w32/blob/master/LICENSE)
- [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
22 changes: 6 additions & 16 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 busybox.exe 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,18 +611,19 @@ 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
cd $(JULIAHOME)/dist-extras && \
$(JLDOWNLOAD) http://downloads.sourceforge.net/sevenzip/7z920_extra.7z && \
$(JLDOWNLOAD) https://unsis.googlecode.com/files/nsis-2.46.5-Unicode-setup.exe && \
$(JLDOWNLOAD) busybox.exe http://frippery.org/files/busybox/busybox-w32-FRP-483-g31277ab.exe && \
chmod a+x 7z.exe && \
chmod a+x 7z.dll && \
$(call spawn,./7z.exe) x -y -onsis nsis-2.46.5-Unicode-setup.exe && \
chmod a+x ./nsis/makensis.exe
chmod a+x ./nsis/makensis.exe && \
chmod a+x busybox.exe

# various statistics about the build that may interest the user
ifeq ($(USE_SYSTEM_LLVM), 1)
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 @@ -298,7 +297,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: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ cache:
- x86_64-4.9.2-release-win32-seh-rt_v4-rev3.7z
- llvm-3.7.1-i686-w64-mingw32-juliadeps-r09.7z
- llvm-3.7.1-x86_64-w64-mingw32-juliadeps-r09.7z
- usr/bin/busybox.exe

build_script:
# If there's a newer build queued for the same PR, cancel this one
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 @@ -325,7 +325,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"]
10 changes: 5 additions & 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 Expand Up @@ -160,6 +156,10 @@ if [ -z "`which make 2>/dev/null`" ]; then
export PATH=$PWD/bin:$PATH
fi

f=busybox-w32-FRP-483-g31277ab.exe
echo "Downloading $f"
$curlflags -o usr/bin/busybox.exe http://frippery.org/files/busybox/$f

for lib in SUITESPARSE ARPACK BLAS LAPACK FFTW \
GMP MPFR PCRE LIBUNWIND OPENSPECFUN; do
echo "USE_SYSTEM_$lib = 1" >> Make.user
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 dsfmt suitesparse-wrapper suitesparse lapack openblas utf8proc objconv osxunwind
# entirely custom: virtualenv
# CMake libs: libgit2
Expand Down Expand Up @@ -260,7 +260,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,5 +11,4 @@ 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
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.

Loading