Bug 291853 - virtual_oss - no opt to not build/install
Summary: virtual_oss - no opt to not build/install
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 15.0-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: Christos Margiolis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-12-21 03:51 UTC by Ivan Rozhuk
Modified: 2026-02-03 09:43 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Rozhuk 2025-12-21 03:51:27 UTC
Since 15 virtual_oss is in base system.
I see no option in src.conf to disable it. No reasons to keep on server without sound support.
Comment 1 Christos Margiolis freebsd_committer freebsd_triage 2025-12-22 17:45:25 UTC
The virtual_oss rc service is not enabled by default, so the only "cost" is building it, which takes a couple of seconds at worst. That being said, if you use pkgbase, then no sound utility (including virtual_oss) will be installed unless you have FreeBSD-sound installed.

I do not think introducing yet another control just for this is worth it.
Comment 2 Marek Zarychta 2025-12-22 20:46:30 UTC
(In reply to Christos Margiolis from comment #1)
>I do not think introducing yet another control just for this is worth it.
What if someone else prepares the patch? Will you accept it?
Comment 3 Christos Margiolis freebsd_committer freebsd_triage 2025-12-22 20:57:20 UTC
(In reply to Marek Zarychta from comment #2)
I do not have an issue with writing the patch, I'm just trying to understand the benefit of this.
Comment 4 Marek Zarychta 2025-12-22 21:43:38 UTC
(In reply to Christos Margiolis from comment #3)
In the meantime, I found that 
WITHOUT_CUSE=yes will prevent building virtual_oss. That's maybe the workaround, but 
The file ./tools/build/mk/OptionalObsoleteFiles.inc is still missing this part, so virtual_oss files must be manually removed. 

>I'm just trying to understand the benefit of this.

FreeBSD is a mature operating system, and over the years, its installation and upgrade mechanisms have evolved significantly. The introduction of pkgbase may represent a kind of catharsis in this evolution, though it remains to be seen whether it is the final stage or just another step along the way.
Despite these changes, the traditional make buildworld and make installworld workflow is still fully supported, with no clear indication that it will be abandoned. When a dedicated build machine is available, this method remains the fastest and most convenient approach to system upgrades.
As users, we have every right to continue using and benefiting from this workflow, especially since it is one of the features that has long attracted a significant portion of the FreeBSD community and remains deeply familiar to them.
So regardless of whether the feature is controlled by MK_CUSE or by a new MK_ conditional, we want to retain the ability to use the traditional make workflow by simply adding a single entry to src.conf that prevents virtual_oss from being built and installed.
This is consistent with existing practice: for example, we can already build a kernel without sound driver modules by defining WITHOUT_MODULES=sound in src.conf. The same level of control and simplicity should continue to apply here.

Cheers 
Marek
Comment 5 Ivan Rozhuk 2025-12-23 07:27:00 UTC
(In reply to Christos Margiolis from comment #1)
It is optional component, it is developed in ext repo, it is not required to exist in most FBSD use cases.
Comment 6 Christos Margiolis freebsd_committer freebsd_triage 2026-01-02 16:22:34 UTC
(In reply to Marek Zarychta from comment #4)
Alright, no objection to this. Here's an initial patch: https://reviews.freebsd.org/D54456

(In reply to Ivan Rozhuk from comment #5)
It is no longer developed externally. At some point I'll retire the third-party repo and port entirely.
Comment 7 Ivan Rozhuk 2026-01-02 16:53:32 UTC
(In reply to Christos Margiolis from comment #6)
> It is no longer developed externally. At some point I'll retire the third-party repo and port entirely.

Does other BSD systems use it?
Comment 8 Christos Margiolis freebsd_committer freebsd_triage 2026-01-02 17:05:27 UTC
(In reply to Ivan Rozhuk from comment #7)
I haven't checked. If some FreeBSD fork OS does, they can use this one. But I'm not planning to retire this now, no need to worry.
Comment 9 commit-hook freebsd_committer freebsd_triage 2026-01-12 14:17:36 UTC
A commit in branch main references this bug:

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

commit f74f891581bc4df20431607de9b761107f6a0aa7
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2026-01-12 14:16:35 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-01-12 14:16:35 +0000

    src.opts: Introduce MK_SOUND

    PR:             291853
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Reviewed by:    zarychtam_plan-b.pwste.edu.pl, markj
    Differential Revision:  https://reviews.freebsd.org/D54456

 lib/Makefile                             |  3 ++-
 libexec/rc/rc.d/Makefile                 |  7 ++++---
 sbin/devd/Makefile                       | 12 +++++++-----
 share/mk/src.opts.mk                     |  6 ++++++
 tools/build/mk/OptionalObsoleteFiles.inc | 13 +++++++++++++
 tools/build/options/WITH_SOUND (new)     |  1 +
 usr.bin/Makefile                         |  2 ++
 usr.sbin/Makefile                        |  4 +++-
 8 files changed, 38 insertions(+), 10 deletions(-)
Comment 10 commit-hook freebsd_committer freebsd_triage 2026-01-21 16:07:52 UTC
A commit in branch stable/15 references this bug:

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

commit 2bee4bb7f1b3605fa0e44bed4578dc87fca2c694
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2026-01-12 14:16:35 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-01-21 16:06:42 +0000

    src.opts: Introduce MK_SOUND

    PR:             291853
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Reviewed by:    zarychtam_plan-b.pwste.edu.pl, markj
    Differential Revision:  https://reviews.freebsd.org/D54456

    (cherry picked from commit f74f891581bc4df20431607de9b761107f6a0aa7)
    (cherry picked from commit 37164224eefd11278b0203e1367e1d9d1454da3f)
    (cherry picked from commit 241a43cf9da8933f500e7d0df7fff621fd52168c)
    (cherry picked from commit cf34eb8264954a8fd1e92081bcf67719bddbc2aa)
    (cherry picked from commit 466bad427d74e666e85445729b2e63b82e10d18f)

 lib/Makefile                             |  4 ++--
 libexec/rc/rc.d/Makefile                 |  8 ++++----
 sbin/devd/Makefile                       | 12 +++++++-----
 share/man/man5/src.conf.5                |  7 ++++++-
 share/mk/src.opts.mk                     |  6 ++++++
 tools/build/mk/OptionalObsoleteFiles.inc | 13 +++++++++++++
 tools/build/options/WITHOUT_SOUND (new)  |  4 ++++
 tools/build/options/WITH_SOUND (new)     |  1 +
 usr.bin/Makefile                         |  4 ++--
 usr.sbin/Makefile                        |  6 +++---
 10 files changed, 48 insertions(+), 17 deletions(-)
Comment 11 Ivan Rozhuk 2026-01-21 20:24:55 UTC
Thanks!

But this is a bit strange to see:

+# CUSE is needed only by virtual_oss, but virtual_oss is part of MK_SOUND.
+.if ${MK_CUSE} == "no"
+MK_SOUND:= no
+.endif
+

and

+SUBDIR.${MK_CUSE}.${MK_SOUND}+=	virtual_oss

First one looks like artifact to remove.
Comment 12 commit-hook freebsd_committer freebsd_triage 2026-01-30 16:16:23 UTC
A commit in branch main references this bug:

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

commit b9289743f40dae677f910be1d3e56198a3a3ff9b
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2026-01-30 16:14:28 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-01-30 16:14:28 +0000

    src.opts: Remove MK_SOUND artifact

    Fixes:          f74f891581bc ("src.opts: Introduce MK_SOUND")
    PR:             291853
    Sponsored by:   The FreeBSD Foundation
    MFC after:      4 days

 share/mk/src.opts.mk | 5 -----
 1 file changed, 5 deletions(-)
Comment 13 commit-hook freebsd_committer freebsd_triage 2026-02-03 09:43:06 UTC
A commit in branch stable/15 references this bug:

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

commit a9f9496dee2d2b57008264591973bd2db3a08075
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2026-01-30 16:14:28 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-02-03 09:42:34 +0000

    src.opts: Remove MK_SOUND artifact

    Fixes:          f74f891581bc ("src.opts: Introduce MK_SOUND")
    PR:             291853
    Sponsored by:   The FreeBSD Foundation
    MFC after:      4 days

    (cherry picked from commit b9289743f40dae677f910be1d3e56198a3a3ff9b)

 share/mk/src.opts.mk | 5 -----
 1 file changed, 5 deletions(-)