jeroen/RAppArmor

FR: Extract rlimit API to separate package

Closed this issue · 8 comments

and reexport the symbols from there?

This would simplify installation on desktop environments that don't have AppArmor but want to use rlimit functionality. Suggested name: ulimit ;-)

I actually considered creating a linux package with bindings to anything in the kernel, including rlimit, but also other stuff. But it was never important enough, and currently RAppArmor should install without too much trouble on all linux distro's.

Ah I just found your ulimit package, I get the joke now :)

People still need to install libapparmor-dev, for which they might have no permission. I never got around adding the other resources, but my package has nicer output ;-)

I'd be happy to implement the split.

NB: I've heard about RAppArmor, but never actually looked into it partly because it's name reads like RcppArmor and I thought it's Rcpp-something...

Yeah I don't like the name anymore either. When I started writing the package 5 years ago I thought it would be nice to follow the Dirk conventions, but that was a mistake.

What do you think about creating a linux or unix package instead of ulimit? That way we might add other kernel utils later. Simon has a related package unixtools.

I'm not opposed to creating a comprehensive package, but I tend to prefer smaller purpose-oriented packages -- easier to maintain and to test, can be released independently. A yet-to-be-born posix package could reexport functions from other packages.

To me, it looks like RAppArmor could be split in four packages:

  • rlimit API:ulimit
  • process API: proctools (?)
  • eval.secure: imports ulimit and proctools
  • RAppArmor

The eval.secure() functionality could also remain in RAppArmor for now and be substituted by a withr-like interface in the ulimit and proctools packages.

Currently, I have extracted rlimit + process API into a separate branch, removing AppArmor stuff and keeping the whole history: https://github.com/krlmlr/RAppArmor/commits/rewrite. I'm about to proceed with extracting three separate packages. What do you think?

{unix} available now, thanks!