Merge lp:~salgado/offspring/trivialities into lp:offspring

Proposed by Guilherme Salgado
Status: Merged
Approved by: Cody A.W. Somerville
Approved revision: 80
Merged at revision: 80
Proposed branch: lp:~salgado/offspring/trivialities
Merge into: lp:offspring
Diff against target: 64 lines (+10/-6)
3 files modified
Makefile (+2/-2)
config/offspring-web.wsgi (+4/-2)
docs/INSTALL (+4/-2)
To merge this branch: bzr merge lp:~salgado/offspring/trivialities
Reviewer Review Type Date Requested Status
Cody A.W. Somerville Approve
Review via email: mp+73558@code.launchpad.net

Description of the change

Some doc updates and a small change to config/offspring-web.wsgi so that we don't need to change the same thing in multiple places when developing

To post a comment you must log in.
Revision history for this message
Cody A.W. Somerville (cody-somerville) wrote :

Looks good. Please feel free to go ahead and land.

review: Approve
Revision history for this message
Guilherme Salgado (salgado) wrote :

I can't merge it as I'm not a member of the "Offspring hackers" team.

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

I don't think you meant to commit the addition of the builds directory? How did you manage that anyway? It's in .bzrignore. I can merge this once you've done that though.

Revision history for this message
Guilherme Salgado (salgado) wrote :

I bzr added the builds directory because 'make' fails without it. Maybe
I should've changed the build scripts to create it instead?

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

On Thu, 01 Sep 2011 00:01:39 -0000, Guilherme Salgado <email address hidden> wrote:
> I bzr added the builds directory because 'make' fails without it. Maybe
> I should've changed the build scripts to create it instead?

Hm I don't really remember how this works. But I'm fairly sure that in
production builds is a symlink so that trying to pull this branch over
the top will fail...

Cheers,
mwh

Revision history for this message
Cody A.W. Somerville (cody-somerville) wrote :

Makefile should be fixed. '[ -d builds ] && chmod -r builds' should be changed to something like 'chmod -r builds 2> /dev/null || true' or '[ ! -d builds ] || chmod -r builds'. The call to restore read permissions should be changed in a similar fashion.

For those curious why we do this, it is a hack to prevent distutils from transversing and accessing every single file underneath builds when we run setup.py. Although not problematic on a devel instance, it takes a significant amount of time in production where there are tons of files.

Revision history for this message
Guilherme Salgado (salgado) wrote :

I've fixed the Makefile as you suggested, Cody.

lp:~salgado/offspring/trivialities updated
81. By Guilherme Salgado

Fix the Makefile to not crash when there's no 'builds' directory and 'bzr rm' the builds directory I added in the previous commit

Revision history for this message
Guilherme Salgado (salgado) wrote :

Hi Cody,

Is this looking ok now? Would you mind landing it for me?

Cheers

Revision history for this message
Cody A.W. Somerville (cody-somerville) wrote :

Looks good. Merging.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile'
2--- Makefile 2011-08-11 00:13:54 +0000
3+++ Makefile 2011-09-01 14:45:24 +0000
4@@ -15,9 +15,9 @@
5 # XXX: Remove read permission from builds directory while running
6 # setup.py to prevent distutils from transversing and accessing every
7 # single file underneath it. Restore read permissions once completed.
8- [ -d builds ] && chmod -r builds
9+ [ ! -d builds ] || chmod -r builds
10 ./.virtualenv/bin/python setup.py develop --script-dir=./bin/
11- [ -d builds ] && chmod +r builds
12+ [ ! -d builds ] || chmod +r builds
13 [ -f bin/offspring-build ] || ln -s `pwd`/lib/offspring/build/bin/* bin/
14 mkdir -p logs
15 mkdir -p scripts && ln -s --force `pwd`/lib/offspring/build/scripts/* scripts/
16
17=== modified file 'config/offspring-web.wsgi'
18--- config/offspring-web.wsgi 2011-08-11 00:16:09 +0000
19+++ config/offspring-web.wsgi 2011-09-01 14:45:24 +0000
20@@ -6,13 +6,15 @@
21
22 ## CONFIGURABLE OPTIONS
23
24+DEPLOY_ROOT = '/srv'
25+
26 # Directories to add to sys.path
27 # ex. ['srv/.virtualenv/lib/python2.5/dist-packages']
28-ALLDIRS = ['srv/.virtualenv/lib/python2.6/site-packages']
29+ALLDIRS = ['%s/.virtualenv/lib/python2.6/site-packages' % DEPLOY_ROOT]
30
31 # Offspring Config File
32 # ex. '/srv/offspring/config/offspring.cfg'
33-OFFSPRING_CONFIGFILE='/srv/config/offspring.cfg'
34+OFFSPRING_CONFIGFILE = '%s/config/offspring.cfg' % DEPLOY_ROOT
35
36 # Django settings module to use
37 # ex. 'offspring.web.settings_production'
38
39=== modified file 'docs/INSTALL'
40--- docs/INSTALL 2011-08-26 12:06:20 +0000
41+++ docs/INSTALL 2011-09-01 14:45:24 +0000
42@@ -56,6 +56,8 @@
43 * libapache2-mod-wsgi
44 * python-virtualenv
45 * postgresql
46+ * python2.6
47+ * python2.6-dev
48
49 2. Create the database.
50
51@@ -76,11 +78,11 @@
52 4. In the root of the installation (where the Makefile resides), execute
53 'make web'.
54
55- 5. Ppopulate the database.
56+ 5. Populate the database.
57
58 Replacing 'SETTINGS_MODULE' with the settings module you specified in
59 config/offspring-web.wsgi, execute the following:
60- bin/lexbuilder-web syncdb --settings=SETTINGS_MODULE
61+ bin/offspring-web syncdb --settings=SETTINGS_MODULE
62
63 6. Using config/offspring-web.apache as a template, create a site config
64 file under '/etc/apache2/sites-available/' and then use 'a2ensite' to

Subscribers

People subscribed via source and target branches