From: Lukasz Olszewski <dev@lukaszolszewski.info>
To: 57590@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.
Date: Sun, 4 Sep 2022 23:42:55 +0200 [thread overview]
Message-ID: <CACwB4R5Nype6=UppoXOZZO234AM5CjA=Opad4hyJNM0WChqKcQ@mail.gmail.com> (raw)
---
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
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>
+ 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 <shepherd-service> 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
+ 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
--
2.36.1
next reply other threads:[~2022-09-05 11:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-04 21:42 Lukasz Olszewski [this message]
2022-09-10 22:02 ` [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 Lukasz Olszewski
2022-10-17 8:03 ` Ludovic Courtès
2022-10-17 11:12 ` Lukasz Olszewski
2022-10-18 15:20 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CACwB4R5Nype6=UppoXOZZO234AM5CjA=Opad4hyJNM0WChqKcQ@mail.gmail.com' \
--to=dev@lukaszolszewski.info \
--cc=57590@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).