Bug 264161 - databases/postgresql12-server: %%PG_VERSION%% not expanded in rc script
Summary: databases/postgresql12-server: %%PG_VERSION%% not expanded in rc script
Status: Closed DUPLICATE of bug 264097
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: pgsql
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-22 21:08 UTC by Vidar Karlsen
Modified: 2022-05-24 07:04 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (pgsql)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vidar Karlsen 2022-05-22 21:08:08 UTC
A change introduced in commit 5b11f47f0d59c95f6dcf1ff75badede5ec84e72e [1] causes postgresql12-server not to be able to start via its rc script.

The %%PG_VERSION%% variable does not get expanded, and the resulting rc script ends up using the literal string.

This likely affects versions 10 through 14 as their files/postgresql.in files all have the same string on line 35. As a side note, postgresql15-server is hardcoded to point to ${postgresql_user}/data14 which might cause some funny issues as well.

The problem was reported earlier in #264097 but the PR was closed because it referenced portmaster and not postgresqlXX-server.

[1] diff excerpt:
-eval postgresql_data=${postgresql_data:-"~${postgresql_user}/data12"}
+eval postgresql_data=${postgresql_data:-"~${postgresql_user}/data%%PG_VERSION%%"}
Comment 1 Craig Leres freebsd_committer freebsd_triage 2022-05-24 01:43:29 UTC
Looking at the poudriere built postgresql13-server packages by my 13.1 server I see that the 12.3 version has the problem but the 13.1 version does not. I even rebuilt the 12.3 version with no change.

I played around a bit with interactive poudriere jails (12.3 and 13.1) but could not reproduce the issue.
Comment 2 Palle Girgensohn freebsd_committer freebsd_triage 2022-05-24 07:04:21 UTC
This was a problem fixed in commit 9230d75a823cc4191f (bug #264097)

Palle
Comment 3 Palle Girgensohn freebsd_committer freebsd_triage 2022-05-24 07:04:35 UTC

*** This bug has been marked as a duplicate of bug 264097 ***