Create new sites in a default path
Review Request #6682 — Created Dec. 8, 2014 and submitted
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.
- Change Summary:
-
Switched the multi-line import to make PEP8 happy.
- Commit:
-
e331add7b4a7bfb8701578bb81e58650199e789a87cf15b9596beabb46d4f9fae801fd512ea7c2e2
-
Tool: Pyflakes Processed Files: reviewboard/cmdline/rbsite.py reviewboard/platform.py Tool: PEP8 Style Checker Processed Files: reviewboard/cmdline/rbsite.py reviewboard/platform.py
- Change Summary:
-
Changed the relative path detection to use the platform-agnostic os.path.isabs() rather than checking for a leading slash
- Description:
-
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 does not have a leading slash will ~ be assumed to be relative to the default site path instead of the ~ current directory. ~ directory. Any site input that is not absolute will be assumed to ~ be relative to the default site path instead of the current ~ directory. - Commit:
-
87cf15b9596beabb46d4f9fae801fd512ea7c2e2f1acc7a29fe57ba56c65fdc05f0b4ee5fe364d12
-
Tool: Pyflakes Processed Files: reviewboard/cmdline/rbsite.py reviewboard/platform.py Tool: PEP8 Style Checker Processed Files: reviewboard/cmdline/rbsite.py reviewboard/platform.py
- Change Summary:
-
Added unicode_literals to platform.py
- Commit:
-
f1acc7a29fe57ba56c65fdc05f0b4ee5fe364d12e8586ea8b4da0bc6846fff80c7d79407fe2b8315