pld-builder.new: client/rebuild-th-kernel.sh - fixes to make it work for me...

glen glen at pld-linux.org
Sun Apr 1 15:55:56 CEST 2012


Author: glen                         Date: Sun Apr  1 13:55:56 2012 GMT
Module: pld-builder.new               Tag: HEAD
---- Log message:
- fixes to make it work for me and likely others. longterm part works

---- Files affected:
pld-builder.new/client:
   rebuild-th-kernel.sh (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: pld-builder.new/client/rebuild-th-kernel.sh
diff -u pld-builder.new/client/rebuild-th-kernel.sh:1.1 pld-builder.new/client/rebuild-th-kernel.sh:1.2
--- pld-builder.new/client/rebuild-th-kernel.sh:1.1	Fri Mar 30 17:09:25 2012
+++ pld-builder.new/client/rebuild-th-kernel.sh	Sun Apr  1 15:55:51 2012
@@ -1,20 +1,77 @@
 #!/bin/sh
 
+dir=$(cd "$(dirname "$0")"; pwd)
+rpmdir=$(rpm -E %_topdir)
+dist=th
+
+pkgs_head="
+	dahdi-linux
+   	ipset
+   	iscsitarget
+   	lirc
+   	madwifi-ng
+   	open-vm-tools
+   	r8168
+   	VirtualBox
+   	xorg-driver-video-nvidia
+   	xorg-driver-video-nvidia-legacy3
+   	xtables-addons
+   	xorg-driver-video-fglrx
+"
+
+pkgs_longterm="
+	$pkgs_head
+	openvswitch
+"
+pkgs_longterm_only="
+	e1000e
+	igb
+"
+
+# autotag from rpm-build-macros
+# displays latest used tag for a specfile
+autotag() {
+	local out s
+	for s in "$@"; do
+		# strip branches
+		s=${s%:*}
+		# ensure package ends with .spec
+		s=${s%.spec}.spec
+		out=$(cvs status -v $s | awk "!/Sticky/&&/auto-$dist-/{if (!a++) print \$1}")
+		echo "$s:$out"
+	done
+}
+
+get_last_tags() {
+	local pkg spec
+	for pkg in $*; do
+		echo >&2 "$pkg... "
+		if [ ! -e  $pkg/$pkg.spec ]; then
+			$rpmdir/builder -g $pkg -ns -r HEAD
+		fi
+		spec=$(autotag $pkg/$pkg.spec)
+		echo >&2 "... $spec"
+		echo $spec
+	done
+}
+
 case "$1" in
-	longterm)
-		cd ~/rpm/packages
-		for a in dahdi-linux ipset iscsitarget lirc madwifi-ng open-vm-tools r8168 VirtualBox xorg-driver-video-nvidia xorg-driver-video-nvidia-legacy3 xtables-addons xorg-driver-video-fglrx openvswitch; do
-			~/bin/send-last-th-tag.sh -d th --kernel longterm --without userspace $a/$a.spec
-		done
-		for a in e1000e igb; do
-			./relup.sh -ui $a/$a.spec && make-request.sh -d th --kernel longterm $a.spec
-		done
-		;;
 	head)
-		cd ~/rpm/packages
-		for a in dahdi-linux ipset iscsitarget lirc madwifi-ng open-vm-tools r8168 VirtualBox xorg-driver-video-nvidia xorg-driver-video-nvidia-legacy3 xtables-addons xorg-driver-video-fglrx; do
-			./relup.sh -ui $a/$a.spec && make-request.sh -d th $a.spec
+		cd $rpmdir
+		for pkg in $pkgs_head; do
+			$rpmdir/builder -g $pkg -ns
+			echo ./relup.sh -ui $a/$a.spec && make-request.sh -d th $a.spec
 		done
+		;;
+	longterm)
+		cd $rpmdir
+		echo "Fetching package tags..."
+		specs=$(get_last_tags $pkgs_longterm)
+		set -x
+		$dir/make-request.sh -r -d $dist --kernel longterm --without userspace $specs
+#		for pkg in $pkgs_longterm_only; do
+#			echo ./relup.sh -ui $a/$a.spec && make-request.sh -d th --kernel longterm $a.spec
+#		done
 		;;
 	*)
 		echo "UNKNOWN CRAP $1 !"
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/pld-builder.new/client/rebuild-th-kernel.sh?r1=1.1&r2=1.2



More information about the pld-cvs-commit mailing list