Storage: clean up leveldb artifacts
This commit is contained in:
parent
8b73e812ac
commit
bea2344c3c
@ -91,7 +91,7 @@ Reset 2017-11-20
|
||||
|
||||
- P2p: fix issue with data greater than 2^16 bytes
|
||||
|
||||
- Irmin: use an experimental LevelDB backend
|
||||
- Irmin: use an experimental LMDB backend
|
||||
|
||||
[Build]
|
||||
|
||||
@ -252,4 +252,3 @@ Main changes includes:
|
||||
- This is not directly visible in the alphanet, but our CI
|
||||
infrastructure is now ready for open development.
|
||||
More about that soon (or later).
|
||||
|
||||
|
@ -164,7 +164,7 @@ protocols.
|
||||
used for the chain data, and the raw versioned key-value store
|
||||
used for storing the ledger's context (one version per
|
||||
block). This is implemented using :opam:`irmin` and currently
|
||||
:opam:`leveldb`.
|
||||
:opam:`lmdb`.
|
||||
- :package:`tezos-protocol-updater` maintains the table of available
|
||||
protocol versions, embedded or dynamically linked.
|
||||
- :package:`tezos-shell` implements the scheduling of block
|
||||
|
@ -1,54 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
ci_dir="$(cd "$(dirname "$0")" && echo "$(pwd -P)/")"
|
||||
script_dir="$(dirname "$ci_dir")"
|
||||
src_dir="$(dirname "$script_dir")"
|
||||
cd "$src_dir"
|
||||
|
||||
. "$script_dir"/version.sh
|
||||
|
||||
build_dir=${build_dir:-_docker_build}
|
||||
|
||||
if [ -f "$build_dir"/leveldb-$leveldb_version-r0.apk ] && \
|
||||
[ -f "$build_dir"/leveldb-dev-$leveldb_version-r0.apk ] && \
|
||||
[ -d "$build_dir"/keys/ ] ; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
tmp_image="leveldb.apk-builder"
|
||||
tmp_dir=$(mktemp -dt tezos.leveldb.XXXXXXXX)
|
||||
cleanup () {
|
||||
set +e
|
||||
rm -rf "$tmp_dir"
|
||||
if ! [ -z "$container" ]; then docker rm $container; fi
|
||||
# docker rmi $tmp_image || true
|
||||
}
|
||||
trap cleanup EXIT INT
|
||||
|
||||
cp -a "$script_dir"/ci/leveldb-$leveldb_version.APKBUILD "$tmp_dir"/APKBUILD
|
||||
|
||||
cat <<EOF > "$tmp_dir/Dockerfile"
|
||||
FROM andyshinn/alpine-abuild:v4
|
||||
ENV PACKAGER "Tezos <ci@tezos.com>"
|
||||
WORKDIR /home/builder/
|
||||
RUN abuild-keygen -a -i
|
||||
COPY APKBUILD .
|
||||
RUN abuilder -r
|
||||
EOF
|
||||
|
||||
echo
|
||||
echo "### Building leveldb..."
|
||||
echo
|
||||
|
||||
docker build -t $tmp_image "$tmp_dir"
|
||||
|
||||
mkdir -p "$build_dir"
|
||||
|
||||
container=$(docker create $tmp_image)
|
||||
docker cp -L $container:/etc/apk/keys "$build_dir"
|
||||
docker cp -L $container:/packages/home/x86_64/leveldb-$leveldb_version-r0.apk \
|
||||
"$build_dir"
|
||||
docker cp -L $container:/packages/home/x86_64/leveldb-dev-$leveldb_version-r0.apk \
|
||||
"$build_dir"
|
@ -55,7 +55,7 @@ COPY keys /etc/apk/keys/
|
||||
COPY hidapi-$hidapi_version-r0.apk .
|
||||
|
||||
RUN apk --no-cache add \
|
||||
libev gmp vim leveldb-$leveldb_version-r0.apk hidapi-$hidapi_version-r0.apk && \
|
||||
libev gmp vim hidapi-$hidapi_version-r0.apk && \
|
||||
rm hidapi-$hidapi_version-r0.apk
|
||||
|
||||
COPY bin/* /usr/local/bin/
|
||||
|
@ -1,35 +0,0 @@
|
||||
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
|
||||
# Maintainer:
|
||||
pkgname=leveldb
|
||||
pkgver=1.18
|
||||
pkgrel=0
|
||||
pkgdesc="A fast and lightweight key/value database library by Google"
|
||||
url="https://github.com/google/leveldb"
|
||||
arch="all"
|
||||
license="BSD"
|
||||
depends=""
|
||||
depends_dev=""
|
||||
makedepends="$depends_dev snappy-dev"
|
||||
install=""
|
||||
subpackages="$pkgname-dev $pkgname-doc"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/google/$pkgname/archive/v$pkgver.tar.gz"
|
||||
|
||||
_builddir="$srcdir"/leveldb-$pkgver
|
||||
|
||||
build() {
|
||||
cd "$_builddir"
|
||||
make || return 1
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$_builddir"
|
||||
mkdir -p "$pkgdir"/usr/lib "$pkgdir"/usr/share/doc
|
||||
cp -a lib*.so* "$pkgdir"/usr/lib || return 1
|
||||
cp -a include "$pkgdir"/usr/ || return 1
|
||||
cp -a doc "$pkgdir"/usr/share/doc/$pkgname || return 1
|
||||
|
||||
}
|
||||
|
||||
md5sums="73770de34a2a5ab34498d2e05b2b7fa0 leveldb-1.18.tar.gz"
|
||||
sha256sums="4aa1a7479bc567b95a59ac6fb79eba49f61884d6fd400f20b7af147d54c5cee5 leveldb-1.18.tar.gz"
|
||||
sha512sums="3d9c55a7bf8692914784ec33c273704ce9978496b071c7b661708f049d0d4ccd51a44441f50c3e536725caeb9896575192f52708a4bb1c0222cecdeec89919a3 leveldb-1.18.tar.gz"
|
Loading…
Reference in New Issue
Block a user