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,httpd.conf.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
538 /usr/bin/php %{GFORGE_DIR}/fusionforge-install-4-config.php >>/var/log/%{name}-install.log 2>&1
540 HOSTNAME=`hostname -f`
541 %{__sed} -i -e "s!gforge.company.com!$HOSTNAME!g" %{GFORGE_CONF_DIR}/local.inc
542 %{__sed} -i -e "s!gforge.company.com!$HOSTNAME!g" /etc/httpd/conf.d/gforge.conf
544 /etc/init.d/httpd restart >/dev/null 2>&1
546 # generate random hash for session_key
547 HASH=$(/bin/dd if=/dev/urandom bs=1024 count=100 2>/dev/null | /usr/bin/sha1sum | cut -c1-40)
548 %{__sed} -i -e "s/sys_session_key = 'foobar'/sys_session_key = '$HASH'/g" %{GFORGE_CONF_DIR}/local.inc
550 # add noreply mail alias
551 echo "noreply: /dev/null" >> /etc/aliases
552 /usr/bin/newaliases >/dev/null 2>&1
554 # display message about default admin account
556 echo "You can now connect to your FusionForge installation using:"
558 echo " http://$HOSTNAME/"
560 echo "The default fusionforge administrator account and password is:"
562 echo "Account Name = %{fforge_admin}"
563 echo "Password = %{fforge_passwd}"
564 #echo "Please change it to something appropriate upon initial login."
565 # give user a few seconds to read the message
568 /usr/bin/php %{GFORGE_DIR}/db/upgrade-db.php >>/var/log/%{name}-upgrade.log 2>&1
574 if [ "$1" -eq "0" ]; then
576 if [ `/usr/bin/getent passwd | /bin/cut -d: -f1 | /bin/grep -c %{gfuser}` -ne 0 ] ; then
577 echo "Removing fusionforge user..."
578 /usr/sbin/userdel %{gfuser}
581 if [ `/usr/bin/getent group | /bin/cut -d: -f1 | /bin/grep -c %{gfuser}` -ne 0 ] ; then
582 echo "Removing fusionforge group..."
583 /usr/sbin/groupdel %{gfgroup}
588 /usr/bin/psql -U %{dbuser} %{dbname} -f %{GFORGE_DIR}/plugins/aselectextauth/db/install_aselectextauth.psql
590 %preun aselectextauth
591 /usr/bin/psql -U %{dbuser} %{dbname} -f %{GFORGE_DIR}/plugins/aselectextauth/db/uninstall_aselectextauth.psql
594 [ "$RPM_BUILD_ROOT" != "/" ] && %{__rm} -rf $RPM_BUILD_ROOT
597 %defattr(-, root, root)
598 %doc AUTHORS AUTHORS.gforge AUTHORS.sourceforge COPYING ChangeLog INSTALL* README* CHANGES NEWS
600 %attr(0660, %{httpduser}, gforge) %config(noreplace) %{GFORGE_CONF_DIR}/local.inc
601 %attr(0640, %{httpduser}, %{httpdgroup}) %config(noreplace) %{_sysconfdir}/httpd/conf.d/gforge.conf
602 %attr(0644, root, root) %{_sysconfdir}/cron.d/%{name}
603 %attr(0775, %{httpduser}, %{httpdgroup}) %dir %{GFORGE_VAR_LIB}/upload
604 %attr(755, root, %{httpdgroup}) %dir %{GFORGE_DIR}
605 # Files under %{GFORGE_DIR}
606 %{GFORGE_DIR}/AUTHORS*
607 %{GFORGE_DIR}/CHANGES
608 %{GFORGE_DIR}/COPYING
609 %{GFORGE_DIR}/ChangeLog
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}/jpgraph
618 # Directories under %{GFORGE_DIR}
619 %{GFORGE_DIR}/backend
621 %{GFORGE_DIR}/contrib
622 %{GFORGE_DIR}/cronjobs
626 %{GFORGE_DIR}/image-sources
628 %{GFORGE_DIR}/locales
629 %{GFORGE_DIR}/monitor
630 %{GFORGE_DIR}/translations
633 %dir %{GFORGE_DIR}/www
634 # files under %{GFORGE_DIR}/www
635 %{GFORGE_DIR}/www/*.php
636 %{GFORGE_DIR}/www/users
637 %{GFORGE_DIR}/www/favicon.ico
638 %{GFORGE_DIR}/www/projects
639 # directories under %{GFORGE_DIR}/www
640 %{GFORGE_DIR}/www/account
641 %{GFORGE_DIR}/www/activity
642 %{GFORGE_DIR}/www/admin
643 %{GFORGE_DIR}/www/developer
644 %{GFORGE_DIR}/www/docman
645 %{GFORGE_DIR}/www/export
646 %{GFORGE_DIR}/www/forum
647 %{GFORGE_DIR}/www/frs
648 %{GFORGE_DIR}/www/help
649 %{GFORGE_DIR}/www/images
650 %{GFORGE_DIR}/www/include
651 %{GFORGE_DIR}/www/jscook
653 %{GFORGE_DIR}/www/mail
655 %{GFORGE_DIR}/www/new
656 %{GFORGE_DIR}/www/news
657 %{GFORGE_DIR}/www/people
659 %{GFORGE_DIR}/www/project
660 %{GFORGE_DIR}/www/register
661 %{GFORGE_DIR}/www/reporting
662 %{GFORGE_DIR}/www/scm
663 %{GFORGE_DIR}/www/scripts
664 %{GFORGE_DIR}/www/search
665 %{GFORGE_DIR}/www/snippet
666 %{GFORGE_DIR}/www/soap
667 %{GFORGE_DIR}/www/softwaremap
668 %{GFORGE_DIR}/www/squal
669 %{GFORGE_DIR}/www/stats
670 %{GFORGE_DIR}/www/survey
671 %{GFORGE_DIR}/www/tabber
672 %{GFORGE_DIR}/www/themes
673 %{GFORGE_DIR}/www/top
674 %{GFORGE_DIR}/www/tracker
675 %{GFORGE_DIR}/www/trove
676 %{GFORGE_DIR}/www/widgets
677 #%{GFORGE_DIR}/www/plugins/online_help
678 #%{GFORGE_DIR}/www/plugins/projects_hierarchy
679 #%{GFORGE_DIR}/www/plugins/quota_management
680 %dir %{GFORGE_DIR}/plugins
681 %{GFORGE_DIR}/plugins/env.inc.php
682 #%{GFORGE_DIR}/plugins/online_help
683 #%{GFORGE_DIR}/plugins/projects_hierarchy
684 #%{GFORGE_DIR}/plugins/quota_management
686 %dir %{GFORGE_CONF_DIR}
687 %config(noreplace) %{GFORGE_CONF_DIR}/httpd.secrets
688 %dir %{GFORGE_CONF_DIR}/httpd.d
689 %dir %attr(0775,root,%{httpdgroup}) %{GFORGE_CONF_DIR}/plugins
690 %dir %{GFORGE_VAR_LIB}/scmtarballs
691 %dir %{GFORGE_VAR_LIB}/scmsnapshots
692 %dir %{GFORGE_VAR_LIB}/dumps
693 %{GFORGE_VAR_LIB}/homedirs
697 %files aselectextauth
698 %{GFORGE_DIR}/plugins/aselectextauth
701 %{GFORGE_DIR}/plugins/cvssyncmail
704 %config(noreplace) %{GFORGE_DIR}/plugins/cvstracker/etc/plugins/cvstracker/config.php
705 %{GFORGE_DIR}/plugins/cvstracker
706 %{GFORGE_DIR}/www/plugins/cvstracker
707 %attr(-,%{httpduser},%{httpdgroup}) %{GFORGE_CONF_DIR}/plugins/cvstracker
709 %files externalsearch
710 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/externalsearch.ini
711 %{GFORGE_DIR}/plugins/externalsearch
714 %{GFORGE_DIR}/plugins/fckeditor
715 %{GFORGE_DIR}/www/plugins/fckeditor
718 #%{GFORGE_CONF_DIR}/plugins/ldapextauth
719 %config(noreplace) %{GFORGE_DIR}/plugins/ldapextauth/etc/plugins/ldapextauth/config.php
720 %config(noreplace) %{GFORGE_DIR}/plugins/ldapextauth/etc/plugins/ldapextauth/mapping.php
721 %{GFORGE_DIR}/plugins/ldapextauth/README
722 %{GFORGE_DIR}/plugins/ldapextauth/db
723 %{GFORGE_DIR}/plugins/ldapextauth/bin
724 %{GFORGE_DIR}/plugins/ldapextauth/include
727 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/mantis.ini
728 %{GFORGE_DIR}/plugins/mantis
729 %{GFORGE_DIR}/www/plugins/mantis
732 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/mediawiki.ini
733 %{GFORGE_CONF_DIR}/httpd.d/03mediawiki.conf
734 %{GFORGE_DIR}/plugins/mediawiki/README
735 %{GFORGE_DIR}/plugins/mediawiki/README.jlbond
736 %{GFORGE_DIR}/plugins/mediawiki/bin
737 %{GFORGE_DIR}/plugins/mediawiki/common
738 %{GFORGE_DIR}/plugins/mediawiki/cronjobs
739 %{GFORGE_DIR}/plugins/mediawiki/etc
740 #%{GFORGE_DIR}/plugins/mediawiki/mediawiki-skin
741 %{GFORGE_DIR}/plugins/mediawiki/www
742 /usr/share/mediawiki/skins/gforge
743 /usr/share/mediawiki/skins/GForge.deps.php
744 /usr/share/mediawiki/skins/GForge.php
745 %{GFORGE_DIR}/www/plugins/mediawiki
748 %{GFORGE_DIR}/plugins/online_help
749 %{GFORGE_DIR}/www/plugins/online_help
751 %files projects_hierarchy
752 %{GFORGE_DIR}/plugins/projects_hierarchy
753 %{GFORGE_DIR}/www/plugins/projects_hierarchy
755 %files quota_management
756 %{GFORGE_DIR}/plugins/quota_management
757 %{GFORGE_DIR}/www/plugins/quota_management
760 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/scmarch.ini
761 %{GFORGE_DIR}/plugins/scmarch
764 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/scmbzr.ini
765 %{GFORGE_DIR}/plugins/scmbzr
768 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/scmdarcs.ini
769 %{GFORGE_DIR}/plugins/scmdarcs
772 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/scmgit.ini
773 %{GFORGE_DIR}/plugins/scmgit
774 %{GFORGE_DIR}/www/plugins/scmgit
777 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/scmhg.ini
778 %{GFORGE_DIR}/plugins/scmhg
781 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/scmccase.ini
782 %{GFORGE_DIR}/plugins/scmccase
785 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/scmcvs.ini
786 %{_sysconfdir}/cron.d/%{name}-plugin-scmcvs
787 %{GFORGE_DIR}/plugins/scmcvs
788 %{GFORGE_DIR}/www/plugins/scmcvs
789 %{GFORGE_VAR_LIB}/chroot/scmrepos/cvs
792 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/scmsvn.ini
793 %{GFORGE_DIR}/plugins/scmsvn
794 %{GFORGE_DIR}/www/plugins/scmsvn
795 %{GFORGE_VAR_LIB}/chroot/scmrepos/svn
797 %files svncommitemail
798 %{GFORGE_DIR}/plugins/svncommitemail
801 %{_sysconfdir}/cron.d/gforge-plugin-svntracker
802 %config(noreplace) %{GFORGE_DIR}/plugins/svntracker/etc/plugins/svntracker/config.php
803 %{GFORGE_DIR}/plugins/svntracker
804 %{GFORGE_DIR}/www/plugins/svntracker
807 %{GFORGE_DIR}/plugins/webcalendar
808 %{GFORGE_DIR}/www/plugins/webcalendar
811 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/blocks.ini
812 %{GFORGE_DIR}/plugins/blocks
813 %{GFORGE_DIR}/www/plugins/blocks
816 %{GFORGE_DIR}/plugins/extratabs
817 %{GFORGE_DIR}/www/plugins/extratabs
820 %{_sysconfdir}/cron.d/cron.wiki
821 %{GFORGE_DIR}/plugins/wiki
822 %{GFORGE_DIR}/www/wiki
825 %{GFORGE_DIR}/plugins/projectlabels
826 %{GFORGE_DIR}/www/plugins/projectlabels
828 %files contribtracker
829 %{GFORGE_DIR}/plugins/contribtracker
830 %{GFORGE_DIR}/www/plugins/contribtracker
833 %{GFORGE_DIR}/plugins/globalsearch
834 %{GFORGE_DIR}/www/plugins/globalsearch
837 %{GFORGE_DIR}/plugins/mantisbt
838 %{GFORGE_DIR}/www/plugins/mantisbt
841 * Fri May 28 2010 - Alain Peyrat <aljeux@free.fr> - 5.0.50-1
842 - ported to 5.1 tree.
843 - reworked logic with rights on configuration files.
844 - adapted to changes like scm refactoring.
845 - adapted to changes to .ini configuration file.
846 - lots of new plugins added.
848 * Tue May 13 2010 - Bond Masuda <bond.masuda@JLBond.com> - 4.8.3-2
849 - fixed plugin symlinks and plugin directory permissions
850 - patched mediawiki, webcalendar plugins
851 - patch to fix various references to global variables
852 - add symlinks to use mediawiki Monobook skin as GForge
853 - patch to replace ereg_replace() with preg_replace()
854 - added jpgraph symlink
855 - setup httpd.secrets
856 - delete obsolete mediawiki plugin code
858 * Fri Apr 16 2010 - Bond Masuda <bond.masuda@JLBond.com> - 4.8.3-1
859 - My first packaging of fusionforge 4.8.3-1 and plugins