diff options
author | Armin Kuster <akuster808@gmail.com> | 2022-05-03 14:31:21 -0700 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2022-05-14 10:51:32 -0700 |
commit | a764533c20c9cedf0834138076d38d329982e1af (patch) | |
tree | 4cedb5cc647faeef6636ad0319b495cf89d8a2ea /dynamic-layers/meta-perl/recipes-security/bastille/files/upgrade_options_processing.patch | |
parent | 20c13f6335165d693f7f3270c829b3069dbbad66 (diff) | |
download | meta-security-a764533c20c9cedf0834138076d38d329982e1af.tar.gz |
meta-security: move perl and python recipes to dynamic layers structure
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'dynamic-layers/meta-perl/recipes-security/bastille/files/upgrade_options_processing.patch')
-rw-r--r-- | dynamic-layers/meta-perl/recipes-security/bastille/files/upgrade_options_processing.patch | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/dynamic-layers/meta-perl/recipes-security/bastille/files/upgrade_options_processing.patch b/dynamic-layers/meta-perl/recipes-security/bastille/files/upgrade_options_processing.patch new file mode 100644 index 0000000..4093867 --- /dev/null +++ b/dynamic-layers/meta-perl/recipes-security/bastille/files/upgrade_options_processing.patch | |||
@@ -0,0 +1,91 @@ | |||
1 | Upstream Status: Inappropriate [No upstream maintenance] | ||
2 | |||
3 | Signed-off-by: Anne Mulhern <mulhern@yoctoproject.org> | ||
4 | |||
5 | --- | ||
6 | |||
7 | Index: Bastille/Bastille/API.pm | ||
8 | =================================================================== | ||
9 | --- Bastille.orig/Bastille/API.pm 2013-08-21 11:41:09.235950000 -0400 | ||
10 | +++ Bastille/Bastille/API.pm 2013-08-21 11:41:16.183950000 -0400 | ||
11 | @@ -271,9 +271,15 @@ | ||
12 | # setOptions takes six arguments, $GLOBAL_DEBUG, $GLOBAL_LOGONLY, | ||
13 | # $GLOBAL_VERBOSE, $GLOBAL_AUDITONLY, $GLOBAL_AUDIT_NO_BROWSER, and GLOBAL_OS; | ||
14 | ########################################################################### | ||
15 | -sub setOptions($$$$$$) { | ||
16 | - ($GLOBAL_DEBUG,$GLOBAL_LOGONLY,$GLOBAL_VERBOSE,$GLOBAL_AUDITONLY, | ||
17 | - $GLOBAL_AUDIT_NO_BROWSER,$GLOBAL_OS) = @_; | ||
18 | +sub setOptions { | ||
19 | + my %opts = @_; | ||
20 | + | ||
21 | + $GLOBAL_DEBUG = $opts{debug}; | ||
22 | + $GLOBAL_LOGONLY = $opts{logonly}; | ||
23 | + $GLOBAL_VERBOSE = $opts{verbose}; | ||
24 | + $GLOBAL_AUDITONLY = $opts{auditonly}; | ||
25 | + $GLOBAL_AUDIT_NO_BROWSER = $opts{audit_no_browser}; | ||
26 | + $GLOBAL_OS = $opts{os}; | ||
27 | if ($GLOBAL_AUDIT_NO_BROWSER) { | ||
28 | $GLOBAL_AUDITONLY = 1; | ||
29 | } | ||
30 | Index: Bastille/BastilleBackEnd | ||
31 | =================================================================== | ||
32 | --- Bastille.orig/BastilleBackEnd 2013-08-21 11:41:09.235950000 -0400 | ||
33 | +++ Bastille/BastilleBackEnd 2013-08-21 12:40:54.055950001 -0400 | ||
34 | @@ -50,15 +50,13 @@ | ||
35 | my $nodisclaim = 0; | ||
36 | my $verbose = 0; | ||
37 | my $force = 0; | ||
38 | -my $log_only = 0; | ||
39 | my $debug = 0; | ||
40 | my $alternate_config=undef; | ||
41 | |||
42 | if( Getopt::Long::GetOptions( "n" => \$nodisclaim, | ||
43 | "v" => \$verbose, | ||
44 | "force" => \$force, | ||
45 | -# "log" => \$log_only, # broken | ||
46 | - "f:s" => \$alternate_config, | ||
47 | + "f=s" => \$alternate_config, | ||
48 | "debug" => \$debug) ) { | ||
49 | $error = 0; # no parse error | ||
50 | |||
51 | @@ -66,7 +64,9 @@ | ||
52 | $error = 1; # parse error | ||
53 | } | ||
54 | |||
55 | -&setOptions($debug,$log_only,$verbose); | ||
56 | +&setOptions( | ||
57 | + debug => $debug, | ||
58 | + verbose => $verbose); | ||
59 | &ConfigureForDistro; | ||
60 | |||
61 | if ( $error ) { # GetOptions couldn't parse all of the args | ||
62 | Index: Bastille/InteractiveBastille | ||
63 | =================================================================== | ||
64 | --- Bastille.orig/InteractiveBastille 2013-08-21 11:41:09.235950000 -0400 | ||
65 | +++ Bastille/InteractiveBastille 2013-08-21 12:40:30.531950001 -0400 | ||
66 | @@ -234,8 +234,8 @@ | ||
67 | "a" => \$audit, | ||
68 | "force" => \$force, | ||
69 | "log" => \$log_only, | ||
70 | - "os:s" => \$os_version, | ||
71 | - "f:s" => \$alternate_config, | ||
72 | + "os=s" => \$os_version, | ||
73 | + "f=s" => \$alternate_config, | ||
74 | "debug" => \$debug) ) { | ||
75 | $error = 0; # no parse error | ||
76 | } else { | ||
77 | @@ -293,7 +293,13 @@ | ||
78 | $UseRequiresRules = 'N'; | ||
79 | } | ||
80 | |||
81 | -&setOptions($debug,$log_only,$verbose,$audit,$auditnobrowser,$os_version); | ||
82 | +&setOptions( | ||
83 | + debug => $debug, | ||
84 | + logonly => $log_only, | ||
85 | + verbose => $verbose, | ||
86 | + auditonly => $audit, | ||
87 | + audit_no_browser => $auditnobrowser, | ||
88 | + os => $os_version); | ||
89 | &ConfigureForDistro; | ||
90 | |||
91 | # ensuring mutually exclusive options are exclusive | ||