Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 684742 - =www-apps/gitea-1.8.0 FEATURES=network-sandbox with LDAP - src_install(): /usr/bin/install: invalid user ‘git’
Summary: =www-apps/gitea-1.8.0 FEATURES=network-sandbox with LDAP - src_install(): /us...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-29 17:38 UTC by smkbot
Modified: 2021-08-10 13:38 UTC (History)
2 users (show)

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


Attachments
emerge --info (emerge_info.txt,6.18 KB, text/plain)
2019-04-29 17:38 UTC, smkbot
Details
full build.log (build_log.txt,27.93 KB, text/plain)
2019-04-29 17:54 UTC, smkbot
Details

Note You need to log in before you can comment on or make changes to this bug.
Description smkbot 2019-04-29 17:38:46 UTC
Created attachment 574620 [details]
emerge --info

>>> Install gitea-1.8.0 into /var/tmp/portage/www-apps/gitea-1.8.0/image category www-apps
/usr/bin/install: invalid user ‘git’
 * ERROR: www-apps/gitea-1.8.0::gentoo failed (install phase):
 *   dodir failed
 *
 * If you need support, post the output of `emerge --info '=www-apps/gitea-1.8.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=www-apps/gitea-1.8.0::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/www-apps/gitea-1.8.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/www-apps/gitea-1.8.0/temp/environment'.
 * Working directory: '/var/tmp/portage/www-apps/gitea-1.8.0/work/gitea-1.8.0/src/code.gitea.io/gitea'
 * S: '/var/tmp/portage/www-apps/gitea-1.8.0/work/gitea-1.8.0/src/code.gitea.io/gitea'
/usr/lib/portage/python3.6/ebuild-helpers/keepdir: line 15: /var/tmp/portage/www-apps/gitea-1.8.0/image/etc/gitea/.keep_www-apps_gitea-0: No such file or directory
!!! keepdir: cannot write .keep in /var/tmp/portage/www-apps/gitea-1.8.0/image/etc/gitea
 * ERROR: www-apps/gitea-1.8.0::gentoo failed (install phase):
 *   keepdir failed
 *
 * If you need support, post the output of `emerge --info '=www-apps/gitea-1.8.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=www-apps/gitea-1.8.0::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/www-apps/gitea-1.8.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/www-apps/gitea-1.8.0/temp/environment'.
 * Working directory: '/var/tmp/portage/www-apps/gitea-1.8.0/work/gitea-1.8.0/src/code.gitea.io/gitea'
 * S: '/var/tmp/portage/www-apps/gitea-1.8.0/work/gitea-1.8.0/src/code.gitea.io/gitea'

>>> Failed to emerge www-apps/gitea-1.8.0, Log file:

>>>  '/var/tmp/portage/www-apps/gitea-1.8.0/temp/build.log'

 * Messages for package www-apps/gitea-1.8.0:

 * ERROR: www-apps/gitea-1.8.0::gentoo failed (install phase):
 *   dodir failed
 *
 * If you need support, post the output of `emerge --info '=www-apps/gitea-1.8.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=www-apps/gitea-1.8.0::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/www-apps/gitea-1.8.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/www-apps/gitea-1.8.0/temp/environment'.
 * Working directory: '/var/tmp/portage/www-apps/gitea-1.8.0/work/gitea-1.8.0/src/code.gitea.io/gitea'
 * S: '/var/tmp/portage/www-apps/gitea-1.8.0/work/gitea-1.8.0/src/code.gitea.io/gitea'
 * ERROR: www-apps/gitea-1.8.0::gentoo failed (install phase):
 *   keepdir failed
 *
 * If you need support, post the output of `emerge --info '=www-apps/gitea-1.8.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=www-apps/gitea-1.8.0::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/www-apps/gitea-1.8.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/www-apps/gitea-1.8.0/temp/environment'.
 * Working directory: '/var/tmp/portage/www-apps/gitea-1.8.0/work/gitea-1.8.0/src/code.gitea.io/gitea'
 * S: '/var/tmp/portage/www-apps/gitea-1.8.0/work/gitea-1.8.0/src/code.gitea.io/gitea'
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2019-04-29 17:48:29 UTC
It looks like pkg_setup() failed or was not run at all.

Please attach the entire build log to this bug report.
Comment 2 smkbot 2019-04-29 17:54:14 UTC
Created attachment 574622 [details]
full build.log

Attaching full build log
Comment 3 Tomáš Mózes 2019-04-29 19:52:49 UTC
How did you install it? 

# emerge www-apps/gitea ?

It's strange because the user is created in pkg_setup(): https://github.com/gentoo/gentoo/blob/master/www-apps/gitea/gitea-1.8.0.ebuild#L27
Comment 4 smkbot 2019-04-29 20:01:20 UTC
Yes, just "emerge gitea".

I have an LDAP server and the git user is present in LDAP:

$ id git
uid=2021(git) gid=2012(git) groups=2012(git),2014(sendmail)

I'm not sure the invalid user error is the real problem. The build seems to fail when trying to write .keep:

/usr/lib/portage/python3.6/ebuild-helpers/keepdir: line 15: /var/tmp/portage/www-apps/gitea-1.8.0/image/etc/gitea/.keep_www-apps_gitea-0: No such file or directory
!!! keepdir: cannot write .keep in /var/tmp/portage/www-apps/gitea-1.8.0/image/etc/gitea
Comment 5 Felix Neumärker 2019-05-01 16:25:20 UTC
Looks like that a sandbox problem (no LDAP access within the sandbox?).
Could find any package that handles this problem somehow.

As a workaround setting the permission could be moved to pkg_postinst(). Not sure if this is a good idea.
Another possibility would be to move pkg_config and let the user choose the username for the daemon (e.g. gitea if git is already take by gitolite installation).
Comment 6 smkbot 2019-05-01 17:35:00 UTC
I already have =www-apps/gitea-1.7.4 installed on this machine (I'm attempting to upgrade to 1.8.0).

Interestingly, I can no longer build version 1.7.4 either:

$ sudo emerge -vt1Ba =www-apps/gitea-1.7.4

[snip]

>>> Install gitea-1.7.4 into /var/tmp/portage/www-apps/gitea-1.7.4/image category www-apps
/usr/bin/install: invalid user ‘git’
 * ERROR: www-apps/gitea-1.7.4::gentoo failed (install phase):
 *   dodir failed
 *
 * If you need support, post the output of `emerge --info '=www-apps/gitea-1.7.4::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=www-apps/gitea-1.7.4::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/www-apps/gitea-1.7.4/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/www-apps/gitea-1.7.4/temp/environment'.
 * Working directory: '/var/tmp/portage/www-apps/gitea-1.7.4/work/gitea-1.7.4'
 * S: '/var/tmp/portage/www-apps/gitea-1.7.4/work/gitea-1.7.4'
/usr/lib/portage/python3.6/ebuild-helpers/keepdir: line 15: /var/tmp/portage/www-apps/gitea-1.7.4/image/var/log/gitea/.keep_www-apps_gitea-0: No such file or directory
!!! keepdir: cannot write .keep in /var/tmp/portage/www-apps/gitea-1.7.4/image/var/log/gitea
/usr/lib/portage/python3.6/ebuild-helpers/keepdir: line 15: /var/tmp/portage/www-apps/gitea-1.7.4/image/var/lib/gitea/.keep_www-apps_gitea-0: No such file or directory
!!! keepdir: cannot write .keep in /var/tmp/portage/www-apps/gitea-1.7.4/image/var/lib/gitea
/usr/lib/portage/python3.6/ebuild-helpers/keepdir: line 15: /var/tmp/portage/www-apps/gitea-1.7.4/image/var/lib/gitea/data/.keep_www-apps_gitea-0: No such file or directory
!!! keepdir: cannot write .keep in /var/tmp/portage/www-apps/gitea-1.7.4/image/var/lib/gitea/data
 * ERROR: www-apps/gitea-1.7.4::gentoo failed (install phase):
 *   keepdir failed
 *
 * If you need support, post the output of `emerge --info '=www-apps/gitea-1.7.4::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=www-apps/gitea-1.7.4::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/www-apps/gitea-1.7.4/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/www-apps/gitea-1.7.4/temp/environment'.
 * Working directory: '/var/tmp/portage/www-apps/gitea-1.7.4/work/gitea-1.7.4'
 * S: '/var/tmp/portage/www-apps/gitea-1.7.4/work/gitea-1.7.4'

>>> Failed to emerge www-apps/gitea-1.7.4, Log file:

>>>  '/var/tmp/portage/www-apps/gitea-1.7.4/temp/build.log'

 * Messages for package www-apps/gitea-1.7.4:

 * ERROR: www-apps/gitea-1.7.4::gentoo failed (install phase):
 *   dodir failed
 *
 * If you need support, post the output of `emerge --info '=www-apps/gitea-1.7.4::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=www-apps/gitea-1.7.4::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/www-apps/gitea-1.7.4/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/www-apps/gitea-1.7.4/temp/environment'.
 * Working directory: '/var/tmp/portage/www-apps/gitea-1.7.4/work/gitea-1.7.4'
 * S: '/var/tmp/portage/www-apps/gitea-1.7.4/work/gitea-1.7.4'
 * ERROR: www-apps/gitea-1.7.4::gentoo failed (install phase):
 *   keepdir failed
 *
 * If you need support, post the output of `emerge --info '=www-apps/gitea-1.7.4::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=www-apps/gitea-1.7.4::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/www-apps/gitea-1.7.4/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/www-apps/gitea-1.7.4/temp/environment'.
 * Working directory: '/var/tmp/portage/www-apps/gitea-1.7.4/work/gitea-1.7.4'
 * S: '/var/tmp/portage/www-apps/gitea-1.7.4/work/gitea-1.7.4'





Has something about Portage (and/or the sandboxing system) changed in the recent past?
Comment 7 smkbot 2019-05-01 17:53:37 UTC
Given the clues in the above comments about network access, I found I can successfully build gitea with FEATURES=-network-sandbox.

Is requiring FEATURES=-network-sandbox now expected for folks with LDAP servers?