Skip to content

Conversation

@nilason
Copy link
Contributor

@nilason nilason commented Feb 18, 2025

Partially reverts 61e38c2, but more importantly hardcodes versioned GISBASE path on Alpine.

@nilason nilason added this to the 8.5.0 milestone Feb 18, 2025
@github-actions github-actions bot added the docker Docker related label Feb 18, 2025
@neteler
Copy link
Member

neteler commented Feb 18, 2025

hardcodes versioned GISBASE path on Alpine

Out of curiosity: why is $(grass --config path) no longer usable?

@nilason
Copy link
Contributor Author

nilason commented Feb 18, 2025

GDAL-GRASS plugin now works on Alpine too:

Testing the GDAL-GRASS plugins:
  GRASS -raster- (ro): GRASS Rasters (7+)
  OGR_GRASS -vector- (ro): GRASS Vectors (5.7+)

@nilason
Copy link
Contributor Author

nilason commented Feb 18, 2025

hardcodes versioned GISBASE path on Alpine

Out of curiosity: why is $(grass --config path) no longer usable?

I'm not absolutely sure, but I doubt it ever worked – only there were no tests before.

I think at this point grass --config path gave the un-versioned path:

RUN ln -sf /usr/local/grass $(grass --config path); \

... after:

ENV GISBASE /usr/local/grass

@nilason
Copy link
Contributor Author

nilason commented Feb 18, 2025

There is still a test failure on Alpine, which is unrelated and out-of-scope for this PR, where running:

https://github.com/OSGeo/grass/blob/main/docker/testdata/test_grass_session.py

...fails.

log extract
#27 2.786 Traceback (most recent call last):
#27 2.786   File "/scripts/test_grass_session.py", line 9, in <module>
#27 2.786     gs.create_project(project, epsg="25832")
#27 2.786   File "/usr/local/grass/etc/python/grass/script/core.py", line 1817, in create_project
#27 2.786     ps = pipe_command(
#27 2.787          ^^^^^^^^^^^^^
#27 2.787   File "/usr/local/grass/etc/python/grass/script/core.py", line 516, in pipe_command
#27 2.787     return start_command(*args, **kwargs)
#27 2.787            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#27 2.787   File "/usr/local/grass/etc/python/grass/script/core.py", line 437, in start_command
#27 2.788     return Popen(args, **popts)
#27 2.788            ^^^^^^^^^^^^^^^^^^^^
#27 2.788   File "/usr/local/grass/etc/python/grass/script/core.py", line 84, in __init__
#27 2.788     subprocess.Popen.__init__(self, args, **kwargs)
#27 2.788   File "/usr/lib/python3.12/subprocess.py", line 1028, in __init__
#27 2.788     self._execute_child(args, executable, preexec_fn, close_fds,
#27 2.788   File "/usr/lib/python3.12/subprocess.py", line 1963, in _execute_child
#27 2.789     raise child_exception_type(errno_num, err_msg, err_filename)
#27 2.789 FileNotFoundError: [Errno 2] No such file or directory: 'g.proj'

(Adding proj-dev was not the solution for that, more likely related to PATH).

@nilason nilason enabled auto-merge (squash) February 18, 2025 12:07
@nilason nilason added the backport to 8.4 PR needs to be backported to release branch 8.4 label Feb 18, 2025
@nilason
Copy link
Contributor Author

nilason commented Feb 18, 2025

These series of attempts to fix this should be manually (in merged form) back ported to 8.4 after 8.4.1 is released.

@nilason nilason merged commit 7bfe274 into OSGeo:main Feb 18, 2025
30 checks passed
@echoix
Copy link
Member

echoix commented Feb 18, 2025

I tried out locally the images yesterday, and was surprised by some errors. Just running with

docker run -it osgeo/grass:main-debian

And gives an error that something isn't it path. I researched a bit and it's related to not having an entry point defined.
I tried older 8.4.0 releases, and the other flavors.
I compared with actinia images, and that last one started right away.

I initially thought it because I had just enabled the containerd image store, but after reverting that (and confirming it worked as before), grass images had the same behavior

@wenzeslaus
Copy link
Member

... after:

ENV GISBASE /usr/local/grass

That variable GISBASE probably should not be set. The grass command should know that by itself. If the variable is set is and is wrong, the command gets confused. Maybe the script should ignore it.

@nilason
Copy link
Contributor Author

nilason commented Feb 18, 2025

... after:

ENV GISBASE /usr/local/grass

That variable GISBASE probably should not be set. The grass command should know that by itself. If the variable is set is and is wrong, the command gets confused. Maybe the script should ignore it.

With a symlink in place (from un-versioned GISBASE to versioned), which with this change fixes, it should work without setting GISBASE. I guess the need for setting it from the beginning, was that the setting of symlink didn't work out as expected.

@nilason nilason deleted the docker_again2 branch March 14, 2025 07:53
nilason added a commit to nilason/grass that referenced this pull request Nov 17, 2025
nilason added a commit to nilason/grass that referenced this pull request Nov 18, 2025
nilason added a commit to nilason/grass that referenced this pull request Nov 18, 2025
nilason added a commit that referenced this pull request Nov 18, 2025
@nilason nilason modified the milestones: 8.5.0, 8.4.2 Nov 18, 2025
@nilason nilason removed the backport to 8.4 PR needs to be backported to release branch 8.4 label Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Docker related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants