git: c4b244af42a1 - main - acpi: Remove userland bits on non-ACPI platforms
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 28 Apr 2026 19:50:54 UTC
The branch main has been updated by ivy:
URL: https://cgit.FreeBSD.org/src/commit/?id=c4b244af42a1f20937939a824b753a92c9c0a46f
commit c4b244af42a1f20937939a824b753a92c9c0a46f
Author: Lexi Winter <ivy@FreeBSD.org>
AuthorDate: 2026-04-28 19:37:33 +0000
Commit: Lexi Winter <ivy@FreeBSD.org>
CommitDate: 2026-04-28 19:50:41 +0000
acpi: Remove userland bits on non-ACPI platforms
ACPI is only supported on amd64, arm64 and i386. Don't install the
power_profile rc script or devd configuration on other platforms.
This avoids creating a useless FreeBSD-acpi package on those platforms.
MFC after: 2 weeks
Reviewed by: imp
Sponsored by: https://www.patreon.com/bsdivy
Differential Revision: https://reviews.freebsd.org/D56650
---
libexec/rc/rc.d/Makefile | 3 +++
packages/Makefile.arm | 17 -----------------
packages/Makefile.powerpc | 17 -----------------
packages/Makefile.riscv64 | 1 -
packages/acpi/Makefile | 6 ------
sbin/devd/Makefile | 3 +++
tools/build/mk/OptionalObsoleteFiles.inc | 4 ++++
7 files changed, 10 insertions(+), 41 deletions(-)
diff --git a/libexec/rc/rc.d/Makefile b/libexec/rc/rc.d/Makefile
index 3eed19987f83..cb94380aff32 100644
--- a/libexec/rc/rc.d/Makefile
+++ b/libexec/rc/rc.d/Makefile
@@ -88,9 +88,12 @@ ACCT+= utx
.endif
.endif
+.if ${MACHINE} == "i386" || ${MACHINE} == "amd64" || \
+ ${MACHINE} == "arm64"
CONFGROUPS.${MK_ACPI}+= ACPI
ACPIPACKAGE= acpi
ACPI= power_profile
+.endif
.if ${MACHINE} == "i386"
CONFGROUPS.${MK_APM}+= APM
diff --git a/packages/Makefile.arm b/packages/Makefile.arm
deleted file mode 100644
index e7e37f03a7ba..000000000000
--- a/packages/Makefile.arm
+++ /dev/null
@@ -1,17 +0,0 @@
-# SPDX-License-Identifier: ISC
-#
-# Copyright (c) 2026 Lexi Winter <ivy@FreeBSD.org>
-#
-# Permission to use, copy, modify, and distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-SUBDIR.${MK_ACPI}+= acpi
diff --git a/packages/Makefile.powerpc b/packages/Makefile.powerpc
deleted file mode 100644
index e7e37f03a7ba..000000000000
--- a/packages/Makefile.powerpc
+++ /dev/null
@@ -1,17 +0,0 @@
-# SPDX-License-Identifier: ISC
-#
-# Copyright (c) 2026 Lexi Winter <ivy@FreeBSD.org>
-#
-# Permission to use, copy, modify, and distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-SUBDIR.${MK_ACPI}+= acpi
diff --git a/packages/Makefile.riscv64 b/packages/Makefile.riscv64
index 2df3c30b3544..bc53723bb04b 100644
--- a/packages/Makefile.riscv64
+++ b/packages/Makefile.riscv64
@@ -14,6 +14,5 @@
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-SUBDIR.${MK_ACPI}+= acpi
SUBDIR.${MK_BHYVE}+= bhyve
SUBDIR.${MK_BHYVE}+= libvmmapi
diff --git a/packages/acpi/Makefile b/packages/acpi/Makefile
index 360ecf22e9e7..edd4cdfe7090 100644
--- a/packages/acpi/Makefile
+++ b/packages/acpi/Makefile
@@ -1,11 +1,5 @@
WORLDPACKAGE= acpi
-# On these platforms, acpi only contains config files.
-.if ${MACHINE_ARCH} == "armv7" || ${MACHINE} == "powerpc" || \
- ${MACHINE_ARCH} == "riscv64"
-SUBPACKAGES=
-.endif
-
# ACPI isn't applicable in a jail.
PKG_SETS= optional
diff --git a/sbin/devd/Makefile b/sbin/devd/Makefile
index 3dab9f7c9a25..78b2b039ac6e 100644
--- a/sbin/devd/Makefile
+++ b/sbin/devd/Makefile
@@ -22,10 +22,13 @@ DHCLIENTDIR= ${DEVDDIR}
DHCLIENT+= dhclient.conf
DHCLIENTPACKAGE= dhclient
+.if ${MACHINE} == "i386" || ${MACHINE} == "amd64" || \
+ ${MACHINE} == "arm64"
CONFGROUPS+= POWERPROFILE
POWERPROFILEDIR= ${DEVDDIR}
POWERPROFILE+= power_profile.conf
POWERPROFILEPACKAGE= acpi
+.endif
CONFGROUPS+= CONSOLE
CONSOLEDIR= ${DEVDDIR}
diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc
index 5c1b47d97a8d..cfd040ee60fc 100644
--- a/tools/build/mk/OptionalObsoleteFiles.inc
+++ b/tools/build/mk/OptionalObsoleteFiles.inc
@@ -53,6 +53,10 @@ OLD_FILES+=usr/share/man/man8/acpiconf.8.gz
OLD_FILES+=usr/share/man/man8/acpidb.8.gz
OLD_FILES+=usr/share/man/man8/acpidump.8.gz
OLD_FILES+=usr/share/man/man8/iasl.8.gz
+.elif ${MACHINE} != "i386" && ${MACHINE} != "amd64" && \
+ ${MACHINE} != "arm64"
+OLD_FILES+=etc/rc.d/power_profile
+OLD_FILES+=etc/devd/power_profile.conf
.endif
.if ${MK_APM} == no