Skip to content

Commit d5bb3d7

Browse files
author
Alex Palesandro
committed
Fixing Libyang library version
1 parent ad513ef commit d5bb3d7

File tree

1 file changed

+12
-17
lines changed

1 file changed

+12
-17
lines changed

scripts/pre-requirements.sh

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,7 @@ $SUDO bash -c "apt install --allow-unauthenticated -y wget gnupg2 software-prope
1111
# golang v1.12 still not available in repos
1212
$SUDO add-apt-repository ppa:longsleep/golang-backports -y || true
1313

14-
# repo for libyang-dev
15-
16-
# Cannot add the repository to our machine, as the GPG key expired on Aug 2019 and Ubuntu refuses to install the software in there
17-
#$SUDO sh -c "echo 'deb http://download.opensuse.org/repositories/home:/liberouter/xUbuntu_18.04/ /' > /etc/apt/sources.list.d/home:liberouter.list"
18-
#wget -nv https://download.opensuse.org/repositories/home:liberouter/xUbuntu_18.04/Release.key -O Release.key
19-
#$SUDO apt-key add - < Release.key
20-
# So, installing the required package by downloading it manually
21-
apt remove -y libyang libyang-dev
22-
wget -nv http://download.opensuse.org/repositories/home:/liberouter/xUbuntu_18.04/amd64/libyang_1.0.101_amd64.deb -O libyang.deb
23-
wget -nv http://download.opensuse.org/repositories/home:/liberouter/xUbuntu_18.04/amd64/libyang-dev_1.0.101_amd64.deb -O libyang-dev.deb
24-
$SUDO apt install -f ./libyang.deb
25-
$SUDO apt install -y -f ./libyang-dev.deb
26-
rm ./libyang.deb
27-
rm ./libyang-dev.deb
28-
2914
$SUDO apt update
30-
31-
3215
PACKAGES=""
3316
PACKAGES+=" git" # needed to clone dependencies
3417
PACKAGES+=" build-essential cmake" # provides compiler and other compilation tools
@@ -52,6 +35,18 @@ if [ "$MODE" == "pcn-k8s" ]; then
5235
PACKAGES+=" iproute2" # provides bridge command that is used to add entries in vxlan device
5336
fi
5437

38+
# licd $WORKDIR
39+
set +e
40+
if [ ! -d libyang ]; then
41+
git clone https://github.com/CESNET/libyang.git
42+
fi
43+
cd libyang
44+
git checkout v0.14-r1
45+
mkdir -p build && cd build
46+
cmake ..
47+
make -j $(getconf _NPROCESSORS_ONLN)
48+
$SUDO make install
49+
5550
# use non interactive to avoid blocking the install script
5651
$SUDO bash -c "DEBIAN_FRONTEND=noninteractive apt-get install -yq $PACKAGES"
5752

0 commit comments

Comments
 (0)