From owner-freebsd-ports@FreeBSD.ORG Mon Aug 11 20:32:15 2003 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6089237B401 for ; Mon, 11 Aug 2003 20:32:15 -0700 (PDT) Received: from cultdeadsheep.org (charon.cultdeadsheep.org [80.65.226.72]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6656043F3F for ; Mon, 11 Aug 2003 20:32:13 -0700 (PDT) (envelope-from sheepkiller@cultdeadsheep.org) Received: (qmail 3478 invoked from network); 12 Aug 2003 03:32:10 -0000 Received: from unknown (HELO lucifer.cultdeadsheep.org) (192.168.0.2) by goofy.cultdeadsheep.org with SMTP; 12 Aug 2003 03:32:10 -0000 Date: Tue, 12 Aug 2003 05:31:52 +0200 From: Clement Laforet To: Clement Laforet Message-Id: <20030812053152.224e15fe.sheepkiller@cultdeadsheep.org> In-Reply-To: <20030812001651.5ea59ce8.sheepkiller@cultdeadsheep.org> References: <20030812001651.5ea59ce8.sheepkiller@cultdeadsheep.org> Organization: tH3 cUlt 0f tH3 d3@d sH33p X-Mailer: Sylpheed version 0.9.4 (GTK+ 1.2.10; i386-portbld-freebsd5.1) X-Face: ._cVVRDn#-2((lnfi^P7CoD4htI$4+#G/G)!w|,}H5yK~%(3-C.JlEYbOjJGFwJkt*7N^%z jYeu[;}]}F"3}l5R'l"X0HbvT^D\Q&%deCo)MayY`);TO Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: ports@FreeBSD.org Subject: Re: possible missing entries in CVSROOT-ports/modules X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2003 03:32:15 -0000 I wrote a little script to find missing and orphaned entries in CVSROOT-ports/modules with simplistic error type detection. This is the last full report (I won't spam this list anymore ;)). The script is below :) Kris, maybe you can and some of these simple lines to your index checker. Regards, clem -------- Missing entries in CVSROOT-port/modules: ports/databases/p5-DBIx-SQLEngine ports/devel/libexecinfo ports/devel/libidn ports/devel/mpatrol ports/emulators/linux_base-8 ports/games/lgeneral-data ports/graphics/gqview-devel ports/java/jakarta-struts ports/java/simplicity ports/lang/python22 ports/mail/aileron ports/mail/smtpmail ports/math/fbm ports/net/prtunnel ports/net/uplog ports/news/noffle ports/security/hostsentry ports/security/hydra ports/security/libwhisker ports/security/nikto ports/sysutils/jdiskreport ports/sysutils/linuxfdisk ports/www/axis ports/www/caudium12 ports/www/cybercalendar ports/www/linux-mozillafirebird ports/www/mod_log_sql ports/www/p5-CGI-Untaint ports/www/php5-cgi Orphaned entries in CVSROOT-port/modules: Orphaned entry: p5-DBIx-SQLEngine ports/databaes/p5-DBIx-SQLEngine Orphaned entry: ko-netdic ports/korean/netdic Misfiled Makefile: gcc34 ports/lang/gcc34 Orphaned entry: php5-cgi ports/lang/php5-cgi Misfiled Makefile: chemtool-devel ports/science/chemtool-devel Orphaned entry: krb5-beta ports/security/krb5-beta Misfiled Makefile: djvuplugin ports/www/djvuplugin Orphaned entry: linux-phoenix ports/www/linux-phoenix Orphaned entry: mod_log_mysql ports/www/mod_log_mysql Orphaned entry: mod_webapp-apache2 ports/www/mod_webapp-apache2 Misfiled Makefile: XFree86-4-Server-snap ports/x11-servers/XFree86-4-Server-snap ------------------------- #!/bin/sh # # Quick sanity check for CVSROOT-ports/modules # # Usage: # ./check-module # if you want to generate INDEX within check-module # GEN_INDEX=1 ./check-module # your cvs root #CVS=/home/ncvs CVS=/WORK/CVS # your port dir #BASE=/usr/ BASE=/WORK/FreeBSD #a cvsup'ed ports tree is useful for error detection #CVSUPED_BASE=${BASE} CVSUPED_BASE=/usr #index name #INDEX=INDEX INDEX=INDEX-5 # Theorically you have nothing to change from now PORTSDIR=${BASE}/ports TMP_MODULES=`mktemp -t modules.sorted` TMP_PORTS=`mktemp -t ports.sorted` TMP_DIFF_MISSING=`mktemp -t diff-missing` TMP_DIFF_ORPHAN=`mktemp -t diff-orphan` MODULES_FILE=${CVS}/CVSROOT-ports/modules UPTODATE_INDEX=${PORTSDIR}/${INDEX} # # We generate INDEX file. # [ $GEN_INDEX ] && ( cd ${BASE} cvs -d ${CVS} update . 2> /dev/null cd ${PORTSDIR} make index) # # Get known ports from CVSROOT-ports/modules awk '$2 ~ /ports\/[a-z].*\/[a-zA-Z0-9].*/ {print $2};' \ ${MODULES_FILE} | sort -n > ${TMP_MODULES} # # Get known ports from INDEX awk -F\| '$2 ~ /usr\/ports\/[a-z].*\/.*/ { sub("/usr/","",$2); print $2 };' \ ${UPTODATE_INDEX} | sort -n > ${TMP_PORTS} # missing ports in CVSROOT-ports/modules diff -Nru ${TMP_MODULES} ${TMP_PORTS} | egrep '^\+ports' | sed 's/^+\(.*\)/\1/' > ${TMP_DIFF_MISSING} # ports who appear ONLY in CVSROOT-ports/modules diff -Nru ${TMP_MODULES} ${TMP_PORTS} | egrep '^\-ports' | sed 's/^-\(.*\)/\1/' > ${TMP_DIFF_ORPHAN} # And now the report echo -e "\n" echo "Missing entries in CVSROOT-port/modules:" for ports in $(cat ${TMP_DIFF_MISSING}) do grep ${ports} ${MODULES_FILE} > /dev/null || echo ${ports} done echo -e "\n" echo -e "Orphaned entries in CVSROOT-port/modules:" for ports in $(cat ${TMP_DIFF_ORPHAN}) do grep ${ports} ${UPTODATE_INDEX} > /dev/null RETVAL=$? if [ "$RETVAL" -ne "0" ] then if [ -d ${CVSUPED_BASE}/${ports} ] then echo -n "Misfiled Makefile: " else echo -n "Orphaned entry: " fi grep ${ports} ${MODULES_FILE} | tr "\t" " " fi done # Cleanup #rm -f ${TMP_MODULES} ${TMP_PORTS} ${TMP_DIFF_MISSING} ${TMP_DIFF_ORPHAN}