* '''Launchpad entry:''' https://blueprints.edge.launchpad.net/soyuz/+spec/soyuz-multiple-ppas * '''Created:''' <> by CelsoProvidelo * '''Contributors:''' JulianEdwards == Summary == This specification describes what changes have to be applied in the current model to allow users to have more than one PPA and also their implication in the current behaviour of specific features users are already using, like upload-path, PPA publishing path and PPA pages. == Release Note == Once this implementation reaches LP mainline, users and team will be able to have multiple PPAs. The additional PPAs will be only created by administrators based on commercial agreements done in advance. == Rationale == Currently multiple PPAs are achieved only by having multiple teams and it's considered a suboptimal workflow for very focused (product-related) teams working with PPA. == Use cases == * Bzr team frequently releases a new group of interdependent packages in their PPA and thus many users, aiming for testing fresh bzr packages uses it. They find it really hard to keep uploading development packages knowing that any failure may affect a large group of users that usually are not expecting for it. The Bzr would benefit of having a stable and a development PPA, the uploads would be targeted to the development PPA and be staged there with a restricted audience until building and QA are done. Once approved they would be copied to the 'stable' PPA, for a broader audience. Basically, the Bzr use-case will fit any product-base PPA, where they want a location to develop and test new packages and also a location to ship new stable packages. == Assumptions == None. == Design == The database patch to add names to archives was landed some time ago. Here we discuss the other changes. When using PPAs there are three different directory paths/URLs to consider: * The upload path. This currently looks like: ~/ubuntu/[distroseries] * The web URL path, currently: /~/+archive * The repository URL path, currently: /person/ubuntu Clearly, adding an extra path part to distinguish them per-person is going to break existing ones, so we need to introduce the difference without breaking the world. We can have a migration period where both new and old styles will work. The new paths, initially, will be: Upload: ~/ppa/ubuntu/[distroseries] Web: /~/+archive/ppa Repo: /person/ppa/ubuntu "ppa" is the (default) name of the PPA, during the switchover period we'll automatically map/redirect the old paths to ones including "ppa" as the name and change the names of all the existing PPAs to "ppa". In effect, this means that: * uploads to ~/ubuntu/ will really go to ~/ppa/ubuntu/ * web visits to /~/+archive will be redirected to /~/+archive/ppa * the current repos will be renamed to the new schema, but we'll provide compatibility symlinks from the old one so that downloading from the old URL will work. The one constraint is that people will not be able to name their PPAs "ubuntu" until the compatibility period is over (one or two LP release cycles). === UI Changes === TODO Add a new page (or modify the existing one) to allow LP admins to create more named PPAs for a user. === Code Changes === ==== Archive content class fixes ==== IArchiveSet.getPPAByDistributionAndOwnerName(distro, name) -> (distro, person_name, ppa_name) -> Fix callsites in components/packagelocation.py and archive.txt IArchiveSet._getDefaultArchiveNameByPurpose() -> change default ppa name from "default" to "ppa" ==== SoyuzScript fixes ==== Add --name option, verify appropriately with existing --ppa option. Double check existing scripts that use this to make sure they'll DTRT. ==== Upload processor fixes ==== uploadprocessor.py -> Fix the code in getDistributionAndArchive() to cope with extra path part and default to name of "ppa" if not specified. Ensure the defaulting can be safely removed later. ==== WebApp fixes ==== Add urldata to the browser:url zcml for IPPA so we can ensure the traversal works for owner/+archive/name In the urldata, redirect from "None" name to "ppa". ==== Publisher fixes ==== Fix IArchive.archive_url URL path Fix IArchive.getPubConfig archiveroot path Make some symlinks on germanium from the old to the new path. === Schema Changes === Already landed, but we need to rename default names to the new "ppa" default. {{{ UPDATE ARCHIVE SET name='ppa' where name='default' AND purpose=2; }}} === Migration === * migrating users ~/.dput.cf: can we use a package ? * migrating users sources_list: idem == Unresolved issues == None yet.