From owner-freebsd-qa@FreeBSD.ORG Mon Mar 8 18:19:19 2010 Return-Path: Delivered-To: freebsd-qa@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30BE0106564A for ; Mon, 8 Mar 2010 18:19:19 +0000 (UTC) (envelope-from chukharev@mail.ru) Received: from mx27.mail.ru (mx27.mail.ru [94.100.176.41]) by mx1.freebsd.org (Postfix) with ESMTP id DDD778FC16 for ; Mon, 8 Mar 2010 18:19:18 +0000 (UTC) Received: from [91.155.189.108] (port=63200 helo=vova-vaio) by mx27.mail.ru with asmtp id 1NohXw-000EFX-00 for freebsd-qa@freebsd.org; Mon, 08 Mar 2010 21:19:16 +0300 Content-Type: text/plain; charset=koi8-r; format=flowed; delsp=yes To: "freebsd-qa@freebsd.org" Date: Mon, 08 Mar 2010 20:19:15 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: chukharev@mail.ru Message-ID: User-Agent: Opera Mail/10.10 (FreeBSD) X-Spam: Not detected X-Mras: Ok Subject: About ports QA by 'port test' X-BeenThere: freebsd-qa@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD Quality Assurance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 18:19:19 -0000 Recently I've been trying to run some additional tests during updating the ports I have installed on my computer. That means I select a number of oldest installed ports (using dates of directories in /var/db/pkg/), and for each of them run 'port test' (ports-mgmt/porttools) and then 'portupgrade -f'. (JFYI, the former uses portlint, builds in a different place, installs into a different place, packages, then de-installs and checks for left files. No jail, no chroot.) From what I have seen till now, about 25% of the ports do not pass the test, either for fatal errors from portlint or due to errors exhibited because of PREFIX and PKG_DBDIR variables. And this is done only for the ports I have successfully installed on my system for some reason not connected to the QA purposes. I do not want to trouble the port maintainers with direct e-mails. This list seems to be the right one for posting the results like what I have. So I will post the results in here. About my system: $ uname -a FreeBSD vova-vaio 8.0-STABLE FreeBSD 8.0-STABLE #1: Fri Jan 29 23:31:27 EET 2010 root@vova-vaio:/usr/obj/usr/src/sys/VOVA i386 $ ls -d /var/db/pkg/* | wc -l 1048 The script: $ cat ~/bin/upMports.sh #!/usr/bin/env sh # # Update M oldest ports LOGDIR="/home/chu/tmp/port_test_logs" PU_PARS='--batch -f' #BATCH=yes is also to be defined in /etc/make.conf if [ $# = 0 ]; then M=10 elif [ $# = 1 ]; then M=$1 else printf "Test and update few ('M', default 10) oldest ports. Usage: $0 [M]" exit 1 fi umask 022 HEADER=\ "The 'port test' command (ports-mgmt/porttools) tests a port for a number of possible errors by running portlint, building, packaging, installing, and de-installing with a check for left files. This is done with defined PREFIX and PKG_DBDIR variables. 'port test' command is recommended by the Porter's Handbook. Note that the port installs the usual way." run_cmd() { local pkg fn cmd pkg=$1 ; fn=$2 ; cmd=$3 if [ -e $fn ] ; then mv -f $fn ${fn}.prev fi printf "${HEADER}\n\n\$ cd $pkg ; port test\n+++++++++++++++\n\n" >> $fn start=`date` $cmd >> $fn 2>&1 res=$? end=`date` printf "+++++++++++++++\n\n$start - $end\n$pkg result code: $res\n" >> $fn if [ $res = 0 ] ; then mv $fn ${fn}.OK fi } test_update() { local header list header=$1 ; list=$2 printf "\n${header}:\n${list}\n" > /dev/tty for pkg in $2 ; do cd /usr/ports/$pkg mkdir -p $LOGDIR/$pkg fn=$LOGDIR/$pkg/test.log cmd="port test" run_cmd "$pkg" "$fn" "$cmd" fn=$LOGDIR/$pkg/update.log cmd="sudo /usr/local/sbin/portupgrade $PU_PARS $pkg" run_cmd "$pkg" "$fn" "$cmd" done } LIST=`portversion -QOoL=` test_update "Updated ports" "$LIST" LIST=`/bin/ls -t /var/db/pkg | \ /usr/bin/tail -$M | \ /usr/bin/grep -v pkgdb.db | \ /usr/bin/xargs -n 1 /usr/sbin/pkg_info -oq | \ /usr/local/bin/gtac` test_update "Regular schedule ports" "$LIST" $ cat /etc/make.conf KERNCONF?=VOVA CPUTYPE?=native WITH_GTK2?=yes OVERRIDE_LINUX_BASE_PORT=f10 OVERRIDE_LINUX_NONBASE_PORTS=f10 BATCH=yes # added by use.perl 2010-02-20 21:05:22 PERL_VERSION=5.10.1 -- Vladimir Chukharev Tampere University of Technology