Bug 263691 - /etc/devd/hyperv.conf belongs into FreeBSD-hyperv-tools
Summary: /etc/devd/hyperv.conf belongs into FreeBSD-hyperv-tools
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 13.1-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-30 21:07 UTC by Mina Galić
Modified: 2022-11-08 21:36 UTC (History)
3 users (show)

See Also:


Attachments
move devd's hyperv.conf to hyperv-tools (294 bytes, patch)
2022-05-02 13:07 UTC, Mina Galić
no flags Details | Diff
move devd's hyperv.conf to hyperv-tools (802 bytes, patch)
2022-05-03 16:10 UTC, Mina Galić
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mina Galić freebsd_triage 2022-04-30 21:07:41 UTC
after removing FreeBSD-hyperv-tools, i'm getting:

Starting devd.
sh: /usr/libexec/hyperv/hyperv_vfattach: not found

That's because /etc/devd/hyperv.conf is currently in FreeBSD-utilities, but it doesn't make sense there without FreeBSD-hyperv-tools.
It should be moved to that package.
Comment 1 Mina Galić freebsd_triage 2022-04-30 22:58:03 UTC
correction: s/FreeBSD-utilities/FreeBSD-runtime/g
Comment 2 Mina Galić freebsd_triage 2022-05-02 13:07:01 UTC
Created attachment 233660 [details]
move devd's hyperv.conf to hyperv-tools

following the example in share/examples/Makefile, i believe that this patch would solve the problem:

```
diff --git a/sbin/devd/Makefile b/sbin/devd/Makefile
index ffc0a9a65a27..7bbf3ed2c059 100644
--- a/sbin/devd/Makefile
+++ b/sbin/devd/Makefile
@@ -14,6 +14,7 @@ DEVD+=	asus.conf
 
 .if ${MK_HYPERV} != "no"
 DEVD+=	hyperv.conf
+PACKAGE_hyperv.conf= hyperv-tools
 .endif
 
 .if ${MK_USB} != "no"
```

i can submit this to phabricator, too.
Comment 3 Mina Galić freebsd_triage 2022-05-02 14:08:13 UTC
turns out, share/examples/Makefile is entirely wrong!

the correct way to do this is probably best shown in libexec/rc/rc.d/Makefile

i'm going to submit a fix for devd+hyperv-tools, and then look how to do the same for share/examples
Comment 4 Mina Galić freebsd_triage 2022-05-03 16:10:20 UTC
Created attachment 233702 [details]
move devd's hyperv.conf to hyperv-tools

new, actual patch. built the packages, and this is the result:

```
meena@meena /p/d/i/1/F/latest> pkg list -l -F ./FreeBSD-run* | grep devd
/etc/devd.conf
/etc/devd/asus.conf
/etc/devd/devmatch.conf
/etc/devd/uath.conf
/etc/devd/ulpt.conf
/etc/devd/zfs.conf
/sbin/devd
/usr/share/man/man5/devd.conf.5.gz
/usr/share/man/man8/devd.8.gz
meena@meena /p/d/i/1/F/latest> pkg list -l -F ./FreeBSD-hyperv* | grep devd
/etc/devd/hyperv.conf
meena@meena /p/d/i/1/F/latest>
```
Comment 5 commit-hook freebsd_committer freebsd_triage 2022-05-03 16:17:21 UTC
A commit in branch main references this bug:

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

commit 7ac164dc8e2ec3e6d3cda1d9ca13d461a534a6e8
Author:     Mina Galić <me+freebsd@igalic.co>
AuthorDate: 2022-05-02 14:49:43 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2022-05-03 16:15:54 +0000

    pkgbase: move devd's hyperv.conf to hyperv-tools package

    This devd config file is useless without hyperv-tools, so we're moving
    it into the hyperv-tools package. pr#263691

    PR:             263691
    MFC after:      3 days

 sbin/devd/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Comment 6 commit-hook freebsd_committer freebsd_triage 2022-05-16 15:26:09 UTC
A commit in branch stable/13 references this bug:

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

commit c3c44de5f08220c1b5d0a0bb06455ae7f4d0799a
Author:     Mina Galić <me+freebsd@igalic.co>
AuthorDate: 2022-05-02 14:49:43 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2022-05-16 15:25:23 +0000

    pkgbase: move devd's hyperv.conf to hyperv-tools package

    This devd config file is useless without hyperv-tools, so we're moving
    it into the hyperv-tools package. pr#263691

    PR:             263691
    MFC after:      3 days

    (cherry picked from commit 7ac164dc8e2ec3e6d3cda1d9ca13d461a534a6e8)

 sbin/devd/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)