chiark / gitweb /
secnet.git
15 months agochangelog: start 0.6.8 master
Ian Jackson [Mon, 9 Jan 2023 00:52:29 +0000 (00:52 +0000)]
changelog: start 0.6.8

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
15 months agochangelog: finalise 0.6.7 v0.6.7
Ian Jackson [Mon, 9 Jan 2023 00:15:28 +0000 (00:15 +0000)]
changelog: finalise 0.6.7

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
15 months agochangelog: start 0.6.7
Ian Jackson [Sun, 8 Jan 2023 18:21:44 +0000 (18:21 +0000)]
changelog: start 0.6.7

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
15 months agochangelog: finalise 0.6.6
Ian Jackson [Sun, 8 Jan 2023 18:20:15 +0000 (18:20 +0000)]
changelog: finalise 0.6.6

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
15 months agochangelog: document changes
Ian Jackson [Sun, 8 Jan 2023 18:18:38 +0000 (18:18 +0000)]
changelog: document changes

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
15 months agoAdd Debian upload step to release checklist
Ian Jackson [Sun, 8 Jan 2023 18:17:49 +0000 (18:17 +0000)]
Add Debian upload step to release checklist

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
15 months agoUpdate my own copyright year to include 2023
Ian Jackson [Sun, 8 Jan 2023 11:36:02 +0000 (11:36 +0000)]
Update my own copyright year to include 2023

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
15 months agoAdd missing build-dependency on netbase
Ian Jackson [Sat, 7 Jan 2023 11:40:51 +0000 (11:40 +0000)]
Add missing build-dependency on netbase

Closes: #1028102
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
15 months agostest: Fix debugging output about spawning secnet
Ian Jackson [Sat, 7 Jan 2023 11:36:36 +0000 (11:36 +0000)]
stest: Fix debugging output about spawning secnet

The output would easily end up interleaved and nearly
incomprehensible.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
15 months agod/copyright: Link to /usr/share/common-licenses/LGPL-3
Ian Jackson [Fri, 6 Jan 2023 18:21:01 +0000 (18:21 +0000)]
d/copyright: Link to /usr/share/common-licenses/LGPL-3

Requested-by: ftpmaster@ftp-master.debian.org
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
15 months agosecnet-wireshark.lua: Fix copyright notice licence version
Ian Jackson [Thu, 5 Jan 2023 23:43:52 +0000 (23:43 +0000)]
secnet-wireshark.lua: Fix copyright notice licence version

Reported-by: ftpmaster@ftp-master.debian.org
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
15 months agod/copyright: Alphabetise sections
Ian Jackson [Thu, 5 Jan 2023 23:41:39 +0000 (23:41 +0000)]
d/copyright: Alphabetise sections

Requested-by: ftpmaster@ftp-master.debian.org
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
15 months agod/copyright: Fix reference to base91-c directory.
Ian Jackson [Thu, 5 Jan 2023 23:39:11 +0000 (23:39 +0000)]
d/copyright: Fix reference to base91-c directory.

Requested-by: ftpmaster@ftp-master.debian.org
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
15 months agopolypath: Do not separately log xmit failures
Ian Jackson [Thu, 24 Nov 2022 00:02:20 +0000 (00:02 +0000)]
polypath: Do not separately log xmit failures

udp_sock_experienced handles the necessary logging.  We don't want a
log message per packet, even if they're errors.

Empirically, using a network speed test web page, over the same
network interface, can cause this to get EAGAIN and produce logspam.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
15 months agochangelog: start 0.6.6
Ian Jackson [Thu, 5 Jan 2023 23:38:23 +0000 (23:38 +0000)]
changelog: start 0.6.6

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
17 months agoTidy changelog for 0.6.5
Ian Jackson [Sat, 12 Nov 2022 18:58:14 +0000 (18:58 +0000)]
Tidy changelog for 0.6.5

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
17 months agoBump version for re-push
Ian Jackson [Sat, 12 Nov 2022 18:53:54 +0000 (18:53 +0000)]
Bump version for re-push

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
17 months agoBump version for re-push
Ian Jackson [Sat, 12 Nov 2022 18:50:39 +0000 (18:50 +0000)]
Bump version for re-push

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
17 months agoFinalise 0.6.3
Ian Jackson [Sat, 12 Nov 2022 18:37:24 +0000 (18:37 +0000)]
Finalise 0.6.3

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
17 months agochangelog: Document changes
Ian Jackson [Sat, 12 Nov 2022 18:32:10 +0000 (18:32 +0000)]
changelog: Document changes

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
17 months agoUpdate my own copyright year
Ian Jackson [Sat, 12 Nov 2022 18:30:07 +0000 (18:30 +0000)]
Update my own copyright year

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
17 months agoAdd a README.source
Ian Jackson [Sat, 12 Nov 2022 18:28:06 +0000 (18:28 +0000)]
Add a README.source

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
17 months agoLICENCE: reorganise
Ian Jackson [Sat, 12 Nov 2022 18:19:00 +0000 (18:19 +0000)]
LICENCE: reorganise

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
17 months agocontrol: Update Standards-Version
Ian Jackson [Sat, 12 Nov 2022 18:13:11 +0000 (18:13 +0000)]
control: Update Standards-Version

To the version prevailing when I did the updates, in December 2021.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
17 months agoLICENCE: Copy the subdirmk notice too
Ian Jackson [Sat, 12 Nov 2022 18:11:26 +0000 (18:11 +0000)]
LICENCE: Copy the subdirmk notice too

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
17 months agoLICENCE: Actually copy the notices of the included works
Ian Jackson [Sat, 12 Nov 2022 18:07:42 +0000 (18:07 +0000)]
LICENCE: Actually copy the notices of the included works

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
17 months agocopyright: Update licence on ac_prog_cc_no_writeable_strings.m4
Ian Jackson [Sat, 12 Nov 2022 18:06:55 +0000 (18:06 +0000)]
copyright: Update licence on ac_prog_cc_no_writeable_strings.m4

From the GPLv3+ upgrade in the autoconf archive.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoFinalise 0.6.2 v0.6.2
Ian Jackson [Thu, 30 Dec 2021 15:00:52 +0000 (15:00 +0000)]
Finalise 0.6.2

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoinit script: make "restart" work if secnet is not running.
Ian Jackson [Thu, 30 Dec 2021 15:09:47 +0000 (15:09 +0000)]
init script: make "restart" work if secnet is not running.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agochangelog: Document changes since 0.6.1
Ian Jackson [Thu, 30 Dec 2021 13:56:33 +0000 (13:56 +0000)]
changelog: Document changes since 0.6.1

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agolegal: Add missing notice to many files
Ian Jackson [Thu, 30 Dec 2021 13:06:55 +0000 (13:06 +0000)]
legal: Add missing notice to many files

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agolegal: Clean up credits for init script
Ian Jackson [Thu, 30 Dec 2021 13:01:57 +0000 (13:01 +0000)]
legal: Clean up credits for init script

Add the credits to CREDITS and LICENCE and get rid of
boilerplate/noise/version stuff from script header.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoOLD-BUGS: Rename from BUGS and don't ship in the Debian package
Ian Jackson [Thu, 30 Dec 2021 12:58:41 +0000 (12:58 +0000)]
OLD-BUGS: Rename from BUGS and don't ship in the Debian package

This is really not of any interest.  It has been unchanged since at
least 2001.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoOLD-NEWS: Rename from NEWS
Ian Jackson [Thu, 30 Dec 2021 12:56:41 +0000 (12:56 +0000)]
OLD-NEWS: Rename from NEWS

This file is very old.  We use the debian/changelog file now.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agolegal: Make a LICENSE symlink for Americans
Ian Jackson [Thu, 30 Dec 2021 12:55:15 +0000 (12:55 +0000)]
legal: Make a LICENSE symlink for Americans

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agocredits: Make debian/copyright be a symlink
Ian Jackson [Thu, 30 Dec 2021 12:54:07 +0000 (12:54 +0000)]
credits: Make debian/copyright be a symlink

This reduces the number of places to edit to two.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agocredits: Add missing credit re python argparse extension
Ian Jackson [Thu, 30 Dec 2021 12:52:51 +0000 (12:52 +0000)]
credits: Add missing credit re python argparse extension

See argparseactionnoyes.py.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoCREDITS, copyright: Promote Joey Hess's packaging credit
Ian Jackson [Thu, 30 Dec 2021 12:50:05 +0000 (12:50 +0000)]
CREDITS, copyright: Promote Joey Hess's packaging credit

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agolegal: Move legal information into its own file
Ian Jackson [Thu, 30 Dec 2021 12:49:11 +0000 (12:49 +0000)]
legal: Move legal information into its own file

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agocopyright: Add notice to random-fake-userv
Ian Jackson [Thu, 30 Dec 2021 11:52:34 +0000 (11:52 +0000)]
copyright: Add notice to random-fake-userv

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agotest-example/null-fake-userv: New test utility script
Ian Jackson [Thu, 30 Dec 2021 02:54:40 +0000 (02:54 +0000)]
test-example/null-fake-userv: New test utility script

This doesn't get used by anything yet.  We will want it for certian
tests, eg the autopkgtest I am working on.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoexample.conf: Add mtu-target
Ian Jackson [Thu, 30 Dec 2021 02:05:52 +0000 (02:05 +0000)]
example.conf: Add mtu-target

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoexample.conf: Add a commented-out mobile site setting
Ian Jackson [Thu, 30 Dec 2021 01:59:38 +0000 (01:59 +0000)]
example.conf: Add a commented-out mobile site setting

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoexample.conf: Improve syntax by deleting one of the two map examples
Ian Jackson [Thu, 30 Dec 2021 01:16:38 +0000 (01:16 +0000)]
example.conf: Improve syntax by deleting one of the two map examples

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoexample.conf: Comment out some tuning overrides
Ian Jackson [Thu, 30 Dec 2021 00:58:20 +0000 (00:58 +0000)]
example.conf: Comment out some tuning overrides

Not setting these is better.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agotest-example/common.conf: Fix a reference to the sites file
Ian Jackson [Thu, 30 Dec 2021 00:54:36 +0000 (00:54 +0000)]
test-example/common.conf: Fix a reference to the sites file

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoinit script: source /lib/lsb/init-functions
Ian Jackson [Thu, 30 Dec 2021 00:22:51 +0000 (00:22 +0000)]
init script: source /lib/lsb/init-functions

As per lintian.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodebian/control: Add missing Pre-Depends
Ian Jackson [Thu, 30 Dec 2021 00:22:28 +0000 (00:22 +0000)]
debian/control: Add missing Pre-Depends

As per lintian.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodebian: Add some lintian overrides
Ian Jackson [Thu, 30 Dec 2021 00:19:44 +0000 (00:19 +0000)]
debian: Add some lintian overrides

(INSTALL contains setup instructions too.)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodebian/control: Adjust priority (as per modern policy and lintian)
Ian Jackson [Thu, 30 Dec 2021 00:19:22 +0000 (00:19 +0000)]
debian/control: Adjust priority (as per modern policy and lintian)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoDescription: expand
Ian Jackson [Thu, 30 Dec 2021 00:19:19 +0000 (00:19 +0000)]
Description: expand

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoDescription: expand
Ian Jackson [Thu, 30 Dec 2021 00:15:11 +0000 (00:15 +0000)]
Description: expand

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoREADME, copyright: add missing credits for base91
Ian Jackson [Thu, 30 Dec 2021 00:07:30 +0000 (00:07 +0000)]
README, copyright: add missing credits for base91

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agosite: promote creation of st->scratch
Ian Jackson [Thu, 30 Dec 2021 02:23:14 +0000 (02:23 +0000)]
site: promote creation of st->scratch

Without this, peer keyset loading does not work after restart!

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agocomprehensive-test: Actually allow OLD_SECNET_DIR set to ''
Ian Jackson [Thu, 30 Dec 2021 13:36:14 +0000 (13:36 +0000)]
comprehensive-test: Actually allow OLD_SECNET_DIR set to ''

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoDir.sd.mk: Prevent builtin make rule overwriting conffile.c
Ian Jackson [Thu, 30 Dec 2021 13:14:27 +0000 (13:14 +0000)]
Dir.sd.mk: Prevent builtin make rule overwriting conffile.c

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodebian/rules: Use dh sequencer
Ian Jackson [Wed, 29 Dec 2021 23:58:10 +0000 (23:58 +0000)]
debian/rules: Use dh sequencer

Resulting changes:
 * We now provide debug symbols in the new Debian way
 * The way the prerm stops secnet accords with modern practice

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodebhelper compat: bump to 12 (stretch-backports)
Ian Jackson [Wed, 29 Dec 2021 23:50:38 +0000 (23:50 +0000)]
debhelper compat: bump to 12 (stretch-backports)

According to debdiff --controlfiles ALL the only change is a change to
the postinst, which now sometimes restarts rather than starts the
daemon.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodebian/rules: Use dh_prep instead of deprecated dh_clean -k
Ian Jackson [Wed, 29 Dec 2021 23:51:57 +0000 (23:51 +0000)]
debian/rules: Use dh_prep instead of deprecated dh_clean -k

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agochangelog: start 0.6.2
Ian Jackson [Wed, 29 Dec 2021 23:46:39 +0000 (23:46 +0000)]
changelog: start 0.6.2

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoconfigure: bug reporting address
Ian Jackson [Thu, 23 Dec 2021 11:27:29 +0000 (11:27 +0000)]
configure: bug reporting address

The correct address is the secnet-discuss list.

Reported-by: Colin Watson <cjwatson@debian.org>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agocomm-common.h: Remove unused `notify' variable
Colin Watson [Sun, 15 Aug 2021 05:04:02 +0000 (05:04 +0000)]
comm-common.h: Remove unused `notify' variable

This only needs to declare the `comm_notify_list' type, and declaring
the variable here without `extern' causes a multiple-definition link
failure on bullseye.

3 years agochangelog: finalise 0.6.1 v0.6.1
Ian Jackson [Sun, 24 May 2020 21:14:34 +0000 (22:14 +0100)]
changelog: finalise 0.6.1

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agochangelog: document changes since 0.6.0
Ian Jackson [Sun, 24 May 2020 21:13:37 +0000 (22:13 +0100)]
changelog: document changes since 0.6.0

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoUse CLOCK_MONOTONIC for all our timing needs, when possible
Ian Jackson [Mon, 30 Mar 2020 17:12:00 +0000 (18:12 +0100)]
Use CLOCK_MONOTONIC for all our timing needs, when possible

Otherwise we can malfunction if the clock warps.

This depends on an unreleased adns feature, so the warning is
currently not actually printed.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoautoconf: Check for adns_if_monotonic and define USE_MONOTONIC
Ian Jackson [Sun, 24 May 2020 17:36:10 +0000 (18:36 +0100)]
autoconf: Check for adns_if_monotonic and define USE_MONOTONIC

Nothing uses this yet.  Split out into its own commit for clarity.

This flag is not yet in any released version of adns but as adns
upstream I promise this is how it will be.  for my convenience I am
making secnet check for it ahead of its existence in public adns....

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoresolver: Break out adns_initflags value as variable
Ian Jackson [Sun, 24 May 2020 17:36:26 +0000 (18:36 +0100)]
resolver: Break out adns_initflags value as variable

This provides a single place to add flags, which we'll do in a moment.

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoconfig parsing: When closure is of wrong type, report how
Ian Jackson [Sun, 24 May 2020 19:46:00 +0000 (20:46 +0100)]
config parsing: When closure is of wrong type, report how

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoClosures: Provide closure_type_name
Ian Jackson [Sun, 24 May 2020 19:45:22 +0000 (20:45 +0100)]
Closures: Provide closure_type_name

This will be used in error reporting.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoconfig parsing: site: Use cfgfatal_cl_type for transform
Ian Jackson [Sun, 24 May 2020 19:34:01 +0000 (20:34 +0100)]
config parsing: site: Use cfgfatal_cl_type for transform

Minor improvement to the message.  We are going to improve
cfgfatal_cl_type.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoconfig parsing: Break out cfgfatal_cl_type
Ian Jackson [Sun, 24 May 2020 19:33:26 +0000 (20:33 +0100)]
config parsing: Break out cfgfatal_cl_type

No functional change.  We are going to reuse and improve this.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoexample.conf: Fix "transform" syntax
Ian Jackson [Sun, 24 May 2020 19:32:05 +0000 (20:32 +0100)]
example.conf: Fix "transform" syntax

These global closure names need to be invoked.

This was broken in 5b5f297f9a9d47ee
  site: support multiple transforms
(first released in 0.3.0)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agorsa: Print errno value if we fail to open key file
Ian Jackson [Sun, 24 May 2020 17:35:42 +0000 (18:35 +0100)]
rsa: Print errno value if we fail to open key file

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agorsa: Do not crash with -j if key file does not exist
Ian Jackson [Sun, 24 May 2020 12:42:09 +0000 (13:42 +0100)]
rsa: Do not crash with -j if key file does not exist

This was messed up by 58913a3b93a6
  rsa1: Break rsa_loadpriv_core out of rsapriv_apply
where the early exit path should have been handled in both places but
wasn't.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agolog: Set log level for early logging
Ian Jackson [Sun, 24 May 2020 12:41:04 +0000 (13:41 +0100)]
log: Set log level for early logging

Unless ->level is set, logging is just a no-op.  We must set this
twice, because the system log is used to report command line parsing
errors, but the command line might increase the log level.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoexample.conf: Use new name-prefixed format
Ian Jackson [Sun, 24 May 2020 18:11:09 +0000 (19:11 +0100)]
example.conf: Use new name-prefixed format

Otherwise it won't work at all.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agostest: No longer use localhost addresses
Ian Jackson [Tue, 10 Mar 2020 18:44:37 +0000 (18:44 +0000)]
stest: No longer use localhost addresses

This will make testing polypath stuff more sensible.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agomtest/t-userv: Check lack of optional group in fragment
Ian Jackson [Tue, 10 Mar 2020 18:30:30 +0000 (18:30 +0000)]
mtest/t-userv: Check lack of optional group in fragment

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agomake-secnet-sites: Tolerate missing group in userv sites file
Ian Jackson [Tue, 10 Mar 2020 18:26:16 +0000 (18:26 +0000)]
make-secnet-sites: Tolerate missing group in userv sites file

When processing a sites file fragment via userv, the group in the
provided file is supposed to be optional.  This was accidentally
regressed in 19482a2958fa
   make-secnet-sites: Do not write out unchecked output in sites

The additional call to w[2].groupname ought to have been conditional.
Now we have precisely the right code in OpBase, so simply call it.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agomtest/t-userv: Test that output conf file is correct
Ian Jackson [Tue, 10 Mar 2020 17:55:58 +0000 (17:55 +0000)]
mtest/t-userv: Test that output conf file is correct

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agomtest/t-userv: Test that updated sites file is readable.
Ian Jackson [Tue, 10 Mar 2020 17:55:19 +0000 (17:55 +0000)]
mtest/t-userv: Test that updated sites file is readable.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agomake-secnet-sites: Tolerate unused group in additions to location
Ian Jackson [Tue, 10 Mar 2020 18:00:57 +0000 (18:00 +0000)]
make-secnet-sites: Tolerate unused group in additions to location

When processing a sites file other than via userv, the group (if
specified) is not of any interest.

But since tainting, we need to bless it for re-output.  (This is
necessary even in modes where we don't actually write anything out,
like .conf generation.)

The correct place to do this is in OpConf's base class.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agomtest: Break out diff-mss-sites-conf
Ian Jackson [Tue, 10 Mar 2020 17:54:39 +0000 (17:54 +0000)]
mtest: Break out diff-mss-sites-conf

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agomtest/t-userv: Check that user in wrong group is rejected
Ian Jackson [Tue, 10 Mar 2020 18:16:18 +0000 (18:16 +0000)]
mtest/t-userv: Check that user in wrong group is rejected

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agomake-secnet-sites: Fix error handling if caller is in wrong group
Ian Jackson [Tue, 10 Mar 2020 18:16:44 +0000 (18:16 +0000)]
make-secnet-sites: Fix error handling if caller is in wrong group

We would crash with an unbound variable error, instead of the right
error message.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoMakefiles: Use Final.sd.mk to implementing RECHECK_RM
Ian Jackson [Sun, 16 Feb 2020 18:06:23 +0000 (18:06 +0000)]
Makefiles: Use Final.sd.mk to implementing RECHECK_RM

This is now read by make after all the other makefiles.  This allows
us to move the addition of {stest,mtest}/d-* to RECHECK_RM from
Dir.sd.mk into test-common.sd.mk, where it belongs.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoMerge subdirmk 0.4
Ian Jackson [Sun, 16 Feb 2020 18:45:25 +0000 (18:45 +0000)]
Merge subdirmk 0.4

git subtree pull.  Fix up test-example/Dir.sd.mk for the incompatible
change (`&${' needs to become `&{').

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoREADME: Update copyright date
Ian Jackson [Sun, 16 Feb 2020 18:39:51 +0000 (18:39 +0000)]
README: Update copyright date

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoREADME: Fix documentation errors relating to &{ etc.
Ian Jackson [Sun, 16 Feb 2020 17:29:52 +0000 (17:29 +0000)]
README: Fix documentation errors relating to &{ etc.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agologging: site: Log state on PHASE_RUN entry instead of initially
Ian Jackson [Sun, 16 Feb 2020 15:06:34 +0000 (15:06 +0000)]
logging: site: Log state on PHASE_RUN entry instead of initially

site_startup calls enter_state_run which would print a message, but
logging is not set up that early.  The result is a message printed to
stderr before daemonisation.

We can distinguish this situation from other calls to enter_state_run
because the old state is SITE_STOP, which only occurs between config
reading (closure invocation) and site_startup being called.
So we can suppress this message.

But it did serve a purpose: it would only be printed if the site was
listed in `sites'; otherwise site_startup wouldn't be called and the
`entering state RUN' message would be absent.

So instead we provide a more explicit way to tell: on entering
PHASE_RUN, site_startup has either been called, or not.  And logging
is set up.  state is then STOP or RUN.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agosite: Rename site_phase_hook to site_phase_shutdown_hook
Ian Jackson [Sun, 16 Feb 2020 15:06:00 +0000 (15:06 +0000)]
site: Rename site_phase_hook to site_phase_shutdown_hook

This is misnamed.  And we are going to add yet another phase hook.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agologging: Move "starting" message earlier
Ian Jackson [Sun, 16 Feb 2020 14:47:24 +0000 (14:47 +0000)]
logging: Move "starting" message earlier

We are going to add some log messages to PHASE_RUN hooks.  We want the
overall startup message to come first.  Doing this right after
PHASE_DAEMONIZE makes sense as PHASE_DAEMONIZE now sets up logging,
too.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agosite: Change site->control(bool_t) to site->startup()
Ian Jackson [Sun, 16 Feb 2020 14:23:24 +0000 (14:23 +0000)]
site: Change site->control(bool_t) to site->startup()

This is only ever called with run=True.  We are going to want to rely
on this property.

If we ever do more runtime reconfig that will be done differently.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agologging; site: Do not log transport_peers_clear if already clear
Ian Jackson [Sun, 16 Feb 2020 14:18:49 +0000 (14:18 +0000)]
logging; site: Do not log transport_peers_clear if already clear

This suppresses a pointles message at startup.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agologging: site: Introduce transport_peers_init which doesn't log
Ian Jackson [Sun, 16 Feb 2020 14:21:09 +0000 (14:21 +0000)]
logging: site: Introduce transport_peers_init which doesn't log

This eliminates some spurious startup messages.  It also allows
transport_peers_clear to read *peers, since it doesn't have to do
initialisation.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agologging: start rather earlier
Ian Jackson [Sun, 16 Feb 2020 14:42:31 +0000 (14:42 +0000)]
logging: start rather earlier

This moves some messages printed by by early netlink and polypath
setup to the proper logfile / syslog directly, rather than having them
captured by the stderr capture from daemonize.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agostartup: Break out start_sites
Ian Jackson [Sun, 16 Feb 2020 13:21:00 +0000 (13:21 +0000)]
startup: Break out start_sites

We were going to want to change when this happens.  But actually it
seems that is not right.  Keep the commit anyway, as I think it
improves clarity a bit.

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agochangelog: Start 0.6.1
Ian Jackson [Sun, 16 Feb 2020 13:00:49 +0000 (13:00 +0000)]
changelog: Start 0.6.1

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoFinalise 0.6.0 v0.6.0
Ian Jackson [Sun, 16 Feb 2020 12:48:27 +0000 (12:48 +0000)]
Finalise 0.6.0

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoconfigure[.ac]: Arrange to cope with jessie's gcc
Ian Jackson [Sun, 16 Feb 2020 12:39:39 +0000 (12:39 +0000)]
configure[.ac]: Arrange to cope with jessie's gcc

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>