Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 686840 - sys-apps/portage-2.3.62-r2: cannot git fetch overlay with password anymore
Summary: sys-apps/portage-2.3.62-r2: cannot git fetch overlay with password anymore
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-27 08:28 UTC by fkater
Modified: 2019-05-29 07:11 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fkater 2019-05-27 08:28:39 UTC
I have my own ebuild repo. Everything works. Except:

When enabling apache's AuthType Basic (thus distfile fetch restriction), then
emerge hangs after username query and before password query:

> emerging (1 of 1) app-admin/my-package-1.0::my-ebuilds
> >>> Unpacking source...
>  * Repository id: repos_distfiles.git
>  * 
>  * Fetching https://a-server/git/repos/distfiles.git ...
> git fetch https://a-server/git/repos/distfiles.git +HEAD:refs/git-r3/HEAD
> Username for 'https://a-server': user1

HANGS forever. (Should print: Password for 'https://a-server': ...)

Strange... manually, git fetch works:

- cd'ing into .../distfiles/git3-src/repos_distfiles.git
- git fetch https:// ... as above
- Username for ...:
- Password for ...:
- Done.

NOTE: This has been working in the past! I've tried portage up to 2.3.66-r1.

Any idea how I could debug what makes portage hang?
Comment 1 fkater 2019-05-27 09:47:15 UTC
Currently, I suppose this is a terminal/interaction thing:

While a manuall call of git fetch displays and interacts correctly with the
username/password entry, portage calls git and probably does not forward key
events.

Thus: git fetch would not receive the username and in turn does not continue
asking for a password?

Hm...
Comment 2 Zac Medico gentoo-dev 2019-05-28 16:10:56 UTC
Does it help if you set PROPERTIES="interactive" in the ebuild? You should do that if it requires user input.
Comment 3 fkater 2019-05-28 18:27:01 UTC
(In reply to Zac Medico from comment #2)
> Does it help if you set PROPERTIES="interactive" in the ebuild? You should
> do that if it requires user input.

Thanks a lot, it doesn't help though.

I suppose because interaction is required *earlier*, while fetching the distfiles... I hope there is a similar flag or so?
Comment 4 Zac Medico gentoo-dev 2019-05-28 20:55:56 UTC
Regular distfiles can't be fetched interactively, you'd have to use RESTRICT="fetch" instead. 

The output shown in comment #0 is for a git repository, which would typically be fetched in src_unpack by the git-r3_src_unpack function.
Comment 5 Zac Medico gentoo-dev 2019-05-28 20:57:58 UTC
You can try with FEATURES="-network-sandbox -ipc-sandbox -pid-sandbox" to see if that has any effect.
Comment 6 fkater 2019-05-29 07:11:52 UTC
(In reply to Zac Medico from comment #5)
> You can try with FEATURES="-network-sandbox -ipc-sandbox -pid-sandbox" to
> see if that has any effect.

Awesom, man. Sooo glad I works again...! Thanks for your help!!

FEATURES="-pid-sandbox" emerge my-ebuild

This one is sufficiant to make password interaction work again when
downloading from a user/password restricted distfile fetch via git.

Since it worked previously without FEATURES, I assume that the reason for this
silent change might be some new kernel options, namely PID and mount namespace
support mentioned in man make.conf, to be required for pid-sandbox'ing.  So,
maybe pid-sandbox'ing was previously unavailable, so it went though.

In case there is a better Gentoo way to make username/password restricted
distfile fetching possible I'll happy for any pointers. I haven't found
anything more convenient though than the Apache AuthType way (see my OP) as
there is no *separate* fetch required. It's just plain emerge, with
username/password entry.