From d67a3a7df432e3524846a718f90905a32f1c98c4 Mon Sep 17 00:00:00 2001 From: Gianluca Sforna Date: Apr 05 2007 11:02:42 +0000 Subject: - new upstream release - drop upstreamed patch - fix (most) rpmlint issues - tweak Source0 URL - remove config_inc.php symlink (config is now found via the MANTIS_CONFIG environment variable) --- diff --git a/.cvsignore b/.cvsignore index a96f085..c6a11d7 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -mantis-1.0.6.tar.gz +mantis-1.0.7.tar.gz diff --git a/mantis-1.0.6-private_history.patch b/mantis-1.0.6-private_history.patch deleted file mode 100644 index a39bb29..0000000 --- a/mantis-1.0.6-private_history.patch +++ /dev/null @@ -1,91 +0,0 @@ -Index: core/history_api.php -=================================================================== -RCS file: /cvsroot/mantisbt/mantisbt/core/history_api.php,v -retrieving revision 1.34 -retrieving revision 1.36 -diff -U3 -r1.34 -r1.36 ---- core/history_api.php 27 Aug 2005 01:15:59 -0000 1.34 -+++ core/history_api.php 26 Sep 2006 01:30:57 -0000 1.36 -@@ -6,7 +6,7 @@ - # See the README and LICENSE files for details - - # -------------------------------------------------------- -- # $Id: history_api.php,v 1.34 2005/08/27 01:15:59 thraxisp Exp $ -+ # $Id: history_api.php,v 1.36 2006/09/26 01:30:57 thraxisp Exp $ - # -------------------------------------------------------- - - ### History API ### -@@ -102,12 +102,13 @@ - # Retrieves the raw history events for the specified bug id and returns it in an array - # The array is indexed from 0 to N-1. The second dimension is: 'date', 'userid', 'username', - # 'field','type','old_value','new_value' -- function history_get_raw_events_array( $p_bug_id ) { -+ function history_get_raw_events_array( $p_bug_id, $p_user_id=NULL ) { - $t_mantis_bug_history_table = config_get( 'mantis_bug_history_table' ); - $t_mantis_user_table = config_get( 'mantis_user_table' ); - $t_history_order = config_get( 'history_order' ); - $c_bug_id = db_prepare_int( $p_bug_id ); -- -+ $t_user_id = (( NULL == $p_user_id) ? auth_get_current_user_id() : $p_userid); -+ - # grab history and display by date_modified then field_name - # @@@ by MASC I guess it's better by id then by field_name. When we have more history lines with the same - # date, it's better to respect the storing order otherwise we should risk to mix different information -@@ -122,20 +123,49 @@ - $raw_history_count = db_num_rows( $result ); - $raw_history = array(); - -- for ( $i=0; $i < $raw_history_count; ++$i ) { -+ $t_private_bugnote_threshold = config_get( 'private_bugnote_threshold' ); -+ $t_private_bugnote_visible = access_has_bug_level( -+ config_get( 'private_bugnote_threshold' ), $p_bug_id, $t_user_id ); -+ -+ for ( $i=0,$j=0; $i < $raw_history_count; ++$i ) { - $row = db_fetch_array( $result ); - extract( $row, EXTR_PREFIX_ALL, 'v' ); - -- $raw_history[$i]['date'] = db_unixtimestamp( $v_date_modified ); -- $raw_history[$i]['userid'] = $v_user_id; -+ // check that the item should be visible to the user -+ // custom fields -+ $t_field_id = custom_field_get_id_from_name( $v_field_name ); -+ if ( false !== $t_field_id && -+ !custom_field_has_read_access( $t_field_id, $p_bug_id, $t_user_id ) ) { -+ continue; -+ } -+ // bugnotes -+ if ( $t_user_id != $v_user_id ) { // bypass if user originated note -+ if ( ( $v_type == BUGNOTE_ADDED ) || -+ ( $v_type == BUGNOTE_UPDATED ) || -+ ( $v_type == BUGNOTE_DELETED ) ) { -+ if ( !$t_private_bugnote_visible && -+ ( bugnote_get_field( $v_old_value, 'view_state' ) == VS_PRIVATE ) ) { -+ continue; -+ } -+ } -+ if ( $v_type == BUGNOTE_STATE_CHANGED ) { -+ if ( !$t_private_bugnote_visible && -+ ( bugnote_get_field( $v_new_value, 'view_state' ) == VS_PRIVATE ) ) { -+ continue; -+ } -+ } -+ } -+ $raw_history[$j]['date'] = db_unixtimestamp( $v_date_modified ); -+ $raw_history[$j]['userid'] = $v_user_id; - - # user_get_name handles deleted users, and username vs realname -- $raw_history[$i]['username'] = user_get_name( $v_user_id ); -+ $raw_history[$j]['username'] = user_get_name( $v_user_id ); - -- $raw_history[$i]['field'] = $v_field_name; -- $raw_history[$i]['type'] = $v_type; -- $raw_history[$i]['old_value'] = $v_old_value; -- $raw_history[$i]['new_value'] = $v_new_value; -+ $raw_history[$j]['field'] = $v_field_name; -+ $raw_history[$j]['type'] = $v_type; -+ $raw_history[$j]['old_value'] = $v_old_value; -+ $raw_history[$j]['new_value'] = $v_new_value; -+ $j++; - } # end for loop - - return $raw_history; diff --git a/mantis-httpd.conf b/mantis-httpd.conf index ece1b44..b7c6122 100644 --- a/mantis-httpd.conf +++ b/mantis-httpd.conf @@ -1,3 +1,5 @@ +SetEnv MANTIS_CONFIG /etc/mantis/config_inc.php + Alias /mantis /usr/share/mantis diff --git a/mantis.spec b/mantis.spec index 9eae5f4..c82a9cd 100644 --- a/mantis.spec +++ b/mantis.spec @@ -6,24 +6,24 @@ Summary: Web-based bugtracking system Name: mantis -Version: 1.0.6 -Release: 2%{dist} +Version: 1.0.7 +Release: 1%{?dist} License: GPL Group: Applications/Internet URL: http://www.mantisbt.org/ BuildArch: noarch -Source0: http://download.sourceforge.net/sourceforge/mantisbt/%{name}-%{version}.tar.gz +Source0: http://downloads.sourceforge.net/mantisbt/%{name}-%{version}.tar.gz Source1: mantis-README.Fedora Patch0: mantis-1.0.0a3-iis.patch Patch1: mantis-0.19.2-noexamplecom.patch Patch2: mantis-1.0.0rc2-noadmin.patch -Patch3: mantis-1.0.6-private_history.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: diffutils +BuildRequires: diffutils Requires: php Requires: mantis-config +Requires: php-adodb %package config-httpd Summary: Mantis configuration for Apache httpd @@ -52,14 +52,13 @@ This package contains configuration-files for Apache httpd 2. %prep %setup -q -%patch0 -p1 -b .iis -%patch1 -p1 -b .noexamplecom -%patch2 -p1 -b .noadmin -%patch3 -p0 -b .privatenotes +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 cp %{SOURCE1} ./README.Fedora -chmod -x *.php +chmod -x *.php *.sample rm -rf packages @@ -70,13 +69,12 @@ rm -rf packages rm -rf "${RPM_BUILD_ROOT}" %{__install} -d -m755 ${RPM_BUILD_ROOT}%{pkgdir} -%{__install} -d -m750 ${RPM_BUILD_ROOT}%{cfgdir} +%{__install} -d -m755 ${RPM_BUILD_ROOT}%{cfgdir} tar cf - . | tar xf - -C ${RPM_BUILD_ROOT}%{pkgdir} - find ${RPM_BUILD_ROOT} \( \ - -name '*.noexamplecom' -o -name '*.iis' -o -name '*.noadmin' -o -name '*.#.*' -o \ + -name '*.orig' -o -name '*.#.*' -o \ -name '.cvsignore' \ \) -print0 | xargs -0 rm -f @@ -99,23 +97,14 @@ for i in $(find ${RPM_BUILD_ROOT} -type f -regex '.*\.\(php\|txt\|gif\|png\|css\ esac done +chmod -x doc/* chmod -x ${RPM_BUILD_ROOT}%{pkgdir}/{doc/*,core/phpmailer/{README,LICENSE}} -ln -s %{cfgdir}/config_inc.php ${RPM_BUILD_ROOT}%{pkgdir}/config_inc.php +# 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 - -## The httpd config-files -function subst() { - f=${RPM_BUILD_ROOT}$1 - sed -e 's!/usr/share/mantis!%{pkgdir}!g' "$f" >"$f".tmp - cmp -s "$f" "$f.tmp" || cat "$f.tmp" >"$f" - rm -f "$f.tmp" -} - %{__install} -d ${RPM_BUILD_ROOT}%{httpconfdir} %{__install} -p -m644 %{SOURCE10} ${RPM_BUILD_ROOT}%{httpconfdir}/mantis.conf -subst %{httpconfdir}/mantis.conf %clean @@ -132,8 +121,9 @@ rm -rf "${RPM_BUILD_ROOT}" %files %defattr(-,root,root,-) %{pkgdir} -%attr(-,root,apache) %dir %{cfgdir} -%attr(0640,root,apache) %config(noreplace) %{cfgdir}/* +%exclude %{pkgdir}/core/adodb/adodb-time.zip +%dir %{cfgdir} +%config(noreplace) %{cfgdir}/* %doc doc/{LICENSE,ChangeLog,CREDITS,CUSTOMIZATION} README.Fedora %files config-httpd @@ -142,7 +132,15 @@ rm -rf "${RPM_BUILD_ROOT}" %changelog -* Tue Jan 8 2007 Gianluca Sforna - 1.0.6-2 +* Thu Apr 5 2007 Gianluca Sforna - 1.0.7-1 +- new upstream release +- drop upstreamed patch +- fix (most) rpmlint issues +- tweak Source0 URL +- remove config_inc.php symlink (config is now found via the MANTIS_CONFIG + environment variable) + +* Tue Jan 9 2007 Gianluca Sforna - 1.0.6-2 - Add some docs - Add patch for BZ #219937 - Fix rpmlint messages for SRPM diff --git a/sources b/sources index d6b24a4..65e16c9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -64af171288bad777d6a1bba493e4a88b mantis-1.0.6.tar.gz +242f127edfc487889c9089d6b0fbf737 mantis-1.0.7.tar.gz