From 7a906e315d59932aa7a4d384698439dd75cdd9c1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Mon, 2 Feb 2015 20:51:56 +0200 Subject: [PATCH] preparations for 3.0 --- eventum-bot-reconnect.patch | 18 +++---- eventum-gettext.patch | 6 +-- eventum-paths.patch | 70 +++++---------------------- eventum.spec | 94 +++++++++++++++++++------------------ 4 files changed, 72 insertions(+), 116 deletions(-) diff --git a/eventum-bot-reconnect.patch b/eventum-bot-reconnect.patch index 2f2fe6e..49c7e93 100644 --- a/eventum-bot-reconnect.patch +++ b/eventum-bot-reconnect.patch @@ -1,11 +1,11 @@ ---- /usr/share/eventum/irc/bot.php 2005-05-17 23:03:42.000000000 +0300 -+++ ./irc/eventum-irc-bot.php 2005-05-24 14:30:35.000000000 +0300 -@@ -367,7 +367,7 @@ +--- eventum-3.0.0/irc/eventum-irc-bot.php~ 2015-02-02 20:07:00.097413069 +0200 ++++ eventum-3.0.0/irc/eventum-irc-bot.php 2015-02-02 20:07:19.803776739 +0200 +@@ -442,7 +442,7 @@ $irc->setLogdestination(SMARTIRC_FILE); $irc->setLogfile(APP_IRC_LOG); - $irc->setUseSockets(TRUE); --$irc->setAutoReconnect(TRUE); -+$irc->setAutoReconnect(FALSE); - $irc->setAutoRetry(TRUE); - - // register saytime() to be called every 30 sec. (30,000 milliseconds) + $irc->setUseSockets(true); +-$irc->setAutoReconnect(true); ++$irc->setAutoReconnect(false); + $irc->setAutoRetry(true); + $irc->setReceiveTimeout(600); + $irc->setTransmitTimeout(600); diff --git a/eventum-gettext.patch b/eventum-gettext.patch index 289701f..1dcb7a0 100644 --- a/eventum-gettext.patch +++ b/eventum-gettext.patch @@ -1,6 +1,6 @@ ---- eventum-2.2/lib/eventum/class.language.php~ 2009-06-27 20:21:10.000000000 +0300 -+++ eventum-2.2/lib/eventum/class.language.php 2009-06-27 20:25:56.411199906 +0300 -@@ -227,6 +227,5 @@ +--- eventum-3.0.0/lib/eventum/gettext.php~ 2014-11-12 18:47:36.000000000 +0200 ++++ eventum-3.0.0/lib/eventum/gettext.php 2015-02-02 20:08:38.869227761 +0200 +@@ -95,6 +95,5 @@ } // this won't change over the request. so set it once and permanently diff --git a/eventum-paths.patch b/eventum-paths.patch index f118958..a860e6a 100644 --- a/eventum-paths.patch +++ b/eventum-paths.patch @@ -1,19 +1,5 @@ ---- ./cli/eventum.php 2009-06-27 19:46:44.401524716 +0300 -+++ ./cli/eventum.php 2009-06-27 19:45:22.781438493 +0300 -@@ -12,9 +12,8 @@ - // @(#) $Id$ - - // definitions of path related variables --define('APP_PATH', dirname(__FILE__) . '/'); --define('APP_INC_PATH', APP_PATH . '/lib/eventum'); --define('APP_PEAR_PATH', APP_PATH . '/lib/pear'); -+define('APP_PATH', '/usr/share/eventum'); -+define('APP_INC_PATH', APP_PATH . '/cli'); - - if (defined('APP_PEAR_PATH')) { - set_include_path(APP_PEAR_PATH . PATH_SEPARATOR . get_include_path()); ---- eventum-2.3.3/init.php~ 2012-12-17 13:49:09.000000000 +0200 -+++ eventum-2.3.3/init.php 2012-12-17 13:49:41.676803793 +0200 +--- eventum-3.0.0/init.php~ 2015-02-02 20:02:01.825332859 +0200 ++++ eventum-3.0.0/init.php 2015-02-02 20:03:12.610911011 +0200 @@ -27,7 +27,7 @@ // | Authors: Elan Ruusamäe | // +----------------------------------------------------------------------+ @@ -32,7 +18,9 @@ } // include local site config. may override any default -@@ -64,23 +64,15 @@ +--- eventum-3.0.0/init.php~ 2015-02-02 20:02:01.825332859 +0200 ++++ eventum-3.0.0/init.php 2015-02-02 20:03:12.610911011 +0200 +@@ -78,7 +78,7 @@ } if (!defined('APP_TPL_COMPILE_PATH')) { @@ -41,23 +29,6 @@ } if (!defined('APP_INC_PATH')) { - define('APP_INC_PATH', APP_PATH . '/lib/eventum'); - } - --if (!defined('APP_PEAR_PATH')) { -- define('APP_PEAR_PATH', APP_PATH . '/lib/pear'); --} -- --if (!defined('APP_SPHINXAPI_PATH')) { -- define('APP_SPHINXAPI_PATH', APP_PATH . '/lib/sphinxapi'); --} -- - if (!defined('APP_SMARTY_PATH')) { -- define('APP_SMARTY_PATH', APP_PATH . '/lib/Smarty'); -+ define('APP_SMARTY_PATH', '/usr/share/php/Smarty'); - } - - if (!defined('APP_JPGRAPH_PATH')) { @@ -81,7 +77,7 @@ } @@ -76,16 +47,10 @@ } if (!defined('APP_ROUTED_MAILS_SAVEDIR')) { ---- eventum-2.3.1/htdocs/setup/index.php~ 2011-09-15 12:34:21.000000000 +0300 -+++ eventum-2.3.1/htdocs/setup/index.php 2011-09-15 12:36:34.061947696 +0300 -@@ -42,14 +42,14 @@ - define('APP_PATH', realpath(dirname(__FILE__) . '/../..')); - define('APP_INC_PATH', APP_PATH . '/lib/eventum'); - define('APP_PEAR_PATH', APP_PATH . '/lib/pear'); --define('APP_SMARTY_PATH', APP_PATH . '/lib/Smarty'); --define('APP_CONFIG_PATH', APP_PATH . '/config'); -+define('APP_SMARTY_PATH', '/usr/share/php/Smarty'); -+define('APP_CONFIG_PATH', '/etc/webapps/eventum'); +--- eventum-3.0.0/htdocs/setup/index.php~ 2015-02-02 20:03:49.507010317 +0200 ++++ eventum-3.0.0/htdocs/setup/index.php 2015-02-02 20:05:00.139257552 +0200 +@@ -44,10 +44,10 @@ + define('APP_CONFIG_PATH', APP_PATH . '/config'); define('APP_SETUP_FILE', APP_CONFIG_PATH . '/setup.php'); define('APP_TPL_PATH', APP_PATH . '/templates'); -define('APP_TPL_COMPILE_PATH', APP_PATH . '/templates_c'); @@ -95,9 +60,9 @@ define('APP_ERROR_LOG', APP_LOG_PATH . '/errors.log'); -define('APP_LOCKS_PATH', APP_PATH . '/locks'); +define('APP_LOCKS_PATH', '/var/run/eventum'); + define('APP_LOCAL_PATH', APP_CONFIG_PATH); header('Content-Type: text/html; charset=' . APP_CHARSET); - @@ -254,10 +254,6 @@ $errors[] = "The 'file_uploads' directive needs to be enabled in your PHP.INI file in order for Eventum to work properly."; } @@ -109,17 +74,6 @@ $error = checkPermissions(APP_SETUP_FILE, "File '" . APP_SETUP_FILE. "'"); if (!empty($error)) { $errors[] = $error; -@@ -329,10 +325,6 @@ - $setup_file_path = APP_SETUP_FILE; - - clearstatcache(); -- // check if config directory is writable -- if (!is_writable(APP_CONFIG_PATH)) { -- return "The file '" . APP_CONFIG_PATH . "' directory needs to be writable by the web server user. Please correct this problem and try again."; -- } - // need to create a random private key variable - $private_key = ' array( diff --git a/eventum.spec b/eventum.spec index 55972ff..5424d88 100644 --- a/eventum.spec +++ b/eventum.spec @@ -9,17 +9,17 @@ # Conditional build: %bcond_with order # with experimental order patch -%define php_min_version 5.1.2 +%define php_min_version 5.3.3 %include /usr/lib/rpm/macros.php Summary: Eventum Issue / Bug tracking system Summary(pl.UTF-8): Eventum - system śledzenia spraw/błędów Name: eventum -Version: 2.3.6 -Release: 1 +Version: 3.0.0 +Release: 0.1 License: GPL v2 Group: Applications/WWW -Source0: https://launchpad.net/eventum/trunk/%{version}/+download/%{name}-%{version}.tar.gz -# Source0-md5: bd210e87117db334e58ee679f156646d +Source0: %{name}-2.4.0-pre1-474-g45f7853.tar.gz +# Source0-md5: acfe413a3a9b530b301cf37e0bb43064 Source1: %{name}-apache.conf Source2: %{name}-mail-queue.cron Source3: %{name}-mail-download.cron @@ -36,11 +36,10 @@ Source15: %{name}-lighttpd.conf Source16: http://www.isocra.com/images/updown2.gif # Source16-md5: deb6eeb2552ba757d3a949ed10c4107d Source17: %{name}.tmpfiles -Patch0: %{name}-lf.patch +#Patch0: %{name}-lf.patch Patch2: %{name}-order.patch -Patch3: group-users.patch -Patch4: https://github.com/glensc/eventum/compare/cf_escape.patch -# Patch4-md5: 17688773ec035fb162b6a8ad2c7cfa76 +#Patch3: group-users.patch +#Patch4: https://github.com/glensc/eventum/compare/cf_escape.patch # packaging patches that probably never go upstream Patch100: %{name}-paths.patch Patch101: %{name}-cvs-config.patch @@ -51,6 +50,7 @@ Patch200: %{name}-fixed-nav.patch URL: http://eventum.mysql.org/ BuildRequires: /usr/bin/php BuildRequires: gettext-tools +BuildRequires: php(core) >= %{php_min_version} BuildRequires: rpm-php-pearprov >= 4.0.2-98 BuildRequires: rpmbuild(macros) >= 1.654 BuildRequires: sed >= 4.0 @@ -449,28 +449,25 @@ Sphinx search integration for Eventum. This package contains the cron job. %prep -%setup -q +%setup -qc +mv eventum-*/* . # GPL v2 rm docs/COPYING -rm -r upgrade/*v1.[123]* # too old to support in PLD Linux -rm -r upgrade/v{1.,2.0,2.1_}* # no longer supported in PLD Linux -rm upgrade/flush_compiled_templates.php -rm -r upgrade/{*/,}index.html # not needed in PLD Linux - # bug fixes / features -%patch0 -p1 +#%patch0 -p1 %{?with_order:%patch2 -p1} -%patch3 -p0 -%patch4 -p1 +#%patch3 -p0 +#%patch4 -p1 -cp -p %{SOURCE16} htdocs/images +%{?with_order:cp -p %{SOURCE16} htdocs/images} #%patch200 -p1 # produce default sphinx config # must be run before paths.patch +%if 0 cat <<'EOF' > config/config.php config/sphinx.conf rm -f config/config.php +%endif # packaging %patch100 -p1 -%patch101 -p1 +#%patch101 -p1 %patch105 -p1 %patch107 -p1 @@ -511,8 +509,9 @@ install -d \ $RPM_BUILD_ROOT%{_appdir}/{include,htdocs/misc,upgrade} \ $RPM_BUILD_ROOT%{systemdtmpfilesdir} -%{__make} install-eventum install-cli install-irc install-scm install-jpgraph install-localization \ +%{__make} install-eventum install-irc install-scm install-jpgraph install-localization \ sysconfdir=%{_webappdir} \ + localedir=%{_localedir} \ DESTDIR=$RPM_BUILD_ROOT %{?with_order:cp -a htdocs/ajax $RPM_BUILD_ROOT%{_appdir}/htdocs} @@ -523,7 +522,7 @@ cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/httpd.conf cp -p %{SOURCE15} $RPM_BUILD_ROOT%{_webappdir}/lighttpd.conf install -d $RPM_BUILD_ROOT/etc/sphinx -cp -p config/sphinx.conf $RPM_BUILD_ROOT/etc/sphinx/%{name}.conf +#cp -p config/sphinx.conf $RPM_BUILD_ROOT/etc/sphinx/%{name}.conf cp -p config/sphinx.conf.php $RPM_BUILD_ROOT%{_webappdir} cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-queue @@ -544,20 +543,18 @@ install -p %{SOURCE13} $RPM_BUILD_ROOT%{_libdir}/router-postfix cp -p %{SOURCE17} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf -%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ht - %find_lang %{name} # scm -install -p %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/scm.php +cp -p %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/scm.php # old compat -ln -s %{_sbindir}/eventum-cvs-hook $RPM_BUILD_ROOT%{_libdir}/process_cvs_commits -ln -s %{_sbindir}/eventum-svn-hook $RPM_BUILD_ROOT%{_libdir}/process_svn_commits +#ln -s %{_sbindir}/eventum-cvs-hook $RPM_BUILD_ROOT%{_libdir}/process_cvs_commits +#ln -s %{_sbindir}/eventum-svn-hook $RPM_BUILD_ROOT%{_libdir}/process_svn_commits # skip pear for cli -rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/cli -cp -a cli/lib/eventum $RPM_BUILD_ROOT%{_datadir}/%{name}/cli +#rm -r $RPM_BUILD_ROOT%{_datadir}/%{name}/cli +#cp -a cli/lib/eventum $RPM_BUILD_ROOT%{_datadir}/%{name}/cli %clean rm -rf $RPM_BUILD_ROOT @@ -661,7 +658,7 @@ done %files -f %{name}.lang %defattr(644,root,root,755) -%doc docs/* htdocs/setup/schema.sql +%doc docs/* %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 @@ -676,7 +673,10 @@ done %dir %attr(750,root,root) /var/log/archive/%{name} %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name} -%dir %{_appdir}/crons +%dir %{_appdir}/bin +%attr(755,root,root) %{_appdir}/bin/download_emails.php +%attr(755,root,root) %{_appdir}/bin/process_all_emails.php + %{_appdir}/init.php %dir %{_appdir}/htdocs %{_appdir}/htdocs/*.php @@ -690,14 +690,16 @@ done %{_appdir}/htdocs/misc %{_appdir}/htdocs/reports %{_appdir}/htdocs/rpc +%{_appdir}/htdocs/components %{_appdir}/templates %dir %{_appdir}/upgrade -%{_appdir}/upgrade/init.php +%{_appdir}/upgrade/flush_compiled_templates.php +%{_appdir}/upgrade/*.sql %attr(755,root,root) %{_appdir}/upgrade/update-database.php %attr(755,root,root) %{_appdir}/upgrade/ldap_import.php -%dir %{_appdir}/upgrade/v* -%attr(755,root,root) %{_appdir}/upgrade/v*/*.php +%attr(755,root,root) %{_appdir}/upgrade/ldap_update_users.php +%attr(755,root,root) %{_appdir}/upgrade/scm_trac_import.php %{_appdir}/upgrade/patches %dir %{_appdir}/lib @@ -725,36 +727,36 @@ done %files mail-queue %defattr(644,root,root,755) -%attr(755,root,root) %{_appdir}/crons/process_mail_queue.php +%attr(755,root,root) %{_appdir}/bin/process_mail_queue.php %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-queue %files mail-download %defattr(644,root,root,755) -%attr(755,root,root) %{_appdir}/crons/download_emails.php +%attr(755,root,root) %{_appdir}/bin/download_emails.php %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-download %files reminder %defattr(644,root,root,755) -%attr(755,root,root) %{_appdir}/crons/check_reminders.php +%attr(755,root,root) %{_appdir}/bin/check_reminders.php %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-reminder %files monitor %defattr(644,root,root,755) %{_appdir}/lib/eventum/class.monitor.php -%attr(755,root,root) %{_appdir}/crons/monitor.php +%attr(755,root,root) %{_appdir}/bin/monitor.php %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-monitor %files route-drafts %defattr(644,root,root,755) -%attr(755,root,root) %{_appdir}/route_drafts.php +%attr(755,root,root) %{_appdir}/bin/route_drafts.php %files route-emails %defattr(644,root,root,755) -%attr(755,root,root) %{_appdir}/route_emails.php +%attr(755,root,root) %{_appdir}/bin/route_emails.php %files route-notes %defattr(644,root,root,755) -%attr(755,root,root) %{_appdir}/route_notes.php +%attr(755,root,root) %{_appdir}/bin/route_notes.php %files router-postfix %defattr(644,root,root,755) @@ -770,19 +772,19 @@ done %files cli %defattr(644,root,root,755) %doc cli/eventumrc -%attr(755,root,root) %{_bindir}/%{name} -%{_appdir}/cli +#%attr(755,root,root) %{_bindir}/%{name} +#%{_appdir}/cli %files scm %defattr(644,root,root,755) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/scm.php -%attr(755,root,root) %{_libdir}/process_cvs_commits -%attr(755,root,root) %{_libdir}/process_svn_commits +#%attr(755,root,root) %{_libdir}/process_cvs_commits +#%attr(755,root,root) %{_libdir}/process_svn_commits %attr(755,root,root) %{_sbindir}/eventum-cvs-hook %attr(755,root,root) %{_sbindir}/eventum-svn-hook %files sphinx %defattr(644,root,root,755) %{_webappdir}/sphinx.conf.php -%attr(750,root,http) %config(noreplace) %verify(not md5 mtime size) /etc/sphinx/%{name}.conf +#%attr(750,root,http) %config(noreplace) %verify(not md5 mtime size) /etc/sphinx/%{name}.conf %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-sphinx -- 2.44.0