From c933f12f9c39d7c076f84252c081c3430be72e55 Mon Sep 17 00:00:00 2001 From: David Steele Date: Tue, 10 Dec 2019 13:28:15 -0500 Subject: [PATCH] Remove obsolete --perl-option option. This option was used when Perl was executed instead of being embedded. It has been obsolete for a long time so remove it. --- build/lib/pgBackRestBuild/Config/Data.pm | 30 ---------------------- lib/pgBackRest/LibCAuto.pm | 1 - src/config/config.auto.c | 9 ------- src/config/config.auto.h | 5 +--- src/config/define.auto.c | 32 ------------------------ src/config/define.auto.h | 1 - src/config/parse.auto.c | 13 ---------- src/perl/embed.auto.c | 1 - test/src/module/perl/configTest.c | 8 ------ 9 files changed, 1 insertion(+), 99 deletions(-) diff --git a/build/lib/pgBackRestBuild/Config/Data.pm b/build/lib/pgBackRestBuild/Config/Data.pm index 561dd048d..8c023f18b 100644 --- a/build/lib/pgBackRestBuild/Config/Data.pm +++ b/build/lib/pgBackRestBuild/Config/Data.pm @@ -202,10 +202,6 @@ use constant CFGOPT_LOG_PATH => 'log-path use constant CFGOPT_SPOOL_PATH => 'spool-path'; push @EXPORT, qw(CFGOPT_SPOOL_PATH); -# Perl -use constant CFGOPT_PERL_OPTION => 'perl-option'; - push @EXPORT, qw(CFGOPT_PERL_OPTION); - # Logging use constant CFGOPT_LOG_LEVEL_CONSOLE => 'log-level-console'; push @EXPORT, qw(CFGOPT_LOG_LEVEL_CONSOLE); @@ -1388,32 +1384,6 @@ my %hConfigDefine = }, }, - &CFGOPT_PERL_OPTION => - { - &CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL, - &CFGDEF_TYPE => CFGDEF_TYPE_LIST, - &CFGDEF_REQUIRED => false, - &CFGDEF_INTERNAL => true, - &CFGDEF_COMMAND => - { - &CFGCMD_ARCHIVE_GET => {}, - &CFGCMD_ARCHIVE_GET_ASYNC => {}, - &CFGCMD_ARCHIVE_PUSH => {}, - &CFGCMD_ARCHIVE_PUSH_ASYNC => {}, - &CFGCMD_BACKUP => {}, - &CFGCMD_CHECK => {}, - &CFGCMD_EXPIRE => {}, - &CFGCMD_INFO => {}, - &CFGCMD_LOCAL => {}, - &CFGCMD_REMOTE => {}, - &CFGCMD_RESTORE => {}, - &CFGCMD_STANZA_CREATE => {}, - &CFGCMD_STANZA_UPGRADE => {}, - &CFGCMD_START => {}, - &CFGCMD_STOP => {}, - }, - }, - &CFGOPT_PROTOCOL_TIMEOUT => { &CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL, diff --git a/lib/pgBackRest/LibCAuto.pm b/lib/pgBackRest/LibCAuto.pm index 6beb65be3..75c4df9fa 100644 --- a/lib/pgBackRest/LibCAuto.pm +++ b/lib/pgBackRest/LibCAuto.pm @@ -173,7 +173,6 @@ sub libcAutoExportTag 'CFGOPT_NEUTRAL_UMASK', 'CFGOPT_ONLINE', 'CFGOPT_OUTPUT', - 'CFGOPT_PERL_OPTION', 'CFGOPT_PG_HOST', 'CFGOPT_PG_HOST2', 'CFGOPT_PG_HOST3', diff --git a/src/config/config.auto.c b/src/config/config.auto.c index 73bd8c825..ed657dbbd 100644 --- a/src/config/config.auto.c +++ b/src/config/config.auto.c @@ -340,7 +340,6 @@ STRING_EXTERN(CFGOPT_MANIFEST_SAVE_THRESHOLD_STR, CFGOPT_MANIF STRING_EXTERN(CFGOPT_NEUTRAL_UMASK_STR, CFGOPT_NEUTRAL_UMASK); STRING_EXTERN(CFGOPT_ONLINE_STR, CFGOPT_ONLINE); STRING_EXTERN(CFGOPT_OUTPUT_STR, CFGOPT_OUTPUT); -STRING_EXTERN(CFGOPT_PERL_OPTION_STR, CFGOPT_PERL_OPTION); STRING_EXTERN(CFGOPT_PG1_HOST_STR, CFGOPT_PG1_HOST); STRING_EXTERN(CFGOPT_PG2_HOST_STR, CFGOPT_PG2_HOST); STRING_EXTERN(CFGOPT_PG3_HOST_STR, CFGOPT_PG3_HOST); @@ -777,14 +776,6 @@ static ConfigOptionData configOptionData[CFG_OPTION_TOTAL] = CONFIG_OPTION_LIST CONFIG_OPTION_DEFINE_ID(cfgDefOptOutput) ) - //------------------------------------------------------------------------------------------------------------------------------ - CONFIG_OPTION - ( - CONFIG_OPTION_NAME(CFGOPT_PERL_OPTION) - CONFIG_OPTION_INDEX(0) - CONFIG_OPTION_DEFINE_ID(cfgDefOptPerlOption) - ) - //------------------------------------------------------------------------------------------------------------------------------ CONFIG_OPTION ( diff --git a/src/config/config.auto.h b/src/config/config.auto.h index de26b5d93..5fd814b0d 100644 --- a/src/config/config.auto.h +++ b/src/config/config.auto.h @@ -129,8 +129,6 @@ Option constants STRING_DECLARE(CFGOPT_ONLINE_STR); #define CFGOPT_OUTPUT "output" STRING_DECLARE(CFGOPT_OUTPUT_STR); -#define CFGOPT_PERL_OPTION "perl-option" - STRING_DECLARE(CFGOPT_PERL_OPTION_STR); #define CFGOPT_PG1_HOST "pg1-host" STRING_DECLARE(CFGOPT_PG1_HOST_STR); #define CFGOPT_PG1_HOST_CMD "pg1-host-cmd" @@ -384,7 +382,7 @@ Option constants #define CFGOPT_TYPE "type" STRING_DECLARE(CFGOPT_TYPE_STR); -#define CFG_OPTION_TOTAL 165 +#define CFG_OPTION_TOTAL 164 /*********************************************************************************************************************************** Command enum @@ -456,7 +454,6 @@ typedef enum cfgOptNeutralUmask, cfgOptOnline, cfgOptOutput, - cfgOptPerlOption, cfgOptPgHost, cfgOptPgHost2, cfgOptPgHost3, diff --git a/src/config/define.auto.c b/src/config/define.auto.c index 9592cdfc4..ebe2657eb 100644 --- a/src/config/define.auto.c +++ b/src/config/define.auto.c @@ -1943,38 +1943,6 @@ static ConfigDefineOptionData configDefineOptionData[] = CFGDEFDATA_OPTION_LIST ) ) - // ----------------------------------------------------------------------------------------------------------------------------- - CFGDEFDATA_OPTION - ( - CFGDEFDATA_OPTION_NAME("perl-option") - CFGDEFDATA_OPTION_REQUIRED(false) - CFGDEFDATA_OPTION_SECTION(cfgDefSectionGlobal) - CFGDEFDATA_OPTION_TYPE(cfgDefOptTypeList) - CFGDEFDATA_OPTION_INTERNAL(true) - - CFGDEFDATA_OPTION_INDEX_TOTAL(1) - CFGDEFDATA_OPTION_SECURE(false) - - CFGDEFDATA_OPTION_COMMAND_LIST - ( - CFGDEFDATA_OPTION_COMMAND(cfgDefCmdArchiveGet) - CFGDEFDATA_OPTION_COMMAND(cfgDefCmdArchiveGetAsync) - CFGDEFDATA_OPTION_COMMAND(cfgDefCmdArchivePush) - CFGDEFDATA_OPTION_COMMAND(cfgDefCmdArchivePushAsync) - CFGDEFDATA_OPTION_COMMAND(cfgDefCmdBackup) - CFGDEFDATA_OPTION_COMMAND(cfgDefCmdCheck) - CFGDEFDATA_OPTION_COMMAND(cfgDefCmdExpire) - CFGDEFDATA_OPTION_COMMAND(cfgDefCmdInfo) - CFGDEFDATA_OPTION_COMMAND(cfgDefCmdLocal) - CFGDEFDATA_OPTION_COMMAND(cfgDefCmdRemote) - CFGDEFDATA_OPTION_COMMAND(cfgDefCmdRestore) - CFGDEFDATA_OPTION_COMMAND(cfgDefCmdStanzaCreate) - CFGDEFDATA_OPTION_COMMAND(cfgDefCmdStanzaUpgrade) - CFGDEFDATA_OPTION_COMMAND(cfgDefCmdStart) - CFGDEFDATA_OPTION_COMMAND(cfgDefCmdStop) - ) - ) - // ----------------------------------------------------------------------------------------------------------------------------- CFGDEFDATA_OPTION ( diff --git a/src/config/define.auto.h b/src/config/define.auto.h index 7152c1322..65b7d4de3 100644 --- a/src/config/define.auto.h +++ b/src/config/define.auto.h @@ -90,7 +90,6 @@ typedef enum cfgDefOptNeutralUmask, cfgDefOptOnline, cfgDefOptOutput, - cfgDefOptPerlOption, cfgDefOptPgHost, cfgDefOptPgHostCmd, cfgDefOptPgHostConfig, diff --git a/src/config/parse.auto.c b/src/config/parse.auto.c index c222fe107..89673a40a 100644 --- a/src/config/parse.auto.c +++ b/src/config/parse.auto.c @@ -472,18 +472,6 @@ static const struct option optionList[] = .val = PARSE_OPTION_FLAG | cfgOptOutput, }, - // perl-option option - // ----------------------------------------------------------------------------------------------------------------------------- - { - .name = CFGOPT_PERL_OPTION, - .has_arg = required_argument, - .val = PARSE_OPTION_FLAG | cfgOptPerlOption, - }, - { - .name = "reset-" CFGOPT_PERL_OPTION, - .val = PARSE_OPTION_FLAG | PARSE_RESET_FLAG | cfgOptPerlOption, - }, - // pg-host option and deprecations // ----------------------------------------------------------------------------------------------------------------------------- { @@ -2294,7 +2282,6 @@ static const ConfigOption optionResolveOrder[] = cfgOptNeutralUmask, cfgOptOnline, cfgOptOutput, - cfgOptPerlOption, cfgOptPgHost, cfgOptPgHost + 1, cfgOptPgHost + 2, diff --git a/src/perl/embed.auto.c b/src/perl/embed.auto.c index 48722c85f..1b4f720fc 100644 --- a/src/perl/embed.auto.c +++ b/src/perl/embed.auto.c @@ -7581,7 +7581,6 @@ static const EmbeddedModule embeddedModule[] = "'CFGOPT_NEUTRAL_UMASK',\n" "'CFGOPT_ONLINE',\n" "'CFGOPT_OUTPUT',\n" - "'CFGOPT_PERL_OPTION',\n" "'CFGOPT_PG_HOST',\n" "'CFGOPT_PG_HOST2',\n" "'CFGOPT_PG_HOST3',\n" diff --git a/test/src/module/perl/configTest.c b/test/src/module/perl/configTest.c index 3b2dac09d..3b572a4b9 100644 --- a/test/src/module/perl/configTest.c +++ b/test/src/module/perl/configTest.c @@ -97,19 +97,11 @@ testRun(void) strLstAdd(commandParamList, strNew("param2")); cfgCommandParamSet(commandParamList); - cfgOptionValidSet(cfgOptPerlOption, true); - StringList *perlList = strLstNew(); - strLstAdd(perlList, strNew("-I.")); - strLstAdd(perlList, strNew("-MDevel::Cover=-silent,1")); - cfgOptionSet(cfgOptPerlOption, cfgSourceParam, varNewVarLst(varLstNewStrLst(perlList))); - TEST_RESULT_STR( strPtr(perlOptionJson()), "{" "\"db-include\":{\"negate\":false,\"reset\":false,\"source\":\"param\",\"valid\":true," "\"value\":{\"db1\":true,\"db2\":true}}," - "\"perl-option\":{\"negate\":false,\"reset\":false,\"source\":\"param\",\"valid\":true," - "\"value\":{\"-I.\":true,\"-MDevel::Cover=-silent,1\":true}}," "\"recovery-option\":{\"negate\":false,\"reset\":false,\"source\":\"param\",\"valid\":true," "\"value\":{\"primary_conn_info\":\"blah\",\"standby_mode\":\"on\"}}" "}",