[Fusionforge-commits] r7976 - in trunk/gforge: debian packaging/dirs packaging/install plugins plugins/scmcpold plugins/scmcpold/common plugins/scmcpold/etc plugins/scmcpold/etc/plugins plugins/scmcpold/etc/plugins/scmcpold

Roland Mas lolando at libremir.placard.fr.eu.org
Thu Aug 27 15:38:25 CEST 2009


Author: lolando
Date: 2009-08-27 15:38:25 +0200 (Thu, 27 Aug 2009)
New Revision: 7976

Added:
   trunk/gforge/debian/gforge-plugin-scmcpold.postinst
   trunk/gforge/debian/gforge-plugin-scmcpold.prerm
   trunk/gforge/packaging/dirs/plugin-scmcpold
   trunk/gforge/packaging/install/plugin-scmcpold
   trunk/gforge/plugins/scmcpold/
   trunk/gforge/plugins/scmcpold/common/
   trunk/gforge/plugins/scmcpold/common/CpoldPlugin.class.php
   trunk/gforge/plugins/scmcpold/common/scmcpold-init.php
   trunk/gforge/plugins/scmcpold/etc/
   trunk/gforge/plugins/scmcpold/etc/plugins/
   trunk/gforge/plugins/scmcpold/etc/plugins/scmcpold/
   trunk/gforge/plugins/scmcpold/etc/plugins/scmcpold/config.php
Modified:
   trunk/gforge/debian/changelog
   trunk/gforge/debian/control
Log:
Added empty skeleton for scmcpold

Modified: trunk/gforge/debian/changelog
===================================================================
--- trunk/gforge/debian/changelog	2009-08-27 13:38:14 UTC (rev 7975)
+++ trunk/gforge/debian/changelog	2009-08-27 13:38:25 UTC (rev 7976)
@@ -33,8 +33,9 @@
   * Stop shipping cvs_dump.pl and cvs_update.pl now that their function is
     fulfilled by the plugin hook.
   * Ditto for svn_dump.pl and svn_update.pl.
+  * Added plugin-scmcpold as a proof of concept for other plugins.
 
- -- Roland Mas <lolando at debian.org>  Sun, 19 Jul 2009 11:38:11 +0200
+ -- Roland Mas <lolando at debian.org>  Mon, 20 Jul 2009 11:15:00 +0200
 
 gforge (4.8-3) unstable; urgency=low
 

Modified: trunk/gforge/debian/control
===================================================================
--- trunk/gforge/debian/control	2009-08-27 13:38:14 UTC (rev 7975)
+++ trunk/gforge/debian/control	2009-08-27 13:38:25 UTC (rev 7976)
@@ -214,6 +214,23 @@
  each FusionForge project to have its own Subversion repository, and gives
  some control over it to the project's administrator.
 
+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}
+Description: collaborative development tool - CPOLD 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 CPOLD subsystem of FusionForge. It allows
+ each FusionForge project to have its own CPOLD repository, and gives
+ some control over it to the project's administrator.
+ .
+ It is mostly intended as a proof of concept.
+Provides: gforge-plugin-scm
+
 Package: gforge-plugin-mediawiki
 Architecture: all
 Depends: gforge-common (>= 4.6.99), gforge-db-postgresql (>= 4.6.99) | gforge-db, gforge-web-apache2 (>= 4.6.99) | gforge-web, mediawiki, ${misc:Depends}

Added: trunk/gforge/debian/gforge-plugin-scmcpold.postinst
===================================================================
--- trunk/gforge/debian/gforge-plugin-scmcpold.postinst	                        (rev 0)
+++ trunk/gforge/debian/gforge-plugin-scmcpold.postinst	2009-08-27 13:38:25 UTC (rev 7976)
@@ -0,0 +1,51 @@
+#! /bin/sh
+# postinst script for gforge-plugin-scmcpold
+#
+# 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 scmcpold "CPOLD"'
+    ;;
+
+    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
+
+

Added: trunk/gforge/debian/gforge-plugin-scmcpold.prerm
===================================================================
--- trunk/gforge/debian/gforge-plugin-scmcpold.prerm	                        (rev 0)
+++ trunk/gforge/debian/gforge-plugin-scmcpold.prerm	2009-08-27 13:38:25 UTC (rev 7976)
@@ -0,0 +1,45 @@
+#! /bin/sh
+# prerm script for gforge-plugin-scmcpold
+#
+# 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 scmcpold
+	else
+		echo "WARNING: database not available to unregister scmcpold 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
+
+

Added: trunk/gforge/packaging/dirs/plugin-scmcpold
===================================================================
--- trunk/gforge/packaging/dirs/plugin-scmcpold	                        (rev 0)
+++ trunk/gforge/packaging/dirs/plugin-scmcpold	2009-08-27 13:38:25 UTC (rev 7976)
@@ -0,0 +1,7 @@
+etc/gforge/httpd.d
+etc/gforge/plugins/scmcpold
+usr/share/gforge/plugins/scmcpold/bin
+usr/share/gforge/plugins/scmcpold/cronjobs
+usr/share/gforge/plugins/scmcpold/common
+var/lib/gforge/chroot/cpoldroot
+var/lib/gforge/dumps

Added: trunk/gforge/packaging/install/plugin-scmcpold
===================================================================
--- trunk/gforge/packaging/install/plugin-scmcpold	                        (rev 0)
+++ trunk/gforge/packaging/install/plugin-scmcpold	2009-08-27 13:38:25 UTC (rev 7976)
@@ -0,0 +1,4 @@
+plugins/scmcpold/bin/*                usr/share/gforge/plugins/scmcpold/bin/
+plugins/scmcpold/common/*             usr/share/gforge/plugins/scmcpold/common/
+plugins/scmcpold/cronjobs/*           usr/share/gforge/plugins/scmcpold/cronjobs/
+plugins/scmcpold/etc/plugins/scmcpold/* etc/gforge/plugins/scmcpold/

Added: trunk/gforge/plugins/scmcpold/common/CpoldPlugin.class.php
===================================================================
--- trunk/gforge/plugins/scmcpold/common/CpoldPlugin.class.php	                        (rev 0)
+++ trunk/gforge/plugins/scmcpold/common/CpoldPlugin.class.php	2009-08-27 13:38:25 UTC (rev 7976)
@@ -0,0 +1,53 @@
+<?php
+/** FusionForge Bazaar 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 CpoldPlugin extends SCMPlugin {
+	function CpoldPlugin () {
+		global $gfconfig;
+		$this->SCMPlugin () ;
+		$this->name = 'scmcpold';
+		$this->text = 'CPOLD';
+		$this->hooks[] = 'scm_page';
+		$this->hooks[] = 'scm_admin_update';
+		$this->hooks[] = 'scm_admin_page';
+ 		$this->hooks[] = 'scm_stats';
+		$this->hooks[] = 'scm_plugin';
+		$this->hooks[] = 'scm_createrepo';
+		
+		require_once $gfconfig.'plugins/scmcpold/config.php' ;
+		
+		$this->default_cpold_server = $default_cpold_server ;
+		$this->enabled_by_default = $enabled_by_default ;
+		$this->cpold_root = $cpold_root;
+		
+		$this->register () ;
+	}
+	
+  }
+
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
+?>

Added: trunk/gforge/plugins/scmcpold/common/scmcpold-init.php
===================================================================
--- trunk/gforge/plugins/scmcpold/common/scmcpold-init.php	                        (rev 0)
+++ trunk/gforge/plugins/scmcpold/common/scmcpold-init.php	2009-08-27 13:38:25 UTC (rev 7976)
@@ -0,0 +1,36 @@
+<?php
+/** FusionForge Bazaar 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.'scmcpold/common/CpoldPlugin.class.php' ;
+
+$CpoldPluginObject = new CpoldPlugin ;
+
+register_plugin ($CpoldPluginObject) ;
+
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
+?>

Added: trunk/gforge/plugins/scmcpold/etc/plugins/scmcpold/config.php
===================================================================
--- trunk/gforge/plugins/scmcpold/etc/plugins/scmcpold/config.php	                        (rev 0)
+++ trunk/gforge/plugins/scmcpold/etc/plugins/scmcpold/config.php	2009-08-27 13:38:25 UTC (rev 7976)
@@ -0,0 +1,12 @@
+<?php
+ 
+$default_cpold_server = $GLOBALS['sys_scm_host'];
+$cpold_root = '/var/lib/gforge/chroot/scmrepos/cpold';
+$enabled_by_default = false;
+
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+ 
+?>




More information about the Fusionforge-commits mailing list