From 80f422f593a788341048b417f475705c55c2a49d Mon Sep 17 00:00:00 2001 From: Michael Rodler Date: Wed, 5 Apr 2017 12:38:37 +0200 Subject: [PATCH] Install keystone/unicorn from pypi instead of from source fixes #122 --- keystone/install | 28 +++------------------------- keystone/install-root-archlinux | 4 ---- keystone/install-root-debian | 4 ---- keystone/uninstall | 9 +++------ unicorn/install | 18 ++---------------- unicorn/install-root-debian | 1 - unicorn/uninstall | 9 ++------- 7 files changed, 10 insertions(+), 63 deletions(-) delete mode 100755 keystone/install-root-archlinux delete mode 100755 keystone/install-root-debian diff --git a/keystone/install b/keystone/install index 1fe44fd..8d73cc0 100755 --- a/keystone/install +++ b/keystone/install @@ -1,27 +1,5 @@ #!/bin/bash -ex -set -e -o pipefail -git clone --depth 1 https://github.com/keystone-engine/keystone.git - -source ctf-tools-venv-activate - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -mkdir -p keystone/build/ -pushd keystone/build/ -cmake -DCMAKE_INSTALL_PREFIX="$DIR" \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=ON \ - -DLLVM_TARGETS_TO_BUILD="all" \ - -G "Unix Makefiles" .. -make -j$(getconf _NPROCESSORS_ONLN) install -popd - -pushd keystone/bindings/python -pip install -U -e . -# create a symlink that the python bindings can find the keystone lib -ln -s $(readlink -f ../../../lib/libkeystone.so.0) keystone/libkeystone.so -popd - -# kstool doesn't find the lib. so let's rm it -rm -r bin/ +ctf-tools-pip install -U keystone +# seems to be broken? +#ctf-tools-pip3 install -U keystone diff --git a/keystone/install-root-archlinux b/keystone/install-root-archlinux deleted file mode 100755 index 5462317..0000000 --- a/keystone/install-root-archlinux +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -ex -set -eu -o pipefail - -pacman -Syu --needed --noconfirm cmake diff --git a/keystone/install-root-debian b/keystone/install-root-debian deleted file mode 100755 index 7cbfac4..0000000 --- a/keystone/install-root-debian +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -ex -set -eu -o pipefail - -apt-get -y install build-essential cmake diff --git a/keystone/uninstall b/keystone/uninstall index 0ac2eae..f1c724e 100755 --- a/keystone/uninstall +++ b/keystone/uninstall @@ -4,10 +4,7 @@ set -e -o pipefail source ctf-tools-venv-activate pip uninstall -y keystone-engine || true +#!/bin/bash -ex -if [[ -d keystone && -d keystone/build ]]; then - export PREFIX="$PWD" - pushd keystone/build - make uninstall - popd -fi +ctf-tools-pip uninstall -y keystone || true +ctf-tools-pip3 uninstall -y keystone || true diff --git a/unicorn/install b/unicorn/install index a819200..f3291f1 100755 --- a/unicorn/install +++ b/unicorn/install @@ -1,18 +1,4 @@ #!/bin/bash -ex -set -e -o pipefail -git clone --depth 1 https://github.com/unicorn-engine/unicorn.git - -source ctf-tools-venv-activate - -pushd unicorn -echo "compiling unicorn" -UNICORN_QEMU_FLAGS="--python=$(which python)" PREFIX="$VIRTUAL_ENV" ./make.sh -echo "installing unicorn to $VIRTUAL_ENV" -UNICORN_QEMU_FLAGS="--python=$(which python)" PREFIX="$VIRTUAL_ENV" ./make.sh install - -pushd bindings/python -#pip install -U . -make DEST_DIR="$VIRTUAL_ENV" install -popd -popd +ctf-tools-pip install -U unicorn +ctf-tools-pip3 install -U unicorn diff --git a/unicorn/install-root-debian b/unicorn/install-root-debian index 90a5a90..dac4551 100755 --- a/unicorn/install-root-debian +++ b/unicorn/install-root-debian @@ -1,4 +1,3 @@ #!/bin/bash -ex -set -eu -o pipefail apt-get -y install libglib2.0-dev diff --git a/unicorn/uninstall b/unicorn/uninstall index aa4571a..a5c8c56 100755 --- a/unicorn/uninstall +++ b/unicorn/uninstall @@ -1,9 +1,4 @@ #!/bin/bash -ex -ctf-tools-venv-activate - -pip uninstall -y unicorn - -pushd unicorn -PREFIX="$VIRTUAL_ENV" ./make.sh uninstall -popd +ctf-tools-pip uninstall -y unicorn || true +ctf-tools-pip3 uninstall -y unicorn || true