diff options
author | rafan <rafan@FreeBSD.org> | 2007-08-12 19:03:16 +0800 |
---|---|---|
committer | rafan <rafan@FreeBSD.org> | 2007-08-12 19:03:16 +0800 |
commit | 10cca3e33b2cc16db9c84336cd2ddfd766ad0db6 (patch) | |
tree | 919a6257e933f17df8db25b7128b09ae52a1497f /net/ris | |
parent | 7d28fd41c84840b2e23729a8f36afca8f18d60c1 (diff) | |
download | freebsd-ports-gnome-10cca3e33b2cc16db9c84336cd2ddfd766ad0db6.tar.gz freebsd-ports-gnome-10cca3e33b2cc16db9c84336cd2ddfd766ad0db6.tar.zst freebsd-ports-gnome-10cca3e33b2cc16db9c84336cd2ddfd766ad0db6.zip |
- Update to 0.3
- Add pkg-message
- Add filename remapping for tftp-hpa
- Use PYTHON_CMD in scripts
- Update master sites
- Pass maintainership to submitter
PR: ports/115301
Submitted by: Alex Deiter <tiamat at komi.mts.ru>
Diffstat (limited to 'net/ris')
-rw-r--r-- | net/ris/Makefile | 47 | ||||
-rw-r--r-- | net/ris/distinfo | 6 | ||||
-rw-r--r-- | net/ris/files/binlsrv.sh.in | 31 | ||||
-rw-r--r-- | net/ris/files/patch-binlsrv.py | 57 | ||||
-rw-r--r-- | net/ris/files/patch-decode.py | 8 | ||||
-rw-r--r-- | net/ris/files/patch-fixloader.py | 8 | ||||
-rw-r--r-- | net/ris/files/patch-hexdump.py | 8 | ||||
-rw-r--r-- | net/ris/files/patch-infdump.py | 8 | ||||
-rw-r--r-- | net/ris/files/patch-infparser.py | 53 | ||||
-rw-r--r-- | net/ris/files/patch-modldr.py | 8 | ||||
-rw-r--r-- | net/ris/files/pkg-message.in | 15 | ||||
-rw-r--r-- | net/ris/files/tftp.map | 2 | ||||
-rw-r--r-- | net/ris/pkg-plist | 17 |
13 files changed, 177 insertions, 91 deletions
diff --git a/net/ris/Makefile b/net/ris/Makefile index 0496d6567ace..5dc4b634637c 100644 --- a/net/ris/Makefile +++ b/net/ris/Makefile @@ -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 @@ NO_BUILD= yes VARDIR= /var PID_FILE?= ${VARDIR}/run/binlsrv.pid +LOG_FILE?= ${VARDIR}/log/binlsrv.log DEVLIST_CACHE?= ${VARDIR}/db/devlist.cache -PLIST_FILES= sbin/binlsrv.py sbin/decode.py \ - sbin/fixloader.py sbin/infparser.py \ - sbin/fixup-repository.sh +SCRIPTS= binlsrv.py decode.py \ + fixloader.py hexdump.py \ + infdump.py infparser.py \ + modldr.py fixup-repository.sh -SUB_LIST= PYTHON_CMD=${PYTHON_CMD} \ - PID_FILE=${PID_FILE} \ + +SUB_FILES= pkg-message +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} +.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 + @${MKDIR} ${DATADIR} + @${MKDIR} ${DATADIR}/inf + @${MKDIR} ${DATADIR}/sys + @${INSTALL_DATA} ${WRKSRC}/winnt.sif ${DATADIR} + @${INSTALL_DATA} ${WRKSRC}/winnt-ris.sif ${DATADIR} + @${INSTALL_DATA} ${FILESDIR}/tftp.map ${DATADIR} +.for SCRIPT in ${SCRIPTS} + @${INSTALL_SCRIPT} ${WRKSRC}/${SCRIPT} ${DATADIR} .endfor +post-install: + @${CAT} ${PKGMESSAGE} + .include <bsd.port.mk> diff --git a/net/ris/distinfo b/net/ris/distinfo index f4c4e7bdc46e..dbb4bf6d0ec5 100644 --- a/net/ris/distinfo +++ b/net/ris/distinfo @@ -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 --git a/net/ris/files/binlsrv.sh.in b/net/ris/files/binlsrv.sh.in index 1b3473df512a..333bad56e57b 100644 --- a/net/ris/files/binlsrv.sh.in +++ b/net/ris/files/binlsrv.sh.in @@ -5,28 +5,35 @@ # 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() @@ -34,8 +41,4 @@ binlsrv_stop_postcmd() rm -f ${pidfile} } -load_rc_config "$name" -: ${binlsrv_enable="NO"} -: ${binlsrv_infdir=""} - run_rc_command "$1" diff --git a/net/ris/files/patch-binlsrv.py b/net/ris/files/patch-binlsrv.py index 1809045ff6a8..484b58104686 100644 --- a/net/ris/files/patch-binlsrv.py +++ b/net/ris/files/patch-binlsrv.py @@ -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 --git a/net/ris/files/patch-decode.py b/net/ris/files/patch-decode.py new file mode 100644 index 000000000000..ebf11236689d --- /dev/null +++ b/net/ris/files/patch-decode.py @@ -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 --git a/net/ris/files/patch-fixloader.py b/net/ris/files/patch-fixloader.py new file mode 100644 index 000000000000..fafe297ccdaa --- /dev/null +++ b/net/ris/files/patch-fixloader.py @@ -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 --git a/net/ris/files/patch-hexdump.py b/net/ris/files/patch-hexdump.py new file mode 100644 index 000000000000..927016bbdb28 --- /dev/null +++ b/net/ris/files/patch-hexdump.py @@ -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 --git a/net/ris/files/patch-infdump.py b/net/ris/files/patch-infdump.py new file mode 100644 index 000000000000..1cf8192bca86 --- /dev/null +++ b/net/ris/files/patch-infdump.py @@ -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 --git a/net/ris/files/patch-infparser.py b/net/ris/files/patch-infparser.py index b1fe739dcaea..12283379ae2e 100644 --- a/net/ris/files/patch-infparser.py +++ b/net/ris/files/patch-infparser.py @@ -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 --git a/net/ris/files/patch-modldr.py b/net/ris/files/patch-modldr.py new file mode 100644 index 000000000000..0246238183a8 --- /dev/null +++ b/net/ris/files/patch-modldr.py @@ -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 --git a/net/ris/files/pkg-message.in b/net/ris/files/pkg-message.in new file mode 100644 index 000000000000..c685a965a085 --- /dev/null +++ b/net/ris/files/pkg-message.in @@ -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 --git a/net/ris/files/tftp.map b/net/ris/files/tftp.map new file mode 100644 index 000000000000..ef56e2ed104c --- /dev/null +++ b/net/ris/files/tftp.map @@ -0,0 +1,2 @@ +rg \\ / +r .* \L\0 diff --git a/net/ris/pkg-plist b/net/ris/pkg-plist new file mode 100644 index 000000000000..8fbad6542526 --- /dev/null +++ b/net/ris/pkg-plist @@ -0,0 +1,17 @@ +@stopdaemon binlsrv +%%DATADIR%%/tftp.map +%%DATADIR%%/winnt.sif +%%DATADIR%%/winnt-ris.sif +%%DATADIR%%/binlsrv.py +%%DATADIR%%/decode.py +%%DATADIR%%/fixloader.py +%%DATADIR%%/hexdump.py +%%DATADIR%%/infdump.py +%%DATADIR%%/infparser.py +%%DATADIR%%/modldr.py +%%DATADIR%%/fixup-repository.sh +@exec mkdir -p %D/%%DATADIR%%/inf +@exec mkdir -p %D/%%DATADIR%%/sys +@dirrmtry %%DATADIR%%/inf +@dirrmtry %%DATADIR%%/sys +@dirrmtry %%DATADIR%% |