Bug 1174408 - Review Request: libblockdev - A library for low-level manipulation with block devices
Summary: Review Request: libblockdev - A library for low-level manipulation with block...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bohuslav "Slavek" Kabrda
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-15 19:34 UTC by Vratislav Podzimek
Modified: 2015-01-28 16:52 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-01-10 13:45:01 UTC
Type: ---
Embargoed:
bkabrda: fedora-review+
gwync: fedora-cvs+


Attachments (Terms of Use)

Description Vratislav Podzimek 2014-12-15 19:34:44 UTC
Spec URL: https://vpodzime.fedorapeople.org/libblockdev/libblockdev.spec
SRPM URL: https://vpodzime.fedorapeople.org/libblockdev/libblockdev-0.1-1.fc21.src.rpm

Description:
The libblockdev is a C library with GObject introspection support that can be
used for doing low-level operations with block devices like setting up LVM,
BTRFS, LUKS or MD RAID. The library uses plugins (LVM, BTRFS,...) and serves as
a thin wrapper around its plugins' functionality. All the plugins, however, can                                                                                                                                    
be used as standalone libraries. One of the core principles of libblockdev is                                                                                                                                      
that it is stateless from the storage configuration's perspective (e.g. it has
no information about VGs when creating an LV).

Fedora Account System Username: vpodzime

Comment 1 Šimon Lukašík 2014-12-16 09:23:49 UTC
Looks promising, I will take a look.

Comment 2 Šimon Lukašík 2014-12-16 15:07:23 UTC
First couple of ideas:
 - There is no documentation for each plug-in. It is not the must for me, but it would be great to have a few words about each plug-in.
 - name of library: libbd, I am afraid to use libbd as library name. Light search on web for libdb gives some results. What do you think about possible collisions? 
    - package name is libblockdev
    - lib name is bd.
    - header files are in blockdev directory
   I am not sure what can break if those are not consistent.
 - Quoting the Fedora guidelines: 
      In the vast majority of cases, devel packages must require
      the base package using a fully versioned dependency:
      Requires: %{name}%{?_isa} 
 - requires from libblockdev-plugins-all should imho also put the fully versioned dependency in. What if I want to install libblockdev-plugins-all.i686 on my box?
 - spell-check says that metapackage is not word, 'meta-package' will do it.

What are your thoughts, Vraťo?

Comment 3 Vratislav Podzimek 2014-12-17 09:16:17 UTC
One generic reply:
I think this should be about the packaging issues not upstream (although it's me as well) decisions/improvements. And as for the suggestions:

(In reply to Šimon Lukašík from comment #2)
> First couple of ideas:
>  - There is no documentation for each plug-in. It is not the must for me,
> but it would be great to have a few words about each plug-in.
On my TODO list for future development. I plan to generate documentation with gtk-doc for the library and all the plugins.

>  - name of library: libbd, I am afraid to use libbd as library name. Light
> search on web for libdb gives some results. What do you think about possible
> collisions? 
I only found libbd.dll which is a library that is a part of the Internet Explorer. So no, I'm not afraid of the collisions here.

>     - package name is libblockdev
>     - lib name is bd.
No it's not. The library is libblockdev.so, just the plugins are libbd_lvm.so and so on because libblockdev_lvm.so looks too long for me.

>     - header files are in blockdev directory
Not an issue with proper documentation that will come soon, I think. And the blockdev.pc file already has this information.

>    I am not sure what can break if those are not consistent.
I'm not aware of anything.

>  - Quoting the Fedora guidelines: 
>       In the vast majority of cases, devel packages must require
>       the base package using a fully versioned dependency:
>       Requires: %{name}%{?_isa}
I believe all the -devel packages require their base packages as fully versioned dependencies. Or is any missing it?

>  - requires from libblockdev-plugins-all should imho also put the fully
> versioned dependency in. What if I want to install
> libblockdev-plugins-all.i686 on my box?
Good catch, thanks! Fixing.

>  - spell-check says that metapackage is not word, 'meta-package' will do it.
And googlefight (http://www.googlefight.com/index.php?lang=en_GB&word1=meta-package&word2=metapackage) agrees, fixing.

Comment 4 Vratislav Podzimek 2014-12-19 10:02:23 UTC
The two fixes from the comment above are applied (same URLs). Is there anything else I should fix for the package to be "good to go" in its initial version?

Comment 5 Šimon Lukašík 2015-01-08 13:12:30 UTC
I am sorry, I have been quite busy lately. I am unable to allocate time for this now. I'll return to here after Feb 8th. Until then, I'll de-assign myself to allow others to step-in.

I am sorry, Vraťo.

Comment 6 Bohuslav "Slavek" Kabrda 2015-01-08 13:26:33 UTC
Taking this.

Comment 7 Bohuslav "Slavek" Kabrda 2015-01-08 14:16:19 UTC
Ok, so I was trying really hard to find a problem I could report, but I didn't manage :) This package looks very good, APPROVED.

Comment 8 Šimon Lukašík 2015-01-08 22:58:02 UTC
:o)

Comment 9 Vratislav Podzimek 2015-01-09 10:31:36 UTC
New Package SCM Request
=======================
Package Name: libblockdev
Short Description: A library for low-level manipulation with block devices
Upstream URL: https://github.com/vpodzime/libblockdev
Owners: vpodzime
Branches: f20 f21 epel7
InitialCC:

Comment 10 Gwyn Ciesla 2015-01-09 13:10:54 UTC
Git done (by process-git-requests).

Comment 11 Fedora Update System 2015-01-10 13:45:53 UTC
libblockdev-0.1-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/libblockdev-0.1-1.fc21

Comment 12 Fedora Update System 2015-01-14 23:58:37 UTC
libblockdev-0.2-1.fc21 has been pushed to the Fedora 21 stable repository.

Comment 13 Michael Schwendt 2015-01-28 10:32:35 UTC
All plugin lib subpackages except -crypto depend on libbd_crypto.so.0 (subpackage -utils). A similar thing for the -devel subpackages and -utils-devel. They include <utils.h>. That makes splitting off the -utils and -utils-devel packages a questionable decision.

src/lib/blockdev.c also doesn't list the -utils lib as a plugin!



Explicit review and confirmation that the plugin libs are loaded via name.so.$MAJOR_VER and not just name.so would have been very good.


> %files devel
> %{_libdir}/libblockdev.so
> %{_includedir}/blockdev/blockdev.h
> %{_includedir}/blockdev/plugins.h
> …

Directory /usr/include/blockdev is not included anywhere.

  $ repoquery --whatprovides /usr/include/blockdev
  $

https://fedoraproject.org/wiki/Packaging:Guidelines#File_and_Directory_Ownership
https://fedoraproject.org/wiki/Packaging:UnownedDirectories


> %package lvm-devel
> Summary:     Development files for the libblockdev-lvm plugin/library
> Requires: %{name}-lvm%{?_isa} = %{version}-%{release}
> Requires: %{name}-utils-devel

Better would have been to add %{?_isa} also to the -utils-devel Requires. Especially the linking step would need the arch-specific .so lib to be found.

Comment 14 Vratislav Podzimek 2015-01-28 16:52:36 UTC
(In reply to Michael Schwendt (Fedora Packager Sponsors Group) from comment #13)
> All plugin lib subpackages except -crypto depend on libbd_crypto.so.0
> (subpackage -utils). A similar thing for the -devel subpackages and
> -utils-devel. They include <utils.h>. That makes splitting off the -utils
> and -utils-devel packages a questionable decision.
I think you mean libbd_utils.so.0 not libbd_crypto.so.0. The -utils and -utils-devel packages are subpackages because a 3rd party code could use them not because of the plugins.

> 
> src/lib/blockdev.c also doesn't list the -utils lib as a plugin!
The utils lib is not a plugin, it is a library that is not loaded with dlopen().

> 
> 
> 
> Explicit review and confirmation that the plugin libs are loaded via
> name.so.$MAJOR_VER and not just name.so would have been very good.
This is fixed in the recent version of the package.

> 
> 
> > %files devel
> > %{_libdir}/libblockdev.so
> > %{_includedir}/blockdev/blockdev.h
> > %{_includedir}/blockdev/plugins.h
> > …
> 
> Directory /usr/include/blockdev is not included anywhere.
> 
>   $ repoquery --whatprovides /usr/include/blockdev
>   $
> 
> https://fedoraproject.org/wiki/Packaging:
> Guidelines#File_and_Directory_Ownership
> https://fedoraproject.org/wiki/Packaging:UnownedDirectories
Good catch, thanks! Fixing.

> 
> 
> > %package lvm-devel
> > Summary:     Development files for the libblockdev-lvm plugin/library
> > Requires: %{name}-lvm%{?_isa} = %{version}-%{release}
> > Requires: %{name}-utils-devel
> 
> Better would have been to add %{?_isa} also to the -utils-devel Requires.
> Especially the linking step would need the arch-specific .so lib to be found.
Another good catch, thanks! Also fixing.


Note You need to log in before you can comment on or make changes to this bug.