Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Allow eosiocpp to run without make install #5206

Merged
merged 1 commit into from
Aug 14, 2018

Conversation

jgiszczak
Copy link
Contributor

Add include paths and library locations to allow eosiocpp to run in-place. Works on contract paths outside of eos hierarchy. Still works when installed.

Add include paths and library locations to allow eosiocpp to run in-
place.  Now works on contract paths outside of eos hierarchy.  Still
works when installed.
@@ -5,7 +5,27 @@ if [ "${EOSIO_BIN_INSTALL_DIR}" == "." ]; then
EOSIO_BIN_INSTALL_DIR=`pwd`
fi
EOSIO_INSTALL_DIR=`dirname ${EOSIO_BIN_INSTALL_DIR}`
ABIGEN=${EOSIO_INSTALL_DIR}/bin/eosio-abigen
if [ -x "@CMAKE_BINARY_DIR@/programs/eosio-abigen/eosio-abigen" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

I worry about packaging and installing a script that has the full CMAKE_BINARY_DIR in the resulting file. Won't that leak some information that could be considered sensitive about the system that built the binary package (like user name of the builder etc).

Can we do something where it discovers all of these paths relative to the directory where the script resides so that we don't have to hard code the absolute path? I realize this makes eosiocpp fragile when you copy/move it around but, that seems like a better trade?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It could leak information depending on how it's built. It does not have to be sensitive information, especially on dedicated build boxes. At present, we're not distributing any package format except Docker, which I don't think carries ownership or a home directory path within it. Finally, this is a stopgap until the wasmsdk repo is ready for prime time.

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, docker should do a decent job of sanitizing paths... I'm checking right now and will release my objection if it looks benign.

@wanderingbort wanderingbort added this to the Version 1.2 milestone Aug 14, 2018
@jgiszczak jgiszczak merged commit 5f86fea into develop Aug 14, 2018
@jgiszczak jgiszczak deleted the eosiocpp-run-without-install branch August 14, 2018 18:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants