--- gforge-4.7.3.orig/rpm-specific/cron.d/gforge +++ gforge-4.7.3/rpm-specific/cron.d/gforge @@ -0,0 +1,126 @@ +# +# GForge +# Copyright 1999-2001 (c) VA Linux Systems +# Copyright 2002-2004 (c) GForge, LLC, Ognyan Kulev +# http://gforge.org/ +# +# @version $Id$ +# + +# Change path to the GForge directory. +GFORGE="/usr/share/gforge" +GFORGE_PLUGINS="/usr/lib/gforge/plugins" + +# Change paths to the GForge directory. +# Don't reference $GFORGE because this won't work! +# You may need to change the pathname to php CLI (command line interface) +PHP="/usr/bin/php -q -d include_path=.:/etc/gforge:/usr/share/gforge:/usr/share/gforge/www/include" + +# Don't mail command output to anyone. +MAILTO="" + +# +# recalculate user popularity metric +# +10 1 * * * root $PHP $GFORGE/cronjobs/calculate_user_metric.php + +# +# daily project_weekly_metric recalc +# +12 1 * * * root $PHP $GFORGE/cronjobs/project_weekly_metric.php + +# +# daily deletion of sessions, closing jobs, etc +# +15 1 * * * root $PHP $GFORGE/cronjobs/project_cleanup.php + +# +# daily crunching of survey data and other associated ratings +# +41 1 * * * root $PHP $GFORGE/cronjobs/rating_stats.php + +# +# daily crunching of project summary data (counts) +# +45 1 * * * root $PHP $GFORGE/cronjobs/db_project_sums.php + +# +# daily recalculate of the sums under the trove map +# +50 1 * * * root $PHP $GFORGE/cronjobs/db_trove_maint.php + +# +# daily close pending artifacts +# +57 1 * * * root $PHP $GFORGE/cronjobs/check_stale_tracker_items.php + +# +# VACUUM should be done after ALL OTHER JOBS +# +0 2 * * * root $PHP $GFORGE/cronjobs/vacuum.php + +# +# Stats aggregation work +# +15 7 * * * root $PHP $GFORGE/cronjobs/db_stats_agg.php + +# +# daily rotation of the activity_log +# +0 0 * * * root $PHP $GFORGE/cronjobs/rotate_activity.php + +# +# daily aggregating of the numbers +# +15 0 * * * root $PHP $GFORGE/cronjobs/site_stats.php + +# +# Hourly send pending massmailings, if any +# +47 * * * * root $PHP $GFORGE/cronjobs/massmail.php + +# +# Reporting Process +# +25 7 * * * root $PHP $GFORGE/cronjobs/reporting_cron.php + +# +# +# IMPORTANT!! READ THE README.root file before continuing! +# +# +# +# Create the /etc/* files : only usefull if the sys_account_manager_type=UNIX +# +#10 * * * * root $PHP $GFORGE_PLUGINS/scmcvs/cronjobs/usergroup.php + +# +# Create the shell users accounts and groups home directories +# +15 * * * * root $PHP $GFORGE/cronjobs/homedirs.php + +# +# Upload the SSH key files +# +15 * * * * root $PHP $GFORGE_PLUGINS/scmcvs/cronjobs/ssh_create.php + +# +# Create the blank cvs trees +# +20 * * * * root $PHP $GFORGE_PLUGINS/scmcvs/cronjobs/cvs.php + +# +# Daily stats collection +# +20 1 * * * root $PHP $GFORGE_PLUGINS/scmcvs/cronjobs/history_parse.php + +# +# Create the new mailing lists +# +06 * * * * root $PHP $GFORGE/cronjobs/mail/mailing_lists_create.php + +# +# Create the /etc/aliases file +# +08 * * * * root $PHP $GFORGE/cronjobs/mail/mailaliases.php + --- gforge-4.7.3.orig/rpm-specific/conf/gforge.conf +++ gforge-4.7.3/rpm-specific/conf/gforge.conf @@ -0,0 +1,85 @@ +system_name=SYSTEM_NAME +domain_name=HOST_NAME +server_admin=SERVER_ADMIN +db_host=DB_HOST +db_name=DB_NAME +db_user=DB_USER +db_password=DB_PASSWORD +scm_host=HOST_NAME +shell_host=HOST_NAME +users_host=users.HOST_NAME +lists_host=lists.HOST_NAME +docs_host=docs.HOST_NAME +jabber_host=jabber.HOST_NAME +download_host=download.HOST_NAME +upload_host=upload.HOST_NAME +default_trove_cat=18 +statsadmin_groupid=3 +newsadmin_groupid=2 +peerrating_groupid=4 +template_project=5 +admin_login=admin +admin_password=ADMIN_PASSWORD +ldap_host=localhost +ldap_base_dn= +ldap_web_add_password=LDAP_PASSWD +sys_path_to_mailman=/usr/lib/mailman +cgidir=/usr/local/gforge/cgi-bin +cronolog_path=/usr/sbin/cronolog +sys_path_to_jpgraph=/var/www/jpgraph/ +sys_path_to_scmweb=/usr/lib/gforge/plugins/scmcvs/cgi-bin +gforge_chroot=/var/lib/gforge/chroot +gforge_etc=/etc/gforge +sys_custom_path=/etc/gforge/custom +groupdir=/home/groups +homedir=/home/users +cvsdir=/cvsroot +uploaddir=/var/lib/gforge/upload/ +ftpuploaddir=/var/lib/gforge/chroot/ftproot/pub +sys_jabber_pass=JABBER_PASSWD +usr_share_gforge=/usr/share/gforge +usr_lib_gforge=/usr/share/gforge +var_lib_gforge=/var/lib/gforge +var_log_gforge=/var/log/gforge +sys_show_source=0 +sys_force_login=0 +sys_session_key=RANDOM_ID +sys_session_expire=60 * 60 * 24 * 7 +sys_show_contact_info=1 +sys_theme=gforge +sys_lang=English +sys_default_timezone=GMT +sys_default_country_code=US +sys_account_manager_type=pgsql +sys_use_jabber=0 +sys_use_auth_ldap=0 +sys_ldap_auth_host=localhost +sys_ldap_auth_port=389 +sys_ldap_auth_version=3 +sys_ldap_auth_dn=dc=arcadie +sys_scm_tarballs_path=/var/lib/gforge/scmtarballs +sys_scm_snapshots_path=/var/lib/gforge/scmsnapshots +sys_use_scm=false +sys_use_tracker=true +sys_use_forum=true +sys_use_pm=true +sys_use_docman=true +sys_use_news=true +sys_use_mail=true +sys_use_survey=true +sys_use_frs=true +sys_use_ftp=true +sys_use_trove=true +sys_use_snippet=true +sys_use_ssl=false +sys_use_people=true +sys_use_ftpuploads=true +sys_use_project_vhost=false +sys_use_project_database=false +sys_use_project_multimedia=false +sys_project_reg_restricted=true +sys_user_reg_restricted=false +sys_localinc=/etc/gforge/local.inc +sys_plugins_path=/usr/lib/gforge/plugins/ +sys_sslcrt= +sys_sslkey= --- gforge-4.7.3.orig/rpm-specific/scripts/gforge-config +++ gforge-4.7.3/rpm-specific/scripts/gforge-config @@ -0,0 +1,11 @@ +# !/bin/bash +echo '##' +echo '# Generating GForge configuration files' + +cd /usr/share/gforge +./setup -confdir /etc/gforge -input /etc/gforge/gforge.conf -noapache &> /dev/null +cd - &> /dev/null + +echo '# Done.' +echo '# If you have modified the database configuration, you have to restart apache (service httpd restart).' +echo '##' \ No newline at end of file --- gforge-4.7.3.orig/rpm-specific/patches/gforge-4.0-deb_rpm.patch +++ gforge-4.7.3/rpm-specific/patches/gforge-4.0-deb_rpm.patch @@ -0,0 +1,117 @@ +diff -ru gforge/deb-specific/db-upgrade.pl gforge-rpm/deb-specific/db-upgrade.pl +--- gforge/deb-specific/db-upgrade.pl 2008-11-05 18:01:46.000000000 +0100 ++++ gforge-rpm/deb-specific/db-upgrade.pl 2008-11-05 18:04:13.000000000 +0100 +@@ -2836,7 +2836,7 @@ + if (-x '/usr/bin/pg_lsclusters' ) { + $command = q(/usr/bin/pg_lsclusters | grep 5432 | grep online | cut -d' ' -f1) ; + } else { +- $command = q(dpkg -s postgresql | awk '/^Version: / { print $2 }') ; ++ my $command = q(rpm -q --qf %{VERSION} postgresql) ; + } + my $version = qx($command) ; + chomp $version ; +diff -ru gforge/deb-specific/sqlhelper.pm gforge-rpm/deb-specific/sqlhelper.pm +--- gforge/deb-specific/sqlhelper.pm 2008-11-05 18:01:46.000000000 +0100 ++++ gforge-rpm/deb-specific/sqlhelper.pm 2008-11-05 18:08:12.000000000 +0100 +@@ -289,18 +289,98 @@ + my $v1 = shift || 0 ; + my $v2 = shift || 0 ; + +- my $rc = system "dpkg --compare-versions $v1 lt $v2" ; ++ my $rc = cmp_version($v1, $v2, 0); + +- return (! $rc) ; ++ return ($rc) ; + } + + sub is_greater ( $$ ) { + my $v1 = shift || 0 ; + my $v2 = shift || 0 ; + +- my $rc = system "dpkg --compare-versions $v1 gt $v2" ; ++ my $rc = cmp_version($v1, $v2, 1); + + return (! $rc) ; + } + ++#------------------------------------------------------- ++# FUNCTION: cmp_version (STRING, STRING) ++# ++# Compares complete version numbers ala epoch:upstream-debian ++# and returns true if the first version string is greater ++# than the second. ++# ++# Copyright (C) 2001 Christoph Martin ++# http://www.uni-mainz.de/~martin/apt-show-versions ++#-------------------------------------------------------- ++ ++# recursive function to compare upstream or debian version part ++ ++sub compare { ++ my ($first, $last) = @_; ++ ++ # equal if both are empty ++ return (0) unless ($first ne "" || $last ne ""); ++ ++ # parse next version string part and set numerical part to 0 if empty ++ my ($nondig1, $dig1, $remainder1) = ($first =~ /^(\D*)?(\d*)(.*)?/); ++ $dig1 = 0 unless ($dig1 ne ""); ++ my ($nondig2, $dig2, $remainder2) = ($last =~ /^(\D*)?(\d*)(.*)?/); ++ $dig2 = 0 unless ($dig2 ne ""); ++ ++ return ($nondig1 cmp $nondig2) unless ($nondig1 eq $nondig2); ++ return ($dig1 <=> $dig2) unless ($dig1 == $dig2); ++ return compare($remainder1, $remainder2); ++} ++ ++sub cmp_version { ++ my ($first, $last, $strict) = @_; ++ ++ # parse version number in epoch:upstream-debian and set to 0 if empty ++ my ($first_epoch, ++ $first_upstream, ++ $first_debian) = ($first =~ /^(.*:)?(.*?)(-.*)?$/); ++ $first_epoch = "0:" unless defined $first_epoch; ++ $first_debian = "-0" unless defined $first_debian; ++ $first_epoch =~ s/:$//; ++ $first_debian =~ s/^-//; ++ ++ my ($last_epoch, ++ $last_upstream, ++ $last_debian) = ($last =~ /^(.*:)?(.*?)(-.*)?$/); ++ $last_epoch = "0:" unless defined $last_epoch; ++ $last_debian = "-0" unless defined $last_debian; ++ $last_epoch =~ s/:$//; ++ $last_debian =~ s/^-//; ++ ++ my $ret; ++ if ($first_epoch == $last_epoch) { ++ $ret = compare($first_upstream, $last_upstream); ++ if ($ret == 0) { ++ $ret = compare($first_debian, $last_debian); ++ } ++ } else { ++ $ret = ($first_epoch <=> $last_epoch); ++ } ++ ++ # give the same return codes like 'dpkg --compare-versions .. ge ..' ++ if ($strict == 1 and $ret == 0) { ++ $ret = 256; ++ } ++ if ($ret == -1) { ++ $ret = 256; ++ } elsif ($ret == 1) { ++ $ret = 0; ++ } ++ ++ return $ret; ++ ++ # this will never be reached, but should give the same ++ # result as $ret ++ ++ my $ret2 = system("dpkg --compare-versions $first ge $last"); ++ print "** $ret <> $ret2 ** \n" unless $ret == $ret2; ++ return $ret2; ++} ++ + 1 ; --- gforge-4.7.3.orig/rpm-specific/httpd.d/gforge.conf +++ gforge-4.7.3/rpm-specific/httpd.d/gforge.conf @@ -0,0 +1,2 @@ +# Include gforge httpd.conf generated by gforge-config +Include /etc/gforge/httpd.conf \ No newline at end of file --- gforge-4.7.3.orig/plugins/svntracker/rpm-specific/cron.d/gforge-plugin-svntracker +++ gforge-4.7.3/plugins/svntracker/rpm-specific/cron.d/gforge-plugin-svntracker @@ -0,0 +1,17 @@ + +# Change path to the GForge directory. +GFORGE="/usr/share/gforge" +GFORGE_PLUGINS="/usr/lib/gforge/plugins" + +# Change paths to the GForge directory. +# Don't reference $GFORGE because this won't work! +# You may need to change the pathname to php CLI (command line interface) +PHP="/usr/bin/php -q -d include_path=.:/etc/gforge:/usr/share/gforge:/usr/share/gforge/www/include" + +# Don't mail command output to anyone. +MAILTO="" + +# +# Updates the loginfo files to include CVS Tracker +# +30 * * * * root $PHP $GFORGE_PLUGINS/svntracker/bin/update_postcommit.php \ No newline at end of file --- gforge-4.7.3.orig/plugins/cvstracker/rpm-specific/cron.d/gforge-plugin-cvstracker +++ gforge-4.7.3/plugins/cvstracker/rpm-specific/cron.d/gforge-plugin-cvstracker @@ -0,0 +1,24 @@ +# +# GForge +# Copyright 2005 (c) Guillaume Smet +# http://gforge.org/ +# +# @version $Id: gforge,v 1.2 2004/12/07 16:12:24 gsmet Exp $ +# + +# Change path to the GForge directory. +GFORGE="/usr/share/gforge" +GFORGE_PLUGINS="/usr/lib/gforge/plugins" + +# Change paths to the GForge directory. +# Don't reference $GFORGE because this won't work! +# You may need to change the pathname to php CLI (command line interface) +PHP="/usr/bin/php -q -d include_path=.:/etc/gforge:/usr/share/gforge:/usr/share/gforge/www/include" + +# Don't mail command output to anyone. +MAILTO="" + +# +# Updates the loginfo files to include CVS Tracker +# +30 * * * * root $PHP $GFORGE_PLUGINS/cvstracker/bin/update_loginfo.php \ No newline at end of file