[arch-commits] Commit in vde2/trunk (5 files)

David Runge dvzrv at gemini.archlinux.org
Thu Apr 7 18:29:48 UTC 2022


    Date: Thursday, April 7, 2022 @ 18:29:48
  Author: dvzrv
Revision: 441721

upgpkg: vde2 2.3.2-21: Rebuild to add debug package.

Streamline patches and naming.
Simplify calls to make and installation.
Add debug package.
Update maintainer info.

Added:
  vde2/trunk/vde2-2.3.2-format-security.patch
  vde2/trunk/vde2-2.3.2-openssl-1.1.patch
    (from rev 441720, vde2/trunk/vde_cryptcab-compile-against-openssl-1.1.0.patch)
Modified:
  vde2/trunk/PKGBUILD
Deleted:
  vde2/trunk/format-security.patch
  vde2/trunk/vde_cryptcab-compile-against-openssl-1.1.0.patch

--------------------------------------------------+
 PKGBUILD                                         |   74 +++++++++-------
 format-security.patch                            |   33 -------
 vde2-2.3.2-format-security.patch                 |   31 +++++++
 vde2-2.3.2-openssl-1.1.patch                     |   92 +++++++++++++++++++++
 vde_cryptcab-compile-against-openssl-1.1.0.patch |   92 ---------------------
 5 files changed, 166 insertions(+), 156 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-04-07 18:26:08 UTC (rev 441720)
+++ PKGBUILD	2022-04-07 18:29:48 UTC (rev 441721)
@@ -1,52 +1,64 @@
+# Maintainer: David Runge <dvzrv at archlinux.org>
+# Maintainer: Tobias Powalowski <tpowa at archlinux.org>
 # Contributor: Sergej Pupykin
-# Maintainer: Tobias Powalowski <tpowa at archlinux.org>
+
 pkgname=vde2
 pkgver=2.3.2
-pkgrel=20
+pkgrel=21
 pkgdesc="Virtual Distributed Ethernet for emulators like qemu"
+arch=(x86_64)
 url="https://github.com/virtualsquare/vde-2"
-license=("GPL" "LGPL" "CUSTOM")
-arch=('x86_64')
-depends=('bash' 'libpcap' 'openssl')
-makedepends=('python')
-source=(https://downloads.sourceforge.net/vde/$pkgname-$pkgver.tar.bz2
-        vde_cryptcab-compile-against-openssl-1.1.0.patch
-        dhcpd.conf.sample
-        iptables.rules.sample
-        vde-config.sample
-        vde-connection.sample
-        format-security.patch)
+license=(GPL2 LGPL2.1 BSD)
+depends=(bash libpcap openssl)
+source=(
+  https://downloads.sourceforge.net/vde/$pkgname-$pkgver.tar.bz2
+  dhcpd.conf.sample
+  iptables.rules.sample
+  vde-config.sample
+  vde-connection.sample
+  vde2-2.3.2-openssl-1.1.patch
+  vde2-2.3.2-format-security.patch
+)
 install=vde2.install
-options=(!makeflags)
+options=(debug)
 sha256sums=('cbea9b7e03097f87a6b5e98b07890d2275848f1fe4b9fcda77b8994148bc9542'
-            '110370a5f48f1e241d43f8bb5e3ea6d2ca7d2c1949e1cf672d03bfc897f2e11f'
             'da0e2766dc63069da929c28126831ad5fdddcc4a04105a21217d78832c7ca1bc'
             '99076d7466cd99673dbe91ef83865187e7868177959b38e125df63eea957f83e'
             '5727c215646333c37b26388146cd3e6b3814b88d60d54051d7da99e00c0aef87'
             '5139110ed6d5d1174bf12971512dac5196d9d07df46dd393d7b1cd083118fe9b'
-            'a3207c93c4be4848e09a0b8618dcdc4e9d88a99153e95d3fcdd690efa6237a79')
+            '110370a5f48f1e241d43f8bb5e3ea6d2ca7d2c1949e1cf672d03bfc897f2e11f'
+            'af087758609338365b9f331c498e330fc67efdac6d0dd9ce699e2bd1645e52b5')
+b2sums=('6c4900578b992eff914136f29395a822bc52945906d291eee78b3bf7cb806bbf4d8ebeec2080daa10923e98b648d071ce1f846214143e4dce749da9be8b48990'
+        '95687f7a895e48be47bf183de011d6e10c0bb48a32fa99635dc82aac517c0c9646cf2044136b2d2a1667e617cb4fd7d7b7c44e7410fb13fcb1aa20f1bfb2c319'
+        'f5900923b47eff8438525346531205a8034ae462cea4a6ee519497f2baa37eaef90c7d200ffa6965b2545082ef1f04da3995f6385feeefe4ba362c000f1097c7'
+        '4f78982013168cac4ed57a006fb99e3de4b22b225a0874dbe9287c96a6ba8ebdd0d72e6e1f387fe41684f29c5e4a73e6ddda981f8f03d5b85008f876fb59f43d'
+        '9bda749135c87a6cf0621e7ee09718ecc4e647732a986de127c2ab6675f7674fc298e2bf84753f967f98b71afd104a8f87df4d7b7fccd4cba3988a75210c5e2f'
+        '6681dec01d1d2df3375685117e6d597998605e65fdbd40b52390c99b583e54332c94dfbd35fb023b9bbdfa441bbd269fcde2a14fbccdf710973184696abaef23'
+        '7345ac269e243939ef6ce3104932c14c4718e7c812b4249a5bb3484c9dd4913ddeb90e567a61e2990de9d28d1dbdad40997f040d7f2daa597aaf8a9184af0a74')
 
 prepare() {
-  cd $pkgname-$pkgver
-  patch -Np1 -i ../vde_cryptcab-compile-against-openssl-1.1.0.patch
-# Fix format-security build errors
-  patch -p2 -i ../format-security.patch
+  # allow compilation with openssl 1.1
+  patch -Np1 -d $pkgname-$pkgver -i ../vde2-2.3.2-openssl-1.1.patch
+  # Fix format-security build errors
+  patch -Np1 -d $pkgname-$pkgver -i ../vde2-2.3.2-format-security.patch
 }
 
 build() {
   cd $pkgname-$pkgver
-  ./configure --prefix=/usr --sbindir=/usr/bin --sysconfdir=/etc --libexecdir=/usr/lib/vde2 \
-             --enable-experimental
-  make
+  ./configure --prefix=/usr \
+    --sbindir=/usr/bin \
+    --sysconfdir=/etc \
+    --libexecdir=/usr/lib/vde2 \
+    --enable-experimental \
+    --disable-python
+  # NOTE: build can not be parallelized
+  make -j1
 }
 
 package() {
-  cd $pkgname-$pkgver 
-  make prefix="$pkgdir/usr" sysconfdir="$pkgdir/etc" sbindir="$pkgdir/usr/bin" libexecdir="$pkgdir/usr/lib/vde2" install
-  install -D -m 644 ../vde-config.sample "$pkgdir"/etc/vde/vde-config.sample
-  install -D -m 644 ../vde-connection.sample "$pkgdir"/etc/vde/vde-connection.sample
-  install -D -m 644 ../dhcpd.conf.sample "$pkgdir"/usr/share/vde2/dhcpd.conf.sample
-  install -D -m 644 ../iptables.rules.sample "$pkgdir"/usr/share/vde2/iptables.rules.sample
-  # install slirp license
-  install -D -m 644 COPYING.slirpvde "$pkgdir"/usr/share/licenses/vde2/COPYING.slirpvde
+  make DESTDIR="$pkgdir" install -C $pkgname-$pkgver
+  install -Dm 644 vde-{config,connection}.sample -t "$pkgdir/etc/vde/"
+  install -Dm 644 {dhcpd.conf,iptables.rules}.sample -t "$pkgdir/usr/share/vde2/"
+  # install slirpvde license
+  install -Dm 644 $pkgname-$pkgver/COPYING.slirpvde -t "$pkgdir/usr/share/licenses/$pkgname/"
 }

Deleted: format-security.patch
===================================================================
--- format-security.patch	2022-04-07 18:26:08 UTC (rev 441720)
+++ format-security.patch	2022-04-07 18:29:48 UTC (rev 441721)
@@ -1,33 +0,0 @@
-diff --git a/vde-2/src/vde_switch/plugins/iplog.c b/vde-2/src/vde_switch/plugins/iplog.c
-index dc2ad54..3bb113c 100644
---- a/vde-2/src/vde_switch/plugins/iplog.c
-+++ b/vde-2/src/vde_switch/plugins/iplog.c
-@@ -214,7 +214,7 @@ static void ip_find_in_hash_update(int len, unsigned char *addr, unsigned char *
- 				ctime_r(&ntime,stime);
- 				writev(logfilefd,iov,3);
- 			} else if (logfilefd != -1) 
--				syslog(LOG_INFO, msg);
-+				syslog(LOG_INFO, "%s", msg);
- 			DBGOUT(D_LOGIP_NEWIP,"%s",msg);
- 		}
- 	}
-diff --git a/vde-2/src/common/cmdparse.c b/vde-2/src/common/cmdparse.c
-index 05186d7..db349c7 100644
---- a/vde-2/src/common/cmdparse.c
-+++ b/vde-2/src/common/cmdparse.c
-@@ -284,13 +284,13 @@ int utm_run(struct utm *utm, struct utm_buf *buf, int fd, int argc, char **argv,
- 								int i;
- 								for (i=0;i<argc;i++) {
- 									if (i) fprintf(mf," ");
--									fprintf(mf,argv[i]);
-+									fprintf(mf, "%s", argv[i]);
- 								}
- 							} else {
- 								int num=atoi(t);
- 								while (*t >='0' && *t <= '9') t++;
- 								if (num < argc) 
--									fprintf(mf,argv[num]);
-+									fprintf(mf, "%s", argv[num]);
- 							}
- 						} else
- 							fprintf(mf,"%c",*t);

Added: vde2-2.3.2-format-security.patch
===================================================================
--- vde2-2.3.2-format-security.patch	                        (rev 0)
+++ vde2-2.3.2-format-security.patch	2022-04-07 18:29:48 UTC (rev 441721)
@@ -0,0 +1,31 @@
+diff -ruN a/src/common/cmdparse.c b/src/common/cmdparse.c
+--- a/src/common/cmdparse.c	2011-11-23 17:41:14.000000000 +0100
++++ b/src/common/cmdparse.c	2022-04-07 20:03:30.871180660 +0200
+@@ -284,13 +284,13 @@
+ 								int i;
+ 								for (i=0;i<argc;i++) {
+ 									if (i) fprintf(mf," ");
+-									fprintf(mf,argv[i]);
++									fprintf(mf, "%s", argv[i]);
+ 								}
+ 							} else {
+ 								int num=atoi(t);
+ 								while (*t >='0' && *t <= '9') t++;
+ 								if (num < argc) 
+-									fprintf(mf,argv[num]);
++									fprintf(mf, "%s", argv[num]);
+ 							}
+ 						} else
+ 							fprintf(mf,"%c",*t);
+diff -ruN a/src/vde_switch/plugins/iplog.c b/src/vde_switch/plugins/iplog.c
+--- a/src/vde_switch/plugins/iplog.c	2011-11-23 17:41:16.000000000 +0100
++++ b/src/vde_switch/plugins/iplog.c	2022-04-07 20:03:30.871180660 +0200
+@@ -214,7 +214,7 @@
+ 				ctime_r(&ntime,stime);
+ 				writev(logfilefd,iov,3);
+ 			} else if (logfilefd != -1) 
+-				syslog(LOG_INFO, msg);
++				syslog(LOG_INFO, "%s", msg);
+ 			DBGOUT(D_LOGIP_NEWIP,"%s",msg);
+ 		}
+ 	}

Copied: vde2/trunk/vde2-2.3.2-openssl-1.1.patch (from rev 441720, vde2/trunk/vde_cryptcab-compile-against-openssl-1.1.0.patch)
===================================================================
--- vde2-2.3.2-openssl-1.1.patch	                        (rev 0)
+++ vde2-2.3.2-openssl-1.1.patch	2022-04-07 18:29:48 UTC (rev 441721)
@@ -0,0 +1,92 @@
+--- a/src/vde_cryptcab/cryptcab.c	2011-11-23 16:41:17.000000000 +0000
++++ b/src/vde_cryptcab/cryptcab.c	2017-03-20 22:54:20.452975075 +0000
+@@ -22,7 +22,7 @@
+ 	exit(1);
+ }
+ 	
+-static EVP_CIPHER_CTX ctx;
++static EVP_CIPHER_CTX *ctx;
+ static int ctx_initialized = 0;
+ static int encryption_disabled = 0;
+ static int nfd;
+@@ -30,6 +30,10 @@
+ static struct vde_open_args open_args={.port=0,.group=NULL,.mode=0700};
+ static int verbose = 0;
+ 
++#if OPENSSL_VERSION_NUMBER < 0x10100000
++#define EVP_CIPHER_CTX_reset(x)	EVP_CIPHER_CTX_cleanup(x)
++#endif
++
+ void vc_printlog(int priority, const char *format, ...)
+ {
+ 	va_list arg;
+@@ -103,19 +107,21 @@
+ 	}
+ 
+ 	if (!ctx_initialized) {
+-		EVP_CIPHER_CTX_init (&ctx);
++		ctx = EVP_CIPHER_CTX_new ();
++		if (!ctx)
++			return -1;
+ 		ctx_initialized = 1;
+ 	}
+ 	
+-	EVP_EncryptInit (&ctx, EVP_bf_cbc (), p->key, p->iv);
+-	if (EVP_EncryptUpdate (&ctx, dst, &olen, src, len) != 1)
++	EVP_EncryptInit (ctx, EVP_bf_cbc (), p->key, p->iv);
++	if (EVP_EncryptUpdate (ctx, dst, &olen, src, len) != 1)
+ 	{
+ 		fprintf (stderr,"error in encrypt update\n");
+ 		olen = -1;
+ 		goto cleanup;
+ 	}
+ 
+-	if (EVP_EncryptFinal (&ctx, dst + olen, &tlen) != 1)
++	if (EVP_EncryptFinal (ctx, dst + olen, &tlen) != 1)
+ 	{
+ 		fprintf (stderr,"error in encrypt final\n");
+ 		olen = -1;
+@@ -124,7 +130,7 @@
+ 	olen += tlen;
+ 
+ cleanup:
+-	EVP_CIPHER_CTX_cleanup(&ctx);	
++	EVP_CIPHER_CTX_reset(ctx);
+ 	return olen;
+ }
+ 
+@@ -138,19 +144,21 @@
+ 	}
+ 	
+ 	if (!ctx_initialized) {
+-		EVP_CIPHER_CTX_init (&ctx);
++		ctx = EVP_CIPHER_CTX_new ();
++		if (!ctx)
++			return -1;
+ 		ctx_initialized = 1;
+ 	}
+ 
+-	EVP_DecryptInit (&ctx, EVP_bf_cbc (), p->key, p->iv);
+-	if (EVP_DecryptUpdate (&ctx, dst, &olen, src, len) != 1)
++	EVP_DecryptInit (ctx, EVP_bf_cbc (), p->key, p->iv);
++	if (EVP_DecryptUpdate (ctx, dst, &olen, src, len) != 1)
+ 	{
+ 		fprintf (stderr,"error in decrypt update\n");
+ 		olen = -1;
+ 		goto cleanup;
+ 	}
+ 
+-	if (EVP_DecryptFinal (&ctx, dst + olen, &tlen) != 1)
++	if (EVP_DecryptFinal (ctx, dst + olen, &tlen) != 1)
+ 	{
+ 		fprintf (stderr,"error in decrypt final\n");
+ 		olen = -1;
+@@ -159,7 +167,7 @@
+ 	olen += tlen;
+ 
+ cleanup:
+-	EVP_CIPHER_CTX_cleanup(&ctx);	
++	EVP_CIPHER_CTX_reset (ctx);
+ 	return olen;
+ }
+ 

Deleted: vde_cryptcab-compile-against-openssl-1.1.0.patch
===================================================================
--- vde_cryptcab-compile-against-openssl-1.1.0.patch	2022-04-07 18:26:08 UTC (rev 441720)
+++ vde_cryptcab-compile-against-openssl-1.1.0.patch	2022-04-07 18:29:48 UTC (rev 441721)
@@ -1,92 +0,0 @@
---- a/src/vde_cryptcab/cryptcab.c	2011-11-23 16:41:17.000000000 +0000
-+++ b/src/vde_cryptcab/cryptcab.c	2017-03-20 22:54:20.452975075 +0000
-@@ -22,7 +22,7 @@
- 	exit(1);
- }
- 	
--static EVP_CIPHER_CTX ctx;
-+static EVP_CIPHER_CTX *ctx;
- static int ctx_initialized = 0;
- static int encryption_disabled = 0;
- static int nfd;
-@@ -30,6 +30,10 @@
- static struct vde_open_args open_args={.port=0,.group=NULL,.mode=0700};
- static int verbose = 0;
- 
-+#if OPENSSL_VERSION_NUMBER < 0x10100000
-+#define EVP_CIPHER_CTX_reset(x)	EVP_CIPHER_CTX_cleanup(x)
-+#endif
-+
- void vc_printlog(int priority, const char *format, ...)
- {
- 	va_list arg;
-@@ -103,19 +107,21 @@
- 	}
- 
- 	if (!ctx_initialized) {
--		EVP_CIPHER_CTX_init (&ctx);
-+		ctx = EVP_CIPHER_CTX_new ();
-+		if (!ctx)
-+			return -1;
- 		ctx_initialized = 1;
- 	}
- 	
--	EVP_EncryptInit (&ctx, EVP_bf_cbc (), p->key, p->iv);
--	if (EVP_EncryptUpdate (&ctx, dst, &olen, src, len) != 1)
-+	EVP_EncryptInit (ctx, EVP_bf_cbc (), p->key, p->iv);
-+	if (EVP_EncryptUpdate (ctx, dst, &olen, src, len) != 1)
- 	{
- 		fprintf (stderr,"error in encrypt update\n");
- 		olen = -1;
- 		goto cleanup;
- 	}
- 
--	if (EVP_EncryptFinal (&ctx, dst + olen, &tlen) != 1)
-+	if (EVP_EncryptFinal (ctx, dst + olen, &tlen) != 1)
- 	{
- 		fprintf (stderr,"error in encrypt final\n");
- 		olen = -1;
-@@ -124,7 +130,7 @@
- 	olen += tlen;
- 
- cleanup:
--	EVP_CIPHER_CTX_cleanup(&ctx);	
-+	EVP_CIPHER_CTX_reset(ctx);
- 	return olen;
- }
- 
-@@ -138,19 +144,21 @@
- 	}
- 	
- 	if (!ctx_initialized) {
--		EVP_CIPHER_CTX_init (&ctx);
-+		ctx = EVP_CIPHER_CTX_new ();
-+		if (!ctx)
-+			return -1;
- 		ctx_initialized = 1;
- 	}
- 
--	EVP_DecryptInit (&ctx, EVP_bf_cbc (), p->key, p->iv);
--	if (EVP_DecryptUpdate (&ctx, dst, &olen, src, len) != 1)
-+	EVP_DecryptInit (ctx, EVP_bf_cbc (), p->key, p->iv);
-+	if (EVP_DecryptUpdate (ctx, dst, &olen, src, len) != 1)
- 	{
- 		fprintf (stderr,"error in decrypt update\n");
- 		olen = -1;
- 		goto cleanup;
- 	}
- 
--	if (EVP_DecryptFinal (&ctx, dst + olen, &tlen) != 1)
-+	if (EVP_DecryptFinal (ctx, dst + olen, &tlen) != 1)
- 	{
- 		fprintf (stderr,"error in decrypt final\n");
- 		olen = -1;
-@@ -159,7 +167,7 @@
- 	olen += tlen;
- 
- cleanup:
--	EVP_CIPHER_CTX_cleanup(&ctx);	
-+	EVP_CIPHER_CTX_reset (ctx);
- 	return olen;
- }
- 



More information about the arch-commits mailing list