From 0586e9485641921025f3bbac6cd584d88f96f0bb Mon Sep 17 00:00:00 2001 From: Olof hagsand Date: Tue, 29 Oct 2024 09:53:20 +0100 Subject: [PATCH] Post-release test and docs --- CHANGELOG.md | 6 ++++- doc/DEVELOP.md | 10 --------- docker/example/Dockerfile | 41 +++++++++++++++++++++++++---------- docker/example/startsystem.sh | 6 ++--- test/fuzz/backend/README.md | 10 ++------- test/fuzz/backend/input/1.xml | 5 ++++- test/fuzz/backend/input/2.xml | 5 ++++- 7 files changed, 47 insertions(+), 36 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2264fa33..ae3f3961 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Clixon Changelog +* [7.3.0](#730) Expected: January 2025 * [7.2.0](#720) 28 October 2024 * [7.1.0](#710) 3 July 2024 * [7.0.1](#701) 3 April 2024 @@ -11,10 +12,13 @@ * [6.1.0](#610) 19 Feb 2023 * [6.0.0](#600) 29 Nov 2022 +## 7.3.0 +Expected: January 2025 + ## 7.2.0 28 October 2024 -The 7.2.0 release lots of minor changes and bugfixes including memory optimizations and package builds. +The 7.2.0 release features several minor changes and bug-fixes including memory optimizations and package builds. ### Features diff --git a/doc/DEVELOP.md b/doc/DEVELOP.md index 21cf21e7..571779cc 100644 --- a/doc/DEVELOP.md +++ b/doc/DEVELOP.md @@ -171,11 +171,6 @@ What to think about when doing a new release. * Draft a new release and review generated release notes and use info to update CHANGELOG * Review README.md * New yang/clicon/clixon-config@XXX.yang revision? -* In configure.ac, for minor releases change CLIXON_VERSION in configure.ac to eg: (minor should have been bumped) (OBSOLETE): -``` - CLIXON_VERSION="\"${CLIXON_VERSION_MAJOR}.${CLIXON_VERSION_MINOR}.${CLIXON_VERSION_PATCH}\"" -``` -* For patch releases change CLIXON_VERSION_PATCH * Run autoconf * Git stuff: ``` @@ -186,11 +181,6 @@ What to think about when doing a new release. * Add a github release and copy release info from CHANGELOG After release: -* Bump minor version. -``` - CLIXON_VERSION_MINOR="10" ++ - CLIXON_VERSION="\"${CLIXON_VERSION_MAJOR}.${CLIXON_VERSION_MINOR}.${CLIXON_VERSION_PATCH}\"" -``` * Run autoconf Create release branch: diff --git a/docker/example/Dockerfile b/docker/example/Dockerfile index 8b11239c..d93a0acf 100644 --- a/docker/example/Dockerfile +++ b/docker/example/Dockerfile @@ -32,7 +32,7 @@ # ***** END LICENSE BLOCK ***** # -FROM alpine +FROM alpine:latest LABEL maintainer="Olof Hagsand " # For clixon and cligen @@ -41,9 +41,14 @@ RUN apk add --update git make build-base gcc flex bison curl-dev # nghttp2 dependencies RUN apk add --update nghttp2 +# For netsnmp +RUN apk add --update net-snmp net-snmp-dev + +# For groupadd/groupdel +RUN apk add --update shadow + # Create a directory to hold source-code, dependencies etc RUN mkdir -p /clixon/build - WORKDIR /clixon # Clone cligen @@ -51,7 +56,7 @@ RUN git clone https://github.com/clicon/cligen.git # Build cligen WORKDIR /clixon/cligen -RUN ./configure --prefix=/usr/local +RUN ./configure --prefix=/usr/local --sysconfdir=/etc RUN make RUN make DESTDIR=/clixon/build install @@ -64,16 +69,18 @@ WORKDIR /clixon/clixon COPY clixon . # Configure, build and install clixon -RUN ./configure --prefix=/usr/local --with-cligen=/clixon/build/usr/local --with-restconf=native --enable-nghttp2 --enable-http1 +RUN ./configure --prefix=/usr/local --sysconfdir=/etc --with-cligen=/clixon/build/usr/local --with-restconf=native --enable-nghttp2 --enable-http1 --enable-netsnmp RUN make RUN make DESTDIR=/clixon/build install RUN make DESTDIR=/clixon/build install-include -# Install main example +# Build and install the clixon example WORKDIR /clixon/clixon/example/main RUN make RUN make DESTDIR=/clixon/build install +RUN mkdir -p /clixon/build/etc +RUN install example.xml /clixon/build/etc/clixon.xml # Copy startscript WORKDIR /clixon @@ -83,17 +90,29 @@ RUN install startsystem.sh /clixon/build/usr/local/bin/ # # Stage 2 # The second step skips the development environment and builds a runtime system -FROM alpine +FROM alpine:latest MAINTAINER Olof Hagsand # For clixon and cligen -RUN apk add --update flex bison +RUN apk add --update flex bison openssl # need to add www user manually RUN adduser -D -H -G www-data www-data -# openssl and nghttp2 dependencies -RUN apk add --update openssl nghttp2 +# nghttp2 dependencies +RUN apk add --update nghttp2 + +# For SNMP +RUN apk add --update net-snmp net-snmp-tools + +# Some custom configuration for SNMP +RUN echo "master agentx" > /etc/snmp/snmpd.conf +RUN echo "agentaddress 127.0.0.1" >> /etc/snmp/snmpd.conf +RUN echo "rwcommunity public localhost" >> /etc/snmp/snmpd.conf +RUN echo "agentxsocket unix:/var/run/snmp.sock" >> /etc/snmp/snmpd.conf +RUN echo "agentxperms 777 777" >> /etc/snmp/snmpd.conf +RUN echo "trap2sink localhost public 162" >> /etc/snmp/snmpd.conf +RUN echo "disableAuthorization yes" >> /etc/snmp/snmptrapd.conf # Expose https port for restconf EXPOSE 80/tcp @@ -111,9 +130,9 @@ RUN adduser -D -H clicon COPY --from=0 /clixon/build/ / # Overwrite config file since install dirs are wrong -COPY example.xml /usr/local/etc/example.xml +COPY example.xml /usr/local/etc/clixon/example.xml # Create symlink so you can run clixon without -f arg -RUN ln -s /usr/local/etc/example.xml /usr/local/etc/clixon.xml +RUN ln -s /usr/local/etc/clixon/example.xml /usr/local/etc/clixon.xml # Start daemons CMD /usr/local/bin/startsystem.sh diff --git a/docker/example/startsystem.sh b/docker/example/startsystem.sh index 37faf79b..b92d37cc 100755 --- a/docker/example/startsystem.sh +++ b/docker/example/startsystem.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # ***** BEGIN LICENSE BLOCK ***** # # Copyright (C) 2017-2019 Olof Hagsand @@ -54,10 +54,8 @@ touch /run/openrc/softlevel #/usr/local/bin/clixon_restconf -l f/var/log/restconf.log -D $DBG & #>&2 echo "clixon_restconf started" -#ln -s /usr/local/etc/example.xml clixon.xml - # Start clixon backend -/usr/local/sbin/clixon_backend -D $DBG -s running -l e -f /usr/local/etc/example.xml +/usr/local/sbin/clixon_backend -D $DBG -s running -l e -f /usr/local/etc/clixon/example.xml >&2 echo "clixon_backend started" # Alt: let backend be in foreground, but test scripts may diff --git a/test/fuzz/backend/README.md b/test/fuzz/backend/README.md index 4c6bfc94..68eb470d 100644 --- a/test/fuzz/backend/README.md +++ b/test/fuzz/backend/README.md @@ -1,6 +1,6 @@ # Clixon fuzzing -This dir contains code for fuzzing clixon backend. (NOTE DOES NOT WORK) +This dir contains code for fuzzing clixon backend. It requires the preeny package to change sockets to stdio. @@ -12,15 +12,9 @@ Install AFL and preeny, see [..](..) ## Build -Make a modification to how Clixon sends internal messages in `include/clixon_custom.h`: -``` - #define CLIXON_PROTO_PLAIN -``` -(Note this is obsolete) - Build clixon statically with the afl-clang compiler: ``` - CC=/usr/bin/afl-clang-fast LINKAGE=static ./configure --with-restconf=native + CC=/usr/bin/afl-clang-fast LINKAGE=static ./configure make clean make sudo make install diff --git a/test/fuzz/backend/input/1.xml b/test/fuzz/backend/input/1.xml index 670fbe8e..1d7a5725 100644 --- a/test/fuzz/backend/input/1.xml +++ b/test/fuzz/backend/input/1.xml @@ -1 +1,4 @@ -mergetest-then-setstop-on-erroreth/0/0x
]]>]]> + +#391 +mergetest-then-setstop-on-erroreth/0/0x
+## diff --git a/test/fuzz/backend/input/2.xml b/test/fuzz/backend/input/2.xml index 91636d32..90c0fbd9 100644 --- a/test/fuzz/backend/input/2.xml +++ b/test/fuzz/backend/input/2.xml @@ -1 +1,4 @@ -urn:ietf:params:netconf:base:1.0]]>]]> + +#181 +urn:ietf:params:netconf:base:1.0 +##