Package conary :: Package build :: Module build :: Class ConsoleHelper
[hide private]
[frames] | no frames]

Class ConsoleHelper

source code

  action.Action --+        
                  |        
action.RecipeAction --+    
                      |    
            BuildAction --+
                          |
                         ConsoleHelper

NAME

r.ConsoleHelper() - Set up consolehelper symlinks, control files, and dependency

SYNOPSIS

r.ConsoleHelper(linkname, realprogram, [consoleuser=bool(False),] [timestamp=bool(False),] [pamfile=path,] [targetuser=user(root),] [session=bool,] [fallback=bool,] [noxoption=optstring,] [otherlines=linelist])

DESCRIPTION

The r.ConsoleHelper() class is called from within a Conary recipe to set up consolehelper symlinks, control files, and dependency for an application.

The linkname and realprogram paths are relative to destdir.

Setting consoleuser to True allows the console user to access the service without providing a password; for best security, it defaults to False.

Setting timestamp to True allows recently authenticated users to access the service without providing a password; for best security, it defaults to False.

The default pamfile contains auth via pam_rootok, then pam_stack service=system-auth and everything else as pam_permit. Otherwise, you can just provide the name of a file, relative to the builddir, to use. If pamfile is set, then consoleuser is ignored.

The session, fallback, and noxoption default to None, which means that no line is generated in the console.apps file. The otherlines option is the catchall for options otherwise unhandled by ConsoleHelper, and is simply a list of text lines (without newline characters) to place in the console.apps file. It is assumed that session=True implies that the application uses X.

KEYWORDS

The r.ConsoleHelper() class accepts the following keywords, with default values shown in parentheses when applicable:

consoleuser : (False) Allows the console user to access service without password if set to True.

fallback : (None) By default, no entry is added to the console.apps file

noxoption': (None) By default, no entry is added to the console.apps file

otherlines: Additional options catchall

pamfile : Specify a pamfile relative to the builddir. If used, consoluser is ignored.

session : (None) By default, no entry is added to the console.apps file

targetuser : (root) User service is executed as

timestamp : (False) If set to True, allows recently authenticated user access to the service without entering a password

EXAMPLES

r.ConsoleHelper('%(bindir)s/xmtr', '%(prefix)s/X11R6/bin/xmtr', session=True)

Demonstrates calling r.ConsoleHelper() and specifying the link name %(bindir)s/xmtr, program name %(prefix)s/X11R6/bin/xmtr, and using the argument session=True.

Instance Methods [hide private]
 
do(self, macros)
Do the build action
source code
 
__init__(self, recipe, *args, **keywords) source code

Inherited from BuildAction: doAction, initManifest, missingFiles

Inherited from action.RecipeAction: doPrep, doSuggestAutoBuildReqs, init_error

Inherited from action.Action: addArgs

Inherited from action.Action (private): _applyDefaults

Class Variables [hide private]
  keywords = {'consoleuser': False, 'fallback': None, 'noxoption...
The keywords and default values accepted by the class

Inherited from BuildAction: useExplicitManifest

Method Details [hide private]

do(self, macros)

source code 
Do the build action
Overrides: BuildAction.do
(inherited documentation)

__init__(self, recipe, *args, **keywords)
(Constructor)

source code 
Overrides: BuildAction.__init__
(inherited documentation)

Class Variable Details [hide private]

keywords

The keywords and default values accepted by the class
Value:
{'consoleuser': False,
 'fallback': None,
 'noxoption': None,
 'otherlines': None,
 'pamfile': None,
 'session': None,
 'targetuser': 'root',
 'timestamp': False}