From mboxrd@z Thu Jan 1 00:00:00 1970 From: taylanbayirli@gmail.com (Taylan Ulrich =?utf-8?Q?Bay=C4=B1rl=C4=B1?= =?utf-8?Q?=2FKammer?=) Subject: Add sysfsutils, cpufrequtils Date: Wed, 18 Feb 2015 23:35:06 +0100 Message-ID: <874mqionl1.fsf@taylan.uni.cx> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50696) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YODD6-00014U-HN for guix-devel@gnu.org; Wed, 18 Feb 2015 17:35:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YODD3-0005H1-78 for guix-devel@gnu.org; Wed, 18 Feb 2015 17:35:12 -0500 Received: from mail-we0-f169.google.com ([74.125.82.169]:36417) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YODD2-0005GJ-Um for guix-devel@gnu.org; Wed, 18 Feb 2015 17:35:09 -0500 Received: by wevk48 with SMTP id k48so4009172wev.3 for ; Wed, 18 Feb 2015 14:35:08 -0800 (PST) Received: from taylan.uni.cx (p200300514A1A69360213E8FFFEED36FB.dip0.t-ipconnect.de. [2003:51:4a1a:6936:213:e8ff:feed:36fb]) by mx.google.com with ESMTPSA id jg3sm31447254wid.0.2015.02.18.14.35.06 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Feb 2015 14:35:07 -0800 (PST) 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org --=-=-= Content-Type: text/plain I was going to send this as a patch sequence with git-send-email, but we seem to be lacking the necessary Perl modules. :-) --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-gnu-Add-sysfsutils.patch Content-Description: patch >From a2edf2d2cec85d02e3a3848499706544be0e0961 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?= Date: Wed, 18 Feb 2015 21:20:38 +0100 Subject: [PATCH 1/3] gnu: Add sysfsutils. * gnu/packages/linux.scm (sysfsutils): New variable. --- gnu/packages/linux.scm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 3bda6f2..b7a8f1a 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -1883,3 +1883,27 @@ during the system boot, and will run as a background process. When an ACPI event is received from the kernel, acpid will examine the list of rules specified in /etc/acpi/events and execute the rules that match the event.") (license gpl2+))) + +(define-public sysfsutils + (package + (name "sysfsutils") + (version "2.1.0") + (source + (origin + (method url-fetch) + (uri + (string-append + "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-" + version ".tar.gz")) + (sha256 + (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8")))) + (build-system gnu-build-system) + (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html") + (synopsis "System utilities based on Linux sysfs") + (description + "These are a set of utilites built upon sysfs, a virtual filesystem in +Linux kernel versions 2.5+ that exposes a system's device tree. The package +also contains the libsysfs library.") + ;; The library is under lgpl2.1+ (all files say "or any later version"). + ;; The rest is mostly gpl2, with a few files indicating gpl2+. + (license (list gpl2 gpl2+ lgpl2.1+)))) -- 2.2.1 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0002-gnu-Add-sysfsutils-1.patch Content-Description: patch2 >From e7a1705f8d5719cdd88ca681252d34a0f7b586c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?= Date: Wed, 18 Feb 2015 22:17:01 +0100 Subject: [PATCH 2/3] gnu: Add sysfsutils-1. * gnu/packages/linux.scm (sysfsutils-1): New variable. --- gnu/packages/linux.scm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index b7a8f1a..345297f 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -1907,3 +1907,31 @@ also contains the libsysfs library.") ;; The library is under lgpl2.1+ (all files say "or any later version"). ;; The rest is mostly gpl2, with a few files indicating gpl2+. (license (list gpl2 gpl2+ lgpl2.1+)))) + +(define-public sysfsutils-1 + (package + (inherit sysfsutils) + (name "sysfsutils") + (version "1.3.0") + (source + (origin + (method url-fetch) + (uri + (string-append + "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version + "/sysfsutils-" version ".tar.gz")) + (sha256 + (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3")))) + (arguments + '(#:phases + (alist-cons-after + 'unpack 'fix-makefile-and-configure + (lambda _ + (substitute* '("Makefile.in") + (("includedir = /usr/include/sysfs") + "includedir = @includedir@")) + (substitute* '("configure") + (("includedir='(\\$\\{prefix\\}/include)'" all orig) + (string-append "includedir='" orig "/sysfs'")))) + %standard-phases))) + (synopsis "System utilities based on Linux sysfs (version 1.x)"))) -- 2.2.1 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0003-gnu-Add-cpufrequtils.patch Content-Description: patch3 >From ae4cba1a57fc64294d5ec3b667ab482f7cc7d27e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?= Date: Wed, 18 Feb 2015 21:20:57 +0100 Subject: [PATCH 3/3] gnu: Add cpufrequtils. * gnu/packages/linux.scm (cpufrequtils): New variable. * gnu/packages/patches/cpufrequtils-fix-aclocal.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. --- gnu-system.am | 1 + gnu/packages/linux.scm | 28 +++++++++++++ .../patches/cpufrequtils-fix-aclocal.patch | 46 ++++++++++++++++++++++ 3 files changed, 75 insertions(+) create mode 100644 gnu/packages/patches/cpufrequtils-fix-aclocal.patch diff --git a/gnu-system.am b/gnu-system.am index eeadd8f..64ef535 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -371,6 +371,7 @@ dist_patch_DATA = \ gnu/packages/patches/cpio-CVE-2014-9112-pt4.patch \ gnu/packages/patches/cpio-CVE-2014-9112-pt5.patch \ gnu/packages/patches/cpio-gets-undeclared.patch \ + gnu/packages/patches/cpufrequtils-fix-aclocal.patch \ gnu/packages/patches/cssc-gets-undeclared.patch \ gnu/packages/patches/cssc-missing-include.patch \ gnu/packages/patches/clucene-contribs-lib.patch \ diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 345297f..e2279c1 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -1935,3 +1935,31 @@ also contains the libsysfs library.") (string-append "includedir='" orig "/sysfs'")))) %standard-phases))) (synopsis "System utilities based on Linux sysfs (version 1.x)"))) + +(define-public cpufrequtils + (package + (name "cpufrequtils") + (version "0.3") + (source + (origin + (method url-fetch) + (uri + (string-append + "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-" + version ".tar.gz")) + (sha256 + (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm")) + (patches (list (search-patch "cpufrequtils-fix-aclocal.patch"))))) + (build-system gnu-build-system) + (native-inputs + `(("sysfsutils" ,sysfsutils-1))) + (arguments + '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath=" + (assoc-ref %outputs "out") "/lib")))) + (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/") + (synopsis "Utilities to get and set CPU frequency on Linux") + (description + "The cpufrequtils suite contains utilities to retreive CPU frequency +information, and set the CPU frequency if supported, using the cpufreq +capabilities of the Linux kernel.") + (license gpl2))) diff --git a/gnu/packages/patches/cpufrequtils-fix-aclocal.patch b/gnu/packages/patches/cpufrequtils-fix-aclocal.patch new file mode 100644 index 0000000..be5767f --- /dev/null +++ b/gnu/packages/patches/cpufrequtils-fix-aclocal.patch @@ -0,0 +1,46 @@ +Add an extra layer of quoting to ltmain.sh sanity check. + +--- a/configure 2005-05-07 14:19:31.000000000 +0200 ++++ b/configure 2015-02-10 11:16:32.456146934 +0100 +@@ -6266,7 +6266,7 @@ + exit 1 + fi + gentoo_lt_version="1.5.16" +-gentoo_ltmain_version=`grep '^[:space:]*VERSION=' $ltmain | sed -e 's|^[:space:]*VERSION=||'` ++gentoo_ltmain_version=`grep '^[[:space:]]*VERSION=' $ltmain | sed -e 's|^[[:space:]]*VERSION=||'` + if test "$gentoo_lt_version" != "$gentoo_ltmain_version"; then + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 +--- a/aclocal.m4 2005-05-07 14:19:25.000000000 +0200 ++++ b/aclocal.m4 2015-02-10 11:16:15.352030318 +0100 +@@ -246,7 +246,7 @@ + exit 1 + fi + gentoo_lt_version="1.5.16" +-gentoo_ltmain_version=`grep '^[[:space:]]*VERSION=' $ltmain | sed -e 's|^[[:space:]]*VERSION=||'` ++gentoo_ltmain_version=`[grep '^[[:space:]]*VERSION=' $ltmain | sed -e 's|^[[:space:]]*VERSION=||']` + if test "$gentoo_lt_version" != "$gentoo_ltmain_version"; then + AC_MSG_RESULT(no) + echo +--- a/libcpufreq/configure 2005-05-07 14:19:31.000000000 +0200 ++++ b/libcpufreq/configure 2015-02-10 11:16:32.456146934 +0100 +@@ -6266,7 +6266,7 @@ + exit 1 + fi + gentoo_lt_version="1.5.16" +-gentoo_ltmain_version=`grep '^[:space:]*VERSION=' $ltmain | sed -e 's|^[:space:]*VERSION=||'` ++gentoo_ltmain_version=`grep '^[[:space:]]*VERSION=' $ltmain | sed -e 's|^[[:space:]]*VERSION=||'` + if test "$gentoo_lt_version" != "$gentoo_ltmain_version"; then + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 +--- a/libcpufreq/aclocal.m4 2005-05-07 14:19:25.000000000 +0200 ++++ b/libcpufreq/aclocal.m4 2015-02-10 11:16:15.352030318 +0100 +@@ -246,7 +246,7 @@ + exit 1 + fi + gentoo_lt_version="1.5.16" +-gentoo_ltmain_version=`grep '^[[:space:]]*VERSION=' $ltmain | sed -e 's|^[[:space:]]*VERSION=||'` ++gentoo_ltmain_version=`[grep '^[[:space:]]*VERSION=' $ltmain | sed -e 's|^[[:space:]]*VERSION=||']` + if test "$gentoo_lt_version" != "$gentoo_ltmain_version"; then + AC_MSG_RESULT(no) + echo -- 2.2.1 --=-=-=--