c6accc67f2
Important fix: Lock state dir for preventing automatic clean-up by systemd-tmpfiles (https://github.com/rootless-containers/rootlesskit/pull/188) Full changes:https://github.com/rootless-containers/rootlesskit/compare/v0.10.0...v0.11.0 Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
36 lines
943 B
Bash
Executable file
36 lines
943 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# v0.11.0
|
|
: ${ROOTLESSKIT_COMMIT:=2886253e467c5444a4d2ac7084e53aa3cc50055d}
|
|
|
|
install_rootlesskit() {
|
|
case "$1" in
|
|
"dynamic")
|
|
install_rootlesskit_dynamic
|
|
return
|
|
;;
|
|
"")
|
|
export CGO_ENABLED=0
|
|
_install_rootlesskit
|
|
;;
|
|
*)
|
|
echo 'Usage: $0 [dynamic]'
|
|
;;
|
|
esac
|
|
}
|
|
|
|
install_rootlesskit_dynamic() {
|
|
export ROOTLESSKIT_LDFLAGS="-linkmode=external" install_rootlesskit
|
|
export BUILD_MODE=${GO_BUILDMODE}
|
|
_install_rootlesskit
|
|
}
|
|
|
|
_install_rootlesskit() {
|
|
echo "Install rootlesskit version $ROOTLESSKIT_COMMIT"
|
|
git clone https://github.com/rootless-containers/rootlesskit.git "$GOPATH/src/github.com/rootless-containers/rootlesskit"
|
|
cd "$GOPATH/src/github.com/rootless-containers/rootlesskit"
|
|
git checkout -q "$ROOTLESSKIT_COMMIT"
|
|
for f in rootlesskit rootlesskit-docker-proxy; do
|
|
go build $BUILD_MODE -ldflags="$ROOTLESSKIT_LDFLAGS" -o "${PREFIX}/$f" github.com/rootless-containers/rootlesskit/cmd/$f
|
|
done
|
|
}
|