-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
prepare_host: Installing packages with the install_pkg_deb function #3374
Conversation
Signed-off-by: The-going <48602507+The-going@users.noreply.github.com>
Signed-off-by: The-going <48602507+The-going@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
@@ -1338,31 +1327,34 @@ prepare_host() | |||
# packages list for host | |||
# NOTE: please sync any changes here with the Dockerfile and Vagrantfile | |||
|
|||
# build aarch64 | |||
local hostdeps="acl aptly aria2 bc binfmt-support bison btrfs-progs \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: I'd use bash arrays (declare -a
) for hostdeps
.
array syntax allows for multiline without needing \
so easier to reformat later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Installing packages using the install_pkg_deb function, which requires a list separated by a space, tab, or a newline character.
Verification code:
#!/bin/bash
hostdeps="acl aptly aria2 bc binfmt-support bison btrfs-progs \
build-essential ca-certificates ccache cpio cryptsetup curl \
debian-archive-keyring debian-keyring debootstrap device-tree-compiler \
dialog dirmngr dosfstools dwarves f2fs-tools fakeroot flex gawk \
gcc-arm-linux-gnueabihf gdisk gnupg1 gpg imagemagick jq kmod libbison-dev \
libc6-dev-armhf-cross libelf-dev libfdt-dev libfile-fcntllock-perl \
libfl-dev liblz4-tool libncurses-dev libpython2.7-dev libssl-dev \
libusb-1.0-0-dev linux-base locales lzop ncurses-base ncurses-term \
nfs-kernel-server ntpdate p7zip-full parted patchutils pigz pixz \
pkg-config pv python3-dev python3-distutils qemu-user-static rsync swig \
systemd-container u-boot-tools udev unzip uuid-dev wget whiptail zip \
zlib1g-dev lib32ncurses-dev"
list_deps="
acl aptly aria2 bc binfmt-support bison btrfs-progs
build-essential ca-certificates ccache cpio cryptsetup curl
debian-archive-keyring debian-keyring debootstrap device-tree-compiler
dialog dirmngr dosfstools dwarves f2fs-tools fakeroot flex gawk
gcc-arm-linux-gnueabihf gdisk gnupg1 gpg imagemagick jq kmod libbison-dev
libc6-dev-armhf-cross libelf-dev libfdt-dev libfile-fcntllock-perl
libfl-dev liblz4-tool libncurses-dev libpython2.7-dev libssl-dev
libusb-1.0-0-dev linux-base locales lzop ncurses-base ncurses-term
nfs-kernel-server ntpdate p7zip-full parted patchutils pigz pixz
pkg-config pv python3-dev python3-distutils qemu-user-static rsync swig
systemd-container u-boot-tools udev unzip uuid-dev wget whiptail zip
zlib1g-dev lib32ncurses-dev
"
test_print ()
{
echo "$*"
echo ""
echo -e "$*"
echo -e "\n=======\n"
}
test_print $hostdeps
test_print $list_deps
In this case, I want to show that if you want to write a long line,
then it should be separated by the "\
" character at the 79th position of the line.
I.e., the line in script should not be longer than 80.
It is very difficult to read and correct the text of the code when you look at it through
a small screen panel in a console text editor. For example, directly on a working board.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry. That's definitely not what I meant. Sorry.
I meant:
declare -a list_of_things=("one-thing" "another-thing"
"this-does-not-need-backslashes")
[[ a == a ]] && list_of_things+=("add_one_thing_later")
echo "${list_of_things[@]}" # expand the array correctly into a string, each thing a parameter
echo "${list_of_things[*]}" # expand into a single parameter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do I understand correctly that you need a list of listed packages designed as an array but not as a string?
Is it easier for you to work with an array?
It is most important to find out the opinion of users about the log that the install_pkg_deb function creates. |
Do we need to have in and out list? Perhaps a list and exposed problematic one? Bad package name: lib32ncurses-dev (on aarch64) |
Initially, I made this function for debugging build dependencies in projects that support older versions of debian. These packages cannot be built in the new ubuntu OS unless the build dependencies are fixed. It is for this reason that it is important for me to see this:
But we can make an additional parameter for debugging -V=1 or --verbose |
Thanks. I'll fix it. But could this mean that not everything can be assembled for armhf on aarch64? |
Don't know for sure. Probably unrelated - exotic legacy (u-)boot(s) might come with x86 binary tools for assembly or won't compile with distro compiler. So yes, not everything can be assembled on aarch64, but its not critical since those are going towards EOL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. If there is nothing more to change / add we are ready to merge.
This stage, yes, can be merged. I'm still testing the next stage. |
Tag for manual merge into |
@The-going host apt update should not run each time script is called. This has to be solved somehow or thrown under switch. [ .... ] Installing build dependencies |
@igorpecovnik Before that it was:
If there is no target to install, then nothing happens. |
add ssv6051 driver for kernel 5.10 and 5.15 (cherry picked from commit f3388b9) Add upstream patches (armbian#3380) (cherry picked from commit d7794cc) Fixes for Github Actions (armbian#3379) * Update build-beta-images.yml * Update build-kernel-on-merge-request.yml * Update build-train.yml (cherry picked from commit 6bfc83b) Refactor armbian-bsp-cli package creation (armbian#3378) * Refactor armbian-bsp-cli package creation - added general distro status for all in separate file inside BSP - remove branch and distro specifics * Looking for prebuild pack * Small fixes (cherry picked from commit 310495d) Cleanup. Remove deprecated build targets (armbian#3148) * Update targets.conf * Update targets-desktop-beta.conf * Update targets-cli-beta.conf * Update targets.conf Update targets according ot current status of maintainer list reduce userspaces to Focal reduce to xfce default desktop keep one minimal and one edge to check if they build at least. * adjust support status according current maintainer sheet * Readd pbp * Readd pbp * Readd C2 Co-authored-by: Igor Pecovnik <igor.pecovnik@gmail.com> (cherry picked from commit 9d8a424) prepare_host: Installing packages with the install_pkg_deb function (armbian#3374) * separate joint and own lists for architecture Signed-off-by: The-going <48602507+The-going@users.noreply.github.com> * Remove duplicate selection * Final add Installing build dependencies * libncurses: Do not use transitional package Signed-off-by: The-going <48602507+The-going@users.noreply.github.com> * add arch i386: Remove duplicate selection * lib32ncurses-dev: Dependency only for amd64 * install_pkg_deb: parameter verbose to log (cherry picked from commit 0282567) Improve fist login UX (armbian#3375) * Improve 1st login script * Update packages/bsp/common/usr/lib/armbian/armbian-firstlogin Co-authored-by: Manuel Rüger <manuel@rueg.eu> * Address accessibility issue Co-authored-by: Manuel Rüger <manuel@rueg.eu> (cherry picked from commit e76a5b0) fixes the manual launch of the installation script from USB media (armbian#3377) (cherry picked from commit 3f8da05) Bugfix - legacy kernels doesn't want to play nice with kernel options When NFSD is enabled as module, kernel does not compile. But it works as build in. Since its pretty pointless to fix in the code, lets use this workaround. FYI @patrickbkr (cherry picked from commit 2b4e9e6) Unify NFS configuration (armbian#3376) * Unify NFS configuration * Fix rk35xx kernel Co-authored-by: Igor Pecovnik <igor.pecovnik@gmail.com> (cherry picked from commit 7698848) Limit sunxi-tools install to Allwinner family only Close armbian#2941 (cherry picked from commit 181d0e2) Re-enable rock-3a building now that it works (armbian#3373) Revert a change in bddce2c now that rock-3a building succeeds and provides a usable image (armbian#3271) (cherry picked from commit 32dc244) sun50iw9 - bugfix - change phy driver to build-in since it breaks compilation when added as module (cherry picked from commit 5a6b9b2) Install debian packages using a special function (armbian#3368) * Add new function install_pkg_deb Signed-off-by: The-going <48602507+The-going@users.noreply.github.com> * Use the install_pkg_deb function Signed-off-by: The-going <48602507+The-going@users.noreply.github.com> * sunxi-tools: Calculate build dependencies Signed-off-by: The-going <48602507+The-going@users.noreply.github.com> * hostapd, hostapd-realtek: Calculate build dependencies Signed-off-by: The-going <48602507+The-going@users.noreply.github.com> * Clean Environment for building as default * upgrading: Repack a clean Environment archive Signed-off-by: The-going <48602507+The-going@users.noreply.github.com> (cherry picked from commit fedc9c1) fix kernel legacy for firefly-rk3399 (armbian#3369) (cherry picked from commit e453e4d) add station m2\p2 (armbian#3352) (cherry picked from commit 08568a6) Bump version to proceed on 22.02 Armbian Ratel (cherry picked from commit 483c055) Assemble needed runs into a GH Actions build train (armbian#3366) (cherry picked from commit 7f556dc) helios64: fix udev rules to let fancontrol work again (armbian#3367) (cherry picked from commit 37662d8) Fix the uboot for rock-3a (armbian#3271) * Sync kernel config with radxa and remove packaging patch * Merge the rockchip64 legacy config as well * Lower priority of EFI partitioning against DOS partitioning which is used by Armbian Co-authored-by: Catalin Toda <catalinii@yahoo.com> (cherry picked from commit f6143ef)
…rmbian#3374) * separate joint and own lists for architecture Signed-off-by: The-going <48602507+The-going@users.noreply.github.com> * Remove duplicate selection * Final add Installing build dependencies * libncurses: Do not use transitional package Signed-off-by: The-going <48602507+The-going@users.noreply.github.com> * add arch i386: Remove duplicate selection * lib32ncurses-dev: Dependency only for amd64 * install_pkg_deb: parameter verbose to log
…rmbian#3374) * separate joint and own lists for architecture Signed-off-by: The-going <48602507+The-going@users.noreply.github.com> * Remove duplicate selection * Final add Installing build dependencies * libncurses: Do not use transitional package Signed-off-by: The-going <48602507+The-going@users.noreply.github.com> * add arch i386: Remove duplicate selection * lib32ncurses-dev: Dependency only for amd64 * install_pkg_deb: parameter verbose to log
Description
Installing packages using the install_pkg_deb function for the operating system of the build machine.