[SVN] r2966 - in trunk/tools/dar: . scripts

svn-commits at rpmforge.net svn-commits at rpmforge.net
Tue Mar 8 23:14:28 CET 2005


Author: dag
Date: 2005-03-08 23:14:27 +0100 (Tue, 08 Mar 2005)
New Revision: 2966

Modified:
   trunk/tools/dar/ChangeLog
   trunk/tools/dar/Makefile
   trunk/tools/dar/README
   trunk/tools/dar/dar-build
   trunk/tools/dar/dar-contrib
   trunk/tools/dar/dar-dotty
   trunk/tools/dar/dar-exec
   trunk/tools/dar/dar-kickoff
   trunk/tools/dar/dar-prepare
   trunk/tools/dar/dar-repo
   trunk/tools/dar/dar-shell
   trunk/tools/dar/dar-sync
   trunk/tools/dar/dar-update
   trunk/tools/dar/scripts/pre-brand.sh
   trunk/tools/dar/scripts/pre-disttag.sh
Log:
Small fixes

Modified: trunk/tools/dar/ChangeLog
===================================================================
--- trunk/tools/dar/ChangeLog	2005-03-08 20:13:38 UTC (rev 2965)
+++ trunk/tools/dar/ChangeLog	2005-03-08 22:14:27 UTC (rev 2966)
@@ -34,6 +34,7 @@
 - dar-build: Added preprocessing scripts
 - dar-update: Improved the handling of updates to update tools
 - dar-build: Experimental usage of /dev/shm for building
+- dar-functions: Moved to /usr/share instead of /usr/lib
 
 Version 0.6.0
 - dar.conf: Removed DISTSMAP, added it to dists specific section

Modified: trunk/tools/dar/Makefile
===================================================================
--- trunk/tools/dar/Makefile	2005-03-08 20:13:38 UTC (rev 2965)
+++ trunk/tools/dar/Makefile	2005-03-08 22:14:27 UTC (rev 2966)
@@ -7,7 +7,6 @@
 datadir=/usr/share
 sysconfdir=/etc
 localstatedir=/var
-libdir=/usr/lib
 sbindir=/usr/sbin
 
 DIST_SCRIPTS=dar-build dar-dotty dar-exec dar-kickoff dar-new dar-prepare dar-repo dar-shell dar-sync dar-update
@@ -27,14 +26,13 @@
 	install -m0755 -d $(DESTDIR)$(sysconfdir)/dar/{dists,scripts} \
 		$(DESTDIR)$(sysconfdir)/logrotate.d \
 		$(DESTDIR)$(datadir)/dar/skel \
-		$(DESTDIR)$(libdir)/dar \
 		$(DESTDIR)$(sbindir)
 	install -m0700 -d $(DESTDIR)$(localstatedir)/log/dar
 
 	install -D -m0644 dar.conf $(DESTDIR)$(sysconfdir)/dar/dar.conf
 
 	install -m0755 $(DIST_SCRIPTS) $(DESTDIR)$(sbindir)
-	install -m0755 $(DIST_LIBS) $(DESTDIR)$(libdir)/dar/
+	install -m0755 $(DIST_LIBS) $(DESTDIR)$(datadir)/dar/
 #	install -m0644 dists/*/* $(DESTDIR)$(sysconfdir)/dar/dists/
 	cp -af dists/* $(DESTDIR)$(sysconfdir)/dar/dists/
 	cp -af scripts/* $(DESTDIR)$(sysconfdir)/dar/scripts/

Modified: trunk/tools/dar/README
===================================================================
--- trunk/tools/dar/README	2005-03-08 20:13:38 UTC (rev 2965)
+++ trunk/tools/dar/README	2005-03-08 22:14:27 UTC (rev 2966)
@@ -6,6 +6,7 @@
     dar-prepare		prepare a build-environment (mount necessary dirs)
     dar-build		build package serialized
     dar-update		update, upgrade or install packages
+    dar-shell		work inside your chroot
     dar-exec		execute a command in every build-environment
     dar-sync		sync packages with a remote site
     dar-dotty		create graphs from your build-environment (defunct pdf)
@@ -14,8 +15,8 @@
   Overview of paths
   """""""""""""""""
     /etc/dar/dar.conf		General DAR configuration
-    /etc/dar/config		Location for extra package information
     /etc/dar/dists		Location for extra distribution information
+    /etc/dar/scripts		Pre-process and post-process scripts
 
     /dar/build			Location for building
     /dar/chroot			Location for build-environments
@@ -24,16 +25,15 @@
     /dar/rpms			Location for SPEC files and patches
     /dar/tmp			Location for temporary files and buildroot
 
-    /usr/share/dar		Location for extra files
-    /usr/lib/dar		Location of library
+    /usr/share/dar		Location for extra files and library
 
 
   Tool arguments
   """"""""""""""
     dar-kickoff
     dar-prepare
-    dar-build -a arch -d dist -s sdist -t tag -f <package/spec> ...
-    dar-update <package> ...
-    dar-exec <cmd>
-    dar-sync
+    dar-build -a arch,arch2 -d dist,dist2 -s sdist -n -t tag -f <package/spec> ...
+    dar-update -d dist,dist2 <package> ...
+    dar-exec -d dist,dist2 <cmd>
+    dar-sync -d dist,dist2 -r
     dar-dotty

Modified: trunk/tools/dar/dar-build
===================================================================
--- trunk/tools/dar/dar-build	2005-03-08 20:13:38 UTC (rev 2965)
+++ trunk/tools/dar/dar-build	2005-03-08 22:14:27 UTC (rev 2966)
@@ -2,7 +2,7 @@
 
 ### dar-build  [ -a <archs> ]  [ -d <dists> ]  [ -s <sdists> ]  [ -f ]  [ -t tag ]  <app> ...
 
-source "/usr/lib/dar/dar-functions"
+source "/usr/share/dar/dar-functions"
 
 daropts ":a:d:fns:t:v" $@
 PKGS="$OPTS"
@@ -167,12 +167,10 @@
 				done
 			done
 
-			rm -f "$NEWSPECFILE"
 			cp -af "$SPECFILE" "$NEWSPECFILE"
 			export NEWSPECFILE DISTTAG TAG
 
 			for script in $CONFIGDIR/scripts/pre-*.sh; do
-#				echo "Processing $script."
 				source "$script"
 			done
 
@@ -406,8 +404,14 @@
 		for dist in $SOURCE_DISTS; do
 			RPMFILE="$app-$VERSION-$RELEASE.$TAG.src.rpm"
 
-			### Build source package (forced)
-			cat "$SPECFILE" | sed -e "s#\(Release: *.\+\)#\1.$TAG#" > "$NEWSPECFILE"
+			NEWSPECFILE="$TEMPDIR/$app.spec"
+			cp -af "$SPECFILE" "$NEWSPECFILE"
+			export NEWSPECFILE DISTTAG TAG ARCH="src"
+
+			for script in $CONFIGDIR/scripts/pre-*.sh; do
+				source "$script"
+			done
+
 			echo "Building source package $app using \"$SPECFILE\" for $dist"
 			chroot "$CHROOTDIR/$dist" /usr/bin/rpmbuild -bs \
 				--define "_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" \
@@ -415,9 +419,10 @@
 				--define "_sourcedir $SPECDIR" \
 				--define "$dist 1" \
 				"$NEWSPECFILE"
+
+			cp -au "$NEWSPECFILE" "$PACKAGEDIR/$app/"
 		done
 
-		cp -au "$SPECFILE" "$PACKAGEDIR/$app/"
 	fi
 done
 

Modified: trunk/tools/dar/dar-contrib
===================================================================
--- trunk/tools/dar/dar-contrib	2005-03-08 20:13:38 UTC (rev 2965)
+++ trunk/tools/dar/dar-contrib	2005-03-08 22:14:27 UTC (rev 2966)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-source "/usr/lib/dar/dar-functions"
+source "/usr/share/dar/dar-functions"
 
 upload="";
 

Modified: trunk/tools/dar/dar-dotty
===================================================================
--- trunk/tools/dar/dar-dotty	2005-03-08 20:13:38 UTC (rev 2965)
+++ trunk/tools/dar/dar-dotty	2005-03-08 22:14:27 UTC (rev 2966)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-source "/usr/lib/dar/dar-functions"
+source "/usr/share/dar/dar-functions"
 
 echo "Warning: this may take quite some time to finish." >&2
 for distname in $DEFAULT_DISTS; do

Modified: trunk/tools/dar/dar-exec
===================================================================
--- trunk/tools/dar/dar-exec	2005-03-08 20:13:38 UTC (rev 2965)
+++ trunk/tools/dar/dar-exec	2005-03-08 22:14:27 UTC (rev 2966)
@@ -2,7 +2,7 @@
 
 ### dar-exec  [ -d <dists> ]  <cmd> ...
 
-source "/usr/lib/dar/dar-functions"
+source "/usr/share/dar/dar-functions"
 
 daropts "d:" $@
 CMD="$OPTS"

Modified: trunk/tools/dar/dar-kickoff
===================================================================
--- trunk/tools/dar/dar-kickoff	2005-03-08 20:13:38 UTC (rev 2965)
+++ trunk/tools/dar/dar-kickoff	2005-03-08 22:14:27 UTC (rev 2966)
@@ -5,7 +5,7 @@
 echo "Not finished, see source for some instructions."
 exit 1
 
-source "/usr/lib/dar/dar-functions"
+source "/usr/share/dar/dar-functions"
 
 if [ -d "$ROOT/$DIST" ]; then
 	echo "ERROR: Dir $ROOT/$DIST already exists." >&2

Modified: trunk/tools/dar/dar-prepare
===================================================================
--- trunk/tools/dar/dar-prepare	2005-03-08 20:13:38 UTC (rev 2965)
+++ trunk/tools/dar/dar-prepare	2005-03-08 22:14:27 UTC (rev 2966)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-source "/usr/lib/dar/dar-functions"
+source "/usr/share/dar/dar-functions"
 
 if [ -z "$DEFAULT_DISTS" -o -z "$ROOT" ]; then
 	echo "ERROR: There's something wrong with your configuration !" >&2
@@ -25,6 +25,6 @@
 	mount -o bind /dev/shm $CHROOTDIR/$distname$ROOT/build
 
 ###	Use thise when using X processes inside chroots
-#	mount -o bind /tmp/ $CHROOTDIR/$distname/tmp/
+	mount -o bind /tmp/ $CHROOTDIR/$distname/tmp/
 
 done

Modified: trunk/tools/dar/dar-repo
===================================================================
--- trunk/tools/dar/dar-repo	2005-03-08 20:13:38 UTC (rev 2965)
+++ trunk/tools/dar/dar-repo	2005-03-08 22:14:27 UTC (rev 2966)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-source "/usr/lib/dar/dar-functions"
+source "/usr/share/dar/dar-functions"
 
 daropts ":a:d:s:" $@
 

Modified: trunk/tools/dar/dar-shell
===================================================================
--- trunk/tools/dar/dar-shell	2005-03-08 20:13:38 UTC (rev 2965)
+++ trunk/tools/dar/dar-shell	2005-03-08 22:14:27 UTC (rev 2966)
@@ -2,7 +2,7 @@
 
 ### dar-shell  [ -d <dists> ]
 
-source "/usr/lib/dar/dar-functions"
+source "/usr/share/dar/dar-functions"
 
 daropts "d:" $@
 CMD="$OPTS"

Modified: trunk/tools/dar/dar-sync
===================================================================
--- trunk/tools/dar/dar-sync	2005-03-08 20:13:38 UTC (rev 2965)
+++ trunk/tools/dar/dar-sync	2005-03-08 22:14:27 UTC (rev 2966)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-source "/usr/lib/dar/dar-functions"
+source "/usr/share/dar/dar-functions"
 
 daropts ":a:d:rs:" $@
 

Modified: trunk/tools/dar/dar-update
===================================================================
--- trunk/tools/dar/dar-update	2005-03-08 20:13:38 UTC (rev 2965)
+++ trunk/tools/dar/dar-update	2005-03-08 22:14:27 UTC (rev 2966)
@@ -2,7 +2,7 @@
 
 ### dar-update  [ -a <archs> ]  [ -d <dists> ]  [ -s <sdists> ]  <app> ...
 
-source "/usr/lib/dar/dar-functions"
+source "/usr/share/dar/dar-functions"
 
 daropts ":a:d:rs:" $@
 PKGS="$OPTS"

Modified: trunk/tools/dar/scripts/pre-brand.sh
===================================================================
--- trunk/tools/dar/scripts/pre-brand.sh	2005-03-08 20:13:38 UTC (rev 2965)
+++ trunk/tools/dar/scripts/pre-brand.sh	2005-03-08 22:14:27 UTC (rev 2966)
@@ -7,14 +7,14 @@
 
 case "$AUTHOR" in
 	(dries)
-		PACKAGER="Dries Verachtert <dries at ulyssis.org>"
+		PACKAGER="Dries Verachtert <dries\@ulyssis.org>"
 		;;
 	(bert)
-		PACKAGER="Bert de Bruijn <bert at debruijn.be>";;
-		
-	(dag|thias|*)
-		PACKAGER="Dag Wieers <dag at wieers.com>"
+		PACKAGER="Bert de Bruijn <bert\@debruijn.be>"
 		;;
+	(dag|thias|matthias|*)
+		PACKAGER="Dag Wieers <dag\@wieers.com>"
+		;;
 esac
 
 VENDOR="Dag Apt Repository, http://dag.wieers.com/apt/"

Modified: trunk/tools/dar/scripts/pre-disttag.sh
===================================================================
--- trunk/tools/dar/scripts/pre-disttag.sh	2005-03-08 20:13:38 UTC (rev 2965)
+++ trunk/tools/dar/scripts/pre-disttag.sh	2005-03-08 22:14:27 UTC (rev 2966)
@@ -1,18 +1,16 @@
 #!/bin/bash
 
+#echo "Specfile: $NEWSPECFILE, Disttag: $DISTTAG, Tag: $TAG"
 #set -x
 
-### Processing disttag variable
-DISTTAG="${DISTTAG// *}"
+case "$ARCH" in
+	(src)
+		perl -pi.orig -e 's|^(Release)\s*:\s+(.+)\s*$|$1: $2.'$TAG'\n|' "$NEWSPECFILE"
+		;;
+	(*)
+		perl -pi.orig -e 's|^(Release)\s*:\s+(.+)\s*$|$1: $2.'${DISTTAG// *}'.'$TAG'\n|' "$NEWSPECFILE"
+		;;
+esac
 
-#echo "Specfile: $NEWSPECFILE"
-#echo "Disttag: $DISTTAG"
-#echo "Tag: $TAG"
-
-### Originally in dar-build
-#cat "$SPECFILE" | sed -e "s|\(Release: *.\+\)|\1.${DISTTAG// *}.$TAG|" >"$NEWSPECFILE"
-
-perl -pi.orig -e 's|^(Release)\s*:\s+(.+)\s*$|$1: '$DISTTAG'.'$TAG'\n|' "$NEWSPECFILE"
-
 #diff -u "$NEWSPECFILE".orig "$NEWSPECFILE"
 #set +x




More information about the commits mailing list