Description of problem: Right now, a full clone of glusterfs repo needs 148MB of size, but a clone with '--depth 1' option needs just 4MB. It makes sense to use this option in many of the smoke tests and CI/CD environments, so that we save time, bandwidth, and storage. But, right now, we can't 'build' any RPMs with this option. Version-Release number of selected component (if applicable): mainline (april-18th-2019) How reproducible: Steps to Reproduce: 1. git clone --depth 1 https://github.com/gluster/glusterfs.git glusterfs-depth-1 2. cd glusterfs-depth-1; ./autogen.sh && ./configure && make -C extras/LinuxRPM/ glusterrpms 3. You see the error like below ``` rpmbuild --define '_topdir /home/atumball/work/gluster/glusterfs-container-tests/extras/LinuxRPM/rpmbuild' -bs rpmbuild/SPECS/glusterfs.spec error: line 231: Empty tag: Version: make: *** [Makefile:573: srcrpm] Error 1 ``` Expected results: build should pass. Additional info: The issue is with executing ./build-aux/pkg-version script. [atumball@localhost glusterfs-depth-1]$ ./build-aux/pkg-version --full fatal: No names found, cannot describe anything. v- [atumball@localhost glusterfs-depth-1]$ ./build-aux/pkg-version --version 2>/dev/null <No output>
REVIEW: https://review.gluster.org/22583 (build-aux/pkg-version: provide option for depth=1) posted (#2) for review on master by Amar Tumballi
REVIEW: https://review.gluster.org/22583 (build-aux/pkg-version: provide option for depth=1) merged (#4) on master by Amar Tumballi