openvpn2: "Cannot allocate TUN/TAP dev dynamically"

Caspar Florian Ebeling florian.ebeling at gmail.com
Thu Aug 28 04:51:49 PDT 2008


> I would also like to see TUN/TAP drivers in MacPorts.
> After a quick look on the Makefile in the git repository the Portfile should
> contain:
>
> use_configure    no
> (because there is no configure)
>
> I'm not sure where to put the kext files. If we put it in the usual
> /Library/Extensions folder we need:
>
> destroot.args    BASE=${destroot}
> (the Makefile uses BASE instead of DESTDIR)

I would think ${destroot}${prefix} might be even better,
so that things end up in /opt/local/Library/Extensions.
I tried it and loading/unloading seems to work nicely.
So the location doesn't seem to matter if you load kexts
explicitly.

> This would cause a mtree violation. Thus we need:
> destroot.violate_mtree    yes
>
> The next issues are the StartupItems. The Makefile provides an own way to
> create the items, but we could also use MacPorts StartupItems.

The problem with MacPorts StartupItems is that they look very
server-centric to me, and we only need to trigger load and unload
of the Kext. But that with su privileges. There is no pid to watch
e.g.

So one way of dealing with this would be to provide an oldfashioned
script. But where to put that. I would be tempted to put it into
/opt/local/init.d/,
but there is nothing yet.

Otherwise my Portfile is working. Maybe we just leave that part out for
now and add a README.MacPorts, which explains:

kextload KEXT_PATH # to load and get /dev/tap*
kextunload KEXT_PATH # to unload and remove /dev/tap*

> At the end I would suggest to not include the drivers in openvpn port,
> because there are also other tools which use TUN/TAP.

no, I agree, but there might be a dependency. Maybe only via a
variant, but I think plain/full dependency would be arguable as well.



-- 
Florian Ebeling
florian.ebeling at gmail.com


More information about the macports-dev mailing list