Since a few days ago (November 8, 2019) Gentoo Prefix has stopped bootstrapping. It stops cause sys-kernel/linux-headers-5.3-r1 fails to install with the error: 2019-11-09T13:55:32.6367552Z INSTALL /tmp/gentoo/var/tmp/portage/sys-kernel/linux-headers-5.3-r1/image/tmp/gentoo//usr/include/../include 2019-11-09T13:55:32.6395868Z /tmp/gentoo/tmp/bin/bash: rsync: command not found 2019-11-09T13:55:32.6403458Z Makefile:1201: recipe for target 'headers_install' failed 2019-11-09T13:55:32.6403821Z make: *** [headers_install] Error 127 2019-11-09T13:55:32.6433633Z * ERROR: sys-kernel/linux-headers-5.3-r1::gentoo failed (install phase): 2019-11-09T13:55:32.6452422Z * emake failed 2019-11-09T13:55:32.6477055Z * 2019-11-09T13:55:32.6505249Z * If you need support, post the output of `emerge --info '=sys-kernel/linux-headers-5.3-r1::gentoo'`, 2019-11-09T13:55:32.6596031Z * the complete build log and the output of `emerge -pqv '=sys-kernel/linux-headers-5.3-r1::gentoo'`. 2019-11-09T13:55:32.6608323Z * The complete build log is located at '/tmp/gentoo/var/tmp/portage/sys-kernel/linux-headers-5.3-r1/temp/build.log'. 2019-11-09T13:55:32.6635503Z * The ebuild environment file is located at '/tmp/gentoo/var/tmp/portage/sys-kernel/linux-headers-5.3-r1/temp/environment'. 2019-11-09T13:55:32.6666800Z * Working directory: '/tmp/gentoo/var/tmp/portage/sys-kernel/linux-headers-5.3-r1/work/linux-5.3' 2019-11-09T13:55:32.6689146Z * S: '/tmp/gentoo/var/tmp/portage/sys-kernel/linux-headers-5.3-r1/work/linux-5.3' 2019-11-09T13:55:32.9145726Z 2019-11-09T13:55:32.9147155Z >>> Failed to emerge sys-kernel/linux-headers-5.3-r1, Log file: 2019-11-09T13:55:32.9147509Z 2019-11-09T13:55:32.9148045Z >>> '/tmp/gentoo/var/tmp/portage/sys-kernel/linux-headers-5.3-r1/temp/build.log' 2019-11-09T13:55:32.9175624Z * Messages for package sys-kernel/linux-headers-5.3-r1: 2019-11-09T13:55:32.9176149Z * chown failure ignored with unprivileged user: 2019-11-09T13:55:32.9177202Z * chown -R 0:0 5.3 linux-5.3 2019-11-09T13:55:32.9178450Z * /bin/chown: changing ownership of '5.3/00_all_0003-convert-PAGE_SIZE-usage.patch': Operation not permitted 2019-11-09T13:55:32.9179524Z * /bin/chown: changing ownership of '5.3/00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch': Operation not permitted 2019-11-09T13:55:32.9180426Z * /bin/chown: changing ownership of '5.3/00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch': Operation not permitted 2019-11-09T13:55:32.9181062Z * /bin/chown: changing ownership of '5.3/00_all_0005-unifdef-drop-unused-errno.h-include.patch': Operation not permitted You can access the full log at the continuous integration build log: https://dev.azure.com/12719821/e566c963-8f77-4f01-b7bc-ae2d91b1334f/_apis/build/builds/669/logs/18 I think the actual error is: /tmp/gentoo/tmp/bin/bash: rsync: command not found Not the failed chown's because I see the same error/warning previously on sys-devel/gcc-9.2.0-r2 and the bootstrap kept going. But I may be wrong.
@Toolchain Team, do you have any idea why linux-headers calls rsync as a build dependency?
rsync is used as-is to install many headers files: https://github.com/torvalds/linux/blob/af42d3466bdc8f39806b26f593604fdc54140bcb/Makefile#L1181 Was added in linux-headers-5.3: https://github.com/torvalds/linux/commit/59b2bd05f5f4dc62979c2e82ddd384f07e8f10bc
Thank you Sergei. During Prefix bootstrap, no rsync is available when installing linux-headers. We have 2 solutions: 1. install a net-misc/rsync to stage 2. 2. write a fake rsync in bash to do the header files copy.
Benda Xu, are we going to try to patch this? For solution 1, in my continuous integration build, I did... Replace from line 1868 of bootstrap-prefix.sh: pkgs=( sys-apps/baselayout sys-apps/gentoo-functions app-portage/elt-patches sys-kernel/linux-headers sys-libs/glibc ) To: # Hack to fix build temporarily until https://bugs.gentoo.org/699718 is fixed sed -i '74i\ \ \ \ \ \ \ \ rm "${ED%/}"/etc/init.d/rsyncd' $EPREFIX/var/db/repos/gentoo/net-misc/rsync/rsync-3.1.3.ebuild cd $EPREFIX/var/db/repos/gentoo/net-misc/rsync ebuild $EPREFIX/var/db/repos/gentoo/net-misc/rsync/rsync-3.1.3.ebuild manifest pkgs=( sys-apps/baselayout sys-apps/gentoo-functions app-portage/elt-patches dev-util/pkgconfig net-misc/rsync sys-kernel/linux-headers sys-libs/glibc ) Which first patches the rsync ebuild as otherwise it doesn't emerge and then emerges dev-util/pkgconfig (dependency) and net-misc/rsync. From there, the bootstrapping completes. I hope it's helpful.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=02451cdd8614f1072096608c49ae7796a6363819 commit 02451cdd8614f1072096608c49ae7796a6363819 Author: Benda Xu <heroxbd@gentoo.org> AuthorDate: 2020-01-27 02:38:20 +0000 Commit: Benda Xu <heroxbd@gentoo.org> CommitDate: 2020-01-27 02:53:04 +0000 s/bootstrap-prefix.sh: fake rsync to install linux-headers. linux-headers starts to use rsync to do the installation. Replace it with a shell script to call cp instead. Closes: https://bugs.gentoo.org/699718 Signed-off-by: Benda Xu <heroxbd@gentoo.org> scripts/bootstrap-prefix.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
I can confirm that this patch works. (Sorry if this is considered noise).
(In reply to Sammy Pfeiffer from comment #6) > I can confirm that this patch works. (Sorry if this is considered noise). No, it's not noise. Thank you for confirming!