[FFe] add support for 'cloud-archive:' like 'ppa:' but for cloud archive
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
software-properties (Ubuntu) |
Fix Released
|
Medium
|
Scott Moser | ||
Precise |
Fix Released
|
Medium
|
Scott Moser |
Bug Description
=== SRU Info ===
[Impact]
Canonical and Ubuntu support openstack releases and Juju and Maas on 12.04 via the Cloud Archive [1]. Enabling that archive for the user requires installing a package and then modifying /etc/apt/
apt-add-repository is installed in many systems and many Ubuntu users are familiar with it. We'd like to make documentation and enablement easier by allowing the user to simply type:
apt-add-repository cloud-archive:
--
[1] https:/
[Test Case]
* launch an instance or deploy Ubuntu server 12.04
* run: apt-add-repository -y cloud-archive:
* run: apt-get update
* run: apt-cache policy python-nova-client
* verify that the output of apt-cache above shows the cloud-archive package
Additionally, the attached 'precise SRU validate instructions' goes into
further detail on how to test this, and how to verify that the old functionality ('ppa:') still works..
[Notes]
I've also only patched 'apt-add-
softwarepropert
[Regression Potential]
The potential for regression in the prepared patch should be very low.
The code path for new code is protected with statements like
if shortcut.
The attached' test/verification shows that the old path is still functional.
=== Original Bug Report ===
This is a request to add 'cloud-archive:' support to the 'apt-add-
The end goal is that we want to do something like this:
apt-add-repository cloud-archive:
And have that:
install the ubuntu-
add the appropriate repos as described at [1]
The token after 'cloud-archive' would be either an openstack release, OS_RELEASE-
The cloud-archive is only supported on precise, so in the end we want this SRU'd also. The branch linked will raise exception if the user tries to add the repo on something other than precise.
The linked branch passes tests and was reviewed by upstream maintainer. It was also done with the eye towards not breaking existing users of either the python api, the kde or gtk or cli frontends.
In the comments below, I've walked through most of the function of 'apt-add-
Related branches
- James Page: Pending requested
- Ubuntu Core Development Team: Pending requested
-
Diff: 687 lines (+399/-109)6 files modifiedadd-apt-repository (+42/-82)
debian/changelog (+7/-0)
softwareproperties/SoftwareProperties.py (+48/-20)
softwareproperties/cloudarchive.py (+123/-0)
softwareproperties/ppa.py (+122/-7)
softwareproperties/shortcuts.py (+57/-0)
- No reviews requested
- Brian Murray: Disapprove
-
Diff: 272 lines (+184/-9)4 files modifiedadd-apt-repository (+32/-7)
debian/changelog (+7/-0)
softwareproperties/SoftwareProperties.py (+20/-2)
softwareproperties/cloudarchive.py (+125/-0)
affects: | ubuntu → software-properties (Ubuntu) |
description: | updated |
Changed in software-properties (Ubuntu): | |
assignee: | nobody → Scott Moser (smoser) |
importance: | Undecided → Medium |
status: | New → In Progress |
summary: |
- add support for 'cloud-archive:' like 'ppa:' but for cloud archive + [FFe] add support for 'cloud-archive:' like 'ppa:' but for cloud archive |
description: | updated |
Changed in software-properties (Ubuntu): | |
status: | In Progress → New |
Changed in software-properties (Ubuntu Precise): | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Scott Moser (smoser) |
description: | updated |
I've just pushed to trunk, and uploaded to ubuntu saucy.
I've tested this like the following:
#fresh launch of saucy instance
sudo apt-get update --quiet
sudo apt-get install --assume-yes --quiet lxc
r=saucy
sudo lxc-create -n source-$r-amd64 -t ubuntu-cloud -- --release=$r --arch=amd64;
sudo lxc-clone --snapshot -B overlayfs -o source-$r-amd64 -n test1-$r; done
# inside "ppa:ubuntu- server- ec2-testing- dev/testing"
TEST_PPA=
# add the ppa to get new version properties- common
sudo apt-add-repository -y ppa:smoser
sudo apt-get update -qy
sudo apt-get install -qy software-
# verify you're prompted for adding a ppa
# you should see a message with info about the ppa. hit ctrl-c.
# expect it is cancelled
sudo apt-add-repository $TEST_PPA
# add again, this time saying 'yes'
sudo apt-add-repository $TEST_PPA
sudo apt-get update
sudo apt-get install smello
sudo apt-get --purge remove smello
sudo apt-add-repository --remove $TEST_PPA
sudo apt-get update
# look for 'smello' (to verify archive removed)
# this should fail with 'Unable to locate package smello'
apt-cache policy smello
## verify '-y' works.
sudo apt-add-repository -y $TEST_PPA
sudo apt-get update
## verify cloud-archive: things work
# because this is saucy, and cloud archive not supported on saucy havana
# this should fail. Answer 'y' and then it should fail with
# a message
sudo apt-add-repository cloud-archive:
# override with CA_ALLOW_CODENAME CODENAME= $(lsb_release -sc) apt-add-repository cloud-archive: havana havana which wont exist (precise- updates/ havana)
sudo CA_ALLOW_
## This should fail, as the pocket added would be
## saucy-updates/
sudo apt-get update
## fix that, and make sure update works. apt-get update should succeed sources. list.d/ cloudarchive- havana. list
## with out any problems
sudo sed -i 's,saucy,precise,g' /etc/apt/
sudo apt-get update
## also you should now have the ubuntu- cloud-keyring package installed cloud-keyring
dpkg-query --show ubuntu-
## cleanup outside
sudo lxc-destroy -n test1-saucy