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() /sbin/service httpd reload >/dev/null 2>&1
27 %define reloadhttpd() /etc/init.d/httpd httpd reload >/dev/null 2>&1
30 Summary: FusionForge Collaborative Development Environment
36 Group: Development/Tools
37 Source0: %{name}-%{version}.tar.bz2
38 Source1: README.mediawiki.jlbond
39 Source2: LocalSettings.php
40 Patch0: fusionforge-4.8.3-ereg_preg.patch
41 Patch1: fusionforge-4.8.3-webcalendar.patch
42 Patch2: fusionforge-4.8.3-mediawiki.patch
43 Patch3: fusionforge-4.8.3-register_globals.patch
44 URL: http://www.fusionforge.org/
45 BuildRoot: %{_tmppath}/%{name}-%{version}-root
46 Packager: Alain Peyrat <aljeux@free.fr>
48 # requirements as derived from fusionforge-install-1-deps.php script
49 Requires: httpd, mod_dav_svn, mod_ssl, php, php-pgsql, php-gd, php-mbstring, mailman
50 Requires: postgresql, postgresql-libs, postgresql-server, postgresql-contrib
51 Requires: postfix, openssh, inetd, which, liberation-fonts
53 Requires: /bin/sh, /bin/bash
54 Requires: perl, perl-DBI, perl-HTML-Parser, perl-Text-Autoformat, perl-Mail-Sendmail, perl-Sort-Versions
56 Requires: php-jpgraph php-gd
57 #update sys_path_to_jpgraph in gforge.conf if you remove this line
58 #Requires: /var/www/jpgraph/jpgraph.php
59 #Requires: libnss-pgsql >= 1.4
62 Requires: htmlpurifier >= 4.0.0
65 Requires: /usr/bin/newaliases
67 # BuildRequires: sed, perl
69 Provides: gforge = %{version}
72 FusionForge provides many tools to aid collaboration in a
73 development project, such as bug-tracking, task management,
74 mailing-lists, SCM repository, forums, support request helper,
75 web/FTP hosting, release management, etc. All these services are
76 integrated into one web site and managed through a web interface.
78 %package aselectextauth
79 Summary: A-select external authentication for FusionForge
80 Group: Development/Tools
81 Requires: %{name} >= %{version}, php, postgresql
82 %description aselectextauth
83 A system for authenticating users in fusionforge. A-Select is a framework
84 where users can be authenticated by several means with Authentication
88 Summary: Provides email notifications of changes to CVS repositories
89 Group: Development/Tools
90 Requires: %{name} >= %{version}, %{name}-scmcvs, python, php
91 %description cvssyncmail
92 This plugin adds the capability to notify users of changes to CVS repositories
96 Summary: Links CVS log messages to trackers and tasks.
97 Group: Development/Tools
98 Requires: %{name} >= %[version}, %{name}-scmcvs, php, postgresql
99 %description cvstracker
100 This is a fusionforge plugin that allows linking CVS log messages to
101 trackers and tasks. It will review all commits in a project and search for
102 specific string to know which task or tracker is related.
104 %package externalsearch
105 Summary: external search plugin for FusionForge
106 Group: Development/Tools
107 Requires: %{name} >= %{version}, php
108 %description externalsearch
109 This plugin adds a new search engine to your FusionForge site. It allows
110 your users to search your FusionForge site through external search engines
111 which have indexed it. You can define search engines you want to use in
112 the configuration file.
115 Summary: FCKEditor plugin for FusionForge
116 Group: Development/Tools
117 Requires: %{name} >= %{version}, php
118 %description fckeditor
119 FCKEditor is a WYSIWYG text editor that displays within a web browser.
122 Summary: external LDAP authentication for FusionForge plugin
123 Group: Development/Tools
124 Requires: %{name} >= %{version}, php
125 %description ldapextauth
126 This plugin provides LDAP authentication capability for FusionForge.
129 Summary: MantisBT plugin for FusionForge
130 Group: Development/Tools
131 Requires: %{name} >= %{version}, php
133 A plugin to use the MantisBT web-based bug tracking system with FusionForge.
136 Summary: Mediawiki plugin for FusionForge
137 Group: Development/Tools
138 Requires: %{name} >= %{version}, php, mediawiki
139 %description mediawiki
140 This is a plugin to integrate MediaWiki within FusionForge.
143 Summary: online_help plugin for FusionForge
144 Group: Development/Tools
145 Requires: %{name} >= %{version}, php
146 %description online_help
147 This is a online_help plugin within FusionForge.
149 %package projects_hierarchy
150 Summary: projects_hierarchy plugin for FusionForge
151 Group: Development/Tools
152 Requires: %{name} >= %{version}, php
153 %description projects_hierarchy
154 This is a projects_hierarchy plugin within FusionForge.
156 %package quota_management
157 Summary: quota_management plugin for FusionForge
158 Group: Development/Tools
159 Requires: %{name} >= %{version}, php
160 %description quota_management
161 This is a quota_management plugin within FusionForge.
164 Summary: Arch version control plugin for FusionForge
165 Group: Development/Tools
166 Requires: %{name} >= %{version}, php, arch
168 This is a plugin to integrate Arch version control system with FusionForge
171 Summary: Bazaar version control plugin for FusionForge
172 Group: Development/Tools
173 Requires: %{name} >= %{version}, php, bazaar
175 This is a plugin to integrate Bazaar version control system with FusionForge
178 Summary: DARCS version control plugin for FusionForge
179 Group: Development/Tools
180 Requires: %{name} >= %{version}, php, darcs
181 %description scmdarcs
182 This is a plugin to integrate DARCS version control system with FusionForge
185 Summary: Bazaar version control plugin for FusionForge
186 Group: Development/Tools
187 Requires: %{name} >= %{version}, php, git
189 This is a plugin to integrate Bazaar version control system with FusionForge
192 Summary: Mercurial (hg) version control plugin for FusionForge
193 Group: Development/Tools
194 Requires: %{name} >= %{version}, php, hg
196 This is a plugin to integrate Mercurial (hg) version control system with FusionForge
199 Summary: Clear Case plugin for FusionForge
200 Group: Development/Tools
201 Requires: %{name} >= %{version}, php
202 %description scmccase
203 This is the Clear Case plugin for FusionForge. It creats Clear Case repositories
204 for projects within FusionForge.
207 Summary: CVS plugin for FusionForge
208 Group: Development/Tools
209 Requires: %{name} >= %{version}, php, cvs
211 FusionForge is a web-based Collaborative Development Environment offering
212 easy access to CVS, mailing lists, bug tracking, message
213 boards/forums, task management, permanent file archival, and total
214 web-based administration.
216 This RPM installs SCM CVS plugin for FusionForge and provides CVS support
219 It also provides a specific version of CVSWeb wrapped in FusionForge.
222 Summary: Subversion plugin for FusionForge
223 Group: Development/Tools
224 Requires: %{name} >= %{version}, php, subversion
226 This RPM installs SCM SVN plugin for FusionForge and provides svn support
229 %package svncommitemail
230 Summary: subversion commit email plugin for FusionForge
231 Group: Development/Tools
232 Requires: %{name} >= %{version}, php, subversion, perl
233 %description svncommitemail
234 This RPM installs subversion commit email notification plugin for FusionForge.
237 Summary: SVNTracker plugin for FusionForge
238 Group: Development/Tools
239 Requires: %{name} >= %{version}, php, subversion, perl, postgresql
240 %description svntracker
241 SVNTracker plugin allows linking SVN log messages to Trackers and tasks.
242 It will review all commits in a project and search for a specific string
243 to know which task or tracker is related.
246 Summary: webcalendar plugin for FusionForge
247 Group: Development/Tools
248 Requires: %{name} >= %{version}, php, postgresql
249 %description webcalendar
250 WebCalendar plugin for FusionForge.
253 Summary: Blocks plugin for FusionForge
254 Group: Development/Tools
255 Requires: %{name} >= %{version}
257 HTML blocks plugin for FusionForge.
260 Summary: extratabs plugin for FusionForge
261 Group: Development/Tools
262 Requires: %{name} >= %{version}
263 %description extratabs
264 HTML extratabs plugin for FusionForge.
267 Summary: Wiki plugin for FusionForge
268 Group: Development/Tools
269 Requires: %{name} >= %{version}, php, postgresql
271 Wiki plugin for FusionForge. Allows for one wiki per project, integrated search,
272 page edits displayed on activity tab, and multi-project wiki preferences.
274 %package projectlabels
275 Summary: Labels plugin for FusionForge
276 Group: Development/Tools
277 Requires: %{name} >= %{version}, php, postgresql
278 %description projectlabels
279 Project Labels plugin for FusionForge.
281 %package contribtracker
282 Summary: contribtracker plugin for FusionForge
283 Group: Development/Tools
284 Requires: %{name} >= %{version}, php, postgresql
285 %description contribtracker
286 contribtracker plugin for FusionForge.
288 %package globalsearch
289 Summary: globalsearch plugin for FusionForge
290 Group: Development/Tools
291 Requires: %{name} >= %{version}, php, postgresql
292 %description globalsearch
293 globalsearch plugin for FusionForge.
296 Summary: mantisbt plugin for FusionForge
297 Group: Development/Tools
298 Requires: %{name} >= %{version}, php, postgresql
299 %description mantisbt
300 mantisbt plugin for FusionForge.
310 # empty build section
313 %{__rm} -rf $RPM_BUILD_ROOT
315 # creating required directories
316 %{__install} -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d
317 %{__install} -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/cron.d
318 %{__install} -m 755 -d $RPM_BUILD_ROOT/bin
319 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_DIR}
320 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_DIR}/lib
321 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}
322 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/{httpd.d,config.ini.d,plugins}
323 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_LANG_DIR}
324 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_VAR_LIB}
325 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_VAR_LIB}/{upload,scmtarballs,scmsnapshots}
326 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_VAR_LIB}/{homedirs,dumps}
327 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_VAR_LIB}/chroot/scmrepos/{svn,cvs}
328 %{__install} -m 755 -d $RPM_BUILD_ROOT/home/groups
329 # mock mediawiki directory because we symlink GForge skin to Monobook
330 %{__install} -m 755 -d $RPM_BUILD_ROOT/usr/share/mediawiki/skins
332 # we define a search and replace function, we'll be using this a lot
333 # to fix several parts of the installation
336 for i in `/usr/bin/find . -type f`
338 if $(grep -q ${1} $i) ; then
339 %{__sed} -i -e "s+${1}+${2}+g" $i
344 # we need to fix up the fusionforge-install-3-db.php script to ref %{GFORGE_DIR}
345 search_and_replace "/opt/gforge" "%{GFORGE_DIR}"
348 %{__cp} -a * $RPM_BUILD_ROOT/%{GFORGE_DIR}/
350 # create project vhost space symlink
351 %{__ln_s} /home/groups $RPM_BUILD_ROOT/%{GFORGE_VAR_LIB}/homedirs/groups
352 # install restricted shell for cvs accounts
353 %{__cp} -a plugins/scmcvs/bin/cvssh.pl $RPM_BUILD_ROOT/bin/
355 # Fix configuration files entries (various sys_* variables)
356 %{__cp} -a etc/local.inc.example $RPM_BUILD_ROOT/%{GFORGE_CONF_DIR}/local.inc
357 %{__sed} -i -e "s!/path/to/gforge!%{GFORGE_DIR}!g" $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/local.inc
358 %{__sed} -i -e "s/\$sys_dbname=.*/\$sys_dbname='%{dbname}';/g" $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/local.inc
359 %{__sed} -i -e "s/\$sys_dbuser=.*/\$sys_dbuser='%{dbuser}';/g" $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/local.inc
360 %{__sed} -i -e "s/\$sys_apache_user=.*/\$sys_apache_user='%{httpduser}';/g" $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/local.inc
361 %{__sed} -i -e "s/\$sys_apache_group=.*/\$sys_apache_group='%{httpdgroup}';/g" $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/local.inc
362 %{__sed} -i -e "s|\$sys_plugins_path=.*|\$sys_plugins_path=\"%{GFORGE_DIR}/plugins\";|g" $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/local.inc
363 %{__sed} -i -e "s|\$sys_upload_dir=.*|\$sys_upload_dir=\"\$sys_var_path/upload\";|g" $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/local.inc
364 %{__sed} -i -e "s|\$sys_urlroot=.*|\$sys_urlroot=\"%{GFORGE_DIR}/www\";|g" $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/local.inc
366 # Replace sys_localinc, sys_gfdbname, sys_gfdbuser
367 %{__cp} -a etc/httpd.secrets.example $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/httpd.secrets
368 %{__sed} -i -e "s|sys_localinc.*$|sys_localinc %{GFORGE_CONF_DIR}/local.inc|g" $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/httpd.secrets
369 %{__sed} -i -e "s|sys_gfdbname.*$|sys_gfdbname %{dbname}|g" $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/httpd.secrets
370 %{__sed} -i -e "s|sys_gfdbuser.*$|sys_gfdbname %{dbuser}|g" $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/httpd.secrets
372 # Apache configuration file
373 %{__cp} -a etc/gforge-httpd.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/gforge.conf
374 %{__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
375 # install fusionforge crontab
376 %{__install} -m 644 packaging/cron.d/cron.fusionforge $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/%{name}
378 %{__install} -m 644 deb-specific/sqlhelper.pm $RPM_BUILD_ROOT%{GFORGE_DIR}/lib/sqlhelper.pm
380 # Install locale files in Redhat standard location
381 %{__cp} -a locales/* $RPM_BUILD_ROOT/%{GFORGE_LANG_DIR}/
383 # create symlink for jpgraph
384 %{__ln_s} /usr/share/jpgraph $RPM_BUILD_ROOT%{GFORGE_DIR}/jpgraph
386 %{__rm} -f $RPM_BUILD_ROOT%{GFORGE_DIR}/utils/fusionforge-shell-postgresql.spec
387 %{__rm} -f $RPM_BUILD_ROOT/%{GFORGE_DIR}/www/plugins/helloworld
388 %{__rm} -f $RPM_BUILD_ROOT/%{GFORGE_DIR}/www/plugins/mailman
390 %{__rm} -fr $RPM_BUILD_ROOT/%{GFORGE_DIR}/packaging
391 %{__rm} -fr $RPM_BUILD_ROOT/%{GFORGE_DIR}/deb-specific
392 %{__rm} -fr $RPM_BUILD_ROOT/%{GFORGE_DIR}/rpm-specific
393 %{__rm} -fr $RPM_BUILD_ROOT/%{GFORGE_DIR}/plugins/*/packaging
394 %{__rm} -fr $RPM_BUILD_ROOT/%{GFORGE_DIR}/plugins/*/*.spec
395 %{__rm} -fr $RPM_BUILD_ROOT/%{GFORGE_DIR}/plugins/tinderbox
396 %{__rm} -fr $RPM_BUILD_ROOT/%{GFORGE_DIR}/plugins/viewcvs
399 %{__cp} $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/*/etc/*.ini $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/config.ini.d/
400 %{__cp} $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/*/etc/cron.d/* $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/
402 # plugin: aselectextauth
404 # plugin: cvssyncmail
407 # delete stuff that is clearly outdated/obsolete so we don't package this and confuse others
408 %{__rm} -f $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/cvstracker/httpd.conf
409 %{__rm} -f $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/cvstracker/Makefile
410 %{__rm} -rf $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/cvstracker/rpm-specific
411 # this is pre-activated, so create the config symlink
412 %{__ln_s} %{GFORGE_DIR}/plugins/cvstracker/etc/plugins/cvstracker $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/plugins/cvstracker
415 # obsolete, deleting completely
416 %{__rm} -rf $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/eirc
417 %{__rm} -f $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/eirc
419 # plugin: externalsearch
423 # plugin: ldapextauth
424 %{__rm} -rf $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/ldapextauth/rpm-specific
429 # create symlink for apache configuration for mediawiki plugin
430 ## first, delete the php_admin_value include_path
431 %{__sed} -i -e "/^.*php_admin_value[[:space:]]*include_path.*/d" $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/mediawiki/etc/httpd.d/61plugin-mediawiki
432 %{__ln_s} %{GFORGE_DIR}/plugins/mediawiki/etc/httpd.d/61plugin-mediawiki $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/httpd.d/03mediawiki.conf
433 # this is pre-activated, so create the config symlink
434 #%{__ln_s} %{GFORGE_DIR}/plugins/mediawiki/etc/plugins/mediawiki $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/plugins/mediawiki
435 # create symlinks to use MonoBook as the GForge skin
436 %{__ln_s} monobook $RPM_BUILD_ROOT/usr/share/mediawiki/skins/gforge
437 %{__ln_s} MonoBook.deps.php $RPM_BUILD_ROOT/usr/share/mediawiki/skins/GForge.deps.php
438 %{__ln_s} MonoBook.php $RPM_BUILD_ROOT/usr/share/mediawiki/skins/GForge.php
439 # sort out the GForge skin files and remove obsolete code
440 %{__rm} -rf $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/mediawiki/mediawiki-skin
441 %{__rm} -rf $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/mediawiki/usr/share/gforge
442 %{__rm} -rf $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/mediawiki/usr/share/mediawiki/skins
443 # insert our own LocalSettings.php
444 #%{__cp} -f %{SOURCE2} $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/mediawiki/usr/share/mediawiki/LocalSettings.php
445 # insert our own README file
446 %{__cp} -f %{SOURCE1} $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/mediawiki/README.jlbond
448 # plugin: online_help
450 # plugin: projects_hierarchy
452 # plugin: quota_management
461 %{__ln_s} ../../plugins/scmcvs $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/scmcvs
462 %{__install} -m 644 plugins/scmcvs/cron.d/%{name}-plugin-scmcvs $RPM_BUILD_ROOT%{_sysconfdir}/cron.d
467 # this is pre-activated, so create the config symlink
468 %{__ln_s} ../../plugins/scmsvn $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/scmsvn
471 %{__ln_s} ../../plugins/scmgit $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/scmgit
475 # plugin: svncommitemail
479 %{__install} -m 644 plugins/svntracker/rpm-specific/cron.d/gforge-plugin-svntracker $RPM_BUILD_ROOT%{_sysconfdir}/cron.d
481 # plugin: webcalendar
484 %{__ln_s} ../../plugins/blocks/www/ $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/blocks
487 %{__ln_s} ../../plugins/extratabs/www/ $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/extratabs
490 %{__ln_s} ../../plugins/wiki/www/ $RPM_BUILD_ROOT%{GFORGE_DIR}/www/wiki
492 # plugin: projectlabels
493 %{__ln_s} ../../plugins/projectlabels/www/ $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/projectlabels
495 # plugin: contribtracker
496 %{__ln_s} ../../plugins/contribtracker/www/ $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/contribtracker
498 # plugin: globalsearch
499 %{__ln_s} ../../plugins/globalsearch/www/ $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/globalsearch
502 %{__ln_s} ../../plugins/mantisbt/www/ $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/mantisbt
504 ### END OF PLUGIN SETUP ###
507 # we will need postgresql to be running. we start it, even if it already is running
508 # this won't hurt anything, just ensure we have a running database
509 /sbin/service postgresql start >>/var/log/%{name}-install.log 2>&1
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}
519 if [ "$1" -eq "1" ]; then
520 # check to see if the database already exists. if not, we proceed to create it.
521 # if so, we print a warning message.
522 echo "\q" | su - postgres -c "/usr/bin/psql %{dbname}" 1>/dev/null 2>&1
524 if [ $ret -ne 0 ] ; then
526 FFORGE_USER=%{dbuser}
527 FFORGE_ADMIN_USER=%{fforge_admin}
528 FFORGE_ADMIN_PASSWORD=%{fforge_passwd}
529 export FFORGE_DB FFORGE_USER FFORGE_ADMIN_USER FFORGE_ADMIN_PASSWORD
530 /usr/bin/php %{GFORGE_DIR}/fusionforge-install-3-db.php >>/var/log/%{name}-install.log 2>&1
532 echo "Database %{dbname} already exists. Will not proceed with database setup." >>/var/log/%{name}-install.log 2>&1
533 echo "Please see %{GFORGE_DIR}/fusionforge-install-3-db.php and run it manually" >>/var/log/%{name}-install.log 2>&1
534 echo "if deemed necessary." >>/var/log/%{name}-install.log 2>&1
537 /usr/bin/php %{GFORGE_DIR}/db/upgrade-db.php >>/var/log/%{name}-install.log 2>&1
539 HOSTNAME=`hostname -f`
540 %{__sed} -i -e "s!gforge.company.com!$HOSTNAME!g" %{GFORGE_CONF_DIR}/local.inc
541 %{__sed} -i -e "s!gforge.company.com!$HOSTNAME!g" /etc/httpd/conf.d/gforge.conf
543 /etc/init.d/httpd restart >/dev/null 2>&1
545 # generate random hash for session_key
546 HASH=$(/bin/dd if=/dev/urandom bs=1024 count=100 2>/dev/null | /usr/bin/sha1sum | cut -c1-40)
547 %{__sed} -i -e "s/sys_session_key = 'foobar'/sys_session_key = '$HASH'/g" %{GFORGE_CONF_DIR}/local.inc
549 # add noreply mail alias
550 echo "noreply: /dev/null" >> /etc/aliases
551 /usr/bin/newaliases >/dev/null 2>&1
553 # display message about default admin account
555 echo "You can now connect to your FusionForge installation using:"
557 echo " http://$HOSTNAME/"
559 echo "The default fusionforge administrator account and password is:"
561 echo "Account Name = %{fforge_admin}"
562 echo "Password = %{fforge_passwd}"
563 #echo "Please change it to something appropriate upon initial login."
564 # give user a few seconds to read the message
567 /usr/bin/php %{GFORGE_DIR}/db/upgrade-db.php >>/var/log/%{name}-upgrade.log 2>&1
573 if [ "$1" -eq "0" ]; then
575 if [ `/usr/bin/getent passwd | /bin/cut -d: -f1 | /bin/grep -c %{gfuser}` -ne 0 ] ; then
576 echo "Removing fusionforge user..."
577 /usr/sbin/userdel %{gfuser}
580 if [ `/usr/bin/getent group | /bin/cut -d: -f1 | /bin/grep -c %{gfuser}` -ne 0 ] ; then
581 echo "Removing fusionforge group..."
582 /usr/sbin/groupdel %{gfgroup}
587 /usr/bin/psql -U %{dbuser} %{dbname} -f %{GFORGE_DIR}/plugins/aselectextauth/db/install_aselectextauth.psql
589 %preun aselectextauth
590 /usr/bin/psql -U %{dbuser} %{dbname} -f %{GFORGE_DIR}/plugins/aselectextauth/db/uninstall_aselectextauth.psql
593 [ "$RPM_BUILD_ROOT" != "/" ] && %{__rm} -rf $RPM_BUILD_ROOT
596 %defattr(-, root, root)
597 %doc AUTHORS AUTHORS.gforge AUTHORS.sourceforge COPYING ChangeLog INSTALL* README* CHANGES NEWS
599 %attr(0660, %{httpduser}, gforge) %config(noreplace) %{GFORGE_CONF_DIR}/local.inc
600 %attr(0640, %{httpduser}, %{httpdgroup}) %config(noreplace) %{_sysconfdir}/httpd/conf.d/gforge.conf
601 %attr(0644, root, root) %{_sysconfdir}/cron.d/%{name}
602 %attr(0775, %{httpduser}, %{httpdgroup}) %dir %{GFORGE_VAR_LIB}/upload
603 %attr(755, root, %{httpdgroup}) %dir %{GFORGE_DIR}
604 # Files under %{GFORGE_DIR}
605 %{GFORGE_DIR}/AUTHORS*
606 %{GFORGE_DIR}/CHANGES
607 %{GFORGE_DIR}/COPYING
608 %{GFORGE_DIR}/ChangeLog
609 %{GFORGE_DIR}/INSTALL*
611 %{GFORGE_DIR}/README*
612 %{GFORGE_DIR}/fusionforge.spec
613 %{GFORGE_DIR}/fusionforge-install*
614 %{GFORGE_DIR}/gforge-restricted.sh
615 %{GFORGE_DIR}/install.sh
616 %{GFORGE_DIR}/jpgraph
617 # Directories under %{GFORGE_DIR}
618 %{GFORGE_DIR}/backend
620 %{GFORGE_DIR}/contrib
621 %{GFORGE_DIR}/cronjobs
625 %{GFORGE_DIR}/image-sources
627 %{GFORGE_DIR}/locales
628 %{GFORGE_DIR}/monitor
629 %{GFORGE_DIR}/translations
632 %dir %{GFORGE_DIR}/www
633 # files under %{GFORGE_DIR}/www
634 %{GFORGE_DIR}/www/*.php
635 %{GFORGE_DIR}/www/users
636 %{GFORGE_DIR}/www/favicon.ico
637 %{GFORGE_DIR}/www/projects
638 # directories under %{GFORGE_DIR}/www
639 %{GFORGE_DIR}/www/account
640 %{GFORGE_DIR}/www/activity
641 %{GFORGE_DIR}/www/admin
642 %{GFORGE_DIR}/www/developer
643 %{GFORGE_DIR}/www/docman
644 %{GFORGE_DIR}/www/export
645 %{GFORGE_DIR}/www/forum
646 %{GFORGE_DIR}/www/frs
647 %{GFORGE_DIR}/www/help
648 %{GFORGE_DIR}/www/images
649 %{GFORGE_DIR}/www/include
650 %{GFORGE_DIR}/www/jscook
652 %{GFORGE_DIR}/www/mail
654 %{GFORGE_DIR}/www/new
655 %{GFORGE_DIR}/www/news
656 %{GFORGE_DIR}/www/people
658 %{GFORGE_DIR}/www/project
659 %{GFORGE_DIR}/www/register
660 %{GFORGE_DIR}/www/reporting
661 %{GFORGE_DIR}/www/scm
662 %{GFORGE_DIR}/www/scripts
663 %{GFORGE_DIR}/www/search
664 %{GFORGE_DIR}/www/snippet
665 %{GFORGE_DIR}/www/soap
666 %{GFORGE_DIR}/www/softwaremap
667 %{GFORGE_DIR}/www/squal
668 %{GFORGE_DIR}/www/stats
669 %{GFORGE_DIR}/www/survey
670 %{GFORGE_DIR}/www/tabber
671 %{GFORGE_DIR}/www/themes
672 %{GFORGE_DIR}/www/top
673 %{GFORGE_DIR}/www/tracker
674 %{GFORGE_DIR}/www/trove
675 %{GFORGE_DIR}/www/widgets
676 #%{GFORGE_DIR}/www/plugins/online_help
677 #%{GFORGE_DIR}/www/plugins/projects_hierarchy
678 #%{GFORGE_DIR}/www/plugins/quota_management
679 %dir %{GFORGE_DIR}/plugins
680 %{GFORGE_DIR}/plugins/env.inc.php
681 #%{GFORGE_DIR}/plugins/online_help
682 #%{GFORGE_DIR}/plugins/projects_hierarchy
683 #%{GFORGE_DIR}/plugins/quota_management
685 %dir %{GFORGE_CONF_DIR}
686 %config(noreplace) %{GFORGE_CONF_DIR}/httpd.secrets
687 %dir %{GFORGE_CONF_DIR}/httpd.d
688 %dir %attr(0775,root,%{httpdgroup}) %{GFORGE_CONF_DIR}/plugins
689 %dir %{GFORGE_VAR_LIB}/scmtarballs
690 %dir %{GFORGE_VAR_LIB}/scmsnapshots
691 %dir %{GFORGE_VAR_LIB}/dumps
692 %{GFORGE_VAR_LIB}/homedirs
696 %files aselectextauth
697 %{GFORGE_DIR}/plugins/aselectextauth
700 %{GFORGE_DIR}/plugins/cvssyncmail
703 %config(noreplace) %{GFORGE_DIR}/plugins/cvstracker/etc/plugins/cvstracker/config.php
704 %{GFORGE_DIR}/plugins/cvstracker
705 %{GFORGE_DIR}/www/plugins/cvstracker
706 %attr(-,%{httpduser},%{httpdgroup}) %{GFORGE_CONF_DIR}/plugins/cvstracker
708 %files externalsearch
709 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/externalsearch.ini
710 %{GFORGE_DIR}/plugins/externalsearch
713 %{GFORGE_DIR}/plugins/fckeditor
714 %{GFORGE_DIR}/www/plugins/fckeditor
717 #%{GFORGE_CONF_DIR}/plugins/ldapextauth
718 %config(noreplace) %{GFORGE_DIR}/plugins/ldapextauth/etc/plugins/ldapextauth/config.php
719 %config(noreplace) %{GFORGE_DIR}/plugins/ldapextauth/etc/plugins/ldapextauth/mapping.php
720 %{GFORGE_DIR}/plugins/ldapextauth/README
721 %{GFORGE_DIR}/plugins/ldapextauth/db
722 %{GFORGE_DIR}/plugins/ldapextauth/bin
723 %{GFORGE_DIR}/plugins/ldapextauth/include
726 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/mantis.ini
727 %{GFORGE_DIR}/plugins/mantis
728 %{GFORGE_DIR}/www/plugins/mantis
731 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/mediawiki.ini
732 %{GFORGE_CONF_DIR}/httpd.d/03mediawiki.conf
733 %{GFORGE_DIR}/plugins/mediawiki/README
734 %{GFORGE_DIR}/plugins/mediawiki/README.jlbond
735 %{GFORGE_DIR}/plugins/mediawiki/bin
736 %{GFORGE_DIR}/plugins/mediawiki/common
737 %{GFORGE_DIR}/plugins/mediawiki/cronjobs
738 %{GFORGE_DIR}/plugins/mediawiki/etc
739 #%{GFORGE_DIR}/plugins/mediawiki/mediawiki-skin
740 %{GFORGE_DIR}/plugins/mediawiki/www
741 /usr/share/mediawiki/skins/gforge
742 /usr/share/mediawiki/skins/GForge.deps.php
743 /usr/share/mediawiki/skins/GForge.php
744 %{GFORGE_DIR}/www/plugins/mediawiki
747 %{GFORGE_DIR}/plugins/online_help
748 %{GFORGE_DIR}/www/plugins/online_help
750 %files projects_hierarchy
751 %{GFORGE_DIR}/plugins/projects_hierarchy
752 %{GFORGE_DIR}/www/plugins/projects_hierarchy
754 %files quota_management
755 %{GFORGE_DIR}/plugins/quota_management
756 %{GFORGE_DIR}/www/plugins/quota_management
759 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/scmarch.ini
760 %{GFORGE_DIR}/plugins/scmarch
763 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/scmbzr.ini
764 %{GFORGE_DIR}/plugins/scmbzr
767 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/scmdarcs.ini
768 %{GFORGE_DIR}/plugins/scmdarcs
771 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/scmgit.ini
772 %{GFORGE_DIR}/plugins/scmgit
773 %{GFORGE_DIR}/www/plugins/scmgit
776 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/scmhg.ini
777 %{GFORGE_DIR}/plugins/scmhg
780 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/scmccase.ini
781 %{GFORGE_DIR}/plugins/scmccase
784 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/scmcvs.ini
785 %{_sysconfdir}/cron.d/%{name}-plugin-scmcvs
786 %{GFORGE_DIR}/plugins/scmcvs
787 %{GFORGE_DIR}/www/plugins/scmcvs
788 %{GFORGE_VAR_LIB}/chroot/scmrepos/cvs
791 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/scmsvn.ini
792 %{GFORGE_DIR}/plugins/scmsvn
793 %{GFORGE_DIR}/www/plugins/scmsvn
794 %{GFORGE_VAR_LIB}/chroot/scmrepos/svn
796 %files svncommitemail
797 %{GFORGE_DIR}/plugins/svncommitemail
800 %{_sysconfdir}/cron.d/gforge-plugin-svntracker
801 %config(noreplace) %{GFORGE_DIR}/plugins/svntracker/etc/plugins/svntracker/config.php
802 %{GFORGE_DIR}/plugins/svntracker
803 %{GFORGE_DIR}/www/plugins/svntracker
806 %{GFORGE_DIR}/plugins/webcalendar
807 %{GFORGE_DIR}/www/plugins/webcalendar
810 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/blocks.ini
811 %{GFORGE_DIR}/plugins/blocks
812 %{GFORGE_DIR}/www/plugins/blocks
815 %{GFORGE_DIR}/plugins/extratabs
816 %{GFORGE_DIR}/www/plugins/extratabs
819 %{_sysconfdir}/cron.d/cron.wiki
820 %{GFORGE_DIR}/plugins/wiki
821 %{GFORGE_DIR}/www/wiki
824 %{GFORGE_DIR}/plugins/projectlabels
825 %{GFORGE_DIR}/www/plugins/projectlabels
827 %files contribtracker
828 %{GFORGE_DIR}/plugins/contribtracker
829 %{GFORGE_DIR}/www/plugins/contribtracker
832 %{GFORGE_DIR}/plugins/globalsearch
833 %{GFORGE_DIR}/www/plugins/globalsearch
836 %{GFORGE_DIR}/plugins/mantisbt
837 %{GFORGE_DIR}/www/plugins/mantisbt
840 * Fri May 28 2010 - Alain Peyrat <aljeux@free.fr> - 5.0.50-1
841 - ported to 5.1 tree.
842 - reworked logic with rights on configuration files.
843 - adapted to changes like scm refactoring.
844 - adapted to changes to .ini configuration file.
845 - lots of new plugins added.
847 * Tue May 13 2010 - Bond Masuda <bond.masuda@JLBond.com> - 4.8.3-2
848 - fixed plugin symlinks and plugin directory permissions
849 - patched mediawiki, webcalendar plugins
850 - patch to fix various references to global variables
851 - add symlinks to use mediawiki Monobook skin as GForge
852 - patch to replace ereg_replace() with preg_replace()
853 - added jpgraph symlink
854 - setup httpd.secrets
855 - delete obsolete mediawiki plugin code
857 * Fri Apr 16 2010 - Bond Masuda <bond.masuda@JLBond.com> - 4.8.3-1
858 - My first packaging of fusionforge 4.8.3-1 and plugins