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

build: libgit2 makefile fixes #27737

Merged
merged 1 commit into from
Jun 23, 2018
Merged
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
5 changes: 0 additions & 5 deletions Make.inc
Original file line number Diff line number Diff line change
@@ -161,11 +161,6 @@ SOMAJOR := $(JULIA_MAJOR_VERSION)
SOMINOR := $(JULIA_MINOR_VERSION)
endif

# Specify the version of the Mozilla CA Certificate Store to obtain.
# The versions of cacert.pem are identified by the date (YYYY-MM-DD) of their changes.
# See https://curl.haxx.se/docs/caextract.html for more details.
MOZILLA_CACERT_VERSION := 2018-06-20

ifneq ($(NO_GIT), 1)
JULIA_COMMIT := $(shell git rev-parse --short=10 HEAD)
else
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -500,7 +500,7 @@ full-source-dist: light-source-dist.tmp

# Create file full-source-dist.tmp to hold all the filenames that go into the tarball
cp light-source-dist.tmp full-source-dist.tmp
-ls deps/srccache/*.tar.gz deps/srccache/*.tar.bz2 deps/srccache/*.tar.xz deps/srccache/*.tgz deps/srccache/*.zip >> full-source-dist.tmp
-ls deps/srccache/*.tar.gz deps/srccache/*.tar.bz2 deps/srccache/*.tar.xz deps/srccache/*.tgz deps/srccache/*.zip deps/srccache/*.pem >> full-source-dist.tmp

# Prefix everything with the current directory name (usually "julia"), then create tarball
DIRNAME=$$(basename $$(pwd)); \
6 changes: 0 additions & 6 deletions deps/.gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
/srccache
/build
/scratch

# Ignore CA certificate store files
*.pem

# Include checksums of CA certificate store files
!/checksums/*.pem
5 changes: 5 additions & 0 deletions deps/Versions.make
Original file line number Diff line number Diff line change
@@ -12,3 +12,8 @@ MPFR_VER = 4.0.0
PATCHELF_VER = 0.9
MBEDTLS_VER = 2.6.0
CURL_VER = 7.56.0

# Specify the version of the Mozilla CA Certificate Store to obtain.
# The versions of cacert.pem are identified by the date (YYYY-MM-DD) of their changes.
# See https://curl.haxx.se/docs/caextract.html for more details.
MOZILLA_CACERT_VERSION := 2018-06-20
29 changes: 17 additions & 12 deletions deps/libgit2.mk
Original file line number Diff line number Diff line change
@@ -57,22 +57,12 @@ $(LIBGIT2_SRC_PATH)/libgit2-agent-nonfatal.patch-applied: $(LIBGIT2_SRC_PATH)/so
patch -p1 -f < $(SRCDIR)/patches/libgit2-agent-nonfatal.patch
echo 1 > $@

cacert-$(MOZILLA_CACERT_VERSION).pem:
$(JLDOWNLOAD) $@ https://curl.haxx.se/ca/cacert-$(MOZILLA_CACERT_VERSION).pem
$(JLCHECKSUM) $@

libgit2-install-mozilla-cacert: cacert-$(MOZILLA_CACERT_VERSION).pem
mkdir -p $(build_datarootdir)/julia
cp $< $(build_datarootdir)/julia/cert.pem

$(build_datarootdir)/julia/cert.pem: libgit2-install-mozilla-cacert

$(BUILDDIR)/$(LIBGIT2_SRC_DIR)/build-configured: \
$(LIBGIT2_SRC_PATH)/libgit2-mbedtls.patch-applied \
$(LIBGIT2_SRC_PATH)/libgit2-mbedtls2.patch-applied \
$(LIBGIT2_SRC_PATH)/libgit2-agent-nonfatal.patch-applied \

$(BUILDDIR)/$(LIBGIT2_SRC_DIR)/build-configured: $(LIBGIT2_SRC_PATH)/source-extracted $(build_datarootdir)/julia/cert.pem
$(BUILDDIR)/$(LIBGIT2_SRC_DIR)/build-configured: $(LIBGIT2_SRC_PATH)/source-extracted
mkdir -p $(dir $@)
cd $(dir $@) && \
$(CMAKE) $(dir $<) $(LIBGIT2_OPTS)
@@ -103,12 +93,27 @@ $(eval $(call staged-install, \
$$(INSTALL_NAME_CMD)libgit2.$$(SHLIB_EXT) $$(build_shlibdir)/libgit2.$$(SHLIB_EXT)))

clean-libgit2:
-rm $(build_datarootdir)/julia/cert.pem
-rm $(BUILDDIR)/$(LIBGIT2_SRC_DIR)/build-configured $(BUILDDIR)/$(LIBGIT2_SRC_DIR)/build-compiled
-$(MAKE) -C $(BUILDDIR)/$(LIBGIT2_SRC_DIR) clean

get-libgit2: $(LIBGIT2_SRC_FILE) $(build_datarootdir)/julia/cert.pem
get-libgit2: $(LIBGIT2_SRC_FILE)
extract-libgit2: $(SRCCACHE)/$(LIBGIT2_SRC_DIR)/source-extracted
configure-libgit2: $(BUILDDIR)/$(LIBGIT2_SRC_DIR)/build-configured
compile-libgit2: $(BUILDDIR)/$(LIBGIT2_SRC_DIR)/build-compiled
fastcheck-libgit2: #none
check-libgit2: $(BUILDDIR)/$(LIBGIT2_SRC_DIR)/build-checked


# Also download and install a cacert.pem file:
$(SRCCACHE)/cacert-$(MOZILLA_CACERT_VERSION).pem:
$(JLDOWNLOAD) $@ https://curl.haxx.se/ca/cacert-$(MOZILLA_CACERT_VERSION).pem

$(build_datarootdir)/julia/cert.pem: $(SRCCACHE)/cacert-$(MOZILLA_CACERT_VERSION).pem | $(build_datarootdir)
$(JLCHECKSUM) $<
mkdir -p $(build_datarootdir)/julia
cp $< $@

$(build_prefix)/manifest/libgit2: $(build_datarootdir)/julia/cert.pem # use libgit2 install status
libgit2-install-mozilla-cacert: $(build_datarootdir)/julia/cert.pem
get-libgit2: $(SRCCACHE)/cacert-$(MOZILLA_CACERT_VERSION).pem
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, stashing this in $(SRCCACHE) is an improvement, thanks.

2 changes: 1 addition & 1 deletion deps/pcre.mk
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ $(BUILDDIR)/pcre2-$(PCRE_VER)/build-compiled: $(BUILDDIR)/pcre2-$(PCRE_VER)/buil
$(MAKE) -C $(dir $<) $(LIBTOOL_CCLD)
echo 1 > $@

$(BUILDDIR)/pcre2-$(PCRE_VER)/checked: $(BUILDDIR)/pcre2-$(PCRE_VER)/build-compiled
$(BUILDDIR)/pcre2-$(PCRE_VER)/build-checked: $(BUILDDIR)/pcre2-$(PCRE_VER)/build-compiled
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change intentional? It seems unrelated.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is. It was as missed update in 406af98, but I guess nobody really missed it.

ifeq ($(OS),$(BUILD_OS))
ifneq ($(OS),WINNT)
$(MAKE) -C $(dir $@) check -j1