Date: Sat, 10 Dec 2005 03:11:08 +0200 From: Ion-Mihai Tetcu <itetcu@people.tecnik93.com> To: Doug Barton <dougb@FreeBSD.org> Cc: freebsd-ports-bugs@FreeBSD.org, pav@FreeBSD.org, bug-followup@FreeBSD.org Subject: Re: ports/90070: [MAINTAINER] mail/rabl_server: per sougb request, use "new style" RC script Message-ID: <20051210031108.011c1fdf@it.buh.tecnik93.com> In-Reply-To: <439A08B6.2000706@FreeBSD.org> References: <200512090922.jB99MYbH094744@freefall.freebsd.org> <20051209143235.79632f96@it.buh.tecnik93.com> <1134131789.28991.24.camel@pav.hide.vol.cz> <20051209150907.1725f4c9@it.buh.tecnik93.com> <1134134096.28991.27.camel@pav.hide.vol.cz> <20051209153510.5182ebe2@it.buh.tecnik93.com> <1134135523.28991.30.camel@pav.hide.vol.cz> <20051209165102.7b5bf038@it.buh.tecnik93.com> <439A08B6.2000706@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 09 Dec 2005 14:44:06 -0800 Doug Barton <dougb@FreeBSD.org> wrote: > Thanks for including me on this thread, I'm really glad to see some > interest/progress here. > > Ion-Mihai Tetcu wrote: > > On Fri, 09 Dec 2005 14:38:43 +0100 > > Pav Lucistnik <pav@FreeBSD.org> wrote: > > > > [ .. dougb's change is not transparent for ports that > > USE_RC_SUBR .. ] > > > >>>>>> This is absolutely something that must be fixed in the > >>>>>> infrastructure, not in every port over and over again. > > Agreed, and I also agree with Pav's perspective that our interests > are best served by doing this right the first time. That's why I posted on ports a few days ago, before sending this PR. But I got no reply then. > >>>>> My point exactly. And, as I've said, I'm willing to work on > >>>>> this; I could (manually) check the USE_RC_SUBR ports over the > >>>>> weekend to see what kind of rc script they're using. But I need > >>>>> to know which way to go: renaming non-RCng scripts to *.sh, > >>>>> etc., or I could try to convert them to RCmng (but this should > >>>>> be done but maintainers, as they know better what to REQUIRE, > >>>>> etc.) > > To give you an idea of what we're facing; roughly 650 ports install > startup scripts, roughly 350 of them have been converted to use the > new rc.d style (we don't refer to it as rcng anymore), roughly 322 of > those have USE_RC_SUBR in the Makefile, and roughly 151 of those have > the name of the script as the value of the variable (the rest have > some variant of yes/YES/true, etc.). Yes, I saw the numbers. > In an ideal world, it would be great if all of the ports could be > converted to the new style, but I've been very careful not to ask for > that, as I realize it's a big chunk of work, and I'm not in a Given what happen last time this kind of change was tried it's a very wise position :) > position at the moment to help with it. I would be glad to provide > what assistance I can however. One useful idea that I'd like to pass > on that Brooks suggested is that rather than try to convert very > complex boot scripts, it would be easier to install that boot script > in PREFIX/libexec, and have the rc.d-style script call that. > > In terms of the actual conversion, if you wanted to ensure that the > scripts run as close as possible to their current place in the order, > you could use # REQUIRE: localpkg > # BEFORE: securelevel > Otherwise, most scripts just require LOGIN, which should work fine in > most cases. The rcorder(8) page contains all the information you need Actually I find rcorder(8) but esp. rc(8) to be a little disappointing. > to create simple rc.d scripts, feel free to ask on freebsd-rc@ if you > need more help than that. FYI, the current rcorder is up at > http://people.freebsd.org/~dougb/rcorder.all, although it's easy > enough to reproduce if you follow what's in rc. I've attached a Thanks you. Please include this in the rc(8); "basic services", "general purpose daemons", etc. don't tell much, at leas to me. > simple example of a startup script. You can actually make this even > simpler in certain circumstances. See rcorder(8) and /etc/rc.d/usbd > for an example. > > Oh, one more thing, it is no longer necessary to include > KEYWORD: FreeBSD. It would be good however if scripts that start > services include the KEYWORD: shutdown, and a stop_cmd that kills the > service. Besides shutdown and nojail are there any other keywords ? > >>>> Is it a good thing to modify USE_RC_SUBR inside bsd.port.mk to > >>>> install without .sh suffix if ${OSVERSION} > 7000xx and be done > >>>> with it? > > Agree. Also, this will make it a LOT easier when we MFC this change, > which I'll be ready for very soon. We've discussed various ways and the result is the above idea with patch in: ports/90150: update USE_RC_SUBR for >= 700007 > >>> I think so, but we must check that (1) at least all ports that > >>> USE_RC_SUBR have RCng scripts and (2) no port relies on .sh > >>> adding; 1 and 2 are somehow the same thing, as 2 hurts only if 1 > >>> is false. > >>> > >>> In the end we should have only new-style RCng scripts > >>> (files/rc_script.in) whit ports setting USE_RC_SUBR= rc_script.in, > >>> installed as such on HEAD (and sometime on 6-STABLE) and .sh added > >>> for older OSVERSIONs. > > Agreed in principle ... in the long term we'd like to have all boot > scripts installed as just foo, instead of foo.sh. That way we could > return to sourcing scripts that end in .sh into the shell, in case > someone is depending on that behavior. > > >> Other way around, leave USE_RC_SUBR=skript.sh and > >> files/skript.sh.in, to avoid repo churn, and strip .sh when > >> installing on newer OSVERSIONs. > > I'll leave that implementation detail up to y'all. For now this is the way we go. When it's finished moving .sh.in ->.in is easy. [ ... ] > > Hmm, since we have to check the scripts anyway, what if I convert > > any non-RCng for ports that USE_RC_SUBR ? This is on the todo list > > anyway. If something gets broken (== not really broken, but started > > to late or something like that) in the process at least the > > maintainers will have to fix them (as apposed to the current > > situation when we still have non-RCng scripts). > > Given that prior to the change going into HEAD, _all_ of those > scripts were run from /etc/rc.d/localpkg, it should be trivial (as > above) to at least make things no worse than they were, and > correspondingly put a tool in the hands of port authors who need > better control over ordering. Ideally each maintainer should convert his script; but since doesn't happen and with the details you gave us in this email, thanks again, we'll convert the scripts and leave fine-tuning to the maintainers. > There is already one person who has > sent a very well thought out message to freebsd-rc@ asking about > this, and is excited about how he's going to be able to move forward. > > I also read Pav's message, and the proposed patch looks good, modulo > the issue I mentioned above that about 170 of the ports that have > USE_RC_SUBR do not have the name of the port as the value of the > variable. Old style USE_RC_SUBR; I'll go over them next week (but they shouldn't break anything, the scripts are installed by hand with .sh). -- IOnut - Unregistered ;) FreeBSD "user" "Intellectual Property" is nowhere near as valuable as "Intellect" BOFH excuse #53: Little hamster in running wheel had coronary; waiting for replacement to be Fedexed from Wyoming
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051210031108.011c1fdf>