From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7361313182437081088 X-Forwarded-Encrypted: i=2; AJvYcCUxFZKe/145o/eD4RkxrbgLb8894s0lMTvFvaR04/wg+S72bQHbhURTij1CoZXh25MNZnW6hqngmMjF2rn+JjPLaspQRfHtdLof6IM= X-Received: by 2002:a05:6a20:5603:b0:1a5:6be8:2d70 with SMTP id ir3-20020a056a20560300b001a56be82d70mr2083216pzc.21.1713945773355; Wed, 24 Apr 2024 01:02:53 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6a00:14ce:b0:6ec:ec93:d29f with SMTP id d2e1a72fcca58-6f0bd2b5026ls979361b3a.2.-pod-prod-00-us; Wed, 24 Apr 2024 01:02:52 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUR9LfaHiwi61SmxV2euOy56p6xig0wP26N+EfphjM6R0ZYzJPX2TjdvDsCUiTxNKfKsnRelLg+hcfPmo1hCWlKT2qGaC+TrlRnIwk= X-Google-Smtp-Source: AGHT+IHXLWG4+E8wMOT5kzK9vkW3ucaHUOh9OE7hHGiI3/FijRsMdVF2/4dEEXftmBsSPYclx2pN X-Received: by 2002:a05:6a20:9149:b0:1ad:6874:497d with SMTP id x9-20020a056a20914900b001ad6874497dmr2647427pzc.17.1713945771743; Wed, 24 Apr 2024 01:02:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713945771; cv=none; d=google.com; s=arc-20160816; b=EijDyALVte+w3NTVuRDMNgYrYH+IdhvDDnuufNaKq5CXZsYCt5HCV/Q71//yNRjijc fE5doaHaKj5StnUSSIxPsBI7jqhZZxzPgd/kn7EqhapZEsJAewLUI0OSB5XMd0bahdjx zfeg10WtPFmjAP34fw60wXITxZb/NO9EYxqJdYMNwPPXOO7eVgiBoWLHmNQHHqpXvQ7C O054Nv+lP1pmYXblcGpiFyYNrY+roDnyxUsu7HYcmMdTv8n+PQSeyBnmU/GiMToYL3Vl 4e4hUKlyBC9hLL2cPK+33ZjZvXiVANYD/ab9xI8JLvIlbf3pU3sOLz8fJlh7ZT0jVUSg ljwA== 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=dTd0UsFeNqMQRxzgt8wgMs5Z/JBLlGPFcmb2MTtUL8k=; fh=wUaXO/pGKZSQtU3XxUrVNaTdPLt4PwGRpnu0FoN/Y2U=; b=an5HwO00kHQKWH+2V0UPqcW+tejlh9Xjwbyn/5FuU2ZkJrOVjhLtEMpzVKnQCZEMHb HI+qS2gyvEcC5KVgzE0DVLd3EcQ2XpLGgr7g6ZGNXGJeX9vtJh5pAkgboqTfrdbvZ55v wy4XQ/icCKMGJLyEZD1sriLhjQcQRjMXizuDjGasW3AZ6w9WknJE7jgVLU4qz9ODob3i ZY37d037IVrVwxwPS5mf1qSVbMggOwrc8um603ifyugkntYQfLVd1m2t1uJImquiSlSX yCfhjcQFWdVIti6wIFVXD0AEf9dq4J+v0bUBE2zbR+lcvV88mjkZO4JjSAaj6Y0bXyDr 6LEQ==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=WRuF9f3+; spf=pass (google.com: domain of srinuvasanasv@gmail.com designates 2607:f8b0:4864:20::e2a 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-xe2a.google.com (mail-vs1-xe2a.google.com. [2607:f8b0:4864:20::e2a]) by gmr-mx.google.com with ESMTPS id 200-20020a6300d1000000b005f750bda898si956174pga.4.2024.04.24.01.02.51 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 24 Apr 2024 01:02:51 -0700 (PDT) Received-SPF: pass (google.com: domain of srinuvasanasv@gmail.com designates 2607:f8b0:4864:20::e2a as permitted sender) client-ip=2607:f8b0:4864:20::e2a; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=WRuF9f3+; spf=pass (google.com: domain of srinuvasanasv@gmail.com designates 2607:f8b0:4864:20::e2a as permitted sender) smtp.mailfrom=srinuvasanasv@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: by mail-vs1-xe2a.google.com with SMTP id ada2fe7eead31-479ccc89792so330770137.0 for ; Wed, 24 Apr 2024 01:02:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713945771; x=1714550571; 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=dTd0UsFeNqMQRxzgt8wgMs5Z/JBLlGPFcmb2MTtUL8k=; b=WRuF9f3+R3OtKYIqhmQ6zGDQpQZUVbdPyn/9m1qSEZDiMuYA3jmyGY9rawQmrZThWI 28ApRZAQnJsHvC8dEZI4pN6qhMPwOO1Oy2egdmgWP6kSSoNFQPMFYTcFluAaJ2cW0W6f wuObXbZnWrRE5kW1LQRHT6NYlpu66o8pTvAjljTxhwa5YAd/3o9HPK1ZbTuk+VXcmkz6 NUAtU4IAa97tIg+3f+x4sZUHaNXCPlXGv9oedNmE5TRgSwQkidnRFH5Zd5ce4mus87SB JGaikJX/QI66nf8f6gDz23qHajlGgOPpLwuiJ9yR3O5JTtEA4k+psmhQ1UOmlAbZJKDO vOIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713945771; x=1714550571; 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=dTd0UsFeNqMQRxzgt8wgMs5Z/JBLlGPFcmb2MTtUL8k=; b=FINQzZPxw+ffRPkyXRRNeCFiYUl38u5D06AzUchf0g7fIlNCk7iW9+xV4RZL99Tbl+ OBT84Wd63tHEdTLD/QXk4Ua21jY7u3tAhvoBh2El6kpEZsBomxo99Db2IvOTnNmttcmy N7MeQNXbtoVh6LZjAcaBqaIRooeZT6PLmTAi7wNly3bfhwyr2VHLcO85WFxYjVcfGDFr md7fG6B/z8MZzS5WNDMZDJvuLgli5CCWqQmCCmAJGitsqwbIrPOgSWWErL2i1RmNqpMZ NtHm/wbXamXwGnMAWRC458MAkIwWSsCLnxe616ry4nn+0lp4cA+be36pN4uOjwI+gUxG 5kMw== X-Forwarded-Encrypted: i=1; AJvYcCU4mhl3StOQAj1HXLJy4bSrCK9EkK29TCXiZVvV85GZhXpFXDqN7Xl+qEKG78M5RN3gPhOxDMfCaTVX0Z/hlXDhQpqs5uYWr171BpE= X-Gm-Message-State: AOJu0YxjyshXx3QIyYap6gH4o/Z6PwvbWhezSHBqs6Du1mO6gncHg9ES uK68gi+sIT0+BZGgvJNQa4yZEkRCVzgNl71TcAm+UCESZl0AZabUvQ2J9VvN+TedqL444o+UM6A 1BMWYu3v8A9lHrVK4xgJSEGZqHYIu2Qz5cec= X-Received: by 2002:a67:f709:0:b0:47b:a6ef:bb3e with SMTP id m9-20020a67f709000000b0047ba6efbb3emr6703574vso.2.1713945769303; Wed, 24 Apr 2024 01:02:49 -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 13:32:38 +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="000000000000be66f70616d31886" X-TUID: jkimhiofNer1 --000000000000be66f70616d31886 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Apr 24, 2024 at 12:57=E2=80=AFPM Schmidt, Adriaan < adriaan.schmidt@siemens.com> wrote: > Hi Srinu, > > In this case I would: > > PACKAGE_NAME =3D "example-prebuilt_1.0.0-0_all.deb" > PACKAGE_NAME:debian-bullseye =3D "example-prebuilt_1.0.0-0_bullseye.deb" > SRC_URI +=3D "file://${PACKAGE_NAME}" > > Adriaan > Hi Adriaan, Actually this is not my use cases but same intention, originally my use case is am going to install the copyright file based on the selection of LICENSE variable which is configured in the recipe , this selection of copyright file i introduced in debianize.bbclass file, when we build the images it is not building successfully, we faced build error in prebuilt-deb recipe. Your suggestion only works with the overrides variable not for others, but my use case is based on the user configure LICENSE in the recipe, it should pick the appropriate copyright file and install it in the debian package. Please refer my original use case here: https://groups.google.com/g/isar-users/c/SCM8yQ0PYXg Many thanks, Srinu > > > > From: Srinuvasan Arjunan > Sent: Mittwoch, 24. April 2024 08:59 > To: Schmidt, Adriaan (T CED EDC-DE) > Cc: Arjunan, Srinu (DI CTO FDS CES LX PBU 2) ; > isar-users@googlegroups.com; Kiszka, Jan (T CED) = ; > Moessbauer, Felix (T CED OES-DE) > Subject: Re: [PATCH] meta/classes/dpkg-prebuilt: expand SRC_URI variable > > > > On Wed, Apr 24, 2024 at 12:03=E2=80=AFPM 'Schmidt, Adriaan' via isar-user= s 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 hel= p > of expanding the SRC_URI variable we can able to get the right packages i= n > 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 mailto:isar-users%2Bunsubscribe@googlegroups.com. > > To view this discussion on the web visit > > https://groups.google.com/d/msgid/isar-users/20240424061452.506278-1- > > srinuvasan.a%http://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 mailto:isar-users%2Bunsubscribe@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 > . > --000000000000be66f70616d31886 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Wed, Apr 24, 2024 at 12:57=E2=80= =AFPM Schmidt, Adriaan <a= driaan.schmidt@siemens.com> wrote:
Hi Srinu,

In this case I would:

PACKAGE_NAME =3D "example-prebuilt_1.0.0-0_all.deb"
PACKAGE_NAME:debian-bullseye =3D "example-prebuilt_1.0.0-0_bullseye.de= b"
SRC_URI +=3D "file://${PACKAGE_NAME}"

Adriaan

=C2=A0 Hi Adriaan,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Actually this= is not my use cases but same intention, originally my use case is am going= to install the copyright file based on the selection of LICENSE variable w= hich is configured in the recipe , this selection=C2=A0of copyright file i = introduced in debianize.bbclass file, when we build the images it is not bu= ilding successfully, we faced build error in prebuilt-deb recipe.

=C2=A0 Your suggestion=C2=A0only works with the overrides= =C2=A0variable not for others, but my use case=C2=A0is based on the user co= nfigure LICENSE in the=C2=A0recipe, it should pick the appropriate=C2=A0 co= pyright file and install it in the debian package.

Please refer my original use case=C2=A0here:


Many thanks,
Srinu



From: Srinuvasan Arjunan <srinuvasanasv@gmail.com>
Sent: Mittwoch, 24. April 2024 08:59
To: Schmidt, Adriaan (T CED EDC-DE) <adriaan.schmidt@siemens.com>
Cc: Arjunan, Srinu (DI CTO FDS CES LX PBU 2) <srinuvasan.a@siemens.com>; isar-users@goog= legroups.com; Kiszka, Jan (T CED) <jan.kiszka@siemens.com>; Moessbauer, Feli= x (T CED OES-DE) <felix.moessbauer@siemens.com>
Subject: Re: [PATCH] meta/classes/dpkg-prebuilt: expand SRC_URI variable


On Wed, Apr 24, 2024 at 12:03=E2=80=AFPM 'Schmidt, Adriaan' via isa= r-users <mailto: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 the prebu= ilt-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 " ${@ '= ;file://example-prebuilt_1.0.0-0_bullseye.deb' if d.getVar('BASE_DI= STRO_CODENAME') =3D=3D 'bullseye' else 'file://example-preb= uilt_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 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 <mailto:felix.moessbauer@siemens.com>
---
I assume that this is still valid?

Adriaan

> Signed-off-by: Srinuvasan A <mailto: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 mailto:isar-users%2Bunsubscribe@googlegroups.com. > To view this discussion on the web visit
> https://groups.google.com/= d/msgid/isar-users/20240424061452.506278-1-
> srinuvasan.a%http://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 mailto:isar-users%2Bunsubscribe@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.
--000000000000be66f70616d31886--