[DRE-commits] r4740 - in trunk/mongrel-cluster/debian: . patches source

Gunnar Wolf gwolf at alioth.debian.org
Thu Feb 18 20:06:42 UTC 2010


Author: gwolf
Date: 2010-02-18 20:06:33 +0000 (Thu, 18 Feb 2010)
New Revision: 4740

Added:
   trunk/mongrel-cluster/debian/patches/default_user_and_group
   trunk/mongrel-cluster/debian/patches/series
   trunk/mongrel-cluster/debian/source/
   trunk/mongrel-cluster/debian/source/format
Removed:
   trunk/mongrel-cluster/debian/patches/01_default_user_and_group.patch
Modified:
   trunk/mongrel-cluster/debian/changelog
   trunk/mongrel-cluster/debian/control
   trunk/mongrel-cluster/debian/mongrel-cluster.init
   trunk/mongrel-cluster/debian/rules
Log:
Documented expected configuration file names

Modified: trunk/mongrel-cluster/debian/changelog
===================================================================
--- trunk/mongrel-cluster/debian/changelog	2010-02-18 03:12:29 UTC (rev 4739)
+++ trunk/mongrel-cluster/debian/changelog	2010-02-18 20:06:33 UTC (rev 4740)
@@ -1,3 +1,13 @@
+mongrel-cluster (1.0.5-4) unstable; urgency=low
+
+  * Switched source format to 3.0 (quilt)
+  * Standards-version 3.8.3→3.8.4 (no changes needed)
+  * Added DEP3 headers to existing patch
+  * Document configuration files must be named *.conf or *.yml (Closes:
+    #519991)
+
+ -- Gunnar Wolf <gwolf at debian.org>  Thu, 18 Feb 2010 13:37:07 -0600
+
 mongrel-cluster (1.0.5-3) unstable; urgency=low
 
   * Added myself to the Uploaders list, as part of the pkg-ruby-extras

Modified: trunk/mongrel-cluster/debian/control
===================================================================
--- trunk/mongrel-cluster/debian/control	2010-02-18 03:12:29 UTC (rev 4739)
+++ trunk/mongrel-cluster/debian/control	2010-02-18 20:06:33 UTC (rev 4740)
@@ -4,7 +4,7 @@
 Maintainer: Jeremy Lainé <jeremy.laine at m4x.org>
 Uploaders: Debian Ruby Extras Maintainers <pkg-ruby-extras-maintainers at lists.alioth.debian.org>, Gunnar Wolf <gwolf at debian.org>
 Build-Depends: cdbs, debhelper (>= 5)
-Standards-Version: 3.8.3
+Standards-Version: 3.8.4
 Homepage: http://mongrel.rubyforge.org/
 Vcs-Browser: http://svn.debian.org/viewsvn/pkg-ruby-extras/trunk/mongrel-cluster/
 Vcs-Svn: svn://svn.debian.org/svn/pkg-ruby-extras/trunk/mongrel-cluster/

Modified: trunk/mongrel-cluster/debian/mongrel-cluster.init
===================================================================
--- trunk/mongrel-cluster/debian/mongrel-cluster.init	2010-02-18 03:12:29 UTC (rev 4739)
+++ trunk/mongrel-cluster/debian/mongrel-cluster.init	2010-02-18 20:06:33 UTC (rev 4740)
@@ -46,6 +46,15 @@
 if [ -n "$USER" ]; then DAEMON_OPTS="$DAEMON_OPTS --user $USER"; fi
 if [ -n "$GROUP" ]; then DAEMON_OPTS="$DAEMON_OPTS --group $GROUP"; fi
 
+warn_unhandled_conf() {
+	if IGNORED_CONF=$(ls $CONF_DIR | grep -v '\.conf$\|\.yml$')
+	then
+	    echo '** Warning: Ignoring configuration files with extensions'
+	    echo '   other than .conf and .yml:'
+	    echo "   $IGNORED_CONF"
+	fi
+}
+
 case "$1" in
   start)
 	mkdir -p $PID_DIR
@@ -54,6 +63,7 @@
 	start-stop-daemon --start --quiet \
 		--exec $DAEMON -- start $DAEMON_OPTS
 	echo "$NAME."
+	warn_unhandled_conf
 	;;
   stop)
 	echo -n "Stopping $DESC: "
@@ -66,18 +76,20 @@
 	start-stop-daemon --start --quiet \
 		--exec $DAEMON -- restart $DAEMON_OPTS
 	echo "$NAME."
+	warn_unhandled_conf
 	;;
   status)
 	echo -n "Status for $DESC: "
 	start-stop-daemon --start --quiet \
 		--exec $DAEMON -- status $DAEMON_OPTS
 	;;
-  # actually jus calling restart
+  # actually just calls restart
   force-reload)
 	echo -n "Restarting $DESC: "
 	start-stop-daemon --start --quiet --chuid $USER:$GROUP \
 		--exec $DAEMON -- restart $DAEMON_OPTS
 	echo "$NAME."
+	warn_unhandled_conf
 	;;
   *)
 	N=/etc/init.d/$NAME

Deleted: trunk/mongrel-cluster/debian/patches/01_default_user_and_group.patch
===================================================================
--- trunk/mongrel-cluster/debian/patches/01_default_user_and_group.patch	2010-02-18 03:12:29 UTC (rev 4739)
+++ trunk/mongrel-cluster/debian/patches/01_default_user_and_group.patch	2010-02-18 20:06:33 UTC (rev 4740)
@@ -1,71 +0,0 @@
-diff --git a/bin/mongrel_cluster_ctl b/bin/mongrel_cluster_ctl
---- a/bin/mongrel_cluster_ctl
-+++ b/bin/mongrel_cluster_ctl
-@@ -3,12 +3,14 @@
- 
- require 'optparse'
- 
--def run(command, verbose, clean=false)
-+def run(command, verbose, clean=false, user=nil, group=nil)
-   Dir.chdir @options[:conf_path] do
-     confs =  Dir.glob("*.yml")
-     confs += Dir.glob("*.conf")
-     confs.each do |conf|
-       cmd = "mongrel_rails cluster::#{command} -C #{conf}"
-+      cmd += " --user #{user}" if user
-+      cmd += " --group #{group}" if group
-       cmd += " -v" if verbose
-       cmd += " --clean" if clean
-       puts cmd if verbose || command == "status"
-@@ -30,6 +32,8 @@ OptionParser.new do |opts|
-   opts.on("-c", "--conf_path PATH", "Path to mongrel_cluster configuration files") { |value| @options[:conf_path] = value }
-   opts.on('-v', '--verbose', "Print all called commands and output.") { |value| @options[:verbose] = value }
-   opts.on('--clean', "Remove pid files if needed beforehand.") { |value| @options[:clean] = value }
-+  opts.on('--user USER', "Default user to run process as, if not specified in configuration files") { |value| @options[:user] = value }
-+  opts.on('--group GROUP', "Default group to run process as, if not specified in configuration files") { |value| @options[:group] = value }
- 
-   if ARGV.empty?
-     puts opts
-@@ -52,14 +56,14 @@ end
- case @cmd[0]
- when "start": 
-   puts "Starting all mongrel_clusters..."
--  run "start", @options[:verbose], @options[:clean]
-+  run "start", @options[:verbose], @options[:clean], @options[:user], @options[:group]
- when "stop":
-   puts "Stopping all mongrel_clusters..."
-   run "stop", @options[:verbose], @options[:clean]
- when "restart":
-   puts "Restarting all mongrel_clusters..."
-   run "stop", @options[:verbose], @options[:clean]
--  run "start", @options[:verbose], @options[:clean]
-+  run "start", @options[:verbose], @options[:clean], @options[:user], @options[:group]
- when "status":
-   puts "Checking all mongrel_clusters..."
-   run "status", @options[:verbose]
-diff --git a/lib/mongrel_cluster/init.rb b/lib/mongrel_cluster/init.rb
---- a/lib/mongrel_cluster/init.rb
-+++ b/lib/mongrel_cluster/init.rb
-@@ -58,7 +58,9 @@ module Cluster
-       
-     def start
-       read_options
--      
-+      @options['user'] ||= @user
-+      @options['group'] ||= @group
-+
-       argv = [ "mongrel_rails" ]
-       argv << "start"
-       argv << "-d"
-@@ -230,6 +232,8 @@ module Cluster
-       options [ 
-         ['-C', '--config PATH', "Path to cluster configuration file", :@config_file, "config/mongrel_cluster.yml"],
-         ['-v', '--verbose', "Print all called commands and output.", :@verbose, false],
-+        ['-u', '--user USER',  "Default user to run process as, if not specified in configuration files", :@user, nil],
-+        ['-g', '--group GROUP',  "Default group to run process as, if not specified in configuration files", :@group, nil],
-         ['', '--clean', "Remove pid_file if needed before starting", :@clean, false],
-         ['', '--only PORT', "Port number of cluster member", :@only, nil]
-       ]
--- 
-1.6.2
-

Added: trunk/mongrel-cluster/debian/patches/default_user_and_group
===================================================================
--- trunk/mongrel-cluster/debian/patches/default_user_and_group	                        (rev 0)
+++ trunk/mongrel-cluster/debian/patches/default_user_and_group	2010-02-18 20:06:33 UTC (rev 4740)
@@ -0,0 +1,79 @@
+Description: Allows Mongrel instances to be run under different users, 
+ specified in configuration file
+Origin: vendor
+Bug-Debian: http://bugs.debian.org/500424
+Author: Gunnar Wolf <gwolf at debian.org>
+Forwarded: http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=10;bug=500424
+Last-Update: 2010-02-18
+
+diff --git a/bin/mongrel_cluster_ctl b/bin/mongrel_cluster_ctl
+--- a/bin/mongrel_cluster_ctl
++++ b/bin/mongrel_cluster_ctl
+@@ -3,12 +3,14 @@
+ 
+ require 'optparse'
+ 
+-def run(command, verbose, clean=false)
++def run(command, verbose, clean=false, user=nil, group=nil)
+   Dir.chdir @options[:conf_path] do
+     confs =  Dir.glob("*.yml")
+     confs += Dir.glob("*.conf")
+     confs.each do |conf|
+       cmd = "mongrel_rails cluster::#{command} -C #{conf}"
++      cmd += " --user #{user}" if user
++      cmd += " --group #{group}" if group
+       cmd += " -v" if verbose
+       cmd += " --clean" if clean
+       puts cmd if verbose || command == "status"
+@@ -30,6 +32,8 @@ OptionParser.new do |opts|
+   opts.on("-c", "--conf_path PATH", "Path to mongrel_cluster configuration files") { |value| @options[:conf_path] = value }
+   opts.on('-v', '--verbose', "Print all called commands and output.") { |value| @options[:verbose] = value }
+   opts.on('--clean', "Remove pid files if needed beforehand.") { |value| @options[:clean] = value }
++  opts.on('--user USER', "Default user to run process as, if not specified in configuration files") { |value| @options[:user] = value }
++  opts.on('--group GROUP', "Default group to run process as, if not specified in configuration files") { |value| @options[:group] = value }
+ 
+   if ARGV.empty?
+     puts opts
+@@ -52,14 +56,14 @@ end
+ case @cmd[0]
+ when "start": 
+   puts "Starting all mongrel_clusters..."
+-  run "start", @options[:verbose], @options[:clean]
++  run "start", @options[:verbose], @options[:clean], @options[:user], @options[:group]
+ when "stop":
+   puts "Stopping all mongrel_clusters..."
+   run "stop", @options[:verbose], @options[:clean]
+ when "restart":
+   puts "Restarting all mongrel_clusters..."
+   run "stop", @options[:verbose], @options[:clean]
+-  run "start", @options[:verbose], @options[:clean]
++  run "start", @options[:verbose], @options[:clean], @options[:user], @options[:group]
+ when "status":
+   puts "Checking all mongrel_clusters..."
+   run "status", @options[:verbose]
+diff --git a/lib/mongrel_cluster/init.rb b/lib/mongrel_cluster/init.rb
+--- a/lib/mongrel_cluster/init.rb
++++ b/lib/mongrel_cluster/init.rb
+@@ -58,7 +58,9 @@ module Cluster
+       
+     def start
+       read_options
+-      
++      @options['user'] ||= @user
++      @options['group'] ||= @group
++
+       argv = [ "mongrel_rails" ]
+       argv << "start"
+       argv << "-d"
+@@ -230,6 +232,8 @@ module Cluster
+       options [ 
+         ['-C', '--config PATH', "Path to cluster configuration file", :@config_file, "config/mongrel_cluster.yml"],
+         ['-v', '--verbose', "Print all called commands and output.", :@verbose, false],
++        ['-u', '--user USER',  "Default user to run process as, if not specified in configuration files", :@user, nil],
++        ['-g', '--group GROUP',  "Default group to run process as, if not specified in configuration files", :@group, nil],
+         ['', '--clean', "Remove pid_file if needed before starting", :@clean, false],
+         ['', '--only PORT', "Port number of cluster member", :@only, nil]
+       ]
+-- 
+1.6.2
+

Added: trunk/mongrel-cluster/debian/patches/series
===================================================================
--- trunk/mongrel-cluster/debian/patches/series	                        (rev 0)
+++ trunk/mongrel-cluster/debian/patches/series	2010-02-18 20:06:33 UTC (rev 4740)
@@ -0,0 +1 @@
+default_user_and_group

Modified: trunk/mongrel-cluster/debian/rules
===================================================================
--- trunk/mongrel-cluster/debian/rules	2010-02-18 03:12:29 UTC (rev 4739)
+++ trunk/mongrel-cluster/debian/rules	2010-02-18 20:06:33 UTC (rev 4740)
@@ -1,4 +1,3 @@
 #!/usr/bin/make -f
- 
+
 include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/rules/simple-patchsys.mk

Added: trunk/mongrel-cluster/debian/source/format
===================================================================
--- trunk/mongrel-cluster/debian/source/format	                        (rev 0)
+++ trunk/mongrel-cluster/debian/source/format	2010-02-18 20:06:33 UTC (rev 4740)
@@ -0,0 +1 @@
+3.0 (quilt)




More information about the Pkg-ruby-extras-commits mailing list