--- /dev/null
+This is a very first implementation of setup from cvs
+Just run
+./setup
+and this will generate etc/local.inc and etc/httpd.conf
+
+This will try to include etc/httpd.conf in your $etcapache/httpd.conf
+$etcapache is set to /etc/apache by default
+
+The intention of this is to allow the use of debian tools to install gforge
+on non debian systems
+
+You will find install-apache.sh and fill-in-the-blanks.pl
+in both utils and deb-specific dir at the moment
+
+etc/local.inc is generated from files in etc/local.d
+etc/httpd.conf is generated from files in etc/httpd.d
+
+Let me know if this was usefull and the change you had to do to make it run
+on your system
+
+Christian
+
+<bayle@debian.org>
--- /dev/null
+<Files .htaccess>
+ order allow,deny
+ deny from all
+</Files>
+
+<IfModule mod_ssl.c>
+ Listen 80
+ Listen 443
+</IfModule>
+
+NameVirtualHost {ip_address}:80
+NameVirtualHost {ip_address}:443
+
--- /dev/null
+#
+# Main host
+#
+<Directory {usr_share_gforge}/www>
+ Options Indexes FollowSymlinks
+ AllowOverride All
+ order allow,deny
+ allow from all
+ php_admin_value include_path "{usr_share_gforge}:{usr_share_gforge}/www/include:."
+ php_admin_value default_charset "UTF-8"
+</Directory>
+
--- /dev/null
+# HTTP
+<VirtualHost {ip_address}:80>
+ ServerName {domain_name}
+ ServerAlias www.{domain_name}
+ ServerAdmin {server_admin}
+ DocumentRoot {usr_share_gforge}/www
+ DirectoryIndex index.html index.php
+ <IfModule mod_userdir.c>
+ UserDir disabled
+ </IfModule>
+
+ php_admin_value default_charset "UTF-8"
+
+ <Directory {usr_share_gforge}/www>
+ Include {gforge_etc}/httpd.secrets
+ </Directory>
+
+ # Debian Sourceforge without the DNS delegation
+ # Project home pages are in a virtual /www/<group> location
+ AliasMatch ^/www/([^/]*)/(.*) {gforge_chroot}{groupdir}/$1/htdocs/$2
+ ScriptAliasMatch ^/([^/]*)/cgi-bin/(.*) {gforge_chroot}{groupdir}/$1/cgi-bin/$2
+ <Directory {gforge_chroot}{groupdir}>
+ Options Indexes FollowSymlinks
+ AllowOverride All
+ order allow,deny
+ allow from all
+ </Directory>
+
+ # Projects and Users script
+ <Location /projects>
+ ForceType application/x-httpd-php
+ </Location>
+ <Location /users>
+ ForceType application/x-httpd-php
+ </Location>
+
+ # This for cvsweb
+ ScriptAlias /cgi-bin/ {usr_lib_gforge}/cgi-bin/
+
+ # 404 Error document
+ ErrorDocument 404 /404.php
+ LogFormat "%h %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" gforge
+ CustomLog "|{cronolog_path} {var_log_gforge}/%Y/%m/%d/gforge.log" gforge
+ # Ensure that we don't try to use SSL on SSL Servers
+ <IfModule apache_ssl.c>
+ SSLDisable
+ </IfModule>
+</VirtualHost>
+
--- /dev/null
+# HTTPS
+<VirtualHost {ip_address}:443>
+ ServerName {domain_name}
+ ServerAlias www.{domain_name}
+ ServerAdmin {server_admin}
+ DocumentRoot {usr_share_gforge}/www
+ DirectoryIndex index.html index.php
+ <IfModule mod_userdir.c>
+ UserDir disabled
+ </IfModule>
+
+ php_admin_value default_charset "UTF-8"
+
+ <IfModule mod_ssl.c>
+ SSLEngine on
+ SSLCertificateFile /etc/apache/ssl.crt/server.crt
+ SSLCertificateKeyFile /etc/apache/ssl.key/server.key
+ <Files ~ "\.(cgi|shtml)$">
+ SSLOptions +StdEnvVars
+ </Files>
+ <Directory "/usr/lib/cgi-bin">
+ SSLOptions +StdEnvVars
+ </Directory>
+ SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
+ </IfModule>
+
+ <IfModule apache_ssl.c>
+ SSLEnable
+ SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
+ </IfModule>
+
+ <Directory {usr_share_gforge}/www>
+ Include {gforge_etc}/httpd.secrets
+ </Directory>
+
+ # Projects an Users script
+ <Location /projects>
+ ForceType application/x-httpd-php
+ </Location>
+ <Location /users>
+ ForceType application/x-httpd-php
+ </Location>
+
+ # This for cvsweb
+ ScriptAlias /cgi-bin/ {usr_lib_gforge}/cgi-bin/
+
+ # 404 Error document
+ ErrorDocument 404 /404.php
+ LogFormat "%h %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" gforge
+ CustomLog "|{cronolog_path} {var_log_gforge}/%Y/%m/%d/gforge.log" gforge
+</VirtualHost>
+
--- /dev/null
+#
+# CVS host
+#
+<Directory {usr_share_gforge}/cvs>
+ Options Indexes FollowSymlinks
+ AllowOverride All
+ order allow,deny
+ allow from all
+ php_admin_value include_path "{usr_share_gforge}:{usr_share_gforge}/www/include:."
+ php_admin_value default_charset "UTF-8"
+</Directory>
+
+<VirtualHost {ip_address}:80>
+ ServerName {cvs_host}
+ DocumentRoot {usr_share_gforge}/cvs
+ ScriptAlias /cgi-bin/ {usr_lib_gforge}/cgi-bin/
+ LogFormat "%h %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" gforge
+ CustomLog "|{cronolog_path} {var_log_gforge}/%Y/%m/%d/gforge.log" gforge
+ # Ensure that we don't try to use SSL on SSL Servers
+ <IfModule apache_ssl.c>
+ SSLDisable
+ </IfModule>
+</VirtualHost>
+
+<VirtualHost {ip_address}:443>
+ ServerName {cvs_host}
+
+ <IfModule mod_ssl.c>
+ SSLEngine on
+ SSLCertificateFile /etc/apache/ssl.crt/server.crt
+ SSLCertificateKeyFile /etc/apache/ssl.key/server.key
+ <Files ~ "\.(cgi|shtml)$">
+ SSLOptions +StdEnvVars
+ </Files>
+ <Directory "/usr/lib/cgi-bin">
+ SSLOptions +StdEnvVars
+ </Directory>
+ SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
+ </IfModule>
+
+ <IfModule apache_ssl.c>
+ SSLEnable
+ </IfModule>
+
+ DocumentRoot {usr_share_gforge}/cvs
+ ScriptAlias /cgi-bin/ {usr_lib_gforge}/cgi-bin/
+ LogFormat "%h %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" gforge
+ CustomLog "|{cronolog_path} {var_log_gforge}/%Y/%m/%d/gforge.log" gforge
+ # Ensure that we don't try to use SSL on SSL Servers
+ <IfModule apache_ssl.c>
+ SSLDisable
+ </IfModule>
+</VirtualHost>
+
--- /dev/null
+#
+# Download host
+#
+<VirtualHost {ip_address}:80>
+ ServerName {download_host}
+ DocumentRoot {var_lib_gforge}/download
+ LogFormat "%h %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" gforge
+ CustomLog "|{cronolog_path} {var_log_gforge}/%Y/%m/%d/gforge.log" gforge
+ # Ensure that we don't try to use SSL on SSL Servers
+ <IfModule apache_ssl.c>
+ SSLDisable
+ </IfModule>
+</VirtualHost>
+
--- /dev/null
+#
+# List host
+#
+# HTTP
+<VirtualHost {ip_address}:80>
+ ServerName {lists_host}
+ AddHandler cgi-script .cgi
+
+ ScriptAlias /mailman/ /usr/lib/mailman/cgi-bin/
+
+ Alias /pipermail /var/lib/mailman/archives/public
+ <Directory /var/lib/mailman/archives/public>
+ AllowOverride Options
+ Options FollowSymLinks
+ </Directory>
+
+ Alias /images/mailman /usr/share/images/mailman
+ <Location /images/mailman>
+ order allow,deny
+ allow from all
+ </Location>
+
+ RedirectMatch permanent ^/$ http://{lists_host}/mailman/listinfo
+ LogFormat "%h %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" gforge
+ CustomLog "|{cronolog_path} {var_log_gforge}/%Y/%m/%d/gforge.log" gforge
+ # Ensure that we don't try to use SSL on SSL Servers
+ <IfModule apache_ssl.c>
+ SSLDisable
+ </IfModule>
+</VirtualHost>
+
+# HTTPS
+<VirtualHost {ip_address}:443>
+ ServerName {lists_host}
+ AddHandler cgi-script .cgi
+
+ <IfModule mod_ssl.c>
+ SSLEngine on
+ SSLCertificateFile /etc/apache/ssl.crt/server.crt
+ SSLCertificateKeyFile /etc/apache/ssl.key/server.key
+ <Files ~ "\.(cgi|shtml)$">
+ SSLOptions +StdEnvVars
+ </Files>
+ <Directory "/usr/lib/cgi-bin">
+ SSLOptions +StdEnvVars
+ </Directory>
+ SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
+ </IfModule>
+
+ <IfModule apache_ssl.c>
+ SSLEnable
+ </IfModule>
+
+ ScriptAlias /mailman/ /usr/lib/mailman/cgi-bin/
+
+ Alias /pipermail /var/lib/mailman/archives/public
+ <Directory /var/lib/mailman/archives/public>
+ AllowOverride Options
+ Options FollowSymLinks
+ </Directory>
+
+ Alias /images/mailman /usr/share/images/mailman
+ <Location /images/mailman>
+ order allow,deny
+ allow from all
+ </Location>
+
+ RedirectMatch permanent ^/$ https://{lists_host}/mailman/listinfo
+ LogFormat "%h %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" gforge
+ CustomLog "|{cronolog_path} {var_log_gforge}/%Y/%m/%d/gforge.log" gforge
+</VirtualHost>
+
--- /dev/null
+#
+# cvs.* hosts
+#
+# This is magic for virtual hosting!
+UseCanonicalName Off
+# This example is so beautiful that I keep it
+# And can be used in a better way e.g. creating a cvs directory by group
+<VirtualHost {ip_address}:80>
+ ServerName cvs.{domain_name}
+ ServerAlias cvs.*.{domain_name}
+ DocumentRoot {gforge_chroot}{groupdir}/
+ VirtualDocumentRoot {gforge_chroot}{groupdir}/%2/htdocs
+ VirtualScriptAlias {gforge_chroot}{groupdir}/%2/cgi-bin
+ <Directory {gforge_chroot}{groupdir}>
+ Options Indexes FollowSymlinks
+ AllowOverride All
+ order allow,deny
+ allow from all
+ </Directory>
+ LogFormat "%h %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" gforge
+ CustomLog "|{cronolog_path} {var_log_gforge}/%Y/%m/%d/gforge.log" gforge
+ # Ensure that we don't try to use SSL on SSL Servers
+ <IfModule apache_ssl.c>
+ SSLDisable
+ </IfModule>
+</VirtualHost>
+
--- /dev/null
+#
+# * hosts
+#
+<VirtualHost {ip_address}:80>
+ ServerName {domain_name}
+ ServerAlias *.{domain_name}
+ VirtualDocumentRoot {gforge_chroot}{groupdir}/%1/htdocs
+ VirtualScriptAlias {gforge_chroot}{groupdir}/%1/cgi-bin
+ <Directory {gforge_chroot}{groupdir}>
+ Options Indexes FollowSymlinks
+ AllowOverride All
+ order allow,deny
+ allow from all
+ </Directory>
+ LogFormat "%h %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" gforge
+ CustomLog "|{cronolog_path} {var_log_gforge}/%Y/%m/%d/gforge.log" gforge
+ # Ensure that we don't try to use SSL on SSL Servers
+ <IfModule apache_ssl.c>
+ SSLDisable
+ </IfModule>
+</VirtualHost>
+
--- /dev/null
+#This may be used
+#ServerPath /sub1/
+#RewriteEngine On
+#RewriteRule ^(/sub1/.*) /www/subdomain$1
+
+# Other virtual hosts, as requested by users
+Include /var/lib/gforge/etc/httpd.vhosts
--- /dev/null
+This dir contains templates files
+Edit carefully and use the gforge.conf defined var
+as much as possible
+These files are used to build a proper httpd.conf file
--- /dev/null
+# PLEASE DO NOT REMOVE THIS LINE
+
+SetEnv sys_gfdbhost {db_host}
+SetEnv sys_gfdbname {db_name}
+SetEnv sys_gfdbuser {db_user}
+SetEnv sys_gfdbpasswd {db_password}
+SetEnv sys_gfldap_passwd {ldap_web_add_password}
+SetEnv sys_jabber_pass {sys_jabber_pass}
--- /dev/null
+<VirtualHost {ip_address}:80>
+ ServerName {vhost_name}
+ VirtualDocumentRoot {docdir}
+ VirtualScriptAlias {cgidir}
+ <Directory {gforge_chroot}{groupdir}>
+ Options Indexes FollowSymlinks
+ AllowOverride All
+ order allow,deny
+ allow from all
+ </Directory>
+ LogFormat "%h %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" gforge
+ CustomLog "|{cronolog_path} {var_log_gforge}/%Y/%m/%d/gforge.log" gforge
+ # Ensure that we don't try to use SSL on SSL Servers
+ <IfModule apache_ssl.c>
+ SSLDisable
+ </IfModule>
+</VirtualHost>
--- /dev/null
+# !/bin/sh
+if [ $# -eq 0 ]
+then
+ grep '{.*}' * | grep -v LogFormat | sed 's/}.*{/}\n{/g' | sed 's/.*\({.*}\).*/\1/g' | sort -u
+else
+ grep '{.*}' $@ | grep -v LogFormat | sed 's/}.*{/}\n{/g' | sed 's/.*\({.*}\).*/\1/g' | sort -u
+fi
--- /dev/null
+<?php
+// PLEASE DO NOT REMOVE THIS LINE
+
+// GForge Universal Site Modifications
+// by David HM Spector <spector@zeitgeist.com>
+//
+// Really Important Safety Tip: --> DO NOT LEAVE ANY WHITE
+// SPACE AFTER THE CLOSING PHP TAG AT THE END OF THIS FILE!
+//
+// Doing so will really confuse the software and cause
+// 1) cookies to fail and 2) HTML page headers to fail
+// which will give you some preally hard-to-debug problems.
+// Why? PHP is a *pre-processor* -- anything that's not PHP gets
+// emitted as part of the HTML stream and processed by the browser,
+// so white space is meaningful!
+//
+//
+// GForge hostnames
+//
+// Hostnames should be fully qualified domain names (FQDNs); using short names
+// would be prettier but would stop you from distributing your SourceForge
+// implementation across multiple domains.
+//
+// Of course, if you have a lot of machines serving a particular purpose
+// such as FTP or for shell accounts, the "hostname" here might be in
+// reality an addr_list of machines that is serviced by a round-robin
+// mechanism or something fancy like a local-director.
+//
+// The default GForge domain
+// this is used where ever the "naked" form of the GForge domain
+// might be used. E.g., "mailto:admin@gforge.net"
+$sys_default_domain = "{domain_name}";
+//$sys_fallback_domain = "gforge2.company.com";
+//$sys_internal_network = '192.168.1.';
+
+// Machine that hosts CVS
+$sys_cvs_host = "{cvs_host}";
+
+// Force the use of a single cvs host instead of cvs.project.domain.com
+// Set to 1 to use cvs.domain.com:/cvsroot/project for all projects
+// Set to 0 to use cvs.project.domain.com:/cvsroot/project
+$sys_cvs_single_host = 1;
+
+// Machine used for downloading sources/packages
+$sys_download_host = "{download_host}";
+
+// Machine used for uploading sources/packages
+$sys_upload_host = "{upload_host}";
+
+// Machine(s) that host users' shell accounts
+// N.B. to the SourceForge Crew: What's the difference between the user
+// host and the shell host? They are clearly two different hostnames
+// in the source code, but they seem to serve the same purpose..?
+$sys_shell_host = "{shell_host}";
+$sys_users_host = "{users_host}";
+
+// Machine that hosts docs (such as the FAQs and the various software
+// licenses (*BSD, [L]GPL, etc.). You REALLY want this to be the same
+// machine that the GForge code is running on because all of the
+// PHP makes reference to these documents in terms of relative paths that
+// are part of the GForge code tree.
+$sys_docs_host = "{docs_host}";
+
+// Machine that hosts the GForge mailing lists (This could also be
+// the mail host if you have enough horsepower & bandwidth)
+$sys_lists_host = "{lists_host}";
+
+// Domain Name Servers
+// N.B.: Use terminated FQDNs here (with the final ".") so the resolver
+// doesn't attempt to recurse in the case of a slightly broken DNS
+// configuration
+$sys_dns1_host = "ns1.{domain_name}";
+$sys_dns2_host = "ns2.{domain_name}";
--- /dev/null
+
+// Databases, html/php/other paths, passwords
+if (getenv ('SERVER_SOFTWARE')) { // We're on the web
+ $sys_dbhost=getenv('sys_gfdbhost');
+ $sys_dbname=getenv('sys_gfdbname');
+ $sys_dbuser=getenv('sys_gfdbuser');
+ $sys_dbpasswd=getenv('sys_gfdbpasswd');
+ $sys_ldap_passwd=getenv('sys_gfldap_passwd');
+ $sys_jabber_pass=getenv('sys_jabber_pass');
+} else {
+ require ('/etc/gforge/database.inc');
+}
+//whether or not to use replication
+//$sys_db_use_replication=false;
+//$sys_dbreadhost='localhost';
+//$sys_dbreaddb='stats';
+//$sys_server="pgsql";
+
--- /dev/null
+
+//Databases, html/php/other paths
+//server to use for updates and reads
+//If this is null (i.e. ""), then gforge will use Unix sockets to connect
+//to the database.
+$sys_dbhost="{db_host}";
+//whether or not to use replication
+$sys_db_use_replication=false;
+$sys_dbreadhost='localhost';
+$sys_dbreaddb='stats';
+$sys_dbname="{db_name}";
+$sys_dbuser="{db_user}";
+// You can also specify a database port if you're using something other than 5432
+//$sys_dbport="4242";
+$sys_server="pgsql";
+
+//
+// Passwords
+//
+$sys_dbpasswd="{db_password}";
+$sys_ldap_passwd="{ldap_web_add_password}";
+$sys_jabber_pass="{sys_jabber_pass}";
--- /dev/null
+
+//
+// LDAP configuration
+//
+// enable(1) or disable(0) ldap use altogether
+$sys_use_ldap={sys_use_ldap};
+$sys_ldap_host="{ldap_host}";
+$sys_ldap_port=389;
+$sys_ldap_version=3;
+// this is dn under which all information stored
+$sys_ldap_base_dn="{ldap_base_dn}";
+// and this, how we do access it (add permission required)
+$sys_ldap_bind_dn="cn=SF_robot,{ldap_base_dn}";
+// admin dn - login dn which has permissions to delete entries
+// NOT used by web code, only by support utilities
+// note that password NOT stored here
+$sys_ldap_admin_dn="cn=admin,{ldap_base_dn}";
+
+//
+// Jabber Configuration
+//
+$sys_use_jabber={sys_use_jabber};
+//messages from the system will be sent to this address
+$sys_jabber_server="{jabber_host}";
+$sys_jabber_port="5222";
+// messages sent to jabber accounts will come from this user
+// It is similar to the "From: noreply@gforge.org" used in emails
+$sys_jabber_user="noreply";
+
+//
+// Groups and Homes dir prefix
+//
+$homedir_prefix="{homedir}";
+$groupdir_prefix="{groupdir}";
+
+//
+// File Upload Configuration
+//
+// Create a directory, which is writable by your webserver, but not
+// within its document root (does not fall under www/ in the tarball)
+// Your php.ini file may have to be modified to allow writing outside
+// the webserver's directory
+//
+$sys_upload_dir='{uploaddir}';
+
+// Where the GForge files are placed
+// *** IMPORTANT: sys_urlroot *MUST* be an ABSOLUTE FILEYSTEM PATH NAME
+// that points to the www directory of the GForge
+// installation. If you use ANY form of relative path
+// you will break the html_image function in include/html.php
+//
+$sys_urlroot="{usr_share_gforge}/www/";
+
+// Name of the system as a whole (needed by various utils and titles)
+$sys_name="{system_name}";
+
+// session cookie settings
+//
+// IMPORTANT - YOU MUST CHANGE "foobar" to a long, random number
+//
+$sys_session_key = "{sys_session_key}";
+$sys_session_expire = 60 * 60 * 24 * 7;
+
+// Require that user give unique (not yet existent in db) email upon
+// registration
+$sys_require_unique_email=0;
+
+// GUI modifications (menu colors, etc.)
+// See the top of the file include/html.php, this is where the menu colors
+// and colors used throughout GForge are defined.
+
+// Themeing related vars... Some of this needs to change in the session stuff
+// The theme base directory, everything else is handled by theme_sysinit()
+$sys_themeroot=$sys_urlroot."themes/";
+// If you want an other default theme or language
+$sys_theme='{sys_theme}';
+$sys_lang='{sys_lang}';
+
+// Akamization of images
+// example: http://images.gforge.company.com
+$sys_images_url="http://{domain_name}/";
+$sys_images_secure_url="https://{domain_name}/";
+
+// Groups
+// The GForge permission model is based on groups
+// certain parts of the site, like news, stats, etc
+// are based on special group_id numbers
+// group_id #1 is the super-user group of sitewide admins
+$sys_news_group={newsadmin_groupid};
+$sys_stats_group={statsadmin_groupid};
+$sys_peer_rating_group={peerrating_groupid};
+$default_trove_cat={default_trove_cat};
+
+// JPGRAPH Package
+$sys_path_to_jpgraph='/usr/share/jpgraph/';
+
+// CVSWEB
+$sys_path_to_cvsweb='/usr/lib/gforge/bin/';
+
+// Show Source
+// Setting this to 1 will add a "Show Source" link to the bottom of each page
+$sys_show_source={sys_show_source};
+
+// Force Login
+$sys_force_login={sys_force_login};
+
+// Truetype font settings
+//$gantt_title_font_family="FF_ARIAL";
+//$gantt_title_font_style="FS_NORMAL";
+//$gantt_title_font_size=12;
+//$gantt_task_font_family="FF_ARIAL";
+//$gantt_task_font_style="FS_NORMAL";
+//$gantt_task_font_size=12;
+
+// End of customizations -- place nothing after the closing PHP tag!
+?>
<?php
+// PLEASE DO NOT REMOVE THIS LINE
+
// GForge Universal Site Modifications
// by David HM Spector <spector@zeitgeist.com>
//
// The default GForge domain
// this is used where ever the "naked" form of the GForge domain
// might be used. E.g., "mailto:admin@gforge.net"
-$sys_default_domain = 'gforge.company.com';
-$sys_fallback_domain = 'gforge2.company.com';
-$sys_internal_network = '192.168.1.';
+$sys_default_domain = "gforge.company.com";
+//$sys_fallback_domain = "gforge2.company.com";
+//$sys_internal_network = '192.168.1.';
// Machine that hosts CVS
-$sys_cvs_single_host=true;
-$sys_cvs_host = 'cvs.company.com';
+$sys_cvs_host = "cvs.gforge.company.com";
// Force the use of a single cvs host instead of cvs.project.domain.com
// Set to 1 to use cvs.domain.com:/cvsroot/project for all projects
$sys_cvs_single_host = 1;
// Machine used for downloading sources/packages
-$sys_download_host = "download.company.com";
+$sys_download_host = "download.gforge.company.com";
// Machine used for uploading sources/packages
-$sys_upload_host = "upload.company.com";
+$sys_upload_host = "upload.gforge.company.com";
// Machine(s) that host users' shell accounts
// N.B. to the SourceForge Crew: What's the difference between the user
// host and the shell host? They are clearly two different hostnames
// in the source code, but they seem to serve the same purpose..?
-$sys_shell_host = "shell.company.com";
-$sys_users_host = "users.company.com";
-$homedir_prefix='/home';
-$groupdir_prefix='/home/groups';
+$sys_shell_host = "shell.gforge.company.com";
+$sys_users_host = "users.gforge.company.com";
// Machine that hosts docs (such as the FAQs and the various software
// licenses (*BSD, [L]GPL, etc.). You REALLY want this to be the same
-// machine that the SourceForge code is running on because all of the
+// machine that the GForge code is running on because all of the
// PHP makes reference to these documents in terms of relative paths that
// are part of the GForge code tree.
-$sys_docs_host = "sfdocs.company.com";
+$sys_docs_host = "gfdocs.gforge.company.com";
// Machine that hosts the GForge mailing lists (This could also be
// the mail host if you have enough horsepower & bandwidth)
-$sys_lists_host = "lists.company.com";
+$sys_lists_host = "lists.gforge.company.com";
// Domain Name Servers
// N.B.: Use terminated FQDNs here (with the final ".") so the resolver
// doesn't attempt to recurse in the case of a slightly broken DNS
// configuration
-$sys_dns1_host = "ns1.company.com";
-$sys_dns2_host = "ns2.company.com";
+$sys_dns1_host = "ns1.gforge.company.com";
+$sys_dns2_host = "ns2.gforge.company.com";
//Databases, html/php/other paths
//server to use for updates and reads
$sys_dbreaddb='stats';
$sys_dbname="alexandria";
$sys_dbuser="www";
-$sys_dbpasswd="";
// You can also specify a database port if you're using something other than 5432
//$sys_dbport="4242";
$sys_server="pgsql";
+//
+// Passwords
+//
+$sys_dbpasswd="";
+$sys_ldap_passwd="";
+$sys_jabber_pass="";
//
-// LDAP configurataion
+// LDAP configuration
//
-// disable ldap use altogether
+// enable(1) or disable(0) ldap use altogether
$sys_use_ldap=0;
-$sys_ldap_host="ldap.company.com";
+$sys_ldap_host="ldap.gforge.company.com";
$sys_ldap_port=389;
+$sys_ldap_version=3;
// this is dn under which all information stored
-$sys_ldap_base_dn="dc=company,dc=com";
+$sys_ldap_base_dn="dc=gforge,dc=company,dc=com";
// and this, how we do access it (add permission required)
-$sys_ldap_bind_dn="cn=SF_robot,dc=company,dc=com";
-$sys_ldap_passwd="";
+$sys_ldap_bind_dn="cn=SF_robot,dc=gforge,dc=company,dc=com";
// admin dn - login dn which has permissions to delete entries
// NOT used by web code, only by support utilities
// note that password NOT stored here
-$sys_ldap_admin_dn="cn=Manager,dc=company,dc=com";
-
+$sys_ldap_admin_dn="cn=admin,dc=gforge,dc=company,dc=com";
//
-// Jabber Configuration
+// Jabber Configuration
//
$sys_use_jabber=0;
- //messages from the system will be sent to this address
-$sys_jabber_server='jabber.company.com';
-$sys_jabber_port='5222';
- // messages sent to jabber accounts will come from this user
- // It is similar to the "From: noreply@gforge.org" used in emails
-$sys_jabber_user='noreply';
-$sys_jabber_pass='temp123';
+//messages from the system will be sent to this address
+$sys_jabber_server="jabber.gforge.company.com";
+$sys_jabber_port="5222";
+// messages sent to jabber accounts will come from this user
+// It is similar to the "From: noreply@gforge.org" used in emails
+$sys_jabber_user="noreply";
+
+//
+// Groups and Homes dir prefix
+//
+$homedir_prefix="/home";
+$groupdir_prefix="/home/groups";
//
-// File Upload Configuration
+// File Upload Configuration
//
-// Create a directory, which is writable by your webserver, but not
-// within its document root (does not fall under www/ in the tarball)
-// Your php.ini file may have to be modified to allow writing outside
-// the webserver's directory
+// Create a directory, which is writable by your webserver, but not
+// within its document root (does not fall under www/ in the tarball)
+// Your php.ini file may have to be modified to allow writing outside
+// the webserver's directory
//
$sys_upload_dir='/path/to/uploads/';
$sys_urlroot="/path/to/gforge/www/";
// Name of the system as a whole (needed by various utils and titles)
-$sys_name="prodigy";
+$sys_name="Gforge";
// session cookie settings
//
// IMPORTANT - YOU MUST CHANGE "foobar" to a long, random number
//
-$sys_session_key = "foobar";
-$sys_session_expire = 60 * 60 * 24 * 7;
+$sys_session_key = "foobar";
+$sys_session_expire = 60 * 60 * 24 * 7;
// Require that user give unique (not yet existent in db) email upon
// registration
$sys_require_unique_email=0;
+// GUI modifications (menu colors, etc.)
+// See the top of the file include/html.php, this is where the menu colors
+// and colors used throughout GForge are defined.
+
// Themeing related vars... Some of this needs to change in the session stuff
// The theme base directory, everything else is handled by theme_sysinit()
$sys_themeroot=$sys_urlroot."themes/";
$sys_lang='English';
// Akamization of images
-// example: http://images.company.com
+// example: http://images.gforge.company.com
$sys_images_url = "";
$sys_images_secure_url = "";
-// Groups
-// The GForge permission model is based on groups
-// certain parts of the site, like news, stats, etc
-// are based on special group_id numbers
-// group_id #1 is the super-user group of sitewide admins
+// Groups
+// The GForge permission model is based on groups
+// certain parts of the site, like news, stats, etc
+// are based on special group_id numbers
+// group_id #1 is the super-user group of sitewide admins
$sys_news_group=3;
$sys_stats_group=2;
$sys_peer_rating_group=4;
$default_trove_cat=18;
-// JPGRAPH Package
+// JPGRAPH Package
$sys_path_to_jpgraph='/path/to/jpgraph/src/';
-// CVSWEB
+// CVSWEB
$sys_path_to_cvsweb='/path/to/cvsweb';
-// Show Source
-// Setting this to 1 will add a "Show Source" link to the bottom of each page
+// Show Source
+// Setting this to 1 will add a "Show Source" link to the bottom of each page
$sys_show_source=0;
// Force Login
--- /dev/null
+# PLEASE DO NOT REMOVE THIS LINE
+
+$sys_default_domain = '{domain_name}' ;
+$sys_cvs_host = '{cvs_host}' ;
+$sys_download_host = 'download.{domain_name}' ;
+$sys_shell_host = '{shell_host}' ;
+$sys_users_host = '{users_host}' ;
+$sys_docs_host = '{domain_name}' ;
+$sys_lists_host = '{lists_host}' ;
+$sys_dns1_host = 'ns1.{domain_name}' ;
+$sys_dns2_host = 'ns2.{domain_name}' ;
+$FTPINCOMING_DIR = '/usr/lib/gforge/ftp/incoming' ;
+$FTPFILES_DIR = '/usr/lib/gforge/download' ;
+$sys_urlroot='/usr/share/gforge/www/' ;
+$sf_cache_dir = '/var/cache/gforge' ;
+$sys_name = '{system_name}' ;
+$sys_themeroot = $sys_urlroot.'themes/' ;
+$sys_news_group = '{newsadmin_groupid}' ;
+$sys_dbhost = '{db_host}' ;
+$sys_dbname = '{db_name}' ;
+$sys_dbuser = '{db_user}' ;
+$sys_dbpasswd = '{db_password}' ;
+$sys_ldap_base_dn = '{ldap_base_dn}' ;
+$sys_ldap_host = '{ldap_host}' ;
+$skill_list = '{skill_list}' ;
+$admin_login = '{admin_login}' ;
+$admin_password = '{admin_password}' ;
+$server_admin = '{server_admin}' ;
+$domain_name = '{domain_name}' ;
+$newsadmin_groupid = '{newsadmin_groupid}' ;
+$statsadmin_groupid = '{statsadmin_groupid}' ;
+$peerrating_groupid = '{peerrating_groupid}' ;
+$noreply_to_bitbucket = '{noreply_to_bitbucket}' ;
+$sys_simple_dns = '{simple_dns}';
+$sys_ip_address = '{ip_address}';
--- /dev/null
+#! /bin/sh
+apacheconf=/etc/apache/httpd.conf
+
+readdefault(){
+
+ echo `grep $1 etc/gforge.conf | sed 's/.[^=]*=\(.*\)/\1/'`
+}
+getval(){
+ echo -n $1 \[$2\] ?
+ read $1
+}
+askdefault (){
+ echo bid
+}
+
+# This is used to make a default working gforge.conf
+computedefault(){
+DEFAULTsystem_name=Gforge
+DEFAULTdomain_name=`hostname -f`
+DEFAULTserver_admin=webmaster@$DEFAULTdomain_name
+DEFAULTdb_host=`hostname -i`
+DEFAULTdb_name=gforge
+DEFAULTdb_user=gforge
+DEFAULTdb_password=$(dd if=/dev/urandom count=256 bs=1 2> /dev/null | md5sum | cut -b1-8)
+DEFAULTip_address=`hostname -i`
+DEFAULTcvs_host=cvs.$DEFAULTdomain_name
+DEFAULTshell_host=shell.$DEFAULTdomain_name
+DEFAULTusers_host=users.$DEFAULTdomain_name
+DEFAULTlists_host=lists.$DEFAULTdomain_name
+DEFAULTdocs_host=gfdocs.$DEFAULTdomain_name
+DEFAULTjabber_host=jabber.$DEFAULTdomain_name
+DEFAULTdownload_host=download.$DEFAULTdomain_name
+DEFAULTupload_host=upload.$DEFAULTdomain_name
+DEFAULTstatsadmin_groupid=2
+DEFAULTnewsadmin_groupid=3
+DEFAULTpeerrating_groupid=4
+DEFAULTadmin_login=admin
+DEFAULTadmin_password=$(dd if=/dev/urandom count=256 bs=1 2> /dev/null | md5sum | cut -b1-8)
+DEFAULTskill_list="Ada;C;C++;HTML;LISP;Perl;PHP;Python;SQL"
+DEFAULTdefault_trove_cat=18
+DEFAULTldap_host=ldap.$DEFAULTdomain_name
+DEFAULTldap_base_dn="dc=`echo $DEFAULTdomain_name | sed 's/\./,dc=/g'`"
+DEFAULTldap_web_add_password=$(dd if=/dev/urandom count=256 bs=1 2> /dev/null | md5sum | cut -b1-8)
+DEFAULTcgidir=`pwd`/utils
+DEFAULTcronolog_path=`type cronolog | cut -d' ' -f3`
+DEFAULTgforge_chroot=""
+DEFAULTgforge_etc=`pwd`/etc
+DEFAULTgroupdir=`pwd`/home/groups
+DEFAULThomedir=`pwd`/home
+DEFAULTuploaddir=`pwd`/var/lib/gforge/download/
+DEFAULTsys_jabber_pass=$(dd if=/dev/urandom count=256 bs=1 2> /dev/null | md5sum | cut -b1-8)
+DEFAULTusr_share_gforge=`pwd`
+DEFAULTvar_lib_gforge=`pwd`/var/lib
+DEFAULTvar_log_gforge=`pwd`/var/log
+DEFAULTsys_show_source=0
+DEFAULTsys_force_login=0
+DEFAULTsys_session_key=$(dd if=/dev/urandom count=256 bs=1 2> /dev/null | md5sum | cut -b1-32)
+DEFAULTsys_theme=gforge
+DEFAULTsys_lang=English
+DEFAULTsys_use_ldap=0
+DEFAULTsys_use_jabber=0
+# TODO
+#usr_lib_gforge=`pwd`
+#vhost_name
+#docdir
+
+# Here is the fun
+# This create a default conf file in $1
+tmpfile=$1.$$computedefault
+echo "cat >$1<<-EOF" > $tmpfile
+cat $0 | grep ^DEFAULT | sed 's/DEFAULT\(.[^=]*\)=.*/\1=\${DEFAULT\1}/' >> $tmpfile
+echo 'EOF' >> $tmpfile
+. $tmpfile
+rm -f $tmpfile
+}
+
+readdefault() {
+ cat $1 | sed 's/\(.[^=]*\)=\(.*\)/DEFAULT\1="\2"/' > $1.$$readdefault
+ . $1.$$readdefault
+ rm -f $1.$$readdefault
+}
+
+echo "Setting defaults"
+
+if [ -f etc/gforge.conf ]
+then
+ readdefault etc/gforge.conf
+else
+ computedefault etc/gforge.conf
+ readdefault etc/gforge.conf
+fi
+
+echo "Enter values or type enter for defaults:"
+# Here is the fun II
+# This ask for change of default
+tmpfile=$1.$$getval
+cat $0 | grep ^DEFAULT | sed 's/DEFAULT\(.[^=]*\)=.*/getval \1 "\${DEFAULT\1}"/' >> $tmpfile
+. $tmpfile
+rm -f $tmpfile
+
+#cat $0 | grep '^DEFAULT' | sed 's/^DEFAULT\(.[^=]*\)=.*/DEFAULT\1 \1/' | while read defvar var
+#do
+# echo $defvar $var
+#done
+
+
+# Remove trailing space
+cat etc/gforge.conf | sed 's/ *$//' > etc/gforge.conf.new
+mv etc/gforge.conf.new etc/gforge.conf
+
+echo "Create etc/httpd.conf and etc/httpd.secrets"
+for i in etc/httpd.d/[0-4][0-9]* etc/httpd.d/httpd.secrets
+do
+ utils/fill-in-the-blanks.pl $i etc/`basename $i` etc/gforge.conf
+done
+ls etc/[0-9][0-9]* | sort | xargs cat > etc/httpd.conf
+rm etc/[0-9][0-9]*
+
+echo "Create etc/local.inc"
+for i in etc/local.d/01* etc/local.d/10*simple etc/local.d/20*
+do
+ utils/fill-in-the-blanks.pl $i etc/`basename $i` etc/gforge.conf
+done
+ls etc/01* etc/10*simple etc/20* | sort | xargs cat > etc/local.inc
+rm etc/01* etc/10*simple etc/20*
+
+
+export etcgforge=`pwd`/etc
+if [ -f $apacheconf ] ; then
+ if ! grep -q "^Include $etcgforge/httpd.conf" $apacheconf ; then
+ utils/install-apache.sh setup
+ fi
+fi
--- /dev/null
+#! /usr/bin/perl -w
+
+use strict ;
+
+use vars qw/$ifile $ofile $cfile $prefix $tmpfile %hash $key $val $cur $code $line $token/ ;
+
+# use Debconf::Client::ConfModule ':all';
+
+if ($#ARGV < 1) {
+ print STDERR "Missing parameter.\n\n" ;
+ print STDERR "Usage: fill-in-the-blanks.pl <in-template> <out-file> [<conf_file>]\n" ;
+ exit 1 ;
+}
+
+if ($#ARGV == 2) {
+ $ifile = shift @ARGV ;
+ $ofile = shift @ARGV ;
+ $cfile = shift @ARGV ;
+} else {
+ $ifile = shift @ARGV ;
+ $ofile = shift @ARGV ;
+ $cfile = "/etc/gforge/gforge.conf" ;
+}
+%hash = () ;
+
+open CONF, "$cfile" ;
+while ($line = <CONF>) {
+ chomp $line ;
+ next if $line =~ m/^\s*#/ ;
+ ($key, $val) = split ('=', $line, 2) ;
+ $hash{$key} = $val ;
+}
+close CONF ;
+$hash{"PLEASE DO NOT REMOVE THIS LINE"} =
+ "Do not edit this file, edit /etc/gforge/templates/* and run gforge-config" ;
+
+umask 0077 ;
+open (IFILE, $ifile)
+ or die "Can't open input file '$ifile'" ;
+if (-e $ofile) {
+ unlink $ofile
+ or die "Can't unlink output file '$ofile'" ;
+}
+open (OFILE, "> $ofile")
+ or die "Can't open output file '$ofile'" ;
+
+while ($line = <IFILE>) {
+ chomp $line ;
+ foreach $cur (keys %hash) {
+ $token = "{$cur}" ;
+ $line =~ s/$token/$hash{$cur}/g ;
+ }
+ print OFILE "$line\n";
+}
+close IFILE ;
+close OFILE ;
--- /dev/null
+#! /bin/sh
+#
+# $Id$
+#
+# Configure apache for GForge
+# Christian Bayle, Roland Mas, debian-sf (GForge for Debian)
+
+set -e
+
+if [ $(id -u) != 0 ] ; then
+ echo "You must be root to run this, please enter passwd"
+ exec su -c "$0 $1"
+fi
+
+if [ -z "$etcapache" ]
+then
+ if [ -d /etc/apache ]
+ then
+ etcapache="/etc/apache"
+ else
+ if [ -d /etc/apache-ssl ]
+ then
+ etcapache="/etc/apache-ssl"
+ else
+ echo '[No etcapache]' ; exit 1
+ fi
+ fi
+fi
+
+if [ -z "$etcgforge" ]
+then
+ if [ -d /etc/gforge ]
+ then
+ etcgforge="/etc/gforge"
+ else
+ echo '[No etcgforge]' ; exit 1
+ fi
+fi
+if [ -z "$etcphp4apache" ]
+then
+ etcphp4apache="/etc/php4/apache"
+else
+ echo '[No etcphp4apache]' ; exit 1
+fi
+
+[ -z "$etcphp4cgi" ] && etcphp4cgi="/etc/php4/cgi"
+[ -z "$gforgebin" ] && gforgebin="/usr/lib/gforge/bin"
+
+case "$1" in
+ configure-files)
+ # Make sure Apache sees us
+ if [ -e $etcapache/httpd.conf ] ; then
+ cp -a $etcapache/httpd.conf $etcapache/httpd.conf.gforge-new
+ perl -pi -e "s/# *LoadModule php4_module/LoadModule php4_module/gi" $etcapache/httpd.conf.gforge-new
+ perl -pi -e "s/# *LoadModule ssl_module/LoadModule ssl_module/gi" $etcapache/httpd.conf.gforge-new
+ perl -pi -e "s/# *LoadModule env_module/LoadModule env_module/gi" $etcapache/httpd.conf.gforge-new
+ perl -pi -e "s/# *LoadModule vhost_alias_module/LoadModule vhost_alias_module/gi" $etcapache/httpd.conf.gforge-new
+
+ if ! grep -q "^Include $etcgforge/httpd.conf" $etcapache/httpd.conf.gforge-new ; then
+ echo "### Next line inserted by GForge install" >> $etcapache/httpd.conf.gforge-new
+ echo "Include $etcgforge/httpd.conf" >> $etcapache/httpd.conf.gforge-new
+ fi
+ fi
+
+ # Make sure pgsql, ldap and gd are enabled in the PHP config files
+ cp -a $etcphp4apache/php.ini $etcphp4apache/php.ini.gforge-new
+ cp -a $etcphp4cgi/php.ini $etcphp4cgi/php.ini.gforge-new
+ if [ -f $etcphp4apache/php.ini.gforge-new ]; then
+ if ! grep -q "^[[:space:]]*extension[[:space:]]*=[[:space:]]*pgsql.so" $etcphp4apache/php.ini.gforge-new; then
+ echo "Enabling pgsql in $etcphp4apache/php.ini"
+ echo "extension=pgsql.so" >> $etcphp4apache/php.ini.gforge-new
+ fi
+ if ! grep -q "^[[:space:]]*extension[[:space:]]*=[[:space:]]*gd.so" $etcphp4apache/php.ini.gforge-new; then
+ echo "Enabling gd in $etcphp4apache/php.ini"
+ echo "extension=gd.so" >> $etcphp4apache/php.ini.gforge-new
+ fi
+ if ! grep -q "^[[:space:]]*extension[[:space:]]*=[[:space:]]*ldap.so" $etcphp4apache/php.ini.gforge-new; then
+ echo "Enabling ldap in $etcphp4apache/php.ini"
+ echo "extension=ldap.so" >> $etcphp4apache/php.ini.gforge-new
+ fi
+ fi
+ if [ -f $etcphp4cgi/php.ini.gforge-new ]; then
+ if ! grep -q "^[[:space:]]*extension[[:space:]]*=[[:space:]]*pgsql.so" $etcphp4cgi/php.ini.gforge-new; then
+ echo "Enabling pgsql in $etcphp4cgi/php.ini"
+ echo "extension=pgsql.so" >> $etcphp4cgi/php.ini.gforge-new
+ fi
+ fi
+
+ ;;
+ configure)
+ [ -f $gforgebin/prepare-vhosts-file.pl ] && $gforgebin/prepare-vhosts-file.pl
+ if [ -f /usr/sbin/modules-config ] ; then
+ if [ -e /etc/apache/httpd.conf ] ; then
+ /usr/sbin/modules-config apache enable mod_php4
+ /usr/sbin/modules-config apache enable mod_ssl
+ /usr/sbin/modules-config apache enable mod_env
+ /usr/sbin/modules-config apache enable mod_vhost_alias
+ fi
+ if [ -e /etc/apache-ssl/httpd.conf ] ; then
+ /usr/sbin/modules-config apache-ssl enable mod_php4
+ /usr/sbin/modules-config apache-ssl enable mod_env
+ /usr/sbin/modules-config apache-ssl enable mod_vhost_alias
+ fi
+ fi
+ if [ -x /usr/sbin/apache ]; then
+ invoke-rc.d apache restart || true
+ fi
+ if [ -x /usr/sbin/apache-ssl ]; then
+ invoke-rc.d apache-ssl restart || true
+ fi
+ if [ -x /usr/sbin/apache ]; then
+ invoke-rc.d apache restart || true
+ fi
+ if [ -x /usr/sbin/apache-ssl ]; then
+ invoke-rc.d apache-ssl restart || true
+ fi
+ ;;
+
+ purge-files)
+ cp -a $etcapache/httpd.conf $etcapache/httpd.conf.gforge-new
+ if grep -q "Include $etcgforge/httpd.conf" $etcapache/httpd.conf.gforge-new ; then
+ pattern=$(basename $0)
+ tmp=$(mktemp /tmp/$pattern.XXXXXX)
+ grep -v "Include $etcgforge/httpd.conf\|### Next line inserted by GForge install" $etcapache/httpd.conf.gforge-new > $tmp
+ cat $tmp > $etcapache/httpd.conf.gforge-new
+ rm -f $tmp
+ fi
+ ;;
+ purge)
+ if [ -x /usr/sbin/apache ]; then
+ invoke-rc.d apache restart || true
+ fi
+ if [ -x /usr/sbin/apache-ssl ]; then
+ invoke-rc.d apache-ssl restart || true
+ fi
+ ;;
+ setup)
+ $0 configure-files
+ $0 configure
+ cp $etcapache/httpd.conf $etcapache/httpd.conf.gforge-old
+ mv $etcapache/httpd.conf.gforge-new $etcapache/httpd.conf
+ ;;
+ cleanup)
+ $0 purge-files
+ $0 purge
+ ;;
+
+ *)
+ echo "Usage: $0 {configure|configure-files|purge|purge-files|setup|cleanup}"
+ exit 1
+ ;;
+
+esac