diff --git a/.cvsignore b/.cvsignore index e685287..43d824b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -mantis-1.0.8.tar.gz +mantisbt-1.1.6.tar.gz diff --git a/mantis-0.19.2-noexamplecom.patch b/mantis-0.19.2-noexamplecom.patch deleted file mode 100644 index b20f858..0000000 --- a/mantis-0.19.2-noexamplecom.patch +++ /dev/null @@ -1,76 +0,0 @@ ---- mantis-0.19.2/config_inc.php.sample.email 2004-09-12 14:23:36.000000000 +0200 -+++ mantis-0.19.2/config_inc.php.sample 2005-03-07 17:52:02.000000000 +0100 -@@ -34,14 +34,14 @@ - $g_database_name = "bugtracker"; - - # --- email variables ------------- -- $g_administrator_email = 'administrator@example.com'; -- $g_webmaster_email = 'webmaster@example.com'; -+ $g_administrator_email = 'administrator@localhost'; -+ $g_webmaster_email = 'webmaster@localhost'; - - # the "From: " field in emails -- $g_from_email = 'noreply@example.com'; -+ $g_from_email = 'noreply@localhost'; - - # the return address for bounced mail -- $g_return_path_email = 'admin@example.com'; -+ $g_return_path_email = 'admin@localhost'; - - # --- file upload settings -------- - # This is the master setting to disable *all* file uploading functionality -@@ -49,4 +49,4 @@ - # The default value is ON but you must make sure file uploading is enabled - # in PHP as well. You may need to add "file_uploads = TRUE" to your php.ini. - $g_allow_file_upload = ON; --?> -\ No newline at end of file -+?> ---- mantis-0.19.2/config_defaults_inc.php.email 2005-03-07 17:49:31.000000000 +0100 -+++ mantis-0.19.2/config_defaults_inc.php 2005-03-07 17:51:24.000000000 +0100 -@@ -75,7 +75,7 @@ - } else if ( isset( $_SERVER['SERVER_ADDR'] ) ) { - $t_host = $_SERVER['SERVER_ADDR'] . $t_port; - } else { -- $t_host = 'www.example.com'; -+ $t_host = 'localhost'; - } - - $t_path = dirname( $_SERVER['PHP_SELF'] ); -@@ -85,7 +85,7 @@ - - $g_path = $t_protocol . '://' . $t_host . $t_path.'/'; - } else { -- $g_path = 'http://www.example.com/mantis/'; -+ $g_path = 'http://localhost/mantis/'; - } - - # path to your images directory (for icons) -@@ -170,14 +170,14 @@ - ############################# - - # --- email variables ------------- -- $g_administrator_email = 'administrator@example.com'; -- $g_webmaster_email = 'webmaster@example.com'; -+ $g_administrator_email = 'administrator@localhost'; -+ $g_webmaster_email = 'webmaster@localhost'; - - # the 'From: ' field in emails -- $g_from_email = 'noreply@example.com'; -+ $g_from_email = 'noreply@localhost'; - - # the return address for bounced mail -- $g_return_path_email = 'admin@example.com'; -+ $g_return_path_email = 'admin@localhost'; - - # allow email notification - # note that if this is disabled, sign-up and password reset messages will -@@ -711,7 +711,7 @@ - # look in README.LDAP for details - - # --- using openldap ------------- -- $g_ldap_server = 'ldaps://ldap.example.com.au/'; -+ $g_ldap_server = 'ldaps://localhost/'; - $g_ldap_port = '636'; - $g_ldap_root_dn = 'dc=example,dc=com,dc=au'; - $g_ldap_organization = ''; # e.g. '(organizationname=*Traffic)' diff --git a/mantis-1.0.0a3-iis.patch b/mantis-1.0.0a3-iis.patch deleted file mode 100644 index 8f5d1aa..0000000 --- a/mantis-1.0.0a3-iis.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- mantis-1.0.0a3/config_defaults_inc.php.iis -+++ mantis-1.0.0a3/config_defaults_inc.php -@@ -259,7 +259,7 @@ - - # set to OFF to disable email check - $g_validate_email = ON; -- $g_check_mx_record = OFF; # Not supported under Windows. -+ $g_check_mx_record = ON; # Not supported under Windows. - - # if ON, allow the user to omit an email field - # note if you allow users to create their own accounts, they diff --git a/mantis-1.1.0-noexamplecom.patch b/mantis-1.1.0-noexamplecom.patch new file mode 100644 index 0000000..1976253 --- /dev/null +++ b/mantis-1.1.0-noexamplecom.patch @@ -0,0 +1,23 @@ +Index: mantis-1.1.0rc2/config_inc.php.sample +=================================================================== +--- mantis-1.1.0rc2.orig/config_inc.php.sample ++++ mantis-1.1.0rc2/config_inc.php.sample +@@ -47,14 +47,14 @@ + $g_db_type = "mysql"; + + # --- email variables ------------- +- $g_administrator_email = 'administrator@example.com'; +- $g_webmaster_email = 'webmaster@example.com'; ++ $g_administrator_email = 'administrator@localhost'; ++ $g_webmaster_email = 'webmaster@localhost'; + + # the "From: " field in emails +- $g_from_email = 'noreply@example.com'; ++ $g_from_email = 'noreply@localhost'; + + # the return address for bounced mail +- $g_return_path_email = 'admin@example.com'; ++ $g_return_path_email = 'admin@localhost'; + + # --- file upload settings -------- + # This is the master setting to disable *all* file uploading functionality diff --git a/mantis-1.1.6-bug4512.patch b/mantis-1.1.6-bug4512.patch new file mode 100644 index 0000000..2402a65 --- /dev/null +++ b/mantis-1.1.6-bug4512.patch @@ -0,0 +1,47 @@ +diff --git a/core/email_api.php b/core/email_api.php +index 2adb418..1857c81 100644 +--- a/core/email_api.php ++++ b/core/email_api.php +@@ -897,8 +897,10 @@ + string_get_bug_view_url_with_fqdn( $p_bug_id, $t_recipient ) . + " \n\n$p_message"; + ++ $t_visible_bug_data = email_build_visible_bug_data( $t_recipient, $p_bug_id, 'email_reminder' ); ++ $t_mail_headers = email_get_default_headers( $t_visible_bug_data ); + if( ON == config_get( 'enable_email_notification' ) ) { +- email_store( $t_email, $t_subject, $t_contents ); ++ email_store( $t_email, $t_subject, $t_contents, $t_mail_headers ); + } + + lang_pop(); +@@ -946,7 +948,7 @@ + # build headers + $t_bug_id = $p_visible_bug_data['email_bug']; + $t_message_md5 = md5( $t_bug_id . $p_visible_bug_data['email_date_submitted'] ); +- $t_mail_headers = array( 'keywords' => $p_visible_bug_data['set_category'] ); ++ $t_mail_headers = email_get_default_headers( $p_visible_bug_data ); + if ( $p_message_id == 'email_notification_title_for_action_bug_submitted' ) { + $t_mail_headers['Message-ID'] = "<{$t_message_md5}>"; + } else { +@@ -960,6 +962,21 @@ + return $t_ok; + } + ++ ++ /* ++ Build and return the default set of mail header ++ */ ++ function email_get_default_headers( $p_visible_bug_data ) { ++ $t_headers = array(); ++ $t_headers['keywords'] = $p_visible_bug_data['set_category']; ++ $t_headers['X-Mantis-Id'] = $p_visible_bug_data['email_bug']; ++ $t_headers['X-Mantis-Site'] = config_get( 'path' ); ++ $t_headers['X-Mantis-Reporter'] = $p_visible_bug_data['email_reporter']; ++ $t_headers['X-Mantis-Owner'] = $p_visible_bug_data['email_handler']; ++ return $t_headers; ++ } ++ ++ + # -------------------- + # Build the bug info part of the message + function email_format_bug_message( $p_visible_bug_data ) { diff --git a/mantis-1.1.6-install-nowriteconfig.patch b/mantis-1.1.6-install-nowriteconfig.patch new file mode 100644 index 0000000..b15fe4f --- /dev/null +++ b/mantis-1.1.6-install-nowriteconfig.patch @@ -0,0 +1,79 @@ +--- mantis-1.1.6.orig/admin/install.php 2008-12-09 20:20:28.000000000 +0100 ++++ mantis-1.1.6//admin/install.php 2008-12-28 19:39:50.493771722 +0100 +@@ -397,10 +397,18 @@ + + + ++
++ To change any of the disabled options below, edit /etc/mantis/config_inc.php and reload this page! ++
++ ++ ++ ++ ++ + Type of Database + + +- + MySql (default)'; +@@ -447,7 +455,7 @@ + Hostname (for Database Server) + + +- ++ + + + +@@ -456,7 +464,7 @@ + Username (for Database) + + +- ++ + + + +@@ -465,7 +473,7 @@ + Password (for Database) + + +- "> ++ "> + + + +@@ -474,7 +482,7 @@ + Database name (for Database) + + +- ++ + + + +@@ -762,6 +770,9 @@ + $t_config_filename = $g_absolute_path . 'config_inc.php'; + $t_config_exists = file_exists ( $t_config_filename ); + ?> ++ + + +
+@@ -832,7 +843,9 @@ + ?> + +
+- ++ + - Order allow,deny + Find the section: + + + and change the "None" in: + Allow from None - to: - - Order deny,allow + to the machine IP you will be connecting from. For instance: + Allow from 127.0.0.1 + + allows localhost access to the admin area - and restart apache with: + then restart apache with: service httpd restart - instead the needs to be edited in order to enable the execution of the installation script located - in /usr/share/mantis/admin. - -4. point your browser to: - https://localhost/mantis/admin/install.php +2. point your browser to: + https://localhost/mantis/admin/install.php to create an empty DB. BIG FAT WARNING: when you are done with the installation, be sure to revert the - modifications you've done in step 3. + modifications you've done in step 1. Otherwise you will leave the administration area unprotected with critical system information and database update capabilities open to any unauthorized person. @@ -47,6 +60,23 @@ WARNING: A DEFAULT ADMINISTRATOR level account is created. The account name administrator level account. Immediately after that, DISABLE or DELETE the administrator account. You can recreate it but you should delete the account to prevent the cookie_string from being used to trick the - package. It would be even better to rename the account or delete it - permanently. REMEMBER: After setting up the package, REMOVE the + package. REMEMBER: After setting up the package, REMOVE the default administrator account. + +== Upgrades == + +After a version upgrade that involves changes to the DB schema, you will need +to run again the installer steps as outlined above. The installer is able to +recognize which modifications are needed and apply them to the DB. + +Albeit the upgrade routine is usually well tested and safe, please +consider doing a complete backup of the database before attempting the +procedure. + + +== SELinux == + +The default SELinux configuration prevents the httpd process (hence mantis) +from sending emails. This is easily fixed with: + + setsebool -P httpd_can_sendmail=1 diff --git a/mantis-httpd.conf b/mantis-httpd.conf index d42e468..82df7d8 100644 --- a/mantis-httpd.conf +++ b/mantis-httpd.conf @@ -16,9 +16,12 @@ Alias /mantis /usr/share/mantis # Do not change this unless the default administrator # login was removed; see documentation for details Order Deny,Allow - Allow from localhost Deny from All - + Allow from 127.0.0.1 # localhost + Allow from ::1 # IPv6 variant of localhost + # Use the following to let any client use mantis + # Allow from All + php_flag "register_globals" "off" SetEnv MANTIS_CONFIG /etc/mantis/config_inc.php @@ -28,9 +31,9 @@ Alias /mantis /usr/share/mantis # you are performing the first installation or a database schema update. # See README.Fedora for more details - Order allow,deny - Deny from all - Allow from localhost + Order Deny,Allow + Deny from All + Allow from None # This directory does not require access over HTTP diff --git a/mantis.spec b/mantis.spec index eeb2337..4a8e256 100644 --- a/mantis.spec +++ b/mantis.spec @@ -1,29 +1,30 @@ -# $Id$ - %global pkgdir %{_datadir}/%{name} %global cfgdir %{_sysconfdir}/%{name} -%global httpconfdir %{_sysconfdir}/httpd/conf.d +%global docdir %{_docdir}/%{name}-%{version} +%global httpconfdir %{_sysconfdir}/httpd/conf.d Summary: Web-based bugtracking system Name: mantis -Version: 1.0.8 -Release: 1%{?dist} -License: GPL +Version: 1.1.6 +Release: 3%{?dist}.1 +License: GPLv2+ Group: Applications/Internet URL: http://www.mantisbt.org/ BuildArch: noarch -Source0: http://downloads.sourceforge.net/mantisbt/%{name}-%{version}.tar.gz +Source0: http://downloads.sourceforge.net/mantisbt/mantisbt-%{version}.tar.gz Source1: mantis-README.Fedora -Patch0: mantis-1.0.0a3-iis.patch -Patch1: mantis-0.19.2-noexamplecom.patch +Patch0: mantis-1.1.6-install-nowriteconfig.patch +Patch1: mantis-1.1.0-noexamplecom.patch Patch2: mantis-1.0.0rc2-noadmin.patch +Patch3: mantis-1.1.6-bug4512.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: diffutils -Requires: php +Requires: php >= 4.3.0 +Requires: php-mbstring >= 4.3.0 Requires: mantis-config -Requires: php-adodb +#Requires: php-adodb %package config-httpd Summary: Mantis configuration for Apache httpd @@ -42,8 +43,14 @@ Mantis is a web-based bugtracking system. It is written in the PHP scripting language and requires the MySQL database and a webserver. Mantis has been installed on Windows, MacOS, OS/2, and a variety of Unix operating systems. Any web browser should -be able to function as a client. It is released under the terms of the -GNU General Public License (GPL). +be able to function as a client. + +Documentation can be found in: %{docdir} + +When the package has finished installing, you will need to perform some +additional configuration steps; these are described in: +%{docdir}/README.Fedora + %description config-httpd Mantis is a web-based bugtracking system. @@ -51,14 +58,14 @@ This package contains configuration-files for Apache httpd 2. %prep -%setup -q +%setup -q -n mantisbt-%{version} %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 cp %{SOURCE1} ./doc/README.Fedora - -chmod -x *.php *.sample +rm .gitignore rm -rf packages @@ -74,11 +81,13 @@ rm -rf "${RPM_BUILD_ROOT}" tar cf - . | tar xf - -C ${RPM_BUILD_ROOT}%{pkgdir} # Remove adodb -rm -rf ${RPM_BUILD_ROOT}%{pkgdir}/core/adodb +# rm -rf ${RPM_BUILD_ROOT}%{pkgdir}/core/adodb find ${RPM_BUILD_ROOT} \( \ - -name '*.orig' -o -name '*.#.*' -o \ - -name '.cvsignore' \ + -name '*.orig' \ + -o -name '*.#.*' \ + -o -name '.cvsignore' \ + -o -name '.htaccess' \ \) -print0 | xargs -0 rm -f ## Do not rename; the *existence* of this file will be checked to @@ -86,6 +95,12 @@ find ${RPM_BUILD_ROOT} \( \ mv ${RPM_BUILD_ROOT}%{pkgdir}/mantis_offline.php.sample ${RPM_BUILD_ROOT}%{cfgdir}/ mv ${RPM_BUILD_ROOT}%{pkgdir}/config_inc.php.sample ${RPM_BUILD_ROOT}%{cfgdir}/config_inc.php +#convert changelog to UTF8 +iconv -f ISO_8859-1 -t UTF-8 -o doc/ChangeLog{.utf8,} +mv doc/ChangeLog{.utf8,} + +chmod a+x core ${RPM_BUILD_ROOT}%{pkgdir}/core/checkin.php + for i in $(find ${RPM_BUILD_ROOT} -type f -regex '.*\.\(php\|txt\|gif\|png\|css\|htm\|dtd\|xsl\|sql\|js\|bak\|xml\|zip\)$' -perm +0111); do case $i in (*.php) @@ -104,7 +119,7 @@ chmod -x doc/* chmod -x ${RPM_BUILD_ROOT}%{pkgdir}/core/phpmailer/{README,LICENSE} # Dangling symlink: when /etc/mantis/mantis_offline.php is present mantis is put offline -ln -s %{cfgdir}/mantis_offline.php ${RPM_BUILD_ROOT}%{pkgdir}/mantis_offline.php +ln -s ../../..%{cfgdir}/mantis_offline.php ${RPM_BUILD_ROOT}%{pkgdir}/mantis_offline.php %{__install} -d ${RPM_BUILD_ROOT}%{httpconfdir} %{__install} -p -m644 %{SOURCE10} ${RPM_BUILD_ROOT}%{httpconfdir}/mantis.conf @@ -137,7 +152,50 @@ rm -rf "${RPM_BUILD_ROOT}" %changelog -* Mon Jul 9 2007 Gianluca Sforna - 1.0.8-1 +* Wed Feb 25 2009 Fedora Release Engineering - 1.1.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Sun Dec 28 2008 Sven Lankes - 1.1.6-2 +- add patch to suppress bogus warning during setup + (closes bz #437142) +- convert ChangeLog to UTF8 +- remove .gitignore +- change mantis_offline.php-symlink to be relative + +* Wed Dec 10 2008 Gianluca Sforna - 1.1.6-1 +- new upstream release + +* Mon Nov 24 2008 Gianluca Sforna - 1.1.5-1 +- new upstream release + +* Sun Oct 19 2008 Gianluca Sforna - 1.1.4-1 +- new upstream release + +* Tue Oct 14 2008 Gianluca Sforna - 1.1.3-1 +- new upstream release +- drop upstreamed patch + +* Sat Jul 19 2008 Gianluca Sforna - 1.1.2-1 +- new upstream release +- add patch for bugnotes notification + +* Sat Jan 19 2008 Gianluca Sforna - 1.1.1-1 +- new upstream release +- Add more info in README.Fedora about configuration, upgrades + and SELinux + +* Sat Jan 5 2008 Gianluca Sforna - 1.1.0-1 +- new upstream release +- rediffed patches +- allow local usage out of the box +- remove .htaccess files +- revert using embedded adodb + see http://www.mantisbt.org/bugs/view.php?id=8256 for details +- improve description and README.Fedora +- Remove unneeded diffutils BR +- Updated License field + +* Tue Jul 3 2007 Gianluca Sforna - 1.0.8-1 - new upstream release - add Require: php-adodb (and remove embedded one) - remove duplicate docs diff --git a/sources b/sources index a96f147..cf7e2b2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fab90748346fe9a8276a71f59c1a245a mantis-1.0.8.tar.gz +2e0c6d3dd9ca7d16258fc2d86363a675 mantisbt-1.1.6.tar.gz