Commit Graph
51 Commits
Author SHA1 Message Date
sonicaj 71557b080f Ensure consistent home directory handling in reference file comparisons (#868)
Always use '/var/empty' when comparing reference files to match TrueNAS SCALE's
standard home directory for system users, preventing false cache invalidation
due to Debian's '/nonexistent' default.
2025-06-04 14:24:38 -04:00
sonicaj 85f8a44a62 NAS-132571 / 25.04 / Internal apt mirror support (#761)
* Reflect the debian manifest we want

* Update json schema to reflect new base-url entries

* Have a util in place to retrieve apt mirrors

* Have repo url in repos hash

* Cover various usages of apt-repos
2024-11-17 17:52:13 +05:00
Caleb St. John d8b7cacbf1 Revert "NAS-132446 / 25.04 / Initial add of option to use internal APT repo for builds (#754)" (#759) 2024-11-15 15:33:40 -05:00
Kris Moore 5f95982024 NAS-132446 / 25.04 / Initial add of option to use internal APT repo for builds (#754)
* Initial add of option to use internal APT repo for builds

* Pet flake8

* Wrap a long f-string

* Use f-string in right place

* Fix usage of single / double quotes

* Move to apt_get_base_url as a function

* Undo dyslexia

* Log which base url we are using in bootstrap for debugging

* Add missing location to use the base url in bootstrap

* Use base url when bootstrapping the ISO as well

* Add APT_BASE_CUSTOM as another override option if the builder
wants to pull from some location other than the two in our manifest
2024-11-14 10:18:27 -05:00
Waqar Ahmed fb413af822 Fix incrementals
A stop gap solution has been implemented for now to fix incrementals not working.
2024-01-17 19:15:26 +05:00
Waqar Ahmed 415709a9da Refactor diff logging statement 2024-01-08 17:41:14 +04:00
Waqar Ahmed 4be4cb03a9 Add a debug statement to know if cached squashfs needs to be re-created 2024-01-05 04:38:38 +04:00
Waqar Ahmed 127a73b3f4 Remove duplicate checks 2023-12-29 23:56:34 +05:00
Waqar Ahmed 7d4f2150d4 Remove temporary restored cached directory 2023-12-27 19:49:53 +05:00
Waqar Ahmed 496fbeebd9 Add logic to mark cache as not intact if group/passwd files have been changed and cached bootstrapdir has old references 2023-12-26 00:37:30 +05:00
themylogin a3066030b2 Only remove packages if packages_in_bootstrapdir.json changes during the package bootstrapdir setup 2023-07-12 15:02:43 +02:00
themylogin 59063b4d55 Do not use same packages_in_bootstrapdir.json for different bootstrap dirs 2023-07-12 14:58:10 +02:00
themylogin 0de14d4902 Remove build tools from rootfs 2023-07-11 17:05:57 +02:00
Waqar Ahmed c2bfb0ae59 Enforce specified reference fiels when building chroot base directory 2022-08-21 22:40:03 +05:00
Waqar Ahmed bdff64b5de Add base method for debootstrapping debian 2022-08-21 22:18:13 +05:00
Waqar Ahmed 582f870380 Upgrade debian packages pulled in by debootstrap
This commit fixes an issue where we ensure that the packages in the bootstrapped dir are actually what we want wrt apt preferences defined.
2022-04-28 02:58:24 +05:00
Waqar Ahmed dbbf4f5f82 Add apt mirrors before fetching packages
This commit fixes an issue where we were not adding our custom apt mirrors before installing some basic packages like build-essential etc. Problem was that these packages pull in packages like openssl which we want to pull from specific apt mirror based on our apt preferences rather then using whatever is being provided with the default apt mirrors from debootstrap.
2022-03-21 04:24:12 +05:00
Waqar Ahmed 8009a9049f Only try to add mirror key if present 2022-02-17 14:59:07 +05:00
Waqar Ahmed 01f1d6115d Do not explicitly add debian-security when bootstrapping basedir 2022-02-17 13:28:59 +05:00
Waqar Ahmed 2c67d9f208 Add debian-security to base-chroot sources 2021-08-28 02:50:03 +05:00
Waqar Ahmed 7867bff782 Update update image creation target to utilise new logging method 2021-05-09 23:27:38 +05:00
Waqar Ahmed dbca2bea90 Update package creation target to utilise new logging method 2021-05-09 23:27:38 +05:00
Waqar Ahmed 77033c3cb8 Add logger context for checkout target 2021-05-09 23:27:38 +05:00
Waqar Ahmed 6bced450de Do not setup with bootstrapdir with context manager 2021-05-09 23:27:38 +05:00
Waqar Ahmed e71f8ad1fc Decode subprocess output by default 2021-05-09 23:27:38 +05:00
Waqar Ahmed 82e6347099 Only delete directories if they exist 2021-05-09 23:27:38 +05:00
Waqar Ahmed 01cde74807 Have debian_release in manifest 2021-05-09 23:27:38 +05:00
Waqar Ahmed ec1b544acc Set loglevel of urllib3 to info 2021-05-09 23:27:38 +05:00
Waqar Ahmed 72517b7283 Do not execute each command with shell for chroot - only those which require it 2021-05-09 23:27:38 +05:00
Waqar Ahmed 0c2aeccbec Build grub with a delay to prioritise other packages 2021-05-09 23:27:38 +05:00
Waqar Ahmed 4a8b3d823e Remove old implementation of making bootstrap dir 2021-05-09 23:27:38 +05:00
Waqar Ahmed e3da709e98 Use bootstrapdir class to manage bootstrap dirs 2021-05-09 23:27:38 +05:00
Waqar Ahmed 4afcf315ac Add ability to sign manifest 2021-05-09 23:27:38 +05:00
Waqar Ahmed d3e2921458 Properly setup apt 2021-05-09 23:27:38 +05:00
Waqar Ahmed 8bc344425a Have apt preferences in manifest 2021-05-09 23:27:38 +05:00
Waqar Ahmed 8bf167c4d7 Refactor paths file name 2021-05-09 23:27:38 +05:00
Waqar Ahmed 9845a32816 Add ability to create iso file 2021-05-09 23:27:38 +05:00
Waqar Ahmed 2e32f2cbb7 Add ability to create update image 2021-05-09 23:27:38 +05:00
Waqar Ahmed f7a289564e Add apt cacher proxy settings temporarily for chroot 2021-05-09 23:27:38 +05:00
Waqar Ahmed 1934facc2b Do not propogate file based logger to stderr 2021-05-09 23:27:38 +05:00
Waqar Ahmed 8f3aa93512 Have package sources using bind mount 2021-05-09 23:27:38 +05:00
Waqar Ahmed a9946c2f2f Update apt sources before running update 2021-05-09 23:27:38 +05:00
Waqar Ahmed 4cd4eb9ea8 Properly remove bootstrap dir once the process is complete 2021-05-09 23:27:38 +05:00
Waqar Ahmed 6d1e849ef9 Fix circular import 2021-05-09 23:27:38 +05:00
Waqar Ahmed 1cf00c4149 Restore basechroot for each package 2021-05-09 23:27:38 +05:00
Waqar Ahmed bb269e86e5 Add methods to cleanup bootstrapdir/overlayfs 2021-05-09 23:27:38 +05:00
Waqar Ahmed aa7bde68f7 Disable requests module logging 2021-05-09 23:27:38 +05:00
Waqar Ahmed cf7bd60efc Do not output requests logs to console 2021-05-09 23:27:38 +05:00
Waqar Ahmed 288efdd021 Allow specifying packages argument to scale_build 2021-05-09 23:27:38 +05:00
Waqar Ahmed f38dcf7f6a Add logic to remove/restore basechroot cache 2021-05-09 23:27:38 +05:00