document best practice with 'manage.py install' and packaging
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PlainBox (Toolkit) |
Won't Fix
|
High
|
Unassigned |
Bug Description
ubuntu@
Desired=
| Status=
|/ Err?=(none)
||/ Name Version Architecture Description
+++-===
un checkbox <none> <none> (no description available)
ii checkbox-ng 0.4~dev+
ii checkbox-ng-service 0.4~dev+
ii plainbox 0.6~dev+
un plainbox-
ii plainbox-
ii plainbox-
ii plainbox-
ii python3-checkbox-ng 0.4~dev+
ii python3-
ii python3-plainbox 0.6~dev+
What I did:
ubuntu@
ubuntu@
ubuntu@
CRITICAL plainbox.crashes: Executable 'manage.py' invoked with Namespace(
Traceback (most recent call last):
File "/usr/lib/
return self.dispatch_
File "/usr/lib/
return ns.command.
File "/usr/lib/
self.
File "/usr/lib/
lambda stream: self._get_
File "/usr/lib/
with open(root + pathname, 'wt', encoding='UTF-8') as stream:
PermissionError: [Errno 13] Permission denied: '/usr/local/
Traceback (most recent call last):
File "./manage.py", line 20, in <module>
gettext_
File "/usr/lib/
raise SystemExit(
File "/usr/lib/
return self.dispatch_
File "/usr/lib/
return self.dispatch_
File "/usr/lib/
return ns.command.
File "/usr/lib/
self.
File "/usr/lib/
lambda stream: self._get_
File "/usr/lib/
with open(root + pathname, 'wt', encoding='UTF-8') as stream:
PermissionError: [Errno 13] Permission denied: '/usr/local/
It clearly will be unable to write /usr/local/
Strangely, we get the same error if first we try to build a source package (which works) and then we try to sbuild that. Is it because the directory doesn't exist? (/usr/local/
summary: |
- manage.py install fails + document best practice with 'manage.py install' and packaging |
Changed in plainbox: | |
status: | New → Triaged |
Changed in plainbox: | |
status: | Triaged → Won't Fix |
OK, this is by design, what's hitting us is using the recommended debian/rules from the documentation:
#!/usr/bin/make -f
%:
dh "$@"
override_ dh_auto_ build: /manage. py build /manage. py install
$(CURDIR)
$(CURDIR)
manage.py install tries to install to /usr/share, causing this problem. The plainbox providers have this instead :
override_ dh_auto_ build:
cd $(PPA_DISPLACEMENT) && python3 manage.py build
cd $(PPA_DISPLACEMENT) && python3 manage.py i18n
override_ dh_auto_ install: $(CURDIR) /debian/ plainbox- provider- resource- generic/
cd $(PPA_DISPLACEMENT) && python3 manage.py install \
--prefix=/usr --layout=unix --root=
Adjusting the root appropriately allows the provider to build, but it does need this updated manage.py.