Bug 573448 - Review request: TinyCDB
Review request: TinyCDB
Status: CLOSED DUPLICATE of bug 612023
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
12
All Linux
low Severity medium
: ---
: ---
Assigned To: Nobody's working on this, feel free to take it
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-03-14 17:28 EDT by Adrien Bustany
Modified: 2013-10-19 10:42 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-07-11 23:45:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Adrien Bustany 2010-03-14 17:28:06 EDT
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 04:46:29 EDT
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@gnome.org> - 0.77-1
Comment 2 Adrien Bustany 2010-03-27 15:30:36 EDT
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 06:44:26 EDT
(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 10:21:48 EDT
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 11:44:30 EDT
(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 15:47:48 EDT
(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 16:29:11 EDT
my suggestion is to port it to use gnu-auto-tools
Comment 9 Adrien Bustany 2010-03-28 16:42:09 EDT
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 11:45:59 EDT
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-10 23:49:37 EDT
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 07:47:32 EDT
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-11 23:44:48 EDT
(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-11 23:45:44 EDT

*** 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.