[OpenWrt-Devel] [PATCH] wireguard-tools: fix version indicator
Florian Eckert
fe at dev.tdt.de
Mon May 11 07:29:33 EDT 2020
If we execute `wg --version` we get a diffrent version string that does
not match with the version string in the openwrt makefile.
Current version string:
`wireguard-tools vreboot-13159-gac5caa2718 -https://git.zx2c4.com/wireguard-tools/`
Corrected versions string:
`wireguard-tools v1.0.20200319 - https://git.zx2c4.com/wireguard-tools/`
This had already led to confusion! To fix this the versions string from
the wireguard source include file `src/version.h` is now used by
removeing the version string generation from the wireguard-tools makefile.
Signed-off-by: Florian Eckert <fe at dev.tdt.de>
---
package/network/utils/wireguard-tools/Makefile | 2 +-
.../patches/0001-wireguard-tools-fix-version.patch | 13 +++++++++++++
2 files changed, 14 insertions(+), 1 deletion(-)
create mode 100644 package/network/utils/wireguard-tools/patches/0001-wireguard-tools-fix-version.patch
diff --git a/package/network/utils/wireguard-tools/Makefile b/package/network/utils/wireguard-tools/Makefile
index 549329509a..4ccb6dd2cf 100644
--- a/package/network/utils/wireguard-tools/Makefile
+++ b/package/network/utils/wireguard-tools/Makefile
@@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=wireguard-tools
PKG_VERSION:=1.0.20200319
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=wireguard-tools-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://git.zx2c4.com/wireguard-tools/snapshot/
diff --git a/package/network/utils/wireguard-tools/patches/0001-wireguard-tools-fix-version.patch b/package/network/utils/wireguard-tools/patches/0001-wireguard-tools-fix-version.patch
new file mode 100644
index 0000000000..b5ee60ac6d
--- /dev/null
+++ b/package/network/utils/wireguard-tools/patches/0001-wireguard-tools-fix-version.patch
@@ -0,0 +1,13 @@
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -46,10 +46,6 @@ CFLAGS += -DRUNSTATEDIR="\"$(RUNSTATEDIR
+ ifeq ($(DEBUG),yes)
+ CFLAGS += -g
+ endif
+-WIREGUARD_TOOLS_VERSION = $(patsubst v%,%,$(shell GIT_CEILING_DIRECTORIES="$(PWD)/../.." git describe --dirty 2>/dev/null))
+-ifneq ($(WIREGUARD_TOOLS_VERSION),)
+-CFLAGS += -D'WIREGUARD_TOOLS_VERSION="$(WIREGUARD_TOOLS_VERSION)"'
+-endif
+ ifeq ($(PLATFORM),haiku)
+ LDLIBS += -lnetwork -lbsd
+ endif
--
2.20.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list