Bug 573448 - Review request: TinyCDB
Summary: Review request: TinyCDB
Keywords:
Status: CLOSED DUPLICATE of bug 612023
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Nobody's working on this, feel free to take it
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-03-14 21:28 UTC by Adrien Bustany
Modified: 2013-10-19 14:42 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-07-12 03:45:44 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Adrien Bustany 2010-03-14 21:28:06 UTC
TinyCDB is a very fast and simple package for creating and reading constant data bases, a data structure introduced by Dan J. Bernstein in his cdb package. It may be used to speed up searches in a sequence of (key,value) pairs with very big number of records. Example usage is indexing a big list of users - where a search will require linear reading of a large /etc/passwd file, and for many other tasks. It's usage/API is similar to ones found in BerkeleyDB, gdbm and traditional *nix dbm/ndbm libraries, and is compatible in great extent to cdb-0.75 package by Dan Bernstein.

CDB is a constant database, that is, it cannot be updated at a runtime, only rebuilt. Rebuilding is atomic operation and is very fast - much faster than of many other similar packages. Once created, CDB may be queried, and a query takes very little time to complete. 

SPEC file: http://mymadcat.com/~madcat/packages/SPECS/tinycdb.spec
SRPM: http://mymadcat.com/~madcat/packages/SRPMS/tinycdb-0.77-1.fc12.src.rpm

Note: I'm not sure the way I patched the Makefile is a "best practice", but it works...

Comment 1 Martin Gieseking 2010-03-27 08:46:29 UTC
Adrien, is this your first package? I can't find you in the Fedora Account System. If so, you have to be sponsored to become a packager (see https://fedoraproject.org/wiki/PackageMaintainers/Join). To find one, add FE-NEEDSPONSOR to the Blocks field above.

A couple of quick comments on your package:

- The summary should not mention the package name. Simply replace it by "A simple utility for creating and reading constant data bases"


- According to the source code headers and the website, TinyCDB is Public Domain software, so change the license from "GPL" to "Public Domain".

- Add short comments above Patch0 and Patch1 describing what they do

- The lines of the description text should not exceed 80 characters. Split them properly.

- File libcdb.so must be placed in the devel package.

- You must call ldconfig in %post and %postun (see https://fedoraproject.org/wiki/Packaging/Guidelines#Shared_Libraries)

- Replace the man page suffixes ".gz" with "*", e.g. %{_mandir}/man1/cdb.1* since packages shouldn't rely on a specific compression format.

- The version/revision number is missing in the changelog entry:
* Sun Mar 14 2010 Adrien Bustany <abustany> - 0.77-1

Comment 2 Adrien Bustany 2010-03-27 19:30:36 UTC
Hi Martin, thanks for the comprehensive review. I actualized the SPEC file and SRPM. I didn't increment the release number, should have I done it ? I didn't do it because I didn't really "improve" the SPEC file, but rather fixed beginner's bugs.
I do have a FAS account, under the same mail address as my bugzilla. But I'm not a packager yet. So I added the block you told me.

Cheers

Adrien

Comment 3 Martin Gieseking 2010-03-28 10:44:26 UTC
(In reply to comment #2)
> I didn't increment the release number, should have I done it ?

Hi Adrien,

yes, you should bump the release number every time you offer a new/different spec file. It doesn't matter what kind of changes have been made. Otherwise it could become confusing if several reviewers downloaded and comment on different versions of the same release.

I had a closer look at the package and there are still some things to do:

- First of all, put the file libcdb.so.1 back to the base package. Only the symlink libcdb.so should go to devel.

- You must ensure that CFLAGS is set to %{optflags} during the build process. In the Makefile delete line CFLAGS = -O, and add CFLAGS="%{optflags}" to the "make" lines in the %build section

- I suggest to create a single patch for the Makefile instead of splitting it in two parts.

- All binaries should be linked against shared libraries if possible, and shouldn't use the static variants. Fortunately, the Makefile contains a rule to build cdb-shared, which we could rename to cdb. 
Thus, change the %build section to (long lines clipped here):
  make %{?_smp_mflags} PREFIX="%{_prefix}" ...
  make shared %{?_smp_mflags} PREFIX="%{_prefix}"  ...
  mv cdb-shared cdb

- Finally, always check your RPMs with rpmlint in order to find potential problems. After applying the above changes, I get only spelling warnings that could be ignored:

$ rpmlint /var/lib/mock/fedora-12-x86_64/result/*.rpm
tinycdb.src: W: spelling-error %description -l en_US cdb -> db, cab, cob
tinycdb.src: W: spelling-error %description -l en_US passwd -> passed
tinycdb.src: W: spelling-error %description -l en_US gdbm -> DBMS, Gd, GDP
tinycdb.src: W: spelling-error %description -l en_US dbm -> db, dim, dam
tinycdb.src: W: spelling-error %description -l en_US ndbm -> DBMS, Nd, numb
tinycdb.src: W: spelling-error %description -l en_US runtime -> run time, run-time, untimely
tinycdb.x86_64: W: spelling-error %description -l en_US passwd -> passed
tinycdb.x86_64: W: spelling-error %description -l en_US gdbm -> DBMS, Gd, GDP
tinycdb.x86_64: W: spelling-error %description -l en_US dbm -> db, dim, dam
tinycdb.x86_64: W: spelling-error %description -l en_US ndbm -> DBMS, Nd, numb
tinycdb.x86_64: W: spelling-error %description -l en_US runtime -> run time, run-time, untimely
tinycdb-devel.x86_64: W: spelling-error %description -l en_US cdb -> db, cab, cob
tinycdb-devel.x86_64: W: spelling-error %description -l en_US passwd -> passed
tinycdb-devel.x86_64: W: spelling-error %description -l en_US gdbm -> DBMS, Gd, GDP
tinycdb-devel.x86_64: W: spelling-error %description -l en_US dbm -> db, dim, dam
tinycdb-devel.x86_64: W: spelling-error %description -l en_US ndbm -> DBMS, Nd, numb
tinycdb-devel.x86_64: W: spelling-error %description -l en_US runtime -> run time, run-time, untimely
tinycdb-devel.x86_64: W: no-documentation
4 packages and 0 specfiles checked; 0 errors, 18 warnings.

Comment 4 Adrien Bustany 2010-03-28 14:21:48 UTC
Hmm, is there a policy for where to put symlinks to .so files ? I didn't find anything in the packaging guidelines...
Anyway, so put back the .so.1 file where it belongs, and fixed hopefully all your remarks. I had actually run rpmlint, but on the spec file, not the generated rpms...
I also merged all the patches in one. I'll write to the author to see if we can get that upstream.

SPEC: http://mymadcat.com/~madcat/packages/SPECS/tinycdb.spec
SRPM: http://mymadcat.com/~madcat/packages/SRPMS/tinycdb-0.77-2.fc12.src.rpm

Note: rpmlint here whines about a non stripped object, is this normal ? I searched for "strip" in the packaging guidelines but found nothing :/

Comment 5 Martin Gieseking 2010-03-28 15:44:30 UTC
(In reply to comment #4)
> Hmm, is there a policy for where to put symlinks to .so files ? I didn't find
> anything in the packaging guidelines...

Yes, see here for example:
https://fedoraproject.org/wiki/Packaging/Guidelines#DevelPackages

I'll have a look at the rest later today.

Comment 6 Martin Gieseking 2010-03-28 19:47:48 UTC
(In reply to comment #4)
> Note: rpmlint here whines about a non stripped object, is this normal ? 

No, the debuginfo should be automatically stripped by rpmbuild (via find-debuginfo.sh). If that doesn't happen properly, there is usually something wrong. In this case, the file permissions of libcdt.so.1 aren't properly set. find-debuginfo.sh only strips executable files. Thus, replace the 644 by 755 in line 140 of the Makefile:
  install -m 755 -t $(DESTDIR)$(libdir) $(SHAREDLIB)

Comment 8 Itamar Reis Peixoto 2010-03-28 20:29:11 UTC
my suggestion is to port it to use gnu-auto-tools

Comment 9 Adrien Bustany 2010-03-28 20:42:09 UTC
It would of course be better, I'd have to see that with the maintainer. Meanwhile, my patches, though not graceful, are working...

Comment 10 Martin Gieseking 2010-03-31 15:45:59 UTC
Two further remarks: :)

- man3/cdb.3* contains the API documentation, thus it belongs to -devel

- please add a blank line between the changelog revisions

BTW, I'm not a sponsor, so I can't formally review this package.

Comment 11 Chen Lei 2010-07-11 03:49:37 UTC
Adrien,

Do you still interested in this package? We need this package be reviewed soon.

In order to get sponsored[1], you need to submit some other Review Request along with this package and do some preview review[2] to other Review Request.

[1]https://fedoraproject.org/wiki/How_to_get_sponsored_into_the_packager_group
[2]http://fedoraproject.org/wiki/Package_Review_Process

Comment 12 Adrien Bustany 2010-07-11 11:47:32 UTC
Chen,

I'm affraid I won't have enough spare time to properly work on this package, feel free to take it if you want

Regards

Adrien

Comment 13 Chen Lei 2010-07-12 03:44:48 UTC
(In reply to comment #12)
> Chen,
> 
> I'm affraid I won't have enough spare time to properly work on this package,
> feel free to take it if you want
> 
> Regards
> 
> Adrien    

Thanks for contributing to fedora, feel free to apply co-maintainer for all of my packages[1] after you get sponsored some time later :)

[1] https://admin.fedoraproject.org/pkgdb/users/packages/supercyper

Comment 14 Chen Lei 2010-07-12 03:45:44 UTC

*** This bug has been marked as a duplicate of bug 612023 ***


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