From 7654815dbf81de12493a02063a02c9ee7792b939 Mon Sep 17 00:00:00 2001 From: mulhern Date: Sun, 25 Aug 2013 15:28:48 -0400 Subject: Bastille: Preliminary cleanup of existing patches. [YOCTO #3867] Renames existing patches and removes some changes. Curses-and-IOLoader-changes.patch is renamed to call_output_config.patch. The new patch omits the removal of the pruning step in Load_Questions but retains the replacement of a call to a non-existant function with a call to an appropriate implemented function. yocto-standard-patch.patch is renamed to fixed_defined_warnings.patch. The new patch omits the definition of a yocto distro but includes the defined warnings fix. The recipe file is changed to include the new patches and also to omit a related action in the do_install script. Signed-off-by: mulhern --- recipes-security/bastille/bastille_3.2.1.bb | 5 +- .../files/Curses-and-IOLoader-changes.patch | 50 --------------- .../bastille/files/call_output_config.patch | 19 ++++++ .../bastille/files/fix_version_parse.patch | 6 ++ .../bastille/files/fixed_defined_warnings.patch | 65 +++++++++++++++++++ .../bastille/files/yocto-standard-patch.patch | 72 ---------------------- 6 files changed, 92 insertions(+), 125 deletions(-) delete mode 100644 recipes-security/bastille/files/Curses-and-IOLoader-changes.patch create mode 100644 recipes-security/bastille/files/call_output_config.patch create mode 100644 recipes-security/bastille/files/fixed_defined_warnings.patch delete mode 100644 recipes-security/bastille/files/yocto-standard-patch.patch diff --git a/recipes-security/bastille/bastille_3.2.1.bb b/recipes-security/bastille/bastille_3.2.1.bb index 008f305..1af7b34 100644 --- a/recipes-security/bastille/bastille_3.2.1.bb +++ b/recipes-security/bastille/bastille_3.2.1.bb @@ -17,8 +17,8 @@ SRC_URI = "http://sourceforge.net/projects/bastille-linux/files/bastille-linux/3 file://ServiceAdmin.pm \ file://config \ file://fix_version_parse.patch \ - file://yocto-standard-patch.patch \ - file://Curses-and-IOLoader-changes.patch \ + file://fixed_defined_warnings.patch \ + file://call_output_config.patch \ " SRC_URI[md5sum] = "df803f7e38085aa5da79f85d0539f91b" @@ -136,7 +136,6 @@ do_install () { done ln -s ${D}${sbindir}/RevertBastille ${D}${sbindir}/UndoBastille - sed -i 's/3.8.11-yocto-standard/${KERNEL_VERSION}/g' ${D}${libdir}/Bastille/API.pm } FILES_${PN} += "${datadir}/Bastille ${libdir}/Bastille ${libdir}/perl* ${sysconfdir}/*" diff --git a/recipes-security/bastille/files/Curses-and-IOLoader-changes.patch b/recipes-security/bastille/files/Curses-and-IOLoader-changes.patch deleted file mode 100644 index dfe0698..0000000 --- a/recipes-security/bastille/files/Curses-and-IOLoader-changes.patch +++ /dev/null @@ -1,50 +0,0 @@ -From afa9a32db7f9423b45e0cff898a868de05ad3dee Mon Sep 17 00:00:00 2001 -From: Andrei Dinu -Date: Tue, 30 Jul 2013 12:05:39 +0300 -Subject: [PATCH] Curses and IOLoader changes - -The linux distribution couldn't be identified when -running Bastille, and the question pruning method -couldn't get a match on the questions relevant to -the repo, so it eliminated all questions. - -After answering the questions the checkAndSaveConfig routine -was called which was missing. Replaced it with outputConfig -which exists. - -Signed-off-by: Andrei Dinu ---- - Bastille/IOLoader.pm | 2 +- - Bastille_Curses.pm | 3 ++- - 2 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/Bastille/IOLoader.pm b/Bastille/IOLoader.pm -index abb94d7..995d2c2 100644 ---- a/Bastille/IOLoader.pm -+++ b/Bastille/IOLoader.pm -@@ -68,7 +68,7 @@ sub Load_Questions($) { - my $UseRequiresRules = $_[0]; - - my ($current_module_number,$first_question) = &parse_questions(); -- $first_question = &prune_questions($UseRequiresRules,$first_question); -+ #$first_question = &prune_questions($UseRequiresRules,$first_question); - $firstQuestion = $first_question; - &B_log("DEBUG","Load Questions, first question: $first_question"); - &validate_questions(); -diff --git a/Bastille_Curses.pm b/Bastille_Curses.pm -index 2e1eef4..a2dfb34 100644 ---- a/Bastille_Curses.pm -+++ b/Bastille_Curses.pm -@@ -84,7 +84,8 @@ sub do_Bastille { - } - - # Output answers to the script and display -- &checkAndSaveConfig(&getGlobal('BFILE', "config")); -+ -+ &outputConfig - - # Run Bastille - --- -1.7.9.5 - diff --git a/recipes-security/bastille/files/call_output_config.patch b/recipes-security/bastille/files/call_output_config.patch new file mode 100644 index 0000000..1e898b1 --- /dev/null +++ b/recipes-security/bastille/files/call_output_config.patch @@ -0,0 +1,19 @@ +Upstream Status: Inappropriate [No upstream maintenance] + +Signed-off-by: Anne Mulhern + +--- + +Index: Bastille/Bastille_Curses.pm +=================================================================== +--- Bastille.orig/Bastille_Curses.pm 2013-08-21 08:58:53.899950000 -0400 ++++ Bastille/Bastille_Curses.pm 2013-08-21 09:20:20.295950005 -0400 +@@ -84,7 +84,7 @@ + } + + # Output answers to the script and display +- &checkAndSaveConfig(&getGlobal('BFILE', "config")); ++ &outputConfig; + + # Run Bastille + diff --git a/recipes-security/bastille/files/fix_version_parse.patch b/recipes-security/bastille/files/fix_version_parse.patch index 3163af1..5923c04 100644 --- a/recipes-security/bastille/files/fix_version_parse.patch +++ b/recipes-security/bastille/files/fix_version_parse.patch @@ -1,3 +1,9 @@ +Upstream Status: Inappropriate [No upstream maintenance] + +Signed-off-by: Anne Mulhern + +--- + Index: Bastille/bin/bastille =================================================================== --- Bastille.orig/bin/bastille diff --git a/recipes-security/bastille/files/fixed_defined_warnings.patch b/recipes-security/bastille/files/fixed_defined_warnings.patch new file mode 100644 index 0000000..e7996e3 --- /dev/null +++ b/recipes-security/bastille/files/fixed_defined_warnings.patch @@ -0,0 +1,65 @@ +From c59b84ca3bda8e4244d47901b6966f28dd675434 Mon Sep 17 00:00:00 2001 +From: Andrei Dinu +Date: Thu, 23 May 2013 15:12:23 +0300 +Subject: [PATCH] added yocto-standard to bastille + +In order to make Bastille functional and avoid errors +regarding distros, if not any given distro is identified, +yocto-standard distro is added to the distro variable +in Bastille. + +Fixed also some warnings regarding defined statements +in API.pm. + +Upstream Status: Inappropriate [No upstream maintenance] + +Signed-off-by: Andrei Dinu + +Signed-off-by: Anne Mulhern + +--- + Bastille/API.pm | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +Index: Bastille/Bastille/API.pm +=================================================================== +--- Bastille.orig/Bastille/API.pm 2008-09-14 19:56:53.000000000 -0400 ++++ Bastille/Bastille/API.pm 2013-08-21 08:55:26.715950001 -0400 +@@ -445,8 +445,8 @@ + $release=`/usr/bin/uname -sr`; + } + else { +- print STDERR "$err Could not determine operating system version!\n"; +- $distro="unknown"; ++ print STDERR "$err Could not determine operating system version!\n"; ++ $distro="unknown" + } + + # Figure out what kind of system we're on. +@@ -1284,7 +1284,7 @@ + + my $sumFile = &getGlobal('BFILE',"sum.csv"); + +- if ( defined %GLOBAL_SUM ) { ++ if ( %GLOBAL_SUM ) { + + open( SUM, "> $sumFile") or &B_log("ERROR","Unable to open $sumFile for write.\n$!\n"); + +@@ -1318,7 +1318,7 @@ + my $file = $_[0]; + my $cksum = &getGlobal('BIN',"cksum"); + +- if (not(defined(%GLOBAL_SUM))) { ++ if (not(%GLOBAL_SUM)) { + &B_read_sums; + } + +@@ -1375,7 +1375,7 @@ + sub B_isFileinSumDB($) { + my $file = $_[0]; + +- if (not(defined(%GLOBAL_SUM))) { ++ if (not(%GLOBAL_SUM)) { + &B_log("DEBUG","Reading in DB from B_isFileinSumDB"); + &B_read_sums; + } diff --git a/recipes-security/bastille/files/yocto-standard-patch.patch b/recipes-security/bastille/files/yocto-standard-patch.patch deleted file mode 100644 index 4f78a3b..0000000 --- a/recipes-security/bastille/files/yocto-standard-patch.patch +++ /dev/null @@ -1,72 +0,0 @@ -From c59b84ca3bda8e4244d47901b6966f28dd675434 Mon Sep 17 00:00:00 2001 -From: Andrei Dinu -Date: Thu, 23 May 2013 15:12:23 +0300 -Subject: [PATCH] added yocto-standard to bastille - -In order to make Bastille functional and avoid errors -regarding distros, if not any given distro is identified, -yocto-standard distro is added to the distro variable -in Bastille. - -Fixed also some warnings regarding defined statements -in API.pm. - -Signed-off-by: Andrei Dinu ---- - Bastille/API.pm | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/Bastille/API.pm b/Bastille/API.pm -index 40f8c72..ebbe9f7 100644 ---- a/Bastille/API.pm -+++ b/Bastille/API.pm -@@ -445,8 +445,8 @@ sub GetDistro() { - $release=`/usr/bin/uname -sr`; - } - else { -- print STDERR "$err Could not determine operating system version!\n"; -- $distro="unknown"; -+ #print STDERR "$err Could not determine operating system version!\n"; -+ $distro="3.8.11-yocto-standard"; - } - - # Figure out what kind of system we're on. -@@ -537,7 +537,7 @@ sub getSupportedOSHash () { - "DB2.2", "DB3.0", - "RH6.0","RH6.1","RH6.2","RH7.0", - "RH7.1","RH7.2","RH7.3","RH8.0", -- "RH9", -+ "RH9","3.8.11-yocto-standard", - "RHEL5", - "RHEL4AS","RHEL4ES","RHEL4WS", - "RHEL3AS","RHEL3ES","RHEL3WS", -@@ -1284,7 +1284,7 @@ sub B_write_sums { - - my $sumFile = &getGlobal('BFILE',"sum.csv"); - -- if ( defined %GLOBAL_SUM ) { -+ if ( %GLOBAL_SUM ) { - - open( SUM, "> $sumFile") or &B_log("ERROR","Unable to open $sumFile for write.\n$!\n"); - -@@ -1318,7 +1318,7 @@ sub B_check_sum($) { - my $file = $_[0]; - my $cksum = &getGlobal('BIN',"cksum"); - -- if (not(defined(%GLOBAL_SUM))) { -+ if (not(%GLOBAL_SUM)) { - &B_read_sums; - } - -@@ -1375,7 +1375,7 @@ sub listModifiedFiles { - sub B_isFileinSumDB($) { - my $file = $_[0]; - -- if (not(defined(%GLOBAL_SUM))) { -+ if (not(%GLOBAL_SUM)) { - &B_log("DEBUG","Reading in DB from B_isFileinSumDB"); - &B_read_sums; - } --- -1.7.9.5 - -- cgit v1.2.3-54-g00ecf