Re: [UPDATE] iodine-0.5.2-p1 [resubmit] [initscript]

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [UPDATE] iodine-0.5.2-p1 [resubmit] [initscript]

William Orr-2
Anyone?

On Fri, Apr 1, 2011 at 1:29 PM, William Orr <[hidden email]> wrote:

> I made some changes to this patch at Paul de Weerd's request (added a client
> side rc script).
> Comments? Ok? Would someone be able to commit this?
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/net/iodine/Makefile,v
> retrieving revision 1.11
> diff -N -u Makefile
> --- Makefile    3 Dec 2010 07:47:44 -0000   1.11
> +++ Makefile    31 Mar 2011 13:42:18 -0000
> @@ -3,7 +3,7 @@
>  COMMENT=       tunnel IPv4 data through DNS
>  DISTNAME=      iodine-0.5.2
> -REVISION=      0
> +REVISION=      1
>  CATEGORIES=        net
>  HOMEPAGE=      http://code.kryo.se/iodine/
> ? diff
> Index: patches/patch-man_iodine_8
> ===================================================================
> RCS file: patches/patch-man_iodine_8
> diff -N -u patches/patch-man_iodine_8
> --- /dev/null   31 Mar 2011 07:42:18 -0000
> +++ patches/patch-man_iodine_8  31 Mar 2011 13:42:18 -0000
> @@ -0,0 +1,16 @@
> +$OpenBSD$
> +--- man/iodine.8.orig  Tue Jan  4 21:00:27 2011
> ++++ man/iodine.8   Tue Jan  4 21:01:53 2011
> +@@ -103,10 +103,10 @@ Print usage info and exit.
> + Keep running in foreground.
> + .TP
> + .B -u user
> +-Drop privileges and run as user 'user' after setting up tunnel.
> ++Drop privileges and run as user 'user' after setting up tunnel. Default is
> _iodine.
> + .TP
> + .B -t chrootdir
> +-Chroot to 'chrootdir' after setting up tunnel.
> ++Chroot to 'chrootdir' after setting up tunnel. Default is /var/empty.
> + .TP
> + .B -d device
> + Use the TUN device 'device' instead of the normal one, which is dnsX on
> Linux
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/net/iodine/pkg/PLIST,v
> retrieving revision 1.3
> diff -N -u pkg/PLIST
> --- pkg/PLIST   30 Mar 2009 09:17:45 -0000  1.3
> +++ pkg/PLIST   31 Mar 2011 13:42:18 -0000
> @@ -4,3 +4,5 @@
>  @man man/man8/iodine.8
>  @bin sbin/iodine
>  @bin sbin/iodined
> +@rcscript ${RCDIR}/iodined
> +@rcscript ${RCDIR}/iodine
> Index: pkg/iodine.rc
> ===================================================================
> RCS file: pkg/iodine.rc
> diff -N -u pkg/iodine.rc
> --- /dev/null   31 Mar 2011 07:42:18 -0000
> +++ pkg/iodine.rc   31 Mar 2011 13:42:18 -0000
> @@ -0,0 +1,9 @@
> +#!/bin/sh
> +
> +daemon="${TRUEPREFIX}/sbin/iodine"
> +
> +. /etc/rc.d/rc.subr
> +
> +pexp="${daemon}[^d]"
> +
> +rc_cmd $1
> Index: pkg/iodined.rc
> ===================================================================
> RCS file: pkg/iodined.rc
> diff -N -u pkg/iodined.rc
> --- /dev/null   31 Mar 2011 07:42:18 -0000
> +++ pkg/iodined.rc  31 Mar 2011 13:42:18 -0000
> @@ -0,0 +1,9 @@
> +#!/bin/sh
> +
> +daemon="${TRUEPREFIX}/sbin/iodined"
> +
> +. /etc/rc.d/rc.subr
> +
> +pexp=${daemon}
> +
> +rc_cmd $1
>
>
> --
> -Will Orr
>



--
-Will Orr

Reply | Threaded
Open this post in threaded view
|

Re: [UPDATE] iodine-0.5.2-p1 [resubmit] [initscript]

Landry Breuil-6
On Thu, Apr 28, 2011 at 06:36:30PM -0400, William Orr wrote:
> Anyone?

The rc scripts just don't work out of the box.

$sudo /etc/rc.d/iodine start
iodine(failed)
$sudo /etc/rc.d/iodined start
iodined(failed)

You should add a README stating what iodine_flags & iodined_flags should
be so that it works out of the box, and provide some sane defaults for
it in the rc scripts. By default it blocks at startup asking for a
password, which doesnt really fit in the rc.d framework...

Landry

Reply | Threaded
Open this post in threaded view
|

Re: [UPDATE] iodine-0.5.2-p1 [resubmit] [initscript]

Stuart Henderson
On 2011-04-29, Landry Breuil <[hidden email]> wrote:

> On Thu, Apr 28, 2011 at 06:36:30PM -0400, William Orr wrote:
>> Anyone?
>
> The rc scripts just don't work out of the box.
>
> $sudo /etc/rc.d/iodine start
> iodine(failed)
> $sudo /etc/rc.d/iodined start
> iodined(failed)
>
> You should add a README stating what iodine_flags & iodined_flags should
> be so that it works out of the box, and provide some sane defaults for
> it in the rc scripts. By default it blocks at startup asking for a
> password, which doesnt really fit in the rc.d framework...

ouch, no it cannot go in like that. it should have default flags
which mean that it doesn't block even if people add it to rc_scripts
without changing anything else.


Reply | Threaded
Open this post in threaded view
|

Re: [UPDATE] iodine-0.5.2-p1 [resubmit] [initscript]

David Coppa
On Fri, Apr 29, 2011 at 4:28 PM, Stuart Henderson <[hidden email]> wrote:

> On 2011-04-29, Landry Breuil <[hidden email]> wrote:
>> On Thu, Apr 28, 2011 at 06:36:30PM -0400, William Orr wrote:
>>> Anyone?
>>
>> The rc scripts just don't work out of the box.
>>
>> $sudo /etc/rc.d/iodine start
>> iodine(failed)
>> $sudo /etc/rc.d/iodined start
>> iodined(failed)
>>
>> You should add a README stating what iodine_flags & iodined_flags should
>> be so that it works out of the box, and provide some sane defaults for
>> it in the rc scripts. By default it blocks at startup asking for a
>> password, which doesnt really fit in the rc.d framework...
>
> ouch, no it cannot go in like that. it should have default flags
> which mean that it doesn't block even if people add it to rc_scripts
> without changing anything else.

You should discuss with upstream about a sane way for passing
configuration options from a config file.

ciao,
david

Reply | Threaded
Open this post in threaded view
|

Re: [UPDATE] iodine-0.5.2-p1 [resubmit] [initscript]

William Orr-2
In reply to this post by Stuart Henderson
On Fri, Apr 29, 2011 at 10:28 AM, Stuart Henderson <[hidden email]> wrote:

> On 2011-04-29, Landry Breuil <[hidden email]> wrote:
>> On Thu, Apr 28, 2011 at 06:36:30PM -0400, William Orr wrote:
>>> Anyone?
>>
>> The rc scripts just don't work out of the box.
>>
>> $sudo /etc/rc.d/iodine start
>> iodine(failed)
>> $sudo /etc/rc.d/iodined start
>> iodined(failed)
>>
>> You should add a README stating what iodine_flags & iodined_flags should
>> be so that it works out of the box, and provide some sane defaults for
>> it in the rc scripts. By default it blocks at startup asking for a
>> password, which doesnt really fit in the rc.d framework...
>
> ouch, no it cannot go in like that. it should have default flags
> which mean that it doesn't block even if people add it to rc_scripts
> without changing anything else.
>
>
>

Ok, thanks. In all the criticisms I've gotten before about this patch,
no one's thought to mention that. So thanks both of you. :)

So, since it blocks asking for a password, should I provide a default
password for use in the init scrips, and then have a postinst notice
advising the user to change it?

Other than that, I have no problem providing sane defaults.

Thanks again!

--
-Will Orr

Reply | Threaded
Open this post in threaded view
|

Re: [UPDATE] iodine-0.5.2-p1 [resubmit] [initscript]

Stuart Henderson
On 2011/04/29 10:35, William Orr wrote:

> On Fri, Apr 29, 2011 at 10:28 AM, Stuart Henderson <[hidden email]> wrote:
> > On 2011-04-29, Landry Breuil <[hidden email]> wrote:
> >> On Thu, Apr 28, 2011 at 06:36:30PM -0400, William Orr wrote:
> >>> Anyone?
> >>
> >> The rc scripts just don't work out of the box.
> >>
> >> $sudo /etc/rc.d/iodine start
> >> iodine(failed)
> >> $sudo /etc/rc.d/iodined start
> >> iodined(failed)
> >>
> >> You should add a README stating what iodine_flags & iodined_flags should
> >> be so that it works out of the box, and provide some sane defaults for
> >> it in the rc scripts. By default it blocks at startup asking for a
> >> password, which doesnt really fit in the rc.d framework...
> >
> > ouch, no it cannot go in like that. it should have default flags
> > which mean that it doesn't block even if people add it to rc_scripts
> > without changing anything else.
> >
> >
> >
>
> Ok, thanks. In all the criticisms I've gotten before about this patch,
> no one's thought to mention that. So thanks both of you. :)
>
> So, since it blocks asking for a password, should I provide a default
> password for use in the init scrips, and then have a postinst notice
> advising the user to change it?

Yes, that would be fine with me.

Reply | Threaded
Open this post in threaded view
|

Re: [UPDATE] iodine-0.5.2-p1 [resubmit] [initscript]

William Orr-2
In reply to this post by David Coppa
On Fri, Apr 29, 2011 at 10:33 AM, David Coppa <[hidden email]> wrote:

> On Fri, Apr 29, 2011 at 4:28 PM, Stuart Henderson <[hidden email]> wrote:
>> On 2011-04-29, Landry Breuil <[hidden email]> wrote:
>>> On Thu, Apr 28, 2011 at 06:36:30PM -0400, William Orr wrote:
>>>> Anyone?
>>>
>>> The rc scripts just don't work out of the box.
>>>
>>> $sudo /etc/rc.d/iodine start
>>> iodine(failed)
>>> $sudo /etc/rc.d/iodined start
>>> iodined(failed)
>>>
>>> You should add a README stating what iodine_flags & iodined_flags should
>>> be so that it works out of the box, and provide some sane defaults for
>>> it in the rc scripts. By default it blocks at startup asking for a
>>> password, which doesnt really fit in the rc.d framework...
>>
>> ouch, no it cannot go in like that. it should have default flags
>> which mean that it doesn't block even if people add it to rc_scripts
>> without changing anything else.
>
> You should discuss with upstream about a sane way for passing
> configuration options from a config file.
>
> ciao,
> david
>

Yeah, I'll throw together a new version of the port with some sane
default options in the rc scripts, and then write up a patch to send
to the upstream to provide config file support.

Thanks for the guidance!

--
-Will Orr