[Bug 1596717] Re: Can't execute paplay, aplay, etc. even with pulseaudio interface

2016-07-01 Thread Bruno Nova
OK, I found what the problem is:
For pulseaudio to work (or at least paplay), the network plug/interface also 
needs to be added.
Snapd 2.0.10+ is also needed.

Without the network plug, running paplay prints these messages to the
journal:

Jul 01 21:02:08 bruno-laptop audit[27684]: SECCOMP auid=4294967295 uid=1000 
gid=1000 ses=4294967295 pid=27684 comm="paplay" 
exe="/snap/tetris-em-racket/x1/usr/bin/pacat" sig=31 arch=c03e syscall=55 
compat=0 ip=0x7fa4b5b3892a code=0x0
Jul 01 21:02:08 bruno-laptop kernel: audit: type=1326 audit(1467403328.239:86): 
auid=4294967295 uid=1000 gid=1000 ses=4294967295 pid=27684 comm="paplay" 
exe="/snap/tetris-em-racket/x1/usr/bin/pacat" sig=31 arch=c03e syscall=55 
compat=0 ip=0x7fa4b5b3892a code=0x0

Adding the network plug fixes this.

So, this needs to be investigated.
The pulseaudio interface also needs some kind of local network access. But 
giving it full network and Internet access is not a great idea.

I'll edit the bug description accordingly.

---

"aplay" still doesn't work.
It throws this error:

ALSA lib conf.c:3750:(snd_config_update_r) Cannot access file 
/usr/share/alsa/alsa.conf
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM default
aplay: main:722: audio open error: No such file or directory

I'll report this in another bug.

** Summary changed:

- Can't execute paplay, aplay, etc. even with pulseaudio interface
+ paplay doesn't work without the network interface

** Description changed:

+ Pulseaudio, or at least the "paplay" command, doesn't work without the
+ network plug/interface.
+ 
+ Running that command inside a snap with the pulseaudio interface prints
+ something like this in the journal:
+ 
+ Jul 01 21:02:08 bruno-laptop audit[27684]: SECCOMP auid=4294967295 uid=1000 
gid=1000 ses=4294967295 pid=27684 comm="paplay" 
exe="/snap/tetris-em-racket/x1/usr/bin/pacat" sig=31 arch=c03e syscall=55 
compat=0 ip=0x7fa4b5b3892a code=0x0
+ Jul 01 21:02:08 bruno-laptop kernel: audit: type=1326 
audit(1467403328.239:86): auid=4294967295 uid=1000 gid=1000 ses=4294967295 
pid=27684 comm="paplay" exe="/snap/tetris-em-racket/x1/usr/bin/pacat" sig=31 
arch=c03e syscall=55 compat=0 ip=0x7fa4b5b3892a code=0x0
+ 
+ Note: snapd 2.0.10 or later (which is in xenial-proposed right now) is
+ required to even get this far.
+ 
+ 
+ [ORIGINAL DESCRIPTION]
  I was packaging a small Racket/Scheme game.
  Sound playback doesn't work, even with the pulseaudio interface.
  
  According to 
https://docs.racket-lang.org/gui/Windowing_Functions.html#%28def._%28%28lib._mred%2Fmain..rkt%29._play-sound%29%29
 , Racket uses the "aplay" command (or others) to play sound, but it isn't 
available inside the snap.
  I tried bundling the alsa-utils package, but it throws an error when trying 
to play a sound.
  
  Maybe the pulseaudio interface should grant access to these commands and
  everything else that is required?

** Description changed:

  Pulseaudio, or at least the "paplay" command, doesn't work without the
  network plug/interface.
  
  Running that command inside a snap with the pulseaudio interface prints
  something like this in the journal:
  
  Jul 01 21:02:08 bruno-laptop audit[27684]: SECCOMP auid=4294967295 uid=1000 
gid=1000 ses=4294967295 pid=27684 comm="paplay" 
exe="/snap/tetris-em-racket/x1/usr/bin/pacat" sig=31 arch=c03e syscall=55 
compat=0 ip=0x7fa4b5b3892a code=0x0
  Jul 01 21:02:08 bruno-laptop kernel: audit: type=1326 
audit(1467403328.239:86): auid=4294967295 uid=1000 gid=1000 ses=4294967295 
pid=27684 comm="paplay" exe="/snap/tetris-em-racket/x1/usr/bin/pacat" sig=31 
arch=c03e syscall=55 compat=0 ip=0x7fa4b5b3892a code=0x0
  
- Note: snapd 2.0.10 or later (which is in xenial-proposed right now) is
- required to even get this far.
+ Note: snapd 2.0.10 or later (which is in xenial-proposed right now) is 
required to even get this far.
+ The snap also needs to bundle "pulseaudio-utils" for it to work.
  
  
  [ORIGINAL DESCRIPTION]
  I was packaging a small Racket/Scheme game.
  Sound playback doesn't work, even with the pulseaudio interface.
  
  According to 
https://docs.racket-lang.org/gui/Windowing_Functions.html#%28def._%28%28lib._mred%2Fmain..rkt%29._play-sound%29%29
 , Racket uses the "aplay" command (or others) to play sound, but it isn't 
available inside the snap.
  I tried bundling the alsa-utils package, but it throws an error when trying 
to play a sound.
  
  Maybe the pulseaudio interface should grant access to these commands and
  everything else that is required?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1596717

Title:
  paplay doesn't work without the network interface

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1596717/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1596717] Re: Can't execute paplay, aplay, etc. even with pulseaudio interface

2016-07-01 Thread Sebastien Bacher
it's in xenial-proposed if you want to test from there

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1596717

Title:
  Can't execute paplay, aplay, etc. even with pulseaudio interface

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1596717/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1596717] Re: Can't execute paplay, aplay, etc. even with pulseaudio interface

2016-06-30 Thread Bruno Nova
Thanks! I'll wait for 2.0.10 to reach Xenial, then I'll try it.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1596717

Title:
  Can't execute paplay, aplay, etc. even with pulseaudio interface

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1596717/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1596717] Re: Can't execute paplay, aplay, etc. even with pulseaudio interface

2016-06-30 Thread Sebastien Bacher
using paplay works fine here on snapd 2.0.9, could you share you 
snapcraft.yaml/launcher script?
Note that snapd 2.0.10 from yesterday allows access to the machine-id file and 
fixes bug #1594318 so it would be worth trying if that resolves your issues

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1596717

Title:
  Can't execute paplay, aplay, etc. even with pulseaudio interface

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1596717/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1596717] Re: Can't execute paplay, aplay, etc. even with pulseaudio interface

2016-06-28 Thread Bruno Nova
The aplay, paplay, etc. commands don't exist inside the snap.
I guess the ubuntu-core snap doesn't include them.

However, I tried to apply the workaround from bug #1594318 and add a wrapper 
script to the snap called "aplay" that would run "paplay", but there's still no 
sound.
It complains that "connection refused", and the journal informs that AppArmor 
is denying access to "/etc/machine-id".
Giving access to that file in the AppArmor profile solves the "connection 
refused" error, but there's still no sound.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1596717

Title:
  Can't execute paplay, aplay, etc. even with pulseaudio interface

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1596717/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1596717] Re: Can't execute paplay, aplay, etc. even with pulseaudio interface

2016-06-28 Thread Sebastien Bacher
that could be the same than bug #1594318

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1596717

Title:
  Can't execute paplay, aplay, etc. even with pulseaudio interface

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1596717/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs