Bug 275205 - dns/coredns: change working directory to load extra config files
Summary: dns/coredns: change working directory to load extra config files
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Yuri Victorovich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-20 03:25 UTC by King John
Modified: 2023-12-18 02:33 UTC (History)
1 user (show)

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


Attachments
change working directory in precmd (2.32 KB, patch)
2023-11-20 03:25 UTC, King John
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description King John 2023-11-20 03:25:53 UTC
Created attachment 246435 [details]
change working directory in precmd

dns/coredns: fix hosts file can not be load from Corefile

Change working directory to config directory before running service.
The cwd of coredns daemon was /, need to be changed to config directory where Corefile stays.
eg.
    >example.com {
    >  hosts example.hosts {
    >    reload 300s
    >    fallthrough
    >  }
    >}
example.hosts file now can be placed in config directory("/usr/local/etc/coredns", by default).
Comment 1 King John 2023-12-17 13:25:44 UTC
Any update for this PR?
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2023-12-18 02:32:13 UTC
Thanks for the patch.

Committed.

Sorry for the delay!
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-12-18 02:33:19 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8e5b0e862a71f5d454f90e09378459ac3dd0ca91

commit 8e5b0e862a71f5d454f90e09378459ac3dd0ca91
Author:     yjqg6666 <jinking.this@gmail.com>
AuthorDate: 2023-12-18 02:31:20 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2023-12-18 02:32:24 +0000

    dns/coredns: change working directory to load extra config files

    PR:             275205

 dns/coredns/Makefile         | 2 +-
 dns/coredns/files/coredns.in | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)