From 0f9d429d9b52c731662ff134ab4f9517d7de0e8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Walstr=C3=B6m?= Date: Fri, 20 Sep 2024 15:49:07 +0200 Subject: [PATCH] confd: bump and add a migrate script for infix-routing --- package/confd/confd.mk | 2 +- src/confd/configure.ac | 3 ++- src/confd/share/migrate/1.1/10-infix-routing-type.sh | 7 +++++++ src/confd/share/migrate/1.1/Makefile.am | 2 ++ src/confd/share/migrate/Makefile.am | 2 +- 5 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 src/confd/share/migrate/1.1/10-infix-routing-type.sh create mode 100644 src/confd/share/migrate/1.1/Makefile.am diff --git a/package/confd/confd.mk b/package/confd/confd.mk index c5cecf482..80b24e9fa 100644 --- a/package/confd/confd.mk +++ b/package/confd/confd.mk @@ -4,7 +4,7 @@ # ################################################################################ -CONFD_VERSION = 1.0 +CONFD_VERSION = 1.1 CONFD_SITE_METHOD = local CONFD_SITE = $(BR2_EXTERNAL_INFIX_PATH)/src/confd CONFD_LICENSE = BSD-3-Clause diff --git a/src/confd/configure.ac b/src/confd/configure.ac index 51c56c384..9f8ea9832 100644 --- a/src/confd/configure.ac +++ b/src/confd/configure.ac @@ -1,6 +1,6 @@ AC_PREREQ(2.61) # confd version is same as system YANG model version, step on breaking changes -AC_INIT([confd], [1.0], [https://github.com/kernelkit/infix/issues]) +AC_INIT([confd], [1.1], [https://github.com/kernelkit/infix/issues]) AM_INIT_AUTOMAKE(1.11 foreign subdir-objects) AM_SILENT_RULES(yes) @@ -14,6 +14,7 @@ AC_CONFIG_FILES([ share/test.d/Makefile share/migrate/Makefile share/migrate/1.0/Makefile + share/migrate/1.1/Makefile src/Makefile yang/Makefile ]) diff --git a/src/confd/share/migrate/1.1/10-infix-routing-type.sh b/src/confd/share/migrate/1.1/10-infix-routing-type.sh new file mode 100644 index 000000000..dfcd62c47 --- /dev/null +++ b/src/confd/share/migrate/1.1/10-infix-routing-type.sh @@ -0,0 +1,7 @@ +#!/bin/sh +# migrate ietf-routing-type => infix-routing-type +file=$1 +temp=$1.tmp + +jq '(.["ietf-routing:routing"]."control-plane-protocols"."control-plane-protocol"[] | select(.type == "ietf-ospf:ospfv2").type) |= "infix-routing:ospfv2"' "$file" > "$temp" +jq '(.["ietf-routing:routing"]."control-plane-protocols"."control-plane-protocol"[] | select(.type == "static").type) |= "infix-routing:static"' "$temp" > "$file" diff --git a/src/confd/share/migrate/1.1/Makefile.am b/src/confd/share/migrate/1.1/Makefile.am new file mode 100644 index 000000000..6b6175296 --- /dev/null +++ b/src/confd/share/migrate/1.1/Makefile.am @@ -0,0 +1,2 @@ +migratedir = $(pkgdatadir)/migrate/1.1 +dist_migrate_DATA = 10-infix-routing-type.sh diff --git a/src/confd/share/migrate/Makefile.am b/src/confd/share/migrate/Makefile.am index d92bf0daf..62da76223 100644 --- a/src/confd/share/migrate/Makefile.am +++ b/src/confd/share/migrate/Makefile.am @@ -1,2 +1,2 @@ -SUBDIRS = 1.0 +SUBDIRS = 1.0 1.1 migratedir = $(pkgdatadir)/migrate