[Fusionforge-commits] FusionForge branch 6.0 updated. 0f37dc682a5f83bc6dc953a7032d048846060364

Sylvain Beucler beuc-inria at fusionforge.org
Tue Apr 7 20:46:14 CEST 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, 6.0 has been updated
       via  0f37dc682a5f83bc6dc953a7032d048846060364 (commit)
       via  44da193c4b8f738abcd7993831aba46f9e6199c7 (commit)
      from  5cc04f1f6724afcd3a7f7026143eee0465844a8a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 0f37dc682a5f83bc6dc953a7032d048846060364
Author: Sylvain Beucler <sylvain.beucler at inria.fr>
Date:   Tue Apr 7 20:44:12 2015 +0200

    scm: xinetd and rsync anonymous access

diff --git a/src/GNUmakefile b/src/GNUmakefile
index 621ab24..82b301d 100644
--- a/src/GNUmakefile
+++ b/src/GNUmakefile
@@ -116,6 +116,8 @@ install-shell: install-base-dirs
 
 install-scm: install-base-dirs
 	$(CP_R) cronjobs/scm $(DESTDIR)$(pkgdatadir)/cronjobs/
+	$(INSTALL) -d -m 00755 $(DESTDIR)$(sysconfdir)/xinetd.d/
+	$(CP_R) etc/xinetd.d/fusionforge-scm $(DESTDIR)$(sysconfdir)/xinetd.d/
 	if [ ! -e $(DESTDIR)$(sysconfdir)/cron.d/fusionforge-scm ]; then \
 		sed 's, at bindir@,$(bindir),' etc/cron.d/fusionforge-scm \
 			> $(DESTDIR)$(sysconfdir)/cron.d/fusionforge-scm; \
diff --git a/src/debian/control.in b/src/debian/control.in
index fefd192..ea74a18 100644
--- a/src/debian/control.in
+++ b/src/debian/control.in
@@ -116,7 +116,7 @@ Description: collaborative development tool - shell accounts (using PostgreSQL)
 
 Package: fusionforge-scm
 Architecture: all
-Depends: fusionforge-common (=${source:Version}), fusionforge-shell (=${source:Version}), php5-cli, ${misc:Depends}
+Depends: fusionforge-common (=${source:Version}), fusionforge-shell (=${source:Version}), xinetd, rsync, php5-cli, ${misc:Depends}
 Description: collaborative development tool - shell accounts (using PostgreSQL)
  FusionForge provides many tools to aid collaboration in a
  development project, such as bug-tracking, task management,
diff --git a/src/etc/xinetd.d/fusionforge-scm b/src/etc/xinetd.d/fusionforge-scm
new file mode 100644
index 0000000..ba353c3
--- /dev/null
+++ b/src/etc/xinetd.d/fusionforge-scm
@@ -0,0 +1,9 @@
+service rsync
+{
+        disable         = no
+        socket_type     = stream
+        wait            = no
+        user            = nobody
+        server          = /usr/bin/rsync
+        server_args     = --daemon
+}
diff --git a/src/plugins/scmgit/bin/install.sh b/src/plugins/scmgit/bin/install.sh
index 766ef55..5194c35 100755
--- a/src/plugins/scmgit/bin/install.sh
+++ b/src/plugins/scmgit/bin/install.sh
@@ -11,6 +11,41 @@ gitwebdir=$(ls -d /var/www/git /var/www/git/static /var/www/gitweb-caching /usr/
 
 case "$1" in
     configure)
+	scmgit_repos_path=$(forge_get_config repos_path scmgit)
+
+	echo "Modifying (x)inetd for Subversion server"
+	if [ -d /etc/xinetd.d/ ]; then
+	    if [ ! -e /etc/xinetd.d/fusionforge-plugin-scmgit ]; then
+		cat > /etc/xinetd.d/fusionforge-plugin-scmgit <<-EOF
+		service git
+		{
+		    port            = 9418
+		    socket_type     = stream
+		    wait            = no
+		    user            = nobody
+		    server          = /usr/bin/git
+		    server_args     = daemon --inetd --export-all --base-path=$scmgit_repos_path
+		}
+		EOF
+	    fi
+	    service xinetd restart
+	fi
+
+	# rsync access
+	if ! grep -q '^use chroot' /etc/rsyncd.conf 2>/dev/null; then
+	    touch /etc/rsyncd.conf
+	    echo 'use chroot=no' | sed -i -e '1ecat' /etc/rsyncd.conf
+	fi
+	sed -i -e 's/^use chroot.*/use chroot=no/' /etc/rsyncd.conf
+	if ! grep -q '\[git\]' /etc/rsyncd.conf; then
+	    cat <<-EOF >> /etc/rsyncd.conf
+		[git]
+		comment=Git source repositories
+		path=$scmgit_repos_path
+		EOF
+	fi
+
+	# Gitweb
 	if [ -z "$gitwebcgi" -o -z "$gitwebdir" ]; then echo "Cannot find gitweb"; exit 1; fi
 	mkdir -p -m 755 $plugindir/cgi-bin/
 	ln -nfs $gitwebcgi                 $plugindir/cgi-bin/
@@ -19,7 +54,9 @@ case "$1" in
 	ln -nfs $gitwebdir/gitweb.css      $plugindir/www/
 	ln -nfs $gitwebdir/gitweb.js       $plugindir/www/
 	;;
+
     remove)
+	rm -f /etc/xinetd.d/fusionforge-plugin-scmgit
 	rm -rf $plugindir/cgi-bin/
 	find $plugindir/www/ -type l -print0 | xargs -r0 rm
 	;;
diff --git a/src/plugins/scmgit/etc/scmgit.ini b/src/plugins/scmgit/etc/scmgit.ini
index a13967a..62376c7 100644
--- a/src/plugins/scmgit/etc/scmgit.ini
+++ b/src/plugins/scmgit/etc/scmgit.ini
@@ -10,10 +10,6 @@ plugin_status = valid
 default_server = "$core/scm_host"
 repos_path = "/srv/git"
 
-; this value might be used to create an alias in your httpd conf for clone
-; used if use_dav is set to yes
-scm_root = "scmrepos/git"
-
 ; this value is used when dav is set to yes. To reload httpd configuration
 httpd_reload_cmd = "service $core/apache_service reload"
 
diff --git a/src/plugins/scmsvn/bin/install.sh b/src/plugins/scmsvn/bin/install.sh
index f96e2c1..39710f5 100755
--- a/src/plugins/scmsvn/bin/install.sh
+++ b/src/plugins/scmsvn/bin/install.sh
@@ -7,16 +7,45 @@ if [ $(id -u) != 0 ] ; then
     echo "You must be root to run this"
 fi
 
-scmsvn_serve_root=$(forge_get_config serve_root scmsvn)
-
 case "$1" in
     configure)
-        echo "Modifying inetd for Subversion server"
-	if [ -x /usr/sbin/update-inetd ]; then
+	scmsvn_repos_path=$(forge_get_config repos_path scmsvn)
+	scmsvn_serve_root=$(forge_get_config serve_root scmsvn)
+
+	echo "Modifying (x)inetd for Subversion server"
+	if [ -d /etc/xinetd.d/ ]; then
+	    if [ ! -e /etc/xinetd.d/fusionforge-plugin-scmsvn ]; then
+		cat > /etc/xinetd.d/fusionforge-plugin-scmsvn <<-EOF
+		service svn
+		{
+			port			= 3690
+			socket_type		= stream
+			protocol		= tcp
+			wait			= no
+			user			= nobody
+			server			= /usr/bin/svnserve
+			server_args		= -i -r $scmsvn_serve_root
+		}
+		EOF
+	    fi
+	    service xinetd restart
+	elif [ -x /usr/sbin/update-inetd ]; then
 	    update-inetd --remove svn || true
             update-inetd --add  "svn stream tcp nowait.400 scm-gforge /usr/bin/svnserve svnserve -i -r $scmsvn_serve_root"
-	else
-	    echo "TODO: xinetd support"
+	fi
+
+	# rsync access
+	if ! grep -q '^use chroot' /etc/rsyncd.conf 2>/dev/null; then
+	    touch /etc/rsyncd.conf
+	    echo 'use chroot=no' | sed -i -e '1ecat' /etc/rsyncd.conf
+	fi
+	sed -i -e 's/^use chroot.*/use chroot=no/' /etc/rsyncd.conf
+	if ! grep -q '\[svn\]' /etc/rsyncd.conf; then
+	    cat <<-EOF >> /etc/rsyncd.conf
+		[svn]
+		comment=SVN source repositories
+		path=$scmsvn_repos_path
+		EOF
 	fi
 
 	# Enable required modules
@@ -39,6 +68,7 @@ case "$1" in
 	;;
 
     remove)
+	rm -f /etc/xinetd.d/fusionforge-plugin-scmsvn
 	if [ -x /usr/sbin/update-inetd ]; then
 	    update-inetd --remove svn || true
 	fi
diff --git a/src/plugins/scmsvn/etc/scmsvn.ini b/src/plugins/scmsvn/etc/scmsvn.ini
index ec82128..0810ca8 100644
--- a/src/plugins/scmsvn/etc/scmsvn.ini
+++ b/src/plugins/scmsvn/etc/scmsvn.ini
@@ -14,7 +14,7 @@ anonsvn_login = anonsvn
 anonsvn_password = anonsvn
 default_server = "$core/scm_host"
 repos_path = "/srv/svn"
-serve_path = "$core/repos_path"
+serve_root = "$scmsvn/repos_path"
 apache_auth_realm = "$core/apache_auth_realm"
 ; ^ note: in FF < 6.0 it was "Document repository"
 

commit 44da193c4b8f738abcd7993831aba46f9e6199c7
Author: Sylvain Beucler <sylvain.beucler at inria.fr>
Date:   Tue Apr 7 19:50:41 2015 +0200

    install: web: remove old template-based uninstall

diff --git a/src/post-install.d/web/web.sh b/src/post-install.d/web/web.sh
index cda511f..70e3ea4 100755
--- a/src/post-install.d/web/web.sh
+++ b/src/post-install.d/web/web.sh
@@ -160,11 +160,6 @@ case "$1" in
 	;;
 
     purge)
-	# note: can't be called from Debian's postrm - rely on ucfq(1)
-	cd $source_path/templates/
-	for i in httpd.conf $(ls httpd.conf.d/*); do
-	    rm -f $config_path/$i
-	done
 	;;
 
     *)

-----------------------------------------------------------------------

Summary of changes:
 src/GNUmakefile                   |    2 ++
 src/debian/control.in             |    2 +-
 src/etc/xinetd.d/fusionforge-scm  |    9 ++++++++
 src/plugins/scmgit/bin/install.sh |   37 ++++++++++++++++++++++++++++++++
 src/plugins/scmgit/etc/scmgit.ini |    4 ----
 src/plugins/scmsvn/bin/install.sh |   42 +++++++++++++++++++++++++++++++------
 src/plugins/scmsvn/etc/scmsvn.ini |    2 +-
 src/post-install.d/web/web.sh     |    5 -----
 8 files changed, 86 insertions(+), 17 deletions(-)
 create mode 100644 src/etc/xinetd.d/fusionforge-scm


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list