aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add some markers in the code for myselfdilfridge-containersAndreas K. Hüttel2021-12-252-1/+19
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* containers: Start with a mock config what we targetAndreas K. Hüttel2021-12-241-0/+42
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* catalyst: generate .sha256 file if any digest is enabledGeorgy Yakovlev2021-11-242-3/+7
| | | | | | | | | | | | | | | | | | checksum format is simple one, identical to one sha256sum from coreutils produces, lines starting with # are ignored. example:[1] # SHA256 HASH xxxx..... stage3-....tar.xz systemd upstream calls it suse-style .sha256 files.[0] infra already supports inline signing of files. Bug: https://bugs.gentoo.org/821568 [0] https://github.com/systemd/systemd/blob/aedec452b9e5dd197881f2164fb205dfe8bfdcec/src/import/pull-common.c#L236 [1] https://mirrors.edge.kernel.org/opensuse/distribution/leap/15.0/iso/openSUSE-Leap-15.0-DVD-x86_64.iso.sha256 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
* arch: Add armv6j hardfloat musl subarchAndreas K. Hüttel2021-11-201-0/+4
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* arch: Add as experiment a first musl subarch (armv7a-hf)Andreas K. Hüttel2021-11-171-0/+4
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* etc: Add some possible settings to catalystrcMatt Turner2021-09-111-1/+3
| | | | Signed-off-by: Matt Turner <mattst88@gentoo.org>
* arm64 definition: add a subarch "aarch64" identical to "arm64"Andreas K. Hüttel2021-09-111-0/+3
| | | | | | | When CHOST is given in the spec file, the subarch is extracted from the triplet. Unfortunately that uses aarch64 instead of our arm64 ... Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* catalyst: Remove boot/kernel/*/kernelopts supportMatt Turner2021-07-282-18/+1
| | | | | | | This undocumented option was only wired up for hppa, and was used by the minimal livecd to set panic=30. Signed-off-by: Matt Turner <mattst88@gentoo.org>
* targets: Remove dead custom_kopts variableMatt Turner2021-07-281-2/+1
| | | | | | | | It looks like this has been dead since 2005. Closes: https://bugs.gentoo.org/804591 Fixes: 1fcca247 ("Removed these as they are moved to the appropriate target directories") Signed-off-by: Matt Turner <mattst88@gentoo.org>
* targets: Use app-cdr/cdrtools instead of virtualGeorgy Yakovlev2021-07-281-2/+2
| | | | | | | | virtual no longer exists as of gentoo.git commit 45233a05d40 ("virtual/cdrtools: Remove"). Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> Signed-off-by: Matt Turner <mattst88@gentoo.org>
* targets: Add arm64 livecd supportGeorgy Yakovlev2021-07-282-3/+6
| | | | | | Closes: https://bugs.gentoo.org/785769 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> Signed-off-by: Matt Turner <mattst88@gentoo.org>
* targets: Remove some ISOLINUX leftoversMatt Turner2021-07-283-8/+3
| | | | | | | We don't use ISOLINUX since the commit listed below. Fixes: 0a27a7a3 ("targets: Use GRUB for BIOS boot") Signed-off-by: Matt Turner <mattst88@gentoo.org>
* targets: Pass gk_callback_opts as a string instead of arrayNic Boet2021-07-181-1/+2
| | | | | | Fixes: e5855bef ("targets: Use arrays rather than string concatenation") Signed-off-by: Nic Boet <nic@boet.cc> Signed-off-by: Matt Turner <mattst88@gentoo.org>
* Remove ancient TODO fileMatt Turner2021-06-112-78/+0
| | | | | | | | The last meaningful changes to it were in 2009. I don't think it contains anything of value, and it's not an accurate reflection of the state of today. Signed-off-by: Matt Turner <mattst88@gentoo.org>
* catalyst: Replace snakeoil's locks with fastenersMatt Turner2021-06-094-69/+7
| | | | | | | | | | | | | To no great surprise, the existing locking was broken. For example, clear_chroot() releases the lock. It is called by unpack(), which is part of prepare_sequence. The result is that the whole build could be done without holding the lock. Just lock around run(). It's not apparent that finer-grained locking does anything for us. Bug: https://bugs.gentoo.org/791583 Signed-off-by: Matt Turner <mattst88@gentoo.org>
* catalyst: Remove clear_dir's never used clear_nondir parameterMatt Turner2021-06-081-8/+3
| | | | Signed-off-by: Matt Turner <mattst88@gentoo.org>
* catalyst: Remove @staticmethod from generate_hash()Matt Turner2021-03-241-2/+1
| | | | | Fixes: 48338534 ("Add option to generate BSD-style tagged hashes ...") Signed-off-by: Matt Turner <mattst88@gentoo.org>
* catalyst: Fix indentationMatt Turner2021-03-241-2/+2
| | | | | Fixes: 48338534 ("Add option to generate BSD-style tagged hashes ...") Signed-off-by: Matt Turner <mattst88@gentoo.org>
* catalyst: Remove tabsMatt Turner2021-03-091-4/+4
| | | | | Fixes: 48338534 ("Add option to generate BSD-style tagged hashes ...") Signed-off-by: Matt Turner <mattst88@gentoo.org>
* catalyst: Handle specifying target_profiles in repo_name:path formatDaniel Cordero2021-03-061-2/+7
| | | | | | Fixes: a5004005 ("catalyst: Call config_profile_link for all targets") Signed-off-by: Daniel Cordero <catalyst@0xdc.io> Signed-off-by: Matt Turner <mattst88@gentoo.org>
* Add option to generate BSD-style tagged hashes (can be verified by modern ↵Andreas K. Hüttel2021-02-242-1/+7
| | | | | | coreutils) Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* targets: Use the correct distcc libdirDaniel Cordero2021-02-201-9/+7
| | | | | | | | Since distcc-3.3 (and bug 651030) distcc symlinks have been installed to /usr/lib/distcc/bin/ regardless of get_libdir. Signed-off-by: Daniel Cordero <catalyst@0xdc.io> Signed-off-by: Matt Turner <mattst88@gentoo.org>
* catalyst: Remove /etc/machine-id in all stagesDaniel Cordero2021-02-201-0/+1
| | | | | | | | | Machine IDs are unique per installation, but if they are retained in a stage tarball, all installations from that stage share the same machine id. Signed-off-by: Daniel Cordero <catalyst@0xdc.io> Signed-off-by: Matt Turner <mattst88@gentoo.org>
* catalyst: Clean up chroot directory on successDaniel Cordero2021-02-202-2/+2
| | | | | | | | | The embedded and livecd-stage2 targets override the action sequence without calling set_completion_action_sequences. This would leave the temporary build environment unpacked on the filesystem. Signed-off-by: Daniel Cordero <catalyst@0xdc.io> Signed-off-by: Matt Turner <mattst88@gentoo.org>
* Enable recursive globbing for clear_pathFelix Bier2021-02-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit enables recursive globbing in clear_path, allowing the usage of '**' to match an arbitrary number of sub-directories. Before this commit, clear_path used only non-recursive globbing. This allowed to use '*' to expand names within one directory, e.g. '/a/*/c' can expand to '/a/b/c', but not '/a/b/b/c'. With this commit, '/a/**/c' can be used to expand to '/a/b/c', '/a/b/b/c', '/a/b/b/b/c' etc. This is motivated by wanting to recursively delete all occurences of a filename with the 'stage4/rm' entry of a spec file. The '/rm' entries are processed with 'clear_path' in the existing code. Additionally, 'glob.glob' is replaced with 'glob.iglob', which returns the same files as 'glob.glob', but as an iterator instead of as a list (so it no longer necessary to hold all matches in memory at once). Recursive globbing has been added in Python 3.5. References: https://docs.python.org/3/library/glob.html#glob.glob https://docs.python.org/3/library/glob.html#glob.iglob Signed-off-by: Felix Bier <felix.bier@rohde-schwarz.com> Signed-off-by: Matt Turner <mattst88@gentoo.org>
* Drop PORTDIR from make.confFelix Bier2021-02-201-6/+0
| | | | | | | | | | | | | | This commit drops PORTDIR from being included in the generated make.conf. The variable is no longer needed, since the existing code will now generate a repos.conf entry for the main repo when needed (i.e. when the location is non-default, which is the same condition that was applied for PORTDIR in the code removed by this commit). The PORTDIR variable is considered deprecated in favor of repos.conf entries (reference: https://wiki.gentoo.org/wiki/PORTDIR). Signed-off-by: Felix Bier <felix.bier@rohde-schwarz.com> Signed-off-by: Matt Turner <mattst88@gentoo.org>
* Unify handling of main repo and other reposFelix Bier2021-02-202-33/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | This commit unifies the handling of the main repo and the other repos. All are stored in one common list. A mount entry is created for each entry in the list (previously a mount entry was only created for the main repo and the other repos were copied into the chroot). This means each non-main repo can now be either a directory or a squash files (previously the non-main repos had to be directories). The existing mount logic will bind-mount the repos that are stored as directories, removing the need for copying. A repos.conf entry will be created for each entry in the list. This means a repos.conf entry for the main repo can now be created (previously repos.conf entries were only created for the non-main repos). The repos.conf entry will only be created if the target location for the main repo is non-default, i.e. unequal to /var/db/repos/gentoo. This mirrors the behavior of write_make_conf, which only writes the PORTDIR variable to make.conf if the location of the main repo is non-default. As a side effect, the PORTDIR variable is now no longer needed, and will be removed from write_make_conf in a separate commit. Signed-off-by: Felix Bier <felix.bier@rohde-schwarz.com> Signed-off-by: Matt Turner <mattst88@gentoo.org>
* Extend get_repo_name to handle squashed reposFelix Bier2021-02-201-1/+35
| | | | | | | | | | | | | | | | This commit extends the method get_repo_name to also handle squashed repos. This is done by mounting the squash file to a temporary directory and then extracting the repository from that directory with the already existing code. This is motivated by wanting to mount each repo to e.g. /var/db/repos/<repo-name> in a later commit. For squashed repos, we don't know <repo-name> without mounting the repo first. For this reason, it is mounted to a temporary directory first to extract <repo-name>. Signed-off-by: Felix Bier <felix.bier@rohde-schwarz.com> Signed-off-by: Matt Turner <mattst88@gentoo.org>
* Rename config option 'portage_overlay' -> 'repos'Felix Bier2021-02-1913-38/+38
| | | | | | | | | | | | | | | | | | | | | This commit renames the config option 'portage_overlay' to 'repos'. Also, it renames the method 'portage_overlay' to 'process_repos' and 'set_portage_overlay' to 'set_repos'. Motivation: 1) The Gentoo wiki states 'repository' as the preferred term, and 'overlay' only as a colloquial (https://wiki.gentoo.org/wiki/Ebuild_repository), reducing the distinction between the main repository and other 'overlay' repositories. 3) This avoids confusion with filesystem overlays (via the config option 'overlay' and 'root_overlay'). 2) The plural form highlights the possibility of specifying multiple repositories, continuing 2861038a. Signed-off-by: Felix Bier <felix.bier@rohde-schwarz.com> Signed-off-by: Matt Turner <mattst88@gentoo.org>
* Rename config option 'repos' -> 'repos_storedir'Felix Bier2021-02-193-5/+5
| | | | | | | | This commit renames the config option 'repos' to 'repos_storedir'. This is done as preparation for renaming 'portage_overlay' to 'repos'. Signed-off-by: Felix Bier <felix.bier@rohde-schwarz.com> Signed-off-by: Matt Turner <mattst88@gentoo.org>
* catalyst: Clean up exception handlingpending/mattst88Matt Turner2021-01-276-100/+57
| | | | | | | Use 'raise from' where sensible, but a lot of the CatalystErrors are just trading one CatalystError for another, so remove them. Signed-off-by: Matt Turner <mattst88@gentoo.org>
* catalyst: Remove fallback make.conf parsing codeMatt Turner2021-01-271-39/+3
| | | | Signed-off-by: Matt Turner <mattst88@gentoo.org>
* catalyst: Use lazy % formatting in logging functionsMatt Turner2021-01-271-3/+3
| | | | Signed-off-by: Matt Turner <mattst88@gentoo.org>
* catalyst: Remove unused importMatt Turner2021-01-271-1/+1
| | | | Signed-off-by: Matt Turner <mattst88@gentoo.org>
* catalyst: Fix copy-and-paste mistakeMatt Turner2021-01-271-1/+1
| | | | | Fixes: 87b0588a ("catalyst: Add option to enter the chroot before building") Signed-off-by: Matt Turner <mattst88@gentoo.org>
* catalyst: Add option to enter the chroot before buildingMatt Turner2021-01-233-1/+22
| | | | | | | | With --enter-chroot, after the mounts and environment are set up, catalyst will drop you into a shell inside the chroot. Useful for hacking or debugging. Signed-off-by: Matt Turner <mattst88@gentoo.org>
* catalyst: Deduplicate the common build_sequence stepsMatt Turner2021-01-236-20/+6
| | | | | | | This also provides a single location to add a function to all targets' build_sequence. Signed-off-by: Matt Turner <mattst88@gentoo.org>
* catalyst: Deduplicate prepare_sequence assignmentsMatt Turner2021-01-236-37/+6
| | | | Signed-off-by: Matt Turner <mattst88@gentoo.org>
* catalyst: Call config_profile_link for all targetsMatt Turner2021-01-232-4/+2
| | | | | | | | | | | | | | | | | | | | | | | This reverts the following two commits, which have no documented rationale. Revert "Set the profile by calling eselect." This reverts commit 90c03f9dc255ba89849e46490f9ead7ab3921950. Revert "Drop config_profile_link from the action_sequence for the generic stage." This reverts commit 3bd10159bf7cfe14b6d8a8218b94eca73be4c997. Doing so improves the code in two ways: 1) it makes prepare_sequence identical across all targets, which will allow deduplicating some code 2) it no longer calls eselect profile each time chroot-functions.sh is sourced (even for those targets that were still calling config_profile_link) Signed-off-by: Matt Turner <mattst88@gentoo.org>
* catalyst: Store references to functionsMatt Turner2021-01-237-124/+125
| | | | | | | ... rather than their names. This makes it possible for tooling to understand the code structure better. Signed-off-by: Matt Turner <mattst88@gentoo.org>
* targets: Update the @changed-subslot set by defaultMatt Turner2021-01-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In portage commit 1789fdf2ee81 (Add @changed-subslot package set) I added this: the set of upgradable packages for which the highest visible version has a different subslot than the currently installed version. Updating the entire stage is expensive and unnecessary (since we're going to build the latest packages in stage1 and then rebuild everything in stage3). What we definitely do need to update in the original stage3 however, is any package that would trigger a subslot rebuild. For example: gcc links with libmpfr.so from dev-libs/mpfr. mpfr's SONAME changes from libmpfr.so.4 (SLOT="0/4") to libmpfr.so.6 (SLOT="0/6"). If the seed stage's dev-libs/mpfr is not updated before emerging gcc, gcc will link with libmpfr.so.4, but the latest version of dev-libs/mpfr will be built and libmpfr.so.6 included into the stage1. Since the old libmpfr.so.4 is not included in the stage1, gcc will not work, breaking subsequent stage builds. Our current options to update the seed are too large a hammer (e.g., "--update --deep --newuse @world" or "--update --deep --newuse --complete-graph --rebuild-if-new-ver gcc") and spend too much time updating seed stages for no gain beyond updating only packages for whom the subslot has changed. Bug: https://bugs.gentoo.org/739004 Signed-off-by: Matt Turner <mattst88@gentoo.org>
* targets: Update BINPKG_COMPRESS to new zstd defaultMatt Turner2021-01-231-0/+3
| | | | | | | | | | In portage commit 230595cf600c (Default BINPKG_COMPRESSION to zstd (bug 715108)) the default BINPKG_COMPRESSION setting was changed to zstd. But to retain compatibility with binpkg consumers, the default is unchanged for existing installations, so we need to update our BINPKG_COMPRESSION. Bug: https://bugs.gentoo.org/715108 Signed-off-by: Matt Turner <mattst88@gentoo.org>
* targets: Remove some obvious commentsMatt Turner2021-01-173-6/+0
| | | | Signed-off-by: Matt Turner <mattst88@gentoo.org>
* targets: Remove unused 'enter' commandMatt Turner2021-01-175-18/+0
| | | | | | | Doesn't appear to have ever been wired up. I'm going to add something like what I think this was, but without the duplication. Signed-off-by: Matt Turner <mattst88@gentoo.org>
* targets: Emerge stage1 with --implicit-system-deps=nMatt Turner2020-12-191-1/+1
| | | | | | | Since we're emerging into a separate ROOT, we can use --implicit-system-deps=n to gain some additional parallelism. Signed-off-by: Matt Turner <mattst88@gentoo.org>
* targets: Remove make_destpath() functionMatt Turner2020-12-196-44/+23
| | | | | | | | It just read clst_root_path, exported it as ROOT, and ensured that a directory existed at $ROOT. Setting and resetting clst_* variables adds a lot of confusion, so just use ROOT directly. Signed-off-by: Matt Turner <mattst88@gentoo.org>
* targets: Pass separate arguments to run_merge()Matt Turner2020-12-182-5/+5
| | | | Signed-off-by: Matt Turner <mattst88@gentoo.org>
* targets: Remove EBEEP_IGNORE / EPAUSE_IGNOREMatt Turner2020-12-181-2/+0
| | | | Signed-off-by: Matt Turner <mattst88@gentoo.org>
* catalyst: Remove some redundant set_stage_path()sMatt Turner2020-12-182-10/+0
| | | | | | | We only need to override root_path, and stage_path will be configured properly. Signed-off-by: Matt Turner <mattst88@gentoo.org>
* catalyst: Remove set_dest_path()Matt Turner2020-12-182-16/+8
| | | | | | | root_path is always set, so half of this function was dead. The other half set the same thing as set_stage_path(). Signed-off-by: Matt Turner <mattst88@gentoo.org>