[Apparmor-dev] [RFR] tools changes for repository and logparsing

Dominic Reynolds dominic at mercenarylinux.com
Wed Feb 20 11:25:38 MST 2008


Hi,

I've attached 3 patches against the tools libraries:

repo-refactor.diff      -   Refactor the basic repository communication
                            routines into a standalone perl module.
                            Factor out the config file reading/writing into a
                            standalone perl module. The goal here was to
                            start to break out some of the basic routines
                            that the tools use into their own independent
                            modules.

logparse.diff           -   Update the tools to use the apparmor loparsing
                            library to read events from the log files.

repo-cmd-line-tool.diff -   Basic prototype for a command line tool to allow
                            users to push/pull/search for profiles in remote
                            repositories. It is not fully functional at the
                            moment (the official repository is down) but I'd
                            like to get feedback on the basic usage. The
                            options for
                              push/pull/search/status/getconfig/setconfig
                            are working (usage/help below). I think the next
                            step could be a basic gtk UI to give users a
                            decent UI to manage profiles/repositories.
                            Feedback welcomed about the usage model - 
                            would a graphical tool make sense?



--------------------------------------------------------
aa-repo.pl --command args
    --search [author=XXX] [prog=XXX] [id=XXX]
             Search the repository for profiles matching the search criteria
             and return the results.
             NOTE: One --search switch per option

    --verbose|v
             Verbosity level. Supply either one or two switches. Two switches
             adds full profile text in returned search results.

    --push   [--profile=XXX|all] [--changelog=XXX]
             Push local profiles to repository, uses configured user and upon
             overwrite of an existing profile in the repository then prompt
             user with a diff for confirmation XXX the name of the application
             whose profile should be uploaded or "all"  to upload all
             profiles.  Multiple --profile switches may be passed to supply
             multiple profile names

             e.g.  --push --profile /usr/sbin/mdnsd --profile /usr/sbin/ftp
             e.g.  --push --profile all

    --pull   [--author=XXX] [--profile=XXX] or [--id=XXX] [--mode=complain]
             pull remote profiles and install on local system
             If operation will change local profiles then prompt user with
             diff for confirmation
             NOTE: One --pull switch per option and there are three acceptable
                   combinations

             --pull --author=XXX
               * pull all profiles in the repo for the author

             --pull --author=XXX  --profile=XXXX
               * pull the profile for prog owned by author

             --pull --id=XXXX
               * pull the profile with id

             --pull --mode=complain
               * set the profile(s) to complain mode when installed

             Profiles are checked for conflicts with currently installed
             profiles and presented as a list to the user to confirm and view.

    --sync   [--up] [--down] [--noconfirm]
             Synchronize local profile set with the repository - showing
             changes and allowing prompting the user with the diffs and
             suggest the newest version to be activated. If the --all option
             is passed then treat profiles not marked as remote as new
             profiles that will be uploaded to the repository.

    --status
             Show the current status of the local profile set. This operation
             is similar to sync but does not prompt the user to up|down load
             changes

    --setconfig [url=xxx] [username=xxxx] [password=xxxx] [enabled=(yes|no)]
                [upload=(yes|no)]
              Set the configuration options for the repository.
              NOTE: One --setconfig switch per option

    --getconfig|c
             Print the current configuration for the repsository

    --quiet|q Don't prompt user - assume that all changes should be made.
--------------------------------------------------------------------

-dom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logparse.diff
Type: text/x-patch
Size: 7985 bytes
Desc: not available
Url : http://forge.novell.com/pipermail/apparmor-dev/attachments/20080220/5f1a9437/logparse.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: repo-cmd-line-tool.diff
Type: text/x-patch
Size: 29769 bytes
Desc: not available
Url : http://forge.novell.com/pipermail/apparmor-dev/attachments/20080220/5f1a9437/repo-cmd-line-tool.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: repo-refactor.diff
Type: text/x-patch
Size: 81596 bytes
Desc: not available
Url : http://forge.novell.com/pipermail/apparmor-dev/attachments/20080220/5f1a9437/repo-refactor.bin


More information about the Apparmor-dev mailing list