[PATCH] [SRU][X/raspi2] Fix build with snapcraft 2.42.1

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] [SRU][X/raspi2] Fix build with snapcraft 2.42.1

Paolo Pisati-5
BugLink: http://bugs.launchpad.net/bugs/1785647

Impact:

Xenial/raspi2 kernel snap fails to build with latest snapcraft release (2.42.1):

https://launchpadlibrarian.net/382070508/buildlog_snap_ubuntu_xenial_arm64_piso-xenial-snapdragon-dummy_BUILDING.txt.gz

...
Selecting previously unselected package snapcraft.
Preparing to unpack .../snapcraft_2.42.1_all.deb ...
Unpacking snapcraft (2.42.1) ...
...
Running pull phase...
Issues while validating None: The 'parts/kernel' property does not match the
required schema: Parts cannot contain both 'install' and 'override-*' keywords.
Use 'override-build' instead of 'install'.
Build failed
...

that is due to the deprecation of the 'prepare, build and install' targets and
their inability to coexist with the newer 'override-build' target.

Fix:

Apply the attached patch and snap again:

https://launchpadlibrarian.net/382085652/buildlog_snap_ubuntu_xenial_armhf_piso-xenial-raspi2-dummy_BUILDING.txt.gz

this time it'll snap fine.

Regression:

It fixes the build, so none.

Paolo Pisati (1):
  UBUNTU: snapcraft.yaml: convert prepare, build and install to
    override-build

 snapcraft.yaml | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[PATCH] UBUNTU: snapcraft.yaml: convert prepare, build and install to override-build

Paolo Pisati-5
BugLink: http://bugs.launchpad.net/bugs/1785647

Signed-off-by: Paolo Pisati <[hidden email]>
---
 snapcraft.yaml | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/snapcraft.yaml b/snapcraft.yaml
index a5b4147..f5181ce6 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -17,12 +17,11 @@ parts:
     kconfigflavour: raspi2
     kconfigs:
       - CONFIG_DEBUG_INFO=n
+    kernel-image-target: zImage
     override-build: |
       cp debian/scripts/retpoline-extract-one \
         $SNAPCRAFT_PART_BUILD/scripts/ubuntu-retpoline-extract-one
       snapcraftctl build
-    kernel-image-target: zImage
-    install: |
       tar -C $SNAPCRAFT_PART_INSTALL/dtbs -f $SNAPCRAFT_PART_INSTALL/dtbs/overlays.tgz -czv overlays
       rm -rf $SNAPCRAFT_PART_INSTALL/dtbs/overlays
   firmware:
@@ -43,13 +42,13 @@ parts:
     source: .
     after:
       - firmware
-    prepare: |
+    override-build: |
       PKGS="http://ppa.launchpad.net/snappy-dev/image/ubuntu/dists/xenial/main/binary-armhf/Packages.gz"
       PKGPATH="$(wget -q -O- $PKGS|zcat|grep-dctrl raspberrypi-wireless-firmware |\
         grep Filename|tail -1| sed 's/^Filename: //')"
       wget http://ppa.launchpad.net/snappy-dev/image/ubuntu/$PKGPATH
       dpkg -x $(basename $PKGPATH) unpack/
-    install: |
+      snapcraftctl build
       mkdir -p $SNAPCRAFT_PART_INSTALL/firmware/brcm
       mv unpack/usr/share/doc/raspberrypi-wireless-firmware $SNAPCRAFT_PART_INSTALL/firmware/rpi-wlanfw-licenses
       mv unpack/lib/firmware/brcm/* $SNAPCRAFT_PART_INSTALL/firmware/brcm
--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [PATCH] UBUNTU: snapcraft.yaml: convert prepare, build and install to override-build

Stefan Bader-2
On 06.08.2018 16:50, Paolo Pisati wrote:
> BugLink: http://bugs.launchpad.net/bugs/1785647
>
> Signed-off-by: Paolo Pisati <[hidden email]>
Acked-by: Stefan Bader <[hidden email]>

> ---
>  snapcraft.yaml | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/snapcraft.yaml b/snapcraft.yaml
> index a5b4147..f5181ce6 100644
> --- a/snapcraft.yaml
> +++ b/snapcraft.yaml
> @@ -17,12 +17,11 @@ parts:
>      kconfigflavour: raspi2
>      kconfigs:
>        - CONFIG_DEBUG_INFO=n
> +    kernel-image-target: zImage
>      override-build: |
>        cp debian/scripts/retpoline-extract-one \
>          $SNAPCRAFT_PART_BUILD/scripts/ubuntu-retpoline-extract-one
>        snapcraftctl build
> -    kernel-image-target: zImage
> -    install: |
>        tar -C $SNAPCRAFT_PART_INSTALL/dtbs -f $SNAPCRAFT_PART_INSTALL/dtbs/overlays.tgz -czv overlays
>        rm -rf $SNAPCRAFT_PART_INSTALL/dtbs/overlays
>    firmware:
> @@ -43,13 +42,13 @@ parts:
>      source: .
>      after:
>        - firmware
> -    prepare: |
> +    override-build: |
>        PKGS="http://ppa.launchpad.net/snappy-dev/image/ubuntu/dists/xenial/main/binary-armhf/Packages.gz"
>        PKGPATH="$(wget -q -O- $PKGS|zcat|grep-dctrl raspberrypi-wireless-firmware |\
>          grep Filename|tail -1| sed 's/^Filename: //')"
>        wget http://ppa.launchpad.net/snappy-dev/image/ubuntu/$PKGPATH
>        dpkg -x $(basename $PKGPATH) unpack/
> -    install: |
> +      snapcraftctl build
>        mkdir -p $SNAPCRAFT_PART_INSTALL/firmware/brcm
>        mv unpack/usr/share/doc/raspberrypi-wireless-firmware $SNAPCRAFT_PART_INSTALL/firmware/rpi-wlanfw-licenses
>        mv unpack/lib/firmware/brcm/* $SNAPCRAFT_PART_INSTALL/firmware/brcm
>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

ACK: [PATCH] UBUNTU: snapcraft.yaml: convert prepare, build and install to override-build

Kleber Souza
In reply to this post by Paolo Pisati-5
On 08/06/18 16:50, Paolo Pisati wrote:
> BugLink: http://bugs.launchpad.net/bugs/1785647
>
> Signed-off-by: Paolo Pisati <[hidden email]>

Acked-by: Kleber Sacilotto de Souza <[hidden email]>

> ---
>  snapcraft.yaml | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/snapcraft.yaml b/snapcraft.yaml
> index a5b4147..f5181ce6 100644
> --- a/snapcraft.yaml
> +++ b/snapcraft.yaml
> @@ -17,12 +17,11 @@ parts:
>      kconfigflavour: raspi2
>      kconfigs:
>        - CONFIG_DEBUG_INFO=n
> +    kernel-image-target: zImage
>      override-build: |
>        cp debian/scripts/retpoline-extract-one \
>          $SNAPCRAFT_PART_BUILD/scripts/ubuntu-retpoline-extract-one
>        snapcraftctl build
> -    kernel-image-target: zImage
> -    install: |
>        tar -C $SNAPCRAFT_PART_INSTALL/dtbs -f $SNAPCRAFT_PART_INSTALL/dtbs/overlays.tgz -czv overlays
>        rm -rf $SNAPCRAFT_PART_INSTALL/dtbs/overlays
>    firmware:
> @@ -43,13 +42,13 @@ parts:
>      source: .
>      after:
>        - firmware
> -    prepare: |
> +    override-build: |
>        PKGS="http://ppa.launchpad.net/snappy-dev/image/ubuntu/dists/xenial/main/binary-armhf/Packages.gz"
>        PKGPATH="$(wget -q -O- $PKGS|zcat|grep-dctrl raspberrypi-wireless-firmware |\
>          grep Filename|tail -1| sed 's/^Filename: //')"
>        wget http://ppa.launchpad.net/snappy-dev/image/ubuntu/$PKGPATH
>        dpkg -x $(basename $PKGPATH) unpack/
> -    install: |
> +      snapcraftctl build
>        mkdir -p $SNAPCRAFT_PART_INSTALL/firmware/brcm
>        mv unpack/usr/share/doc/raspberrypi-wireless-firmware $SNAPCRAFT_PART_INSTALL/firmware/rpi-wlanfw-licenses
>        mv unpack/lib/firmware/brcm/* $SNAPCRAFT_PART_INSTALL/firmware/brcm
>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] [SRU][X/raspi2] Fix build with snapcraft 2.42.1

Khaled Elmously
In reply to this post by Paolo Pisati-5
On 2018-08-06 16:50:45 , Paolo Pisati wrote:

> BugLink: http://bugs.launchpad.net/bugs/1785647
>
> Impact:
>
> Xenial/raspi2 kernel snap fails to build with latest snapcraft release (2.42.1):
>
> https://launchpadlibrarian.net/382070508/buildlog_snap_ubuntu_xenial_arm64_piso-xenial-snapdragon-dummy_BUILDING.txt.gz
>
> ...
> Selecting previously unselected package snapcraft.
> Preparing to unpack .../snapcraft_2.42.1_all.deb ...
> Unpacking snapcraft (2.42.1) ...
> ...
> Running pull phase...
> Issues while validating None: The 'parts/kernel' property does not match the
> required schema: Parts cannot contain both 'install' and 'override-*' keywords.
> Use 'override-build' instead of 'install'.
> Build failed
> ...
>
> that is due to the deprecation of the 'prepare, build and install' targets and
> their inability to coexist with the newer 'override-build' target.
>
> Fix:
>
> Apply the attached patch and snap again:
>
> https://launchpadlibrarian.net/382085652/buildlog_snap_ubuntu_xenial_armhf_piso-xenial-raspi2-dummy_BUILDING.txt.gz
>
> this time it'll snap fine.
>
> Regression:
>
> It fixes the build, so none.
>
> Paolo Pisati (1):
>   UBUNTU: snapcraft.yaml: convert prepare, build and install to
>     override-build
>
>  snapcraft.yaml | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
>

Paolo - this patch doesn't seem to apply cleanly to xenial/raspi2

I don't know if there's an earlier patch on the ML that I'm supposed to apply first (I looked but couldn't find one).

I'm not very confident that I've resolved the conflict correctly.

This is the diff that I now have:
https://pastebin.canonical.com/p/YnbCKhKf3k/   

And this is the final snapcraft.yaml file:
https://pastebin.canonical.com/p/DJv7tzcDmm/


Could you please confirm if this is correct (or maybe send a v2 if it's not)?
Thanks

Khaled

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] [SRU][X/raspi2] Fix build with snapcraft 2.42.1

Paolo Pisati-5
On Fri, Aug 24, 2018 at 5:01 AM, Khaled Elmously
<[hidden email]> wrote:

>
> I'm not very confident that I've resolved the conflict correctly.
>
> This is the diff that I now have:
> https://pastebin.canonical.com/p/YnbCKhKf3k/
>
> And this is the final snapcraft.yaml file:
> https://pastebin.canonical.com/p/DJv7tzcDmm/
>
>
> Could you please confirm if this is correct (or maybe send a v2 if it's not)?

There's something wrong in the xenial/raspi2 snapcraft.yaml file: the
firmware section is duplicated now, let me send a v2...

--
bye,
p.

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[PATCH v2] UBUNTU: snapcraft.yaml: convert prepare, build and install to override-build

Paolo Pisati-5
In reply to this post by Khaled Elmously
While here, take care of a mismerge and remove the duplicated 'firmware' part.

Signed-off-by: Paolo Pisati <[hidden email]>
---
 snapcraft.yaml | 20 +++-----------------
 1 file changed, 3 insertions(+), 17 deletions(-)

diff --git a/snapcraft.yaml b/snapcraft.yaml
index b873b68..f5181ce6 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -17,25 +17,11 @@ parts:
     kconfigflavour: raspi2
     kconfigs:
       - CONFIG_DEBUG_INFO=n
+    kernel-image-target: zImage
     override-build: |
       cp debian/scripts/retpoline-extract-one \
         $SNAPCRAFT_PART_BUILD/scripts/ubuntu-retpoline-extract-one
       snapcraftctl build
-  firmware:
-    plugin: nil
-    stage-packages:
-      - linux-firmware
-    organize:
-      lib/firmware: firmware
-    prime:
-      - -usr
-      - -lib
-    build-packages:
-      - cpio
-      - libssl-dev
-      - dpkg-dev
-    kernel-image-target: zImage
-    install: |
       tar -C $SNAPCRAFT_PART_INSTALL/dtbs -f $SNAPCRAFT_PART_INSTALL/dtbs/overlays.tgz -czv overlays
       rm -rf $SNAPCRAFT_PART_INSTALL/dtbs/overlays
   firmware:
@@ -56,13 +42,13 @@ parts:
     source: .
     after:
       - firmware
-    prepare: |
+    override-build: |
       PKGS="http://ppa.launchpad.net/snappy-dev/image/ubuntu/dists/xenial/main/binary-armhf/Packages.gz"
       PKGPATH="$(wget -q -O- $PKGS|zcat|grep-dctrl raspberrypi-wireless-firmware |\
         grep Filename|tail -1| sed 's/^Filename: //')"
       wget http://ppa.launchpad.net/snappy-dev/image/ubuntu/$PKGPATH
       dpkg -x $(basename $PKGPATH) unpack/
-    install: |
+      snapcraftctl build
       mkdir -p $SNAPCRAFT_PART_INSTALL/firmware/brcm
       mv unpack/usr/share/doc/raspberrypi-wireless-firmware $SNAPCRAFT_PART_INSTALL/firmware/rpi-wlanfw-licenses
       mv unpack/lib/firmware/brcm/* $SNAPCRAFT_PART_INSTALL/firmware/brcm
--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [PATCH v2] UBUNTU: snapcraft.yaml: convert prepare, build and install to override-build

Kleber Souza
On 08/24/18 12:53, Paolo Pisati wrote:
> While here, take care of a mismerge and remove the duplicated 'firmware' part.
>
> Signed-off-by: Paolo Pisati <[hidden email]>

Acked-by: Kleber Sacilotto de Souza <[hidden email]>

> ---
>  snapcraft.yaml | 20 +++-----------------
>  1 file changed, 3 insertions(+), 17 deletions(-)
>
> diff --git a/snapcraft.yaml b/snapcraft.yaml
> index b873b68..f5181ce6 100644
> --- a/snapcraft.yaml
> +++ b/snapcraft.yaml
> @@ -17,25 +17,11 @@ parts:
>      kconfigflavour: raspi2
>      kconfigs:
>        - CONFIG_DEBUG_INFO=n
> +    kernel-image-target: zImage
>      override-build: |
>        cp debian/scripts/retpoline-extract-one \
>          $SNAPCRAFT_PART_BUILD/scripts/ubuntu-retpoline-extract-one
>        snapcraftctl build
> -  firmware:
> -    plugin: nil
> -    stage-packages:
> -      - linux-firmware
> -    organize:
> -      lib/firmware: firmware
> -    prime:
> -      - -usr
> -      - -lib
> -    build-packages:
> -      - cpio
> -      - libssl-dev
> -      - dpkg-dev
> -    kernel-image-target: zImage
> -    install: |
>        tar -C $SNAPCRAFT_PART_INSTALL/dtbs -f $SNAPCRAFT_PART_INSTALL/dtbs/overlays.tgz -czv overlays
>        rm -rf $SNAPCRAFT_PART_INSTALL/dtbs/overlays
>    firmware:
> @@ -56,13 +42,13 @@ parts:
>      source: .
>      after:
>        - firmware
> -    prepare: |
> +    override-build: |
>        PKGS="http://ppa.launchpad.net/snappy-dev/image/ubuntu/dists/xenial/main/binary-armhf/Packages.gz"
>        PKGPATH="$(wget -q -O- $PKGS|zcat|grep-dctrl raspberrypi-wireless-firmware |\
>          grep Filename|tail -1| sed 's/^Filename: //')"
>        wget http://ppa.launchpad.net/snappy-dev/image/ubuntu/$PKGPATH
>        dpkg -x $(basename $PKGPATH) unpack/
> -    install: |
> +      snapcraftctl build
>        mkdir -p $SNAPCRAFT_PART_INSTALL/firmware/brcm
>        mv unpack/usr/share/doc/raspberrypi-wireless-firmware $SNAPCRAFT_PART_INSTALL/firmware/rpi-wlanfw-licenses
>        mv unpack/lib/firmware/brcm/* $SNAPCRAFT_PART_INSTALL/firmware/brcm
>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED/cmnt: [PATCH v2] UBUNTU: snapcraft.yaml: convert prepare, build and install to override-build

Kleber Souza
In reply to this post by Paolo Pisati-5
On 08/24/18 12:53, Paolo Pisati wrote:

> While here, take care of a mismerge and remove the duplicated 'firmware' part.
>
> Signed-off-by: Paolo Pisati <[hidden email]>
> ---
>  snapcraft.yaml | 20 +++-----------------
>  1 file changed, 3 insertions(+), 17 deletions(-)
>
> diff --git a/snapcraft.yaml b/snapcraft.yaml
> index b873b68..f5181ce6 100644
> --- a/snapcraft.yaml
> +++ b/snapcraft.yaml
> @@ -17,25 +17,11 @@ parts:
>      kconfigflavour: raspi2
>      kconfigs:
>        - CONFIG_DEBUG_INFO=n
> +    kernel-image-target: zImage
>      override-build: |
>        cp debian/scripts/retpoline-extract-one \
>          $SNAPCRAFT_PART_BUILD/scripts/ubuntu-retpoline-extract-one
>        snapcraftctl build
> -  firmware:
> -    plugin: nil
> -    stage-packages:
> -      - linux-firmware
> -    organize:
> -      lib/firmware: firmware
> -    prime:
> -      - -usr
> -      - -lib
> -    build-packages:
> -      - cpio
> -      - libssl-dev
> -      - dpkg-dev
> -    kernel-image-target: zImage
> -    install: |
>        tar -C $SNAPCRAFT_PART_INSTALL/dtbs -f $SNAPCRAFT_PART_INSTALL/dtbs/overlays.tgz -czv overlays
>        rm -rf $SNAPCRAFT_PART_INSTALL/dtbs/overlays
>    firmware:
> @@ -56,13 +42,13 @@ parts:
>      source: .
>      after:
>        - firmware
> -    prepare: |
> +    override-build: |
>        PKGS="http://ppa.launchpad.net/snappy-dev/image/ubuntu/dists/xenial/main/binary-armhf/Packages.gz"
>        PKGPATH="$(wget -q -O- $PKGS|zcat|grep-dctrl raspberrypi-wireless-firmware |\
>          grep Filename|tail -1| sed 's/^Filename: //')"
>        wget http://ppa.launchpad.net/snappy-dev/image/ubuntu/$PKGPATH
>        dpkg -x $(basename $PKGPATH) unpack/
> -    install: |
> +      snapcraftctl build
>        mkdir -p $SNAPCRAFT_PART_INSTALL/firmware/brcm
>        mv unpack/usr/share/doc/raspberrypi-wireless-firmware $SNAPCRAFT_PART_INSTALL/firmware/rpi-wlanfw-licenses
>        mv unpack/lib/firmware/brcm/* $SNAPCRAFT_PART_INSTALL/firmware/brcm
>

Applied to xenial/raspi2 branch, adding the missing BugLink reference.

Thanks,
Kleber

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team