Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 771411 - git-r3.eclass: Impossible to provide interactive input for repository
Summary: git-r3.eclass: Impossible to provide interactive input for repository
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michał Górny
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2021-02-19 00:32 UTC by Edward Kigwana
Modified: 2021-02-20 22:36 UTC (History)
1 user (show)

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


Attachments
git-r3.eclass patch (git-r3.eclass.patch,474 bytes, patch)
2021-02-19 01:01 UTC, Edward Kigwana
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.