[PATCH] [X/master] make snap-pkg support

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH] [X/master] make snap-pkg support

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

This patch integrates snapcraft in the kbuild environment of the Linux kernel.

To use it:

make defconfig
make snap-pkg

or in case of cross-compilation (e.g. arm):

export ARCH=arm; export CROSS_COMPILE=arm-linux-gnueabihf-
make defconfig
make snap-pkg

The resulting kernel snap will be generated in $(objtree)/snap

Paolo Pisati (1):
  make snap-pkg support

 .gitignore                         |  5 +++++
 scripts/package/Makefile           | 13 +++++++++++++
 scripts/package/snapcraft.template | 14 ++++++++++++++
 3 files changed, 32 insertions(+)
 create mode 100644 scripts/package/snapcraft.template

--
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
|  
Report Content as Inappropriate

[PATCH] make snap-pkg support

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

This patch integrates snapcraft in the kbuild environment of the Linux kernel.

To use it:

make defconfig
make snap-pkg

or in case of cross-compilation (e.g. arm):

export ARCH=arm; export CROSS_COMPILE=arm-linux-gnueabihf-
make defconfig
make snap-pkg

The resulting kernel snap will be generated in $(objtree)/snap

Signed-off-by: Paolo Pisati <[hidden email]>
---
 .gitignore                         |  5 +++++
 scripts/package/Makefile           | 13 +++++++++++++
 scripts/package/snapcraft.template | 14 ++++++++++++++
 3 files changed, 32 insertions(+)
 create mode 100644 scripts/package/snapcraft.template

diff --git a/.gitignore b/.gitignore
index e78c8c2..efdd5ab 100644
--- a/.gitignore
+++ b/.gitignore
@@ -57,6 +57,11 @@ Module.symvers
 #/debian/
 
 #
+# Snap directory (make snap-pkg)
+#
+/snap/
+
+#
 # tar directory (make tar*-pkg)
 #
 /tar-install/
diff --git a/scripts/package/Makefile b/scripts/package/Makefile
index 493e226..3b08e1b 100644
--- a/scripts/package/Makefile
+++ b/scripts/package/Makefile
@@ -99,6 +99,19 @@ bindeb-pkg: FORCE
 
 clean-dirs += $(objtree)/debian/
 
+# snap-pkg
+# ---------------------------------------------------------------------------
+snap-pkg: FORCE
+ rm -rf $(objtree)/snap
+ mkdir $(objtree)/snap
+ sed "s@KERNELRELEASE@$(KERNELRELEASE)@; \
+ s@SRCTREE@$(shell realpath $(srctree))@" \
+ $(srctree)/scripts/package/snapcraft.template > \
+ $(objtree)/snap/snapcraft.yaml
+ cd $(objtree)/snap && \
+ snapcraft --target-arch=$(UTS_MACHINE)
+
+clean-dirs += $(objtree)/snap/
 
 # tarball targets
 # ---------------------------------------------------------------------------
diff --git a/scripts/package/snapcraft.template b/scripts/package/snapcraft.template
new file mode 100644
index 0000000..2e7ffc8
--- /dev/null
+++ b/scripts/package/snapcraft.template
@@ -0,0 +1,14 @@
+name: kernel
+version: KERNELRELEASE
+summary: Linux kernel
+description: The upstream Linux kernel
+grade: stable
+confinement: strict
+type: kernel
+
+parts:
+  kernel:
+    plugin: kernel
+    source: SRCTREE
+    source-type: git
+    kconfigfile: SRCTREE/.config
--
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
|  
Report Content as Inappropriate

ACK: [PATCH] make snap-pkg support

Stefan Bader-2
On 27.06.2017 13:13, Paolo Pisati wrote:

> BugLink: http://bugs.launchpad.net/bugs/1700747
>
> This patch integrates snapcraft in the kbuild environment of the Linux kernel.
>
> To use it:
>
> make defconfig
> make snap-pkg
>
> or in case of cross-compilation (e.g. arm):
>
> export ARCH=arm; export CROSS_COMPILE=arm-linux-gnueabihf-
> make defconfig
> make snap-pkg
>
> The resulting kernel snap will be generated in $(objtree)/snap
>
> Signed-off-by: Paolo Pisati <[hidden email]>
Acked-by: Stefan Bader <[hidden email]>

> ---
>  .gitignore                         |  5 +++++
>  scripts/package/Makefile           | 13 +++++++++++++
>  scripts/package/snapcraft.template | 14 ++++++++++++++
>  3 files changed, 32 insertions(+)
>  create mode 100644 scripts/package/snapcraft.template
>
> diff --git a/.gitignore b/.gitignore
> index e78c8c2..efdd5ab 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -57,6 +57,11 @@ Module.symvers
>  #/debian/
>  
>  #
> +# Snap directory (make snap-pkg)
> +#
> +/snap/
> +
> +#
>  # tar directory (make tar*-pkg)
>  #
>  /tar-install/
> diff --git a/scripts/package/Makefile b/scripts/package/Makefile
> index 493e226..3b08e1b 100644
> --- a/scripts/package/Makefile
> +++ b/scripts/package/Makefile
> @@ -99,6 +99,19 @@ bindeb-pkg: FORCE
>  
>  clean-dirs += $(objtree)/debian/
>  
> +# snap-pkg
> +# ---------------------------------------------------------------------------
> +snap-pkg: FORCE
> + rm -rf $(objtree)/snap
> + mkdir $(objtree)/snap
> + sed "s@KERNELRELEASE@$(KERNELRELEASE)@; \
> + s@SRCTREE@$(shell realpath $(srctree))@" \
> + $(srctree)/scripts/package/snapcraft.template > \
> + $(objtree)/snap/snapcraft.yaml
> + cd $(objtree)/snap && \
> + snapcraft --target-arch=$(UTS_MACHINE)
> +
> +clean-dirs += $(objtree)/snap/
>  
>  # tarball targets
>  # ---------------------------------------------------------------------------
> diff --git a/scripts/package/snapcraft.template b/scripts/package/snapcraft.template
> new file mode 100644
> index 0000000..2e7ffc8
> --- /dev/null
> +++ b/scripts/package/snapcraft.template
> @@ -0,0 +1,14 @@
> +name: kernel
> +version: KERNELRELEASE
> +summary: Linux kernel
> +description: The upstream Linux kernel
> +grade: stable
> +confinement: strict
> +type: kernel
> +
> +parts:
> +  kernel:
> +    plugin: kernel
> +    source: SRCTREE
> +    source-type: git
> +    kconfigfile: SRCTREE/.config
>


--
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
|  
Report Content as Inappropriate

ACK: [PATCH] make snap-pkg support

Thadeu Lima de Souza Cascardo-3
In reply to this post by Paolo Pisati-5
On Tue, Jun 27, 2017 at 01:13:05PM +0200, Paolo Pisati wrote:

> BugLink: http://bugs.launchpad.net/bugs/1700747
>
> This patch integrates snapcraft in the kbuild environment of the Linux kernel.
>
> To use it:
>
> make defconfig
> make snap-pkg
>
> or in case of cross-compilation (e.g. arm):
>
> export ARCH=arm; export CROSS_COMPILE=arm-linux-gnueabihf-
> make defconfig
> make snap-pkg
>
> The resulting kernel snap will be generated in $(objtree)/snap

Should be a UBUNTU SAUCE patch. Besides that,

Acked-by: Thadeu Lima de Souza Cascardo <[hidden email]>

>
> Signed-off-by: Paolo Pisati <[hidden email]>
> ---
>  .gitignore                         |  5 +++++
>  scripts/package/Makefile           | 13 +++++++++++++
>  scripts/package/snapcraft.template | 14 ++++++++++++++
>  3 files changed, 32 insertions(+)
>  create mode 100644 scripts/package/snapcraft.template
>
> diff --git a/.gitignore b/.gitignore
> index e78c8c2..efdd5ab 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -57,6 +57,11 @@ Module.symvers
>  #/debian/
>  
>  #
> +# Snap directory (make snap-pkg)
> +#
> +/snap/
> +
> +#
>  # tar directory (make tar*-pkg)
>  #
>  /tar-install/
> diff --git a/scripts/package/Makefile b/scripts/package/Makefile
> index 493e226..3b08e1b 100644
> --- a/scripts/package/Makefile
> +++ b/scripts/package/Makefile
> @@ -99,6 +99,19 @@ bindeb-pkg: FORCE
>  
>  clean-dirs += $(objtree)/debian/
>  
> +# snap-pkg
> +# ---------------------------------------------------------------------------
> +snap-pkg: FORCE
> + rm -rf $(objtree)/snap
> + mkdir $(objtree)/snap
> + sed "s@KERNELRELEASE@$(KERNELRELEASE)@; \
> + s@SRCTREE@$(shell realpath $(srctree))@" \
> + $(srctree)/scripts/package/snapcraft.template > \
> + $(objtree)/snap/snapcraft.yaml
> + cd $(objtree)/snap && \
> + snapcraft --target-arch=$(UTS_MACHINE)
> +
> +clean-dirs += $(objtree)/snap/
>  
>  # tarball targets
>  # ---------------------------------------------------------------------------
> diff --git a/scripts/package/snapcraft.template b/scripts/package/snapcraft.template
> new file mode 100644
> index 0000000..2e7ffc8
> --- /dev/null
> +++ b/scripts/package/snapcraft.template
> @@ -0,0 +1,14 @@
> +name: kernel
> +version: KERNELRELEASE
> +summary: Linux kernel
> +description: The upstream Linux kernel
> +grade: stable
> +confinement: strict
> +type: kernel
> +
> +parts:
> +  kernel:
> +    plugin: kernel
> +    source: SRCTREE
> +    source-type: git
> +    kconfigfile: SRCTREE/.config
> --
> 2.7.4
>
>
> --
> kernel-team mailing list
> [hidden email]
> https://lists.ubuntu.com/mailman/listinfo/kernel-team

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

APPLIED: [PATCH] [X/master] make snap-pkg support

Thadeu Lima de Souza Cascardo-3
In reply to this post by Paolo Pisati-5
Applied to xenial master-next branch as UBUNTU SAUCE.

Thanks.
Cascardo.

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

APPLIED[artful]: [PATCH] [X/master] make snap-pkg support

Seth Forshee
In reply to this post by Paolo Pisati-5
On Tue, Jun 27, 2017 at 01:13:04PM +0200, Paolo Pisati wrote:

> BugLink: http://bugs.launchpad.net/bugs/1700747
>
> This patch integrates snapcraft in the kbuild environment of the Linux kernel.
>
> To use it:
>
> make defconfig
> make snap-pkg
>
> or in case of cross-compilation (e.g. arm):
>
> export ARCH=arm; export CROSS_COMPILE=arm-linux-gnueabihf-
> make defconfig
> make snap-pkg
>
> The resulting kernel snap will be generated in $(objtree)/snap

Applied to artful/master and unstable/master-next, thanks.

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