Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 814995

Summary: savedconfig.eclass - restore_config fails when /etc/portage/savedconfig does not exist
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: EclassesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED INVALID    
Severity: normal CC: sam, zerochaos
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge-info.txt
emerge-history.txt
environment
etc.portage.tar.bz2
net-wireless:hostapd-2.9-r6:20210926-114525.log

Description Toralf Förster gentoo-dev 2021-09-26 13:43:35 UTC
 * Unable to read /etc/portage/savedconfig -- please check its permissions.
 * ERROR: net-wireless/hostapd-2.9-r6::gentoo failed (configure phase):
 *   Reading config files failed
 * 
 * Call stack:
 *     ebuild.sh, line  127:  Called src_configure
 *   environment, line 1850:  Called restore_config '/var/tmp/portage/net-wireless/hostapd-2.9-r6/work/hostapd-2.9/hostapd/.config'

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_no_multilib_hardened-j4-20210926-020207

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-11.2.0 *
/usr/lib/llvm/12
12.0.1
Python 3.9.7
Available Ruby profiles:
  [1]   ruby26 (with Rubygems)
  [2]   ruby30 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.55.0 *
The Glorious Glasgow Haskell Compilation System, version 8.10.4
php cli:

  HEAD of ::gentoo
commit 7ed458c40ae1649285a6aed5984acd698d28c2d6
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Sun Sep 26 10:51:34 2021 +0000

    2021-09-26 10:51:33 UTC

emerge -qpvO net-wireless/hostapd
[ebuild  N    ] net-wireless/hostapd-2.9-r6  USE="crda ipv6 savedconfig suiteb wps -internal-tls -netlink -sqlite"
Comment 1 Toralf Förster gentoo-dev 2021-09-26 13:43:36 UTC
Created attachment 741453 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2021-09-26 13:43:37 UTC
Created attachment 741456 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2021-09-26 13:43:39 UTC
Created attachment 741459 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2021-09-26 13:43:40 UTC
Created attachment 741462 [details]
etc.portage.tar.bz2
Comment 5 Toralf Förster gentoo-dev 2021-09-26 13:43:41 UTC
Created attachment 741465 [details]
net-wireless:hostapd-2.9-r6:20210926-114525.log
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-09-26 17:26:13 UTC
*** Bug 815019 has been marked as a duplicate of this bug. ***
Comment 7 Larry the Git Cow gentoo-dev 2021-09-29 19:33:30 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3c88c805320021786d2bb925918e9ba2d15c79d

commit c3c88c805320021786d2bb925918e9ba2d15c79d
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2021-09-26 23:47:13 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2021-09-29 19:32:44 +0000

    savedconfig.eclass: drop faulty permissions check
    
    This check was meant to test if the user has accidentally restricted
    access to the /etc/portage/savedconfig directory. There are a few
    problems:
    
    1. We don't actually need read access on the directory. We really need
       the execute bit set so that we can access files within the directory.
    
    2. There may be permissions issues on subdirectories, and we would fail
       to detect them.
    
    3. There is no easy way to distingish between EACCES and ENOENT using
       shell commands. We get an exit status of 1 from [[ -r ${path} ]] if
       there is a permissions problem or if some component of the path does
       not exist. This makes resolving problem 2 difficult without using a
       more robust language with direct access to errno.
    
    Instead of trying to detect a permissions problem, just output a warning
    telling the user to check permissions if we cannot find a config file.
    
    Bug: https://bugs.gentoo.org/289168
    Bug: https://bugs.gentoo.org/814995
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 eclass/savedconfig.eclass | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)