From: Jakov Smolic Date: Mon, 13 Apr 2020 16:11:34 +0000 (+0200) Subject: sys-apps/systemd: add hwdb USE flag X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=63bcd10168ea9503b0543610836de51fa25e7d3d;p=gentoo.git sys-apps/systemd: add hwdb USE flag Enables building systemd without hwdb, which saves approx. 10 kB of space. Furthermore, sys-apps/hwids dependancy is dropped if hwdb support is turned off, which saves additional 15 MB of space. Package-Manager: Portage-2.3.89, Repoman-2.3.20 Signed-off-by: Jakov Smolic Signed-off-by: Josip Kelecic Signed-off-by: Jakov Petrina Signed-off-by: Luka Perkov Signed-off-by: Mike Gilbert Closes: https://github.com/gentoo/gentoo/pull/15354 --- diff --git a/sys-apps/systemd/metadata.xml b/sys-apps/systemd/metadata.xml index 336245a670ab..897107ece0c8 100644 --- a/sys-apps/systemd/metadata.xml +++ b/sys-apps/systemd/metadata.xml @@ -20,6 +20,7 @@ Enable sealing of journal files using gcrypt Enable portable home directories Enable embedded HTTP server in journald + Enable control over hwdb Enable import daemon Enable kernel module loading via sys-apps/kmod Enable lz4 compression for the journal diff --git a/sys-apps/systemd/systemd-245-r2.ebuild b/sys-apps/systemd/systemd-245-r3.ebuild similarity index 96% rename from sys-apps/systemd/systemd-245-r2.ebuild rename to sys-apps/systemd/systemd-245-r3.ebuild index 6b80478fa7e0..0fd4ff855ecc 100644 --- a/sys-apps/systemd/systemd-245-r2.ebuild +++ b/sys-apps/systemd/systemd-245-r3.ebuild @@ -28,7 +28,7 @@ HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd" LICENSE="GPL-2 LGPL-2.1 MIT public-domain" SLOT="0/2" -IUSE="acl apparmor audit build cgroup-hybrid cryptsetup curl dns-over-tls elfutils +gcrypt gnuefi homed http idn importd +kmod +lz4 lzma nat pam pcre pkcs11 policykit pwquality qrcode repart +resolvconf +seccomp selinux split-usr static-libs +sysv-utils test vanilla xkb" +IUSE="acl apparmor audit build cgroup-hybrid cryptsetup curl dns-over-tls elfutils +gcrypt gnuefi homed http +hwdb idn importd +kmod +lz4 lzma nat pam pcre pkcs11 policykit pwquality qrcode repart +resolvconf +seccomp selinux split-usr static-libs +sysv-utils test vanilla xkb" REQUIRED_USE=" homed? ( cryptsetup ) @@ -119,7 +119,7 @@ RDEPEND="${COMMON_DEPEND} # sys-apps/dbus: the daemon only (+ build-time lib dep for tests) PDEPEND=">=sys-apps/dbus-1.9.8[systemd] - >=sys-apps/hwids-20150417[udev] + hwdb? ( >=sys-apps/hwids-20150417[udev] ) >=sys-fs/udev-init-scripts-25 policykit? ( sys-auth/polkit ) !vanilla? ( sys-apps/gentoo-systemd-integration )" @@ -275,6 +275,7 @@ multilib_src_configure() { -Dgnu-efi=$(meson_multilib_native_use gnuefi) -Defi-libdir="${ESYSROOT}/usr/$(get_libdir)" -Dhomed=$(meson_multilib_native_use homed) + -Dhwdb=$(meson_multilib_native_use hwdb) -Dmicrohttpd=$(meson_multilib_native_use http) -Didn=$(meson_multilib_native_use idn) -Dimportd=$(meson_multilib_native_use importd) @@ -308,7 +309,6 @@ multilib_src_configure() { -Dfirstboot=$(meson_multilib) -Dhibernate=$(meson_multilib) -Dhostnamed=$(meson_multilib) - -Dhwdb=$(meson_multilib) -Dldconfig=$(meson_multilib) -Dlocaled=$(meson_multilib) -Dman=$(meson_multilib) @@ -370,7 +370,12 @@ multilib_src_install_all() { keepdir /etc/{binfmt.d,modules-load.d,tmpfiles.d} keepdir /etc/kernel/install.d keepdir /etc/systemd/{network,system,user} - keepdir /etc/udev/{hwdb.d,rules.d} + keepdir /etc/udev/rules.d + + if use hwdb; then + keepdir /etc/udev/hwdb.d + fi + keepdir "${rootprefix}"/lib/systemd/{system-sleep,system-shutdown} keepdir /usr/lib/{binfmt.d,modules-load.d} keepdir /usr/lib/systemd/user-generators @@ -380,7 +385,9 @@ multilib_src_install_all() { # Symlink /etc/sysctl.conf for easy migration. dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf - rm -r "${ED}${rootprefix}"/lib/udev/hwdb.d || die + if use hwdb; then + rm -r "${ED}${rootprefix}"/lib/udev/hwdb.d || die + fi if use split-usr; then # Avoid breaking boot/reboot diff --git a/sys-apps/systemd/systemd-9999.ebuild b/sys-apps/systemd/systemd-9999.ebuild index c35e623d94d7..79adf7db45a6 100644 --- a/sys-apps/systemd/systemd-9999.ebuild +++ b/sys-apps/systemd/systemd-9999.ebuild @@ -28,7 +28,7 @@ HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd" LICENSE="GPL-2 LGPL-2.1 MIT public-domain" SLOT="0/2" -IUSE="acl apparmor audit build cgroup-hybrid cryptsetup curl dns-over-tls elfutils +gcrypt gnuefi homed http idn importd +kmod +lz4 lzma nat pam pcre pkcs11 policykit pwquality qrcode repart +resolvconf +seccomp selinux split-usr static-libs +sysv-utils test vanilla xkb" +IUSE="acl apparmor audit build cgroup-hybrid cryptsetup curl dns-over-tls elfutils +gcrypt gnuefi homed http +hwdb idn importd +kmod +lz4 lzma nat pam pcre pkcs11 policykit pwquality qrcode repart +resolvconf +seccomp selinux split-usr static-libs +sysv-utils test vanilla xkb" REQUIRED_USE=" homed? ( cryptsetup ) @@ -119,7 +119,7 @@ RDEPEND="${COMMON_DEPEND} # sys-apps/dbus: the daemon only (+ build-time lib dep for tests) PDEPEND=">=sys-apps/dbus-1.9.8[systemd] - >=sys-apps/hwids-20150417[udev] + hwdb? ( >=sys-apps/hwids-20150417[udev] ) >=sys-fs/udev-init-scripts-25 policykit? ( sys-auth/polkit ) !vanilla? ( sys-apps/gentoo-systemd-integration )" @@ -274,6 +274,7 @@ multilib_src_configure() { -Dgnu-efi=$(meson_multilib_native_use gnuefi) -Defi-libdir="${ESYSROOT}/usr/$(get_libdir)" -Dhomed=$(meson_multilib_native_use homed) + -Dhwdb=$(meson_multilib_native_use hwdb) -Dmicrohttpd=$(meson_multilib_native_use http) -Didn=$(meson_multilib_native_use idn) -Dimportd=$(meson_multilib_native_use importd) @@ -307,7 +308,6 @@ multilib_src_configure() { -Dfirstboot=$(meson_multilib) -Dhibernate=$(meson_multilib) -Dhostnamed=$(meson_multilib) - -Dhwdb=$(meson_multilib) -Dldconfig=$(meson_multilib) -Dlocaled=$(meson_multilib) -Dman=$(meson_multilib) @@ -369,7 +369,12 @@ multilib_src_install_all() { keepdir /etc/{binfmt.d,modules-load.d,tmpfiles.d} keepdir /etc/kernel/install.d keepdir /etc/systemd/{network,system,user} - keepdir /etc/udev/{hwdb.d,rules.d} + keepdir /etc/udev/rules.d + + if use hwdb; then + keepdir /etc/udev/hwdb.d + fi + keepdir "${rootprefix}"/lib/systemd/{system-sleep,system-shutdown} keepdir /usr/lib/{binfmt.d,modules-load.d} keepdir /usr/lib/systemd/user-generators @@ -379,7 +384,9 @@ multilib_src_install_all() { # Symlink /etc/sysctl.conf for easy migration. dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf - rm -r "${ED}${rootprefix}"/lib/udev/hwdb.d || die + if use hwdb; then + rm -r "${ED}${rootprefix}"/lib/udev/hwdb.d || die + fi if use split-usr; then # Avoid breaking boot/reboot