From patchwork Sun Nov 14 17:27:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1554920 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20210112 header.b=fgWPadRy; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::238; helo=mail-lj1-x238.google.com; envelope-from=swupdate+bncbcxploxj6ikrbseoywgamgqem3z2x6i@googlegroups.com; receiver=) Received: from mail-lj1-x238.google.com (mail-lj1-x238.google.com [IPv6:2a00:1450:4864:20::238]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HsfSD2VFPz9sWJ for ; Mon, 15 Nov 2021 04:28:44 +1100 (AEDT) Received: by mail-lj1-x238.google.com with SMTP id u28-20020a2ea17c000000b0021126b5cca2sf2561486ljl.19 for ; Sun, 14 Nov 2021 09:28:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1636910921; cv=pass; d=google.com; s=arc-20160816; b=exy0Z/lTfJ5Y9PX63fbQPr7VN3gRJ+OWWbzHmIhXwMfYi/wVD7R32nWQ6BnSnm4qFM 9fR1iBRmooKyJLgDhUelG3T1L+geTc+ktVJ46htIc1xEfaH5mM53pY0kw+K/2DahgqFg zttCzydFCBRYqZ6xR0I/mRPHhqMe5C6Ez66YaBWz+dkjO/+AKlbBbl+J0AYyA6a8gE5b S6WCtxeAjZc4JPFIlynCw9KkcxOdEH1/pWQtybOt9/UUCsmwFa/3bVgkQ9MsHZ6XdPxH Nl1xxAYn4FPVt3Im0ru611wJEGdJ8idmlFZiffMGK8ilBvvdNy6yeO/9fTI3RJCMl+gc a3Fw== 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:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=acWFOJZMX6oyVyW1ZaybaPXmi+iyFgX4MO4/DxLY8hM=; b=0TW7CLsVAVfvi1ixFSB6v94mjoDwhVWzAoEg0+knoTSxjMd1yL5nGUzjx4pgzbseY/ cidI9eyPfNERCB61y9KzrQUxF5Db/1Qgcvacrn4+s2gdCaFA7iqWKa5O/KHzzwmHdN9y 8upuhO0/39pVZPILSFK33lU9XdcImjI3misUkS2uaTAp27kkC5MnL8p4IMdWut1xjQ6p bpymb1PKoNLlom0mT94iXm8jOrcMsoVjMotrtkFP9mTNlMp3BiTr2AyXODWgqymExqy5 ZUh/mZ9xfjTHQczHR5EmHHZzVJgyfQmOXYXbTRLyQ+cSBS1EzdTAwtG+B8PjQ956uTzJ QyjQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=acWFOJZMX6oyVyW1ZaybaPXmi+iyFgX4MO4/DxLY8hM=; b=fgWPadRyrin8ADhIsdehy0Ff2/3qUgB3OIOVXsxgmXBpE743YPZdANeVKFtW7YTrsE sP5wlulNNePZ+nLVAjAotPKwrVRObRyeddDknhL09bksVYT1v5WaQRsvotxKoNFaBz9Z b4wNZSgoqttGSXKsFCJsgKES/vWrZcBzpEotTuYFqwYy4AmDgtuMpJTxQoRoCcj21gko DXVEdGoYWMALsQMY433IL+sCq7P/YpQmzQVWaYAtMTKFYJgz/16nICGUDat0q4QsdZsX y44dopolUydqcf/JednvCFP02VloYf0GsZ+u1JWCdqt74fwkCkp1CfJC8/ozeDqdD9+U veKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version: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=acWFOJZMX6oyVyW1ZaybaPXmi+iyFgX4MO4/DxLY8hM=; b=ejh2n4yYQAw0rrQHAJijLBGyU4G2+iFlFWshgQIWyN0y/BVRsSUFFw/FtTPhmbZcHV 2/lTgWTTWYdhw/upCTrQLDI+Zup9lx4XWZtvBqEQ+siedFvCG8aJcz3rlCFf9uGNytNe 4HvYsOMuYn8Kh3kOmN8nM8L6AlG4K3aDBWdvQLdoz8ON7XiEfFtvekmpGA8l6OVrLTn+ w+JCQy9Fd6G5BNNPQrUfeJkyQ/LEqg7/7eN78UqDeHhl/JZhvC3AfCEST4Hc0cOeFFv+ Gl5ktcDnyehbE63ExUNRJWDjZhCoYTMeVz69t3kpeYDIHYkkrATcd4ssBXDTVNPGvUA9 D8oQ== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM533Yoif0KHK2mD+BnCYxCH1pQu11RuE8YWVFWvEUyNi+qK+S7fW/ bhg1oU9p6A1MOQkYcb3KsIg= X-Google-Smtp-Source: ABdhPJzr19H3luiyAzcmGqqFzTZ1qe0fgHcK4qQUpE3urCDZlECWdbm/etUllexOILLiBIxqRQvdpA== X-Received: by 2002:a05:651c:168a:: with SMTP id bd10mr30981404ljb.115.1636910920975; Sun, 14 Nov 2021 09:28:40 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:6512:3499:: with SMTP id v25ls4675499lfr.0.gmail; Sun, 14 Nov 2021 09:28:40 -0800 (PST) X-Received: by 2002:a19:7709:: with SMTP id s9mr29851339lfc.682.1636910920234; Sun, 14 Nov 2021 09:28:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636910920; cv=none; d=google.com; s=arc-20160816; b=DRNwy1j2IKx+G3eMhTfxF0OMwwJ2xkTvDnYtmZf19zR/j89Reer7MoIKpDqqqnekSU vaAfTi3ktU/Z84u0Ns+a7eLURnlWd8opfXlkrUjLW0cTsQWo8hhDAimvXbELKlFG8s3e BZ9Tadjs56dxG2t8NnzIaU493AWTZps6tWiOaZftvqDv3vsxpeeqI6tdNszmMfT8afgt I7JOyt242GButydwm8CN8DoOXTyIkjvksHV3nVNgKRWQfyRdwwn0CgicWkoEHE+OsU8d 0RusSWIyeT25b8mPIsso+vMEaJQQW4lXL627OnNI3vq00HM+HaEIIKZXg3US31MmGlwM 1zgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=V1g+fND9bOc8sJTlX7Y2R32gvr7TPE4UvQ3cZ9RpsY0=; b=D0+YAxBL6wHqPRPHrogCQX4CLfW5ddRMb39XMIsFxKcn67DC41zZfSewaKQazuGyDf yRegIG/MWgYoowJqE1WXm2hkOCug9vBZuHnxtxyrJhDkCtS1nfbFqKDncCWUqonQt5sL lUOkdPdk8FglsDbQNn5thWeC3PH15kwgNg94Yio4gQgZBuz6JNC3vRa3E+yNYwny63DT c36Zz+9XfoCbKUYXR/Y7CnwWHd55c7faKpRCezrC8QVVF7xyZ86qM/WriLxIf7mEJhvK hm/aS2L+gvy7jOjW2QYAnVeCfz8TtKjsgiJjGbItIeEJqyesZH9tKofK5x2G2xThOVUD 5M3Q== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [2001:a60:0:28:0:1:25:1]) by gmr-mx.google.com with ESMTPS id c12si932762ljf.4.2021.11.14.09.28.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Nov 2021 09:28:40 -0800 (PST) Received-SPF: neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by domain of sbabic@denx.de) client-ip=2001:a60:0:28:0:1:25:1; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4HsfS75TS5z1rk5n; Sun, 14 Nov 2021 18:28:39 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4HsfS75D2Wz1qqkC; Sun, 14 Nov 2021 18:28:39 +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 i85VcljP-7-7; Sun, 14 Nov 2021 18:28:39 +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; Sun, 14 Nov 2021 18:28:39 +0100 (CET) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id B220945408E4; Sun, 14 Nov 2021 18:28:38 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([IPv6:::1]) by localhost (mail.babic.homelinux.org [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id 062lneKhX5ye; Sun, 14 Nov 2021 18:28:35 +0100 (CET) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.48]) by babic.homelinux.org (Postfix) with ESMTP id 01ACD4542900; Sun, 14 Nov 2021 18:27:47 +0100 (CET) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [PATCH V2 29/36] Start chunks downloader if delta is enabled Date: Sun, 14 Nov 2021 18:27:26 +0100 Message-Id: <20211114172733.71602-30-sbabic@denx.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211114172733.71602-1-sbabic@denx.de> References: <20211114172733.71602-1-sbabic@denx.de> MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by 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: , Start the downloader process if delta is activated. The process is monitored by SWUpdate. Signed-off-by: Stefano Babic --- core/swupdate.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/core/swupdate.c b/core/swupdate.c index d651f8e..d3b8ef3 100644 --- a/core/swupdate.c +++ b/core/swupdate.c @@ -41,6 +41,7 @@ #include "network_ipc.h" #include "sslapi.h" #include "suricatta/suricatta.h" +#include "delta_process.h" #include "progress.h" #include "parselib.h" #include "swupdate_settings.h" @@ -853,6 +854,17 @@ int main(int argc, char **argv) freeargs(dwlav); } #endif +#if defined(CONFIG_DELTA) + { + uid_t uid; + gid_t gid; + read_settings_user_id(&handle, "download", &uid, &gid); + start_subprocess(SOURCE_CHUNKS_DOWNLOADER, "chunks_downloader", uid, gid, + cfgfname, ac, av, + start_delta_downloader); + } +#endif + /* * Start all processes added in the config file