Re: malloc chunk_info diff

2011-10-06 Thread Otto Moerbeek
On Wed, Sep 07, 2011 at 08:53:02AM +0200, Otto Moerbeek wrote:

 Hi,
 
 This makes struct chunk_info a variable sized struct, wasting less
 space for meta data, by only allocating space actually needed for the
 bitmap (modulo alignment requirements). 
 
 I have been runing this on amd64 and loongson for a while.
 
 Please review this and test on as many platforms as you can find.

Got some postitive test reports and no negative. I would not mind a
review though. Anybody? 

-Otto

 
 Index: malloc.c
 ===
 RCS file: /cvs/src/lib/libc/stdlib/malloc.c,v
 retrieving revision 1.139
 diff -u -p -r1.139 malloc.c
 --- malloc.c  12 Jul 2011 14:43:42 -  1.139
 +++ malloc.c  7 Sep 2011 06:49:36 -
 @@ -109,8 +109,8 @@ struct dir_info {
   struct region_info *r;  /* region slots */
   size_t regions_total;   /* number of region slots */
   size_t regions_free;/* number of free slots */
 - /* list of free chunk info structs */
 - struct chunk_head chunk_info_list;
 + /* lists of free chunk info structs */
 + struct chunk_head chunk_info_list[MALLOC_MAXSHIFT + 1];
   /* lists of chunks with free slots */
   struct chunk_head chunk_dir[MALLOC_MAXSHIFT + 1];
   size_t free_regions_size;   /* free pages cached */
 @@ -156,7 +156,7 @@ struct chunk_info {
   u_short free;   /* how many free chunks */
   u_short total;  /* how many chunk */
   /* which chunks are free */
 - u_short bits[(MALLOC_PAGESIZE / MALLOC_MINSIZE) / MALLOC_BITS];
 + u_short bits[1];
  };
  
  struct malloc_readonly {
 @@ -622,9 +622,10 @@ omalloc_init(struct dir_info **dp)
   d-regions_total = 0;
   return 1;
   }
 - LIST_INIT(d-chunk_info_list);
 - for (i = 0; i = MALLOC_MAXSHIFT; i++)
 + for (i = 0; i = MALLOC_MAXSHIFT; i++) {
 + LIST_INIT(d-chunk_info_list[i]);
   LIST_INIT(d-chunk_dir[i]);
 + }
   malloc_used += regioninfo_size;
   d-canary1 = mopts.malloc_canary ^ (u_int32_t)(uintptr_t)d;
   d-canary2 = ~d-canary1;
 @@ -689,22 +690,36 @@ omalloc_grow(struct dir_info *d)
  }
  
  static struct chunk_info *
 -alloc_chunk_info(struct dir_info *d)
 +alloc_chunk_info(struct dir_info *d, int bits)
  {
   struct chunk_info *p;
 - int i;
 - 
 - if (LIST_EMPTY(d-chunk_info_list)) {
 - p = MMAP(MALLOC_PAGESIZE);
 - if (p == MAP_FAILED)
 + size_t size, count;
 +
 + if (bits == 0)
 + count = MALLOC_PAGESIZE / MALLOC_MINSIZE;
 + else
 + count = MALLOC_PAGESIZE  bits;
 +
 + size = howmany(count, MALLOC_BITS);
 + size = sizeof(struct chunk_info) + (size - 1) * sizeof(u_short);
 + size = ALIGN(size);
 +
 + if (LIST_EMPTY(d-chunk_info_list[bits])) {
 + void *q;
 + int i;
 +
 + q = MMAP(MALLOC_PAGESIZE);
 + if (q == MAP_FAILED)
   return NULL;
   malloc_used += MALLOC_PAGESIZE;
 - for (i = 0; i  MALLOC_PAGESIZE / sizeof(*p); i++)
 - LIST_INSERT_HEAD(d-chunk_info_list, p[i], entries);
 + count = MALLOC_PAGESIZE / size;
 + for (i = 0; i  count; i++, q += size)
 + LIST_INSERT_HEAD(d-chunk_info_list[bits],
 + (struct chunk_info *)q, entries);
   }
 - p = LIST_FIRST(d-chunk_info_list);
 + p = LIST_FIRST(d-chunk_info_list[bits]);
   LIST_REMOVE(p, entries);
 - memset(p, 0, sizeof *p);
 + memset(p, 0, size);
   p-canary = d-canary1;
   return p;
  }
 @@ -803,14 +818,14 @@ omalloc_make_chunks(struct dir_info *d, 
  {
   struct chunk_info *bp;
   void*pp;
 - longi, k;
 + int i, k;
  
   /* Allocate a new bucket */
   pp = map(d, MALLOC_PAGESIZE, 0);
   if (pp == MAP_FAILED)
   return NULL;
  
 - bp = alloc_chunk_info(d);
 + bp = alloc_chunk_info(d, bits);
   if (bp == NULL) {
   unmap(d, pp, MALLOC_PAGESIZE);
   return NULL;
 @@ -829,7 +844,7 @@ omalloc_make_chunks(struct dir_info *d, 
   k = mprotect(pp, MALLOC_PAGESIZE, PROT_NONE);
   if (k  0) {
   unmap(d, pp, MALLOC_PAGESIZE);
 - LIST_INSERT_HEAD(d-chunk_info_list, bp, entries);
 + LIST_INSERT_HEAD(d-chunk_info_list[0], bp, entries);
   return NULL;
   }
   } else {
 @@ -956,7 +971,7 @@ free_bytes(struct dir_info *d, struct re
  {
   struct chunk_head *mp;
   struct chunk_info *info;
 - long i;
 + int i;
  
   info = (struct chunk_info *)r-size;
   if 

Se rompió el display de la notebook...

2011-10-06 Thread Reparación Notebooks Cambio Display
Provisisn e Instalacisn de Displays Originales, LCD y LED, todas las
marcas y modelos

Tambiin hacemos reparacisn de motherboard, cambio de teclados y discos.

HP, COMPAQ, IBM, OLIVETTI, SONY, BANGHO, MSI, LENOVO, ACER 

Revisisn y Presupuesto sin Cargo

Consultar por Retiro Sin Cargo en Capital Federal

[IMAGE]

4982.9696
SOLARCOM srl
BME. MITRE 4042  Local a la calle zona Almagro-Caballito
C.A.B.A.
solar...@solarcomsrl.com.ar

www.solarcomsrl.com.ar

[demime 1.01d removed an attachment of type image/jpeg which had a name of 
encabezado.jpg]



Re: UPDATE: usr.bin/less

2011-10-06 Thread Stuart Henderson
With the old version of less, when called as either more or less,
if you press either G or F ^C, you would be left at a prompt at the end
of the file.

In the updated version these differ; called as less this works fine,
but as more it exits.

Not sure if this is intentional but I'm finding it quite annoying as
I find it a lot easier to type more than less..



Generador Energía Solar para Barcos y Veleros

2011-10-06 Thread Energía Solar Inteligente
Generador Elictrico Solar para Embarcaciones
[IMAGE]

Potencia Diaria: 360W
Carga su Baterma 12VCC/70A en 3 dmas de sol

Disfrute de largos viajes en su embarcacisn con un
GENERADOR DE ENERGMA SOLAR INAGOTABLE,
LIMPIO Y ECOLOGICO a bordo.  SOPORTAN GRANIZO Y NIEVE
ENERGIA SOLAR LIBRE Y GRATISMAS DE 20 AQOS DE VIDA UTIL

ACEPTAMOS TODAS LAS TARJETAS A TRAVES DE MERCADOPAGO!!!

$ 3197 ( Precio Final, incluye IVA )

Este Generador esta compuesto por:
2 PANELES SOLARTEC KS40T
1 Estructura de Soporte de Hierro Galvanizado para sostin y orientacisn
1 Regulador 5A para proteccisn de la Baterma 
( consulte por Inversores de 12Vcc a 220Vca )

Caractermsticas ticnicas PANEL SOLARTEC KS40T  
Fabricado en Argentina con Celdas Japonesas Kyocera 
POTENCIA 40Wp  17,40V CORRIENTE DE CARGA 2,30A
LARGO:1028mm  ANCHO:343mm  ESPESOR: 36mm  PESO:5,2 Kg

Divisisn Energma Solar de SOLARCOM srl4982.9696  Bme. Mitre 4042 Local
Zona Caballito 
c.a.b.a.energiaso...@solarcomsrl.com.arhttp://solarcom.mercadoshops.com.ar/

*Casillas y Escuelas Rurales   *Sistemas de Seguridad   *Comunicaciones y
Monitoreo   *Balizamiento   *Embarcaciones   *Electrificacisn
Alambrados   *Servicios Midicos   *Embarcaciones  *Casas Rodantes  
*Sistemas de Bombeo de Agua   *Proteccisn Catsdica   *Equipos Midicos
Portatiles   *Estaciones Repetidoras

[demime 1.01d removed an attachment of type image/jpeg which had a name of 
solarbarco2.jpg]



Re: UPDATE: usr.bin/less

2011-10-06 Thread Nicholas Marriott
Does this restore the old behaviour?

I don't remember why -E was left out... Alexandr?


Index: main.c
===
RCS file: /cvs/src/usr.bin/less/main.c,v
retrieving revision 1.11
diff -u -p -r1.11 main.c
--- main.c  16 Sep 2011 18:12:09 -  1.11
+++ main.c  6 Oct 2011 12:50:24 -
@@ -135,6 +135,7 @@ main(argc, argv)
init_prompt();
 
if (less_is_more) {
+   scan_option(-E);
scan_option(-G);
scan_option(-L);
scan_option(-X);


On Thu, Oct 06, 2011 at 11:07:30AM +0100, Stuart Henderson wrote:
 With the old version of less, when called as either more or less,
 if you press either G or F ^C, you would be left at a prompt at the end
 of the file.
 
 In the updated version these differ; called as less this works fine,
 but as more it exits.
 
 Not sure if this is intentional but I'm finding it quite annoying as
 I find it a lot easier to type more than less..



The NRN Top 200 Chains Data in One Database

2011-10-06 Thread Nation's Restaurant News
If you have problems viewing this message, click below:
http://www.magnetmail.net/actions/email_web_version.cfm?recipient_id=18203973
8message_id=1549582user_id=Lebhar_ENTgroup_id=265098jobid=7513262


(https://www.buypenton.com/ProductDetail.aspx?ID=NRNT200)

Are you Ready for 2012?

The Top 200 DataFiles from Nation's Restaurant News - two indispensable
reports, in one interactive database - deliver the latest performance and
growth trends of the industry's largest and most influential chains.

Designed to help you improve your sales and marketing plans, they allow you
to:
-Identify growing segments
-Develop franchising opportunitiesMonitor menu performance
-Discover where consumers are spending their dining dollars
-Track your competitor's performance
-Enable you to better set your 2011 priorities and goals


Key features include:3 years of data
-Enhanced information not found in the print product
-Year over year comparisons for systemwide sales  estimated sales per unit
-Instantly sort by a variety of measures, including sales, sales growth,
headquarters location, segment/concept type, number of units, growth in units,
fiscal year  market share within a segment
-Links to all 200 chain websites
-Contact numbers for all chains


For more information or to order, visit:
https://www.buypenton.com/ProductDetail.aspx?ID=NRNT200
(https://www.buypenton.com/ProductDetail.aspx?ID=NRNT200)

For a sample file or more information e-mail nrndatafi...@penton.com
(mailto:nrndatafi...@penton.com)
**
425 Park Avenue, New York, NY 10022

Periodically, we will inform you of related conferences, educational
information, products and other offers that we believe you will find helpful
in your profession.
**
Use this link to unsubscribe:
http://www.magnetmail.net/Actions/unsubscribe.cfm?message_id=1549582user_id=
Lebhar_ENTrecipient_id=182039738email=tech@openbsd.orggroup_id=265098



Re: UPDATE: usr.bin/less

2011-10-06 Thread Stuart Henderson
Oh hmm I was slightly mistaken; G did actually exit more before,
so only the behaviour of F ^C has changed.

Thanks for pointing out -E, that changes behaviour of both G and
F^C (which I can quite imagine some people won't want) but I am happy
to set that in MORE for myself.



On 2011/10/06 13:51, Nicholas Marriott wrote:
 Does this restore the old behaviour?
 
 I don't remember why -E was left out... Alexandr?
 
 
 Index: main.c
 ===
 RCS file: /cvs/src/usr.bin/less/main.c,v
 retrieving revision 1.11
 diff -u -p -r1.11 main.c
 --- main.c16 Sep 2011 18:12:09 -  1.11
 +++ main.c6 Oct 2011 12:50:24 -
 @@ -135,6 +135,7 @@ main(argc, argv)
   init_prompt();
  
   if (less_is_more) {
 + scan_option(-E);
   scan_option(-G);
   scan_option(-L);
   scan_option(-X);
 
 
 On Thu, Oct 06, 2011 at 11:07:30AM +0100, Stuart Henderson wrote:
  With the old version of less, when called as either more or less,
  if you press either G or F ^C, you would be left at a prompt at the end
  of the file.
  
  In the updated version these differ; called as less this works fine,
  but as more it exits.
  
  Not sure if this is intentional but I'm finding it quite annoying as
  I find it a lot easier to type more than less..



termtypes update

2011-10-06 Thread Nicholas Marriott
Hi

Update termtypes.master to terminfo.src from ncurses-5.9-20111001.

We had local changes to change kbs from ^H to \177 in xterm, but there
is now an xterm+kbs fragment for people who cannot agree on what the
backspace key should send which handily changes it for all xterm
entries. So I've switched to just modifying that to \177.

This also includes a couple of fixes we sent upstream and adds the new
sequences tmux uses to the xterm entry.

ok?



Index: termtypes.master
===
RCS file: /cvs/src/share/termtypes/termtypes.master,v
retrieving revision 1.44
diff -u -p -r1.44 termtypes.master
--- termtypes.master6 Jul 2011 18:49:08 -   1.44
+++ termtypes.master6 Oct 2011 13:32:30 -
@@ -692,9 +692,7 @@ nansi.sysk|nansisysk|PC-DOS Public Domai
use=ansi.sysk,
 
  ANSI console types
-#
 
-#
 #
 # Atari ST terminals.
 # From Guido Flohr gufl0...@stud.uni-sb.de.
@@ -938,10 +936,27 @@ linux-c|linux console 1.3.6+ for older n
 # The 2.2.x kernels add a private mode that sets the cursor type; use that to
 # get a block cursor for cvvis.
 # reported by Frank Heckenbach fr...@g-n-u.de.
-linux|linux console,
+linux2.2|linux 2.2.x console,
civis=\E[?25l\E[?1c, cnorm=\E[?25h\E[?0c,
cvvis=\E[?25h\E[?8c, use=linux-c-nc,
 
+# Linux 2.6.x has a fix for SI/SO to work with UTF-8 encoding added here:
+#  http://lkml.indiana.edu/hypermail/linux/kernel/0602.2/0868.html
+# Using SI/SO has the drawback that it confuses screen.  SCS would work.
+# However, SCS is buggy (see comment in Debian #515609) -TD
+linux2.6|linux 2.6.x console,
+   rmacs=^O,
+   
sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p6%t;1%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
+   sgr0=\E[m\017, smacs=^N, use=linux2.2,
+
+# The 3.0 kernel adds support for clearing scrollback buffer (capability E3).
+linux3.0|linux 3.0 kernels,
+   E3=\E[3;J, use=linux2.6,
+
+# This is Linux console for ncurses.
+linux|linux console,
+   use=linux3.0,
+
 # Subject: linux 2.6.26 vt back_color_erase
 # Changes to the Linux console driver broke bce model as reported in
 #  https://bugzilla.novell.com/show_bug.cgi?id=418613
@@ -949,7 +964,7 @@ linux|linux console,
 #  http://lkml.org/lkml/2008/4/26/305
 #  
http://groups.google.com/group/fa.linux.kernel/browse_thread/thread/87f98338f0d636bb/aa96e8b86cee0d1e?lnk=stq=#aa96e8b86cee0d1e
 linux2.6.26|linux console w/o bce,
-   bce@, use=linux,
+   bce@, use=linux2.6,
 
 # See the note on ICH/ICH1 VERSUS RMIR/SMIR near the end of file
 linux-nic|linux with ich/ich1 suppressed for non-curses programs,
@@ -3093,7 +3108,8 @@ tt|tkterm|Don Libes' tk text widget term
kf9=\EOX, rmkx=\E[?1l\E, rmso=\E[m, smkx=\E[?1h\E,
smso=\E[7m,
 
- X terminal emulators
+ X TERMINAL EMULATORS
+ XTERM
 #
 # You can add the following line to your .Xdefaults to change the terminal type
 # set by the xterms you start up to my-xterm:
@@ -3276,12 +3292,14 @@ xterm-xfree86|xterm terminal emulator (X
 # This version reflects the current xterm features.
 xterm-new|modern xterm terminal emulator,
npc,
-   indn=\E[%p1%dS, kDC=\E[3;2~, kEND=\E[1;2F, kHOM=\E[1;2H,
-   kIC=\E[2;2~, kNXT=\E[6;2~, kPRV=\E[5;2~, kb2=\EOE,
-   kcbt=\E[Z, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
-   kend=\EOF, kent=\EOM, khome=\EOH, kich1=\E[2~, kmous=\E[M,
-   knp=\E[6~, kpp=\E[5~, rin=\E[%p1%dT, use=xterm+pcfkeys,
+   indn=\E[%p1%dS, kb2=\EOE, kcbt=\E[Z, kent=\EOM,
+   rin=\E[%p1%dT, use=xterm+pcfkeys, use=xterm+tmux,
use=xterm-basic,
+
+# This fragment is for people who cannot agree on what the backspace key
+# should send.
+xterm+kbs|fragment for backspace key,
+   kbs=\177,
 #
 # This fragment describes as much of XFree86 xterm's pc-style function
 # keys as will fit into terminfo's 60 function keys.
@@ -3459,7 +3477,7 @@ xterm-basic|modern xterm terminal emulat
dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K,
flash=\E[?5h$100/\E[?5l, home=\E[H, hpa=\E[%i%p1%dG,
ht=^I, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L,
-   ind=^J, invis=\E[8m, is2=\E[!p\E[?3;4l\E[4l\E, kbs=\177,
+   ind=^J, invis=\E[8m, is2=\E[!p\E[?3;4l\E[4l\E,
kmous=\E[M, mc0=\E[i, mc4=\E[4i, mc5=\E[5i, meml=\El,
memu=\Em, op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM,
rmacs=\E(B, rmam=\E[?7l, rmcup=\E[?1049l, rmir=\E[4l,
@@ -3471,7 +3489,8 @@ xterm-basic|modern xterm terminal emulat

sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m,
sgr0=\E(B\E[m, smacs=\E(0, smam=\E[?7h, smcup=\E[?1049h,
smir=\E[4h, smkx=\E[?1h\E=, smm=\E[?1034h, smso=\E[7m,
-   smul=\E[4m, tbc=\E[3g, vpa=\E[%i%p1%dd, use=vt100+enq,
+   smul=\E[4m, tbc=\E[3g, vpa=\E[%i%p1%dd, use=xterm+kbs,
+   

Re: termtypes update

2011-10-06 Thread David Coppa
On Thu, Oct 6, 2011 at 3:46 PM, Nicholas Marriott
nicholas.marri...@gmail.com wrote:
 Hi

 Update termtypes.master to terminfo.src from ncurses-5.9-20111001.

 We had local changes to change kbs from ^H to \177 in xterm, but there
 is now an xterm+kbs fragment for people who cannot agree on what the
 backspace key should send which handily changes it for all xterm
 entries. So I've switched to just modifying that to \177.

 This also includes a couple of fixes we sent upstream and adds the new
 sequences tmux uses to the xterm entry.

 ok?

cool, thanks.
Ok for me.

Just one curiosity: have rxvt-unicode entries been planned for
inclusion into ncurses?

ciao,
David



Re: termtypes update

2011-10-06 Thread Nicholas Marriott
Hi

Thanks.

New terminfo entries for particular applications are typically a matter
for the upstream author. In the case of rxvt-unicode I'm not sure what
the history is but it has come up on bug-ncurses before, for example:

http://lists.gnu.org/archive/html/bug-ncurses/2009-10/msg00030.html



On Thu, Oct 06, 2011 at 03:56:40PM +0200, David Coppa wrote:
 On Thu, Oct 6, 2011 at 3:46 PM, Nicholas Marriott
 nicholas.marri...@gmail.com wrote:
  Hi
 
  Update termtypes.master to terminfo.src from ncurses-5.9-20111001.
 
  We had local changes to change kbs from ^H to \177 in xterm, but there
  is now an xterm+kbs fragment for people who cannot agree on what the
  backspace key should send which handily changes it for all xterm
  entries. So I've switched to just modifying that to \177.
 
  This also includes a couple of fixes we sent upstream and adds the new
  sequences tmux uses to the xterm entry.
 
  ok?
 
 cool, thanks.
 Ok for me.
 
 Just one curiosity: have rxvt-unicode entries been planned for
 inclusion into ncurses?
 
 ciao,
 David



Re: termtypes update

2011-10-06 Thread David Coppa
On Thu, Oct 6, 2011 at 3:56 PM, David Coppa dco...@gmail.com wrote:
 ok?

 cool, thanks.
 Ok for me.

 Just one curiosity: have rxvt-unicode entries been planned for
 inclusion into ncurses?

Or would it be stupid to add this patch?

http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-libs/ncurses/files/ncurses-5.8-rxvt-unicode.patch

cheers,
David



Re: termtypes update

2011-10-06 Thread Nicholas Marriott
I'd prefer not to drift from upstream ncurses for entire entries if
possible. What's wrong with using /usr/local/share/terminfo for ports?


On Thu, Oct 06, 2011 at 04:12:34PM +0200, David Coppa wrote:
 On Thu, Oct 6, 2011 at 3:56 PM, David Coppa dco...@gmail.com wrote:
  ok?
 
  cool, thanks.
  Ok for me.
 
  Just one curiosity: have rxvt-unicode entries been planned for
  inclusion into ncurses?
 
 Or would it be stupid to add this patch?
 
 http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-libs/ncurses/files/ncurses-5.8-rxvt-unicode.patch
 
 cheers,
 David



Re: termtypes update

2011-10-06 Thread David Coppa
On Thu, Oct 6, 2011 at 4:19 PM, Nicholas Marriott
nicholas.marri...@gmail.com wrote:
 I'd prefer not to drift from upstream ncurses for entire entries if
 possible. What's wrong with using /usr/local/share/terminfo for ports?

Nothing, until yo ssh to a machine where rxvt-unicode is not installed :(

I think I'll just revert my commit to ports/x11/rxvt-unicode and
switch it back to use rxvt-256color by default as it was before.

ciao,
david



Re: UPDATE: usr.bin/less

2011-10-06 Thread Nicholas Marriott
Yep they seem to have actually changed the behaviour of -E, I've been
looking to see if we can restore the old behaviour but haven't got it
yet.



On Thu, Oct 06, 2011 at 02:46:27PM +0100, Stuart Henderson wrote:
 Oh hmm I was slightly mistaken; G did actually exit more before,
 so only the behaviour of F ^C has changed.
 
 Thanks for pointing out -E, that changes behaviour of both G and
 F^C (which I can quite imagine some people won't want) but I am happy
 to set that in MORE for myself.
 
 
 
 On 2011/10/06 13:51, Nicholas Marriott wrote:
  Does this restore the old behaviour?
  
  I don't remember why -E was left out... Alexandr?
  
  
  Index: main.c
  ===
  RCS file: /cvs/src/usr.bin/less/main.c,v
  retrieving revision 1.11
  diff -u -p -r1.11 main.c
  --- main.c  16 Sep 2011 18:12:09 -  1.11
  +++ main.c  6 Oct 2011 12:50:24 -
  @@ -135,6 +135,7 @@ main(argc, argv)
  init_prompt();
   
  if (less_is_more) {
  +   scan_option(-E);
  scan_option(-G);
  scan_option(-L);
  scan_option(-X);
  
  
  On Thu, Oct 06, 2011 at 11:07:30AM +0100, Stuart Henderson wrote:
   With the old version of less, when called as either more or less,
   if you press either G or F ^C, you would be left at a prompt at the end
   of the file.
   
   In the updated version these differ; called as less this works fine,
   but as more it exits.
   
   Not sure if this is intentional but I'm finding it quite annoying as
   I find it a lot easier to type more than less..



Re: termtypes update

2011-10-06 Thread Nicholas Marriott
Well, we can add it to the termtypes.master file, it isn't a huge
maintenance burden. Although I don't much like the diff you linked to,
it would be better if the entry matched the others in the file rather
than taking up about 200 lines.

Most ideal would be if upstream could do whatever is necessary to get it
into ncurses proper.


On Thu, Oct 06, 2011 at 04:24:09PM +0200, David Coppa wrote:
 On Thu, Oct 6, 2011 at 4:19 PM, Nicholas Marriott
 nicholas.marri...@gmail.com wrote:
  I'd prefer not to drift from upstream ncurses for entire entries if
  possible. What's wrong with using /usr/local/share/terminfo for ports?
 
 Nothing, until yo ssh to a machine where rxvt-unicode is not installed :(
 
 I think I'll just revert my commit to ports/x11/rxvt-unicode and
 switch it back to use rxvt-256color by default as it was before.
 
 ciao,
 david



Re: termtypes update

2011-10-06 Thread David Coppa
On Thu, Oct 6, 2011 at 4:29 PM, Nicholas Marriott
nicholas.marri...@gmail.com wrote:
 Well, we can add it to the termtypes.master file, it isn't a huge
 maintenance burden. Although I don't much like the diff you linked to,
 it would be better if the entry matched the others in the file rather
 than taking up about 200 lines.

The most updated entries can be obtained from the port itself, I'll
try to cook up a better diff asap...

 Most ideal would be if upstream could do whatever is necessary to get it
 into ncurses proper.

Of course.



Re: terminal emulators using /usr/local/share/terminfo and a bug in perl's Term::Cap

2011-10-06 Thread David Coppa
On Sun, Oct 2, 2011 at 8:22 AM, Nicholas Marriott
nicholas.marri...@gmail.com wrote:
 This seems fine to me, but I'm not a perl guru. Have you talked to
 upstream?

I'm having big difficulties trying to report the bug on rt.cpan.org.
It seems they do all the best to make you feel uncomfortable :(

Can this be fixed locally at least for now if my patch is correct?

ciao
David

 On Thu, Sep 29, 2011 at 10:49:36AM +0200, David Coppa wrote:
 Hi,

 The patch to ncurses nicm@ commited some days ago, exposes a bug
 in perl's cpan/Term-Cap/Cap.pm. So, when you use rxvt-unicode on
 a recent -current, you will hit this bug with pkg_* tools:

 # pkg_delete -v xclip
 failed termcap lookup on rxvt-unicode-256color at
/usr/libdata/perl5/OpenBSD/ProgressMeter/Term.pm line 125

 If you use a terminal emulator that has a terminfo entry but not
 a termcap one (just like x11/rxvt-unicode or x11/st), you should
 fall back to the case where perl uses infocmp to fake up a
 termcap entry from terminfo, but this never happens because the
 logic is flawed.

 Here's a diff:

 Index: cpan/Term-Cap/Cap.pm
 ===
 RCS file: /cvs/src/gnu/usr.bin/perl/cpan/Term-Cap/Cap.pm,v
 retrieving revision 1.1.1.1
 diff -u -p -r1.1.1.1 Cap.pm
 --- cpan/Term-Cap/Cap.pm  24 Sep 2010 14:49:05 -  1.1.1.1
 +++ cpan/Term-Cap/Cap.pm  29 Sep 2011 08:14:46 -
 @@ -273,7 +273,7 @@ sub Tgetent

  my @termcap_path = termcap_path();

 -unless ( @termcap_path || $entry )
 +if ( !@termcap_path || !$entry )
  {

  # last resort--fake up a termcap from terminfo


 ---
 cheers,
 David



Re: terminal emulators using /usr/local/share/terminfo and a bug in perl's Term::Cap

2011-10-06 Thread Nicholas Marriott
I can't really follow what it is trying to do. Won't your change always
call infocmp if TERMCAP is not set instead of searching through the
files?

It looks like currently infocmp is only used if there are no termcap
files at all, not if the entry is missing from the files it does
find. So shouldn't the fallback infocmp call happen much later?
Somewhere around the line:

croak Can't find $term if $entry eq '';


On Thu, Oct 06, 2011 at 04:46:45PM +0200, David Coppa wrote:
 On Sun, Oct 2, 2011 at 8:22 AM, Nicholas Marriott
 nicholas.marri...@gmail.com wrote:
  This seems fine to me, but I'm not a perl guru. Have you talked to
  upstream?
 
 I'm having big difficulties trying to report the bug on rt.cpan.org.
 It seems they do all the best to make you feel uncomfortable :(
 
 Can this be fixed locally at least for now if my patch is correct?
 
 ciao
 David
 
  On Thu, Sep 29, 2011 at 10:49:36AM +0200, David Coppa wrote:
  Hi,
 
  The patch to ncurses nicm@ commited some days ago, exposes a bug
  in perl's cpan/Term-Cap/Cap.pm. So, when you use rxvt-unicode on
  a recent -current, you will hit this bug with pkg_* tools:
 
  # pkg_delete -v xclip
  failed termcap lookup on rxvt-unicode-256color at 
  /usr/libdata/perl5/OpenBSD/ProgressMeter/Term.pm line 125
 
  If you use a terminal emulator that has a terminfo entry but not
  a termcap one (just like x11/rxvt-unicode or x11/st), you should
  fall back to the case where perl uses infocmp to fake up a
  termcap entry from terminfo, but this never happens because the
  logic is flawed.
 
  Here's a diff:
 
  Index: cpan/Term-Cap/Cap.pm
  ===
  RCS file: /cvs/src/gnu/usr.bin/perl/cpan/Term-Cap/Cap.pm,v
  retrieving revision 1.1.1.1
  diff -u -p -r1.1.1.1 Cap.pm
  --- cpan/Term-Cap/Cap.pm ? ? ?24 Sep 2010 14:49:05 - ? ? ?1.1.1.1
  +++ cpan/Term-Cap/Cap.pm ? ? ?29 Sep 2011 08:14:46 -
  @@ -273,7 +273,7 @@ sub Tgetent
 
  ? ? ?my @termcap_path = termcap_path();
 
  - ? ?unless ( @termcap_path || $entry )
  + ? ?if ( !@termcap_path || !$entry )
  ? ? ?{
 
  ? ? ? ? ?# last resort--fake up a termcap from terminfo
 
 
  ---
  cheers,
  David



Re: terminal emulators using /usr/local/share/terminfo and a bug in perl's Term::Cap

2011-10-06 Thread Marc Espie
On Thu, Oct 06, 2011 at 04:00:21PM +0100, Nicholas Marriott wrote:
 I can't really follow what it is trying to do. Won't your change always
 call infocmp if TERMCAP is not set instead of searching through the
 files?
 
 It looks like currently infocmp is only used if there are no termcap
 files at all, not if the entry is missing from the files it does
 find. So shouldn't the fallback infocmp call happen much later?
 Somewhere around the line:
 
 croak Can't find $term if $entry eq '';
 
 
 On Thu, Oct 06, 2011 at 04:46:45PM +0200, David Coppa wrote:
  On Sun, Oct 2, 2011 at 8:22 AM, Nicholas Marriott
  nicholas.marri...@gmail.com wrote:
   This seems fine to me, but I'm not a perl guru. Have you talked to
   upstream?
  
  I'm having big difficulties trying to report the bug on rt.cpan.org.
  It seems they do all the best to make you feel uncomfortable :(
  
  Can this be fixed locally at least for now if my patch is correct?
  
  ciao
  David
  
   On Thu, Sep 29, 2011 at 10:49:36AM +0200, David Coppa wrote:
   Hi,
  
   The patch to ncurses nicm@ commited some days ago, exposes a bug
   in perl's cpan/Term-Cap/Cap.pm. So, when you use rxvt-unicode on
   a recent -current, you will hit this bug with pkg_* tools:
  
   # pkg_delete -v xclip
   failed termcap lookup on rxvt-unicode-256color at 
   /usr/libdata/perl5/OpenBSD/ProgressMeter/Term.pm line 125
  
   If you use a terminal emulator that has a terminfo entry but not
   a termcap one (just like x11/rxvt-unicode or x11/st), you should
   fall back to the case where perl uses infocmp to fake up a
   termcap entry from terminfo, but this never happens because the
   logic is flawed.
  
   Here's a diff:
  
   Index: cpan/Term-Cap/Cap.pm
   ===
   RCS file: /cvs/src/gnu/usr.bin/perl/cpan/Term-Cap/Cap.pm,v
   retrieving revision 1.1.1.1
   diff -u -p -r1.1.1.1 Cap.pm
   --- cpan/Term-Cap/Cap.pm ? ? ?24 Sep 2010 14:49:05 - ? ? ?1.1.1.1
   +++ cpan/Term-Cap/Cap.pm ? ? ?29 Sep 2011 08:14:46 -
   @@ -273,7 +273,7 @@ sub Tgetent
  
   ? ? ?my @termcap_path = termcap_path();
  
   - ? ?unless ( @termcap_path || $entry )
   + ? ?if ( !@termcap_path || !$entry )
   ? ? ?{
  
   ? ? ? ? ?# last resort--fake up a termcap from terminfo
  
  
   ---
   cheers,
   David
  
  
I want to test it, which I haven't had the time to do yet.



Re: UPDATE: usr.bin/less

2011-10-06 Thread Alexandr Shadchin
Option -E is different for less and more.

for less - causes to automatically exit the first time it reaches
end-of-file.

for more - option -E and -e is equivalent and causes to automatically
exit the second time it reaches end-of-file.

Behaviour exit the first time it reaches end-of-file set on default for
more, therefore was removed scan_option(-E).

This patch return the old behaviour:
Index: command.c
===
RCS file: /cvs/src/usr.bin/less/command.c,v
retrieving revision 1.10
diff -u -p -r1.10 command.c
--- command.c   21 Sep 2011 19:01:49 -  1.10
+++ command.c   6 Oct 2011 16:58:18 -
@@ -55,6 +55,8 @@ extern int shift_count;
 extern int oldbot;
 extern int forw_prompt;
 extern int be_helpful;
+extern int less_is_more;
+extern int quit_at_eof;
 
 #if SHELL_ESCAPE
 static char *shellcmd = NULL;  /* For holding last shell command for !! */
@@ -1232,6 +1234,8 @@ commands()
 */
if (sigs  !ABORT_SIGS())
newaction = A_F_FOREVER;
+   if (less_is_more)
+   quit_at_eof = OPT_ON;
break;
 
case A_F_SCROLL:


On Thu, Oct 06, 2011 at 03:26:10PM +0100, Nicholas Marriott wrote:
 Yep they seem to have actually changed the behaviour of -E, I've been
 looking to see if we can restore the old behaviour but haven't got it
 yet.
 
 
 
 On Thu, Oct 06, 2011 at 02:46:27PM +0100, Stuart Henderson wrote:
  Oh hmm I was slightly mistaken; G did actually exit more before,
  so only the behaviour of F ^C has changed.
  
  Thanks for pointing out -E, that changes behaviour of both G and
  F^C (which I can quite imagine some people won't want) but I am happy
  to set that in MORE for myself.
  
  
  
  On 2011/10/06 13:51, Nicholas Marriott wrote:
   Does this restore the old behaviour?
   
   I don't remember why -E was left out... Alexandr?
   
   
   Index: main.c
   ===
   RCS file: /cvs/src/usr.bin/less/main.c,v
   retrieving revision 1.11
   diff -u -p -r1.11 main.c
   --- main.c16 Sep 2011 18:12:09 -  1.11
   +++ main.c6 Oct 2011 12:50:24 -
   @@ -135,6 +135,7 @@ main(argc, argv)
 init_prompt();

 if (less_is_more) {
   + scan_option(-E);
 scan_option(-G);
 scan_option(-L);
 scan_option(-X);
   
   
   On Thu, Oct 06, 2011 at 11:07:30AM +0100, Stuart Henderson wrote:
With the old version of less, when called as either more or less,
if you press either G or F ^C, you would be left at a prompt at the end
of the file.

In the updated version these differ; called as less this works fine,
but as more it exits.

Not sure if this is intentional but I'm finding it quite annoying as
I find it a lot easier to type more than less..
   

-- 
Alexandr Shadchin



enable aucat by default

2011-10-06 Thread Alexandre Ratchov
On the one hand, we expect audio to work by default. On the other hand
format conversions, channel mapping, resampling and alike belong to
the audio sub-system; until 2009, this used to be the audio(4) driver
itself. But later, instead of extending the audio(4) driver, we put
new audio code in aucat(1), which amongs others, has the advantage of
running as unprivileged user rather than in supervisor mode. From this
standpoint, there should be an instance of aucat(1) running by default
for each instance of audio(4), ie for each sound card; but audio is
simpler:

Here's what I believe we actually need for audio to work by default:

(1) only one device needs to play/record at a time in almost all cases
because we have only two ears (well, except armani@ who has ears
everywhere)

(2) multiple devices (think uaudio) must be usable, so there should be
a way to switch between devices. Roughly, switching is done by
setting four symlinks: /dev/{audio,sound,mixer,audioctl}, which
requires root privilieges.

So I propose the following default setup:

(1) start aucat from /etc/rc for the first device only:

aucat -l -fsun:0

(2) We'd change $aucat_flags and restart aucat whenever we want to
switch to another device. Symliks in /dev won't be used anymore.

Users that, for any reason, need more than one device to run
concurrently can simply append more -f and -s options

There are other, more sophisticated approaches, for instance using
aucat multi-device support (ie -a off and multiple -fs options) to
handle all devices in one deamon (including hotpluggable ones), but
afaics we gain much more in keeping things very simple, don't we?

Comments? Objections?

If none, I'd like we start using aucat and run our favourite audio
applications. I'm interested mostly in regressions, ie ports working
worse (or not at all) when aucat is running.

-- Alexandre

Index: rc.conf
===
RCS file: /cvs/src/etc/rc.conf,v
retrieving revision 1.160
diff -u -p -r1.160 rc.conf
--- rc.conf 24 Jul 2011 15:33:41 -  1.160
+++ rc.conf 6 Oct 2011 17:39:48 -
@@ -44,7 +44,7 @@ ifstated_flags=NO # for normal use: 
 relayd_flags=NO# for normal use: 
 snmpd_flags=NO # for normal use: 
 smtpd_flags=NO # for normal use: 
-aucat_flags=NO # for normal use: 
+aucat_flags=-fsun:0  # use another device, e.g. -fsun:1
 ldapd_flags=NO # for normal use: 
 inetd_flags= # for normal use: 
 rwhod_flags=NO # for normal use: 



GlobalTT Satellite News (Sept-11)

2011-10-06 Thread GlobalTT(GTT) Satellite News
If this email is not loading properly, please use this link :
http://www.globaltt.com/mailing/110921_cover-internet/mail_cover-int
ernet.html

[IMAGE]

[IMAGE]

[IMAGE]

[IMAGE]

[demime 1.01d removed an attachment of type image/jpeg which had a name of 
01.jpg]

[demime 1.01d removed an attachment of type image/jpeg which had a name of 
02.jpg]

[demime 1.01d removed an attachment of type image/jpeg which had a name of 
03.jpg]



Re: enable aucat by default

2011-10-06 Thread Ingo Schwarze
Hi Alexandre,

Alexandre Ratchov wrote on Thu, Oct 06, 2011 at 08:29:26PM +0200:

 On the one hand, we expect audio to work by default. On the other hand
 format conversions, channel mapping, resampling and alike belong to
 the audio sub-system; until 2009, this used to be the audio(4) driver
 itself. But later, instead of extending the audio(4) driver, we put
 new audio code in aucat(1), which amongs others, has the advantage of
 running as unprivileged user rather than in supervisor mode. From this
 standpoint, there should be an instance of aucat(1) running by default
 for each instance of audio(4), ie for each sound card; [...]

Really?

Here is the list of daemons currently enabled by default:

  syslogd pflogd sshd sendmail inetd cron

These are useful on almost any system, no matter whether
server or desktop.

Unless i misunderstand, aucat will often be useful on the desktop.
But do you also run it on your servers in the datacenter?
Or do you argue that disabling it on servers is less work
than enabling it on workstations?
Or do you argue that it doesn't matter running it even where
it is not needed?

Yours,
  Ingo


 Index: rc.conf
 ===
 RCS file: /cvs/src/etc/rc.conf,v
 retrieving revision 1.160
 diff -u -p -r1.160 rc.conf
 --- rc.conf   24 Jul 2011 15:33:41 -  1.160
 +++ rc.conf   6 Oct 2011 17:39:48 -
 @@ -44,7 +44,7 @@ ifstated_flags=NO   # for normal use: 
  relayd_flags=NO  # for normal use: 
  snmpd_flags=NO   # for normal use: 
  smtpd_flags=NO   # for normal use: 
 -aucat_flags=NO   # for normal use: 
 +aucat_flags=-fsun:0# use another device, e.g. -fsun:1
  ldapd_flags=NO   # for normal use: 
  inetd_flags=   # for normal use: 
  rwhod_flags=NO   # for normal use: 



Re: enable aucat by default

2011-10-06 Thread Paul de Weerd
On Thu, Oct 06, 2011 at 08:58:16PM +0200, Ingo Schwarze wrote:
| Hi Alexandre,
| 
| Alexandre Ratchov wrote on Thu, Oct 06, 2011 at 08:29:26PM +0200:
| 
|  On the one hand, we expect audio to work by default. On the other hand
|  format conversions, channel mapping, resampling and alike belong to
|  the audio sub-system; until 2009, this used to be the audio(4) driver
|  itself. But later, instead of extending the audio(4) driver, we put
|  new audio code in aucat(1), which amongs others, has the advantage of
|  running as unprivileged user rather than in supervisor mode. From this
|  standpoint, there should be an instance of aucat(1) running by default
|  for each instance of audio(4), ie for each sound card; [...]
| 
| Really?
| 
| Here is the list of daemons currently enabled by default:
| 
|   syslogd pflogd sshd sendmail inetd cron
| 
| These are useful on almost any system, no matter whether
| server or desktop.

Why is syslogd useful on my laptop if I never look at those logs ?  Or
pflogd ?  Even sshd, I ssh *from* my laptop, not to it.  Same goes for
inetd, what's the use on my laptop ?  Or cron ?  At the time default
jobs are scheduled to run, my laptop is suspended.  Granted, that may
not be the most common use case (and also granted: I do sometimes use
some of these on my laptop).  But I like the idea of a working default
setup that also includes working audio.

It would be nice if aucat didn't start when there was no sound
hardware.  And it doesn't:

[weerd@despair] $ sudo aucat -l -fsun:0
aucat: sun:0: can't open device
sun:0: failed to open audio device

So your server in the datacenter won't be running aucat afterall.  

Paul 'WEiRD' de Weerd

-- 
[++-]+++.+++[---].+++[+
+++-].++[-]+.--.[-]
 http://www.weirdnet.nl/ 



Re: enable aucat by default

2011-10-06 Thread Alexandre Ratchov
On Thu, Oct 06, 2011 at 08:58:16PM +0200, Ingo Schwarze wrote:
 Hi Alexandre,
 
 Alexandre Ratchov wrote on Thu, Oct 06, 2011 at 08:29:26PM +0200:
 
  On the one hand, we expect audio to work by default. On the other hand
  format conversions, channel mapping, resampling and alike belong to
  the audio sub-system; until 2009, this used to be the audio(4) driver
  itself. But later, instead of extending the audio(4) driver, we put
  new audio code in aucat(1), which amongs others, has the advantage of
  running as unprivileged user rather than in supervisor mode. From this
  standpoint, there should be an instance of aucat(1) running by default
  for each instance of audio(4), ie for each sound card; [...]
 
 Really?
 
 Here is the list of daemons currently enabled by default:
 
   syslogd pflogd sshd sendmail inetd cron
 
 These are useful on almost any system, no matter whether
 server or desktop.
 
 Unless i misunderstand, aucat will often be useful on the desktop.
 But do you also run it on your servers in the datacenter?

well, consider aucat a an extension of the audio(4) driver. Except
that parts of the code are were moved in userspace.

On servers you could disable audio, set aucat_flags=NO and recompile
GENERIC with audio support disabled.

 Or do you argue that disabling it on servers is less work
 than enabling it on workstations?

Not really, my point is that currently audio works by default on
OpenBSD, on servers, laptops, PDAa. More and more code of the audio
sub-system that would be in the kernel is being pulled in userland, so
if we accept that audio should work by default, aucat should be
enabled by default.

 Or do you argue that it doesn't matter running it even where
 it is not needed?


Somewhat yes, if there are no audio devices or no audio program is
run, aucat does nothing and shouldn't hurt.

-- Alexandre



Re: enable aucat by default

2011-10-06 Thread Alexandre Ratchov
On Thu, Oct 06, 2011 at 10:10:10PM +0200, Paul de Weerd wrote:
 On Thu, Oct 06, 2011 at 08:58:16PM +0200, Ingo Schwarze wrote:
 | Hi Alexandre,
 | 
 | Alexandre Ratchov wrote on Thu, Oct 06, 2011 at 08:29:26PM +0200:
 | 
 |  On the one hand, we expect audio to work by default. On the other hand
 |  format conversions, channel mapping, resampling and alike belong to
 |  the audio sub-system; until 2009, this used to be the audio(4) driver
 |  itself. But later, instead of extending the audio(4) driver, we put
 |  new audio code in aucat(1), which amongs others, has the advantage of
 |  running as unprivileged user rather than in supervisor mode. From this
 |  standpoint, there should be an instance of aucat(1) running by default
 |  for each instance of audio(4), ie for each sound card; [...]
 | 
 | Really?
 | 
 | Here is the list of daemons currently enabled by default:
 | 
 |   syslogd pflogd sshd sendmail inetd cron
 | 
 | These are useful on almost any system, no matter whether
 | server or desktop.
 
 Why is syslogd useful on my laptop if I never look at those logs ?  Or
 pflogd ?  Even sshd, I ssh *from* my laptop, not to it.  Same goes for
 inetd, what's the use on my laptop ?  Or cron ?  At the time default
 jobs are scheduled to run, my laptop is suspended.  Granted, that may
 not be the most common use case (and also granted: I do sometimes use
 some of these on my laptop).  But I like the idea of a working default
 setup that also includes working audio.
 
 It would be nice if aucat didn't start when there was no sound
 hardware.  And it doesn't:
 

It's necessary to keep it running because if a uaudio device is
plugged, it should work.

   [weerd@despair] $ sudo aucat -l -fsun:0
   aucat: sun:0: can't open device
   sun:0: failed to open audio device
 
 So your server in the datacenter won't be running aucat afterall.  
 

sorry, my diff is wrong.. I forgot the '-aoff' in the diff, but -aoff
will become the default soon (this is to keep the device closed when
not used).

-- Alexandre

Index: rc.conf
===
RCS file: /cvs/src/etc/rc.conf,v
retrieving revision 1.160
diff -u -p -r1.160 rc.conf
--- rc.conf 24 Jul 2011 15:33:41 -  1.160
+++ rc.conf 6 Oct 2011 20:30:52 -
@@ -44,7 +44,7 @@ ifstated_flags=NO # for normal use: 
 relayd_flags=NO# for normal use: 
 snmpd_flags=NO # for normal use: 
 smtpd_flags=NO # for normal use: 
-aucat_flags=NO # for normal use: 
+aucat_flags=-aoff -fsun:0# use another device, e.g. -fsun:1
 ldapd_flags=NO # for normal use: 
 inetd_flags= # for normal use: 
 rwhod_flags=NO # for normal use: 



Re: enable aucat by default

2011-10-06 Thread Christiano F. Haesbaert
On 6 October 2011 17:26, Alexandre Ratchov a...@caoua.org wrote:
 On Thu, Oct 06, 2011 at 08:58:16PM +0200, Ingo Schwarze wrote:
 Hi Alexandre,

 Alexandre Ratchov wrote on Thu, Oct 06, 2011 at 08:29:26PM +0200:

  On the one hand, we expect audio to work by default. On the other hand
  format conversions, channel mapping, resampling and alike belong to
  the audio sub-system; until 2009, this used to be the audio(4) driver
  itself. But later, instead of extending the audio(4) driver, we put
  new audio code in aucat(1), which amongs others, has the advantage of
  running as unprivileged user rather than in supervisor mode. From this
  standpoint, there should be an instance of aucat(1) running by default
  for each instance of audio(4), ie for each sound card; [...]

 Really?

 Here is the list of daemons currently enabled by default:

   syslogd pflogd sshd sendmail inetd cron

 These are useful on almost any system, no matter whether
 server or desktop.

 Unless i misunderstand, aucat will often be useful on the desktop.
 But do you also run it on your servers in the datacenter?

 well, consider aucat a an extension of the audio(4) driver. Except
 that parts of the code are were moved in userspace.

 On servers you could disable audio, set aucat_flags=NO and recompile
 GENERIC with audio support disabled.

 Or do you argue that disabling it on servers is less work
 than enabling it on workstations?

 Not really, my point is that currently audio works by default on
 OpenBSD, on servers, laptops, PDAa. More and more code of the audio
 sub-system that would be in the kernel is being pulled in userland, so
 if we accept that audio should work by default, aucat should be
 enabled by default.

 Or do you argue that it doesn't matter running it even where
 it is not needed?


 Somewhat yes, if there are no audio devices or no audio program is
 run, aucat does nothing and shouldn't hurt.

 -- Alexandre



We could enable aucat if the user chose yes on Do you expect to run
X ? on the install script.
I think it's fair to assume that if the user is running X, he probably
wants audio.



Re: enable aucat by default

2011-10-06 Thread Mark Kettenis
 On Thu, Oct 06, 2011 at 08:58:16PM +0200, Ingo Schwarze wrote:
 | Hi Alexandre,
 | 
 | Alexandre Ratchov wrote on Thu, Oct 06, 2011 at 08:29:26PM +0200:
 | 
 |  On the one hand, we expect audio to work by default. On the other hand
 |  format conversions, channel mapping, resampling and alike belong to
 |  the audio sub-system; until 2009, this used to be the audio(4) driver
 |  itself. But later, instead of extending the audio(4) driver, we put
 |  new audio code in aucat(1), which amongs others, has the advantage of
 |  running as unprivileged user rather than in supervisor mode. From this
 |  standpoint, there should be an instance of aucat(1) running by default
 |  for each instance of audio(4), ie for each sound card; [...]
 | 
 | Really?
 | 
 | Here is the list of daemons currently enabled by default:
 | 
 |   syslogd pflogd sshd sendmail inetd cron
 | 
 | These are useful on almost any system, no matter whether
 | server or desktop.
 
 Why is syslogd useful on my laptop if I never look at those logs ?

Because it is a fundamental part of a UNIX system.  And you really
should lookat those logs every now and then.

 Or pflogd ?

Valid question.  The fact that pflogd is running by default is a
side-effect from turning on pf by default.

 Even sshd, I ssh *from* my laptop, not to it.

The installer asked you whether you wanted it and you accepted the
default.

 Same goes for inetd, what's the use on my laptop ?

It provides some services that are used for mail delivery.

 Or cron ?  At the time default
 jobs are scheduled to run, my laptop is suspended.  Granted, that may
 not be the most common use case (and also granted: I do sometimes use
 some of these on my laptop).

It also handles log rotation which runs every hour.

 But I like the idea of a working default setup that also includes
 working audio.

Funny, but audio works fine on my laptop without aucat.  Guess the
hardware supports the most common formats in hardware.  And I bet
that's the case on most laptops produced in this century.

 It would be nice if aucat didn't start when there was no sound
 hardware.  And it doesn't:
 
   [weerd@despair] $ sudo aucat -l -fsun:0
   aucat: sun:0: can't open device
   sun:0: failed to open audio device
 
 So your server in the datacenter won't be running aucat afterall.  

Only if it is a proper server ;)  Most i386/amd64 servers do have
sound hardware.

So I'm not convinced we should enable aucat unconditionally.  Wouldn't
it make some sense to enable aucat on systems that run X?



Re: enable aucat by default

2011-10-06 Thread Paul de Weerd
On Thu, Oct 06, 2011 at 11:05:34PM +0200, Mark Kettenis wrote:
Mark counters my objections

Mark, you make very valid points - my comments were more in the 'food
for thought' department: we run deamons by default while some are
never used by certain users.  Doesn't harm them.

|  But I like the idea of a working default setup that also includes
|  working audio.
| 
| Funny, but audio works fine on my laptop without aucat.  Guess the
| hardware supports the most common formats in hardware.  And I bet
| that's the case on most laptops produced in this century.

Obviously, for you 'works fine' excludes playing multiple simultaneous
audio streams (a sentiment I largely agree with).  But because you and
I don't use or want it, does not mean others do not have a (valid) use
for it.  And it wouldn't harm you if it was running on your machine.

|  It would be nice if aucat didn't start when there was no sound
|  hardware.  And it doesn't:
|  
|  [weerd@despair] $ sudo aucat -l -fsun:0
|  aucat: sun:0: can't open device
|  sun:0: failed to open audio device
|  
|  So your server in the datacenter won't be running aucat afterall.  
| 
| Only if it is a proper server ;)  Most i386/amd64 servers do have
| sound hardware.

The new i386/amd64 servers I see (mostly dell and ibm) do not have
audio(4).  This has been the case for some time already, in my
experience.  (still wouldn't really label them proper, but that's
another story)

| So I'm not convinced we should enable aucat unconditionally.  Wouldn't
| it make some sense to enable aucat on systems that run X?

I actually like that idea.

Paul 'WEiRD' de Weerd

-- 
[++-]+++.+++[---].+++[+
+++-].++[-]+.--.[-]
 http://www.weirdnet.nl/ 



Re: enable aucat by default

2011-10-06 Thread Alexandre Ratchov
On Thu, Oct 06, 2011 at 11:05:34PM +0200, Mark Kettenis wrote:
  It would be nice if aucat didn't start when there was no sound
  hardware.  And it doesn't:
  
  [weerd@despair] $ sudo aucat -l -fsun:0
  aucat: sun:0: can't open device
  sun:0: failed to open audio device
  
  So your server in the datacenter won't be running aucat afterall.  
 
 Only if it is a proper server ;)  Most i386/amd64 servers do have
 sound hardware.
 
 So I'm not convinced we should enable aucat unconditionally.  Wouldn't
 it make some sense to enable aucat on systems that run X?

Hmmm, why not?

I'm not against turning audio off in certain situations (servers,
whatever). IMO the important point is aucat to be always running
when audio is expected to work, ie assume that it's a part of the
audio subsystem, so we can rely on it in ports and driver code.

-- Alexandre



Re: enable aucat by default

2011-10-06 Thread Theo de Raadt
  So I'm not convinced we should enable aucat unconditionally.  Wouldn't
  it make some sense to enable aucat on systems that run X?
 
 Hmmm, why not?
 
 I'm not against turning audio off in certain situations (servers,
 whatever). IMO the important point is aucat to be always running
 when audio is expected to work, ie assume that it's a part of the
 audio subsystem, so we can rely on it in ports and driver code.

Except at install time you don't know that.  You only know it on
some machines.  It is MD.

if [[ -n $MDXAPERTURE ]]; then
ask_yn Do you expect to run the X Window System? $def
...

And you can't know it at run time.

And you can't do it based on whether the X sets are installed either,
since we default to that.



Re: enable aucat by default

2011-10-06 Thread Henning Brauer
* Mark Kettenis mark.kette...@xs4all.nl [2011-10-06 23:06]:
 Only if it is a proper server ;)  Most i386/amd64 servers do have
 sound hardware.

huh? either your defintion of server hardware is weird or my servers are.

on pflog, that gets only started if pf is enabled and then it is in
the same boat as syslogd.

i dunno about aucat. on laptops/workstations i'd want it by default,
on the servers i'd hate it.

-- 
Henning Brauer, h...@bsws.de, henn...@openbsd.org
BS Web Services, http://bsws.de, Full-Service ISP
Secure Hosting, Mail and DNS Services. Dedicated Servers, Root to Fully Managed
Henning Brauer Consulting, http://henningbrauer.com/



Re: enable aucat by default

2011-10-06 Thread patrick keshishian
On Thu, Oct 6, 2011 at 1:26 PM, Alexandre Ratchov a...@caoua.org wrote:
 On Thu, Oct 06, 2011 at 08:58:16PM +0200, Ingo Schwarze wrote:
 Hi Alexandre,

 Alexandre Ratchov wrote on Thu, Oct 06, 2011 at 08:29:26PM +0200:

  On the one hand, we expect audio to work by default. On the other hand
  format conversions, channel mapping, resampling and alike belong to
  the audio sub-system; until 2009, this used to be the audio(4) driver
  itself. But later, instead of extending the audio(4) driver, we put
  new audio code in aucat(1), which amongs others, has the advantage of
  running as unprivileged user rather than in supervisor mode. From this
  standpoint, there should be an instance of aucat(1) running by default
  for each instance of audio(4), ie for each sound card; [...]

 Really?

 Here is the list of daemons currently enabled by default:

   syslogd pflogd sshd sendmail inetd cron

 These are useful on almost any system, no matter whether
 server or desktop.

 Unless i misunderstand, aucat will often be useful on the desktop.
 But do you also run it on your servers in the datacenter?

 well, consider aucat a an extension of the audio(4) driver. Except
 that parts of the code are were moved in userspace.

 On servers you could disable audio, set aucat_flags=NO and recompile
 GENERIC with audio support disabled.

 Or do you argue that disabling it on servers is less work
 than enabling it on workstations?

 Not really, my point is that currently audio works by default on
 OpenBSD, on servers, laptops, PDAa. More and more code of the audio
 sub-system that would be in the kernel is being pulled in userland, so
 if we accept that audio should work by default, aucat should be
 enabled by default.

 Or do you argue that it doesn't matter running it even where
 it is not needed?


 Somewhat yes, if there are no audio devices or no audio program is
 run, aucat does nothing and shouldn't hurt.

yuck... sounds like linux to me. please don't go down that route of
enable everything, it can't hurt even if you don't use it mentality.