Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 487260 - app-emulation/virt-manager cannot be installed due to python_wrapper_setup problems
Summary: app-emulation/virt-manager cannot be installed due to python_wrapper_setup pr...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jeff (JD) Horelick (RETIRED)
URL:
Whiteboard:
Keywords:
: 487428 (view as bug list)
Depends on: 487474
Blocks:
  Show dependency tree
 
Reported: 2013-10-08 00:23 UTC by Georgi Georgiev
Modified: 2014-04-20 18:27 UTC (History)
3 users (show)

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


Attachments
cave-resolve-failure.log (cave-resolve.log,5.12 KB, text/x-log)
2013-10-08 00:23 UTC, Georgi Georgiev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Georgi Georgiev 2013-10-08 00:23:08 UTC
Created attachment 360372 [details]
cave-resolve-failure.log

Trying to install app-emulation/virt-manager with paludis fails as below:

> sudo cave resolve -1 app-emulation/virt-manager:0 -x
Done: 4292 steps

These are the actions I will take, in order:

u   app-emulation/virt-manager:0::gentoo 0.10.0-r1 to ::installed replacing 0.10.0
    -debug gnome-keyring policykit sasl PYTHON_SINGLE_TARGET: -python2_6 python2_7 PYTHON_TARGETS: -python2_6 python2_7 build_options: symbols=compress -dwarf_compress -optional_tests -trace work=tidyup
    Reasons: target

Total: 1 upgrades

Executing pretend actions: 1 of 1

....
>>> Done builtin_loadenv
>>> Starting src_compile
mkdir: cannot create directory '/var/tmp/paludis/app-emulation-virt-manager-0.10.0-r1/temp//python2.7/home': Permission denied

!!! ERROR in app-emulation/virt-manager-0.10.0-r1::gentoo:
!!! In distutils-r1_run_phase at line 1357
!!! (no message provided)
....

Also attaching the full message log.

From what I can gather, this is due to the python wrappers being created in the "pkg_setup" phase. Specifically, the work that the python_wrapper_setup function is doing. Paludis would run the ebuild as an unprivileged user, while pkg_setup would run as root.

And looking inside /var/tmp/paludis we can see how the actual permissions got messed up:

> find /var/tmp/paludis -not -path \*/work/\* -ls
4006913    0 drwxrwsr-x   1 paludisbuild paludisbuild       72 Oct  8 01:54 /var/tmp/paludis
59821802    0 drwxr-sr-x   1 paludisbuild paludisbuild       26 Oct  8 01:54 /var/tmp/paludis/app-emulation-virt-manager-0.10.0-r1
59821803    0 drwxr-sr-x   1 paludisbuild paludisbuild       38 Oct  8 01:54 /var/tmp/paludis/app-emulation-virt-manager-0.10.0-r1/work
59821804    0 drwxr-sr-x   1 paludisbuild paludisbuild      102 Oct  8 01:54 /var/tmp/paludis/app-emulation-virt-manager-0.10.0-r1/temp
59821805    0 -rw-r--r--   1 paludisbuild paludisbuild        0 Oct  8 01:54 /var/tmp/paludis/app-emulation-virt-manager-0.10.0-r1/temp/build_start_time
59821808    0 drwxr-sr-x   1 root     paludisbuild       24 Oct  8 01:54 /var/tmp/paludis/app-emulation-virt-manager-0.10.0-r1/temp/python2.7
59821809    0 drwxr-sr-x   1 root     paludisbuild       60 Oct  8 01:54 /var/tmp/paludis/app-emulation-virt-manager-0.10.0-r1/temp/python2.7/bin
59821811    4 lrwxrwxrwx   1 root     paludisbuild       18 Oct  8 01:54 /var/tmp/paludis/app-emulation-virt-manager-0.10.0-r1/temp/python2.7/bin/python -> /usr/bin/python2.7
59821812    4 lrwxrwxrwx   1 root     paludisbuild        6 Oct  8 01:54 /var/tmp/paludis/app-emulation-virt-manager-0.10.0-r1/temp/python2.7/bin/python2 -> python
59821813    4 lrwxrwxrwx   1 root     paludisbuild       25 Oct  8 01:54 /var/tmp/paludis/app-emulation-virt-manager-0.10.0-r1/temp/python2.7/bin/python-config -> /usr/bin/python2.7-config
59821814    4 lrwxrwxrwx   1 root     paludisbuild       17 Oct  8 01:54 /var/tmp/paludis/app-emulation-virt-manager-0.10.0-r1/temp/python2.7/bin/2to3 -> /usr/bin/2to3-2.7
59821810    0 drwxr-sr-x   1 root     paludisbuild       38 Oct  8 01:54 /var/tmp/paludis/app-emulation-virt-manager-0.10.0-r1/temp/python2.7/pkgconfig
59821815    4 lrwxrwxrwx   1 root     paludisbuild       34 Oct  8 01:54 /var/tmp/paludis/app-emulation-virt-manager-0.10.0-r1/temp/python2.7/pkgconfig/python.pc -> /usr/lib64/pkgconfig/python-2.7.pc
59821816    4 lrwxrwxrwx   1 root     paludisbuild        9 Oct  8 01:54 /var/tmp/paludis/app-emulation-virt-manager-0.10.0-r1/temp/python2.7/pkgconfig/python2.pc -> python.pc
59822411    4 -rw-r--r--   1 paludisbuild paludisbuild        5 Oct  8 01:54 /var/tmp/paludis/app-emulation-virt-manager-0.10.0-r1/temp/epatch_user.log
59822413  236 -rw-r--r--   1 paludisbuild paludisbuild   241372 Oct  8 01:54 /var/tmp/paludis/app-emulation-virt-manager-0.10.0-r1/temp/loadsaveenv
59821806    0 drwxr-sr-x   1 paludisbuild paludisbuild        0 Oct  8 01:54 /var/tmp/paludis/app-emulation-virt-manager-0.10.0-r1/image

Please, either move the installation of these wrappers outside pkg_setup, or update the PMS to specify what should happen to the permissions of files that are created during this phase.
Comment 1 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-10-08 15:40:31 UTC
Assigned to package maintainers so they can decide first; if no change, they can reassign it to the PMS maintainers for you.
Comment 2 Doug Goldstein (RETIRED) gentoo-dev 2013-10-09 14:46:30 UTC
Why is this assigned to the package maintainer? Its a Paludis bug not handling things correctly. Or there needs to be a chat with the python eclass people.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-10-09 14:52:26 UTC
*** Bug 487428 has been marked as a duplicate of this bug. ***
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-10-09 14:55:45 UTC
Oh, I see it now. For DISTUTILS_SINGLE_IMPL=1, we use pkg_setup() indeed. I need to think about it.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-10-09 20:42:13 UTC
Well, one thing that we could do to make this work is to make the files world-writable. It sucks real bad, though.
Comment 6 Georgi Georgiev 2013-10-09 23:21:33 UTC
(In reply to Michał Górny from comment #5)
> Well, one thing that we could do to make this work is to make the files
> world-writable. It sucks real bad, though.

I cannot claim to understand the problem, but if this is only an issue with single-python implementation, can't the "single-python" case be made to behave more like the "multi-python" (which presumably works fine)?
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-10-10 06:10:22 UTC
+  10 Oct 2013; Michał Górny <mgorny@gentoo.org> distutils-r1.eclass:
+  Do not alter HOME and TMPDIR when single impl is being used. This may
+  work-around bug #487260.

Please check if this helps you.
Comment 8 Georgi Georgiev 2013-10-10 09:34:12 UTC
(In reply to Michał Górny from comment #7)
> +  10 Oct 2013; Michał Górny <mgorny@gentoo.org> distutils-r1.eclass:
> +  Do not alter HOME and TMPDIR when single impl is being used. This may
> +  work-around bug #487260.
> 
> Please check if this helps you.

It works! You're the best! :)
Comment 9 Doug Goldstein (RETIRED) gentoo-dev 2014-04-20 17:42:52 UTC
Should this be closed then?
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-04-20 18:27:18 UTC
(In reply to Doug Goldstein from comment #9)
> Should this be closed then?

Yes, it seems that the reported issue has been fixed.