[csw-devel] SF.net SVN: opencsw:[413] catalog_signatures

bdwalton at users.sourceforge.net bdwalton at users.sourceforge.net
Thu Jul 21 05:03:28 CEST 2011


Revision: 413
          http://opencsw.svn.sourceforge.net/opencsw/?rev=413&view=rev
Author:   bdwalton
Date:     2011-07-21 03:03:28 +0000 (Thu, 21 Jul 2011)

Log Message:
-----------
move catalog_gpg to bin directory

Signed-off-by: Ben Walton <bwalton at opencsw.org>

Added Paths:
-----------
    catalog_signatures/bin/
    catalog_signatures/bin/catalog_gpg

Removed Paths:
-------------
    catalog_signatures/catalog_gpg

Copied: catalog_signatures/bin/catalog_gpg (from rev 412, catalog_signatures/catalog_gpg)
===================================================================
--- catalog_signatures/bin/catalog_gpg	                        (rev 0)
+++ catalog_signatures/bin/catalog_gpg	2011-07-21 03:03:28 UTC (rev 413)
@@ -0,0 +1,62 @@
+#!/usr/bin/env ruby
+
+require 'webrick'
+require 'optparse'
+require 'ostruct'
+
+VALID_TREES = %w(unstable current)
+VALID_ARCHES = %w(i386 sparc)
+VALID_RELEASES = %w(5.9 5.10 5.11)
+
+begin
+  retried = nil
+  require 'csw/gpg_daemon'
+rescue LoadError => e
+  if retried.nil?
+    $:.unshift(File.join(File.dirname($0), 'lib'))
+    retried = 1
+    retry
+  else
+    reraise
+  end
+end
+
+opts = OpenStruct.new
+opts.port = 9981
+opts.mirror_path = File.dirname($0)
+
+OptionParser.new do |o|
+  o.banner = "Usage: #{File.basename($0)} [options]"
+  o.separator ''
+
+  o.on('-b', '--mirror-path PATH', "Use PATH as the root of the mirror\n" +
+       "\t\t\t\t     tree where catalogs can be found.") do |p|
+    if File.directory?(p)
+      opts.mirror_path = p
+    else
+      $stderr.puts "Invalid mirror path: #{p}"
+      exit 1
+    end
+  end
+  o.on('-h', '--help', 'Display help output.') { puts o; exit 0 }
+  o.on('-p', '--port PORT', "Use a port other than #{opts.port}") { |p| opts.port = p.to_i }
+end.parse!
+
+server = WEBrick::HTTPServer.new({ :Port => opts.port })
+
+# create a valid mount for each type of signature we'll return and for
+# each valid catalog path that we'll sign
+%w(clearsign detachsign).each do |signtype|
+  VALID_TREES.each do |tree|
+    VALID_ARCHES.each do |arch|
+      VALID_RELEASES.each do |release|
+        path = "#{tree}/#{arch}/#{release}"
+        server.mount "/#{signtype}/#{path}", GPGDaemon, opts.mirror_path, path
+      end
+    end
+  end
+end
+
+trap('INT') { server.shutdown }
+
+server.start

Deleted: catalog_signatures/catalog_gpg
===================================================================
--- catalog_signatures/catalog_gpg	2011-07-21 03:03:00 UTC (rev 412)
+++ catalog_signatures/catalog_gpg	2011-07-21 03:03:28 UTC (rev 413)
@@ -1,62 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'webrick'
-require 'optparse'
-require 'ostruct'
-
-VALID_TREES = %w(unstable current)
-VALID_ARCHES = %w(i386 sparc)
-VALID_RELEASES = %w(5.9 5.10 5.11)
-
-begin
-  retried = nil
-  require 'csw/gpg_daemon'
-rescue LoadError => e
-  if retried.nil?
-    $:.unshift(File.join(File.dirname($0), 'lib'))
-    retried = 1
-    retry
-  else
-    reraise
-  end
-end
-
-opts = OpenStruct.new
-opts.port = 9981
-opts.mirror_path = File.dirname($0)
-
-OptionParser.new do |o|
-  o.banner = "Usage: #{File.basename($0)} [options]"
-  o.separator ''
-
-  o.on('-b', '--mirror-path PATH', "Use PATH as the root of the mirror\n" +
-       "\t\t\t\t     tree where catalogs can be found.") do |p|
-    if File.directory?(p)
-      opts.mirror_path = p
-    else
-      $stderr.puts "Invalid mirror path: #{p}"
-      exit 1
-    end
-  end
-  o.on('-h', '--help', 'Display help output.') { puts o; exit 0 }
-  o.on('-p', '--port PORT', "Use a port other than #{opts.port}") { |p| opts.port = p.to_i }
-end.parse!
-
-server = WEBrick::HTTPServer.new({ :Port => opts.port })
-
-# create a valid mount for each type of signature we'll return and for
-# each valid catalog path that we'll sign
-%w(clearsign detachsign).each do |signtype|
-  VALID_TREES.each do |tree|
-    VALID_ARCHES.each do |arch|
-      VALID_RELEASES.each do |release|
-        path = "#{tree}/#{arch}/#{release}"
-        server.mount "/#{signtype}/#{path}", GPGDaemon, opts.mirror_path, path
-      end
-    end
-  end
-end
-
-trap('INT') { server.shutdown }
-
-server.start


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list