Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 700960 - New package ebuild: sys-fs/libldm-0.2.4
Summary: New package ebuild: sys-fs/libldm-0.2.4
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement
Assignee: Default Assignee for New Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-23 01:07 UTC by Teika kazura
Modified: 2023-07-10 16:40 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
The ebuild (libldm-0.2.4.ebuild,754 bytes, text/plain)
2019-11-23 01:10 UTC, Teika kazura
Details
Modified due to different patch sourcing. (libldmguysmoilovgitchangesupto20032020.patch,24.24 KB, patch)
2020-07-20 01:50 UTC, Clayton Clarke
Details | Diff
Modified due to different patch sourcing. (libldmguysmoilovgitchangesupto20032020.patch,24.24 KB, patch)
2020-07-20 01:53 UTC, Clayton Clarke
Details | Diff
Modified build due to different patch sourcing. (libldm-0.2.4.ebuild,825 bytes, text/plain)
2020-07-20 01:57 UTC, Clayton Clarke
Details
Originally Arch based systemd service Prefix=/usr/local, now edited for Prefix=/usr (ldmtool.service,170 bytes, text/x-dbus-service)
2020-07-20 02:01 UTC, Clayton Clarke
Details

Note You need to log in before you can comment on or make changes to this bug.
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: https://wiki.archlinux.org/index.php/Dynamic_disks )

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: https://github.com/mdbooth/libldm
* It mainly consists of the (only) command "/usr/bin/ldmtool" and lidldm-1.0.so. 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: https://git.archlinux.org/svntogit/community.git/tree/trunk/ldmtool.service?h=packages/libldm (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
Comment 7 Clayton Clarke 2023-07-10 16:40:16 UTC
been a good few years, I recently checked libldm (mdbooth) github and noticed new tag/release, will look into it over the coming months/years, not activley using gentoo linux these days. Previous release helped to work on a GPT device with 2 Dynamic parts in data recovery work.