From: Ali Maredia Date: Fri, 27 Jan 2017 03:46:09 +0000 (-0500) Subject: nfs-ganesha: more fixes X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c71aaa032b976fc387cefd2555cd3b127b12fc47;p=ceph-build.git nfs-ganesha: more fixes Signed-off-by: Ali Maredia --- diff --git a/nfs-ganesha/build/build_deb b/nfs-ganesha/build/build_deb index 38157964..bb0de429 100644 --- a/nfs-ganesha/build/build_deb +++ b/nfs-ganesha/build/build_deb @@ -12,15 +12,9 @@ fi # We need this for system, to build ganesha, and to enable FSAL_CEPH and # FSAL_RGW in the .spec file when cmake command runs -sudo apt-get -y install " -cmake -equivs -libkrb5-dev -bison -flex -librgw-dev -libcephfs-dev -" +sudo apt-get -y install "cmake equivs libkrb5-dev bison flex quilt +libdbus-1-dev libnfsidmap-dev libwbclient-dev libntirpc-dev (>= 1.4.3) libattr1-dev libacl1-dev libcap-dev glusterfs-common (>= 3.8.4) python-qt4 pyqt4-dev-tools pkgconf +librgw-dev libcephfs-dev" # Normalize variables across rpm/deb builds NORMAL_DISTRO=$DISTRO @@ -44,26 +38,30 @@ mkdir build cd build # make source tarball -cmake -DCMAKE_BUILD_TYPE=Maintainer -DUSE_FSAL_CEPH=ON -DUSE_FSAL_RGW=ON $WORKSPACE/nfs-ganesha/src && make dist || exit 1 +cmake -DCMAKE_BUILD_TYPE=Maintainer -DUSE_FSAL_GLUSTER=OFF -DUSE_FSAL_CEPH=ON -DUSE_FSAL_RGW=ON $WORKSPACE/nfs-ganesha/src && make dist || exit 1 # move unpacked tarball code into nfs-ganesha-debian/src -NFS_GANESHA_SOURCE_DIR=`grep -om 1 "nfs-ganesha-[0-9].[0-9]-dev-[0-9]-[0-9].[0-9].[0-9]-Source" CPackSourceConfig.cmake` +VERSION=`grep -om 1 '[[:digit:]]\+\.[[:digit:]]\+-dev-[[:digit:]]\+' $WORKSPACE/nfs-ganesha/build/CPackSourceConfig.cmake | sed s/-//g` +BUILD=`grep -om 1 "[[:digit:]]\+-g\w\w\w\w\w\w\w" $WORKSPACE/nfs-ganesha/build/include/config.h` +NFS_GANESHA_ORIG_TAR_GZ="nfs-ganesha_${VERSION}.orig.tar.gz" +NFS_GANESHA_SOURCE_DIR=`grep -om 1 'nfs-ganesha-[[:digit:]]\+\.[[:digit:]]\+-dev-[[:digit:]]\+-[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+-Source' $WORKSPACE/nfs-ganesha/build/CPackSourceConfig.cmake` tar xzf ${NFS_GANESHA_SOURCE_DIR}.tar.gz -mv ${NFS_GANESHA_SOURCE_DIR} src -cp -r src $WORKSPACE/nfs-ganesha-debian/ +mv ${NFS_GANESHA_SOURCE_DIR}.tar.gz ${NFS_GANESHA_ORIG_TAR_GZ} +mv ${NFS_GANESHA_SOURCE_DIR} nfs-ganesha-${VERSION} +rm -rf $WORKSPACE/nfs-ganesha-debian/debian/patches +mv $WORKSPACE/nfs-ganesha-debian/debian $WORKSPACE/nfs-ganesha/build/nfs-ganesha-${VERSION}/debian ## Get some basic information about the system and the repository DEB_ARCH=$(dpkg-architecture -qDEB_BUILD_ARCH) -VERSION=`grep -om 1 "[0-9]\.[0-9]-dev-[0-9]" include/config.h` cd $WORKSPACE/nfs-ganesha-debian ## Prepare the debian files # Bump the changelog -dch -v "$VERSION" "New release ($VERSION)" +dch -v "$VERSION-$BUILD" "New release ($VERSION)" # Create .dsc and source tarball -sudo dpkg-buildpackage -S -us -uc +sudo dpkg-buildpackage -S -us -uc -d ## Build with pbuilder echo "Building debs" diff --git a/nfs-ganesha/build/build_rpm b/nfs-ganesha/build/build_rpm index 0d31f347..e4ff1ac2 100644 --- a/nfs-ganesha/build/build_rpm +++ b/nfs-ganesha/build/build_rpm @@ -52,7 +52,7 @@ mkdir build cd build # generate .spec file, edit .spec file for correct versions of libs and make source tarball -cmake -DCMAKE_BUILD_TYPE=Maintainer -DUSE_FSAL_CEPH=ON -DUSE_FSAL_RGW=ON $WORKSPACE/nfs-ganesha/src && make dist || exit 1 +cmake -DCMAKE_BUILD_TYPE=Maintainer -DUSE_FSAL_GLUSTER=OFF -DUSE_FSAL_CEPH=ON -DUSE_FSAL_RGW=ON $WORKSPACE/nfs-ganesha/src && make dist || exit 1 sed -i 's/libcephfs1-devel/libcephfs-devel/' $WORKSPACE/nfs-ganesha/src/nfs-ganesha.spec sed -i 's/librgw2-devel/librgw-devel/' $WORKSPACE/nfs-ganesha/src/nfs-ganesha.spec @@ -78,7 +78,7 @@ echo "\"\"\"" >> nfs-ganesha.cfg echo "Building RPMs" sudo mock -r nfs-ganesha.cfg --define "dist .el7" --resultdir=$WORKSPACE/dist/RPMS/ ${SRPM} || ( tail -n +1 $WORKSPACE/dist/RPMS/{root,build}.log && exit 1 ) -VERSION=`grep -om 1 "[0-9]\.[0-9]-dev-[0-9]" $WORKSPACE/nfs-ganesha/build/include/config.h` +VERSION=`grep -om 1 '[[:digit:]]\+\.[[:digit:]]\+-dev-[[:digit:]]\+' $WORKSPACE/nfs-ganesha/build/include/config.h` chacra_endpoint="nfs-ganesha/${NFS_GANESHA_BRANCH}/${GIT_COMMIT}/${DISTRO}/${RELEASE}" RPM_RELEASE=`grep Release $WORKSPACE/nfs-ganesha/src/nfs-ganesha.spec | sed 's/Release:[ \t]*//g' | cut -d '%' -f 1` RPM_VERSION=`grep Version $WORKSPACE/nfs-ganesha/src/nfs-ganesha.spec | sed 's/Version:[ \t]*//g'`