Message ID | 20210721091937.178067-1-dimitri.ledkov@canonical.com |
---|---|
State | New |
Headers | show |
Series | [pc-snap] snapcraft.yaml: avoid shell expansion in snapcraft.yaml | expand |
On 21.07.21 11:19, Dimitri John Ledkov wrote: > As per schema, make-paramemters are strings, not interpreted/evaluated > values. Move efi vs vmlinuz choice to build-environment with > declarative advanced grammar to select efi on amd64 only. > > Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com> Acked-by: Stefan Bader <stefan.bader@canonical.com> > --- I would assume this is for Focal/uc-20 only as I have not that much confidence that any "advanced grammer" would be understood in older series. Please clarify if that is not true. -Stefan > > This is failing to build with stable snapcraft so pushing this to get > the current set of snaps to build. Tested with local snapcraft build. > > snapcraft.yaml | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/snapcraft.yaml b/snapcraft.yaml > index 525d2fa..b402017 100644 > --- a/snapcraft.yaml > +++ b/snapcraft.yaml > @@ -12,10 +12,14 @@ parts: > source-type: git > source-branch: master > plugin: make > + build-environment: > + - on amd64: > + - KERNEL_IMAGE_FORMAT: efi > + - else: > + - KERNEL_IMAGE_FORMAT: vmlinuz > make-parameters: > - KERNEL_SOURCE=focal:linux-uc20-efi > - KERNEL=linux-pc-image > - - KERNEL_IMAGE_FORMAT=$(if $(filter x86_64,$(shell uname -a)),efi,vmlinuz) > - PROPOSED=true > build-packages: > - debootstrap >
On Thu, Jul 22, 2021 at 9:28 AM Stefan Bader <stefan.bader@canonical.com> wrote: > > On 21.07.21 11:19, Dimitri John Ledkov wrote: > > As per schema, make-paramemters are strings, not interpreted/evaluated > > values. Move efi vs vmlinuz choice to build-environment with > > declarative advanced grammar to select efi on amd64 only. > > > > Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com> > Acked-by: Stefan Bader <stefan.bader@canonical.com> > > --- > > I would assume this is for Focal/uc-20 only as I have not that much confidence > that any "advanced grammer" would be understood in older series. Please clarify > if that is not true. > Advanced grammar should be understood my "modern" snapcraft, meaning for any snapcraft.yaml that declared build-base. Including those for build-base: core (i.e. UC16). However, this is focal/uc-20 only, since it is only uc20 and up that have kernel.efi support on amd64 and are hence built differently. > -Stefan > > > > > This is failing to build with stable snapcraft so pushing this to get > > the current set of snaps to build. Tested with local snapcraft build. > > > > snapcraft.yaml | 6 +++++- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > diff --git a/snapcraft.yaml b/snapcraft.yaml > > index 525d2fa..b402017 100644 > > --- a/snapcraft.yaml > > +++ b/snapcraft.yaml > > @@ -12,10 +12,14 @@ parts: > > source-type: git > > source-branch: master > > plugin: make > > + build-environment: > > + - on amd64: > > + - KERNEL_IMAGE_FORMAT: efi > > + - else: > > + - KERNEL_IMAGE_FORMAT: vmlinuz > > make-parameters: > > - KERNEL_SOURCE=focal:linux-uc20-efi > > - KERNEL=linux-pc-image > > - - KERNEL_IMAGE_FORMAT=$(if $(filter x86_64,$(shell uname -a)),efi,vmlinuz) > > - PROPOSED=true > > build-packages: > > - debootstrap > > > >
This was applied eons ago, as I couldn't build snaps without this after a security update.
diff --git a/snapcraft.yaml b/snapcraft.yaml index 525d2fa..b402017 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -12,10 +12,14 @@ parts: source-type: git source-branch: master plugin: make + build-environment: + - on amd64: + - KERNEL_IMAGE_FORMAT: efi + - else: + - KERNEL_IMAGE_FORMAT: vmlinuz make-parameters: - KERNEL_SOURCE=focal:linux-uc20-efi - KERNEL=linux-pc-image - - KERNEL_IMAGE_FORMAT=$(if $(filter x86_64,$(shell uname -a)),efi,vmlinuz) - PROPOSED=true build-packages: - debootstrap
As per schema, make-paramemters are strings, not interpreted/evaluated values. Move efi vs vmlinuz choice to build-environment with declarative advanced grammar to select efi on amd64 only. Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com> --- This is failing to build with stable snapcraft so pushing this to get the current set of snaps to build. Tested with local snapcraft build. snapcraft.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)