ACK: [PATCH v2] deb to snap: use apt-pinning to install just the kernel from -proposed

Stefan Bader stefan.bader at canonical.com
Mon Oct 9 09:11:58 UTC 2017


On 06.10.2017 17:54, Paolo Pisati wrote:
> In the target kernel branch (e.g. pc-kernel), enable the proposed
> repository and point the kernel version to the one present
> in proposed:
> 
> --- a/snapcraft.yaml
> +++ b/snapcraft.yaml
> @@ -1,5 +1,5 @@
>  name: pc-kernel
> -version: 4.4.0.96.101
> +version: 4.4.0.97.102
>  summary: generic linux kernel
>  description: The generic Ubuntu kernel package as a snap
>  type: kernel
> @@ -13,6 +13,7 @@ parts:
>      plugin: make
>      make-parameters:
>        - KERNEL=linux-pc-image
> +      - PROPOSED=true
>      build-packages:
>        - debootstrap
>        - lsb-release
> 
> Signed-off-by: Paolo Pisati <paolo.pisati at canonical.com>
Acked-by: Stefan Bader <stefan.bader at canonical.com>

> ---
>  Makefile | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/Makefile b/Makefile
> index 98c5a48..2dc47ca 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -25,6 +25,24 @@ $(error linux-pc-image is a meta package only used in i386 or amd64, abort)
>  endif
>  endif
>  
> +define APTPREF
> +Package: *
> +Pin: release a=$(RELEASE);
> +Pin-Priority: 700
> +
> +Package: *
> +Pin: release a=$(RELEASE)-updates
> +Pin-Priority: 700
> +
> +Package: *
> +Pin: release a=$(RELEASE)-security
> +Pin-Priority: 700
> +
> +Package: *
> +Pin: release a=$(RELEASE)-proposed
> +Pin-Priority: 650
> +endef
> +export APTPREF
>  
>  install : KVERS = $(shell ls -1 chroot/boot/vmlinuz-*| tail -1 |sed 's/^.*vmlinuz-//;s/.efi.signed$$//')
>  
> @@ -35,6 +53,7 @@ all:
>  	if [ "$(PROPOSED)" = "true" ]; then \
>  	  echo "deb http://$(MIRROR) $(RELEASE)-proposed main restricted" >> chroot/etc/apt/sources.list; \
>  	  echo "deb http://$(MIRROR) $(RELEASE)-proposed universe" >> chroot/etc/apt/sources.list; \
> +	  echo "$${APTPREF}" > chroot/etc/apt/preferences.d/01proposedkernel; \
>  	fi
>  	mkdir -p chroot/etc/initramfs-tools/conf.d
>  	echo "COMPRESS=lzma" >chroot/etc/initramfs-tools/conf.d/ubuntu-core.conf
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20171009/80629cb7/attachment.sig>


More information about the kernel-team mailing list