[MacPorts] #47592: File permissions causing warnings
#47592: File permissions causing warnings ---------------------+-------------------------------- Reporter: mp@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Not set | Milestone: Component: base | Version: 2.3.99 Keywords: | Port: ---------------------+-------------------------------- Running `sudo port rev-upgrade` gives these warnings: {{{ ---> Scanning binaries for linking errors Warning: Error parsing file /opt/local/libexec/dbus-daemon-launch-helper: Error opening or reading file Warning: Error parsing file /opt/local/libexec/ssh-keysign: Error opening or reading file Warning: Error parsing file /opt/local/bin/cdda2wav: Error opening or reading file Warning: Error parsing file /opt/local/bin/cdrecord: Error opening or reading file Warning: Error parsing file /opt/local/bin/readcd: Error opening or reading file Warning: Error parsing file /opt/local/sbin/rscsi: Error opening or reading file }}} The files: {{{ -rwxr-x--- 1 root messagebus 582372 Mar 28 17:17 /opt/local/libexec /dbus-daemon-launch-helper -rws--x--x 1 root admin 824984 Apr 7 11:07 /opt/local/libexec /ssh-keysign -rws--x--x 1 root admin 322776 Apr 24 11:30 /opt/local/bin/cdda2wav -rws--x--x 1 root admin 460536 Apr 24 11:30 /opt/local/bin/cdrecord -rws--x--x 1 root admin 280540 Apr 24 11:30 /opt/local/bin/readcd -rws--x--x 1 root admin 93520 Apr 24 11:30 /opt/local/sbin/rscsi }}} Not sure how long this has been going on – guessing somewhere between a fortnight and a month, but might be even older… -- Ticket URL: <https://trac.macports.org/ticket/47592> MacPorts <https://www.macports.org/> Ports system for OS X
#47592: File permissions causing warnings ----------------------+-------------------------------- Reporter: mp@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Not set | Milestone: Component: base | Version: 2.3.99 Resolution: | Keywords: Port: | ----------------------+-------------------------------- Changes (by ryandesign@…): * cc: mcalhoun@… (added) Comment: Replying to [ticket:47592 mp@…]:
Running `sudo port rev-upgrade` gives these warnings: {{{ ---> Scanning binaries for linking errors Warning: Error parsing file /opt/local/libexec/dbus-daemon-launch- helper: Error opening or reading file Warning: Error parsing file /opt/local/libexec/ssh-keysign: Error opening or reading file Warning: Error parsing file /opt/local/bin/cdda2wav: Error opening or reading file Warning: Error parsing file /opt/local/bin/cdrecord: Error opening or reading file Warning: Error parsing file /opt/local/bin/readcd: Error opening or reading file Warning: Error parsing file /opt/local/sbin/rscsi: Error opening or reading file }}}
The files: {{{ -rwxr-x--- 1 root messagebus 582372 Mar 28 17:17 /opt/local/libexec /dbus-daemon-launch-helper -rws--x--x 1 root admin 824984 Apr 7 11:07 /opt/local/libexec /ssh-keysign -rws--x--x 1 root admin 322776 Apr 24 11:30 /opt/local/bin/cdda2wav -rws--x--x 1 root admin 460536 Apr 24 11:30 /opt/local/bin/cdrecord -rws--x--x 1 root admin 280540 Apr 24 11:30 /opt/local/bin/readcd -rws--x--x 1 root admin 93520 Apr 24 11:30 /opt/local/sbin/rscsi }}} Not sure how long this has been going on – guessing somewhere between a fortnight and a month, but might be even older…
I imagine it has been going on as long as you've installed the ports that provide those unreadable files: {{{ $ port provides /opt/local/libexec/dbus-daemon-launch-helper /opt/local/libexec/ssh-keysign /opt/local/bin/cdda2wav /opt/local/bin/cdrecord /opt/local/bin/readcd /opt/local/sbin/rscsi /opt/local/libexec/dbus-daemon-launch-helper is provided by: dbus /opt/local/libexec/ssh-keysign is provided by: openssh /opt/local/bin/cdda2wav is provided by: cdrtools /opt/local/bin/cdrecord is provided by: cdrtools /opt/local/bin/readcd is provided by: cdrtools /opt/local/sbin/rscsi is provided by: cdrtools }}} For each file, it can either be considered a bug that they are not world readable, or else possibly it is intentional. You would have to ask the developers of those programs. Cc'ing Marcus who maintains dbus. If there is a base bug here at all, it is that "sudo port rev-upgrade", though invoked as root, drops privileges and therefore cannot read files that are not world-readable. -- Ticket URL: <https://trac.macports.org/ticket/47592#comment:1> MacPorts <https://www.macports.org/> Ports system for OS X
#47592: File permissions causing warnings ----------------------+-------------------------------- Reporter: mp@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Not set | Milestone: Component: base | Version: 2.3.99 Resolution: | Keywords: Port: | ----------------------+-------------------------------- Comment (by mp@…): Replying to [comment:1 ryandesign@…]:
For each file, it can either be considered a bug that they are not world readable, or else possibly it is intentional. You would have to ask the developers of those programs. Cc'ing Marcus who maintains dbus.
Can see no reason why MacPorts should complain if a port chooses to install files that are not world readable.
If there is a base bug here at all, it is that "sudo port rev-upgrade", though invoked as root, drops privileges and therefore cannot read files that are not world-readable.
Exactly. Since `macports::revupgrade_scanandrebuild` is called after the privileges have been dropped (and then elevated for some actions), {{{ if {[getuid] == 0 && [geteuid] != 0} { seteuid 0; setegid 0 } }}} at the beginning of `macports::revupgrade_scanandrebuild` solves it. Maybe the privileges should be dropped again at the end… -- Ticket URL: <https://trac.macports.org/ticket/47592#comment:2> MacPorts <https://www.macports.org/> Ports system for OS X
#47592: File permissions causing warnings ----------------------+-------------------------------- Reporter: mp@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Not set | Milestone: Component: base | Version: 2.3.99 Resolution: | Keywords: Port: | ----------------------+-------------------------------- Changes (by larryv@…): * cc: cal@… (added) Comment: Replying to [comment:2 mp@…]:
Replying to [comment:1 ryandesign@…]:
If there is a base bug here at all, it is that "sudo port rev-upgrade", though invoked as root, drops privileges and therefore cannot read files that are not world-readable.
Exactly.
Perhaps there’s a reason rev-upgrade runs without privileges? -- Ticket URL: <https://trac.macports.org/ticket/47592#comment:3> MacPorts <https://www.macports.org/> Ports system for OS X
#47592: File permissions causing warnings ----------------------+-------------------------------- Reporter: mp@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Not set | Milestone: Component: base | Version: 2.3.99 Resolution: | Keywords: Port: | ----------------------+-------------------------------- Comment (by cal@…): Replying to [comment:3 larryv@…]:
Perhaps there’s a reason rev-upgrade runs without privileges?
No, not any I am aware of, and I should know of all people, I guess. -- Ticket URL: <https://trac.macports.org/ticket/47592#comment:4> MacPorts <https://www.macports.org/> Ports system for OS X
#47592: File permissions causing warnings ----------------------+-------------------------------- Reporter: mp@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Not set | Milestone: Component: base | Version: 2.3.99 Resolution: | Keywords: Port: | ----------------------+-------------------------------- Comment (by mp@…): This seems to have been fixed, so that when correctly invoked with {{{ sudo port rev-upgrade }}} there are no complaints: {{{ $ sudo port rev-upgrade ---> Scanning binaries for linking errors ---> No broken files found. }}} However, on a little side note, if one "accidentally" does only {{{ port rev-upgrade }}} it naturally fails, but in a somewhat unfriendly way: {{{ $ port rev-upgrade ---> Scanning binaries for linking errors Warning: Error parsing file /opt/local/libexec/dbus-daemon-launch-helper: Error opening or reading file Warning: Error parsing file /opt/local/bin/cdda2wav: Error opening or reading file Warning: Error parsing file /opt/local/bin/cdrecord: Error opening or reading file Warning: Error parsing file /opt/local/bin/readcd: Error opening or reading file Warning: Error parsing file /opt/local/sbin/rscsi: Error opening or reading file Warning: Error parsing file /opt/local/lib/libADM6avcodec.56.dylib: Error opening or reading file Warning: Error parsing file /opt/local/lib/libADM6avformat.56.dylib: Error opening or reading file Warning: Error parsing file /opt/local/lib/libADM6avutil.54.dylib: Error opening or reading file Warning: Error parsing file /opt/local/lib/libADM6postproc.53.dylib: Error opening or reading file Warning: Error parsing file /opt/local/lib/libADM6swscale.3.dylib: Error opening or reading file Warning: Error parsing file /opt/local/libexec/ssh-keysign: Error opening or reading file ---> Found 101 broken file(s), matching files to ports ---> Found 1 broken port(s), determining rebuild order ---> Rebuilding in order avidemux @2.6.10 +aac+gettext+lame+sqlite+twolame+x264 Warning: MacPorts running without privileges. You may be unable to complete certain actions (e.g. install). ---> Computing dependencies for avidemux ---> Cleaning avidemux Warning: Only cleaning in ~/.macports; insufficient privileges for standard locations ---> Scanning binaries for linking errors Warning: Error parsing file /opt/local/libexec/dbus-daemon-launch-helper: Error opening or reading file Warning: Error parsing file /opt/local/bin/cdda2wav: Error opening or reading file Warning: Error parsing file /opt/local/bin/cdrecord: Error opening or reading file Warning: Error parsing file /opt/local/bin/readcd: Error opening or reading file Warning: Error parsing file /opt/local/sbin/rscsi: Error opening or reading file Warning: Error parsing file /opt/local/lib/libADM6avcodec.56.dylib: Error opening or reading file Warning: Error parsing file /opt/local/lib/libADM6avformat.56.dylib: Error opening or reading file Warning: Error parsing file /opt/local/lib/libADM6avutil.54.dylib: Error opening or reading file Warning: Error parsing file /opt/local/lib/libADM6postproc.53.dylib: Error opening or reading file Warning: Error parsing file /opt/local/lib/libADM6swscale.3.dylib: Error opening or reading file Warning: Error parsing file /opt/local/libexec/ssh-keysign: Error opening or reading file ---> Found 101 broken file(s), matching files to ports ---> Found 1 broken port(s), determining rebuild order ---> Rebuilding in order avidemux @2.6.10 +aac+gettext+lame+sqlite+twolame+x264 ---> Computing dependencies for avidemux ---> Fetching distfiles for avidemux ---> Attempting to fetch avidemux_2.6.10.tar.gz from http://osl.no.distfiles.macports.org/avidemux ---> Verifying checksums for avidemux ---> Extracting avidemux ---> Applying patches to avidemux ---> Configuring avidemux ---> Building avidemux ---> Staging avidemux into destroot Error: org.macports.uninstall for port avidemux returned: MacPorts requires root privileges for this action Warning: Failed to execute portfile from registry for avidemux @2.6.10_0+aac+gettext+lame+sqlite+twolame+x264 Error: org.macports.deactivate for port avidemux returned: MacPorts requires root privileges for this action Warning: Failed to execute portfile from registry for avidemux @2.6.10_0+aac+gettext+lame+sqlite+twolame+x264 ---> Deactivating avidemux @2.6.10_0+aac+gettext+lame+sqlite+twolame+x264 Error: Uninstall avidemux 2.6.10_0+aac+gettext+lame+sqlite+twolame+x264 failed: sqlite error: attempt to write a readonly database (8) Error rebuilding avidemux while executing "error "Error rebuilding $portname"" (procedure "revupgrade_scanandrebuild" line 395) invoked from within "revupgrade_scanandrebuild broken_port_counts $opts" (procedure "macports::revupgrade" line 5) invoked from within "macports::revupgrade $opts" (procedure "action_revupgrade" line 2) invoked from within "$action_proc $action $portlist [array get global_options]" (procedure "process_cmd" line 103) invoked from within "process_cmd $remaining_args" invoked from within "if { [llength $remaining_args] > 0 } { # If there are remaining arguments, process those as a command set exit_status [process_cmd $remaining..." (file "/opt/local/bin/port" line 5268) }}} Would be really nice if it could end with {{{ Error: org.macports.uninstall for port avidemux returned: MacPorts requires root privileges for this action }}} or maybe even better if it could stop with an informative error message __before__ trying to rebuild in this particular case, or even before the actual scan. Just an idea… -- Ticket URL: <https://trac.macports.org/ticket/47592#comment:5> MacPorts <https://www.macports.org/> Ports system for OS X
#47592: File permissions causing warnings ----------------------+---------------------- Reporter: mp@… | Owner: cal@… Type: defect | Status: assigned Priority: Not set | Milestone: Component: base | Version: 2.3.99 Resolution: | Keywords: Port: | ----------------------+---------------------- Changes (by cal@…): * owner: macports-tickets@… => cal@… * cc: cal@… (removed) * status: new => assigned Comment: I agree. -- Ticket URL: <https://trac.macports.org/ticket/47592#comment:6> MacPorts <https://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts