Home > Linux > Gallery2 and Lenny

Gallery2 and Lenny

During the upgrade from Etch to Lenny I was surprised that the Gallery2 package was not available for the current stable release of Debian. At first it was no problem, but the Gallery2 package of old stable Etch is to old for the most recent WPG2 plug-in for Wordpress, so I had to upgrade Gallery2 using a upstream version as one of the package maintainers made clear:

“Gallery2 is not available in Lenny due to the large amount of differences between the previous version and 2.3-1 from unstable. The release team decided not to include Gallery2 in stable due to this disruptive change late in the release process. The gallery2 package from sid can be installed via pinning.”

I’ve documented the steps I took for upgrading Gallery2.

1. Create to following file if it not exists:

vi /etc/apt/preferences

2. Add the following lines:

Package: *
Pin: release a=stable
Pin-Priority: 600

Package: gallery2
Pin: release a=testing
Pin-Priority: 800

* If you are using testing Debian make sure testing is the bigger number.
* This file will install only from the highest pin but it will show you if the packages is available in testing or unstable.

3. Edit /etc/apt/sources.list and add the following lines:

# Testing (squeeze) for gallery2
deb http://ftp.us.debian.org/debian/ squeeze main contrib non-free
deb-src http://ftp.us.debian.org/debian/ squeeze main contrib non-free

4. Update the apt database and upgrade the gallery2 package:

# apt-get update
# apt-get upgrade -s

You’ll notice that the package will be kept back. Issue a dist-upgrade to install the upstream package.

# apt-get dist-upgrade

Restart apache and as soon as you visit the gallery2 site you’ll be asked to start the upgrade process, which went very smoothly.

Categories: Linux Tags: , ,
  1. Mich
    October 16th, 2009 at 10:04 | #1

    Nice work! Thanks!

    I had to remove the empty line between “Package: *” and “Pin: release a=stable” to make apt happy.

  2. October 27th, 2009 at 17:33 | #2

    @Mich
    You’re right! I’ve corrected the preferences config. Thanks for mentioning!

  3. logicos
    November 29th, 2009 at 21:48 | #3

    If you have a blank admin menu, try:

    # apt-get -t testing install smarty

  1. No trackbacks yet.