giallu pushed to mantis (el5). "rebase patch"
notifications at fedoraproject.org
notifications at fedoraproject.org
Tue Apr 7 13:33:08 UTC 2015
>From 78cacd1292b9b20a0c7def104d8e517cc0c2f6df Mon Sep 17 00:00:00 2001
From: Gianluca Sforna <giallu at gmail.com>
Date: Mon, 26 Jan 2015 12:26:19 +0100
Subject: rebase patch
diff --git a/mantis-1.2.12-install_no_write_config.patch b/mantis-1.2.12-install_no_write_config.patch
deleted file mode 100644
index db2e000..0000000
--- a/mantis-1.2.12-install_no_write_config.patch
+++ /dev/null
@@ -1,141 +0,0 @@
-diff -u -aur mantisbt-1.2.12.orig/admin/install.php mantisbt-1.2.12/admin/install.php
---- mantisbt-1.2.12.orig/admin/install.php 2012-11-12 00:10:40.000000000 +0100
-+++ mantisbt-1.2.12/admin/install.php 2012-11-15 00:24:29.567983203 +0100
-@@ -412,10 +412,18 @@
- <?php if( !$g_database_upgrade ) {?>
- <tr>
- <td>
-+ <div style="background-color: #FCC; padding: 5px; border: 1px solid red;">
-+ To change any of the disabled options below, edit /etc/mantis/config_inc.php and reload this page!
-+ </div>
-+ </td>
-+</tr>
-+
-+<tr>
-+ <td>
- Type of Database
- </td>
- <td>
-- <select name="db_type">
-+ <select disabled="true" name="db_type">
- <?php
- // Build selection list of available DB types
- $t_db_list = array(
-@@ -451,7 +459,7 @@
- Hostname (for Database Server)
- </td>
- <td>
-- <input name="hostname" type="textbox" value="<?php echo $f_hostname?>"></input>
-+ <input name="hostname" type="textbox" disabled="disabled" value="<?php echo $f_hostname?>"></input>
- </td>
- </tr>
- <?php
-@@ -463,7 +471,7 @@
- Username (for Database)
- </td>
- <td>
-- <input name="db_username" type="textbox" value="<?php echo $f_db_username?>"></input>
-+ <input name="db_username" type="textbox" disabled="disabled" value="<?php echo $f_db_username?>"></input>
- </td>
- </tr>
- <?php
-@@ -475,7 +483,7 @@
- Password (for Database)
- </td>
- <td>
-- <input name="db_password" type="password" value="<?php echo( !is_blank( $f_db_password ) ? CONFIGURED_PASSWORD : "" )?>"></input>
-+ <input name="db_password" type="password" disabled="disabled" value="<?php echo( !is_blank( $f_db_password ) ? CONFIGURED_PASSWORD : "" )?>"></input>
- </td>
- </tr>
- <?php
-@@ -487,7 +495,7 @@
- Database name (for Database)
- </td>
- <td>
-- <input name="database_name" type="textbox" value="<?php echo $f_database_name?>"></input>
-+ <input name="database_name" type="textbox" disabled="disabled" value="<?php echo $f_database_name?>"></input>
- </td>
- </tr>
- <?php
-@@ -780,79 +788,9 @@
- if( 5 == $t_install_state ) {
- $t_config_filename = $g_absolute_path . 'config_inc.php';
- $t_config_exists = file_exists( $t_config_filename );
-- ?>
--<table width="100%" border="0" cellpadding="10" cellspacing="1">
--<tr>
-- <td bgcolor="#e8e8e8" colspan="2">
-- <span class="title">Write Configuration File(s)</span>
-- </td>
--</tr>
--
--<tr>
-- <td bgcolor="#ffffff">
-- <?php
-- if( !$t_config_exists ) {
-- echo 'Creating Configuration File (config_inc.php)<br />';
-- echo '<font color="red">(if this file is not created, create it manually with the contents below)</font>';
-- } else {
-- echo 'Updating Configuration File (config_inc.php)<br />';
-- }
-- ?>
-- </td>
-- <?php
-- $t_config = '<?php' . "\r\n";
-- $t_config .= "\t\$g_hostname = '$f_hostname';\r\n";
-- $t_config .= "\t\$g_db_type = '$f_db_type';\r\n";
-- $t_config .= "\t\$g_database_name = '$f_database_name';\r\n";
-- $t_config .= "\t\$g_db_username = '$f_db_username';\r\n";
-- $t_config .= "\t\$g_db_password = '$f_db_password';\r\n";
-
-- if( $f_db_type == 'db2' ) {
-- $t_config .= "\t\$g_db_schema = '$f_db_schema';\r\n";
-- }
--
-- $t_config .= '?>' . "\r\n";
-- $t_write_failed = true;
--
-- if( !$t_config_exists ) {
-- if( $fd = @fopen( $t_config_filename, 'w' ) ) {
-- fwrite( $fd, $t_config );
-- fclose( $fd );
-- }
--
-- if( file_exists( $t_config_filename ) ) {
-- print_test_result( GOOD );
-- $t_write_failed = false;
-- } else {
-- print_test_result( BAD, false, 'cannot write ' . $t_config_filename );
-- }
-- } else {
-- # already exists, see if the information is the same
-- if ( ( $f_hostname != config_get( 'hostname', '' ) ) ||
-- ( $f_db_type != config_get( 'db_type', '' ) ) ||
-- ( $f_database_name != config_get( 'database_name', '') ) ||
-- ( $f_db_schema != config_get( 'db_schema', '') ) ||
-- ( $f_db_username != config_get( 'db_username', '' ) ) ||
-- ( $f_db_password != config_get( 'db_password', '' ) ) ) {
-- print_test_result( BAD, false, 'file ' . $g_absolute_path . 'config_inc.php' . ' already exists and has different settings' );
-- } else {
-- print_test_result( GOOD, false );
-- $t_write_failed = false;
-- }
-- }
-- ?>
--</tr>
--<?php
-- if( true == $t_write_failed ) {
-- echo '<tr><table width="50%" border="0" cellpadding="10" cellspacing="1" align="center">';
-- echo '<tr><td>Please add the following lines to ' . $g_absolute_path . 'config_inc.php before continuing to the database upgrade check:</td></tr>';
-- echo '<tr><td><pre>' . htmlentities( $t_config ) . '</pre></td></tr></table></tr>';
-- }
-- ?>
-+ // FEDORA PATCH: Removed config_inc.php manipulation code
-
--</table>
--
--<?php
- if( false == $g_failed ) {
- $t_install_state++;
- }
-Only in mantisbt-1.2.12/admin: install.php.orig
diff --git a/mantis-1.2.19-install_no_write_config.patch b/mantis-1.2.19-install_no_write_config.patch
new file mode 100644
index 0000000..027c784
--- /dev/null
+++ b/mantis-1.2.19-install_no_write_config.patch
@@ -0,0 +1,144 @@
+diff --git a/admin/install.php b/admin/install.php
+index 6a57a88..9c619c0 100644
+--- a/admin/install.php
++++ b/admin/install.php
+@@ -411,10 +411,18 @@ if( 1 == $t_install_state ) {
+ <?php if( !$g_database_upgrade ) {?>
+ <tr>
+ <td>
++ <div style="background-color: #FCC; padding: 5px; border: 1px solid red;">
++ To change any of the disabled options below, edit /etc/mantis/config_inc.php and reload this page!
++ </div>
++ </td>
++</tr>
++
++<tr>
++ <td>
+ Type of Database
+ </td>
+ <td>
+- <select name="db_type">
++ <select disabled="true" name="db_type">
+ <?php
+ // Build selection list of available DB types
+ $t_db_list = array(
+@@ -450,7 +458,7 @@ if( !$g_database_upgrade ) {?>
+ Hostname (for Database Server)
+ </td>
+ <td>
+- <input name="hostname" type="textbox" value="<?php echo string_attribute( $f_hostname ) ?>">
++ <input name="hostname" type="textbox" disabled="disabled" value="<?php echo string_attribute( $f_hostname ) ?>">
+ </td>
+ </tr>
+ <?php
+@@ -462,7 +470,7 @@ if( !$g_database_upgrade ) {?>
+ Username (for Database)
+ </td>
+ <td>
+- <input name="db_username" type="textbox" value="<?php echo string_attribute( $f_db_username ) ?>">
++ <input name="db_username" type="textbox" disabled="disabled" value="<?php echo string_attribute( $f_db_username ) ?>">
+ </td>
+ </tr>
+ <?php
+@@ -486,7 +494,7 @@ if( !$g_database_upgrade ) {?>
+ Database name (for Database)
+ </td>
+ <td>
+- <input name="database_name" type="textbox" value="<?php echo string_attribute( $f_database_name ) ?>">
++ <input name="database_name" type="textbox" disabled="disabled" value="<?php echo string_attribute( $f_database_name ) ?>">
+ </td>
+ </tr>
+ <?php
+@@ -785,91 +793,9 @@ if( 4 == $t_install_state ) {
+ if( 5 == $t_install_state ) {
+ $t_config_filename = $g_absolute_path . 'config_inc.php';
+ $t_config_exists = file_exists( $t_config_filename );
+- ?>
+-<table width="100%" border="0" cellpadding="10" cellspacing="1">
+-<tr>
+- <td bgcolor="#e8e8e8" colspan="2">
+- <span class="title">Write Configuration File(s)</span>
+- </td>
+-</tr>
+
+-<tr>
+- <td bgcolor="#ffffff">
+- <?php echo ( $t_config_exists ? 'Updating' : 'Creating' )
+- . ' Configuration File (config_inc.php)'; ?>
+- </td>
+- <?php
+- # Generating the config_inc.php file
+-
+- $t_config = '<?php' . "\r\n";
+- $t_config .= "\$g_hostname = '$f_hostname';\r\n";
+- $t_config .= "\$g_db_type = '$f_db_type';\r\n";
+- $t_config .= "\$g_database_name = '$f_database_name';\r\n";
+- $t_config .= "\$g_db_username = '$f_db_username';\r\n";
+- $t_config .= "\$g_db_password = '$f_db_password';\r\n";
+-
+- if( $f_db_type == 'db2' ) {
+- $t_config .= "\$g_db_schema = '$f_db_schema';\r\n";
+- }
+-
+- $t_write_failed = true;
+-
+- if( !$t_config_exists ) {
+- if( $fd = @fopen( $t_config_filename, 'w' ) ) {
+- fwrite( $fd, $t_config );
+- fclose( $fd );
+- }
++ // FEDORA PATCH: Removed config_inc.php manipulation code
+
+- if( file_exists( $t_config_filename ) ) {
+- print_test_result( GOOD );
+- $t_write_failed = false;
+- } else {
+- print_test_result( BAD, false, 'cannot write ' . $t_config_filename );
+- }
+- } else {
+- # already exists, see if the information is the same
+- if ( ( $f_hostname != config_get( 'hostname', '' ) ) ||
+- ( $f_db_type != config_get( 'db_type', '' ) ) ||
+- ( $f_database_name != config_get( 'database_name', '') ) ||
+- ( $f_db_schema != config_get( 'db_schema', '') ) ||
+- ( $f_db_username != config_get( 'db_username', '' ) ) ||
+- ( $f_db_password != config_get( 'db_password', '' ) ) ) {
+- print_test_result( BAD, false, 'file ' . $g_absolute_path . 'config_inc.php' . ' already exists and has different settings' );
+- } else {
+- print_test_result( GOOD, false );
+- $t_write_failed = false;
+- }
+- }
+- ?>
+-</tr>
+-<?php
+- if( true == $t_write_failed ) {
+-?>
+-<tr>
+- <td colspan="2">
+- <table width="50%" cellpadding="10" cellspacing="1">
+- <tr>
+- <td>
+- Please add the following lines to
+- <em>'<?php echo $g_absolute_path; ?>config_inc.php'</em>
+- before continuing:
+- </td>
+- </tr>
+- <tr>
+- <td>
+- <pre><?php echo htmlentities( $t_config ); ?></pre>
+- </td>
+- </tr>
+- </table>
+- </td>
+-</tr>
+-<?php
+- }
+- ?>
+-
+-</table>
+-
+-<?php
+ if( false == $g_failed ) {
+ $t_install_state++;
+ }
diff --git a/mantis.spec b/mantis.spec
index 0da3747..fa9e2d0 100644
--- a/mantis.spec
+++ b/mantis.spec
@@ -15,7 +15,7 @@ Source0: http://downloads.sourceforge.net/mantisbt/mantisbt-%{version}.tar.gz
Source1: mantis-README.Fedora
# Admin is supposed to edit /etc/mantis/config_inc.php
-Patch0: mantis-1.2.12-install_no_write_config.patch
+Patch0: mantis-1.2.19-install_no_write_config.patch
Patch1: mantis-1.2.12-no_example_com.patch
# We secure admin/ with httpd directives
Patch2: mantis-1.2.4-do_not_warn_on_admin_directory.patch
@@ -154,6 +154,7 @@ rm -rf "${RPM_BUILD_ROOT}"
%changelog
* Mon Jan 26 2015 Gianluca Sforna <giallu at gmail.com> - 1.2.19-1
- new upstream release
+- rebase patch
- fix CVE-2014-9571, CVE-2014-9572, CVE-2014-9573 (#1183595)
* Tue Dec 9 2014 Gianluca Sforna <giallu at gmail.com> - 1.2.18-1
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/mantis.git/commit/?h=el5&id=78cacd1292b9b20a0c7def104d8e517cc0c2f6df
More information about the scm-commits
mailing list