mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 07:56:29 +00:00
docker: Use libyang 2.1.80 for Alpine builds
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
parent
27083f7885
commit
8456322835
@ -18,7 +18,7 @@ makedepends="ncurses-dev net-snmp-dev gawk texinfo perl
|
|||||||
ncurses-libs ncurses-terminfo ncurses-terminfo-base patch pax-utils pcre2
|
ncurses-libs ncurses-terminfo ncurses-terminfo-base patch pax-utils pcre2
|
||||||
perl pkgconf python3 python3-dev readline readline-dev sqlite-libs pcre2-dev
|
perl pkgconf python3 python3-dev readline readline-dev sqlite-libs pcre2-dev
|
||||||
squashfs-tools sudo tar texinfo xorriso xz-libs py-pip rtrlib rtrlib-dev
|
squashfs-tools sudo tar texinfo xorriso xz-libs py-pip rtrlib rtrlib-dev
|
||||||
py3-sphinx elfutils elfutils-dev libyang-dev protobuf-c-compiler protobuf-c-dev
|
py3-sphinx elfutils elfutils-dev protobuf-c-compiler protobuf-c-dev
|
||||||
lua5.3-dev lua5.3 gzip"
|
lua5.3-dev lua5.3 gzip"
|
||||||
checkdepends="pytest py-setuptools"
|
checkdepends="pytest py-setuptools"
|
||||||
install="$pkgname.pre-install $pkgname.pre-deinstall $pkgname.post-deinstall"
|
install="$pkgname.pre-install $pkgname.pre-deinstall $pkgname.post-deinstall"
|
||||||
|
@ -12,18 +12,29 @@ RUN apk add \
|
|||||||
&& echo 'builder ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
&& echo 'builder ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||||
RUN adduser -D -G abuild builder && su builder -c 'abuild-keygen -a -n'
|
RUN adduser -D -G abuild builder && su builder -c 'abuild-keygen -a -n'
|
||||||
|
|
||||||
|
# This stage builds an APK for libyang
|
||||||
|
FROM alpine-builder as alpine-apk-builder-libyang
|
||||||
|
RUN mkdir -p /src/libyang
|
||||||
|
COPY docker/alpine/libyang/APKBUILD /src/libyang
|
||||||
|
RUN chown -R builder /pkgs /src
|
||||||
|
USER builder
|
||||||
|
RUN cd /src/libyang \
|
||||||
|
&& abuild checksum \
|
||||||
|
&& git init \
|
||||||
|
&& abuild -r -P /pkgs/apk
|
||||||
|
|
||||||
# This stage builds a dist tarball from the source
|
# This stage builds a dist tarball from the source
|
||||||
FROM alpine:3.18 as source-builder
|
FROM alpine:3.18 as source-builder
|
||||||
|
RUN mkdir -p /src/alpine /pkgs/apk
|
||||||
RUN mkdir -p /src/alpine
|
|
||||||
COPY alpine/APKBUILD.in /src/alpine
|
COPY alpine/APKBUILD.in /src/alpine
|
||||||
|
COPY --from=alpine-apk-builder-libyang /pkgs/apk/src /pkgs/apk
|
||||||
|
RUN cd /pkgs/apk/x86_64 && apk add --allow-untrusted *.apk
|
||||||
RUN source /src/alpine/APKBUILD.in \
|
RUN source /src/alpine/APKBUILD.in \
|
||||||
&& apk add \
|
&& apk add \
|
||||||
--no-cache \
|
--no-cache \
|
||||||
--update-cache \
|
--update-cache \
|
||||||
$makedepends \
|
$makedepends \
|
||||||
&& pip install pytest
|
&& pip install pytest
|
||||||
RUN mkdir -p /pkgs/apk
|
|
||||||
COPY . /src
|
COPY . /src
|
||||||
ARG PKGVER
|
ARG PKGVER
|
||||||
RUN cd /src \
|
RUN cd /src \
|
||||||
@ -36,6 +47,8 @@ RUN cd /src \
|
|||||||
# This stage builds an APK from the dist tarball
|
# This stage builds an APK from the dist tarball
|
||||||
FROM alpine-builder as alpine-apk-builder
|
FROM alpine-builder as alpine-apk-builder
|
||||||
COPY --from=source-builder /src/frr-*.tar.gz /src/alpine/* /dist/
|
COPY --from=source-builder /src/frr-*.tar.gz /src/alpine/* /dist/
|
||||||
|
COPY --from=alpine-apk-builder-libyang /pkgs/apk/src /pkgs/apk
|
||||||
|
RUN cd /pkgs/apk/x86_64 && apk add --allow-untrusted *.apk
|
||||||
RUN find /pkgs/apk -type f -name APKINDEX.tar.gz -delete
|
RUN find /pkgs/apk -type f -name APKINDEX.tar.gz -delete
|
||||||
RUN chown -R builder /dist /pkgs
|
RUN chown -R builder /dist /pkgs
|
||||||
USER builder
|
USER builder
|
||||||
|
Loading…
Reference in New Issue
Block a user