ports/85630: New port: ris (OpenSource alternative to Microsoft Windows RIS)
Alex Deiter
tiamat at komi.mts.ru
Fri Sep 2 11:00:35 UTC 2005
>Number: 85630
>Category: ports
>Synopsis: New port: ris (OpenSource alternative to Microsoft Windows RIS)
>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: Fri Sep 02 11:00:32 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Alex Deiter
>Release: 5.3
>Organization:
MTS Komi
>Environment:
FreeBSD stella.komi.mts.ru 5.3-STABLE FreeBSD 5.3-STABLE #0: Sun Feb 13 19:10:17 MSK 2005 root at stella.komi.mts.ru:/var/devel/obj/var/devel/src/sys/MTSKOMI i386
>Description:
New port: ris
OpenSource alternative to Microsoft Windows RIS.
You can also use this stuff to install Microsoft Windows from the network.
WWW: http://oss.netfarm.it/guides/
>How-To-Repeat:
>Fix:
# 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'
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 at komi.mts.ru
XCOMMENT= OpenSource alternative to Microsoft Windows RIS
XUSE_RC_SUBR= binlsrv.sh
XUSE_REINPLACE= yes
XUSE_PYTHON= yes
XNO_BUILD= yes
XRUN_DEPENDS= ${LOCALBASE}/libexec/in.tftpd:${PORTSDIR}/ftp/tftp-hpa
X
XPID_FILE?= /var/run/binlsrv.pid
XDEVLIST_CACHE?= /var/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
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list