[MacPorts] #44764: coreutils 8.23_0 failed to upgrade
#44764: coreutils 8.23_0 failed to upgrade ------------------------+-------------------------------- Reporter: jschnide@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.99 Keywords: | Port: coreutils ------------------------+-------------------------------- yosemite DP 6, port upgrade outdated, coreutils 8.22_0 < 8.23_0 failed to upgrade. find log attached. -- Ticket URL: <https://trac.macports.org/ticket/44764> MacPorts <http://www.macports.org/> Ports system for OS X
#44764: coreutils 8.23_0 failed to upgrade -------------------------+-------------------------- Reporter: jschnide@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.99 Resolution: | Keywords: Port: coreutils | -------------------------+-------------------------- Changes (by cal@…): * owner: macports-tickets@… => ryandesign@… Comment: Seems to be a regression introduced by Ryan in r124489. Ryan? -- Ticket URL: <https://trac.macports.org/ticket/44764#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X
#44764: coreutils 8.23_0 failed to upgrade -------------------------+-------------------------- Reporter: jschnide@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.99 Resolution: | Keywords: Port: coreutils | -------------------------+-------------------------- Comment (by cal@…): Also, you don't happen to have `macportsuser root` in your `$prefix/etc/macports/macports.conf`, do you? -- Ticket URL: <https://trac.macports.org/ticket/44764#comment:2> MacPorts <http://www.macports.org/> Ports system for OS X
#44764: coreutils 8.23_0 failed to upgrade -------------------------+-------------------------- Reporter: jschnide@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.99 Resolution: | Keywords: Port: coreutils | -------------------------+-------------------------- Comment (by braumann@…): Get the same error on my good old 10.5.8 PPC box, but as far as I can remember, had no problems on a 10.6.8 Intel machine earlier today ... -- Ticket URL: <https://trac.macports.org/ticket/44764#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X
#44764: coreutils 8.23_0 failed to upgrade -------------------------+-------------------------- Reporter: jschnide@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.99 Resolution: | Keywords: Port: coreutils | -------------------------+-------------------------- Comment (by jschnide@…): Replying to [comment:2 cal@…]:
Also, you don't happen to have `macportsuser root` in your `$prefix/etc/macports/macports.conf`, do you?
I have done a standard install from the instructions that were current when I installed. I have seen feedback from the install and upgrades commands with something about 'macportsuser root`. Where can I find information about this and put it in to my setup (if I need to)? I would prefer not to delete and reinstall everything. -- Ticket URL: <https://trac.macports.org/ticket/44764#comment:5> MacPorts <http://www.macports.org/> Ports system for OS X
#44764: coreutils 8.23_0 failed to upgrade -------------------------+-------------------------- Reporter: jschnide@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.99 Resolution: | Keywords: Port: coreutils | -------------------------+-------------------------- Comment (by ryandesign@…): jschnide: as cal said, check your macports.conf file. What does it say about macportsuser? The default and usually correct value for this setting is "macports", and you would also need an OS X user account by that name. The MacPorts installer package would have created this for you and set it up for you this way. Your macportsuser should ''not'' be "root"; that defeats the purpose. -- Ticket URL: <https://trac.macports.org/ticket/44764#comment:6> MacPorts <http://www.macports.org/> Ports system for OS X
#44764: coreutils 8.23_0 failed to upgrade -------------------------+-------------------------- Reporter: jschnide@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.99 Resolution: | Keywords: Port: coreutils | -------------------------+-------------------------- Comment (by jschnide@…): Please find attached macports.conf file. There is no macportsuser OS X user account. What steps need to be done to get things set up properly? Or would it be better to wipe everything and reinstall everything? -- Ticket URL: <https://trac.macports.org/ticket/44764#comment:7> MacPorts <http://www.macports.org/> Ports system for OS X
#44764: coreutils 8.23_0 failed to upgrade -------------------------+-------------------------- Reporter: jschnide@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.99 Resolution: | Keywords: Port: coreutils | -------------------------+-------------------------- Comment (by cal@…): Your setup seems to be correct. In this case, there might be a problem with the Portfile. -- Ticket URL: <https://trac.macports.org/ticket/44764#comment:8> MacPorts <http://www.macports.org/> Ports system for OS X
#44764: coreutils 8.23_0 failed to upgrade -------------------------+-------------------------- Reporter: jschnide@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.99 Resolution: | Keywords: Port: coreutils | -------------------------+-------------------------- Comment (by braumann@…): In my macports.conf on my old 10.5.8. PPC I found this definition line not commented out: {{{ # Set the user to run MacPorts compiles, etc as when privileges are dropped during an install macportsuser root }}} After simply putting a leading # here like {{{ #macportsuser root }}} I cleaned {{{ sudo port clean coreutils }}} and called again {{{ sudo port upgrade coreutils }}} by this doing a smooth upgrade. However, I have a {{{macports}}} installation since more than five years and I never ever had to manually touch the {{{macports.conf}}} before. So I have no idea why this line was previously not commented out, and I also have no idea about possible side effects which may arise from my manipulation. I also need to say that on a much more recent {{{macports}}} installation on a 10.6.8 i386 initially made in 2013 this line was commented out, so no problems had occurred during the upgrade of {{{coreutils}}} to version 8.23_0. -- Ticket URL: <https://trac.macports.org/ticket/44764#comment:9> MacPorts <http://www.macports.org/> Ports system for OS X
#44764: coreutils 8.23_0 failed to upgrade -------------------------+-------------------------- Reporter: jschnide@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.99 Resolution: | Keywords: Port: coreutils | -------------------------+-------------------------- Comment (by ryandesign@…): Replying to [comment:9 braumann@…]:
However, I have a {{{macports}}} installation since more than five years and I never ever had to manually touch the {{{macports.conf}}} before. So I have no idea why this line was previously not commented out, and I also have no idea about possible side effects which may arise from my manipulation.
Because we changed the defaults a few years ago. It's your responsibility, every time MacPorts base is updated, to compare the contents of your macports.conf (which MacPorts never touches) with macports.conf.default in the same directory (which is updated by MacPorts), and adopt any changes from the latter into the former. The side effects of changing the macportsuser from root to macports is that strange ports will no longer have free reign to read or write files anywhere they please; they're now restricted to reasonable locations. This is a good thing—it's more secure—and it's why we made this change in the defaults. -- Ticket URL: <https://trac.macports.org/ticket/44764#comment:10> MacPorts <http://www.macports.org/> Ports system for OS X
#44764: coreutils 8.23_0 failed to upgrade -------------------------+-------------------------- Reporter: jschnide@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.99 Resolution: | Keywords: Port: coreutils | -------------------------+-------------------------- Comment (by ryandesign@…): Replying to [comment:7 jschnide@…]:
Please find attached macports.conf file. There is no macportsuser OS X user account. What steps need to be done to get things set up properly? Or would it be better to wipe everything and reinstall everything?
The name of the setting in macports.conf is "macportsuser"; its value, and the name of the OS X user account, is usually "macports". You may not see this account in System Preferences; you can run "`id macports`" on the command line to see if that user is defined. -- Ticket URL: <https://trac.macports.org/ticket/44764#comment:11> MacPorts <http://www.macports.org/> Ports system for OS X
#44764: coreutils 8.23_0 failed to upgrade -------------------------+-------------------------- Reporter: jschnide@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.99 Resolution: | Keywords: Port: coreutils | -------------------------+-------------------------- Comment (by ryandesign@…): Replying to [comment:8 cal@…]:
Your setup seems to be correct. In this case, there might be a problem with the Portfile.
The only problem with the portfile is that it does not allow itself to be used as root. Admittedly this is an unusual restriction and I could revert r124489 to allow this again. However it seems that users are unaware that they are running as root and are unaware of the security implications of doing that, so perhaps that's what we should fix instead. jschnide, your log does not include the usual privilege-dropping lines. Usually one starts MacPorts with `sudo`, thus giving it root privileges. MacPorts then quickly gives up those privileges and switches to the unprivileged `macports` user, but in your log, that's not happening. Do you have any idea why? Since you're running MacPorts on a system for which we don't provide binaries yet, I presume you compiled MacPorts from source. What configure arguments did you use? -- Ticket URL: <https://trac.macports.org/ticket/44764#comment:12> MacPorts <http://www.macports.org/> Ports system for OS X
#44764: coreutils 8.23_0 failed to upgrade -------------------------+-------------------------- Reporter: jschnide@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.99 Resolution: | Keywords: Port: coreutils | -------------------------+-------------------------- Comment (by jschnide@…): Replying to [comment:12 ryandesign@…]:
The only problem with the portfile is that it does not allow itself to be used as root. Admittedly this is an unusual restriction and I could revert r124489 to allow this again. However it seems that users are unaware that they are running as root and are unaware of the security implications of doing that, so perhaps that's what we should fix instead.
jschnide, your log does not include the usual privilege-dropping lines. Usually one starts MacPorts with `sudo`, thus giving it root privileges. MacPorts then quickly gives up those privileges and switches to the unprivileged `macports` user, but in your log, that's not happening. Do you have any idea why? Since you're running MacPorts on a system for which we don't provide binaries yet, I presume you compiled MacPorts from source. What configure arguments did you use?
I did nothing unusual. I first used the uninstall instructions on the macports web pages. I then did copy and paste from the install page on how to install from source on the macports web pages. My standard process is to sudo bash, port -d selfupdate, port upgrade outdated and then port -f uninstall inactive. Just to clarify, what process should be followed whenever macports is updated? Should users should replace macports.conf with macports.conf.defaults? I've been macports for many years as what aware of this step. Thanks -- Ticket URL: <https://trac.macports.org/ticket/44764#comment:13> MacPorts <http://www.macports.org/> Ports system for OS X
#44764: coreutils 8.23_0 failed to upgrade -------------------------+-------------------------- Reporter: jschnide@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.99 Resolution: | Keywords: Port: coreutils | -------------------------+-------------------------- Comment (by ryandesign@…): Replying to [comment:13 jschnide@…]:
I did nothing unusual. I first used the uninstall instructions on the macports web pages. I then did copy and paste from the install page on how to install from source on the macports web pages. My standard process is to sudo bash, port -d selfupdate, port upgrade outdated and then port -f uninstall inactive.
Instead of running `sudo bash`, try running `sudo -s`. Also, instead of `port upgrade outdated` and then `port -f uninstall inactive`, you could just run `port -u upgrade outdated`.
Just to clarify, what process should be followed whenever macports is updated? Should users should replace macports.conf with macports.conf.defaults?
If you have not made any edits to your macports.conf, replacing it with macports.conf.default would be acceptable. However if you have made edits to macports.conf that you wish to keep, you should compare the two files and figure out what you want to do with each line.
I've been using macports for many years and was not aware of this step.
We should document this requirement better. -- Ticket URL: <https://trac.macports.org/ticket/44764#comment:14> MacPorts <http://www.macports.org/> Ports system for OS X
#44764: coreutils 8.23_0 failed to upgrade -------------------------+-------------------------- Reporter: jschnide@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.99 Resolution: | Keywords: Port: coreutils | -------------------------+-------------------------- Comment (by macports.org@…):
We should document this requirement better.
Maybe hash the `.conf.default`, on upgrade see if `.conf.default` has changed and if it has: * if `.conf` is a straight copy of the old `.conf.default` upgrade it directly * otherwise print a note that defaults have changed and the local configuration may need to be upgraded Because I was also unaware of this requirement, never touched `macports.conf` and the svn $Id$ of my old conf file (which I've now replaced with the current default) states it's from 2009 (revision 59588) -- Ticket URL: <https://trac.macports.org/ticket/44764#comment:15> MacPorts <http://www.macports.org/> Ports system for OS X
#44764: coreutils 8.23_0 failed to upgrade -------------------------+-------------------------- Reporter: jschnide@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.99 Resolution: | Keywords: Port: coreutils | -------------------------+-------------------------- Comment (by jschnide@…): Replying to [comment:14 ryandesign@…]:
Replying to [comment:13 jschnide@…]:
I did nothing unusual. I first used the uninstall instructions on the macports web pages. I then did copy and paste from the install page on how to install from source on the macports web pages. My standard process is to sudo bash, port -d selfupdate, port upgrade outdated and then port -f uninstall inactive.
Instead of running `sudo bash`, try running `sudo -s`. Also, instead of `port upgrade outdated` and then `port -f uninstall inactive`, you could just run `port -u upgrade outdated`.
Tried this and worked fine, I will continue to use this process.
Just to clarify, what process should be followed whenever macports is updated? Should users should replace macports.conf with macports.conf.defaults?
If you have not made any edits to your macports.conf, replacing it with macports.conf.default would be acceptable. However if you have made edits to macports.conf that you wish to keep, you should compare the two files and figure out what you want to do with each line.
I made the replacement and did: port clean --all coreutils port upgrade coreutils (it failed again) port uninstall coreutils port install coreutils (it failed again) Here are the last few lines of the log: :info:configure checking whether mkfifo rejects trailing slashes... no :info:configure checking whether mknod can create fifo without root privileges... configure: error: in `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_coreutils/coreutils/work/coreutils-8.23': :info:configure configure: error: you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check) :info:configure See `config.log' for more details :info:configure Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_coreutils/coreutils/work/coreutils-8.23" && ./configure --prefix=/opt/local --disable-silent-rules --program- prefix=g :info:configure Exit code: 1 :error:configure Failed to configure coreutils, consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_coreutils/coreutils/work/coreutils-8.23/config.log :error:configure Failed to configure coreutils: configure failure: command execution failed :debug:configure Error code: NONE :debug:configure Backtrace: configure failure: command execution failed while executing "$procedure $targetname" :error:configure See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_coreutils/coreutils/main.log for details. Let me know if you would like me to send along the full log. Many thanks for your time on this. Thanks -- Ticket URL: <https://trac.macports.org/ticket/44764#comment:16> MacPorts <http://www.macports.org/> Ports system for OS X
#44764: coreutils 8.23_0 failed to upgrade -------------------------+-------------------------- Reporter: jschnide@… | Owner: ryandesign@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.99 Resolution: fixed | Keywords: Port: coreutils | -------------------------+-------------------------- Changes (by ryandesign@…): * status: new => closed * resolution: => fixed Comment: Replying to [comment:16 jschnide@…]:
{{{ :info:configure configure: error: you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check) }}}
I do not know why your MacPorts continues to try to run the configure phase as root. It should not, and it is unsafe to do so, but since I don't know how else to help you, I reverted r124489 in r125500. -- Ticket URL: <https://trac.macports.org/ticket/44764#comment:17> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts