Create new sites in a default path

Review Request #6682 — Created Dec. 8, 2014 and submitted

Information

Review Board
master
e8586ea...

Reviewers

This lays the groundwork for better support of SELinux on platforms
that support it. SELinux rules are based in large part on
filesystem location. By installing sites into a default path, we
can create the SELinux rules on those standard paths.

This patch also moves a few global variables into a new platform.py
file. This is so that packagers for Linux distributions have an
easy place to identify things like filesystem paths that commonly
need to be modified to meet the system's packaging guidelines.

NOTE: This patch changes the current behavior in one significant
place: rb-site can no longer reference relative paths for the site
directory. Any site input that is not absolute will be assumed to
be relative to the default site path instead of the current
directory.

I created a site using 'rb-site install rb.example.com', which succeeded. I then also tested 'rb-site upgrade rb.example.com', which also succeeded.

Description From Last Updated

Col: 34 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

You should be using __future__.unicode_literals

brenniebrennie
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/cmdline/rbsite.py
        reviewboard/platform.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/cmdline/rbsite.py
        reviewboard/platform.py
    
    
  2. reviewboard/cmdline/rbsite.py (Diff revision 1)
     
     
    Show all issues
    Col: 34
     E126 continuation line over-indented for hanging indent
    
  3. 
      
sgallagh
  1. 
      
  2. reviewboard/cmdline/rbsite.py (Diff revision 1)
     
     
    I'll change this if desired, but I'd argue that PEP8 is wrong here; the full indentation makes it more readable.
    1. We're using parens for multi-line imports, which makes Review Bot/pep8 tool happier. For instance:

      from reviewboard.platform import (SITELIST_FILE_UNIX,
                                        ...)
      
  3. 
      
sgallagh
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/cmdline/rbsite.py
        reviewboard/platform.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/cmdline/rbsite.py
        reviewboard/platform.py
    
    
  2. 
      
brennie
  1. 
      
  2. reviewboard/platform.py (Diff revision 2)
     
     
    Show all issues

    You should be using __future__.unicode_literals

    1. Since this was a bit unclear, what I meant was that you should have

      from __future__ import unicode_literals
      

      at the top of the file

  3. 
      
sgallagh
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/cmdline/rbsite.py
        reviewboard/platform.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/cmdline/rbsite.py
        reviewboard/platform.py
    
    
  2. 
      
sgallagh
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/cmdline/rbsite.py
        reviewboard/platform.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/cmdline/rbsite.py
        reviewboard/platform.py
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
sgallagh
Review request changed
Status:
Completed
Change Summary:
Pushed to release-2.0.x (d095085)