Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Sep 2005 21:00:39 GMT
From:      =?KOI8-R?Q?=E4=C5=CA=D4=C5=D2_=E1=CC=C5=CB=D3=C1=CE=C4=D2_=F7=C1?= =?KOI8-R?Q?=CC=C5=D2=C9=C5=D7=C9=DE?= <tiamat@komi.mts.ru>
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   Re: ports/85630: New port: ris (OpenSource alternative to Microsoft Windows RIS)
Message-ID:  <200509032100.j83L0d0h087049@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/85630; it has been noted by GNATS.

From: =?KOI8-R?Q?=E4=C5=CA=D4=C5=D2_=E1=CC=C5=CB=D3=C1=CE=C4=D2_=F7=C1?= =?KOI8-R?Q?=CC=C5=D2=C9=C5=D7=C9=DE?= <tiamat@komi.mts.ru>
To: bug-followup@FreeBSD.org, tiamat@komi.mts.ru
Cc:  
Subject: Re: ports/85630: New port: ris (OpenSource alternative to Microsoft
 Windows RIS)
Date: Sun, 04 Sep 2005 00:54:34 +0400

 make portlint happy:
 
 # This is a shell archive.  Save it in a file, remove anything before
 # this line, and then unpack it by entering "sh file".  Note, it may
 # create directories; files and directories will be owned by you and
 # have default permissions.
 #
 # This archive contains:
 #
 #       ris
 #       ris/pkg-descr
 #       ris/Makefile
 #       ris/files
 #       ris/files/binlsrv.sh.in
 #       ris/files/patch-infparser.py
 #       ris/files/patch-binlsrv.py
 #       ris/distinfo
 #
 echo c - ris
 mkdir -p ris > /dev/null 2>&1
 echo x - ris/pkg-descr
 sed 's/^X//' >ris/pkg-descr << 'END-of-ris/pkg-descr'
 XOpenSource alternative to Microsoft Windows RIS.
 XYou can also use this stuff to install Microsoft Windows from the network.
 X
 XWWW: http://oss.netfarm.it/guides/
 END-of-ris/pkg-descr
 echo x - ris/Makefile
 sed 's/^X//' >ris/Makefile << 'END-of-ris/Makefile'
 X# New ports collection makefile for:   ris
 X# Date created:                3 September 2005
 X# Whom:                        Alex Deiter <tiamat@komi.mts.ru>
 X#
 X# $FreeBSD: ports/net/ris/Makefile,v 1.5 2005/09/03 18:42:17 tiamat Exp $
 X#
 X
 XPORTNAME=      ris
 XPORTVERSION=   0.1
 XCATEGORIES=    net
 XMASTER_SITES=  http://oss.netfarm.it/guides/ \
 X               http://freebsd.komi.mtsnet.ru/ports/distfiles/
 XDISTNAME=      ris-linux
 X
 XMAINTAINER=    tiamat@komi.mts.ru
 XCOMMENT=       OpenSource alternative to Microsoft Windows RIS
 X
 XRUN_DEPENDS=   ${LOCALBASE}/libexec/in.tftpd:${PORTSDIR}/ftp/tftp-hpa
 X
 XUSE_RC_SUBR=   binlsrv.sh
 XUSE_REINPLACE= yes
 XUSE_PYTHON=    yes
 XNO_BUILD=      yes
 X
 XVARDIR=                ${DESTDIR}/var
 XPID_FILE?=     ${VARDIR}/run/binlsrv.pid
 XDEVLIST_CACHE?=        ${VARDIR}/db/devlist.cache
 X
 XPLIST_FILES=   sbin/binlsrv.py sbin/decode.py \
 X               sbin/fixloader.py sbin/infparser.py \
 X               sbin/fixup-repository.sh
 X
 XSUB_LIST=      PYTHON_CMD=${PYTHON_CMD} \
 X               PID_FILE=${PID_FILE} \
 X               DEVLIST_CACHE=${DEVLIST_CACHE}
 X
 Xpost-patch:
 X.for SCRIPT in ${PLIST_FILES}
 X       @${REINPLACE_CMD} -e \
 X               's|@PYTHON_CMD@|${PYTHON_CMD}|; \
 X               s|@PID_FILE@|${PID_FILE}|; \
 X               s|@DEVLIST_CACHE@|${DEVLIST_CACHE}|' \
 X               ${WRKSRC}/${SCRIPT:S/sbin\///}
 X.endfor
 X
 Xdo-install:
 X.for SCRIPT in ${PLIST_FILES}
 X       @${INSTALL_SCRIPT} ${WRKSRC}/${SCRIPT:S/sbin\///} ${PREFIX}/sbin
 X.endfor
 X
 X.include <bsd.port.mk>
 END-of-ris/Makefile
 echo c - ris/files
 mkdir -p ris/files > /dev/null 2>&1
 echo x - ris/files/binlsrv.sh.in
 sed 's/^X//' >ris/files/binlsrv.sh.in << 'END-of-ris/files/binlsrv.sh.in'
 X#!/bin/sh
 X
 X# PROVIDE: binlsrv
 X# REQUIRE: DAEMON
 X# BEFORE: LOGIN
 X# KEYWORD: FreeBSD shutdown
 X
 X# Define these variables in one of these files:
 X#      /etc/rc.conf
 X#      /etc/rc.conf.local
 X#      /etc/rc.conf.d/binlsrv
 X#
 X# binlsrv_enable="YES"
 X# binlsrv_infdir="/path/to/dir_with_inf_files"
 X
 X. /etc/rc.subr
 X
 Xname="binlsrv"
 Xrcvar=`set_rcvar`
 Xcommand="%%PYTHON_CMD%%"
 Xcommand_args="%%PREFIX%%/sbin/${name}.py -d"
 Xrequired_dirs="${binlsrv_infdir}"
 Xpidfile="%%PID_FILE%%"
 Xstart_precmd="binlsrv_start_precmd"
 Xstop_postcmd="binlsrv_stop_postcmd"
 X
 Xbinlsrv_start_precmd()
 X{
 X       %%PREFIX%%/sbin/infparser.py ${binlsrv_infdir}
 X}
 X
 Xbinlsrv_stop_postcmd()
 X{
 X       rm -f ${pidfile}
 X}
 X
 Xload_rc_config "$name"
 X: ${binlsrv_enable="NO"}
 X: ${binlsrv_infdir=""}
 X
 Xrun_rc_command "$1"
 END-of-ris/files/binlsrv.sh.in
 echo x - ris/files/patch-infparser.py
 sed 's/^X//' >ris/files/patch-infparser.py <<
 'END-of-ris/files/patch-infparser.py'
 X--- infparser.py.orig  Fri Sep  2 14:15:32 2005
 X+++ infparser.py       Fri Sep  2 14:18:12 2005
 X@@ -1,4 +1,4 @@
 X-#!/usr/bin/env python
 X+#! @PYTHON_CMD@
 X # -*- Mode: Python; tab-width: 4 -*-
 X #
 X # Inf Driver parser
 X@@ -143,7 +143,7 @@
 X     if name.endswith('.services'):
 X         prefix = name.split('.services', 1)[0]
 X         check = prefix.split('.')
 X-        if check[-1].startswith('nt'):
 X+        if check[-1].startswith('nt') and not check[-1].endswith('64'):
 X             check = check[:-1]
 X         check = check + ['services']
 X         name = '.'.join(check)
 X@@ -154,7 +154,7 @@
 X     while check[-1].isdigit() and len(check)>1:
 X         check = check[:-1]
 X
 X-    if check[-1].startswith('nt'):
 X+    if check[-1].startswith('nt') and not check[-1].endswith('64'):
 X         check = check[:-1]
 X
 X     name = '.'.join(check)
 X@@ -283,8 +283,8 @@
 X         if inffile.split('/').pop() not in exclude:
 X             devlist.update(scan_inf(inffile))
 X
 X-    print 'Compiled %d drivers' % len(devlist)
 X+    print 'Starting inf parser: compiled %d drivers.' % len(devlist)
 X
 X-    fd = open('devlist.cache','w')
 X+    fd = open('@DEVLIST_CACHE@','w')
 X     dump(devlist, fd)
 X     fd.close()
 END-of-ris/files/patch-infparser.py
 echo x - ris/files/patch-binlsrv.py
 sed 's/^X//' >ris/files/patch-binlsrv.py <<
 'END-of-ris/files/patch-binlsrv.py'
 X--- binlsrv.py.orig    Fri Sep  2 14:15:31 2005
 X+++ binlsrv.py Fri Sep  2 14:21:11 2005
 X@@ -1,4 +1,4 @@
 X-#!/usr/bin/env python
 X+#! @PYTHON_CMD@
 X # -*- Mode: Python; tab-width: 4 -*-
 X #
 X # Boot Information Negotiation Layer - OpenSource Implementation
 X@@ -671,7 +671,12 @@
 X
 X         import sys
 X
 X-        if (fork()): sys_exit()
 X+        pid=fork()
 X+        if (pid):
 X+           pidfile=open('@PID_FILE@', 'w')
 X+           pidfile.write('%d\n' % pid)
 X+           pidfile.close()
 X+           sys_exit()
 X
 X         close(sys.stdin.fileno())
 X         sys.stdin  = open('/dev/null')
 X@@ -683,7 +688,7 @@
 X         sys.stderr = Log(open(LOGFILE, 'a+'))
 X
 X     try:
 X-        devlist = load(open('devlist.cache'))
 X+        devlist = load(open('@DEVLIST_CACHE@'))
 X     except:
 X         print 'Could not load devlist.cache, build it with infparser.py'
 X         sys_exit(-1)
 X@@ -694,7 +699,6 @@
 X     s = socket(AF_INET, SOCK_DGRAM)
 X     s.bind(('', 4011))
 X
 X-    print 'Binlserver started... pid %d' % getpid()
 X     while 1:
 X         addr, t, data = get_packet(s)
 X         if t == FILEREQ:
 END-of-ris/files/patch-binlsrv.py
 echo x - ris/distinfo
 sed 's/^X//' >ris/distinfo << 'END-of-ris/distinfo'
 XMD5 (ris-linux.tar.gz) = 23b8e9c73d3a37e2e9b90bb8433e7ace
 XSIZE (ris-linux.tar.gz) = 10805
 END-of-ris/distinfo
 exit
 
 Thanks!
 
 -- 
 Alex Deiter



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200509032100.j83L0d0h087049>