From patchwork Sat Aug 13 09:42:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chris Marusich X-Patchwork-Id: 14530 Received: (qmail 16258 invoked by uid 89); 13 Aug 2016 09:43:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.1 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=BAYES_00, FREEMAIL_FROM, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=INQUIRY, UD:cz, 1.4, 1.2 X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, FREEMAIL_FROM, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: lists.gnu.org Received: from lists.gnu.org (HELO lists.gnu.org) (208.118.235.17) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 13 Aug 2016 09:42:53 +0000 Received: from localhost ([::1]:56443 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bYVSt-0001Hm-Qm for patchwork@sourceware.org; Sat, 13 Aug 2016 05:42:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57174) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bYVSn-0001HV-Ml for guix-devel@gnu.org; Sat, 13 Aug 2016 05:42:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bYVSl-00036l-2g for guix-devel@gnu.org; Sat, 13 Aug 2016 05:42:45 -0400 Received: from mail-pf0-x243.google.com ([2607:f8b0:400e:c00::243]:33835) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bYVSk-00036h-NK for guix-devel@gnu.org; Sat, 13 Aug 2016 05:42:43 -0400 Received: by mail-pf0-x243.google.com with SMTP id g202so722506pfb.1 for ; Sat, 13 Aug 2016 02:42:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version; bh=sc9BAbF3zTj0RTY9wR1Q0gLxDqXCPN1/V98APPMUoCA=; b=M1pg4QZ8n/0J5tUPjhTD2k+P8C0RLn2ggM3eZ/cUMaFpqrd7E5q/D2ZRN0/4alHiTM 3TP0PHcWlCVGYrQaN8E0PeonoCsg7EFTk0Hq4VcYPjQQPKj4R0mRd76oMbKeEL2C2EbE 772Is+T/bXKbHsHJ0xV6rR7AFE1nV0LxhMSnNMaxZA7kwzF/vMAqSvrjswXQ2wzhmgcw JxY7x9gnU87DBgJ9KfmjEwZ0y1nlZOqmvnUjsswB/vZvJsZzlk8vPHDUEq2bX2vHn768 1vY7V0vBLA0GVsxV6p5/X5vBQXjMrkXJnl9sWbbUxs70zkpGmUGBxRP4DMUED9YG5syt HAJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=sc9BAbF3zTj0RTY9wR1Q0gLxDqXCPN1/V98APPMUoCA=; b=ZubhKkQtiIETyzoFRQAVfS0xbPdQmTlO+3vmWmx3uvRripGmgdIP1us+menx2UHZZe 9hheU6neGxInyRfp1BH9lVVrZJMOCQb5gIvOh3axRT0ABJQrm5/dWOUA8aIE1ps/PTXm m94IxM1DFsvrzjBovAvhzGztEbWWu0AkDfFCiamALK2l42Des2EYzFSut6VBMpRdtp2U 3rCVr2olat0A9D6k0LE9z9wjWXXbKo8HNykydvXMjz+K1EKoMhmf1MzSJehwrxwxcqpb inKsv0o7evniHA3l870ho8j5wkrSQHuiqrCRnYXvgapW3Ml4FzcE9NOx0quNsDpFSWH2 Be6Q== X-Gm-Message-State: AEkooutg0LgOYWTeLjACpo28XDex2JCvasR+jInyGA0vQSD8bhpT7Tm7XqbQU9H5ubvmKw== X-Received: by 10.98.159.73 with SMTP id g70mr35070366pfe.121.1471081361750; Sat, 13 Aug 2016 02:42:41 -0700 (PDT) Received: from garuda ([2601:602:9d80:1886:4e0f:6eff:fef6:70b9]) by smtp.gmail.com with ESMTPSA id fe8sm18996631pad.2.2016.08.13.02.42.40 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 Aug 2016 02:42:40 -0700 (PDT) From: Chris Marusich To: guix-devel@gnu.org Subject: [PATCH] gnu: Add sg3_utils. Date: Sat, 13 Aug 2016 02:42:34 -0700 Message-ID: <87fuq9xawl.fsf@gmail.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::243 X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list 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+patchwork=sourceware.org@gnu.org Sender: "Guix-devel" Hi, This patch adds sg3_utils (and libsgutils). When I ran 'guix size sg3_utils', I noticed the following output, which seemed large to me. Is it normal? --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix size sg3_utils store item total self /gnu/store/vbs91pmyw56m7sf8h7qvn465cbwbi24g-sg3_utils-1.42 74.9 2.4 3.2% /gnu/store/9nifwk709wajpyfwa0jzaa3p6mf10vxs-gcc-4.9.3-lib 60.9 22.9 30.5% /gnu/store/ykzwykkvr2c80rw4l1qh3mvfdkl7jibi-bash-4.3.42 49.7 4.7 6.3% /gnu/store/68rzhy9px1njppv0nmbm8nk0sdkg5jx6-readline-6.3 45.0 1.2 1.6% /gnu/store/ld16jy012l3jpkj6azynzmldxn28cspw-ncurses-6.0 43.8 5.7 7.6% /gnu/store/m9vxvhdj691bq1f85lpflvnhcvrdilih-glibc-2.23 38.1 36.7 49.0% /gnu/store/0010wvgs40kdq8chzsh403qm7la9jxq7-bash-static-4.3.42 1.4 1.4 1.9% total: 74.9 MiB --8<---------------cut here---------------end--------------->8--- It might be nice to package the library and the tools separately. How might I do that? The release tarball's README says the following, but I see no obvious way to split the build output into 3 separate packages: "Various distributions (of Linux mainly) distribute sg3_utils as 3 installable packages. One is a package containing the shared library discussed above (e.g. libsgutils2-2_1.33-0.1_i386.deb). A second package contains the utilities (e.g. sg3-utils_1.33-0.1_i386.deb) and depends on the first package). Finally there is an optional package that contains header files and a static library (e.g. libsgutils2-dev_1.33-0.1_i386.deb). This final package is only needed to build other packages (e.g. sdparm) that wish to use the sg3_utils shared library." From 68fefdc9ec01e9a09296e4aaba8d127d4c3c3dd4 Mon Sep 17 00:00:00 2001 From: Chris Marusich Date: Sat, 13 Aug 2016 01:58:03 -0700 Subject: [PATCH] gnu: Add sg3_utils. * gnu/local.mk: Include gnu/packages/education.scm. * gnu/packages/scsi.scm: Add new file. * gnu/packages/scsi.scm (sg3_utils): New variable. --- gnu/local.mk | 1 + gnu/packages/scsi.scm | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 gnu/packages/scsi.scm diff --git a/gnu/local.mk b/gnu/local.mk index 44ace61..99dbb30 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -305,6 +305,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/scheme.scm \ %D%/packages/screen.scm \ %D%/packages/scribus.scm \ + %D%/packages/scsi.scm \ %D%/packages/sdl.scm \ %D%/packages/search.scm \ %D%/packages/serialization.scm \ diff --git a/gnu/packages/scsi.scm b/gnu/packages/scsi.scm new file mode 100644 index 0000000..e7ba8e0 --- /dev/null +++ b/gnu/packages/scsi.scm @@ -0,0 +1,53 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2016 Chris Marusich +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages scsi) + #:use-module ((guix licenses) + #:select (gpl2+ bsd-3)) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu)) + +(define-public sg3_utils + (package + (name "sg3_utils") + (version "1.42") + (source (origin + (method url-fetch) + (uri (string-append "http://sg.danny.cz/sg/p/sg3_utils-" + version ".tar.xz")) + (sha256 + (base32 + "1fg71rj0f1gdjmkj0z8wlv46cf9lryjdyjkbi7fjmssgi5jyvblp")))) + (build-system gnu-build-system) + (home-page "http://sg.danny.cz/sg/sg3_utils.html") + (synopsis "SCSI device utilities") + (description + "sg3_utils is a collection of utilities for devices that use the Small +Computer System Interface (SCSI) command set. It includes utilities to read +data from, write data to, control, modify, and query the state of SCSI +devices. For example, this package provides command-line tools to copy data +based on \"dd\" syntax and semantics (called sg_dd, sgp_dd and sgm_dd), check +INQUIRY data and VPD pages (sg_inq), check mode and log pages (sginfo, +sg_modes and sg_logs), spin up and down disks (sg_start), do self +tests (sg_senddiag), parse sense data, and perform various other functions. +In addition, this package includes a library, called libsgutils, which can be +used in C and C++ programs to interact with SCSI devices.") + ;; The libsgutils library itself is licensed under bsd-3. Some tools are + ;; licensed under bsd-3, also. Some tools are licensed under gpl2+. + (license (list gpl2+ bsd-3)))) -- 2.7.3