Обсуждение: generating deployment pkge from source

Поиск
Список
Период
Сортировка

generating deployment pkge from source

От
Andy Halsall
Дата:
A question on deployment please.
 
I need the ability to repeatedly deploy Postgresql to target SUSE Linux platforms that won't have a compiler.
I don't want to use pre-built RPMs as may need to tailor what's delivered.
So, having the source on an internal SUSE Linux build server, building there, and using that build as a start point for a deployment package seems the way to go.
 
Aside from creating users and some configuration on the target platform, it seems that a copy of /usr/local/pqsql is all that actually needs to be deployed. But this would build into my deployment method knowledge of how Postgresql works under the hood (i.e. what needs to be deployed). A better method would be to build "proper" RPMs from the source using rules that come with the release.
 
This document (http://wiki.postgresql.org/wiki/RPM_Installation) suggests that if I download a source RPM I can do an "rpm --rebuild" from the "rpm build area". This sounds good as I'd expect to then get correct binaries and RPMs to deploy them. But I can only find a source tar and not a source RPM.
 
So, my questions:
Is simply packaging /usr/local/pqsql (or alternative) reasonable?
If source RPM is the way to go, where can I find a source RPM?
If not, what's the best way to produce a deployment package from source using rules defined by the release?

Thanks,
Andy

Re: generating deployment pkge from source

От
Devrim GÜNDÜZ
Дата:
On Wed, 2012-01-25 at 12:41 +0000, Andy Halsall wrote:
> Is simply packaging /usr/local/pqsql (or alternative) reasonable?

http://svn.pgrpms.org/browser/rpm/redhat/9.1/postgresql/EL-6/README.rpm-dist

For Fedora/Red Hat RPMs, we put the data under /var/lib/pgsql, and IIRC
SuSE RPMs also use that directory. Also, RPMs should honor LFH (Linux
Filesystem Hierarchy), and not to pub the binaries
under /usr/local/pgsql/bin.

> If source RPM is the way to go, where can I find a source RPM?

The RPMs that you downloaded are probably for Red Hat, and cannot be
rebuilt on SuSE. AFAIK http://software.opensuse.org/ should have RPMs
and even SRPMs for SLES and such.

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

Вложения