python-treq: bump to version 16.12.0
[buildroot-gz.git] / package / sslh / 0001-secure-version-while-building-sslh-in-a-larger-git-t.patch
blobd23bc9fae66c19ca997d1caa06ad8a27e9b284c0
1 From 0c39699da9a3d6534b6d26e7c9686ee76d81b64a Mon Sep 17 00:00:00 2001
2 From: David Bachelart <david.bachelart@bbright.com>
3 Date: Thu, 26 Jan 2017 10:07:47 +0100
4 Subject: [PATCH] fix version extraction when building in a larger git tree
6 sslh uses host git to extract its own version number. In buildroot, this
7 is an issue since extracted information is conflicting with buildroot git
8 status if we use git as VCS for buildroot.
10 Since these git calls are legitimate only if git is used for the sslh
11 subtree only, this patch adds a check : a .git directory has to exist at
12 the root of the project to enable git-extracted version string.
14 Signed-off-by: David Bachelart <david.bachelart@bbright.com>
15 [yann.morin.1998@free.fr: fix troll character U+c2a0]
16 Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
17 ---
18 genver.sh | 4 ++--
19 1 file changed, 2 insertions(+), 2 deletions(-)
21 diff --git a/genver.sh b/genver.sh
22 index 79fd0a0..051e57b 100755
23 --- a/genver.sh
24 +++ b/genver.sh
25 @@ -7,7 +7,7 @@ else
26 QUIET=0
29 -if ! `(git status | grep -q "On branch") 2> /dev/null`; then
30 +if [ ! -d .git ] || ! `(git status | grep -q "On branch") 2> /dev/null`; then
31 # If we don't have git, we can't work out what
32 # version this is. It must have been downloaded as a
33 # zip file.
34 @@ -25,7 +25,7 @@ if ! `(git status | grep -q "On branch") 2> /dev/null`; then
38 -if head=`git rev-parse --verify HEAD 2>/dev/null`; then
39 +if [ -d .git ] && head=`git rev-parse --verify HEAD 2>/dev/null`; then
40 # generate the version info based on the tag
41 release=`(git describe --tags || git --describe || git describe --all --long) \
42 2>/dev/null | tr -d '\n'`
43 --
44 2.1.4