{"id":1862,"date":"2010-08-03T18:00:23","date_gmt":"2010-08-04T02:00:23","guid":{"rendered":"http:\/\/www.chesnok.com\/daily\/?p=1862"},"modified":"2012-03-26T02:51:58","modified_gmt":"2012-03-26T10:51:58","slug":"customizing-the-rpms-from-pgrpms-org","status":"publish","type":"post","link":"https:\/\/www.chesnok.com\/daily\/2010\/08\/03\/customizing-the-rpms-from-pgrpms-org\/","title":{"rendered":"Customizing the RPMs from pgrpms.org"},"content":{"rendered":"<p>To pick up <a href=\"http:\/\/people.planetpostgresql.org\/devrim\/index.php?\/archives\/44-How-To-Build-Your-Own-PostgreSQL-and-related-software-RPMs-on-CentOSRHELFedora.html\">where Devrim left off<\/a> in customizing RPMs, here are some more tips for getting your very own RPMs built:<\/p>\n<ul>\n<li>Create a VM with your favorite operating system (I&#8217;m using versions of CentOS). I need both 32-bit OS and 64-bit OS. This is much easier to manage with separate, local VMs.\n<\/li>\n<li>Install spectool (<a href=\"http:\/\/packages.sw.be\/spectool\/\">available here<\/a>), and SVN\n<\/li>\n<li>The other dependancies were: gcc glibc-devel bison flex python-devel tcl-devel readline-devel zlib-devel openssl-devel krb5-devel e2fsprocs-devel libxml2-devel libxslt-devel pam-devel\n<\/li>\n<li>Edit the postgresql-$VERSION.spec file to your liking: If you&#8217;re adding patches, you need to add them in TWO places &#8211; first in the Patch#: group, and then again below where the %patch# series starts. Finally, if you&#8217;re adding an entirely new package (say in 8.2, pg_standby in contrib), you&#8217;ll need to also add the binary (or library, or whatever) to the appropriate %files clause later in the spec file.  It&#8217;s also a good idea to modify &#8216;Release&#8217;. Here&#8217;s a sample diff of my spec file:\n<\/li>\n<\/ul>\n<p><code><br \/>\n--- postgresql-8.2.spec (revision 188)<br \/>\n+++ postgresql-8.2.spec (working copy)<br \/>\n@@ -74,7 +74,7 @@<br \/>\n Summary:       PostgreSQL client programs and libraries<br \/>\n Name:          postgresql<br \/>\n Version:       8.2.17<br \/>\n-Release:       1PGDG%{?dist}<br \/>\n+Release:       1test%{?dist}<br \/>\n License:       BSD<br \/>\n Group:         Applications\/Databases<br \/>\n Url:           http:\/\/www.postgresql.org\/<br \/>\n@@ -95,7 +95,9 @@<br \/>\n Patch4:                postgresql-test.patch<br \/>\n Patch6:                postgresql-perl-rpath.patch<br \/>\n Patch8:                postgresql-prefer-ncurses.patch<br \/>\n+Patch7:                postgresql-pgstat-dir.patch<br \/>\n Patch9:                postgresql-use-zoneinfo.patch<br \/>\n+Patch10:               pg_standby.patch<\/p>\n<p> Buildrequires: perl glibc-devel bison flex<br \/>\n Requires:      \/sbin\/ldconfig initscripts<br \/>\n@@ -282,7 +284,9 @@<br \/>\n %patch4 -p1<br \/>\n %patch6 -p1<br \/>\n %patch8 -p1<br \/>\n+%patch7 -p1<br \/>\n %patch9 -p1<br \/>\n+%patch10 -p1<\/p>\n<p> pushd doc<br \/>\n tar -zcf postgres.tar.gz *.html stylesheet.css<br \/>\n@@ -604,6 +608,7 @@<br \/>\n %{_bindir}\/pg_controldata<br \/>\n %{_bindir}\/pg_ctl<br \/>\n %{_bindir}\/pg_resetxlog<br \/>\n+%{_bindir}\/pg_standby<br \/>\n %{_bindir}\/postgres<br \/>\n %{_bindir}\/postmaster<br \/>\n %{_mandir}\/man1\/initdb.*<br \/>\n<\/code><\/p>\n<p>How have you customized RPMs using this repo? Share your .spec files!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To pick up where Devrim left off in customizing RPMs, here are some more tips for getting your very own RPMs built: Create a VM with your favorite operating system (I&#8217;m using versions of CentOS). I need both 32-bit OS &hellip; <a href=\"https:\/\/www.chesnok.com\/daily\/2010\/08\/03\/customizing-the-rpms-from-pgrpms-org\/\">Continue reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[97,9,8],"tags":[330,647,329,623],"class_list":["post-1862","post","type-post","status-publish","format-standard","hentry","category-postgres","category-postgresql","category-sysadmin","tag-pgrpms","tag-postgres","tag-rpm","tag-sysadmin"],"_links":{"self":[{"href":"https:\/\/www.chesnok.com\/daily\/wp-json\/wp\/v2\/posts\/1862","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.chesnok.com\/daily\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chesnok.com\/daily\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chesnok.com\/daily\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chesnok.com\/daily\/wp-json\/wp\/v2\/comments?post=1862"}],"version-history":[{"count":8,"href":"https:\/\/www.chesnok.com\/daily\/wp-json\/wp\/v2\/posts\/1862\/revisions"}],"predecessor-version":[{"id":3962,"href":"https:\/\/www.chesnok.com\/daily\/wp-json\/wp\/v2\/posts\/1862\/revisions\/3962"}],"wp:attachment":[{"href":"https:\/\/www.chesnok.com\/daily\/wp-json\/wp\/v2\/media?parent=1862"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chesnok.com\/daily\/wp-json\/wp\/v2\/categories?post=1862"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chesnok.com\/daily\/wp-json\/wp\/v2\/tags?post=1862"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}