Openembedded Devel Discussions
 help / color / mirror / Atom feed
* [meta-networking][PATCH 1/9] spice: import from meta-cloud-services
@ 2018-05-11 19:21 Martin Jansa
  2018-05-11 19:21 ` [meta-networking][PATCH 2/9] spice: fix dependency on python-pyparsing, add support for native(sdk) Martin Jansa
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: Martin Jansa @ 2018-05-11 19:21 UTC (permalink / raw)
  To: openembedded-devel

* http://git.yoctoproject.org/cgit/cgit.cgi/meta-cloud-services/commit/recipes-support/spice/spice_git.bb?id=19f0c979abbc72a300c0b1cb92f9328f96728f5a
* will be used by qemu-native to provide a way for headless servers
  to export accelerated (virglrenderer) graphics to remove clients

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 ...n-printf-to-keep-compatibility-betwe.patch |  72 +++++++++++++
 ...x-BITMAP_FMT_IS_RGB-defined-but-not-.patch |  29 +++++
 .../files/Fix-build-issues-with-gcc-7.patch   |  59 +++++++++++
 ...d-allow-separated-src-and-build-dirs.patch |  62 +++++++++++
 ...d-subdir-objects-to-AM_INIT_AUTOMAKE.patch |  29 +++++
 .../spice/files/spice-fix-CVE-2013-4282.patch | 100 ++++++++++++++++++
 .../recipes-support/spice/spice_git.bb        |  76 +++++++++++++
 7 files changed, 427 insertions(+)
 create mode 100644 meta-networking/recipes-support/spice/files/0001-Use-PRI-macros-in-printf-to-keep-compatibility-betwe.patch
 create mode 100644 meta-networking/recipes-support/spice/files/0001-red_parse_qxl-Fix-BITMAP_FMT_IS_RGB-defined-but-not-.patch
 create mode 100644 meta-networking/recipes-support/spice/files/Fix-build-issues-with-gcc-7.patch
 create mode 100644 meta-networking/recipes-support/spice/files/build-allow-separated-src-and-build-dirs.patch
 create mode 100644 meta-networking/recipes-support/spice/files/configure.ac-add-subdir-objects-to-AM_INIT_AUTOMAKE.patch
 create mode 100644 meta-networking/recipes-support/spice/files/spice-fix-CVE-2013-4282.patch
 create mode 100644 meta-networking/recipes-support/spice/spice_git.bb

diff --git a/meta-networking/recipes-support/spice/files/0001-Use-PRI-macros-in-printf-to-keep-compatibility-betwe.patch b/meta-networking/recipes-support/spice/files/0001-Use-PRI-macros-in-printf-to-keep-compatibility-betwe.patch
new file mode 100644
index 0000000000..18fa8fade8
--- /dev/null
+++ b/meta-networking/recipes-support/spice/files/0001-Use-PRI-macros-in-printf-to-keep-compatibility-betwe.patch
@@ -0,0 +1,72 @@
+From 3cb746329ea4846bd9c65e0198e69423379b6f62 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=EC=86=8C=EB=B3=91=EC=B2=A0?= <byungchul.so@samsung.com>
+Date: Thu, 24 Apr 2014 12:26:32 +0000
+Subject: [PATCH] Use PRI macros in printf to keep compatibility between
+ 32/64bit system
+
+gcc's some integer type definitions are different between 32/64bit system.
+This causes platform dependency problem with printf function. However,
+we can avoid this problem by using PRI macros that supports platform
+independent printf.
+---
+ server/mjpeg_encoder.c | 7 ++++---
+ server/red_worker.c    | 4 ++--
+ 2 files changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/server/mjpeg_encoder.c b/server/mjpeg_encoder.c
+index aea4964..f465d88 100644
+--- a/server/mjpeg_encoder.c
++++ b/server/mjpeg_encoder.c
+@@ -23,6 +23,7 @@
+ #include "mjpeg_encoder.h"
+ #include <jerror.h>
+ #include <jpeglib.h>
++#include <inttypes.h>
+ 
+ #define MJPEG_MAX_FPS 25
+ #define MJPEG_MIN_FPS 1
+@@ -66,7 +67,7 @@ static const int mjpeg_quality_samples[MJPEG_QUALITY_SAMPLE_NUM] = {20, 30, 40,
+  * are not necessarily related to mis-estimation of the bit rate, and we would
+  * like to wait till the stream stabilizes.
+  */
+-#define MJPEG_WARMUP_TIME 3000L // 3 sec
++#define MJPEG_WARMUP_TIME 3000LL // 3 sec
+ 
+ enum {
+     MJPEG_QUALITY_EVAL_TYPE_SET,
+@@ -638,7 +639,7 @@ static void mjpeg_encoder_adjust_params_to_bit_rate(MJpegEncoder *encoder)
+ 
+     spice_debug("cur-fps=%u new-fps=%u (new/old=%.2f) |"
+                 "bit-rate=%.2f (Mbps) latency=%u (ms) quality=%d |"
+-                " new-size-avg %lu , base-size %lu, (new/old=%.2f) ",
++                " new-size-avg %"PRIu64" , base-size %"PRIu64", (new/old=%.2f) ",
+                 rate_control->fps, new_fps, ((double)new_fps)/rate_control->fps,
+                 ((double)rate_control->byte_rate*8)/1024/1024,
+                 latency,
+@@ -703,7 +704,7 @@ static void mjpeg_encoder_adjust_fps(MJpegEncoder *encoder, uint64_t now)
+ 
+         avg_fps = ((double)rate_control->adjusted_fps_num_frames*1000) /
+                   adjusted_fps_time_passed;
+-        spice_debug("#frames-adjust=%lu #adjust-time=%lu avg-fps=%.2f",
++        spice_debug("#frames-adjust=%"PRIu64" #adjust-time=%"PRIu64" avg-fps=%.2f",
+                     rate_control->adjusted_fps_num_frames, adjusted_fps_time_passed, avg_fps);
+         spice_debug("defined=%u old-adjusted=%.2f", rate_control->fps, rate_control->adjusted_fps);
+         fps_ratio = avg_fps / rate_control->fps;
+diff --git a/server/red_worker.c b/server/red_worker.c
+index 619f7bc..1871e13 100644
+--- a/server/red_worker.c
++++ b/server/red_worker.c
+@@ -2594,8 +2594,8 @@ static void red_print_stream_stats(DisplayChannelClient *dcc, StreamAgent *agent
+         mjpeg_encoder_get_stats(agent->mjpeg_encoder, &encoder_stats);
+     }
+ 
+-    spice_debug("stream=%ld dim=(%dx%d) #in-frames=%lu #in-avg-fps=%.2f #out-frames=%lu "
+-                "out/in=%.2f #drops=%lu (#pipe=%lu #fps=%lu) out-avg-fps=%.2f "
++    spice_debug("stream=%"PRIdPTR" dim=(%dx%d) #in-frames=%"PRIu64" #in-avg-fps=%.2f #out-frames=%"PRIu64" "
++                "out/in=%.2f #drops=%"PRIu64" (#pipe=%"PRIu64" #fps=%"PRIu64") out-avg-fps=%.2f "
+                 "passed-mm-time(sec)=%.2f size-total(MB)=%.2f size-per-sec(Mbps)=%.2f "
+                 "size-per-frame(KBpf)=%.2f avg-quality=%.2f "
+                 "start-bit-rate(Mbps)=%.2f end-bit-rate(Mbps)=%.2f",
+-- 
+2.10.2
+
diff --git a/meta-networking/recipes-support/spice/files/0001-red_parse_qxl-Fix-BITMAP_FMT_IS_RGB-defined-but-not-.patch b/meta-networking/recipes-support/spice/files/0001-red_parse_qxl-Fix-BITMAP_FMT_IS_RGB-defined-but-not-.patch
new file mode 100644
index 0000000000..ccae5f50f2
--- /dev/null
+++ b/meta-networking/recipes-support/spice/files/0001-red_parse_qxl-Fix-BITMAP_FMT_IS_RGB-defined-but-not-.patch
@@ -0,0 +1,29 @@
+From 85838d4c9f2322aedb99b38fffd7da95a494d8ed Mon Sep 17 00:00:00 2001
+From: He Zhe <zhe.he@windriver.com>
+Date: Thu, 29 Jun 2017 08:26:35 +0000
+Subject: [PATCH] red_parse_qxl: Fix BITMAP_FMT_IS_RGB defined but not used
+
+| ../../git/server/red_parse_qxl.c:367:18: error: 'BITMAP_FMT_IS_RGB'
+defined but not used [-Werror=unused-const-variable=]
+|  static const int BITMAP_FMT_IS_RGB[] = {0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1};
+
+Signed-off-by: He Zhe <zhe.he@windriver.com>
+---
+ server/red_parse_qxl.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/server/red_parse_qxl.c b/server/red_parse_qxl.c
+index 6c0b0658..cfc2da95 100644
+--- a/server/red_parse_qxl.c
++++ b/server/red_parse_qxl.c
+@@ -364,7 +364,6 @@ static int bitmap_consistent(SpiceBitmap *bitmap)
+ 
+ // This is based on SPICE_BITMAP_FMT_*, copied from server/red_worker.c
+ // to avoid a possible unoptimization from making it non static.
+-static const int BITMAP_FMT_IS_RGB[] = {0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1};
+ 
+ static SpiceImage *red_get_image(RedMemSlotInfo *slots, int group_id,
+                                  QXLPHYSICAL addr, uint32_t flags, int is_mask)
+-- 
+2.11.0
+
diff --git a/meta-networking/recipes-support/spice/files/Fix-build-issues-with-gcc-7.patch b/meta-networking/recipes-support/spice/files/Fix-build-issues-with-gcc-7.patch
new file mode 100644
index 0000000000..7fcafdc7ef
--- /dev/null
+++ b/meta-networking/recipes-support/spice/files/Fix-build-issues-with-gcc-7.patch
@@ -0,0 +1,59 @@
+From 9f001b6818ac4baa1df010ccf4200ca56bfb11b2 Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <mark.asselstine@windriver.com>
+Date: Wed, 23 Aug 2017 13:47:29 -0400
+Subject: [PATCH] Fix build issues with gcc 7
+
+gcc 7 checks for when a switch statement doesn't break between
+cases. When a break is not found you will see
+
+| ../../git/server/reds.c: In function 'vdi_port_read_one_msg_from_device':
+| ../../git/server/reds.c:797:31: error: this statement may fall through [-Werror=implicit-fallthrough=]
+|              state->read_state = VDI_PORT_READ_STATE_GET_BUFF;
+|              ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+| ../../git/server/reds.c:798:9: note: here
+|          case VDI_PORT_READ_STATE_GET_BUFF: {
+|          ^~~~
+
+The 'fallthrough' comment will let gcc know this is done on purpose.
+
+Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+---
+ server/inputs_channel.c | 1 +
+ server/reds.c           | 2 ++
+ 2 files changed, 3 insertions(+)
+
+diff --git a/server/inputs_channel.c b/server/inputs_channel.c
+index 931dac1..534ab66 100644
+--- a/server/inputs_channel.c
++++ b/server/inputs_channel.c
+@@ -321,6 +321,7 @@ static int inputs_channel_handle_parsed(RedChannelClient *rcc, uint32_t size, ui
+             activate_modifiers_watch();
+         }
+     }
++        /* fallthrough */
+     case SPICE_MSGC_INPUTS_KEY_UP: {
+         SpiceMsgcKeyDown *key_down = (SpiceMsgcKeyDown *)buf;
+         for (i = 0; i < 4; i++) {
+diff --git a/server/reds.c b/server/reds.c
+index 30d0652..8c80eb6 100644
+--- a/server/reds.c
++++ b/server/reds.c
+@@ -795,6 +795,7 @@ static SpiceCharDeviceMsgToClient *vdi_port_read_one_msg_from_device(SpiceCharDe
+             }
+             state->message_recive_len = state->vdi_chunk_header.size;
+             state->read_state = VDI_PORT_READ_STATE_GET_BUFF;
++            /* fallthrough */
+         case VDI_PORT_READ_STATE_GET_BUFF: {
+             if (!(state->current_read_buf = vdi_port_read_buf_get())) {
+                 return NULL;
+@@ -806,6 +807,7 @@ static SpiceCharDeviceMsgToClient *vdi_port_read_one_msg_from_device(SpiceCharDe
+             state->message_recive_len -= state->recive_len;
+             state->read_state = VDI_PORT_READ_STATE_READ_DATA;
+         }
++            /* fallthrough */
+         case VDI_PORT_READ_STATE_READ_DATA:
+             n = sif->read(vdagent, state->recive_pos, state->recive_len);
+             if (!n) {
+-- 
+2.7.4
+
diff --git a/meta-networking/recipes-support/spice/files/build-allow-separated-src-and-build-dirs.patch b/meta-networking/recipes-support/spice/files/build-allow-separated-src-and-build-dirs.patch
new file mode 100644
index 0000000000..9cbbff9b64
--- /dev/null
+++ b/meta-networking/recipes-support/spice/files/build-allow-separated-src-and-build-dirs.patch
@@ -0,0 +1,62 @@
+From 7d0d0ff080b159e647ebb26c337cb75314d64b52 Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <mark.asselstine@windriver.com>
+Date: Thu, 1 May 2014 12:09:16 -0400
+Subject: [PATCH] build: allow separated src and build dirs
+
+We need to expland the list of include dirs to include the build dir since
+generated files will be created there instead of in the src dir.
+
+We also don't want to force using $srcdir for generated files as this will
+allow them to be created in the build dir. We account for the slight
+deviation in the generated files with expanded include paths.
+
+Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+---
+ configure.ac | 2 +-
+ spice-common/common/Makefile.am | 14 +++++++-------
+ 2 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index edda8e9..9151fcb 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -165,7 +165,7 @@ dnl =========================================================================
+ dnl Check deps
+ 
+ AC_CONFIG_SUBDIRS([spice-common])
+-COMMON_CFLAGS='-I ${top_srcdir}/spice-common/ -I ${top_srcdir}/spice-common/spice-protocol/'
++COMMON_CFLAGS='-I ${top_srcdir}/spice-common/ -I ${top_srcdir}/spice-common/common/ -I ${top_srcdir}/spice-common/spice-protocol/ -I ${top_builddir}/spice-common/'
+ AC_SUBST(COMMON_CFLAGS)
+ 
+ AC_CHECK_LIBM
+diff --git a/spice-common/common/Makefile.am b/spice-common/common/Makefile.am
+index 45568c6..4c65ac4 100644
+--- a/spice-common/common/Makefile.am
++++ b/spice-common/common/Makefile.am
+@@ -2,16 +2,16 @@ NULL =
+ 
+ # Avoid need for python(pyparsing) by end users
+ CLIENT_MARSHALLERS =					\
+-	$(srcdir)/generated_client_demarshallers.c	\
+-	$(srcdir)/generated_client_demarshallers1.c	\
+-	$(srcdir)/generated_client_marshallers.c	\
+-	$(srcdir)/generated_client_marshallers1.c	\
++	generated_client_demarshallers.c	\
++	generated_client_demarshallers1.c	\
++	generated_client_marshallers.c	\
++	generated_client_marshallers1.c	\
+ 	$(NULL)
+ 
+ SERVER_MARSHALLERS =					\
+-	$(srcdir)/generated_server_demarshallers.c	\
+-	$(srcdir)/generated_server_marshallers.c	\
+-	$(srcdir)/generated_server_marshallers.h	\
++	generated_server_demarshallers.c	\
++	generated_server_marshallers.c	\
++	generated_server_marshallers.h	\
+ 	$(NULL)
+ 
+ BUILT_SOURCES = $(CLIENT_MARSHALLERS) $(SERVER_MARSHALLERS) $(top_srcdir)/spice-protocol/spice/enums.h
+-- 
+1.8.3.2
+
diff --git a/meta-networking/recipes-support/spice/files/configure.ac-add-subdir-objects-to-AM_INIT_AUTOMAKE.patch b/meta-networking/recipes-support/spice/files/configure.ac-add-subdir-objects-to-AM_INIT_AUTOMAKE.patch
new file mode 100644
index 0000000000..323ef52f8b
--- /dev/null
+++ b/meta-networking/recipes-support/spice/files/configure.ac-add-subdir-objects-to-AM_INIT_AUTOMAKE.patch
@@ -0,0 +1,29 @@
+From 36efb79076420975f7fa7aa0b03a1fc282291b05 Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <mark.asselstine@windriver.com>
+Date: Tue, 25 Mar 2014 15:23:25 -0400
+Subject: [PATCH] configure.ac: add subdir-objects to AM_INIT_AUTOMAKE
+
+Without this you will get subdir-objects error which will cause
+autoreconf to complete successfully.
+
+Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+---
+ spice-common/configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/spice-common/configure.ac b/spice-common/configure.ac
+index b5cb960..78f1360 100644
+--- a/spice-common/configure.ac
++++ b/spice-common/configure.ac
+@@ -13,7 +13,7 @@ AC_CONFIG_AUX_DIR([build-aux])
+ m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
+ 
+ # Checks for programs
+-AM_INIT_AUTOMAKE([1.11 dist-xz no-dist-gzip tar-ustar foreign -Wall -Werror])
++AM_INIT_AUTOMAKE([1.11 dist-xz no-dist-gzip tar-ustar foreign subdir-objects -Wall -Werror])
+ AM_MAINTAINER_MODE
+ AM_SILENT_RULES([yes])
+ LT_INIT
+-- 
+1.8.3.2
+
diff --git a/meta-networking/recipes-support/spice/files/spice-fix-CVE-2013-4282.patch b/meta-networking/recipes-support/spice/files/spice-fix-CVE-2013-4282.patch
new file mode 100644
index 0000000000..1a00a85185
--- /dev/null
+++ b/meta-networking/recipes-support/spice/files/spice-fix-CVE-2013-4282.patch
@@ -0,0 +1,100 @@
+Fix buffer overflow when decrypting client SPICE ticket
+
+commit 8af619009660b24e0b41ad26b30289eea288fcc2     upstream
+
+reds_handle_ticket uses a fixed size 'password' buffer for the decrypted
+password whose size is SPICE_MAX_PASSWORD_LENGTH. However,
+RSA_private_decrypt which we call for the decryption expects the
+destination buffer to be at least RSA_size(link->tiTicketing.rsa)
+bytes long. On my spice-server build, SPICE_MAX_PASSWORD_LENGTH
+is 60 while RSA_size() is 128, so we end up overflowing 'password'
+when using long passwords (this was reproduced using the string:
+'fullscreen=1proxy=#enter proxy here; e.g spice_proxy = http://[proxy]:[port]'
+as a password).
+
+When the overflow occurs, QEMU dies with:
+*** stack smashing detected ***: qemu-system-x86_64 terminated
+
+This commit ensures we use a corectly sized 'password' buffer,
+and that it's correctly nul-terminated so that we can use strcmp
+instead of strncmp. To keep using strncmp, we'd need to figure out
+which one of 'password' and 'taTicket.password' is the smaller buffer,
+and use that size.
+
+This fixes rhbz#999839
+diff --git a/server/reds.c b/server/reds.c
+index 30d0652..6f262b0 100644
+--- a/server/reds.c
++++ b/server/reds.c
+@@ -1931,39 +1931,59 @@ static void reds_handle_link(RedLinkInfo *link)
+ static void reds_handle_ticket(void *opaque)
+ {
+     RedLinkInfo *link = (RedLinkInfo *)opaque;
+-    char password[SPICE_MAX_PASSWORD_LENGTH];
++    char *password;
+     time_t ltime;
++    int password_size;
+ 
+     //todo: use monotonic time
+     time(&ltime);
+-    RSA_private_decrypt(link->tiTicketing.rsa_size,
+-                        link->tiTicketing.encrypted_ticket.encrypted_data,
+-                        (unsigned char *)password, link->tiTicketing.rsa, RSA_PKCS1_OAEP_PADDING);
++    if (RSA_size(link->tiTicketing.rsa) < SPICE_MAX_PASSWORD_LENGTH) {
++        spice_warning("RSA modulus size is smaller than SPICE_MAX_PASSWORD_LENGTH (%d < %d), "
++                      "SPICE ticket sent from client may be truncated",
++                      RSA_size(link->tiTicketing.rsa), SPICE_MAX_PASSWORD_LENGTH);
++    }
++
++    password = g_malloc0(RSA_size(link->tiTicketing.rsa) + 1);
++    password_size = RSA_private_decrypt(link->tiTicketing.rsa_size,
++                                        link->tiTicketing.encrypted_ticket.encrypted_data,
++                                        (unsigned char *)password,
++                                        link->tiTicketing.rsa,
++                                        RSA_PKCS1_OAEP_PADDING);
++    if (password_size == -1) {
++        spice_warning("failed to decrypt RSA encrypted password: %s",
++                      ERR_error_string(ERR_get_error(), NULL));
++        goto error;
++    }
++    password[password_size] = '\0';
+ 
+     if (ticketing_enabled && !link->skip_auth) {
+         int expired =  taTicket.expiration_time < ltime;
+ 
+         if (strlen(taTicket.password) == 0) {
+-            reds_send_link_result(link, SPICE_LINK_ERR_PERMISSION_DENIED);
+             spice_warning("Ticketing is enabled, but no password is set. "
+-                        "please set a ticket first");
+-            reds_link_free(link);
+-            return;
++                          "please set a ticket first");
++            goto error;
+         }
+ 
+-        if (expired || strncmp(password, taTicket.password, SPICE_MAX_PASSWORD_LENGTH) != 0) {
++        if (expired || strcmp(password, taTicket.password) != 0) {
+             if (expired) {
+                 spice_warning("Ticket has expired");
+             } else {
+                 spice_warning("Invalid password");
+             }
+-            reds_send_link_result(link, SPICE_LINK_ERR_PERMISSION_DENIED);
+-            reds_link_free(link);
+-            return;
++            goto error;
+         }
+     }
+ 
+     reds_handle_link(link);
++    goto end;
++
++error:
++    reds_send_link_result(link, SPICE_LINK_ERR_PERMISSION_DENIED);
++    reds_link_free(link);
++
++end:
++    g_free(password);
+ }
+ 
+ static inline void async_read_clear_handlers(AsyncRead *obj)
diff --git a/meta-networking/recipes-support/spice/spice_git.bb b/meta-networking/recipes-support/spice/spice_git.bb
new file mode 100644
index 0000000000..04e7a25d70
--- /dev/null
+++ b/meta-networking/recipes-support/spice/spice_git.bb
@@ -0,0 +1,76 @@
+#
+# Copyright (C) 2013 Wind River Systems, Inc.
+#
+
+SUMMARY = "Simple Protocol for Independent Computing Environments"
+DESCRIPTION = "SPICE (the Simple Protocol for Independent Computing \
+Environments) is a remote-display system built for virtual \
+environments which allows users to view a computing 'desktop' \ 
+environment - not only on its computer-server machine, but also from \
+anywhere on the Internet and using a wide variety of machine \
+architectures."
+
+LICENSE = "BSD & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+PR = "r0"
+PV = "0.12.4"
+
+# Actual versions based on the checkouts below
+# spice = "0.12.4"
+# common = "0.12.6"
+# protocol = "0.12.6"
+SRCREV_spice = "b270fb010a3ddb432dfe6b15e4bdffa6ac086cd0"
+SRCREV_spice-common = "fe93908238196bd632287fc9875e6f2e11105d04"
+SRCREV_spice-protocol = "784407f248e7f99d2bfcc9368f9acd1efb2b9617"
+
+SRCREV_FORMAT = "spice_spice-common_spice-protocol"
+
+SRC_URI = "git://anongit.freedesktop.org/spice/spice;name=spice \
+           git://anongit.freedesktop.org/spice/spice-common;destsuffix=git/spice-common;name=spice-common \
+           git://anongit.freedesktop.org/spice/spice-protocol;destsuffix=git/spice-common/spice-protocol;name=spice-protocol \
+          "
+
+SRC_URI += " \
+        file://spice-fix-CVE-2013-4282.patch \
+        file://configure.ac-add-subdir-objects-to-AM_INIT_AUTOMAKE.patch \
+        file://build-allow-separated-src-and-build-dirs.patch \
+        file://0001-red_parse_qxl-Fix-BITMAP_FMT_IS_RGB-defined-but-not-.patch \
+        file://0001-Use-PRI-macros-in-printf-to-keep-compatibility-betwe.patch \
+        file://Fix-build-issues-with-gcc-7.patch \
+        "
+
+S = "${WORKDIR}/git"
+
+inherit autotools gettext pythonnative python-dir pkgconfig
+
+DEPENDS += "python-native celt051 python-pyparsing jpeg pixman alsa-lib glib-2.0"
+
+export PYTHON="${STAGING_BINDIR_NATIVE}/python-native/python"
+export PYTHONPATH="${PKG_CONFIG_SYSROOT_DIR}${libdir}/python2.7/site-packages"
+
+PACKAGECONFIG ?= "sasl"
+
+PACKAGECONFIG[smartcard] = "--enable-smartcard,--disable-smartcard,libcacard,"
+PACKAGECONFIG[sasl] = "--with-sasl,--without-sasl,cyrus-sasl,"
+PACKAGECONFIG[client] = "--enable-client,--disable-client,,"
+PACKAGECONFIG[gui] = "--enable-gui,--disable-gui,,"
+PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl,,"
+PACKAGECONFIG[xinerama] = "--enable-xinerama,--disable-xinerama,libxinerama,"
+
+PACKAGES =+ "${PN}-protocol"
+LICENSE_${PN}-protocol = "BSD"
+FILES_${PN}-protocol += "${includedir}/spice-1"
+FILES_${PN}-protocol += "${datadir}/pkgconfig"
+
+do_configure_prepend() {
+	mkdir -p ${S}/spice-common/spice-protocol/m4
+}
+
+do_install_append() {
+	cd ${B}/spice-common/spice-protocol
+	oe_runmake DESTDIR="${D}" install
+	cd -
+}
+
+COMPATIBLE_HOST = '(x86_64|i.86).*-linux'
-- 
2.17.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [meta-networking][PATCH 2/9] spice: fix dependency on python-pyparsing, add support for native(sdk)
  2018-05-11 19:21 [meta-networking][PATCH 1/9] spice: import from meta-cloud-services Martin Jansa
@ 2018-05-11 19:21 ` Martin Jansa
  2018-05-11 19:21 ` [meta-networking][PATCH 3/9] spice: fix build with FORTIFY_SOURCES already defined in native gcc Martin Jansa
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Martin Jansa @ 2018-05-11 19:21 UTC (permalink / raw)
  To: openembedded-devel

* drop PR
* add +git to PV
* drop python-pyparsing dependency, because python-pyparsing is in
  meta-python
* replace dependency on python-pyparsing with python-pyparsing-native
  which is used to generate client/generated_marshallers.cpp

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta-networking/recipes-support/spice/spice_git.bb | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/meta-networking/recipes-support/spice/spice_git.bb b/meta-networking/recipes-support/spice/spice_git.bb
index 04e7a25d70..2039841ddf 100644
--- a/meta-networking/recipes-support/spice/spice_git.bb
+++ b/meta-networking/recipes-support/spice/spice_git.bb
@@ -13,8 +13,7 @@ architectures."
 LICENSE = "BSD & LGPLv2.1+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
 
-PR = "r0"
-PV = "0.12.4"
+PV = "0.12.4+git${SRCPV}"
 
 # Actual versions based on the checkouts below
 # spice = "0.12.4"
@@ -44,11 +43,14 @@ S = "${WORKDIR}/git"
 
 inherit autotools gettext pythonnative python-dir pkgconfig
 
-DEPENDS += "python-native celt051 python-pyparsing jpeg pixman alsa-lib glib-2.0"
+DEPENDS += "celt051 jpeg pixman alsa-lib glib-2.0 python-pyparsing-native"
+DEPENDS_append_class-nativesdk = "nativesdk-openssl"
 
 export PYTHON="${STAGING_BINDIR_NATIVE}/python-native/python"
 export PYTHONPATH="${PKG_CONFIG_SYSROOT_DIR}${libdir}/python2.7/site-packages"
 
+PACKAGECONFIG_class-native = ""
+PACKAGECONFIG_class-nativesdk = ""
 PACKAGECONFIG ?= "sasl"
 
 PACKAGECONFIG[smartcard] = "--enable-smartcard,--disable-smartcard,libcacard,"
@@ -74,3 +76,5 @@ do_install_append() {
 }
 
 COMPATIBLE_HOST = '(x86_64|i.86).*-linux'
+
+BBCLASSEXTEND = "native nativesdk"
-- 
2.17.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [meta-networking][PATCH 3/9] spice: fix build with FORTIFY_SOURCES already defined in native gcc
  2018-05-11 19:21 [meta-networking][PATCH 1/9] spice: import from meta-cloud-services Martin Jansa
  2018-05-11 19:21 ` [meta-networking][PATCH 2/9] spice: fix dependency on python-pyparsing, add support for native(sdk) Martin Jansa
@ 2018-05-11 19:21 ` Martin Jansa
  2018-05-11 19:21 ` [meta-networking][PATCH 4/9] spice: upgrade to 0.13.90 version Martin Jansa
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Martin Jansa @ 2018-05-11 19:21 UTC (permalink / raw)
  To: openembedded-devel

* e.g. on gentoo hosts
* use 4 spaces for indentation

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 ...rnings.m4-don-t-define-FORITFY_SOURC.patch | 37 +++++++++++++++++++
 .../recipes-support/spice/spice_git.bb        | 32 ++++++++--------
 2 files changed, 54 insertions(+), 15 deletions(-)
 create mode 100644 meta-networking/recipes-support/spice/files/0001-spice-compile-warnings.m4-don-t-define-FORITFY_SOURC.patch

diff --git a/meta-networking/recipes-support/spice/files/0001-spice-compile-warnings.m4-don-t-define-FORITFY_SOURC.patch b/meta-networking/recipes-support/spice/files/0001-spice-compile-warnings.m4-don-t-define-FORITFY_SOURC.patch
new file mode 100644
index 0000000000..666960566b
--- /dev/null
+++ b/meta-networking/recipes-support/spice/files/0001-spice-compile-warnings.m4-don-t-define-FORITFY_SOURC.patch
@@ -0,0 +1,37 @@
+From bf85d26f0326d4ea20429c29fd408703ee5bad54 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Wed, 13 Sep 2017 15:53:02 +0200
+Subject: [PATCH] spice-compile-warnings.m4: don't define FORITFY_SOURCES
+
+* otherwise fails when the native gcc already defines
+  FORTIFY_SOURCES (e.g. in gentoo).
+  | In file included from ../../git/server/inputs_channel.c:19:0:
+  | ../config.h:17:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
+  |  # define _FORTIFY_SOURCE 2
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ m4/spice-compile-warnings.m4 | 7 -------
+ 1 file changed, 7 deletions(-)
+
+diff --git a/m4/spice-compile-warnings.m4 b/m4/spice-compile-warnings.m4
+index 959971a2..55352ad6 100644
+--- a/m4/spice-compile-warnings.m4
++++ b/m4/spice-compile-warnings.m4
+@@ -109,13 +109,6 @@ AC_DEFUN([SPICE_COMPILE_WARNINGS],[
+     # This should be < 1024 really. pixman_utils is the blackspot
+     # preventing lower usage
+     gl_WARN_ADD([-Wframe-larger-than=20460])
+-
+-    # Use improved glibc headers
+-    AH_VERBATIM([FORTIFY_SOURCE],
+-    [/* Enable compile-time and run-time bounds-checking, and some warnings. */
+-#if __OPTIMIZE__
+-# define _FORTIFY_SOURCE 2
+-#endif
+ ])
+ 
+     # Extra special flags
+-- 
+2.14.1
+
diff --git a/meta-networking/recipes-support/spice/spice_git.bb b/meta-networking/recipes-support/spice/spice_git.bb
index 2039841ddf..dfe4613641 100644
--- a/meta-networking/recipes-support/spice/spice_git.bb
+++ b/meta-networking/recipes-support/spice/spice_git.bb
@@ -25,19 +25,21 @@ SRCREV_spice-protocol = "784407f248e7f99d2bfcc9368f9acd1efb2b9617"
 
 SRCREV_FORMAT = "spice_spice-common_spice-protocol"
 
-SRC_URI = "git://anongit.freedesktop.org/spice/spice;name=spice \
-           git://anongit.freedesktop.org/spice/spice-common;destsuffix=git/spice-common;name=spice-common \
-           git://anongit.freedesktop.org/spice/spice-protocol;destsuffix=git/spice-common/spice-protocol;name=spice-protocol \
-          "
+SRC_URI = " \
+    git://anongit.freedesktop.org/spice/spice;name=spice \
+    git://anongit.freedesktop.org/spice/spice-common;destsuffix=git/spice-common;name=spice-common \
+    git://anongit.freedesktop.org/spice/spice-protocol;destsuffix=git/spice-common/spice-protocol;name=spice-protocol \
+"
 
 SRC_URI += " \
-        file://spice-fix-CVE-2013-4282.patch \
-        file://configure.ac-add-subdir-objects-to-AM_INIT_AUTOMAKE.patch \
-        file://build-allow-separated-src-and-build-dirs.patch \
-        file://0001-red_parse_qxl-Fix-BITMAP_FMT_IS_RGB-defined-but-not-.patch \
-        file://0001-Use-PRI-macros-in-printf-to-keep-compatibility-betwe.patch \
-        file://Fix-build-issues-with-gcc-7.patch \
-        "
+    file://spice-fix-CVE-2013-4282.patch \
+    file://configure.ac-add-subdir-objects-to-AM_INIT_AUTOMAKE.patch \
+    file://build-allow-separated-src-and-build-dirs.patch \
+    file://0001-red_parse_qxl-Fix-BITMAP_FMT_IS_RGB-defined-but-not-.patch \
+    file://0001-Use-PRI-macros-in-printf-to-keep-compatibility-betwe.patch \
+    file://Fix-build-issues-with-gcc-7.patch \
+    file://0001-spice-compile-warnings.m4-don-t-define-FORITFY_SOURC.patch \
+"
 
 S = "${WORKDIR}/git"
 
@@ -66,13 +68,13 @@ FILES_${PN}-protocol += "${includedir}/spice-1"
 FILES_${PN}-protocol += "${datadir}/pkgconfig"
 
 do_configure_prepend() {
-	mkdir -p ${S}/spice-common/spice-protocol/m4
+    mkdir -p ${S}/spice-common/spice-protocol/m4
 }
 
 do_install_append() {
-	cd ${B}/spice-common/spice-protocol
-	oe_runmake DESTDIR="${D}" install
-	cd -
+    cd ${B}/spice-common/spice-protocol
+    oe_runmake DESTDIR="${D}" install
+    cd -
 }
 
 COMPATIBLE_HOST = '(x86_64|i.86).*-linux'
-- 
2.17.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [meta-networking][PATCH 4/9] spice: upgrade to 0.13.90 version
  2018-05-11 19:21 [meta-networking][PATCH 1/9] spice: import from meta-cloud-services Martin Jansa
  2018-05-11 19:21 ` [meta-networking][PATCH 2/9] spice: fix dependency on python-pyparsing, add support for native(sdk) Martin Jansa
  2018-05-11 19:21 ` [meta-networking][PATCH 3/9] spice: fix build with FORTIFY_SOURCES already defined in native gcc Martin Jansa
@ 2018-05-11 19:21 ` Martin Jansa
  2018-05-11 19:21 ` [meta-networking][PATCH 5/9] usbredir: add new recipe Martin Jansa
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Martin Jansa @ 2018-05-11 19:21 UTC (permalink / raw)
  To: openembedded-devel

* 0.13.0 is needed for opengl support, see qemu commit:
  https://git.qemu.org/?p=qemu.git;a=commitdiff;h=474114b7305cc1be7c2ee8ba5267be159a9d56e3
  +# if SPICE_SERVER_VERSION >= 0x000d00 /* release 0.13.0 */
  +#  define HAVE_SPICE_GL 1
  otherwise trying to run qemu with -spice gl=on fails with:
  qemu-system-x86_64: -spice gl=on: Invalid parameter 'gl'
* spice-protocol is built separately since 0.12.6
  * spice-protocol submodule has been removed,, spice-protocol must now
    be installed when building spice-server
* celt051 is optional since 0.12.5, use PACKAGECONFIG for it
  * Added Opus support. Celt support will be obsoleted in a future release.

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 ...n-printf-to-keep-compatibility-betwe.patch |  72 -------------
 ...x-BITMAP_FMT_IS_RGB-defined-but-not-.patch |  29 -----
 ...rnings.m4-don-t-define-FORITFY_SOURC.patch |  37 -------
 .../files/Fix-build-issues-with-gcc-7.patch   |  59 -----------
 ...d-allow-separated-src-and-build-dirs.patch |  62 -----------
 ...d-subdir-objects-to-AM_INIT_AUTOMAKE.patch |  29 -----
 .../spice/files/spice-fix-CVE-2013-4282.patch | 100 ------------------
 .../spice/spice-protocol_git.bb               |  32 ++++++
 ...d-allow-separated-src-and-build-dirs.patch |  33 ++++++
 .../recipes-support/spice/spice_git.bb        |  43 ++------
 10 files changed, 73 insertions(+), 423 deletions(-)
 delete mode 100644 meta-networking/recipes-support/spice/files/0001-Use-PRI-macros-in-printf-to-keep-compatibility-betwe.patch
 delete mode 100644 meta-networking/recipes-support/spice/files/0001-red_parse_qxl-Fix-BITMAP_FMT_IS_RGB-defined-but-not-.patch
 delete mode 100644 meta-networking/recipes-support/spice/files/0001-spice-compile-warnings.m4-don-t-define-FORITFY_SOURC.patch
 delete mode 100644 meta-networking/recipes-support/spice/files/Fix-build-issues-with-gcc-7.patch
 delete mode 100644 meta-networking/recipes-support/spice/files/build-allow-separated-src-and-build-dirs.patch
 delete mode 100644 meta-networking/recipes-support/spice/files/configure.ac-add-subdir-objects-to-AM_INIT_AUTOMAKE.patch
 delete mode 100644 meta-networking/recipes-support/spice/files/spice-fix-CVE-2013-4282.patch
 create mode 100644 meta-networking/recipes-support/spice/spice-protocol_git.bb
 create mode 100644 meta-networking/recipes-support/spice/spice/0001-build-allow-separated-src-and-build-dirs.patch

diff --git a/meta-networking/recipes-support/spice/files/0001-Use-PRI-macros-in-printf-to-keep-compatibility-betwe.patch b/meta-networking/recipes-support/spice/files/0001-Use-PRI-macros-in-printf-to-keep-compatibility-betwe.patch
deleted file mode 100644
index 18fa8fade8..0000000000
--- a/meta-networking/recipes-support/spice/files/0001-Use-PRI-macros-in-printf-to-keep-compatibility-betwe.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 3cb746329ea4846bd9c65e0198e69423379b6f62 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?=EC=86=8C=EB=B3=91=EC=B2=A0?= <byungchul.so@samsung.com>
-Date: Thu, 24 Apr 2014 12:26:32 +0000
-Subject: [PATCH] Use PRI macros in printf to keep compatibility between
- 32/64bit system
-
-gcc's some integer type definitions are different between 32/64bit system.
-This causes platform dependency problem with printf function. However,
-we can avoid this problem by using PRI macros that supports platform
-independent printf.
----
- server/mjpeg_encoder.c | 7 ++++---
- server/red_worker.c    | 4 ++--
- 2 files changed, 6 insertions(+), 5 deletions(-)
-
-diff --git a/server/mjpeg_encoder.c b/server/mjpeg_encoder.c
-index aea4964..f465d88 100644
---- a/server/mjpeg_encoder.c
-+++ b/server/mjpeg_encoder.c
-@@ -23,6 +23,7 @@
- #include "mjpeg_encoder.h"
- #include <jerror.h>
- #include <jpeglib.h>
-+#include <inttypes.h>
- 
- #define MJPEG_MAX_FPS 25
- #define MJPEG_MIN_FPS 1
-@@ -66,7 +67,7 @@ static const int mjpeg_quality_samples[MJPEG_QUALITY_SAMPLE_NUM] = {20, 30, 40,
-  * are not necessarily related to mis-estimation of the bit rate, and we would
-  * like to wait till the stream stabilizes.
-  */
--#define MJPEG_WARMUP_TIME 3000L // 3 sec
-+#define MJPEG_WARMUP_TIME 3000LL // 3 sec
- 
- enum {
-     MJPEG_QUALITY_EVAL_TYPE_SET,
-@@ -638,7 +639,7 @@ static void mjpeg_encoder_adjust_params_to_bit_rate(MJpegEncoder *encoder)
- 
-     spice_debug("cur-fps=%u new-fps=%u (new/old=%.2f) |"
-                 "bit-rate=%.2f (Mbps) latency=%u (ms) quality=%d |"
--                " new-size-avg %lu , base-size %lu, (new/old=%.2f) ",
-+                " new-size-avg %"PRIu64" , base-size %"PRIu64", (new/old=%.2f) ",
-                 rate_control->fps, new_fps, ((double)new_fps)/rate_control->fps,
-                 ((double)rate_control->byte_rate*8)/1024/1024,
-                 latency,
-@@ -703,7 +704,7 @@ static void mjpeg_encoder_adjust_fps(MJpegEncoder *encoder, uint64_t now)
- 
-         avg_fps = ((double)rate_control->adjusted_fps_num_frames*1000) /
-                   adjusted_fps_time_passed;
--        spice_debug("#frames-adjust=%lu #adjust-time=%lu avg-fps=%.2f",
-+        spice_debug("#frames-adjust=%"PRIu64" #adjust-time=%"PRIu64" avg-fps=%.2f",
-                     rate_control->adjusted_fps_num_frames, adjusted_fps_time_passed, avg_fps);
-         spice_debug("defined=%u old-adjusted=%.2f", rate_control->fps, rate_control->adjusted_fps);
-         fps_ratio = avg_fps / rate_control->fps;
-diff --git a/server/red_worker.c b/server/red_worker.c
-index 619f7bc..1871e13 100644
---- a/server/red_worker.c
-+++ b/server/red_worker.c
-@@ -2594,8 +2594,8 @@ static void red_print_stream_stats(DisplayChannelClient *dcc, StreamAgent *agent
-         mjpeg_encoder_get_stats(agent->mjpeg_encoder, &encoder_stats);
-     }
- 
--    spice_debug("stream=%ld dim=(%dx%d) #in-frames=%lu #in-avg-fps=%.2f #out-frames=%lu "
--                "out/in=%.2f #drops=%lu (#pipe=%lu #fps=%lu) out-avg-fps=%.2f "
-+    spice_debug("stream=%"PRIdPTR" dim=(%dx%d) #in-frames=%"PRIu64" #in-avg-fps=%.2f #out-frames=%"PRIu64" "
-+                "out/in=%.2f #drops=%"PRIu64" (#pipe=%"PRIu64" #fps=%"PRIu64") out-avg-fps=%.2f "
-                 "passed-mm-time(sec)=%.2f size-total(MB)=%.2f size-per-sec(Mbps)=%.2f "
-                 "size-per-frame(KBpf)=%.2f avg-quality=%.2f "
-                 "start-bit-rate(Mbps)=%.2f end-bit-rate(Mbps)=%.2f",
--- 
-2.10.2
-
diff --git a/meta-networking/recipes-support/spice/files/0001-red_parse_qxl-Fix-BITMAP_FMT_IS_RGB-defined-but-not-.patch b/meta-networking/recipes-support/spice/files/0001-red_parse_qxl-Fix-BITMAP_FMT_IS_RGB-defined-but-not-.patch
deleted file mode 100644
index ccae5f50f2..0000000000
--- a/meta-networking/recipes-support/spice/files/0001-red_parse_qxl-Fix-BITMAP_FMT_IS_RGB-defined-but-not-.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 85838d4c9f2322aedb99b38fffd7da95a494d8ed Mon Sep 17 00:00:00 2001
-From: He Zhe <zhe.he@windriver.com>
-Date: Thu, 29 Jun 2017 08:26:35 +0000
-Subject: [PATCH] red_parse_qxl: Fix BITMAP_FMT_IS_RGB defined but not used
-
-| ../../git/server/red_parse_qxl.c:367:18: error: 'BITMAP_FMT_IS_RGB'
-defined but not used [-Werror=unused-const-variable=]
-|  static const int BITMAP_FMT_IS_RGB[] = {0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1};
-
-Signed-off-by: He Zhe <zhe.he@windriver.com>
----
- server/red_parse_qxl.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/server/red_parse_qxl.c b/server/red_parse_qxl.c
-index 6c0b0658..cfc2da95 100644
---- a/server/red_parse_qxl.c
-+++ b/server/red_parse_qxl.c
-@@ -364,7 +364,6 @@ static int bitmap_consistent(SpiceBitmap *bitmap)
- 
- // This is based on SPICE_BITMAP_FMT_*, copied from server/red_worker.c
- // to avoid a possible unoptimization from making it non static.
--static const int BITMAP_FMT_IS_RGB[] = {0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1};
- 
- static SpiceImage *red_get_image(RedMemSlotInfo *slots, int group_id,
-                                  QXLPHYSICAL addr, uint32_t flags, int is_mask)
--- 
-2.11.0
-
diff --git a/meta-networking/recipes-support/spice/files/0001-spice-compile-warnings.m4-don-t-define-FORITFY_SOURC.patch b/meta-networking/recipes-support/spice/files/0001-spice-compile-warnings.m4-don-t-define-FORITFY_SOURC.patch
deleted file mode 100644
index 666960566b..0000000000
--- a/meta-networking/recipes-support/spice/files/0001-spice-compile-warnings.m4-don-t-define-FORITFY_SOURC.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From bf85d26f0326d4ea20429c29fd408703ee5bad54 Mon Sep 17 00:00:00 2001
-From: Martin Jansa <Martin.Jansa@gmail.com>
-Date: Wed, 13 Sep 2017 15:53:02 +0200
-Subject: [PATCH] spice-compile-warnings.m4: don't define FORITFY_SOURCES
-
-* otherwise fails when the native gcc already defines
-  FORTIFY_SOURCES (e.g. in gentoo).
-  | In file included from ../../git/server/inputs_channel.c:19:0:
-  | ../config.h:17:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
-  |  # define _FORTIFY_SOURCE 2
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- m4/spice-compile-warnings.m4 | 7 -------
- 1 file changed, 7 deletions(-)
-
-diff --git a/m4/spice-compile-warnings.m4 b/m4/spice-compile-warnings.m4
-index 959971a2..55352ad6 100644
---- a/m4/spice-compile-warnings.m4
-+++ b/m4/spice-compile-warnings.m4
-@@ -109,13 +109,6 @@ AC_DEFUN([SPICE_COMPILE_WARNINGS],[
-     # This should be < 1024 really. pixman_utils is the blackspot
-     # preventing lower usage
-     gl_WARN_ADD([-Wframe-larger-than=20460])
--
--    # Use improved glibc headers
--    AH_VERBATIM([FORTIFY_SOURCE],
--    [/* Enable compile-time and run-time bounds-checking, and some warnings. */
--#if __OPTIMIZE__
--# define _FORTIFY_SOURCE 2
--#endif
- ])
- 
-     # Extra special flags
--- 
-2.14.1
-
diff --git a/meta-networking/recipes-support/spice/files/Fix-build-issues-with-gcc-7.patch b/meta-networking/recipes-support/spice/files/Fix-build-issues-with-gcc-7.patch
deleted file mode 100644
index 7fcafdc7ef..0000000000
--- a/meta-networking/recipes-support/spice/files/Fix-build-issues-with-gcc-7.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 9f001b6818ac4baa1df010ccf4200ca56bfb11b2 Mon Sep 17 00:00:00 2001
-From: Mark Asselstine <mark.asselstine@windriver.com>
-Date: Wed, 23 Aug 2017 13:47:29 -0400
-Subject: [PATCH] Fix build issues with gcc 7
-
-gcc 7 checks for when a switch statement doesn't break between
-cases. When a break is not found you will see
-
-| ../../git/server/reds.c: In function 'vdi_port_read_one_msg_from_device':
-| ../../git/server/reds.c:797:31: error: this statement may fall through [-Werror=implicit-fallthrough=]
-|              state->read_state = VDI_PORT_READ_STATE_GET_BUFF;
-|              ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-| ../../git/server/reds.c:798:9: note: here
-|          case VDI_PORT_READ_STATE_GET_BUFF: {
-|          ^~~~
-
-The 'fallthrough' comment will let gcc know this is done on purpose.
-
-Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
----
- server/inputs_channel.c | 1 +
- server/reds.c           | 2 ++
- 2 files changed, 3 insertions(+)
-
-diff --git a/server/inputs_channel.c b/server/inputs_channel.c
-index 931dac1..534ab66 100644
---- a/server/inputs_channel.c
-+++ b/server/inputs_channel.c
-@@ -321,6 +321,7 @@ static int inputs_channel_handle_parsed(RedChannelClient *rcc, uint32_t size, ui
-             activate_modifiers_watch();
-         }
-     }
-+        /* fallthrough */
-     case SPICE_MSGC_INPUTS_KEY_UP: {
-         SpiceMsgcKeyDown *key_down = (SpiceMsgcKeyDown *)buf;
-         for (i = 0; i < 4; i++) {
-diff --git a/server/reds.c b/server/reds.c
-index 30d0652..8c80eb6 100644
---- a/server/reds.c
-+++ b/server/reds.c
-@@ -795,6 +795,7 @@ static SpiceCharDeviceMsgToClient *vdi_port_read_one_msg_from_device(SpiceCharDe
-             }
-             state->message_recive_len = state->vdi_chunk_header.size;
-             state->read_state = VDI_PORT_READ_STATE_GET_BUFF;
-+            /* fallthrough */
-         case VDI_PORT_READ_STATE_GET_BUFF: {
-             if (!(state->current_read_buf = vdi_port_read_buf_get())) {
-                 return NULL;
-@@ -806,6 +807,7 @@ static SpiceCharDeviceMsgToClient *vdi_port_read_one_msg_from_device(SpiceCharDe
-             state->message_recive_len -= state->recive_len;
-             state->read_state = VDI_PORT_READ_STATE_READ_DATA;
-         }
-+            /* fallthrough */
-         case VDI_PORT_READ_STATE_READ_DATA:
-             n = sif->read(vdagent, state->recive_pos, state->recive_len);
-             if (!n) {
--- 
-2.7.4
-
diff --git a/meta-networking/recipes-support/spice/files/build-allow-separated-src-and-build-dirs.patch b/meta-networking/recipes-support/spice/files/build-allow-separated-src-and-build-dirs.patch
deleted file mode 100644
index 9cbbff9b64..0000000000
--- a/meta-networking/recipes-support/spice/files/build-allow-separated-src-and-build-dirs.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 7d0d0ff080b159e647ebb26c337cb75314d64b52 Mon Sep 17 00:00:00 2001
-From: Mark Asselstine <mark.asselstine@windriver.com>
-Date: Thu, 1 May 2014 12:09:16 -0400
-Subject: [PATCH] build: allow separated src and build dirs
-
-We need to expland the list of include dirs to include the build dir since
-generated files will be created there instead of in the src dir.
-
-We also don't want to force using $srcdir for generated files as this will
-allow them to be created in the build dir. We account for the slight
-deviation in the generated files with expanded include paths.
-
-Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
----
- configure.ac | 2 +-
- spice-common/common/Makefile.am | 14 +++++++-------
- 2 file changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index edda8e9..9151fcb 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -165,7 +165,7 @@ dnl =========================================================================
- dnl Check deps
- 
- AC_CONFIG_SUBDIRS([spice-common])
--COMMON_CFLAGS='-I ${top_srcdir}/spice-common/ -I ${top_srcdir}/spice-common/spice-protocol/'
-+COMMON_CFLAGS='-I ${top_srcdir}/spice-common/ -I ${top_srcdir}/spice-common/common/ -I ${top_srcdir}/spice-common/spice-protocol/ -I ${top_builddir}/spice-common/'
- AC_SUBST(COMMON_CFLAGS)
- 
- AC_CHECK_LIBM
-diff --git a/spice-common/common/Makefile.am b/spice-common/common/Makefile.am
-index 45568c6..4c65ac4 100644
---- a/spice-common/common/Makefile.am
-+++ b/spice-common/common/Makefile.am
-@@ -2,16 +2,16 @@ NULL =
- 
- # Avoid need for python(pyparsing) by end users
- CLIENT_MARSHALLERS =					\
--	$(srcdir)/generated_client_demarshallers.c	\
--	$(srcdir)/generated_client_demarshallers1.c	\
--	$(srcdir)/generated_client_marshallers.c	\
--	$(srcdir)/generated_client_marshallers1.c	\
-+	generated_client_demarshallers.c	\
-+	generated_client_demarshallers1.c	\
-+	generated_client_marshallers.c	\
-+	generated_client_marshallers1.c	\
- 	$(NULL)
- 
- SERVER_MARSHALLERS =					\
--	$(srcdir)/generated_server_demarshallers.c	\
--	$(srcdir)/generated_server_marshallers.c	\
--	$(srcdir)/generated_server_marshallers.h	\
-+	generated_server_demarshallers.c	\
-+	generated_server_marshallers.c	\
-+	generated_server_marshallers.h	\
- 	$(NULL)
- 
- BUILT_SOURCES = $(CLIENT_MARSHALLERS) $(SERVER_MARSHALLERS) $(top_srcdir)/spice-protocol/spice/enums.h
--- 
-1.8.3.2
-
diff --git a/meta-networking/recipes-support/spice/files/configure.ac-add-subdir-objects-to-AM_INIT_AUTOMAKE.patch b/meta-networking/recipes-support/spice/files/configure.ac-add-subdir-objects-to-AM_INIT_AUTOMAKE.patch
deleted file mode 100644
index 323ef52f8b..0000000000
--- a/meta-networking/recipes-support/spice/files/configure.ac-add-subdir-objects-to-AM_INIT_AUTOMAKE.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 36efb79076420975f7fa7aa0b03a1fc282291b05 Mon Sep 17 00:00:00 2001
-From: Mark Asselstine <mark.asselstine@windriver.com>
-Date: Tue, 25 Mar 2014 15:23:25 -0400
-Subject: [PATCH] configure.ac: add subdir-objects to AM_INIT_AUTOMAKE
-
-Without this you will get subdir-objects error which will cause
-autoreconf to complete successfully.
-
-Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
----
- spice-common/configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/spice-common/configure.ac b/spice-common/configure.ac
-index b5cb960..78f1360 100644
---- a/spice-common/configure.ac
-+++ b/spice-common/configure.ac
-@@ -13,7 +13,7 @@ AC_CONFIG_AUX_DIR([build-aux])
- m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
- 
- # Checks for programs
--AM_INIT_AUTOMAKE([1.11 dist-xz no-dist-gzip tar-ustar foreign -Wall -Werror])
-+AM_INIT_AUTOMAKE([1.11 dist-xz no-dist-gzip tar-ustar foreign subdir-objects -Wall -Werror])
- AM_MAINTAINER_MODE
- AM_SILENT_RULES([yes])
- LT_INIT
--- 
-1.8.3.2
-
diff --git a/meta-networking/recipes-support/spice/files/spice-fix-CVE-2013-4282.patch b/meta-networking/recipes-support/spice/files/spice-fix-CVE-2013-4282.patch
deleted file mode 100644
index 1a00a85185..0000000000
--- a/meta-networking/recipes-support/spice/files/spice-fix-CVE-2013-4282.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-Fix buffer overflow when decrypting client SPICE ticket
-
-commit 8af619009660b24e0b41ad26b30289eea288fcc2     upstream
-
-reds_handle_ticket uses a fixed size 'password' buffer for the decrypted
-password whose size is SPICE_MAX_PASSWORD_LENGTH. However,
-RSA_private_decrypt which we call for the decryption expects the
-destination buffer to be at least RSA_size(link->tiTicketing.rsa)
-bytes long. On my spice-server build, SPICE_MAX_PASSWORD_LENGTH
-is 60 while RSA_size() is 128, so we end up overflowing 'password'
-when using long passwords (this was reproduced using the string:
-'fullscreen=1proxy=#enter proxy here; e.g spice_proxy = http://[proxy]:[port]'
-as a password).
-
-When the overflow occurs, QEMU dies with:
-*** stack smashing detected ***: qemu-system-x86_64 terminated
-
-This commit ensures we use a corectly sized 'password' buffer,
-and that it's correctly nul-terminated so that we can use strcmp
-instead of strncmp. To keep using strncmp, we'd need to figure out
-which one of 'password' and 'taTicket.password' is the smaller buffer,
-and use that size.
-
-This fixes rhbz#999839
-diff --git a/server/reds.c b/server/reds.c
-index 30d0652..6f262b0 100644
---- a/server/reds.c
-+++ b/server/reds.c
-@@ -1931,39 +1931,59 @@ static void reds_handle_link(RedLinkInfo *link)
- static void reds_handle_ticket(void *opaque)
- {
-     RedLinkInfo *link = (RedLinkInfo *)opaque;
--    char password[SPICE_MAX_PASSWORD_LENGTH];
-+    char *password;
-     time_t ltime;
-+    int password_size;
- 
-     //todo: use monotonic time
-     time(&ltime);
--    RSA_private_decrypt(link->tiTicketing.rsa_size,
--                        link->tiTicketing.encrypted_ticket.encrypted_data,
--                        (unsigned char *)password, link->tiTicketing.rsa, RSA_PKCS1_OAEP_PADDING);
-+    if (RSA_size(link->tiTicketing.rsa) < SPICE_MAX_PASSWORD_LENGTH) {
-+        spice_warning("RSA modulus size is smaller than SPICE_MAX_PASSWORD_LENGTH (%d < %d), "
-+                      "SPICE ticket sent from client may be truncated",
-+                      RSA_size(link->tiTicketing.rsa), SPICE_MAX_PASSWORD_LENGTH);
-+    }
-+
-+    password = g_malloc0(RSA_size(link->tiTicketing.rsa) + 1);
-+    password_size = RSA_private_decrypt(link->tiTicketing.rsa_size,
-+                                        link->tiTicketing.encrypted_ticket.encrypted_data,
-+                                        (unsigned char *)password,
-+                                        link->tiTicketing.rsa,
-+                                        RSA_PKCS1_OAEP_PADDING);
-+    if (password_size == -1) {
-+        spice_warning("failed to decrypt RSA encrypted password: %s",
-+                      ERR_error_string(ERR_get_error(), NULL));
-+        goto error;
-+    }
-+    password[password_size] = '\0';
- 
-     if (ticketing_enabled && !link->skip_auth) {
-         int expired =  taTicket.expiration_time < ltime;
- 
-         if (strlen(taTicket.password) == 0) {
--            reds_send_link_result(link, SPICE_LINK_ERR_PERMISSION_DENIED);
-             spice_warning("Ticketing is enabled, but no password is set. "
--                        "please set a ticket first");
--            reds_link_free(link);
--            return;
-+                          "please set a ticket first");
-+            goto error;
-         }
- 
--        if (expired || strncmp(password, taTicket.password, SPICE_MAX_PASSWORD_LENGTH) != 0) {
-+        if (expired || strcmp(password, taTicket.password) != 0) {
-             if (expired) {
-                 spice_warning("Ticket has expired");
-             } else {
-                 spice_warning("Invalid password");
-             }
--            reds_send_link_result(link, SPICE_LINK_ERR_PERMISSION_DENIED);
--            reds_link_free(link);
--            return;
-+            goto error;
-         }
-     }
- 
-     reds_handle_link(link);
-+    goto end;
-+
-+error:
-+    reds_send_link_result(link, SPICE_LINK_ERR_PERMISSION_DENIED);
-+    reds_link_free(link);
-+
-+end:
-+    g_free(password);
- }
- 
- static inline void async_read_clear_handlers(AsyncRead *obj)
diff --git a/meta-networking/recipes-support/spice/spice-protocol_git.bb b/meta-networking/recipes-support/spice/spice-protocol_git.bb
new file mode 100644
index 0000000000..1405985edf
--- /dev/null
+++ b/meta-networking/recipes-support/spice/spice-protocol_git.bb
@@ -0,0 +1,32 @@
+#
+# Copyright (C) 2013 Wind River Systems, Inc.
+#
+
+SUMMARY = "Simple Protocol for Independent Computing Environments"
+DESCRIPTION = "SPICE (the Simple Protocol for Independent Computing \
+Environments) is a remote-display system built for virtual \
+environments which allows users to view a computing 'desktop' \ 
+environment - not only on its computer-server machine, but also from \
+anywhere on the Internet and using a wide variety of machine \
+architectures."
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b37311cb5604f3e5cc2fb0fd23527e95"
+
+PV = "0.12.13+git${SRCPV}"
+
+SRCREV_spice-protocol = "8dda82b49d8f848a25e3a1ef6df943276c59e462"
+#SRCREV_spice-common = "70d4739ce2f90f904fa96e22e438e9b424a3dd42"
+
+#SRCREV_FORMAT = "spice-protocol_spice-common"
+
+SRC_URI = " \
+    git://anongit.freedesktop.org/spice/spice-protocol;name=spice-protocol \
+"
+#   git://anongit.freedesktop.org/spice/spice-common;destsuffix=git/spice-common;name=spice-common 
+
+S = "${WORKDIR}/git"
+
+inherit autotools gettext pkgconfig
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-networking/recipes-support/spice/spice/0001-build-allow-separated-src-and-build-dirs.patch b/meta-networking/recipes-support/spice/spice/0001-build-allow-separated-src-and-build-dirs.patch
new file mode 100644
index 0000000000..8d246cc7f3
--- /dev/null
+++ b/meta-networking/recipes-support/spice/spice/0001-build-allow-separated-src-and-build-dirs.patch
@@ -0,0 +1,33 @@
+From 812a1a099cc48edcf1280fc329bf5330237f3cc2 Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <mark.asselstine@windriver.com>
+Date: Thu, 1 May 2014 12:09:16 -0400
+Subject: [PATCH] build: allow separated src and build dirs
+
+We need to expland the list of include dirs to include the build dir since
+generated files will be created there instead of in the src dir.
+
+We also don't want to force using $srcdir for generated files as this will
+allow them to be created in the build dir. We account for the slight
+deviation in the generated files with expanded include paths.
+
+Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 483dbfdf..7d990aaa 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -138,7 +138,7 @@ dnl =========================================================================
+ dnl Check deps
+ 
+ AC_CONFIG_SUBDIRS([spice-common])
+-COMMON_CFLAGS='-I ${top_srcdir}/spice-common/ -I ${top_builddir}/spice-common/'
++COMMON_CFLAGS='-I ${top_srcdir}/spice-common/ -I ${top_srcdir}/spice-common/common/ -I ${top_srcdir}/spice-common/spice-protocol/ -I ${top_builddir}/spice-common/'
+ COMMON_CFLAGS="$COMMON_CFLAGS -DG_LOG_DOMAIN=\\\"Spice\\\""
+ AC_SUBST(COMMON_CFLAGS)
+ 
+-- 
+2.14.1
+
diff --git a/meta-networking/recipes-support/spice/spice_git.bb b/meta-networking/recipes-support/spice/spice_git.bb
index dfe4613641..1b65d6fd72 100644
--- a/meta-networking/recipes-support/spice/spice_git.bb
+++ b/meta-networking/recipes-support/spice/spice_git.bb
@@ -13,39 +13,26 @@ architectures."
 LICENSE = "BSD & LGPLv2.1+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
 
-PV = "0.12.4+git${SRCPV}"
+PV = "0.13.90+git${SRCPV}"
 
-# Actual versions based on the checkouts below
-# spice = "0.12.4"
-# common = "0.12.6"
-# protocol = "0.12.6"
-SRCREV_spice = "b270fb010a3ddb432dfe6b15e4bdffa6ac086cd0"
-SRCREV_spice-common = "fe93908238196bd632287fc9875e6f2e11105d04"
-SRCREV_spice-protocol = "784407f248e7f99d2bfcc9368f9acd1efb2b9617"
+SRCREV_spice = "2c1037f47c37899842b1696bbab0d3a4ed6c7b09"
+SRCREV_spice-common = "70d4739ce2f90f904fa96e22e438e9b424a3dd42"
 
-SRCREV_FORMAT = "spice_spice-common_spice-protocol"
+SRCREV_FORMAT = "spice_spice-common"
 
 SRC_URI = " \
     git://anongit.freedesktop.org/spice/spice;name=spice \
     git://anongit.freedesktop.org/spice/spice-common;destsuffix=git/spice-common;name=spice-common \
-    git://anongit.freedesktop.org/spice/spice-protocol;destsuffix=git/spice-common/spice-protocol;name=spice-protocol \
 "
-
-SRC_URI += " \
-    file://spice-fix-CVE-2013-4282.patch \
-    file://configure.ac-add-subdir-objects-to-AM_INIT_AUTOMAKE.patch \
-    file://build-allow-separated-src-and-build-dirs.patch \
-    file://0001-red_parse_qxl-Fix-BITMAP_FMT_IS_RGB-defined-but-not-.patch \
-    file://0001-Use-PRI-macros-in-printf-to-keep-compatibility-betwe.patch \
-    file://Fix-build-issues-with-gcc-7.patch \
-    file://0001-spice-compile-warnings.m4-don-t-define-FORITFY_SOURC.patch \
+FOO = "\
+    file://0001-build-allow-separated-src-and-build-dirs.patch \
 "
 
 S = "${WORKDIR}/git"
 
 inherit autotools gettext pythonnative python-dir pkgconfig
 
-DEPENDS += "celt051 jpeg pixman alsa-lib glib-2.0 python-pyparsing-native"
+DEPENDS += "spice-protocol jpeg pixman alsa-lib glib-2.0 python-pyparsing-native python-six-native glib-2.0-native"
 DEPENDS_append_class-nativesdk = "nativesdk-openssl"
 
 export PYTHON="${STAGING_BINDIR_NATIVE}/python-native/python"
@@ -55,6 +42,7 @@ PACKAGECONFIG_class-native = ""
 PACKAGECONFIG_class-nativesdk = ""
 PACKAGECONFIG ?= "sasl"
 
+PACKAGECONFIG[celt051] = "--enable-celt051,--disable-celt051,celt051"
 PACKAGECONFIG[smartcard] = "--enable-smartcard,--disable-smartcard,libcacard,"
 PACKAGECONFIG[sasl] = "--with-sasl,--without-sasl,cyrus-sasl,"
 PACKAGECONFIG[client] = "--enable-client,--disable-client,,"
@@ -62,21 +50,6 @@ PACKAGECONFIG[gui] = "--enable-gui,--disable-gui,,"
 PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl,,"
 PACKAGECONFIG[xinerama] = "--enable-xinerama,--disable-xinerama,libxinerama,"
 
-PACKAGES =+ "${PN}-protocol"
-LICENSE_${PN}-protocol = "BSD"
-FILES_${PN}-protocol += "${includedir}/spice-1"
-FILES_${PN}-protocol += "${datadir}/pkgconfig"
-
-do_configure_prepend() {
-    mkdir -p ${S}/spice-common/spice-protocol/m4
-}
-
-do_install_append() {
-    cd ${B}/spice-common/spice-protocol
-    oe_runmake DESTDIR="${D}" install
-    cd -
-}
-
 COMPATIBLE_HOST = '(x86_64|i.86).*-linux'
 
 BBCLASSEXTEND = "native nativesdk"
-- 
2.17.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [meta-networking][PATCH 5/9] usbredir: add new recipe
  2018-05-11 19:21 [meta-networking][PATCH 1/9] spice: import from meta-cloud-services Martin Jansa
                   ` (2 preceding siblings ...)
  2018-05-11 19:21 ` [meta-networking][PATCH 4/9] spice: upgrade to 0.13.90 version Martin Jansa
@ 2018-05-11 19:21 ` Martin Jansa
  2018-05-11 19:21 ` [meta-networking][PATCH 6/9] celt051: import from meta-cloud-services Martin Jansa
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Martin Jansa @ 2018-05-11 19:21 UTC (permalink / raw)
  To: openembedded-devel

* can be used by qemu to redirect usb devices from virt-manager to qemu

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 .../recipes-support/spice/usbredir_git.bb     | 21 +++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 meta-networking/recipes-support/spice/usbredir_git.bb

diff --git a/meta-networking/recipes-support/spice/usbredir_git.bb b/meta-networking/recipes-support/spice/usbredir_git.bb
new file mode 100644
index 0000000000..3fea7528e5
--- /dev/null
+++ b/meta-networking/recipes-support/spice/usbredir_git.bb
@@ -0,0 +1,21 @@
+SUMMARY = "usbredir libraries and utilities"
+
+LICENSE = "GPLv2+ & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+    file://COPYING.LIB;md5=4b54a1fd55a448865a0b32d41598759d \
+"
+
+DEPENDS = "libusb1"
+
+SRCREV = "39aa3c69f61bba28856a3eef3fe4ab37a3968e88"
+PV = "0.7.1+git${SRCPV}"
+
+SRC_URI = " \
+    git://anongit.freedesktop.org/spice/usbredir \
+"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+
+BBCLASSEXTEND = "native nativesdk"
-- 
2.17.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [meta-networking][PATCH 6/9] celt051: import from meta-cloud-services
  2018-05-11 19:21 [meta-networking][PATCH 1/9] spice: import from meta-cloud-services Martin Jansa
                   ` (3 preceding siblings ...)
  2018-05-11 19:21 ` [meta-networking][PATCH 5/9] usbredir: add new recipe Martin Jansa
@ 2018-05-11 19:21 ` Martin Jansa
  2018-05-11 19:21 ` [meta-networking][PATCH 7/9] celt051: make ogg support optional Martin Jansa
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Martin Jansa @ 2018-05-11 19:21 UTC (permalink / raw)
  To: openembedded-devel

* needed for spice

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 .../recipes-support/celt051/celt051_git.bb    | 30 +++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 meta-networking/recipes-support/celt051/celt051_git.bb

diff --git a/meta-networking/recipes-support/celt051/celt051_git.bb b/meta-networking/recipes-support/celt051/celt051_git.bb
new file mode 100644
index 0000000000..ee3882148e
--- /dev/null
+++ b/meta-networking/recipes-support/celt051/celt051_git.bb
@@ -0,0 +1,30 @@
+#
+# Copyright (C) 2013 Wind River Systems, Inc.
+#
+
+SUMMARY = "The CELT codec is a compression algorithm for audio"
+DESCRIPTION = "The CELT codec is a compression algorithm for \
+audio. Like MP3, Vorbis, and AAC it is suitable for transmitting music \
+with high quality. Unlike these formats CELT imposes very little delay \
+on the signal, even less than is typical for speech centric formats \
+like Speex, GSM, or G.729."
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=375f60ab360d17f0172737036ff155b2"
+
+PV = "0.5.1.3"
+PR = "r0"
+
+SRCREV = "5555aae843f57241d005e330b9cb65602d56db0f"
+
+SRC_URI = "git://git.xiph.org/celt.git;branch=compat-v0.5.1;protocol=https"
+
+S = "${WORKDIR}/git"
+
+DEPENDS += "libogg"
+
+inherit pkgconfig autotools-brokensep
+
+PACKAGECONFIG = ""
+
+PACKAGECONFIG[ogg] = "--with-ogg --enable-oggtest,--without-ogg --disable-oggtest,,"
-- 
2.17.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [meta-networking][PATCH 7/9] celt051: make ogg support optional
  2018-05-11 19:21 [meta-networking][PATCH 1/9] spice: import from meta-cloud-services Martin Jansa
                   ` (4 preceding siblings ...)
  2018-05-11 19:21 ` [meta-networking][PATCH 6/9] celt051: import from meta-cloud-services Martin Jansa
@ 2018-05-11 19:21 ` Martin Jansa
  2018-05-11 19:21 ` [meta-networking][PATCH 8/9] spice: fix nativesdk build with security-flags included Martin Jansa
  2018-05-11 19:21 ` [meta-networking][PATCH 9/9] spice: use latest version Martin Jansa
  7 siblings, 0 replies; 10+ messages in thread
From: Martin Jansa @ 2018-05-11 19:21 UTC (permalink / raw)
  To: openembedded-devel

* drop PR
* add +git to PV
* and support for native and nativesdk needed for spice
* the old PACKAGECONFIG didn't work, because both options aren't
  recognized as shown by do_configure warning:
  configure: WARNING: unrecognized options: --without-ogg, --disable-oggtest
* XIPH_PATH_OGG macro is provided by libogg so we cannot call it without
  the libogg dependency, so replace it with explicit --enable-tools

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 ...igure.ac-make-tools-support-optional.patch | 39 +++++++++++++++++++
 .../recipes-support/celt051/celt051_git.bb    | 16 ++++----
 2 files changed, 48 insertions(+), 7 deletions(-)
 create mode 100644 meta-networking/recipes-support/celt051/celt051/0001-configure.ac-make-tools-support-optional.patch

diff --git a/meta-networking/recipes-support/celt051/celt051/0001-configure.ac-make-tools-support-optional.patch b/meta-networking/recipes-support/celt051/celt051/0001-configure.ac-make-tools-support-optional.patch
new file mode 100644
index 0000000000..b0809ee947
--- /dev/null
+++ b/meta-networking/recipes-support/celt051/celt051/0001-configure.ac-make-tools-support-optional.patch
@@ -0,0 +1,39 @@
+From 86df4200c9c33d999df0e8cc3c9771f17a297ec4 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Wed, 13 Sep 2017 15:01:54 +0200
+Subject: [PATCH] configure.ac: make tools support optional
+
+* add --enable-tools option
+* XIPH_PATH_OGG macro is provided by libogg so we cannot call
+  it without the libogg dependency
+
+Upstream-Status: Pending
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ configure.ac | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index d4b1a3f..7d6b2dc 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -68,8 +68,14 @@ AC_MSG_RESULT($has_alloca)
+ 
+ AC_CHECK_HEADERS(sys/soundcard.h sys/audioio.h)
+ 
+-XIPH_PATH_OGG([tools="tools"], [tools=""])
++AC_ARG_ENABLE(tools, [  --enable-tools          Compile ogg tools],
++[if test "$enableval" = yes; then
++  [tools="tools"]
++else
++  [tools=""]
++fi],
+ AC_SUBST(tools)
++)
+ 
+ AC_CHECK_LIB(m, sin)
+ 
+-- 
+2.14.1
+
diff --git a/meta-networking/recipes-support/celt051/celt051_git.bb b/meta-networking/recipes-support/celt051/celt051_git.bb
index ee3882148e..850704f5af 100644
--- a/meta-networking/recipes-support/celt051/celt051_git.bb
+++ b/meta-networking/recipes-support/celt051/celt051_git.bb
@@ -12,19 +12,21 @@ like Speex, GSM, or G.729."
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://COPYING;md5=375f60ab360d17f0172737036ff155b2"
 
-PV = "0.5.1.3"
-PR = "r0"
+PV = "0.5.1.3+git${SRCPV}"
 
 SRCREV = "5555aae843f57241d005e330b9cb65602d56db0f"
 
-SRC_URI = "git://git.xiph.org/celt.git;branch=compat-v0.5.1;protocol=https"
+SRC_URI = "git://git.xiph.org/celt.git;branch=compat-v0.5.1;protocol=https \
+    file://0001-configure.ac-make-tools-support-optional.patch \
+"
 
 S = "${WORKDIR}/git"
 
-DEPENDS += "libogg"
-
 inherit pkgconfig autotools-brokensep
 
-PACKAGECONFIG = ""
+PACKAGECONFIG_class-native = ""
+PACKAGECONFIG ??= ""
+
+PACKAGECONFIG[ogg] = "--enable-tools,--disable-tools,libogg,"
 
-PACKAGECONFIG[ogg] = "--with-ogg --enable-oggtest,--without-ogg --disable-oggtest,,"
+BBCLASSEXTEND = "native nativesdk"
-- 
2.17.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [meta-networking][PATCH 8/9] spice: fix nativesdk build with security-flags included
  2018-05-11 19:21 [meta-networking][PATCH 1/9] spice: import from meta-cloud-services Martin Jansa
                   ` (5 preceding siblings ...)
  2018-05-11 19:21 ` [meta-networking][PATCH 7/9] celt051: make ogg support optional Martin Jansa
@ 2018-05-11 19:21 ` Martin Jansa
  2018-05-11 21:27   ` Martin Jansa
  2018-05-11 19:21 ` [meta-networking][PATCH 9/9] spice: use latest version Martin Jansa
  7 siblings, 1 reply; 10+ messages in thread
From: Martin Jansa @ 2018-05-11 19:21 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta-networking/recipes-support/spice/spice_git.bb | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta-networking/recipes-support/spice/spice_git.bb b/meta-networking/recipes-support/spice/spice_git.bb
index 1b65d6fd72..257159f374 100644
--- a/meta-networking/recipes-support/spice/spice_git.bb
+++ b/meta-networking/recipes-support/spice/spice_git.bb
@@ -35,6 +35,10 @@ inherit autotools gettext pythonnative python-dir pkgconfig
 DEPENDS += "spice-protocol jpeg pixman alsa-lib glib-2.0 python-pyparsing-native python-six-native glib-2.0-native"
 DEPENDS_append_class-nativesdk = "nativesdk-openssl"
 
+# Otherwise nativesdk-spice fails like this:
+# http://errors.yoctoproject.org/Errors/Details/164866/
+LDFLAGS_append_class-nativesdk = " -lssp"
+
 export PYTHON="${STAGING_BINDIR_NATIVE}/python-native/python"
 export PYTHONPATH="${PKG_CONFIG_SYSROOT_DIR}${libdir}/python2.7/site-packages"
 
-- 
2.17.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [meta-networking][PATCH 9/9] spice: use latest version
  2018-05-11 19:21 [meta-networking][PATCH 1/9] spice: import from meta-cloud-services Martin Jansa
                   ` (6 preceding siblings ...)
  2018-05-11 19:21 ` [meta-networking][PATCH 8/9] spice: fix nativesdk build with security-flags included Martin Jansa
@ 2018-05-11 19:21 ` Martin Jansa
  7 siblings, 0 replies; 10+ messages in thread
From: Martin Jansa @ 2018-05-11 19:21 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 .../recipes-support/spice/spice-protocol_git.bb           | 8 ++------
 meta-networking/recipes-support/spice/spice_git.bb        | 6 +++---
 2 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/meta-networking/recipes-support/spice/spice-protocol_git.bb b/meta-networking/recipes-support/spice/spice-protocol_git.bb
index 1405985edf..30d0a76752 100644
--- a/meta-networking/recipes-support/spice/spice-protocol_git.bb
+++ b/meta-networking/recipes-support/spice/spice-protocol_git.bb
@@ -15,15 +15,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b37311cb5604f3e5cc2fb0fd23527e95"
 
 PV = "0.12.13+git${SRCPV}"
 
-SRCREV_spice-protocol = "8dda82b49d8f848a25e3a1ef6df943276c59e462"
-#SRCREV_spice-common = "70d4739ce2f90f904fa96e22e438e9b424a3dd42"
-
-#SRCREV_FORMAT = "spice-protocol_spice-common"
+SRCREV = "87441524f4e7b79658e42bd8f1f6c3e3c8649aa5"
 
 SRC_URI = " \
-    git://anongit.freedesktop.org/spice/spice-protocol;name=spice-protocol \
+    git://anongit.freedesktop.org/spice/spice-protocol \
 "
-#   git://anongit.freedesktop.org/spice/spice-common;destsuffix=git/spice-common;name=spice-common 
 
 S = "${WORKDIR}/git"
 
diff --git a/meta-networking/recipes-support/spice/spice_git.bb b/meta-networking/recipes-support/spice/spice_git.bb
index 257159f374..8fb5bd2715 100644
--- a/meta-networking/recipes-support/spice/spice_git.bb
+++ b/meta-networking/recipes-support/spice/spice_git.bb
@@ -13,10 +13,10 @@ architectures."
 LICENSE = "BSD & LGPLv2.1+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
 
-PV = "0.13.90+git${SRCPV}"
+PV = "0.14.0+git${SRCPV}"
 
-SRCREV_spice = "2c1037f47c37899842b1696bbab0d3a4ed6c7b09"
-SRCREV_spice-common = "70d4739ce2f90f904fa96e22e438e9b424a3dd42"
+SRCREV_spice = "2a3d5624382ba49c4eb906e69697b92f79d06cf4"
+SRCREV_spice-common = "4c2d0e977272c5540634d24f485dd64c424f6748"
 
 SRCREV_FORMAT = "spice_spice-common"
 
-- 
2.17.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [meta-networking][PATCH 8/9] spice: fix nativesdk build with security-flags included
  2018-05-11 19:21 ` [meta-networking][PATCH 8/9] spice: fix nativesdk build with security-flags included Martin Jansa
@ 2018-05-11 21:27   ` Martin Jansa
  0 siblings, 0 replies; 10+ messages in thread
From: Martin Jansa @ 2018-05-11 21:27 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 1810 bytes --]

On Fri, May 11, 2018 at 07:21:44PM +0000, Martin Jansa wrote:
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>

this isn't working (and isn't needed) with latest glibc changes from:
http://lists.openembedded.org/pipermail/openembedded-core/2018-May/150436.html

please drop this one from the series


Instead of this I had to add:
# git/server/event-loop.c:146:42: error: cast between incompatible function types from 'gboolean (*)(GIOChannel *, GIOCondition,  void *)' {aka 'int (*)(struct _GIOChannel *, enum <anonymous>,  void *)'} to 'gboolean (*)(void *)' {aka 'int (*)(void *)'} [-Werror=cast-function-type]
EXTRA_OECONF_append_class-nativesdk = " --disable-werror"

as temporary work around to test nativesdk-spice with gcc-8.1.

> ---
>  meta-networking/recipes-support/spice/spice_git.bb | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/meta-networking/recipes-support/spice/spice_git.bb b/meta-networking/recipes-support/spice/spice_git.bb
> index 1b65d6fd72..257159f374 100644
> --- a/meta-networking/recipes-support/spice/spice_git.bb
> +++ b/meta-networking/recipes-support/spice/spice_git.bb
> @@ -35,6 +35,10 @@ inherit autotools gettext pythonnative python-dir pkgconfig
>  DEPENDS += "spice-protocol jpeg pixman alsa-lib glib-2.0 python-pyparsing-native python-six-native glib-2.0-native"
>  DEPENDS_append_class-nativesdk = "nativesdk-openssl"
>  
> +# Otherwise nativesdk-spice fails like this:
> +# http://errors.yoctoproject.org/Errors/Details/164866/
> +LDFLAGS_append_class-nativesdk = " -lssp"
> +
>  export PYTHON="${STAGING_BINDIR_NATIVE}/python-native/python"
>  export PYTHONPATH="${PKG_CONFIG_SYSROOT_DIR}${libdir}/python2.7/site-packages"
>  
> -- 
> 2.17.0
> 

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 201 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-05-11 21:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-11 19:21 [meta-networking][PATCH 1/9] spice: import from meta-cloud-services Martin Jansa
2018-05-11 19:21 ` [meta-networking][PATCH 2/9] spice: fix dependency on python-pyparsing, add support for native(sdk) Martin Jansa
2018-05-11 19:21 ` [meta-networking][PATCH 3/9] spice: fix build with FORTIFY_SOURCES already defined in native gcc Martin Jansa
2018-05-11 19:21 ` [meta-networking][PATCH 4/9] spice: upgrade to 0.13.90 version Martin Jansa
2018-05-11 19:21 ` [meta-networking][PATCH 5/9] usbredir: add new recipe Martin Jansa
2018-05-11 19:21 ` [meta-networking][PATCH 6/9] celt051: import from meta-cloud-services Martin Jansa
2018-05-11 19:21 ` [meta-networking][PATCH 7/9] celt051: make ogg support optional Martin Jansa
2018-05-11 19:21 ` [meta-networking][PATCH 8/9] spice: fix nativesdk build with security-flags included Martin Jansa
2018-05-11 21:27   ` Martin Jansa
2018-05-11 19:21 ` [meta-networking][PATCH 9/9] spice: use latest version Martin Jansa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox