From 66671d0a0d05054f28fb61bb19bd0e68aee522e6 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Mon, 6 Sep 2021 15:17:18 +0200 Subject: [PATCH] fix install --- scripts/_common.sh | 2 +- scripts/install | 13 +++++-------- scripts/upgrade | 11 +++++------ 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index b689f59..829c271 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # dependencies used by the app -pkg_dependencies="acl autoconf dnsmasq-base git libacl1-dev libcap-dev liblxc1 lxc-dev libsqlite3-dev libtool libudev-dev libuv1-dev make pkg-config rsync squashfs-tools tar tcl xz-utils ebtables libapparmor-dev libseccomp-dev libcap-dev liblz4-dev lvm2 thin-provisioning-tools btrfs-progs" +pkg_dependencies="acl attr autoconf dnsmasq-base git libacl1-dev libcap-dev liblxc1 lxc-dev libsqlite3-dev libtool libudev-dev liblz4-dev libuv1-dev make pkg-config rsync squashfs-tools tar tcl xz-utils ebtables libapparmor-dev libseccomp-dev libcap-dev lvm2 thin-provisioning-tools btrfs-progs" #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index 3849b5d..3f5bb61 100755 --- a/scripts/install +++ b/scripts/install @@ -56,7 +56,7 @@ export PATH=$go_tmp/bin:$PATH lxd_tmp=$(mktemp -d) ynh_setup_source --dest_dir="$lxd_tmp" --source_id="lxd" -export GOPATH=${lxd_tmp}/_dist +export GOPATH=${lxd_tmp}/vendor/ #================================================= # BUILD FROM SOURCES @@ -66,19 +66,16 @@ ynh_script_progression --message="Building lxd from sources..." --weight=60 pushd ${lxd_tmp} ynh_exec_warn_less make deps -export CGO_CFLAGS="-I${GOPATH}/deps/raft/include/ -I${GOPATH}/deps/dqlite/include/" -export CGO_LDFLAGS="-L${GOPATH}/deps/raft/.libs -L${GOPATH}/deps/dqlite/.libs/" -export LD_LIBRARY_PATH="${GOPATH}/deps/raft/.libs/:${GOPATH}/deps/dqlite/.libs/" +export CGO_CFLAGS="-I${GOPATH}/raft/include/ -I${GOPATH}/dqlite/include/" +export CGO_LDFLAGS="-L${GOPATH}/raft/.libs -L${GOPATH}/dqlite/.libs/" +export LD_LIBRARY_PATH="${GOPATH}/raft/.libs/:${GOPATH}/dqlite/.libs/" export CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)" -cd $GOPATH/src/github.com/lxc/lxd - -export GOCACHE=$go_tmp ynh_exec_warn_less make mkdir -p /usr/local/lib/$app mkdir -p /var/log/$app -cp -a ${GOPATH}/deps/{raft,dqlite}/.libs/lib*.so* /usr/local/lib/$app/ +cp -a ${GOPATH}/{raft,dqlite}/.libs/lib*.so* /usr/local/lib/$app/ cp ${GOPATH}/bin/{lxc,lxd,lxc-to-lxd,lxd-p2c} /usr/local/bin cp ${lxd_tmp}/scripts/bash/lxd-client /etc/bash_completion.d/ popd diff --git a/scripts/upgrade b/scripts/upgrade index 8c38571..f3b13de 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -71,7 +71,7 @@ export PATH=$go_tmp/bin:$PATH lxd_tmp=$(mktemp -d) ynh_setup_source --dest_dir="$lxd_tmp" --source_id="lxd" -export GOPATH=${lxd_tmp}/_dist +export GOPATH=${lxd_tmp}/vendor/ #================================================= # BUILD FROM SOURCES @@ -81,11 +81,10 @@ ynh_script_progression --message="Building lxd from sources..." --weight=60 pushd ${lxd_tmp} ynh_exec_warn_less make deps -export CGO_CFLAGS="-I${GOPATH}/deps/raft/include/ -I${GOPATH}/deps/dqlite/include/" -export CGO_LDFLAGS="-L${GOPATH}/deps/raft/.libs -L${GOPATH}/deps/dqlite/.libs/" -export LD_LIBRARY_PATH="${GOPATH}/deps/raft/.libs/:${GOPATH}/deps/dqlite/.libs/" +export CGO_CFLAGS="-I${GOPATH}/raft/include/ -I${GOPATH}/dqlite/include/" +export CGO_LDFLAGS="-L${GOPATH}/raft/.libs -L${GOPATH}/dqlite/.libs/" +export LD_LIBRARY_PATH="${GOPATH}/raft/.libs/:${GOPATH}/dqlite/.libs/" export CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)" -cd $GOPATH/src/github.com/lxc/lxd export GOCACHE=$go_tmp @@ -93,7 +92,7 @@ ynh_exec_warn_less make mkdir -p /usr/local/lib/$app mkdir -p /var/log/$app -cp -a ${GOPATH}/deps/{raft,dqlite}/.libs/lib*.so* /usr/local/lib/$app/ +cp -a ${GOPATH}/{raft,dqlite}/.libs/lib*.so* /usr/local/lib/$app/ cp ${GOPATH}/bin/{lxc,lxd,lxc-to-lxd,lxd-p2c} /usr/local/bin cp ${lxd_tmp}/scripts/bash/lxd-client /etc/bash_completion.d/ popd