From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7192631200934002688 X-Received: by 2002:ac5:c744:0:b0:3ea:94ea:110b with SMTP id b4-20020ac5c744000000b003ea94ea110bmr748152vkn.22.1675328709723; Thu, 02 Feb 2023 01:05:09 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a67:bb01:0:b0:3aa:190a:9431 with SMTP id m1-20020a67bb01000000b003aa190a9431ls393306vsn.4.-pod-prod-gmail; Thu, 02 Feb 2023 01:05:09 -0800 (PST) X-Google-Smtp-Source: AK7set9t7/5pJNMF0T3ITDVm7X67iWH2BT0k7xifb6AqCsHocKqBkywXMzofsYen4zby8FgBfZQF X-Received: by 2002:a05:6102:3748:b0:3f3:9ae8:9088 with SMTP id u8-20020a056102374800b003f39ae89088mr3782633vst.22.1675328708973; Thu, 02 Feb 2023 01:05:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675328708; cv=none; d=google.com; s=arc-20160816; b=GWkE4oTBrEVoPUSAHSbFSdy6g2HfHATNQz70TiVZxQCDhm5hcvbKGlF+U0ee2/nLw+ qIH+g5RzZ6YkLNiSGMUCPYb9yiEtj7y7FoxLzTyl7NbGw9PQW4ZMRto+veHEBvCf5uDi oKAjSA95P1oHUyaqHjGSQ+Afc81zckGixajP2tWeNBIzxQU2F2S+P3vY3s7qa/4LiHRb 4+8e6c9jkdlRCE717v/agVgLe8mCbCi47BuESnvTme6jjOzxXpr4QLanKVsmKS6kAAJT 7yrCydOCckYEYmejmF3jrL0hvbWY++KjWXL7U/6No3jsmXqVUu8AcYbchXNwJti+s2mI duaQ== 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:to:from; bh=QkK8ohiGPq/kXvHl5NJwhVzbuyMTpLe6ddy378geK4k=; b=vKqfnliPVWRBVcAgULcU8kxvX+05S3S6ptB18mumMx0Z30Jx80oxb15t8xslWzCjCl r4DR2blUfvhx3wDmF281sS9a5Zgw519ZC8Jnllq3na274MzxbO/mUQwzOp69Tv30Cnfr v9yLvS8/uDtp5bvNeIcIJYqGC1G32oBKDIMN/Q2xMO85Lev7qgrOaoglTsQReP1dhHMu ukTlzPJYupAX7Rytb6zBorUsLcIEQoDoCxqmZv+aFNQBY8kr8nySQtpJi2Qi+czNLvVN J6nS7G3EIVmrG9M7EgJUM8ivOrKodIIECih40DF7grvdAS4ceRci5GKxyQ1Kq8p8UtQN v8PQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id y21-20020a05610230b500b003f046825252si1308198vsd.1.2023.02.02.01.05.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 Feb 2023 01:05:08 -0800 (PST) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from hp.localnet (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 312955Ei010534 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 2 Feb 2023 10:05:06 +0100 From: Uladzimir Bely To: Jan Kiszka , isar-users@googlegroups.com Subject: Re: [PATCH v3] dpkg: sbuild allows extra arguments via DPKG_SBUILD_EXTRA_ARGS v3 Date: Thu, 02 Feb 2023 12:04:54 +0300 Message-ID: <2168008.hkbZ0PkbqX@hp> In-Reply-To: <38cf175a-8d4e-6dd4-cb55-71c0d118b5b0@siemens.com> References: <20230125164227.1448218-1-roberto.foglietta@linuxteam.org> <38cf175a-8d4e-6dd4-cb55-71c0d118b5b0@siemens.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: nwnsVM7WQe3j In mail from Wednesday, 1 February 2023 22:02:56 +03 user Jan Kiszka wrote: > On 01.02.23 16:48, Roberto A. Foglietta wrote: > > 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. > > Looked around internally, and I can confirm that we do not have such a > demand in our layers. So, in the absence of a reasonable use case for > this interface, I vote for reverting it. Uladzimir, do you need a revert > patch from me? > > Jan Yes, please, send a revert with an explanation why we don't want it.