gforge/debian/gforge-plugin-scmcpold.prerm -text
gforge/debian/gforge-plugin-scmdarcs.postinst -text
gforge/debian/gforge-plugin-scmdarcs.prerm -text
+gforge/debian/gforge-plugin-scmgit.postinst -text
+gforge/debian/gforge-plugin-scmgit.prerm -text
+gforge/debian/gforge-plugin-scmhg.postinst -text
+gforge/debian/gforge-plugin-scmhg.prerm -text
gforge/debian/patches/disable-dav.dpatch -text
gforge/debian/patches/use-snoopy-from-distro.dpatch -text
gforge/debian/po/README -text
gforge/packaging/dirs/plugin-scmcpold -text
gforge/packaging/dirs/plugin-scmcvs -text
gforge/packaging/dirs/plugin-scmdarcs -text
+gforge/packaging/dirs/plugin-scmgit -text
+gforge/packaging/dirs/plugin-scmhg -text
gforge/packaging/dirs/plugin-scmsvn -text
gforge/packaging/dirs/web-apache2 -text
gforge/packaging/docs/pkgname-web-apache2 -text
gforge/packaging/install/plugin-scmcpold -text
gforge/packaging/install/plugin-scmcvs -text
gforge/packaging/install/plugin-scmdarcs -text
+gforge/packaging/install/plugin-scmgit -text
+gforge/packaging/install/plugin-scmhg -text
gforge/packaging/install/plugin-scmsvn -text
gforge/packaging/install/shell-postgresql -text
gforge/packaging/install/web-apache2 -text
gforge/plugins/scmdarcs/common/DarcsPlugin.class.php -text
gforge/plugins/scmdarcs/common/scmdarcs-init.php -text
gforge/plugins/scmdarcs/etc/plugins/scmdarcs/config.php -text
+gforge/plugins/scmgit/common/GitPlugin.class.php -text
+gforge/plugins/scmgit/common/scmgit-init.php -text
+gforge/plugins/scmgit/etc/plugins/scmgit/config.php -text
+gforge/plugins/scmhg/common/HgPlugin.class.php -text
+gforge/plugins/scmhg/common/scmhg-init.php -text
+gforge/plugins/scmhg/etc/plugins/scmhg/config.php -text
gforge/plugins/scmsvn/cron.d/fusionforge-plugin-scmsvn -text
gforge/plugins/scmsvn/cronjobs/update_users.php -text
gforge/plugins/scmsvn/db/scmsvn-init-mysql.sql -text
over it to the project's administrator.
Provides: gforge-plugin-scm
+Package: gforge-plugin-scmgit
+Architecture: all
+Depends: gforge-common, gforge-db-postgresql | gforge-db, gforge-web-apache2 | gforge-web, gforge-shell-postgresql | gforge-shell, git-core, php5-cli, ${misc:Depends}
+Description: collaborative development tool - Git plugin
+ FusionForge provides many tools to aid collaboration in a
+ development project, such as bug-tracking, task management,
+ mailing-lists, SCM repository, forums, support request helper,
+ web/FTP hosting, release management, etc. All these services are
+ integrated into one web site and managed through a web interface.
+ .
+ This plugin contains the Git subsystem of FusionForge. It allows each
+ FusionForge project to have its own Git repository, and gives some
+ control over it to the project's administrator.
+Provides: gforge-plugin-scm
+
+Package: gforge-plugin-scmhg
+Architecture: all
+Depends: gforge-common, gforge-db-postgresql | gforge-db, gforge-web-apache2 | gforge-web, gforge-shell-postgresql | gforge-shell, mercurial, php5-cli, ${misc:Depends}
+Description: collaborative development tool - Mercurial (Hg) plugin
+ FusionForge provides many tools to aid collaboration in a
+ development project, such as bug-tracking, task management,
+ mailing-lists, SCM repository, forums, support request helper,
+ web/FTP hosting, release management, etc. All these services are
+ integrated into one web site and managed through a web interface.
+ .
+ This plugin contains the Mercurial (Hg) subsystem of FusionForge. It
+ allows each FusionForge project to have its own Mercurial repository,
+ and gives some control over it to the project's administrator.
+Provides: gforge-plugin-scm
+
Package: gforge-plugin-scmcpold
Architecture: all
Depends: gforge-common, gforge-db-postgresql | gforge-db, gforge-web-apache2 | gforge-web, gforge-shell-postgresql | gforge-shell, php5-cli, ${misc:Depends}
--- /dev/null
+#! /bin/sh
+# postinst script for gforge-plugin-scmgit
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+# quoting from the policy:
+# Any necessary prompting should almost always be confined to the
+# post-installation script, and should be protected with a conditional
+# so that unnecessary prompting doesn't happen if a package's
+# installation fails and the `postinst' is called with `abort-upgrade',
+# `abort-remove' or `abort-deconfigure'.
+
+case "$1" in
+ configure)
+ gforge-config
+
+ # Prepare database
+ su -s /bin/sh gforge -c '/usr/share/gforge/bin/register-plugin scmgit "Git"'
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- /dev/null
+#! /bin/sh
+# prerm script for gforge-plugin-scmgit
+#
+# see: dh_installdeb(1)
+set -e
+
+#DEBHELPER#
+
+# summary of how this script can be called:
+# * <prerm> `remove'
+# * <old-prerm> `upgrade' <new-version>
+# * <new-prerm> `failed-upgrade' <old-version>
+# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+# * <deconfigured's-prerm> `deconfigure' `in-favour'
+# <package-being-installed> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ remove|deconfigure)
+ if [ -f /var/run/postgresql/.s.PGSQL.5432 ]
+ then
+ /usr/share/gforge/bin/unregister-plugin scmgit
+ else
+ echo "WARNING: database not available to unregister scmgit plugin"
+ fi
+ ;;
+ upgrade|failed-upgrade)
+ ;;
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+
+
+exit 0
+
+
--- /dev/null
+#! /bin/sh
+# postinst script for gforge-plugin-scmhg
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+# quoting from the policy:
+# Any necessary prompting should almost always be confined to the
+# post-installation script, and should be protected with a conditional
+# so that unnecessary prompting doesn't happen if a package's
+# installation fails and the `postinst' is called with `abort-upgrade',
+# `abort-remove' or `abort-deconfigure'.
+
+case "$1" in
+ configure)
+ gforge-config
+
+ # Prepare database
+ su -s /bin/sh gforge -c '/usr/share/gforge/bin/register-plugin scmhg "Mercurial"'
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- /dev/null
+#! /bin/sh
+# prerm script for gforge-plugin-scmhg
+#
+# see: dh_installdeb(1)
+set -e
+
+#DEBHELPER#
+
+# summary of how this script can be called:
+# * <prerm> `remove'
+# * <old-prerm> `upgrade' <new-version>
+# * <new-prerm> `failed-upgrade' <old-version>
+# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+# * <deconfigured's-prerm> `deconfigure' `in-favour'
+# <package-being-installed> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ remove|deconfigure)
+ if [ -f /var/run/postgresql/.s.PGSQL.5432 ]
+ then
+ /usr/share/gforge/bin/unregister-plugin scmhg
+ else
+ echo "WARNING: database not available to unregister scmhg plugin"
+ fi
+ ;;
+ upgrade|failed-upgrade)
+ ;;
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+
+
+exit 0
+
+
--- /dev/null
+etc/gforge/httpd.d
+etc/gforge/plugins/scmgit
+usr/share/gforge/plugins/scmgit/common
+var/lib/gforge/chroot/scmrepos/git
--- /dev/null
+etc/gforge/httpd.d
+etc/gforge/plugins/scmhg
+usr/share/gforge/plugins/scmhg/common
+var/lib/gforge/chroot/scmrepos/hg
--- /dev/null
+plugins/scmgit/common/* usr/share/gforge/plugins/scmgit/common/
+plugins/scmgit/etc/plugins/scmgit/* etc/gforge/plugins/scmgit/
--- /dev/null
+plugins/scmhg/common/* usr/share/gforge/plugins/scmhg/common/
+plugins/scmhg/etc/plugins/scmhg/* etc/gforge/plugins/scmhg/
--- /dev/null
+<?php
+/** FusionForge Git plugin
+ *
+ * Copyright 2009, Roland Mas
+ *
+ * This file is part of FusionForge.
+ *
+ * FusionForge is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published
+ * by the Free Software Foundation; either version 2 of the License,
+ * or (at your option) any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FusionForge; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+
+class GitPlugin extends SCMPlugin {
+ function GitPlugin () {
+ global $gfconfig;
+ $this->SCMPlugin () ;
+ $this->name = 'scmgit';
+ $this->text = 'Git';
+ $this->hooks[] = 'scm_generate_snapshots' ;
+
+ require_once $gfconfig.'plugins/scmgit/config.php' ;
+
+ $this->default_git_server = $default_git_server ;
+ $this->git_root = $git_root;
+
+ $this->register () ;
+ }
+
+ function getDefaultServer() {
+ return $this->default_git_server ;
+ }
+
+ function getBlurb () {
+ return _('<p>This GIT plugin is not completed yet.</p>') ;
+ }
+
+ function getInstructionsForAnon ($project) {
+ $b = _('<p><b>Anonymous GIT Access</b></p><p>This project\'s GIT repository cannot be anonymously checked out yet.</p>');
+ return $b ;
+ }
+
+ function getInstructionsForRW ($project) {
+ $b = _('<p><b>Developer GIT Access via SSH</b></p><p>Only project developers can access the GIT tree via this method. SSH must be installed on your client machine. Substitute <i>developername</i> with the proper values. Enter your site password when prompted.</p>');
+ $b .= '<p><tt>git clone git+ssh://<i>'._('developername').'</i>@' . $project->getSCMBox() . ':'. $this->git_root .'/'. $project->getUnixName().'/ .</tt></p>' ;
+ return $b ;
+ }
+
+ function getSnapshotPara ($project) {
+ return ;
+ }
+
+ function getBrowserLinkBlock ($project) {
+ return ;
+ }
+
+ function getStatsBlock ($project) {
+ return ;
+ }
+
+ function createOrUpdateRepo ($params) {
+ $project = $this->checkParams ($params) ;
+ if (!$project) {
+ return false ;
+ }
+
+ if (! $project->usesPlugin ($this->name)) {
+ return false;
+ }
+
+ $repo = $this->git_root . '/' . $project->getUnixName() ;
+ $unix_group = 'scm_' . $project->getUnixName() ;
+
+ system ("mkdir -p $repo") ;
+ if (!is_dir ("$repo/.git")) {
+ system ("git init $repo") ;
+ }
+
+ system ("chgrp -R $unix_group $repo") ;
+ if ($project->enableAnonSCM()) {
+ system ("chmod -R g+wXs,o+rX-w $repo") ;
+ } else {
+ system ("chmod -R g+wXs,o-rwx $repo") ;
+ }
+ }
+
+ function generateSnapshots ($params) {
+ global $sys_scm_tarballs_path ;
+
+ $project = $this->checkParams ($params) ;
+ if (!$project) {
+ return false ;
+ }
+
+ $group_name = $project->getUnixName() ;
+
+ $tarball = $sys_scm_tarballs_path.'/'.$group_name.'-scmroot.tar.gz';
+
+ if (! $project->usesPlugin ($this->name)) {
+ return false;
+ }
+
+ if (! $project->enableAnonSCM()) {
+ unlink ($tarball) ;
+ return false;
+ }
+
+ $toprepo = $this->git_root ;
+ $repo = $toprepo . '/' . $project->getUnixName() ;
+
+ if (!is_dir ($repo)) {
+ unlink ($tarball) ;
+ return false ;
+ }
+
+ $tmp = trim (`mktemp -d`) ;
+ if ($tmp == '') {
+ return false ;
+ }
+ system ("tar czCf $toprepo $tmp/tarball.tar.gz " . $project->getUnixName()) ;
+ chmod ("$tmp/tarball.tar.gz", 0644) ;
+ copy ("$tmp/tarball.tar.gz", $tarball) ;
+ unlink ("$tmp/tarball.tar.gz") ;
+ system ("rm -rf $tmp") ;
+ }
+ }
+
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
+?>
--- /dev/null
+<?php
+/** FusionForge Git plugin
+ *
+ * Copyright 2009, Roland Mas
+ *
+ * This file is part of FusionForge.
+ *
+ * FusionForge is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published
+ * by the Free Software Foundation; either version 2 of the License,
+ * or (at your option) any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FusionForge; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+
+global $gfplugins;
+require_once $gfplugins.'scmgit/common/GitPlugin.class.php' ;
+
+$GitPluginObject = new GitPlugin ;
+
+register_plugin ($GitPluginObject) ;
+
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
+?>
--- /dev/null
+<?php
+
+$default_git_server = $GLOBALS['sys_scm_host'];
+$git_root = '/var/lib/gforge/chroot/scmrepos/git';
+
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
+?>
--- /dev/null
+<?php
+/** FusionForge Mercurial (Hg) plugin
+ *
+ * Copyright 2009, Roland Mas
+ *
+ * This file is part of FusionForge.
+ *
+ * FusionForge is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published
+ * by the Free Software Foundation; either version 2 of the License,
+ * or (at your option) any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FusionForge; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+
+class HgPlugin extends SCMPlugin {
+ function HgPlugin () {
+ global $gfconfig;
+ $this->SCMPlugin () ;
+ $this->name = 'scmhg';
+ $this->text = 'Mercurial';
+ $this->hooks[] = 'scm_generate_snapshots' ;
+
+ require_once $gfconfig.'plugins/scmhg/config.php' ;
+
+ $this->default_hg_server = $default_hg_server ;
+ $this->hg_root = $hg_root;
+
+ $this->register () ;
+ }
+
+ function getDefaultServer() {
+ return $this->default_hg_server ;
+ }
+
+ function getBlurb () {
+ return _('<p>This Mercurial plugin is not completed yet.</p>') ;
+ }
+
+ function getInstructionsForAnon ($project) {
+ $b = _('<p><b>Anonymous Mercurial Access</b></p><p>This project\'s Mercurial repository cannot be anonymously checked out yet.</p>');
+ return $b ;
+ }
+
+ function getInstructionsForRW ($project) {
+ $b = _('<p><b>Developer Mercurial Access via SSH</b></p><p>Only project developers can access the Mercurial tree via this method. SSH must be installed on your client machine. Substitute <i>developername</i> with the proper values. Enter your site password when prompted.</p>');
+ $b .= '<p><tt>hg clone hg+ssh://<i>'._('developername').'</i>@' . $project->getSCMBox() . ':'. $this->hg_root .'/'. $project->getUnixName().'/ .</tt></p>' ;
+ return $b ;
+ }
+
+ function getSnapshotPara ($project) {
+ return ;
+ }
+
+ function getBrowserLinkBlock ($project) {
+ return ;
+ }
+
+ function getStatsBlock ($project) {
+ return ;
+ }
+
+ function createOrUpdateRepo ($params) {
+ $project = $this->checkParams ($params) ;
+ if (!$project) {
+ return false ;
+ }
+
+ if (! $project->usesPlugin ($this->name)) {
+ return false;
+ }
+
+ $repo = $this->hg_root . '/' . $project->getUnixName() ;
+ $unix_group = 'scm_' . $project->getUnixName() ;
+
+ system ("mkdir -p $repo") ;
+ if (!is_dir ("$repo/.hg")) {
+ system ("hg init $repo") ;
+ }
+
+ system ("chgrp -R $unix_group $repo") ;
+ if ($project->enableAnonSCM()) {
+ system ("chmod -R g+wXs,o+rX-w $repo") ;
+ } else {
+ system ("chmod -R g+wXs,o-rwx $repo") ;
+ }
+ }
+
+ function generateSnapshots ($params) {
+ global $sys_scm_tarballs_path ;
+
+ $project = $this->checkParams ($params) ;
+ if (!$project) {
+ return false ;
+ }
+
+ $group_name = $project->getUnixName() ;
+
+ $tarball = $sys_scm_tarballs_path.'/'.$group_name.'-scmroot.tar.gz';
+
+ if (! $project->usesPlugin ($this->name)) {
+ return false;
+ }
+
+ if (! $project->enableAnonSCM()) {
+ unlink ($tarball) ;
+ return false;
+ }
+
+ $toprepo = $this->hg_root ;
+ $repo = $toprepo . '/' . $project->getUnixName() ;
+
+ if (!is_dir ($repo)) {
+ unlink ($tarball) ;
+ return false ;
+ }
+
+ $tmp = trim (`mktemp -d`) ;
+ if ($tmp == '') {
+ return false ;
+ }
+ system ("tar czCf $toprepo $tmp/tarball.tar.gz " . $project->getUnixName()) ;
+ chmod ("$tmp/tarball.tar.gz", 0644) ;
+ copy ("$tmp/tarball.tar.gz", $tarball) ;
+ unlink ("$tmp/tarball.tar.gz") ;
+ system ("rm -rf $tmp") ;
+ }
+ }
+
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
+?>
--- /dev/null
+<?php
+/** FusionForge Mercurial (Hg) plugin
+ *
+ * Copyright 2009, Roland Mas
+ *
+ * This file is part of FusionForge.
+ *
+ * FusionForge is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published
+ * by the Free Software Foundation; either version 2 of the License,
+ * or (at your option) any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FusionForge; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+
+global $gfplugins;
+require_once $gfplugins.'scmhg/common/HgPlugin.class.php' ;
+
+$HgPluginObject = new HgPlugin ;
+
+register_plugin ($HgPluginObject) ;
+
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
+?>
--- /dev/null
+<?php
+
+$default_hg_server = $GLOBALS['sys_scm_host'];
+$hg_root = '/var/lib/gforge/chroot/scmrepos/hg';
+
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
+?>