Opened 5 years ago

Closed 4 years ago

#60445 closed defect (fixed)

grass7 @7.8.3: ERROR: Your install directory /opt/local/share/grass78 is not writable

Reported by: dershow Owned by: nila <n_larsson@…>
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: Cc:
Port: grass7

Description

I just attempted to upgrade grass7 from 7.8.2_1 to 7.8.3_0. It built fine, but then failed during staging:

--->  Computing dependencies for grass7
--->  Fetching archive for grass7
--->  Attempting to fetch grass7-7.8.3_0+postgresql10+python37.darwin_18.x86_64.tbz2 from https://packages.macports.org/grass7
--->  Attempting to fetch grass7-7.8.3_0+postgresql10+python37.darwin_18.x86_64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/grass7
--->  Attempting to fetch grass7-7.8.3_0+postgresql10+python37.darwin_18.x86_64.tbz2 from http://aus.us.packages.macports.org/macports/packages/grass7
--->  Fetching distfiles for grass7
--->  Attempting to fetch grass-7.8.3.tar.gz from https://distfiles.macports.org/grass7
--->  Verifying checksums for grass7                                                 
--->  Extracting grass7
--->  Applying patches to grass7
--->  Configuring grass7
--->  Building grass7
--->  Staging grass7 into destroot
Error: Failed to destroot grass7: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_gis_grass7/grass7/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.

I've attached the log file. The actual error from the log seems to be:

:info:destroot ERROR: Your install directory /opt/local/share/grass78 is not writable.

Attachments (1)

main.log (8.1 MB) - added by dershow 5 years ago.

Change History (16)

Changed 5 years ago by dershow

Attachment: main.log added

comment:1 Changed 5 years ago by nilason (Nicklas Larsson)

You didn't forget sudo, as in sudo port upgrade grass7?

comment:2 Changed 5 years ago by dershow

No I didn't. I did sudo port -u upgrade outdated and a few other ports upgraded just fine, then it got to grass7 and gave the error.

comment:3 Changed 5 years ago by nilason (Nicklas Larsson)

No I didn't. I did sudo port -u upgrade outdated and a few other ports upgraded just fine, then it got to grass7 and gave the error.

Figured that much, but asked to be sure. I have not tried upgrading for this upgrade (only clean and install).

If you try:

sudo port clean grass7
sudo port install grass7

does it work?

comment:4 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

Summary: grass7 upgrade fails at staginggrass7 @7.8.3: ERROR: Your install directory /opt/local/share/grass78 is not writable
Version: 2.6.2

The installation appears to be trying to write directly into /opt/local/share/grass78, bypassing the destroot. Indeed MacPorts does and should prevent that. Ports must install into the destroot.

We didn't see the same build failure on our build server. I'm not sure why it failed to build on your system. We need to investigate and fix that.

The reason why you didn't get our prebuilt binary is that you're using the +python37 and +postgresql10 variants. The default postgresql variant became +postgresql12 as of grass7 @7.8.1 and the default python variant became +python38 as of grass7 @7.8.2. If you don't mind using postgresql12 instead of postgresql10 and python38 instead of python37, you could avoid the problem by running sudo port clean grass7 and sudo port install grass7 +python38 +postgresql12.

comment:5 in reply to:  4 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to ryandesign:

The installation appears to be trying to write directly into /opt/local/share/grass78, bypassing the destroot.

Looking at it more closely, I see the Makefile target install-check-writable is failing, and this target wants to ensure that the directory /opt/local/share/grass78 either does not exist, or does exist and is writable. On our build systems the directory does not exist which satisfies the check. What about on your system? Does the directory exist, and if so what are its permissions and ownership? Find out with ls -ld /opt/local/share/grass78

The reason why you didn't get our prebuilt binary is that you're using the +python37 and +postgresql10 variants.

Actually, my mistake: the grass7 port is not distributable, so you can't get a binary from us regardless what variants you use.

comment:6 Changed 5 years ago by nilason (Nicklas Larsson)

I have no problem with +python37 and +postgresql10

$port installed
...
  grass7 @7.8.3_0+gui+postgresql10+python37+zstd (active)
...

comment:7 Changed 5 years ago by willic3 (Charles Williams)

I get the same problem. The permissions on the directory in question are:

drwxr-xr-x 25 macports wheel 800 Feb  4 15:25 /opt/local/share/grass78

These permissions are definitely different than other directories in that same directory. For example:

drwxr-xr-x  19 root     wheel    608 May  1 14:57 inkscape

I am trying to upgrade grass7 @7.8.2_1+ffmpeg+postgresql12+python37+sqlite. I have not yet tried uninstalling and then reinstalling.

comment:8 in reply to:  3 Changed 5 years ago by dershow

Replying to nilason:

No I didn't. I did sudo port -u upgrade outdated and a few other ports upgraded just fine, then it got to grass7 and gave the error.

Figured that much, but asked to be sure. I have not tried upgrading for this upgrade (only clean and install).

If you try:

sudo port clean grass7
sudo port install grass7

does it work?

I just tried and it doesn't work.

comment:9 Changed 5 years ago by dershow

I see the same thing as @willic3

$ ls -ld /opt/local/share/grass78
drwxr-xr-x  25 macports  wheel  800 Feb  3 10:46 /opt/local/share/grass78

I don't believe that I actively selected +postgresql10+python37 but instead that those were the defaults for an older version of grass7 and have stayed selected on my machine. I have not tried to completely uninstall, but I'm hesitant to do that because I would like to have a functional grass7 and don't want to uninstall when I can't get yet get the install to work.

comment:10 Changed 5 years ago by nilason (Nicklas Larsson)

I managed to revert to grass7 @7.8.2_1, trying doing an upgrade I can now reproduce the problem mentioned.

But:

sudo port uninstall grass7
sudo port clean grass7
sudo port install grass7

DOES work!

I noticed that:

$ ls -ld /opt/local/share/grass78
drwxr-xr-x  24 macports  wheel  768 May  7 14:43 /opt/local/share/grass78

was true for 7.8.2_1 as well as for grass7 @7.8.3_0.

This issue with upgrading should be solved, but in the meantime I dare to suggest to uninstall-clean-install (but on your own risk :) - there are a bunch of important fixes for this version.

comment:11 Changed 5 years ago by nilason (Nicklas Larsson)

If you do try the uninstall-clean-install way, please tell us how it went (regardless with success or not).

comment:12 Changed 5 years ago by dershow

I tried that (and on the install, I let it choose the default variants, except that I did +gui) and it built and installed fine.

comment:13 in reply to:  12 Changed 5 years ago by nilason (Nicklas Larsson)

Replying to dershow:

I tried that (and on the install, I let it choose the default variants, except that I did +gui) and it built and installed fine.

Great! You may now try any variant you may need. (But I personally wouldn't choose pre-python 3.6 unless necessary -- default python is just fine).

comment:14 Changed 5 years ago by nilason (Nicklas Larsson)

The PR https://github.com/macports/macports-ports/pull/7038 presents a fix for this issue.

comment:15 Changed 4 years ago by nila <n_larsson@…>

Owner: set to nila <n_larsson@…>
Resolution: fixed
Status: newclosed

In 4e2a26e42de94067ac78b3f26dbb54d5931158e0/macports-ports (master):

grass7: fix upgrading failure

Fixes: #60445

Note: See TracTickets for help on using tickets.