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

Bug 771411

Summary: git-r3.eclass: Impossible to provide interactive input for repository
Product: Gentoo Linux Reporter: Edward Kigwana <edwardwwgk>
Component: EclassesAssignee: Michał Górny <mgorny>
Status: UNCONFIRMED ---    
Severity: normal CC: ionen
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: git-r3.eclass patch

Description Edward Kigwana 2021-02-19 00:32:07 UTC
The fix (https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f981af79945e28a40dab2b5196329f7835afe78b) for this issue https://bugs.gentoo.org/701276 made certain that
interactive git cloning is not possible. I have a git ebuild that is behind a
password protected server and cannot get any prompts.

Disabling the referenced fix gets one to a username prompt.

The password prompt is however never presented. So cloning is still not possible.

Reproducible: Always

Steps to Reproduce:
1. Ebuild with git source behind password protected server
2. Emerge project
Actual Results:  
Ebuild fails:

fatal: unable to access 'https://repo.private.com/private_project.git/': Failed to connect to repo.private.com port 443: Connection refused
 * ERROR: net-misc/private_project-1.1.2::local failed (unpack phase):
 *   Unable to fetch from any of EGIT_REPO_URI

Expected Results:  
Expected prompts for username and password and for emerge to complete successfully. 

EAPI=7

inherit cmake-utils git-r3

PROPERTIES=interactive
DESCRIPTION="Private Project"
HOMEPAGE="https://repo.private.com/private_project"

if [[ ${PV} == "9999" ]]; then
        EGIT_REPO_URI="https://repo.private.com/private_project.git"
else
        EGIT_REPO_URI="https://repo.private.com/private_project.git"
        EGIT_COMMIT="v${PV}"
        KEYWORDS="~amd64 ~x86 ~arm"
fi
Comment 1 Edward Kigwana 2021-02-19 01:01:44 UTC
Created attachment 687507 [details, diff]
git-r3.eclass patch

This patch enables prompts when required for:

EAPI=7
PROPERTIES+=interactive

inherit cmake-utils git-r3

PROPERTIES=interactive
DESCRIPTION="Private Project"
HOMEPAGE="https://repo.private.com/private_project"

if [[ ${PV} == "9999" ]]; then
        EGIT_REPO_URI="https://repo.private.com/private_project.git"
else
        EGIT_REPO_URI="https://repo.private.com/private_project.git"
        EGIT_COMMIT="v${PV}"
        KEYWORDS="~amd64 ~x86 ~arm"
fi
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-02-20 21:59:44 UTC
Checking PROPERTIES is not really valid (or requiring people to set them early).  I would prefer that you added a dedicated EGIT_* variable for it (please don't forget to document it via eclassdoc comments).  You may as well make the eclass set PROPERTIES+=" interactive" when it is set to save duplication in ebuilds.
Comment 3 Edward Kigwana 2021-02-20 22:36:09 UTC
I am new to this side of portage. I'll try again.