Ticket #28121 (reopened defect)
dbus @1.2.24 +no_root fails with dscl error when ${install.user} does not exist
| Reported by: | ph227@… | Owned by: | mcalhoun@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 1.9.2 |
| Keywords: | Cc: | jtbates@… | |
| Port: | dbus |
Description
I was trying to install meld port, but failed on dbus dependency. The command :
port -d install dbus +no_root
fail with :
DEBUG: Changing to port directory: /Users/nicoph/macport/var/macports/sources/rsync.macports.org/release/ports/devel/dbus
DEBUG: OS darwin/10.4.2 (Mac OS X 10.6) arch i386
DEBUG: org.macports.load registered provides 'load', a pre-existing procedure. Target override will not be provided
DEBUG: org.macports.unload registered provides 'unload', a pre-existing procedure. Target override will not be provided
DEBUG: org.macports.distfiles registered provides 'distfiles', a pre-existing procedure. Target override will not be provided
DEBUG: Using group file /Users/nicoph/macport/var/macports/sources/rsync.macports.org/release/ports/_resources/port1.0/group/muniversal-1.0.tcl
DEBUG: Reading variant descriptions from /Users/nicoph/macport/var/macports/sources/rsync.macports.org/release/ports/_resources/port1.0/variant_descriptions.conf
DEBUG: universal variant already exists, so not adding the default one
DEBUG: Requested variant bash_completion is not provided by port dbus.
DEBUG: Executing variant no_root provides no_root
DEBUG: <dscl_cmd> DS Error: -14136 (eDSRecordNotFound)
while executing
"exec /usr/bin/dscl . -read Users/${install.user} NFSHomeDirectory"
(procedure "variant-no_root" line 15)
invoked from within
"variant-no_root"
invoked from within
"catch "variant-${name}" result"
Error: dbus: Error executing no_root: <dscl_cmd> DS Error: -14136 (eDSRecordNotFound)
DEBUG: Error evaluating variants
while executing
"error "Error evaluating variants""
(procedure "mportopen" line 58)
invoked from within
"mportopen $porturl [array get options] [array get requested_variations]"
Error: Unable to open port: Error evaluating variants
To report a bug, see <http://guide.macports.org/#project.tickets>
My specs :
- MacPort 1.9.2 (user local installation from sources)
- Os X 10.6.4
- XCode 3.2.4
Change History
comment:2 Changed 2 years ago by jmr@…
- Owner changed from macports-tickets@… to mcalhoun@…
- Port set to dbus
- Summary changed from dbus @1.2.24 +no_root to dbus @1.2.24 +no_root fails with dscl error
Please remember to fill in the Port field, cc the maintainer, and use a descriptive summary.
comment:3 Changed 2 years ago by ph227@…
Sorry, i missed the port field.
After some investigation, i found the origin of the issue : in the file var/macports/sources/rsync.macports.org/release/ports/devel/dbus/Portfile, line 197
the instruction
set startup_root [join [lrange [exec /usr/bin/dscl . -read Users/${install.user} NFSHomeDirectory] 1 end]]
don't give the expected result, until my session is authenticated with kerberos and the user is not locally known by dscl.
comment:4 follow-up: ↓ 5 Changed 18 months ago by jmr@…
- Status changed from new to closed
- Resolution set to invalid
- Summary changed from dbus @1.2.24 +no_root fails with dscl error to dbus @1.2.24 +no_root fails with dscl error when ${install.user} does not exist
So yeah, your configured install user has to exist when you run port.
comment:5 in reply to: ↑ 4 Changed 18 months ago by ph227@…
- Status changed from closed to reopened
- Resolution invalid deleted
Replying to jmr@…:
So yeah, your configured install user has to exist when you run port.
My bad, my description was not clear enough: dbus +no_root fails with dscl error when ${install.user} does not exist in "."
This is still true with dbus @1.4.16 (since this is not related to dbus but to dbus Portfile).
dscl can't find my username in the local datasource, since my user is registered to a domain. So this command :
dscl '/Active Directory/All Domains' -read Users/${install.user} NFSHomeDirectory
works well for me.
comment:6 follow-up: ↓ 8 Changed 16 months ago by jtbates@…
I have the same problem. ph277, how do I use your fix?
comment:8 in reply to: ↑ 6 Changed 16 months ago by ph227@…
Replying to jtbates@…:
I have the same problem. ph277, how do I use your fix?
This is case-specific, but for me, in the file: [your macport installation path]/var/macports/sources/rsync.macports.org/release/ports/devel/dbus/Portfile
I change the line
set startup_root [join [lrange [exec /usr/bin/dscl . -read Users/${install.user} NFSHomeDirectory] 1 end]]
to
set startup_root [join [lrange [exec /usr/bin/dscl '/Active Directory/All Domains' -read Users/${install.user} NFSHomeDirectory] 1 end]]
and I run again the package installation.
comment:9 Changed 4 months ago by rharwood@…
It's slightly more bloody than that. When I have +no_root set in variants.conf, the following occurs:
$ port -v info dbus Error: dbus: Error executing no_root: <dscl_cmd> DS Error: -14136 (eDSRecordNotFound) Error: Unable to open port: Error evaluating variants
Setting install.user blank explicitly immediately before it is checked (line 202 of Portfile) causes the problem to disappear, while setting it to my actual username causes the same error. Needless to say, this throws errors later on the relevant chown/chgrp commands, but it does cause the port to install.


An additionnal missing information : macport was compiled with :