From patchwork Wed Jan 24 15:29:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 865385 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:400c:c0c::23c; helo=mail-wr0-x23c.google.com; envelope-from=swupdate+bncbcxploxj6ikrb7gmuljqkgqebktqozy@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.b="Q19q3fG9"; dkim-atps=neutral Received: from mail-wr0-x23c.google.com (mail-wr0-x23c.google.com [IPv6:2a00:1450:400c:c0c::23c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zRTcv4l6rz9sBW for ; Thu, 25 Jan 2018 02:30:07 +1100 (AEDT) Received: by mail-wr0-x23c.google.com with SMTP id c14sf1888512wrd.2 for ; Wed, 24 Jan 2018 07:30:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1516807805; cv=pass; d=google.com; s=arc-20160816; b=CcswHO0YOO9y+wmUPms2iU41LyDygPmQm8nHbV5GG2aKXd5KXhrbv2yTbCXOCv5+br RLfGaT7MJw+qNaWS+e34dPYZPYkBIBdhac1itX/Ks3yNzeUdCinccHHf/TlyJxj9rkpb Z84uEXMiv9Em2EbrpCD+l4rkiWIeqV6n4h34SeA2dlb8GEy7R12Rl2bjjxygsV36blp+ hDdweUnSBgFpobLviN9/dldeUS8baCJuXPrCfxcdtqtI2BHNIUT2e04j1cjerpx8cXHa 0DJpaCZCelkOvBIpJ3VbEzz5aXWh/3vhDek4oFJy+OMfOVUaKasWRMsIxL/9Z/7pHIUN eF1A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from :arc-authentication-results:arc-message-signature:sender :dkim-signature:arc-authentication-results; bh=Z7GInFjzDjCKSVJ/gYpAByjpCChqwte9bLk19E70jKw=; b=gBmMeO4wBj1TQLSxjGzAKI6ddbfs9TqzARuUXqbIPFZfggenD0S2Po4FkWyXKj92ar rjydoT7dW6wcpYPn/bfIGp8HW65hn7raSz7LQBgcxs5zqOqX4ePKCPQwE0lRWFdyCqmm iA70jxKXWVN9oLAYeH+a1Vo68uOTAcJRDhMqUWPVCdN7wvaoU83UaaAd39hXWnrZHafK WgdaIk8AvdgD8KKoxDq7elHGgICtDFu83kWXp9a2prILEQAOXyzdNy4gLrUyC7H1i05z mkk2ZlIymw3VPBtWAexk60vVk3IFGXJAmc0VvEDtx7KdZJef1jLCmI+H767+WB/AmSoH ys5g== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=Z7GInFjzDjCKSVJ/gYpAByjpCChqwte9bLk19E70jKw=; b=Q19q3fG9TqIRqCGd/6JBq+ZIgI9b6CiGP5qPr+Ty4fATwgrmGcLPM7hRLXkeb/6kxn xEcb5PNxj2t0pviyPg+IwXmQmofY5RIhuqMsiSlSpAiwVLMiplefrzlLHUa8ZLjiauCQ i6WGLgeLhyNyDTxbJopsyLfweTCroIq2nihk7XG6nLfk9Tb6/U2wKDe8CRJ2QPKvEQYt cbMF0DXzRu14w91Dk8qJzADNi1nmh6hcIeLU4f0TfhkSQgxTvp49H4/GD3Xd8vU13mmJ oLmp4sN2exUTfn1ua6JjOa158yAkETLCQirYc04ZzgQrpZYWEf11Ds1pHzwUjo/Nww4h dSzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=Z7GInFjzDjCKSVJ/gYpAByjpCChqwte9bLk19E70jKw=; b=FSt8dpCV2dpXgKXdZlW1yeKfRMQyw5bKCCqXdSfdu/e9hrv5jpHYmdkxeaT6q/FcDr RaGzf0OLNK6GTW57J16FRr9YKIeAClO4nUV4NeLPdLRWNHkowGXYqGhF60EyoSWcsO8I ExtixbE+2BhG1AO7J0YbAgxYYQ8E7hffjGCsu511gqJ3DY5TpDiuGgkJ4eI1Vd2j4n04 kZcz+g2X0Tp7HCaPVjX7kLW6KCjCmvtc3gFvm+Aqt2vH5uGNBwMZmIpDzB4dcglCADwT QYDD36Ko+/1ojnrJBVcyhzqzlie2mrS7WAOmPXyfic5cEf1c0wpYZ6+vUlz0aad3yrMN Ovqw== Sender: swupdate@googlegroups.com X-Gm-Message-State: AKwxytedJ72ha6FEtBRIvzs5noKs7xlsrAdsdBZsZVJKP0m3D5HFlv/O tiMrrUQ7+hqzX9Yvo+eAVjg= X-Google-Smtp-Source: AH8x226TSZj0Qo5luUkwsiNsu705YLhfNYvG9H6Uxsoc92qsPlyL7fvYF5BuYFL8hACPCh2btWHI6w== X-Received: by 10.28.156.133 with SMTP id f127mr79761wme.1.1516807805018; Wed, 24 Jan 2018 07:30:05 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 10.80.185.67 with SMTP id m61ls5369461ede.4.gmail; Wed, 24 Jan 2018 07:30:04 -0800 (PST) X-Received: by 10.80.202.11 with SMTP id d11mr5624923edi.9.1516807804404; Wed, 24 Jan 2018 07:30:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516807804; cv=none; d=google.com; s=arc-20160816; b=yUkUmYNTbl9zqCPMygjIDsXvV7sKrKla3ihqAKve+ih73Wp2uBJpycUkB58z6ZyU4D zNstcmE3hC13B7h/c0wz9hXSeMGSomuERMAWDiab5tztfJyBalloqbDgIUpkNeqaEvPW cZBZvi0cmjH18g0c8I3KEmZ2vfMF92xGCV+swHi5y6vJ9A5TnERI0kLEfOWnpUY28h/s 5MkxYJL5uiDvpdMB2AqOGNQmM2ZBx4v+MxMkeuX3RDIdRh8942wCmgzU8hI9ry8wKcaT Dd1tLuBoaERjVsWgMQ3WOdlsRpusWVkAsuJ8v4xLTA/62CSfs034tIj+nd5XgQTDiMma Ufbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=xvwazVeEIWaHKC8UqdHlnlzb7WPzsfs+PfdCADmhRo8=; b=GoNez3O071UVf6DbytWdFiszePyVAnbYqFgFj1bbdABNFXvYEiI0WxqR7RYW7wt8vx Y7nNMemG0+x6aRXwBLyjO4zflafDSpjHIkroloCzhUWnT+ZnTEWqL1urz/FH95LMzs8w SW6oJGsR4f3EsI8nNbTtLLtlY3vs+qvTHZSN8PX4BZ/vs2mU0kfO+FxEYEYF8ADBpLxz dCatMtZWuhmtZNpUYxuNr41v7rgijoBwkygH9EC3FsbtTZ4gec9TDPJ3TTjQlT2LeNdO 6fZVUWk39U0dp3lttdhWzzbM/5aggUKp0i2w3JegCBtBCwyA4tTarfzxOFMe1BbC/Erz ck/Q== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.10]) by gmr-mx.google.com with ESMTPS id t4si51965edt.2.2018.01.24.07.30.04 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Jan 2018 07:30:04 -0800 (PST) Received-SPF: neutral (google.com: 212.18.0.10 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) client-ip=212.18.0.10; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3zRTcr0qB5z1qwdV; Wed, 24 Jan 2018 16:30:04 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 3zRTcr0Z3Zz1qqkc; Wed, 24 Jan 2018 16:30:04 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id kCI4yRt2cRCk; Wed, 24 Jan 2018 16:30:02 +0100 (CET) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Wed, 24 Jan 2018 16:30:02 +0100 (CET) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 7581145403A5; Wed, 24 Jan 2018 16:30:01 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([127.0.0.1]) by localhost (mail.babic.homelinux.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GD7JqwxiKgCW; Wed, 24 Jan 2018 16:29:58 +0100 (CET) Received: from papero.fritz.box (papero.fritz.box [192.168.178.132]) by babic.homelinux.org (Postfix) with ESMTP id D5C114540378; Wed, 24 Jan 2018 16:29:57 +0100 (CET) From: Stefano Babic To: swupdate@googlegroups.com Cc: joerg.krause@embedded.rocks, Stefano Babic Subject: [swupdate] [PATCH V2] Fix build if DOWNLOAD is set, but no JSON Date: Wed, 24 Jan 2018 16:29:56 +0100 Message-Id: <1516807796-26341-1-git-send-email-sbabic@denx.de> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , The downloader does not require JSON, but channel_curl is built even if not called. Build fails with the error: corelib/channel_curl.c:27:10: fatal error: json-c/json.h: No such file or directory Add a CONFIG_CHANNEL_CURL that is automatically set by the modules reuiring it (suricatta and swuforwarder). Signed-off-by: Stefano Babic Reported-by: Jörg Krause --- Changes since V1: - rework Config Kconfig | 7 +++++++ corelib/Makefile | 2 +- handlers/Config.in | 3 +-- suricatta/Config.in | 3 +-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Kconfig b/Kconfig index 4469096..e344572 100644 --- a/Kconfig +++ b/Kconfig @@ -294,6 +294,13 @@ config DOWNLOAD comment "Image downloading support needs libcurl" depends on !HAVE_LIBCURL +config CHANNEL_CURL + bool + depends on HAVE_LIBCURL + depends on HAVE_JSON_C + select CURL + select JSON + config HASH_VERIFY bool "Allow to add sha256 hash to each image" depends on HAVE_LIBSSL diff --git a/corelib/Makefile b/corelib/Makefile index 282bffd..4b30f9c 100644 --- a/corelib/Makefile +++ b/corelib/Makefile @@ -17,4 +17,4 @@ lib-$(CONFIG_ENCRYPTED_IMAGES) += swupdate_decrypt.o lib-$(CONFIG_LIBCONFIG) += swupdate_settings.o \ parsing_library_libconfig.o lib-$(CONFIG_JSON) += parsing_library_libjson.o -lib-$(CONFIG_CURL) += channel_curl.o +lib-$(CONFIG_CHANNEL_CURL) += channel_curl.o diff --git a/handlers/Config.in b/handlers/Config.in index 596f069..6456028 100644 --- a/handlers/Config.in +++ b/handlers/Config.in @@ -164,8 +164,7 @@ comment "remote handler needs zeromq" config SWUFORWARDER_HANDLER bool "SWU forwarder" depends on HAVE_LIBCURL - select CURL - select JSON + select CHANNEL_CURL default n help This allows to build a chain of updater. A diff --git a/suricatta/Config.in b/suricatta/Config.in index 62e448a..2586169 100644 --- a/suricatta/Config.in +++ b/suricatta/Config.in @@ -71,8 +71,7 @@ config SURICATTA_HAWKBIT bool "hawkBit support" depends on HAVE_LIBCURL depends on HAVE_JSON_C - select JSON - select CURL + select CHANNEL_CURL help Support for hawkBit server. https://projects.eclipse.org/projects/iot.hawkbit