Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 757966 - app-misc/mosquitto-1.6.12 fails to build: chown: invalid user: ‘mosquitto:mosquitto’ (acct-user/mosquitto installed but no mosquitto user!)
Summary: app-misc/mosquitto-1.6.12 fails to build: chown: invalid user: ‘mosquitto:mos...
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Matt Turner
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-01 21:50 UTC by Richard Ash
Modified: 2020-12-03 18:21 UTC (History)
1 user (show)

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 Richard Ash 2020-12-01 21:50:49 UTC
Build fails (repeatably) with

install -m 644 pwfile.example "/var/tmp/portage/app-misc/mosquitto-1.6.12/image/etc/mosquitto/pwfile.example"
install -m 644 pskfile.example "/var/tmp/portage/app-misc/mosquitto-1.6.12/image/etc/mosquitto/pskfile.example"
chown: invalid user: ‘mosquitto:mosquitto’
 * ERROR: app-misc/mosquitto-1.6.12::gentoo failed (install phase):
 *   fowners failed
 *
 * If you need support, post the output of `emerge --info '=app-misc/mosquitto-1.6.12::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-misc/mosquitto-1.6.12::gentoo'`.
 * The complete build log is located at '/var/log/portage/app-misc:mosquitto-1.6.12:20201201-211550.log'.

OK, so do I have that user / group? Portage thinks I do:

$ emerge -pv acct-user/mosquitto acct-group/mosquitto
Calculating dependencies... done!
[ebuild   R    ] acct-group/mosquitto-0::gentoo  0 KiB
[ebuild   R    ] acct-user/mosquitto-0::gentoo  0 KiB

but old school grep thinks not:

$ grep mosquitto /etc/passwd /etc/group
/etc/group:mosquitto:x:996:

which is odd. This is the only acct-user package which does not have a corresponding group present:

$ for dir in /var/db/pkg/acct-user/*; do just_dir=${dir##/var/db/pkg/acct-user/}; nearly_dir=${just_dir%-0}; echo -n "${nearly_dir%-1}: "; grep ${nearly_dir%-1} /etc/passwd; echo ""; done
dnsmasq: dnsmasq:x:999:997:User for net-dns/dnsmasq:/dev/null:/sbin/nologin

gkrellmd: gkrellmd:x:110:1009:user for gkrellm daemon:/dev/null:/sbin/nologin

mail: mail:x:8:12:Mail program user:/var/spool/mail:/sbin/nologin
postmaster:x:14:12:Postmaster user:/var/spool/mail:/sbin/nologin
vpopmail:x:89:89::/var/vpopmail:/bin/false
alias:x:200:200::/var/qmail/alias:/bin/false
qmaild:x:201:200::/var/qmail:/bin/false
qmaill:x:202:200::/var/qmail:/bin/false
qmailp:x:203:200::/var/qmail:/bin/false
qmailq:x:204:201::/var/qmail:/bin/false
qmailr:x:205:201::/var/qmail:/bin/false
qmails:x:206:201::/var/qmail:/bin/false

man: man:x:13:15:System user; man:/dev/null:/sbin/nologin

messagebus: messagebus:x:105:1000:System user; messagebus:/dev/null:/sbin/nologin

mosquitto: 
ntp: ntp:x:123:123:user for ntp daemon:/dev/null:/sbin/nologin

openvpn: openvpn:x:394:394:User for net-vpn/openvpn:/dev/null:/sbin/nologin

pcap: pcap:x:377:377:User for capturing network traffic:/dev/null:/sbin/nologin

pcscd: pcscd:x:47:993:A user for pcsc-lite:/dev/null:/sbin/nologin

polkitd: polkitd:x:113:102:System user; polkitd:/var/lib/polkit-1:/sbin/nologin

postmaster: postmaster:x:14:12:Postmaster user:/var/spool/mail:/sbin/nologin

sshd: sshd:x:22:22:User for ssh:/var/empty:/sbin/nologin

svn: svn:x:399:399:System user; svn:/dev/null:/sbin/nologin

tss: tss:x:59:992:Trusted Software Stack for TPMs user:/dev/null:/sbin/nologin

The acct-user/mosquitto-0 package does not own any files (but neither do other acct-user/* packages). I have no build log for any of the acct-user packages - which is odd, because I didn't think they were getting deleted (but I have none older than 23th Nov, so that isn't true).

I re-merged acct-user/mosquitto-0 manually, and now I do have the entry in /etc/passwd, and the build completes. But how did it get into this state?
Comment 1 Matt Turner gentoo-dev 2020-12-03 18:21:09 UTC
Something must have gone wrong with the initial acct-user/mosquitto installation. Could you have somehow removed the user from /etc/passwd? No clue...