CI: Import Alpine package backport for leveldb-1.18
This commit is contained in:
parent
42734ee4a2
commit
d00b9ca1e1
@ -3,15 +3,14 @@
|
|||||||
FROM alpine:$alpine_version
|
FROM alpine:$alpine_version
|
||||||
|
|
||||||
RUN apk update && apk upgrade && \
|
RUN apk update && apk upgrade && \
|
||||||
apk add alpine-sdk openssh bash nano ncurses-dev rsync xz m4 \
|
apk add build-base snappy-dev abuild \
|
||||||
|
alpine-sdk openssh bash nano ncurses-dev rsync xz m4 \
|
||||||
opam aspcud \
|
opam aspcud \
|
||||||
gmp-dev libev-dev libressl-dev linux-headers pcre-dev perl zlib-dev \
|
gmp-dev libev-dev libressl-dev linux-headers pcre-dev perl zlib-dev \
|
||||||
libsodium-dev snappy-dev && \
|
libsodium-dev snappy-dev && \
|
||||||
apk add leveldb-dev \
|
|
||||||
--update-cache \
|
|
||||||
--repository http://nl.alpinelinux.org/alpine/edge/testing && \
|
|
||||||
rm -f /var/cache/apk/* && \
|
rm -f /var/cache/apk/* && \
|
||||||
adduser -S opam && \
|
adduser -S opam && \
|
||||||
|
adduser opam abuild && \
|
||||||
echo 'opam ALL=(ALL:ALL) NOPASSWD:ALL' > /etc/sudoers.d/opam && \
|
echo 'opam ALL=(ALL:ALL) NOPASSWD:ALL' > /etc/sudoers.d/opam && \
|
||||||
chmod 440 /etc/sudoers.d/opam && \
|
chmod 440 /etc/sudoers.d/opam && \
|
||||||
chown root:root /etc/sudoers.d/opam && \
|
chown root:root /etc/sudoers.d/opam && \
|
||||||
@ -21,6 +20,13 @@ USER opam
|
|||||||
|
|
||||||
WORKDIR /home/opam
|
WORKDIR /home/opam
|
||||||
|
|
||||||
|
COPY scripts/leveldb-1.18.APKBUILD /home/opam/leveldb-1.18/APKBUILD
|
||||||
|
RUN sudo chown -R opam leveldb-1.18
|
||||||
|
|
||||||
|
RUN abuild-keygen -a && \
|
||||||
|
cd leveldb-1.18 && \
|
||||||
|
abuild checksum && abuild -r
|
||||||
|
|
||||||
RUN mkdir .ssh && \
|
RUN mkdir .ssh && \
|
||||||
chmod 700 .ssh && \
|
chmod 700 .ssh && \
|
||||||
git config --global user.email "docker@example.com" && \
|
git config --global user.email "docker@example.com" && \
|
||||||
|
@ -3,22 +3,35 @@ FROM alpine:$alpine_version
|
|||||||
LABEL distro_style="apk" distro="alpine" distro_long="alpine-$alpine_version" arch="x86_64" operatingsystem="linux"
|
LABEL distro_style="apk" distro="alpine" distro_long="alpine-$alpine_version" arch="x86_64" operatingsystem="linux"
|
||||||
|
|
||||||
RUN adduser -S tezos && \
|
RUN adduser -S tezos && \
|
||||||
|
adduser tezos abuild && \
|
||||||
apk update && \
|
apk update && \
|
||||||
apk upgrade && \
|
apk upgrade && \
|
||||||
apk add sudo bash libssl1.0 libsodium libev gmp git snappy && \
|
apk add sudo bash libssl1.0 libsodium libev gmp git snappy && \
|
||||||
apk add leveldb \
|
|
||||||
--update-cache \
|
|
||||||
--repository http://nl.alpinelinux.org/alpine/edge/testing && \
|
|
||||||
rm -f /var/cache/apk/* && \
|
rm -f /var/cache/apk/* && \
|
||||||
echo 'tezos ALL=(ALL:ALL) NOPASSWD:ALL' > /etc/sudoers.d/tezos && \
|
echo 'tezos ALL=(ALL:ALL) NOPASSWD:ALL' > /etc/sudoers.d/tezos && \
|
||||||
chmod 440 /etc/sudoers.d/tezos && \
|
chmod 440 /etc/sudoers.d/tezos && \
|
||||||
chown root:root /etc/sudoers.d/tezos && \
|
chown root:root /etc/sudoers.d/tezos && \
|
||||||
sed -i 's/^Defaults.*requiretty//g' /etc/sudoers
|
sed -i 's/^Defaults.*requiretty//g' /etc/sudoers
|
||||||
|
|
||||||
USER tezos
|
USER tezos
|
||||||
|
|
||||||
COPY . /home/tezos
|
COPY . /home/tezos
|
||||||
|
|
||||||
WORKDIR /home/tezos
|
WORKDIR /home/tezos
|
||||||
|
|
||||||
|
RUN sudo apk update && \
|
||||||
|
sudo apk add abuild build-base snappy-dev && \
|
||||||
|
abuild-keygen -ai && \
|
||||||
|
mkdir leveldb-1.18 && \
|
||||||
|
cp scripts/leveldb-1.18.APKBUILD leveldb-1.18/APKBUILD && \
|
||||||
|
cd leveldb-1.18 && \
|
||||||
|
abuild checksum && abuild -r && \
|
||||||
|
cd .. && \
|
||||||
|
sudo apk del build-base snappy-dev abuild && \
|
||||||
|
sudo apk add packages/tezos/x86_64/leveldb-1.18-r0.apk && \
|
||||||
|
rm -rf leveldb-1.18 packages && \
|
||||||
|
sudo rm -f /var/cache/apk/*
|
||||||
|
|
||||||
RUN sudo chown root:root bin/* && \
|
RUN sudo chown root:root bin/* && \
|
||||||
sudo chmod a+rx bin/* && \
|
sudo chmod a+rx bin/* && \
|
||||||
sudo mv bin/* /usr/local/bin && \
|
sudo mv bin/* /usr/local/bin && \
|
||||||
|
35
scripts/leveldb-1.18.APKBUILD
Normal file
35
scripts/leveldb-1.18.APKBUILD
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
# 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