Created attachment 244284 [details] fix %%REQ_MYSQL%% and %%REQ_PGSQL%% replacement in bacula-dir rc.d script The two replacements mentioned above no longer work since revision 448638. The error was then included in the newer Bacula servers. https://svnweb.freebsd.org/ports?view=revision&revision=448638
Created attachment 244285 [details] fix %%REQ_MYSQL%% and %%REQ_PGSQL%% replacement in bacula-dir rc.d script
wow, thanks for mentioning this.
At present, it looks like this: # REQUIRE: DAEMON %%REQ_MYSQL%% %%REQ_PGSQL%% This is how that was set during bacula5 days: SUB_LIST+= REQ_MYSQL=mysql REQ_PGSQL="" See https://cgit.freebsd.org/ports/tree/sysutils/bacula5-server/Makefile?id=ae6ca1f5b3de7a3801fa1c7d553fc4b949e816d5#n132
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=9a1289a8b3d2d0c8a0e1fc3c8937332b2136cf58 commit 9a1289a8b3d2d0c8a0e1fc3c8937332b2136cf58 Author: Dan Langille <dvl@FreeBSD.org> AuthorDate: 2023-08-22 19:49:16 +0000 Commit: Dan Langille <dvl@FreeBSD.org> CommitDate: 2023-08-22 20:01:44 +0000 sysutils/bacula*-server: set rc.d REQUIRES Correctly set the REQUIRES for bacula-dir to one of: * mysql * postgresql This setting was lost sometime after bacula5-server While here, remove a space within files/bacula-dir.in so the resulting REQUIRES contains only one space. PR: 273296 sysutils/bacula11-server/Makefile | 5 ++++- sysutils/bacula11-server/files/bacula-dir.in | 2 +- sysutils/bacula13-server/Makefile | 5 ++++- sysutils/bacula13-server/files/bacula-dir.in | 2 +- sysutils/bacula9-server/Makefile | 6 ++++-- sysutils/bacula9-server/files/bacula-dir.in | 2 +- 6 files changed, 15 insertions(+), 7 deletions(-)
Thank you
But you can choose MYSQL and PGSQL as backend at the same time. That's why I used SUB_LIST and SUB_LIST_OFF.
(In reply to Lars Herschke from comment #6) I apologize. I did not notice the patch. Sorry about that. I will fix now.
The += in SUB_LIST is also not necessary in my opinion. The Porter's manual says the following about this. "When option OPT is selected, the value of OPT_ABOVEVARIABLE, if defined, is appended to ABOVEVARIABLE. OPT_ABOVEVARIABLE_OFF works the same way, but when OPT is not selected."
(In reply to Lars Herschke from comment #8) I agreee. Thank you. They have been removed.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=287a7ddd9b6935b8eb93775b6940eb8060e2ea31 commit 287a7ddd9b6935b8eb93775b6940eb8060e2ea31 Author: Dan Langille <dvl@FreeBSD.org> AuthorDate: 2023-08-22 22:51:59 +0000 Commit: Dan Langille <dvl@FreeBSD.org> CommitDate: 2023-08-22 22:57:55 +0000 sysutils/bacula*-server: rc.d corrections When both MySQL and PostgreSQL are selected, make sure the rc.d script is correct. Further more, I must reverse my clever idea to "remove a space within files/bacula-dir.in". Next time, I should notice the PR contains a patch for the problem I'm fixing. PR: 273296 sysutils/bacula11-server/Makefile | 8 +++++--- sysutils/bacula11-server/files/bacula-dir.in | 2 +- sysutils/bacula13-server/Makefile | 8 +++++--- sysutils/bacula13-server/files/bacula-dir.in | 2 +- sysutils/bacula9-server/Makefile | 8 +++++--- sysutils/bacula9-server/files/bacula-dir.in | 2 +- 6 files changed, 18 insertions(+), 12 deletions(-)
(In reply to Lars Herschke from comment #8) Thank you for your help. I regret not noticing the patch.
^Triage: assign to committer who resolved the issue. Dan, can this PR be closed?
Thanks for your really fast handling of the PR.
(In reply to Fernando Apesteguía from comment #12) Yes, thanks.