From b1b6437e1228ab74b300a67fb33811a6a0e1e819 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Wed, 17 Apr 2013 20:58:36 +0000 Subject: Introduce USE=firmware-loader, as suggested by williamh. Check whether kernel supports loading firmwares and warn properly. (Portage version: 2.2.0_alpha173/cvs/Linux x86_64, signed Manifest commit with key 9627F456F9DA7643!) --- sys-apps/systemd/ChangeLog | 7 ++++++- sys-apps/systemd/metadata.xml | 1 + sys-apps/systemd/systemd-201.ebuild | 22 ++++++++++++++++++---- sys-apps/systemd/systemd-9999.ebuild | 22 ++++++++++++++++++---- 4 files changed, 43 insertions(+), 9 deletions(-) diff --git a/sys-apps/systemd/ChangeLog b/sys-apps/systemd/ChangeLog index c186bc93fad3..775e51f7c50d 100644 --- a/sys-apps/systemd/ChangeLog +++ b/sys-apps/systemd/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sys-apps/systemd # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/ChangeLog,v 1.122 2013/04/17 18:35:59 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/ChangeLog,v 1.123 2013/04/17 20:58:36 mgorny Exp $ + + 17 Apr 2013; Michał Górny metadata.xml, + systemd-201.ebuild, systemd-9999.ebuild: + Introduce USE=firmware-loader, as suggested by williamh. Check whether kernel + supports loading firmwares and warn properly. 17 Apr 2013; Michał Górny systemd-201.ebuild, systemd-9999.ebuild: diff --git a/sys-apps/systemd/metadata.xml b/sys-apps/systemd/metadata.xml index d9a66eac4dca..3223fc38dd23 100644 --- a/sys-apps/systemd/metadata.xml +++ b/sys-apps/systemd/metadata.xml @@ -10,6 +10,7 @@ Enable support for sys-process/audit Use libcryptsetup Enable EFI support (installs bootctl) + Enable user-space firmware loader (for kernels prior to 3.8) Enable sealing of journal files using gcrypt enable libudev gobject interface Enable embedded HTTP server in journald diff --git a/sys-apps/systemd/systemd-201.ebuild b/sys-apps/systemd/systemd-201.ebuild index bfd25d3e8fe8..b7e1f924c0da 100644 --- a/sys-apps/systemd/systemd-201.ebuild +++ b/sys-apps/systemd/systemd-201.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/systemd-201.ebuild,v 1.7 2013/04/17 18:35:59 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/systemd-201.ebuild,v 1.8 2013/04/17 20:58:36 mgorny Exp $ EAPI=5 @@ -14,8 +14,8 @@ SRC_URI="http://www.freedesktop.org/software/systemd/${P}.tar.xz" LICENSE="GPL-2 LGPL-2.1 MIT" SLOT="0" KEYWORDS="~amd64 ~arm ~ppc64 ~x86" -IUSE="acl audit cryptsetup doc gcrypt gudev http introspection keymap - +kmod lzma openrc pam policykit python qrcode selinux static-libs +IUSE="acl audit cryptsetup doc +firmware-loader gcrypt gudev http introspection + keymap +kmod lzma openrc pam policykit python qrcode selinux static-libs tcpd vanilla xattr" MINKV="2.6.39" @@ -73,6 +73,15 @@ pkg_pretend() { if kernel_is -lt ${MINKV//./ }; then ewarn "Kernel version at least ${MINKV} required" fi + + if use firmware-loader; then + CONFIG_CHECK+=" ~FW_LOADER" + elif kernel_is -lt 3 8; then + ewarn "You seem to be using kernel older than 3.8. Those kernel versions" + ewarn "require systemd with USE=firmware-loader to support loading" + ewarn "firmware. Missing this flag may cause some hardware not to work." + fi + check_extra_config fi } @@ -80,7 +89,6 @@ pkg_pretend() { src_configure() { local myeconfargs=( --localstatedir=/var - --with-firmware-path="/lib/firmware/updates:/lib/firmware" # but pam modules have to lie in /lib* --with-pamlibdir=$(getpam_mod_dir) # make sure we get /bin:/sbin in $PATH @@ -123,6 +131,12 @@ src_configure() { # Keep using the one where the rules were installed. MY_UDEVDIR=$(get_udevdir) + if use firmware-loader; then + myeconfargs+=( + --with-firmware-path="/lib/firmware/updates:/lib/firmware" + ) + fi + # Work around bug 463846. tc-export CC diff --git a/sys-apps/systemd/systemd-9999.ebuild b/sys-apps/systemd/systemd-9999.ebuild index 1de9f343abfb..79553009cf63 100644 --- a/sys-apps/systemd/systemd-9999.ebuild +++ b/sys-apps/systemd/systemd-9999.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/systemd-9999.ebuild,v 1.48 2013/04/17 18:35:59 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/systemd-9999.ebuild,v 1.49 2013/04/17 20:58:36 mgorny Exp $ EAPI=5 @@ -22,8 +22,8 @@ SRC_URI="http://www.freedesktop.org/software/systemd/${P}.tar.xz" LICENSE="GPL-2 LGPL-2.1 MIT" SLOT="0" KEYWORDS="~amd64 ~arm ~ppc64 ~x86" -IUSE="acl audit cryptsetup doc gcrypt gudev http introspection keymap - +kmod lzma openrc pam policykit python qrcode selinux static-libs +IUSE="acl audit cryptsetup doc +firmware-loader gcrypt gudev http introspection + keymap +kmod lzma openrc pam policykit python qrcode selinux static-libs tcpd vanilla xattr" MINKV="2.6.39" @@ -97,6 +97,15 @@ pkg_pretend() { if kernel_is -lt ${MINKV//./ }; then ewarn "Kernel version at least ${MINKV} required" fi + + if use firmware-loader; then + CONFIG_CHECK+=" ~FW_LOADER" + elif kernel_is -lt 3 8; then + ewarn "You seem to be using kernel older than 3.8. Those kernel versions" + ewarn "require systemd with USE=firmware-loader to support loading" + ewarn "firmware. Missing this flag may cause some hardware not to work." + fi + check_extra_config fi } @@ -104,7 +113,6 @@ pkg_pretend() { src_configure() { local myeconfargs=( --localstatedir=/var - --with-firmware-path="/lib/firmware/updates:/lib/firmware" # but pam modules have to lie in /lib* --with-pamlibdir=$(getpam_mod_dir) # make sure we get /bin:/sbin in $PATH @@ -147,6 +155,12 @@ src_configure() { # Keep using the one where the rules were installed. MY_UDEVDIR=$(get_udevdir) + if use firmware-loader; then + myeconfargs+=( + --with-firmware-path="/lib/firmware/updates:/lib/firmware" + ) + fi + # Work around bug 463846. tc-export CC -- cgit v1.2.3-65-gdbad