Related branches

The gallery2 2.3-1 package should probably depend on php < 5.3, but it is not available in the stable distro anymore..
So, the ugly and easy way out was to remove the dependancy so that the distro does not recognize the problem?

Perhaps I could run testing as well, at least the apps would be a bit more fresh.. stable LTS is not that much more tested, and problems like these are not very much recognized anyway.

On Sunday, May 23, 2010 06:52:53 pm btanoue wrote:
> Hi,
>
> Does anyone have a work around. Is there a different version of gallery
> that I can get that is compatible with Lucid?
>
> My gallery is dead until I can get this up.
>
>
> Note:
> Instead of being notified, you can also hit the (+) radio buttion, and say
> it affects you.
>
> btanoue

On Friday, May 14, 2010 02:05:36 pm Kristian Bäckström wrote:
> The gallery2 2.3-1 package should probably depend on php < 5.3, but it is
> not available in the stable distro anymore.. So, the ugly and easy way out
> was to remove the dependancy so that the distro does not recognize the
> problem?
>
> Perhaps I could run testing as well, at least the apps would be a bit
> more fresh.. stable LTS is not that much more tested, and problems like
> these are not very much recognized anyway.

On Tuesday, May 25, 2010 03:20:34 pm you wrote:
> I have this problem with gallery2 and Joomla on my server.
>
> Joomla is not from (k)ubuntu repo though. Nevertheless, I need to roll
> back PHP version or get these two PHP packages upgraded. Have no time
> now to figure out what to do, so my site is down :-(
--
_____________________________________________
stel valavanis http://www.onshore.com/

> Gallery 2.3.1 (Skidoo) Released
> Submitted by mindless on Thu, 2009-12-17 04:49
> Gallery 2.3.1 (Skidoo) is now available for download! This release
adds compatibility with PHP 5.3, with
> minor enhancements in a couple plugins.

To me it looks like this is what is needed. However - the seemingly
broken the dep package installed after my 10.04 dist-upgrade of kubuntu is:

gallery2 - 2.3-1ubuntu3(all)

is this not based on gallery 2.3.1 or is something else in play here ?

sounds like 2.3.1 would do the trick. i won't get around to trying it soon but
please report if you do and let's get a shout out to the package maintainer.

On Wednesday, May 26, 2010 12:59:52 am you wrote:
> On 05/26/2010 07:10 AM, stel wrote:
> > you could also just install the latest svn version of gallery2.
>
> Has anybody confirmed that this solves the problem?
>
> In that case - are you talking about trunk or a release version I must
> get with SVN?
>
> In any case, the gallery2 web site: http://gallery.menalto.com/ --
> which seems to be a redirect from http://gallery2.org/ -- has the
>
> following release statement:
> > Gallery 2.3.1 (Skidoo) Released
> > Submitted by mindless on Thu, 2009-12-17 04:49
> > Gallery 2.3.1 (Skidoo) is now available for download! This release
>
> adds compatibility with PHP 5.3, with
>
> > minor enhancements in a couple plugins.
>
> To me it looks like this is what is needed. However - the seemingly
> broken the dep package installed after my 10.04 dist-upgrade of kubuntu is:
>
> gallery2 - 2.3-1ubuntu3(all)
>
> is this not based on gallery 2.3.1 or is something else in play here ?
--
_____________________________________________
stel valavanis http://www.onshore.com/

I have merged 2.3.1 from debian and it is available in my ppa. I have done minimal testing (install, remove, purge). My server is currently broken so I am unable to test gallery2 in great detail. Please test it :)

On 05/27/2010 07:06 AM, Charlie_Smotherman (porthose) wrote:
> I have merged 2.3.1 from debian and it is available in my ppa. I have
> done minimal testing (install, remove, purge). My server is currently
> broken so I am unable to test gallery2 in great detail. Please test it
> :)
>
> https://edge.launchpad.net/~cjsmo/+archive/ppa/+packages
>
Charlie, thanks for doing this. However I did not succeed to test this
as I did not manage to install it. This is probably since I am not
familiar with using PPAs. I followed the instructions to add PPA to my
system and tried to install the package, but it does not seem to pick it
or find it. I did:

i am still having problems. i've used charlie's ppa but the gallery2 pkg seems to be marked as a "maverick" package and not lucid. so when i install it (i'm on lucid), i still get the 2.3 version from the mains. i also grabbed the deb and when i install it i get an error from apache that it can't find the gallery2 apache include file. so i touch that file and i no longer get an apache error but still no joy as there's no gallery2 virtual host without a config file. something's not installing right. i even purged 2.3 first. maybe it has something to do with the db admin passowrd i'm prompted to put in. i'm not sure if that's something i have from something before or if it's new. i assumed it was a new password to define but maybe i'm wrong.

Ok got things sorted out in debian/gallery2.postrm which was removing both /etc/gallery2 and /usr/share/gallery2 during upgrade. Will have to do an SRU of 2.3 first, then we can proceed with merging 2.3.1. Sorry for the delay

Here is a minimal patch that allows the upgrade from gallery2-2.3-1ubuntu3 to gallery2-2.3.1-1ubuntu1 to complete.

To reproduce this bug install gallery2-2.3-1ubuntu3, then upgrade to gallery2-2.3.1-1ubuntu1~ppa2. When the installation is complete check for /etc/gallery2 and /usr/share/gallery2, and you will noticed that they are not present, which is a serious regression and leaves the package unusable.

Accepted gallery2 into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Charlie, no they aren't there any more since they are removed in the old postrm and that's what this sru is intended to fix.
You should probably specifically handle the upgrade from version 2.3-1ubuntu2 and recreate the directories, without forgetting to save the config files in /etc/gallery2 prior to the execution of the old-postrm.

Jean-Baptiste Lallement [2010-07-17 21:57 -0000]:
> Charlie, no they aren't there any more since they are removed in the
> old postrm and that's what this sru is intended to fix. You should
> probably specifically handle the upgrade from version 2.3-1ubuntu2
> and recreate the directories, without forgetting to save the config
> files in /etc/gallery2 prior to the execution of the old-postrm.

This can be done in the preinst script. It should copy/move away the
files/dirs, and then the postinst script can move them back on
upgrade.

I'm confused, if I understand you correctly, what you are saying is to add a prerm to 2.3-1ubuntu2 that moves /etc/gallery2 and /usr/share/gallery2 to a temp location, let the old-postrm run and then re-add /etc/gallery2 and /usr/share/gallery2 in the postinst, is this correct?

Sorry, it was not my intention to confuse you.
I meant exactly the same thing than Martin. In new-preinst (new being 2.3-1ubuntu3.2 in lucid and 2.3-1ubuntu6 in maverick) copy the content of /etc/gallery2 to a temp directory, let the old-postrm run, and then restore the files in the new-postinst.
I mentioned 2.3-1ubuntu2 because that's the version which introduced the problem and only upgrades from this version or newer will suffer from the bug.

In the preinst I think you need to save both /etc/gallery2 and /usr/share/gallery2 because they are deleted by the old-postrm after the unpack phase. I would also check the version. It's useless to manipulate this files if the versions are not affected.
So the preinst would be something like:
---- gallery2.preinst ----
#! /bin/sh

if [ ! -L /usr/share/gallery2/lib/smarty ]; then
if [ -d /usr/share/gallery2/lib/smarty ]; then

The issue is that we restore files from a previous version of the package to a newer one. But that should not hurt because there was no change to theses files between the versions 2.3-1ubuntu3.2 and 2.3-1ubuntu2 of gallery2.
This is not heavily tested but preliminary tests shows that the upgrade is not failing anymore and that the deleted directories are there after the upgrade.

IMHO, backing up /usr/share/gallery2 is not needed. Theses file are replaced by the new files during upgrade (it's the same version so they are the same). I have also noticed that during upgrade /etc/galery2/config.php is regenerated so backing it up is not needed. IMHO the only file that needs to be preserved is /etc/gallery2/apache.conf, during upgrade, this will also preserve any changes the user may have made to /etc/gallery2/apache.conf such as additional vhosts and multi-site configurations.

I uploaded gallery2-2.3-1ubuntu6 before I noticed your response, so I will go ahead and upload gallery2-2.3-1ubuntu3.2 to proposed.

Accepted gallery2 into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

So this is not really related to this bug report, but any upgrade from the lucid version will rm -rf /etc/gallery and /usr/share/gallery2, and people end up without these dirs (and without their config data, obviously); it's a serious issue.

The preinst for the -proposed package should take steps to avoid this removal on upgrades.

I can think of a terribly evil way to do it, which would be to patch the postrm of the old package, that's the simplest implementation, but it's really evil. The full implementation would involve taking some kind of backup, and moving it back in place, or moving the data before the upgrade and then moving it back.

Loïc, that's the proposed fix in comment #35. The latest upload to -proposed doesn't fix it because the files are unpacked before the postrm is executed. Hence the files from the new package are deleted. That's why I suggested to backup both /etc/gallery2 _and_ /usr/share/gallery2 in preinst.
This is not a really satisfying solution because we would mix files from the old package with the new one, but I don't see a better way to fix the package in lucid.

I checked policy to make sure, and there is no maintainer script from the new package which is called between unpack and the old postrm; it seems to me that the only way is to patch the old postrm in the new preinst. :-/

I've been busy. Haven't kept up with all the work on the bug fix.
Some questions.

1. Is Gallery2 going to be removed in Debian AND Ubuntu in the next release?
2. If I backup my /etc/gallery2 and /usr/share/gallery2 and get the fix version, will it install?
3. Do I need to copy back the backed up directories after the install?