Skip to contentSkip to conversation

vpnc: update and fix musl build

PATCH New Thomas Petazzoni 2 participants 12 messages Feb 10, 2016 – Jun 3, 2016

lore
Share & tools
lore
#0 lore raw

cover vpnc: update and fix musl build

Hello,

The starting point of this series was the patch from Bernd fixing the vpnc package to build with musl:

http://patchwork.ozlabs.org/patch/572246/

However, I was not very happy with the patches directly imported from Alpine Linux, with no real commit log, no explanation, etc.

So instead, I went ahead and updated the vpnc package to use a more recent upstream version, to reformat all the patches using Git, to re-organize the existing patches into cleaner ones, and rework the musl fixes into clean patches as well.

All patches have been submitted upstream:

https://github.com/ndpgroup/vpnc/pull/6

It isn't entirely clear how this Github repository gets maintained compared to the Subversion repository mentioned on the official vpnc homepage, but it seems to be kept reasonably up-to-date.

Thanks,

Thomas

Thomas Petazzoni (4):
vpnc: switch to github as the new site
vpnc: simplify patch 0001
vpnc: bump to newer upstream version
vpnc: add patches to fix build with the musl C library

 ...ile-allow-to-override-the-PREFIX-variable.patch | 32 ++++++++++
 package/vpnc/0001-fix-build.patch                  | 71 ----------------------
 ...02-Makefile-allow-to-override-the-version.patch | 42 +++++++++++++
 package/vpnc/0002-nomanual.patch                   | 15 -----
 ...file-allow-passing-custom-CFLAGS-CPPFLAGS.patch | 46 ++++++++++++++
 package/vpnc/0003-susv3-legacy.patch               | 12 ----
 ...e-provide-an-option-to-not-build-manpages.patch | 58 ++++++++++++++++++
 ...low-passing-a-custom-path-to-libgcrypt-co.patch | 41 +++++++++++++
 ...place-deprecated-SUSv3-functions-with-POS.patch | 37 +++++++++++
 ...n-t-assume-error.h-is-available-on-all-Li.patch | 54 ++++++++++++++++
 ...p.c-don-t-include-linux-if_tun.h-on-Linux.patch | 56 +++++++++++++++++
 ...g.c-add-missing-sys-ttydefaults.h-include.patch | 38 ++++++++++++
 package/vpnc/Config.in                             |  6 ++
 package/vpnc/vpnc.hash                             |  2 +-
 package/vpnc/vpnc.mk                               | 19 +++---
 15 files changed, 420 insertions(+), 109 deletions(-)
 create mode 100644 package/vpnc/0001-Makefile-allow-to-override-the-PREFIX-variable.patch
 delete mode 100644 package/vpnc/0001-fix-build.patch
 create mode 100644 package/vpnc/0002-Makefile-allow-to-override-the-version.patch
 delete mode 100644 package/vpnc/0002-nomanual.patch
 create mode 100644 package/vpnc/0003-Makefile-allow-passing-custom-CFLAGS-CPPFLAGS.patch
 delete mode 100644 package/vpnc/0003-susv3-legacy.patch
 create mode 100644 package/vpnc/0004-Makefile-provide-an-option-to-not-build-manpages.patch
 create mode 100644 package/vpnc/0005-Makefile-allow-passing-a-custom-path-to-libgcrypt-co.patch
 create mode 100644 package/vpnc/0006-config.c-Replace-deprecated-SUSv3-functions-with-POS.patch
 create mode 100644 package/vpnc/0007-sysdep.h-don-t-assume-error.h-is-available-on-all-Li.patch
 create mode 100644 package/vpnc/0008-sysdep.c-don-t-include-linux-if_tun.h-on-Linux.patch
 create mode 100644 package/vpnc/0009-config.c-add-missing-sys-ttydefaults.h-include.patch
Signature · 1 line
2.6.4
#1 lore raw

PATCH 1/4 vpnc: switch to github as the new site

The vpnc upstream project has not made any tarball release since many years, but they have continued to update their Subversion repository.

A Github repository synced with the Subversion repository now exists at https://github.com/ndpgroup/vpnc, which is more practical to generate patches and submit pull requests. For this reason, we move to using this Github repository as the new source for the vpnc package. The specific commit that we use corresponds to version 0.5.3 exactly.

All patches are re-formatted using Git.

---
 ...le-cleanup-and-fix-the-VERSION-definitio.patch} | 24 +++++++++++-----
 package/vpnc/0002-Don-t-build-manpages.patch       | 31 +++++++++++++++++++++
 package/vpnc/0002-nomanual.patch                   | 15 ----------
 ...recated-SUSv3-functions-with-POSIX-equiva.patch | 32 ++++++++++++++++++++++
 package/vpnc/0003-susv3-legacy.patch               | 12 --------
 package/vpnc/vpnc.hash                             |  2 +-
 package/vpnc/vpnc.mk                               |  4 +--
 7 files changed, 83 insertions(+), 37 deletions(-)
 rename package/vpnc/{0001-fix-build.patch => 0001-Misc.-Makefile-cleanup-and-fix-the-VERSION-definitio.patch} (78%)
 create mode 100644 package/vpnc/0002-Don-t-build-manpages.patch
 delete mode 100644 package/vpnc/0002-nomanual.patch
 create mode 100644 package/vpnc/0003-Replace-deprecated-SUSv3-functions-with-POSIX-equiva.patch
 delete mode 100644 package/vpnc/0003-susv3-legacy.patch
package/vpnc/0001-Misc.-Makefile-cleanup-and-fix-the-VERSION-definitio.patch renamed from package/vpnc/0001-fix-build.patch +17 -7
similarity index 78%
rename from package/vpnc/0001-fix-build.patch
rename to package/vpnc/0001-Misc.-Makefile-cleanup-and-fix-the-VERSION-definitio.patch
index e21348b..d091dde 100644
@@ -1,14 +1,21 @@
-Misc. Makefile cleanup and fix the VERSION definition.
+From fd7e584bd28bd541464f8cb6cc72e76de2347640 Mon Sep 17 00:00:00 2001
+From: Samuel Martin <[email protected]>
+Date: Mon, 8 Feb 2016 23:02:45 +0100
+Subject: [PATCH] Misc. Makefile cleanup and fix the VERSION definition.
 
 Signed-off-by: Samuel Martin <[email protected]>
-
+Signed-off-by: Thomas Petazzoni <[email protected]>
 ---
-diff -purN vpnc-0.5.3.orig/Makefile vpnc-0.5.3/Makefile
---- vpnc-0.5.3.orig/Makefile	2012-08-06 00:03:22.677914146 +0200
-+++ vpnc-0.5.3/Makefile	2012-08-06 00:06:58.506744901 +0200
+ Makefile | 40 +++++++++++++++++++---------------------
+ 1 file changed, 19 insertions(+), 21 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 9b96d83..1ca6459 100644
+--- a/Makefile
++++ b/Makefile
 @@ -19,21 +19,19 @@
  #
- # $Id: Makefile 312 2008-06-15 18:09:42Z Joerg Mayer $
+ # $Id$
  
 -DESTDIR=
 -PREFIX=/usr/local
@@ -60,7 +67,7 @@ diff -purN vpnc-0.5.3.orig/Makefile vpnc-0.5.3/Makefile
  
  ifeq ($(shell uname -s), SunOS)
  LDFLAGS += -lnsl -lresolv -lsocket
-@@ -84,7 +82,7 @@ cisco-decrypt : cisco-decrypt.o decrypt-
+@@ -81,7 +79,7 @@ cisco-decrypt : cisco-decrypt.o decrypt-utils.o
  	$(CC) -o $@ $^ $(LDFLAGS)
  
  .depend: $(SRCS) $(BINSRCS)
@@ -69,3 +76,6 @@ diff -purN vpnc-0.5.3.orig/Makefile vpnc-0.5.3/Makefile
  
  vpnc-debug.c vpnc-debug.h : isakmp.h enum2debug.pl
  	LC_ALL=C perl -w ./enum2debug.pl isakmp.h >vpnc-debug.c 2>vpnc-debug.h
+-- 
+2.6.4
+
package/vpnc/0002-Don-t-build-manpages.patch new file +31 -0
new file mode 100644
index 0000000..be4414e
@@ -0,0 +1,31 @@
+From 6bbd03ec8928fd2a3056fc55ee48900fc88d3061 Mon Sep 17 00:00:00 2001
+From: Ulf Samuelsson <[email protected]>
+Date: Mon, 8 Feb 2016 23:03:48 +0100
+Subject: [PATCH] Don't build manpages
+
+Patch originally from Ulf Samuelsson <[email protected]>.
+
+Signed-off-by: Thomas Petazzoni <[email protected]>
+---
+ Makefile | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 1ca6459..857bf8d 100644
+--- a/Makefile
++++ b/Makefile
+@@ -70,7 +70,10 @@ vpnc : $(OBJS) vpnc.o
+ 	$(CC) -o $@ $^ $(LDFLAGS)
+ 
+ vpnc.8 : vpnc.8.template makeman.pl vpnc
+-	./makeman.pl
++	@echo "Cannot make manual when cross compiling"
++	touch $@
++
++#	./makeman.pl
+ 
+ vpnc-script : vpnc-script.in
+ 	sed -e 's,@''PREFIX''@,$(PREFIX),g' $< > $@ && chmod 755 $@
+-- 
+2.6.4
+
package/vpnc/0002-nomanual.patch deleted +0 -15
deleted file mode 100644
index 7f2ea53..0000000
@@ -1,15 +0,0 @@
-diff -urN vpnc-0.5.3-0rig/Makefile vpnc-0.5.3/Makefile
---- vpnc-0.5.3-0rig/Makefile	2008-11-19 21:36:12.000000000 +0100
-+++ vpnc-0.5.3/Makefile	2009-01-15 00:38:36.000000000 +0100
-@@ -72,7 +72,10 @@
- 	$(CC) -o $@ $^ $(LDFLAGS)
- 
- vpnc.8 : vpnc.8.template makeman.pl vpnc
--	./makeman.pl
-+	@echo "Cannot make manual when cross compiling"
-+	touch $@
-+
-+#	./makeman.pl
- 
- vpnc-script : vpnc-script.in
- 	sed -e 's,@''PREFIX''@,$(PREFIX),g' $< > $@ && chmod 755 $@
package/vpnc/0003-Replace-deprecated-SUSv3-functions-with-POSIX-equiva.patch new file +32 -0
new file mode 100644
index 0000000..4b8446f
@@ -0,0 +1,32 @@
+From ca1a9ad59ae07345720e315b928bb014a8aeea4c Mon Sep 17 00:00:00 2001
+From: Bernhard Reutner-Fischer <[email protected]>
+Date: Mon, 8 Feb 2016 23:05:23 +0100
+Subject: [PATCH] Replace deprecated SUSv3 functions with POSIX equivalents
+
+Replace the deprecated SUSv3 function index() by its POSIX equivalent
+strchr().
+
+Patch originally from Bernhard Reutner-Fischer
+<[email protected]>.
+
+Signed-off-by: Thomas Petazzoni <[email protected]>
+---
+ config.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/config.c b/config.c
+index bdd0833..d1750ca 100644
+--- a/config.c
++++ b/config.c
+@@ -456,7 +456,7 @@ static char *get_config_filename(const char *name, int add_dot_conf)
+ {
+ 	char *realname;
+ 	
+-	asprintf(&realname, "%s%s%s", index(name, '/') ? "" : "/etc/vpnc/", name, add_dot_conf ? ".conf" : "");
++	asprintf(&realname, "%s%s%s", strchr(name, '/') ? "" : "/etc/vpnc/", name, add_dot_conf ? ".conf" : "");
+ 	return realname;
+ }
+ 
+-- 
+2.6.4
+
package/vpnc/0003-susv3-legacy.patch deleted +0 -12
deleted file mode 100644
index 2e577e3..0000000
@@ -1,12 +0,0 @@
-diff -rdup vpnc-0.5.1.oorig/config.c vpnc-0.5.1/config.c
---- vpnc-0.5.1.oorig/config.c	2007-09-10 22:39:48.000000000 +0200
-+++ vpnc-0.5.1/config.c	2007-09-19 14:19:46.000000000 +0200
-@@ -538,7 +538,7 @@ static char *get_config_filename(const c
- {
- 	char *realname;
- 	
--	asprintf(&realname, "%s%s%s", index(name, '/') ? "" : "/etc/vpnc/", name, add_dot_conf ? ".conf" : "");
-+	asprintf(&realname, "%s%s%s", strchr(name, '/') ? "" : "/etc/vpnc/", name, add_dot_conf ? ".conf" : "");
- 	return realname;
- }
- 
package/vpnc/vpnc.hash +1 -1
index a79df8f..3474057 100644
@@ -1,2 +1,2 @@
 # locally computed hash
-sha256 46cea3bd02f207c62c7c6f2f22133382602baeda1dc320747809e94881414884 vpnc-0.5.3.tar.gz
+sha256 925c8e879f78f1d575b69ee3868b886a0139926ea84c2138a89b9b7d8696f50a vpnc-70f1211f6f26e87e374d66f9a986e855215b8e3e.tar.gz
package/vpnc/vpnc.mk +2 -2
index f5ab5fc..5dfc2ba 100644
@@ -4,8 +4,8 @@
 #
 ################################################################################
 
-VPNC_VERSION = 0.5.3
-VPNC_SITE = http://www.unix-ag.uni-kl.de/~massar/vpnc
+VPNC_VERSION = 70f1211f6f26e87e374d66f9a986e855215b8e3e
+VPNC_SITE = $(call github,ndpgroup,vpnc,$(VPNC_VERSION))
 VPNC_LICENSE = GPLv2+
 VPNC_LICENSE_FILES = COPYING
 
Signature · 1 line
2.6.4
#2 lore raw

PATCH 1/4 vpnc: switch to github as the new site

Thomas, All,

On 2016-02-11 00:03 +0100, Thomas Petazzoni spake thusly:

Quoted 11 lines

The vpnc upstream project has not made any tarball release since many years, but they have continued to update their Subversion repository.

A Github repository synced with the Subversion repository now exists at https://github.com/ndpgroup/vpnc, which is more practical to generate patches and submit pull requests. For this reason, we move to using this Github repository as the new source for the vpnc package. The specific commit that we use corresponds to version 0.5.3 exactly.

Quoted 3 lines

All patches are re-formatted using Git.

70f1211f6f26e87e374d66f9a986e855215b8e3e is indeed 0.5.3

Regards,
Yann E. MORIN.

Quoted 210 lines
---
 ...le-cleanup-and-fix-the-VERSION-definitio.patch} | 24 +++++++++++-----
 package/vpnc/0002-Don-t-build-manpages.patch       | 31 +++++++++++++++++++++
 package/vpnc/0002-nomanual.patch                   | 15 ----------
 ...recated-SUSv3-functions-with-POSIX-equiva.patch | 32 ++++++++++++++++++++++
 package/vpnc/0003-susv3-legacy.patch               | 12 --------
 package/vpnc/vpnc.hash                             |  2 +-
 package/vpnc/vpnc.mk                               |  4 +--
 7 files changed, 83 insertions(+), 37 deletions(-)
 rename package/vpnc/{0001-fix-build.patch => 0001-Misc.-Makefile-cleanup-and-fix-the-VERSION-definitio.patch} (78%)
 create mode 100644 package/vpnc/0002-Don-t-build-manpages.patch
 delete mode 100644 package/vpnc/0002-nomanual.patch
 create mode 100644 package/vpnc/0003-Replace-deprecated-SUSv3-functions-with-POSIX-equiva.patch
 delete mode 100644 package/vpnc/0003-susv3-legacy.patch
package/vpnc/0001-Misc.-Makefile-cleanup-and-fix-the-VERSION-definitio.patch renamed from package/vpnc/0001-fix-build.patch +17 -7
similarity index 78%
rename from package/vpnc/0001-fix-build.patch
rename to package/vpnc/0001-Misc.-Makefile-cleanup-and-fix-the-VERSION-definitio.patch
index e21348b..d091dde 100644
@@ -1,14 +1,21 @@
-Misc. Makefile cleanup and fix the VERSION definition.
+From fd7e584bd28bd541464f8cb6cc72e76de2347640 Mon Sep 17 00:00:00 2001
+From: Samuel Martin <[email protected]>
+Date: Mon, 8 Feb 2016 23:02:45 +0100
+Subject: [PATCH] Misc. Makefile cleanup and fix the VERSION definition.
 
 Signed-off-by: Samuel Martin <[email protected]>
-
+Signed-off-by: Thomas Petazzoni <[email protected]>
 ---
-diff -purN vpnc-0.5.3.orig/Makefile vpnc-0.5.3/Makefile
---- vpnc-0.5.3.orig/Makefile	2012-08-06 00:03:22.677914146 +0200
-+++ vpnc-0.5.3/Makefile	2012-08-06 00:06:58.506744901 +0200
+ Makefile | 40 +++++++++++++++++++---------------------
+ 1 file changed, 19 insertions(+), 21 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 9b96d83..1ca6459 100644
+--- a/Makefile
++++ b/Makefile
 @@ -19,21 +19,19 @@
  #
- # $Id: Makefile 312 2008-06-15 18:09:42Z Joerg Mayer $
+ # $Id$
 
 -DESTDIR=
 -PREFIX=/usr/local
@@ -60,7 +67,7 @@ diff -purN vpnc-0.5.3.orig/Makefile vpnc-0.5.3/Makefile
 
  ifeq ($(shell uname -s), SunOS)
  LDFLAGS += -lnsl -lresolv -lsocket
-@@ -84,7 +82,7 @@ cisco-decrypt : cisco-decrypt.o decrypt-
+@@ -81,7 +79,7 @@ cisco-decrypt : cisco-decrypt.o decrypt-utils.o
  	$(CC) -o $@ $^ $(LDFLAGS)
 
  .depend: $(SRCS) $(BINSRCS)
@@ -69,3 +76,6 @@ diff -purN vpnc-0.5.3.orig/Makefile vpnc-0.5.3/Makefile
 
  vpnc-debug.c vpnc-debug.h : isakmp.h enum2debug.pl
  	LC_ALL=C perl -w ./enum2debug.pl isakmp.h >vpnc-debug.c 2>vpnc-debug.h
+-- 
+2.6.4
+
package/vpnc/0002-Don-t-build-manpages.patch new file +31 -0
new file mode 100644
index 0000000..be4414e
@@ -0,0 +1,31 @@
+From 6bbd03ec8928fd2a3056fc55ee48900fc88d3061 Mon Sep 17 00:00:00 2001
+From: Ulf Samuelsson <[email protected]>
+Date: Mon, 8 Feb 2016 23:03:48 +0100
+Subject: [PATCH] Don't build manpages
+
+Patch originally from Ulf Samuelsson <[email protected]>.
+
+Signed-off-by: Thomas Petazzoni <[email protected]>
+---
+ Makefile | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 1ca6459..857bf8d 100644
+--- a/Makefile
++++ b/Makefile
+@@ -70,7 +70,10 @@ vpnc : $(OBJS) vpnc.o
+ 	$(CC) -o $@ $^ $(LDFLAGS)
+ 
+ vpnc.8 : vpnc.8.template makeman.pl vpnc
+-	./makeman.pl
++	@echo "Cannot make manual when cross compiling"
++	touch $@
++
++#	./makeman.pl
+ 
+ vpnc-script : vpnc-script.in
+ 	sed -e 's,@''PREFIX''@,$(PREFIX),g' $< > $@ && chmod 755 $@
+-- 
+2.6.4
+
package/vpnc/0002-nomanual.patch deleted +0 -15
deleted file mode 100644
index 7f2ea53..0000000
@@ -1,15 +0,0 @@
-diff -urN vpnc-0.5.3-0rig/Makefile vpnc-0.5.3/Makefile
---- vpnc-0.5.3-0rig/Makefile	2008-11-19 21:36:12.000000000 +0100
-+++ vpnc-0.5.3/Makefile	2009-01-15 00:38:36.000000000 +0100
-@@ -72,7 +72,10 @@
- 	$(CC) -o $@ $^ $(LDFLAGS)
- 
- vpnc.8 : vpnc.8.template makeman.pl vpnc
--	./makeman.pl
-+	@echo "Cannot make manual when cross compiling"
-+	touch $@
-+
-+#	./makeman.pl
- 
- vpnc-script : vpnc-script.in
- 	sed -e 's,@''PREFIX''@,$(PREFIX),g' $< > $@ && chmod 755 $@
package/vpnc/0003-Replace-deprecated-SUSv3-functions-with-POSIX-equiva.patch new file +32 -0
new file mode 100644
index 0000000..4b8446f
@@ -0,0 +1,32 @@
+From ca1a9ad59ae07345720e315b928bb014a8aeea4c Mon Sep 17 00:00:00 2001
+From: Bernhard Reutner-Fischer <[email protected]>
+Date: Mon, 8 Feb 2016 23:05:23 +0100
+Subject: [PATCH] Replace deprecated SUSv3 functions with POSIX equivalents
+
+Replace the deprecated SUSv3 function index() by its POSIX equivalent
+strchr().
+
+Patch originally from Bernhard Reutner-Fischer
+<[email protected]>.
+
+Signed-off-by: Thomas Petazzoni <[email protected]>
+---
+ config.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/config.c b/config.c
+index bdd0833..d1750ca 100644
+--- a/config.c
++++ b/config.c
+@@ -456,7 +456,7 @@ static char *get_config_filename(const char *name, int add_dot_conf)
+ {
+ 	char *realname;
+ 	
+-	asprintf(&realname, "%s%s%s", index(name, '/') ? "" : "/etc/vpnc/", name, add_dot_conf ? ".conf" : "");
++	asprintf(&realname, "%s%s%s", strchr(name, '/') ? "" : "/etc/vpnc/", name, add_dot_conf ? ".conf" : "");
+ 	return realname;
+ }
+ 
+-- 
+2.6.4
+
package/vpnc/0003-susv3-legacy.patch deleted +0 -12
deleted file mode 100644
index 2e577e3..0000000
@@ -1,12 +0,0 @@
-diff -rdup vpnc-0.5.1.oorig/config.c vpnc-0.5.1/config.c
---- vpnc-0.5.1.oorig/config.c	2007-09-10 22:39:48.000000000 +0200
-+++ vpnc-0.5.1/config.c	2007-09-19 14:19:46.000000000 +0200
-@@ -538,7 +538,7 @@ static char *get_config_filename(const c
- {
- 	char *realname;
- 	
--	asprintf(&realname, "%s%s%s", index(name, '/') ? "" : "/etc/vpnc/", name, add_dot_conf ? ".conf" : "");
-+	asprintf(&realname, "%s%s%s", strchr(name, '/') ? "" : "/etc/vpnc/", name, add_dot_conf ? ".conf" : "");
- 	return realname;
- }
- 
package/vpnc/vpnc.hash +1 -1
index a79df8f..3474057 100644
@@ -1,2 +1,2 @@
 # locally computed hash
-sha256 46cea3bd02f207c62c7c6f2f22133382602baeda1dc320747809e94881414884 vpnc-0.5.3.tar.gz
+sha256 925c8e879f78f1d575b69ee3868b886a0139926ea84c2138a89b9b7d8696f50a vpnc-70f1211f6f26e87e374d66f9a986e855215b8e3e.tar.gz
package/vpnc/vpnc.mk +2 -2
index f5ab5fc..5dfc2ba 100644
@@ -4,8 +4,8 @@
 #
 ################################################################################
 
-VPNC_VERSION = 0.5.3
-VPNC_SITE = http://www.unix-ag.uni-kl.de/~massar/vpnc
+VPNC_VERSION = 70f1211f6f26e87e374d66f9a986e855215b8e3e
+VPNC_SITE = $(call github,ndpgroup,vpnc,$(VPNC_VERSION))
 VPNC_LICENSE = GPLv2+
 VPNC_LICENSE_FILES = COPYING
 
Signature · 6 lines
2.6.4

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 1/4 vpnc: switch to github as the new site

Hello,

Quoted 14 lines · Yann E. MORIN

Thomas, All,

On 2016-02-11 00:03 +0100, Thomas Petazzoni spake thusly:

Quoted 11 lines

The vpnc upstream project has not made any tarball release since many years, but they have continued to update their Subversion repository.

A Github repository synced with the Subversion repository now exists at https://github.com/ndpgroup/vpnc, which is more practical to generate patches and submit pull requests. For this reason, we move to using this Github repository as the new source for the vpnc package. The specific commit that we use corresponds to version 0.5.3 exactly.

Quoted 7 lines
Quoted 3 lines

All patches are re-formatted using Git.

70f1211f6f26e87e374d66f9a986e855215b8e3e is indeed 0.5.3

Thanks, I've applied the patch!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

PATCH 2/4 vpnc: simplify patch 0001

In reply to Thomas Petazzoni

Patch 0001 that adjusts the Makefile to solve cross-compilation issues does a lot of whitespace changes that are unnecessary. We remove all those noisy changes to keep only the really interesting ones.

---
 ...ile-cleanup-and-fix-the-VERSION-definitio.patch | 60 +++++++---------------
 1 file changed, 19 insertions(+), 41 deletions(-)
package/vpnc/0001-Misc.-Makefile-cleanup-and-fix-the-VERSION-definitio.patch +19 -41
index d091dde..cad3e1a 100644
@@ -1,4 +1,4 @@
-From fd7e584bd28bd541464f8cb6cc72e76de2347640 Mon Sep 17 00:00:00 2001
+From 40b35a82ea581f5dfb1b0b20c4ba3e9f01f35107 Mon Sep 17 00:00:00 2001
 From: Samuel Martin <[email protected]>
 Date: Mon, 8 Feb 2016 23:02:45 +0100
 Subject: [PATCH] Misc. Makefile cleanup and fix the VERSION definition.
@@ -6,39 +6,24 @@ Subject: [PATCH] Misc. Makefile cleanup and fix the VERSION definition.
 Signed-off-by: Samuel Martin <[email protected]>
 Signed-off-by: Thomas Petazzoni <[email protected]>
 ---
- Makefile | 40 +++++++++++++++++++---------------------
- 1 file changed, 19 insertions(+), 21 deletions(-)
+ Makefile | 10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
 
 diff --git a/Makefile b/Makefile
-index 9b96d83..1ca6459 100644
+index 9b96d83..62742d0 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -19,21 +19,19 @@
- #
+@@ -20,7 +20,7 @@
  # $Id$
  
--DESTDIR=
+ DESTDIR=
 -PREFIX=/usr/local
--ETCDIR=/etc/vpnc
--BINDIR=$(PREFIX)/bin
--SBINDIR=$(PREFIX)/sbin
--MANDIR=$(PREFIX)/share/man
--DOCDIR=$(PREFIX)/share/doc/vpnc
--
--SRCS = sysdep.c vpnc-debug.c isakmp-pkt.c tunip.c config.c dh.c math_group.c supp.c decrypt-utils.c
--BINS = vpnc cisco-decrypt
--OBJS = $(addsuffix .o,$(basename $(SRCS)))
-+DESTDIR =
-+PREFIX ?= /usr/local
-+ETCDIR  = /etc/vpnc
-+BINDIR  = $(PREFIX)/bin
-+SBINDIR = $(PREFIX)/sbin
-+MANDIR  = $(PREFIX)/share/man
-+DOCDIR  = $(PREFIX)/share/doc/vpnc
-+
-+SRCS    = sysdep.c vpnc-debug.c isakmp-pkt.c tunip.c config.c dh.c math_group.c supp.c decrypt-utils.c
-+BINS    = vpnc cisco-decrypt
-+OBJS    = $(addsuffix .o,$(basename $(SRCS)))
++PREFIX?=/usr/local
+ ETCDIR=/etc/vpnc
+ BINDIR=$(PREFIX)/bin
+ SBINDIR=$(PREFIX)/sbin
+@@ -32,8 +32,6 @@ BINS = vpnc cisco-decrypt
+ OBJS = $(addsuffix .o,$(basename $(SRCS)))
  BINOBJS = $(addsuffix .o,$(BINS))
  BINSRCS = $(addsuffix .c,$(BINS))
 -VERSION := $(shell sh mk-version)
@@ -46,27 +31,20 @@ index 9b96d83..1ca6459 100644
  
  # The license of vpnc (Gpl >= 2) is quite likely incompatible with the
  # openssl license. Openssl is currently used to provide certificate
-@@ -50,13 +48,13 @@ RELEASE_VERSION := $(shell cat VERSION)
+@@ -50,11 +48,11 @@ RELEASE_VERSION := $(shell cat VERSION)
  #OPENSSL_GPL_VIOLATION = -DOPENSSL_GPL_VIOLATION
  #OPENSSLLIBS = -lcrypto
  
 -CC=gcc
--CFLAGS ?= -O3 -g
--CFLAGS += -W -Wall -Wmissing-declarations -Wwrite-strings
--CFLAGS +=  $(shell libgcrypt-config --cflags)
++CC ?= gcc
+ CFLAGS ?= -O3 -g
+ CFLAGS += -W -Wall -Wmissing-declarations -Wwrite-strings
+ CFLAGS +=  $(shell libgcrypt-config --cflags)
 -CPPFLAGS += -DVERSION=\"$(VERSION)\" $(OPENSSL_GPL_VIOLATION)
--LDFLAGS ?= -g
--LDFLAGS += $(shell libgcrypt-config --libs) $(OPENSSLLIBS)
-+CC       ?= gcc
-+CFLAGS   ?= -O3 -g
-+CFLAGS   += -W -Wall -Wmissing-declarations -Wwrite-strings
-+CFLAGS   += $(shell libgcrypt-config --cflags)
 +CPPFLAGS += $(OPENSSL_GPL_VIOLATION)
-+LDFLAGS  ?= -g
-+LDFLAGS  += $(shell libgcrypt-config --libs) $(OPENSSLLIBS)
+ LDFLAGS ?= -g
+ LDFLAGS += $(shell libgcrypt-config --libs) $(OPENSSLLIBS)
  
- ifeq ($(shell uname -s), SunOS)
- LDFLAGS += -lnsl -lresolv -lsocket
 @@ -81,7 +79,7 @@ cisco-decrypt : cisco-decrypt.o decrypt-utils.o
  	$(CC) -o $@ $^ $(LDFLAGS)
  
Signature · 1 line
2.6.4
#5 lore raw

PATCH 2/4 vpnc: simplify patch 0001

Thomas, All,

On 2016-02-11 00:03 +0100, Thomas Petazzoni spake thusly:

Quoted 5 lines

Patch 0001 that adjusts the Makefile to solve cross-compilation issues does a lot of whitespace changes that are unnecessary. We remove all those noisy changes to keep only the really interesting ones.

Regards,
Yann E. MORIN.

Quoted 107 lines
---
 ...ile-cleanup-and-fix-the-VERSION-definitio.patch | 60 +++++++---------------
 1 file changed, 19 insertions(+), 41 deletions(-)
package/vpnc/0001-Misc.-Makefile-cleanup-and-fix-the-VERSION-definitio.patch +19 -41
index d091dde..cad3e1a 100644
@@ -1,4 +1,4 @@
-From fd7e584bd28bd541464f8cb6cc72e76de2347640 Mon Sep 17 00:00:00 2001
+From 40b35a82ea581f5dfb1b0b20c4ba3e9f01f35107 Mon Sep 17 00:00:00 2001
 From: Samuel Martin <[email protected]>
 Date: Mon, 8 Feb 2016 23:02:45 +0100
 Subject: [PATCH] Misc. Makefile cleanup and fix the VERSION definition.
@@ -6,39 +6,24 @@ Subject: [PATCH] Misc. Makefile cleanup and fix the VERSION definition.
 Signed-off-by: Samuel Martin <[email protected]>
 Signed-off-by: Thomas Petazzoni <[email protected]>
 ---
- Makefile | 40 +++++++++++++++++++---------------------
- 1 file changed, 19 insertions(+), 21 deletions(-)
+ Makefile | 10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
 
 diff --git a/Makefile b/Makefile
-index 9b96d83..1ca6459 100644
+index 9b96d83..62742d0 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -19,21 +19,19 @@
- #
+@@ -20,7 +20,7 @@
  # $Id$
 
--DESTDIR=
+ DESTDIR=
 -PREFIX=/usr/local
--ETCDIR=/etc/vpnc
--BINDIR=$(PREFIX)/bin
--SBINDIR=$(PREFIX)/sbin
--MANDIR=$(PREFIX)/share/man
--DOCDIR=$(PREFIX)/share/doc/vpnc
--
--SRCS = sysdep.c vpnc-debug.c isakmp-pkt.c tunip.c config.c dh.c math_group.c supp.c decrypt-utils.c
--BINS = vpnc cisco-decrypt
--OBJS = $(addsuffix .o,$(basename $(SRCS)))
-+DESTDIR =
-+PREFIX ?= /usr/local
-+ETCDIR  = /etc/vpnc
-+BINDIR  = $(PREFIX)/bin
-+SBINDIR = $(PREFIX)/sbin
-+MANDIR  = $(PREFIX)/share/man
-+DOCDIR  = $(PREFIX)/share/doc/vpnc
-+
-+SRCS    = sysdep.c vpnc-debug.c isakmp-pkt.c tunip.c config.c dh.c math_group.c supp.c decrypt-utils.c
-+BINS    = vpnc cisco-decrypt
-+OBJS    = $(addsuffix .o,$(basename $(SRCS)))
++PREFIX?=/usr/local
+ ETCDIR=/etc/vpnc
+ BINDIR=$(PREFIX)/bin
+ SBINDIR=$(PREFIX)/sbin
+@@ -32,8 +32,6 @@ BINS = vpnc cisco-decrypt
+ OBJS = $(addsuffix .o,$(basename $(SRCS)))
  BINOBJS = $(addsuffix .o,$(BINS))
  BINSRCS = $(addsuffix .c,$(BINS))
 -VERSION := $(shell sh mk-version)
@@ -46,27 +31,20 @@ index 9b96d83..1ca6459 100644
 
  # The license of vpnc (Gpl >= 2) is quite likely incompatible with the
  # openssl license. Openssl is currently used to provide certificate
-@@ -50,13 +48,13 @@ RELEASE_VERSION := $(shell cat VERSION)
+@@ -50,11 +48,11 @@ RELEASE_VERSION := $(shell cat VERSION)
  #OPENSSL_GPL_VIOLATION = -DOPENSSL_GPL_VIOLATION
  #OPENSSLLIBS = -lcrypto
 
 -CC=gcc
--CFLAGS ?= -O3 -g
--CFLAGS += -W -Wall -Wmissing-declarations -Wwrite-strings
--CFLAGS +=  $(shell libgcrypt-config --cflags)
++CC ?= gcc
+ CFLAGS ?= -O3 -g
+ CFLAGS += -W -Wall -Wmissing-declarations -Wwrite-strings
+ CFLAGS +=  $(shell libgcrypt-config --cflags)
 -CPPFLAGS += -DVERSION=\"$(VERSION)\" $(OPENSSL_GPL_VIOLATION)
--LDFLAGS ?= -g
--LDFLAGS += $(shell libgcrypt-config --libs) $(OPENSSLLIBS)
-+CC       ?= gcc
-+CFLAGS   ?= -O3 -g
-+CFLAGS   += -W -Wall -Wmissing-declarations -Wwrite-strings
-+CFLAGS   += $(shell libgcrypt-config --cflags)
 +CPPFLAGS += $(OPENSSL_GPL_VIOLATION)
-+LDFLAGS  ?= -g
-+LDFLAGS  += $(shell libgcrypt-config --libs) $(OPENSSLLIBS)
+ LDFLAGS ?= -g
+ LDFLAGS += $(shell libgcrypt-config --libs) $(OPENSSLLIBS)
 
- ifeq ($(shell uname -s), SunOS)
- LDFLAGS += -lnsl -lresolv -lsocket
 @@ -81,7 +79,7 @@ cisco-decrypt : cisco-decrypt.o decrypt-utils.o
  	$(CC) -o $@ $^ $(LDFLAGS)
 
Signature · 6 lines
2.6.4

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#6 lore raw

PATCH 2/4 vpnc: simplify patch 0001

Hello,

Quoted 10 lines · Yann E. MORIN

Thomas, All,

On 2016-02-11 00:03 +0100, Thomas Petazzoni spake thusly:

Quoted 5 lines

Patch 0001 that adjusts the Makefile to solve cross-compilation issues does a lot of whitespace changes that are unnecessary. We remove all those noisy changes to keep only the really interesting ones.

Thanks, I've applied the patch!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#7 lore raw

PATCH 3/4 vpnc: bump to newer upstream version

In reply to Thomas Petazzoni

While the official upstream has not published any new tarball, they have continued to update their Subversion repository with additional changes. This commit therefore updates the vpnc package to a newer version, using the Github repository that replicates the original Subversion repository.

Since the update required some updates to the patches, we took this opportunity to split them in more fine-grained changes, and document them more properly. Consequently:

- The patch 0001 that fixes the Makefile gets split into 3 patches, 0001, 0002 and 0003, each for one specific issue.

- Patch 0002 to disable building the manpages gets changed into a solution that is potentially upstreamable, and is now patch 0004.

- A new patch 0005 is added to specify a custom libgcrypt-config path, since this tool is now used to know how to link with libgcrypt.

- The SUSv3 function removal patch is now patch 0006, and gains a better commit log.

Also, this vpnc version now depends on gnutls, which basically is a better replacement for OpenSSL, whose support was not enabled by default due to licensing issues (vpnc is under the GPL, which isn't compatible with the OpenSSL license).

---
 ...ile-allow-to-override-the-PREFIX-variable.patch | 32 ++++++++++++
 ...ile-cleanup-and-fix-the-VERSION-definitio.patch | 59 ----------------------
 package/vpnc/0002-Don-t-build-manpages.patch       | 31 ------------
 ...02-Makefile-allow-to-override-the-version.patch | 42 +++++++++++++++
 ...file-allow-passing-custom-CFLAGS-CPPFLAGS.patch | 46 +++++++++++++++++
 ...e-provide-an-option-to-not-build-manpages.patch | 58 +++++++++++++++++++++
 ...low-passing-a-custom-path-to-libgcrypt-co.patch | 41 +++++++++++++++
 ...lace-deprecated-SUSv3-functions-with-POS.patch} | 21 +++++---
 package/vpnc/Config.in                             |  6 +++
 package/vpnc/vpnc.hash                             |  2 +-
 package/vpnc/vpnc.mk                               | 17 +++----
 11 files changed, 247 insertions(+), 108 deletions(-)
 create mode 100644 package/vpnc/0001-Makefile-allow-to-override-the-PREFIX-variable.patch
 delete mode 100644 package/vpnc/0001-Misc.-Makefile-cleanup-and-fix-the-VERSION-definitio.patch
 delete mode 100644 package/vpnc/0002-Don-t-build-manpages.patch
 create mode 100644 package/vpnc/0002-Makefile-allow-to-override-the-version.patch
 create mode 100644 package/vpnc/0003-Makefile-allow-passing-custom-CFLAGS-CPPFLAGS.patch
 create mode 100644 package/vpnc/0004-Makefile-provide-an-option-to-not-build-manpages.patch
 create mode 100644 package/vpnc/0005-Makefile-allow-passing-a-custom-path-to-libgcrypt-co.patch
 rename package/vpnc/{0003-Replace-deprecated-SUSv3-functions-with-POSIX-equiva.patch => 0006-config.c-Replace-deprecated-SUSv3-functions-with-POS.patch} (53%)
package/vpnc/0001-Makefile-allow-to-override-the-PREFIX-variable.patch new file +32 -0
new file mode 100644
index 0000000..5b6df68
@@ -0,0 +1,32 @@
+From 7314d232f8e85879d8f4c311ced44ee5b21fb239 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <[email protected]>
+Date: Wed, 10 Feb 2016 23:26:27 +0100
+Subject: [PATCH] Makefile: allow to override the PREFIX variable
+
+Some people may not want to install in /usr/local, so this commit
+makes it possible to override the PREFIX variable from the make
+command line.
+
+Signed-off-by: Thomas Petazzoni <[email protected]>
+---
+Submitted upstream at https://github.com/ndpgroup/vpnc/pull/6
+
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 69f5aca..f9a6781 100644
+--- a/Makefile
++++ b/Makefile
+@@ -20,7 +20,7 @@
+ # $Id$
+ 
+ DESTDIR=
+-PREFIX=/usr/local
++PREFIX?=/usr/local
+ ETCDIR=/etc/vpnc
+ BINDIR=$(PREFIX)/bin
+ SBINDIR=$(PREFIX)/sbin
+-- 
+2.6.4
+
package/vpnc/0001-Misc.-Makefile-cleanup-and-fix-the-VERSION-definitio.patch deleted +0 -59

59 lines not on this page · raw message

package/vpnc/0002-Don-t-build-manpages.patch deleted +0 -31
deleted file mode 100644
index be4414e..0000000
@@ -1,31 +0,0 @@
-From 6bbd03ec8928fd2a3056fc55ee48900fc88d3061 Mon Sep 17 00:00:00 2001
-From: Ulf Samuelsson <[email protected]>
-Date: Mon, 8 Feb 2016 23:03:48 +0100
-Subject: [PATCH] Don't build manpages
-
-Patch originally from Ulf Samuelsson <[email protected]>.
-
-Signed-off-by: Thomas Petazzoni <[email protected]>
----
- Makefile | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/Makefile b/Makefile
-index 1ca6459..857bf8d 100644
---- a/Makefile
-+++ b/Makefile
-@@ -70,7 +70,10 @@ vpnc : $(OBJS) vpnc.o
- 	$(CC) -o $@ $^ $(LDFLAGS)
- 
- vpnc.8 : vpnc.8.template makeman.pl vpnc
--	./makeman.pl
-+	@echo "Cannot make manual when cross compiling"
-+	touch $@
-+
-+#	./makeman.pl
- 
- vpnc-script : vpnc-script.in
- 	sed -e 's,@''PREFIX''@,$(PREFIX),g' $< > $@ && chmod 755 $@
--- 
-2.6.4
-
package/vpnc/0002-Makefile-allow-to-override-the-version.patch new file +42 -0

42 lines not on this page · raw message

package/vpnc/0003-Makefile-allow-passing-custom-CFLAGS-CPPFLAGS.patch new file +46 -0

46 lines not on this page · raw message

package/vpnc/0004-Makefile-provide-an-option-to-not-build-manpages.patch new file +58 -0

58 lines not on this page · raw message

package/vpnc/0005-Makefile-allow-passing-a-custom-path-to-libgcrypt-co.patch new file +41 -0

41 lines not on this page · raw message

package/vpnc/0006-config.c-Replace-deprecated-SUSv3-functions-with-POS.patch renamed from package/vpnc/0003-Replace-deprecated-SUSv3-functions-with-POSIX-equiva.patch +13 -8
similarity index 53%
rename from package/vpnc/0003-Replace-deprecated-SUSv3-functions-with-POSIX-equiva.patch
rename to package/vpnc/0006-config.c-Replace-deprecated-SUSv3-functions-with-POS.patch
index 4b8446f..bad8118 100644
@@ -1,27 +1,32 @@
-From ca1a9ad59ae07345720e315b928bb014a8aeea4c Mon Sep 17 00:00:00 2001
+From 627a45d88acf236cb36326919e4a2fa975c688bd Mon Sep 17 00:00:00 2001
 From: Bernhard Reutner-Fischer <[email protected]>
 Date: Mon, 8 Feb 2016 23:05:23 +0100
-Subject: [PATCH] Replace deprecated SUSv3 functions with POSIX equivalents
+Subject: [PATCH] config.c: Replace deprecated SUSv3 functions with POSIX
+ equivalents
 
 Replace the deprecated SUSv3 function index() by its POSIX equivalent
-strchr().
+strchr(). This is necessary to successfully build vpnc with uClibc,
+when SUSv3 compatibility functions are not compiled in.
 
 Patch originally from Bernhard Reutner-Fischer
 <[email protected]>.
 
 Signed-off-by: Thomas Petazzoni <[email protected]>
 ---
- config.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+Submitted upstream at https://github.com/ndpgroup/vpnc/pull/6
+
+ config.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
 
 diff --git a/config.c b/config.c
-index bdd0833..d1750ca 100644
+index 57778e3..11b363b 100644
 --- a/config.c
 +++ b/config.c
-@@ -456,7 +456,7 @@ static char *get_config_filename(const char *name, int add_dot_conf)
+@@ -657,8 +657,7 @@ static const struct config_names_s {
+ static char *get_config_filename(const char *name, int add_dot_conf)
  {
  	char *realname;
- 	
+-
 -	asprintf(&realname, "%s%s%s", index(name, '/') ? "" : "/etc/vpnc/", name, add_dot_conf ? ".conf" : "");
 +	asprintf(&realname, "%s%s%s", strchr(name, '/') ? "" : "/etc/vpnc/", name, add_dot_conf ? ".conf" : "");
  	return realname;
package/vpnc/Config.in +6 -0
index bc27331..caf8c20 100644
@@ -1,8 +1,10 @@
 config BR2_PACKAGE_VPNC
 	bool "vpnc"
 	depends on BR2_USE_MMU # fork()
+	depends on BR2_USE_WCHAR
 	select BR2_PACKAGE_LIBGCRYPT
 	select BR2_PACKAGE_LIBGPG_ERROR
+	select BR2_PACKAGE_GNUTLS
 	help
 	  Client for Cisco VPN concentrator
 	  3000 Series VPN Concentrator
@@ -11,3 +13,7 @@ config BR2_PACKAGE_VPNC
 	  Juniper/Netscreen
 
 	  http://www.unix-ag.uni-kl.de/~massar/vpnc
+
+commit "vpnc needs a toolchain w/ wchar"
+	depends on BR2_USE_MMU
+	depends on !BR2_USE_WCHAR
package/vpnc/vpnc.hash +1 -1
index 3474057..c35f0d5 100644
@@ -1,2 +1,2 @@
 # locally computed hash
-sha256 925c8e879f78f1d575b69ee3868b886a0139926ea84c2138a89b9b7d8696f50a vpnc-70f1211f6f26e87e374d66f9a986e855215b8e3e.tar.gz
+sha256 d71ae6a6c2801c6c21490227d29896ea75deade05fc38153de9ae07b25a6a60d  vpnc-024aa17a0a86716cac0db185b44bf07ba4f8c135.tar.gz
package/vpnc/vpnc.mk +8 -9
index 5dfc2ba..62dedc6 100644
@@ -4,24 +4,23 @@
 #
 ################################################################################
 
-VPNC_VERSION = 70f1211f6f26e87e374d66f9a986e855215b8e3e
+VPNC_VERSION = 024aa17a0a86716cac0db185b44bf07ba4f8c135
 VPNC_SITE = $(call github,ndpgroup,vpnc,$(VPNC_VERSION))
 VPNC_LICENSE = GPLv2+
 VPNC_LICENSE_FILES = COPYING
 
-VPNC_DEPENDENCIES = libgcrypt libgpg-error
-
-VPNC_LDFLAGS = $(TARGET_LDFLAGS) -lgcrypt -lgpg-error
-VPNC_CPPFLAGS = -DVERSION=\\\"$(VPNC_VERSION)\\\"
+VPNC_DEPENDENCIES = libgcrypt libgpg-error gnutls host-pkgconf
 
 define VPNC_BUILD_CMDS
-	$(MAKE)	-C $(@D) $(TARGET_CONFIGURE_OPTS) \
-		CPPFLAGS="$(VPNC_CPPFLAGS)" LDFLAGS="$(VPNC_LDFLAGS)"
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
+		$(TARGET_CONFIGURE_OPTS) \
+		LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config \
+		VERSION=$(VPNC_VERSION) MANS=
 endef
 
 define VPNC_INSTALL_TARGET_CMDS
-	$(MAKE) -C $(@D) install $(TARGET_CONFIGURE_OPTS) \
-		CPPFLAGS="$(VPNC_CPPFLAGS)" LDFLAGS="$(VPNC_LDFLAGS)" \
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install $(TARGET_CONFIGURE_OPTS) \
+		VERSION=$(VPNC_VERSION) MANS= \
 		DESTDIR="$(TARGET_DIR)" PREFIX=/usr
 endef
 
Signature · 1 line
2.6.4
#8 lore raw

PATCH 3/4 vpnc: bump to newer upstream version

Thomas, All,

On 2016-02-11 00:03 +0100, Thomas Petazzoni spake thusly:

Quoted 23 lines

While the official upstream has not published any new tarball, they have continued to update their Subversion repository with additional changes. This commit therefore updates the vpnc package to a newer version, using the Github repository that replicates the original Subversion repository.

Since the update required some updates to the patches, we took this opportunity to split them in more fine-grained changes, and document them more properly. Consequently:

- The patch 0001 that fixes the Makefile gets split into 3 patches, 0001, 0002 and 0003, each for one specific issue.

- Patch 0002 to disable building the manpages gets changed into a solution that is potentially upstreamable, and is now patch 0004.

- A new patch 0005 is added to specify a custom libgcrypt-config path, since this tool is now used to know how to link with libgcrypt.

- The SUSv3 function removal patch is now patch 0006, and gains a better commit log.

Quoted 7 lines

Also, this vpnc version now depends on gnutls, which basically is a better replacement for OpenSSL, whose support was not enabled by default due to licensing issues (vpnc is under the GPL, which isn't compatible with the OpenSSL license).

---

[--SNIP--]

Quoted 8 lines
package/vpnc/0001-Makefile-allow-to-override-the-PREFIX-variable.patch new file +2 -0
new file mode 100644
index 0000000..5b6df68
@@ -0,0 +1,32 @@
+From 7314d232f8e85879d8f4c311ced44ee5b21fb239 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <[email protected]>

package/vpnc/0001-Makefile-allow-to-override-the-PREFIX-variable.patch line 12

Quoted 10 lines
package/vpnc/0001-Makefile-allow-to-override-the-PREFIX-variable.patch new file +10 -0
+Date: Wed, 10 Feb 2016 23:26:27 +0100
+Subject: [PATCH] Makefile: allow to override the PREFIX variable
+
+Some people may not want to install in /usr/local, so this commit
+makes it possible to override the PREFIX variable from the make
+command line.
+
+Signed-off-by: Thomas Petazzoni <[email protected]>
+---
+Submitted upstream at https://github.com/ndpgroup/vpnc/pull/6

There has been a comment to request the patches be mailed to the "real" upstream, and the PR was closed.

[--SNIP--]

package/vpnc/Config.in line 4

Quoted 9 lines
package/vpnc/Config.in +1 -0
index bc27331..caf8c20 100644
@@ -1,8 +1,10 @@
 config BR2_PACKAGE_VPNC
 	bool "vpnc"
 	depends on BR2_USE_MMU # fork()
+	depends on BR2_USE_WCHAR

Is it because of gnutls, or does vpnc requires it for itself? If the former, you forgot the associated comment:

depends on BR2_USE_WCHAR # gnutls

package/vpnc/Config.in config BR2_PACKAGE_VPNC · line 17

Quoted 12 lines
package/vpnc/Config.in +3 -0
 	select BR2_PACKAGE_LIBGCRYPT
 	select BR2_PACKAGE_LIBGPG_ERROR
+	select BR2_PACKAGE_GNUTLS
 	help
 	  Client for Cisco VPN concentrator
 	  3000 Series VPN Concentrator
@@ -11,3 +13,7 @@ config BR2_PACKAGE_VPNC
 	  Juniper/Netscreen
 
 	  http://www.unix-ag.uni-kl.de/~massar/vpnc
+
+commit "vpnc needs a toolchain w/ wchar"

Nope, this is not a commit; this is a comment. ;-)

Regards,
Yann E. MORIN.

Quoted 54 lines
package/vpnc/Config.in +2 -0
+	depends on BR2_USE_MMU
+	depends on !BR2_USE_WCHAR
package/vpnc/vpnc.hash +1 -1
index 3474057..c35f0d5 100644
@@ -1,2 +1,2 @@
 # locally computed hash
-sha256 925c8e879f78f1d575b69ee3868b886a0139926ea84c2138a89b9b7d8696f50a vpnc-70f1211f6f26e87e374d66f9a986e855215b8e3e.tar.gz
+sha256 d71ae6a6c2801c6c21490227d29896ea75deade05fc38153de9ae07b25a6a60d  vpnc-024aa17a0a86716cac0db185b44bf07ba4f8c135.tar.gz
package/vpnc/vpnc.mk +8 -9
index 5dfc2ba..62dedc6 100644
@@ -4,24 +4,23 @@
 #
 ################################################################################
 
-VPNC_VERSION = 70f1211f6f26e87e374d66f9a986e855215b8e3e
+VPNC_VERSION = 024aa17a0a86716cac0db185b44bf07ba4f8c135
 VPNC_SITE = $(call github,ndpgroup,vpnc,$(VPNC_VERSION))
 VPNC_LICENSE = GPLv2+
 VPNC_LICENSE_FILES = COPYING
 
-VPNC_DEPENDENCIES = libgcrypt libgpg-error
-
-VPNC_LDFLAGS = $(TARGET_LDFLAGS) -lgcrypt -lgpg-error
-VPNC_CPPFLAGS = -DVERSION=\\\"$(VPNC_VERSION)\\\"
+VPNC_DEPENDENCIES = libgcrypt libgpg-error gnutls host-pkgconf
 
 define VPNC_BUILD_CMDS
-	$(MAKE)	-C $(@D) $(TARGET_CONFIGURE_OPTS) \
-		CPPFLAGS="$(VPNC_CPPFLAGS)" LDFLAGS="$(VPNC_LDFLAGS)"
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
+		$(TARGET_CONFIGURE_OPTS) \
+		LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config \
+		VERSION=$(VPNC_VERSION) MANS=
 endef
 
 define VPNC_INSTALL_TARGET_CMDS
-	$(MAKE) -C $(@D) install $(TARGET_CONFIGURE_OPTS) \
-		CPPFLAGS="$(VPNC_CPPFLAGS)" LDFLAGS="$(VPNC_LDFLAGS)" \
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install $(TARGET_CONFIGURE_OPTS) \
+		VERSION=$(VPNC_VERSION) MANS= \
 		DESTDIR="$(TARGET_DIR)" PREFIX=/usr
 endef
 
Signature · 6 lines
2.6.4

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#9 lore raw

PATCH 3/4 vpnc: bump to newer upstream version

Hello,

Quoted 4 lines · Yann E. MORIN
Quoted 1 line

+Submitted upstream at https://github.com/ndpgroup/vpnc/pull/6

There has been a comment to request the patches be mailed to the "real" upstream, and the PR was closed.

I submitted upstream:
http://lists.unix-ag.uni-kl.de/pipermail/vpnc-devel/2016-June/004186.html.

Quoted 5 lines

package/vpnc/Config.in line 4

Quoted 2 lines
package/vpnc/Config.in +1 -0
 	depends on BR2_USE_MMU # fork()
+	depends on BR2_USE_WCHAR  

Is it because of gnutls, or does vpnc requires it for itself? If the former, you forgot the associated comment:

Because of gnutls, so I've added the comment.

Quoted 3 lines
Quoted 1 line

+commit "vpnc needs a toolchain w/ wchar"

Nope, this is not a commit; this is a comment. ;-)

Fixed. I've applied with those changes.

Thanks for the review!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#10 lore raw

PATCH 4/4 vpnc: add patches to fix build with the musl C library

In reply to Thomas Petazzoni

This commit adds hree patches that are needed to fix build issues on musl:

- <error.h> not available on musl
- structure redefinitions due to direct inclusion of kernel headers
- missing <sys/ttydefaults.h> inclusion

---
 ...n-t-assume-error.h-is-available-on-all-Li.patch | 54 +++++++++++++++++++++
 ...p.c-don-t-include-linux-if_tun.h-on-Linux.patch | 56 ++++++++++++++++++++++
 ...g.c-add-missing-sys-ttydefaults.h-include.patch | 38 +++++++++++++++
 3 files changed, 148 insertions(+)
 create mode 100644 package/vpnc/0007-sysdep.h-don-t-assume-error.h-is-available-on-all-Li.patch
 create mode 100644 package/vpnc/0008-sysdep.c-don-t-include-linux-if_tun.h-on-Linux.patch
 create mode 100644 package/vpnc/0009-config.c-add-missing-sys-ttydefaults.h-include.patch
package/vpnc/0007-sysdep.h-don-t-assume-error.h-is-available-on-all-Li.patch new file +54 -0
new file mode 100644
index 0000000..b08eedc
@@ -0,0 +1,54 @@
+From 7f41ef32c8c887ee23ca83da4dfd7a4f27e01186 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <[email protected]>
+Date: Wed, 10 Feb 2016 23:09:51 +0100
+Subject: [PATCH] sysdep.h: don't assume <error.h> is available on all Linux
+ platforms
+
+The current logic in sysdep.h assumes that whenever you have __linux__
+or __GLIBC__ defined, then <error.h> functionality is
+available. However, the <error.h> functionality is a glibc-ism, not
+available in more standard-conformant C libraries such as the musl C
+library. With musl, __linux__ is defined (but of course not
+__GLIBC__). With the current logic, sysdep.h assumes that <error.h> is
+available, which isn't the case.
+
+This patch therefore changes the logic to only use <error.h> when
+__GLIBC__ is defined. It fixes the following build error:
+
+In file included from tunip.c:87:0:
+sysdep.h:41:19: fatal error: error.h: No such file or directory
+ #include <error.h>
+
+Original patch from
+http://git.alpinelinux.org/cgit/aports/tree/testing/vpnc/working.patch.
+
+Signed-off-by: Thomas Petazzoni <[email protected]>
+---
+Submitted upstream at https://github.com/ndpgroup/vpnc/pull/6
+
+ sysdep.h | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/sysdep.h b/sysdep.h
+index 137bf6d..fb65b31 100644
+--- a/sysdep.h
++++ b/sysdep.h
+@@ -38,11 +38,14 @@ int tun_get_hwaddr(int fd, char *dev, uint8_t *hwaddr);
+ 
+ /***************************************************************************/
+ #if defined(__linux__) || defined(__GLIBC__)
++
++#ifdef __GLIBC__
+ #include <error.h>
++#define HAVE_ERROR     1
++#endif
+ 
+ #define HAVE_VASPRINTF 1
+ #define HAVE_ASPRINTF  1
+-#define HAVE_ERROR     1
+ #define HAVE_UNSETENV  1
+ #define HAVE_SETENV    1
+ #endif
+-- 
+2.6.4
+
package/vpnc/0008-sysdep.c-don-t-include-linux-if_tun.h-on-Linux.patch new file +56 -0

56 lines not on this page · raw message

package/vpnc/0009-config.c-add-missing-sys-ttydefaults.h-include.patch new file +38 -0
new file mode 100644
index 0000000..2b87c9a
@@ -0,0 +1,38 @@
+From 17277915af703a4767de791916621d8f59aef516 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <[email protected]>
+Date: Wed, 10 Feb 2016 23:21:26 +0100
+Subject: [PATCH] config.c: add missing <sys/ttydefaults.h> include
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This include is needed to get the definition of CEOT, otherwise the
+build fails with:
+
+config.c: In function ?vpnc_getline?:
+config.c:145:25: error: ?CEOT? undeclared (first use in this function)
+   if (llen == 0 && c == CEOT)
+                         ^
+
+Signed-off-by: Thomas Petazzoni <[email protected]>
+---
+Submitted upstream at https://github.com/ndpgroup/vpnc/pull/6
+
+ config.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/config.c b/config.c
+index 11b363b..f47a534 100644
+--- a/config.c
++++ b/config.c
+@@ -31,6 +31,7 @@
+ #include <sys/types.h>
+ #include <sys/utsname.h>
+ #include <sys/wait.h>
++#include <sys/ttydefaults.h>
+ 
+ #include <gcrypt.h>
+ 
+-- 
+2.6.4
+
Signature · 1 line
2.6.4
author Applied
#11 lore raw

PATCH 4/4 vpnc: add patches to fix build with the musl C library

Hello,

Quoted 8 lines · Thomas Petazzoni

This commit adds hree patches that are needed to fix build issues on musl:

- <error.h> not available on musl
- structure redefinitions due to direct inclusion of kernel headers
- missing <sys/ttydefaults.h> inclusion

Quoted 8 lines
---
 ...n-t-assume-error.h-is-available-on-all-Li.patch | 54 +++++++++++++++++++++
 ...p.c-don-t-include-linux-if_tun.h-on-Linux.patch | 56 ++++++++++++++++++++++
 ...g.c-add-missing-sys-ttydefaults.h-include.patch | 38 +++++++++++++++
 3 files changed, 148 insertions(+)
 create mode 100644 package/vpnc/0007-sysdep.h-don-t-assume-error.h-is-available-on-all-Li.patch
 create mode 100644 package/vpnc/0008-sysdep.c-don-t-include-linux-if_tun.h-on-Linux.patch
 create mode 100644 package/vpnc/0009-config.c-add-missing-sys-ttydefaults.h-include.patch

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com