aboutsummaryrefslogtreecommitdiffstats
path: root/main/clamav/0001-libclamav-explicitly-use-top_srcdir-.git-dir.patch
blob: c1804277260ce06aeaf7d500e5b1c12eb610b610 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From 3e0878adc26b39ecd6c2bf74dad129ee8636fac9 Mon Sep 17 00:00:00 2001
From: Carlo Landmeter <clandmeter@alpinelinux.org>
Date: Fri, 16 Feb 2018 02:11:09 +0000
Subject: [PATCH] libclamav: explicitly use top_srcdir .git dir

This will prevent git from picking up a ref from parent git repository
and setting this as libclamav REVISION/version.
---
 libclamav/Makefile.am | 2 +-
 libclamav/Makefile.in | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libclamav/Makefile.am b/libclamav/Makefile.am
index 1c4c007c0..5d22b6483 100644
--- a/libclamav/Makefile.am
+++ b/libclamav/Makefile.am
@@ -616,7 +616,7 @@ version.h: version.h.tmp
 version.h.tmp:
 	$(AM_V_GEN) test -f version.h || touch version.h;\
 	rm -f $@;\
-	REVISION="$$(LANG=C cd "$(top_srcdir)"; git describe --always 2>/dev/null || echo "exported")";\
+	REVISION="$$(LANG=C git --git-dir "$(top_srcdir)"/.git describe --always 2>/dev/null || echo "exported")";\
 	if test "$$REVISION" = "exported"; then\
 	    REVISION="";\
 	fi;\
diff --git a/libclamav/Makefile.in b/libclamav/Makefile.in
index 6e19dcd9e..acace3394 100644
--- a/libclamav/Makefile.in
+++ b/libclamav/Makefile.in
@@ -3777,7 +3777,7 @@ version.h: version.h.tmp
 version.h.tmp:
 	$(AM_V_GEN) test -f version.h || touch version.h;\
 	rm -f $@;\
-	REVISION="$$(LANG=C cd "$(top_srcdir)"; git describe --always 2>/dev/null || echo "exported")";\
+	REVISION="$$(LANG=C git --git-dir "$(top_srcdir)"/.git describe --always 2>/dev/null || echo "exported")";\
 	if test "$$REVISION" = "exported"; then\
 	    REVISION="";\
 	fi;\
-- 
2.16.1