5b78325 1st step merge with pkg-update: fix #660446

Authored and Committed by jpokorny 13 years ago
    1st step merge with pkg-update: fix #660446
    
    - WARNING: this patch may have lowered quality of current codebase
      but it is necessary in order to merge quite a large scale of
      changes (so far being prepared separately in parallel branch)
      in several consequent steps/commits after which this quality
      should be restored
    
    - the most important change introduced with this patch is moving (almost)
      all the responsibilities of tasks connected with building and installing
      (i.e. copy file from A to B, make substitution of some strings
      in the file, etc.) to setup.py
      - this is done by extending 'setuptools' package directly from setup.py
        (which is done by creating a new command "pkg_prepare" and hooking it
         to "build" and "install" commands as their first subcommand)
        before it is effectively invoked (setup.py is a standard file used for
        installation of native Python packages via either distutils from
        std. Python lib. or via setuptools which is luci's case)
        - this additional own mechanism in setup.py will allow to utilize
          setup.cfg (another standard file connected with Python native
          packaging) file to configure important parameters of building/
          installing the package while the rest of package parameters
          (very base parameters that should be changed as where to find
          some files localy within the directory structure of the project)
          reside in setup.py as usual (in setup.py, there is also a mapping
          telling which file and where to install it and whether to use
          string substitution before the copy is made)
          - alternatively, instead of defining values in setup.cfg,
            they can be defined (overriding respective values in setup.cfg)
            directly as command-line arguments to "python setup.py" command,
            the chain of them ("key=value" format) has only to be prefixed
            with "pkg-prepare" argument so following arguments are proceeded
            correctly
        - mentioned string substitution allows strings in @FOO@ format to be
          substituted with "foo" parameter provided either from setup.cfg or
          preconfigured in setup.py
    
    -> this effectively brings better level of package maintainability and
       the other advantage is that the luci now forms self-contained native
       Python package and now additional work with various files outside
       the luci itself (initscript, for instance) is required
    
    - another concept introduced with patch: the configuration file is not
      present from the beginning (not a part of the package, neither system
      package nor Python native package), it is generated on-demand/with
      the first run of luci service (using initscript) from prepared
      template
      - during this preparation from template (handled by "paster",
        "make-config" command), some strings may be substituted
        with special values provided by paster (such as generated
        pseudo-random value) which is used to set pseudo-random value
        to security-sensitive configuration items containing "secret"
        (currently only beaker.session.secret)
    
    - miscellaneous changes
      - ez_setup moved into single file instead of the directory
        (semantically the same) and updated to newest version
      - README.txt renamed to README (which might be more native for Linux,
        setuptools/distutils handles this in the same manner) and
        updated with the new instructions
      - package info as version, author etc. is now moved to
        luci/__init__.py and read from there by setup.py
      - very minor other changes
    
        
file modified
+20 -21
file modified
+10 -3
file added
+122
file removed
-24
file removed
-16
file removed
-114
extensions/sasl2auth.c lucipam/lucipam.c
file renamed
+25 -18
ez_setup.py ez_setup/__init__.py
file renamed
+82 -27
file removed
-14
file removed
-10
file renamed
file was renamed with no change to the file
file renamed
+30 -18
file renamed
file was renamed with no change to the file
file renamed
+7 -7
file added
+15
file modified
+213 -55
file modified
+49 -1
file modified
+30 -2
file added
+18
luci/lib/plugin_sasl2auth.py luci/lib/pamplugin.py
file renamed
+8 -13
file modified
+0 -2
file removed
-361
file removed
-3
file removed
-15
file modified
+25 -1
file modified
+439 -35