Commit Graph

192 Commits

Author SHA1 Message Date
Alessandro Lannocca ddcda273a5 Remove debootstrapped static resolv.conf 2024-05-12 15:24:54 +01:00
Alex 9063417d90
Treat sid and unstable as synonyms in distro-specific.sh (#6582)
Credits: @going --> https://forum.armbian.com/topic/37503-kali-linux-as-supported-distro/
2024-05-11 21:59:17 +02:00
Igor Pecovnik 514c6a48e8 Return Noble armhf arch as it works
- remove kinetic, lunar, mantic
- fix armhf sid, noble, oracular
2024-05-11 12:15:22 +01:00
Igor Pecovnik 017acb063c Add Ubuntu Oracular 2024-05-10 13:25:00 +01:00
Ricardo Pardini 41b99ec2b1 rootfs-create: if debootstrap second stage fails, find debootstrap.log and show it so we know what the error is
- runner: let `if_error_find_files_sdcard` be a simple filename (different debootstraps put debootstrap.log in different places)
2024-04-07 13:22:11 +02:00
Ricardo Pardini 5e943dede7 main-config: fix: avoid errors when BRANCH contains a dash; convert to underscore 2024-04-02 21:10:06 +02:00
Ricardo Pardini 1074c969e8 Revert "rockchip-rk3588: it's vendor boogie panthor time (experimental) (#6459)"
This reverts commit 43cf339c6c.
2024-04-02 21:10:06 +02:00
Ricardo Pardini 43cf339c6c
rockchip-rk3588: it's vendor boogie panthor time (experimental) (#6459)
* main-config: fix: avoid errors when BRANCH contains a dash; convert to underscore

* rockchip64_common: shellfmt, no changes

* rockchip64_common: move SERIALCON defaulting logic to a (verbose) hook for flexibility

* config: allow to build BRANCHes not listed in KERNEL_TARGET as long as the config is valid

- useful for `collabora` and other experimental kernels, we don't want to have to add it to each individual board's KERNEL_TARGES one by one
- but we don't want to allow typos in BRANCH to emit very strange unrelated errors

* extensions: mesa-oibaf extension by @monkaBlyat - mainline mesa PPA for Ubuntu

- does nothing on Debian

* extensions: (v3) amazingfated-rk35xx, now `rk-multimedia-amazingfate` - panfork-free

- simply skips if not on Jammy
- deploys Chromium + Widevine if desktop

* rockchip-rk3588: introduce `vendor-boogie-panthor` experimental BRANCH/kernel

- original: https://github.com/hbiyik/linux-rockchip.git (branch `rk-6.1-rkr1-panthor-v6`)
- I picked the commits on top of clean armbian/linux-rockchip `6.1-rkr1` as of 2024-04-01
  - At https://github.com/rpardini/armbian-linux-rockchip-rk3588/tree/armbian-rk-6.1-rkr1-plus-boogie-panthor-v6
  - Diff: https://github.com/armbian/linux-rockchip/compare/rk-6.1-rkr1...rpardini:armbian-linux-rockchip-rk3588:armbian-rk-6.1-rkr1-plus-boogie-panthor-v6

- rockchip-rk3588: introduce `boogie-bsp` BRANCH
- rockchip-rk3588: copy linux-rk35xx-vendor.config into linux-rk35xx-boogie-bsp.config
- rockchip-rk3588: update linux-rk35xx-boogie-bsp.config, no changes
- rockchip-rk3588: linux-rk35xx-boogie-bsp.config: `CONFIG_DRM_PANTHOR=m`
- rockchip-rk3588: linux-rk35xx-boogie-bsp.config: convert to defconfig
- rockchip-rk3588: rename to `BRANCH=vendor-boogie-panthor` for "clarity" (lol)
- rockchip-rk3588: vendor-boogie-panthor: force SERIALCON, full firmware (for blob needed for panthor) & mesa-oibaf extension
- rockchip-rk3588: vendor-boogie-panthor: enable amazingfated-rk35xx extension sans-panfork
2024-04-02 20:30:38 +02:00
Igor Pecovnik 9905082d4e Changing file to force full rootfs cache rebuild due to upstream backdoor 2024-03-29 20:22:54 +01:00
Igor Velkov dfab067f89 Show correct reason about omit tmpfs usage if FORCE_USE_RAMDISK is set 2024-03-08 15:55:26 +01:00
Ricardo Pardini 5b978dc96d lib: drop old boot_logo code; keep png/gif as they're used for plymouth
- origins of what's being dropped: https://github.com/armbian/build/pull/2065
2024-03-06 08:28:31 +01:00
hzy 1d31aac7a9 repo-list: fix build issue with eos distribution
armbian repo doesn't existed in eos distribution, which makes `apt update` fail.
2024-03-03 17:59:31 +01:00
amazingfate 86865a446b move firstrun network config to firstlogin 2024-03-03 16:08:04 +01:00
Ricardo Pardini 5e1b3ca392 debootstrap: use latest git for Ubuntu/Debian debootstrap instead of host-installed
- `DEBOOTSTRAP_DIR` must be set during the 1st stage, but NOT the second stage
- latest devel versions might be missing scripts for old releases; just symlink to the default one if so
- this hopefully should _end_ the debootstrap madness we've been handling, at least until we get around to mmdebstrap (Perl) one day
2024-03-02 20:46:58 +01:00
Ricardo Pardini e37525d234 debootstrap: Partially revert f2e663f0 "Improved debootstrap hacking support with fixes for Ubuntu Noble" 2024-03-02 20:46:58 +01:00
Ricardo Pardini 34bfa92052 Revert "Debootstrap is again too old for latest releases. Lets ship currently latest with and install it when we build distros that needs it."
This reverts commit 7b61b05867.
2024-03-02 20:46:58 +01:00
Igor Pecovnik 7b61b05867 Debootstrap is again too old for latest releases. Lets ship currently latest with and install it when we build distros that needs it. 2024-03-01 12:45:11 +01:00
Gunjan Gupta 6f1b675591 Prevent systemd from starting all services on first-boot 2024-02-11 01:20:17 +05:30
Igor Pecovnik 07037232a1 Unstable / testing packages sometimes contain hacks that are patching files 2024-02-01 22:01:44 +05:30
Igor Pecovnik 6cd3981805 Re-enable resolv.conf during deboostrap process as network manager seems to break it 2024-01-13 11:48:38 +01:00
Igor Pecovnik 9c75c86a54 Set DNS server if systemd-resolved is in use, change switch to if and check for DISTRIBUTION 2024-01-12 19:34:17 +01:00
Ricardo Pardini c434c3613c core: semantic change, KERNELSOURCE must be explicitly 'none' to avoid kernel compilation (not unset) 2024-01-07 18:58:36 +01:00
Gunjan Gupta fbad168eda
Fix rpi image creation broken since to #6087 (#6123)
* Revert "Don't generate armbian.list if when==image-early"
This reverts commit 0b79ff3a63.
* Remove armbian.list.disabled file if it exists
2024-01-01 23:19:35 +01:00
Viacheslav Bocharov 0b79ff3a63 Don't generate armbian.list if when==image-early 2023-12-29 09:39:56 +03:00
Igor f2e663f087
Improved debootstrap hacking support with fixes for Ubuntu Noble (#6076)
* Remove extension for patching Deboostrap to support Ubuntu Noble
* Integrate Deboostrap patching to the build script
* fix problems related to Noble
2023-12-22 08:04:55 +01:00
Igor c5c81a8b58
Move live patch to bsp extension and limit to startup patching (#6017)
* Move live patch to extension
* Move to the board support package and keep only startup patch
2023-12-14 10:36:44 +01:00
Igor e95fbdcfad
Add simple patch system as a standalone service (#5935)
Sometimes we need to fix minor issues like changing the key or fixing other small problem on live OS. We can ship this as a part of BSP package, but its handling should be made easy.

This downloads script from CDN, verify its signature and executes after apt upgrade starts installing packages.

* Record patch output to syslog
* Enable armbian-live-patch as additional service and run patch mechanism at startup
* Additional security check
2023-11-27 13:01:20 +01:00
Igor 1f1d77cff3
Move netplan renderer selection to distro common selection (#5971) 2023-11-26 23:18:40 +01:00
Ricardo Pardini f3c3fe8e82 ubuntu: add `mantic` (23.10), symlinks to lunar 2023-10-14 09:40:45 +00:00
Ricardo Pardini 0cb41b2635 rootfs-desktop: disable `sddm` as well as `lightdm` and `gdm3` in `desktop_postinstall()`
- lightdm, gdm3 already had this
2023-10-14 00:01:07 +02:00
Igor Pecovnik 27df94e924 Timezone select is too closed on status of the countries 2023-08-23 21:34:15 +02:00
Ricardo Pardini 11df81403d config/lib/exts: run shellfmt
- `bash lib/tools/shellfmt.sh`
- mostly spacing changes that accumulated over time
2023-08-22 14:28:14 +02:00
Ricardo Pardini 64b5220853
debian: add Trixie (Debian 13, `testing`) csc target & build host (#5621)
- Trixie, like Bookworm and Sid, does not have python2 anymore
2023-08-22 08:14:55 +02:00
Igor 2a8cb5793f Removing exceptions needed to support riscv64 withing Debian
Signed-off-by: Igor <igor@armbian.com>
2023-08-17 22:09:05 +02:00
Ricardo Pardini df34679533 store dict of artifacts actually installed in image; use it to freeze (`BSPFREEZE=yes`) and check hashes without spurious errors
- eg: `linux-headers` might, or might not, be installed; same with bsp-cli transitional
- accidentally fixes [AR-1802]
2023-08-12 09:58:32 +02:00
Ricardo Pardini 2142f73b97 hashed-OCI-revisioned-debs: introduce "reversioning" of .deb packages
> tl-dr:
> - maximize OCI cache hit ratio across nightlies/releases/PRs/etc;
> - publish simple `Version:`'s that don't include a crazy hash in repo and images
> - introduce `output/packages-hashed` directory
> - radically change the `output/debs` directory structure

- simplify artifact's `prepare_version()` method for `deb` and `deb-tar` artifacts:
  - `artifact_base_dir` and `artifact_final_file` will now be auto-calculated; thus removed from each artifact (except `rootfs`)
  - `artifact_deb_repo` ("global", "jammy", "bookworm") is now required; "global" means common across all RELEASES
  - `artifact_deb_arch` is now required, "all" is arch-independent, otherwise use `${ARCH}`
  - `artifact_map_debs` is now auto-calculated based on the above, and shouldn't be specified manually
  - `artifact_final_version_reversioned` is optional, and can force the final version of the artifact (specific for the `base-files` case)
  - artifacts that need special handling for reversioning can add function names to `artifact_debs_reversion_functions` array (`base-files` and `bsp-cli` cases)
  - artifacts `prepare_version()` should set `artifact_version`, but _never_ include it in other variables; `artifact_version` is now changed by framework after `prepare_version()` returns
- no longer use/refer/mention `${REVISION}` when building packages. All packages should be `${REVISION}`-agnostic.
- `${REVISION}` (actually, `artifact_final_version_reversioned`) will be automatically swapped in the `control` file during reversioning
- `fakeroot_dpkg_deb_build()` now takes exactly two arguments: the directory to pack, and the deb ID (key of `artifact_map_packages` dict); add this change in all the artifact's code for this
- `obtain_complete_artifact()`:
  - automatically adds `-Rxxxx` "revisioning-hash" to `artifact_version`, by hashing the revisioning functions and any `artifact_debs_reversion_functions` set
  - calculates more complex subdirectory paths for both the `output/packages-hashed` and `output/debs`/`output/debs-beta` directories
    - with the new subdirectories we can be sure a re-version is already done correctly and can skip it (eg, for partial `download-debs` re-runs)
    - in the future we can automatically clean/remove old versions that are no longer relevant based on the dir structure
    - exports a lot more information to JSON, including the new subdirectory paths
  - comment-out code that implemented `skip_unpack_if_found_in_caches`, I'm very unsure why we had this in the first place
- `obtain_artifact_from_remote_cache()`
  - for `deb` type artifacts, OCI won't preserve the subdirectory structure, so move downloaded files to the correct subdirectory manually
  - this is not needed for `deb-tar`, since that can preserve the dir structure itself
- introduce `artifacts-reversion.sh` and its main function `artifact_reversion_for_deployment()`
  - this has the logic for reversioning .deb's, by `ar`-unpacking them, changing `control.tar` (and possibly `data.tar`), handling `.xz` compression, etc.
  - also handles hashing those functions, for consistency. Any changes in reversioning code actually change the artifact itself so we're not caught by surprise
  - by default, it changes `control` file only:
    - replace `Version:` (which is the hash-version originally) with `artifact_final_version_reversioned` (which is mostly just `${REVISION}`)
    - add a custom field `Armbian-Original-Hash:` with the original hash-version
  - `artifact_reversion_for_deployment()` is called by
    - new CLI wrapper `cli_obtain_complete_artifact()`, used for CLI building of specific artifact, but also for `download-artifact`
    - `build_artifact_for_image()` used during image build
- `armbian-bsp-cli-deb.sh`: move `${REVISION}` related stuff from the main package build to new reversioning functions.
- `artifact-armbian-base-files.sh`: move `${REVISION}` related stuff from the main package build to new reversioning functions.
- `kernel`:
  - add some custom fields to `DEBIAN/control`:
    - `Armbian-Kernel-Version:` / `Armbian-Kernel-Version-Family:` (for future use: cleanup of usage of `Source: ` field which should be removed)
  - declutter the `Description:` field, moving long description out of the first line
  - obtain `IMAGE_INSTALLED_KERNEL_VERSION` from the reversioned deb (this is still a hack and has not been fixed)
- `uboot`:
  - declutter the `Description:` field, moving long description out of the first line
  - use the reversioned .deb when deploying u-boot to the image
- `main_default_build_packages()` now stores reversioned values and complete paths to reversioned .deb's
- `list_installed_packages()` now compares custom field `Armbian-Original-Hash: `, and not the `Version:` to make sure debs in the image are the ones we want
- `install_artifact_deb_chroot()` is a new wrapper around `install_deb_chroot()` for easy handling of reversioned debs
  - use it everywhere `install_deb_chroot()` was used in `distro-agnostic.sh` and `distro-specific.sh`
2023-08-12 09:58:32 +02:00
Ricardo Pardini a592ab763c hashed-OCI-revisioned-debs: build debs in PACKAGES_HASHED_STORAGE, not DEB_STORAGE (temp commit, will be rewritten by a later commit)
- fakeroot_dpkg_deb_build() now only takes a single argument, the unpacked package dir
2023-08-12 09:58:32 +02:00
Gunjan Gupta 909fa47b7e Fix caching of cryptroot packages. Also moved the crypt code to extension 2023-07-22 02:18:49 +05:30
Gunjan Gupta 95687ba057 Remove plymouth package if its not needed 2023-07-10 08:57:48 +02:00
Ricardo Pardini 8b0fb1537b `meson-{sm1|g12a|g12b}`: default, but don't override, `ASOUND_STATE`; this way board-specific asound.state's are honored
- add logging during actual deployment so we know what is happening
2023-06-27 11:39:36 +02:00
Ricardo Pardini 040158b004 distro-agnostic: don't assume `armbian.list` exists when `sed`ing for beta 2023-06-02 19:32:57 +02:00
Ricardo Pardini aca22a53c3 repo: split `image` apt .list deployment into `image-early` and `image-late`
- split `image` apt .list deployment into `image-early` (after rootfs extract, before building) and `image-late` (after building)
- rationale: having the repo enabled during the image build can cause 'apt upgrade' and others to do inconsistent stuff depending on the (possibly random) state of the repo
2023-06-02 19:32:28 +02:00
Ricardo Pardini 1fd5d519d4 introduce `armbian-base-files` artifact, which downloads & repacks `base-files` from upstream distro
- bsp-cli: now depends on `base-files (>= ${REVISION})`, this way upgrading the bsp-cli causes our base-files to be installed
  - bsp-cli no longer does gymnastics with /etc/os-release et al, all done in armbian-base-files now
- general/apt-utils.sh: introduce `apt_find_upstream_package_version_and_download_url()`
- base-files: add release to version, in order to comply with repo restrictions (valid repos can't have two different debs with same name and version, md5 must match)
2023-05-18 20:49:06 +02:00
Ricardo Pardini f26a41ff6c rootfs/image: introduce new hook `custom_apt_repo()` (hashed into rootfs version); deploy different repo components/custom repos depending on rootfs or image
- rationale: we don't want an eternal chicken-egg problem with rootfs vs repo.
  - but, desktop rootfs require some parts of repo. case in point: `system-monitoring-center`
    - so only add certain components of repo (-desktop, -utils) to rootfs so that is honored
- introduce `custom_apt_repo()` hook for extensions to add their repos as well
  - same chicken-egg-avoiding is possible via param `CUSTOM_REPO_WHEN`
2023-05-16 20:09:47 +02:00
Ricardo Pardini 25929ea6ac `apt_purge_unneeded_packages_and_clean_apt_caches()`: count files, don't use `du`: avoid WARNs when not needed; tolerate 1 file
- 'lock' might or not be there, tolerate 1 file (not 0)
2023-05-15 17:43:25 +02:00
Ricardo Pardini b18cd8aaf4 logging: curb some warnings into info's 2023-05-09 10:04:57 +02:00
Ricardo Pardini ab696d0776 rootfs: bump non-desktop `tmpfs_estimated_size` from 2000mb to 2300mb (determined empirically, after building all images) 2023-05-09 10:04:57 +02:00
Ricardo Pardini 637c4fec01 include (clean/real) apt lists in built images; update xapian index during image build, not rootfs; don't leave junk in the rootfs cache
- revert #5139 Revert "Apt lists is needed for synpatic index generation"
  This reverts commit 63e9bd3baa
  - this actually only left junk in rootfs cache for the future to find
2023-05-09 10:04:50 +02:00
Igor 63e9bd3baa Apt lists is needed for synpatic index generation 2023-05-05 19:37:19 +02:00
Ricardo Pardini 3767729dc5 rootfs: add artifact name prefix and `EXTRA_ROOTFS_NAME` suffix (for extensions), `yyyymm` one-per-month auto-version in place of `REVISION` for artifact version
- rootfs is not a deb package, and thus not subject to the same strict ordering rules of `artifact_prefix_version`
  - replace with `yyyymm` (`202305`) in version so we get one-per-month automatically
2023-05-01 22:47:12 +02:00
Ricardo Pardini c692676da7 kernel-debs: postinst/etc: fix: unify `is_boot_dev_vfat()` function; make work during image build too via env var
- determinining if `/boot` is vfat is more complex than it looks;
  - use a common function to unify across all scripts
- during image build, the kernel install is always done with a non-fat, non-mounted /boot
  - use a special variable passed through the env so unified function can know ahead of time
  - introduce `extra_apt_envs` param to `chroot_sdcard_apt_get()`; array with extra environment vars
- if vfat /boot:
  - `linux-update-symlinks` is not called (Debian would just choke on this)
  - don't even try to symlink Armbian stuff, move instead
- more/better logging board-side (unfortunately mixed in all the set -x debugs)
2023-05-01 22:46:43 +02:00
Ricardo Pardini 2b28f29ebe rootfs/image: avoid apt junk leftover by `debootstrap`; add warnings and debugs over target cache and general rootfs sizes
- rootfs: rootfs-create: show a summary of the 20 biggest dirs, right before tarring the rootfs (for debugging)
- rootfs: rootfs-create: show usage of caches between first and second stages
- rootfs: rootfs-create: cleanup junk left by `debootstrap` after second stage
- rootfs: rootfs-create: _always_ clean apt stuff at the end
- rename `apt_purge_unneeded_packages()` to `apt_purge_unneeded_packages_and_clean_apt_caches()` for clarity
- image: `apt_purge_unneeded_packages_and_clean_apt_caches()`: warn if apt caches not empty; clean them off, always.
- host-utils: `local_apt_deb_cache_prepare()`: also test the target, warn if not empty
- extension: cleanup-space-final-image: do NOT clean apt stuff. done in core now
- the metric shit-ton of debugs added should help the next person who faces this in the future
2023-04-18 16:27:06 +02:00
Igor a6897e85a0 Revert "remove apt cache in the rootfs"
This reverts commit 790e673096.
2023-04-17 16:42:36 +02:00
amazingfate 790e673096 remove apt cache in the rootfs 2023-04-17 13:42:00 +02:00
Ricardo Pardini d59271f903 config: refactor `calculate_image_version()` out of `create_image_from_sdcard_rootfs()`, make more flexible, predict `IMAGE_FILE_ID` during config
- default `IMAGE_INSTALLED_KERNEL_VERSION="generic"` instead of `"linux"`
2023-04-15 22:43:06 +02:00
Ricardo Pardini 0d276c93e9 bsp-cli/distro-agnostic: introduce `KEEP_ORIGINAL_OS_RELEASE=yes` so Debian/Ubuntu PRETTY_NAME is left unchanged in `/etc/os-release`
- useful when downstream software wants exact Debian OS
2023-04-15 22:43:06 +02:00
Igor b2be0e5a45 Enable non-free-firmware repository for Debian Sid
Addressing:

  [🐳|💥] Error context msg [ Installation of Armbian main packages for sid 3dsupport xfce no failed ]
  Error:  Error context msg Installation of Armbian main packages for sid 3dsupport xfce no failed
  [🐳|🔨]   Reading package lists...
  [🐳|🔨]   Building dependency tree...
  [🐳|🔨]   E: Unable to locate package firmware-sof-signed
2023-03-31 13:21:35 +02:00
Igor Pečovnik f51a99f1fa distro-agnostic.sh: fix, install `armbian-zsh` correctly (not `armbian-config` twice) 2023-03-31 09:12:44 +02:00
Igor Pecovnik bf801d194b distro-agnostic.sh: bring back `BSPFREEZE=yes` which now works (somewhat) 2023-03-31 09:12:44 +02:00
Ricardo Pardini f969a5e30f lib: completely remove `CHOSEN_xxx`, `BSP_xxx_NAME`, `BSPFREEZE=yes` 2023-03-31 09:12:44 +02:00
Ricardo Pardini ed0b406265 lib: fix: replace undue `export` statements with `declare -g` 2023-03-31 09:12:44 +02:00
Ricardo Pardini 77921725fb lib: run shellfmt; remove commented-out; no actual changes 2023-03-31 09:12:44 +02:00
Ricardo Pardini f12015954a distro-agnostic: emit 'info' message before setting root password, otherwise logs are confusing 2023-03-31 09:12:44 +02:00
Ricardo Pardini d868d76182 artifacts: bsp-cli, bsp-desktop, desktop: rework, with @igorpec
- bsp-cli: does not require aggregation
- bsp-desktop / desktop: requires aggregation
- 'desktop' packaged moved out of 'bsp' folder, it is NOT a bsp
- make consistent naming/folders
- extract .sh generation workflow into 'declare -f' magic functions
- `SHOW_DEBIAN=yes` to bump most of `DEBIAN/xxx` stuff to screen
- artifact armbian-bsp-desktop: use aggregation, require certain vars, CLI forces `BUILD_DESKTOP=yes`; requires BOARD
- artifact armbian-desktop: use aggregation, require certain vars, CLI forces `BUILD_DESKTOP=yes`, not require `BOARD` anymore
- cli: commands: fix artifact aliases, reorder
- desktop/bsp-desktop: add `config_dump` method; fix `artifact_map_debs` ref subdir and name
- artifact bsps: require aggregation to build, not to list what needs to be built
- distro-agnostic: fix install of `armbian-bsp-cli` (not `armbian-bsp`)
- armbian-bsp-cli: add `_config_dump` method, use configuration with aggregation, add required vars check
- distro-specific: fix installation of `fake-ubuntu-advantage-tools`
2023-03-31 09:12:44 +02:00
Ricardo Pardini b59447c96e apt-install: `install_deb_chroot()`: useful logging, when trying to install invalid stuff 2023-03-31 09:12:44 +02:00
Igor 00f849ac71 [AR-1620 + AR-1639 squashed]:: @igorpec's armbian-config/zsh/bsp/desktop/ubuntu-advantage artifacts 2023-03-31 09:12:44 +02:00
Ricardo Pardini 91b7b35fa3 rootfs-to-image/distro-agnostic: introduce `IMAGE_VERSION`, can be used to override `VERSION` file (`$REVISION`) just for image filename/issue/os-release 2023-03-17 08:32:11 +01:00
Igor Pečovnik b7b8eb7b72
Add / modify (c) in bash scripts (#4922)
* Add / modify (c) in bash scripts

Signed-off-by: Igor <igor@armbian.com>

* Add (c) to the source config files

---------

Signed-off-by: Igor <igor@armbian.com>
2023-03-09 18:30:40 +01:00
Igor Pečovnik e71d8dba10
Clenup minimal and server lists (#4893) 2023-03-02 22:44:47 +01:00
Ricardo Pardini d453c873fd
distro-agnostic.sh: fix: check if chroot (not host!) has `timesyncd.conf` as condition to enable `systemd-timesyncd.service` (#4870) 2023-02-26 09:36:32 +01:00
amazingfate e6915eabc4 add shebang to rootfs-create.sh 2023-02-24 18:59:53 +08:00
amazingfate 3d2cfbc620 use chroot_sdcard_apt_get_install for packages 2023-02-24 18:49:18 +08:00
Ricardo Pardini 2f7423d0e4
shellfmt/.editorconfig: enable trim whitespaces, run shellfmt, no actual code changes (#4849)
- shellfmt: bump to 3.6.0 (run with `bash lib/tools/shellfmt.sh`)
- .editorconfig: rationalize, remove duplicated logic
2023-02-23 09:24:41 +01:00
Igor 27cdc2f7ff
Armbian next CI/pre switch adjustements
- bump version to 23.05
- adjust OCI repositories, changed hash lenght to 12 and removed rootfs- prefix to shorten names (costmetic adjustement)
- build configs were moved to https://github.com/armbian/os
- remove CI that is not going to work anymore. This means also master is out of this CI
- small changed to Readme.txt. Just adding some note, removing obvious
- add propery - supported arhitectures for distribution. Needed for CI optimisation
- remove README.armbian-next.md (need to be somewhere else)
- shrink CODEOWNERS due to messages overload

Signed-off-by: Igor <igor@armbian.com>
2023-02-21 18:51:41 +01:00
Rich 7f11a59c3a
sid: add unstable repo 2023-02-18 07:46:42 -03:00
Kreyren b7d5ea2321
distro-agnostic: `dropbear-initramfs`: make sure directory exists [cherry-pick] 2023-02-18 07:46:37 -03:00
Kreyren ec88aaf149
`bookworm`: has new/separate repos for non-free-firmware (#4801) [cherry-pick]
- "Debian moved the non-free firmware into it's own sub-repository"
2023-02-18 07:46:35 -03:00
Ricardo Pardini 9bffa5e749
armbian-next: artifacts: firmware/rootfs and actual usage of artifacts during image build
- artifacts: introduce `ARTIFACT_IGNORE_CACHE=yes`
- artifacts: introduce `DONT_BUILD_ARTIFACTS`, list of artifacts that if not found cached, fail the build
- kernel_package_source() is no more
- a long dissertation about kernels, families, and the universe
- artifacts: actually use rootfs artifact for image build
- artifacts: detangle via artifact_base_dir
- artifacts: rootfs: use folders in artifact_name; include cache_type
- artifacts: some cleanups / validations
- rootfs artifact; drop old rootfs cli
- artifacts: new CLI shortcuts; remove old firmware CLI
- artifacts: full firmware & usage
- use firmware artifacts in image build and install its debs
- kernel artifact sans legacy; use tmpdir for .deb target for all packages
- legacy artifact versions is no more; pack/unpack now in common obtain;
- artifacts: uboot: cleanup legacy renaming, use artifact version directly
- artifacts: add firmware (small) artifact
- deploy uboot to loop from artifact; allow tty to artifact; todos for cleaning
- fixes, kernel dtb/headers conditional; remove `.git` from Makefile url; use mapfile for finding files to hash
  - completely remove KERNEL_HAS_WORKING_HEADERS_FULL_SOURCE and `kernel_package_callback_linux_headers_full_source()`
  - don't use realpath for artifact_file_relative
  - curb some warnings
  - fix: only install headers & dtbs if such exist
- kernel .config hook modification hash versioning
- OCI_TARGET_BASE vs per-artifact defaults; only deploy to remote from CLI with OTB
- artifact revolver & installing into image
  - add artifact_map_packages and artifact_map_debs dicts
  - revolver accumulates all info
  - REPOSITORY_INSTALL is no more (for uboot/kernel, later others)
  - rename `VER` to `IMAGE_INSTALLED_KERNEL_VERSION`
2023-02-18 07:46:03 -03:00
Ricardo Pardini 9f6ef8deeb
armbian-next: rootfs: fix: too many bash files included in rootfs `B` hash, reduce to only what is used to produce rootfs tarball
- otherwise we get rootfs cache misses when working distro-agnostic and others, which are not part of rootfs code
2023-02-18 07:45:52 -03:00
Ricardo Pardini 5d7924ebe5
armbian-next: rootfs: include hash of rootfs bash code in the `packages_hash`/`rootfs_cache_id`
- don't use dash separator for `B`ash hash in `packages_hash`/`rootfs_cache_id`
2023-02-18 07:45:49 -03:00
Ricardo Pardini bf53bd2988
armbian-next: tmpfs: use `size=99%` for all tmpfs's; (rootfs/WORKDIR/chroot); thanks Igor for suggestion 2023-02-18 07:45:42 -03:00
Igor 00bc1b4a1e
armbian-next: rootfs: introduce `ROOTFS_COMPRESSION_RATIO`, default 5 for general use, default 15 for `rootfs` CLI; fix pv | tar bug; remove GPG signing
- Remove PGP signing from the script as its done in GHA
- Also remove generating .current control file as its obsolete in this design

Co-authored-by: Ricardo Pardini <ricardo@pardini.net>
2023-02-18 07:44:42 -03:00
Ricardo Pardini 1cec42392e
armbian-next: GHA & rootfs adventures, pt 1
- rootfs: create readonly global `rootfs_cache_id` (type+hash+date/version)
- add "oras-upload" CLI command (dumb, no retries, single target/single source)
- docker: mount-bind for & re-pass envs `GITHUB_OUTPUT` and `GITHUB_STEP_SUMMARY` down to Docker
- introduce `github-actions.sh::github_actions_add_output()`
- during logs cleanup, dump the Markdown log into GITHUB_STEP_SUMMARY if it is available
2023-02-18 07:44:41 -03:00
Ricardo Pardini 78dcf01c92
armbian-next: cleanup, kill and add to-do's, remove dead code, turn down logging, squash future shortcircuit bugs
- killed `[[ $ROOTFS_TYPE != ext4 ]] && display_alert "Assuming ${BOARD} ${BRANCH} kernel supports ${ROOTFS_TYPE}" "" "wrn"`
  - which definitely didn't belong in rootfs
- disable usage of run_host_command_logged_long_running for kernel-make
- stop lying about long_running stuff being any different from non-long_running versions
- stop lying about 'set -e' when there's still a bunch of pipes for "pv" and stuff all around
2023-02-18 07:44:33 -03:00
Ricardo Pardini 695bfb387b
armbian-next: `rootfs`: reset UID of produced rootfs tarball; announce what is doing and what has done 2023-02-18 07:44:27 -03:00
Ricardo Pardini 6077d40f9b
armbian-next: `rootfs`: build rootfs from CLI, sans-BOARD, sans-FAMILY, etc -- rootfs are meant to be shared
- require ARCH/RELEASE for rootfs cli
- disallow BOARD/LINUXFAMILY/BOARDFAMILY being set for rootfs cli
- split `prep_conf_main_only_rootfs()` instead of `prep_conf_main_build_single()` for rootfs-only stuff
- run both conf and build without stdin for rootfs CLI (no interactive allowed)
- don't blindly set `ARCH=armhf` for no reason in main-config
- allow skipping family stuff in main-config, via `allow_no_family=yes` (used only in `prep_conf_main_only_rootfs()`)
- kill double loading of userpatches family, not needed/old code
- allow skipping kernel stuff via `skip_kernel=yes` in `config_pre_main()`  (used only in `prep_conf_main_only_rootfs()`)
2023-02-18 07:44:26 -03:00
Ricardo Pardini 091ae1d27f
armbian-next: `rootfs`: adapt to new reality after huge refactor
- make `tmpfs_estimated_size` and `available_physical_memory_mib` readonly and global and only ever set once
- remove subshell from `get_rootfs_cache_list()`, new version `get_rootfs_cache_list_into_array_variable()` for sanity
- warns if `ROOT_FS_CREATE_ONLY=yes` is set during cached build path
- add a `wait_for_disk_sync()` after restoring rootfs cache
- fix logging sections for `build_rootfs_only()` and `prepare_rootfs_build_params_and_trap()` in `build_rootfs_and_image()`
- remove the logging section from `get_or_create_rootfs_cache_chroot_sdcard()` call in `build_rootfs_only()` (which is now itself logged)
- @TODO: `deploy_qemu_binary_to_chroot()` is leaking a qemu bin in rootfs cache!
2023-02-18 07:44:24 -03:00
Ricardo Pardini 28d89e2c91
armbian-next: `rootfs`: new CLI command for rootfs cache building; further refactorings
- _told ya it would all make sense eventually..._
- introduce new, real, non-alias `rootfs` command in `cli-rootfs` -- this _only_ builds rootfs, nothing else
- no more `main_default_build_single()`; instead `full_build_packages_rootfs_and_image()`
- introduce `do_with_default_build()` wrapper, for things that need host prepared + aggregation to run
- CLI-specific parts of `main_default_build_single()` moved to cli-build
- put prepare/cleanup pair of `prepare_rootfs_build_params_and_trap()` and `trap_handler_cleanup_rootfs_and_image()` into new `trap-rootfs.sh` (this needs further splitting for the image part)
- refactor `get_or_create_rootfs_cache_chroot_sdcard()` into `build_rootfs_only()`, `calculate_rootfs_cache_id()`
- update library with new files
2023-02-18 07:44:22 -03:00
Ricardo Pardini 6176dc3702
armbian-next: `rootfs`: split `create-cache` into `rootfs-create`
- bear with me, this will make sense in the end
- a `mount_chroot()` was ejected out of rootfs building code into main, for reuse's sake
2023-02-18 07:44:21 -03:00
Ricardo Pardini 72c61f2f68
armbian-next: replace bare `sync` invocations by introducing `wait_for_disk_sync()`; sync early at start of build
- wait 10s for sync call; otherwise warn user to be patient
- wait_for_sync "reason for sync" everywhere
- add @TODO for /run/user/0 etc and XDG_RUNTIME_DIR in chroot
2023-02-18 07:43:53 -03:00
Ricardo Pardini 2c9582f9ba
armbian-next: add Debian Ports keyring hostdep to strap Debian riscv64 from ports
- rpardini: actually use ports keyring for Debian Risc-V
- `risc-v`: correctly include `debian-ports-archive-keyring` in Risc-V CLI packages
  - include in debootstrap list, via `config/optional/architectures/riscv64/_config/cli/_all_distributions/main/packages`
  - can't have two `--include` in debootstrap call
- riscv64: move `debian-ports-archive-keyring` from main to debootstrap; also only for `sid`
2023-02-18 07:43:49 -03:00
Ricardo Pardini a3d8b5891b
armbian-next: aggregation.py vs create-cache.sh: better hashing, much desktop
- aggregation.py:
  - only include non-removed pkgs in hash (do'h)
  - use a sorted unique of desktop+rootfs+debootstrap pkgs for pkg hash
  - make space for having apt sources/gpg keys in hash @TODO
  - write a hash-text variable for bash with info, for easy comparison later
  - refactor out bash_string_multiline()
- create-cache.sh:
  - don't armhf unless `ARMHF_ARCH=yes`
  - remove the uninstall stuff until we decide @TODO
  - don't show "free space of MOUNT" when there's only SDCARD
  - better logging for resolv.conf/machine-id shenanigans does in rootfs cache
  - drop dead code, squash some quoting issues
  - show the size of the zstd ball after compressing
  - don't even go to github armbian/cache nor cache.armbian.com for list of caches if SKIP_ARMBIAN_REPO=yes
  - remove mentions of BOARD or BRANCH, not relevant in rootfs cache
2023-02-18 07:43:36 -03:00
Ricardo Pardini a6a5152695
armbian-next: `chroot_sdcard_apt_get_update()` to replace and better log `chroot_sdcard_apt_get update`
- also add retries where it was missing
- @TODO: desktop_postinstall() is a mess, needs aggregation work
2023-02-18 07:43:19 -03:00
Ricardo Pardini 6cf26e4c59
armbian-next: don't warn about using extlinux 2023-02-18 07:42:49 -03:00
Ricardo Pardini 4d17aa2a98
armbian-next: `rootfs`: bunch'o'fixes, introduce `disable_systemd_service_sdcard()` to stop repeating incantantion
- fix a bunch of quoting issues
- use runners for chroot stuff
- don't error out of failed disable
- makes building `sid` again possible
- add a bunch of TODO's
2023-02-18 07:42:48 -03:00
Ricardo Pardini 350cf62ee0
armbian-next: don't copy the host's `keyrings` to image
- why did we do this?
- there could be _anything_ in the host keyring, and it's not needed
2023-02-18 07:42:43 -03:00
Ricardo Pardini 8944c56255
armbian-oleg: drastically curb `boot_logo()` logging 2023-02-18 07:42:27 -03:00
Ricardo Pardini 47af820f5d
armbian-oleg: `junk`: drastically reduce host-side dependencies / "remove junk"
- remove a lot of hopefully / hardly confirmed, unused dependencies
- don't use crossbuild-essential-xxx; avoid the c++ compiler that comes with it, install gcc-only instead
- hostdeps: use `libc6-dev make dpkg-dev gcc` (without `g++`) instead of `build-essential`
- drop `btrfs-progs` and `f2fs-tools`  (@TODO add in extension when/whereused)
- more: drop `cryptsetup` (@TODO add in extension when/whereused)
- don't be too quiet when doing apt-update for hostdeps
2023-02-18 07:42:14 -03:00
Ricardo Pardini 93c8ce99af
armbian-next: `apt-cacher-ng` is now optional and activated via `MANAGE_ACNG=yes`; drop `NO_APT_CACHER`
- acng is constant source of headaches
- we don't need it anymore, since we have local caching now
- You can also have acng running on a different machine/container and set `APT_PROXY_ADDR=xxx:3142` if you're running a build farm
2023-02-18 07:42:12 -03:00
Ricardo Pardini c61b985417
armbian-next: better logging in `distro-agnostic.sh`
- still _a lot_ to fix
2023-02-18 07:41:23 -03:00