Install older versions of a port or package

Hi!

I upgraded our server to FreeBSD 10.1 last week and I'm now facing some problems (bugs) with the ImageMagick 6.9.0-2 binary package installed.

So I would like to downgrade to 6.8.* - can this be done with pkg?

There is an ImageMagick-6.8.9.8,1 package in http://pkg.freebsd.org/freebsd:10:x86:64/release_1/All/, which would be fine for me. But how to install this / replace the current version with that one?

Thanks for any hints,
Thomas Mack
 
The old package is most likely in /var/cache/pkg. You can remove the current version and add the old package with pkg add <pkgname.txz>. It would be good to sanity check the end result with pkg check -d and pkg check -B to make sure things are in a consistent state.
 
Ok, yes, thank you.

I tested a little on a VirtualBox copy of the server and it seems I could even downgrade by a simple pkg install ImageMagick-6.8.9.8,1.txz.

So this pkg(8) is really smart to use - very nice.
 
So, ImageMagick 6.8.9.8,1 does not include png-support, but 210 other formats, so this is bad.

Trying 6.8.0.7_5,1 requires some different libraries, so this doesn't work as well.

We need png support in not too many cases, so we can switch to some other image format for them, but just to know the procedure: can we download an older ImageMagick port to compile it ourselves?

E.g., downloading from http://svnweb.freebsd.org/ports?view=revision&revision=372435 (and others?) and putting these files somewhere in an extra directory in /usr/ports/graphics and installing from there?
 
Yes, although playing games with older versions will often lead to problems. A longer-term solution is to find and fix the problems with the current version of ImageMagick. Or see if the same problem exists with graphics/GraphicsMagick, which is very similar.
 
Ok, checking with truss it came out to be a problem with libpng and not with ImageMagick, which is the wrong version (png16) for ImageMagick-6.8.9.8,1.

Found png-1.5.17.tbz and extracted libpng15.so.15 from it - this works fine now.

Thanks for your support,
Thomas Mack
 
That's a very fragile way to fix the problem. Why not just rebuild ImageMagick to use the new PNG?
 
For mack3457, keep in mind that the ports tree should be updated as a single unit. I can understand this if ImageMagick is broken if it's built with the new PNG. The right answer is to report what you see as a bug on Bugzilla so the port gets fixed. Doing anything else should only be a short term work around.
 
The package 6.8.9.8,1 was from FreeBSD 10.0, so maybe 10.0 has png15.

make deinstall reinstall on 6.8.9 had some dependency issue(s), so I didn't like to follow that path.

The problem with 6.9.0-2 is a bug I reported to ImageMagick and they confirmed it and said it to fix it on 6.9.0-4beta. I don't think the package or port maintainer will create a new version based on beta versions, so, downgrade was the better solution for me as long as 6.9.0.4 isn't out.

Putting the required library in /usr/local/lib ist the "least invasive" method to reactivate png support for some well known activities on the server. I just delete it on a next ImageMagick update, so this is good.

And yes: I would have tried to report it, but Bugzilla had some problems that day. And maybe it would have been a WONTFIX, as 6.8.9,1 was not packed for 10.1. So it remains a problem with "how to install previous versions on FreeBSD?". Which seems to be answered as: "you may try, but it's not really supported".
 
PNG is a port, graphics/png, so all that matters is the FreeBSD is a supported release as the ports tree is only supported in that case. The /usr/local is the giveaway here that it's not part of base FreeBSD (see hier(7)). The /usr/ports/UPDATING entry describes what was done that required the library version bump.

20141225:
AFFECTS: users of graphics/png
AUTHOR: antoine@FreeBSD.org

The PNG library has been updated to version 1.6.16. Please rebuild all
ports that depend on it.

If you use portmaster:
portmaster -r png
If you use portupgrade:
portupgrade -fr [PORT]graphics/png[/PORT]

It would still be worth reporting the bug. As you had said the issue was already identified upstream and that information could be very helpful. The graphics/ImageMagick maintainer can include the patch for just this fix as part of the port and doesn't have to switch to a beta version. The local patch won't be needed when ImageMagick is updated.
 
Back
Top