mirror of
				https://git.launchpad.net/livecd-rootfs
				synced 2025-11-03 18:34:11 +00:00 
			
		
		
		
	move snap assertion handling into the generic build script (and, in
the process, from the subiquity overlay to the base squashfs).
This commit is contained in:
		
							parent
							
								
									e1ac04f887
								
							
						
					
					
						commit
						12b07ae5af
					
				
							
								
								
									
										2
									
								
								debian/changelog
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								debian/changelog
									
									
									
									
										vendored
									
									
								
							@ -2,6 +2,8 @@ livecd-rootfs (2.465) UNRELEASED; urgency=medium
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  * ubuntu-server: drop hard-coded test key from the subiquity overlay in
 | 
					  * ubuntu-server: drop hard-coded test key from the subiquity overlay in
 | 
				
			||||||
    favor of the generic-classic assertion from the store.
 | 
					    favor of the generic-classic assertion from the store.
 | 
				
			||||||
 | 
					  * move snap assertion handling into the generic build script (and, in
 | 
				
			||||||
 | 
					    the process, from the subiquity overlay to the base squashfs).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 -- Steve Langasek <steve.langasek@ubuntu.com>  Tue, 03 Oct 2017 15:31:21 -0700
 | 
					 -- Steve Langasek <steve.langasek@ubuntu.com>  Tue, 03 Oct 2017 15:31:21 -0700
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -297,6 +297,30 @@ deb file:/var/lib/preinstalled-pool/ $LB_DISTRIBUTION $LB_PARENT_ARCHIVE_AREAS
 | 
				
			|||||||
			> chroot/etc/apt/sources.list
 | 
								> chroot/etc/apt/sources.list
 | 
				
			||||||
		rm chroot/etc/apt/sources.list.preinstall chroot/etc/apt/sources.list.orig
 | 
							rm chroot/etc/apt/sources.list.preinstall chroot/etc/apt/sources.list.orig
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
 | 
						case $PROJECT:$SUBPROJECT in
 | 
				
			||||||
 | 
							ubuntu-server:live)
 | 
				
			||||||
 | 
								assertions_dir="chroot/var/lib/snapd/seed/assertions"
 | 
				
			||||||
 | 
								model_assertion="$assertions_dir/generic-classic.model"
 | 
				
			||||||
 | 
								account_key_assertion="$assertions_dir/generic.account-key"
 | 
				
			||||||
 | 
								account_assertion="$assertions_dir/generic.account"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								snap known --remote model series=16 \
 | 
				
			||||||
 | 
									model=generic-classic brand-id=generic \
 | 
				
			||||||
 | 
									> "$model_assertion"
 | 
				
			||||||
 | 
								account_key=$(sed -n -e's/sign-key-sha3-384: //p' \
 | 
				
			||||||
 | 
									< "$model_assertion")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								snap known --remote account-key \
 | 
				
			||||||
 | 
									public-key-sha3-384="$account_key" \
 | 
				
			||||||
 | 
									> "$account_key_assertion"
 | 
				
			||||||
 | 
								account=$(sed -n -e's/account-id: //p' \
 | 
				
			||||||
 | 
									< "$account_key_assertion")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								snap known --remote account account-id=generic \
 | 
				
			||||||
 | 
									> "$account_assertion"
 | 
				
			||||||
 | 
								;;
 | 
				
			||||||
 | 
						esac
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if [ "$PROJECT" = "ubuntu-touch" ] || [ "$PROJECT" = "ubuntu-touch-custom" ]; then
 | 
						if [ "$PROJECT" = "ubuntu-touch" ] || [ "$PROJECT" = "ubuntu-touch-custom" ]; then
 | 
				
			||||||
		if [ "$ARCH" = "armhf" ]; then
 | 
							if [ "$ARCH" = "armhf" ]; then
 | 
				
			||||||
			INFO_DESC="$(lsb_release -d -s)"
 | 
								INFO_DESC="$(lsb_release -d -s)"
 | 
				
			||||||
 | 
				
			|||||||
@ -70,22 +70,6 @@ snaps:
 | 
				
			|||||||
EOF
 | 
					EOF
 | 
				
			||||||
'
 | 
					'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
assertions_dir="$SQUASH_ROOT/var/lib/snapd/seed/assertions"
 | 
					 | 
				
			||||||
model_assertion="$assertions_dir/generic-classic.model"
 | 
					 | 
				
			||||||
account_key_assertion="$assertions_dir/generic.account-key"
 | 
					 | 
				
			||||||
account_assertion="$assertions_dir/generic.account"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
snap known --remote model series=16 model=generic-classic brand-id=generic \
 | 
					 | 
				
			||||||
	> "$model_assertion"
 | 
					 | 
				
			||||||
account_key=$(sed -n -e's/sign-key-sha3-384: //p' "$model_assertion")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
snap known --remote account-key public-key-sha3-384="$account_key" \
 | 
					 | 
				
			||||||
	> "$account_key_assertion"
 | 
					 | 
				
			||||||
account=$(sed -n -e's/account-id: //p' "$account_key_assertion")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
snap known --remote account account-id=generic \
 | 
					 | 
				
			||||||
	> "$account_assertion"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
teardown_mountpoint "$SQUASH_ROOT"
 | 
					teardown_mountpoint "$SQUASH_ROOT"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Then unmount the overlay
 | 
					# Then unmount the overlay
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user