From patchwork Sun Sep 4 21:42:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Olszewski X-Patchwork-Id: 42222 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 8DDE027BBEA; Mon, 5 Sep 2022 12:59:09 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id DC7BB27BBE9 for ; Mon, 5 Sep 2022 12:59:08 +0100 (BST) Received: from localhost ([::1]:35292 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oVAkt-0007dN-VE for patchwork@mira.cbaines.net; Mon, 05 Sep 2022 07:59:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44646) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oV5py-0000AS-Gg for guix-patches@gnu.org; Mon, 05 Sep 2022 02:44:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57535) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oV5py-0005qj-7d for guix-patches@gnu.org; Mon, 05 Sep 2022 02:44:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oV5py-0000Rb-2j for guix-patches@gnu.org; Mon, 05 Sep 2022 02:44:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57590] [PATCH] Adding libldm: Manager for Windows dynamic disks including software RAID. It creates device mapper entries for dynamic disks allowing them to be mounted. Resent-From: Lukasz Olszewski Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 05 Sep 2022 06:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57590 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57590@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16623601901631 (code B ref -1); Mon, 05 Sep 2022 06:44:01 +0000 Received: (at submit) by debbugs.gnu.org; 5 Sep 2022 06:43:10 +0000 Received: from localhost ([127.0.0.1]:46231 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oV5p7-0000QC-5z for submit@debbugs.gnu.org; Mon, 05 Sep 2022 02:43:10 -0400 Received: from lists.gnu.org ([209.51.188.17]:41304) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oUxOy-0003NN-FK for submit@debbugs.gnu.org; Sun, 04 Sep 2022 17:43:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57436) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oUxOy-000692-3p for guix-patches@gnu.org; Sun, 04 Sep 2022 17:43:36 -0400 Received: from mail-ot1-x32a.google.com ([2607:f8b0:4864:20::32a]:40946) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oUxOv-0005dG-U0 for guix-patches@gnu.org; Sun, 04 Sep 2022 17:43:35 -0400 Received: by mail-ot1-x32a.google.com with SMTP id z22-20020a056830129600b0063711f456ceso5099117otp.7 for ; Sun, 04 Sep 2022 14:43:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lukaszolszewski-info.20210112.gappssmtp.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date; bh=uyuGMi2B5LPfA6WWwwUORfkG/ESTVfiA8bahNhcexGo=; b=VdYsh8kGahW3deWwLVUGc1TqR0vRzMNxzZc9G4fbsQcvnm4/Lm4iLPZwTnx+OsIB4S 8ETRmc5sctaICMTPonAMLt+/KkQ/b1FA7kV07eEcMZV5PYrd0/evgkTdDXEgu8BucFe5 A948TUGiQVNOZztYssEoi2bxWizWG4sUThxFEtcVcM20Uw9xHtv+OlqRX1tVcmnazZHX 9EYR0P0SAoe3ZnlkpY/mePMlC0zYoMtQ1/SWEwHg35G3r/mrUThANaCFoz7d/x7huaNg +TGoeEgB9TPV4ArFHEnHTG9WHZPw4Ivl0s8Tf1eTp5+8UmnCz0C3AsWyb/Sura4bsV47 YDLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date; bh=uyuGMi2B5LPfA6WWwwUORfkG/ESTVfiA8bahNhcexGo=; b=tpyXSbP7xDc5KVW2B6fzy8/WNtqJelyNZ6NFt1shwBqAowmPQ7CBn0lXqckKz+z4q8 tsCRyceqAf/y93zCqg2LFFR0bUMgksbNmE+S5Ij0azAP7U1KMBGnT32vtVjn7nsG/DTt ToPUmH2nW2qIGp8zPxeHQyc1Nyrh9uHgYqTpBgwYUf9h57ESPJzCL1EAy2lUB+piqsew vqKtGaJSQ0OEz+5d9Uwe0/fSvU3BUiiDpVMaZw6ksZQc9670uhEQhJvnFmrQvRUVtcMd r9wab6zGsZ2w8HakMsLgIhAC/bdh1I04CvaY2xyR9N+6S7USkocvStAEfDiwjDiNIxrQ Z+5g== X-Gm-Message-State: ACgBeo32qi9wvGXOyLtdlQUNAQtF43iySaTFop+beyTPmtpgw/vzGMh3 /dAhRkIMhWM5gRYUR9mAC9kvP4HyFXe/gVSC3cYeYtO4STmbEw== X-Google-Smtp-Source: AA6agR7npVycvx7HlMwKXeBGWcxyuOye7SpOb7PYoW+GNWxM6ynzoXQ2BOiMzVORFnxAwJpYSOuUT99+x0fkURc6ygw= X-Received: by 2002:a9d:5a88:0:b0:638:911a:d7fd with SMTP id w8-20020a9d5a88000000b00638911ad7fdmr18392279oth.6.1662327811475; Sun, 04 Sep 2022 14:43:31 -0700 (PDT) MIME-Version: 1.0 From: Lukasz Olszewski Date: Sun, 4 Sep 2022 23:42:55 +0200 Message-ID: Received-SPF: none client-ip=2607:f8b0:4864:20::32a; envelope-from=email@lukaszolszewski.info; helo=mail-ot1-x32a.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 05 Sep 2022 02:43:07 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Mon, 05 Sep 2022 07:57:27 -0400 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches --- gnu/packages/libldm.scm | 70 +++++++++++++++++++++++++++++++++++++++++ gnu/services/libldm.scm | 47 +++++++++++++++++++++++++++ 2 files changed, 117 insertions(+) create mode 100644 gnu/packages/libldm.scm create mode 100644 gnu/services/libldm.scm + libldm-shepherd-service))) + (default-value (libldm-configuration)) + (description + "Run ldmtool to create device nodes for Windows dynamic discs so they can be mounted"))) base-commit: 41bce2414a286836b4071d90b660fb457ee76e32 diff --git a/gnu/packages/libldm.scm b/gnu/packages/libldm.scm new file mode 100644 index 0000000000..38fb5e218e --- /dev/null +++ b/gnu/packages/libldm.scm @@ -0,0 +1,70 @@ +(define-module (gnu packages libldm) + #:use-module (gnu packages) + #:use-module (guix packages) + #:use-module ((guix licenses) + #:prefix license:) + #:use-module (guix build-system gnu) + #:use-module (gnu packages base) + #:use-module (gnu packages autotools) + #:use-module (gnu packages m4) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages gnome) + #:use-module (gnu packages glib) + #:use-module (gnu packages compression) + #:use-module (gnu packages readline) + #:use-module (gnu packages linux) + #:use-module (gnu packages xml) + #:use-module (gnu packages docbook) + #:use-module (gnu packages gtk) + #:use-module (guix git-download)) + +(define-public libldm + (package + (name "libldm") + (version "0.2.5") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/mdbooth/libldm.git") + (commit (string-append "libldm-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "08iz3kq4ci79abpyxwwqmzi3bayyk4s29n8h1jqgdgk5yskwgnrn")))) + (build-system gnu-build-system) + (inputs (list json-glib + glib + zlib + readline + lvm2 + libgudev)) + (native-inputs (list which + m4 + libtool + autoconf-wrapper + automake + pkg-config + `(,glib "bin") + gtk-doc + libxml2 + libxslt + docbook-xsl)) + (arguments + '(#:tests? #f + #:parallel-build? #t + #:phases (modify-phases %standard-phases + (add-before 'configure 'set-env + (lambda _ + (setenv "CONFIG_SHELL" + (which "")) #t)) + (add-before 'bootstrap 'run-gtkdocize + (lambda _ + (invoke "gtkdocize"))) + (replace 'bootstrap + (lambda _ + (invoke "autoreconf" "-fiv")))))) + (home-page "https://github.com/mdbooth/libldm") + (synopsis "Manager for Microsoft Windows dynamic disks") + (description + "Libldm is a library for managing Microsoft Windows dynamic disks, which use Microsoft's LDM metadata. It can inspect them, and also create and remove device-mapper block devices which can be mounted.") + (license license:gpl3))) diff --git a/gnu/services/libldm.scm b/gnu/services/libldm.scm new file mode 100644 index 0000000000..00e19540f0 --- /dev/null +++ b/gnu/services/libldm.scm @@ -0,0 +1,47 @@ +(define-module (gnu services libldm) + #:use-module (guix records) + #:use-module (guix gexp) + #:use-module (guix diagnostics) + #:use-module (guix i18n) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) + #:use-module (ice-9 match) + #:use-module (guix gexp) + #:use-module (gnu services) + #:use-module (guix modules) + #:use-module (gnu services base) + #:use-module (gnu services shepherd) + #:use-module (gnu packages libldm) + #:export (libldm-configuration libldm-configuration? libldm-service-type)) + +(define-record-type* + libldm-configuration + make-libldm-configuration + libldm-configuration? + (package + libldm-configuration-package + (default libldm)) + (action libldm-configuration-action + (default '("create" "all")))) + +(define (libldm-shepherd-service config) + "Return a for libldm with CONFIG" + (let* ((libldm (libldm-configuration-package config)) + (action (libldm-configuration-action config))) + (list (shepherd-service (documentation + "Run ldmtool to create Windows dynamic disc device nodes at startup.") + (provision '(libldmd)) + (one-shot? #t) + (start #~(make-forkexec-constructor (append (list (string-append #$libldm + "/bin/ldmtool")) + '(#$@action)))) + (stop #~(make-kill-destructor)))))) + +(define libldm-service-type + (service-type (name 'libldm) + (extensions (list (service-extension + shepherd-root-service-type