From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37960) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRbxb-0005r6-OL for guix-patches@gnu.org; Sat, 09 Jun 2018 07:23:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRbxY-0005Os-J7 for guix-patches@gnu.org; Sat, 09 Jun 2018 07:23:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:60717) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fRbxY-0005Oi-F1 for guix-patches@gnu.org; Sat, 09 Jun 2018 07:23:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fRbxY-0008BP-8c for guix-patches@gnu.org; Sat, 09 Jun 2018 07:23:04 -0400 Subject: [bug#31767] [PATCH 2/3] gnu: Add umoci. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37893) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRbwT-0005lA-3a for guix-patches@gnu.org; Sat, 09 Jun 2018 07:21:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRbwP-000571-To for guix-patches@gnu.org; Sat, 09 Jun 2018 07:21:57 -0400 Received: from rezeros.cc ([45.76.207.221]:49112) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fRbwP-00056K-EC for guix-patches@gnu.org; Sat, 09 Jun 2018 07:21:53 -0400 From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Date: Sat, 9 Jun 2018 19:20:59 +0800 Message-Id: <20180609112100.18807-2-iyzsong@member.fsf.org> In-Reply-To: <20180609112100.18807-1-iyzsong@member.fsf.org> References: <20180609112100.18807-1-iyzsong@member.fsf.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 31767@debbugs.gnu.org Cc: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= * gnu/packages/virtualization.scm (umoci): New variable. --- gnu/packages/virtualization.scm | 45 +++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index d2419df98..d5be45b1e 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -864,3 +864,48 @@ packaged according to the Container Initiative (OCI) format} and is a compliant implementation of the Open Container Initiative specification.") (license asl2.0))) + +(define-public umoci + (package + (name "umoci") + (version "0.4.0") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/openSUSE/umoci/releases/download/v" + version "/umoci.tar.xz")) + (file-name (string-append "umoci-" version ".tar.xz")) + (sha256 + (base32 + "0hg7hs4dagj2fgymm4b4s68k1v2k2093s3jg0d94j0ixhfmyg9nd")))) + (build-system go-build-system) + (arguments + '(#:import-path "github.com/openSUSE/umoci" + #:install-source? #f + #:phases + (modify-phases %standard-phases + (replace 'unpack + (lambda* (#:key source import-path #:allow-other-keys) + ;; Unpack the tarball into 'umoci' instead of "runc-${version}". + (let ((dest (string-append "src/" import-path))) + (mkdir-p dest) + (invoke "tar" "-C" (string-append "src/" import-path) + "--strip-components=1" + "-xvf" source)))) + (replace 'build + (lambda* (#:key import-path #:allow-other-keys) + (chdir (string-append "src/" import-path)) + ;; TODO: build manpages with 'go-md2man'. + (invoke "make" "SHELL=bash"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bindir (string-append out "/bin"))) + (install-file "umoci" bindir) + #t)))))) + (home-page "https://umo.ci/") + (synopsis "Tool for modifying Open Container images") + (description + "@command{umoci} is a tool that allows for high-level modification of an +OCI image layout and its tagged images.") + (license asl2.0))) -- 2.17.1