Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 699718 - sys-kernel/linux-headers-5.3-r1 failing to install (Gentoo Prefix)
Summary: sys-kernel/linux-headers-5.3-r1 failing to install (Gentoo Prefix)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-10 08:16 UTC by Sammy Pfeiffer
Modified: 2020-01-27 10:26 UTC (History)
2 users (show)

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 Sammy Pfeiffer 2019-11-10 08:16:28 UTC
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.
Comment 1 Benda Xu gentoo-dev 2019-11-18 09:13:26 UTC
@Toolchain Team, do you have any idea why linux-headers calls rsync as a build dependency?
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2019-11-18 20:21:32 UTC
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
Comment 3 Benda Xu gentoo-dev 2019-11-19 01:37:58 UTC
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.
Comment 4 Sammy Pfeiffer 2020-01-13 06:38:19 UTC
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.
Comment 5 Larry the Git Cow gentoo-dev 2020-01-27 02:53:21 UTC
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(+)
Comment 6 Sammy Pfeiffer 2020-01-27 09:57:47 UTC
I can confirm that this patch works. (Sorry if this is considered noise).
Comment 7 Benda Xu gentoo-dev 2020-01-27 10:26:35 UTC
(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!