From: Brian J. Murrell Date: Fri, 11 Jun 2010 04:04:31 +0000 (-0400) Subject: b=22790 fail make debs if autogen.sh is needed but not present X-Git-Tag: v1_10_0_44~3 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=2bac6e62066644385e379d90bbdbbbeab626fe89;ds=sidebyside b=22790 fail make debs if autogen.sh is needed but not present If a patch is added to debian/patches/ which modifies an autoconf file but autogen.sh is not present, fail out of the "make debs" build command. Also provide a more explicit message to maintainers about what is happening in this bit of code. --- diff --git a/debian/rules b/debian/rules index 53fa04f..39dcbe9 100755 --- a/debian/rules +++ b/debian/rules @@ -78,17 +78,26 @@ SRCDIR=. autogen: autogen-stamp autogen-stamp: patch-stamp # see if any patches requires us to run autogen - if ! grep "^--- .*\/autoconf" debian/patches/* || \ - [ ! -f autogen.sh ]; then \ - exit 0; \ - fi - cp /usr/share/misc/config.sub config.sub - cp /usr/share/misc/config.sub libsysio/config.sub - cp /usr/share/misc/config.sub ldiskfs/config.sub - cp /usr/share/misc/config.guess config.guess - cp /usr/share/misc/config.guess libsysio/config.guess - cp /usr/share/misc/config.guess ldiskfs/config.guess - sh ./autogen.sh + # (for a distribution release tarball, it is expected that if + # downstream adds any patches that requires autogen.sh to be + # run, a patch will be added by downstream to install the + # needed autogen.sh scripts + # see https://bugzilla.lustre.org/attachment.cgi?id=27156 + # for an example) + if grep "^--- .*\/autoconf" debian/patches/*; then \ + if [ ! -f autogen.sh ]; then \ + echo "You have patches which require autogen.sh to be run, but it doesn't exist"; \ + echo "Please see https://bugzilla.lustre.org/attachment.cgi?id=27156"; \ + exit 1; \ + fi; \ + cp /usr/share/misc/config.sub config.sub; \ + cp /usr/share/misc/config.sub libsysio/config.sub; \ + cp /usr/share/misc/config.sub ldiskfs/config.sub; \ + cp /usr/share/misc/config.guess config.guess; \ + cp /usr/share/misc/config.guess libsysio/config.guess; \ + cp /usr/share/misc/config.guess ldiskfs/config.guess; \ + sh ./autogen.sh; \ + fi; \ touch $@ configure: configure-stamp