ecryptfs-utils fails in src_unpack()
Reported by
edward.b...@intel.com,
Sep 4
|
||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0 Platform: soraka Steps to reproduce the problem: The steps below reference soraka, but the issue is not particularly board specific. Granted this is not the typical development flow, but a quick way to reproduce the issue. With that said, I do periodically bump into the issue doing normal repo syncs and build_packages on already built platforms. (1) ./setup_board --board=soraka --force (2) emerge-soraka chromeos-kernel-4_4 (3) emerge-soraka ecryptfs-utils What is the expected behavior? Build succeeds. What went wrong? Emerging ecryptfs-utils fails in src_unpack(). (cr) ((ef121e2...)) ed@edcubedev ~/trunk/src/scripts $ emerge-soraka ecryptfs-utils Calculating dependencies... done! >>> Emerging (1 of 1) sys-fs/ecryptfs-utils-101::portage-stable for /build/soraka/ * ecryptfs-utils_101.orig.tar.gz RMD160 SHA1 SHA256 size ;-) ... [ ok ] * Running stacked hooks for pre_pkg_setup * sysroot_build_bin_dir ... [ ok ] * Determining the location of the kernel source code * Found kernel source directory: * /build/soraka/usr/src/linux * Found sources for kernel version: * 4.4.149 * Unable to check for the following kernel config options due * to absence of any configured kernel sources or compiled * config: * - ECRYPT_FS * You're on your own to make sure they are set if needed. * Running stacked hooks for post_pkg_setup * python_eclass_hack ... [ ok ] * Running stacked hooks for pre_src_unpack * python_multilib_setup ... [ ok ] >>> Unpacking source... >>> Unpacking ecryptfs-utils_101.orig.tar.gz to /build/soraka/tmp/portage/sys-fs/ecryptfs-utils-101/work tar: ecryptfs-utils-101/NEWS: Cannot open: Permission denied tar: ecryptfs-utils-101/README: Cannot open: Permission denied tar: ecryptfs-utils-101/depcomp: Cannot open: Permission denied tar: ecryptfs-utils-101/configure: Cannot open: Permission denied tar: ecryptfs-utils-101/doc: Cannot mkdir: Permission denied tar: ecryptfs-utils-101/doc: Cannot mkdir: Permission denied tar: ecryptfs-utils-101/doc/manpage: Cannot mkdir: No such file or directory tar: ecryptfs-utils-101/doc: Cannot mkdir: Permission denied tar: ecryptfs-utils-101/doc/manpage/ecryptfs-rewrap-passphrase.1: Cannot open: No such file or directory tar: ecryptfs-utils-101/doc: Cannot mkdir: Permission denied tar: ecryptfs-utils-101/doc/manpage/ecryptfs-mount-private.1: Cannot open: No such file or directory tar: ecryptfs-utils-101/doc: Cannot mkdir: Permission denied tar: ecryptfs-utils-101/doc/manpage/ecryptfs-generate-tpm-key.1: Cannot open: No such file or directory tar: ecryptfs-utils-101/doc: Cannot mkdir: Permission denied tar: ecryptfs-utils-101/doc/manpage/ecryptfs-setup-private.1: Cannot open: No such file or directory <snip> tar: Exiting with failure status due to previous errors * ERROR: sys-fs/ecryptfs-utils-101::portage-stable failed (unpack phase): * unpack: failure unpacking ecryptfs-utils_101.orig.tar.gz * * Call stack: * ebuild.sh, line 133: Called src_unpack * environment, line 6860: Called default * phase-functions.sh, line 805: Called default_src_unpack * phase-functions.sh, line 832: Called __eapi0_src_unpack * phase-helpers.sh, line 736: Called unpack 'ecryptfs-utils_101.orig.tar.gz' * phase-helpers.sh, line 386: Called __unpack_tar 'gzip -d' * phase-helpers.sh, line 317: Called __assert_sigpipe_ok 'unpack: failure unpacking ecryptfs-utils_101.orig.tar.gz' * isolated-functions.sh, line 41: Called __helpers_die 'unpack: failure unpacking ecryptfs-utils_101.orig.tar.gz' * isolated-functions.sh, line 117: Called die * The specific snippet of code: * die "$@" * * If you need support, post the output of `emerge --info '=sys-fs/ecryptfs-utils-101::portage-stable'`, * the complete build log and the output of `emerge -pqv '=sys-fs/ecryptfs-utils-101::portage-stable'`. * The complete build log is located at '/build/soraka/tmp/portage/logs/sys-fs:ecryptfs-utils-101:20180831-053141.log'. * For convenience, a symlink to the build log is located at '/build/soraka/tmp/portage/sys-fs/ecryptfs-utils-101/temp/build.log'. * The ebuild environment file is located at '/build/soraka/tmp/portage/sys-fs/ecryptfs-utils-101/temp/environment'. * Working directory: '/build/soraka/tmp/portage/sys-fs/ecryptfs-utils-101/work' * S: '/build/soraka/tmp/portage/sys-fs/ecryptfs-utils-101/work/ecryptfs-utils-101' >>> Failed to emerge sys-fs/ecryptfs-utils-101 for /build/soraka/, Log file: >>> '/build/soraka/tmp/portage/logs/sys-fs:ecryptfs-utils-101:20180831-053141.log' Did this work before? N/A Chrome version: Chromium 70.0.3532.0 Channel: dev OS Version: 11009.0.2018_08_31_1434 (Test Build - ed) developer-build soraka-unibuild (soraka) Flash Version: I started investigating this partly because it kept cropping up on my local machine, but also because I found it intriguing :). Why would a package fail in src_unpack? To dig further I setup two similar boards. For one of the boards I then ran build_packages. With the two boards configured I started emerges for ecryptfs-utils. On the board with build_packages previously run, the above failure occured. On the board without build_packages, it built a number of dependencies, and then successfully completed ecryptfs-utils. I then added src_unpack to ecryptfs-utils (normally it relies on the default) and inserted some extra logging. First the good logs: * Running ls -la in workdir total 8 drwxr-xr-x 2 ed portage 4096 Aug 30 10:48 . drwxr-xr-x 6 ed portage 4096 Aug 30 10:48 .. * Running ls -la in distdir total 12 drwxr-xr-x 2 root portage 4096 Aug 30 10:48 . drwxr-xr-x 6 ed portage 4096 Aug 30 10:48 .. lrwxrwxrwx 1 root root 73 Aug 30 10:48 ecryptfs-utils_101.orig.tar.gz -> /var/cache/chromeos-cache/distfiles/target/ecryptfs-utils_101.orig.tar.gz * Running ls -la in workdir/.. total 24 drwxr-xr-x 6 ed portage 4096 Aug 30 10:48 . drwxrwxr-x 3 ed portage 4096 Aug 30 10:48 .. prwxrwx--- 1 root portage 0 Aug 30 10:48 .ipc_in prwxrwx--- 1 root portage 0 Aug 30 10:48 .ipc_out -rw-r--r-- 1 root root 0 Aug 30 10:48 .logid -rw-r--r-- 1 root root 0 Aug 30 10:48 .setuped drwxr-xr-x 2 root portage 4096 Aug 30 10:48 distdir drwxr-xr-x 2 ed portage 4096 Aug 30 10:48 homedir drwxr-xr-x 3 ed portage 4096 Aug 30 10:48 temp drwxr-xr-x 2 ed portage 4096 Aug 30 10:48 work * Trying a manual tar command on /build/pyro/tmp/portage/sys-fs/ecryptfs-utils-101/distdir/ecryptfs-utils_101.orig.tar.gz ecryptfs-utils-101/ ecryptfs-utils-101/NEWS ecryptfs-utils-101/README ecryptfs-utils-101/depcomp ecryptfs-utils-101/configure ecryptfs-utils-101/doc/ <snip> Then the logs from failed builds. * Running ls -la in workdir total 12 drwxr-xr-x 3 root root 4096 Aug 30 10:47 . drwxr-xr-x 6 ed portage 4096 Aug 30 10:47 .. drwxr-xr-x 2 root root 4096 Aug 30 10:47 ecryptfs-utils-101 * Running ls -la in distdir total 12 drwxr-xr-x 2 root portage 4096 Aug 30 10:47 . drwxr-xr-x 6 ed portage 4096 Aug 30 10:47 .. lrwxrwxrwx 1 root root 73 Aug 30 10:47 ecryptfs-utils_101.orig.tar.gz -> /var/cache/chromeos-cache/distfiles/target/ecryptfs-utils_101.orig.tar.gz * Running ls -la in workdir/.. total 24 drwxr-xr-x 6 ed portage 4096 Aug 30 10:47 . drwxrwxr-x 3 ed portage 4096 Aug 30 10:47 .. prwxrwx--- 1 root portage 0 Aug 30 10:47 .ipc_in prwxrwx--- 1 root portage 0 Aug 30 10:47 .ipc_out -rw-r--r-- 1 root root 0 Aug 30 10:47 .logid -rw-r--r-- 1 root root 0 Aug 30 10:47 .setuped drwxr-xr-x 2 root portage 4096 Aug 30 10:47 distdir drwxr-xr-x 2 ed portage 4096 Aug 30 10:47 homedir drwxr-xr-x 3 ed portage 4096 Aug 30 10:47 temp drwxr-xr-x 3 root root 4096 Aug 30 10:47 work * Trying a manual tar command on /build/soraka/tmp/portage/sys-fs/ecryptfs-utils-101/distdir/ecryptfs-utils_101.orig.tar.gz ecryptfs-utils-101/ ecryptfs-utils-101/NEWS tar: ecryptfs-utils-101/NEWS: Cannot open: Permission denied ecryptfs-utils-101/README tar: ecryptfs-utils-101/README: Cannot open: Permission denied ecryptfs-utils-101/depcomp tar: ecryptfs-utils-101/depcomp: Cannot open: Permission denied ecryptfs-utils-101/configure tar: ecryptfs-utils-101/configure: Cannot open: Permission denied ecryptfs-utils-101/doc/ tar: ecryptfs-utils-101/doc: Cannot mkdir: Permission denied ecryptfs-utils-101/doc/manpage/ tar: ecryptfs-utils-101/doc: Cannot mkdir: Permission denied tar: ecryptfs-utils-101/doc/manpage: Cannot mkdir: No such file or directory <snip> Comparing the above logs we now know that the work directory is incorrectly set to root:root. I then started reviewing pkg_setup() (https://chromium.googlesource.com/chromiumos/overlays/portage-stable/+/14fa96/sys-fs/ecryptfs-utils/ecryptfs-utils-101.ebuild#39) to determine when work was being created. With only three lines to step through I commented linux-info_pkg_setup first and got lucky. Building ecryptfs-utils completed. As a quick side check I then tried building other packages which use linux-info. Consolekit failed on permission problems in src_unpack. Powertop finished OK. More on that in a bit, stepping through linux-info was up next. There might be a simpler method, but I decided to step through linux-info with ewarns and ls -ld ${WORKDIR} checks :). This eventually led me to inserting 'ewarn "In getfilevar() EBUILD_PHASE_FUNC=${EBUILD_PHASE_FUNC}"' right before line 184 https://chromium.googlesource.com/chromiumos/overlays/portage-stable/+/14fa96c/eclass/linux-info.eclass#184 . EBUILD_PHASE_FUNC was empty. This then resulted in M being set to '/build/soraka/tmp/portage/sys-fs/ecryptfs-utils-101/work/ecryptfs-utils-101'. Ah, starting to make sense! Gentoo introduced EBUILD_PHASE_FUNC in EAPI 5. Chrome OS versions of ecryptfs-utils and consolekit are currently EAPI 4. Powertop on the other hand is EAPI 5. As a quick check, increasing the EAPI to 5 resulted in EBUILD_PHASE_FUNC being set to 'pkg-setup' which then resulted in M being set to '/build/soraka/tmp/portage/sys-fs/ecryptfs-utils-101/temp' and the build succeeded.
,
Nov 21
|
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Sep 20