Author Topic: Help needed with Postgresql SPEC file  (Read 750 times)

Offline dj_bridges

  • Hero Member
  • *****
  • Posts: 638
Help needed with Postgresql SPEC file
« on: January 31, 2011, 10:32:06 PM »
Hi there everyone,

This is my first attempt at packaging so go easy on me. Am attempting to package postgresql version 9.0.2 I know it isn't the easiest one to start with, but I really need this package so thought I would give it a go. This is what I did in my Minime VBox install:

1) Downloaded previous pclos postgresql srpm package. Right click and select 'Install SRPM for Build'
2) Replaced the source file with the updated 9.0.2 source and changed the reference in the SPEC file to 9.0 etc
3) Build all - Error message
4) Downloaded Mandriva srpm package for postgresql. Right click and select 'Install SRPM for Build'
5) I deleted all of the Mandriva files except for the SPEC file and then went through the pclos and Mandriva spec files line by line, incorporating the two, but trying to keep pclos dominant
6) Build all on new hybrid spec file - Builds!
7) Install with rpm -ivh - installs and the program seems to run fine (haven't tested it fully yet though)

So success you may think, however the version naming for each of the packages is wrong in synaptic e.g. instead of 9.0.2-1pclos2010 it is 9.0.2-1pclos20102010. I must have set something up wrong in the spec file, but it is a bit beyond me at the moment. I am also a bit confused about what the
Code: [Select]
%define withuuid relates to (perhaps it can be removed from the file). Anyway here is the full spec file (http://pastebin.com/embed_js.php?i=3hUBshCz).... welcome to any suggestions / advice....
« Last Edit: January 31, 2011, 10:56:10 PM by dj_bridges »
PCLinuxOS 2012 running KDE4 on Lenovo ThinkPad T420, Quad core Intel i5 @ 2.6GHz, 6Gb Ram, 400 Gb HDD

Offline rubentje1991

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2110
  • Rubenus Parvus MCMXCI
Re: Help needed with Postgresql SPEC file
« Reply #1 on: February 01, 2011, 12:38:30 AM »
You don't have to worry about that different name in Synaptic...
=> it will be rebuilt (if I'm correct) before it'll be shipped to the repo's, but then with the right configurations in the .rpmmacro config file (I hope that's the correct one) in your home directory (you may even put there your forum-name dj_bridges instead of pclos2010 or whatever  :)

As for the "%define withuuid" thing, I don't know at all (but haven't searched for it too)... I'll keep an eye on this thread  :P

Offline dj_bridges

  • Hero Member
  • *****
  • Posts: 638
Re: Help needed with Postgresql SPEC file
« Reply #2 on: February 01, 2011, 03:08:28 AM »
I had a feeling it had something to do with the .rpmmacro file, but while I could find the pclos2010 string, I can't find the string 2010 so am unsure how it got added to the rpm version name. Am sure it is actually quite obvious to a pro, but I am left scratching my head. I would be interested to know why...
PCLinuxOS 2012 running KDE4 on Lenovo ThinkPad T420, Quad core Intel i5 @ 2.6GHz, 6Gb Ram, 400 Gb HDD

Offline rubentje1991

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2110
  • Rubenus Parvus MCMXCI
Re: Help needed with Postgresql SPEC file
« Reply #3 on: February 01, 2011, 04:30:47 AM »
I also don't know where it's put....
I've just ran the mkrepo script from the console, giving --revision=2011; but after building something, it says again 2010 - and %mandriva-release isn't still present in %rpmmacros....

Offline menotu

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 15316
  • ┌∩┐(◕_◕)┌∩┐
Re: Help needed with Postgresql SPEC file
« Reply #4 on: February 01, 2011, 09:16:13 AM »
dj_bridges - don't know whether this is of any interest to you.........

PostgreSQL security update fixes a buffer overrun

http://www.h-online.com/security/news/item/PostgreSQL-security-update-fixes-a-buffer-overrun-1181511.html
PCLinuxOS 32bit KDE 4.10.1; kernel-3.4.11-pclos1.bfs & 64bit 3.2.18bfs; NVidia GeForce 8400GS 1GB 310.19 driver

Sony Vaio SVE1513A4ESI Laptop, Intel Core i5, 2.6GHz, 6GB RAM, 750GB, 15.6" Intel HD Graphics 4000

Offline dj_bridges

  • Hero Member
  • *****
  • Posts: 638
Re: Help needed with Postgresql SPEC file
« Reply #5 on: February 01, 2011, 12:41:51 PM »
Good spot Menotu. Will see if the new source file builds with what I have got.....
PCLinuxOS 2012 running KDE4 on Lenovo ThinkPad T420, Quad core Intel i5 @ 2.6GHz, 6Gb Ram, 400 Gb HDD

Offline dj_bridges

  • Hero Member
  • *****
  • Posts: 638
Re: Help needed with Postgresql SPEC file
« Reply #6 on: February 10, 2011, 11:44:16 PM »
New source code built fine with an updated spec file and runs fine.  Have uploaded to DropBox for testing / checking....
PCLinuxOS 2012 running KDE4 on Lenovo ThinkPad T420, Quad core Intel i5 @ 2.6GHz, 6Gb Ram, 400 Gb HDD