Whamcloud - gitweb
b=22790 fail make debs if autogen.sh is needed but not present
authorBrian J. Murrell <brian@sun.com>
Fri, 11 Jun 2010 04:04:31 +0000 (00:04 -0400)
committerRobert Read <robert.read@oracle.com>
Fri, 11 Jun 2010 16:29:34 +0000 (09:29 -0700)
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.

debian/rules

index 53fa04f..39dcbe9 100755 (executable)
@@ -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