Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 907192 - Catalyst fails to build stage1
Summary: Catalyst fails to build stage1
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Catalyst Developers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-26 00:41 UTC by sancoder
Modified: 2023-10-12 08:10 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sancoder 2023-05-26 00:41:36 UTC
To build stage1 one should run a command catalyst -f stage1.spec
If the spec file does not contain portage_confdir option (as build servers apparently do) the build of stage1 fails with the following log
[code]
emerge --quiet --usepkg --buildpkg --binpkg-respect-use=y --newuse --oneshot app-admin/eselect app-arch/bzip2 app-arch/gzip app-arch/xz-utils app-arch/tar app-shells/bash:0 net-misc/rsync net-misc/wget sys-devel/autoconf sys-devel/automake sys-devel/libtool sys-apps/baselayout sys-apps/makedev sys-apps/coreutils sys-apps/diffutils sys-apps/file sys-apps/findutils sys-apps/gawk sys-apps/grep sys-apps/less sys-apps/net-tools sys-apps/portage sys-apps/sed sys-apps/shadow sys-devel/binutils sys-devel/bison sys-devel/flex sys-devel/gcc sys-devel/gettext sys-devel/gnuconfig sys-devel/make sys-devel/patch virtual/editor virtual/libc virtual/os-headers virtual/pkgconfig sys-apps/systemd

!!! The ebuild selected to satisfy "app-alternatives/awk" for /tmp/stage1root/ has unmet requirements.
- app-alternatives/awk-4::gentoo USE="-busybox -gawk -mawk -nawk (-split-usr)" ABI_X86="(64)"

  The following REQUIRED_USE flag constraints are unsatisfied:
    exactly-one-of ( gawk busybox mawk nawk )

(dependency required by "sys-libs/glibc-2.36-r8::gentoo[-compile-locales]" [ebuild])
(dependency required by "virtual/libc-1-r1::gentoo" [ebuild])
(dependency required by "virtual/libc" [argument]) 
[/code]

To workaround the bug it is necessary to place a file named (for example) alternatives into the folder <stage1_chroot_base>/etc/portage/profile/package.use.force
The contents of the file is the following
[code]
# need this here because of stage1
app-alternatives/awk gawk
app-alternatives/bc gnu
app-alternatives/bzip2 reference
app-alternatives/cpio gnu
app-alternatives/gzip reference
app-alternatives/lex flex
app-alternatives/sh bash
app-alternatives/tar gnu
app-alternatives/yacc bison
[/code]

Where <stage1_chroot_base> is something like /var/tmp/catalyst/tmp/default/stage1-amd64-...

The file itself is available inside releng repo at
https gitweb.gentoo.org/proj/releng.git/tree/releases/portage/stages/profile/package.use.force/releng/alternatives (not allowed to submit URLs)
(and this is also the reason why build servers succeed building stage distro files).

Nearby it is another file named musl, likely needed for musl profiles.
Comment 1 Matt Turner gentoo-dev 2023-05-26 16:20:02 UTC
Yes, it is necessary to specify some things via portage_confdir. That's working as intended and isn't something that can really be handled in catalyst.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-10-12 08:10:54 UTC
(In reply to Matt Turner from comment #1)
> Yes, it is necessary to specify some things via portage_confdir. That's
> working as intended and isn't something that can really be handled in
> catalyst.

Given this came up on mastodon earlier: to be clear, what you should do is borrow the configs from releng.git.