From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7192631200934002688 X-Received: by 2002:a25:d705:0:b0:7b8:6d00:ef1e with SMTP id o5-20020a25d705000000b007b86d00ef1emr448778ybg.342.1675265446443; Wed, 01 Feb 2023 07:30:46 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a0d:e8c8:0:b0:508:bf2a:b3bf with SMTP id r191-20020a0de8c8000000b00508bf2ab3bfls12365464ywe.6.-pod-prod-gmail; Wed, 01 Feb 2023 07:30:45 -0800 (PST) X-Google-Smtp-Source: AK7set/bIrLpuq6uwV9ekpCkpxDp0DWHlOedX0G4u7q1eSWnt+eNP/2WtJn7XkJa11lb/vH0qGWg X-Received: by 2002:a81:9b94:0:b0:4ff:e8f2:4cec with SMTP id s142-20020a819b94000000b004ffe8f24cecmr1790419ywg.35.1675265445672; Wed, 01 Feb 2023 07:30:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675265445; cv=none; d=google.com; s=arc-20160816; b=v9KK3WSeDBAi+TV5cnoPeDXPhKe10rGkTjAfB8PLHz7E20/t2lDe98HgQ6ZrvFaCfR pDwxQfzjp8DNmpIVRYSwxEN6f/hOWvVI8foNUTO71bXip82KfGp2fMCJUV6ZZvMgegtd ISrXgDBpjHCywR5h95FmVlkyUh8dF1hnI5P84FWFtVX26wgDKnjsgUAqLzvAa/VsVrMR 0LKVjMVjsRvJ6fPQow/HWPtlYI33bwZSjFqlXr40aFQqlZ3986F00WghXP+Z315G96v+ 2Uj7Z66v2MeBCWBL6YW4X4vBMiEqY+fytqntDzQZgNecBbVKYvuzWWGl3OMRio5FMHHC r1Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=LOQTskjgDBQKoGqkJ0+z2N/HDO3jj9yvw5BZzrzeMLQ=; b=T7A7QHFHlVYSXLRWoiAwxAGbsuLkwf2K57GH6PV9EPx3jHNNC+DGN7R7lBMzTI/X1z Co/zLLfVQ2ETNsBKBFtR9gtBydrIbuGzAvBnvhvFy8lwzi1y8B7PA62W/Mi4aXgihVdc KPNZ1HHXCODPGdzDQWTJbi1MpHJxmQOnPzn4TRaM5gu8t6D0UMQMNkyd4Ed3/KZSrMqm kt/5p5ZwWaCjP0/gzmPpl8G/UymgoQEZEsbCo2X1+oYCsahjz3W1pTttlqZknmDmupEC 9jFmYTH+oWmpx0E2gj6rfy+eFx7jQSkrB/R6cOb/SOYjXCzvDTSQoawYQspuziCFNPjz rq6w== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=S68JQQgI; spf=pass (google.com: domain of roberto.foglietta@gmail.com designates 2607:f8b0:4864:20::836 as permitted sender) smtp.mailfrom=roberto.foglietta@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com. [2607:f8b0:4864:20::836]) by gmr-mx.google.com with ESMTPS id bc29-20020a05690c001d00b004fa49c05aa9si3352723ywb.0.2023.02.01.07.30.45 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Feb 2023 07:30:45 -0800 (PST) Received-SPF: pass (google.com: domain of roberto.foglietta@gmail.com designates 2607:f8b0:4864:20::836 as permitted sender) client-ip=2607:f8b0:4864:20::836; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=S68JQQgI; spf=pass (google.com: domain of roberto.foglietta@gmail.com designates 2607:f8b0:4864:20::836 as permitted sender) smtp.mailfrom=roberto.foglietta@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: by mail-qt1-x836.google.com with SMTP id z5so7680623qtn.8 for ; Wed, 01 Feb 2023 07:30:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=LOQTskjgDBQKoGqkJ0+z2N/HDO3jj9yvw5BZzrzeMLQ=; b=S68JQQgIiExes1bhwRF9RWvQOMBEGy1BULMep3F8Hr8yWJu0BFsn927punWIeFntMp dTStnCy8tAkbZE/vtLEMXElttAsdHhFKSjc2StmnAS+Uz5J594BJGaKU03+FYsbM6FDP bWQEVxq37MIMSKhJdRxSMuSa6ehZS6DOlMJwkR8f0TpyZMFrBb2mNw/HXHomPy0zshS5 VKWuBAfwe1rfCSxiU+PhRkSkDFix76F67bD+IAxsc5/fZaHks2xVf9dH0qOukItS854D iRezWqwniS225JXIw1aTF+5DYviIrvcO20431eDXqEsqX1UHkhUD5hzZgg0HkNqSjUZn FMtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=LOQTskjgDBQKoGqkJ0+z2N/HDO3jj9yvw5BZzrzeMLQ=; b=XXieyLNkvr18r8exGOOXQziVXJPMfjpGFhbsi1OMpzYZFGJmD30m9g0Zwz+IAR6jKD wUMrPDam3LjdXhiRMxS4z4u0A25AOxZU8QlkOSxRhRQliQq3PQdKEIshgbf67B+yxZ7H HgGaDR6MnT01FTIkznG4MwylKdBn3sW5GKm5j6zAbqpOrClnU61T4SE2Zi37uFEaaqeU 8jDbP5AfVJ4aUGoLvomgKx9hDkqpMv+/Uihm3qzo626AiP27hRAFq4BoKUQc7wL7PGn3 AOuvgP3q5jUR49YgRz6EKqEd0imG9OUkI3o6PDSj29IO3lHR3/JLnV/zRM63eB93PSbD z1MQ== X-Gm-Message-State: AO0yUKU/vnGf1PFXFxdYKkVBlkch2fP/sCB6CihZQzg8uikgOs6BU1tA 2mY4+loAWfj7B0SjmWm/Y5JRVzuPCczPmuVqX7ojzQmwTQ== X-Received: by 2002:a05:622a:1043:b0:3a8:ede:4d62 with SMTP id f3-20020a05622a104300b003a80ede4d62mr328410qte.42.1675265445222; Wed, 01 Feb 2023 07:30:45 -0800 (PST) MIME-Version: 1.0 References: <20230125164227.1448218-1-roberto.foglietta@linuxteam.org> <845939bb-2968-64ed-13d7-a3e69c08c69e@siemens.com> In-Reply-To: <845939bb-2968-64ed-13d7-a3e69c08c69e@siemens.com> From: "Roberto A. Foglietta" Date: Wed, 1 Feb 2023 16:30:08 +0100 Message-ID: Subject: Re: [PATCH v3] dpkg: sbuild allows extra arguments via DPKG_SBUILD_EXTRA_ARGS v3 To: Jan Kiszka Cc: roberto.foglietta@linuxteam.org, isar-users@googlegroups.com, Uladzimir Bely Content-Type: text/plain; charset="UTF-8" X-TUID: /IpMqw4TkN/i On Wed, 1 Feb 2023 at 15:47, Jan Kiszka wrote: > > On 25.01.23 17:42, roberto.foglietta@linuxteam.org wrote: > > From: "Roberto A. Foglietta" > > > > Sometimes it is necessary to add some extra commands or arguments for > > the sbuild process which produces customs packages but creating a class > > into an upper layer just for this will create difficulties in managing > > the updates from the upstream project. > > > > So, this patch allows setting extra parameters via this variable: > > > > DPKG_SBUILD_EXTRA_ARGS > > > > v.2: just a single variable and not anymore two of them > > > > v.3: the variable is set in the middle, just in case order matters, it > > is the last of 'setup chroot' and the first of 'final build' commands > > > > Signed-off-by: Roberto A. Foglietta > > --- > > v.2: just a single variable and not anymore two of them > > > > v.3: the variable is set in the middle, just in case order matters, it > > is the last of 'setup chroot' and the first of 'final build' commands > > > > meta/classes/dpkg.bbclass | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass > > index 7822b14d..8785237c 100644 > > --- a/meta/classes/dpkg.bbclass > > +++ b/meta/classes/dpkg.bbclass > > @@ -23,6 +23,8 @@ do_prepare_build_append() { > > env > ${DPKG_PREBUILD_ENV_FILE} > > } > > > > +DPKG_SBUILD_EXTRA_ARGS ?= "" > > + > > # Build package from sources using build script > > dpkg_runbuild[vardepsexclude] += "${SBUILD_PASSTHROUGH_ADDITIONS}" > > dpkg_runbuild() { > > @@ -109,6 +111,7 @@ dpkg_runbuild() { > > --chroot-setup-commands="echo \"APT::Get::allow-downgrades 1;\" > /etc/apt/apt.conf.d/50isar-apt" \ > > --chroot-setup-commands="rm -f /var/log/dpkg.log" \ > > --chroot-setup-commands="cp -n --no-preserve=owner ${ext_deb_dir}/*.deb -t ${deb_dir}/ || :" \ > > + ${DPKG_SBUILD_EXTRA_ARGS} \ > > --finished-build-commands="rm -f ${deb_dir}/sbuild-build-depends-main-dummy_*.deb" \ > > --finished-build-commands="cp -n --no-preserve=owner ${deb_dir}/*.deb -t ${ext_deb_dir}/ || :" \ > > --finished-build-commands="cp /var/log/dpkg.log ${ext_root}/dpkg_partial.log" \ > > I'm seeing this in next, but it seems everyone missed that this should > not go in like this: > > Missing elaborated reasoning. No in-tree use case or at least some > explanation why we should open such a low-level interface to recipes. At least one Siemens project uses it, unless it has been changed after I left. In general there is no reason to exclude that building a custom .deb package does not require to use this variable. If not used, it does not hurt. If used, avoid duplicating the dpkg class in the top layer and go out of the upstream. Moreover, ISAR has plenty of variables that modify the low-level interface or its behaviour. After all, flexibility is what makes ISAR valuable. Best regards, R-