Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 700960

Summary: New package ebuild: sys-fs/libldm-0.2.4
Product: Gentoo Linux Reporter: Teika kazura <teika>
Component: New packagesAssignee: Default Assignee for New Packages <maintainer-wanted>
Status: UNCONFIRMED ---    
Severity: enhancement CC: claytonc
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Attachments: The ebuild
Modified due to different patch sourcing.
Modified due to different patch sourcing.
Modified build due to different patch sourcing.
Originally Arch based systemd service Prefix=/usr/local, now edited for Prefix=/usr

Description Teika kazura 2019-11-23 01:07:52 UTC
Let me submit an ebuild for libldm-0.2.4. It gives read/write access to MS Win's "dynamic disks", similar to LVM / RAID in Linux. (For a quick, practical intro to dynamic disks, see this Arch Wiki page: )

Some comments are in order:
* There's also in-kernel support of LDM, but it's outdated, being limited to MBR, not GPT.
* The package has a long enough history, so probably reliable enough. The developer seems to be from RedHat.
* The name: The upstream (github repo) name is lidldm:
* It mainly consists of the (only) command "/usr/bin/ldmtool" and The former is linked to the latter.
* All what matters to users is the command, not the library. So the better package name can be "ldmtool".
  In fact Debian has a package "ldmtool" (partly it's because they split into ldmtool and libldm{,-dev,-dbg}.
* Arch has a systemd config file: (Dunno what's systemd. :p)
* Two patches are cherry-picked from github. Arch and Debian uses one of them, but judging from the commit message, both seem to be worth including.
* Maybe Bdep on gtk-doc can be dropped, but I don't know how to do it. It seems to be related to the generation of the man1 ldmtool.1 from ldmtool.xml. The configure script emits an error if gtk-doc is not found.

It builds successfully. (Of course) However I haven't tested ldmtool (1). It's because I don't, and will never, have a dynamic disk. (I discovered it only after I wrote the ebuild.) I post the ebuild here because it may benefit someone.

Best regards.

Reproducible: Always
Comment 1 Teika kazura 2019-11-23 01:10:28 UTC
Created attachment 597144 [details]
The ebuild
Comment 2 Clayton Clarke 2020-07-20 01:40:23 UTC
I succeeded in using your supplied build and encountered this error 'Partition volume offset does not match sizes of preceding partitions' did some digging and discovered that this is due to the dm creator processing the sub partitions and possibly disk in sequential order.  Within my search results there was results for unmoon and guysmoilov git repositories which have patched part of the dm create part of the source code to arrange sub parts and i guess disks by offset rather than sequential and this rectified the issue immediately.

  I was unable to test multiple disks in a spanned ldm volume due to only having a spanned volume on a singular disk. Whilst I was browsing said repositories I also came across some previous commits that had been made by mdbooth, unmoon and guysloilov.  I ran an diff to create a patch with the diffs between the 0.2.4 tar and the version of ldm.c from guysloilov's repository as of Mar 2020 which covered in all about 5 in all and its running lovely. I will shortly be posting my ebuild patch and service file that is corrected due to arch difference (usr/local/bin).
Thanks for reading
Comment 3 Clayton Clarke 2020-07-20 01:50:41 UTC
Created attachment 649916 [details, diff]
Modified due to different patch sourcing.

couldn't find the original patch files, so made a new one
Comment 4 Clayton Clarke 2020-07-20 01:53:10 UTC
Created attachment 649918 [details, diff]
Modified due to different patch sourcing.

Sorry should have ticked the patch box correctly
Comment 5 Clayton Clarke 2020-07-20 01:57:12 UTC
Created attachment 649920 [details]
Modified build due to different patch sourcing.

Here is the modified ebuild to go in part with the above patch.
Comment 6 Clayton Clarke 2020-07-20 02:01:44 UTC
Created attachment 649922 [details]
Originally Arch based systemd service Prefix=/usr/local, now edited for Prefix=/usr

Here is the fit for gentoo systemd service file