Thread: Build RPM from Postgres Source

Build RPM from Postgres Source

From
ktewari1
Date:
Hi,
    I need to have some different settings(like NAMEDATALEN  etc.) and
that's why I'm trying to build postgres from the source and to create an rpm
to be send for install.

Now, the build works fine but, I don't see a way to create an RPM.

I'll greatly appreciate any help.

Thanks,
Kul



--
View this message in context: http://postgresql.1045698.n5.nabble.com/Build-RPM-from-Postgres-Source-tp5763633.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


Re: Build RPM from Postgres Source

From
"James B. Byrne"
Date:
> Date: Fri, 12 Jul 2013 14:37:19 -0700 (PDT)
> From: ktewari1 <cute.mee123@gmail.com>
> To: pgsql-general@postgresql.org
> Subject: Build RPM from Postgres Source
> Message-ID: <1373665039319-5763633.post@n5.nabble.com>
>
> Hi,
>     I need to have some different settings(like NAMEDATALEN  etc.)
> and that's why I'm trying to build postgres from the source and to
> create an rpm to be send for install.
>
> Now, the build works fine but, I don't see a way to create an RPM.
>
> I'll greatly appreciate any help.
>
> Thanks,
> Kul

You should take a look at mock,
http://fedoraproject.org/wiki/Projects/Mock.  I wrote up a short intro
to this a little while ago. You can read it here:
http://byrnejb.wordpress.com/2013/01/30/building-ruby-1-9-3-for-centos-6-3/

Although the example is not postgresql the process remains much the
same on any RHEL derived distro regardless of the package.

Good luck.


--
***          E-Mail is NOT a SECURE channel          ***
James B. Byrne                mailto:ByrneJB@Harte-Lyne.ca
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3C3



Re: Build RPM from Postgres Source

From
ktewari1
Date:
Thanks for your reply. I will take a look.

Kul.



--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Build-RPM-from-Postgres-Source-tp5763633p5763746.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


Re: Build RPM from Postgres Source

From
David Kerr
Date:
On Fri, Jul 12, 2013 at 02:37:19PM -0700, ktewari1 wrote:
- Hi,
-     I need to have some different settings(like NAMEDATALEN  etc.) and
- that's why I'm trying to build postgres from the source and to create an rpm
- to be send for install.
-
- Now, the build works fine but, I don't see a way to create an RPM.
-
- I'll greatly appreciate any help.
-
- Thanks,
- Kul

I haven't tried this yet, but I've been wanting to. it seems pretty awesome:
https://github.com/jordansissel/fpm


Re: Build RPM from Postgres Source

From
Devrim GÜNDÜZ
Date:
Hi,

On Fri, 2013-07-12 at 14:37 -0700, ktewari1 wrote:
> Hi,
>     I need to have some different settings(like NAMEDATALEN  etc.) and
> that's why I'm trying to build postgres from the source and to create an rpm
> to be send for install.
>
> Now, the build works fine but, I don't see a way to create an RPM.

Here is how we build the community RPMs:

* Fetch patches and spec files from SVN. For example:

http://svn.pgrpms.org/browser/rpm/redhat/9.2/postgresql/EL-6/

* Add any patches to spec file:

http://svn.pgrpms.org/browser/rpm/redhat/9.2/postgresql/EL-6/postgresql-9.2.spec#L89

* Build the RPM.

You can add your own patches, and build your own RPMs like this.

Regards,
--
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org  Twitter: http://twitter.com/devrimgunduz

Attachment

Re: Build RPM from Postgres Source

From
Michael Paquier
Date:
On Wed, Jul 17, 2013 at 9:28 PM, Devrim GÜNDÜZ <devrim@gunduz.org> wrote:
>
> Hi,
>
> On Fri, 2013-07-12 at 14:37 -0700, ktewari1 wrote:
>> Hi,
>>     I need to have some different settings(like NAMEDATALEN  etc.) and
>> that's why I'm trying to build postgres from the source and to create an rpm
>> to be send for install.
>>
>> Now, the build works fine but, I don't see a way to create an RPM.
>
> Here is how we build the community RPMs:
>
> * Fetch patches and spec files from SVN. For example:
>
> http://svn.pgrpms.org/browser/rpm/redhat/9.2/postgresql/EL-6/
>
> * Add any patches to spec file:
>
> http://svn.pgrpms.org/browser/rpm/redhat/9.2/postgresql/EL-6/postgresql-9.2.spec#L89
>
> * Build the RPM.
>
> You can add your own patches, and build your own RPMs like this.
Here is also a post written by Devrim describing how to do that more in details:

http://people.planetpostgresql.org/devrim/index.php?/archives/44-How-To-Build-Your-Own-PostgreSQL-and-related-software-RPMs-on-CentOSRHELFedora.html
--
Michael