Re: enable aucat by default

2011-10-07 Thread Alexandre Ratchov
On Thu, Oct 06, 2011 at 05:04:03PM -0700, patrick keshishian wrote:
 
  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.

i'm not a big fan of the i have to push 10 buttons before it starts
working mentality either.

Anyway, that's not the question. The current openbsd promize is that
audio works by default; and by works I mean any port works on any
device.

aucat is a necessary component of the audio sub-system and thus has to
be started by default as long as we assume audio works by default.

So the question is:
  - what setup to use by default (i suggest -l -aoff -fsun:0)
  - are there ports that'll work worse (i guess no)

And don't forget that you escaped from ~7kloc of conversion/resampling
code in the kernel that you wouldn't even be able to disable.

And also note that aucat (when idle) is not larger than getty(8), just
compare ps(1) output of few other programs:

  VSZ   RSS COMMAND
  508   324 /sbin/init
  376   408 /usr/bin/aucat -l -aoff -fsun:0
  668   412 pflogd: [priv] (pflogd)
  672   460 ksh
  420   688 syslogd: [priv] (syslogd)
  384   840 /usr/libexec/getty std.9600 ttyC1
  644   852 /usr/sbin/cron
 1296  1604 sendmail: accepting connections (sendmail)
 1856  4448 xterm
89044 106188 /usr/local/lib/firefox-5.0/firefox-bin

-- Alexandre



Re: enable aucat by default

2011-10-07 Thread Jona Joachim
On 2011-10-07, Alexandre Ratchov a...@caoua.org wrote:
 On Thu, Oct 06, 2011 at 05:04:03PM -0700, patrick keshishian wrote:
 
  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.

 i'm not a big fan of the i have to push 10 buttons before it starts
 working mentality either.

 Anyway, that's not the question. The current openbsd promize is that
 audio works by default; and by works I mean any port works on any
 device.

 aucat is a necessary component of the audio sub-system and thus has to
 be started by default as long as we assume audio works by default.

What about asking the user during install if he/she wants to run aucat:

Do you want to start sshd by default? [Y/n]
Do you want to start aucat by default? [Y/n]

Best regards,
Jona



Re: enable aucat by default

2011-10-07 Thread Henning Brauer
* Jona Joachim j...@hcl-club.lu [2011-10-07 12:06]:
 Do you want to start sshd by default? [Y/n]
 Do you want to start aucat by default? [Y/n]

yeah right. what an awesome installer!

Do you want to start atactl by default? [Y/n]
Do you want to start badsect by default? [Y/n]
Do you want to start bioctl by default? [Y/n]
Do you want to start ccdconfig by default? [Y/n]
Do you want to start chown by default? [Y/n]
Do you want to start clri by default? [Y/n]
Do you want to start dhclient by default? [Y/n]
Do you want to start dhclient-script by default? [Y/n]
Do you want to start disklabel by default? [Y/n]
Do you want to start dmesg by default? [Y/n]
Do you want to start dump by default? [Y/n]
Do you want to start dumpfs by default? [Y/n]
Do you want to start fdisk by default? [Y/n]
Do you want to start fsck by default? [Y/n]
Do you want to start fsck_ext2fs by default? [Y/n]
Do you want to start fsck_ffs by default? [Y/n]
Do you want to start fsck_msdos by default? [Y/n]
Do you want to start fsdb by default? [Y/n]
Do you want to start fsirand by default? [Y/n]
Do you want to start growfs by default? [Y/n]
Do you want to start halt by default? [Y/n]
Do you want to start ifconfig by default? [Y/n]
Do you want to start iked by default? [Y/n]
Do you want to start init by default? [Y/n]
Do you want to start iopctl by default? [Y/n]
Do you want to start ipsecctl by default? [Y/n]
Do you want to start isakmpd by default? [Y/n]
Do you want to start kbd by default? [Y/n]
Do you want to start ldattach by default? [Y/n]
Do you want to start ldconfig by default? [Y/n]
Do you want to start lmccontrol by default? [Y/n]
Do you want to start mkfifo by default? [Y/n]
Do you want to start mknod by default? [Y/n]
Do you want to start modload by default? [Y/n]
Do you want to start modunload by default? [Y/n]
Do you want to start mount by default? [Y/n]
Do you want to start mount_cd9660 by default? [Y/n]
Do you want to start mount_ext2fs by default? [Y/n]
Do you want to start mount_ffs by default? [Y/n]
Do you want to start mount_mfs by default? [Y/n]
Do you want to start mount_msdos by default? [Y/n]
Do you want to start mount_nfs by default? [Y/n]
Do you want to start mount_nnpfs by default? [Y/n]
Do you want to start mount_ntfs by default? [Y/n]
Do you want to start mount_portal by default? [Y/n]
Do you want to start mount_procfs by default? [Y/n]
Do you want to start mount_udf by default? [Y/n]
Do you want to start mount_vnd by default? [Y/n]
Do you want to start mountd by default? [Y/n]
Do you want to start ncheck by default? [Y/n]
Do you want to start ncheck_ffs by default? [Y/n]
Do you want to start newfs by default? [Y/n]
Do you want to start newfs_ext2fs by default? [Y/n]
Do you want to start newfs_msdos by default? [Y/n]
Do you want to start nfsd by default? [Y/n]
Do you want to start nologin by default? [Y/n]
Do you want to start pfctl by default? [Y/n]
Do you want to start pflogd by default? [Y/n]
Do you want to start ping by default? [Y/n]
Do you want to start ping6 by default? [Y/n]
Do you want to start quotacheck by default? [Y/n]
Do you want to start raidctl by default? [Y/n]
Do you want to start rdump by default? [Y/n]
Do you want to start reboot by default? [Y/n]
Do you want to start reboot.old by default? [Y/n]
Do you want to start restore by default? [Y/n]
Do you want to start route by default? [Y/n]
Do you want to start rrestore by default? [Y/n]
Do you want to start rtsol by default? [Y/n]
Do you want to start savecore by default? [Y/n]
Do you want to start scan_ffs by default? [Y/n]
Do you want to start scsi by default? [Y/n]
Do you want to start shutdown by default? [Y/n]
Do you want to start slattach by default? [Y/n]
Do you want to start swapctl by default? [Y/n]
Do you want to start swapon by default? [Y/n]
Do you want to start sysctl by default? [Y/n]
Do you want to start ttyflags by default? [Y/n]
Do you want to start tunefs by default? [Y/n]
Do you want to start umount by default? [Y/n]
Do you want to start vnconfig by default? [Y/n]
Do you want to start wsconsctl by default? [Y/n]
Do you want to start ac by default? [Y/n]
Do you want to start accton by default? [Y/n]
Do you want to start acpidump by default? [Y/n]
Do you want to start activadm by default? [Y/n]
Do you want to start activinit by default? [Y/n]
Do you want to start adduser by default? [Y/n]
Do you want to start amd by default? [Y/n]
Do you want to start amq by default? [Y/n]
Do you want to start apachectl by default? [Y/n]
Do you want to start apm by default? [Y/n]
Do you want to start apmd by default? [Y/n]
Do you want to start apxs by default? [Y/n]
Do you want to start arp by default? [Y/n]
Do you want to start authpf by default? [Y/n]
Do you want to start authpf-noip by default? [Y/n]
Do you want to start bgpctl by default? [Y/n]
Do you want to start bgpd by default? [Y/n]
Do you want to start bos by default? [Y/n]
Do you want to start chat by default? [Y/n]
Do you want to start chgrp by default? [Y/n]
Do you want to start 

Re: enable aucat by default

2011-10-07 Thread Marc Espie
On Thu, Oct 06, 2011 at 05:04:03PM -0700, patrick keshishian wrote:
 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.

In a wide difference to linux, we try to avoid running buggy shit on the
system by default.

I mean, if aucat was a large piece of junk like gnome's tracker, or firefox,
I would understand objections to running it by default.

Heck, even on servers. What's the actual footprint of an idle aucat ?
It's not even accessible from outside, so there's no possibility of a
remote hole.



Re: enable aucat by default

2011-10-07 Thread David Vasek

On Fri, 7 Oct 2011, Henning Brauer wrote:


* Jona Joachim j...@hcl-club.lu [2011-10-07 12:06]:

Do you want to start sshd by default? [Y/n]
Do you want to start aucat by default? [Y/n]


yeah right. what an awesome installer!

Do you want to start atactl by default? [Y/n]
Do you want to start badsect by default? [Y/n]
Do you want to start bioctl by default? [Y/n]
Do you want to start ccdconfig by default? [Y/n]
Do you want to start chown by default? [Y/n]
Do you want to start clri by default? [Y/n]
Do you want to start dhclient by default? [Y/n]
Do you want to start dhclient-script by default? [Y/n]
Do you want to start disklabel by default? [Y/n]
Do you want to start dmesg by default? [Y/n]
Do you want to start dump by default? [Y/n]
Do you want to start dumpfs by default? [Y/n]
Do you want to start fdisk by default? [Y/n]
Do you want to start fsck by default? [Y/n]
Do you want to start fsck_ext2fs by default? [Y/n]
Do you want to start fsck_ffs by default? [Y/n]
Do you want to start fsck_msdos by default? [Y/n]
Do you want to start fsdb by default? [Y/n]
Do you want to start fsirand by default? [Y/n]
Do you want to start growfs by default? [Y/n]
Do you want to start halt by default? [Y/n]
Do you want to start ifconfig by default? [Y/n]
Do you want to start iked by default? [Y/n]
Do you want to start init by default? [Y/n]
Do you want to start iopctl by default? [Y/n]
Do you want to start ipsecctl by default? [Y/n]
Do you want to start isakmpd by default? [Y/n]
Do you want to start kbd by default? [Y/n]
Do you want to start ldattach by default? [Y/n]
Do you want to start ldconfig by default? [Y/n]
Do you want to start lmccontrol by default? [Y/n]
Do you want to start mkfifo by default? [Y/n]
Do you want to start mknod by default? [Y/n]
Do you want to start modload by default? [Y/n]
Do you want to start modunload by default? [Y/n]
Do you want to start mount by default? [Y/n]
Do you want to start mount_cd9660 by default? [Y/n]
Do you want to start mount_ext2fs by default? [Y/n]
Do you want to start mount_ffs by default? [Y/n]
Do you want to start mount_mfs by default? [Y/n]
Do you want to start mount_msdos by default? [Y/n]
Do you want to start mount_nfs by default? [Y/n]
Do you want to start mount_nnpfs by default? [Y/n]
Do you want to start mount_ntfs by default? [Y/n]
Do you want to start mount_portal by default? [Y/n]
Do you want to start mount_procfs by default? [Y/n]
Do you want to start mount_udf by default? [Y/n]
Do you want to start mount_vnd by default? [Y/n]
Do you want to start mountd by default? [Y/n]
Do you want to start ncheck by default? [Y/n]
Do you want to start ncheck_ffs by default? [Y/n]
Do you want to start newfs by default? [Y/n]
Do you want to start newfs_ext2fs by default? [Y/n]
Do you want to start newfs_msdos by default? [Y/n]
Do you want to start nfsd by default? [Y/n]
Do you want to start nologin by default? [Y/n]
Do you want to start pfctl by default? [Y/n]
Do you want to start pflogd by default? [Y/n]
Do you want to start ping by default? [Y/n]
Do you want to start ping6 by default? [Y/n]
Do you want to start quotacheck by default? [Y/n]
Do you want to start raidctl by default? [Y/n]
Do you want to start rdump by default? [Y/n]
Do you want to start reboot by default? [Y/n]
Do you want to start reboot.old by default? [Y/n]
Do you want to start restore by default? [Y/n]
Do you want to start route by default? [Y/n]
Do you want to start rrestore by default? [Y/n]
Do you want to start rtsol by default? [Y/n]
Do you want to start savecore by default? [Y/n]
Do you want to start scan_ffs by default? [Y/n]
Do you want to start scsi by default? [Y/n]
Do you want to start shutdown by default? [Y/n]
Do you want to start slattach by default? [Y/n]
Do you want to start swapctl by default? [Y/n]
Do you want to start swapon by default? [Y/n]
Do you want to start sysctl by default? [Y/n]
Do you want to start ttyflags by default? [Y/n]
Do you want to start tunefs by default? [Y/n]
Do you want to start umount by default? [Y/n]
Do you want to start vnconfig by default? [Y/n]
Do you want to start wsconsctl by default? [Y/n]
Do you want to start ac by default? [Y/n]
Do you want to start accton by default? [Y/n]
Do you want to start acpidump by default? [Y/n]
Do you want to start activadm by default? [Y/n]
Do you want to start activinit by default? [Y/n]
Do you want to start adduser by default? [Y/n]
Do you want to start amd by default? [Y/n]
Do you want to start amq by default? [Y/n]
Do you want to start apachectl by default? [Y/n]
Do you want to start apm by default? [Y/n]
Do you want to start apmd by default? [Y/n]
Do you want to start apxs by default? [Y/n]
Do you want to start arp by default? [Y/n]
Do you want to start authpf by default? [Y/n]
Do you want to start authpf-noip by default? [Y/n]
Do you want to start bgpctl by default? [Y/n]
Do you want to start bgpd by default? [Y/n]
Do you want to start bos by default? [Y/n]
Do you want to start chat by default? [Y/n]
Do you want to start 

Re: enable aucat by default

2011-10-07 Thread Stuart Henderson
On 2011/10/06 22:36, Alexandre Ratchov wrote:
 
 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).

Without -a off behaviour I would object to this, but this clears
up all the usability problems that I know of.

I don't like having another installer question (which upgrading
users won't see anyway), it's not like sshd which has a huge
security impact. aucat runs unprivileged and by default doesn't talk
or listen on the network. So I think it's better to make a decision
one way or another.

On balance I am happier to have it on by default, I don't see a big
reason not to have it running on the typical system, and it's much
easier to disable than to work out that you need it and enable it.



Re: DIOCCHANGERULE

2011-10-07 Thread Stuart Henderson
On 2011/10/07 12:44, Henning Brauer wrote:
 anybody using pf's DIOCCHANGERULE ioctl?

libdnet
xorp

if they're actually doing anything useful with them, which I find
hard to believe, they probably ought to be doing that with anchors
instead.



Re: enable aucat by default

2011-10-07 Thread Matthieu Herrb
On Thu, Oct 06, 2011 at 04:01:53PM -0600, Theo de Raadt wrote:
   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.
 

what privileges does aucat need ? Could it be started in the default
Xsession/Xinitrc (perhaps with the help of fbtab(4)) ?

-- 
Matthieu Herrb



Re: enable aucat by default

2011-10-07 Thread Marc Espie
It doesn't *belong* in X.

I want to be able to get proper sound from the console, even if I don't
run X.



Re: enable aucat by default

2011-10-07 Thread Henning Brauer
* Marc Espie es...@nerim.net [2011-10-07 14:14]:
 It doesn't *belong* in X.
 
 I want to be able to get proper sound from the console, even if I don't
 run X.

doesn't it really come down to workstation vs server use?

for a default, having aucat running if you run X makes sense to me. if
you want it for console-only use you can still enable/start it manually.

-- 
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-07 Thread Marc Espie
On Fri, Oct 07, 2011 at 02:17:19PM +0200, Henning Brauer wrote:
 * Marc Espie es...@nerim.net [2011-10-07 14:14]:
  It doesn't *belong* in X.
  
  I want to be able to get proper sound from the console, even if I don't
  run X.
 
 doesn't it really come down to workstation vs server use?
 
 for a default, having aucat running if you run X makes sense to me. if
 you want it for console-only use you can still enable/start it manually.

What's the problem you have with running it on a server ? does it actually
consume any resources you need ? does it constitute a security hole ?..



Re: enable aucat by default

2011-10-07 Thread Mark Kettenis
 Date: Fri, 7 Oct 2011 14:17:19 +0200
 From: Henning Brauer lists-openbsdt...@bsws.de
 
 * Marc Espie es...@nerim.net [2011-10-07 14:14]:
  It doesn't *belong* in X.
  
  I want to be able to get proper sound from the console, even if I don't
  run X.
 
 doesn't it really come down to workstation vs server use?

Yup.

 for a default, having aucat running if you run X makes sense to me. if
 you want it for console-only use you can still enable/start it manually.

What makes more sense is to make this decision based on whether you're
running with a serial console or not.  The install script already has
some knowledge about this.



Re: enable aucat by default

2011-10-07 Thread Alexandre Ratchov
On Fri, Oct 07, 2011 at 02:35:47PM +0200, Mark Kettenis wrote:
  Date: Fri, 7 Oct 2011 14:17:19 +0200
  From: Henning Brauer lists-openbsdt...@bsws.de
  
  * Marc Espie es...@nerim.net [2011-10-07 14:14]:
   It doesn't *belong* in X.
   
   I want to be able to get proper sound from the console, even if I don't
   run X.
  
  doesn't it really come down to workstation vs server use?
 
 Yup.
 
  for a default, having aucat running if you run X makes sense to me. if
  you want it for console-only use you can still enable/start it manually.
 
 What makes more sense is to make this decision based on whether you're
 running with a serial console or not.  The install script already has
 some knowledge about this.

may be we should use it to disable the four instances of getty(8) when
the default console is serial, getty(8) is larger than aucat.

-- Alexandre



Re: enable aucat by default

2011-10-07 Thread Mike Pursifull
This is beginning to seem strange to me. OpenBSD has always had an off by
default philosophy, a quality I have relied on since before 1998.

It takes little effort to enable aucat. Yes, it also takes little effort to
disable it, however, unless (almost) everyone needs it, the approach has been
to favor a cleaner, minimalist install. Let the population subset who want it
make a deliberate decision to turn it on. Do not place the burden on everyone
to decide if they need to turn it off.

There are surely thousands on the list who have been silent because so many of
us assume this is a non-issue. But I can only speak for myself. I would be
disappointed if we turned it on, or if we included an additional burdensome
install question.

Sometimes disappointment happens, you cannot make everyone happy every time.
So enough from me, but I have very (very, very) seldom ever been disappointed
with anything in OpenBSD :)

Warm Regards,
-Mike



Re: enable aucat by default

2011-10-07 Thread Alexandre Ratchov
On Fri, Oct 07, 2011 at 12:57:08PM +0200, Marc Espie wrote:
 On Thu, Oct 06, 2011 at 05:04:03PM -0700, patrick keshishian wrote:
  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.
 
 In a wide difference to linux, we try to avoid running buggy shit on the
 system by default.
 
 I mean, if aucat was a large piece of junk like gnome's tracker, or firefox,
 I would understand objections to running it by default.
 
 Heck, even on servers. What's the actual footprint of an idle aucat ?

afaics, besides the text and bss sections, there are 3 malloc()s of
few bytes each.

-- Alexandre



Re: enable aucat by default

2011-10-07 Thread Loganaden Velvindron
I think it should be enabled in the installer similar to X11.

aucat follows a sane design and more importantly, it could
help to improve buggy audio apps in ports. I noticed some weird
behaviour in mplayer when it comes to sound playback.

If it causes too much audio app breakage, it can be disabled
prior to the next locking (no need for drama ;-))

Most openbsd users (like me) are lazy when it comes to testing patches.


On Fri, Oct 7, 2011 at 5:05 PM, Alexandre Ratchov a...@caoua.org wrote:
 On Fri, Oct 07, 2011 at 12:57:08PM +0200, Marc Espie wrote:
 On Thu, Oct 06, 2011 at 05:04:03PM -0700, patrick keshishian wrote:
  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.

 In a wide difference to linux, we try to avoid running buggy shit on the
 system by default.

 I mean, if aucat was a large piece of junk like gnome's tracker, or firefox,
 I would understand objections to running it by default.

 Heck, even on servers. What's the actual footprint of an idle aucat ?

 afaics, besides the text and bss sections, there are 3 malloc()s of
 few bytes each.

 -- Alexandre





-- 
`` Real men run current !''



Re: enable aucat by default

2011-10-07 Thread Jona Joachim
On 2011-10-07, Henning Brauer lists-openbsdt...@bsws.de wrote:
 * Jona Joachim j...@hcl-club.lu [2011-10-07 12:06]:
 Do you want to start sshd by default? [Y/n]
 Do you want to start aucat by default? [Y/n]

 yeah right. what an awesome installer!

 Do you want to start atactl by default? [Y/n]
[snip silly for-loop on /usr/bin]

The installer asks about X11 and sshd because whether you start them or
not is largely based on whether you plan to run a server or a desktop
system.
aucat is similar to X11 in this regard: necessary for a desktop, useless
on a server.

Best regards,
Jona



Re: enable aucat by default

2011-10-07 Thread Theo de Raadt
 aucat is similar to X11 in this regard: necessary for a desktop, useless
 on a server.

Except you are wrong.  For instance, my audio box has no display.

aucat as a daemon is an intragral back-end to a library which more and
more audio programs will be linked to, and those things need to move to
a more powerful API.  If aucat is not running, a completely different
audio flow codepath is used.

Among other things, audio streams have to be mixed by a trusted third
party.  One program's library cannot give audio input to another
program to mix it.  Classically the over-complex solution has been to
have the kernel mix it.  With aucat, the solution is for an ambiant
running daemon to mix it and control everything.  It has to be
running, or the old path is used.

The plan is to gut the direct device code-paths substantially, and
stop trying to perform magic two ways.  The direct-device methods will
continue to work, but only as minimally as they did 10 years ago.

If some of you people keep insisting on having backwards compatibitity
with the stone age, we'll have stone tools forever.

I don't know why our mailing lists are always full of people who don't
even understand what they are talking about.  Teach yourself before you
try to teach us.



Re: enable aucat by default

2011-10-07 Thread Kevin Chadwick
On Fri, 07 Oct 2011 10:35:27 -0600
Theo de Raadt wrote:

 The plan is to gut the direct device code-paths substantially, and
 stop trying to perform magic two ways.  The direct-device methods will
 continue to work, but only as minimally as they did 10 years ago.

Even better, a simpler audio system and less code in memory. I'd rather
enable it manually as I rarely turn my speakers on anyway and don't
want this leading to an easy ride for other code to be loaded as I
think henning was getting at but wasn't going to type in names manually.

I have no problem enabling it for systems that need audio as I will have
to do configuration anyway.

What about, turn on for X and have to manually enable otherwise.



Re: enable aucat by default

2011-10-07 Thread Theo de Raadt
 What about, turn on for X and have to manually enable otherwise.

And precisely how do you do that?



Re: enable aucat by default

2011-10-07 Thread Alexey E. Suslikov
Jona Joachim jaj at hcl-club.lu writes:

 
 On 2011-10-07, Henning Brauer lists-openbsdtech at bsws.de wrote:
  * Jona Joachim jaj at hcl-club.lu [2011-10-07 12:06]:
  Do you want to start sshd by default? [Y/n]
  Do you want to start aucat by default? [Y/n]
 
  yeah right. what an awesome installer!
 
  Do you want to start atactl by default? [Y/n]
 [snip silly for-loop on /usr/bin]
 
 The installer asks about X11 and sshd because whether you start them or
 not is largely based on whether you plan to run a server or a desktop
 system.
 aucat is similar to X11 in this regard: necessary for a desktop, useless
 on a server.

Either audioctl or mixerctl, which both return Device not configured if no
audio device is present, can be used by aucat rc.d script to detect speechless
setups.

Alexey



Re: enable aucat by default

2011-10-07 Thread David Coppa
On Fri, Oct 7, 2011 at 8:24 PM, Alexey E. Suslikov
alexey.susli...@gmail.com wrote:

 Either audioctl or mixerctl, which both return Device not configured if no
 audio device is present, can be used by aucat rc.d script to detect speechless
 setups.

I like this idea.

ciao,
David

P.S.: I'm also in favor of having aucat on by default, fwiw.



Re: enable aucat by default

2011-10-07 Thread Vadim Zhukov
2011/10/7 Alexey E. Suslikov alexey.susli...@gmail.com:
 Jona Joachim jaj at hcl-club.lu writes:


 On 2011-10-07, Henning Brauer lists-openbsdtech at bsws.de wrote:
  * Jona Joachim jaj at hcl-club.lu [2011-10-07 12:06]:
  Do you want to start sshd by default? [Y/n]
  Do you want to start aucat by default? [Y/n]
 
  yeah right. what an awesome installer!
 
  Do you want to start atactl by default? [Y/n]
 [snip silly for-loop on /usr/bin]

 The installer asks about X11 and sshd because whether you start them or
 not is largely based on whether you plan to run a server or a desktop
 system.
 aucat is similar to X11 in this regard: necessary for a desktop, useless
 on a server.

 Either audioctl or mixerctl, which both return Device not configured if no
 audio device is present, can be used by aucat rc.d script to detect speechless
 setups.

Still will not work for uaudio(4) case... some default rules for hotplugd?
--
  WBR,
  Vadim Zhukov



Re: enable aucat by default

2011-10-07 Thread Theo de Raadt
 Either audioctl or mixerctl, which both return Device not configured if no
 audio device is present, can be used by aucat rc.d script to detect speechless
 setups.

Until a hotplug one is put in, and doesn't work.

You guys just are not thinking.



Re: enable aucat by default

2011-10-07 Thread Alexey E. Suslikov
Vadim Zhukov persgray at gmail.com writes:

 
 2011/10/7 Alexey E. Suslikov alexey.suslikov at gmail.com:
  Either audioctl or mixerctl, which both return Device not configured
  if no audio device is present, can be used by aucat rc.d script to
  detect speechless setups.
 
 Still will not work for uaudio(4) case... some default rules for hotplugd?

1st: aucat can't be run with audio device detached and wait it to become
attached. 2nd: hotplugd have no dedicated class for audio. 3rd: you will
need to run hotplugd by default too.

From my understanding, making aucat a default won't make *every* of audio
setups around happy, but, as noted above, will do magic in proper way for
*most* of them.

Alexey



Re: enable aucat by default

2011-10-07 Thread Brynet
I think if anything this strengthens the need for MD-specific rc scripts, for 
platforms with absolutely no audio support, at all, no PCI bus, no USB bus, and 
no fancy i2c audio controllers. Don't enable aucat + libsndio + audio(4).

On every other supported platform, enable audio, including aucat.

I can't believe so many people are freaking out about this, the daemon runs 
privsep.. it's minimal and doesn't listen on tcp by default. It is a base 
component that is required and implements functionallity that would 
typically be in the kernel anyway.

-Bryan.



sftp and put'ing /dev/stdin.

2011-10-07 Thread Kristaps Dzonsons

Hi,

Enclosed is a small patch that lifts the constraint on uploading only 
regular files in sftp(1).  It's useful to me in dump(8)ing to a remote 
ChrootDirectory'd, ForceCommand sftp-internal server so that I needn't 
put dd(1) or something in the jail.  This way, I can have an empty jail 
for backups and not have the overhead of a dumpfile (which I can't 
afford, space-wise).


% echo put /dev/stdin remoteFile test.bat
% dump -0f - /usr/vhosts | sftp -b test.bat bac...@server.tdl

Where the backup user is matched with something like

Match user backup
ChrootDirectory /chroot
ForceCommand internal-sftp

The regular solution, something like

% dump -0f - /usr/vhosts | ssh bac...@server.tdl cat remoteFile

requires cat(1) (or dd(1), or whatever) in the jail.  That takes two 
seconds, but I prefer saving up my two secondses for a nice coffee.


It would probably need some warnings that the progress bar is disabled 
(unknown size of file), and protection of course against directories.


Is there a better way?  Is there a reason for the regular file check 
that makes this a Bad Idea?


Thank you,

Kristaps

Index: sftp-client.c
===
RCS file: /cvs/src/usr.bin/ssh/sftp-client.c,v
retrieving revision 1.94
diff -u -r1.94 sftp-client.c
--- sftp-client.c   4 Dec 2010 00:18:01 -   1.94
+++ sftp-client.c   7 Oct 2011 19:13:03 -
@@ -1356,11 +1356,10 @@
return(-1);
}
if (!S_ISREG(sb.st_mode)) {
-   error(%s is not a regular file, local_path);
-   close(local_fd);
-   return(-1);
-   }
-   stat_to_attrib(sb, a);
+   showprogress = 0;
+   attrib_clear(a);
+   } else
+   stat_to_attrib(sb, a);

a.flags = ~SSH2_FILEXFER_ATTR_SIZE;
a.flags = ~SSH2_FILEXFER_ATTR_UIDGID;



Re: enable aucat by default

2011-10-07 Thread Theo de Raadt
 I think if anything this strengthens the need for MD-specific rc scripts, for 
 platforms with absolutely no audio support, at all, no PCI bus, no USB bus, 
 and 
 no fancy i2c audio controllers. Don't enable aucat + libsndio + audio(4).

Really!  Which of our platforms have no audio support at all?  Can you list
them?

 I can't believe so many people are freaking out about this, the daemon runs 
 privsep.. it's minimal and doesn't listen on tcp by default. It is a base 
 component that is required and implements functionallity that would 
 typically be in the kernel anyway.

That part is right.



Re: enable aucat by default

2011-10-07 Thread Alexey E. Suslikov
Theo de Raadt deraadt at cvs.openbsd.org writes:

 
  Either audioctl or mixerctl, which both return Device not configured if
  no audio device is present, can be used by aucat rc.d script to detect
  speechless setups.
 
 Until a hotplug one is put in, and doesn't work.

Is it feasible for aucat to act like hotplugd but for audio devices?

According to hotplugd source, it's fairly trivial /dev/hotplug event
reading loop.



Re: enable aucat by default

2011-10-07 Thread Brynet
On Fri, Oct 07, 2011 at 01:35:49PM -0600, Theo de Raadt wrote:
 Really!  Which of our platforms have no audio support at all?  Can you list
 them?

That part was for effect, I was really hoping none existed. :-)

-Bryan.



Re: enable aucat by default

2011-10-07 Thread Miod Vallat
  Really!  Which of our platforms have no audio support at all?  Can you list
  them?
 
 That part was for effect, I was really hoping none existed. :-)

I'm afraid your hopes are about to get shattered. There is no audio
capabilities on the following platforms:

hp300 - until ISA interrupts become reliable in isabr(4)
luna88k - until pc98 slot support is written
mac68k - except maybe on the AV models someday, but of course there is
 no code for this
mvme68k, mvme88k - i'm not aware of VME audio boards (except for
Dialogic audio conferencing boards, but these can't be used to
output audio signal to a regular speaker or headphone jack)



Re: enable aucat by default

2011-10-07 Thread Jona Joachim
On Fri, Oct 07, 2011 at 10:35:27AM -0600, Theo de Raadt wrote:
  aucat is similar to X11 in this regard: necessary for a desktop, useless
  on a server.
 
 Except you are wrong.  For instance, my audio box has no display.
 
 aucat as a daemon is an intragral back-end to a library which more and
 more audio programs will be linked to, and those things need to move to
 a more powerful API.  If aucat is not running, a completely different
 audio flow codepath is used.
 
 Among other things, audio streams have to be mixed by a trusted third
 party.  One program's library cannot give audio input to another
 program to mix it.  Classically the over-complex solution has been to
 have the kernel mix it.  With aucat, the solution is for an ambiant
 running daemon to mix it and control everything.  It has to be
 running, or the old path is used.
 
 The plan is to gut the direct device code-paths substantially, and
 stop trying to perform magic two ways.  The direct-device methods will
 continue to work, but only as minimally as they did 10 years ago.

I'm totally aware of all of this, I tested sndio when it was not called
sndio yet, when ratchov@ (I think) sent the first diff for sdl to misc@.
And I read source-changes@.

 If some of you people keep insisting on having backwards compatibitity
 with the stone age, we'll have stone tools forever.
 
 I don't know why our mailing lists are always full of people who don't
 even understand what they are talking about.  Teach yourself before you
 try to teach us.

Come on, I'm not one of those guys. I never trolled or whined about
anything on this list.
There was a debate on whether it's good or not to enable aucat by
default. I just put forth the idea that maybe you could let the user
decide. You don't like the idea? Fine.

Best regards,
Jona



Re: enable aucat by default

2011-10-07 Thread Paul de Weerd
On Fri, Oct 07, 2011 at 11:46:19PM +0200, Jona Joachim wrote:
| There was a debate on whether it's good or not to enable aucat by
| default. I just put forth the idea that maybe you could let the user
| decide. You don't like the idea? Fine.

What are you talking about ?  The user still gets to decide; the
inverse situation will just be true.  It's deemed important enough to
have aucat running by default so the users have a working sound setup
when they need it; those that for whatever smart reason think they
don't need it get to set a variable in /etc/rc.conf.local.

Now it's the other way around: you must set the variable in
/etc/rc.conf.local if you *do* want to have aucat by default, but it's
still OpenBSD, an open source operating system you can configure to
your heart's content.  If you want and are capable, you can even
change the source code to make it do as you please.

And you know this, Jona...  You know there's an ongoing effort to
streamline the installation procedure (less questions, more just
press enter), more disabling things that are not needed by default
(e.g. ntpd doesn't play time server unless you configure it to), more
enabling things that make sense and are needed (e.g. pf!).  Now it
makes sense to enable aucat by default, even on machines that don't
have audio hardware (and probably never will), since the net win is
worth it.

But if you don't like it...

`echo aucat_flags=NO | sudo tee -a /etc/rc.conf.local`

Paul 'WEiRD' de Weerd

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