<p>This bug affects users who download a commotion-openwrt tar archive instead of cloning the commotion-openwrt git repo. Submit upstream patch if necessary.</p>

<p>(Was Bug 624 on code.commotionwireless.net)</p>

<p>This issue is in follow-up to #622 that was marked resolved yesterday.</p>

<p>The problem is that Commotion-OpenWRT build will fail with the following error if no level in serval-dna-batphone's path inside the build tree is a git repo:</p>

<p>make[4]: Entering directory <code>/blah/blah/commotion-openwrt/openwrt/build_dir/target-mips_uClibc-0.9.33.2/serval-dna-batphone-release-0.91'<br>
LINK servald<br>
fatal: Not a git repository (or any of the parent directories): .git<br>
make[4]: *** [servald] Error 128<br>
make[4]: Leaving directory</code>/blah/blah/commotion-openwrt/openwrt/build_dir/target-mips_uClibc-0.9.33.2/serval-dna-batphone-release-0.91'<br>
make[3]: *** [/blah/blah/commotion-openwrt/openwrt/build_dir/target-mips_uClibc-0.9.33.2/serval-dna-batphone-release-0.91/.built] Error 2<br>
make[3]: Leaving directory <code>/blah/blah/commotion-openwrt/openwrt/feeds/commotion/packages/serval-dna'<br>
make[2]: *** [package/feeds/commotion/serval-dna/compile] Error 2<br>
make[2]: Leaving directory</code>/blah/blah/commotion-openwrt/openwrt'<br>
make[1]: *** [/blah/blah/commotion-openwrt/openwrt/staging_dir/target-mips_uClibc-0.9.33.2/stamp/.package_compile] Error 2<br>
make[1]: Leaving directory `/blah/blah/commotion-openwrt/openwrt'<br>
make: *** [world] Error 2</p>

<p>This error occurs because /blah/blah/commotion-openwrt/openwrt/build_dir/target-mips_uClibc-0.9.33.2/serval-dna-batphone-release-0.91/Makefile runs the script version_string.sh in the same directory to generate a string representing the current revision.</p>

<p>This works for instances where the Commoption-OpenWRT codebase is itself cloned from github, as version_string.sh will then return "DR2", but really this approach is only working by coincidence. version_string.sh is likely expecting to retrieve the current git revision for serval-dna, and not for an unrelated repo in a higher up directory.</p>

<p>A possible resolution is to add a patch commotion/packages/serval-dna/patches to alter version_string.sh so that it doesn't expect a git repo in its current directory.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href='https://github.com/opentechinstitute/commotion-feed/issues/19'>view it on GitHub</a>.<img src='https://github.com/notifications/beacon/HSS0tS4nfORw_XnPQF8f0Tl1Nw3VFpLMUoKVVODvv0Hij1c27NyaTO48XRTHOnP-.gif' height='1' width='1'></p>