Skip to content

Commit

Permalink
alpine: fix build on current 'edge' version of Alpine
Browse files Browse the repository at this point in the history
The python2 packet py-sphinx was removed from the edge repository, so we
use pip to install it localy for the package build process.

Also abuild assumes it is executed in a git folder and fails if no .git
is found in the folder or its parent folders, so we work around this, by
initializing an empty git repo with `git init`.

Signed-off-by: Juergen Werner <juergen@opensourcerouting.org>
  • Loading branch information
pogojotz committed Dec 3, 2019
1 parent e25ca45 commit c3a61f3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion alpine/APKBUILD.in
Expand Up @@ -17,7 +17,7 @@ makedepends="ncurses-dev net-snmp-dev gawk texinfo perl
linux-headers lzip lzo m4 make mkinitfs mpc1 mpfr4 mtools musl-dev
ncurses-libs ncurses-terminfo ncurses-terminfo-base patch pax-utils pcre
perl pkgconf python2 python2-dev readline readline-dev sqlite-libs
squashfs-tools sudo tar texinfo xorriso xz-libs py-pip py-sphinx rtrlib
squashfs-tools sudo tar texinfo xorriso xz-libs py-pip rtrlib
rtrlib-dev"
checkdepends="pytest py-setuptools"
install="$pkgname.pre-install $pkgname.pre-deinstall $pkgname.post-deinstall"
Expand All @@ -34,6 +34,12 @@ _user=frr

build() {
cd "$builddir"

_localpythondir=$PWD/.python
pip2 install --prefix $_localpythondir sphinx
export PATH=${_localpythondir}/bin:$PATH
export PYTHONPATH=${_localpythondir}/lib/python2.7/site-packages

./configure \
--prefix=/usr \
--sbindir=$_sbindir \
Expand Down
1 change: 1 addition & 0 deletions docker/alpine/Dockerfile
Expand Up @@ -42,6 +42,7 @@ USER builder
RUN cd /dist \
&& abuild-keygen -a -n \
&& abuild checksum \
&& git init \
&& abuild -r -P /pkgs/apk

# This stage installs frr from the apk
Expand Down

0 comments on commit c3a61f3

Please sign in to comment.