]> git.puffer.fish Git - matthieu/frr.git/commitdiff
Revert "build: libyangv2 is mainlined, update"
authorIgor Ryzhov <iryzhov@nfware.com>
Thu, 27 May 2021 12:56:06 +0000 (15:56 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Thu, 27 May 2021 12:56:06 +0000 (15:56 +0300)
This partially reverts commit 250335d47cc338fa1951494a9b78bf429016a7e5.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
docker/ubuntu18-ci/Dockerfile
docker/ubuntu20-ci/Dockerfile

index cf75c3015dd9305682f444655f7c15bebf3d3ee3..86fbe4f49ca3b7097b1b50ce723c399c94d2041a 100644 (file)
@@ -5,19 +5,13 @@ ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn
 # Update Ubuntu Software repository
 RUN apt update && \
     apt-get install -y \
-      git autoconf automake curl libtool make libreadline-dev texinfo \
+      git autoconf automake libtool make libreadline-dev texinfo \
       pkg-config libpam0g-dev libjson-c-dev bison flex python3-pytest \
       libc-ares-dev python3-dev libsystemd-dev python-ipaddress python3-sphinx \
       install-info build-essential libsystemd-dev libsnmp-dev perl libcap-dev \
       libelf-dev \
       sudo gdb iputils-ping time \
-      mininet python-pip iproute2 iperf libpcre2-dev \
-      libpcre3-dev \
-      && \
-    curl -fLO https://ci1.netdef.org/artifact/LIBYANG-LIBYANGV2/shared/build-2/Ubuntu-18.04-x86_64-Packages/libyang2_2.0.0.10.g2eb910e4-1_amd64.deb && \
-    curl -fLO https://ci1.netdef.org/artifact/LIBYANG-LIBYANGV2/shared/build-2/Ubuntu-18.04-x86_64-Packages/libyang2-dev_2.0.0.10.g2eb910e4-1_amd64.deb && \
-    dpkg -i libyang2_2.0.0.10.g2eb910e4-1_amd64.deb libyang2-dev_2.0.0.10.g2eb910e4-1_amd64.deb && \
-    rm -f libyang2_2.0.0.10.g2eb910e4-1_amd64.deb libyang2-dev_2.0.0.10.g2eb910e4-1_amd64.deb && \
+      mininet python-pip iproute2 iperf && \
       pip install ipaddr && \
       pip install "pytest<5" && \
       pip install "scapy>=2.4.2" && \
@@ -32,8 +26,22 @@ RUN groupadd -r -g 92 frr && \
       echo 'frr ALL = NOPASSWD: ALL' | tee /etc/sudoers.d/frr && \
       mkdir -p /home/frr && chown frr.frr /home/frr
 
+#for libyang 2
+RUN apt-get install -y cmake libpcre2-dev
+
 USER frr:frr
 
+# build and install libyang1
+RUN cd && pwd && ls -al && \
+    git clone https://github.com/CESNET/libyang.git -b libyang2 && \
+    cd libyang && \
+    git checkout v2.0.0 && \
+    mkdir build; cd build && \
+    cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr \
+          -DCMAKE_BUILD_TYPE:String="Release" .. && \
+    make -j $(nproc) && \
+    sudo make install
+
 COPY --chown=frr:frr . /home/frr/frr/
 
 RUN cd && ls -al && ls -al frr
index 8a4a156a51519c201f8d24c1042ce9dc4ab840f6..ead5c56c54986719d516a79b6bdf7d8feae9c961 100644 (file)
@@ -5,19 +5,13 @@ ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn
 # Update Ubuntu Software repository
 RUN apt update && \
     apt-get install -y \
-      git autoconf automake curl libtool make libreadline-dev texinfo \
+      git autoconf automake libtool make libreadline-dev texinfo \
       pkg-config libpam0g-dev libjson-c-dev bison flex python3-pytest \
       libc-ares-dev python3-dev libsystemd-dev python-ipaddress python3-sphinx \
       install-info build-essential libsystemd-dev libsnmp-dev perl \
       libcap-dev python2 libelf-dev \
       sudo gdb curl iputils-ping time \
-      mininet iproute2 iperf libpcre2-dev \
-      libpcre3-dev \
-      && \
-    curl -fLO https://ci1.netdef.org/artifact/LIBYANG-LIBYANGV2/shared/build-2/Ubuntu-20.04-x86_64-Packages/libyang2_2.0.0.10.g2eb910e4-1_amd64.deb && \
-    curl -fLO https://ci1.netdef.org/artifact/LIBYANG-LIBYANGV2/shared/build-2/Ubuntu-20.04-x86_64-Packages/libyang2-dev_2.0.0.10.g2eb910e4-1_amd64.deb && \
-    dpkg -i libyang2_2.0.0.10.g2eb910e4-1_amd64.deb libyang2-dev_2.0.0.10.g2eb910e4-1_amd64.deb && \
-    rm -f libyang2_2.0.0.10.g2eb910e4-1_amd64.deb libyang2-dev_2.0.0.10.g2eb910e4-1_amd64.deb && \
+      mininet iproute2 iperf && \
       curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output /tmp/get-pip.py && \
       python2 /tmp/get-pip.py && \
       rm -f  /tmp/get-pip.py && \
@@ -35,8 +29,22 @@ RUN groupadd -r -g 92 frr && \
       echo 'frr ALL = NOPASSWD: ALL' | tee /etc/sudoers.d/frr && \
       mkdir -p /home/frr && chown frr.frr /home/frr
 
+#for libyang 2
+RUN apt-get install -y cmake libpcre2-dev
+
 USER frr:frr
 
+# build and install libyang1
+RUN cd && pwd && ls -al && \
+    git clone https://github.com/CESNET/libyang.git -b libyang2 && \
+    cd libyang && \
+    git checkout v2.0.0 && \
+    mkdir build; cd build && \
+    cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr \
+          -DCMAKE_BUILD_TYPE:String="Release" .. && \
+    make -j $(nproc) && \
+    sudo make install
+
 COPY --chown=frr:frr . /home/frr/frr/
 
 RUN cd && ls -al && ls -al frr