gatekeeper.git
20 months agoIgnore generated documentation files
Jacob Bachmeyer [Wed, 5 Apr 2023 02:25:52 +0000 (21:25 -0500)]
Ignore generated documentation files

20 months agoFix misunderstanding in FTP index builder
Jacob Bachmeyer [Tue, 4 Apr 2023 02:12:00 +0000 (21:12 -0500)]
Fix misunderstanding in FTP index builder

20 months agoHandle tainted values if --with-gpgv or --with-lsof options are used
Jacob Bachmeyer [Sun, 2 Apr 2023 01:14:16 +0000 (20:14 -0500)]
Handle tainted values if --with-gpgv or --with-lsof options are used

20 months agoExpand FTP index builder tool
Jacob Bachmeyer [Sun, 2 Apr 2023 01:03:32 +0000 (20:03 -0500)]
Expand FTP index builder tool

20 months agoUse FTP index builder in gatekeeper source tree
Jacob Bachmeyer [Sat, 1 Apr 2023 18:16:15 +0000 (13:16 -0500)]
Use FTP index builder in gatekeeper source tree

20 months agoRemove "send-gpg-public-keys.sh"
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.

20 months agoRename "generate-ftpindex.sh" to "make-ftpindex.sh"
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.

20 months agoDocument "--with-gpg" keymaster option
Jacob Bachmeyer [Sat, 1 Apr 2023 03:41:06 +0000 (22:41 -0500)]
Document "--with-gpg" keymaster option

20 months agoFix documentation error
Jacob Bachmeyer [Fri, 31 Mar 2023 03:00:03 +0000 (22:00 -0500)]
Fix documentation error

20 months agoFix documentation formatting error
Jacob Bachmeyer [Thu, 30 Mar 2023 23:51:51 +0000 (18:51 -0500)]
Fix documentation formatting error

20 months agoRemove "serials" configuration parameter
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.

20 months agoRename "maintainermap" configuration item to "maintainerlist"
Jacob Bachmeyer [Wed, 29 Mar 2023 03:05:26 +0000 (22:05 -0500)]
Rename "maintainermap" configuration item to "maintainerlist"

20 months agoUse proper pkgstatedir with testsuite
Jacob Bachmeyer [Wed, 29 Mar 2023 03:04:05 +0000 (22:04 -0500)]
Use proper pkgstatedir with testsuite

20 months agoMove email addresses to configuration file
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.

20 months agoIgnore default configuration file
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.

20 months agoEnforce MAX_FILE_NAME_LEN on implied directory names
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.

20 months agoRemove symlinks to gatekeeper
Jacob Bachmeyer [Sun, 26 Mar 2023 01:22:01 +0000 (20:22 -0500)]
Remove symlinks to gatekeeper

20 months agoUpdate online help to reflect move of zones to configuration
Jacob Bachmeyer [Sun, 26 Mar 2023 01:21:35 +0000 (20:21 -0500)]
Update online help to reflect move of zones to configuration

20 months agoImport GNU Free Documentation License 1.3
Jacob Bachmeyer [Sat, 25 Mar 2023 02:39:00 +0000 (21:39 -0500)]
Import GNU Free Documentation License 1.3

20 months agoImport Texinfo macros
Jacob Bachmeyer [Sat, 25 Mar 2023 02:38:29 +0000 (21:38 -0500)]
Import Texinfo macros

20 months agoRemove unneeded "global spawn_id" links in testsuite
Jacob Bachmeyer [Sat, 25 Mar 2023 01:02:22 +0000 (20:02 -0500)]
Remove unneeded "global spawn_id" links in testsuite

20 months agoFix bug in test driver
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.

20 months agoRefactor configuration as constants in the gatekeeper
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.

20 months agoRevise global storage for serials file name
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.

20 months agoRemove ZONE constant and rename variable
Jacob Bachmeyer [Thu, 23 Mar 2023 03:37:37 +0000 (22:37 -0500)]
Remove ZONE constant and rename variable

20 months agoRemove obsolete "-s" alias for --zone option
Jacob Bachmeyer [Thu, 23 Mar 2023 03:24:13 +0000 (22:24 -0500)]
Remove obsolete "-s" alias for --zone option

20 months agoAdd tests to complete code coverage for configuration parsing
Jacob Bachmeyer [Thu, 23 Mar 2023 03:00:44 +0000 (22:00 -0500)]
Add tests to complete code coverage for configuration parsing

20 months agoAdd overlooked configuration item
Jacob Bachmeyer [Thu, 23 Mar 2023 02:37:48 +0000 (21:37 -0500)]
Add overlooked configuration item

20 months agoAdd tests for gatekeeper configuration parsing
Jacob Bachmeyer [Thu, 23 Mar 2023 02:30:16 +0000 (21:30 -0500)]
Add tests for gatekeeper configuration parsing

20 months agoAdd blank line in testsuite output before version message
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.

20 months agoAdd initial configuration support to gatekeeper
Jacob Bachmeyer [Thu, 23 Mar 2023 01:50:00 +0000 (20:50 -0500)]
Add initial configuration support to gatekeeper

20 months agoAdd options for specifying gpgv and lsof tools
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.

20 months agoReport an error if an unrecognized option is given to the gatekeeper
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

20 months agoRevise version message in 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.

20 months agoUpdate copyright notice
Jacob Bachmeyer [Sun, 19 Mar 2023 03:49:11 +0000 (22:49 -0500)]
Update copyright notice

20 months agoRename directive parsing phase and change tag "PV" to "PS"
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.

20 months agoRemove testsuite support for signature verifications during parsing
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.

20 months agoAlign actual behavior with stated intent
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.

20 months agoRemove scaffolding that guessed email addresses from signatures
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.

20 months agoAdd key index support to gatekeeper
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.

20 months agoAdd key index support in gatekeeper test infrastructure
Jacob Bachmeyer [Fri, 17 Mar 2023 03:26:06 +0000 (22:26 -0500)]
Add key index support in gatekeeper test infrastructure

20 months agoImprove testsuite performance
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.

20 months agoRemove obsolete scripts for tasks now handled using the keymaster tool
Jacob Bachmeyer [Wed, 15 Mar 2023 02:22:34 +0000 (21:22 -0500)]
Remove obsolete scripts for tasks now handled using the keymaster tool

20 months agoAdd initial keymaster administrative tool and associated testsuite
Jacob Bachmeyer [Wed, 15 Mar 2023 02:18:28 +0000 (21:18 -0500)]
Add initial keymaster administrative tool and associated testsuite

20 months agoFix bug in testsuite keyring checks
Jacob Bachmeyer [Sun, 12 Mar 2023 01:12:48 +0000 (19:12 -0600)]
Fix bug in testsuite keyring checks

20 months agoAdd support for whole-keyring export to mock gpg tool
Jacob Bachmeyer [Sun, 12 Mar 2023 01:10:00 +0000 (19:10 -0600)]
Add support for whole-keyring export to mock gpg tool

20 months agoAdd --batch option to mock gpg tool
Jacob Bachmeyer [Fri, 10 Mar 2023 04:14:14 +0000 (22:14 -0600)]
Add --batch option to mock gpg tool

20 months agoAdd support for key revocation in 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

22 months agoAdd mock gpg tool for listing and manipulating keyrings
Jacob Bachmeyer [Sat, 21 Jan 2023 02:59:59 +0000 (20:59 -0600)]
Add mock gpg tool for listing and manipulating keyrings

22 months agoMove infrastructure for failure tracking to common "mock" tool init file
Jacob Bachmeyer [Fri, 16 Dec 2022 03:08:21 +0000 (21:08 -0600)]
Move infrastructure for failure tracking to common "mock" tool init file

22 months agoRevise mock tool testsuite to prepare for additional tests
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.

22 months agoChange default GNUPGHOME in mock signature verification tool
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.

22 months agoTidy whitespace
Jacob Bachmeyer [Fri, 13 Jan 2023 04:42:48 +0000 (22:42 -0600)]
Tidy whitespace

22 months agoRemove "pgpg" helper script
Jacob Bachmeyer [Fri, 13 Jan 2023 04:42:28 +0000 (22:42 -0600)]
Remove "pgpg" helper script

22 months agoMerge from upstream
Jacob Bachmeyer [Fri, 13 Jan 2023 04:38:22 +0000 (22:38 -0600)]
Merge from upstream

22 months agominor: punctuation
Ian Kelling [Tue, 10 Jan 2023 09:57:11 +0000 (04:57 -0500)]
minor: punctuation

22 months agominor: README
Ian Kelling [Tue, 10 Jan 2023 09:32:24 +0000 (04:32 -0500)]
minor: README

22 months agomake README be a basic overview of this package
Ian Kelling [Tue, 10 Jan 2023 09:31:11 +0000 (04:31 -0500)]
make README be a basic overview of this package

22 months agoadd license header to tiny scripts for completeness
Ian Kelling [Tue, 10 Jan 2023 06:48:40 +0000 (01:48 -0500)]
add license header to tiny scripts for completeness

22 months agoadd overlooked ftp-rmkey.sh file
Ian Kelling [Tue, 10 Jan 2023 06:44:27 +0000 (01:44 -0500)]
add overlooked ftp-rmkey.sh file

2 years agoPreserve error string during rename checks at initialization
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.

2 years agoRename "in-stage" directory to "scratch" directory
Jacob Bachmeyer [Wed, 23 Nov 2022 03:31:42 +0000 (21:31 -0600)]
Rename "in-stage" directory to "scratch" directory

2 years agoRename "incoming" directory to "inbox" directory
Jacob Bachmeyer [Wed, 23 Nov 2022 03:31:00 +0000 (21:31 -0600)]
Rename "incoming" directory to "inbox" directory

2 years agoReorganize log message patterns in testsuite
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.

2 years agoRemove another piece of testsuite scaffolding
Jacob Bachmeyer [Tue, 22 Nov 2022 04:58:48 +0000 (22:58 -0600)]
Remove another piece of testsuite scaffolding

2 years agoRemove testsuite scaffolding for verification during execution phase
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.

2 years agoRemove testsuite scaffolding for the validation phase
Jacob Bachmeyer [Tue, 22 Nov 2022 04:24:16 +0000 (22:24 -0600)]
Remove testsuite scaffolding for the validation phase

2 years agoRemove testsuite logic that supported email outside of report 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.

2 years agoRemove obsolete message pattern from testsuite
Jacob Bachmeyer [Tue, 22 Nov 2022 04:07:07 +0000 (22:07 -0600)]
Remove obsolete message pattern from testsuite

2 years agoAdd tests for inbox and scratch cleanup
Jacob Bachmeyer [Tue, 22 Nov 2022 03:56:35 +0000 (21:56 -0600)]
Add tests for inbox and scratch cleanup

2 years agoReorganize gatekeeper to reflect processing phases
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.

2 years agoRemove obsolete comment
Jacob Bachmeyer [Sun, 20 Nov 2022 03:40:50 +0000 (21:40 -0600)]
Remove obsolete comment

2 years agoMove directive archival to report phase
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.

2 years agoRefactor install_files as execute_install
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.

2 years agoFactor move_filepair out of install_files
Jacob Bachmeyer [Fri, 18 Nov 2022 04:14:24 +0000 (22:14 -0600)]
Factor move_filepair out of install_files

2 years agoMerge execute_commands into top-level
Jacob Bachmeyer [Fri, 18 Nov 2022 03:58:17 +0000 (21:58 -0600)]
Merge execute_commands into top-level

2 years agoFactor symlink operations out of execute_commands
Jacob Bachmeyer [Fri, 18 Nov 2022 03:54:55 +0000 (21:54 -0600)]
Factor symlink operations out of execute_commands

2 years agoProofread POD
Jacob Bachmeyer [Fri, 18 Nov 2022 03:09:23 +0000 (21:09 -0600)]
Proofread POD

2 years agoConvert section heading comments to POD section headings
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.

2 years agoUpdate internal documentation to reflect improvements
Jacob Bachmeyer [Fri, 18 Nov 2022 02:53:29 +0000 (20:53 -0600)]
Update internal documentation to reflect improvements

2 years agoAdd checks to avoid removing backup files in scan_incoming
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.

2 years agoRevise calls to ftp_syslog
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.

2 years agoAdd POD block for ftp_syslog
Jacob Bachmeyer [Thu, 17 Nov 2022 03:54:40 +0000 (21:54 -0600)]
Add POD block for ftp_syslog

2 years agoRename local variable in 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.

2 years agoFixup oversights in recent commits
Jacob Bachmeyer [Thu, 17 Nov 2022 03:43:44 +0000 (21:43 -0600)]
Fixup oversights in recent commits

2 years agoRename ftp_abort to abort
Jacob Bachmeyer [Thu, 17 Nov 2022 03:41:21 +0000 (21:41 -0600)]
Rename ftp_abort to abort

2 years agoExplain intended use of ftp_abort
Jacob Bachmeyer [Thu, 17 Nov 2022 03:38:58 +0000 (21:38 -0600)]
Explain intended use of ftp_abort

2 years agoReindent ftp_abort
Jacob Bachmeyer [Thu, 17 Nov 2022 03:38:48 +0000 (21:38 -0600)]
Reindent ftp_abort

2 years agoRevise calls to 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.

2 years agoRevise some abort messages
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.

2 years agoRevise ftp_abort and add POD block
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.

2 years agoAdd POD block for report_upload_to_archive procedure
Jacob Bachmeyer [Thu, 17 Nov 2022 03:18:56 +0000 (21:18 -0600)]
Add POD block for report_upload_to_archive procedure

2 years agoRemove quasi-global %info hash
Jacob Bachmeyer [Thu, 17 Nov 2022 03:14:42 +0000 (21:14 -0600)]
Remove quasi-global %info hash

2 years agoRevise mail to remove use of 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

2 years agoRevise reporting of replaced files
Jacob Bachmeyer [Thu, 17 Nov 2022 02:52:11 +0000 (20:52 -0600)]
Revise reporting of replaced files

2 years agoFix message describing replacement of a file
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.

2 years agoAdd detail when reporting inability to exec GPG
Jacob Bachmeyer [Wed, 16 Nov 2022 03:37:22 +0000 (21:37 -0600)]
Add detail when reporting inability to exec GPG

2 years agoImprove reporting of overwrites when installing files
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.

2 years agoRename debug procedure to reflect its actual usage and simplify call
Jacob Bachmeyer [Wed, 16 Nov 2022 00:52:30 +0000 (18:52 -0600)]
Rename debug procedure to reflect its actual usage and simplify call

2 years agoTidy configured email address
Jacob Bachmeyer [Wed, 16 Nov 2022 00:45:45 +0000 (18:45 -0600)]
Tidy configured email address