<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 22, 2022 at 1:16 PM S Sathish S via Users <<a href="mailto:users@clusterlabs.org">users@clusterlabs.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Ken/Team,<br>
<br>
We have tried on pacemaker 2.1.1 also faced same issue , later we have perform below steps as workaround to build pacemaker rpm as you said it run from a git checkout and build rpm.<br>
<br>
#./autogen.sh<br>
#./configure/<br>
#make<br>
#make dist<br>
#rpmbuild -v -bb <a href="http://spec.in" rel="noreferrer" target="_blank">spec.in</a><br>
<br>
RPM output in below format:<br>
pacemaker-cluster-libs-2.1.4-1.2.1.4.git.el8.x86_64<br>
pacemaker-schemas-2.1.4-1.2.1.4.git.el8.noarch<br>
pacemaker-2.1.4-1.2.1.4.git.el8.x86_64<br>
pacemaker-libs-2.1.4-1.2.1.4.git.el8.x86_64<br>
pacemaker-cli-2.1.4-1.2.1.4.git.el8.x86_64<br>
<br>
Please let us know once it is fixed on 2.1.5-rc3 ,we need to build rpm without git checkout method.<br></blockquote><div><br></div><div>2.1.5-rc3 isn't out yet but patch-set from PR</div><div><a href="https://github.com/ClusterLabs/pacemaker/pull/2949">https://github.com/ClusterLabs/pacemaker/pull/2949</a></div><div>merged into 2.1-branch should solve the issue.</div><div><br></div><div>Klaus </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Thanks and Regards,<br>
S Sathish S<br>
-----Original Message-----<br>
From: Ken Gaillot <<a href="mailto:kgaillot@redhat.com" target="_blank">kgaillot@redhat.com</a>> <br>
Sent: 21 November 2022 21:52<br>
To: Cluster Labs - All topics related to open-source clustering welcomed <<a href="mailto:users@clusterlabs.org" target="_blank">users@clusterlabs.org</a>><br>
Cc: S Sathish S <<a href="mailto:s.s.sathish@ericsson.com" target="_blank">s.s.sathish@ericsson.com</a>><br>
Subject: Re: [ClusterLabs] Unable to build rpm using make rpm command for pacemaker-2.1.4.<br>
<br>
Hi,<br>
<br>
Currently the RPM targets can only be run from a git checkout, not a distribution tarball. It looks like that's a regression introduced in<br>
2.1.2 so I'll try to fix it for 2.1.5-rc3 (expected this week).<br>
<br>
On Mon, 2022-11-21 at 13:04 +0000, S Sathish S via Users wrote:<br>
> Hi Team,<br>
> <br>
> I am getting the below error when executing make rpm command to build<br>
> pacemaker-2.1.4 package on linux 8 server.<br>
> <br>
> [root@node1 pacemaker-Pacemaker-2.1.4]# make rpm make -C rpm "rpm"<br>
> make[1]: Entering directory '/root/smf_source/pacemaker-Pacemaker-<br>
> 2.1.4/rpm'<br>
> cd /root/smf_source/pacemaker-Pacemaker-<br>
> 2.1.4/rpm/..; \<br>
> if [ -n "" ]; then \<br>
> git commit -m "DO-NOT-PUSH"<br>
> -a; \<br>
> git archive --prefix=pacemaker-DIST/ -o<br>
> "/root/smf_source/pacemaker-Pacemaker-2.1.4/rpm/../pacemaker-<br>
> DIST.tar.gz" HEAD^{tree}; \<br>
> git reset --mixed<br>
> HEAD^; \<br>
> echo "`date`: Rebuilt /root/smf_source/pacemaker-Pacemaker-<br>
> 2.1.4/rpm/../pacemaker-<br>
> DIST.tar.gz"; \<br>
> elif [ -f "/root/smf_source/pacemaker-Pacemaker-<br>
> 2.1.4/rpm/../pacemaker-DIST.tar.gz" ];<br>
> then \<br>
> echo "`date`: Using existing tarball: /root/smf_source/pacemaker-<br>
> Pacemaker-2.1.4/rpm/../pacemaker-DIST.tar.gz"; \<br>
> else <br>
> \<br>
> git archive --prefix=pacemaker-DIST/ -o<br>
> "/root/smf_source/pacemaker-Pacemaker-2.1.4/rpm/../pacemaker-<br>
> DIST.tar.gz" DIST^{tree}; \<br>
> echo "`date`: Rebuilt /root/smf_source/pacemaker-Pacemaker-<br>
> 2.1.4/rpm/../pacemaker-<br>
> DIST.tar.gz"; \<br>
> fi<br>
> fatal: not a git repository (or any of the parent directories): .git <br>
> Mon Nov 21 07:42:25 EST 2022: Rebuilt /root/smf_source/pacemaker- <br>
> Pacemaker-2.1.4/rpm/../pacemaker-DIST.tar.gz<br>
> rm -f "/root/smf_source/pacemaker-Pacemaker-<br>
> 2.1.4/rpm/SRPMS"/*.src.rpm<br>
> rm -f "/root/smf_source/pacemaker-Pacemaker-<br>
> 2.1.4/rpm/SPECS/pacemaker.spec"<br>
> fatal: not a git repository (or any of the parent directories): .git<br>
> fatal: not a git repository (or any of the parent directories): .git<br>
> fatal: not a git repository (or any of the parent directories): .git<br>
> fatal: not a git repository (or any of the parent directories): .git<br>
> fatal: not a git repository (or any of the parent directories): .git<br>
> fatal: not a git repository (or any of the parent directories): .git<br>
> fatal: not a git repository (or any of the parent directories): .git<br>
> fatal: not a git repository (or any of the parent directories): .git <br>
> /usr/bin/mkdir -p "/root/smf_source/pacemaker-Pacemaker-<br>
> 2.1.4/rpm/SPECS"<br>
> if [ x"`git ls-files -m <a href="https://protect2.fireeye.com/v1/url?k=31323334-501d5122-313273af-454445555731-da62d98365929a68&q=1&e=8617afbf-d9b3-4f10-880c-745c5d63df19&u=http%3A%2F%2Fpacemaker.spec.in%2F" rel="noreferrer" target="_blank">https://protect2.fireeye.com/v1/url?k=31323334-501d5122-313273af-454445555731-da62d98365929a68&q=1&e=8617afbf-d9b3-4f10-880c-745c5d63df19&u=http%3A%2F%2Fpacemaker.spec.in%2F</a> 2>/dev/null`" != x ];<br>
> then \<br>
> cat "/root/smf_source/pacemaker-Pacemaker-<br>
> 2.1.4/rpm/<a href="http://pacemaker.spec.in" rel="noreferrer" target="_blank">pacemaker.spec.in</a>"; \<br>
> elif git cat-file -e DIST:rpm/<a href="http://pacemaker.spec.in" rel="noreferrer" target="_blank">pacemaker.spec.in</a> 2>/dev/null;<br>
> then \<br>
> git show<br>
> DIST:rpm/<a href="http://pacemaker.spec.in" rel="noreferrer" target="_blank">pacemaker.spec.in</a>; \<br>
> elif git cat-file -e DIST:<a href="http://pacemaker.spec.in" rel="noreferrer" target="_blank">pacemaker.spec.in</a> 2>/dev/null;<br>
> then \<br>
> git show<br>
> DIST:<a href="http://pacemaker.spec.in" rel="noreferrer" target="_blank">pacemaker.spec.in</a>; \<br>
> else <br>
> \<br>
> cat "/root/smf_source/pacemaker-Pacemaker-<br>
> 2.1.4/rpm/<a href="http://pacemaker.spec.in" rel="noreferrer" target="_blank">pacemaker.spec.in</a>"; \<br>
> fi |<br>
> sed <br>
> \<br>
> -e 's/^\(%global pcmkversion \).*/\12.1.4/' \<br>
> -e 's/^\(%global specversion \).*/\11/' \<br>
> -e 's/^\(%global commit<br>
> \).*/\1DIST/' \<br>
> -e 's/^\(%global commit_abbrev \).*/\14/' \<br>
> -e "s/PACKAGE_DATE/$(date +'%a %b %d<br>
> %Y')/" \<br>
> -e 's/PACKAGE_VERSION/2.1.4-1/' \<br>
> > "/root/smf_source/pacemaker-Pacemaker-<br>
> 2.1.4/rpm/SPECS/pacemaker.spec"<br>
> if [ -e "../build.counter" ]; then \<br>
> echo 1 > "../build.counter"; \<br>
> fi<br>
> rpmbuild -bs --define "_sourcedir /root/smf_source/pacemaker- <br>
> Pacemaker-2.1.4/rpm/.." --define "_topdir /root/smf_source/pacemaker- <br>
> Pacemaker-2.1.4/rpm" --without doc "/root/smf_source/pacemaker- <br>
> Pacemaker-2.1.4/rpm/SPECS/pacemaker.spec"<br>
> error: File /root/smf_source/pacemaker-Pacemaker-2.1.4/pacemaker-<br>
> DIST.tar.gz is smaller than 13 bytes<br>
> Wrote: /root/smf_source/pacemaker-Pacemaker-<br>
> 2.1.4/rpm/SRPMS/pacemaker-2.1.4-1.DIST.git.el8.src.rpm<br>
> To create custom builds, edit the flags and options in pacemaker.spec <br>
> first rpmbuild --define "_sourcedir <br>
> /root/smf_source/pacemaker-Pacemaker-<br>
> 2.1.4/rpm/.." --define "_topdir /root/smf_source/pacemaker-Pacemaker-<br>
> 2.1.4/rpm" --without doc --rebuild "/root/smf_source/pacemaker- <br>
> Pacemaker-2.1.4/rpm/SRPMS"/*.src.rpm<br>
> Installing /root/smf_source/pacemaker-Pacemaker-<br>
> 2.1.4/rpm/SRPMS/pacemaker-2.1.4-1.DIST.git.el8.src.rpm<br>
> error: File /root/smf_source/pacemaker-Pacemaker-2.1.4/pacemaker-<br>
> DIST.tar.gz is smaller than 13 bytes<br>
> Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.fb1j8n<br>
> + umask 022<br>
> + cd /root/smf_source/pacemaker-Pacemaker-2.1.4/rpm/BUILD<br>
> + cd /root/smf_source/pacemaker-Pacemaker-2.1.4/rpm/BUILD<br>
> + rm -rf pacemaker-DIST<br>
> + /usr/bin/tar -xof /root/smf_source/pacemaker-Pacemaker-<br>
> 2.1.4/pacemaker-DIST.tar.gz<br>
> /usr/bin/tar: This does not look like a tar archive<br>
> <br>
> gzip: stdin: unexpected end of file<br>
> /usr/bin/tar: Child returned status 1<br>
> /usr/bin/tar: Error is not recoverable: exiting now<br>
> error: Bad exit status from /var/tmp/rpm-tmp.fb1j8n (%prep)<br>
> <br>
> <br>
> RPM build errors:<br>
> File /root/smf_source/pacemaker-Pacemaker-2.1.4/pacemaker-<br>
> DIST.tar.gz is smaller than 13 bytes<br>
> Bad exit status from /var/tmp/rpm-tmp.fb1j8n (%prep)<br>
> make[1]: *** [Makefile:869: rpm] Error 1<br>
> make[1]: Leaving directory '/root/smf_source/pacemaker-Pacemaker-<br>
> 2.1.4/rpm'<br>
> make: *** [GNUmakefile:54: rpm] Error 2<br>
> <br>
> Below steps followed after downloading pacemaker-2.1.4 package from <br>
> Clusterlab and install required dependencies as per documentation.<br>
> <br>
> #./autogen.sh<br>
> #./configure<br>
> #make<br>
> #make rpm<br>
> <br>
> Please help solve the issue.<br>
> <br>
> Thanks and Regards,<br>
> S Sathish S<br>
--<br>
Ken Gaillot <<a href="mailto:kgaillot@redhat.com" target="_blank">kgaillot@redhat.com</a>><br>
_______________________________________________<br>
Manage your subscription:<br>
<a href="https://lists.clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">https://lists.clusterlabs.org/mailman/listinfo/users</a><br>
<br>
ClusterLabs home: <a href="https://www.clusterlabs.org/" rel="noreferrer" target="_blank">https://www.clusterlabs.org/</a><br>
<br>
</blockquote></div></div>