NACK/Cmnt: [PATCH 2/2][FOCAL kernel-snaps-uc20] pc-lowlatency: snapcraft.yaml use pure snapcraft syntax
Dimitri John Ledkov
dimitri.ledkov at canonical.com
Thu Jul 29 12:41:20 UTC 2021
On Thu, Jul 29, 2021 at 12:14 PM Dimitri John Ledkov
<dimitri.ledkov at canonical.com> wrote:
>
> On Thu, Jul 29, 2021 at 10:30 AM Stefan Bader
> <stefan.bader at canonical.com> wrote:
> >
> > On 28.07.21 16:18, Dimitri John Ledkov wrote:
> > > Use pure snapcraft syntax to package debs into a snap, with
> > > declarative syntax for additional PPA repositories, packages to stage,
> > > and reorg inside the kernel snap.
> > >
> > > This removes dependency on the Makefiles, and makes the snap always
> > > buildable as ABI version is automatically selected. This makes it
> > > possible to build this snapcraft.yaml in ESM and embargoed PPAs ahead
> > > of public releases without cranking, simply by doing requestbuilds()
> > > via API or launchpad WebUI. Once can still do empty git commit and
> > > push to trigger builds with a code change. One can also build it
> > > locally with multipass or lxd providers, remotely with remote-build,
> > > or push to launchpad and create snap build there.
> > >
> > > Sample build at
> > > https://launchpad.net/~xnox/+snap/xnox-lowlatency/+build/1478574
> > >
> > > Differences versus current snap:
> > > - different locations of the copyright and license files
> > > - lack of lib/{modules|firmware} ../{modules|firmware} symlinks, which
> > > are unused (?!)
> > >
> > > Signed-off-by: Dimitri John Ledkov <dimitri.ledkov at canonical.com>
> > > ---
> >
> > This breaks tooling as it is. And I have not idea (as this never properly was
> > discussed what would be the way to fix it.
> >
>
pushing no source change commits with a new tag will make this scheme
be compatible with existing workflow. As it tries to find the latest
tip of git repo, resolve it to a tag, and check that there have been
builds done with it.
to make the switch to crankless from there, instead of of state of
"confirmed / fix committed" be ready to be cranked / crank committed.
We'd need to make it "ready to request builds", and then builds should
be done. Something along the lines of interating the builds, and
checking if there was a build done, after the task has became
"confirmed" (once again).
But I'm not too sure if swm currently even works correctly for ESM
snaps, because it seems like we only search for snaps in
~canonical-kernel-snaps and do not look in ~canonical-kernel-esm. I
think I should send a fix for it. Also filed a bug report for
launchpad to expose over the API which snaps are attached to a given
git branch.
>
> > -Stefan
> >
> > > snapcraft.yaml | 43 +++++++++++++++++++++++++++++++------------
> > > 1 file changed, 31 insertions(+), 12 deletions(-)
> > >
> > > diff --git a/snapcraft.yaml b/snapcraft.yaml
> > > index acf96d8636..283ef172e6 100644
> > > --- a/snapcraft.yaml
> > > +++ b/snapcraft.yaml
> > > @@ -1,23 +1,42 @@
> > > name: pc-lowlatency-kernel
> > > -version: 5.4.0-80.90.1
> > > +adopt-info: kernel
> > > summary: lowlatency linux kernel
> > > description: The lowlatency Ubuntu kernel package as a snap
> > > type: kernel
> > > +grade: stable
> > > confinement: strict
> > > build-base: core20
> > > +# In addition to these repositories, the /+snap/ page on launchpad may
> > > +# also build with ESM repositories enabled, or built in a particular
> > > +# PPA, which will also be used.
> > > +package-repositories:
> > > + - type: apt
> > > + ppa: canonical-kernel-team/uc20-release
> > > + - type: apt
> > > + ppa: canonical-kernel-team/uc20-staging
> > > + - type: apt
> > > + ppa: canonical-kernel-team/proposed
> > >
> > > parts:
> > > kernel:
> > > - source: git://git.launchpad.net/~canonical-kernel-snaps/+git/kernel-snaps-uc20
> > > - source-type: git
> > > - source-branch: master
> > > - plugin: make
> > > - make-parameters:
> > > - - KERNEL_SOURCE=focal:linux-uc20-efi
> > > - - KERNEL=linux-image-uc20-efi-lowlatency
> > > - - KERNEL_IMAGE_FORMAT=efi
> > > - - PROPOSED=true
> > > + plugin: nil
> > > + override-pull: |
> > > + snapcraftctl pull
> > > + snapcraftctl set-version "$(apt show linux-image-uc20-efi-lowlatency 2>/dev/null | sed -n 's/^Version: //p')"
> > > build-packages:
> > > - - gnupg
> > > - kmod
> > > - - lsb-release
> > > + stage-packages:
> > > + - linux-image-uc20-efi-lowlatency
> > > + override-build: |
> > > + snapcraftctl build
> > > + depmod -b $SNAPCRAFT_PART_INSTALL $(ls $SNAPCRAFT_PART_INSTALL/lib/modules)
> > > + mv $SNAPCRAFT_PART_INSTALL/boot/kernel.efi* $SNAPCRAFT_PART_INSTALL/boot/kernel.efi
> > > + organize:
> > > + boot/: /
> > > + lib/modules: modules
> > > + lib/firmware: firmware
> > > + stage:
> > > + - -usr/share/man
> > > + - -usr/lib/linux
> > > + - -lib/crda
> > > + - -lib/modprobe.d
> > >
> >
> >
> > --
> > kernel-team mailing list
> > kernel-team at lists.ubuntu.com
> > https://lists.ubuntu.com/mailman/listinfo/kernel-team
>
>
>
> --
> Regards,
>
> Dimitri.
--
Regards,
Dimitri.
More information about the kernel-team
mailing list