[ClusterLabs] Unable to build rpm using make rpm command for pacemaker-2.1.4.
S Sathish S
s.s.sathish at ericsson.com
Tue Nov 22 07:16:17 EST 2022
Hi Ken/Team,
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.
#./autogen.sh
#./configure/
#make
#make dist
#rpmbuild -v -bb spec.in
RPM output in below format:
pacemaker-cluster-libs-2.1.4-1.2.1.4.git.el8.x86_64
pacemaker-schemas-2.1.4-1.2.1.4.git.el8.noarch
pacemaker-2.1.4-1.2.1.4.git.el8.x86_64
pacemaker-libs-2.1.4-1.2.1.4.git.el8.x86_64
pacemaker-cli-2.1.4-1.2.1.4.git.el8.x86_64
Please let us know once it is fixed on 2.1.5-rc3 ,we need to build rpm without git checkout method.
Thanks and Regards,
S Sathish S
-----Original Message-----
From: Ken Gaillot <kgaillot at redhat.com>
Sent: 21 November 2022 21:52
To: Cluster Labs - All topics related to open-source clustering welcomed <users at clusterlabs.org>
Cc: S Sathish S <s.s.sathish at ericsson.com>
Subject: Re: [ClusterLabs] Unable to build rpm using make rpm command for pacemaker-2.1.4.
Hi,
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
2.1.2 so I'll try to fix it for 2.1.5-rc3 (expected this week).
On Mon, 2022-11-21 at 13:04 +0000, S Sathish S via Users wrote:
> Hi Team,
>
> I am getting the below error when executing make rpm command to build
> pacemaker-2.1.4 package on linux 8 server.
>
> [root at node1 pacemaker-Pacemaker-2.1.4]# make rpm make -C rpm "rpm"
> make[1]: Entering directory '/root/smf_source/pacemaker-Pacemaker-
> 2.1.4/rpm'
> cd /root/smf_source/pacemaker-Pacemaker-
> 2.1.4/rpm/..; \
> if [ -n "" ]; then \
> git commit -m "DO-NOT-PUSH"
> -a; \
> git archive --prefix=pacemaker-DIST/ -o
> "/root/smf_source/pacemaker-Pacemaker-2.1.4/rpm/../pacemaker-
> DIST.tar.gz" HEAD^{tree}; \
> git reset --mixed
> HEAD^; \
> echo "`date`: Rebuilt /root/smf_source/pacemaker-Pacemaker-
> 2.1.4/rpm/../pacemaker-
> DIST.tar.gz"; \
> elif [ -f "/root/smf_source/pacemaker-Pacemaker-
> 2.1.4/rpm/../pacemaker-DIST.tar.gz" ];
> then \
> echo "`date`: Using existing tarball: /root/smf_source/pacemaker-
> Pacemaker-2.1.4/rpm/../pacemaker-DIST.tar.gz"; \
> else
> \
> git archive --prefix=pacemaker-DIST/ -o
> "/root/smf_source/pacemaker-Pacemaker-2.1.4/rpm/../pacemaker-
> DIST.tar.gz" DIST^{tree}; \
> echo "`date`: Rebuilt /root/smf_source/pacemaker-Pacemaker-
> 2.1.4/rpm/../pacemaker-
> DIST.tar.gz"; \
> fi
> fatal: not a git repository (or any of the parent directories): .git
> Mon Nov 21 07:42:25 EST 2022: Rebuilt /root/smf_source/pacemaker-
> Pacemaker-2.1.4/rpm/../pacemaker-DIST.tar.gz
> rm -f "/root/smf_source/pacemaker-Pacemaker-
> 2.1.4/rpm/SRPMS"/*.src.rpm
> rm -f "/root/smf_source/pacemaker-Pacemaker-
> 2.1.4/rpm/SPECS/pacemaker.spec"
> fatal: not a git repository (or any of the parent directories): .git
> fatal: not a git repository (or any of the parent directories): .git
> fatal: not a git repository (or any of the parent directories): .git
> fatal: not a git repository (or any of the parent directories): .git
> fatal: not a git repository (or any of the parent directories): .git
> fatal: not a git repository (or any of the parent directories): .git
> fatal: not a git repository (or any of the parent directories): .git
> fatal: not a git repository (or any of the parent directories): .git
> /usr/bin/mkdir -p "/root/smf_source/pacemaker-Pacemaker-
> 2.1.4/rpm/SPECS"
> if [ x"`git ls-files -m 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 2>/dev/null`" != x ];
> then \
> cat "/root/smf_source/pacemaker-Pacemaker-
> 2.1.4/rpm/pacemaker.spec.in"; \
> elif git cat-file -e DIST:rpm/pacemaker.spec.in 2>/dev/null;
> then \
> git show
> DIST:rpm/pacemaker.spec.in; \
> elif git cat-file -e DIST:pacemaker.spec.in 2>/dev/null;
> then \
> git show
> DIST:pacemaker.spec.in; \
> else
> \
> cat "/root/smf_source/pacemaker-Pacemaker-
> 2.1.4/rpm/pacemaker.spec.in"; \
> fi |
> sed
> \
> -e 's/^\(%global pcmkversion \).*/\12.1.4/' \
> -e 's/^\(%global specversion \).*/\11/' \
> -e 's/^\(%global commit
> \).*/\1DIST/' \
> -e 's/^\(%global commit_abbrev \).*/\14/' \
> -e "s/PACKAGE_DATE/$(date +'%a %b %d
> %Y')/" \
> -e 's/PACKAGE_VERSION/2.1.4-1/' \
> > "/root/smf_source/pacemaker-Pacemaker-
> 2.1.4/rpm/SPECS/pacemaker.spec"
> if [ -e "../build.counter" ]; then \
> echo 1 > "../build.counter"; \
> fi
> rpmbuild -bs --define "_sourcedir /root/smf_source/pacemaker-
> Pacemaker-2.1.4/rpm/.." --define "_topdir /root/smf_source/pacemaker-
> Pacemaker-2.1.4/rpm" --without doc "/root/smf_source/pacemaker-
> Pacemaker-2.1.4/rpm/SPECS/pacemaker.spec"
> error: File /root/smf_source/pacemaker-Pacemaker-2.1.4/pacemaker-
> DIST.tar.gz is smaller than 13 bytes
> Wrote: /root/smf_source/pacemaker-Pacemaker-
> 2.1.4/rpm/SRPMS/pacemaker-2.1.4-1.DIST.git.el8.src.rpm
> To create custom builds, edit the flags and options in pacemaker.spec
> first rpmbuild --define "_sourcedir
> /root/smf_source/pacemaker-Pacemaker-
> 2.1.4/rpm/.." --define "_topdir /root/smf_source/pacemaker-Pacemaker-
> 2.1.4/rpm" --without doc --rebuild "/root/smf_source/pacemaker-
> Pacemaker-2.1.4/rpm/SRPMS"/*.src.rpm
> Installing /root/smf_source/pacemaker-Pacemaker-
> 2.1.4/rpm/SRPMS/pacemaker-2.1.4-1.DIST.git.el8.src.rpm
> error: File /root/smf_source/pacemaker-Pacemaker-2.1.4/pacemaker-
> DIST.tar.gz is smaller than 13 bytes
> Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.fb1j8n
> + umask 022
> + cd /root/smf_source/pacemaker-Pacemaker-2.1.4/rpm/BUILD
> + cd /root/smf_source/pacemaker-Pacemaker-2.1.4/rpm/BUILD
> + rm -rf pacemaker-DIST
> + /usr/bin/tar -xof /root/smf_source/pacemaker-Pacemaker-
> 2.1.4/pacemaker-DIST.tar.gz
> /usr/bin/tar: This does not look like a tar archive
>
> gzip: stdin: unexpected end of file
> /usr/bin/tar: Child returned status 1
> /usr/bin/tar: Error is not recoverable: exiting now
> error: Bad exit status from /var/tmp/rpm-tmp.fb1j8n (%prep)
>
>
> RPM build errors:
> File /root/smf_source/pacemaker-Pacemaker-2.1.4/pacemaker-
> DIST.tar.gz is smaller than 13 bytes
> Bad exit status from /var/tmp/rpm-tmp.fb1j8n (%prep)
> make[1]: *** [Makefile:869: rpm] Error 1
> make[1]: Leaving directory '/root/smf_source/pacemaker-Pacemaker-
> 2.1.4/rpm'
> make: *** [GNUmakefile:54: rpm] Error 2
>
> Below steps followed after downloading pacemaker-2.1.4 package from
> Clusterlab and install required dependencies as per documentation.
>
> #./autogen.sh
> #./configure
> #make
> #make rpm
>
> Please help solve the issue.
>
> Thanks and Regards,
> S Sathish S
--
Ken Gaillot <kgaillot at redhat.com>
More information about the Users
mailing list