Skip to content

Commit

Permalink
Prepare 3.0.4 release
Browse files Browse the repository at this point in the history
  • Loading branch information
paulgear authored Dec 29, 2023
2 parents 4e54af0 + 35fc067 commit 63149da
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 10 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/debian-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Debian package

on:
push:
branches:
- feature/*
- main
workflow_dispatch:

jobs:
build-deb:
runs-on: ubuntu-latest
steps:
- name: Check out source
uses: actions/checkout@v3

- name: build debian package
uses: jtdor/build-deb-action@v1
env:
DEB_BUILD_OPTIONS: noautodbgsym
with:
buildpackage-opts: --build=binary --no-sign
docker-image: ubuntu:focal
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.4] - 2023-12-29

### Changed

- Ensure test suite is timezone-independent.

## [3.0.3] - 2023-12-29

### Changed
Expand Down
10 changes: 4 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ PREFIX=/usr/local
SHAREDIR=share/$(NAME)
SYSTEMD_SERVICE_DIR=/lib/systemd/system
USER=$(NAME)
VERSION=3.0.3
VERSION=3.0.4
RELEASE=1

TESTS=\
Expand Down Expand Up @@ -54,15 +54,13 @@ install:
src/jinja2_render.py src/ntpmon.env > $(DESTDIR)/$(CONFDIR)/$(NAME)

release:
grep -qw "$(VERSION)" CHANGELOG.md
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
git commit -m'Prepare $(VERSION) release' -a

tag:
git commit -m'Prepare $(VERSION) release' -a
git tag --sign v$(VERSION)
git tag --sign -m'$(VERSION) release' v$(VERSION)
git push --tags

dput:
Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
ntpmon (3.0.4-1) focal; urgency=medium

* New upstream release to fix test suite.

-- Paul Gear <[email protected]> Fri, 29 Dec 2023 15:52:46 +1000

ntpmon (3.0.3-1) focal; urgency=medium

* Further fixes to focal build.
Expand Down
6 changes: 5 additions & 1 deletion debian/check_ntpmon-man.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
:Version: 3.0.3
:Version: 3.0
:Date: 2023-12-28
:Copyright: 2015-2023 Paul Gear
:Title: check_ntpmon
Expand All @@ -25,11 +25,15 @@ Common Options

options:
-h, --help show this help message and exit

--check [{proc,offset,peers,reach,reachability,sync,vars} ...]
Select checks to run; if omitted, run all checks.

--debug Include command output and internal state dump along
with check results.

--run-time RUN_TIME Time in seconds (default: 512) for which to always
return OK after NTP daemon startup.

--test Obtain peer stats on standard input instead of from
running daemon.
2 changes: 1 addition & 1 deletion debian/ntpmon-man.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
:Version: 3.0.3
:Version: 3.0
:Date: 2023-12-28
:Copyright: 2015-2023 Paul Gear
:Title: ntpmon
Expand Down
2 changes: 1 addition & 1 deletion src/peer_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def extract_chrony_tracking(f: List[str]) -> dict:
def extract_ntp_peerstats(f: List[str]) -> dict:
basefields = {
# sorted by field position rather than name
"datetime": datetime.datetime.fromtimestamp(mjd_to_timestamp(float(f[0]), float(f[1]))),
"datetime": datetime.datetime.fromtimestamp(mjd_to_timestamp(float(f[0]), float(f[1])), tz=datetime.timezone.utc),
"source": f[2],
"offset": float(f[4]),
"delay": float(f[5]),
Expand Down
2 changes: 1 addition & 1 deletion unit_tests/test_peer_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def test_parse_ntpd_peerstats() -> None:
assert all([m is not None for m in measurements])
assert measurements[0]["reachable"] == True
assert measurements[0]["type"] == "survivor"
assert measurements[1]["datetime"] == datetime.datetime(2023, 12, 25, 18, 41, 56, 612000)
assert measurements[1]["datetime"] == datetime.datetime(2023, 12, 25, 8, 41, 56, 612000, tzinfo=datetime.timezone.utc)
assert measurements[2]["offset"] > 0
assert measurements[3]["type"] == "outlier"
assert measurements[5]["type"] == "sync"
Expand Down

0 comments on commit 63149da

Please sign in to comment.