mbox series

[v4,0/2] Custom ${S} series

Message ID 20210331063235.6877-1-Vijaikumar_Kanagarajan@mentor.com
Headers show
Series Custom ${S} series | expand

Message

Vijai Kumar K March 30, 2021, 9:32 p.m. UTC
Changes since V3:
- Fix build issue with qemumipsel-stretch.
(Need to pass --only source with --print-uris, since we are dealing
with source package)

CI build succeeded: http://ci.isar-build.org:8080/job/isar_vkk_devel/95/

Changes since V2:
- Introduce P2 to demonstrate apt:// without ${PV} set.
- Address review comment from Henning.
- Fix issue where do_apt_unpack is triggered for non apt://
SRC_URIs.

CI build going on: http://ci.isar-build.org:8080/job/isar_vkk_devel/93/

Changes since V1:

- Introduce a separate do_apt_unpack task

Vijai Kumar K (2):
  dpkg-base: Introduce do_apt_unpack
  Modify hello to demonstrate apt:// without ${PV}

 .../recipes-app/hello/{hello.inc => hello.bb} |  0
 meta-isar/recipes-app/hello/hello_2.10.bb     | 11 -------
 meta-isar/recipes-app/hello/hello_2.9.bb      |  8 -----
 meta/classes/dpkg-base.bbclass                | 29 ++++++++++++++++---
 4 files changed, 25 insertions(+), 23 deletions(-)
 rename meta-isar/recipes-app/hello/{hello.inc => hello.bb} (100%)
 delete mode 100644 meta-isar/recipes-app/hello/hello_2.10.bb
 delete mode 100644 meta-isar/recipes-app/hello/hello_2.9.bb

Comments

vijai kumar March 30, 2021, 10:37 p.m. UTC | #1
Hi,

On Wed, Mar 31, 2021 at 12:03 PM Vijai Kumar K
<Vijaikumar_Kanagarajan@mentor.com> wrote:
>
> Changes since V3:
> - Fix build issue with qemumipsel-stretch.
> (Need to pass --only source with --print-uris, since we are dealing
> with source package)

This case is something interesting. If you see the hello package in
[1], There are 2 versions of the binary package.

All x86 and ARM architectures  have version "2.10-1+deb9u1"
Rest of the architectures like mips, s390 and ppc have "2.10-1+b1"

Since we are using --only-source option to download, apt skips the
binary to source translation and directly fetches the latest source.
Which is "2.10-1+deb9u1". That is how it could be done, since the
recipe here is just the debian source file name.
But if you see by apt-cache policy the installation candidate for
mipsel is 2.10-1+b1 and the corresponding source version is "2.10-1".

Ideally we should pull 2.10-1 instead of 2.10-1+deb9u1 for mipsel.
That is what the binary is available for?

I know a non-maintainer upload will have a different binary package
version (+bX), but will point to the same source.
Here there are 2 different sources for different archs.
I am not sure if there are other such packages which have a similar
scenario. Just wanted to gather info on it here.

[1] https://packages.debian.org/stretch/hello

Thanks,
Vijai Kumar K

>
> CI build succeeded: http://ci.isar-build.org:8080/job/isar_vkk_devel/95/
>
> Changes since V2:
> - Introduce P2 to demonstrate apt:// without ${PV} set.
> - Address review comment from Henning.
> - Fix issue where do_apt_unpack is triggered for non apt://
> SRC_URIs.
>
> CI build going on: http://ci.isar-build.org:8080/job/isar_vkk_devel/93/
>
> Changes since V1:
>
> - Introduce a separate do_apt_unpack task
>
> Vijai Kumar K (2):
>   dpkg-base: Introduce do_apt_unpack
>   Modify hello to demonstrate apt:// without ${PV}
>
>  .../recipes-app/hello/{hello.inc => hello.bb} |  0
>  meta-isar/recipes-app/hello/hello_2.10.bb     | 11 -------
>  meta-isar/recipes-app/hello/hello_2.9.bb      |  8 -----
>  meta/classes/dpkg-base.bbclass                | 29 ++++++++++++++++---
>  4 files changed, 25 insertions(+), 23 deletions(-)
>  rename meta-isar/recipes-app/hello/{hello.inc => hello.bb} (100%)
>  delete mode 100644 meta-isar/recipes-app/hello/hello_2.10.bb
>  delete mode 100644 meta-isar/recipes-app/hello/hello_2.9.bb
>
> --
> 2.17.1
>
> --
> 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/20210331063235.6877-1-Vijaikumar_Kanagarajan%40mentor.com.
Henning Schild March 30, 2021, 11:34 p.m. UTC | #2
Am Wed, 31 Mar 2021 13:07:17 +0530
schrieb vijai kumar <vijaikumar.kanagarajan@gmail.com>:

> Hi,
> 
> On Wed, Mar 31, 2021 at 12:03 PM Vijai Kumar K
> <Vijaikumar_Kanagarajan@mentor.com> wrote:
> >
> > Changes since V3:
> > - Fix build issue with qemumipsel-stretch.
> > (Need to pass --only source with --print-uris, since we are dealing
> > with source package)  
> 
> This case is something interesting. If you see the hello package in
> [1], There are 2 versions of the binary package.
> 
> All x86 and ARM architectures  have version "2.10-1+deb9u1"
> Rest of the architectures like mips, s390 and ppc have "2.10-1+b1"

That is weird on its own. But we probably had this problem even before
this series.
Do those new sources produce working packages for those other arches or
do we really need to find the other sources?

> Since we are using --only-source option to download, apt skips the
> binary to source translation and directly fetches the latest source.
> Which is "2.10-1+deb9u1". That is how it could be done, since the
> recipe here is just the debian source file name.
> But if you see by apt-cache policy the installation candidate for
> mipsel is 2.10-1+b1 and the corresponding source version is "2.10-1".

Maybe we can also download that binary, maybe not store it, to make apt
double check against the binary. Jan found preferences not working for
apt-get source, maybe his case would also benefit from that. What i
understand is that "--only-source" can maybe be skipped to download
binary and source and get a cross check.

> Ideally we should pull 2.10-1 instead of 2.10-1+deb9u1 for mipsel.
> That is what the binary is available for?

We modify the package anyways, i guess it is important to produce a
working package, not too much "taking old sources" because upstream did
not build new ones for that arch.

Henning

> I know a non-maintainer upload will have a different binary package
> version (+bX), but will point to the same source.
> Here there are 2 different sources for different archs.
> I am not sure if there are other such packages which have a similar
> scenario. Just wanted to gather info on it here.
> 
> [1] https://packages.debian.org/stretch/hello
> 
> Thanks,
> Vijai Kumar K
> 
> >
> > CI build succeeded:
> > http://ci.isar-build.org:8080/job/isar_vkk_devel/95/
> >
> > Changes since V2:
> > - Introduce P2 to demonstrate apt:// without ${PV} set.
> > - Address review comment from Henning.
> > - Fix issue where do_apt_unpack is triggered for non apt://
> > SRC_URIs.
> >
> > CI build going on:
> > http://ci.isar-build.org:8080/job/isar_vkk_devel/93/
> >
> > Changes since V1:
> >
> > - Introduce a separate do_apt_unpack task
> >
> > Vijai Kumar K (2):
> >   dpkg-base: Introduce do_apt_unpack
> >   Modify hello to demonstrate apt:// without ${PV}
> >
> >  .../recipes-app/hello/{hello.inc => hello.bb} |  0
> >  meta-isar/recipes-app/hello/hello_2.10.bb     | 11 -------
> >  meta-isar/recipes-app/hello/hello_2.9.bb      |  8 -----
> >  meta/classes/dpkg-base.bbclass                | 29
> > ++++++++++++++++--- 4 files changed, 25 insertions(+), 23
> > deletions(-) rename meta-isar/recipes-app/hello/{hello.inc =>
> > hello.bb} (100%) delete mode 100644
> > meta-isar/recipes-app/hello/hello_2.10.bb delete mode 100644
> > meta-isar/recipes-app/hello/hello_2.9.bb
> >
> > --
> > 2.17.1
> >
> > --
> > 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/20210331063235.6877-1-Vijaikumar_Kanagarajan%40mentor.com.
> >
vijai kumar March 31, 2021, 9:53 a.m. UTC | #3
On Wed, Mar 31, 2021 at 2:04 PM Henning Schild
<henning.schild@siemens.com> wrote:
>
> Am Wed, 31 Mar 2021 13:07:17 +0530
> schrieb vijai kumar <vijaikumar.kanagarajan@gmail.com>:
>
> > Hi,
> >
> > On Wed, Mar 31, 2021 at 12:03 PM Vijai Kumar K
> > <Vijaikumar_Kanagarajan@mentor.com> wrote:
> > >
> > > Changes since V3:
> > > - Fix build issue with qemumipsel-stretch.
> > > (Need to pass --only source with --print-uris, since we are dealing
> > > with source package)
> >
> > This case is something interesting. If you see the hello package in
> > [1], There are 2 versions of the binary package.
> >
> > All x86 and ARM architectures  have version "2.10-1+deb9u1"
> > Rest of the architectures like mips, s390 and ppc have "2.10-1+b1"
>
> That is weird on its own. But we probably had this problem even before
> this series.
> Do those new sources produce working packages for those other arches or
> do we really need to find the other sources?

It does produce a working package. At least for hello.

>
> > Since we are using --only-source option to download, apt skips the
> > binary to source translation and directly fetches the latest source.
> > Which is "2.10-1+deb9u1". That is how it could be done, since the
> > recipe here is just the debian source file name.
> > But if you see by apt-cache policy the installation candidate for
> > mipsel is 2.10-1+b1 and the corresponding source version is "2.10-1".
>
> Maybe we can also download that binary, maybe not store it, to make apt
> double check against the binary. Jan found preferences not working for
> apt-get source, maybe his case would also benefit from that. What i
> understand is that "--only-source" can maybe be skipped to download
> binary and source and get a cross check.

For that we need to know the binary package it generates. Not all
source packages produce binary
packages with the same name. I still believe using --only-source is
right, if the SRC_URI of the recipe is expected to point
to the source package name. Which is by the way is the case.

This also acts as a guard, in case the user incorrectly specifies the
binary package name in SRC_URI.
In such a case do_apt_fetch would simply fail.

>
> > Ideally we should pull 2.10-1 instead of 2.10-1+deb9u1 for mipsel.
> > That is what the binary is available for?
>
> We modify the package anyways, i guess it is important to produce a
> working package, not too much "taking old sources" because upstream did
> not build new ones for that arch.

I agree here.

Some other packages with similar scenarios are mentioned below(not a
complete list).

1. https://packages.debian.org/stretch/zstd
2. https://packages.debian.org/stretch/zsh-static
3. https://packages.debian.org/stretch/apt
4. https://packages.debian.org/stretch/busybox

The updated version comes in via the security feed. Where only x86 and arm based
binaries are uploaded.
This FAQ[1], explains why it is missing for certain archs.
I guess it should be okay to use the new source to generate the debs.
Maybe we could capture this
entire scenario in a doc. I could amend the PR to add some info in one
of the docs.

[1] https://www.debian.org/security/faq#archismissing

Thanks,
Vijai Kumar K

>
> Henning
>
> > I know a non-maintainer upload will have a different binary package
> > version (+bX), but will point to the same source.
> > Here there are 2 different sources for different archs.
> > I am not sure if there are other such packages which have a similar
> > scenario. Just wanted to gather info on it here.
> >
> > [1] https://packages.debian.org/stretch/hello
> >
> > Thanks,
> > Vijai Kumar K
> >
> > >
> > > CI build succeeded:
> > > http://ci.isar-build.org:8080/job/isar_vkk_devel/95/
> > >
> > > Changes since V2:
> > > - Introduce P2 to demonstrate apt:// without ${PV} set.
> > > - Address review comment from Henning.
> > > - Fix issue where do_apt_unpack is triggered for non apt://
> > > SRC_URIs.
> > >
> > > CI build going on:
> > > http://ci.isar-build.org:8080/job/isar_vkk_devel/93/
> > >
> > > Changes since V1:
> > >
> > > - Introduce a separate do_apt_unpack task
> > >
> > > Vijai Kumar K (2):
> > >   dpkg-base: Introduce do_apt_unpack
> > >   Modify hello to demonstrate apt:// without ${PV}
> > >
> > >  .../recipes-app/hello/{hello.inc => hello.bb} |  0
> > >  meta-isar/recipes-app/hello/hello_2.10.bb     | 11 -------
> > >  meta-isar/recipes-app/hello/hello_2.9.bb      |  8 -----
> > >  meta/classes/dpkg-base.bbclass                | 29
> > > ++++++++++++++++--- 4 files changed, 25 insertions(+), 23
> > > deletions(-) rename meta-isar/recipes-app/hello/{hello.inc =>
> > > hello.bb} (100%) delete mode 100644
> > > meta-isar/recipes-app/hello/hello_2.10.bb delete mode 100644
> > > meta-isar/recipes-app/hello/hello_2.9.bb
> > >
> > > --
> > > 2.17.1
> > >
> > > --
> > > 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/20210331063235.6877-1-Vijaikumar_Kanagarajan%40mentor.com.
> > >
>