Jacob Bachmeyer [Sat, 1 Apr 2023 04:33:32 +0000 (23:33 -0500)]
Remove "send-gpg-public-keys.sh"
With the ongoing attacks on the public synchronizing keyservers, this tool is
no longer useful.
Jacob Bachmeyer [Sat, 1 Apr 2023 04:31:48 +0000 (23:31 -0500)]
Rename "generate-ftpindex.sh" to "make-ftpindex.sh"
The shorter name fits better in Info menus.
Jacob Bachmeyer [Sat, 1 Apr 2023 03:41:06 +0000 (22:41 -0500)]
Document "--with-gpg" keymaster option
Jacob Bachmeyer [Fri, 31 Mar 2023 03:00:03 +0000 (22:00 -0500)]
Fix documentation error
Jacob Bachmeyer [Thu, 30 Mar 2023 23:51:51 +0000 (18:51 -0500)]
Fix documentation formatting error
Jacob Bachmeyer [Wed, 29 Mar 2023 03:06:33 +0000 (22:06 -0500)]
Remove "serials" configuration parameter
The serials file is now always name "serials" in pkgstatedir.
Jacob Bachmeyer [Wed, 29 Mar 2023 03:05:26 +0000 (22:05 -0500)]
Rename "maintainermap" configuration item to "maintainerlist"
Jacob Bachmeyer [Wed, 29 Mar 2023 03:04:05 +0000 (22:04 -0500)]
Use proper pkgstatedir with testsuite
Jacob Bachmeyer [Tue, 28 Mar 2023 04:35:25 +0000 (23:35 -0500)]
Move email addresses to configuration file
The testsuite is expanded to cover the new options.
Jacob Bachmeyer [Tue, 28 Mar 2023 03:40:40 +0000 (22:40 -0500)]
Ignore default configuration file
This prevents a user's configuration from being picked up into a local
repository and complicating future updates from upstream repositories.
Jacob Bachmeyer [Tue, 28 Mar 2023 02:06:30 +0000 (21:06 -0500)]
Enforce MAX_FILE_NAME_LEN on implied directory names
A test is added to verify this check.
Jacob Bachmeyer [Sun, 26 Mar 2023 01:22:01 +0000 (20:22 -0500)]
Remove symlinks to gatekeeper
Jacob Bachmeyer [Sun, 26 Mar 2023 01:21:35 +0000 (20:21 -0500)]
Update online help to reflect move of zones to configuration
Jacob Bachmeyer [Sat, 25 Mar 2023 02:39:00 +0000 (21:39 -0500)]
Import GNU Free Documentation License 1.3
Jacob Bachmeyer [Sat, 25 Mar 2023 02:38:29 +0000 (21:38 -0500)]
Import Texinfo macros
Jacob Bachmeyer [Sat, 25 Mar 2023 01:02:22 +0000 (20:02 -0500)]
Remove unneeded "global spawn_id" links in testsuite
Jacob Bachmeyer [Sat, 25 Mar 2023 01:02:00 +0000 (20:02 -0500)]
Fix bug in test driver
This bug was exposed in commit
fc58d8e82444d9f949f2ac5cbbed928ad6b12c30,
but only affected testsuite runs when coverage data is collected.
The exact cause is unknown, but that commit changed the processing used
for verifying signatures and the bug caused the testsuite to prematurely
declare the gatekeeper run complete and move on to the next test when a
signature was verified. Presumably, the improved signature verification
somehow interacted poorly with Expect.
Bizarrely, the issue only occurred when Devel::Cover was used to check
the coverage of the testsuite and did not occur under regular testing.
The root cause is surely timing related, since perl is much slower when
collecting code coverage data. This is also the reason the bug went
unnoticed for so long: coverage runs are infrequent except when making
improvements to the testsuite.
Jacob Bachmeyer [Fri, 24 Mar 2023 03:02:20 +0000 (22:02 -0500)]
Refactor configuration as constants in the gatekeeper
This commit also allows some parameters to be optional.
Jacob Bachmeyer [Thu, 23 Mar 2023 04:06:40 +0000 (23:06 -0500)]
Revise global storage for serials file name
The serials file is now stored in the package state directory and is
named relative to that directory in the configuration.
Jacob Bachmeyer [Thu, 23 Mar 2023 03:37:37 +0000 (22:37 -0500)]
Remove ZONE constant and rename variable
Jacob Bachmeyer [Thu, 23 Mar 2023 03:24:13 +0000 (22:24 -0500)]
Remove obsolete "-s" alias for --zone option
Jacob Bachmeyer [Thu, 23 Mar 2023 03:00:44 +0000 (22:00 -0500)]
Add tests to complete code coverage for configuration parsing
Jacob Bachmeyer [Thu, 23 Mar 2023 02:37:48 +0000 (21:37 -0500)]
Add overlooked configuration item
Jacob Bachmeyer [Thu, 23 Mar 2023 02:30:16 +0000 (21:30 -0500)]
Add tests for gatekeeper configuration parsing
Jacob Bachmeyer [Thu, 23 Mar 2023 01:51:25 +0000 (20:51 -0500)]
Add blank line in testsuite output before version message
The keymaster tests already have this line.
Jacob Bachmeyer [Thu, 23 Mar 2023 01:50:00 +0000 (20:50 -0500)]
Add initial configuration support to gatekeeper
Jacob Bachmeyer [Wed, 22 Mar 2023 03:05:15 +0000 (22:05 -0500)]
Add options for specifying gpgv and lsof tools
This aligns the gatekeeper with the keymaster and permits the external
tools to be placed in a nonstandard location if desired.
Jacob Bachmeyer [Sun, 19 Mar 2023 04:25:55 +0000 (23:25 -0500)]
Report an error if an unrecognized option is given to the gatekeeper
Jacob Bachmeyer [Sun, 19 Mar 2023 03:54:45 +0000 (22:54 -0500)]
Revise version message in gatekeeper
This brings the output of ./gatekeeper.pl --version in line with current
GNU standards and moves the copyright notice to the top of the file so
Emacs can easily find it for future updates.
Jacob Bachmeyer [Sun, 19 Mar 2023 03:49:11 +0000 (22:49 -0500)]
Update copyright notice
Jacob Bachmeyer [Sun, 19 Mar 2023 03:48:48 +0000 (22:48 -0500)]
Rename directive parsing phase and change tag "PV" to "PS"
While there is still some syntactic validation performed during this
phase, using the word "validation" for two steps seems likely to risk
confusion, so this phase is renamed in the interests of clarity.
The testsuite is adjusted accordingly.
Jacob Bachmeyer [Fri, 17 Mar 2023 04:29:44 +0000 (23:29 -0500)]
Remove testsuite support for signature verifications during parsing
This was only present to accommodate the extra signature verification
that as previously used to obtain an email address. The key index now
fills that requirement.
Jacob Bachmeyer [Fri, 17 Mar 2023 04:20:00 +0000 (23:20 -0500)]
Align actual behavior with stated intent
Any directive with a valid signature from any known key should be sent
to the public archive; the internal archive catches the rest that could
include abusive messages from anonymous parties. Previously, the code
could only reliably recognize a valid signature if the directive syntax
is valid. The testsuite is adjusted accordingly.
Jacob Bachmeyer [Fri, 17 Mar 2023 03:49:06 +0000 (22:49 -0500)]
Remove scaffolding that guessed email addresses from signatures
The key index is now queried for email addresses associated with the
key used to sign the directive.
Jacob Bachmeyer [Fri, 17 Mar 2023 03:48:12 +0000 (22:48 -0500)]
Add key index support to gatekeeper
The testsuite is adjusted accordingly to handle signature verfications
during the report phase.
Jacob Bachmeyer [Fri, 17 Mar 2023 03:26:06 +0000 (22:26 -0500)]
Add key index support in gatekeeper test infrastructure
Jacob Bachmeyer [Fri, 17 Mar 2023 03:25:06 +0000 (22:25 -0500)]
Improve testsuite performance
I am not certain what exactly this tickles in Expect, but it dramatically
reduces the running time of the keymaster tests.
Jacob Bachmeyer [Wed, 15 Mar 2023 02:22:34 +0000 (21:22 -0500)]
Remove obsolete scripts for tasks now handled using the keymaster tool
Jacob Bachmeyer [Wed, 15 Mar 2023 02:18:28 +0000 (21:18 -0500)]
Add initial keymaster administrative tool and associated testsuite
Jacob Bachmeyer [Sun, 12 Mar 2023 01:12:48 +0000 (19:12 -0600)]
Fix bug in testsuite keyring checks
Jacob Bachmeyer [Sun, 12 Mar 2023 01:10:00 +0000 (19:10 -0600)]
Add support for whole-keyring export to mock gpg tool
Jacob Bachmeyer [Fri, 10 Mar 2023 04:14:14 +0000 (22:14 -0600)]
Add --batch option to mock gpg tool
Jacob Bachmeyer [Fri, 10 Mar 2023 04:12:49 +0000 (22:12 -0600)]
Add support for key revocation in mock gpg tool
Jacob Bachmeyer [Sat, 21 Jan 2023 02:59:59 +0000 (20:59 -0600)]
Add mock gpg tool for listing and manipulating keyrings
Jacob Bachmeyer [Fri, 16 Dec 2022 03:08:21 +0000 (21:08 -0600)]
Move infrastructure for failure tracking to common "mock" tool init file
Jacob Bachmeyer [Tue, 6 Dec 2022 03:09:21 +0000 (21:09 -0600)]
Revise mock tool testsuite to prepare for additional tests
A mock GPG for handling keyrings will soon be added to support testing the
keymaster tool currently under early development.
Jacob Bachmeyer [Wed, 30 Nov 2022 02:20:44 +0000 (20:20 -0600)]
Change default GNUPGHOME in mock signature verification tool
This reduces the possibility of confusion, and will be more important when
a mock GPG is implemented to support testing the keymaster tool.
Jacob Bachmeyer [Fri, 13 Jan 2023 04:42:48 +0000 (22:42 -0600)]
Tidy whitespace
Jacob Bachmeyer [Fri, 13 Jan 2023 04:42:28 +0000 (22:42 -0600)]
Remove "pgpg" helper script
Jacob Bachmeyer [Fri, 13 Jan 2023 04:38:22 +0000 (22:38 -0600)]
Merge from upstream
Ian Kelling [Tue, 10 Jan 2023 09:57:11 +0000 (04:57 -0500)]
minor: punctuation
Ian Kelling [Tue, 10 Jan 2023 09:32:24 +0000 (04:32 -0500)]
minor: README
Ian Kelling [Tue, 10 Jan 2023 09:31:11 +0000 (04:31 -0500)]
make README be a basic overview of this package
Ian Kelling [Tue, 10 Jan 2023 06:48:40 +0000 (01:48 -0500)]
add license header to tiny scripts for completeness
Ian Kelling [Tue, 10 Jan 2023 06:44:27 +0000 (01:44 -0500)]
add overlooked ftp-rmkey.sh file
Jacob Bachmeyer [Wed, 23 Nov 2022 03:38:50 +0000 (21:38 -0600)]
Preserve error string during rename checks at initialization
The test file is unlinked if a rename call fails; this could reset $! to
indicate success, so the initial value of $! is saved first.
Jacob Bachmeyer [Wed, 23 Nov 2022 03:31:42 +0000 (21:31 -0600)]
Rename "in-stage" directory to "scratch" directory
Jacob Bachmeyer [Wed, 23 Nov 2022 03:31:00 +0000 (21:31 -0600)]
Rename "incoming" directory to "inbox" directory
Jacob Bachmeyer [Wed, 23 Nov 2022 00:42:30 +0000 (18:42 -0600)]
Reorganize log message patterns in testsuite
This groups the message patterns by processing phase.
Prior to committing, this was validated with:
(DIFF='git diff --cached';
comm -3 <($DIFF | grep ^- | sed -e 's/^-//' | sort) \
<($DIFF | grep ^+ | sed -e 's/^+//' | sort) )
The output shows only a blank line and diff headers. To replicate, change
the "git diff" command to compare this commit with its parent.
Jacob Bachmeyer [Tue, 22 Nov 2022 04:58:48 +0000 (22:58 -0600)]
Remove another piece of testsuite scaffolding
Jacob Bachmeyer [Tue, 22 Nov 2022 04:32:16 +0000 (22:32 -0600)]
Remove testsuite scaffolding for verification during execution phase
All signatures are now verified before the execution phase begins.
Jacob Bachmeyer [Tue, 22 Nov 2022 04:24:16 +0000 (22:24 -0600)]
Remove testsuite scaffolding for the validation phase
Jacob Bachmeyer [Tue, 22 Nov 2022 04:16:32 +0000 (22:16 -0600)]
Remove testsuite logic that supported email outside of report phase
All email messages are now sent during the report phase.
Jacob Bachmeyer [Tue, 22 Nov 2022 04:07:07 +0000 (22:07 -0600)]
Remove obsolete message pattern from testsuite
Jacob Bachmeyer [Tue, 22 Nov 2022 03:56:35 +0000 (21:56 -0600)]
Add tests for inbox and scratch cleanup
Jacob Bachmeyer [Sun, 20 Nov 2022 04:10:21 +0000 (22:10 -0600)]
Reorganize gatekeeper to reflect processing phases
Prior to committing, this was validated with:
(DIFF='git diff --cached';
comm -3 <($DIFF | grep ^- | sed -e 's/^-//' | sort) \
<($DIFF | grep ^+ | sed -e 's/^+//' | sort) )
The output shows only blank lines, diff headers, POD structure, and the
addition of a forward declaration for verify_clearsigned_message as a
temporary measure ahead of a call that will eventually be removed, after
all lines are sorted and paired for analysis. To replicate, change the
"git diff" command to compare this commit with its parent.
Jacob Bachmeyer [Sun, 20 Nov 2022 03:40:50 +0000 (21:40 -0600)]
Remove obsolete comment
Jacob Bachmeyer [Sun, 20 Nov 2022 03:20:20 +0000 (21:20 -0600)]
Move directive archival to report phase
Each successfully processed directive is sent to a public archival list,
but directives not signed with a known key or with invalid syntax are only
sent to the internal report inbox.
This commit also reverts the testsuite changes from the previous
commit
f9e77b3dd2d94986ff095abd4c50fb957196b05b.
Jacob Bachmeyer [Fri, 18 Nov 2022 04:39:39 +0000 (22:39 -0600)]
Refactor install_files as execute_install
This also moves staging files and validating that the "replace" option is
set if needed to top-level.
Jacob Bachmeyer [Fri, 18 Nov 2022 04:14:24 +0000 (22:14 -0600)]
Factor move_filepair out of install_files
Jacob Bachmeyer [Fri, 18 Nov 2022 03:58:17 +0000 (21:58 -0600)]
Merge execute_commands into top-level
Jacob Bachmeyer [Fri, 18 Nov 2022 03:54:55 +0000 (21:54 -0600)]
Factor symlink operations out of execute_commands
Jacob Bachmeyer [Fri, 18 Nov 2022 03:09:23 +0000 (21:09 -0600)]
Proofread POD
Jacob Bachmeyer [Fri, 18 Nov 2022 03:09:00 +0000 (21:09 -0600)]
Convert section heading comments to POD section headings
This commit also removes some leftover comments.
Jacob Bachmeyer [Fri, 18 Nov 2022 02:53:29 +0000 (20:53 -0600)]
Update internal documentation to reflect improvements
Jacob Bachmeyer [Fri, 18 Nov 2022 02:43:51 +0000 (20:43 -0600)]
Add checks to avoid removing backup files in scan_incoming
Also update internal documentation and adjust testsuite to properly cover
the new edge case.
Jacob Bachmeyer [Thu, 17 Nov 2022 04:04:40 +0000 (22:04 -0600)]
Revise calls to ftp_syslog
The ftp_syslog procedure now requires exactly two arguments and all calls
have been changed to use Perl's fat comma and its implicit quoting for the
syslog severity keywords.
Jacob Bachmeyer [Thu, 17 Nov 2022 03:54:40 +0000 (21:54 -0600)]
Add POD block for ftp_syslog
Jacob Bachmeyer [Thu, 17 Nov 2022 03:54:25 +0000 (21:54 -0600)]
Rename local variable in ftp_syslog
This change of terms aligns with RFC3164.
Jacob Bachmeyer [Thu, 17 Nov 2022 03:43:44 +0000 (21:43 -0600)]
Fixup oversights in recent commits
Jacob Bachmeyer [Thu, 17 Nov 2022 03:41:21 +0000 (21:41 -0600)]
Rename ftp_abort to abort
Jacob Bachmeyer [Thu, 17 Nov 2022 03:38:58 +0000 (21:38 -0600)]
Explain intended use of ftp_abort
Jacob Bachmeyer [Thu, 17 Nov 2022 03:38:48 +0000 (21:38 -0600)]
Reindent ftp_abort
Jacob Bachmeyer [Thu, 17 Nov 2022 03:35:10 +0000 (21:35 -0600)]
Revise calls to ftp_abort
Since ftp_abort is used as an alternative to the die builtin for certain
severe errors, the calls are regularized to omit parentheses.
Jacob Bachmeyer [Thu, 17 Nov 2022 03:31:13 +0000 (21:31 -0600)]
Revise some abort messages
These are minor changes for consistency and to report errors.
Jacob Bachmeyer [Thu, 17 Nov 2022 03:28:36 +0000 (21:28 -0600)]
Revise ftp_abort and add POD block
The second argument is no longer used and is redundant with the
$AbortExitCode global variable, so it is removed.
Jacob Bachmeyer [Thu, 17 Nov 2022 03:18:56 +0000 (21:18 -0600)]
Add POD block for report_upload_to_archive procedure
Jacob Bachmeyer [Thu, 17 Nov 2022 03:14:42 +0000 (21:14 -0600)]
Remove quasi-global %info hash
Jacob Bachmeyer [Thu, 17 Nov 2022 03:11:16 +0000 (21:11 -0600)]
Revise mail to remove use of quasi-global %info hash
Jacob Bachmeyer [Thu, 17 Nov 2022 02:52:11 +0000 (20:52 -0600)]
Revise reporting of replaced files
Jacob Bachmeyer [Thu, 17 Nov 2022 02:17:45 +0000 (20:17 -0600)]
Fix message describing replacement of a file
This message is written to the log before the file has even been moved to
the staging directory, therefore it should not be past tense.
Jacob Bachmeyer [Wed, 16 Nov 2022 03:37:22 +0000 (21:37 -0600)]
Add detail when reporting inability to exec GPG
Jacob Bachmeyer [Wed, 16 Nov 2022 01:01:46 +0000 (19:01 -0600)]
Improve reporting of overwrites when installing files
The reported name is now the logical name in the published tree instead of
the actual name on the server's filesystem.
Jacob Bachmeyer [Wed, 16 Nov 2022 00:52:30 +0000 (18:52 -0600)]
Rename debug procedure to reflect its actual usage and simplify call
Jacob Bachmeyer [Wed, 16 Nov 2022 00:45:45 +0000 (18:45 -0600)]
Tidy configured email address
Jacob Bachmeyer [Wed, 16 Nov 2022 00:45:24 +0000 (18:45 -0600)]
Rename variables holding email addresses to better describe their uses
Jacob Bachmeyer [Wed, 16 Nov 2022 00:26:42 +0000 (18:26 -0600)]
Merge success_upload and success_directive into top-level
Jacob Bachmeyer [Wed, 16 Nov 2022 00:14:45 +0000 (18:14 -0600)]
Move all collection of email addresses to top-level
The 'email' and 'package' keys in the quasi-global %info hash remain as
implicit arguments to mail for the time being.
Jacob Bachmeyer [Wed, 16 Nov 2022 00:10:50 +0000 (18:10 -0600)]
Add target directory to directive_syntax exceptions
This will allow the exception handling to easily look up the email
addresses that are to be notified, since a directive_syntax exception can
be thrown before the normal processing collects this information.
Jacob Bachmeyer [Tue, 15 Nov 2022 23:13:45 +0000 (17:13 -0600)]
Remove directive text parameter to interpret_directive