apt-add-repository requires --login for private repos, breaking automated workflows
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
software-properties (Ubuntu) |
Fix Released
|
High
|
Brian Murray | ||
Jammy |
Fix Released
|
High
|
Brian Murray |
Bug Description
On Focal, in an automated environment (such as a launchpad builder), a used can do the following workflow:
curl "https:/
apt-add-repository "deb https:/
Hit:1 http://
Hit:2 http://
Hit:3 http://
Hit:4 http://
Get:5 https:/
Get:6 https:/
Get:7 https:/
However, on Jammy, I get the following:
curl "https:/
apt-add-repository "deb https:/
Repository: 'deb https:/
Traceback (most recent call last):
File "/usr/lib/
self._lpppa = self.lpteam.
File "/usr/lib/
response, content = self.root.
File "/usr/lib/
raise error
lazr.restfulcli
Response headers:
---
-content-encoding: gzip
content-length: 91
content-type: text/plain;
date: Wed, 16 Mar 2022 19:54:16 GMT
server: gunicorn/19.8.1
status: 404
vary: Accept-Encoding
x-powered-by: Zope (www.zope.org), Python (www.python.org)
x-request-id: ec4bd7ff-
x-vcs-revision: 81acd06336f3c4b
---
Response body:
---
b"Object: <lp.systemhomes
---
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/
sys.exit(0 if addaptrepo.main() else 1)
File "/usr/bin/
self.
File "/usr/bin/
if shortcut.
File "/usr/lib/
return self.lpppa.
File "/usr/lib/
raise ShortcutExcepti
softwarepropert
Impish similarly breaks. Digging through changelogs, I see various entries in Impish forward, starting with version 0.99.0 where a refactor was done.
using `--login` is not possible in an automated setup (such as a builder) as it starts an OAuth dance, which requires human interaction. this will break existing automation utilizing apt-add-repository for users when migrating to Jammy
Related branches
- Ubuntu Core Development Team: Pending requested
-
Diff: 40 lines (+12/-1)1 file modifiedsoftwareproperties/ppa.py (+12/-1)
tags: | added: rls-jj-incoming |
Changed in software-properties (Ubuntu): | |
importance: | Undecided → High |
tags: | added: fr-2116 |
tags: | removed: rls-jj-incoming |
Changed in software-properties (Ubuntu Jammy): | |
assignee: | nobody → Brian Murray (brian-murray) |
status: | New → In Progress |
This bug was fixed in the package software-properties - 0.99.22
---------------
software-properties (0.99.22) jammy; urgency=medium
* If add-apt-repository is passed a complete soures.list line don't require
the --login option as that breaks automated setups. Thanks to Dan
Streetman for the fix. (LP: #1965180)
-- Brian Murray <email address hidden> Fri, 01 Apr 2022 11:48:01 -0700