2 # RPM spec file for FusionForge
4 # Initial work for 4.8 by JL Bond Consulting
5 # Reworked for 5.1 by Alain Peyrat <aljeux@free.fr>
7 # TODO: Generate a random password to avoid sites with default pass.
15 %define gfgroup gforge
17 %define httpduser apache
18 %define httpdgroup apache
20 %define fforge_admin fforgeadmin
21 %define fforge_passwd fforgeadmin
23 %define GFORGE_DIR %{_datadir}/gforge
24 %define GFORGE_CONF_DIR %{_sysconfdir}/gforge
25 %define GFORGE_LANG_DIR %{_datadir}/locale
26 %define GFORGE_VAR_LIB %{_var}/lib/gforge
28 %define reloadhttpd() /etc/init.d/httpd httpd reload >/dev/null 2>&1
31 Summary: FusionForge Collaborative Development Environment
37 Group: Development/Tools
38 Source0: %{name}-%{version}.tar.bz2
39 Source1: README.mediawiki.jlbond
40 Source2: LocalSettings.php
41 Patch1: fusionforge-4.8.3-mediawiki.patch
42 Patch2: 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
86 %package plugin-cvssyncmail
87 Summary: Provides email notifications of changes to CVS repositories
88 Group: Development/Tools
89 Requires: %{name} >= %{version}, %{name}-scmcvs, python, php
90 %description plugin-cvssyncmail
91 This plugin adds the capability to notify users of changes to CVS repositories
94 %package plugin-cvstracker
95 Summary: Links CVS log messages to trackers and tasks.
96 Group: Development/Tools
97 Requires: %{name} >= %{version}, %{name}-scmcvs, php, postgresql
98 %description plugin-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 plugin-externalsearch
104 Summary: external search plugin for FusionForge
105 Group: Development/Tools
106 Requires: %{name} >= %{version}, php
107 %description plugin-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.
113 %package plugin-fckeditor
114 Summary: FCKEditor plugin for FusionForge
115 Group: Development/Tools
116 Requires: %{name} >= %{version}, php
117 %description plugin-fckeditor
118 FCKEditor is a WYSIWYG text editor that displays within a web browser.
120 %package plugin-gravatar
121 Summary: Gravatar plugin for FusionForge
122 Group: Development/Tools
123 Requires: %{name} >= %{version}, php
124 %description plugin-gravatar
125 This plugin adds faces images to FusionForge users using the gravatar service.
127 %package plugin-ldapextauth
128 Summary: external LDAP authentication for FusionForge plugin
129 Group: Development/Tools
130 Requires: %{name} >= %{version}, php
131 %description plugin-ldapextauth
132 This plugin provides LDAP authentication capability for FusionForge.
134 %package plugin-mantis
135 Summary: MantisBT plugin for FusionForge
136 Group: Development/Tools
137 Requires: %{name} >= %{version}, php
138 %description plugin-mantis
139 A plugin to use the MantisBT web-based bug tracking system with FusionForge.
141 %package plugin-mediawiki
142 Summary: Mediawiki plugin for FusionForge
143 Group: Development/Tools
144 Requires: %{name} >= %{version}, php, mediawiki
145 %description plugin-mediawiki
146 This is a plugin to integrate MediaWiki within FusionForge.
148 %package plugin-online_help
149 Summary: online_help plugin for FusionForge
150 Group: Development/Tools
151 Requires: %{name} >= %{version}, php
152 %description plugin-online_help
153 This is a online_help plugin within FusionForge.
155 %package plugin-projects_hierarchy
156 Summary: projects_hierarchy plugin for FusionForge
157 Group: Development/Tools
158 Requires: %{name} >= %{version}, php
159 %description plugin-projects_hierarchy
160 This is a projects_hierarchy plugin within FusionForge.
162 %package plugin-quota_management
163 Summary: quota_management plugin for FusionForge
164 Group: Development/Tools
165 Requires: %{name} >= %{version}, php
166 %description plugin-quota_management
167 This is a quota_management plugin within FusionForge.
169 %package plugin-scmarch
170 Summary: Arch version control plugin for FusionForge
171 Group: Development/Tools
172 Requires: %{name} >= %{version}, php, arch
173 %description plugin-scmarch
174 This is a plugin to integrate Arch version control system with FusionForge
176 %package plugin-scmbzr
177 Summary: Bazaar version control plugin for FusionForge
178 Group: Development/Tools
179 Requires: %{name} >= %{version}, php, bazaar
180 %description plugin-scmbzr
181 This is a plugin to integrate Bazaar version control system with FusionForge
183 %package plugin-scmdarcs
184 Summary: DARCS version control plugin for FusionForge
185 Group: Development/Tools
186 Requires: %{name} >= %{version}, php, darcs
187 %description plugin-scmdarcs
188 This is a plugin to integrate DARCS version control system with FusionForge
190 %package plugin-scmgit
191 Summary: Bazaar version control plugin for FusionForge
192 Group: Development/Tools
193 Requires: %{name} >= %{version}, php, git
194 %description plugin-scmgit
195 This is a plugin to integrate Bazaar version control system with FusionForge
197 %package plugin-scmhg
198 Summary: Mercurial (hg) version control plugin for FusionForge
199 Group: Development/Tools
200 Requires: %{name} >= %{version}, php, hg
201 %description plugin-scmhg
202 This is a plugin to integrate Mercurial (hg) version control system with FusionForge
204 %package plugin-scmccase
205 Summary: Clear Case plugin for FusionForge
206 Group: Development/Tools
207 Requires: %{name} >= %{version}, php
208 %description plugin-scmccase
209 This is the Clear Case plugin for FusionForge. It creats Clear Case repositories
210 for projects within FusionForge.
212 %package plugin-scmcvs
213 Summary: CVS plugin for FusionForge
214 Group: Development/Tools
215 Requires: %{name} >= %{version}, php, cvs
216 %description plugin-scmcvs
217 FusionForge is a web-based Collaborative Development Environment offering
218 easy access to CVS, mailing lists, bug tracking, message
219 boards/forums, task management, permanent file archival, and total
220 web-based administration.
222 This RPM installs SCM CVS plugin for FusionForge and provides CVS support
225 It also provides a specific version of CVSWeb wrapped in FusionForge.
227 %package plugin-scmsvn
228 Summary: Subversion plugin for FusionForge
229 Group: Development/Tools
230 Requires: %{name} >= %{version}, php, subversion
231 %description plugin-scmsvn
232 This RPM installs SCM SVN plugin for FusionForge and provides svn support
235 %package plugin-svncommitemail
236 Summary: subversion commit email plugin for FusionForge
237 Group: Development/Tools
238 Requires: %{name} >= %{version}, php, subversion, perl, %{name}-scmsvn >= %{version}
239 %description plugin-svncommitemail
240 This RPM installs subversion commit email notification plugin for FusionForge.
242 %package plugin-svntracker
243 Summary: SVNTracker plugin for FusionForge
244 Group: Development/Tools
245 Requires: %{name} >= %{version}, php, subversion, perl, postgresql, %{name}-scmsvn >= %{version}
246 %description plugin-svntracker
247 SVNTracker plugin allows linking SVN log messages to Trackers and tasks.
248 It will review all commits in a project and search for a specific string
249 to know which task or tracker is related.
251 %package plugin-blocks
252 Summary: Blocks plugin for FusionForge
253 Group: Development/Tools
254 Requires: %{name} >= %{version}
255 %description plugin-blocks
256 HTML blocks plugin for FusionForge.
258 %package plugin-extratabs
259 Summary: extratabs plugin for FusionForge
260 Group: Development/Tools
261 Requires: %{name} >= %{version}
262 %description plugin-extratabs
263 HTML extratabs plugin for FusionForge.
266 Summary: Wiki plugin for FusionForge
267 Group: Development/Tools
268 Requires: %{name} >= %{version}, php, postgresql
269 %description plugin-wiki
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 plugin-projectlabels
274 Summary: Labels plugin for FusionForge
275 Group: Development/Tools
276 Requires: %{name} >= %{version}, php, postgresql
277 %description plugin-projectlabels
278 Project Labels plugin for FusionForge.
280 %package plugin-contribtracker
281 Summary: contribtracker plugin for FusionForge
282 Group: Development/Tools
283 Requires: %{name} >= %{version}, php, postgresql
284 %description plugin-contribtracker
285 contribtracker plugin for FusionForge.
287 %package plugin-globalsearch
288 Summary: globalsearch plugin for FusionForge
289 Group: Development/Tools
290 Requires: %{name} >= %{version}, php, postgresql
291 %description plugin-globalsearch
292 globalsearch plugin for FusionForge.
294 %package plugin-mantisbt
295 Summary: mantisbt plugin for FusionForge
296 Group: Development/Tools
297 Requires: %{name} >= %{version}, php, postgresql
298 %description plugin-mantisbt
299 mantisbt plugin for FusionForge.
308 # empty build section
311 %{__rm} -rf $RPM_BUILD_ROOT
313 # creating required directories
314 %{__install} -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d
315 %{__install} -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/cron.d
316 %{__install} -m 755 -d $RPM_BUILD_ROOT/bin
317 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_DIR}
318 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_DIR}/lib
319 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}
320 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/httpd.d
321 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/httpd.conf.d
322 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/config.ini.d
323 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/plugins
324 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_LANG_DIR}
325 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_VAR_LIB}
326 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_VAR_LIB}/upload
327 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_VAR_LIB}/scmtarballs
328 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_VAR_LIB}/scmsnapshots
329 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_VAR_LIB}/homedirs
330 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_VAR_LIB}/dumps
331 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_VAR_LIB}/chroot/scmrepos/svn
332 %{__install} -m 755 -d $RPM_BUILD_ROOT%{GFORGE_VAR_LIB}/chroot/scmrepos/cvs
333 %{__install} -m 755 -d $RPM_BUILD_ROOT/home/groups
334 # mock mediawiki directory because we symlink GForge skin to Monobook
335 %{__install} -m 755 -d $RPM_BUILD_ROOT/usr/share/mediawiki/skins
337 # we define a search and replace function, we'll be using this a lot
338 # to fix several parts of the installation
341 /usr/bin/find . -type f | xargs grep -l ${1} | xargs %{__sed} -i -e "s+${1}+${2}+g"
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
388 %{__rm} -f $RPM_BUILD_ROOT%{GFORGE_DIR}/COPYING.php
389 %{__rm} -fr $RPM_BUILD_ROOT/%{GFORGE_DIR}/packaging
390 %{__rm} -fr $RPM_BUILD_ROOT/%{GFORGE_DIR}/deb-specific
391 %{__rm} -fr $RPM_BUILD_ROOT/%{GFORGE_DIR}/rpm-specific
392 %{__rm} -fr $RPM_BUILD_ROOT/%{GFORGE_DIR}/plugins/*/packaging
393 %{__rm} -fr $RPM_BUILD_ROOT/%{GFORGE_DIR}/plugins/*/*.spec
396 %{__cp} $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/*/etc/*.ini $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/config.ini.d/
397 %{__cp} $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/*/etc/cron.d/* $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/
398 %{__cp} -rp $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/*/etc/plugins/* $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/plugins/
399 %{__rm} -f $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/README
401 # plugin: aselectextauth
403 # plugin: cvssyncmail
406 # delete stuff that is clearly outdated/obsolete so we don't package this and confuse others
407 %{__rm} -f $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/cvstracker/httpd.conf
408 %{__rm} -f $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/cvstracker/Makefile
409 %{__rm} -rf $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/cvstracker/rpm-specific
411 # plugin: externalsearch
415 # plugin: ldapextauth
416 %{__rm} -rf $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/ldapextauth/rpm-specific
421 # create symlink for apache configuration for mediawiki plugin
422 ## first, delete the php_admin_value include_path
423 %{__sed} -i -e "/^.*php_admin_value[[:space:]]*include_path.*/d" $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/mediawiki/etc/httpd.d/61plugin-mediawiki
424 %{__ln_s} %{GFORGE_DIR}/plugins/mediawiki/etc/httpd.d/61plugin-mediawiki $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/httpd.d/03mediawiki.conf
425 # this is pre-activated, so create the config symlink
426 #%{__ln_s} %{GFORGE_DIR}/plugins/mediawiki/etc/plugins/mediawiki $RPM_BUILD_ROOT%{GFORGE_CONF_DIR}/plugins/mediawiki
427 # create symlinks to use MonoBook as the GForge skin
428 %{__ln_s} monobook $RPM_BUILD_ROOT/usr/share/mediawiki/skins/gforge
429 %{__ln_s} MonoBook.deps.php $RPM_BUILD_ROOT/usr/share/mediawiki/skins/GForge.deps.php
430 %{__ln_s} MonoBook.php $RPM_BUILD_ROOT/usr/share/mediawiki/skins/GForge.php
431 # sort out the GForge skin files and remove obsolete code
432 %{__rm} -rf $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/mediawiki/mediawiki-skin
433 %{__rm} -rf $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/mediawiki/usr/share/gforge
434 %{__rm} -rf $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/mediawiki/usr/share/mediawiki/skins
435 # insert our own LocalSettings.php
436 #%{__cp} -f %{SOURCE2} $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/mediawiki/usr/share/mediawiki/LocalSettings.php
437 # insert our own README file
438 %{__cp} -f %{SOURCE1} $RPM_BUILD_ROOT%{GFORGE_DIR}/plugins/mediawiki/README.jlbond
440 # plugin: online_help
442 # plugin: projects_hierarchy
444 # plugin: quota_management
453 %{__ln_s} ../../plugins/scmcvs $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/scmcvs
454 %{__install} -m 644 plugins/scmcvs/cron.d/%{name}-plugin-scmcvs $RPM_BUILD_ROOT%{_sysconfdir}/cron.d
459 # this is pre-activated, so create the config symlink
460 %{__ln_s} ../../plugins/scmsvn $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/scmsvn
463 %{__ln_s} ../../plugins/scmgit $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/scmgit
467 # plugin: svncommitemail
471 %{__install} -m 644 plugins/svntracker/rpm-specific/cron.d/gforge-plugin-svntracker $RPM_BUILD_ROOT%{_sysconfdir}/cron.d
474 %{__ln_s} ../../plugins/blocks/www/ $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/blocks
477 %{__ln_s} ../../plugins/extratabs/www/ $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/extratabs
480 %{__ln_s} ../plugins/wiki/www/ $RPM_BUILD_ROOT%{GFORGE_DIR}/www/wiki
482 # plugin: projectlabels
483 %{__ln_s} ../../plugins/projectlabels/www/ $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/projectlabels
485 # plugin: contribtracker
486 %{__ln_s} ../../plugins/contribtracker/www/ $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/contribtracker
488 # plugin: globalsearch
489 %{__ln_s} ../../plugins/globalsearch/www/ $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/globalsearch
492 %{__ln_s} ../../plugins/mantisbt/www/ $RPM_BUILD_ROOT%{GFORGE_DIR}/www/plugins/mantisbt
494 ### END OF PLUGIN SETUP ###
497 # we will need postgresql to be running. we start it, even if it already is running
498 # this won't hurt anything, just ensure we have a running database
499 /sbin/service postgresql start >>/var/log/%{name}-install.log 2>&1
501 if [ "$1" -eq "1" ]; then
502 # setup user/group for gforge
503 if [ `/usr/bin/getent passwd | /bin/cut -d: -f1 | /bin/grep -c %{gfuser}` -eq 0 ] ; then
504 echo "Did not find existing fusionforge user. Adding fusionforge group and user..." >>/var/log/%{name}-install.log 2>&1
505 /usr/sbin/groupadd -r %{gfgroup}
506 /usr/sbin/useradd -r -g %{gfgroup} -d %{GFORGE_DIR} -s /bin/bash -c "FusionForge User" %{gfuser}
511 if [ "$1" -eq "1" ]; then
512 # check to see if the database already exists. if not, we proceed to create it.
513 # if so, we print a warning message.
514 echo "\q" | su - postgres -c "/usr/bin/psql %{dbname}" 1>/dev/null 2>&1
516 if [ $ret -ne 0 ] ; then
518 FFORGE_USER=%{dbuser}
519 FFORGE_ADMIN_USER=%{fforge_admin}
520 FFORGE_ADMIN_PASSWORD=%{fforge_passwd}
521 export FFORGE_DB FFORGE_USER FFORGE_ADMIN_USER FFORGE_ADMIN_PASSWORD
522 /usr/bin/php %{GFORGE_DIR}/fusionforge-install-3-db.php >>/var/log/%{name}-install.log 2>&1
524 echo "Database %{dbname} already exists. Will not proceed with database setup." >>/var/log/%{name}-install.log 2>&1
525 echo "Please see %{GFORGE_DIR}/fusionforge-install-3-db.php and run it manually" >>/var/log/%{name}-install.log 2>&1
526 echo "if deemed necessary." >>/var/log/%{name}-install.log 2>&1
529 /usr/bin/php %{GFORGE_DIR}/db/upgrade-db.php >>/var/log/%{name}-install.log 2>&1
530 /usr/bin/php %{GFORGE_DIR}/fusionforge-install-4-config.php >>/var/log/%{name}-install.log 2>&1
532 HOSTNAME=`hostname -f`
533 %{__sed} -i -e "s!gforge.company.com!$HOSTNAME!g" %{GFORGE_CONF_DIR}/local.inc
534 %{__sed} -i -e "s!gforge.company.com!$HOSTNAME!g" /etc/httpd/conf.d/gforge.conf
536 /etc/init.d/httpd restart >/dev/null 2>&1
538 chkconfig postgresql on >/dev/null 2>&1
540 # generate random hash for session_key
541 HASH=$(/bin/dd if=/dev/urandom bs=32 count=1 2>/dev/null | /usr/bin/sha1sum | cut -c1-40)
542 %{__sed} -i -e "s/sys_session_key = 'foobar'/sys_session_key = '$HASH'/g" %{GFORGE_CONF_DIR}/local.inc
544 # add noreply mail alias
545 echo "noreply: /dev/null" >> /etc/aliases
546 /usr/bin/newaliases >/dev/null 2>&1
548 # display message about default admin account
550 echo "You can now connect to your FusionForge installation using:"
552 echo " http://$HOSTNAME/"
554 echo "The default fusionforge administrator account and password is:"
556 echo "Account Name = %{fforge_admin}"
557 echo "Password = %{fforge_passwd}"
558 #echo "Please change it to something appropriate upon initial login."
559 # give user a few seconds to read the message
562 /usr/bin/php %{GFORGE_DIR}/db/upgrade-db.php >>/var/log/%{name}-upgrade.log 2>&1
568 if [ "$1" -eq "0" ]; then
570 if [ `/usr/bin/getent passwd | /bin/cut -d: -f1 | /bin/grep -c %{gfuser}` -ne 0 ] ; then
571 echo "Removing fusionforge user..."
572 /usr/sbin/userdel %{gfuser}
575 if [ `/usr/bin/getent group | /bin/cut -d: -f1 | /bin/grep -c %{gfuser}` -ne 0 ] ; then
576 echo "Removing fusionforge group..."
577 /usr/sbin/groupdel %{gfgroup}
582 /usr/bin/psql -U %{dbuser} %{dbname} -f %{GFORGE_DIR}/plugins/aselectextauth/db/install_aselectextauth.psql
584 %preun aselectextauth
585 /usr/bin/psql -U %{dbuser} %{dbname} -f %{GFORGE_DIR}/plugins/aselectextauth/db/uninstall_aselectextauth.psql
588 [ "$RPM_BUILD_ROOT" != "/" ] && %{__rm} -rf $RPM_BUILD_ROOT
591 %defattr(-, root, root)
592 %doc AUTHORS* CHANGES COPYING INSTALL* NEWS README*
594 %attr(0660, %{httpduser}, gforge) %config(noreplace) %{GFORGE_CONF_DIR}/local.inc
595 %attr(0640, %{httpduser}, %{httpdgroup}) %config(noreplace) %{_sysconfdir}/httpd/conf.d/gforge.conf
596 %attr(0644, root, root) %{_sysconfdir}/cron.d/%{name}
597 %attr(0775, %{httpduser}, %{httpdgroup}) %dir %{GFORGE_VAR_LIB}/upload
598 %attr(755, root, %{httpdgroup}) %dir %{GFORGE_DIR}
599 # Files under %{GFORGE_DIR}
600 %{GFORGE_DIR}/AUTHORS*
601 %{GFORGE_DIR}/CHANGES
602 %{GFORGE_DIR}/COPYING
603 %{GFORGE_DIR}/INSTALL*
605 %{GFORGE_DIR}/README*
606 %{GFORGE_DIR}/fusionforge.spec
607 %{GFORGE_DIR}/fusionforge-install*
608 %{GFORGE_DIR}/gforge-restricted.sh
609 %{GFORGE_DIR}/install.sh
610 %{GFORGE_DIR}/install-common.inc
611 %{GFORGE_DIR}/jpgraph
612 # Directories under %{GFORGE_DIR}
613 %{GFORGE_DIR}/backend
615 %{GFORGE_DIR}/contrib
616 %{GFORGE_DIR}/cronjobs
620 %{GFORGE_DIR}/image-sources
622 %{GFORGE_DIR}/locales
623 %{GFORGE_DIR}/monitor
624 %{GFORGE_DIR}/translations
627 %dir %{GFORGE_DIR}/www
628 # files under %{GFORGE_DIR}/www
629 %{GFORGE_DIR}/www/*.php
630 %{GFORGE_DIR}/www/users
631 %{GFORGE_DIR}/www/favicon.ico
632 %{GFORGE_DIR}/www/projects
633 # directories under %{GFORGE_DIR}/www
634 %{GFORGE_DIR}/www/account
635 %{GFORGE_DIR}/www/activity
636 %{GFORGE_DIR}/www/admin
637 %{GFORGE_DIR}/www/developer
638 %{GFORGE_DIR}/www/docman
639 %{GFORGE_DIR}/www/export
640 %{GFORGE_DIR}/www/forum
641 %{GFORGE_DIR}/www/frs
642 %{GFORGE_DIR}/www/images
643 %{GFORGE_DIR}/www/include
644 %{GFORGE_DIR}/www/jscook
646 %{GFORGE_DIR}/www/mail
648 %{GFORGE_DIR}/www/new
649 %{GFORGE_DIR}/www/news
650 %{GFORGE_DIR}/www/people
652 %{GFORGE_DIR}/www/project
653 %{GFORGE_DIR}/www/register
654 %{GFORGE_DIR}/www/reporting
655 %{GFORGE_DIR}/www/scm
656 %{GFORGE_DIR}/www/scripts
657 %{GFORGE_DIR}/www/search
658 %{GFORGE_DIR}/www/snippet
659 %{GFORGE_DIR}/www/soap
660 %{GFORGE_DIR}/www/softwaremap
661 %{GFORGE_DIR}/www/squal
662 %{GFORGE_DIR}/www/stats
663 %{GFORGE_DIR}/www/survey
664 %{GFORGE_DIR}/www/tabber
665 %{GFORGE_DIR}/www/themes
666 %{GFORGE_DIR}/www/top
667 %{GFORGE_DIR}/www/tracker
668 %{GFORGE_DIR}/www/trove
669 %{GFORGE_DIR}/www/widgets
670 #%{GFORGE_DIR}/www/plugins/online_help
671 #%{GFORGE_DIR}/www/plugins/projects_hierarchy
672 #%{GFORGE_DIR}/www/plugins/quota_management
673 %dir %{GFORGE_DIR}/plugins
674 %{GFORGE_DIR}/plugins/env.inc.php
675 #%{GFORGE_DIR}/plugins/online_help
676 #%{GFORGE_DIR}/plugins/projects_hierarchy
677 #%{GFORGE_DIR}/plugins/quota_management
679 %dir %{GFORGE_CONF_DIR}
680 %config(noreplace) %{GFORGE_CONF_DIR}/httpd.secrets
681 %dir %{GFORGE_CONF_DIR}/httpd.d
682 %dir %attr(0775,root,%{httpdgroup}) %{GFORGE_CONF_DIR}/plugins
683 %dir %{GFORGE_VAR_LIB}/scmtarballs
684 %dir %{GFORGE_VAR_LIB}/scmsnapshots
685 %dir %{GFORGE_VAR_LIB}/dumps
686 %{GFORGE_VAR_LIB}/homedirs
690 %files aselectextauth
691 %{GFORGE_DIR}/plugins/aselectextauth
693 %files plugin-cvssyncmail
694 %{GFORGE_DIR}/plugins/cvssyncmail
696 %files plugin-cvstracker
697 %{GFORGE_DIR}/plugins/cvstracker
698 %{GFORGE_DIR}/www/plugins/cvstracker
699 %attr(-,%{httpduser},%{httpdgroup}) %{GFORGE_CONF_DIR}/plugins/cvstracker
701 %files plugin-externalsearch
702 %config(noreplace) %{GFORGE_CONF_DIR}/plugins/externalsearch/
703 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/externalsearch.ini
704 %{GFORGE_DIR}/plugins/externalsearch
706 %files plugin-fckeditor
707 %{GFORGE_DIR}/plugins/fckeditor
708 %{GFORGE_DIR}/www/plugins/fckeditor
710 %files plugin-gravatar
711 %{GFORGE_DIR}/plugins/gravatar
713 %files plugin-ldapextauth
714 %config(noreplace) %{GFORGE_CONF_DIR}/plugins/ldapextauth/
715 %{GFORGE_DIR}/plugins/ldapextauth
718 %config(noreplace) %{GFORGE_CONF_DIR}/plugins/mantis/
719 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/mantis.ini
720 %{GFORGE_DIR}/plugins/mantis
721 %{GFORGE_DIR}/www/plugins/mantis
723 %files plugin-mediawiki
724 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/mediawiki.ini
725 %config(noreplace) %{GFORGE_CONF_DIR}/httpd.d/03mediawiki.conf
726 %{GFORGE_DIR}/plugins/mediawiki/
727 %{GFORGE_DIR}/www/plugins/mediawiki
728 /usr/share/mediawiki/skins/gforge
729 /usr/share/mediawiki/skins/GForge.deps.php
730 /usr/share/mediawiki/skins/GForge.php
732 %files plugin-online_help
733 %{GFORGE_DIR}/plugins/online_help
734 %{GFORGE_DIR}/www/plugins/online_help
736 %files plugin-projects_hierarchy
737 %{GFORGE_DIR}/plugins/projects_hierarchy
738 %{GFORGE_DIR}/www/plugins/projects_hierarchy
740 %files plugin-quota_management
741 %{GFORGE_DIR}/plugins/quota_management
742 %{GFORGE_DIR}/www/plugins/quota_management
744 %files plugin-scmarch
745 %config(noreplace) %{GFORGE_CONF_DIR}/plugins/scmarch/
746 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/scmarch.ini
747 %{GFORGE_DIR}/plugins/scmarch
750 %config(noreplace) %{GFORGE_CONF_DIR}/plugins/scmbzr/
751 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/scmbzr.ini
752 %{GFORGE_DIR}/plugins/scmbzr
754 %files plugin-scmdarcs
755 %config(noreplace) %{GFORGE_CONF_DIR}/plugins/scmdarcs/
756 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/scmdarcs.ini
757 %{GFORGE_DIR}/plugins/scmdarcs
760 %config(noreplace) %{GFORGE_CONF_DIR}/plugins/scmgit/
761 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/scmgit.ini
762 %{GFORGE_DIR}/plugins/scmgit
763 %{GFORGE_DIR}/www/plugins/scmgit
766 %config(noreplace) %{GFORGE_CONF_DIR}/plugins/scmhg/
767 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/scmhg.ini
768 %{GFORGE_DIR}/plugins/scmhg
770 %files plugin-scmccase
771 %config(noreplace) %{GFORGE_CONF_DIR}/plugins/scmccase/
772 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/scmccase.ini
773 %{GFORGE_DIR}/plugins/scmccase
776 %config(noreplace) %{GFORGE_CONF_DIR}/plugins/scmcvs/
777 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/scmcvs.ini
778 %{_sysconfdir}/cron.d/%{name}-plugin-scmcvs
779 %{GFORGE_DIR}/plugins/scmcvs
780 %{GFORGE_DIR}/www/plugins/scmcvs
781 %{GFORGE_VAR_LIB}/chroot/scmrepos/cvs
784 %config(noreplace) %{GFORGE_CONF_DIR}/plugins/scmsvn/
785 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/scmsvn.ini
786 %{GFORGE_DIR}/plugins/scmsvn
787 %{GFORGE_DIR}/www/plugins/scmsvn
788 %{GFORGE_VAR_LIB}/chroot/scmrepos/svn
790 %files plugin-svncommitemail
791 %{GFORGE_DIR}/plugins/svncommitemail
793 %files plugin-svntracker
794 %config(noreplace) %{GFORGE_CONF_DIR}/plugins/svntracker/
795 %{_sysconfdir}/cron.d/gforge-plugin-svntracker
796 %{GFORGE_DIR}/plugins/svntracker
797 %{GFORGE_DIR}/www/plugins/svntracker
800 %config(noreplace) %{GFORGE_CONF_DIR}/plugins/blocks/
801 %config(noreplace) %{GFORGE_CONF_DIR}/config.ini.d/blocks.ini
802 %{GFORGE_DIR}/plugins/blocks
803 %{GFORGE_DIR}/www/plugins/blocks
805 %files plugin-extratabs
806 %{GFORGE_DIR}/plugins/extratabs
807 %{GFORGE_DIR}/www/plugins/extratabs
810 %config(noreplace) %{GFORGE_CONF_DIR}/plugins/wiki/
811 %{_sysconfdir}/cron.d/cron.wiki
812 %{GFORGE_DIR}/plugins/wiki
813 %{GFORGE_DIR}/www/wiki
815 %files plugin-projectlabels
816 %{GFORGE_DIR}/plugins/projectlabels
817 %{GFORGE_DIR}/www/plugins/projectlabels
819 %files plugin-contribtracker
820 %{GFORGE_DIR}/plugins/contribtracker
821 %{GFORGE_DIR}/www/plugins/contribtracker
823 %files plugin-globalsearch
824 %{GFORGE_DIR}/plugins/globalsearch
825 %{GFORGE_DIR}/www/plugins/globalsearch
827 %files plugin-mantisbt
828 %config(noreplace) %{GFORGE_CONF_DIR}/plugins/mantisbt/
829 %{GFORGE_DIR}/plugins/mantisbt
830 %{GFORGE_DIR}/www/plugins/mantisbt
833 * Fri May 28 2010 - Alain Peyrat <aljeux@free.fr> - 5.0.50-1
834 - Ported to 5.1 tree.
835 - Reworked logic with rights on configuration files.
836 - Adapted to changes like scm refactoring.
837 - Adapted to changes to .ini configuration file.
838 - Lots of new plugins added.
840 * Tue May 13 2010 - Bond Masuda <bond.masuda@JLBond.com> - 4.8.3-2
841 - fixed plugin symlinks and plugin directory permissions
842 - patched mediawiki, webcalendar plugins
843 - patch to fix various references to global variables
844 - add symlinks to use mediawiki Monobook skin as GForge
845 - patch to replace ereg_replace() with preg_replace()
846 - added jpgraph symlink
847 - setup httpd.secrets
848 - delete obsolete mediawiki plugin code
850 * Fri Apr 16 2010 - Bond Masuda <bond.masuda@JLBond.com> - 4.8.3-1
851 - My first packaging of fusionforge 4.8.3-1 and plugins