public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* custom-kernel downgrade and linux-libc-dev
@ 2019-01-16 16:27 Henning Schild
  2019-01-16 19:16 ` Jan Kiszka
  0 siblings, 1 reply; 3+ messages in thread
From: Henning Schild @ 2019-01-16 16:27 UTC (permalink / raw)
  To: isar-users, Kiszka, Jan (CT RDA IOT SES-DE)

Hi,

our custom kernel builds always generate a linux-libc-dev package
matching the kernel kernel version. So for a cip you would get
linux-libc-dev-4.4.xx.

Prebuild debian packages from upstream depend on a linux-libc-dev >=
<debian-expected-version>. I.e. you want build-essential in stretch,
you will end up with a "Depends: linux-libc-dev (>= 4.9.65-3)"
somewhere in your deps chain.
But if you are building a custom kernel lower than the expected version
you will end up with a smaller linux-libc-dev in the isar repo. And the
strong pinning will leave apt no choice but to give up and trying to
resolve the problem. So if you want to include i.e build-essential into
an image with a kernel downgrade, you will not be able to build that
image.

That issue is especially problematic since it will creap into the
buildchroot after the package was deployed by the first kernel build.
And you will end up with a setup where partial rebuilds involving
buildchroot changes will not work anymore.

In the layer i discovered this problem in i now remove the
linux-libc-dev package in a do_deploy_deb_prepend. That seems to be a
working hack for the downgrade case, but might not be the best idea for
an upgrade case.

But my current suggestion would be to ignore the whole issue of kernel
header compatibilty and never deploy the linux-libc-dev package from
custom kernel builds. Thoughts?

Henning

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: custom-kernel downgrade and linux-libc-dev
  2019-01-16 16:27 custom-kernel downgrade and linux-libc-dev Henning Schild
@ 2019-01-16 19:16 ` Jan Kiszka
  2019-01-17 10:06   ` Henning Schild
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Kiszka @ 2019-01-16 19:16 UTC (permalink / raw)
  To: Henning Schild, isar-users

On 16.01.19 17:27, Henning Schild wrote:
> Hi,
> 
> our custom kernel builds always generate a linux-libc-dev package
> matching the kernel kernel version. So for a cip you would get
> linux-libc-dev-4.4.xx.
> 
> Prebuild debian packages from upstream depend on a linux-libc-dev >=
> <debian-expected-version>. I.e. you want build-essential in stretch,
> you will end up with a "Depends: linux-libc-dev (>= 4.9.65-3)"
> somewhere in your deps chain.
> But if you are building a custom kernel lower than the expected version
> you will end up with a smaller linux-libc-dev in the isar repo. And the
> strong pinning will leave apt no choice but to give up and trying to
> resolve the problem. So if you want to include i.e build-essential into
> an image with a kernel downgrade, you will not be able to build that
> image.
> 
> That issue is especially problematic since it will creap into the
> buildchroot after the package was deployed by the first kernel build.
> And you will end up with a setup where partial rebuilds involving
> buildchroot changes will not work anymore.
> 
> In the layer i discovered this problem in i now remove the
> linux-libc-dev package in a do_deploy_deb_prepend. That seems to be a
> working hack for the downgrade case, but might not be the best idea for
> an upgrade case.
> 
> But my current suggestion would be to ignore the whole issue of kernel
> header compatibilty and never deploy the linux-libc-dev package from
> custom kernel builds. Thoughts?

Better solution is to only deploy linux-libc-dev if it is newer than the distro 
version. If you do not do that, you would break applications that explicitly 
want to exploit interfaces of newer kernels.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: custom-kernel downgrade and linux-libc-dev
  2019-01-16 19:16 ` Jan Kiszka
@ 2019-01-17 10:06   ` Henning Schild
  0 siblings, 0 replies; 3+ messages in thread
From: Henning Schild @ 2019-01-17 10:06 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: isar-users

Am Wed, 16 Jan 2019 20:16:14 +0100
schrieb Jan Kiszka <jan.kiszka@siemens.com>:

> On 16.01.19 17:27, Henning Schild wrote:
> > Hi,
> > 
> > our custom kernel builds always generate a linux-libc-dev package
> > matching the kernel kernel version. So for a cip you would get
> > linux-libc-dev-4.4.xx.
> > 
> > Prebuild debian packages from upstream depend on a linux-libc-dev >=
> > <debian-expected-version>. I.e. you want build-essential in stretch,
> > you will end up with a "Depends: linux-libc-dev (>= 4.9.65-3)"
> > somewhere in your deps chain.
> > But if you are building a custom kernel lower than the expected
> > version you will end up with a smaller linux-libc-dev in the isar
> > repo. And the strong pinning will leave apt no choice but to give
> > up and trying to resolve the problem. So if you want to include i.e
> > build-essential into an image with a kernel downgrade, you will not
> > be able to build that image.
> > 
> > That issue is especially problematic since it will creap into the
> > buildchroot after the package was deployed by the first kernel
> > build. And you will end up with a setup where partial rebuilds
> > involving buildchroot changes will not work anymore.
> > 
> > In the layer i discovered this problem in i now remove the
> > linux-libc-dev package in a do_deploy_deb_prepend. That seems to be
> > a working hack for the downgrade case, but might not be the best
> > idea for an upgrade case.
> > 
> > But my current suggestion would be to ignore the whole issue of
> > kernel header compatibilty and never deploy the linux-libc-dev
> > package from custom kernel builds. Thoughts?  
> 
> Better solution is to only deploy linux-libc-dev if it is newer than
> the distro version. If you do not do that, you would break
> applications that explicitly want to exploit interfaces of newer
> kernels.

True, i thought that would be hard to detect. But i think i found some
shell code to easily make that comparison using debian tools.

Henning

> Jan
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-17 10:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-16 16:27 custom-kernel downgrade and linux-libc-dev Henning Schild
2019-01-16 19:16 ` Jan Kiszka
2019-01-17 10:06   ` Henning Schild

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox