This bug affects users who download a commotion-openwrt tar archive instead of cloning the commotion-openwrt git repo. Submit upstream patch if necessary.
(Was Bug 624 on code.commotionwireless.net)
This issue is in follow-up to #622 that was marked resolved yesterday.
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:
make[4]: Entering directory /blah/blah/commotion-openwrt/openwrt/build_dir/target-mips_uClibc-0.9.33.2/serval-dna-batphone-release-0.91' LINK servald fatal: Not a git repository (or any of the parent directories): .git make[4]: *** [servald] Error 128 make[4]: Leaving directory
/blah/blah/commotion-openwrt/openwrt/build_dir/target-mips_uClibc-0.9.33.2/serval-dna-batphone-release-0.91'
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
make[3]: Leaving directory /blah/blah/commotion-openwrt/openwrt/feeds/commotion/packages/serval-dna' make[2]: *** [package/feeds/commotion/serval-dna/compile] Error 2 make[2]: Leaving directory
/blah/blah/commotion-openwrt/openwrt'
make[1]: *** [/blah/blah/commotion-openwrt/openwrt/staging_dir/target-mips_uClibc-0.9.33.2/stamp/.package_compile] Error 2
make[1]: Leaving directory `/blah/blah/commotion-openwrt/openwrt'
make: *** [world] Error 2
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.
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.
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.