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

Bug 699548

Summary: sys-apps/portage - python install-xattr implementation incorrectly process -Z flag
Product: Portage Development Reporter: Raimonds Cicans <ray>
Component: CoreAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal Keywords: InVCS
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=699550
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 697734, 699552    
Attachments: Just idea for fix (not tested)

Description Raimonds Cicans 2019-11-07 16:56:38 UTC
Created attachment 595240 [details, diff]
Just idea for fix (not tested)

Internal portage “install-xattr” implementation (aka PORTAGE_INSTALL_XATTR_IMPLEMENTATION=”python”) require “-Z” flag to have option(s), but “install” (which “install-xattr” tries to mimic) from package “sys-apps/coreutils” documentation clearly states that flag do not have any options.

Consequences: on selinux sistems which use “python” “install-xattr” implementation by default all builds containing calls to “install-xattr” with “-Z” flag will fail at installation phase.
Comment 1 Mike Gilbert gentoo-dev 2019-11-07 18:24:13 UTC
*** Bug 699552 has been marked as a duplicate of this bug. ***
Comment 3 Larry the Git Cow gentoo-dev 2019-11-08 16:02:05 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=f6369a67d33fd5e95e02cf9b3cee41213a3b8804

commit f6369a67d33fd5e95e02cf9b3cee41213a3b8804
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2019-11-07 18:16:09 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2019-11-08 15:59:47 +0000

    install.py: ignore -Z / --context
    
    The --context option accepts an optional argument, but only if it is
    passed via --context=arg. The argparse module does not deal with this
    properly.
    
    To work around this, have argparse ignore this option, and filter out
    any remaining arguments that start with a hyphen and do not occur after
    a "--" delimiter.
    
    Bug: https://bugs.gentoo.org/699548
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>
    Reviewed-by: Zec Medico <zmedico@gentoo.org>

 bin/install.py | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)
Comment 4 Larry the Git Cow gentoo-dev 2019-11-09 05:22:58 UTC
The bug has been referenced in the following commit(s):

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

commit a95264dd3d846c10045644d5385d96826fbbae78
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2019-11-09 05:16:02 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2019-11-09 05:22:38 +0000

    sys-apps/portage: Bump to version 2.3.79
    
     #673400 emerge: fix error message for unknown options
     #699392 emirrordist: _recycle_copier_exit UnboundLocalError
     #699400 emirrordist: clean up FileCopier exception logging
     #699548 install.py: ignore -Z / --context
    
    Bug: https://bugs.gentoo.org/697734
    Bug: https://bugs.gentoo.org/673400
    Bug: https://bugs.gentoo.org/699392
    Bug: https://bugs.gentoo.org/699400
    Bug: https://bugs.gentoo.org/699548
    Package-Manager: Portage-2.3.78, Repoman-2.3.17
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-2.3.79.ebuild | 261 +++++++++++++++++++++++++++++++++
 2 files changed, 262 insertions(+)