mirror of
				https://git.launchpad.net/livecd-rootfs
				synced 2025-10-31 08:54:06 +00:00 
			
		
		
		
	Import patches-unapplied version 2.505 to ubuntu/bionic-proposed
Imported using git-ubuntu import. Changelog parent: 801938f00ad829eb7f9e35bc3f040724e518f1af New changelog entries: * Move casper from filesystem.squashfs to installer.squashfs.
This commit is contained in:
		
							parent
							
								
									801938f00a
								
							
						
					
					
						commit
						c050b67796
					
				
							
								
								
									
										6
									
								
								debian/changelog
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								debian/changelog
									
									
									
									
										vendored
									
									
								
							| @ -1,3 +1,9 @@ | ||||
| livecd-rootfs (2.505) bionic; urgency=medium | ||||
| 
 | ||||
|   * Move casper from filesystem.squashfs to installer.squashfs.  | ||||
| 
 | ||||
|  -- Michael Hudson-Doyle <michael.hudson@ubuntu.com>  Fri, 23 Feb 2018 16:54:51 +1300 | ||||
| 
 | ||||
| livecd-rootfs (2.504) bionic; urgency=medium | ||||
| 
 | ||||
|   * Override JobRunningTimeoutSec to 0s on the .device unit that | ||||
|  | ||||
| @ -116,6 +116,12 @@ if [ -z "${IMAGEFORMAT:-}" ]; then | ||||
| 	esac | ||||
| fi | ||||
| 
 | ||||
| skip_lb_stage() { | ||||
| 	STAGE="$1" | ||||
| 	mkdir -p .build | ||||
| 	touch ".build/$STAGE" | ||||
| } | ||||
| 
 | ||||
| case $IMAGEFORMAT in | ||||
| 	ext2|ext3|ext4) | ||||
| 		OPTS="${OPTS:+$OPTS }--initramfs none --chroot-filesystem $IMAGEFORMAT" | ||||
| @ -141,7 +147,9 @@ case $IMAGEFORMAT in | ||||
| 		INITRAMFS_TYPE=none | ||||
| 		case $PROJECT:${SUBPROJECT:-} in | ||||
| 			ubuntu-server:live) | ||||
| 				add_package live lupin-casper | ||||
| 				# Stop lb installing casper into filesystem.squashfs | ||||
| 				#  by skipping lb_chroot_live-packages. | ||||
| 				skip_lb_stage chroot_live-packages | ||||
| 				INITRAMFS_TYPE=auto | ||||
| 				;; | ||||
| 			*) | ||||
|  | ||||
| @ -329,3 +329,34 @@ undivert_grub() { | ||||
| 	chroot "$CHROOT_ROOT" dpkg-divert --remove --local \ | ||||
| 		--rename /usr/bin/systemd-detect-virt | ||||
| } | ||||
| 
 | ||||
| recreate_initramfs() { | ||||
| 	# Regenerate the initramfs by running update-initramfs in the | ||||
| 	# chroot at $1 and copying the generated initramfs | ||||
| 	# around. Beware that this was written for a single use case | ||||
| 	# (live-server) and may not work in all cases without | ||||
| 	# tweaking... | ||||
| 	# config/common must be sourced before calling this function. | ||||
| 	CHROOT="$1" | ||||
| 	# Start by cargo culting bits of lb_chroot_hacks: | ||||
| 	if [ -n "$LB_INITRAMFS_COMPRESSION" ]; then | ||||
| 		echo "COMPRESS=$LB_INITRAMFS_COMPRESSION" > "$CHROOT"/etc/initramfs-tools/conf.d/livecd-rootfs.conf | ||||
| 	fi | ||||
| 	chroot "$CHROOT" sh -c "${UPDATE_INITRAMFS_OPTIONS:-} update-initramfs -k all -t -u" | ||||
| 	rm -rf "$CHROOT"/etc/initramfs-tools/conf.d/livecd-rootfs.conf | ||||
| 	# Then bits of lb_binary_linux-image: | ||||
| 	case "${LB_INITRAMFS}" in | ||||
| 		casper) | ||||
| 			DESTDIR="binary/casper" | ||||
| 			;; | ||||
| 
 | ||||
| 		live-boot) | ||||
| 			DESTDIR="binary/live" | ||||
| 			;; | ||||
| 
 | ||||
| 		*) | ||||
| 			DESTDIR="binary/boot" | ||||
| 			;; | ||||
| 	esac | ||||
| 	mv "$CHROOT"/boot/initrd.img-* $DESTDIR | ||||
| } | ||||
|  | ||||
| @ -22,6 +22,7 @@ if [ -n "$SUBARCH" ]; then | ||||
| fi | ||||
| 
 | ||||
| . config/functions | ||||
| . config/common | ||||
| 
 | ||||
| SQUASH_ROOT=binary/boot/squashfs.dir | ||||
| OVERLAY_ROOT=binary/overlay | ||||
| @ -50,8 +51,10 @@ EOF | ||||
| # Install any requirements for the installer, for things we don't want | ||||
| # to see on the installed system | ||||
| chroot $SQUASH_ROOT apt-get update | ||||
| chroot $SQUASH_ROOT apt-get -y install user-setup | ||||
| chroot $SQUASH_ROOT apt-get -y install curtin | ||||
| chroot $SQUASH_ROOT apt-get -y install user-setup curtin lupin-casper | ||||
| 
 | ||||
| # Installing casper means we need a new initramfs | ||||
| UPDATE_INITRAMFS_OPTIONS=CASPER_GENERATE_UUID=1 recreate_initramfs $SQUASH_ROOT | ||||
| 
 | ||||
| # Don't let cloud-init run in the live session. | ||||
| touch $SQUASH_ROOT/etc/cloud/cloud-init.disabled | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user