2

What is the most efficient way to upgrade postgresql to the latest minor version when I'm running an operating system (Fedora Core 10) that's too old to be supported by official RPM releases?

I have successfully compiled PostgreSQL, but after searching the Internet I can't figure out how to obtain an accurate spec file so I can build a new RPM.

I would like to update only the binaries that have changed between 9.0.1 and 9.0.18.

Is there somewhere I can find this information?

1
  • Welcome to StackOverflow Sandra. This is a Professional Q & A site. Please visit how to ask.
    – afzalex
    Sep 2, 2014 at 20:45

1 Answer 1

1

Fedora core 10? Gah.

I suggest grabbing the http://yum.postgresql.org/ 9.0.18 SRPM and doing an rpmbuild --rebuild. You shouldn't need to make any changes to it.

The SRPM you'll want is the RHEL 6 one, since PGDG no longer does Fedora releases for outdated PostgreSQL versions. It's here:

http://yum.postgresql.org/srpms/9.0/redhat/rhel-6Server-x86_64/postgresql90-9.0.18-1PGDG.rhel6.src.rpm

so try:

sudo yum install rpmdevtools rpmbuild yum-utils
sudo yum-builddep postgresql90-9.0.18-1PGDG.rhel6.src.rpm
rpmbuild --rebuild postgresql90-9.0.18-1PGDG.rhel6.src.rpm

If that fails, you can unpack the srpm:

# do NOT use sudo:
rpm -i postgresql90-9.0.18-1PGDG.rhel6.src.rpm

then edit the specfile in ~/rpmbuild/SPECS/ to fix any problems and:

rpmbuild -ba ~/rpmbuild/SPECS/postgresql-9.0.spec

As for only the binaries that have changed - that's a no-go. Just install the RPM. There is absolutely no point trying to selectively update, you'll just increase the chance of making mistakes. If a binary hasn't changed, then there's no reason not to install the new one.

5
  • Hi, how do I get around the GPG key without using rpm --import?
    – Sandra Smith
    Sep 4, 2014 at 15:01
  • "get around the gpg key". I have no idea what you mean. Sep 4, 2014 at 16:19
  • I'm unable to open the rpm. Warning: rpmts_HdrsFrom Fdno: Header V4 DSA signature: NOKEY, key ID 442df0f8. After some investigation is looks like I am missing the Centos GPG key. Instructions from other sites are to do an rpm --import of the key itself directly to the Linux box I am working on. My work policy prohibits Internet access via Linux.
    – Sandra Smith
    Sep 4, 2014 at 16:26
  • No, that's only a warning. But if your work policy is that limiting you're going to have plenty of problems getting rpm dev tools (rpmbuild etc) and are probably wasting your time. I can't really offer any more help at this time, I'm not able to offer a detailed step by step Q&A.. If you're still stuck I suggest posting a follow up on serverfault and linking back to this question for context. If you do post a follow up please comment here to add a link to it. Sep 5, 2014 at 0:50
  • @SandraSmith Though - you can rpm --import a local file, it doesnt have to be a url. So you can work around the policy with a usb key. (These policies are incredibly stupid. They lead to obsolete systems full of long-fixed bugs and security vulnerabilities being left to moulder until its suddenly critically urgent to upgrade. And they encourage workarounds like what you are having to do that are just crazy in comparison to running an up to date supported system in the first place. Not to mention circumventing the distro's signing security.) Sep 5, 2014 at 0:55

You must log in to answer this question.