Skip to content

Commit

Permalink
Refactor armbian-config into install as external package (armbian#7716)
Browse files Browse the repository at this point in the history
* Refactor armbian-config into install as external package

- https://github.armbian.com/configng repository is always present
- package can still be removed from the install list

Since this tool will have deeper integration with Armbian, we should probably drop possibility to remove the tool from the list.

* Enable armbian-config as extension
  • Loading branch information
igorpecovnik authored Jan 20, 2025
1 parent 12046a0 commit 4e33412
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 220 deletions.
12 changes: 12 additions & 0 deletions extensions/armbian-config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Install armbian config from repo. Now it is producing externally https://github.com/armbian/configng
# and they are moved to main armbian repo periodically


function custom_apt_repo__add_armbian-github-repo(){
echo "deb ${SIGNED_BY}https://github.armbian.com/configng stable main" > "${SDCARD}"/etc/apt/sources.list.d/armbian-config.list
}


function post_armbian_repo_customize_image__install_armbian-config() {
chroot_sdcard_apt_get_install "armbian-config"
}
96 changes: 0 additions & 96 deletions lib/functions/artifacts/artifact-armbian-config.sh

This file was deleted.

1 change: 0 additions & 1 deletion lib/functions/artifacts/artifacts-registry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ function armbian_register_artifacts() {
["firmware"]="firmware"
["full_firmware"]="full_firmware"
["fake_ubuntu_advantage_tools"]="fake_ubuntu_advantage_tools"
["armbian-config"]="armbian-config"
["armbian-zsh"]="armbian-zsh"
["armbian-plymouth-theme"]="armbian-plymouth-theme"
["armbian-base-files"]="armbian-base-files"
Expand Down
2 changes: 0 additions & 2 deletions lib/functions/cli/commands.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ function armbian_register_commands() {

["firmware"]="artifact"
["firmware-full"]="artifact"
["armbian-config"]="artifact"
["armbian-zsh"]="artifact"
["armbian-plymouth-theme"]="artifact"
["fake-ubuntu-advantage-tools"]="artifact"
Expand Down Expand Up @@ -144,7 +143,6 @@ function armbian_register_commands() {

["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}"
["fake-ubuntu-advantage-tools"]="WHAT='fake_ubuntu_advantage_tools' ${common_cli_artifact_vars}"
Expand Down
75 changes: 0 additions & 75 deletions lib/functions/compilation/packages/armbian-config-deb.sh

This file was deleted.

1 change: 0 additions & 1 deletion lib/functions/compilation/utils-compilation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# compile_uboot
# compile_kernel
# compile_firmware
# compile_armbian-config
# compile_xilinx_bootgen
# grab_version
# find_toolchain
Expand Down
3 changes: 3 additions & 0 deletions lib/functions/configuration/main-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ function do_main_configuration() {

declare -g SKIP_EXTERNAL_TOOLCHAINS="${SKIP_EXTERNAL_TOOLCHAINS:-yes}" # don't use any external toolchains, by default.

# Armbian config is central tool used in all builds. As its build externally, we have moved it to extension. Enable it here.
enable_extension "armbian-config"

# Network stack to use, default to network-manager; configuration can override this.
# Will be made read-only further down.
declare -g NETWORKING_STACK="${NETWORKING_STACK}"
Expand Down
4 changes: 0 additions & 4 deletions lib/functions/main/build-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ function determine_artifacts_to_build_for_image() {
artifacts_to_build+=("fake_ubuntu_advantage_tools")
fi

if [[ "${PACKAGE_LIST_RM}" != *armbian-config* ]]; then
artifacts_to_build+=("armbian-config")
fi

if [[ "${PACKAGE_LIST_RM}" != *armbian-zsh* ]]; then
if [[ $BUILD_MINIMAL != yes ]]; then
artifacts_to_build+=("armbian-zsh")
Expand Down
5 changes: 0 additions & 5 deletions lib/functions/rootfs/distro-agnostic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,6 @@ function install_distribution_agnostic() {
desktop_postinstall
fi

# install armbian-config
if [[ "${PACKAGE_LIST_RM}" != *armbian-config* ]]; then
install_artifact_deb_chroot "armbian-config"
fi

# install armbian-zsh
if [[ "${PACKAGE_LIST_RM}" != *armbian-zsh* ]]; then
if [[ $BUILD_MINIMAL != yes ]]; then
Expand Down
54 changes: 18 additions & 36 deletions lib/library-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,6 @@ set -o errexit ## set -e : exit the script if any statement returns a non-true
# shellcheck source=lib/functions/artifacts/artifact-armbian-bsp-desktop.sh
source "${SRC}"/lib/functions/artifacts/artifact-armbian-bsp-desktop.sh

# no errors tolerated. invoked before each sourced file to make sure.
#set -o pipefail # trace ERR through pipes - will be enabled "soon"
#set -o nounset ## set -u : exit the script if you try to use an uninitialised variable - one day will be enabled
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-armbian-config.sh
# shellcheck source=lib/functions/artifacts/artifact-armbian-config.sh
source "${SRC}"/lib/functions/artifacts/artifact-armbian-config.sh

# no errors tolerated. invoked before each sourced file to make sure.
#set -o pipefail # trace ERR through pipes - will be enabled "soon"
#set -o nounset ## set -u : exit the script if you try to use an uninitialised variable - one day will be enabled
Expand Down Expand Up @@ -109,15 +100,6 @@ set -o errexit ## set -e : exit the script if any statement returns a non-true
# shellcheck source=lib/functions/artifacts/artifact-rootfs.sh
source "${SRC}"/lib/functions/artifacts/artifact-rootfs.sh

# no errors tolerated. invoked before each sourced file to make sure.
#set -o pipefail # trace ERR through pipes - will be enabled "soon"
#set -o nounset ## set -u : exit the script if you try to use an uninitialised variable - one day will be enabled
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-uboot.sh
# shellcheck source=lib/functions/artifacts/artifact-uboot.sh
source "${SRC}"/lib/functions/artifacts/artifact-uboot.sh

# no errors tolerated. invoked before each sourced file to make sure.
#set -o pipefail # trace ERR through pipes - will be enabled "soon"
#set -o nounset ## set -u : exit the script if you try to use an uninitialised variable - one day will be enabled
Expand Down Expand Up @@ -145,6 +127,15 @@ set -o errexit ## set -e : exit the script if any statement returns a non-true
# shellcheck source=lib/functions/artifacts/artifacts-reversion.sh
source "${SRC}"/lib/functions/artifacts/artifacts-reversion.sh

# no errors tolerated. invoked before each sourced file to make sure.
#set -o pipefail # trace ERR through pipes - will be enabled "soon"
#set -o nounset ## set -u : exit the script if you try to use an uninitialised variable - one day will be enabled
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-uboot.sh
# shellcheck source=lib/functions/artifacts/artifact-uboot.sh
source "${SRC}"/lib/functions/artifacts/artifact-uboot.sh

# no errors tolerated. invoked before each sourced file to make sure.
#set -o pipefail # trace ERR through pipes - will be enabled "soon"
#set -o nounset ## set -u : exit the script if you try to use an uninitialised variable - one day will be enabled
Expand Down Expand Up @@ -424,15 +415,6 @@ set -o errexit ## set -e : exit the script if any statement returns a non-true
# shellcheck source=lib/functions/compilation/kernel.sh
source "${SRC}"/lib/functions/compilation/kernel.sh

# no errors tolerated. invoked before each sourced file to make sure.
#set -o pipefail # trace ERR through pipes - will be enabled "soon"
#set -o nounset ## set -u : exit the script if you try to use an uninitialised variable - one day will be enabled
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/armbian-config-deb.sh
# shellcheck source=lib/functions/compilation/packages/armbian-config-deb.sh
source "${SRC}"/lib/functions/compilation/packages/armbian-config-deb.sh

# no errors tolerated. invoked before each sourced file to make sure.
#set -o pipefail # trace ERR through pipes - will be enabled "soon"
#set -o nounset ## set -u : exit the script if you try to use an uninitialised variable - one day will be enabled
Expand Down Expand Up @@ -699,27 +681,27 @@ source "${SRC}"/lib/functions/general/extensions.sh
#set -o nounset ## set -u : exit the script if you try to use an uninitialised variable - one day will be enabled
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/general/git-ref2info.sh
# shellcheck source=lib/functions/general/git-ref2info.sh
source "${SRC}"/lib/functions/general/git-ref2info.sh
### lib/functions/general/github-actions.sh
# shellcheck source=lib/functions/general/github-actions.sh
source "${SRC}"/lib/functions/general/github-actions.sh

# no errors tolerated. invoked before each sourced file to make sure.
#set -o pipefail # trace ERR through pipes - will be enabled "soon"
#set -o nounset ## set -u : exit the script if you try to use an uninitialised variable - one day will be enabled
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/general/git.sh
# shellcheck source=lib/functions/general/git.sh
source "${SRC}"/lib/functions/general/git.sh
### lib/functions/general/git-ref2info.sh
# shellcheck source=lib/functions/general/git-ref2info.sh
source "${SRC}"/lib/functions/general/git-ref2info.sh

# no errors tolerated. invoked before each sourced file to make sure.
#set -o pipefail # trace ERR through pipes - will be enabled "soon"
#set -o nounset ## set -u : exit the script if you try to use an uninitialised variable - one day will be enabled
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/general/github-actions.sh
# shellcheck source=lib/functions/general/github-actions.sh
source "${SRC}"/lib/functions/general/github-actions.sh
### lib/functions/general/git.sh
# shellcheck source=lib/functions/general/git.sh
source "${SRC}"/lib/functions/general/git.sh

# no errors tolerated. invoked before each sourced file to make sure.
#set -o pipefail # trace ERR through pipes - will be enabled "soon"
Expand Down

0 comments on commit 4e33412

Please sign in to comment.