Wednesday, February 27, 2013

Script to add the apt.postgresql.org respository on Debian/Ubuntu

You've probably heard the announcement: Martin Pitt's PPA is being deprecated.  This is in an effort to push folks towards the new official apt.postgresql.org.

See the announcement here: http://www.postgresql.org/about/news/1432/

Also, see the deprecation notice on Martin's PPA:
https://launchpad.net/~pitti/+archive/postgresql

Since we have quite a few customers using Martin's PPA for PostgreSQL packages under Ubuntu, I wrote a little shell script to switch repositories if you're using Martin's PPA and just install the apt.postgresql.org repository if you are not.

You can find it here: https://github.com/pgexperts/add-pgdg-apt-repo

2 comments:

  1. Why does the script get the key through wget as well as install pgdg-keyring? Shouldn't it be one or the other? By the way if you have customers with pesky firewall/proxy setups, this will work better than wget:

    apt-key adv -q --keyserver hkp://p80.pool.sks-keyservers.net:80 --keyserver-options timeout=30 --recv-keys ACCC4CF8

    ReplyDelete
    Replies
    1. Jeff, good question. I believe you need the key imported to install pgdg-keyring without complaint. Then, pgdg-keyring will keep the keys up to date.

      Want to send a pull request for the apt-key method? That way you'll get credit in the repo for the commit.

      Delete