[ClusterLabs] How to generate RPMs for Pacemaker release 2.x on Centos

Jan Pokorný jpokorny at redhat.com
Wed Oct 17 12:21:42 EDT 2018

On 15/10/18 14:46 +0000, Lopez, Francisco Javier [Global IT] wrote:
> I could not do that way as this box does not have access to Internet.
> Will see how to deal with this.

As Ken mentioned, current upstream-devised RPM packaging practices are
wrapped around the assumption of working with git tree directly.

You can sort of workaround that, but since it may slightly vary whether
you are after a tagged release or arbitrary commit-based snapshot,
I will provide a tested solution just for the latter (and you may
be required to change some bits for the latter scenario):

$ mkdir pcmkbuild
$ cd pcmkbuild
$ curl -LO https://github.com/ClusterLabs/pacemaker/archive/Pacemaker-2.0.0/pacemaker-2.0.0.tar.gz
$ tar xf pacemaker-2.0.0.tar.gz
$ cd pacemaker-Pacemaker-2.0.0
$ ./autogen.sh && ./configure
$ cp ../pacemaker-2.0.0.tar.gz .
$ make srpm _TAG=Pacemaker-2.0.0 'TAG=${_TAG}' 'SHORTTAG=${_TAG}'
$ mock --rebuild pacemaker-2.0.0-*.src.rpm

Note that I am explicitly avoiding the build process carried out as
the current user, since there may be, e.g., a bug in the spec file
accidentally eating your files...  Mock is a way to isolate such
build as much as possible in Fedora/CentOS/EL packaging ecosystem.
If you are OK with said risks, just replace "srpm" with "rpm", which
will produce the final packages right away (i.e. that would be
a final command to run).

So building pacemaker RPMs the upstream way outside of the git tree
is doable, but rather clumsy.  On the other hand, I don't think
there's much demand to make it smoother.  Correct me if I am wrong.

Jan (Poki)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20181017/1ee3c721/attachment-0002.sig>

More information about the Users mailing list