2 # RPM spec file for FusionForge
4 # Developed for 4.8 by JL Bond Consulting
5 # Reworked for 5.1 by Alain Peyrat <aljeux@free.fr>
13 %define gfgroup gforge
15 %define httpduser apache
16 %define httpdgroup apache
18 %define fforge_admin fforgeadmin
19 %define fforge_passwd fforgeadmin
21 %define GFORGE_DIR %{_datadir}/gforge
22 %define GFORGE_CONF_DIR %{_sysconfdir}/gforge
23 %define GFORGE_LANG_DIR %{_datadir}/locale
24 %define GFORGE_VAR_LIB %{_var}/lib/gforge
26 %define reloadhttpd() /etc/init.d/httpd httpd reload >/dev/null 2>&1
29 Summary: FusionForge Collaborative Development Environment
35 Group: Development/Tools
36 Source0: %{name}-%{version}.tar.bz2
37 Source1: README.mediawiki.jlbond
38 Source2: LocalSettings.php
39 Patch0: fusionforge-4.8.3-ereg_preg.patch
40 Patch1: fusionforge-4.8.3-webcalendar.patch
41 Patch2: fusionforge-4.8.3-mediawiki.patch
42 Patch3: fusionforge-4.8.3-register_globals.patch
43 URL: http://www.fusionforge.org/
44 BuildRoot: %{_tmppath}/%{name}-%{version}-root
45 Packager: Alain Peyrat <aljeux@free.fr>
47 # requirements as derived from fusionforge-install-1-deps.php script
48 Requires: httpd, mod_dav_svn, mod_ssl, php, php-pgsql, php-gd, php-mbstring, mailman
49 Requires: postgresql, postgresql-libs, postgresql-server, postgresql-contrib
50 Requires: postfix, openssh, inetd, which, liberation-fonts
52 Requires: /bin/sh, /bin/bash
53 Requires: perl, perl-DBI, perl-HTML-Parser, perl-Text-Autoformat, perl-Mail-Sendmail, perl-Sort-Versions
55 Requires: php-jpgraph php-gd
56 #update sys_path_to_jpgraph in gforge.conf if you remove this line
57 #Requires: /var/www/jpgraph/jpgraph.php
58 #Requires: libnss-pgsql >= 1.4
61 Requires: htmlpurifier >= 4.0.0
64 Requires: /usr/bin/newaliases
66 # BuildRequires: sed, perl
68 Provides: gforge = %{version}
71 FusionForge provides many tools to aid collaboration in a
72 development project, such as bug-tracking, task management,
73 mailing-lists, SCM repository, forums, support request helper,
74 web/FTP hosting, release management, etc. All these services are
75 integrated into one web site and managed through a web interface.
77 %package aselectextauth
78 Summary: A-select external authentication for FusionForge
79 Group: Development/Tools
80 Requires: %{name} >= %{version}, php, postgresql
81 %description aselectextauth
82 A system for authenticating users in fusionforge. A-Select is a framework
83 where users can be authenticated by several means with Authentication
87 Summary: Provides email notifications of changes to CVS repositories
88 Group: Development/Tools
89 Requires: %{name} >= %{version}, %{name}-scmcvs, python, php
90 %description cvssyncmail
91 This plugin adds the capability to notify users of changes to CVS repositories
95 Summary: Links CVS log messages to trackers and tasks.
96 Group: Development/Tools
97 Requires: %{name} >= %{version}, %{name}-scmcvs, php, postgresql
98 %description cvstracker
99 This is a fusionforge plugin that allows linking CVS log messages to
100 trackers and tasks. It will review all commits in a project and search for
101 specific string to know which task or tracker is related.
103 %package externalsearch
104 Summary: external search plugin for FusionForge
105 Group: Development/Tools
106 Requires: %{name} >= %{version}, php
107 %description externalsearch
108 This plugin adds a new search engine to your FusionForge site. It allows
109 your users to search your FusionForge site through external search engines
110 which have indexed it. You can define search engines you want to use in
111 the configuration file.
114 Summary: FCKEditor plugin for FusionForge
115 Group: Development/Tools
116 Requires: %{name} >= %{version}, php
117 %description fckeditor
118 FCKEditor is a WYSIWYG text editor that displays within a web browser.
121 Summary: external LDAP authentication for FusionForge plugin
122 Group: Development/Tools
123 Requires: %{name} >= %{version}, php
124 %description ldapextauth
125 This plugin provides LDAP authentication capability for FusionForge.
128 Summary: MantisBT plugin for FusionForge
129 Group: Development/Tools
130 Requires: %{name} >= %{version}, php
132 A plugin to use the MantisBT web-based bug tracking system with FusionForge.
135 Summary: Mediawiki plugin for FusionForge
136 Group: Development/Tools
137 Requires: %{name} >= %{version}, php, mediawiki
138 %description mediawiki
139 This is a plugin to integrate MediaWiki within FusionForge.
142 Summary: online_help plugin for FusionForge
143 Group: Development/Tools
144 Requires: %{name} >= %{version}, php
145 %description online_help
146 This is a online_help plugin within FusionForge.
148 %package projects_hierarchy
149 Summary: projects_hierarchy plugin for FusionForge
150 Group: Development/Tools
151 Requires: %{name} >= %{version}, php
152 %description projects_hierarchy
153 This is a projects_hierarchy plugin within FusionForge.
155 %package quota_management
156 Summary: quota_management plugin for FusionForge
157 Group: Development/Tools
158 Requires: %{name} >= %{version}, php
159 %description quota_management
160 This is a quota_management plugin within FusionForge.
163 Summary: Arch version control plugin for FusionForge
164 Group: Development/Tools
165 Requires: %{name} >= %{version}, php, arch
167 This is a plugin to integrate Arch version control system with FusionForge
170 Summary: Bazaar version control plugin for FusionForge
171 Group: Development/Tools
172 Requires: %{name} >= %{version}, php, bazaar
174 This is a plugin to integrate Bazaar version control system with FusionForge
177 Summary: DARCS version control plugin for FusionForge
178 Group: Development/Tools
179 Requires: %{name} >= %{version}, php, darcs
180 %description scmdarcs
181 This is a plugin to integrate DARCS version control system with FusionForge
184 Summary: Bazaar version control plugin for FusionForge
185 Group: Development/Tools
186 Requires: %{name} >= %{version}, php, git
188 This is a plugin to integrate Bazaar version control system with FusionForge
191 Summary: Mercurial (hg) version control plugin for FusionForge
192 Group: Development/Tools
193 Requires: %{name} >= %{version}, php, hg
195 This is a plugin to integrate Mercurial (hg) version control system with FusionForge
198 Summary: Clear Case plugin for FusionForge
199 Group: Development/Tools
200 Requires: %{name} >= %{version}, php
201 %description scmccase
202 This is the Clear Case plugin for FusionForge. It creats Clear Case repositories
203 for projects within FusionForge.
206 Summary: CVS plugin for FusionForge
207 Group: Development/Tools
208 Requires: %{name} >= %{version}, php, cvs
210 FusionForge is a web-based Collaborative Development Environment offering
211 easy access to CVS, mailing lists, bug tracking, message
212 boards/forums, task management, permanent file archival, and total
213 web-based administration.
215 This RPM installs SCM CVS plugin for FusionForge and provides CVS support
218 It also provides a specific version of CVSWeb wrapped in FusionForge.
221 Summary: Subversion plugin for FusionForge
222 Group: Development/Tools
223 Requires: %{name} >= %{version}, php, subversion
225 This RPM installs SCM SVN plugin for FusionForge and provides svn support
228 %package svncommitemail
229 Summary: subversion commit email plugin for FusionForge
230 Group: Development/Tools
231 Requires: %{name} >= %{version}, php, subversion, perl, %{name}-scmsvn >= %{version}
232 %description svncommitemail
233 This RPM installs subversion commit email notification plugin for FusionForge.
236 Summary: SVNTracker plugin for FusionForge
237 Group: Development/Tools
238 Requires: %{name} >= %{version}, php, subversion, perl, postgresql, %{name}-scmsvn >= %{version}
239 %description svntracker
240 SVNTracker plugin allows linking SVN log messages to Trackers and tasks.
241 It will review all commits in a project and search for a specific string
242 to know which task or tracker is related.
245 Summary: webcalendar plugin for FusionForge
246 Group: Development/Tools
247 Requires: %{name} >= %{version}, php, postgresql
248 %description webcalendar
249 WebCalendar plugin for FusionForge.
252 Summary: Blocks plugin for FusionForge
253 Group: Development/Tools
254 Requires: %{name} >= %{version}
256 HTML blocks plugin for FusionForge.
259 Summary: extratabs plugin for FusionForge
260 Group: Development/Tools
261 Requires: %{name} >= %{version}
262 %description extratabs
263 HTML extratabs plugin for FusionForge.
266 Summary: Wiki plugin for FusionForge
267 Group: Development/Tools
268 Requires: %{name} >= %{version}, php, postgresql
270 Wiki plugin for FusionForge. Allows for one wiki per project, integrated search,
271 page edits displayed on activity tab, and multi-project wiki preferences.
273 %package projectlabels
274 Summary: Labels plugin for FusionForge
275 Group: Development/Tools
276 Requires: %{name} >= %{version}, php, postgresql
277 %description projectlabels
278 Project Labels plugin for FusionForge.
280 %package contribtracker
281 Summary: contribtracker plugin for FusionForge
282 Group: Development/Tools
283 Requires: %{name} >= %{version}, php, postgresql
284 %description contribtracker
285 contribtracker plugin for FusionForge.
287 %package globalsearch
288 Summary: globalsearch plugin for FusionForge
289 Group: Development/Tools
290 Requires: %{name} >= %{version}, php, postgresql
291 %description globalsearch
292 globalsearch plugin for FusionForge.
295 Summary: mantisbt plugin for FusionForge
296 Group: Development/Tools
297 Requires: %{name} >= %{version}, php, postgresql
298 %description mantisbt
299 mantisbt plugin for FusionForge.
309 # empty build section
312 %{__rm} -rf $RPM_BUILD_ROOT
314 # creating required directories
315 %{__install} -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d
316 %{__install} -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/cron.d
317 %{__install} -m 755 -d $RPM_BUILD_ROOT/bin
318 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_DIR}
319 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_DIR}/lib
320 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}
321 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/httpd.d
322 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/httpd.conf.d
323 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/config.ini.d
324 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/plugins
325 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_LANG_DIR}
326 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_VAR_LIB}
327 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_VAR_LIB}/upload
328 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_VAR_LIB}/scmtarballs
329 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_VAR_LIB}/scmsnapshots
330 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_VAR_LIB}/homedirs
331 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_VAR_LIB}/dumps
332 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_VAR_LIB}/chroot/scmrepos/svn
333 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_VAR_LIB}/chroot/scmrepos/cvs
334 %{__install} -m 755 -d $RPM_BUILD_ROOT/home/groups
335 # mock mediawiki directory because we symlink GForge skin to Monobook
336 %{__install} -m 755 -d $RPM_BUILD_ROOT/usr/share/mediawiki/skins
338 # we define a search and replace function, we'll be using this a lot
339 # to fix several parts of the installation
342 for i in `/usr/bin/find . -type f`
344 if $(grep -q ${1} $i) ; then
345 %{__sed} -i -e "s+${1}+${2}+g" $i
350 # we need to fix up the fusionforge-install-3-db.php script to ref %{GFORGE_DIR}
351 search_and_replace "/opt/gforge" "%{GFORGE_DIR}"
354 %{__cp} -a * $RPM_BUILD_ROOT/%{GFORGE_DIR}/
356 # create project vhost space symlink
357 %{__ln_s} /home/groups $RPM_BUILD_ROOT/%{GFORGE_VAR_LIB}/homedirs/groups
358 # install restricted shell for cvs accounts
359 %{__cp} -a plugins/scmcvs/bin/cvssh.pl $RPM_BUILD_ROOT/bin/
361 # Fix configuration files entries (various sys_* variables)
362 %{__cp} -a etc/local.inc.example $RPM_BUILD_ROOT/%{GFORGE_CONF_DIR}/local.inc
363 %{__sed} -i -e "s!/path/to/gforge!%{GFORGE_DIR}!g" $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/local.inc
364 %{__sed} -i -e "s/\$sys_dbname=.*/\$sys_dbname='%{dbname}';/g" $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/local.inc
365 %{__sed} -i -e "s/\$sys_dbuser=.*/\$sys_dbuser='%{dbuser}';/g" $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/local.inc
366 %{__sed} -i -e "s/\$sys_apache_user=.*/\$sys_apache_user='%{httpduser}';/g" $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/local.inc
367 %{__sed} -i -e "s/\$sys_apache_group=.*/\$sys_apache_group='%{httpdgroup}';/g" $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/local.inc
368 %{__sed} -i -e "s|\$sys_plugins_path=.*|\$sys_plugins_path=\"%{GFORGE_DIR}/plugins\";|g" $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/local.inc
369 %{__sed} -i -e "s|\$sys_upload_dir=.*|\$sys_upload_dir=\"\$sys_var_path/upload\";|g" $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/local.inc
370 %{__sed} -i -e "s|\$sys_urlroot=.*|\$sys_urlroot=\"%{GFORGE_DIR}/www\";|g" $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/local.inc
372 # Replace sys_localinc, sys_gfdbname, sys_gfdbuser
373 %{__cp} -a etc/httpd.secrets.example $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/httpd.secrets
374 %{__sed} -i -e "s|sys_localinc.*$|sys_localinc %{GFORGE_CONF_DIR}/local.inc|g" $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/httpd.secrets
375 %{__sed} -i -e "s|sys_gfdbname.*$|sys_gfdbname %{dbname}|g" $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/httpd.secrets
376 %{__sed} -i -e "s|sys_gfdbuser.*$|sys_gfdbname %{dbuser}|g" $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/httpd.secrets
378 # Apache configuration file
379 %{__cp} -a etc/gforge-httpd.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/gforge.conf
380 %{__sed} -i -e 's|.*php_value[[:space:]]*include_path.*$|\tphp_value\tinclude_path ".:/usr/share/gforge/www/include:/usr/share/gforge:/etc/gforge:/usr/share/gforge/common:/usr/share/gforge/www:/usr/share/gforge/plugins"|' $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/gforge.conf
381 # install fusionforge crontab
382 %{__install} -m 644 packaging/cron.d/cron.fusionforge $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/%{name}
384 %{__install} -m 644 deb-specific/sqlhelper.pm $RPM_BUILD_ROOT%{GFORGE_DIR}/lib/sqlhelper.pm
386 # Install locale files in Redhat standard location
387 %{__cp} -a locales/* $RPM_BUILD_ROOT/%{GFORGE_LANG_DIR}/
389 # create symlink for jpgraph
390 %{__ln_s} /usr/share/jpgraph $RPM_BUILD_ROOT%{GFORGE_DIR}/jpgraph
392 %{__rm} -f $RPM_BUILD_ROOT%{GFORGE_DIR}/utils/fusionforge-shell-postgresql.spec
394 %{__rm} -f $RPM_BUILD_ROOT%{GFORGE_DIR}/COPYING.php
395 %{__rm} -fr $RPM_BUILD_ROOT/%{GFORGE_DIR}/packaging
396 %{__rm} -fr $RPM_BUILD_ROOT/%{GFORGE_DIR}/deb-specific
397 %{__rm} -fr $RPM_BUILD_ROOT/%{GFORGE_DIR}/rpm-specific
398 %{__rm} -fr $RPM_BUILD_ROOT/%{GFORGE_DIR}/plugins/*/packaging
399 %{__rm} -fr $RPM_BUILD_ROOT/%{GFORGE_DIR}/plugins/*/*.spec
402 %{__cp} $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/*/etc/*.ini $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/config.ini.d/
403 %{__cp} $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/*/etc/cron.d/* $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/
404 %{__rm} -f $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/README
406 # plugin: aselectextauth
408 # plugin: cvssyncmail
411 # delete stuff that is clearly outdated/obsolete so we don't package this and confuse others
412 %{__rm} -f $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/cvstracker/httpd.conf
413 %{__rm} -f $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/cvstracker/Makefile
414 %{__rm} -rf $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/cvstracker/rpm-specific
415 # this is pre-activated, so create the config symlink
416 %{__ln_s} %{GFORGE_DIR}/plugins/cvstracker/etc/plugins/cvstracker $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/plugins/cvstracker
418 # plugin: externalsearch
422 # plugin: ldapextauth
423 %{__rm} -rf $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/ldapextauth/rpm-specific
428 # create symlink for apache configuration for mediawiki plugin
429 ## first, delete the php_admin_value include_path
430 %{__sed} -i -e "/^.*php_admin_value[[:space:]]*include_path.*/d" $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/mediawiki/etc/httpd.d/61plugin-mediawiki
431 %{__ln_s} %{GFORGE_DIR}/plugins/mediawiki/etc/httpd.d/61plugin-mediawiki $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/httpd.d/03mediawiki.conf
432 # this is pre-activated, so create the config symlink
433 #%{__ln_s} %{GFORGE_DIR}/plugins/mediawiki/etc/plugins/mediawiki $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/plugins/mediawiki
434 # create symlinks to use MonoBook as the GForge skin
435 %{__ln_s} monobook $RPM_BUILD_ROOT/usr/share/mediawiki/skins/gforge
436 %{__ln_s} MonoBook.deps.php $RPM_BUILD_ROOT/usr/share/mediawiki/skins/GForge.deps.php
437 %{__ln_s} MonoBook.php $RPM_BUILD_ROOT/usr/share/mediawiki/skins/GForge.php
438 # sort out the GForge skin files and remove obsolete code
439 %{__rm} -rf $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/mediawiki/mediawiki-skin
440 %{__rm} -rf $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/mediawiki/usr/share/gforge
441 %{__rm} -rf $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/mediawiki/usr/share/mediawiki/skins
442 # insert our own LocalSettings.php
443 #%{__cp} -f %{SOURCE2} $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/mediawiki/usr/share/mediawiki/LocalSettings.php
444 # insert our own README file
445 %{__cp} -f %{SOURCE1} $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/mediawiki/README.jlbond
447 # plugin: online_help
449 # plugin: projects_hierarchy
451 # plugin: quota_management
460 %{__ln_s} ../../plugins/scmcvs $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/scmcvs
461 %{__install} -m 644 plugins/scmcvs/cron.d/%{name}-plugin-scmcvs $RPM_BUILD_ROOT%{_sysconfdir}/cron.d
466 # this is pre-activated, so create the config symlink
467 %{__ln_s} ../../plugins/scmsvn $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/scmsvn
470 %{__ln_s} ../../plugins/scmgit $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/scmgit
474 # plugin: svncommitemail
478 %{__install} -m 644 plugins/svntracker/rpm-specific/cron.d/gforge-plugin-svntracker $RPM_BUILD_ROOT%{_sysconfdir}/cron.d
480 # plugin: webcalendar
483 %{__ln_s} ../../plugins/blocks/www/ $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/blocks
486 %{__ln_s} ../../plugins/extratabs/www/ $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/extratabs
489 %{__ln_s} ../../plugins/wiki/www/ $RPM_BUILD_ROOT%{GFORGE_DIR}/www/wiki
491 # plugin: projectlabels
492 %{__ln_s} ../../plugins/projectlabels/www/ $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/projectlabels
494 # plugin: contribtracker
495 %{__ln_s} ../../plugins/contribtracker/www/ $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/contribtracker
497 # plugin: globalsearch
498 %{__ln_s} ../../plugins/globalsearch/www/ $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/globalsearch
501 %{__ln_s} ../../plugins/mantisbt/www/ $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/mantisbt
503 ### END OF PLUGIN SETUP ###
506 # we will need postgresql to be running. we start it, even if it already is running
507 # this won't hurt anything, just ensure we have a running database
508 /sbin/service postgresql start >>/var/log/%{name}-install.log 2>&1
510 if [ "$1" -eq "1" ]; then
511 # setup user/group for gforge
512 if [ `/usr/bin/getent passwd | /bin/cut -d: -f1 | /bin/grep -c %{gfuser}` -eq 0 ] ; then
513 echo "Did not find existing fusionforge user. Adding fusionforge group and user..." >>/var/log/%{name}-install.log 2>&1
514 /usr/sbin/groupadd -r %{gfgroup}
515 /usr/sbin/useradd -r -g %{gfgroup} -d %{GFORGE_DIR} -s /bin/bash -c "FusionForge User" %{gfuser}
520 if [ "$1" -eq "1" ]; then
521 # check to see if the database already exists. if not, we proceed to create it.
522 # if so, we print a warning message.
523 echo "\q" | su - postgres -c "/usr/bin/psql %{dbname}" 1>/dev/null 2>&1
525 if [ $ret -ne 0 ] ; then
527 FFORGE_USER=%{dbuser}
528 FFORGE_ADMIN_USER=%{fforge_admin}
529 FFORGE_ADMIN_PASSWORD=%{fforge_passwd}
530 export FFORGE_DB FFORGE_USER FFORGE_ADMIN_USER FFORGE_ADMIN_PASSWORD
531 /usr/bin/php %{GFORGE_DIR}/fusionforge-install-3-db.php >>/var/log/%{name}-install.log 2>&1
533 echo "Database %{dbname} already exists. Will not proceed with database setup." >>/var/log/%{name}-install.log 2>&1
534 echo "Please see %{GFORGE_DIR}/fusionforge-install-3-db.php and run it manually" >>/var/log/%{name}-install.log 2>&1
535 echo "if deemed necessary." >>/var/log/%{name}-install.log 2>&1
538 /usr/bin/php %{GFORGE_DIR}/db/upgrade-db.php >>/var/log/%{name}-install.log 2>&1
539 /usr/bin/php %{GFORGE_DIR}/fusionforge-install-4-config.php >>/var/log/%{name}-install.log 2>&1
541 HOSTNAME=`hostname -f`
542 %{__sed} -i -e "s!gforge.company.com!$HOSTNAME!g" %{GFORGE_CONF_DIR}/local.inc
543 %{__sed} -i -e "s!gforge.company.com!$HOSTNAME!g" /etc/httpd/conf.d/gforge.conf
545 /etc/init.d/httpd restart >/dev/null 2>&1
547 # generate random hash for session_key
548 HASH=$(/bin/dd if=/dev/urandom bs=32 count=1 2>/dev/null | /usr/bin/sha1sum | cut -c1-40)
549 %{__sed} -i -e "s/sys_session_key = 'foobar'/sys_session_key = '$HASH'/g" %{GFORGE_CONF_DIR}/local.inc
551 # add noreply mail alias
552 echo "noreply: /dev/null" >> /etc/aliases
553 /usr/bin/newaliases >/dev/null 2>&1
555 # display message about default admin account
557 echo "You can now connect to your FusionForge installation using:"
559 echo " http://$HOSTNAME/"
561 echo "The default fusionforge administrator account and password is:"
563 echo "Account Name = %{fforge_admin}"
564 echo "Password = %{fforge_passwd}"
565 #echo "Please change it to something appropriate upon initial login."
566 # give user a few seconds to read the message
569 /usr/bin/php %{GFORGE_DIR}/db/upgrade-db.php >>/var/log/%{name}-upgrade.log 2>&1
575 if [ "$1" -eq "0" ]; then
577 if [ `/usr/bin/getent passwd | /bin/cut -d: -f1 | /bin/grep -c %{gfuser}` -ne 0 ] ; then
578 echo "Removing fusionforge user..."
579 /usr/sbin/userdel %{gfuser}
582 if [ `/usr/bin/getent group | /bin/cut -d: -f1 | /bin/grep -c %{gfuser}` -ne 0 ] ; then
583 echo "Removing fusionforge group..."
584 /usr/sbin/groupdel %{gfgroup}
589 /usr/bin/psql -U %{dbuser} %{dbname} -f %{GFORGE_DIR}/plugins/aselectextauth/db/install_aselectextauth.psql
591 %preun aselectextauth
592 /usr/bin/psql -U %{dbuser} %{dbname} -f %{GFORGE_DIR}/plugins/aselectextauth/db/uninstall_aselectextauth.psql
595 [ "$RPM_BUILD_ROOT" != "/" ] && %{__rm} -rf $RPM_BUILD_ROOT
598 %defattr(-, root, root)
599 %doc AUTHORS* CHANGES COPYING INSTALL* NEWS README*
601 %attr(0660, %{httpduser}, gforge) %config(noreplace) %{GFORGE_CONF_DIR}/local.inc
602 %attr(0640, %{httpduser}, %{httpdgroup}) %config(noreplace) %{_sysconfdir}/httpd/conf.d/gforge.conf
603 %attr(0644, root, root) %{_sysconfdir}/cron.d/%{name}
604 %attr(0775, %{httpduser}, %{httpdgroup}) %dir %{GFORGE_VAR_LIB}/upload
605 %attr(755, root, %{httpdgroup}) %dir %{GFORGE_DIR}
606 # Files under %{GFORGE_DIR}
607 %{GFORGE_DIR}/AUTHORS*
608 %{GFORGE_DIR}/CHANGES
609 %{GFORGE_DIR}/COPYING
610 %{GFORGE_DIR}/INSTALL*
612 %{GFORGE_DIR}/README*
613 %{GFORGE_DIR}/fusionforge.spec
614 %{GFORGE_DIR}/fusionforge-install*
615 %{GFORGE_DIR}/gforge-restricted.sh
616 %{GFORGE_DIR}/install.sh
617 %{GFORGE_DIR}/install-common.inc
618 %{GFORGE_DIR}/jpgraph
619 # Directories under %{GFORGE_DIR}
620 %{GFORGE_DIR}/backend
622 %{GFORGE_DIR}/contrib
623 %{GFORGE_DIR}/cronjobs
627 %{GFORGE_DIR}/image-sources
629 %{GFORGE_DIR}/locales
630 %{GFORGE_DIR}/monitor
631 %{GFORGE_DIR}/translations
634 %dir %{GFORGE_DIR}/www
635 # files under %{GFORGE_DIR}/www
636 %{GFORGE_DIR}/www/*.php
637 %{GFORGE_DIR}/www/users
638 %{GFORGE_DIR}/www/favicon.ico
639 %{GFORGE_DIR}/www/projects
640 # directories under %{GFORGE_DIR}/www
641 %{GFORGE_DIR}/www/account
642 %{GFORGE_DIR}/www/activity
643 %{GFORGE_DIR}/www/admin
644 %{GFORGE_DIR}/www/developer
645 %{GFORGE_DIR}/www/docman
646 %{GFORGE_DIR}/www/export
647 %{GFORGE_DIR}/www/forum
648 %{GFORGE_DIR}/www/frs
649 %{GFORGE_DIR}/www/help
650 %{GFORGE_DIR}/www/images
651 %{GFORGE_DIR}/www/include
652 %{GFORGE_DIR}/www/jscook
654 %{GFORGE_DIR}/www/mail
656 %{GFORGE_DIR}/www/new
657 %{GFORGE_DIR}/www/news
658 %{GFORGE_DIR}/www/people
660 %{GFORGE_DIR}/www/project
661 %{GFORGE_DIR}/www/register
662 %{GFORGE_DIR}/www/reporting
663 %{GFORGE_DIR}/www/scm
664 %{GFORGE_DIR}/www/scripts
665 %{GFORGE_DIR}/www/search
666 %{GFORGE_DIR}/www/snippet
667 %{GFORGE_DIR}/www/soap
668 %{GFORGE_DIR}/www/softwaremap
669 %{GFORGE_DIR}/www/squal
670 %{GFORGE_DIR}/www/stats
671 %{GFORGE_DIR}/www/survey
672 %{GFORGE_DIR}/www/tabber
673 %{GFORGE_DIR}/www/themes
674 %{GFORGE_DIR}/www/top
675 %{GFORGE_DIR}/www/tracker
676 %{GFORGE_DIR}/www/trove
677 %{GFORGE_DIR}/www/widgets
678 #%{GFORGE_DIR}/www/plugins/online_help
679 #%{GFORGE_DIR}/www/plugins/projects_hierarchy
680 #%{GFORGE_DIR}/www/plugins/quota_management
681 %dir %{GFORGE_DIR}/plugins
682 %{GFORGE_DIR}/plugins/env.inc.php
683 #%{GFORGE_DIR}/plugins/online_help
684 #%{GFORGE_DIR}/plugins/projects_hierarchy
685 #%{GFORGE_DIR}/plugins/quota_management
687 %dir %{GFORGE_CONF_DIR}
688 %config(noreplace) %{GFORGE_CONF_DIR}/httpd.secrets
689 %dir %{GFORGE_CONF_DIR}/httpd.d
690 %dir %attr(0775,root,%{httpdgroup}) %{GFORGE_CONF_DIR}/plugins
691 %dir %{GFORGE_VAR_LIB}/scmtarballs
692 %dir %{GFORGE_VAR_LIB}/scmsnapshots
693 %dir %{GFORGE_VAR_LIB}/dumps
694 %{GFORGE_VAR_LIB}/homedirs
698 %files aselectextauth
699 %{GFORGE_DIR}/plugins/aselectextauth
702 %{GFORGE_DIR}/plugins/cvssyncmail
705 %config(noreplace) %{GFORGE_DIR}/plugins/cvstracker/etc/plugins/cvstracker/config.php
706 %{GFORGE_DIR}/plugins/cvstracker
707 %{GFORGE_DIR}/www/plugins/cvstracker
708 %attr(-,%{httpduser},%{httpdgroup}) %{GFORGE_CONF_DIR}/plugins/cvstracker
710 %files externalsearch
711 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/externalsearch.ini
712 %{GFORGE_DIR}/plugins/externalsearch
715 %{GFORGE_DIR}/plugins/fckeditor
716 %{GFORGE_DIR}/www/plugins/fckeditor
719 #%{GFORGE_CONF_DIR}/plugins/ldapextauth
720 %config(noreplace) %{GFORGE_DIR}/plugins/ldapextauth/etc/plugins/ldapextauth/config.php
721 %config(noreplace) %{GFORGE_DIR}/plugins/ldapextauth/etc/plugins/ldapextauth/mapping.php
722 %{GFORGE_DIR}/plugins/ldapextauth
725 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/mantis.ini
726 %{GFORGE_DIR}/plugins/mantis
727 %{GFORGE_DIR}/www/plugins/mantis
730 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/mediawiki.ini
731 %{GFORGE_CONF_DIR}/httpd.d/03mediawiki.conf
732 %{GFORGE_DIR}/plugins/mediawiki/README
733 %{GFORGE_DIR}/plugins/mediawiki/README.jlbond
734 %{GFORGE_DIR}/plugins/mediawiki/bin
735 %{GFORGE_DIR}/plugins/mediawiki/common
736 %{GFORGE_DIR}/plugins/mediawiki/cronjobs
737 %{GFORGE_DIR}/plugins/mediawiki/etc
738 #%{GFORGE_DIR}/plugins/mediawiki/mediawiki-skin
739 %{GFORGE_DIR}/plugins/mediawiki/www
740 /usr/share/mediawiki/skins/gforge
741 /usr/share/mediawiki/skins/GForge.deps.php
742 /usr/share/mediawiki/skins/GForge.php
743 %{GFORGE_DIR}/www/plugins/mediawiki
746 %{GFORGE_DIR}/plugins/online_help
747 %{GFORGE_DIR}/www/plugins/online_help
749 %files projects_hierarchy
750 %{GFORGE_DIR}/plugins/projects_hierarchy
751 %{GFORGE_DIR}/www/plugins/projects_hierarchy
753 %files quota_management
754 %{GFORGE_DIR}/plugins/quota_management
755 %{GFORGE_DIR}/www/plugins/quota_management
758 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/scmarch.ini
759 %{GFORGE_DIR}/plugins/scmarch
762 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/scmbzr.ini
763 %{GFORGE_DIR}/plugins/scmbzr
766 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/scmdarcs.ini
767 %{GFORGE_DIR}/plugins/scmdarcs
770 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/scmgit.ini
771 %{GFORGE_DIR}/plugins/scmgit
772 %{GFORGE_DIR}/www/plugins/scmgit
775 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/scmhg.ini
776 %{GFORGE_DIR}/plugins/scmhg
779 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/scmccase.ini
780 %{GFORGE_DIR}/plugins/scmccase
783 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/scmcvs.ini
784 %{_sysconfdir}/cron.d/%{name}-plugin-scmcvs
785 %{GFORGE_DIR}/plugins/scmcvs
786 %{GFORGE_DIR}/www/plugins/scmcvs
787 %{GFORGE_VAR_LIB}/chroot/scmrepos/cvs
790 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/scmsvn.ini
791 %{GFORGE_DIR}/plugins/scmsvn
792 %{GFORGE_DIR}/www/plugins/scmsvn
793 %{GFORGE_VAR_LIB}/chroot/scmrepos/svn
795 %files svncommitemail
796 %{GFORGE_DIR}/plugins/svncommitemail
799 %{_sysconfdir}/cron.d/gforge-plugin-svntracker
800 %config(noreplace) %{GFORGE_DIR}/plugins/svntracker/etc/plugins/svntracker/config.php
801 %{GFORGE_DIR}/plugins/svntracker
802 %{GFORGE_DIR}/www/plugins/svntracker
805 %{GFORGE_DIR}/plugins/webcalendar
806 %{GFORGE_DIR}/www/plugins/webcalendar
809 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/blocks.ini
810 %{GFORGE_DIR}/plugins/blocks
811 %{GFORGE_DIR}/www/plugins/blocks
814 %{GFORGE_DIR}/plugins/extratabs
815 %{GFORGE_DIR}/www/plugins/extratabs
818 %{_sysconfdir}/cron.d/cron.wiki
819 %{GFORGE_DIR}/plugins/wiki
820 %{GFORGE_DIR}/www/wiki
823 %{GFORGE_DIR}/plugins/projectlabels
824 %{GFORGE_DIR}/www/plugins/projectlabels
826 %files contribtracker
827 %{GFORGE_DIR}/plugins/contribtracker
828 %{GFORGE_DIR}/www/plugins/contribtracker
831 %{GFORGE_DIR}/plugins/globalsearch
832 %{GFORGE_DIR}/www/plugins/globalsearch
835 %{GFORGE_DIR}/plugins/mantisbt
836 %{GFORGE_DIR}/www/plugins/mantisbt
839 * Fri May 28 2010 - Alain Peyrat <aljeux@free.fr> - 5.0.50-1
840 - Ported to 5.1 tree.
841 - Reworked logic with rights on configuration files.
842 - Adapted to changes like scm refactoring.
843 - Adapted to changes to .ini configuration file.
844 - Lots of new plugins added.
846 * Tue May 13 2010 - Bond Masuda <bond.masuda@JLBond.com> - 4.8.3-2
847 - fixed plugin symlinks and plugin directory permissions
848 - patched mediawiki, webcalendar plugins
849 - patch to fix various references to global variables
850 - add symlinks to use mediawiki Monobook skin as GForge
851 - patch to replace ereg_replace() with preg_replace()
852 - added jpgraph symlink
853 - setup httpd.secrets
854 - delete obsolete mediawiki plugin code
856 * Fri Apr 16 2010 - Bond Masuda <bond.masuda@JLBond.com> - 4.8.3-1
857 - My first packaging of fusionforge 4.8.3-1 and plugins