Migrate to libyang2

Also update buildroot to latest master:
- the sdbus-cpp version bump patch has been removed, because upstream
  now bumped it to an even newer version

- Fix RAUC not able to start a service
(https://github.com/buildroot/buildroot/commit/72308ab9a32de6e8b4b23e42f115ed5ee87e5f33)

Depends-on: https://cesnet-gerrit-czechlight/c/CzechLight/netconf-cli/+/4539
Depends-on: https://gerrit.cesnet.cz/c/CzechLight/netconf-cli/+/4539
Depends-on: https://cesnet-gerrit-czechlight/c/CzechLight/rousette/+/5391
Depends-on: https://gerrit.cesnet.cz/c/CzechLight/rousette/+/5391
Depends-on: https://gerrit.cesnet.cz/c/CzechLight/cla-sysrepo/+/5292
Depends-on: https://cesnet-gerrit-czechlight/c/CzechLight/velia/+/5237
Depends-on: https://gerrit.cesnet.cz/c/CzechLight/velia/+/5237
Change-Id: I6edc19f35accfd41a4b32f7b396981d470e0c07b
diff --git a/package/cla-sysrepo/Config.in b/package/cla-sysrepo/Config.in
index c1c7723..e9804e6 100644
--- a/package/cla-sysrepo/Config.in
+++ b/package/cla-sysrepo/Config.in
@@ -1,6 +1,5 @@
 config BR2_PACKAGE_CLA_SYSREPO
 	bool "cla-sysrepo"
-	select BR2_PACKAGE_SYSREPO
 	select BR2_PACKAGE_SYSREPO_CPP
 	select BR2_PACKAGE_LIBYANG_CPP
 	select BR2_PACKAGE_DOCOPT_CPP
diff --git a/package/cla-sysrepo/cla-sysrepo.mk b/package/cla-sysrepo/cla-sysrepo.mk
index a19367c..a54755c 100644
--- a/package/cla-sysrepo/cla-sysrepo.mk
+++ b/package/cla-sysrepo/cla-sysrepo.mk
@@ -2,7 +2,7 @@
 CLA_SYSREPO_SITE = ssh://kundrat@cesnet.cz@gerrit.cesnet.cz:29418/CzechLight/cla-sysrepo
 CLA_SYSREPO_SITE_METHOD = git
 CLA_SYSREPO_INSTALL_STAGING = NO
-CLA_SYSREPO_DEPENDENCIES = sysrepo docopt-cpp spdlog systemd libgpiod boost cppcodec libev
+CLA_SYSREPO_DEPENDENCIES = sysrepo-cpp docopt-cpp spdlog systemd libgpiod boost cppcodec libev
 CLA_SYSREPO_CONF_OPTS = -DTHREADS_PTHREAD_ARG:STRING=-pthread
 CLA_SYSREPO_LICENSE_FILES = LICENSE.md
 
diff --git a/package/cla-sysrepo/czechlight-install-yang.sh b/package/cla-sysrepo/czechlight-install-yang.sh
index ccd0e3d..008d337 100755
--- a/package/cla-sysrepo/czechlight-install-yang.sh
+++ b/package/cla-sysrepo/czechlight-install-yang.sh
@@ -48,63 +48,64 @@
 
 sysrepoctl --search-dirs ${CLA_YANG} --install ${CLA_YANG}/iana-hardware@2018-03-13.yang
 sysrepoctl --search-dirs ${CLA_YANG} --install ${CLA_YANG}/ietf-hardware@2018-03-13.yang
-sysrepoctl --change ietf-hardware --permissions 0664 --enable-feature hardware-sensor --apply
+sysrepoctl --change ietf-hardware --permissions 0664 --enable-feature hardware-sensor
 
 if [[ ${YANG_ROADM} == 1 ]]; then
-    sysrepoctl --search-dirs ${CLA_YANG} --install ${CLA_YANG}/czechlight-roadm-device@2021-03-05.yang
-    sysrepoctl --change czechlight-roadm-device --group optics --permissions 0664 --apply
+    FEATURE_ARGS=""
     if [[ ${WITH_FEATURE} ]]; then
         for FEATURE in ${WITH_FEATURE}; do
-            sysrepoctl --change czechlight-roadm-device --enable-feature ${FEATURE}
+            FEATURE_ARGS="${FEATURE_ARGS} --enable-feature ${FEATURE}"
         done
     fi
+    sysrepoctl --search-dirs ${CLA_YANG} --install ${CLA_YANG}/czechlight-roadm-device@2021-03-05.yang ${FEATURE_ARGS}
+    sysrepoctl --change czechlight-roadm-device --group optics --permissions 0664
     sysrepocfg --datastore=startup --format=json --module=czechlight-roadm-device --import="${CLA_YANG}/${INITIAL_DATA}.json"
 fi
 
 if [[ ${YANG_COHERENT} == 1 ]]; then
     sysrepoctl --search-dirs ${CLA_YANG} --install ${CLA_YANG}/czechlight-coherent-add-drop@2021-03-05.yang
     sysrepocfg --datastore=startup --format=json --module=czechlight-coherent-add-drop --new-data="${CLA_YANG}/${INITIAL_DATA}.json"
-    sysrepoctl --change czechlight-coherent-add-drop --group optics --permissions 0664 --apply
+    sysrepoctl --change czechlight-coherent-add-drop --group optics --permissions 0664
 fi
 
 if [[ ${YANG_INLINE} == 1 ]]; then
     sysrepoctl --search-dirs ${CLA_YANG} --install ${CLA_YANG}/czechlight-inline-amp@2021-03-05.yang
     sysrepocfg --datastore=startup --format=json --module=czechlight-inline-amp --import="${CLA_YANG}/${INITIAL_DATA}.json"
-    sysrepoctl --change czechlight-inline-amp --group optics --permissions 0664 --apply
+    sysrepoctl --change czechlight-inline-amp --group optics --permissions 0664
 fi
 
 if [[ ${YANG_CALIBRATION} == 1 ]]; then
     sysrepoctl --search-dirs ${CLA_YANG} --install ${CLA_YANG}/czechlight-calibration-device@2019-06-25.yang
     sysrepocfg --datastore=startup --format=json --module=czechlight-calibration-device --import="${CLA_YANG}/${INITIAL_DATA}.json"
-    sysrepoctl --change czechlight-calibration-device --group optics --permissions 0664 --apply
+    sysrepoctl --change czechlight-calibration-device --group optics --permissions 0664
 fi
 
 sysrepoctl --search-dirs ${VELIA_YANG} --install ${VELIA_YANG}/ietf-system@2014-08-06.yang
-sysrepoctl --change ietf-system --permissions 0664 --apply
+sysrepoctl --change ietf-system --permissions 0664
 
 sysrepoctl --search-dirs ${VELIA_YANG} --install ${VELIA_YANG}/czechlight-lldp@2020-11-04.yang
-sysrepoctl --change czechlight-lldp --permissions 0664 --apply
+sysrepoctl --change czechlight-lldp --permissions 0664
 
 sysrepoctl --search-dirs ${VELIA_YANG} --install ${VELIA_YANG}/czechlight-system@2021-01-13.yang
-sysrepoctl --change czechlight-system --permissions 0664 --apply
+sysrepoctl --change czechlight-system --permissions 0664
 
 sysrepoctl --search-dirs ${VELIA_YANG} --install ${VELIA_YANG}/czechlight-firewall@2021-01-25.yang
-sysrepoctl --change czechlight-firewall --permissions 0600 --apply
-sysrepoctl --change ietf-access-control-list --enable-feature eth --enable-feature match-on-eth --enable-feature match-on-ipv4 --enable-feature ipv4 --enable-feature match-on-ipv6 --enable-feature ipv6 --enable-feature mixed-eth-ipv4-ipv6
+sysrepoctl --change czechlight-firewall --permissions 0600
+sysrepoctl --change ietf-access-control-list --enable-feature match-on-eth --enable-feature eth --enable-feature match-on-ipv4 --enable-feature ipv4 --enable-feature match-on-ipv6 --enable-feature ipv6 --enable-feature mixed-eth-ipv4-ipv6
 
 sysrepoctl --search-dirs ${VELIA_YANG} --install ${VELIA_YANG}/iana-if-type@2017-01-19.yang
 sysrepoctl --search-dirs ${VELIA_YANG} --install ${VELIA_YANG}/ietf-interfaces@2018-02-20.yang
-sysrepoctl --change ietf-interfaces --permissions 0664 --apply
+sysrepoctl --change ietf-interfaces --permissions 0664
 sysrepoctl --search-dirs ${VELIA_YANG} --install ${VELIA_YANG}/ietf-ip@2018-02-22.yang
-sysrepoctl --change ietf-ip --permissions 0664 --apply
+sysrepoctl --change ietf-ip --permissions 0664
 sysrepoctl --search-dirs ${VELIA_YANG} --install ${VELIA_YANG}/ietf-routing@2018-03-13.yang
-sysrepoctl --change ietf-routing --permissions 0664 --apply
+sysrepoctl --change ietf-routing --permissions 0664
 sysrepoctl --search-dirs ${VELIA_YANG} --install ${VELIA_YANG}/ietf-ipv4-unicast-routing@2018-03-13.yang
-sysrepoctl --change ietf-ipv4-unicast-routing --permissions 0664 --apply
+sysrepoctl --change ietf-ipv4-unicast-routing --permissions 0664
 sysrepoctl --search-dirs ${VELIA_YANG} --install ${VELIA_YANG}/ietf-ipv6-unicast-routing@2018-03-13.yang
-sysrepoctl --change ietf-ipv6-unicast-routing --permissions 0664 --apply
+sysrepoctl --change ietf-ipv6-unicast-routing --permissions 0664
 sysrepoctl --search-dirs ${VELIA_YANG} --install ${VELIA_YANG}/czechlight-network@2021-02-22.yang
-sysrepoctl --change czechlight-network --permissions 0664 --apply
+sysrepoctl --change czechlight-network --permissions 0664
 
 # If not do not copy here from startup -> running, running might be stale.
 sysrepocfg -C startup