Skip to content

Instantly share code, notes, and snippets.

@hh
Created June 19, 2012 12:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hh/2953844 to your computer and use it in GitHub Desktop.
Save hh/2953844 to your computer and use it in GitHub Desktop.
Finding a way to manage ppa/repos as dependencies in my own repo

Apt-Repos/PPAs as Dependencies in Metapackages

I'd like to do something to what google and epel in regards to installing a repository via a deb package, but have the 'packaged repo' get removed if I remove all packages that depend on it. If it was also installed as a dependency, this would make adding/removing repos a package management job instead of the external/manual process it is now.

I thought about dynamically creating a local_apt_repo with metapackaged debs that depend on the packaged_repo so apt-get autoremove would theoretically work:

If the metapackages are configured to depend on the packaged_repo_X, packaged_repo_Y packages, and we put them all in that local repository, would that give us the ability to depend on packaged_repos and have them installed/available to our metapackages with pre-depends?

Prior Art (sorta)

The google chrome deb also add the google repo:

From https://www.google.com/chrome/eula.html?platform=linux :

Note: Installing Google Chrome will add the Google repository so your system will automatically keep Google Chrome up to date. If you don't want Google's repository, do "sudo touch /etc/default/google-chrome" before installing the package.

And the epel repo is added to rhel, centos, and fedora via a single rpm:

@hh
Copy link
Author

hh commented Jun 19, 2012

<tumbleweed> hippiehacker: this was discussed at some length at the last
             UDS. https://blueprints.launchpad.net/ubuntu/+spec/foundations-q-security-of-third-party-debs
             Summary: it's not somthing we are mad about, it'd be nice to
             provide a recommended alternative

@hh
Copy link
Author

hh commented Jun 19, 2012

<hippiehacker> tumbleweed: I'm trying to create a tool that generates a local
               repository (with self-signed .debs) the debs themselves
               containing only dependency lists and ppas generated from simple
               profiles: https://github.com/hh/sputnik-repo/blob/master/data_bags/sputnik_profiles/rails%2Bsublime.json
<hippiehacker> The profiles could be easily shared  / possibly digtially
               signed / and include the gpg for the dependent repos.
<tumbleweed> hippiehacker: we'd like it if that problem could go away, but for
             now it's a reasonable solution
<hippiehacker> tumbleweed: is https://wiki.ubuntu.com/ThirdPartyApt the main
               thrust of where we are currently headed?
<tumbleweed> hippiehacker: that's ancient, but it's what I'd want,yes
{
    "id": "rails+sublime",
    "packages": [
        "rails",
        "sublime-text-2-beta"
    ],
    "repos": [
        "ppa:webupd8team/sublime-text-2"
    ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment