On Thursday 25 November 2010, Dave Plater wrote:
On 11/25/2010 12:54 AM, Pedro Lopez-Cabanillas wrote:
On Wednesday 24 November 2010, Dave Plater wrote:
I would like to achieve is a jack that just works with no tweaking but it seems there is a security problem with a %post rpm script granting real time rights when jack is installed.
Can we see this %post script? Is it modifying /etc/security/limits.conf and/or something else?
Regards, Pedro
I simply inquired, on the packaging list about the existence of a macro to add the entries that jack needs to /etc/security/limits.conf and one of the factory reviewers replied quote : "I'd veto such abuse of the audio group. The jack daemon needs to be started with appropriate privileges, ie either by a supervising root process or via setuid/fscaps." and when I explained that jack was normally run as a users process and was normally started by the application that wished to use it quote : "Just as cited above :-) Either some root process needs to start jackd as the intended user with the necessary privileges (e.g. via DBus) or you need to make jackd setuid root/grant fscaps. If jackd isn't prepared to run that way you could also write a small wrapper for that purpose. In any case the security team wants to review such things prior to inclusion in Factory."
I haven't quite digested this information yet but it doesn't look like there's any other way to achieve this besides sed. What I don't quite understand yet is what I have to do to enable this to be accepted into factory although I'm starting to understand the reason for jack dbus, which doesn't work for rosegarden. I've test built a jack with both classic and dbus which works with rosegarden although I perceived a slow down and the warning when built, also my instinct, says be wary of this.
I've only about 5 to 8 years, self taught, linux experience, my programming has all been win98se multimedia and dedicated arcade games at assembler level and getting a jack that "just works" is the thing that prompted me to start this thread.
Do you understand from the quoted replies above what is needed to get a jack that "just works"?
I'm not a Jack expert, and I try to avoid using Jack as much as I can, so my best advice for you is to look for answers in the Jack or linux-audio-dev mailing lists. Anyway, here is my opinion. I've been a Rosegarden user for some years, and contributed to the project in the past. You can build and use Rosegarden without Jack, if you only want MIDI functionality. Indeed, Rosegarden has good MIDI support, but very limited audio capabilities. Other sequencers like Muse and Qtractor depend on Jack more deeply, and can't be installed without it. You *can* use Jack without realtime priority. For instance, just start the server without the "-R" argument. It is not the best/optimal scenario, but this configuration "just works" depending on your audio card, CPU, concurrently running software, and latency requirements. Finally, if you really need to run Jack with high priority, in my opinion the best way is using PAM/limits.conf, as it is documented in jackaudio.org (setting group or user limits in /etc/security/limits.conf). The solution of running Jack as root or setuid root is not an option, because in that case the clients as Rosegarden must be executed as root as well. I think that a wrapper program to start the daemon is not an option either, because Jack can be auto-started (forked) by the client applications. This is a consequence of the design of Jack, and you can do very little about it. If you want to write such a wrapper program and need some documentation, here are some pointers: http://linux.die.net/man/2/getrlimit http://linux.die.net/man/2/sched_setscheduler http://linux.die.net/man/1/chrt Other audio servers have the same requirements as Jack with regarding to high priority, for instance PulseAudio can be used with RLIMIT_RTPRIO like Jack or with a new solution named RealtimeKit, which is based on DBus and PolicyKit. Some documentation about RealtimeKit: http://git.0pointer.de/?p=rtkit.git;a=blob;f=README Unfortunately, Jack can't use RealtimeKit and looks like Jack developers aren't interested in it. BTW, RealtimeKit doesn't work in openSUSE 11.3 without manual tweaking of config files, so PulseAudio can't be used with high priority by default. This is off topic in this discussion, but I think that opensuse-multimedia readers should be aware of this problem. This is not only a limitation for PulseAudio, but also for other programs using RealtimeKit like FluidSynth and all programs using my Drumstick libraries. Regards, Pedro -- To unsubscribe, e-mail: opensuse-multimedia+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-multimedia+help@opensuse.org