%bcond_with qmail # build the router-qmail subpackage
# snapshot: DATE
-#define _snap 20051227
+%define _snap 20060118
# release candidate
-%define _rc 2
+#define _rc 2
-%define _rel 0.49
+%define _rel 0.2
%if 0%{?_rc:1}
%define _source http://eventum.mysql.org/eventum-1.7.0.tar.gz
Summary(pl): Eventum - system ¶ledzenia spraw/b³êdów
Name: eventum
Version: 1.7.0
-Release: %{?_snap:0.%{_snap}.}%{?_rc:%{_rc}.}%{_rel}
+Release: %{?_snap:4.%{_snap}.}%{?_rc:%{_rc}.}%{_rel}
License: GPL
Group: Applications/WWW
Source0: %{_source}
-# Source0-md5: d0869fd0ceda5f12974e16399493cd64
+# Source0-md5: dafef066667ead53f415c11690033b93
Source1: %{name}-apache.conf
Source2: %{name}-mail-queue.cron
Source3: %{name}-mail-download.cron
Patch8: %{name}-perms.patch
Patch9: http://glen.alkohol.ee/pld/%{name}-httpclient-clientside.patch
Patch10: %{name}-cli-wr-separated.patch
-Patch11: %{name}-php440.patch
Patch12: %{name}-htmloptions-truncate.patch
Patch13: http://glen.alkohol.ee/pld/%{name}-link_filter-updates.patch
+Patch14: http://glen.alkohol.ee/pld/%{name}-irc-mem.patch
+Patch16: http://glen.alkohol.ee/pld/eventum-recent_activity-usability.patch
+Patch17: http://glen.alkohol.ee/pld/eventum-upload-error-keep-popup.patch
+Patch18: http://glen.alkohol.ee/pld/eventum-scm-parse-response.patch
URL: http://dev.mysql.com/downloads/other/eventum/
%{?with_pear:BuildRequires: rpm-php-pearprov >= 4.0.2-98}
-BuildRequires: rpmbuild(macros) >= 1.223
+BuildRequires: rpmbuild(macros) >= 1.268
BuildRequires: sed >= 4.0
Requires: %{name}-base = %{version}-%{release}
-Requires: Smarty >= 2.6.2
+Requires: Smarty >= 2.6.10-4
Requires: php >= 3:4.2.0
Requires: php-gd
Requires: php-imap
Requires: php-pear-PEAR-core
Requires: php-pear-Text_Diff
Requires: php-pear-XML_RPC
-#Suggests: php-pear-Net_POP3
%endif
Requires(triggerpostun): /usr/bin/php
Requires(triggerpostun): sed >= 4.0
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%define _noautoreq 'pear(/etc/webapps/.*)' 'pear(jpgraph_dir.php)' 'pear(.*Smarty.class.php)' 'pear(Net/POP3.php)'
+%define _noautoreq 'pear(/etc/webapps/.*)' 'pear(jpgraph_dir.php)' 'pear(.*Smarty.class.php)'
%define _libdir %{_prefix}/lib/%{name}
-%define _appdir %{_datadir}/%{name}
+%define _appdir %{_datadir}/%{name}
%define _smartyplugindir %{_appdir}/include/smarty
%define _smartydir /usr/share/php/Smarty
%define _webapps /etc/webapps
%define _webapp %{name}
-%define _sysconfdir %{_webapps}/%{_webapp}
+%define _webappdir %{_webapps}/%{_webapp}
+%define _sysconfdir /etc/%{name}
%description
Eventum is a user-friendly and flexible issue tracking system that can
%package route-drafts
Summary: Eventum Draft Routing
+Summary(pl): Przekazywanie szkiców dla Eventum
Group: Applications/WWW
Requires: %{name} = %{version}-%{release}
Requires: /usr/bin/php
Requires: eventum(router)
%description route-drafts
-The draft routing feature is used to automatically associate a thread of drafts
-into an Eventum issue. By setting up qmail (or even postfix) to deliver emails
-sent to a specific address (usually draft-<number>@<domain>) to the above
-script, users are able to send drafts written in their mail client to be stored
-in Eventum. These drafts will NOT broadcasted to the notification list.
+The draft routing feature is used to automatically associate a thread
+of drafts into an Eventum issue. By setting up qmail (or even Postfix)
+to deliver emails sent to a specific address (usually
+draft-<number>@<domain>) to the above script, users are able to send
+drafts written in their mail client to be stored in Eventum. These
+drafts will NOT broadcasted to the notification list.
+
+%description route-drafts -l pl
+Przekazywanie szkiców s³u¿y do automatycznego wi±zania w±tku szkiców z
+problemem w Eventum. Ustawiaj±c qmaila (czy nawet Postfiksa), aby
+dostarcza³ pocztê wys³an± na podany adres (zwykle
+draft-<liczba>@<domena>) do tego skryptu umo¿liwia siê u¿ytkownikom
+wysy³anie szkiców napisanych w ich kliencie pocztowym do zapisania w
+Eventum. Szkice te NIE bêd± wysy³ane na listê powiadomieñ.
%package route-emails
Summary: Eventum Email Routing
Requires(triggerpostun): sed >= 4.0
Requires: %{name} = %{version}-%{release}
Requires: /usr/bin/php
-#Requires: php-pear-Net_SmartIRC
+Requires: php-pear-Net_SmartIRC
Requires: php-sockets
Requires: rc-scripts >= 0.4.0.18
# sample, not used in eventum
rm -f rpc/xmlrpc_client.php
-sed -e '1s,#!.*/bin/php -q,#!%{_bindir}/php,' misc/cli/eventum > %{name}-cli
-sed -e '1i#!%{_bindir}/php' misc/scm/process_cvs_commits.php > %{name}-scm
-mv misc/cli/eventumrc_example eventumrc
-
-sed -e '
-s,$private_key\s*=\s*".*";,$private_key = "DEFAULTPRIVATEKEYPLEASERUNSETUP!";,
-' < include/private_key.php > private_key.php.in
-rm -f include/private_key.php
-
-# using system package FIXME?
-#rm -rf include/pear/Net/SmartIRC*
-
# packaging
%patch0 -p1
%patch1 -p1
+%patch14 -p1
%patch2 -p1
%{?with_pear:%patch3 -p1}
%patch8 -p1
%patch9 -p1
%patch10 -p1
-%patch11 -p1
%patch12 -p1
%patch13 -p1
+%patch16 -p1
+%patch17 -p1
+%patch18 -p1
+
+sed -e '1s,#!.*/bin/php -q,#!%{_bindir}/php,' misc/cli/eventum > %{name}-cli
+sed -e '1i#!%{_bindir}/php' misc/scm/process_cvs_commits.php > %{name}-scm
+sed -e '1i#!%{_bindir}/php' misc/irc/bot.php > %{name}-bot
+mv misc/cli/eventumrc_example eventumrc
+
+sed -e '
+s,$private_key\s*=\s*".*";,$private_key = "DEFAULTPRIVATEKEYPLEASERUNSETUP!";,
+' < include/private_key.php > private_key.php.in
+rm -f include/private_key.php
# replace in remaining scripts config.inc.php to system one
grep -rl 'include_once(".*config.inc.php")' . | xargs sed -i -e '
- s,include_once(".*config.inc.php"),include_once("%{_sysconfdir}/core.php"),
+ s,include_once(".*config.inc.php"),include_once("%{_webappdir}/core.php"),
'
grep -rl 'APP_INC_PATH..*"private_key.php"' . | xargs sed -i -e '
- s,include_once(APP_INC_PATH.*"private_key.php"),include_once("%{_sysconfdir}/private_key.php"),
+ s,include_once(APP_INC_PATH.*"private_key.php"),include_once("%{_webappdir}/private_key.php"),
'
# remove backups from patching as we use globs to package files to buildroot
%install
rm -rf $RPM_BUILD_ROOT
install -d \
- $RPM_BUILD_ROOT{%{_sysconfdir},%{_bindir},%{_libdir}} \
+ $RPM_BUILD_ROOT{%{_webappdir},%{_sysconfdir},%{_bindir},%{_sbindir},%{_libdir}} \
$RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d,sysconfig} \
$RPM_BUILD_ROOT/var/{run,log,cache,lib}/%{name} \
$RPM_BUILD_ROOT/var/lib/%{name}/routed_{emails,drafts,notes} \
cp -a *.php css customer images js manage reports rpc setup $RPM_BUILD_ROOT%{_appdir}/htdocs
cp -a misc/*.html $RPM_BUILD_ROOT%{_appdir}/htdocs/misc
cp -a misc/*.php $RPM_BUILD_ROOT%{_appdir}
-cp -a misc/irc $RPM_BUILD_ROOT%{_appdir}
cp -a templates $RPM_BUILD_ROOT%{_appdir}
cp -a include/{customer,jpgraph,pear,workflow} $RPM_BUILD_ROOT%{_appdir}/include
cp -a include/*.php $RPM_BUILD_ROOT%{_appdir}/include
cp -a misc/cli/include/class.{misc,command_line}.php $RPM_BUILD_ROOT%{_appdir}/cli
cp -a misc/cli/config.inc.php $RPM_BUILD_ROOT%{_sysconfdir}/cli.php
install %{name}-cli $RPM_BUILD_ROOT%{_bindir}/%{name}
+install %{name}-bot $RPM_BUILD_ROOT%{_sbindir}
# scm
install %{name}-scm $RPM_BUILD_ROOT%{_libdir}/scm
+install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/cvs.php
# private key
-cp -a private_key.php.in $RPM_BUILD_ROOT%{_sysconfdir}/private_key.php
+cp -a private_key.php.in $RPM_BUILD_ROOT%{_webappdir}/private_key.php
-install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
-install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
+install %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/apache.conf
+install %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/httpd.conf
install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-queue
install %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-download
install %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/%{name}-reminder
install %{SOURCE5} $RPM_BUILD_ROOT/etc/cron.d/%{name}-monitor
-install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/cvs.php
install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/irc.php
install %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/eventum-irc
install %{SOURCE9} $RPM_BUILD_ROOT/etc/sysconfig/eventum-irc
s,%%{PHP_PEAR_DIR}%%,%{?with_pear:%{php_pear_dir}}%{!?with_pear:%{_appdir}/includes/pear},
s,%%{APP_PATH}%%,%{_appdir},
s,%%{SMARTY_DIR}%%,%{_smartydir},
-s,%%{SYSCONFDIR}%%,%{_sysconfdir},
-' %{SOURCE10} > $RPM_BUILD_ROOT%{_sysconfdir}/core.php
+s,%%{SYSCONFDIR}%%,%{_webappdir},
+' %{SOURCE10} > $RPM_BUILD_ROOT%{_webappdir}/core.php
# config
-> $RPM_BUILD_ROOT%{_sysconfdir}/setup.php
-mv $RPM_BUILD_ROOT{%{_appdir}/htdocs/config.inc,%{_sysconfdir}/config}.php
+> $RPM_BUILD_ROOT%{_webappdir}/setup.php
+mv $RPM_BUILD_ROOT{%{_appdir}/htdocs/config.inc,%{_webappdir}/config}.php
%if %{with pear}
# provided by PEAR
%post
# check if the package is configured.
-if grep -q 'header("Location: setup/")' %{_sysconfdir}/config.php; then
+if grep -q 'header("Location: setup/")' %{_webappdir}/config.php; then
if [ -f %{_appdir}/htdocs/setup/index.php ]; then
%banner %{name} -e <<EOF
You haven't yet configured Eventum!
Please open in browser <http://localhost/eventum/>
If you need access from elsewhere, you need to edit
-%{_sysconfdir}/apache.conf and restart apache.
+%{_webappdir}/apache.conf and restart apache.
IMPORTANT: When You have configured Eventum, please uninstall the
setup package, so that %{name}-setup is able to secure your Eventum
To setup eventum, please install %{name}-setup and open in browser
<http://localhost/eventum/>.
If you need access from elsewhere, you need to edit
-%{_sysconfdir}/apache.conf and restart apache.
+%{_webappdir}/apache.conf and restart apache.
IMPORTANT: When You have configured Eventum, please uninstall the
setup package, so that %{name}-setup is able to secure your Eventum
#' vim syntax hack
fi
-elif grep -q 'DEFAULTPRIVATEKEY' %{_sysconfdir}/private_key.php; then
+elif grep -q 'DEFAULTPRIVATEKEY' %{_webappdir}/private_key.php; then
%banner %{name} -e <<EOF
You have default private key installed!
%post router-qmail
CF=/etc/qmail/control/virtualdomains
if ! grep -q ':%{name}\b' $CF 2>/dev/null; then
- FQDN=$(awk -F'"' '/define/ && $2 ~ /APP_HOSTNAME/ {print $4}' %{_sysconfdir}/config.php 2>/dev/null)
+ FQDN=$(awk -F'"' '/define/ && $2 ~ /APP_HOSTNAME/ {print $4}' %{_webappdir}/config.php 2>/dev/null)
[ "$FQDN" ] || FQDN=$(hostname -f 2>/dev/null || echo localhost)
umask 022
echo "#${FQDN}:%{name}" >> $CF
fi
%post setup
-chmod 660 %{_sysconfdir}/{config,private_key}.php
-chown root:eventum %{_sysconfdir}/{config,private_key}.php
+chmod 660 %{_webappdir}/{config,private_key}.php
+chown root:eventum %{_webappdir}/{config,private_key}.php
%postun setup
if [ "$1" = "0" ]; then
- chmod 640 %{_sysconfdir}/{config,private_key}.php
- chown root:eventum %{_sysconfdir}/{config,private_key}.php
+ chmod 640 %{_webappdir}/{config,private_key}.php
+ chown root:eventum %{_webappdir}/{config,private_key}.php
fi
%post irc
/sbin/chkconfig --add eventum-irc
-if [ -f /var/lock/subsys/eventum-irc ]; then
- /etc/rc.d/init.d/eventum-irc restart >&2
-else
- echo "Run \"/etc/rc.d/init.d/eventum-irc start\" to start Eventum IRC Bot." >&2
-fi
+%service eventum-irc restart "Eventum IRC Bot"
%triggerin -- apache1
%webapp_register apache %{_webapp}
if [ -L /etc/apache/conf.d/99_%{_webapp}.conf ]; then
/usr/sbin/webapp register apache %{_webapp}
rm -f /etc/apache/conf.d/99_%{_webapp}.conf
- if [ -f /var/lock/subsys/apache ]; then
- /etc/rc.d/init.d/apache reload 1>&2
- fi
+ %service -q apache reload
fi
if [ -L /etc/httpd/httpd.conf/99_%{_webapp}.conf ]; then
/usr/sbin/webapp register httpd %{_webapp}
rm -f /etc/httpd/httpd.conf/99_%{_webapp}.conf
- if [ -f /var/lock/subsys/httpd ]; then
- /etc/rc.d/init.d/httpd reload 1>&2
- fi
+ %service -q httpd reload
fi
%{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.6.1_to_v1.7.0 <<EOF
# regular configs
for i in apache.conf config.php private_key.php setup.php; do
if [ -f /etc/eventum/$i.rpmsave ]; then
- mv -f %{_sysconfdir}/$i{,.rpmnew}
- mv -f /etc/eventum/$i.rpmsave %{_sysconfdir}/$i
+ mv -f %{_webappdir}/$i{,.rpmnew}
+ mv -f /etc/eventum/$i.rpmsave %{_webappdir}/$i
fi
done
-%triggerpostun cli -- %{name}-cli < 1.6.1-4.16
-if [ -f /etc/eventum/cli.php.rpmsave ]; then
+%triggerpostun cli -- %{name}-cli < 1.7.0-3.4
+if [ -f %{_webappdir}/cli.php.rpmsave ]; then
mv -f %{_sysconfdir}/cli.php{,.rpmnew}
- mv -f /etc/eventum/cli.php.rpmsave %{_sysconfdir}/cli.php
+ mv -f %{_webappdir}/cli.php.rpmsave %{_sysconfdir}/cli.php
fi
-%triggerpostun irc -- %{name}-irc < 1.6.1-4.17
-if [ -f /etc/eventum/irc.php.rpmsave ]; then
+%triggerpostun irc -- %{name}-irc < 1.7.0-3.4
+if [ -f %{_webappdir}/irc.php.rpmsave ]; then
mv -f %{_sysconfdir}/irc.php{,.rpmnew}
- mv -f /etc/eventum/irc.php.rpmsave %{_sysconfdir}/irc.php
+ mv -f %{_webappdir}/irc.php.rpmsave %{_sysconfdir}/irc.php
fi
%files
%defattr(644,root,root,755)
-%doc ChangeLog FAQ INSTALL README UPGRADE
+%doc ChangeLog FAQ INSTALL README UPGRADE CONTRIB
%doc docs/* setup/schema.sql
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
-%attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
-%attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/private_key.php
-%attr(660,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/setup.php
-%attr(640,root,eventum) %config %verify(not mtime) %{_sysconfdir}/core.php
+%attr(751,root,root) %dir %{_webappdir}
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/apache.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/httpd.conf
+%attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/config.php
+%attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/private_key.php
+%attr(660,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/setup.php
+%attr(640,root,eventum) %config %verify(not mtime) %{_webappdir}/core.php
%dir %attr(731,root,eventum) /var/log/%{name}
%attr(620,root,eventum) %ghost /var/log/%{name}/*
%defattr(644,root,root,755)
%attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/irc.php
%attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/eventum-irc
-%{_appdir}/irc
+%attr(755,root,root) %{_sbindir}/%{name}-bot
%attr(754,root,root) /etc/rc.d/init.d/%{name}-irc
%files cli