diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fc0ac2..c61973c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ Notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.0.1] - 2023-12-27 + +### Changed + +- Update Makefile to help me remember the correct packaging workflow. + ## [3.0.0] - 2023-12-27 ### Changed diff --git a/Makefile b/Makefile index 2c65ac5..39ceee8 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,8 @@ PREFIX=/usr/local SHAREDIR=share/$(NAME) SYSTEMD_SERVICE_DIR=/lib/systemd/system USER=$(NAME) -VERSION=3.0.0 +VERSION=3.0.1 +RELEASE=1 TESTS=\ unit_tests/test_peer_stats.py \ @@ -52,6 +53,21 @@ install: BINDIR=$(PREFIX)/$(BINDIR) CONFDIR=$(CONFDIR) GROUP=$(GROUP) NAME=$(NAME) USER=$(USER) python3 \ src/jinja2_render.py src/ntpmon.env > $(DESTDIR)/$(CONFDIR)/$(NAME) +release: + dch --newversion $(VERSION)-$(RELEASE) + dch --release --distribution focal + for i in CHANGELOG.md debian/changelog debian/*.rst; do \ + grep -qw "$(VERSION)" $$i || exit 1; \ + done + +tag: + git commit -m'Prepare $(VERSION) release' -a + git tag --sign v$(VERSION) + git push --tags + +dput: + dput ntpmon buildroot/ntpmon_$(VERSION)-$(RELEASE)_source.changes + $(BUILDROOT): mkdir $@ diff --git a/debian/changelog b/debian/changelog index e94a305..ab7caf7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,21 @@ +ntpmon (3.0.1-1) focal; urgency=medium + + * New upstream patch version to add packaging workflow. + + -- Paul Gear Wed, 27 Dec 2023 22:16:45 +1000 + +ntpmon (3.0.0+repack1-1) focal; urgency=medium + + * No change repack to add Debian changelog. + + -- Paul Gear Wed, 27 Dec 2023 22:15:20 +1000 + +ntpmon (3.0.0-1) focal; urgency=medium + + * New upstream release. + + -- Paul Gear Wed, 27 Dec 2023 21:23:05 +1000 + ntpmon (2.1.0-1) focal; urgency=medium * New upstream release. diff --git a/debian/check_ntpmon-man.rst b/debian/check_ntpmon-man.rst index db1204f..3a40f89 100644 --- a/debian/check_ntpmon-man.rst +++ b/debian/check_ntpmon-man.rst @@ -1,4 +1,4 @@ -:Version: 3.0.0 +:Version: 3.0.1 :Date: 2023-12-27 :Copyright: 2015-2023 Paul Gear :Title: check_ntpmon diff --git a/debian/control b/debian/control index 88cdd2e..7b788ca 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,8 @@ Build-Depends: python3-all, python3-docutils, python3-jinja2, - python3-psutil + python3-psutil, + python3-pytest Standards-Version: 4.6.0 Homepage: https://github.com/paulgear/ntpmon Rules-Requires-Root: no diff --git a/debian/ntpmon-man.rst b/debian/ntpmon-man.rst index 88cfd6e..4bce1e3 100644 --- a/debian/ntpmon-man.rst +++ b/debian/ntpmon-man.rst @@ -1,4 +1,4 @@ -:Version: 3.0.0 +:Version: 3.0.1 :Date: 2023-12-27 :Copyright: 2015-2023 Paul Gear :Title: ntpmon diff --git a/src/outputs.py b/src/outputs.py index fcc329a..5efa033 100644 --- a/src/outputs.py +++ b/src/outputs.py @@ -8,7 +8,7 @@ import sys from io import TextIOWrapper -from typing import ClassVar +from typing import ClassVar, Dict import line_protocol @@ -16,7 +16,7 @@ class Output: - peertypes: ClassVar[dict[str, str]] = { + peertypes: ClassVar[Dict[str, str]] = { "backup": "peers/count-backup", "excess": "peers/count-excess", "false": "peers/count-false", @@ -27,7 +27,7 @@ class Output: "sync": "peers/count-sync", } - peerstatstypes: ClassVar[dict[str, str]] = { + peerstatstypes: ClassVar[Dict[str, str]] = { "authenticated": "authenticated/bool", "authentication_enabled": "authentication-enabled/bool", "authentication_fail": "authentication-fail/bool", @@ -58,7 +58,7 @@ class Output: "synchronized": "synchronized/bool", } - summarytypes: ClassVar[dict[str, str]] = { + summarytypes: ClassVar[Dict[str, str]] = { "frequency": "frequency/frequency_offset", "offset": "offset/time_offset", "reach": "reachability/percent", @@ -119,7 +119,7 @@ def __init__(self, args: argparse.Namespace) -> None: "type", ] - peerstatstypes: ClassVar[dict[str, str]] = { + peerstatstypes: ClassVar[Dict[str, str]] = { "authenticated": ("i", None, "Whether the peer is authenticated"), "authentication_enabled": ("i", None, "Whether the peer has authentication enabled"), "authentication_fail": ("i", None, "Whether the peer has failed authentication"), @@ -150,7 +150,7 @@ def __init__(self, args: argparse.Namespace) -> None: "synchronized": ("i", None, "Whether the peer reports as synchronized"), } - summarystatstypes: ClassVar[dict[str, tuple[str, str, str]]] = { + summarystatstypes: ClassVar[Dict[str, tuple[str, str, str]]] = { "frequency": (None, "_hertz", "Frequency error of the local clock"), "offset": (None, "_seconds", "Mean clock offset of peers"), "reach": ("%", "_ratio", "Peer reachability over the last 8 polls"),