From 3f2d8e290c24bd93fc21b8bcbc3d96a7b2642e58 Mon Sep 17 00:00:00 2001 From: Jacob Bachmeyer Date: Tue, 28 Mar 2023 22:06:33 -0500 Subject: [PATCH] Remove "serials" configuration parameter The serials file is now always name "serials" in pkgstatedir. --- gatekeeper.pl | 9 +-------- testsuite/gatekeeper.all/20_config.exp | 2 -- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/gatekeeper.pl b/gatekeeper.pl index d62b66b..e8b2713 100755 --- a/gatekeeper.pl +++ b/gatekeeper.pl @@ -306,7 +306,6 @@ BEGIN { my $c_dir_Stage; # CONF_DIR_Staging my $c_dir_Public; # CONF_DIR_Public my $c_dir_Archive; # CONF_DIR_Archive - my $c_Serials_FileName; # CONF_FILE_Serials # Read the configuration file. unless ($want_help || $want_version) { @@ -332,7 +331,6 @@ BEGIN { $c_Package_Config =File::Spec->catdir($base, 'packages'); $c_Package_State = File::Spec->catdir($base, 'state'); - $c_Serials_FileName = 'serial.txt'; $c_dir_Inbox = File::Spec->catdir($base, 'inbox'); $c_dir_Scratch = File::Spec->catdir($base, 'scratch'); @@ -393,7 +391,6 @@ BEGIN { $c_Package_Config = $ZoneConfig{pkgconfdir}; $c_Package_State = $ZoneConfig{pkgstatedir}; - $c_Serials_FileName = $ZoneConfig{serials}; $c_dir_Inbox = $ZoneConfig{inboxdir}; $c_dir_Scratch = $ZoneConfig{scratchdir}; @@ -412,7 +409,6 @@ BEGIN { foreach my $item ([tag => $c_Zone_Tag], [logtag => $c_Log_Tag], [pkgconfdir => $c_Package_Config], [pkgstatedir => $c_Package_State], - [serials => $c_Serials_FileName], [inboxdir => $c_dir_Inbox], [scratchdir => $c_dir_Scratch], [stagedir => $c_dir_Stage], @@ -486,8 +482,6 @@ BEGIN { constant->import(CONF_DIR_Public => $c_dir_Public); constant->import(CONF_DIR_Archive => $c_dir_Archive); - constant->import(CONF_FILE_Serials => $c_Serials_FileName); - exit 0 if $CheckConfigurationParse; # stop here if checking parser } @@ -2409,8 +2403,7 @@ sub advance_timestamp_ratchet { my $full_filename = shift; my $new_epoch = shift; - return unless defined CONF_FILE_Serials; - my $serials_path = File::Spec->catfile(CONF_DIR_State, CONF_FILE_Serials); + my $serials_path = File::Spec->catfile(CONF_DIR_State, 'serials'); # Now we need to flock the our 'serials' file; # verify the epoch value there/update it, etc. diff --git a/testsuite/gatekeeper.all/20_config.exp b/testsuite/gatekeeper.all/20_config.exp index 428f784..ad14950 100644 --- a/testsuite/gatekeeper.all/20_config.exp +++ b/testsuite/gatekeeper.all/20_config.exp @@ -228,7 +228,6 @@ archivedir = /srv/gatetest/archive-foo # logtag defaults to capitalized zone name pkgconfdir = /srv/gatetest/config-bar pkgstatedir = /srv/gatetest/state-bar -serials = serials-bar.txt inboxdir = /srv/gatetest/inbox-bar scratchdir = /srv/gatetest/scratch-bar stagedir = /srv/gatetest/stage-bar @@ -261,7 +260,6 @@ do_configuration_test "parse zone configuration: bar" zone.conf \ {tag = bar[\r\n]+logtag = Bar[\r\n]+} {pkgconfdir = /srv/gatetest/config-bar} {pkgstatedir = /srv/gatetest/state-bar} - {serials = serials-bar[.]txt} {inboxdir = /srv/gatetest/inbox-bar} {scratchdir = /srv/gatetest/scratch-bar} {stagedir = /srv/gatetest/stage-bar} -- 2.25.1