What are the different ways I can export permissions from a preconfigured Drupal site I have a site that I need to export permissions from and import into version-controlled code. We aren't using feature, strongarm etc, so although I know a  lot of people will say these are the go to  solutions, I need to look at alternatives. Are permissions stored as variables in the site or otherwise? I would I export and import variables into an install profile or in a module?
This module(Export roles and permissions) allows you to exports roles and permission by generating a hook_install implementation


  This module allows you to generate a hook_install() implementation
  that creates the chosen roles with their associated permissions. The
  main purpose for creating this module was to transfer roles from a
  local dev machine to a remote stage/live server.