From 3a68aa3b9830bb9dfbf079807c9ee18a7aaa85f1 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Thu, 13 Jun 2019 15:09:23 +0100 Subject: Metastore now has rpath Until now we hadn't noticed that Metastore's build doesn't include an `rpath'. As a result I got a crash during a Git commit. With this commit, on GNU/Linux systems, we now add rpath to the installed Metastore executable. During the build, I also cleaned up the Metastore build recipe to be more clear and readable (in particular we only check the user name and group name when metastore is actually built). --- reproduce/software/make/basic.mk | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'reproduce/software/make') diff --git a/reproduce/software/make/basic.mk b/reproduce/software/make/basic.mk index 468563b..4620e6e 100644 --- a/reproduce/software/make/basic.mk +++ b/reproduce/software/make/basic.mk @@ -914,21 +914,27 @@ $(ibidir)/metastore: $(tdir)/metastore-$(metastore-version).tar.gz \ # Note that the metastore -O and -G options used in this template # are currently only available in a fork of `metastore' hosted at: # https://github.com/mohammad-akhlaghi/metastore + # + # We want to inform the user if Metastore isn't built, so we don't + # continue the call to `gbuild' with an `&&'. current_dir=$$(pwd); \ $(call gbuild, $<, metastore-$(metastore-version), static,, \ NO_XATTR=1 V=1,,pwd,PREFIX=$(idir)); \ - user=$$(whoami); \ - group=$$(groups | awk '{print $$1}'); \ - cd $$current_dir; \ if [ -f $(ibdir)/metastore ]; then \ + if [ "x$(needpatchelf)" != x ]; then \ + $(ibdir)/patchelf --set-rpath $(ildir) $(ibdir)/metastore; \ + fi; \ + user=$$(whoami); \ + group=$$(groups | awk '{print $$1}'); \ + cd $$current_dir; \ for f in pre-commit post-checkout; do \ - sed -e's|@USER[@]|'$$user'|g' \ - -e's|@GROUP[@]|'$$group'|g' \ - -e's|@BINDIR[@]|$(ibdir)|g' \ - -e's|@TOP_PROJECT_DIR[@]|'$$current_dir'|g' \ - reproduce/software/bash/git-$$f > .git/hooks/$$f \ - && chmod +x .git/hooks/$$f \ - && echo "Metastore (forked) $(metastore-version)" > $@; \ + sed -e's|@USER[@]|'$$user'|g' \ + -e's|@GROUP[@]|'$$group'|g' \ + -e's|@BINDIR[@]|$(ibdir)|g' \ + -e's|@TOP_PROJECT_DIR[@]|'$$current_dir'|g' \ + reproduce/software/bash/git-$$f > .git/hooks/$$f \ + && chmod +x .git/hooks/$$f \ + && echo "Metastore (forked) $(metastore-version)" > $@; \ done; \ else \ echo; echo; echo; \ -- cgit v1.2.1