New comment by CameronNemo on void-packages repository https://github.com/void-linux/void-packages/pull/28766#issuecomment-778850010 Comment: Upstream has optimized code to do this (`/usr/lib/apparmor/rc.apparmor.functions` `parse_profiles()`). Currently we fudge it up with our custom one-by-one loading. Now we are reimplementing? Can we deprecate the runit "complain" mode and direct users to the `aa-complain(8)` utility? It would bring us closer to upstream and other distros. Minimal example of what using the upstream provided code would look like (they make you define log functions): ``` set -e test -d /sys/kernel/security/apparmor AA_FUNCTIONS=/usr/lib/apparmor/rc.apparmor.functions test -r "$AA_FUNCTIONS" aa_action() { :; } aa_log_warning_msg() { :; } aa_log_failure_msg() { :; } aa_log_action_start() { :; } aa_log_action_end() { :; } aa_log_daemon_msg() { :; } aa_log_skipped_msg() { :; } aa_log_end_msg() { :; } set +e . "$AA_FUNCTIONS" apparmor_restart exit $? ```