Opened 2 years ago

Closed 22 months ago

#5201 closed defect (fixed)

upgrade-path branch fails on windows

Reported by: robe Owned by: strk
Priority: blocker Milestone: PostGIS 3.4.0
Component: build Version: master
Keywords: Cc:

Description

strk I tried the upgrade-path branch, fails on make install for me.

https://git.osgeo.org/gitea/postgis/postgis/src/branch/upgrade-paths

With this error:

---- Making install in postgis
make[2]: Entering directory '/projects/postgis/tmp/postgis-build/3.3/extensions/postgis'
/bin/mkdir -p 'C:/MING64~1/projects/POSTGR~1/rel/PG15W6~2/share/extension'
/bin/mkdir -p 'C:/MING64~1/projects/POSTGR~1/rel/PG15W6~2/share/extension'
rm -f sql/postgis--TO--ANY.sql
echo '-- Just tag extension postgis version as "ANY"' > sql/postgis--TO--ANY.sql
echo '-- Installed by postgis 3.3.0dev' >> sql/postgis--TO--ANY.sql
echo '-- Built on Fri Aug  5 12:05:39 EDT 2022' >> sql/postgis--TO--ANY.sql
tpl='postgis--ANY--3.3.0dev.sql'; \
/bin/install -c -m 644 sql/${tpl} "C:/MING64~1/projects/POSTGR~1/rel/PG15W6~2/share/extension/${tpl}"; \
/bin/install -c -m 644 "sql/postgis--TO--ANY.sql" "C:/MING64~1/projects/POSTGR~1/rel/PG15W6~2/share/extension/postgis--TO--ANY.sql"; \
ln -fs "postgis--TO--ANY.sql" C:/MING64~1/projects/POSTGR~1/rel/PG15W6~2/share/extension/postgis--3.3.0dev--ANY.sql; \
/projects/postgis/tmp/postgis-build/3.3/loader/postgis install-upgrade-from-available
/extension: No such file or directory at /projects/postgis/tmp/postgis-build/3.3/loader/postgis line 96.
make[2]: *** [/projects/postgis/postgis-git/extensions/postgis/../upgrade-paths-rules.mk:8: install-upgrade-paths] Error 2
make[2]: Leaving directory '/projects/postgis/tmp/postgis-build/3.3/extensions/postgis'
make[1]: *** [Makefile:29: install] Error 1
make[1]: Leaving directory '/projects/postgis/tmp/postgis-build/3.3/extensions'
make: *** [GNUmakefile:24: install] Error 1

This is using out of tree build. I'll try again with in tree.

Change History (8)

comment:1 by robe, 2 years ago

Component: postgisbuild/upgrade/install
Milestone: PostGIS 3.3.0PostGIS 3.4.0
Owner: changed from pramsey to strk
Priority: mediumblocker

comment:2 by robe, 2 years ago

tried in tree too and fails:

---- Making install in postgis
make[2]: Entering directory '/projects/postgis/postgis-git/extensions/postgis'
/bin/mkdir -p 'C:/MING64~1/projects/POSTGR~1/rel/PG15W6~2/share/extension'
/bin/mkdir -p 'C:/MING64~1/projects/POSTGR~1/rel/PG15W6~2/share/extension'
rm -f sql/postgis--TO--ANY.sql
echo '-- Just tag extension postgis version as "ANY"' > sql/postgis--TO--ANY.sql
echo '-- Installed by postgis 3.3.0dev' >> sql/postgis--TO--ANY.sql
echo '-- Built on Fri Aug  5 14:01:21 EDT 2022' >> sql/postgis--TO--ANY.sql
tpl='postgis--ANY--3.3.0dev.sql'; \
/bin/install -c -m 644 sql/${tpl} "C:/MING64~1/projects/POSTGR~1/rel/PG15W6~2/share/extension/${tpl}"; \
/bin/install -c -m 644 "sql/postgis--TO--ANY.sql" "C:/MING64~1/projects/POSTGR~1/rel/PG15W6~2/share/extension/postgis--TO--ANY.sql"; \
ln -fs "postgis--TO--ANY.sql" C:/MING64~1/projects/POSTGR~1/rel/PG15W6~2/share/extension/postgis--3.3.0dev--ANY.sql; \
/projects/postgis/postgis-git/loader/postgis install-upgrade-from-available
/extension: No such file or directory at /projects/postgis/postgis-git/loader/postgis line 96.
make[2]: *** [../upgrade-paths-rules.mk:8: install-upgrade-paths] Error 2
make[2]: Leaving directory '/projects/postgis/postgis-git/extensions/postgis'
make[1]: *** [Makefile:29: install] Error 1
make[1]: Leaving directory '/projects/postgis/postgis-git/extensions'
make: *** [GNUmakefile:24: install] Error 1

I'm also not following what this is doing. If it's just going to install ANY and an ANY—to-latest.

It is not going to work for pg_upgrade so it can't go in.

In case of pg_upgrade, the version you are moving to will not have old files, where there will be no ANY from older versions.

comment:3 by strk, 23 months ago

Sounds like a problem extracting pg_config --sharedir. Is that supposed to work ?

comment:4 by strk, 23 months ago

Can you please try 6c357d61398563f7c00c06d8f74fb5423c1877cd in the upgrade-path branch ? You'll need to reset to get it

comment:5 by strk, 23 months ago

Regina is there a machine I can access to reproduce your prolblem ? It would be easier then to fix it

comment:6 by strk, 23 months ago

And to answer your question: the postgis install-upgrade-paths call would only ever install <from>—ANY files. Full help string for that command, as reported by postgis help:

  install-extension-upgrades [--pg_sharedir <dir>] [<from>...]
                Ensure files required to upgrade PostGIS from
                the given version are installed on the system.
                The <from> arguments may be either version numbers
                or PostgreSQL share directories to scan to find available
                ones.

And now I wonder if it should really have been called install-upgrade-paths as that's what it does…

Last edited 23 months ago by strk (previous) (diff)

comment:7 by strk, 22 months ago

The branch is now merged. Do you still have this problem as of commit [956ffd5f949c8dbef9ba14f70907b50673c403c2/git] ?

comment:8 by robe, 22 months ago

Resolution: fixed
Status: newclosed

master is working fine as far as I can tell. So if you merged already then this is fixed.

Note: See TracTickets for help on using tickets.