From: Ian Beckwith Date: Sun, 11 Aug 2013 14:12:41 +0000 (+0100) Subject: fix gnulib-tool --version; also show snapshot and debian package version X-Git-Tag: debian/20130805+stable-1~2 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;ds=sidebyside;h=62b20a6fa6e36db65d2062e35fab084441de007d;p=gnulib.git fix gnulib-tool --version; also show snapshot and debian package version --- diff --git a/debian/changelog b/debian/changelog index 2db3ef36e..f94e230ea 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ gnulib (20130805+stable-1) unstable; urgency=low * Resumed making upstream snapshots - sorry about the gap. * Packaged upstream stable snapshot (Closes: #687986, #710325). + * Fix gnulib-tool --version, also show snapshot and debian + package version (Closes: #710330). * Refresh 01-gnulib-directory.patch. * Update lintian overrides for magical shebangs. * Standards-Version: 3.9.4 (no changes). diff --git a/debian/patches/01-gnulib-directory.patch b/debian/patches/01-gnulib-directory.patch index 9643992dd..9cb8c4889 100644 --- a/debian/patches/01-gnulib-directory.patch +++ b/debian/patches/01-gnulib-directory.patch @@ -3,9 +3,26 @@ Description: Sets the gnulib directory. Index: gnulib/gnulib-tool =================================================================== ---- gnulib.orig/gnulib-tool 2013-08-11 12:33:06.000000000 +0100 -+++ gnulib/gnulib-tool 2013-08-11 12:33:12.000000000 +0100 -@@ -453,7 +453,7 @@ +--- gnulib.orig/gnulib-tool 2013-08-11 12:33:21.000000000 +0100 ++++ gnulib/gnulib-tool 2013-08-11 15:05:06.000000000 +0100 +@@ -323,12 +323,13 @@ + version=' '`cd "$gnulib_dir" && ./build-aux/git-version-gen /dev/null | sed -e 's/-dirty/-modified/'` + else + # gnulib copy without versioning information. +- date=`sed -e 's/ .*//;q' "$gnulib_dir"/ChangeLog` +- version= ++ date=`zcat /usr/share/doc/gnulib/changelog.gz | sed -e 's/ .*//;q'` ++ version=`zcat /usr/share/doc/gnulib/NEWS.stable.gz | grep -o -m 1 ' [0-9]\+-stable'` ++ debversion=`dpkg-query --show --showformat '${Version}' gnulib` + fi + year=`"$gnulib_dir"/build-aux/mdate-sh "$self_abspathname" | sed -e 's,^.* ,,'` + echo "\ +-gnulib-tool (GNU $package $date)$version ++gnulib-tool (GNU $package $date)$version Debian: $debversion + Copyright (C) $year Free Software Foundation, Inc. + License GPLv3+: GNU GPL version 3 or later + This is free software: you are free to change and redistribute it. +@@ -453,7 +454,7 @@ * ) self_abspathname=`echo "$self_abspathname" | sed -e 's,/[^/]*$,,'`/"$linkval" ;; esac done diff --git a/gnulib-tool b/gnulib-tool index 4b0df9f91..84be8a713 100755 --- a/gnulib-tool +++ b/gnulib-tool @@ -323,12 +323,13 @@ q version=' '`cd "$gnulib_dir" && ./build-aux/git-version-gen /dev/null | sed -e 's/-dirty/-modified/'` else # gnulib copy without versioning information. - date=`sed -e 's/ .*//;q' "$gnulib_dir"/ChangeLog` - version= + date=`zcat /usr/share/doc/gnulib/changelog.gz | sed -e 's/ .*//;q'` + version=`zcat /usr/share/doc/gnulib/NEWS.stable.gz | grep -o -m 1 ' [0-9]\+-stable'` + debversion=`dpkg-query --show --showformat '${Version}' gnulib` fi year=`"$gnulib_dir"/build-aux/mdate-sh "$self_abspathname" | sed -e 's,^.* ,,'` echo "\ -gnulib-tool (GNU $package $date)$version +gnulib-tool (GNU $package $date)$version Debian: $debversion Copyright (C) $year Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it.