[Gluster-devel] Building rpms for master
Anders Blomdell
anders.blomdell at control.lth.se
Tue Jul 8 13:40:25 UTC 2014
On 2014-07-08 13:01, Justin Clift wrote:
> On 08/07/2014, at 11:51 AM, Anders Blomdell wrote:
>> It seems like http://www.gluster.org/community/documentation/index.php/CompilingRPMS
>> is missing one crucial step:
>>
>> $ ./autogen.sh
>> $ ./configure --enable-fusermount
>> $ make dist
>> ...
>> $ cd extras/LinuxRPM
>> $ make glusterrpms
>>
>> should be:
>>
>> $ rm -f ./autom4te.cache/* # make sure to use current
>> # './build-aux/pkg-version --release'
>> $ ./autogen.sh
>> $ ./configure --enable-fusermount
>> $ make dist
>> ...
>> $ cd extras/LinuxRPM
>> $ make glusterrpms
>>
>> Otherwise the rpm's wont pick the correct releaseversion, i.e. ./autogen.sh
>> will pickup the result of './build-aux/pkg-version --release' from the cache
>> instead of figure out where HEAD is currently located.
>>
>> Even nicer would be if '(cd extras/LinuxRPM ; make glusterrpms)' did the
>> right thing.
>
> Nice pick up. :)
>
> Want to whip up a patch to fix the make glusterrpms command?
Big hammer:
diff --git a/extras/LinuxRPM/Makefile.am b/extras/LinuxRPM/Makefile.am
index b82c65f..6f572d6 100644
--- a/extras/LinuxRPM/Makefile.am
+++ b/extras/LinuxRPM/Makefile.am
@@ -12,9 +12,19 @@ glusterrpms: prep srcrpm rpms
-rm -rf rpmbuild
prep:
- if [ ! -e $(GFS_TAR) ]; then \
- $(MAKE) -C ../.. dist; \
- fi
+ ( \
+ cd ../.. ; \
+ if [ -x config.status ] ; then \
+ CONFIG_STATUS=$$(./config.status --config | \
+ sed -e "s/'//g") ; \
+ else \
+ CONFIG_STATUS=--enable-fusermount ; \
+ fi ; \
+ rm -rf autom4te.cache ; \
+ ./autogen.sh ; \
+ ./configure $${CONFIG_STATUS} ; \
+ $(MAKE) dist ; \
+ )
-mkdir -p rpmbuild/BUILD
-mkdir -p rpmbuild/SPECS
-mkdir -p rpmbuild/RPMS
>
> + Justin
>
> --
> GlusterFS - http://www.gluster.org
>
> An open source, distributed file system scaling to several
> petabytes, and handling thousands of clients.
>
> My personal twitter: twitter.com/realjustinclift
>
/Anders
--
Anders Blomdell Email: anders.blomdell at control.lth.se
Department of Automatic Control
Lund University Phone: +46 46 222 4625
P.O. Box 118 Fax: +46 46 138118
SE-221 00 Lund, Sweden
More information about the Gluster-devel
mailing list