Send freebsd-current mailing list submissions to
	freebsd-current@freebsd.org

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.freebsd.org/mailman/listinfo/freebsd-current
or, via email, send a message with subject or body 'help' to
	freebsd-current-request@freebsd.org

You can reach the person managing the list at
	freebsd-current-owner@freebsd.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of freebsd-current digest..."


Today's Topics:

   1. Re: RFC: Alternate patch to have true new-style rc.d scripts
      inports (without touching localpkg) (Oliver Eikemeier)
   2. Re: RFC: Alternate patch to have true new-style rc.d scripts
      inports (without touching localpkg) (Oliver Eikemeier)
   3. Re: RFC: Alternate patch to have true new-style rc.d scripts
      in	ports (without touching localpkg) (Oliver Eikemeier)
   4. [current tinderbox] failure on powerpc/powerpc (FreeBSD Tinderbox)
   5. Re: Is there still sufficient reason for hw.ata.atapi_dma
      being 0 by default? (Maxim Sobolev)
   6. Re: RFC: Alternate patch to have true new-style rc.d scripts
      in	ports (without touching localpkg) (Mike Makonnen)
   7. Re: Synaptics Touchpad sample port adopted for current's
      psm.c (Arne Schwabe)
   8. Re: RFC: Alternate patch to have true new-style rc.d scripts
      in	ports (without touching localpkg) (Andrey Chernov)
   9. GEOM is too verbose (Maxim Sobolev)
  10. Re: RFC: Alternate patch to have true new-style rc.d scripts
      in	ports (without touching localpkg) (Mike Makonnen)
  11. Re: GEOM is too verbose  (Poul-Henning Kamp)
  12. Hangs if witness/invariants are disabled (Daniel Lang)
  13. Re: GEOM is too verbose (Maxim Sobolev)
  14. Re: RFC: Alternate patch to have true new-style rc.d scripts
      in	ports (without touching localpkg) (Andrey Chernov)
  15. Re: RFC: Alternate patch to have true new-style rc.d scripts
      in	ports (without touching localpkg) (Oliver Eikemeier)
  16. Re: RFC: Alternate patch to have true new-style rc.d scripts
      in	ports (without touching localpkg) (Mike Makonnen)
  17. Re: RFC: Alternate patch to have true new-style rc.d scripts
      in	ports (without touching localpkg) (Mike Makonnen)
  18. 	Curious MySQL building problem /w GCC 3.4.2 (and firefox or
      mozilla) (K Chapman)
  19. Re: 5.2.1-R panic still occurs on a recent -CURRENT (Markie)


----------------------------------------------------------------------

Message: 1
Date: Sat, 31 Jul 2004 14:25:06 +0200
From: Oliver Eikemeier <eikemeier@fillmore-labs.com>
Subject: Re: RFC: Alternate patch to have true new-style rc.d scripts
	inports (without touching localpkg)
To: "Rob MacGregor" <freebsd.macgregor@blueyonder.co.uk>
Cc: freebsd-rc@freebsd.org
Message-ID: <A7CB730E-E2EC-11D8-9C56-00039312D914@fillmore-labs.com>
Content-Type: text/plain; charset=US-ASCII; format=flowed

Rob MacGregor wrote:

>> -----Original Message-----
>> From: Oliver Eikemeier [mailto:eikemeier@fillmore-labs.com]
>>
>> Nope, only two kinds of scripts will be run: old-style scripts with a
>> `.sh' extension, and new-style rc.d scripts without extension. So you
>> should not run into an trouble with scripts renamed to `.old' or
>> `.disabled', except when you got into the habit to *remove* the
>> extension to disable the scripts.
>
> Ok, I'm confused (but then I haven't had my coffee yet).
>
> You're saying that any script ending in .sh is assumed to be an old 
> style one
> and processed that way.  You're also saying that anything else is 
> assumed to
> be a new style script, correct?

No, only scripts without any extension are assumed to be new-style rc.d. 
Everthing else is ignored.

> However, then you say that renaming scripts (new or old?) will be fine, 
> as
> long as you rename them to .old or .disabled - anything else will still 
> be run
> as if it's a new style script?

No, I propose that you ignore everthing that has a extension (a dot in 
its filename), except `.sh' scripts, which are considered to be 
old-style.

> I just want to ensure that I don't get bit by this when it goes live :)

Yup. It will be documented then.

-Oliver


------------------------------

Message: 2
Date: Sat, 31 Jul 2004 14:32:46 +0200
From: Oliver Eikemeier <eikemeier@fillmore-labs.com>
Subject: Re: RFC: Alternate patch to have true new-style rc.d scripts
	inports (without touching localpkg)
To: Garance A Drosihn <drosih@rpi.edu>
Cc: Rob MacGregor <freebsd.macgregor@blueyonder.co.uk>
Message-ID: <BA08DC36-E2ED-11D8-9C56-00039312D914@fillmore-labs.com>
Content-Type: text/plain; charset=US-ASCII; format=flowed

Garance A Drosihn wrote:

> At 10:12 AM +0100 7/31/04, Rob MacGregor wrote:
>>  > -----Original Message-----
>>>  From: owner-freebsd-current@freebsd.org
>>>  [mailto:owner-freebsd-current@freebsd.org] On Behalf Of
>>>  Oliver Eikemeier
>>>
>>  > I don't think so. The patch is completely backwards compatible,
>>  > which means everything will run as it did before. Why should
>>  > anyone be confused by that?
>>
>> However, everybody who's used to disabling scripts by changing
>> the name such that it doesn't end in .sh is going to be badly
>> bitten by this.  Suddenly all those "disabled" startup scripts
>> will run.
>>
>>  > As stated above: everything users did before will continue to
>>  > work.
>>
>> Except of course, disabling scripts by renaming them :)
>
> I seem to remember that the safe way to disable scripts was
> to change the permissions on them so they were not executable.
> This was considered better than renaming them, because the
> file remained at the location it was installed at.  This
> meant it would still be removed if the package was removed,
> for instance.
>
> Is that no longer true?

No, that is probably the best solution. But a) some ports install their 
scripts as <service>.sh.sample, so that they are not enabled by default, 
and some users obviously did just rename the scripts. It will be not 
easy, and error-prone to hunt all those instances down. Of course it's 
doable, and would be somewhat `cleaner', but I believe it's better when 
we keep the previously documented behaviour as far as possible.

-Oliver


------------------------------

Message: 3
Date: Sat, 31 Jul 2004 15:24:56 +0200
From: Oliver Eikemeier <eikemeier@fillmore-labs.com>
Subject: Re: RFC: Alternate patch to have true new-style rc.d scripts
	in	ports (without touching localpkg)
To: Mike Makonnen <mtm@identd.net>
Cc: freebsd-rc@freebsd.org
Message-ID: <03C7D82F-E2F5-11D8-9C56-00039312D914@fillmore-labs.com>
Content-Type: text/plain; charset=US-ASCII; format=flowed

Mike Makonnen wrote:

> On Sat, Jul 31, 2004 at 11:12:20AM +0200, Oliver Eikemeier wrote:
>> Mike Makonnen wrote:
>>
>>>
>>> I appreciate the effort you are putting into this. However, these 
>>> hacks
>>> will only end up confusing users to no-end.
>>
>> I don't think so. The patch is completely backwards compatible, which
>> means everything will run as it did before. Why should anyone be
>> confused by that?
>
> They will be confused because base system and ports rc.d scripts will
> not behave the same. If a script in /etc/rc.d has a .sh extension in
> /etc/rc.d it gets sourced in the same shell. If they put the script in
> /usr/local/etc/rc.d it doesn't.

Lets be realistic: Nearly nobody wants his scripts to be sourced in the 
startup shell, especially not in /usr/local/etc/rc.d. People who really 
want to do this are experts that exactly know what they are doing, and 
are not easily confused.

>>> Don't forget that it is
>>> not only ports scripts that go in /usr/local/etc/rc.d. Lots of users
>>> also choose to put their local scripts there instead of /etc/rc.d. 
>>> This
>>> means that their scripts will behave differently depending on whether
>>> they put them in /etc/rc.d or /usr/local/etc/rc.d.
>>
>> As stated above: everything users did before will continue to work.
>> Besides, the patch finally unifies /etc/rc.d and /usr/local/etc/rc.d in
>> the most important aspect: participating in rcorder(8). A new-style
>> script will do the same, no matter whether put in /etc/rc.d or
>> /usr/local/etc/rc.d.
>
> Except if it has a .sh extension.

Which prevents a lot of breakage.

>> Legacy script were never executed when put in
>> /etc/rc.d, and won't after this patch. I can't really follow your
>> argument here.
>
> I'm not talking about legacy scripts. I mean local rc.d scripts.

Local rc.d scripts will continue to be executed as before.

>>> Also, it's not
>>> a good idea to bar the possibility that a future port might need
>>> to be sourced in it's parent shell (i.e in /etc/rc).
>>
>> I consider this to be dangerous. When we ever need such a 
>> functionality,
>> we should choose a less prominent extension that `.sh' for that, or 
>> scan
>> for a special keyword.
>
> .sh is what we have and that's what we should go with. Changing it to
> something else would be a gratuitous change and digression from NetBSD
> for the sake of compatibility with a non-STABLE branch.

I'm not exactly concerned with NetBSD compatibility here, especially 
considering the facts that (a) rc.subr has already set_rcvar with `case 
${OSTYPE}' in it (only in the FreeBSD version, I can't find that in 
NetBSD), which doesn't exist in NetBSD, (b) The only two scripts with 
an `.sh' extension (early.sh rcconf.sh) are FreeBSD specific, while the 
only NetBSD script with an `.sh' extension (bootconf.sh) doensn't exist 
in FreeBSD. Compatibility with NetBSD seems to be a myth, especially 
since they never bothered to merge the changes back from FreeBSD.

>>> Also, a sysadmin
>>> might have a local script in /usr/local/etc/rc.d that may for example,
>>> load a different rc.conf depending on circumstances.
>>
>> {He,She} might, although I consider such a functionality to be exotic
>> and fragile. Anyway, /etc/rc.d could be used for that purpose.
>
> You have no way of knowing what users want to do or what their 
> circumstances
> are. This would be be an instance of enforcing policy instead of
> providing mechanisms for users to do what they want.

When you have no way of knowing what users want to do, how can you 
provide mechanisms for them to do so?

>>> Additionally,
>>> if ports rc.d scripts are going to participate in the boot 
>>> rcorder(8)ing
>>> then they need to behave like the base system rc.d script.
>>
>> Jup, that is the purpose of this patch.
>>
>>> To do otherwise
>>> would be too confusing. IMO your patch contravenes the general policy 
>>> of
>>> "mechanisms, not policy."
>>
>> Ehm, what does that mean? A policy that states `no policies'?
>
> It means you should not preclude users putting local rc.d scripts with
> .sh extenstions in /usr/local/etc/rc.d. By barring it you are enforcing
> a policy (your idea of what they should do). Whereas if rc.d scripts
> in /usr/local/etc/rc.d behaved just like they do in /etc/rc.d, then
> users can put their scripts wherever they think is appropriate for
> their circumstances.

(a) I want rc.d scripts in /usr/local/etc/rc.d to behave exactly like 
they do in /etc/rc.d, namely participate in rcorder(8). This was the 
most common reason to move scripts from /usr/local/etc/rc.d to /etc/rc.d.

(b) While doing this, I want to keep documented behaviour, so users can 
keep what worked for them before.

>> ports .sh script shouldn't be sourced in the current shell, since these
>> are old-style startup scripts that won't work with the changed 
>> semantics
>> (as we had to observe recently).
>
> The people that will be affected by this are the people that run 
> -CURRENT
> or a prior 5.x release. We don't have to (and we shouldn't) provide
> backwards compatibility for -CURRENT user. For those running a prior
> 5.x release we can provide patches to their rc.d/localpkg.

We shouldn't break backwards compatibility for no good reason. 
Compatibility with NetBSD in aspects we never have been compatible is 
not a good reason to introduce an incompatiblity with -CURRENT.

>>> 2. Sourcing of ports rc.d scripts with the base sytem scripts to be
>>>   put behind a knob. If the knob is enabled rc.d/localpkg does not
>>>   run rc.d scripts in the local_startup directories. If it is turned
>>>   off, then rc.d/localpkg does ports rc.d scripts in addition to the
>>>   legacy scripts.
>>
>> I see no reason why localpkg should do rc.d scripts. It was always 
>> meant
>> to execute old-style scripts, and this behavior shouldn't be changed.
>> Why do you want to introduce a semantic split here, that you seem to 
>> try
>> to avoid above?
>
> This feature MUST be put behind a knob. It
> might have been okay if we had discussed this earlier in the 5-CURRENT
> lifecycle, but not just before 5-STABLE. We need more time to evaluate
> the impact of ordering ports rc.d scripts with the base system scripts.
> Two weeks is not enough time.

I see absolutely no problems with having this feature now. You wanted 
similar behaviour of scripts in /etc/rc.d and /usr/local/etc/rc.d, and 
this is what this patch provides. It is completely backwards compatible, 
so we don't have to fear breakage. Every new port that starts to 
participate in rcorder(8) could be tested individually by the maintainer 
before submitting, so this should be pretty save. And we have time for 
an adequate migration phase, which will help us detect problems. What 
should be the issues of ordering ports rc.d scripts with the base system 
scripts, especially when we require that nearly every of them has a 
`REQUIRE: LOGIN' line? I except very few have the need for something 
else, but the base will greatly benefit from them.

>>> It was mentioned in another thread that this would break compatibility
>>> with people running a prior 5.x release (-current does not qualify for
>>> backwards compatibility in my book). Since we are talking about four
>>> releases (5.0, 5.1, 5.2, 5.2.1) it should be easy enough to provide
>>> patches for their rc.d/localpkg scripts. The patch could be a 
>>> "required
>>> upgrade" (we still have those I believe) for those people.
>>
>> It's easy not to break backwards compatibility, so why should we do
>> this, especially shortly before going -STABLE? I can't see what the 
>> real
>> benefits of this approach are. Old style scripts rely on documented
>> behavior in rc(8), so there is no reason to break them.
>
> How does what I committed break old-style scripts? It only breaks 
> improperly
> written rc.d scripts. (BTW I don't blame the maintainers for writing 
> them
> improperly-- they were relying on a buggy version of rc.d/localpkg)

Ah, no: They where relying on documented behaviour in rc(8). localpkg is 
not buggy, and should not be changed. The scripts are not buggy either, 
they are simply old-style scripts that source rc.subr and use some of 
its features. They have never been tested as rc.d scripts, but it should 
be easy to convert them to become  that, since they are pretty similar. 
Nevertheless one should not be confused of their character because of 
their similarity to rc.d scripts: they are not, and should not be 
treated so. Read rc(8) on how they should be handled. What we are trying 
to do here is to introduce a *new* functionality, which requires new 
scripts (although they conversion should be easy in most cases).

> The crux of my problem with your patch is this:
>
>    You are proposing changing the behavior of rc.d for the sake of 
> backwards
>    compatibility with -CURRENT. Am I the only one who thinks this is 
> crazy?

The only proposal I made in changing the behavior of rc.d is changing 
the extension to something more well thought out, like `.rc'. Said that, 
I can live with keeping `.sh' as the extension for sourcing rc.d 
scripts, although it will do us no good. Anyway, I'm not a big fan of 
changing documented behavior, be it -CURRENT or not. I think this is a 
pretty reasonable attitude, but YMMV.

-Oliver


------------------------------

Message: 4
Date: Sat, 31 Jul 2004 09:24:49 -0400 (EDT)
From: FreeBSD Tinderbox <tinderbox@freebsd.org>
Subject: [current tinderbox] failure on powerpc/powerpc
To: FreeBSD Tinderbox <tinderbox@freebsd.org>, <current@freebsd.org>,
	<powerpc@freebsd.org>
Message-ID: <20040731132449.877B27303F@freebsd-current.sentex.ca>

TB --- 2004-07-31 13:07:08 - tinderbox 2.3 running on freebsd-current.sentex.c
a
TB --- 2004-07-31 13:07:08 - starting CURRENT tinderbox run for powerpc/powerp
c
TB --- 2004-07-31 13:07:08 - cleaning the sandbox
TB --- 2004-07-31 13:08:19 - checking out the source tree
TB --- 2004-07-31 13:08:19 - cd /home/tinderbox/sandbox/CURRENT/powerpc/powerp
c
TB --- 2004-07-31 13:08:19 - /usr/bin/cvs -f -R -Q -d/home/ncvs checkout -P -A
 src
TB --- 2004-07-31 13:16:32 - WARNING: /home/tinderbox/sandbox/powerpc.diff doe
s not exist
TB --- 2004-07-31 13:16:32 - building world (CFLAGS=-O -pipe)
TB --- 2004-07-31 13:16:32 - cd /home/tinderbox/sandbox/CURRENT/powerpc/powerp
c/src
TB --- 2004-07-31 13:16:32 - /usr/bin/make -B buildworld
>>> Rebuilding the temporary build tree
>>> stage 1.1: legacy release compatibility shims
>>> stage 1.2: bootstrap tools
>>> stage 2.1: cleaning up the object tree
>>> stage 2.2: rebuilding the object tree
>>> stage 2.3: build tools
>>> stage 3: cross tools
>>> stage 4.1: building includes
>>> stage 4.2: building libraries
[...]
cc -fpic -DPIC -O -pipe  -I/tinderbox/CURRENT/powerpc/powerpc/src/kerberos5/li
b/libasn1/../../../crypto/heimdal/lib/asn1 -I/tinderbox/CURRENT/powerpc/powerp
c/src/kerberos5/lib/libasn1/../../../crypto/heimdal/lib/roken -I. -DHAVE_CONFI
G_H -I/tinderbox/CURRENT/powerpc/powerpc/src/kerberos5/lib/libasn1/../../inclu
de -DINET6  -c asn1_TGS_REP.c -o asn1_TGS_REP.So
cc -fpic -DPIC -O -pipe  -I/tinderbox/CURRENT/powerpc/powerpc/src/kerberos5/li
b/libasn1/../../../crypto/heimdal/lib/asn1 -I/tinderbox/CURRENT/powerpc/powerp
c/src/kerberos5/lib/libasn1/../../../crypto/heimdal/lib/roken -I. -DHAVE_CONFI
G_H -I/tinderbox/CURRENT/powerpc/powerpc/src/kerberos5/lib/libasn1/../../inclu
de -DINET6  -c asn1_TGS_REQ.c -o asn1_TGS_REQ.So
cc -fpic -DPIC -O -pipe  -I/tinderbox/CURRENT/powerpc/powerpc/src/kerberos5/li
b/libasn1/../../../crypto/heimdal/lib/asn1 -I/tinderbox/CURRENT/powerpc/powerp
c/src/kerberos5/lib/libasn1/../../../crypto/heimdal/lib/roken -I. -DHAVE_CONFI
G_H -I/tinderbox/CURRENT/powerpc/powerpc/src/kerberos5/lib/libasn1/../../inclu
de -DINET6  -c asn1_Ticket.c -o asn1_Ticket.So
cc -fpic -DPIC -O -pipe  -I/tinderbox/CURRENT/powerpc/powerpc/src/kerberos5/li
b/libasn1/../../../crypto/heimdal/lib/asn1 -I/tinderbox/CURRENT/powerpc/powerp
c/src/kerberos5/lib/libasn1/../../../crypto/heimdal/lib/roken -I. -DHAVE_CONFI
G_H -I/tinderbox/CURRENT/powerpc/powerpc/src/kerberos5/lib/libasn1/../../inclu
de -DINET6  -c asn1_TicketFlags.c -o asn1_TicketFlags.So
cc -fpic -DPIC -O -pipe  -I/tinderbox/CURRENT/powerpc/powerpc/src/kerberos5/li
b/libasn1/../../../crypto/heimdal/lib/asn1 -I/tinderbox/CURRENT/powerpc/powerp
c/src/kerberos5/lib/libasn1/../../../crypto/heimdal/lib/roken -I. -DHAVE_CONFI
G_H -I/tinderbox/CURRENT/powerpc/powerpc/src/kerberos5/lib/libasn1/../../inclu
de -DINET6  -c asn1_TransitedEncoding.c -o asn1_TransitedEncoding.So
cc -fpic -DPIC -O -pipe  -I/tinderbox/CURRENT/powerpc/powerpc/src/kerberos5/li
b/libasn1/../../../crypto/heimdal/lib/asn1 -I/tinderbox/CURRENT/powerpc/powerp
c/src/kerberos5/lib/libasn1/../../../crypto/heimdal/lib/roken -I. -DHAVE_CONFI
G_H -I/tinderbox/CURRENT/powerpc/powerpc/src/kerberos5/lib/libasn1/../../inclu
de -DINET6  -c asn1_UNSIGNED.c -o asn1_UNSIGNED.So
building shared library libasn1.so.7
Abort trap (core dumped)
*** Error code 134

Stop in /tinderbox/CURRENT/powerpc/powerpc/src/kerberos5/lib/libasn1.
*** Error code 1

Stop in /tinderbox/CURRENT/powerpc/powerpc/src.
*** Error code 1

Stop in /tinderbox/CURRENT/powerpc/powerpc/src.
*** Error code 1

Stop in /tinderbox/CURRENT/powerpc/powerpc/src.
*** Error code 1

Stop in /tinderbox/CURRENT/powerpc/powerpc/src.
TB --- 2004-07-31 13:24:49 - WARNING: /usr/bin/make returned exit code  1 
TB --- 2004-07-31 13:24:49 - ERROR: failed to build world
TB --- 2004-07-31 13:24:49 - tinderbox aborted


------------------------------

Message: 5
Date: Sat, 31 Jul 2004 17:51:42 +0300
From: Maxim Sobolev <sobomax@portaone.com>
Subject: Re: Is there still sufficient reason for hw.ata.atapi_dma
	being 0 by default?
To: S?ren Schmidt<sos@DeepCore.dk>
Cc: Chuck Swiger <cswiger@mac.com>
Message-ID: <410BB1FE.7050804@portaone.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

S�ren Schmidt wrote:

> Chuck Swiger wrote:
> 
>> S�ren Schmidt wrote:
>>
>>> Maxim Sobolev wrote:
>>>
>>>> Since high-speed CD-RW/DVD-RW recorders (32x - 52x) are commodity 
>>>> now IMO it makes sense to review hw.ata.atapi_dma default of 0, 
>>>> since apparently PIO mode can't support necessary sustained data 
>>>> transfer rates anymore. For example I had had problems burning RWs 
>>>> on 16-24x with several drives in PIO mode, which gone when I've 
>>>> switched to DMA.
>>
>>
>>
>> Before CD burners became common, having this sysctl default to zero 
>> was almost entirely harmless: people would simply read from CD-ROM 
>> drives slower than optimal.  If we change the default to one, people 
>> with fast burners will no longer generate coasters by default too.  In 
>> other words, Maxim has provided a pretty good reason for changing the 
>> default of atapi_dma,  I think.  :-)
> 
> 
> Actually not, most if not all modern fast burners implements some sort 
> of "burn proof" ie no coasters at all due to buffer underruns...

Actually it was not looking like underruns. I had weird problems burning 
RWs at 24x in PIO with three different burners - the burncd process just 
hanged solidly at random position, only atacontrol reinit helped. 
Machine was 100% idle (Celeron 2.4GHz). Switching to DMA33 solved the 
problem.

-Maxim

> 
>>> Hmm, things are still messy, but most drives that support UDMA33 can 
>>> do ATAPI dma. However, that is only part of the equation, the chipset 
>>> has its hands in there as well, and unfortunatly there seems to be no 
>>> good way to detect when it works and when it doesnt.
>>
>>
>>
>> If the chipset is broken, why doesn't it default to using PIO4 rather 
>> than UDMA?  :-)  Anyway, doesn't there exist fallback code in 
>> dev/ata/ata-disk.c:
>>
>>         /* if this is a UDMA CRC error, reinject request */
>> [ ... ]
>>                 printf(" falling back to PIO mode\n");
>>
>> ...which will switch a device generating errors from UDMA mode to 
>> PIO?  Can this check also turn off using atapi_dma (if using PIO 
>> doesn't already imply not using DMA)?
> 
> 
> Not really, the problem with ATAPI dma is that if it fails it most 
> likely locks up the machine, so there is no way to back pedal...
> 
> -S�ren
> 
> 
> 


------------------------------

Message: 6
Date: Sat, 31 Jul 2004 17:56:16 +0300
From: Mike Makonnen <mtm@identd.net>
Subject: Re: RFC: Alternate patch to have true new-style rc.d scripts
	in	ports (without touching localpkg)
To: Oliver Eikemeier <eikemeier@fillmore-labs.com>
Cc: freebsd-rc@freebsd.org
Message-ID: <20040731145616.GA14576@rogue.acs-et.com>
Content-Type: text/plain; charset=us-ascii

On Sat, Jul 31, 2004 at 03:24:56PM +0200, Oliver Eikemeier wrote:
> Mike Makonnen wrote:
> 
> 
> Lets be realistic: Nearly nobody wants his scripts to be sourced in the 
> startup shell, especially not in /usr/local/etc/rc.d. People who really 
> want to do this are experts that exactly know what they are doing, and 
> are not easily confused.

*sigh* You cannot arbitrarily declare that "nearly nobody wants his
scripts to be sourced in the startup shell". You have no idea of knowing
what a user might want to do with his system and what his level of
expertise is.

> >>Legacy script were never executed when put in
> >>/etc/rc.d, and won't after this patch. I can't really follow your
> >>argument here.
> >
> >I'm not talking about legacy scripts. I mean local rc.d scripts.
> 
> Local rc.d scripts will continue to be executed as before.

except if they have a .sh extension.

> 
> I'm not exactly concerned with NetBSD compatibility here, especially 
> considering the facts that (a) rc.subr has already set_rcvar with `case 
> ${OSTYPE}' in it (only in the FreeBSD version, I can't find that in 
> NetBSD), which doesn't exist in NetBSD, (b) The only two scripts with 
> an `.sh' extension (early.sh rcconf.sh) are FreeBSD specific, while the 
> only NetBSD script with an `.sh' extension (bootconf.sh) doensn't exist 
> in FreeBSD. Compatibility with NetBSD seems to be a myth, especially 
> since they never bothered to merge the changes back from FreeBSD.

I don't mean source code compatibility. I don't really care *too much*
about that either. What I am concerned with is compatibility 
behaviour-wise.

> 
> >>>Also, a sysadmin
> >>>might have a local script in /usr/local/etc/rc.d that may for example,
> >>>load a different rc.conf depending on circumstances.
> >>
> >>{He,She} might, although I consider such a functionality to be exotic
> >>and fragile. Anyway, /etc/rc.d could be used for that purpose.
> >
> >You have no way of knowing what users want to do or what their 
> >circumstances
> >are. This would be be an instance of enforcing policy instead of
> >providing mechanisms for users to do what they want.
> 
> When you have no way of knowing what users want to do, how can you 
> provide mechanisms for them to do so?

By leaving their options open. By not forcing them to do it one way.

> (a) I want rc.d scripts in /usr/local/etc/rc.d to behave exactly like 
> they do in /etc/rc.d, namely participate in rcorder(8). This was the 
> most common reason to move scripts from /usr/local/etc/rc.d to /etc/rc.d.

If ports rc.d scripts with .sh extensions aren't sourced in the same shell,
then they don't behave "exactly like they do in /etc/rc.d". Participating
in the boot ordering is not the stick by which the "rc.d'ness" (for lack
of a better word) of a script is measured.

> 
> (b) While doing this, I want to keep documented behaviour, so users can 
> keep what worked for them before.

Correction-- what worked for them in most of 5-CURRENT up to now.

> We shouldn't break backwards compatibility for no good reason. 
> Compatibility with NetBSD in aspects we never have been compatible is 
> not a good reason to introduce an incompatiblity with -CURRENT.

We *have* been compatible with respect to behaviour of an rc.d script.
While we have digressed somewhat by *adding* features, the base behaviour
is the same.

Additionaly, compatibility with -CURRENT is not a valid
excuse for introducing hacks or allowing buggy behaviour to continue.

> 
> >>>2. Sourcing of ports rc.d scripts with the base sytem scripts to be
> >>>  put behind a knob. If the knob is enabled rc.d/localpkg does not
> >>>  run rc.d scripts in the local_startup directories. If it is turned
> >>>  off, then rc.d/localpkg does ports rc.d scripts in addition to the
> >>>  legacy scripts.
> >>
> >>I see no reason why localpkg should do rc.d scripts. It was always 
> >>meant
> >>to execute old-style scripts, and this behavior shouldn't be changed.
> >>Why do you want to introduce a semantic split here, that you seem to 
> >>try
> >>to avoid above?
> >
> >This feature MUST be put behind a knob. It
> >might have been okay if we had discussed this earlier in the 5-CURRENT
> >lifecycle, but not just before 5-STABLE. We need more time to evaluate
> >the impact of ordering ports rc.d scripts with the base system scripts.
> >Two weeks is not enough time.
> 
> I see absolutely no problems with having this feature now. You wanted 
> similar behaviour of scripts in /etc/rc.d and /usr/local/etc/rc.d, and 
> this is what this patch provides.

*sigh* No, it doesn't. It hacks rc.d to treat /usr/local/etc/rc.d scripts
with a .sh extension as old style scripts. That is not the same thing.

> It is completely backwards compatible, 
> so we don't have to fear breakage. Every new port that starts to 
> participate in rcorder(8) could be tested individually by the maintainer 
> before submitting, so this should be pretty save.

NO, because it's impossible for the maintainer to test it with even a
fraction of the possible combinations. Remember that the script has to
play nice with the scripts as they are currently in /etc/rc.d, with any
future changes we might have to make to the ordering, with any
new scripts we might add in the future (or we might have to remove
a script the script depends on), with current ports rc.d scripts,
with future ports rc.d scripts, and with any local rc.d scripts
written by a user.  By defenition, it is impossible for a maintainer
to be absolutely certain that his script will not break something.

> And we have time for 
> an adequate migration phase, which will help us detect problems. What 
> should be the issues of ordering ports rc.d scripts with the base system 
> scripts, especially when we require that nearly every of them has a 
> `REQUIRE: LOGIN' line? I except very few have the need for something 
> else, but the base will greatly benefit from them.
> 

1. Not all ports require that they be ordered with the base system scripts. As

   such not all users will benefit from ports being ordered along with the
   base system. It makes sense that these people be able to reduce their
   security exposure by keeping the ports startup order as it is now
   (i.e. somewhat separate from the base system scripts).

2. This is a major change that requires more than just 2 weeks of testing.
   If it should happen to break something users should be able to turn it
   off.

> 
> Ah, no: They where relying on documented behaviour in rc(8). localpkg is 
> not buggy, and should not be changed. The scripts are not buggy either, 
> they are simply old-style scripts that source rc.subr and use some of 
> its features. They have never been tested as rc.d scripts, but it should 
> be easy to convert them to become  that, since they are pretty similar. 
> Nevertheless one should not be confused of their character because of 
> their similarity to rc.d scripts: they are not, and should not be 
> treated so. Read rc(8) on how they should be handled. What we are trying 
> to do here is to introduce a *new* functionality, which requires new 
> scripts (although they conversion should be easy in most cases).
> 

Oh please, let's not get into semantic arguments here. If they
source /etc/rc.subr and implement the functionality that typically
defines rc.d scripts, then thay are rc.d scripts (or atleast
they are trying to be).

And since you brought up rc(8), these rc.d scripts you want to treat
as old style scripts violate one of the rules of old-style scripts:

     o   The output from each script is traditionally a space character, fol-

         lowed by the name of the software package being started or shut down,

         without a trailing newline character (see the EXAMPLES section).

rc(8) also gives a clear example of what an old-style ports script should
look like:

     The following is a simple, hypothetical example of an old-style
     /usr/local/etc/rc.d/ script, which would start a daemon at boot time, and

     kill it at shutdown time.

           #!/bin/sh -
           #
           #    initialization/shutdown script for foobar package

           case "$1" in
           start)
                   /usr/local/sbin/foo -d && echo -n ' foo'
                   ;;
           stop)
                   kill `cat /var/run/foo.pid` && echo -n ' foo'
                   ;;
           *)
                   echo "unknown option: $1 - should be 'start' or 'stop'" >&2

                   ;;
           esac


> 
> The only proposal I made in changing the behavior of rc.d is changing 
> the extension to something more well thought out, like `.rc'. Said that, 
> I can live with keeping `.sh' as the extension for sourcing rc.d 
> scripts, although it will do us no good. Anyway, I'm not a big fan of 
> changing documented behavior, be it -CURRENT or not. I think this is a 
> pretty reasonable attitude, but YMMV.

Ok, can you do the following then:

1. When you (portmgr) are ready put back the rc.d/localpkg changes
2. Put the ordering of ports scripts with base system
   scripts behind an rc.conf(5) knob, and modify your patch so both
   /etc/rc and /etc/rc.d/localpkg do the right thing depending on whether
   it's on or off.

Cheers.
-- 
Mike Makonnen  | GPG-KEY: http://www.identd.net/~mtm/mtm.asc
mtm@identd.net | Fingerprint: AC7B 5672 2D11 F4D0 EBF8  5279 5359 2B82 7CD4 1F
55
mtm@FreeBSD.Org| FreeBSD - Unleash the Daemon !

------------------------------

Message: 7
Date: Sat, 31 Jul 2004 17:01:58 +0200
From: Arne Schwabe <arne@rfc2549.org>
Subject: Re: Synaptics Touchpad sample port adopted for current's
	psm.c
To: "Daniel O'Connor" <doconnor@gsoft.com.au>
Cc: freebsd-current@freebsd.org
Message-ID: <86ekmsz0d5.fsf@kamino.rfc1149.org>
Content-Type: text/plain; charset="us-ascii"

"Daniel O'Connor" <doconnor@gsoft.com.au> writes:

> On Sat, 31 Jul 2004 16:17, Brian Fundakowski Feldman wrote:
>> Do you know a quick way to identify whether the PS/2 mouse is actually
>> a Synaptics or not?
>
> Not without kernel code AFAIK (psm won't let you pass enough to the mouse to
 
> actually put it into Synaptics mode)

Yepp, you are right, identyfing a ps/2 device is sending the device
some strange ps/2 request combination (like set sample rate 02, set
sample rate 01, set sample rate 00, get resolution) and look how the
ps/2 device reacts. In FreeBSDs ps/2 implementation you can't do this
>From user space. (You could if you do same really bad hack, like
direct i/o and /dev/kmem stuff, but that does not count ;))

Arne
-- 
compiling millions of tiny c-programs...done
checking for a working configure script... not found
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20040731/
812ddace/attachment-0001.bin

------------------------------

Message: 8
Date: Sat, 31 Jul 2004 19:05:42 +0400
From: Andrey Chernov <ache@nagual.pp.ru>
Subject: Re: RFC: Alternate patch to have true new-style rc.d scripts
	in	ports (without touching localpkg)
To: Mike Makonnen <mtm@identd.net>
Cc: freebsd-rc@FreeBSD.ORG
Message-ID: <20040731150542.GA5612@nagual.pp.ru>
Content-Type: text/plain; charset=us-ascii

On Sat, Jul 31, 2004 at 05:56:16PM +0300, Mike Makonnen wrote:
> On Sat, Jul 31, 2004 at 03:24:56PM +0200, Oliver Eikemeier wrote:
> > Lets be realistic: Nearly nobody wants his scripts to be sourced in the 
> > startup shell, especially not in /usr/local/etc/rc.d. People who really 
> > want to do this are experts that exactly know what they are doing, and 
> > are not easily confused.
> 
> *sigh* You cannot arbitrarily declare that "nearly nobody wants his
> scripts to be sourced in the startup shell". You have no idea of knowing
> what a user might want to do with his system and what his level of
> expertise is.

That argument is against your position. If you have no idea, user (i.e. 
script) can do _anything_, I mean easily damage startup shell even without 
evil intentions. You know example - apache13. We need minimal protection, 
separating base scripts level and ports scripts level, I mean executing 
them in the subshells. There is rc.local (or a like) to do something with 
startup shell locally, not from inside ports system.

-- 
Andrey Chernov | http://ache.pp.ru/

------------------------------

Message: 9
Date: Sat, 31 Jul 2004 18:11:21 +0300
From: Maxim Sobolev <sobomax@portaone.com>
Subject: GEOM is too verbose
To: phk@freebsd.org
Cc: current@freebsd.org
Message-ID: <410BB699.3060803@portaone.com>
Content-Type: text/plain; charset=us-ascii; format=flowed

Hi Poul,

I use application that detects size of disk using binary search. On 
current each attempt to read beyond disk boundary causes message on 
console, which is annoying. Can you please turn them off, since 
apparently they serve no meaningful purpose.

Thanks!

-Maxim

g_dev_done(0xc12e8198) had error 5
g_dev_done(0xc12e82a8) had error 5
g_dev_done(0xc12e9198) had error 5
g_dev_done(0xc12e82a8) had error 5
g_dev_done(0xc12e9198) had error 5
g_dev_done(0xc12e82a8) had error 5
g_dev_done(0xc12d43b8) had error 5
g_dev_done(0xc12e9110) had error 5
g_dev_done(0xc12d43b8) had error 5
g_dev_done(0xc12e9110) had error 5
g_dev_done(0xc12d43b8) had error 5
g_dev_done(0xc12e9110) had error 5
g_dev_done(0xc12d43b8) had error 5
g_dev_done(0xc12d6220) had error 5
g_dev_done(0xc12113b8) had error 5
g_dev_done(0xc12d6220) had error 5
g_dev_done(0xc12113b8) had error 5
g_dev_done(0xc12d6220) had error 5
g_dev_done(0xc12113b8) had error 5
g_dev_done(0xc12d6220) had error 5
g_dev_done(0xc12d4550) had error 5
g_dev_done(0xc0e267f8) had error 5
g_dev_done(0xc12d4550) had error 5
g_dev_done(0xc0e267f8) had error 5
g_dev_done(0xc12d4550) had error 5
g_dev_done(0xc0e267f8) had error 5
g_dev_done(0xc12d4550) had error 5


------------------------------

Message: 10
Date: Sat, 31 Jul 2004 18:19:44 +0300
From: Mike Makonnen <mtm@identd.net>
Subject: Re: RFC: Alternate patch to have true new-style rc.d scripts
	in	ports (without touching localpkg)
To: Andrey Chernov <ache@nagual.pp.ru>,	Oliver Eikemeier
	<eikemeier@fillmore-labs.com>
Cc: freebsd-rc@FreeBSD.ORG
Message-ID: <20040731151944.GA23710@rogue.acs-et.com>
Content-Type: text/plain; charset=us-ascii

On Sat, Jul 31, 2004 at 07:05:42PM +0400, Andrey Chernov wrote:
> On Sat, Jul 31, 2004 at 05:56:16PM +0300, Mike Makonnen wrote:
> > On Sat, Jul 31, 2004 at 03:24:56PM +0200, Oliver Eikemeier wrote:
> > > Lets be realistic: Nearly nobody wants his scripts to be sourced in the 

> > > startup shell, especially not in /usr/local/etc/rc.d. People who really 

> > > want to do this are experts that exactly know what they are doing, and 

> > > are not easily confused.
> > 
> > *sigh* You cannot arbitrarily declare that "nearly nobody wants his
> > scripts to be sourced in the startup shell". You have no idea of knowing
> > what a user might want to do with his system and what his level of
> > expertise is.
> 
> That argument is against your position.

I don't think so... read on

> If you have no idea, user (i.e. 
> script) can do _anything_, I mean easily damage startup shell even without 

> evil intentions. You know example - apache13. We need minimal protection, 
> separating base scripts level and ports scripts level, I mean executing 
> them in the subshells.

You are right, that is the reason why there is a distinction between
scripts that have a .sh, and those that don't. If you really want
your script to be sourced in the same shell, then you give it a
sh extension. Otherwise, it will be sourced in a subshell. So, when
portmgr has finished with the ports rc.d plumbing the apache script will
be installed without a .sh extension, and will thus be sourced in a
subshell.

Cheers.
-- 
Mike Makonnen  | GPG-KEY: http://www.identd.net/~mtm/mtm.asc
mtm@identd.net | Fingerprint: AC7B 5672 2D11 F4D0 EBF8  5279 5359 2B82 7CD4 1F
55
mtm@FreeBSD.Org| FreeBSD - Unleash the Daemon !

------------------------------

Message: 11
Date: Sat, 31 Jul 2004 17:19:04 +0200
From: "Poul-Henning Kamp" <phk@phk.freebsd.dk>
Subject: Re: GEOM is too verbose 
To: Maxim Sobolev <sobomax@portaone.com>
Cc: current@freebsd.org
Message-ID: <62768.1091287144@critter.freebsd.dk>

In message <410BB699.3060803@portaone.com>, Maxim Sobolev writes:
>Hi Poul,
>
>I use application that detects size of disk using binary search. On 
>current each attempt to read beyond disk boundary causes message on 
>console, which is annoying. Can you please turn them off, since 
>apparently they serve no meaningful purpose.

Why don't you just use ioctl(DIOC_MEDIASIZE) ?

or the diskinfo(8) program ?


-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

------------------------------

Message: 12
Date: Sat, 31 Jul 2004 17:27:19 +0200
From: Daniel Lang <dl@leo.org>
Subject: Hangs if witness/invariants are disabled
To: freebsd-current@freebsd.org
Message-ID: <20040731152719.GA10448@atrbg11.informatik.tu-muenchen.de>
Content-Type: text/plain; charset=us-ascii

Hi,

after nearly two weeks of stability thanks to patches from
John Baldwin and fixed SACK, I have disabled WITNESS and INVARIANTS.
However, now with these features disabled, I receive hangs. These
could be related to PREEMPTION, I have not yet disabled preemption.

The first hang was a complete one I could not enter the debugger.

After the first hang I have installed the latest patch by John
posted on Wednesday 28th of July (kern_synch.c and pmap.c IIRC).
But the hang occured as well, but this time, I could break into
DDB and obtain a trace:

db> trace
siointr1(a7d53000) at 0xa0491921 = siointr1+0xc5
siointr(a7d53000) at 0xa0491706 = siointr+0x62
intr_execute_handlers(a7cb2090,c60e8ca8,4,c60e8cec,a04a5ec3) at 0xa04a97c5 = i
ntr_execute_hand5
lapic_handle_intr(34) at 0xa04abd1a = lapic_handle_intr+0x2e
Xapic_isr1() at 0xa04a5ec3 = Xapic_isr1+0x33
--- interrupt, eip = 0xa027b99d, esp = 0xc60e8cec, ebp = 0xc60e8cec ---
acpi_cpu_c1(f6ccf3ee,27e6358f,1,4,a0341890) at 0xa027b99d = acpi_cpu_c1+0x5
acpi_cpu_idle(c60e8d20,a03418a9,a7c5f6e0,c60e8d34,a0341619) at 0xa027b8b5 = ac
pi_cpu_idle+0xc1
cpu_idle(a7c5f6e0,c60e8d34,a0341619,0,c60e8d48) at 0xa04ad4d0 = cpu_idle+0x28

idle_proc(0,c60e8d48) at 0xa03418a9 = idle_proc+0x19
fork_exit(a0341890,0,c60e8d48) at 0xa0341619 = fork_exit+0x71
fork_trampoline() at 0xa04a5b6c = fork_trampoline+0x8
--- trap 0x1, eip = 0, esp = 0xc60e8d7c, ebp = 0 ---


Although I called doadump() which completed a dump I could
not get a vmcore. :(
In the single-user boot after doadump() and cpu_reset() from
ddb, savecore cannot find a dump on the dumpdev:

# /etc/rc.d/savecore start
Checking for core dump on /dev/da1s1b ...
savecore: no dumps found


Maybe this is due to the fact that I have a PAE enabled kernel with
6GB RAM in the system? Of course the dumpdev and the directory where to
put the saved vmcores does have enough space.


The system was not updated for a while (since lots of things are
going on right now, first netperf merge, now gcc import, I did not
dare to update yet...).

I have #undef PREEMPTION now in sys/i386/include/param.h
and I'll see what happens...

Cheers,
 Daniel
-- 
IRCnet: Mr-Spock                      - Me transfere sursum, Caledoni -  
 Daniel Lang * dl@leo.org * +49 89 2600 8122 * http://www.leo.org/~dl/

------------------------------

Message: 13
Date: Sat, 31 Jul 2004 18:32:04 +0300
From: Maxim Sobolev <sobomax@portaone.com>
Subject: Re: GEOM is too verbose
To: Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc: current@freebsd.org
Message-ID: <410BBB74.9010804@portaone.com>
Content-Type: text/plain; charset=us-ascii; format=flowed

Poul-Henning Kamp wrote:

> In message <410BB699.3060803@portaone.com>, Maxim Sobolev writes:
> 
>>Hi Poul,
>>
>>I use application that detects size of disk using binary search. On 
>>current each attempt to read beyond disk boundary causes message on 
>>console, which is annoying. Can you please turn them off, since 
>>apparently they serve no meaningful purpose.
> 
> 
> Why don't you just use ioctl(DIOC_MEDIASIZE) ?
> 
> or the diskinfo(8) program ?

It is python program, so that ioctl() is out of question. Usage of 
diskinfo is possible but is not portable across different unices.

-Maxim

------------------------------

Message: 14
Date: Sat, 31 Jul 2004 19:33:03 +0400
From: Andrey Chernov <ache@nagual.pp.ru>
Subject: Re: RFC: Alternate patch to have true new-style rc.d scripts
	in	ports (without touching localpkg)
To: Mike Makonnen <mtm@identd.net>
Cc: freebsd-rc@FreeBSD.ORG
Message-ID: <20040731153303.GA6471@nagual.pp.ru>
Content-Type: text/plain; charset=us-ascii

On Sat, Jul 31, 2004 at 06:19:44PM +0300, Mike Makonnen wrote:
> scripts that have a .sh, and those that don't. If you really want
> your script to be sourced in the same shell, then you give it a
> .sh extension. Otherwise, it will be sourced in a subshell. So, when

It can make things even worse, what if someone rename his rc.subr-ed 
script.sh to script.sh.old ? It was common practice in the past to not 
execute anything without .sh at all.

-- 
Andrey Chernov | http://ache.pp.ru/

------------------------------

Message: 15
Date: Sat, 31 Jul 2004 17:42:05 +0200
From: Oliver Eikemeier <eikemeier@fillmore-labs.com>
Subject: Re: RFC: Alternate patch to have true new-style rc.d scripts
	in	ports (without touching localpkg)
To: Mike Makonnen <mtm@identd.net>
Cc: freebsd-rc@freebsd.org
Message-ID: <2CA903DA-E308-11D8-9C56-00039312D914@fillmore-labs.com>
Content-Type: text/plain; charset=US-ASCII; format=flowed

Mike Makonnen wrote:

> On Sat, Jul 31, 2004 at 03:24:56PM +0200, Oliver Eikemeier wrote:
>> Mike Makonnen wrote:
>> [...]
>>>> Legacy script were never executed when put in
>>>> /etc/rc.d, and won't after this patch. I can't really follow your
>>>> argument here.
>>>
>>> I'm not talking about legacy scripts. I mean local rc.d scripts.
>>
>> Local rc.d scripts will continue to be executed as before.
>
> except if they have a .sh extension.

No, they will be executed like before.

>> I'm not exactly concerned with NetBSD compatibility here, especially
>> considering the facts that (a) rc.subr has already set_rcvar with `case
>> ${OSTYPE}' in it (only in the FreeBSD version, I can't find that in
>> NetBSD), which doesn't exist in NetBSD, (b) The only two scripts with
>> an `.sh' extension (early.sh rcconf.sh) are FreeBSD specific, while the
>> only NetBSD script with an `.sh' extension (bootconf.sh) doensn't exist
>> in FreeBSD. Compatibility with NetBSD seems to be a myth, especially
>> since they never bothered to merge the changes back from FreeBSD.
>
> I don't mean source code compatibility. I don't really care *too much*
> about that either. What I am concerned with is compatibility
> behaviour-wise.

AFAIK NetBSD has added the ability to let pkgsrc scripts participate in 
rcorder(8) two years ago, similar to my patch integrated into 
rc/rc.shutdown. They seem to have no problems with that so far. When you 
only care about compatibility behaviour-wise, what's the big deal of 
changing the extension for sourcing? `.sh' bears already a documented 
meaning on FreeBSD, denotating an old-style rc script. Let's move to 
`.rc' for a sourced rc.d script.

> [...]
>> (a) I want rc.d scripts in /usr/local/etc/rc.d to behave exactly like
>> they do in /etc/rc.d, namely participate in rcorder(8). This was the
>> most common reason to move scripts from /usr/local/etc/rc.d to 
>> /etc/rc.d.
>
> If ports rc.d scripts with .sh extensions aren't sourced in the same 
> shell,
> then they don't behave "exactly like they do in /etc/rc.d". 
> Participating
> in the boot ordering is not the stick by which the "rc.d'ness" (for lack
> of a better word) of a script is measured.

It's one of the main features, besides having a standard way to 
enable/disable services.

>> (b) While doing this, I want to keep documented behaviour, so users can
>> keep what worked for them before.
>
> Correction-- what worked for them in most of 5-CURRENT up to now.

and on 4-STABLE. What is the difference of your statement and mine?

>> We shouldn't break backwards compatibility for no good reason.
>> Compatibility with NetBSD in aspects we never have been compatible is
>> not a good reason to introduce an incompatiblity with -CURRENT.
>
> We *have* been compatible with respect to behaviour of an rc.d script.
> While we have digressed somewhat by *adding* features, the base 
> behaviour
> is the same.

You are always compatible to *something*, of course. I'm talking about 
*backwards* compatibility.

> Additionaly, compatibility with -CURRENT is not a valid
> excuse for introducing hacks or allowing buggy behaviour to continue.

No hacks here, and no buggy behaviour observed.

>> [...]
>> I see absolutely no problems with having this feature now. You wanted
>> similar behaviour of scripts in /etc/rc.d and /usr/local/etc/rc.d, and
>> this is what this patch provides.
>
> *sigh* No, it doesn't. It hacks rc.d to treat /usr/local/etc/rc.d 
> scripts
> with a .sh extension as old style scripts. That is not the same thing.

Ok, lets move to `.rc' to make some progress in this issue then.

>> It is completely backwards compatible,
>> so we don't have to fear breakage. Every new port that starts to
>> participate in rcorder(8) could be tested individually by the 
>> maintainer
>> before submitting, so this should be pretty save.
>
> NO, because it's impossible for the maintainer to test it with even a
> fraction of the possible combinations. Remember that the script has to
> play nice with the scripts as they are currently in /etc/rc.d, with any
> future changes we might have to make to the ordering, with any
> new scripts we might add in the future (or we might have to remove
> a script the script depends on), with current ports rc.d scripts,
> with future ports rc.d scripts, and with any local rc.d scripts
> written by a user.  By defenition, it is impossible for a maintainer
> to be absolutely certain that his script will not break something.

NetBSD seems to be able to cope with this situation for two year now. Of 
course a wrongly written startup script could break things, but this was 
already possible before. A script could for example hang, I've 
experienced this serveral times myself.

> [...]
>> Ah, no: They where relying on documented behaviour in rc(8). localpkg 
>> is
>> not buggy, and should not be changed. The scripts are not buggy either,
>> they are simply old-style scripts that source rc.subr and use some of
>> its features. They have never been tested as rc.d scripts, but it 
>> should
>> be easy to convert them to become  that, since they are pretty similar.
>> Nevertheless one should not be confused of their character because of
>> their similarity to rc.d scripts: they are not, and should not be
>> treated so. Read rc(8) on how they should be handled. What we are 
>> trying
>> to do here is to introduce a *new* functionality, which requires new
>> scripts (although they conversion should be easy in most cases).
>>
>
> Oh please, let's not get into semantic arguments here. If they
> source /etc/rc.subr and implement the functionality that typically
> defines rc.d scripts, then thay are rc.d scripts (or atleast
> they are trying to be).

They use a feature of rc.subr: a standard way to enable and disable 
services. That doesn't make them to fully compliant rc.subr scripts (and 
most of them never tried to be), and they should not be treated as such.

> And since you brought up rc(8), these rc.d scripts you want to treat
> as old style scripts violate one of the rules of old-style scripts:
>
>      o   The output from each script is traditionally a space 
> character, fol-
>          lowed by the name of the software package being started or 
> shut down,
>          without a trailing newline character (see the EXAMPLES 
> section).

many old-style script violate this rule. I don't consider this to be a 
big problem.

> rc(8) also gives a clear example of what an old-style ports script 
> should
> look like:
>
>      The following is a simple, hypothetical example of an old-style
>      /usr/local/etc/rc.d/ script, which would start a daemon at boot 
> time, and
>      kill it at shutdown time.
> [...]

.. which is an example and no requirement.

>> The only proposal I made in changing the behavior of rc.d is changing
>> the extension to something more well thought out, like `.rc'. Said 
>> that,
>> I can live with keeping `.sh' as the extension for sourcing rc.d
>> scripts, although it will do us no good. Anyway, I'm not a big fan of
>> changing documented behavior, be it -CURRENT or not. I think this is a
>> pretty reasonable attitude, but YMMV.
>
> Ok, can you do the following then:
>
> 1. When you (portmgr) are ready put back the rc.d/localpkg changes
> 2. Put the ordering of ports scripts with base system
>    scripts behind an rc.conf(5) knob, and modify your patch so both
>    /etc/rc and /etc/rc.d/localpkg do the right thing depending on 
> whether
>    it's on or off.

I suggest changing the extension for sourcing scripts to `.rc' and 
ignore `.sh' scripts in rc/rc.shutdown.    The unmodified localpkg 
should handle these.

-Oliver


------------------------------

Message: 16
Date: Sat, 31 Jul 2004 18:43:57 +0300
From: Mike Makonnen <mtm@identd.net>
Subject: Re: RFC: Alternate patch to have true new-style rc.d scripts
	in	ports (without touching localpkg)
To: Andrey Chernov <ache@nagual.pp.ru>,	Oliver Eikemeier
	<eikemeier@fillmore-labs.com>
Cc: freebsd-rc@FreeBSD.ORG
Message-ID: <20040731154357.GA35674@rogue.acs-et.com>
Content-Type: text/plain; charset=us-ascii

On Sat, Jul 31, 2004 at 07:33:03PM +0400, Andrey Chernov wrote:
> On Sat, Jul 31, 2004 at 06:19:44PM +0300, Mike Makonnen wrote:
> > scripts that have a .sh, and those that don't. If you really want
> > your script to be sourced in the same shell, then you give it a
> > .sh extension. Otherwise, it will be sourced in a subshell. So, when
> 
> It can make things even worse, what if someone rename his rc.subr-ed 
> script.sh to script.sh.old ? It was common practice in the past to not 
> execute anything without .sh at all.

I think I already answered this in a previous thread, but here goes again.
If it is an old style script (not rc.d) then it gets executed only if it
has a .sh extension and it is executable. That has NOT changed.
If it is an rc.d script then it gets executed only if the appropriate
foo_enable knob is turned on.

Cheers.
-- 
Mike Makonnen  | GPG-KEY: http://www.identd.net/~mtm/mtm.asc
mtm@identd.net | Fingerprint: AC7B 5672 2D11 F4D0 EBF8  5279 5359 2B82 7CD4 1F
55
mtm@FreeBSD.Org| FreeBSD - Unleash the Daemon !

------------------------------

Message: 17
Date: Sat, 31 Jul 2004 18:58:23 +0300
From: Mike Makonnen <mtm@identd.net>
Subject: Re: RFC: Alternate patch to have true new-style rc.d scripts
	in	ports (without touching localpkg)
To: Oliver Eikemeier <eikemeier@fillmore-labs.com>
Cc: freebsd-rc@freebsd.org
Message-ID: <20040731155822.GB35674@rogue.acs-et.com>
Content-Type: text/plain; charset=us-ascii

On Sat, Jul 31, 2004 at 05:42:05PM +0200, Oliver Eikemeier wrote:
> 
> NetBSD seems to be able to cope with this situation for two year now. Of 
> course a wrongly written startup script could break things, but this was 
> already possible before. A script could for example hang, I've 
> experienced this serveral times myself.

Last time I checked NetBSD is not FreeBSD. That it has worked for them
is an additional data point yes, but not a determining factor.

> >Ok, can you do the following then:
> >
> >1. When you (portmgr) are ready put back the rc.d/localpkg changes
> >2. Put the ordering of ports scripts with base system
> >   scripts behind an rc.conf(5) knob, and modify your patch so both
> >   /etc/rc and /etc/rc.d/localpkg do the right thing depending on 
> >whether
> >   it's on or off.
> 
> I suggest changing the extension for sourcing scripts to `.rc' and 
> ignore `.sh' scripts in rc/rc.shutdown.    The unmodified localpkg 
> should handle these.

As I have already said, this is a gratuitous digression to support
buggy rc.d ports script who's bugginess has only existed on
5-CURRENT up to now.

Since, you and I don't seem to agree on this issue and since we both
don't seem to be restating the same things over and over againg.
why don't we refrain for replying to this thread unless we have something
new to add?

Cheers.
-- 
Mike Makonnen  | GPG-KEY: http://www.identd.net/~mtm/mtm.asc
mtm@identd.net | Fingerprint: AC7B 5672 2D11 F4D0 EBF8  5279 5359 2B82 7CD4 1F
55
mtm@FreeBSD.Org| FreeBSD - Unleash the Daemon !

------------------------------

Message: 18
Date: Fri, 30 Jul 2004 08:24:46 -0700 (PDT)
From: K Chapman <tech2187@yahoo.com>
Subject: 	Curious MySQL building problem /w GCC 3.4.2 (and firefox or
	mozilla)
To: bmah@freebsd.org, freebsd-current@freebsd.org
Message-ID: <20040730152446.20874.qmail@web51003.mail.yahoo.com>
Content-Type: text/plain; charset=us-ascii

>I ran into a similar problem with the www/mozilla
>port configure, but I
>didn't get a chance to investigate in much detail. 
>Basically, the
>configure process stops at this point:

>checking for .hidden assembler directive...

i saw the same as well with firefox after cvsup to
28-jul sources (kernel, world, ports)

the conftest.s has the 'as' routine of (or something
close, not near my machine where i saw this)
hidden foo:
foo

cc forks to run 'as' and waits for input.

=====
aaarrrggghhh!!!!
FreeBSD rocks


	
		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

------------------------------

Message: 19
Date: Fri, 30 Jul 2004 17:40:51 +0100
From: "Markie" <mark.cullen@dsl.pipex.com>
Subject: Re: 5.2.1-R panic still occurs on a recent -CURRENT
To: "FreeBSD Current" <freebsd-current@freebsd.org>
Message-ID: <00f401c47653$fc8cb720$f800000a@laptop>
Content-Type: text/plain; charset="iso-8859-1"

Here's the vmstat logs tar'd then gzipped. The filenames indicate the time of

the 'snapshot' in the format of:

vmstat.day.month.year.hour (year was probably very unnecessary but oh well :-)


----- Original Message -----
From: "Markie" <mark.cullen@dsl.pipex.com>
To: "FreeBSD Current" <freebsd-current@freebsd.org>
Sent: Friday, July 30, 2004 1:46 AM
Subject: 5.2.1-R panic still occurs on a recent -CURRENT


| Hi all.
|
| You may or may not remember I was having trouble with 5.2.1-R giving me rand
om
| panics along the lines of panic: kmem_malloc(4096): kmem_map too small: xxxx

| total allocated. It was suggested that I updated to CURRENT to see if the
issue
| had been fixed.
|
| Well, my server just rebooted. The strange thing is though I didn't get a
| crashdump this time... and it did a background fsck on / aswell, which was
| really nice because it booted up so quickly. Is it safe though? I thought
bgfsck
| wasn't allowed on / yet?
|
| I can't remember who replied last time but I was told to log vmstat -mz ever
y
| hour incase of memory leaks, so I have alot of vmstat hourly files if that
might
| determine the cause of my panic. I also logged netstat -m but if that isn't

any
| help then I can just get rid of all those.
|
| I also noticed something in the logs not long (or right before) it paniced
this
| time:
|
| Jul 30 01:19:57 bone kernel: arpresolve: can't allocate llinfo for
| xxx.xxx.xxx.xxxrt
| Jul 30 01:19:58 bone kernel: arplookup xxx.xxx.xxx.xxx failed: could not
| allocate llinfo
| Jul 30 01:19:58 bone kernel: arpresolve: can't allocate llinfo for
| xxx.xxx.xxx.xxxrt
| Jul 30 01:19:58 bone kernel: arplookup xxx.xxx.xxx.xxx failed: could not
| allocate llinfo
| Jul 30 01:19:58 bone kernel: arpresolve: can't allocate llinfo for
| xxx.xxx.xxx.xxxrt
| Jul 30 01:19:59 bone kernel: arplookup xxx.xxx.xxx.xxx failed: could not
| allocate llinfo
| Jul 30 01:19:59 bone kernel: arpresolve: can't allocate llinfo for
| xxx.xxx.xxx.xxxrt
| Jul 30 01:20:00 bone kernel: arplookup xxx.xxx.xxx.xxx failed: could not
| allocate llinfo
|
| Alot of those. Not sure what it means exactly but could it be related in any

| way?
|
| What do you suggest I do? Would you like to take a look at these vmstat file
s?
|
| Thanks in advance.
|
| P.S Any ideas why it might not have saved a core dump this time? All I got w
as
| "Jul 30 01:21:39 bone savecore: no dumps found" I have dumpdev set in rc.con
f
| too. Maybe it didn't panic but spontaneously rebooted, perhaps because of a

| change in -CURRENT? Or is spontaneous rebooting hardware problems?
|
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vmstatlogs.tar.gz
Type: application/octet-stream
Size: 305302 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20040730/
7c94a4af/vmstatlogs.tar.obj

------------------------------

_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"

End of freebsd-current Digest, Vol 70, Issue 20
***********************************************


--
Evariste Galois:
    �����呛��樱������蔷������,����直前......


�� ��源:������� bbs.ustc.edu.cn [FROM: 210.45.72.234]