Merge lp:~brian-murray/apport/support-ppa-packages into lp:apport
| Status: | Merged |
|---|---|
| Merged at revision: | 2980 |
| Proposed branch: | lp:~brian-murray/apport/support-ppa-packages |
| Merge into: | lp:apport |
| Diff against target: |
503 lines (+274/-20) 6 files modified
AUTHORS (+4/-1) apport/packaging.py (+5/-1) apport/sandboxutils.py (+21/-6) backends/packaging-apt-dpkg.py (+151/-7) bin/apport-retrace (+4/-1) test/test_backend_apt_dpkg.py (+89/-4) |
| To merge this branch: | bzr merge lp:~brian-murray/apport/support-ppa-packages |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Martin Pitt | 2015-06-30 | Approve on 2015-07-15 | |
|
Review via email:
|
|||
Description of the Change
This branch builds upon Tim Lunn's initial work (https:/
A list of "origins" is created for packages with a foreign origin. This is then passed to install packages so that the sandbox will be created with proper apt data sources for the PPA. Its also possible to setup an apt data source that will be used when creating the sandbox. For consistency with apt these sources are located in /etc/apt/
The following new tests were added to test_backend_
def test_create_
def test_create_
def test_use_
def test_install_
They test the creation of a sources.list entry for two different types of PPAs, using a configured sources.list entry for a PPA, and installing a package from a PPA. Three of the tests are dependent upon two PPAs being available which might be a point of concern.
- 2979. By Brian Murray on 2015-07-03
-
mess o' modifications based on pitti's feeback
| Brian Murray (brian-murray) wrote : | # |
Thanks for all the comments, I think I have addressed all of them and the code should look better now.
| Brian Murray (brian-murray) wrote : | # |
Steve indicated there may be some security concerns about installing any package from Launchpad and running that package's binaries inside gdb. Subsequently, I have made the ability to create apt data sources for PPAs an optional one and set the default value to false. Regardless, if there are sources.list entries in the configdir corresponding to a PPA then packages will be used from those PPAs.
- 2980. By Brian Murray on 2015-07-06
-
Add an option to apport-retrace (and pass it along) so that apt sources data is only created for PPAs if requested.
| Steve Langasek (vorlon) wrote : | # |
Security concerns, and also infrastructure load concerns. I don't believe we've made any committment to providing retracing resources for crashes of packages originating from arbitrary ppas.
- 2981. By Brian Murray on 2015-07-06
-
Fix origins re, pass log_timestamps to make_sandbox, fix a bug in origin_path existence checking.
- 2982. By Brian Murray on 2015-07-07
-
explicitly close the results from urlopen
| Martin Pitt (pitti) wrote : | # |
A couple of inline replies to the previous review round. I'll review the new code in a separate comment.
| Martin Pitt (pitti) wrote : | # |
Thanks for the updates! Another round, then this should be perfect.
- 2983. By Brian Murray on 2015-07-08
-
make testing for gpg keys less fragile
- 2984. By Brian Murray on 2015-07-08
-
address pitti's feedback and simplify how using origins is specified
| Brian Murray (brian-murray) wrote : | # |
Okay, I think I've addressed everything, except for your concern regarding sources.list entries which I've commented on in-line.
| Martin Pitt (pitti) wrote : | # |
Responding to sources.list parsing.
| Martin Pitt (pitti) wrote : | # |
Some tiny nitpicks left, which I'd also be happy to do myself during merge. Do you want to change the sources.list parsing as discussed? If not I'm okay with leaving it like that and cleaning this up in a separate MP. Thanks!
- 2985. By Brian Murray on 2015-07-13
-
address final nitpicks
| Brian Murray (brian-murray) wrote : | # |
I've fixed the nitpicks and would prefer to sort out the sources.list parsing in a separate merge proposal.
| Martin Pitt (pitti) wrote : | # |
The last commit changed the wrong len(components), I fixed that and added a NEWS entry.
The tests fail with PYTHON=python2, with this:
=======
ERROR: test_create_
Add sources.list entries for a named PPA.
-------
Traceback (most recent call last):
File "test/test_
'ubuntu', 'trusty', origins=[ppa])
File "backends/
ppa_info = apport.
File "/home/
return json.loads(content)
File "/usr/lib/
return _default_
File "/usr/lib/
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
I checked json_request, and content == "Object: <Person at 0x2b0b217fc8d0 daisy (Daisy Bachmann)>, name: u'+archive'" which is indeed not JSON.
In the "good" python 3 case the URL is https//
This is indeed weird:
$ python3 -c 'from urllib.request import urlopen; print(urlopen("https:/
/~daisy/
[...]
urllib.
$ python -c 'from urllib import urlopen; print(urlopen("https:/
Object: <Person at 0x2b4df96bcbd0 daisy (Daisy Bachmann)>, name: u'+archive'
However, .getcode() says "404" in python 2, so this needs to be checked separately. I added that now.
There is one failure left with Python 2:
=======
ERROR: test_use_
Use a sources.list.d file for a PPA.
-------
Traceback (most recent call last):
File "test/test_
'ubuntu', 'trusty', origins=
File "backends/
ppa_info = apport.
File "/home/
return json.loads(content)
File "/usr/lib/
return _default_
File "/usr/lib/
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/
raise ValueError("No JSON object could be decoded")
Valu...


Thanks Brian! The general idea looks fine; with the restricted "Origin:" fields that we have there's no way around the guesswork.