build icon indicating copy to clipboard operation
build copied to clipboard

The minimal image contains unnecessary parts.

Open The-going opened this issue 2 years ago • 3 comments

The minimal image contains an invalid third-party package repository. I'm only collecting a minimal image. And only for Ubuntu focal. My image contains the /etc/apt/sources.list.d/box64.list file with the following contents: deb [signed-by=/usr/share/keyrings/box64.gpg] http://ryanfortner.github.io/box64-debs/debian ./

Grep utility search:

grep 'http://ryanfortner.github.io/box64-debs/debian' -r config/*
config/optional/architectures/arm64/_config/desktop/jammy/environments/_all_environments/sources/apt/box64.source:deb [signed-by=/usr/share/keyrings/box64.gpg] http://ryanfortner.github.io/box64-debs/debian ./

I can assume that this repository will be connected only for desktop/jammy the choice is made.

Can anyone explain to me why this is happening? The best option is to "rub my nose" in the line of code where this happens.

To Reproduce Build minimal image for focal

The-going avatar Jul 08 '22 09:07 The-going

It seem like that it will add all the apt sources from both cli and desktop even though build as minimal.

I'm not sure whether it's a special design.

/lib/desktop.sh#L193:

add_apt_sources() {

	local potential_paths=""
	local sub_dirs_to_check=". "
	if [[ ! -z "${SELECTED_CONFIGURATION+x}" ]]; then
		sub_dirs_to_check+="config_${SELECTED_CONFIGURATION}"
	fi
	get_all_potential_paths "${DEBOOTSTRAP_SEARCH_RELATIVE_DIRS}" "${sub_dirs_to_check}" "sources/apt"
	get_all_potential_paths "${CLI_SEARCH_RELATIVE_DIRS}" "${sub_dirs_to_check}" "sources/apt"
	get_all_potential_paths "${DESKTOP_ENVIRONMENTS_SEARCH_RELATIVE_DIRS}" "." "sources/apt"
	get_all_potential_paths "${DESKTOP_APPGROUPS_SEARCH_RELATIVE_DIRS}" "${DESKTOP_APPGROUPS_SELECTED}" "sources/apt"

	display_alert "Adding additional apt sources"

/lib/desktop.sh#L253:

add_desktop_package_sources() {

	# Myy : I see Snap and Flatpak coming up in the next releases
	# so... let's prepare for that

	add_apt_sources

	ls -l "${SDCARD}/usr/share/keyrings" >> "${DEST}"/${LOG_SUBPATH}/install.log
	ls -l "${SDCARD}/etc/apt/sources.list.d" >> "${DEST}"/${LOG_SUBPATH}/install.log
	cat "${SDCARD}/etc/apt/sources.list" >> "${DEST}"/${LOG_SUBPATH}/install.log

}

/lib/debootstrap.sh#L250:

		# TODO change name of the function from "desktop" and move to appropriate location
		add_desktop_package_sources

hzyitc avatar Aug 05 '22 17:08 hzyitc

@hzyitc Thanks. I saw it.

In fact, it looks like an unfinished job. The choice of packages to install in the future image should occur somewhere at the very beginning of the path when the user made a choice or set the appropriate variable.

This requires a change in the overall algorithm. What do you think is the right course of action?

The-going avatar Aug 06 '22 08:08 The-going

Maybe make user be able to install full desktop environment? I don't know. Probably need to ask the author.

hzyitc avatar Aug 07 '22 13:08 hzyitc

This may not be the best place, but I tried to build a focal image and it failed because of:

Err:4 https://box64.debian.ryanfortner.dev/debian ./ Release
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate.  Could not handshake: Error in the certificate verification. [IP: 185.199.108.153 443]

Which seems to me like an unnecessary package?

awesomebytes avatar Nov 10 '22 14:11 awesomebytes

This was removed with https://armbian.atlassian.net/browse/AR-1395

igorpecovnik avatar Jan 04 '23 16:01 igorpecovnik