From 0f82040e36cac5066e0d91572e14dc4dfa9cc7af Mon Sep 17 00:00:00 2001 From: Alex Stancu Date: Wed, 13 Nov 2019 18:07:45 +0200 Subject: [PATCH] Remove external dependencies. Add them into Dockerfile. Signed-off-by: Alex Stancu Change-Id: I5bfcacaafddc1b11113bf79227bf7fc4c849c9bf --- .gitmodules | 18 ------------------ external/Netopeer2 | 1 - external/cJSON | 1 - external/libnetconf2 | 1 - external/libyang | 1 - external/pyang | 1 - external/sysrepo | 1 - ntsimulator/deploy/Dockerfile | 17 +++++++++-------- ntsimulator/deploy/manager/Dockerfile | 11 ++++++----- 9 files changed, 15 insertions(+), 37 deletions(-) delete mode 100644 .gitmodules delete mode 160000 external/Netopeer2 delete mode 160000 external/cJSON delete mode 160000 external/libnetconf2 delete mode 160000 external/libyang delete mode 160000 external/pyang delete mode 160000 external/sysrepo diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index ab5ecfa..0000000 --- a/.gitmodules +++ /dev/null @@ -1,18 +0,0 @@ -[submodule "cJSON"] - path = external/cJSON - url = https://github.com/Melacon/cJSON.git -[submodule "libnetconf2"] - path = external/libnetconf2 - url = https://github.com/Melacon/libnetconf2.git -[submodule "libyang"] - path = external/libyang - url = https://github.com/Melacon/libyang.git -[submodule "Netopeer2"] - path = external/Netopeer2 - url = https://github.com/Melacon/Netopeer2.git -[submodule "pyang"] - path = external/pyang - url = https://github.com/Melacon/pyang.git -[submodule "sysrepo"] - path = external/sysrepo - url = https://github.com/Melacon/sysrepo.git diff --git a/external/Netopeer2 b/external/Netopeer2 deleted file mode 160000 index 7807801..0000000 --- a/external/Netopeer2 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 78078018e37f44c618b729b6763f9c9c291f27ca diff --git a/external/cJSON b/external/cJSON deleted file mode 160000 index a766613..0000000 --- a/external/cJSON +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a7666138a80552204c223dcb17cc2584edea5f87 diff --git a/external/libnetconf2 b/external/libnetconf2 deleted file mode 160000 index 795858f..0000000 --- a/external/libnetconf2 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 795858fb1c9db6c82e9b8317a88d61803c74ac2d diff --git a/external/libyang b/external/libyang deleted file mode 160000 index 2c69ec1..0000000 --- a/external/libyang +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2c69ec1cb0989eb87eea8c74e4d22b883a9e6839 diff --git a/external/pyang b/external/pyang deleted file mode 160000 index f227116..0000000 --- a/external/pyang +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f2271165b11b0aa71d1d32b9e439836a2bf718df diff --git a/external/sysrepo b/external/sysrepo deleted file mode 160000 index 6ae556a..0000000 --- a/external/sysrepo +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6ae556a91d8c3fd1935b44dbfeae9211ecd21308 diff --git a/ntsimulator/deploy/Dockerfile b/ntsimulator/deploy/Dockerfile index b5457b5..f1234f2 100644 --- a/ntsimulator/deploy/Dockerfile +++ b/ntsimulator/deploy/Dockerfile @@ -58,8 +58,8 @@ RUN mkdir /opt/dev WORKDIR /opt/dev # libcjson -COPY ./cJSON /opt/dev/cJSON RUN \ + git clone https://github.com/Melacon/cJSON.git && \ cd cJSON && mkdir build && cd build && \ cmake .. -DENABLE_CJSON_UTILS=On -DENABLE_CJSON_TEST=Off -DCMAKE_INSTALL_PREFIX=/usr .. && \ make -j2 && \ @@ -67,8 +67,8 @@ RUN \ ldconfig # libyang -COPY ./libyang /opt/dev/libyang RUN \ + git clone https://github.com/Melacon/libyang.git && \ cd libyang && mkdir build && cd build && \ cmake -DCMAKE_BUILD_TYPE:String="Release" -DENABLE_BUILD_TESTS=OFF .. && \ make -j2 && \ @@ -76,8 +76,8 @@ RUN \ ldconfig # sysrepo -COPY ./sysrepo /opt/dev/sysrepo RUN \ + git clone https://github.com/Melacon/sysrepo.git && \ sed -i 's/#define MAX_BLOCKS_AVAIL_FOR_ALLOC 3/#define MAX_BLOCKS_AVAIL_FOR_ALLOC 6/g' ./sysrepo/src/common/sr_mem_mgmt.h && \ cd sysrepo && mkdir build && cd build && \ cmake -DCMAKE_BUILD_TYPE:String="Release" -DENABLE_TESTS=OFF -DREPOSITORY_LOC:PATH=/etc/sysrepo -DREQUEST_TIMEOUT=60 -DOPER_DATA_PROVIDE_TIMEOUT=60 .. && \ @@ -86,8 +86,8 @@ RUN \ ldconfig # libnetconf2 -COPY ./libnetconf2 /opt/dev/libnetconf2 RUN \ + git clone https://github.com/Melacon/libnetconf2.git && \ cd libnetconf2 && mkdir build && cd build && \ cmake -DCMAKE_BUILD_TYPE:String="Release" -DENABLE_BUILD_TESTS=OFF .. && \ make -j2 && \ @@ -95,9 +95,9 @@ RUN \ ldconfig # keystore -COPY ./Netopeer2 /opt/dev/Netopeer2 RUN \ - cd /opt/dev && \ + cd /opt/dev && \ + git clone https://github.com/Melacon/Netopeer2.git && \ cd Netopeer2 && \ cd keystored && mkdir build && cd build && \ cmake -DCMAKE_BUILD_TYPE:String="Release" .. && \ @@ -120,10 +120,11 @@ RUN \ make install RUN pip install rstr && pip install exrex && pip install ipaddress - -COPY ./pyang /opt/dev/pyang + +# pyang RUN \ cd /opt/dev && \ + git clone https://github.com/Melacon/pyang.git && \ cd pyang && python setup.py build && python setup.py install #NTSimulator Manager - notifications diff --git a/ntsimulator/deploy/manager/Dockerfile b/ntsimulator/deploy/manager/Dockerfile index 2ceef5f..528c9de 100644 --- a/ntsimulator/deploy/manager/Dockerfile +++ b/ntsimulator/deploy/manager/Dockerfile @@ -62,8 +62,8 @@ RUN mkdir /opt/dev WORKDIR /opt/dev # libcjson -COPY ./cJSON /opt/dev/cJSON RUN \ + git clone https://github.com/Melacon/cJSON.git && \ cd cJSON && mkdir build && cd build && \ cmake .. -DENABLE_CJSON_UTILS=On -DENABLE_CJSON_TEST=Off -DCMAKE_INSTALL_PREFIX=/usr .. && \ make -j2 && \ @@ -71,8 +71,8 @@ RUN \ ldconfig # libyang -COPY ./libyang /opt/dev/libyang RUN \ + git clone https://github.com/Melacon/libyang.git && \ cd libyang && mkdir build && cd build && \ cmake -DCMAKE_BUILD_TYPE:String="Release" -DENABLE_BUILD_TESTS=OFF .. && \ make -j2 && \ @@ -80,8 +80,8 @@ RUN \ ldconfig # sysrepo -COPY ./sysrepo /opt/dev/sysrepo RUN \ + git clone https://github.com/Melacon/sysrepo.git && \ sed -i 's/#define MAX_BLOCKS_AVAIL_FOR_ALLOC 3/#define MAX_BLOCKS_AVAIL_FOR_ALLOC 6/g' ./sysrepo/src/common/sr_mem_mgmt.h && \ cd sysrepo && mkdir build && cd build && \ cmake -DCMAKE_BUILD_TYPE:String="Release" -DENABLE_TESTS=OFF -DREPOSITORY_LOC:PATH=/etc/sysrepo -DREQUEST_TIMEOUT=60 -DOPER_DATA_PROVIDE_TIMEOUT=60 .. && \ @@ -90,8 +90,8 @@ RUN \ ldconfig # libnetconf2 -COPY ./libnetconf2 /opt/dev/libnetconf2 RUN \ + git clone https://github.com/Melacon/libnetconf2.git && \ cd libnetconf2 && mkdir build && cd build && \ cmake -DCMAKE_BUILD_TYPE:String="Release" -DENABLE_BUILD_TESTS=OFF .. && \ make -j2 && \ @@ -99,8 +99,9 @@ RUN \ ldconfig # keystore -COPY ./Netopeer2 /opt/dev/Netopeer2 RUN \ + cd /opt/dev && \ + git clone https://github.com/Melacon/Netopeer2.git && \ cd /opt/dev && \ cd Netopeer2 && \ cd keystored && mkdir build && cd build && \ -- 2.16.6