After cleanup and test

This commit is contained in:
Igor 2023-03-27 18:54:35 +02:00 committed by Igor Pečovnik
parent 2dd0d2aa5c
commit 9202c44908
11 changed files with 38 additions and 52 deletions

View File

@ -60,7 +60,7 @@ function artifact_armbian-config_prepare_version() {
}
function artifact_armbian-config_build_from_sources() {
FULL="" REPLACE="-full" LOG_SECTION="compile_armbian-config" do_with_logging compile_armbian-config
LOG_SECTION="compile_armbian-config" do_with_logging compile_armbian-config
}
function artifact_armbian-config_cli_adapter_pre_run() {
@ -75,7 +75,7 @@ function artifact_armbian-config_cli_adapter_config_prep() {
}
function artifact_armbian-config_get_default_oci_target() {
artifact_oci_target_base="ghcr.io/armbian/cache-armbian-config/"
artifact_oci_target_base="ghcr.io/armbian/cache-firmware/"
}
function artifact_armbian-config_is_available_in_local_cache() {

View File

@ -7,7 +7,7 @@
# This file is a part of the Armbian Build Framework
# https://github.com/armbian/build/
function artifact_plymouth-theme-armbian_prepare_version() {
function artifact_armbian-plymouth-theme_prepare_version() {
artifact_version="undetermined" # outer scope
artifact_version_reason="undetermined" # outer scope
@ -17,7 +17,7 @@ function artifact_plymouth-theme-armbian_prepare_version() {
# get the hashes of the lib/ bash sources involved...
declare hash_files="undetermined"
calculate_hash_for_files "${SRC}"/lib/functions/compilation/packages/plymouth-theme-armbian-deb.sh
calculate_hash_for_files "${SRC}"/lib/functions/compilation/packages/armbian-plymouth-theme-deb.sh
declare bash_hash="${hash_files}"
declare bash_hash_short="${bash_hash:0:${short_hash_size}}"
@ -25,18 +25,18 @@ function artifact_plymouth-theme-armbian_prepare_version() {
artifact_version="${artifact_prefix_version}-B${bash_hash_short}"
declare -a reasons=(
"Armbian plymouth-theme-armbian"
"Armbian armbian-plymouth-theme"
"framework bash hash \"${bash_hash}\""
)
artifact_version_reason="${reasons[*]}" # outer scope
artifact_map_packages=(
["plymouth-theme-armbian"]="armbian-plymouth-theme"
["armbian-plymouth-theme"]="armbian-plymouth-theme"
)
artifact_map_debs=(
["plymouth-theme-armbian"]="armbian-plymouth-theme_${artifact_version}_all.deb"
["armbian-plymouth-theme"]="armbian-plymouth-theme_${artifact_version}_all.deb"
)
artifact_name="armbian-plymouth-theme"
@ -47,37 +47,37 @@ function artifact_plymouth-theme-armbian_prepare_version() {
return 0
}
function artifact_plymouth-theme-armbian_build_from_sources() {
LOG_SECTION="compile_plymouth-theme-armbian" do_with_logging compile_plymouth-theme-armbian
function artifact_armbian-plymouth-theme_build_from_sources() {
LOG_SECTION="compile_armbian-plymouth-theme" do_with_logging compile_armbian-plymouth-theme
}
function artifact_plymouth-theme-armbian_cli_adapter_pre_run() {
function artifact_armbian-plymouth-theme_cli_adapter_pre_run() {
declare -g ARMBIAN_COMMAND_REQUIRE_BASIC_DEPS="yes" # Require prepare_host_basic to run before the command.
# "gimme root on a Linux machine"
cli_standard_relaunch_docker_or_sudo
}
function artifact_plymouth-theme-armbian_cli_adapter_config_prep() {
function artifact_armbian-plymouth-theme_cli_adapter_config_prep() {
use_board="no" prep_conf_main_minimal_ni < /dev/null # no stdin for this, so it bombs if tries to be interactive.
}
function artifact_plymouth-theme-armbian_get_default_oci_target() {
function artifact_armbian-plymouth-theme_get_default_oci_target() {
artifact_oci_target_base="ghcr.io/armbian/cache-firmware/"
}
function artifact_plymouth-theme-armbian_is_available_in_local_cache() {
function artifact_armbian-plymouth-theme_is_available_in_local_cache() {
is_artifact_available_in_local_cache
}
function artifact_plymouth-theme-armbian_is_available_in_remote_cache() {
function artifact_armbian-plymouth-theme_is_available_in_remote_cache() {
is_artifact_available_in_remote_cache
}
function artifact_plymouth-theme-armbian_obtain_from_remote_cache() {
function artifact_armbian-plymouth-theme_obtain_from_remote_cache() {
obtain_artifact_from_remote_cache
}
function artifact_plymouth-theme-armbian_deploy_to_remote_cache() {
function artifact_armbian-plymouth-theme_deploy_to_remote_cache() {
upload_artifact_to_oci
}

View File

@ -60,7 +60,7 @@ function artifact_armbian-zsh_prepare_version() {
}
function artifact_armbian-zsh_build_from_sources() {
FULL="" REPLACE="-full" LOG_SECTION="compile_armbian-zsh" do_with_logging compile_armbian-zsh
LOG_SECTION="compile_armbian-zsh" do_with_logging compile_armbian-zsh
}
function artifact_armbian-zsh_cli_adapter_pre_run() {
@ -75,7 +75,7 @@ function artifact_armbian-zsh_cli_adapter_config_prep() {
}
function artifact_armbian-zsh_get_default_oci_target() {
artifact_oci_target_base="ghcr.io/armbian/cache-armbian-zsh/"
artifact_oci_target_base="ghcr.io/armbian/cache-firmware/"
}
function artifact_armbian-zsh_is_available_in_local_cache() {

View File

@ -20,7 +20,7 @@ function armbian_register_artifacts() {
["full_firmware"]="full_firmware"
["armbian-config"]="armbian-config"
["armbian-zsh"]="armbian-zsh"
["plymouth-theme-armbian"]="plymouth-theme-armbian"
["armbian-plymouth-theme"]="armbian-plymouth-theme"
# tar.zst
["rootfs"]="rootfs"

View File

@ -41,7 +41,7 @@ function armbian_register_commands() {
["firmware-full"]="artifact"
["armbian-config"]="artifact"
["armbian-zsh"]="artifact"
["plymouth-theme-armbian"]="artifact"
["armbian-plymouth-theme"]="artifact"
["kernel"]="artifact"
["kernel-config"]="artifact"
["u-boot"]="artifact"
@ -72,6 +72,9 @@ function armbian_register_commands() {
["u-boot"]="WHAT='uboot' ${common_cli_artifact_vars}"
["firmware"]="WHAT='firmware' ${common_cli_artifact_vars}"
["firmware-full"]="WHAT='full_firmware' ${common_cli_artifact_vars}"
["armbian-config"]="WHAT='armbian-config' ${common_cli_artifact_vars}"
["armbian-zsh"]="WHAT='armbian-zsh' ${common_cli_artifact_vars}"
["armbian-plymouth-theme"]="WHAT='armbian-plymouth-theme' ${common_cli_artifact_vars}"
["rootfs"]="WHAT='rootfs' ${common_cli_artifact_vars}"
["oras-upload"]="ORAS_OPERATION='upload'"

View File

@ -21,9 +21,8 @@ compile_armbian-config() {
local ARMBIAN_CONFIG_GIT_SOURCE="${ARMBIAN_FIRMWARE_GIT_SOURCE:-"https://github.com/armbian/config"}"
local ARMBIAN_CONFIG_GIT_BRANCH="${ARMBIAN_FIRMWARE_GIT_BRANCH:-"master"}"
# cd "${tmp_dir}/${armbian-config_dir}" || exit_with_error "can't change directory"
# fetch_from_repo "https://github.com/armbian/config" "armbian-config" "branch:master"
fetch_from_repo "https://github.com/armbian/config" "armbian-config" "branch:master"
# this is also not getting any updates
fetch_from_repo "https://github.com/dylanaraps/neofetch" "neofetch" "tag:7.1.0"
# Fetch Armbian config from git.
@ -69,7 +68,7 @@ compile_armbian-config() {
ln -sf /usr/sbin/armbian-config "${tmp_dir}/${armbian_config_dir}"/usr/bin/armbian-config
ln -sf /usr/sbin/softy "${tmp_dir}/${armbian_config_dir}"/usr/bin/softy
fakeroot_dpkg_deb_build "${tmp_dir}/${armbian_config_dir}" "${DEB_STORAGE}/"
fakeroot_dpkg_deb_build "${tmp_dir}/${armbian_config_dir}" "${DEB_STORAGE}"
done_with_temp_dir "${cleanup_id}" # changes cwd to "${SRC}" and fires the cleanup function early

View File

@ -7,7 +7,7 @@
# This file is a part of the Armbian Build Framework
# https://github.com/armbian/build/
compile_plymouth-theme-armbian() {
compile_armbian-plymouth-theme() {
: "${artifact_version:?artifact_version is not set}"
declare cleanup_id="" tmp_dir=""
@ -55,7 +55,7 @@ compile_plymouth-theme-armbian() {
run_host_command_logged cp "${SRC}"/packages/plymouth-theme-armbian/armbian.plymouth \
"${tmp_dir}/${plymouth_theme_armbian_dir}"/usr/share/plymouth/themes/armbian/
fakeroot_dpkg_deb_build "${tmp_dir}/${plymouth_theme_armbian_dir}" "${DEB_STORAGE}/"
fakeroot_dpkg_deb_build "${tmp_dir}/${plymouth_theme_armbian_dir}" "${DEB_STORAGE}"
done_with_temp_dir "${cleanup_id}" # changes cwd to "${SRC}" and fires the cleanup function early
}

View File

@ -79,7 +79,7 @@ compile_armbian-zsh() {
chmod 755 "${tmp_dir}/${armbian_zsh_dir}"/DEBIAN/postinst
fakeroot_dpkg_deb_build "${tmp_dir}/${armbian_zsh_dir}" "${DEB_STORAGE}/"
fakeroot_dpkg_deb_build "${tmp_dir}/${armbian_zsh_dir}" "${DEB_STORAGE}"
done_with_temp_dir "${cleanup_id}" # changes cwd to "${SRC}" and fires the cleanup function early
}

View File

@ -45,7 +45,7 @@ function main_default_build_packages() {
artifacts_to_build+=("armbian-config")
artifacts_to_build+=("armbian-zsh")
artifacts_to_build+=("plymouth-theme-armbian")
artifacts_to_build+=("armbian-plymouth-theme")
display_alert "Artifacts to build:" "${artifacts_to_build[*]}" "debug"

View File

@ -385,37 +385,21 @@ function install_distribution_agnostic() {
# install armbian-config
if [[ "${PACKAGE_LIST_RM}" != *armbian-config* ]]; then
if [[ "${REPOSITORY_INSTALL}" != *armbian-config* ]]; then
if [[ $BUILD_MINIMAL != yes ]]; then
install_deb_chroot "${DEB_STORAGE}/armbian-config_${REVISION}_all.deb"
fi
else
if [[ $BUILD_MINIMAL != yes ]]; then
install_deb_chroot "armbian-config" "remote"
fi
if [[ $BUILD_MINIMAL != yes ]]; then
install_deb_chroot "${DEB_STORAGE}/${image_artifacts_debs["armbian-config"]}"
fi
fi
# install armbian-zsh
if [[ "${PACKAGE_LIST_RM}" != *armbian-zsh* ]]; then
if [[ "${REPOSITORY_INSTALL}" != *armbian-zsh* ]]; then
if [[ $BUILD_MINIMAL != yes ]]; then
install_deb_chroot "${DEB_STORAGE}/armbian-zsh_${REVISION}_all.deb"
fi
else
if [[ $BUILD_MINIMAL != yes ]]; then
install_deb_chroot "armbian-zsh" "remote"
fi
if [[ $BUILD_MINIMAL != yes ]]; then
install_deb_chroot "${DEB_STORAGE}/${image_artifacts_debs["armbian-config"]}"
fi
fi
# install plymouth-theme-armbian
# install armbian-plymouth-theme
if [[ $PLYMOUTH == yes ]]; then
if [[ "${REPOSITORY_INSTALL}" != *plymouth-theme-armbian* ]]; then
install_deb_chroot "${DEB_STORAGE}/armbian-plymouth-theme_${REVISION}_all.deb"
else
install_deb_chroot "armbian-plymouth-theme" "remote"
fi
install_deb_chroot "${DEB_STORAGE}/${image_artifacts_debs["armbian-plymouth-theme"]}"
fi
# install wireguard tools

View File

@ -44,7 +44,7 @@ set -o errtrace # trace ERR through - enabled
set -o errexit ## set -e : exit the script if any statement returns a non-true return value - enabled
### lib/functions/artifacts/artifact-plymouth-theme-armbian.sh
# shellcheck source=lib/functions/artifacts/artifact-plymouth-theme-armbian.sh
source "${SRC}"/lib/functions/artifacts/artifact-plymouth-theme-armbian.sh
source "${SRC}"/lib/functions/artifacts/artifact-armbian-plymouth-theme.sh
# no errors tolerated. invoked before each sourced file to make sure.
#set -o pipefail # trace ERR through pipes - will be enabled "soon"
@ -368,7 +368,7 @@ set -o errtrace # trace ERR through - enabled
set -o errexit ## set -e : exit the script if any statement returns a non-true return value - enabled
### lib/functions/compilation/packages/plymouth-theme-armbian-deb.sh
# shellcheck source=lib/functions/compilation/packages/plymouth-theme-armbian-deb.sh
source "${SRC}"/lib/functions/compilation/packages/plymouth-theme-armbian-deb.sh
source "${SRC}"/lib/functions/compilation/packages/armbian-plymouth-theme-deb.sh
# no errors tolerated. invoked before each sourced file to make sure.
#set -o pipefail # trace ERR through pipes - will be enabled "soon"