From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Aug 8 10:00:12 2007 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF4CA16A419 for ; Wed, 8 Aug 2007 10:00:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 88E7E13C4A3 for ; Wed, 8 Aug 2007 10:00:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l78A0CMQ096968 for ; Wed, 8 Aug 2007 10:00:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l78A0CXY096967; Wed, 8 Aug 2007 10:00:12 GMT (envelope-from gnats) Resent-Date: Wed, 8 Aug 2007 10:00:12 GMT Resent-Message-Id: <200708081000.l78A0CXY096967@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Alex Deiter Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13BD416A418 for ; Wed, 8 Aug 2007 09:54:28 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id E685313C457 for ; Wed, 8 Aug 2007 09:54:27 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.1/8.14.1) with ESMTP id l789sRv4074911 for ; Wed, 8 Aug 2007 09:54:27 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.1/8.14.1/Submit) id l789sRFZ074901; Wed, 8 Aug 2007 09:54:27 GMT (envelope-from nobody) Message-Id: <200708080954.l789sRFZ074901@www.freebsd.org> Date: Wed, 8 Aug 2007 09:54:27 GMT From: Alex Deiter To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.0 Cc: Subject: ports/115301: Update port: net/ris from 0.1 up to 0.3 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Aug 2007 10:00:12 -0000 >Number: 115301 >Category: ports >Synopsis: Update port: net/ris from 0.1 up to 0.3 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Wed Aug 08 10:00:12 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Alex Deiter >Release: FreeBSD 6.2-RELEASE-p7 >Organization: MTS Komi >Environment: FreeBSD builder.fine-solution.ru 6.2-RELEASE-p7fs FreeBSD 6.2-RELEASE-p7fs #0: Thu Aug 2 11:47:13 MSD 2007 root@builder.fine-solution.ru:/usr/obj/usr/src/sys/GENERIC i386 >Description: Update port: net/ris from 0.1 up to 0.3: Changes: - add filename remapping for tftp-hpa - use proper PYTHON_CMD - add pkg-message - add pkg-plist Thanks! >How-To-Repeat: >Fix: Patch attached with submission follows: diff -urN net/ris/Makefile net/ris/Makefile --- net/ris/Makefile Tue Feb 27 03:27:28 2007 +++ net/ris/Makefile Wed Aug 8 13:42:19 2007 @@ -6,13 +6,13 @@ # PORTNAME= ris -PORTVERSION= 0.1 +PORTVERSION= 0.3 CATEGORIES= net MASTER_SITES= http://oss.netfarm.it/guides/ \ - http://freebsd.komi.mtsnet.ru/ports/distfiles/ -DISTNAME= ris-linux + http://m.komi.mtsnet.ru/FreeBSD/distfiles/ +DISTNAME= ris-linux-${PORTVERSION} -MAINTAINER= ports@FreeBSD.org +MAINTAINER= tiamat@komi.mts.ru COMMENT= OpenSource alternative to Microsoft Windows RIS RUN_DEPENDS= ${LOCALBASE}/libexec/in.tftpd:${PORTSDIR}/ftp/tftp-hpa @@ -23,28 +23,43 @@ VARDIR= ${DESTDIR}/var PID_FILE?= ${VARDIR}/run/binlsrv.pid +LOG_FILE?= ${VARDIR}/log/binlsrv.log DEVLIST_CACHE?= ${VARDIR}/db/devlist.cache +PKGMESSAGE= ${WRKSRC}/pkg-message -PLIST_FILES= sbin/binlsrv.py sbin/decode.py \ - sbin/fixloader.py sbin/infparser.py \ - sbin/fixup-repository.sh - -SUB_LIST= PYTHON_CMD=${PYTHON_CMD} \ - PID_FILE=${PID_FILE} \ +SCRIPTS= binlsrv.py decode.py \ + fixloader.py hexdump.py \ + infdump.py infparser.py \ + modldr.py fixup-repository.sh + +PKGMESSAGE_SUB= PREFIX="${PREFIX}" + +SUB_LIST= PYTHON_CMD=${PYTHON_CMD} \ + PID_FILE=${PID_FILE} \ + LOG_FILE=${LOG_FILE} \ DEVLIST_CACHE=${DEVLIST_CACHE} post-patch: -.for SCRIPT in ${PLIST_FILES} + @${SED} -e 's|%%PREFIX%%|${PREFIX}|g' \ + ${PKGDIR}/pkg-message > ${PKGMESSAGE} +.for SCRIPT in ${SCRIPTS} @${REINPLACE_CMD} -e \ - 's|@PYTHON_CMD@|${PYTHON_CMD}|; \ - s|@PID_FILE@|${PID_FILE}|; \ - s|@DEVLIST_CACHE@|${DEVLIST_CACHE}|' \ - ${WRKSRC}/${SCRIPT:S/sbin\///} + 's|@PYTHON_CMD@|${PYTHON_CMD}|; \ + s|@PID_FILE@|${PID_FILE}|; \ + s|@LOG_FILE@|${LOG_FILE}|; \ + s|@DEVLIST_CACHE@|${DEVLIST_CACHE}|' \ + ${WRKSRC}/${SCRIPT} .endfor do-install: -.for SCRIPT in ${PLIST_FILES} - ${INSTALL_SCRIPT} ${WRKSRC}/${SCRIPT:S/sbin\///} ${PREFIX}/sbin + @${INSTALL} -d -m 0755 ${PREFIX}/share/ris + @${INSTALL} -d -m 0755 ${PREFIX}/share/ris/inf + @${INSTALL} -d -m 0755 ${PREFIX}/share/ris/sys + @${INSTALL_DATA} ${WRKSRC}/winnt.sif ${PREFIX}/share/ris + @${INSTALL_DATA} ${WRKSRC}/winnt-ris.sif ${PREFIX}/share/ris + @${INSTALL_DATA} ${FILESDIR}/tftp.map ${PREFIX}/share/ris +.for SCRIPT in ${SCRIPTS} + @${INSTALL_SCRIPT} ${WRKSRC}/${SCRIPT} ${PREFIX}/share/ris .endfor .include diff -urN net/ris/distinfo net/ris/distinfo --- net/ris/distinfo Mon Jan 23 00:23:46 2006 +++ net/ris/distinfo Tue Aug 7 16:49:13 2007 @@ -1,3 +1,3 @@ -MD5 (ris-linux.tar.gz) = 23b8e9c73d3a37e2e9b90bb8433e7ace -SHA256 (ris-linux.tar.gz) = 9ecd127b520fea2dc16b24a0053e1d185c516abba9e3038b2029ff0dbcabb3e6 -SIZE (ris-linux.tar.gz) = 10805 +MD5 (ris-linux-0.3.tar.gz) = 1e089d285ea5651dd50325ac704dff70 +SHA256 (ris-linux-0.3.tar.gz) = fca88b9c64fc93d1ff1abacfbe4ff96548d28739512326ffd6b70ea0289e3072 +SIZE (ris-linux-0.3.tar.gz) = 19303 diff -urN net/ris/files/binlsrv.sh.in net/ris/files/binlsrv.sh.in --- net/ris/files/binlsrv.sh.in Mon Feb 20 23:47:29 2006 +++ net/ris/files/binlsrv.sh.in Wed Aug 8 09:52:24 2007 @@ -5,37 +5,40 @@ # BEFORE: LOGIN # KEYWORD: shutdown -# Define these variables in one of these files: -# /etc/rc.conf -# /etc/rc.conf.local -# /etc/rc.conf.d/binlsrv +# +# Add the following lines to /etc/rc.conf to enable binlsrv: # # binlsrv_enable="YES" -# binlsrv_infdir="/path/to/dir_with_inf_files" +# binlsrv_infdir="/path/to/inf/files" +# -. /etc/rc.subr +. %%RC_SUBR%% name="binlsrv" rcvar=`set_rcvar` -command="%%PYTHON_CMD%%" -command_args="%%PREFIX%%/sbin/${name}.py -d" -required_dirs="${binlsrv_infdir}" + +load_rc_config "${name}" + +# Set defaults +: ${binlsrv_enable:="NO"} +: ${binlsrv_infdir:="%%PREFIX%%/share/ris/inf"} + pidfile="%%PID_FILE%%" +command="%%PYTHON_CMD%%" +command_args="%%PREFIX%%/share/ris/${name}.py -d" +required_dirs="$binlsrv_infdir" + start_precmd="binlsrv_start_precmd" stop_postcmd="binlsrv_stop_postcmd" binlsrv_start_precmd() { - %%PREFIX%%/sbin/infparser.py ${binlsrv_infdir} + %%PREFIX%%/share/ris/infparser.py ${binlsrv_infdir} } binlsrv_stop_postcmd() { rm -f ${pidfile} } - -load_rc_config "$name" -: ${binlsrv_enable="NO"} -: ${binlsrv_infdir=""} run_rc_command "$1" diff -urN net/ris/files/patch-binlsrv.py net/ris/files/patch-binlsrv.py --- net/ris/files/patch-binlsrv.py Sun Sep 11 16:19:21 2005 +++ net/ris/files/patch-binlsrv.py Tue Aug 7 16:35:43 2007 @@ -1,39 +1,32 @@ ---- binlsrv.py.orig Fri Sep 2 14:15:31 2005 -+++ binlsrv.py Fri Sep 2 14:21:11 2005 +--- binlsrv.py.orig Tue Aug 7 16:06:15 2007 ++++ binlsrv.py Tue Aug 7 16:35:02 2007 @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#! @PYTHON_CMD@ # -*- Mode: Python; tab-width: 4 -*- # # Boot Information Negotiation Layer - OpenSource Implementation -@@ -671,7 +671,12 @@ +@@ -40,7 +40,7 @@ + [--pid pidfile] [devlist.cache] + -h, --help : show this help + -d, --daemon : daemonize, unix only [false] +--l, --logfile= : logfile when used in daemon mode [/var/log/binlsrv.log] ++-l, --logfile= : logfile when used in daemon mode [@LOG_FILE@] + -a, --address= : ip address to bind to [all interfaces] + -p, --port= : port to bind to [4011] + --pid= : pid file to use instead of the default +@@ -839,11 +839,11 @@ + ## Defaults + global pidfile, s + daemon = False +- logfile = '/var/log/binlsrv.log' ++ logfile = '@LOG_FILE@' + address = '' + port = 4011 +- devfile = 'devlist.cache' +- pidfile = '/var/run/binlsrv.pid' ++ devfile = '@DEVLIST_CACHE@' ++ pidfile = '@PID_FILE@' - import sys - -- if (fork()): sys_exit() -+ pid=fork() -+ if (pid): -+ pidfile=open('@PID_FILE@', 'w') -+ pidfile.write('%d\n' % pid) -+ pidfile.close() -+ sys_exit() - - close(sys.stdin.fileno()) - sys.stdin = open('/dev/null') -@@ -683,7 +688,7 @@ - sys.stderr = Log(open(LOGFILE, 'a+')) - - try: -- devlist = load(open('devlist.cache')) -+ devlist = load(open('@DEVLIST_CACHE@')) - except: - print 'Could not load devlist.cache, build it with infparser.py' - sys_exit(-1) -@@ -694,7 +699,6 @@ - s = socket(AF_INET, SOCK_DGRAM) - s.bind(('', 4011)) - -- print 'Binlserver started... pid %d' % getpid() - while 1: - addr, t, data = get_packet(s) - if t == FILEREQ: + ## Parse command line arguments + shortopts = 'hdl:a:p:' diff -urN net/ris/files/patch-decode.py net/ris/files/patch-decode.py --- net/ris/files/patch-decode.py Thu Jan 1 03:00:00 1970 +++ net/ris/files/patch-decode.py Tue Aug 7 16:37:54 2007 @@ -0,0 +1,8 @@ +--- decode.py.orif Tue Aug 7 16:37:19 2007 ++++ decode.py Tue Aug 7 16:37:41 2007 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#! @PYTHON_CMD@ + # -*- Mode: Python; tab-width: 4 -*- + # + # Boot Information Negotiation Layer Packet decoder diff -urN net/ris/files/patch-fixloader.py net/ris/files/patch-fixloader.py --- net/ris/files/patch-fixloader.py Thu Jan 1 03:00:00 1970 +++ net/ris/files/patch-fixloader.py Tue Aug 7 16:38:35 2007 @@ -0,0 +1,8 @@ +--- fixloader.py.orig Tue Aug 7 16:38:09 2007 ++++ fixloader.py Tue Aug 7 16:38:22 2007 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#! @PYTHON_CMD@ + # -*- Mode: Python; tab-width: 4 -*- + # + # Fix for setuploader diff -urN net/ris/files/patch-hexdump.py net/ris/files/patch-hexdump.py --- net/ris/files/patch-hexdump.py Thu Jan 1 03:00:00 1970 +++ net/ris/files/patch-hexdump.py Tue Aug 7 16:40:08 2007 @@ -0,0 +1,8 @@ +--- hexdump.py.orig Tue Aug 7 16:39:44 2007 ++++ hexdump.py Tue Aug 7 16:39:56 2007 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#! @PYTHON_CMD@ + # -*- Mode: Python; tab-width: 4 -*- + # + # Boot Information Negotiation Layer Packet Dumper diff -urN net/ris/files/patch-infdump.py net/ris/files/patch-infdump.py --- net/ris/files/patch-infdump.py Thu Jan 1 03:00:00 1970 +++ net/ris/files/patch-infdump.py Tue Aug 7 16:41:06 2007 @@ -0,0 +1,8 @@ +--- infdump.py.orig Tue Aug 7 16:40:17 2007 ++++ infdump.py Tue Aug 7 16:40:51 2007 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#! @PYTHON_CMD@ + # -*- Mode: Python; tab-width: 4 -*- + # + # Inf Cache dumper diff -urN net/ris/files/patch-infparser.py net/ris/files/patch-infparser.py --- net/ris/files/patch-infparser.py Sun Sep 11 16:19:21 2005 +++ net/ris/files/patch-infparser.py Tue Aug 7 17:09:49 2007 @@ -1,37 +1,38 @@ ---- infparser.py.orig Fri Sep 2 14:15:32 2005 -+++ infparser.py Fri Sep 2 14:18:12 2005 +--- infparser.py.orig Tue Aug 7 16:10:14 2007 ++++ infparser.py Tue Aug 7 17:09:32 2007 @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#! @PYTHON_CMD@ # -*- Mode: Python; tab-width: 4 -*- # # Inf Driver parser -@@ -143,7 +143,7 @@ - if name.endswith('.services'): - prefix = name.split('.services', 1)[0] - check = prefix.split('.') -- if check[-1].startswith('nt'): -+ if check[-1].startswith('nt') and not check[-1].endswith('64'): - check = check[:-1] - check = check + ['services'] - name = '.'.join(check) -@@ -154,7 +154,7 @@ - while check[-1].isdigit() and len(check)>1: - check = check[:-1] - -- if check[-1].startswith('nt'): -+ if check[-1].startswith('nt') and not check[-1].endswith('64'): - check = check[:-1] - - name = '.'.join(check) -@@ -283,8 +283,8 @@ +@@ -293,28 +293,6 @@ if inffile.split('/').pop() not in exclude: devlist.update(scan_inf(inffile)) - -- print 'Compiled %d drivers' % len(devlist) -+ print 'Starting inf parser: compiled %d drivers.' % len(devlist) -- fd = open('devlist.cache','w') -+ fd = open('@DEVLIST_CACHE@','w') +- print 'Compiled %d drivers' % len(devlist) +- +- fd = open('devlist.cache', 'w') ++ fd = open('@DEVLIST_CACHE@', 'w') dump(devlist, fd) fd.close() +- print 'generated devlist.cache' +- +- fd = open('nics.txt', 'w') +- drvhash = {} +- for nic in devlist.items(): +- entry = nic[0].split('&') +- if len(entry) < 2: continue # just to be sure +- if not entry[0].startswith('PCI'): continue # skip usb +- vid = entry[0].split('VEN_').pop().lower() +- pid = entry[1].split('DEV_').pop().lower() +- key = (vid, pid) +- line = '%4s %4s %s %s\n' % (vid, pid, nic[1]['drv'], nic[1]['svc']) +- drvhash[key] = line +- +- drvlist = drvhash.values() +- drvlist.sort() +- fd.writelines(drvlist) +- fd.close() +- +- print 'generated nics.txt' diff -urN net/ris/files/patch-modldr.py net/ris/files/patch-modldr.py --- net/ris/files/patch-modldr.py Thu Jan 1 03:00:00 1970 +++ net/ris/files/patch-modldr.py Tue Aug 7 16:42:02 2007 @@ -0,0 +1,8 @@ +--- modldr.py.orig Tue Aug 7 16:41:37 2007 ++++ modldr.py Tue Aug 7 16:41:50 2007 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#! @PYTHON_CMD@ + # -*- Mode: Python; tab-width: 4 -*- + # + # Windows OSLoader Modification Tool diff -urN net/ris/files/tftp.map net/ris/files/tftp.map --- net/ris/files/tftp.map Thu Jan 1 03:00:00 1970 +++ net/ris/files/tftp.map Wed Aug 8 09:47:53 2007 @@ -0,0 +1,2 @@ +rg \\ / +r .* \L\0 diff -urN net/ris/pkg-message net/ris/pkg-message --- net/ris/pkg-message Thu Jan 1 03:00:00 1970 +++ net/ris/pkg-message Wed Aug 8 11:19:53 2007 @@ -0,0 +1,15 @@ + You can use the following parameters on /etc/rc.conf: + + binlsrv_enable (bool): Set to "NO" by default. + Set it to "YES" to enable binlsrv. + + binlsrv_infdir (path): Set to "%%PREFIX%%/share/ris/inf" by default. + Set it to your directory with inf files. + + Put all *.inf files into ${binlsrv_infdir} and start binlsrv. + + You can use the following parameters on /etc/inetd.conf: + + tftp dgram udp wait root %%PREFIX%%/libexec/in.tftpd in.tftpd -v -m %%PREFIX%%/share/ris/tftp.map -s /tftpboot + + See http://oss.netfarm.it/guides/ for more details. diff -urN net/ris/pkg-plist net/ris/pkg-plist --- net/ris/pkg-plist Thu Jan 1 03:00:00 1970 +++ net/ris/pkg-plist Wed Aug 8 11:27:31 2007 @@ -0,0 +1,17 @@ +@unexec %D%/etc/rc.d/binlsrv stop 2>/dev/null || true +share/ris/tftp.map +share/ris/winnt.sif +share/ris/winnt-ris.sif +share/ris/binlsrv.py +share/ris/decode.py +share/ris/fixloader.py +share/ris/hexdump.py +share/ris/infdump.py +share/ris/infparser.py +share/ris/modldr.py +share/ris/fixup-repository.sh +@exec mkdir -p %D/share/ris/inf +@exec mkdir -p %D/share/ris/sys +@unexec rmdir %D/share/ris/inf 2>/dev/null || true +@unexec rmdir %D/share/ris/sys 2>/dev/null || true +@unexec rmdir %D/share/ris 2>/dev/null || true >Release-Note: >Audit-Trail: >Unformatted: