[csw-devel] SF.net SVN: gar:[10735] csw/mgar/gar/v2-checkpkg-override-relocation

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Sat Aug 14 20:56:18 CEST 2010


Revision: 10735
          http://gar.svn.sourceforge.net/gar/?rev=10735&view=rev
Author:   wahwah
Date:     2010-08-14 18:56:18 +0000 (Sat, 14 Aug 2010)

Log Message:
-----------
mGAR v2-checkpkg-override-relocation: Merging changes from v2

Modified Paths:
--------------
    csw/mgar/gar/v2-checkpkg-override-relocation/bin/checkpkg_inspect_stats.py
    csw/mgar/gar/v2-checkpkg-override-relocation/gar.mk
    csw/mgar/gar/v2-checkpkg-override-relocation/gar.pkg.mk

Added Paths:
-----------
    csw/mgar/gar/v2-checkpkg-override-relocation/bin/gem2pkg
    csw/mgar/gar/v2-checkpkg-override-relocation/bin/gemdeps.rb
    csw/mgar/gar/v2-checkpkg-override-relocation/categories/rbgems/
    csw/mgar/gar/v2-checkpkg-override-relocation/categories/rbgems/category.mk
    csw/mgar/gar/v2-checkpkg-override-relocation/pkglib/csw/depend.ruby
    csw/mgar/gar/v2-checkpkg-override-relocation/pkglib/csw_rbgems_dyngspec.gspec

Removed Paths:
-------------
    csw/mgar/gar/v2-checkpkg-override-relocation/categories/rbgems/category.mk

Property Changed:
----------------
    csw/mgar/gar/v2-checkpkg-override-relocation/
    csw/mgar/gar/v2-checkpkg-override-relocation/pkglib/csw/depend


Property changes on: csw/mgar/gar/v2-checkpkg-override-relocation
___________________________________________________________________
Modified: svn:mergeinfo
   - /csw/mgar/gar/v2:4936-6678
/csw/mgar/gar/v2-bwalton:9784-10011
/csw/mgar/gar/v2-checkpkg:7722-7855
/csw/mgar/gar/v2-checkpkg-stats:8454-8649
/csw/mgar/gar/v2-collapsed-modulations:6895
/csw/mgar/gar/v2-dirpackage:8125-8180
/csw/mgar/gar/v2-migrateconf:7082-7211
/csw/mgar/gar/v2-skayser:6087-6132
/csw/mgar/gar/v2-sqlite:10434-10449
   + /csw/mgar/gar/v2:4936-6678,10586-10734
/csw/mgar/gar/v2-bwalton:9784-10011
/csw/mgar/gar/v2-checkpkg:7722-7855
/csw/mgar/gar/v2-checkpkg-stats:8454-8649
/csw/mgar/gar/v2-collapsed-modulations:6895
/csw/mgar/gar/v2-dirpackage:8125-8180
/csw/mgar/gar/v2-migrateconf:7082-7211
/csw/mgar/gar/v2-skayser:6087-6132
/csw/mgar/gar/v2-sqlite:10434-10449

Modified: csw/mgar/gar/v2-checkpkg-override-relocation/bin/checkpkg_inspect_stats.py
===================================================================
--- csw/mgar/gar/v2-checkpkg-override-relocation/bin/checkpkg_inspect_stats.py	2010-08-14 18:47:41 UTC (rev 10734)
+++ csw/mgar/gar/v2-checkpkg-override-relocation/bin/checkpkg_inspect_stats.py	2010-08-14 18:56:18 UTC (rev 10735)
@@ -35,7 +35,7 @@
   logging.debug("Collecting statistics about given package files.")
   filenames = []
   md5s = []
-  md5_re = re.compile(r"[0123456789abcdef]{32}")
+  md5_re = re.compile(r"^[0123456789abcdef]{32}$")
   for arg in args:
     if md5_re.match(arg):
       md5s.append(arg)
@@ -48,7 +48,7 @@
   bar.start()
   counter = itertools.count()
   for pkg in srv4_pkgs:
-    pkgstat_objs.append(checkpkg.PackageStats(x, debug=options.debug))
+    pkgstat_objs.append(checkpkg.PackageStats(pkg, debug=options.debug))
     bar.update(counter.next())
   for md5 in md5s:
     pkgstat_objs.append(checkpkg.PackageStats(None, md5sum=md5, debug=options.debug))
@@ -66,7 +66,7 @@
   if options.print_stats:
     print "import datetime"
     print "pkgstat_objs = ",
-    pprint.pprint(pkgstat_objs)
+    pprint.pprint(pkgstats)
   else:
     code.interact(local=locals())
 

Copied: csw/mgar/gar/v2-checkpkg-override-relocation/bin/gem2pkg (from rev 10734, csw/mgar/gar/v2/bin/gem2pkg)
===================================================================
--- csw/mgar/gar/v2-checkpkg-override-relocation/bin/gem2pkg	                        (rev 0)
+++ csw/mgar/gar/v2-checkpkg-override-relocation/bin/gem2pkg	2010-08-14 18:56:18 UTC (rev 10735)
@@ -0,0 +1,40 @@
+#!/opt/csw/bin/ruby -w
+
+require 'rubygems'
+require 'rubygems/format'
+
+unless File.exists?(ARGV[0])
+  $stderr.puts "Pass path to a valid .gem file as first argument.  You gave: #{ARGV[0]}"
+  exit 1
+end
+
+begin
+  spec = Gem::Format.from_file_by_path(File.expand_path(ARGV[0])).spec
+
+  blurb = spec.description.gsub("\n", ' ').squeeze.lstrip
+
+  puts <<"EOF"
+GARNAME = #{spec.name}
+GARVERSION = #{spec.version}
+CATEGORIES = rbgems
+
+DESCRIPTION = #{spec.summary}
+
+define BLURB
+#{blurb.gsub(/(.{1,70})( +|$\n?)|(.{1,70})/, "\\1\\3\n")}
+endef
+
+EOF
+
+  spec.dependencies.each do |d|
+    puts "RUNTIME_DEP_PKGS += CSWgem-#{d.name}"
+  end
+
+  puts "\nARCHALL = 1" if spec.extensions.size.eql?(0)
+
+  puts "include gar/category.mk"
+rescue Exception => e
+  # we could be more selective, but this catches _everything_
+  $stderr.puts "Rescued exception of type #{e.class}"
+  $stderr.puts "Exception text: #{e.message}"
+end

Copied: csw/mgar/gar/v2-checkpkg-override-relocation/bin/gemdeps.rb (from rev 10734, csw/mgar/gar/v2/bin/gemdeps.rb)
===================================================================
--- csw/mgar/gar/v2-checkpkg-override-relocation/bin/gemdeps.rb	                        (rev 0)
+++ csw/mgar/gar/v2-checkpkg-override-relocation/bin/gemdeps.rb	2010-08-14 18:56:18 UTC (rev 10735)
@@ -0,0 +1,7 @@
+#!/opt/csw/bin/ruby
+require 'yaml'
+require 'rubygems'
+spec = YAML::load(STDIN)
+spec.dependencies.each do |dep|
+  printf "%s\n", dep.name if dep.type == :runtime
+end

Deleted: csw/mgar/gar/v2-checkpkg-override-relocation/categories/rbgems/category.mk
===================================================================
--- csw/mgar/gar/v2/categories/rbgems/category.mk	2010-08-14 18:47:41 UTC (rev 10734)
+++ csw/mgar/gar/v2-checkpkg-override-relocation/categories/rbgems/category.mk	2010-08-14 18:56:18 UTC (rev 10735)
@@ -1,83 +0,0 @@
-# We must have rubygems (and hence ruby) installed to package a gem.
-DEF_BASE_PKGS += CSWrubygems
-
-MASTER_SITES ?= http://rubygems.org/downloads/
-
-# This is common to most modules - override in module makefile if different
-GEMNAME ?= $(GARNAME)
-GEMVERSION ?= $(GARVERSION)
-GEMFILE   ?= $(GEMNAME)-$(GEMVERSION).gem
-DISTFILES += $(GEMFILE)
-
-GEMPKGNAME ?= $(GEMNAME)
-GEMCATALOGNAME ?= $(GEMPKGNAME)
-
-# PACKAGES ?= CSWgem-$(GEMPKGNAME) CSWgem-$(GEMPKGNAME)-doc
-PACKAGES ?= CSWgem-$(GEMPKGNAME)
-CATALOGNAME_CSWgem-$(GEMPKGNAME) ?= gem_$(GEMCATALOGNAME)
-CATALOGNAME_CSWgem-$(GEMPKGNAME)-doc ?= gem_$(GEMCATALOGNAME)_doc
-
-SPKG_DESC_CSWgem-$(GEMPKGNAME)-doc ?= $(or $(SPKG_DESC_CSWgem-$(GEMPKGNAME)),$(SPKG_DESC)) documentation
-
-# RUNTIME_DEP_PKGS_CSWgem-$(GEMPKGNAME) ?= $(shell gem specification $(DOWNLOADDIR)/$(GEMFILE) | $(GARBIN)/gemdeps.rb)
-
-# GEM_DEPENDENCY_PKGS ?= $(RUNTIME_DEP_PKGS_CSWgem-$(GEMPKGNAME))
-
-# Tests are enabled by default, unless overridden at the test level
-ENABLE_TEST ?= 1
-
-# We define upstream file regex so we can be notifed of new upstream software release
-UFILES_REGEX ?= $(GEMNAME)-(\d+(?:\.\d+)*).gem
-USTREAM_MASTER_SITE ?= $(SPKG_SOURCEURL)
-
-_CATEGORY_PKGINFO = echo "RUBY_GEM_NAME=$(GEMNAME)";
-
-# _MERGE_EXCLUDE_CATEGORY = .*/perllocal\.pod .*/\.packlist
-_CATEGORY_GSPEC_INCLUDE ?= csw_rbgems_dyngspec.gspec
-
-# Ruby module dependencies can not be properly tracked right now
-_CATEGORY_CHECKPKG_OVERRIDES = surplus-dependency
-
-# gem specification actionmailer-2.3.8.gem
-# -> YAML for
-# - dependency generation
-# - link to rubyforge
-
-LICENSE ?= MIT-LICENSE
-
-GEMDIR ?= $(shell ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
-
-CONFIGURE_SCRIPTS ?= check-gem-deps
-BUILD_SCRIPTS ?= 
-TEST_SCRIPTS ?= 
-INSTALL_SCRIPTS ?= rbgem
-
-# Allow splitting of documentation automatically
-PKGFILES_CSWgem-$(GEMPKGNAME)-doc ?= $(GEMDIR)/doc/.*
-
-gem-extract-%:
-	@echo " ==> Decompressing $(DOWNLOADDIR)/$*"
-	gem unpack $(DOWNLOADDIR)/$* --target $(WORKDIR)
-	@$(MAKECOOKIE)
-
-extract-archive-%.gem: gem-extract-%.gem
-	@$(MAKECOOKIE)
-
-include gar/gar.mk
-
-# During the configure phase we check that all dependend modules are available
-configure-check-gem-deps: GEM_DEPS?=$(addprefix CSWgem-,$(shell gem specification $(DOWNLOADDIR)/$(GEMFILE) | $(GARBIN)/gemdeps.rb))
-configure-check-gem-deps:
-	@echo "=== Checking dependencies of GEM $(GEMFILE) ==="
-	@$(GARBIN)/check_for_deps $(GEM_DEPS)
-	@$(MAKECOOKIE)
-
-install-rbgem:
-	gem install --ignore-dependencies --local --no-test --install-dir $(DESTDIR)$(GEMDIR) $(DOWNLOADDIR)/$(GEMFILE)
-	@$(MAKECOOKIE)
-
-# Check for a CPAN module version update
-update-check:
-	@# TBD!
-	@echo " ==> Update Check: $(GARNAME) $(GARVERSION)"
-	@echo " ==> AUTO UPDATE CHECK FOR $(GARNAME) IS DISABLED"

Copied: csw/mgar/gar/v2-checkpkg-override-relocation/categories/rbgems/category.mk (from rev 10734, csw/mgar/gar/v2/categories/rbgems/category.mk)
===================================================================
--- csw/mgar/gar/v2-checkpkg-override-relocation/categories/rbgems/category.mk	                        (rev 0)
+++ csw/mgar/gar/v2-checkpkg-override-relocation/categories/rbgems/category.mk	2010-08-14 18:56:18 UTC (rev 10735)
@@ -0,0 +1,83 @@
+# We must have rubygems (and hence ruby) installed to package a gem.
+DEF_BASE_PKGS += CSWrubygems
+
+MASTER_SITES ?= http://rubygems.org/downloads/
+
+# This is common to most modules - override in module makefile if different
+GEMNAME ?= $(GARNAME)
+GEMVERSION ?= $(GARVERSION)
+GEMFILE   ?= $(GEMNAME)-$(GEMVERSION).gem
+DISTFILES += $(GEMFILE)
+
+GEMPKGNAME ?= $(GEMNAME)
+GEMCATALOGNAME ?= $(GEMPKGNAME)
+
+# PACKAGES ?= CSWgem-$(GEMPKGNAME) CSWgem-$(GEMPKGNAME)-doc
+PACKAGES ?= CSWgem-$(GEMPKGNAME)
+CATALOGNAME_CSWgem-$(GEMPKGNAME) ?= gem_$(GEMCATALOGNAME)
+CATALOGNAME_CSWgem-$(GEMPKGNAME)-doc ?= gem_$(GEMCATALOGNAME)_doc
+
+SPKG_DESC_CSWgem-$(GEMPKGNAME)-doc ?= $(or $(SPKG_DESC_CSWgem-$(GEMPKGNAME)),$(SPKG_DESC)) documentation
+
+# RUNTIME_DEP_PKGS_CSWgem-$(GEMPKGNAME) ?= $(shell gem specification $(DOWNLOADDIR)/$(GEMFILE) | $(GARBIN)/gemdeps.rb)
+
+# GEM_DEPENDENCY_PKGS ?= $(RUNTIME_DEP_PKGS_CSWgem-$(GEMPKGNAME))
+
+# Tests are enabled by default, unless overridden at the test level
+ENABLE_TEST ?= 1
+
+# We define upstream file regex so we can be notifed of new upstream software release
+UFILES_REGEX ?= $(GEMNAME)-(\d+(?:\.\d+)*).gem
+USTREAM_MASTER_SITE ?= $(SPKG_SOURCEURL)
+
+_CATEGORY_PKGINFO = echo "RUBY_GEM_NAME=$(GEMNAME)";
+
+# _MERGE_EXCLUDE_CATEGORY = .*/perllocal\.pod .*/\.packlist
+_CATEGORY_GSPEC_INCLUDE ?= csw_rbgems_dyngspec.gspec
+
+# Ruby module dependencies can not be properly tracked right now
+_CATEGORY_CHECKPKG_OVERRIDES = surplus-dependency
+
+# gem specification actionmailer-2.3.8.gem
+# -> YAML for
+# - dependency generation
+# - link to rubyforge
+
+LICENSE ?= MIT-LICENSE
+
+GEMDIR ?= $(shell ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
+
+CONFIGURE_SCRIPTS ?= check-gem-deps
+BUILD_SCRIPTS ?= 
+TEST_SCRIPTS ?= 
+INSTALL_SCRIPTS ?= rbgem
+
+# Allow splitting of documentation automatically
+PKGFILES_CSWgem-$(GEMPKGNAME)-doc ?= $(GEMDIR)/doc/.*
+
+gem-extract-%:
+	@echo " ==> Decompressing $(DOWNLOADDIR)/$*"
+	gem unpack $(DOWNLOADDIR)/$* --target $(WORKDIR)
+	@$(MAKECOOKIE)
+
+extract-archive-%.gem: gem-extract-%.gem
+	@$(MAKECOOKIE)
+
+include gar/gar.mk
+
+# During the configure phase we check that all dependend modules are available
+configure-check-gem-deps: GEM_DEPS?=$(addprefix CSWgem-,$(shell gem specification $(DOWNLOADDIR)/$(GEMFILE) | $(GARBIN)/gemdeps.rb))
+configure-check-gem-deps:
+	@echo "=== Checking dependencies of GEM $(GEMFILE) ==="
+	@$(GARBIN)/check_for_deps $(GEM_DEPS)
+	@$(MAKECOOKIE)
+
+install-rbgem:
+	gem install --ignore-dependencies --local --no-test --install-dir $(DESTDIR)$(GEMDIR) $(DOWNLOADDIR)/$(GEMFILE)
+	@$(MAKECOOKIE)
+
+# Check for a CPAN module version update
+update-check:
+	@# TBD!
+	@echo " ==> Update Check: $(GARNAME) $(GARVERSION)"
+	@echo " ==> AUTO UPDATE CHECK FOR $(GARNAME) IS DISABLED"

Modified: csw/mgar/gar/v2-checkpkg-override-relocation/gar.mk
===================================================================
--- csw/mgar/gar/v2-checkpkg-override-relocation/gar.mk	2010-08-14 18:47:41 UTC (rev 10734)
+++ csw/mgar/gar/v2-checkpkg-override-relocation/gar.mk	2010-08-14 18:56:18 UTC (rev 10735)
@@ -237,12 +237,18 @@
 #################### DIRECTORY MAKERS ####################
 
 # This is to make dirs as needed by the base rules
-$(sort $(DOWNLOADDIR) $(PARTIALDIR) $(COOKIEDIR) $(WORKSRC) $(addprefix $(WORKROOTDIR)/build-,global $(MODULATIONS)) $(EXTRACTDIR) $(FILEDIR) $(SCRATCHDIR) $(PKGROOT) $(INSTALL_DIRS) $(INSTALLISADIR) $(GARCHIVEDIR) $(GARPKGDIR) $(STAGINGDIR)) $(COOKIEDIR)/%:
+$(sort $(DOWNLOADDIR) $(PARTIALDIR) $(COOKIEDIR) $(WORKSRC) $(addprefix $(WORKROOTDIR)/build-,global $(MODULATIONS)) $(EXTRACTDIR) $(FILEDIR) $(SCRATCHDIR) $(PKGROOT) $(INSTALL_DIRS) $(INSTALLISADIR) $(GARCHIVEDIR) $(GARPKGDIR) $(STAGINGDIR)):
 	@if test -d $@; then : ; else \
 		ginstall -d $@; \
 		echo "ginstall -d $@"; \
 	fi
 
+$(COOKIEDIR)/%:
+	@if test -d $@; then : ; else \
+		ginstall -d $@; \
+		echo "ginstall -d $@"; \
+	fi
+
 # These stubs are wildcarded, so that the port maintainer can
 # define something like "pre-configure" and it won't conflict,
 # while the configure target can call "pre-configure" safely even

Modified: csw/mgar/gar/v2-checkpkg-override-relocation/gar.pkg.mk
===================================================================
--- csw/mgar/gar/v2-checkpkg-override-relocation/gar.pkg.mk	2010-08-14 18:47:41 UTC (rev 10734)
+++ csw/mgar/gar/v2-checkpkg-override-relocation/gar.pkg.mk	2010-08-14 18:56:18 UTC (rev 10735)
@@ -590,8 +590,8 @@
 define licensefile
 $(strip 
   $(or 
-    $(call findlicensefile,$(or $(LICENSE_$(1)),$(LICENSE_FULL_$(1)))) 
-    $(call findlicensefile,$(or $(LICENSE),$(LICENSE_FULL))), 
+    $(call findlicensefile,$(or $(LICENSE_$(1)),$(LICENSE_FULL_$(1)))),
+    $(call findlicensefile,$(or $(LICENSE),$(LICENSE_FULL))),
   ) 
 )
 endef


Property changes on: csw/mgar/gar/v2-checkpkg-override-relocation/pkglib/csw/depend
___________________________________________________________________
Modified: svn:mergeinfo
   - /csw/mgar/gar/v2/pkglib/csw/depend:4936-6678
/csw/mgar/gar/v2-bwalton/pkglib/csw/depend:9784-10011
/csw/mgar/gar/v2-checkpkg/pkglib/csw/depend:7722-7855
/csw/mgar/gar/v2-checkpkg-stats/pkglib/csw/depend:8454-8649
/csw/mgar/gar/v2-collapsed-modulations/pkglib/csw/depend:6895
/csw/mgar/gar/v2-dirpackage/pkglib/csw/depend:8125-8180
/csw/mgar/gar/v2-skayser/pkglib/csw/depend:6087-6132
/csw/mgar/gar/v2-sqlite/pkglib/csw/depend:10434-10449
   + /csw/mgar/gar/v2/pkglib/csw/depend:4936-6678,10586-10734
/csw/mgar/gar/v2-bwalton/pkglib/csw/depend:9784-10011
/csw/mgar/gar/v2-checkpkg/pkglib/csw/depend:7722-7855
/csw/mgar/gar/v2-checkpkg-stats/pkglib/csw/depend:8454-8649
/csw/mgar/gar/v2-collapsed-modulations/pkglib/csw/depend:6895
/csw/mgar/gar/v2-dirpackage/pkglib/csw/depend:8125-8180
/csw/mgar/gar/v2-skayser/pkglib/csw/depend:6087-6132
/csw/mgar/gar/v2-sqlite/pkglib/csw/depend:10434-10449

Copied: csw/mgar/gar/v2-checkpkg-override-relocation/pkglib/csw/depend.ruby (from rev 10734, csw/mgar/gar/v2/pkglib/csw/depend.ruby)
===================================================================
--- csw/mgar/gar/v2-checkpkg-override-relocation/pkglib/csw/depend.ruby	                        (rev 0)
+++ csw/mgar/gar/v2-checkpkg-override-relocation/pkglib/csw/depend.ruby	2010-08-14 18:56:18 UTC (rev 10735)
@@ -0,0 +1,2 @@
+P CSWruby ruby - An object-oriented language for quick and easy programming
+P CSWrubygems rubygems - Ruby package manager

Copied: csw/mgar/gar/v2-checkpkg-override-relocation/pkglib/csw_rbgems_dyngspec.gspec (from rev 10734, csw/mgar/gar/v2/pkglib/csw_rbgems_dyngspec.gspec)
===================================================================
--- csw/mgar/gar/v2-checkpkg-override-relocation/pkglib/csw_rbgems_dyngspec.gspec	                        (rev 0)
+++ csw/mgar/gar/v2-checkpkg-override-relocation/pkglib/csw_rbgems_dyngspec.gspec	2010-08-14 18:56:18 UTC (rev 10735)
@@ -0,0 +1,5 @@
+%include        url file://%{PKGLIB}/csw_vars.gspec
+%pkginfo        url file://%{PKGLIB}/csw/pkginfo
+%prototype      exec cswproto -s %{TIMESTAMP} -r %{DESTDIR} %{DESTDIR}
+%depend:merge   url file://%{PKGLIB}/csw/depend.ruby
+%depend         exec gawk '$1 ~ /f/{print $3}' %{prototype} | depmaker --root %{DESTDIR} --nodep %{pkgname} %{DEPMAKER_EXTRA_ARGS}


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