From mboxrd@z Thu Jan 1 00:00:00 1970 From: Efraim Flashner Subject: Re: [PATCH] gnu: powertop: Patch absolute file names. Date: Thu, 21 Apr 2016 03:34:00 +0300 Message-ID: <20160421003400.GA18423@debian-netbook> References: <1461013301-13196-1-git-send-email-mthl@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="pf9I7BMVVzbSWLtt" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43848) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1at2ZL-0000qY-8c for guix-devel@gnu.org; Wed, 20 Apr 2016 20:34:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1at2ZI-0001x4-2a for guix-devel@gnu.org; Wed, 20 Apr 2016 20:34:07 -0400 Content-Disposition: inline In-Reply-To: <1461013301-13196-1-git-send-email-mthl@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Mathieu Lirzin Cc: guix-devel@gnu.org --pf9I7BMVVzbSWLtt Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 18, 2016 at 11:01:41PM +0200, Mathieu Lirzin wrote: > * gnu/packages/linux.scm (powertop)[inputs]: Add kmod. > [arguments]: Patch absolute file names. Before that launching powertop > was failing because 'modprobe' was not found. > --- > gnu/packages/linux.scm | 25 ++++++++++++++++++++++--- > 1 file changed, 22 insertions(+), 3 deletions(-) >=20 > diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm > index d554ecc..88afa8e 100644 > --- a/gnu/packages/linux.scm > +++ b/gnu/packages/linux.scm > @@ -10,6 +10,7 @@ > ;;; Copyright =C2=A9 2016 Tobias Geerinckx-Rice > ;;; Copyright =C2=A9 2016 Alex Kost > ;;; Copyright =C2=A9 2016 Raymond Nicholson > +;;; Copyright =C2=A9 2016 Mathieu Lirzin > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -1202,11 +1203,29 @@ devices. It replaces 'iwconfig', which is deprec= ated.") > (base32 > "0nlwazxbnn0k6q5f5b09wdhw0f194lpzkp3l7vxansqhfczmcyx8")))) > (build-system gnu-build-system) > + (arguments > + '(#:phases > + (modify-phases %standard-phases > + ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cp= p to > + ;; allow calibrating the network interface in GuixSD. > + (add-after 'unpack 'patch-absolute-file-names > + (lambda* (#:key inputs #:allow-other-keys) > + (let ((kmod (assoc-ref inputs "kmod"))) > + (substitute* (find-files "src" ".*\\.cpp" ) > + (("/sbin/modprobe") (string-append kmod "/bin/modprobe"= )) > + ;; These programs are only needed to calibrate, so using > + ;; relative file names avoids adding extra inputs. Whe= n they > + ;; are missing powertop gracefully handle it. > + (("/usr/bin/xset") "xset") > + (("/usr/sbin/hciconfig") "hciconfig") ;XXX:not packaged= yet > + (("/usr/bin/hcitool") "hcitool")) ;XXX:not packaged= yet hci* programs are part of the bluez package. According to apt-file, debian has xset as part of x11-xserver-utils. > + #t)))))) > (inputs > - `(("zlib" ,zlib) > - ("pciutils" ,pciutils) > + `(("kmod" ,kmod) > ("ncurses" ,ncurses) > - ("libnl" ,libnl))) > + ("pciutils" ,pciutils) > + ("libnl" ,libnl) > + ("zlib" ,zlib))) > (native-inputs > `(("pkg-config" ,pkg-config))) > (home-page "https://01.org/powertop/") >=20 --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --pf9I7BMVVzbSWLtt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCgAGBQJXGB/zAAoJEPTB05F+rO6TgEgP/jQVNTiMdDiCRwpcuVCkgNg5 lInBKCOuLq8EbPZXzUqFkrG+yDs3GBXTOLQdsiNw6TaUo+TGiCENP/uBHtU++wkS /aX9Z4uLx3TtrkdUugAzLc0fSUR4dHTvUoXoAXmpXUr3OsEDJt8ff1upNuWzV6Y0 EAFfBQjKejG57mhl2RaZHPAYklV4xIc86eeCeU/8K5WIpEE+TNmDZxuyO4N/2XZH 2PaR7MEbcNgjQX/rPR+QnF5ezzxOSv330Je55F+BOKthEA5RV8jItatxsojLno+3 G878kNSpHjS0c4ZBlmffPbAX7rOeUDBdzS82UnZTrOVUR45FasQNQg1FzCYlaSsc nSPs/81KxsJpJKc3dT6u7Ol+8tIP/2/DfUbKHiovIWzTYaOvDoBA4DMWogh2uOwI Akh/Q2hD3ItIvPaOjgq5IJrk7Z9qju/lhIOyNou2hXWVILKxKrOXV+UY1hVk8Ryz SFIjakVp6ksOIveXiP7v1wXpeFGa+/lNLRGrREUHJ2ceGnb+YWKsqZ+UcEAZrwne WMXtK6ofRCS/dNddNO+XuNtJ4Vxr+DtaNAm4vdNloNy9CROL0t88SQWlzY9+I+Sg 7nGAc5gw5PKXpdTWQuQ1b4y/W6+PtbUoL5Qdd5qSDADmuROrPmaRiwi6exsu/Zwv O3vDAJumybpEflpRtZmL =mj+4 -----END PGP SIGNATURE----- --pf9I7BMVVzbSWLtt--