From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7192631200934002688 X-Received: by 2002:a05:620a:8529:b0:721:3b77:bd1b with SMTP id pe41-20020a05620a852900b007213b77bd1bmr263321qkn.203.1675266577076; Wed, 01 Feb 2023 07:49:37 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6214:3882:b0:535:5ef8:149d with SMTP id nq2-20020a056214388200b005355ef8149dls10580055qvb.9.-pod-prod-gmail; Wed, 01 Feb 2023 07:49:36 -0800 (PST) X-Google-Smtp-Source: AK7set8JF8BxsTUBcSMaWc2Ap3S1W7l+oZdxb+pUKMS9Lhdb88Ua5SYCBUoCO4qSp4fU8YVYHmS6 X-Received: by 2002:a05:6214:cab:b0:53a:6241:a50f with SMTP id s11-20020a0562140cab00b0053a6241a50fmr6355026qvs.9.1675266576377; Wed, 01 Feb 2023 07:49:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675266576; cv=none; d=google.com; s=arc-20160816; b=LTQM4+VeI1j+Gtv6HU20CgI7ZsnOXe+XcpIr5u0Y4eXcuTW/BbQwWPJoVCyfgihsMu KnIArm1G0BCX1VCPNaf66fmZnmWT44q1F0BXE+VO/qdNW16tnDNxOiwBJdbwE0+kwNb9 54cid3HsdLHMkIJ658Ysj5zzJB+YTQuPLx3DzUExLXBbkeNwyfBT9SerXImE9YMfYhmv IrQQwrZ3udbz4G3zO8bCl+F7YuTUPoG/XUQAfjqfHvI4DPMxdtJzSePbL5RdlGfvVdqs 3cqBGXD+MEol5EOwuzRTUoOXEGEYQfM78HACS1fcUJudY+arJkwSy89QXz0P8TM4M1Cv u+GQ== 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=zRQUuFoYUR2pvOYUuf+7GrDbY2TzeAKbJ5A6dN21N4g=; b=Kp2UavA/qITLMUr+iFE9lJGAsnzq5UhEVvKUc6FnhwKhqloo1i+wkGXXfFPw4Z0QNk Op0z4sOafyUzfZSmGjP7eZJru73mcYGWPBZN6F6g5Z5KChGtcWvuyftiCday4xrVJaD4 VjM1B7tViywJ+rgS1ronqy27ZJKhhp/8HoSONDiHjH++2kM8ynMoDVXr3nR9wt+c4pHT lKNPwN8PT2D5gWkW6rsSVK3qM0uNRfqTBeU7vWcAc4+nmQc5ITMwZ7+YzXNIX9puu9ql 50z8AvfcZn2epuoJTlxYTJkmQwyo9I/PjD8m5//M07OR1lLRhIMAGxkHR4Y8oU5T88nv nPuA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=GXzNum2p; spf=pass (google.com: domain of roberto.foglietta@gmail.com designates 2607:f8b0:4864:20::82d 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-x82d.google.com (mail-qt1-x82d.google.com. [2607:f8b0:4864:20::82d]) by gmr-mx.google.com with ESMTPS id o10-20020a05620a2a0a00b00725bdb9a8acsi405975qkp.5.2023.02.01.07.49.36 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Feb 2023 07:49:36 -0800 (PST) Received-SPF: pass (google.com: domain of roberto.foglietta@gmail.com designates 2607:f8b0:4864:20::82d as permitted sender) client-ip=2607:f8b0:4864:20::82d; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=GXzNum2p; spf=pass (google.com: domain of roberto.foglietta@gmail.com designates 2607:f8b0:4864:20::82d 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-x82d.google.com with SMTP id m12so5910406qth.4 for ; Wed, 01 Feb 2023 07:49:36 -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=zRQUuFoYUR2pvOYUuf+7GrDbY2TzeAKbJ5A6dN21N4g=; b=GXzNum2pnQDWQMJm0NPM7uxTqWv/y5iS7hOH2OePERyU6vd34N0N7svrdHve/g5nAB LN7dQtesgDzDyGZjSjVhrT965WZ6et6XnEXslMVCLijSAHqG7TuDJVLTJk/PDP8+DJBf fKJJWh5tU1ttzm4YuQNo0ys0cheNwdpjddfENSQSurMdWDJE/Flmn0CxzQ/6il4M/t/b q5DQ4S8JoXTdRgDmXfqSehLJ2BjTmM+UnaIgJaXX2lfRDaPfR9wN4bio4OAVyJp+AB/P /iUrGW6Gsm52wtSSOTXAp3C1ui3JPUIl6tr5Hc+rVgLxixWpcjtvercKedcQfLoMUkzn cRRA== 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=zRQUuFoYUR2pvOYUuf+7GrDbY2TzeAKbJ5A6dN21N4g=; b=dm5piAxBltgnDMag5TtcLCCXt2a1nvC4KeDPoR/3oPPb21mJxkJlk+hjbxOls558M5 5DTlivPpachcaxdNPQYfBPRU2HO53eUgtVJKRSsrQP/i6aJzsvN9vr/VmyVf9Lwjyh91 0p8kFOdMYUdO+4X8P+8aaFxYg1EM0zPGUHnBonMSNAsQO7j47LeOCIH87HJUtZT2+3Ph 9RnwNMy2GnaqYj2mRQtqcispM9VBcKp1W+nVYNeVP2KRS3Izxub8TRd/M1YUfOpCpnx/ gNrnzZ4VDJI72mi8BS7PUeGJhC6y1kxZp9L4QNKcFx3XCwzNU8E/SGu65vD6ffUZqvGc VZDg== X-Gm-Message-State: AO0yUKVdZ0dnAazBAw/yG+sPXJciDtH/bUJvpmrTkwAQdgRuJOes2Au8 +AY4L98Hq2EfQSXWXIQW8xV9hr0XpBBz1MRInFRHvZ65pzIS X-Received: by 2002:ac8:5e48:0:b0:3a8:1eab:bd95 with SMTP id i8-20020ac85e48000000b003a81eabbd95mr356677qtx.200.1675266575960; Wed, 01 Feb 2023 07:49:35 -0800 (PST) MIME-Version: 1.0 References: <20230125164227.1448218-1-roberto.foglietta@linuxteam.org> <845939bb-2968-64ed-13d7-a3e69c08c69e@siemens.com> In-Reply-To: From: "Roberto A. Foglietta" Date: Wed, 1 Feb 2023 16:48:59 +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: SDcHEEC+o+jb On Wed, 1 Feb 2023 at 16:40, Jan Kiszka wrote: > > On 01.02.23 16:30, Roberto A. Foglietta wrote: > > 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. > > I'm not categorically arguing against it, but in the absence of any use > case, it is hard to assess if there are reasonable ones. We already had > fun recently with "EXTRA_ARGS" [1], and this goes even more to the core. > It has been done once, it could be done twice. However, it is not my problem anymore if a project in Siemens will require a change to get upstream with ISAR or continuously be in maintenance or be kept downstream. I preferably focus on another revert [1] which actually allows a system which failed to grow its last partition to ignore it and go into production without any complaints - which can make a huge difference while adding a variable that is just a matter of adding flexibility and this should be the standard for all the subsystems at any level. [1] https://github.com/ilbers/isar/commit/22a014087ac8fde2e45e90c5cc2827b7f9e78863 Best regards, -R