Should etc/rc.d/ike move to ports?

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

Should etc/rc.d/ike move to ports?

dougb
Howdy,

Because it was previously not possible to run scripts for ports in the base
rcorder, and because the rc.d/ike script needed to run well before localpkg,
it was imported into the base, and lives currently in /etc/rc.d. However,
now that I am about to MFC the code that runs ports scripts in the base
rcorder, I'm wondering if we shouldn't add the rc.d script to the port, and
remove it from HEAD and RELENG_6 after my MFC. I would of course be glad to
assist with any details related to the move.

Any thoughts?

Doug

--

     This .signature sanitized for your protection

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-rc
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Should etc/rc.d/ike move to ports?

Simon L. B. Nielsen-4
On 2005.12.16 14:13:34 -0800, Doug Barton wrote:

> Because it was previously not possible to run scripts for ports in the base
> rcorder, and because the rc.d/ike script needed to run well before
> localpkg, it was imported into the base, and lives currently in /etc/rc.d.
> However, now that I am about to MFC the code that runs ports scripts in the
> base rcorder, I'm wondering if we shouldn't add the rc.d script to the
> port, and remove it from HEAD and RELENG_6 after my MFC. I would of course
> be glad to assist with any details related to the move.

Hey,

Sound like a good idea.  I actually hadn't noticed that the ike script
had been updated to point at isakmpd, last I checked it looked like
the ike script was just a leftover from the NetBSD import.

I also thought I had committed the isakmpd rc.d script that I did for
$REALJOB a while ago (based on the rc.d/ike script) to the port, but
it looks like I forgot to do that.

I will try to get the port updated to include an rc.d script this
weekend, but no guarantees that I will get to it - Christmas is coming
way to fast with all the required shopping ;-).

With regard to the magic keywords (mainly REQUIRE/DEBFORE) I assume
the ones currently in src/etc/rc.d/ike should be OK?

--
Simon L. Nielsen

attachment0 (194 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Should etc/rc.d/ike move to ports?

dougb
Simon L. Nielsen wrote:

> On 2005.12.16 14:13:34 -0800, Doug Barton wrote:
>
>> Because it was previously not possible to run scripts for ports in the base
>> rcorder, and because the rc.d/ike script needed to run well before
>> localpkg, it was imported into the base, and lives currently in /etc/rc.d.
>> However, now that I am about to MFC the code that runs ports scripts in the
>> base rcorder, I'm wondering if we shouldn't add the rc.d script to the
>> port, and remove it from HEAD and RELENG_6 after my MFC. I would of course
>> be glad to assist with any details related to the move.
>
> Hey,
>
> Sound like a good idea.  I actually hadn't noticed that the ike script
> had been updated to point at isakmpd, last I checked it looked like
> the ike script was just a leftover from the NetBSD import.

Interesting! In that case, I lean much more strongly toward removing it,
possible even in RELENG_5.

> I also thought I had committed the isakmpd rc.d script that I did for
> $REALJOB a while ago (based on the rc.d/ike script) to the port, but
> it looks like I forgot to do that.

Ok, sounds like you're on top of this then. The preferred way to do this
currently would be to add the script to the files directory, and the
following to the port Makefile:

USE_RC_SUBR= ike.sh

There is already some cool stuff in the ports infrastructure to handle these
scripts. Take a look at databases/mysql323-server if you want an example.
The current infrastructure already handles things like subbing out PREFIX,
etc. for you. In the near future the ports infrastructure will be updated to
then install that file as just ike on systems that are past the MFC date of
the local_startup changes, and as ike.sh on older systems so it will still
work.

> I will try to get the port updated to include an rc.d script this
> weekend, but no guarantees that I will get to it - Christmas is coming
> way to fast with all the required shopping ;-).

*sigh* tell me about it. There is no particular hurry to this, but if you
would please drop me a note when you make this update (just in case I miss
it) I would appreciate it. Ideally, if we delete the script from /etc/rc.d
(which is how I'm leaning), then I'd like to have time to do that so that it
can be MFC'ed before the RELENG_[56] freezes in 6 weeks.

> With regard to the magic keywords (mainly REQUIRE/BEFORE) I assume
> the ones currently in src/etc/rc.d/ike should be OK?

Well, if you use the ones that are there now, it will at least be no worse
than it is now. :)  I don't know enough about this to be sure exactly what
the right thing to do is in regards to ordering. As for the other magic
words, you have to have PROVIDE in there, or rc.d won't recognize it, and if
this script isn't eligible for running in a jail, then the 'nojail' KEYWORD
should stay as well.

hth,

Doug

--

     This .signature sanitized for your protection

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-rc
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Should etc/rc.d/ike move to ports?

Ion-Mihai Tetcu-2
On Fri, 16 Dec 2005 16:45:25 -0800
Doug Barton <[hidden email]> wrote:

> Simon L. Nielsen wrote:
> > On 2005.12.16 14:13:34 -0800, Doug Barton wrote:
> >
> >> Because it was previously not possible to run scripts for ports in
> >> the base rcorder, and because the rc.d/ike script needed to run
> >> well before localpkg, it was imported into the base, and lives
> >> currently in /etc/rc.d. However, now that I am about to MFC the
> >> code that runs ports scripts in the base rcorder, I'm wondering if
> >> we shouldn't add the rc.d script to the port, and remove it from
> >> HEAD and RELENG_6 after my MFC. I would of course be glad to assist
> >> with any details related to the move.

 [ ... ]

> Ok, sounds like you're on top of this then. The preferred way to do
> this currently would be to add the script to the files directory, and
> the following to the port Makefile:
>
> USE_RC_SUBR= ike.sh
>
> There is already some cool stuff in the ports infrastructure to
> handle these scripts. Take a look at databases/mysql323-server if you
> want an example. The current infrastructure already handles things
> like subbing out PREFIX, etc. for you. In the near future the ports
> infrastructure will be updated to then install that file as just ike
> on systems that are past the MFC date of the local_startup changes,
> and as ike.sh on older systems so it will still work.

Better use:
USE_RC_SUBR= ike
and put the script in files/ike.in

Currently this will perform some substitutions on the script (PREFEIX,
etc.) and install it as ike.sh
After pav@'s PR gets commited it will install w/o .sh on rc.d sistems
(HEAD for now), which is, AFAIK what we want in the long run (so we can
differentiate between (non-)sourced scipts based on extension.


--
IOnut - Unregistered ;) FreeBSD "user"
  "Intellectual Property" is   nowhere near as valuable   as "Intellect"

BOFH excuse #150:
Arcserve crashed the server again


_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-rc
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Should etc/rc.d/ike move to ports?

dougb
Ion-Mihai Tetcu wrote:

> Better use:
> USE_RC_SUBR= ike
> and put the script in files/ike.in
>
> Currently this will perform some substitutions on the script (PREFEIX,
> etc.) and install it as ike.sh

Thanks for that, I wasn't aware that a .in vs. .sh.in was already working :)

Doug


--

     This .signature sanitized for your protection

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-rc
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Should etc/rc.d/ike move to ports?

Ion-Mihai Tetcu-2
On Fri, 16 Dec 2005 17:39:27 -0800
Doug Barton <[hidden email]> wrote:

> Ion-Mihai Tetcu wrote:
>
> > Better use:
> > USE_RC_SUBR= ike
> > and put the script in files/ike.in
> >
> > Currently this will perform some substitutions on the script
> > (PREFEIX, etc.) and install it as ike.sh
>
> Thanks for that, I wasn't aware that a .in vs. .sh.in was already
> working :)

Now:
USE_RC_SUBR= name.sh.in --> name.sh
USE_RC_SUBR= name.in --> name.sh
Then:
USE_RC_SUBR= name.sh.in --> name.sh
USE_RC_SUBR= name.in --> name

Is this not what we want ?


--
IOnut - Unregistered ;) FreeBSD "user"
  "Intellectual Property" is   nowhere near as valuable   as "Intellect"

Party-bug in the Aloha protocol

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-rc
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Should etc/rc.d/ike move to ports?

dougb
Ion-Mihai Tetcu wrote:

> On Fri, 16 Dec 2005 17:39:27 -0800
> Doug Barton <[hidden email]> wrote:
>
>> Ion-Mihai Tetcu wrote:
>>
>>> Better use:
>>> USE_RC_SUBR= ike
>>> and put the script in files/ike.in
>>>
>>> Currently this will perform some substitutions on the script
>>> (PREFEIX, etc.) and install it as ike.sh
>> Thanks for that, I wasn't aware that a .in vs. .sh.in was already
>> working :)
>
> Now:
> USE_RC_SUBR= name.sh.in --> name.sh
> USE_RC_SUBR= name.in --> name.sh
> Then:
> USE_RC_SUBR= name.sh.in --> name.sh
> USE_RC_SUBR= name.in --> name
>
> Is this not what we want ?

For the Now part, yes. For the Then part, the important factor is whether
the system is past the local_startup MFC or not. If not, then we always want
to install as name.sh, otherwise the script won't run. If so, then we want
to install as just name. There is also the factor of how to deal with a port
that has a legitimate need to install as name.sh in the post MFC world,
which would mean (after all the ports are fixed) that its boot script gets
sourced into the rc environment, rather than run in a subshell. I'd organize
Then like this:

Pre-MFC system:
USE_RC_SUBR= * --> name.sh
Post-MFC system:
USE_RC_SUBR= name.in --> name (this will be the common case)
USE_RC_SUBR= name.sh.in --> name.sh

Make sense?

Doug


--

     This .signature sanitized for your protection

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-rc
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Should etc/rc.d/ike move to ports?

Ion-Mihai Tetcu-2
On Fri, 16 Dec 2005 17:51:16 -0800
Doug Barton <[hidden email]> wrote:

> Ion-Mihai Tetcu wrote:
> > On Fri, 16 Dec 2005 17:39:27 -0800
> > Doug Barton <[hidden email]> wrote:
> >
> >> Ion-Mihai Tetcu wrote:
> >>
> >>> Better use:
> >>> USE_RC_SUBR= ike
> >>> and put the script in files/ike.in
> >>>
> >>> Currently this will perform some substitutions on the script
> >>> (PREFEIX, etc.) and install it as ike.sh
> >> Thanks for that, I wasn't aware that a .in vs. .sh.in was already
> >> working :)
> >
> > Now:
> > USE_RC_SUBR= name.sh.in --> name.sh
> > USE_RC_SUBR= name.in --> name.sh
> > Then:
> > USE_RC_SUBR= name.sh.in --> name.sh
> > USE_RC_SUBR= name.in --> name
> >
> > Is this not what we want ?
>
> For the Now part, yes. For the Then part, the important factor is
> whether the system is past the local_startup MFC or not. If not, then
> we always want to install as name.sh, otherwise the script won't run.
> If so, then we want to install as just name. There is also the factor
> of how to deal with a port that has a legitimate need to install as
> name.sh in the post MFC world, which would mean (after all the ports
> are fixed) that its boot script gets sourced into the rc environment,
> rather than run in a subshell. I'd organize Then like this:
>
> Pre-MFC system:
> USE_RC_SUBR= * --> name.sh
> Post-MFC system:
> USE_RC_SUBR= name.in --> name (this will be the common case)
> USE_RC_SUBR= name.sh.in --> name.sh
>
> Make sense?

Yes, that's what I (wanted to) say. ("my" then = post-MFC, post-fix_ports).
Pav's PR will get us support for this in bsd.port.mk, the rest is
fixing the ports to be rc.d compatible and repo-copies.


--
IOnut - Unregistered ;) FreeBSD "user"
  "Intellectual Property" is   nowhere near as valuable   as "Intellect"

Mail server hit by UniSpammer


_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-rc
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Should etc/rc.d/ike move to ports?

dougb
Ion-Mihai Tetcu wrote:

> Yes, that's what I (wanted to) say. ("my" then = post-MFC, post-fix_ports).
> Pav's PR will get us support for this in bsd.port.mk, the rest is
> fixing the ports to be rc.d compatible and repo-copies.

That's great, although ironically I _just_ ran into a situation where that
is not the ideal way to do it. :)  I am working on updating misc/compat5x to
use an rc.d-style script, and tried doing it the way that you suggested,
with compat5x.in. When bsd.port.mk tried to create the boot script however,
I got an error because work/compat5x already existed, it was the directory
in work where the tarball unpacked itself. Most of the time this is not
going to be a problem, as the source directory will be versioned (like
foopkg-1.2.3), but this is a corner case that should be kept in mind.

For now I'm going to suggest using compat5x.sh for this particular case, it
can be adjusted down the road if needed.

Doug


--

     This .signature sanitized for your protection

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-rc
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Should etc/rc.d/ike move to ports?

Florent Thoumie
On Fri, 2005-12-16 at 18:21 -0800, Doug Barton wrote:

> Ion-Mihai Tetcu wrote:
>
> > Yes, that's what I (wanted to) say. ("my" then = post-MFC, post-fix_ports).
> > Pav's PR will get us support for this in bsd.port.mk, the rest is
> > fixing the ports to be rc.d compatible and repo-copies.
>
> That's great, although ironically I _just_ ran into a situation where that
> is not the ideal way to do it. :)  I am working on updating misc/compat5x to
> use an rc.d-style script, and tried doing it the way that you suggested,
> with compat5x.in. When bsd.port.mk tried to create the boot script however,
> I got an error because work/compat5x already existed, it was the directory
> in work where the tarball unpacked itself. Most of the time this is not
> going to be a problem, as the source directory will be versioned (like
> foopkg-1.2.3), but this is a corner case that should be kept in mind.
>
> For now I'm going to suggest using compat5x.sh for this particular case, it
> can be adjusted down the road if needed.
        FWIW, I like having .sh.in instead of .in because you
        immediately know that it's a startup script, and it's not that
        hard to remove a .sh suffix in shell.

--
Florent Thoumie
[hidden email]
FreeBSD committer

signature.asc (194 bytes) Download Attachment