Bug 270088

Summary: /etc/dma/auth.conf for dma(8) is not installed by default
Product: Base System Reporter: pete
Component: confAssignee: Baptiste Daroussin <bapt>
Status: Closed FIXED    
Severity: Affects Some People CC: bapt, ceri, emaste, kevans
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch to install auth.conf
none
install auth.conf into share/examples directory
none
git formatted patch none

Description pete 2023-03-10 15:58:15 UTC
Created attachment 240724 [details]
patch to install auth.conf

I've noticed that on my systems running CURRENT /etc/dma/auth.conf is not installed, despite /etc/dma/dma.conf being present.  It's useful to have auth.conf present so users will easily understand the file format when setting up delivery to a remote MTA.

the attached patch takes care of this, and worked on my local workstation.
Comment 1 Kyle Evans freebsd_committer freebsd_triage 2023-03-10 20:41:39 UTC
CC bapt@, though I think this is clearly a positive with no downside and no net effect for most people.

One nit with the patch, but it's kind of a pre-existing issue: we can .PATH in contrib/dma to get their auth.conf, though I don't know off-hand how the search for dma.conf would work out between the one in libexec/dma/dmagent and the one in contrib/dma. I suspect the local dma.conf would still get selected.
Comment 2 pete 2023-03-14 21:04:28 UTC
Hey there kevans@ - just checking in on this PR.  Happy to generate a PR using .PATH as you suggest, if you could point me to an example file I can base my work off of.
Comment 3 Ceri Davies freebsd_committer freebsd_triage 2023-03-15 21:39:50 UTC
Another option may be to install into /usr/share/examples
Comment 4 pete 2023-03-15 22:45:38 UTC
(In reply to Ceri Davies from comment #3)
Oh, that seems like a much better idea!  I'll refactor the patch to do that - this way if the format changes in the future and the user already has an existing auth.conf they'll be able to quickly see what the new format is.
Comment 5 pete 2023-03-21 17:34:48 UTC
Created attachment 241042 [details]
install auth.conf into share/examples directory
Comment 6 pete 2023-03-21 17:36:44 UTC
Comment on attachment 241042 [details]
install auth.conf into share/examples directory

based on input from Ceri this installs auth.conf in /usr/share/examples.  this seems like a more logical location as the default dma.conf doesn't require this file in a default install.
Comment 7 pete 2023-05-11 22:50:32 UTC
Hello, just wanted to resurface this bug to see if someone could accept the attached diff.  Thanks!
Comment 8 Baptiste Daroussin freebsd_committer freebsd_triage 2023-05-12 07:27:15 UTC
Looks good to me, do you want to provide a git-formatted patch that we can incorporate as is?
Comment 9 pete 2023-05-12 17:37:30 UTC
Created attachment 242134 [details]
git formatted patch
Comment 10 pete 2023-05-12 17:40:16 UTC
(In reply to Baptiste Daroussin from comment #8)
thanks Bapt!  hopefully this updated diff i better formatted.
Comment 11 commit-hook freebsd_committer freebsd_triage 2023-05-15 07:21:12 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=d904b43ba3ffe2201f2c5aabcdc1af7709601d9a

commit d904b43ba3ffe2201f2c5aabcdc1af7709601d9a
Author:     Peter Wright <pete@nomadlogic.org>
AuthorDate: 2023-05-15 07:18:40 +0000
Commit:     Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2023-05-15 07:20:14 +0000

    dma: install a simple example for the auth.conf file

    PR:             270088
    MFC After:      3 days

 libexec/dma/dmagent/Makefile        | 2 +-
 libexec/dma/dmagent/auth.conf (new) | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)
Comment 12 commit-hook freebsd_committer freebsd_triage 2023-05-19 08:11:17 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=610641ec5f6e7f736301a3bb9e17bb551dab8752

commit 610641ec5f6e7f736301a3bb9e17bb551dab8752
Author:     Peter Wright <pete@nomadlogic.org>
AuthorDate: 2023-05-15 07:18:40 +0000
Commit:     Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2023-05-19 08:10:08 +0000

    dma: install a simple example for the auth.conf file

    PR:             270088
    MFC After:      3 days

    (cherry picked from commit d904b43ba3ffe2201f2c5aabcdc1af7709601d9a)

 libexec/dma/dmagent/Makefile        | 2 +-
 libexec/dma/dmagent/auth.conf (new) | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)