ACK: [PATCH] make snap-pkg support
Thadeu Lima de Souza Cascardo
cascardo at canonical.com
Tue Jul 11 14:51:24 UTC 2017
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 <cascardo at canonical.com>
>
> Signed-off-by: Paolo Pisati <paolo.pisati at canonical.com>
> ---
> .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 at KERNELRELEASE@$(KERNELRELEASE)@; \
> + s at 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
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
More information about the kernel-team
mailing list