[corosync] Suggested build patch

Andrew Beekhof andrew at beekhof.net
Tue Jun 19 01:45:33 GMT 2012


Allows 'make srpm' to work and ensures $version-dirty is seen as newer
than $version by yum.


diff --git a/Makefile.am b/Makefile.am
index 182b001..bae5009 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -128,7 +128,7 @@ $(SPEC): $(SPEC).in
                git update-index --refresh > /dev/null 2>&1 || true && \
                dirty=`git diff-index --name-only HEAD 2>/dev/null`; \
        fi && \
-       if [ -n "$$dirty" ]; then dirty="dirty"; else dirty=""; fi && \
+       if [ -n "$$dirty" ]; then dirty="xdirty"; else dirty=""; fi && \
        if [ "$$numcomm" = "0" ]; then \
                sed \
                        -e "s#@version@#$$rpmver#g" \
@@ -159,7 +159,7 @@ RPMBUILDOPTS        = --define "_sourcedir
$(abs_builddir)" \
                  --define "_srcrpmdir $(abs_builddir)" \
                  --define "_rpmdir $(abs_builddir)"

-srpm: clean
+srpm: clean _version
        $(MAKE) $(SPEC) $(TARFILE)
        rpmbuild $(RPMBUILDOPTS) --nodeps -bs $(SPEC)

diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
index 795a98b..25f0be6 100755
--- a/build-aux/git-version-gen
+++ b/build-aux/git-version-gen
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Print a version string.
-scriptversion=2010-10-13.20; # UTC
+scriptversion=2012-06-19.01; # UTC

 # Copyright (C) 2007-2010 Free Software Foundation, Inc.
 #
@@ -144,8 +144,8 @@ case "$dirty" in
     '') ;;
     *) # Append the suffix only if there isn't one already.
        case $v in
-         *-dirty) ;;
-         *) v="$v-dirty" ;;
+         *-xdirty) ;;
+         *) v="$v-xdirty" ;;
        esac ;;
 esac


More information about the discuss mailing list