Colin Watson has proposed merging 
~cjwatson/launchpad:byte-compile-scripts-pythonpath into launchpad:master.

Commit message:
Byte-compile scripts/_pythonpath.py before copying Apache config

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/406764

Otherwise we can end up with `scripts/__pycache__` being owned by root due to 
Apache byte-compiling `scripts/_pythonpath.py` in the process of loading 
`scripts/branch-rewrite.py`, causing problems for buildbot and perhaps other 
things.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of 
~cjwatson/launchpad:byte-compile-scripts-pythonpath into launchpad:master.
diff --git a/Makefile b/Makefile
index 7575fbc..e670a90 100644
--- a/Makefile
+++ b/Makefile
@@ -482,6 +482,9 @@ copy-certificates:
 	cp configs/$(LPCONFIG)/launchpad.key /etc/apache2/ssl/
 
 copy-apache-config: codehosting-dir
+	# Byte-compile scripts/_pythonpath.py first, otherwise Apache may do
+	# so as root and cause permission problems.
+	$(PY) -m py_compile scripts/_pythonpath.py
 	# We insert the absolute path to the branch-rewrite script
 	# into the Apache config as we copy the file into position.
 	set -e; \
_______________________________________________
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to     : launchpad-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp

Reply via email to