From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7361313182437081088 X-Forwarded-Encrypted: i=2; AJvYcCVMOxjRqBB3kMlv9O0lNywa1+Nb6F3UT+/URB7uSX09PMWui3MzHG5Wp1d8l3rRf3jy7T3UPlfZjsFN7OcFmxM+4jp8Zrp60/14WhA= X-Received: by 2002:a4a:d107:0:b0:5af:24c:6f0b with SMTP id k7-20020a4ad107000000b005af024c6f0bmr2295963oor.0.1713941975630; Tue, 23 Apr 2024 23:59:35 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6820:220a:b0:5ae:1f6c:8988 with SMTP id 006d021491bc7-5ae1f6c8ab8ls40620eaf.1.-pod-prod-00-us; Tue, 23 Apr 2024 23:59:34 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW7K9/cHYRE6PUvTEIl67BCo1rmTMSFIDOjA6gAjxBEIgKU1gZa3x9EKsFz6IXmkZleW79Lf+v7tl6TEXnH06EsvZkup2OztyLgb38= X-Google-Smtp-Source: AGHT+IEuUzIv/sw6TCMcwqC6+0Huo42BCKziQYGuGQUqJCk1tw0MzsPbNlMBFvXknLQ/fd/pjBsU X-Received: by 2002:a05:6808:180c:b0:3c7:4762:618f with SMTP id bh12-20020a056808180c00b003c74762618fmr629030oib.23.1713941974646; Tue, 23 Apr 2024 23:59:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713941974; cv=none; d=google.com; s=arc-20160816; b=S4unQVOYRWhhJcChj+6ARCah8v2sTw/kwRHKFKgwerxHMjIo+ZOvF0DS1oM+HQs5kz KVoBhK6SL1DFOvPoqJyl8hGoJBWZlBV7dOfkkmS2wuffWqofP+jOrCRioNUVsXnqDJvF rsF4AdIbSZIlisWjOKKDZ16mMETG0NW1a43AQIYDdKWz2/IbW6YO2Vtk+kqEjnXu8Rgn px1RMuR+imnyo9eETzlPSUYo2Xd9msWI7s4alPhTT6ozWdZl9PSVL/MmfMRE5YoiXaN/ 6+zY5vbygGEinaiDFoUfWNia7qZkGqzOh+TFrezZ/JWFwBneTOfO0D39QvV66zTcUGzo Zzgg== 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=RcG/qJMLAfFt2ngWhU3+2DhkzMw+lO5pzB8Q8fyfr28=; fh=NuUtq6zE/GeRVikrHWGxJJaEx3VlTVF0xb1Dr1Qr0JQ=; b=Vx3B2yyTGK2XLUGE0GifWYF4pSEEHDW2Zw1Qn/QIxQerd/wgEjmYLU3YDm3jMET1xn +1GojZWgbWCgMJH+Ucdf0xZcUgJpQz8XLbkHpis22I9nRFmcqfS6uujtA0OYID0TCVn3 /l7DGYPL5SJkGpTyk/8JRuLsjhMg0TWHJR8g+XtCuEXuoMwO+vtaJcSgOJVYwsGsovsd rIojZPcWrpxKh9J4NvBE9FW7kk5HD+TYdJiN1sig+ek9ryWtU+CGkapMFHMpbW1TvdQI Nk2K34bs0ZJ5/3/8xjPV+V7rLqXfaIwjJ6rLQLvVpzF/yQiYvf/yLs972ff+mdW9OWh4 DR4Q==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=nQYEBDVd; spf=pass (google.com: domain of srinuvasanasv@gmail.com designates 2607:f8b0:4864:20::e32 as permitted sender) smtp.mailfrom=srinuvasanasv@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail-vs1-xe32.google.com (mail-vs1-xe32.google.com. [2607:f8b0:4864:20::e32]) by gmr-mx.google.com with ESMTPS id a3-20020a056808128300b003c5f1bfdb6esi1221143oiw.0.2024.04.23.23.59.34 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 23 Apr 2024 23:59:34 -0700 (PDT) Received-SPF: pass (google.com: domain of srinuvasanasv@gmail.com designates 2607:f8b0:4864:20::e32 as permitted sender) client-ip=2607:f8b0:4864:20::e32; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=nQYEBDVd; spf=pass (google.com: domain of srinuvasanasv@gmail.com designates 2607:f8b0:4864:20::e32 as permitted sender) smtp.mailfrom=srinuvasanasv@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: by mail-vs1-xe32.google.com with SMTP id ada2fe7eead31-479ccc89792so308638137.0 for ; Tue, 23 Apr 2024 23:59:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713941974; x=1714546774; dara=google.com; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=RcG/qJMLAfFt2ngWhU3+2DhkzMw+lO5pzB8Q8fyfr28=; b=nQYEBDVdgcgnQQxcYDj0LrzexxgjSoqfVJ8DQn9Hwa+PvJ0NzWHdspO7b7K/ebVWZN ZgUPZx39VxF1XO0ypolfGSohMd6iVXCg8O2EXDZGIlHmciq/RwyJGJKSjB/Zp1JLIlWm GM70oAMtx4CRC8116XzFelLCybWlZ5OXV+vq8y9CBF6EFstcWpwPIImTiyke422kqhil a2dyr8UhfFZj34u3Np+gNVJkpvZuEFm8LBB0v0QD9Rv7ndc2fKv1zfKUzk7wty06kRkb 37OckOj3MfbLF+cNI1cDXYJ7+Vj2TKVQ/E9D2VXrbiQxfe0M6GkinEhNfbcW7dR/YoWw kGdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713941974; x=1714546774; 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=RcG/qJMLAfFt2ngWhU3+2DhkzMw+lO5pzB8Q8fyfr28=; b=Qo+H8DrACct8JtTjaJzUMFaPxLf8QSuZj2AqBPzFn7GBZ4NJ30SVo/b1C8T+lOceNX 3GVt9iAtL7krjtiJOcJ1NhW2KjxAqf+dNu1B9RzuuaKjytYMB7+cSDmkeaCMxks129lu pJFJXd6XJZAuZ5Ott9wkzCA9RPPlDgTs7AS2Rl+lPBzGq+hsXmUrkBg+w8QsC97iCvGT ONaUeWMqqjyRLzaO8i5oC6ORXwJMz09Dmq3ph75b8YCJdO4iysdO3VK9VX9TXpLrOk7P 3zsxQiUotKGitXNkr5LAnrN/6W5tysxCcFyacuS65eqQwb0pGpyiIRH3P1oSEF53Loh+ ANOg== X-Forwarded-Encrypted: i=1; AJvYcCW8yOgRsYdDHPrHh8W9DGGf2OQ2roAsEwJ05BGEqJVJo+xnGdG94zBQ3MsYD/hv30+q9u3gGEWLgNfkQlM/fxeHyh/uih+ajTmbPfY= X-Gm-Message-State: AOJu0YwOMzWMGjQ0lKfBmw4rBhmIqzBCwT2V6DQnKVaTHirAw6Fqqb5D mypuW626qBFD8yJIEhrreHsTj7Fctxpp2wbfOcx133rigkpvHh2wVsr84sBSXGW6ihwYoUJe7J2 41mfsAc6w9InuNqaE4EFLHJQnOGw8fufB X-Received: by 2002:a67:e31a:0:b0:47c:254:2919 with SMTP id j26-20020a67e31a000000b0047c02542919mr4769276vsf.13.1713941973829; Tue, 23 Apr 2024 23:59:33 -0700 (PDT) MIME-Version: 1.0 References: <20240424061452.506278-1-srinuvasan.a@siemens.com> In-Reply-To: From: Srinuvasan Arjunan Date: Wed, 24 Apr 2024 12:29:22 +0530 Message-ID: Subject: Re: [PATCH] meta/classes/dpkg-prebuilt: expand SRC_URI variable To: "Schmidt, Adriaan" Cc: "Arjunan, Srinu" , "isar-users@googlegroups.com" , "Kiszka, Jan" , "MOESSBAUER, Felix" Content-Type: multipart/alternative; boundary="000000000000840ee40616d2362c" X-TUID: gGb3pMJLRfuE --000000000000840ee40616d2362c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Apr 24, 2024 at 12:03=E2=80=AFPM 'Schmidt, Adriaan' via isar-users = < isar-users@googlegroups.com> wrote: > Hi, > > srinuvasan.a, Mittwoch, 24. April 2024 08:15: > > In some cases we may need to install the prebuilt deb packages based on > > some condition or based on distro selection, in this case the present > > implementation not works as expected. > > I've seen dpkg-prebuilt SRC_URIs containing "${PACKAGE_ARCH}" and/or > "${DISTRO}", and that seemed to work just fine. Your patch would only > change the time at which expansion happens, and that should not make > a difference. > > Could you give some details or an example what you're trying to do? > Hi Adriaan, Suppose if you want to install the prebuilt-deb packages based on the selection like below: SRC_URI:append =3D " ${@ 'file://example-prebuilt_1.0.0-0_bullseye.deb' if d.getVar('BASE_DISTRO_CODENAME') =3D=3D 'bullseye' else 'file://example-prebuilt_1.0.0-0_all.deb' }" The above changes not works with the present implementation, with the help of expanding the SRC_URI variable we can able to get the right packages in WORKDIR. Thanks, Srinu > > > The reason behind this is SRC_URI variable is not exapnding, remove > > False flag to expand SRC_URI variable to get the required field. > > The current behavior was introduced in > ee20790f454030fad40b4ac7b97bf9eaadda48e7. > Commit message reads: > --- > signatures: do not expand SRC_URI > This patch reworks modification to SRC_URI to avoid expanding > the variables in the string. By that, both cachability issues, > as well as information leaks (e.g. repo access tokens) are > mitigated. > > Signed-off-by: Felix Moessbauer > --- > I assume that this is still valid? > > Adriaan > > > Signed-off-by: Srinuvasan A > > --- > > meta/classes/dpkg-prebuilt.bbclass | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/meta/classes/dpkg-prebuilt.bbclass b/meta/classes/dpkg- > > prebuilt.bbclass > > index 8135fc81..1ee1147c 100644 > > --- a/meta/classes/dpkg-prebuilt.bbclass > > +++ b/meta/classes/dpkg-prebuilt.bbclass > > @@ -7,7 +7,7 @@ inherit dpkg-base > > > > python do_unpack:prepend() { > > # enforce unpack=3Dfalse > > - src_uri =3D (d.getVar('SRC_URI', False) or '').split() > > + src_uri =3D (d.getVar('SRC_URI') or '').split() > > if len(src_uri) =3D=3D 0: > > return > > def ensure_unpack_false(uri): > > -- > > 2.34.1 > > > > -- > > You received this message because you are subscribed to the Google Grou= ps > > "isar-users" group. > > To unsubscribe from this group and stop receiving emails from it, send = an > > email to isar-users+unsubscribe@googlegroups.com. > > To view this discussion on the web visit > > https://groups.google.com/d/msgid/isar-users/20240424061452.506278-1- > > srinuvasan.a%40siemens.com. > > -- > You received this message because you are subscribed to the Google Groups > "isar-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to isar-users+unsubscribe@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/isar-users/AS4PR10MB5318C687D0B13B3007F= DC20BED102%40AS4PR10MB5318.EURPRD10.PROD.OUTLOOK.COM > . > --000000000000840ee40616d2362c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Wed, Apr 24, 2024 at 12:03=E2=80= =AFPM 'Schmidt, Adriaan' via isar-users <isar-users@googlegroups.com> wrote:
Hi,

srinuvasan.a, Mittwoch, 24. April 2024 08:15:
> In some cases we may need to install the prebuilt deb packages based o= n
> some condition or based on distro selection, in this case the present<= br> > implementation not works as expected.

I've seen dpkg-prebuilt SRC_URIs containing "${PACKAGE_ARCH}"= and/or
"${DISTRO}", and that seemed to work just fine. Your patch would = only
change the time at which expansion happens, and that should not make
a difference.

Could you give some details or an example what you're trying to do?
=

=C2=A0 =C2=A0Hi Adriaan,

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Suppose if you want to install t= he prebuilt-deb packages based on the selection like below:=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0SRC_URI:append =3D " ${@ = 9;file://example-prebuilt_1.0.0-0_bullseye.deb' if d.getVar('BASE_D= ISTRO_CODENAME') =3D=3D 'bullseye' else 'file://example-pre= built_1.0.0-0_all.deb' }"

The above chang= es not works with the present implementation, with the help of expanding th= e SRC_URI variable we can able to get the right packages in WORKDIR.
<= div>
Thanks,
Srinu

> The reason behind this is SRC_URI variable is not exapnding, remove > False flag to expand SRC_URI variable to get the required field.

The current behavior was introduced in ee20790f454030fad40b4ac7b97bf9eaadda= 48e7.
Commit message reads:
---
signatures: do not expand SRC_URI
This patch reworks modification to SRC_URI to avoid expanding
the variables in the string. By that, both cachability issues,
as well as information leaks (e.g. repo access tokens) are
mitigated.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
I assume that this is still valid?

Adriaan

> Signed-off-by: Srinuvasan A <srinuvasan.a@siemens.com>
> ---
>=C2=A0 meta/classes/dpkg-prebuilt.bbclass | 2 +-
>=C2=A0 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/dpkg-prebuilt.bbclass b/meta/classes/dpkg- > prebuilt.bbclass
> index 8135fc81..1ee1147c 100644
> --- a/meta/classes/dpkg-prebuilt.bbclass
> +++ b/meta/classes/dpkg-prebuilt.bbclass
> @@ -7,7 +7,7 @@ inherit dpkg-base
>
>=C2=A0 python do_unpack:prepend() {
>=C2=A0 =C2=A0 =C2=A0 # enforce unpack=3Dfalse
> -=C2=A0 =C2=A0 src_uri =3D (d.getVar('SRC_URI', False) or '= ;').split()
> +=C2=A0 =C2=A0 src_uri =3D (d.getVar('SRC_URI') or '')= .split()
>=C2=A0 =C2=A0 =C2=A0 if len(src_uri) =3D=3D 0:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return
>=C2=A0 =C2=A0 =C2=A0 def ensure_unpack_false(uri):
> --
> 2.34.1
>
> --
> You received this message because you are subscribed to the Google Gro= ups
> "isar-users" group.
> To unsubscribe from this group and stop receiving emails from it, send= an
> email to isar-users+unsubscribe@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/= d/msgid/isar-users/20240424061452.506278-1-
> srinuvasan.a%40siemens.com.

--
You received this message because you are subscribed to the Google Groups &= quot;isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to isar-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://g= roups.google.com/d/msgid/isar-users/AS4PR10MB5318C687D0B13B3007FDC20BED102%= 40AS4PR10MB5318.EURPRD10.PROD.OUTLOOK.COM.
--000000000000840ee40616d2362c--