Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Userspace Switching armbian-config to new generation. #7189

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/functions/artifacts/artifact-armbian-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ function artifact_armbian-config_prepare_version() {
artifact_version="undetermined" # outer scope
artifact_version_reason="undetermined" # outer scope

local ARMBIAN_CONFIG_SOURCE="${ARMBIAN_CONFIG_SOURCE:-"https://github.com/armbian/config"}"
local ARMBIAN_CONFIG_BRANCH="branch:${ARMBIAN_CONFIG_BRANCH:-"master"}"
local ARMBIAN_CONFIG_SOURCE="${ARMBIAN_CONFIG_SOURCE:-"https://github.com/armbian/configng"}"
local ARMBIAN_CONFIG_BRANCH="branch:${ARMBIAN_CONFIG_BRANCH:-"main"}"

debug_var ARMBIAN_CONFIG_SOURCE
debug_var ARMBIAN_CONFIG_BRANCH
Expand Down
35 changes: 16 additions & 19 deletions lib/functions/compilation/packages/armbian-config-deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ compile_armbian-config() {
declare armbian_config_dir="armbian-config"
mkdir -p "${tmp_dir}/${armbian_config_dir}"

local ARMBIAN_CONFIG_GIT_SOURCE="${ARMBIAN_FIRMWARE_GIT_SOURCE:-"https://github.com/armbian/config"}"
local ARMBIAN_CONFIG_GIT_BRANCH="${ARMBIAN_FIRMWARE_GIT_BRANCH:-"master"}"
local ARMBIAN_CONFIG_GIT_SOURCE="${ARMBIAN_FIRMWARE_GIT_SOURCE:-"https://github.com/armbian/configng"}"
local ARMBIAN_CONFIG_GIT_BRANCH="${ARMBIAN_FIRMWARE_GIT_BRANCH:-"main"}"

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_from_repo "$GITHUB_SOURCE/dylanaraps/neofetch" "neofetch" "tag:7.1.0"
fetch_from_repo "$GITHUB_SOURCE/armbian/configng" "armbian-config" "branch:main"
fetch_from_repo "$GITHUB_SOURCE/complexorganizations/wireguard-manager" "wireguard-manager" "branch:main"

# Fetch Armbian config from git.
declare fetched_revision
Expand All @@ -33,7 +34,7 @@ compile_armbian-config() {
# @TODO: move this to where it is actually used; not everyone needs to pull this in
fetch_from_repo "$GITHUB_SOURCE/complexorganizations/wireguard-manager" "wireguard-manager" "branch:main"

mkdir -p "${tmp_dir}/${armbian_config_dir}"/{DEBIAN,usr/bin/,usr/sbin/,usr/lib/armbian-config/}
mkdir -p "${tmp_dir}/${armbian_config_dir}"/{DEBIAN,bin/,lib/armbian-configng/,usr/bin/}

cd "${tmp_dir}/${armbian_config_dir}" || exit_with_error "can't change directory"

Expand All @@ -43,31 +44,27 @@ compile_armbian-config() {
Version: ${artifact_version}
Architecture: all
Maintainer: $MAINTAINER <$MAINTAINERMAIL>
Depends: bash, iperf3, psmisc, curl, bc, expect, dialog, pv, zip, debconf-utils, unzip, build-essential, html2text, html2text, dirmngr, software-properties-common, debconf, jq
Suggests: libpam-google-authenticator, qrencode, network-manager, sunxi-tools
Depends: whiptail, jq
Section: utils
Priority: optional
Description: Armbian configuration utility
Description: Armbian configuration utility New Generation
END

install -m 755 "${SRC}"/cache/sources/neofetch/neofetch "${tmp_dir}/${armbian_config_dir}"/usr/bin/neofetch
cd "${tmp_dir}/${armbian_config_dir}"/usr/bin/ || exit_with_error "Failed to cd to ${tmp_dir}/${armbian_config_dir}/usr/bin/"
process_patch_file "${SRC}/patch/misc/add-armbian-neofetch.patch" "applying"

# 3rd party utilities
install -m 755 "${SRC}"/cache/sources/wireguard-manager/wireguard-manager.sh "${tmp_dir}/${armbian_config_dir}"/usr/bin/wireguard-manager
install -m 755 "${SRC}"/cache/sources/armbian-config/scripts/tv_grab_file "${tmp_dir}/${armbian_config_dir}"/usr/bin/tv_grab_file
install -m 755 "${SRC}"/cache/sources/armbian-config/debian-config "${tmp_dir}/${armbian_config_dir}"/usr/sbin/armbian-config
install -m 644 "${SRC}"/cache/sources/armbian-config/debian-config-jobs "${tmp_dir}/${armbian_config_dir}"/usr/lib/armbian-config/jobs.sh
install -m 644 "${SRC}"/cache/sources/armbian-config/debian-config-submenu "${tmp_dir}/${armbian_config_dir}"/usr/lib/armbian-config/submenu.sh
install -m 644 "${SRC}"/cache/sources/armbian-config/debian-config-functions "${tmp_dir}/${armbian_config_dir}"/usr/lib/armbian-config/functions.sh
install -m 644 "${SRC}"/cache/sources/armbian-config/debian-config-functions-network "${tmp_dir}/${armbian_config_dir}"/usr/lib/armbian-config/functions-network.sh
install -m 755 "${SRC}"/cache/sources/armbian-config/softy "${tmp_dir}/${armbian_config_dir}"/usr/sbin/softy
# fallback to replace armbian-config in BSP
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

dpkg_deb_build "${tmp_dir}/${armbian_config_dir}" "armbian-config"
# Armbian config parts
install -m 755 "${SRC}"/cache/sources/armbian-config/bin/armbian-configng "${tmp_dir}/${armbian_config_dir}"/bin/armbian-configng
cp -R "${SRC}"/cache/sources/armbian-config/lib/armbian-configng/ "${tmp_dir}/${armbian_config_dir}"/lib/

# Linking
ln -sf /bin/armbian-configng "${tmp_dir}/${armbian_config_dir}"/usr/bin/armbian-config

dpkg_deb_build "${tmp_dir}/${armbian_config_dir}" "armbian-config"
done_with_temp_dir "${cleanup_id}" # changes cwd to "${SRC}" and fires the cleanup function early

}
4 changes: 1 addition & 3 deletions lib/functions/main/build-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ function determine_artifacts_to_build_for_image() {
fi

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

if [[ "${PACKAGE_LIST_RM}" != *armbian-zsh* ]]; then
Expand Down
4 changes: 1 addition & 3 deletions lib/functions/rootfs/distro-agnostic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,7 @@ function install_distribution_agnostic() {

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

# install armbian-zsh
Expand Down