Commit Graph

192 Commits

Author SHA1 Message Date
coderabbitai[bot] a3686900bd
📝 Add docstrings to `wip-APA-canary-handle-GPG-keys`
Docstrings generation was requested by @leggewie.

* https://github.com/armbian/build/pull/8316#issuecomment-2994129599

The following files were modified:

* `extensions/apa.sh`
* `lib/functions/rootfs/distro-specific.sh`
2025-06-22 11:20:16 +00:00
Werner 15407330c6
Preparation for http proxy caching (#8281)
* always use http for apt repos

* pass possible proxy arguments to docker

* populate lower-case env variables with upper-case ones if not set otherwise
2025-06-13 10:31:24 +02:00
Igor Pecovnik aa5526a918 Signing key: keep a link to previous location
armbian-config still uses old location and as we don't control keys via package, we need to apply this workaround for newly created images
2025-06-09 09:33:46 +02:00
Rolf Leggewie 81d65b09b9 lib distro-specific.sh: move armbian GPG to more common location 2025-05-30 04:06:39 +08:00
Igor Velkov 5815951516 Work if no customize-image.sh file present 2025-05-27 15:43:00 +02:00
Igor Pecovnik 3199178c70 Multiple sources fix: after changing to deb822 we forgot on leftovers
- deboostrap still uses old ways and we need to remove this file
- when displaying the content of sources, we need to look correct file
2025-03-05 10:40:48 +01:00
Igor Pecovnik b47d408ff7 After changing apt lists methodology, we need to rebuild rootfs cache 2025-02-24 12:43:04 +01:00
Blieque Mariguan 8e75c8ebd1 feat: Use deb822 APT sources
- Replace `armbian.list` with `armbian.sources`. This holds the same
  information in a newer format, deb822.
- Replace HTTP with HTTPS for Armbian repositories.
2025-02-24 09:23:11 +01:00
Blieque Mariguan 3743daffa2 feat: Use deb822 APT source for armbian-config
- Replace creation of `armbian-config.list` with
  `armbian-config.sources`. This holds the same information in a newer
  format, deb822. This does not affect `armbian.list`.

See also: https://github.com/armbian/configng/pull/407
2025-02-04 18:49:52 +01:00
Igor Pecovnik 1477b478c5 Add upstream release as csc target: Ubuntu plucky 25.04 2025-01-23 18:30:49 +01:00
Igor 4e33412ec2
Refactor armbian-config into install as external package (#7716)
* 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
2025-01-20 14:23:28 +01:00
Ricardo Pardini c469eeba7a hooks: introduce `post_armbian_repo_customize_image` and `post_repo_customize_image`
- `post_repo_customize_image`: runs after repos have been enabled
- `post_armbian_repo_customize_image`: same, but only if Armbian repo is enabled
- both run after apt update, so packages can be directly installed from repos
2025-01-19 20:21:11 +01:00
marcone 5ccc94dd56 fix typo 2025-01-04 15:36:06 +01:00
Ricardo Pardini b0303e5edc rootfs: fix: don't try to use chroot binaries after qemu was undeployed
- `"${cache_fname}.list"` and `"${cache_fname}.hash_text"` were very old and unused anyway
2025-01-02 13:46:03 +01:00
Ricardo Pardini 6755e9190a don't ship qemu binary in rootfs cache + armhf image/rootfs building on non-armhf-capable-arm64 hosts (Apple M1+)
- refactor `prepare_host_binfmt_qemu()` out of `prepare_host_noninteractive()` and into `rootfs/qemu-static.sh`
  - further split into more functions and return early to avoid deep nesting
  - implement force import and load of qemu-arm for non-armhf capable arm64 hosts (incl magic numbers)
- enhance `deploy_qemu_binary_to_chroot()` & `undeploy_qemu_binary_from_chroot()`;
  - add 2nd param "caller" for better logging/tracking
  - does sanity-check and preserve existing binary if it exists
- explicitly deploy/undeploy for the 3 cases:
  - image: moved undeploy from `post_debootstrap_tweaks()` into image build proper for consistency
  - rootfs: was leaving trash behind (since post_debootstrap_tweaks never ran for rootfs), now properly undeploys
  - initrd: was already fine, just added caller info
- added `arch-test` host dependency
  - ensure `arch-test ${ARCH}` works during prepare-host
- > tl,dr: "can build 32-bit armv7 armhf using Apple silicon; can use rootfs cache cross-arch reliably"
2024-12-31 11:52:12 +01:00
M.Schmidt 6607728e24 improve(lvm,cryptroot): export private key with a structurally equal naming scheme; cleanup 2024-12-13 10:01:19 +01:00
M.Schmidt 590b75fd6f improve(lvm+cryptroot extensions): enable possibility for LVM on LUKS 2024-12-13 10:01:19 +01:00
Igor Pecovnik 4187ab3c51 Adjust deprecated key management support
Workaround for older builds were tied to version of apt, but this doesn't work anymore.
2024-12-13 09:40:56 +01:00
Ricardo Pardini 6d9a06bf72 shellfmt: lib/functions; no changes 2024-11-25 11:32:28 +01:00
Igor 6148907595
Improvements and bug fixes to Armbian user-space services (#6840)
* Add a list of BASH shell aliases and merge them with ohmyZSH aliases
* Add command armbian-upgrade to the BSP which executes update + upgrade
* Display armbian-upgrade only if there are upgrades
* Generate empty folder where will store data. This doesn't exists at early start
* Move armbian-install to /usr/bin and autoexecute sudo
2024-11-18 19:12:52 +01:00
Werner 0afd94a84b
Deprecated `WIREGUARD` once and for all (#7452)
* remove wireguard

* remove wireguard

* remove wireguard

* Update armsom-sige1.csc

* Update hinlink-hnas.csc

* Update hinlink-h28k.csc

* Update hinlink-h66k.csc

* Update mangopi-m28k.csc

* Update hinlink-h68k.csc
2024-11-09 21:02:50 +01:00
Igor Pecovnik 48228f1e49 `Userspace`: Switch armbian-config to new generation. It has very small footprint, thus it will be installed by default 2024-11-05 16:35:36 +01:00
user 502e139598 New option: CRYPTROOT_MAPPER. Make ROOT_MAPPER name for CRYPTROOT changable. 2024-11-05 16:35:02 +01:00
Ricardo Pardini 55b87180b5 rootfs: don't use the Armbian repo when building rootfs from both GHA pipelines and CLI; fixes #7123
- Fixes: 71296430fa -- which only set `SKIP_ARMBIAN_REPO=yes` when `rootfs` cli shortcut used
  - GHA artifact pipelines are generic across all artifacts, and don't use the cli shortcuts
    - instead, they use the `artifact` shortcut, with the `WHAT=rootfs` parameter
    - so in GHA pipelines `SKIP_ARMBIAN_REPO=yes` was not taking effect
- rootfs artifact itself now enforces `SKIP_ARMBIAN_REPO` to be `yes` and makes it readonly
- also add `SKIP_ARMBIAN_REPO` to the general change-tracking for more clarity about configs and hooks etc
- add change tracking calls before/after generic artifact config adapter for even more clarity
2024-09-30 16:15:36 +02:00
Igor Pecovnik 6a03d070d7 MD5 sum: changing default checking as it will fail on base-files
Base files are changed during the process.

FORCE_CHECK_MD5_PACKAGES=yes turns checking back on.
2024-09-29 09:55:15 +02:00
David Andreoletti f145fc2af2 armbian-firstrun: Optionally skip OpenSSH host key regeneration 2024-09-15 11:42:29 +02:00
Igor Pecovnik 8050897d07 rootfs cache: after updating github cli key, we need to rebuild rootfs cache 2024-09-12 07:33:07 +02:00
Ricardo Pardini a1b1d61834 distro-specific: systemd-resolved: don't impose 1.0.0.1 DNS server on users
- See https://github.com/armbian/build/pull/6756/files#r1731373505

Fixes: b6f018a2b1
2024-09-10 21:59:14 +02:00
Igor Pecovnik 7aa89f350f Store VENDORPRETTYNAME to the image instead to the BSP. This is image property. 2024-09-08 16:22:02 +02:00
Igor Pecovnik 05ae71d8f2 Store EXTENSION list to the image instead to the BSP 2024-09-08 16:22:02 +02:00
Igor Pecovnik a26eb472f0 Framework: bump tmpfs size as we are going over
Suppress this warning: "Rootfs post-tweaks size is larger than estimated tmpfs size"
2024-08-23 11:43:03 +02:00
Igor Pecovnik 71f5662dac Force rootfs cache rebuild - once again. 2024-08-23 06:59:40 +02:00
Igor Pecovnik c0c7431af4 Enable allow-downgrades to base-files install to allow building images with older version than current
Framework stores our base-files in rootfs cache with version that comes from trunk and when we make stable images for current or previous release, build fails with error  E: Packages were downgraded and -y was used without --allow-downgrades.
2024-08-23 06:59:40 +02:00
Igor Pecovnik 8648d1f39b Expand functions install_deb_chroot and install_artifact_deb_chroot with accepting additional custom parameter
This adds support to pass additonal parameters to package installer.
2024-08-23 06:59:40 +02:00
Igor Pecovnik 71296430fa Framework: disable armbian repository while generating rootfs cache 2024-08-22 16:53:29 +02:00
Igor Pecovnik 54c79a2008 rootfs: add comment to force rootfs rebuild 2024-08-17 15:51:43 +02:00
Ricardo Pardini a02a6ca680
rootfs: add comment to force rootfs rebuild (#6864) 2024-07-02 12:14:22 +02:00
ColorfulRhino 1a3ca2735b cli: Remove `hostapd` reference
The extra package `hostapd` is not used/installed anymore.
2024-06-30 12:27:41 +00:00
ColorfulRhino 3cca9dcaed Fix formatting in scripts by running `lib/tools/shellfmt.sh` version 3.8.0 2024-06-25 07:06:34 +02:00
Igor Pecovnik 9d187dffeb Deboostrap: switch to last known working tag 2024-06-21 11:14:29 +02:00
ColorfulRhino b6f018a2b1 net: Use resolved for DNS resolution
- Use resolved no matter what manages the network (networkd or NetworkManager)
- Use resolved.conf.d/ directory to set DNS as recommended by resolved itself
- In armbian-firstrun, remove config specific to mvebu64|mt7623 since this is now done by default
2024-06-20 19:59:52 +02:00
ColorfulRhino 78bd36b5a6 cli: Use recommended method for symlinking `/etc/resolv.conf` 2024-06-20 19:59:52 +02:00
Igor Pecovnik f4b160abde Move Network Manager bits into extensions
- use Chrony with Network Manager
- use timesync with systemd-networkd
- use NetPlan with Network manager only
- move command-not-found to CLI image only
- improve firstlogin ip detection
2024-06-20 19:59:52 +02:00
Igor Pecovnik b2aea3ba42 Debian buster: disable non-existing backports repository 2024-06-18 21:47:21 +02:00
ColorfulRhino 0bf3ba7607 cli: Fix DEFAULT_OVERLAYS array
Shellcheck errors/warnings were:
In lib/functions/rootfs/distro-agnostic.sh line 155:
	display_alert "Adding to extlinux.conf" "fdtoverlays=${DEFAULT_OVERLAYS[@]}" "debug"
                                                         ^--------------------^ SC2145 (error): Argument mixes string and array. Use * or separate argument.

In lib/functions/rootfs/distro-agnostic.sh line 156:
	echo "  fdtoverlays ${DEFAULT_OVERLAYS[@]}" >> "$SDCARD/boot/extlinux/extlinux.conf"
                        ^--------------------^ SC2145 (error): Argument mixes string and array. Use * or separate argument.

In lib/functions/rootfs/distro-agnostic.sh line 193:
	if [[ -n $DEFAULT_OVERLAYS && -f "${SDCARD}"/boot/armbianEnv.txt ]]; then
             ^---------------^ SC2128 (warning): Expanding an array without an index only gives the first element.
2024-06-16 11:23:15 +00:00
Muhammed Efe Cetin f28bb4e5ae extlinux: add DEFAULT_OVERLAYS support 2024-06-14 20:51:46 +02:00
Alex bb5fd2ab03
RFC: fix #6686: Debian: enable ssh.service and make it work reliably on armbian-firstrun (#6687)
* Revert commits 911c756083 and 30c47f6f6c

* tweak armbian-firstrun.service to run after ssh.service (for host keys generation purposes)
2024-06-05 15:20:34 +02:00
Ricardo Pardini 40371934d2 lib & config: give shellcheck directions (to /dev/null for dynamic, to repo-relative path for static) for all sourced references
- in preparation for tightening the shellcheck severity level
  - it needs to be able to follow all sources; dynamic ones are ignored, static ones need root-relative prefix
2024-05-19 19:41:35 +02:00
Alex fe64f1f435
RFC: disable ssh.service - enable ssh.socket AND switch firstlogin reload ssh to restart (#6586)
* reload-or-restart ssh prevents botching if sshd is started by a systemd socket
* restart ssh prevents botching if sshd is started by a systemd socket
* move sshd activation from ssh.service to ssh.socket:
- more realiable, avoids possible race condition on first boot
- supplementary to PR#6586 - and commits ffee50a8a6 and 6725032191
* Add display_alert explaining the change in SSH activation
2024-05-17 15:30:13 +02:00
Igor Pecovnik 1b05504c43
Revert "Remove debootstrapped static resolv.conf"
This reverts commit ddcda273a5.
2024-05-12 19:05:04 +02:00