[csw-devel] SF.net SVN: gar:[7795] csw/mgar/gar/v2

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Wed Dec 30 17:58:09 CET 2009


Revision: 7795
          http://gar.svn.sourceforge.net/gar/?rev=7795&view=rev
Author:   wahwah
Date:     2009-12-30 16:58:09 +0000 (Wed, 30 Dec 2009)

Log Message:
-----------
mGAR v2-checkpkg: Adding SPKG_TMPDIR configuration option, making checkpkg use the CHECKPKG_TMPDIR env variable to set the tmp dir.

Modified Paths:
--------------
    csw/mgar/gar/v2/bin/mkpackage
    csw/mgar/gar/v2/gar.mk
    csw/mgar/gar/v2/gar.pkg.mk
    csw/mgar/gar/v2-checkpkg/bin/checkpkg
    csw/mgar/gar/v2-checkpkg/bin/checkpkg.d/checkpkg.py

Modified: csw/mgar/gar/v2/bin/mkpackage
===================================================================
--- csw/mgar/gar/v2/bin/mkpackage	2009-12-30 16:29:56 UTC (rev 7794)
+++ csw/mgar/gar/v2/bin/mkpackage	2009-12-30 16:58:09 UTC (rev 7795)
@@ -908,7 +908,7 @@
         my $compress =
           $config{usebzip}
           ? 'bzip2 -9 -f %s'
-          : 'gzip -9 -f %s';
+          : 'pigz --fast -f %s';
 
         vexec( sprintf( $compress, $tmppkg ), "Failed to compress $tmppkg" );
         $tmppkg .= $config{usebzip} ? ".bz2" : ".gz";

Modified: csw/mgar/gar/v2/gar.mk
===================================================================
--- csw/mgar/gar/v2/gar.mk	2009-12-30 16:29:56 UTC (rev 7794)
+++ csw/mgar/gar/v2/gar.mk	2009-12-30 16:58:09 UTC (rev 7795)
@@ -850,7 +850,7 @@
 
 # Update inter-package depends
 makedepend:
-	@for gspec in `gfind $(CURDIR) -type f -name '*.gspec' | ggrep files`; do \
+	$(_DBG)for gspec in `gfind $(CURDIR) -type f -name '*.gspec' | ggrep files`; do \
 		pkgname=`basename $$gspec .gspec` ; \
 		pkgfiles=`dirname $$gspec` ; \
 		pkgdir=`dirname $$pkgfiles` ; \

Modified: csw/mgar/gar/v2/gar.pkg.mk
===================================================================
--- csw/mgar/gar/v2/gar.pkg.mk	2009-12-30 16:29:56 UTC (rev 7794)
+++ csw/mgar/gar/v2/gar.pkg.mk	2009-12-30 16:58:09 UTC (rev 7795)
@@ -154,6 +154,7 @@
 SPKG_PKGROOT   ?= $(PKGROOT)
 SPKG_PKGBASE   ?= $(PKGROOT)
 SPKG_WORKDIR   ?= $(CURDIR)/$(WORKDIR)
+SPKG_TMPDIR    ?= /tmp
 
 SPKG_DEPEND_DB  = $(GARDIR)/csw/depend.db
 
@@ -709,8 +710,10 @@
 # The dynamic pkginfo is only generated for dynamic gspec-files
 package-%: $(WORKDIR)/%.gspec $(WORKDIR)/%.prototype-$(GARCH) $(WORKDIR)/%.depend $(if $(findstring %.gspec,$(DISTFILES)),,$(WORKDIR)/%.pkginfo)
 	@echo " ==> Processing $*.gspec"
-	$(_DBG)( $(call _PKG_ENV,$*) mkpackage --spec $(WORKDIR)/$*.gspec \
+	$(_DBG)( $(call _PKG_ENV,$*) mkpackage \
+						 --spec $(WORKDIR)/$*.gspec \
 						 --spooldir $(SPKG_SPOOLDIR) \
+						 --tmpdir   $(SPKG_TMPDIR)  \
 						 --destdir  $(SPKG_EXPORT) \
 						 --workdir  $(SPKG_WORKDIR) \
 						 --pkgbase  $(SPKG_PKGBASE) \
@@ -726,7 +729,7 @@
 # pkgcheck - check if the package is compliant
 #
 pkgcheck: $(foreach SPEC,$(_PKG_SPECS),package-$(SPEC))
-	$(_DBG)( LC_ALL=C $(GARBIN)/checkpkg $(foreach SPEC,$(_PKG_SPECS),$(SPKG_EXPORT)/`$(call _PKG_ENV,$(SPEC)) mkpackage -qs $(WORKDIR)/$(SPEC).gspec -D pkgfile`.gz ) || exit 2;)
+	$(_DBG)( LC_ALL=C $(GARBIN)/checkpkg $(foreach SPEC,$(_PKG_SPECS),$(SPKG_EXPORT)/`$(call _PKG_ENV,$(SPEC)) mkpackage --tmpdir $(SPKG_TMPDIR) -qs $(WORKDIR)/$(SPEC).gspec -D pkgfile`.gz ) || exit 2;)
 	@$(MAKECOOKIE)
 
 pkgcheck-p:

Modified: csw/mgar/gar/v2-checkpkg/bin/checkpkg
===================================================================
--- csw/mgar/gar/v2-checkpkg/bin/checkpkg	2009-12-30 16:29:56 UTC (rev 7794)
+++ csw/mgar/gar/v2-checkpkg/bin/checkpkg	2009-12-30 16:58:09 UTC (rev 7795)
@@ -25,6 +25,11 @@
 PATH=$PATH:/usr/sbin
 
 LOCAL_ARCH=`uname -p`
+if [[ -z "${CHECKPKG_TMPDIR}" ]]; then
+  readonly CHECKPKG_TMPDIR="/var/tmp"
+else
+  readonly CHECKPKG_TMPDIR
+fi
 
 # always print out a warning message. (to stderr)
 # exit script, if quit_on_warn set
@@ -76,7 +81,7 @@
 	f=$1
 	file $f |sed 's/^.*://' |grep gzip >/dev/null
 	if [ $? -eq 0 ] ; then
-		TMPARCHIVE=/tmp/`basename $f`
+		TMPARCHIVE=$CHECKPKG_TMPDIR/`basename $f`
 		if [[ -f $TMPARCHIVE ]] ; then
 			print ERROR: $TMPARCHIVE already exists
 			
@@ -104,13 +109,13 @@
 fi
 
 # a unique filename for the list of package deps and libs we see in a 'set'
-SETINF=/tmp/checkpkg.$$.`date +%Y%m%d%H%M%S`
+SETINF=$CHECKPKG_TMPDIR/checkpkg.$$.`date +%Y%m%d%H%M%S`
 SETLIBS=$SETINF.libs
 SETDEPS=$SETINF.deps
 pkgnames=""
 tmparchives=""
 
-EXTRACTDIR=/tmp/dissect.$$
+EXTRACTDIR=$CHECKPKG_TMPDIR/dissect.$$
 
 if [ -d $EXTRACTDIR ] ; then
 	print ERROR: $EXTRACTDIR already exists

Modified: csw/mgar/gar/v2-checkpkg/bin/checkpkg.d/checkpkg.py
===================================================================
--- csw/mgar/gar/v2-checkpkg/bin/checkpkg.d/checkpkg.py	2009-12-30 16:29:56 UTC (rev 7794)
+++ csw/mgar/gar/v2-checkpkg/bin/checkpkg.d/checkpkg.py	2009-12-30 16:58:09 UTC (rev 7795)
@@ -402,6 +402,8 @@
       # Adding the default runtime path search option.
       binary_data[RUNPATH].append("/usr/lib/$ISALIST")
       binary_data[RUNPATH].append("/usr/lib")
+      binary_data[RUNPATH].append("/lib/$ISALIST")
+      binary_data[RUNPATH].append("/lib")
     elif fields[1] == "SONAME":
       binary_data[SONAME] = fields[2]
   return binary_data


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