Skip to content

Commit

Permalink
Merge pull request #27 from mvallim/feat-configure-manifest
Browse files Browse the repository at this point in the history
Customize package removal
  • Loading branch information
mvallim authored Apr 26, 2021
2 parents 3945454 + ceaa543 commit 91d4706
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
10 changes: 4 additions & 6 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function load_config() {
# Verify that necessary configuration values are set and they are valid
function check_config() {
local expected_config_version
expected_config_version="0.2"
expected_config_version="0.3"

if [[ "$CONFIG_FILE_VERSION" != "$expected_config_version" ]]; then
>&2 echo "Invalid or old config version $CONFIG_FILE_VERSION, expected $expected_config_version. Please update your configuration file from the default."
Expand Down Expand Up @@ -192,11 +192,9 @@ EOF
# generate manifest
sudo chroot chroot dpkg-query -W --showformat='${Package} ${Version}\n' | sudo tee image/casper/filesystem.manifest
sudo cp -v image/casper/filesystem.manifest image/casper/filesystem.manifest-desktop
sudo sed -i '/ubiquity/d' image/casper/filesystem.manifest-desktop
sudo sed -i '/casper/d' image/casper/filesystem.manifest-desktop
sudo sed -i '/discover/d' image/casper/filesystem.manifest-desktop
sudo sed -i '/laptop-detect/d' image/casper/filesystem.manifest-desktop
sudo sed -i '/os-prober/d' image/casper/filesystem.manifest-desktop
for pkg in $TARGET_PACKAGE_REMOVE; do
sudo sed -i "/$pkg/d" image/casper/filesystem.manifest-desktop
done

# compress rootfs
sudo mksquashfs chroot image/casper/filesystem.squashfs \
Expand Down
11 changes: 10 additions & 1 deletion scripts/default_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ export GRUB_LIVEBOOT_LABEL="Try Ubuntu FS without installing"
# The text label shown in GRUB for starting installation
export GRUB_INSTALL_LABEL="Install Ubuntu FS"

# Packages to be removed from the target system after installation completes succesfully
export TARGET_PACKAGE_REMOVE="
ubiquity \
casper \
discover \
laptop-detect \
os-prober \
"

# Package customisation function. Update this function to customize packages
# present on the installed system.
function customize_image() {
Expand Down Expand Up @@ -55,4 +64,4 @@ function customize_image() {

# Used to version the configuration. If breaking changes occur, manual
# updates to this file from the default may be necessary.
export CONFIG_FILE_VERSION="0.2"
export CONFIG_FILE_VERSION="0.3"

0 comments on commit 91d4706

Please sign in to comment.