On 05/23/2016 01:43 PM, Josef Reidinger wrote:
On Mon, 23 May 2016 19:00:36 +0200
Christian Boltz <opensuse(a)cboltz.de> wrote:
> Am Montag, 23. Mai 2016, 07:43:59 CEST schrieb Goldwyn Rodrigues:
>> Apparmor has switched from perl to python (version 3.4). Most of the
>> tools/libraries are written in python. All earlier perl modules have
>> been deprecated.
>> OTOH, yast is moving towards ruby deprecating python bindings, but
>> still keeping the perl-bindings.
>> This leaves the fate of yast-apparmor in a bit unsupported state.
> "a bit"? ;-)
> 2.8 was the last AppArmor version with perl-based tools, and they
> were not maintained too much ;-) (look at the perl code to
> understand the reason *eg*)
> Since 2.9, we have the python-based tools with more readable code and
> less bugs.
>> I have tried rubypython, but it supports python version 2.7 only.
>> Supporting version 3 and above is not in their agenda as yet.
>> Another ruby module "python" is not actively developed/maintained.
>> So, I am asking for options on how we can take the development of
>> yast-apparmor forward.
>> One of the options is to create dbus interface between
>> servers_non_y2 and clients. But that would require another process
>> running in the background for event loop. It comes with it the
>> steps of cleaning up the process on a exit/kill etc.
>> Any other ideas? I am pushing for the comeback of python bindings if
>> possible ;)
> I'm thinking about implementing an alternative interface to
> aa-logprof and aa-genprof that uses JSON instead of user-readable
> text. (This is just an idea, no code for this exists yet.)
> This would mean that YaST would start "aa-logprof --json", get the
> questions in JSON format (the exact format still needs to be
> defined), convert it into a matching YaST dialog, and send back the
> user response to aa-logprof.
> It would also mean that you don't need to worry about the programming
> language because you just read and write JSON from/to a pipe, and
> that YaST gets all enhancements in aa-logprof automatically.
> Does that sound like a good idea?
It is a wonderful idea.
> Note: "no code yet" also means that I can't promise a date when
> aa-logprof --json will be available ;-)
> The YaST "profile editor" is a different story. I didn't think about
> a solution for it yet, but it should be possible to parse and convert
> a profile to JSON somehow. The interesting question is how we can
> teach YaST about allowed values without re-implementing everything in
> BTW: Will you be at the openSUSE conference? If yes, we can talk
> there ;-)
Unfortunately not :( I live too far away to attend.
JSoN interface sounds good to me. I think it is good idea. As I said on
IRC DBuS or CLI interface is good for yast. In general any stable
format like XML, JSoN or YAML is good for YaST as it is easy to parse
with ruby and easy to construct.
Yes, I think so too. JSON would get everything together. However, we
should try to build a two way system where conversion from JSON to
profile files and vice versa is available.
Let me know if I can get started with anything.
To unsubscribe, e-mail: yast-devel+unsubscribe(a)opensuse.org
To contact the owner, e-mail: yast-devel+owner(a)opensuse.org