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
=== modified file 'Makefile'
--- Makefile 2011-08-11 00:13:54 +0000
+++ Makefile 2011-09-01 14:45:24 +0000
@@ -15,9 +15,9 @@
15 # XXX: Remove read permission from builds directory while running 15 # XXX: Remove read permission from builds directory while running
16 # setup.py to prevent distutils from transversing and accessing every16 # setup.py to prevent distutils from transversing and accessing every
17 # single file underneath it. Restore read permissions once completed.17 # single file underneath it. Restore read permissions once completed.
18 [ -d builds ] && chmod -r builds18 [ ! -d builds ] || chmod -r builds
19 ./.virtualenv/bin/python setup.py develop --script-dir=./bin/19 ./.virtualenv/bin/python setup.py develop --script-dir=./bin/
20 [ -d builds ] && chmod +r builds20 [ ! -d builds ] || chmod +r builds
21 [ -f bin/offspring-build ] || ln -s `pwd`/lib/offspring/build/bin/* bin/21 [ -f bin/offspring-build ] || ln -s `pwd`/lib/offspring/build/bin/* bin/
22 mkdir -p logs22 mkdir -p logs
23 mkdir -p scripts && ln -s --force `pwd`/lib/offspring/build/scripts/* scripts/23 mkdir -p scripts && ln -s --force `pwd`/lib/offspring/build/scripts/* scripts/
2424
=== modified file 'config/offspring-web.wsgi'
--- config/offspring-web.wsgi 2011-08-11 00:16:09 +0000
+++ config/offspring-web.wsgi 2011-09-01 14:45:24 +0000
@@ -6,13 +6,15 @@
66
7## CONFIGURABLE OPTIONS7## CONFIGURABLE OPTIONS
88
9DEPLOY_ROOT = '/srv'
10
9# Directories to add to sys.path11# Directories to add to sys.path
10# ex. ['srv/.virtualenv/lib/python2.5/dist-packages']12# ex. ['srv/.virtualenv/lib/python2.5/dist-packages']
11ALLDIRS = ['srv/.virtualenv/lib/python2.6/site-packages']13ALLDIRS = ['%s/.virtualenv/lib/python2.6/site-packages' % DEPLOY_ROOT]
1214
13# Offspring Config File15# Offspring Config File
14# ex. '/srv/offspring/config/offspring.cfg'16# ex. '/srv/offspring/config/offspring.cfg'
15OFFSPRING_CONFIGFILE='/srv/config/offspring.cfg'17OFFSPRING_CONFIGFILE = '%s/config/offspring.cfg' % DEPLOY_ROOT
1618
17# Django settings module to use19# Django settings module to use
18# ex. 'offspring.web.settings_production'20# ex. 'offspring.web.settings_production'
1921
=== modified file 'docs/INSTALL'
--- docs/INSTALL 2011-08-26 12:06:20 +0000
+++ docs/INSTALL 2011-09-01 14:45:24 +0000
@@ -56,6 +56,8 @@
56 * libapache2-mod-wsgi56 * libapache2-mod-wsgi
57 * python-virtualenv57 * python-virtualenv
58 * postgresql58 * postgresql
59 * python2.6
60 * python2.6-dev
5961
60 2. Create the database.62 2. Create the database.
6163
@@ -76,11 +78,11 @@
76 4. In the root of the installation (where the Makefile resides), execute78 4. In the root of the installation (where the Makefile resides), execute
77 'make web'.79 'make web'.
7880
79 5. Ppopulate the database.81 5. Populate the database.
8082
81Replacing 'SETTINGS_MODULE' with the settings module you specified in83Replacing 'SETTINGS_MODULE' with the settings module you specified in
82config/offspring-web.wsgi, execute the following:84config/offspring-web.wsgi, execute the following:
83 bin/lexbuilder-web syncdb --settings=SETTINGS_MODULE85 bin/offspring-web syncdb --settings=SETTINGS_MODULE
8486
85 6. Using config/offspring-web.apache as a template, create a site config87 6. Using config/offspring-web.apache as a template, create a site config
86 file under '/etc/apache2/sites-available/' and then use 'a2ensite' to88 file under '/etc/apache2/sites-available/' and then use 'a2ensite' to

Subscribers

People subscribed via source and target branches