From nobody@FreeBSD.org  Wed May 14 18:51:47 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C2DC8106567A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 14 May 2008 18:51:47 +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 B6C0D8FC1D
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 14 May 2008 18:51:47 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m4EIocBv031686
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 14 May 2008 18:50:38 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m4EIocRs031685;
	Wed, 14 May 2008 18:50:38 GMT
	(envelope-from nobody)
Message-Id: <200805141850.m4EIocRs031685@www.freebsd.org>
Date: Wed, 14 May 2008 18:50:38 GMT
From: Ganael Laplanche <ganael.laplanche@martymac.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: New port: comms/hso-kmod - Driver for Option HSDPA modem
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         123680
>Category:       ports
>Synopsis:       New port: comms/hso-kmod - Driver for Option HSDPA modem
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 14 19:00:12 UTC 2008
>Closed-Date:    Sun May 18 15:47:43 UTC 2008
>Last-Modified:  Sun May 18 15:50:04 UTC 2008
>Originator:     Ganael Laplanche
>Release:        7.0-STABLE
>Organization:
http://contribs.martymac.com
>Environment:
FreeBSD home.martymac.com 7.0-STABLE FreeBSD 7.0-STABLE #15: Wed Apr 30 22:06:57 CEST 2008     root@home.martymac.com:/usr/obj/usr/src/sys/MYKERNEL  amd64
>Description:
Here is a port of Fredrik Lindberg's FreeBSD driver for Option HSDPA modem.

- It currently supports FreeBSD 7.x and 8.x and the following devices :
    * Option GlobeSurfer iCON 7.2 (2.4.6Hd firmware)
    * Option iCON 225

- A devd configuration file may optionally be installed with the kernel module
  (hso(4)). It provides automatic switching from CD-mode to modem-mode when the
  key is plugged in.

- The port also includes the hsoctl utility that may optionally be built.
  It can be used along with the kernel module to connect to your provider
  (see hsoctl(1)).

- Since the driver is quite new, DEBUG symbols are generated by default.
  This can be avoided using the 'make config' screen.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

# 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:
#
#	hso-kmod
#	hso-kmod/Makefile
#	hso-kmod/distinfo
#	hso-kmod/pkg-plist
#	hso-kmod/pkg-descr
#	hso-kmod/files
#	hso-kmod/files/option-icon.conf.sample
#	hso-kmod/files/HSOCTL-DEBUG-patch-Makefile
#	hso-kmod/files/pkg-message.in
#	hso-kmod/files/HSO-DEBUG-patch-Makefile
#
echo c - hso-kmod
mkdir -p hso-kmod > /dev/null 2>&1
echo x - hso-kmod/Makefile
sed 's/^X//' >hso-kmod/Makefile << 'END-of-hso-kmod/Makefile'
X# New ports collection makefile for:	hso-kmod
X# Date created:				12 May 2008
X# Whom:					Ganael Laplanche <ganael.laplanche@martymac.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	hso
XPORTVERSION=	20080514
XCATEGORIES=	comms kld
XMASTER_SITES=	http://www.shapeshifter.se/pub/hso/
XPKGNAMESUFFIX=	-kmod
XDISTFILES=	${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}
X
XMAINTAINER=	ganael.laplanche@martymac.com
XCOMMENT=	Driver for Option HSDPA modem
X
XNO_PACKAGE=	should be recompiled for a particular FreeBSD kernel
X
XOPTIONS=	HSOCTL "Build hsoctl tool" on \
X		DEVD "Install devd files" on \
X		DEBUG "Build with debug symbols" on
X
XSUB_FILES=	pkg-message
XKMODDIR?=	/boot/modules
XPLIST_SUB+=	KMODDIR=${KMODDIR}
XMAKE_ENV+=	KMODDIR=${KMODDIR}
X
XMAN4=	hso.4
X
X.include <bsd.port.pre.mk>
X
X.if !defined(WITHOUT_HSOCTL)
XDISTFILES+=	hsoctl-${PORTVERSION}${EXTRACT_SUFX}
XWRKSRC_HSOCTL=	${WRKDIR}/hsoctl-${PORTVERSION}
XPLIST_SUB+=	PL_HSOCTL=""
XMAN1=	hsoctl.1
X.else
XPLIST_SUB+=	PL_HSOCTL="@comment "
X.endif
X.if !defined(WITHOUT_DEVD)
XPLIST_SUB+=	PL_DEVD=""
X.else
XPLIST_SUB+=	PL_DEVD="@comment "
X.endif
X.if defined(WITHOUT_DEBUG)
XEXTRA_PATCHES+=	${PATCHDIR}/HSO-DEBUG-patch-Makefile
X.endif
X
X.if !exists(/usr/src/sys/Makefile)
XIGNORE=	requires kernel source files
X.elif ${OSVERSION} < 700055
XIGNORE=	requires FreeBSD 7.0 or superior
X.endif
X
Xpost-patch:
X.if !defined(WITHOUT_HSOCTL) && defined(WITHOUT_DEBUG)
X	@${PATCH} -d ${WRKSRC_HSOCTL} < ${PATCHDIR}/HSOCTL-DEBUG-patch-Makefile
X.endif
X
Xpost-build:
X.if !defined(WITHOUT_HSOCTL)
X	@cd ${WRKSRC_HSOCTL} && ${SETENV} NO_MANCOMPRESS= ${MAKE} all
X.endif
X
Xpost-install:
X	${INSTALL_MAN} ${MAN4:S|^|${WRKSRC}/|} ${PREFIX}/man/man4
X.if !defined(WITHOUT_HSOCTL)
X	@cd ${WRKSRC_HSOCTL} && \
X		${SETENV} DESTDIR=${PREFIX}/ BINDIR=bin MANDIR=man/man NO_MANCOMPRESS= \
X		${MAKE} install
X.endif
X.if !defined(WITHOUT_DEVD)
X	${MKDIR} ${PREFIX}/etc/devd
X	${INSTALL_DATA} ${FILESDIR}/option-icon.conf.sample ${PREFIX}/etc/devd/
X	@if [ ! -f ${PREFIX}/etc/devd/option-icon.conf ]; then \
X		${CP} -p ${PREFIX}/etc/devd/option-icon.conf.sample ${PREFIX}/etc/devd/option-icon.conf; \
X	fi
X.endif
X	@${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.post.mk>
END-of-hso-kmod/Makefile
echo x - hso-kmod/distinfo
sed 's/^X//' >hso-kmod/distinfo << 'END-of-hso-kmod/distinfo'
XMD5 (hso-20080514.tar.gz) = 72162021aa4d05304537bf83389f77a6
XSHA256 (hso-20080514.tar.gz) = 9c72974973e8f11cdcd42c251adab0780180a9dc5f098ee8968520db02564f9f
XSIZE (hso-20080514.tar.gz) = 10345
XMD5 (hsoctl-20080514.tar.gz) = 82a7e179222eff55d9633ef23bba9caf
XSHA256 (hsoctl-20080514.tar.gz) = 76d5ad970b1ffa426e67ba939f396009f4b6b1d54c555712bf02202904826913
XSIZE (hsoctl-20080514.tar.gz) = 6645
END-of-hso-kmod/distinfo
echo x - hso-kmod/pkg-plist
sed 's/^X//' >hso-kmod/pkg-plist << 'END-of-hso-kmod/pkg-plist'
X%%PL_DEVD%%@unexec if cmp -s %D/etc/devd/option-icon.conf.sample %D/etc/devd/option-icon.conf; then rm -f %D/etc/devd/option-icon.conf; fi
X%%PL_DEVD%%etc/devd/option-icon.conf.sample
X%%PL_DEVD%%@exec if [ ! -f %D/etc/devd/option-icon.conf ]; then mkdir -p %B; cp -p %D/%F %B/option-icon.conf; fi
X%%PL_DEVD%%@dirrmtry etc/devd
X%%PL_HSOCTL%%bin/hsoctl
X@cwd %%KMODDIR%%
Xhso.ko
X@exec kldxref %D
X@unexec kldxref %D
END-of-hso-kmod/pkg-plist
echo x - hso-kmod/pkg-descr
sed 's/^X//' >hso-kmod/pkg-descr << 'END-of-hso-kmod/pkg-descr'
XFreeBSD driver for newer Option HSDPA USB dongles.
X
XThe driver have been tested with the following devices
X
X  * Option GlobeSurfer iCON 7.2 (2.4.6Hd firmware)
X  * Option GlobeSurfer iCON 225
X
XOlder cards should work just fine with ubsa(4) or any similar
XUSB-over-serial driver.
X
XNote that this driver should be considered beta.
X
XWWW: http://www.shapeshifter.se/code/hso/
END-of-hso-kmod/pkg-descr
echo c - hso-kmod/files
mkdir -p hso-kmod/files > /dev/null 2>&1
echo x - hso-kmod/files/option-icon.conf.sample
sed 's/^X//' >hso-kmod/files/option-icon.conf.sample << 'END-of-hso-kmod/files/option-icon.conf.sample'
Xattach 100 {
Xmatch "device-name" "umass[0-9]+";
Xmatch "vendor"  "0x0af0";
Xmatch "product" "0x6911|0x6971|0x7251|0x7401";
Xmatch "devclass" "0x00";
Xaction "sleep 1; /sbin/camcontrol cmd `/sbin/camcontrol devlist | /usr/bin/grep ZCOPTION | /usr/bin/awk '{match($11, /pass[0-9]+/); print substr($11, RSTART, RLENGTH) }'` -c '01 00 00 00 00 00' -i 1 i1 > /dev/null";
X};
END-of-hso-kmod/files/option-icon.conf.sample
echo x - hso-kmod/files/HSOCTL-DEBUG-patch-Makefile
sed 's/^X//' >hso-kmod/files/HSOCTL-DEBUG-patch-Makefile << 'END-of-hso-kmod/files/HSOCTL-DEBUG-patch-Makefile'
X--- Makefile.orig	2008-05-14 14:18:53.751411172 +0200
X+++ Makefile	2008-05-14 14:19:01.497294028 +0200
X@@ -1,5 +1,5 @@
X SRCS=	hsoctl.c
X PROG=	hsoctl
X-CFLAGS+=	-g
X+#CFLAGS+=	-g
X 
X .include <bsd.prog.mk>
END-of-hso-kmod/files/HSOCTL-DEBUG-patch-Makefile
echo x - hso-kmod/files/pkg-message.in
sed 's/^X//' >hso-kmod/files/pkg-message.in << 'END-of-hso-kmod/files/pkg-message.in'
X
X===============================================================================
X
XThis port has installed the hso kernel module.
X
X1) To load the kernel module at boot time,
Xadd the following line to /boot/loader.conf:
X
Xhso_load="YES"
X
X2) If you have installed devd files, restart devd :
X/etc/rc.d/devd restart
X
X3) If you have built the hsoctl utility, use it to connect :
Xe.g. : hsoctl -a bredband.tre.se -p 1234 hso0
X
X4) Enjoy !
X
X===============================================================================
X
END-of-hso-kmod/files/pkg-message.in
echo x - hso-kmod/files/HSO-DEBUG-patch-Makefile
sed 's/^X//' >hso-kmod/files/HSO-DEBUG-patch-Makefile << 'END-of-hso-kmod/files/HSO-DEBUG-patch-Makefile'
X--- Makefile.orig	2008-05-14 14:18:19.880920578 +0200
X+++ Makefile	2008-05-14 14:18:29.051785451 +0200
X@@ -2,7 +2,7 @@
X S=  ${.CURDIR}/../..
X .PATH: $S/dev/usb
X 
X-CFLAGS+= -DUSB_DEBUG=1 -DHSO_DEBUG=-1 -g
X+#CFLAGS+= -DUSB_DEBUG=1 -DHSO_DEBUG=-1 -g
X KMOD=	hso
X SRCS=	if_hso.c opt_usb.h device_if.h bus_if.h usbdevs.h
X 
END-of-hso-kmod/files/HSO-DEBUG-patch-Makefile
exit



>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: miwi 
State-Changed-When: Sun May 18 15:47:42 UTC 2008 
State-Changed-Why:  
New port added. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=123680 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/123680: commit references a PR
Date: Sun, 18 May 2008 15:44:58 +0000 (UTC)

 miwi        2008-05-18 15:44:54 UTC
 
   FreeBSD ports repository
 
   Modified files:
     comms                Makefile 
   Added files:
     comms/hso-kmod       Makefile distinfo pkg-descr pkg-plist 
     comms/hso-kmod/files HSO-DEBUG-patch-Makefile 
                          HSOCTL-DEBUG-patch-Makefile 
                          option-icon.conf.sample patch-if_hso.c 
                          pkg-message.in 
   Log:
   FreeBSD driver for newer Option HSDPA USB dongles.
   
   The driver have been tested with the following devices
   
     * Option GlobeSurfer iCON 7.2 (2.4.6Hd firmware)
     * Option GlobeSurfer iCON 225
   
   Older cards should work just fine with ubsa(4) or any similar
   USB-over-serial driver.
   
   Note that this driver should be considered beta.
   
   WWW: http://www.shapeshifter.se/code/hso/
   
   PR:             ports/123680
   Submitted by:   Ganael Laplanche <ganael.laplanche at martymac.com>
   
   Revision  Changes    Path
   1.191     +1 -0      ports/comms/Makefile
   1.1       +82 -0     ports/comms/hso-kmod/Makefile (new)
   1.1       +6 -0      ports/comms/hso-kmod/distinfo (new)
   1.1       +11 -0     ports/comms/hso-kmod/files/HSO-DEBUG-patch-Makefile (new)
   1.1       +9 -0      ports/comms/hso-kmod/files/HSOCTL-DEBUG-patch-Makefile (new)
   1.1       +7 -0      ports/comms/hso-kmod/files/option-icon.conf.sample (new)
   1.1       +20 -0     ports/comms/hso-kmod/files/patch-if_hso.c (new)
   1.1       +20 -0     ports/comms/hso-kmod/files/pkg-message.in (new)
   1.1       +13 -0     ports/comms/hso-kmod/pkg-descr (new)
   1.1       +9 -0      ports/comms/hso-kmod/pkg-plist (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
