[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debian-devel:03581] Re: binary-alpha



鍋谷です。

debian-alpha メーリングリストをしばらく読んでました。

# 実は、昨日研究室の Alpha マシンに hamm をインストールしよう
# として失敗していたりします。

yochi@debian.or.jp writes:

> やなぎはらです。
> 
> 本家でも、alpha, sparc などは本当に小数の方が
> バイナリを作成しておられるようです。
> 
> というか、i386版がincomingに入ったら、
> 自動的にbuildし直すようなしかけがあるような気がする。
> 
> でないと、一度にあんなに大量のパッケージをアップロードできないような...

自動化スクリプトがあります。たぶん、以下に添付するメールの
ことだと思うのですが、本当に使えるのかわかりません。

大阪大学理学研究科物理学専攻 博士後期課程1年 大坪研究室(06-850-5346)
         鍋谷 栄展      nabetani@xxxxxxxxxxxxxxxxxxxxxxxxxxx
--- Begin Message ---
Another status report.

I attach the script that I used to compile things
automatically, using fakeroot. I mirrored the whole
hamm/hamm/source tree, and compiled it; it took 765m31.458s
(about 13 hours), but of course it didn't compile everything
fully, since some packages failed early in the compilation.
However, I think it is fast enough for us. :)

I won't send the whole list of failed packages, since many
of them failed due to problems in my build environment, or
since they need the sources of another package unpacked to
build properly. (If you want the list, ask.)

I hope to re-install the system in a couple of days, once we
get the rest of the disks installed, and will re-try the
failed packages again then.

Total package counts:

    427 OK
    486 BAD
     19 SKIP
    932 total

(SKIP is a list of packages that cause the script to fail,
since they use su, or just go catatonic, or something.)
#!/bin/sh

# problem: not all packages work with dpkg-buildpackage -B and if we
# use -b and then delete *_all.deb, the .changes files don't work

dsc2srcdir() {
	basename "$1" .dsc | sed 's/-[a-zA-Z0-9.+]*$//;s/_/-/'
}

test -d BUILT || mkdir BUILT
test -d MESSAGES || mkdir MESSAGES
touch OK BAD

build_from_dsc() {
	for dsc in "$@"
	do
		dir=`dsc2srcdir $dsc`
		rm -rf TEMP
		mkdir TEMP
		if (cd TEMP && dpkg-source -x "$dsc")
		then
			true
		else
			echo dpkg-source failed 1>&2
			return 1
		fi
		if (cd "TEMP/$dir" && dpkg-buildpackage -rfakeroot -b -us -uc)
		then
			true
		else
			echo dpkg-buildpackage failed 1>&2
			return 1
		fi
		rm -rf "TEMP/$dir"
		rm -f TEMP/*.orig.tar.gz
		mv TEMP/*.deb TEMP/*.changes BUILT
		rmdir TEMP	# note: not rm -rf
	done
	return 0
}


find "$@" -name '*.dsc' |
while read dsc
do
	dsc=`cd \`dirname "$dsc"\`; pwd`/`basename "$dsc"`
	if fgrep "$dsc" SKIP >/dev/null
	then
		echo "skipping -- $dsc"
	elif fgrep "$dsc" BAD >/dev/null
	then
		echo "known bad -- $dsc"
	elif fgrep "$dsc" OK >/dev/null
	then
		echo "known good -- $dsc"
	else
		pkg=`basename "$dsc" | sed 's/_.*/_/'`
		
		echo -n "building -- $dsc..."
		if build_from_dsc "$dsc" >MESSAGES/"$pkg" 2>&1 < /dev/null
		then
			echo OK
			echo "$dsc" >> OK
		else
			echo BAD
			echo "$dsc" >> BAD
		fi
	fi
done

--- End Message ---