From patchwork Thu Oct 24 18:56:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Freihofer, Adrian" X-Patchwork-Id: 1183480 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::13e; helo=mail-lf1-x13e.google.com; envelope-from=swupdate+bncbaabb27hy7wqkgqet3viu3q@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=siemens.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.b="S59VK70J"; dkim-atps=neutral Received: from mail-lf1-x13e.google.com (mail-lf1-x13e.google.com [IPv6:2a00:1450:4864:20::13e]) (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 ozlabs.org (Postfix) with ESMTPS id 46zc0v19Gdz9sRD for ; Fri, 25 Oct 2019 05:56:46 +1100 (AEDT) Received: by mail-lf1-x13e.google.com with SMTP id u14sf5376178lfi.10 for ; Thu, 24 Oct 2019 11:56:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1571943403; cv=pass; d=google.com; s=arc-20160816; b=WdybsKW3VQcC/mBduWHCWPPZkKxvZ/4Q9F48LyIMuGpK1LaaNNZxX+NHEp20SKRbzY AzfH1PgVedumvQ6axU2x9MVHKQALASpvDx3FQ/pIuEtYIXmDV7wyejefpMueevbpu8un 9tZG58mq22AcksAFWCRgJJ5G9Ynw61EFfqvDG8SGN8kc4r3I0im+0QePrzt+MIt3a59D 79xj8JW9KZtDrRbq4wsnkwYWM9x3VD3W2eGwTe4QXDSMzHlHNtoih8rZyTcnzC943mq/ b6eQOKXRg+Fww/UwzXN1TCRWm7sIHWvizpbyzxszIBj9a1f/hWlH+vo1z+CLyYnL18dV aUDA== 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:references:in-reply-to:message-id :date:subject:cc:to:from:mime-version:sender:dkim-signature; bh=IlduezODQyHUD65DANFNqwt6hYDBDRjW1r1UxC10GbY=; b=1C1/jmE3pkCijZsXvNgGVfIqzgdPidG6fmXEDhTEPbvla4ycSKauWbzHfn5AdVkkGm eo709qE5qsuuyKD6vIc93ZlKv55+Rq/GTzqMCS6nSXUQSqsXTX+bm3mygY2amns4kaA1 5QTSKk+joLKlmeOqqX2/aopcwhsmJ7J1Sj5KfYWErDTKaFl59cLFWrI0UEABsyrYGzPY 0h6H2S8dwh3779wMlriWjEYoQ1GbfwqEqpNxa/NizYWMmLUTTqY2dkV5cugX4c4wJkY0 Xb7vRqpNeYjcPG4M0191Xb/uVOdLhqwJpDsAvaHPJjFr2dG56abRmOFOueJBZChA/Wf3 yu7w== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of adrian.freihofer@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=adrian.freihofer@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:mime-version:from:to:cc:subject:date:message-id:in-reply-to :references:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=IlduezODQyHUD65DANFNqwt6hYDBDRjW1r1UxC10GbY=; b=S59VK70JNTYlzULr7AJc74F0dMk8xvqVtebHb5yh94irtF35VrP798dzqcRgM8Zlx6 p5TKl7sFZOYtPoafvoNZ0xnBZn9qPoN2VhroB42FpHzfuLO68JX1xTBotuHRfkpqEmZn 4tZ8yutvuFJByaoasgEj7tt6cqMfyw6Hzqus7MBRuvU7saiMOMw6w4w7P6ZkkJXmiiE0 cTMq2zGNzmpzdzf401TZOjVJ6+poCaDg5HPKz7WOf7OQ2mGlawz+6bTI9mNXqK+v0qBs /F9gWe8i3YEa4qTPYF3OVyxjHaOX4TKibmX6QOk9bYsAOdv3LuN6k3fW2w1KExZzY17J V56A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:mime-version:from:to:cc:subject:date :message-id:in-reply-to:references: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=IlduezODQyHUD65DANFNqwt6hYDBDRjW1r1UxC10GbY=; b=pqra6f+xqW6y86mbQSJozHFlNZA1N0vHVf5gFV5xRwS2Y4NkTGy9AFvS9NLxgdhiNF jwVtGCI5mjYBdus0jca9IItLsF8AWjumdVkmEv3Cnt/7vNrfrR+k3IRCj7qC4D2x2cLo LD19c6fYhBoOVxQ/zzLoZE2bejyyT1sRGWs1SvsMdQQmp9tafhQlDM+QQ917iyDs0dcT M2A841t/leS6DUzOtsnmdNZnSMKBHbE4zTw4vrBlw+Gy87SFTeikosLpb6vzk1HhsbMS eEntQwN6cGBjj+9jEDModc2st+UMNVmfd+h8ig3TZaDcRCAYNh1Wq0xb8v8gNV1M+kln dyJw== Sender: swupdate@googlegroups.com X-Gm-Message-State: APjAAAVFd6J4WqSAqwtvqbHOy//cx39SB1Gay5GzDTjpVmDNHOIplYVw k6NS6AD6wfmm/C8hD9pwmhY= X-Google-Smtp-Source: APXvYqwyRRL1tl/UNEWNTko9OqKYREMq2LwJrpzS+ZWnkefbkj/TODV6yF9HhEzBUl+CxbqjOFEHkg== X-Received: by 2002:a05:6512:142:: with SMTP id m2mr20692109lfo.126.1571943403730; Thu, 24 Oct 2019 11:56:43 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: swupdate@googlegroups.com Received: by 2002:a19:98c:: with SMTP id 134ls677331lfj.6.gmail; Thu, 24 Oct 2019 11:56:43 -0700 (PDT) X-Received: by 2002:ac2:48af:: with SMTP id u15mr24143710lfg.39.1571943403293; Thu, 24 Oct 2019 11:56:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571943403; cv=none; d=google.com; s=arc-20160816; b=hPahgCPg9OyRc3T8tI7K/JaJk7EAZqXnOa2IBcioiTVWcdM48cLYf/MXK8p+yjvG2A 9hcLhgDa9ssZeI3QHlcakyqP2YHghAegKrnRmVTVU+HbNwUoUWS6+3JVGlZ/kK1VNWj+ x7WrllavajaitYTLw5ScfDKsmcWEH8XeX/aaVhzPJEJmlJWAybjKE/6DIZhQYSFmZU2Q Tr2gxZs6phRK/z0nki3cfcMbc29C+pXV6/Us0aFqv23NidHdEhiIAVyXCoyzYvR7Y3ny QEKyTt5jbLd9vk7lcz3yEMf6eYGa+ZvZFAOtuOFPtYuD5/IhFVM/ooWIcgRh8DCjfDDf RYag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from; bh=66fGYcRwNgKBXgmFp2bcZS24Vw1D6I7CVSLByEdW/kY=; b=RxsXaNPtMMpDKXNie0VIYvrqfIBaywLlj3+zRTunueZXQw/pxfYcdk3+AfHYb2H1Fm UsRN0u6BMS3lNb45Cc9eWDeO4dE2aaacktv1l0t+5VT4Y5+VlkSJAevxA9MG2zSihTis TU4CUp7YL7/3W26DUBrgZBVYL0HqJ4ONAWnWyRWhgXOOau82SVvCZ/zVbaY8d9I2bI+W JbmT0xXwH3XLRFWPGMaEpHrtFMVrCo0426LPhqEeaJ0h0jv5wg4q9CoH4RrZPgWSk3Ki lc0we69lvcLH0RIR/nJAxUgn77rixwwdZF92AeJs7N0P/kqT20bkAYqAqbKuz7PlrG87 GAfA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of adrian.freihofer@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=adrian.freihofer@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from goliath.siemens.de (goliath.siemens.de. [192.35.17.28]) by gmr-mx.google.com with ESMTPS id k24si1196771lji.3.2019.10.24.11.56.43 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Oct 2019 11:56:43 -0700 (PDT) Received-SPF: pass (google.com: domain of adrian.freihofer@siemens.com designates 192.35.17.28 as permitted sender) client-ip=192.35.17.28; Received: from mail2.siemens.de (mail2.siemens.de [139.25.208.11]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id x9OIugvd002226 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 24 Oct 2019 20:56:42 +0200 Received: from dev.vm6.ccp.siemens.com ([139.22.33.162]) by mail2.siemens.de (8.15.2/8.15.2) with ESMTP id x9OIufJo019428; Thu, 24 Oct 2019 20:56:41 +0200 Received: from dev.localdomain (localhost [127.0.0.1]) by dev.vm6.ccp.siemens.com (Postfix) with ESMTP id B1B3B2353A5B; Thu, 24 Oct 2019 20:56:40 +0200 (CEST) From: Adrian Freihofer To: swupdate@googlegroups.com Cc: Adrian Freihofer Subject: [swupdate] [meta-swupdate][PATCH v2 10/12] swupdate: fixes in do_install Date: Thu, 24 Oct 2019 20:56:33 +0200 Message-Id: <20191024185635.31754-11-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20191024185635.31754-1-adrian.freihofer@siemens.com> References: <20191024185635.31754-1-adrian.freihofer@siemens.com> X-Original-Sender: adrian.freihofer@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of adrian.freihofer@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=adrian.freihofer@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com 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: , This changes the filenames of the tools binaries for several reasons: - Binaries should not be named "client" or "progress" (also not accepted by Debian upstream) - Inconsistent with names referred in the service files The swupdate_tools.inc file gets merged into swupdate.inc file. By removing the tools file some bugs are fixed: - The tools binaries were installed twice. - do_compile from swupdate.inc was over written resulting in wired behavior - swupdate-progress.service file was part of swupdate package were the corresponding swupdate-progress binary was part of the tools package. The tools are now installed by the "make install" target of swupdate's Makefile. The related code here in meta-swupdate gets removed. Signed-off-by: Adrian Freihofer --- recipes-support/swupdate/swupdate.inc | 18 +++++++++++++----- recipes-support/swupdate/swupdate_2019.04.bb | 20 +++++++++++++++++++- recipes-support/swupdate/swupdate_git.bb | 1 - recipes-support/swupdate/swupdate_tools.inc | 24 ------------------------ 4 files changed, 32 insertions(+), 31 deletions(-) delete mode 100644 recipes-support/swupdate/swupdate_tools.inc diff --git a/recipes-support/swupdate/swupdate.inc b/recipes-support/swupdate/swupdate.inc index 5189078..2df98a4 100644 --- a/recipes-support/swupdate/swupdate.inc +++ b/recipes-support/swupdate/swupdate.inc @@ -12,14 +12,22 @@ SRC_URI = "git://github.com/sbabic/swupdate.git;protocol=https \ file://swupdate \ " +PACKAGES =+ "${PN}-www ${PN}-lua ${PN}-tools" INSANE_SKIP_${PN} = "ldflags" -PACKAGES =+ "${PN}-www ${PN}-lua" +INSANE_SKIP_${PN}-tools = "ldflags" FILES_${PN}-lua += "${libdir}/lua/" FILES_${PN}-www = " \ ${libdir}/swupdate/conf.d/*mongoose* \ /www/* \ " +FILES_${PN}-tools = " \ + ${bindir}/swupdate-client \ + ${bindir}/swupdate-progress \ + ${systemd_system_unitdir}/swupdate-progress.service \ + ${bindir}/swupdate-hawkbitcfg \ + ${bindir}/swupdate-sendtohawkbit \ +" FILES_${PN} += " \ ${libdir}/tmpfiles.d \ ${libdir}/swupdate/* \ @@ -136,10 +144,7 @@ do_configure () { do_compile() { unset LDFLAGS - oe_runmake swupdate_unstripped progress_unstripped - cp swupdate_unstripped swupdate - cp progress_unstripped progress - + oe_runmake } do_install () { @@ -164,3 +169,6 @@ SYSTEMD_SERVICE_${PN} = " \ swupdate.service \ swupdate-usb@.service \ " + +SYSTEMD_PACKAGES_append = " ${PN}-tools" +SYSTEMD_SERVICE_${PN}-tools = "swupdate-progress.service" diff --git a/recipes-support/swupdate/swupdate_2019.04.bb b/recipes-support/swupdate/swupdate_2019.04.bb index 83785d7..5b0fb78 100644 --- a/recipes-support/swupdate/swupdate_2019.04.bb +++ b/recipes-support/swupdate/swupdate_2019.04.bb @@ -1,5 +1,4 @@ require swupdate.inc -require swupdate_tools.inc SRC_URI += " \ file://swupdate.service \ @@ -10,3 +9,22 @@ SRC_URI += " \ " SRCREV = "d39f4b8e00ef1929545b66158e45b82ea922bf81" + +do_install_append () { + # Rename the binaries installed by make install + test -f ${D}${bindir}/progress && mv ${D}${bindir}/progress ${D}${bindir}/swupdate-progress + test -f ${D}${bindir}/client && mv ${D}${bindir}/client ${D}${bindir}/swupdate-client + test -f ${D}${bindir}/hawkbitcfg && mv ${D}${bindir}/hawkbitcfg ${D}${bindir}/swupdate-hawkbitcfg + test -f ${D}${bindir}/sendtohawkbit && mv ${D}${bindir}/sendtohawkbit ${D}${bindir}/swupdate-sendtohawkbit + + install -d ${D}${systemd_system_unitdir} + install -m 644 ${WORKDIR}/swupdate.service ${D}${systemd_system_unitdir} + install -m 644 ${WORKDIR}/swupdate-usb@.service ${D}${systemd_system_unitdir} + install -m 644 ${WORKDIR}/swupdate-progress.service ${D}${systemd_system_unitdir} + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -d ${D}${libdir}/tmpfiles.d + install -m 0644 ${WORKDIR}/systemd-tmpfiles-swupdate.conf ${D}${libdir}/tmpfiles.d/swupdate.conf + install -d ${D}${sysconfdir}/udev/rules.d + install -m 0644 ${WORKDIR}/swupdate-usb.rules ${D}${sysconfdir}/udev/rules.d/ + fi +} diff --git a/recipes-support/swupdate/swupdate_git.bb b/recipes-support/swupdate/swupdate_git.bb index a4289f6..8eef04e 100644 --- a/recipes-support/swupdate/swupdate_git.bb +++ b/recipes-support/swupdate/swupdate_git.bb @@ -1,5 +1,4 @@ require swupdate.inc -require swupdate_tools.inc DEFAULT_PREFERENCE = "-1" diff --git a/recipes-support/swupdate/swupdate_tools.inc b/recipes-support/swupdate/swupdate_tools.inc deleted file mode 100644 index d270dd4..0000000 --- a/recipes-support/swupdate/swupdate_tools.inc +++ /dev/null @@ -1,24 +0,0 @@ -PACKAGES =+ "${PN}-tools" - -INSANE_SKIP_${PN}-tools = "ldflags" - -FILES_${PN}-tools = "${bindir}/swupdate-client \ - ${bindir}/swupdate-progress \ - ${bindir}/swupdate-hawkbitcfg \ - ${bindir}/swupdate-sendtohawkbit" - -do_compile() { - unset LDFLAGS - - oe_runmake - cp swupdate_unstripped swupdate -} - -do_install_append () { - - install -m 0755 tools/client_unstripped ${D}${bindir}/swupdate-client - install -m 0755 tools/progress_unstripped ${D}${bindir}/swupdate-progress - install -m 0755 tools/hawkbitcfg_unstripped ${D}${bindir}/swupdate-hawkbitcfg - install -m 0755 tools/sendtohawkbit_unstripped ${D}${bindir}/swupdate-sendtohawkbit - -}