Bug 972568 - Review Request: uthash - A hash table for C structures
Summary: Review Request: uthash - A hash table for C structures
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Susi Lehtola
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 798438 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-10 06:04 UTC by Christopher Meng
Modified: 2014-05-06 11:52 UTC (History)
3 users (show)

Fixed In Version: uthash-1.9.8-3.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-09 01:37:43 UTC
Type: ---
Embargoed:
susi.lehtola: fedora-review+
gwync: fedora-cvs+


Attachments (Terms of Use)

Description Christopher Meng 2013-06-10 06:04:12 UTC
Spec URL: http://cicku.me/uthash.spec
SRPM URL: http://cicku.me/uthash-1.9.8-1.fc20.src.rpm
Description: Any C structure can be stored in a hash table using uthash. Just add a
UT_hash_handle to the structure and choose one or more fields in your 
structure to act as the key. Then use these macros to store, retrieve or 
delete items from the hash table. 
Fedora Account System Username: cicku

Comment 1 Christopher Meng 2013-06-10 06:04:26 UTC
*** Bug 798438 has been marked as a duplicate of this bug. ***

Comment 2 Susi Lehtola 2013-06-13 22:32:37 UTC
Fails to build in mock

perl ./do_tests
test83 failed
test84 failed
84 tests conducted, 2 failed.

Comment 3 Susi Lehtola 2013-06-13 22:39:20 UTC
Initial notes:


Source URL is incorrect
Source0:         http://prdownloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
see

http://fedoraproject.org/wiki/Packaging:SourceURL?rd=Packaging/SourceURL#Sourceforge.net

**

BuildRequires:   glibc-devel
can be removed, it's one of the packages that's automatically installed anyway.

**

The files don't belong in a package called uthash. Instead, they should go to uthash-devel as per the packaging guidelines.

You can, of course, make uthash-devel provide uthash, so that installing uthash gives you uthash-devel. (There should be no main package.)

**

I abhor rampant use of wildcards in %files, because they can lead to unwanted results, and often it's much clearer to just type out the few extra letters to make things clear to anyone reading the spec. So I really suggest changing
 %{_includedir}/*
to
 %{_includedir}/ut*.h

Comment 4 Christopher Meng 2013-06-14 03:53:07 UTC
(In reply to Susi Lehtola from comment #3)

> Source URL is incorrect
> Source0:        
> http://prdownloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
> see
> 
> http://fedoraproject.org/wiki/Packaging:SourceURL?rd=Packaging/
> SourceURL#Sourceforge.net

Hi, thanks for your review help first.

This project has been moved to github, I've fixed the problem.

FYI, I've sent a mail to notify the upstream to provide the latest tarball on sf.net. Please go ahead(I won't ignore this.)

> 
> BuildRequires:   glibc-devel
> can be removed, it's one of the packages that's automatically installed
> anyway.

Fixed.

> The files don't belong in a package called uthash. Instead, they should go
> to uthash-devel as per the packaging guidelines.
> 
> You can, of course, make uthash-devel provide uthash, so that installing
> uthash gives you uthash-devel. (There should be no main package.)

I remembered that I've browsed some review requests like such case, reviewer approved. I think suck package is no problem. Welcome any ideas.

> I abhor rampant use of wildcards in %files, because they can lead to
> unwanted results, and often it's much clearer to just type out the few extra
> letters to make things clear to anyone reading the spec. So I really suggest
> changing
>  %{_includedir}/*
> to
>  %{_includedir}/ut*.h

OK, easy fix.

Fails to build in mock

> perl ./do_tests
> test83 failed
> test84 failed
> 84 tests conducted, 2 failed.

Hmm... I know this problem as it occured when I first built it. But then there are no problems, even fedora-review on my host is OK.

I just scratch a build and it really failed, I'll try to fix that.

I'll update this package later.

Comment 5 Michael Schwendt 2013-06-14 05:51:02 UTC
> The files don't belong in a package called uthash.
> Instead, they should go to uthash-devel as per the
> packaging guidelines.

Which would make sense. Just IMHO, and I recommend that for library-less -devel packages so they are like all other -devel packages. However, kindly refer to bug 798438 comment 9. The FPC finds it acceptable, if library-less development packages (no matter whether they contain only headers or also tools) would not be named -devel but used the base package for including their files. As such, building just uthash.noarch from uthash.src.rpm would be okay, although enough packagers would prefer the uthash-devel.noarch style.

Comment 6 Christopher Meng 2013-06-14 05:57:07 UTC
(In reply to Michael Schwendt from comment #5)
> Which would make sense. Just IMHO, and I recommend that for library-less
> -devel packages so they are like all other -devel packages. However, kindly
> refer to bug 798438 comment 9. The FPC finds it acceptable, if library-less
> development packages (no matter whether they contain only headers or also
> tools) would not be named -devel but used the base package for including
> their files. As such, building just uthash.noarch from uthash.src.rpm would
> be okay, although enough packagers would prefer the uthash-devel.noarch
> style.

Yes, I've seen this review before packaging uthash. I dislike packages only named -devel, but no main package existed.

Comment 7 Susi Lehtola 2013-06-14 07:34:16 UTC
(In reply to Christopher Meng from comment #6)
> (In reply to Michael Schwendt from comment #5)
> > Which would make sense. Just IMHO, and I recommend that for library-less
> > -devel packages so they are like all other -devel packages. However, kindly
> > refer to bug 798438 comment 9. The FPC finds it acceptable, if library-less
> > development packages (no matter whether they contain only headers or also
> > tools) would not be named -devel but used the base package for including
> > their files. As such, building just uthash.noarch from uthash.src.rpm would
> > be okay, although enough packagers would prefer the uthash-devel.noarch
> > style.
> 
> Yes, I've seen this review before packaging uthash. I dislike packages only
> named -devel, but no main package existed.

Well, the most important thing is that the package that provides the files somehow provides uthash-devel. So either the main package contains the files and Provides: uthash-devel, or the -devel package contains the files and Provides: uthash.

In both cases "yum install uthash" works, and so does "yum install uthash-devel".

(In reply to Christopher Meng from comment #4)
> (In reply to Susi Lehtola from comment #3)
> > Fails to build in mock
> 
> > perl ./do_tests
> > test83 failed
> > test84 failed
> > 84 tests conducted, 2 failed.
> 
> Hmm... I know this problem as it occured when I first built it. But then
> there are no problems, even fedora-review on my host is OK.

It would seem that these tests fail because the overhead on x86_64 is different than the one (presumably) on x86, so it's okay to just disable tests 83 and 84.

Comment 8 Christopher Meng 2013-06-14 07:57:53 UTC
OK, I'll add virtual provides. And I'll try fixing the test problem before pushing it to the review, please wait a moment.

Thanks.

Comment 9 Christopher Meng 2013-06-16 09:29:19 UTC
NEW Spec URL: http://cicku.me/uthash.spec
NEW SRPM URL: http://cicku.me/uthash-1.9.8-3.fc20.src.rpm

Comment 10 Susi Lehtola 2013-06-29 09:54:51 UTC
 Provides:        %{name}-devel = %{version}
should read
 Provides:        %{name}-devel = %{version}-%{release}

**


Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[-]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[x]: Development files must be in a -devel package
[-]: Package requires other packages for directories it uses.
[x]: Package uses nothing in %doc for runtime.
[x]: Package is not known to require ExcludeArch.
[x]: Package complies to the Packaging Guidelines
[x]: License field in the package spec file matches the actual license.
[x]: Package consistently uses macro is (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[-]: Large documentation must go in a -doc subpackage.
     Note: Documentation size is 122880 bytes in 7 files.
[x]: All build dependencies are listed in BuildRequires, except for any that
     are listed in the exceptions section of Packaging Guidelines.
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Each %files section contains %defattr if rpm < 4.4
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Fully versioned dependency in subpackages, if present.
[x]: If (and only if) the source package includes the text of the license(s)
     in its own file, then that file, containing the text of the license(s)
     for the package is included in %doc.
[x]: Package use %makeinstall only when make install' ' DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package do not use a name that already exist
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as provided
     in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local
[x]: Package successfully compiles and builds into binary rpms on at least one
     supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).

===== SHOULD items =====

Generic:
[-]: If the source package does not include license text(s) as a separate file
     from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Patches link to upstream bugs/comments/lists or are otherwise justified.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[-]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed files.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: Dist tag is present.
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: SourceX tarball generation or download is documented.
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define.

===== EXTRA items =====

Generic:
[x]: Large data in /usr/share should live in a noarch subpackage if package is
     arched.
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).


Rpmlint
-------
Checking: uthash-1.9.8-3.fc18.noarch.rpm
uthash.noarch: W: devel-file-in-non-devel-package /usr/include/utstring.h
uthash.noarch: W: devel-file-in-non-devel-package /usr/include/utlist.h
uthash.noarch: W: devel-file-in-non-devel-package /usr/include/utarray.h
uthash.noarch: W: devel-file-in-non-devel-package /usr/include/uthash.h
uthash.noarch: W: spurious-executable-perm /usr/share/doc/uthash-1.9.8/LICENSE
1 packages and 0 specfiles checked; 0 errors, 5 warnings.




Rpmlint (installed packages)
----------------------------
# rpmlint uthash
uthash.noarch: W: devel-file-in-non-devel-package /usr/include/utstring.h
uthash.noarch: W: devel-file-in-non-devel-package /usr/include/utlist.h
uthash.noarch: W: devel-file-in-non-devel-package /usr/include/utarray.h
uthash.noarch: W: devel-file-in-non-devel-package /usr/include/uthash.h
uthash.noarch: W: spurious-executable-perm /usr/share/doc/uthash-1.9.8/LICENSE
1 packages and 0 specfiles checked; 0 errors, 5 warnings.
# echo 'rpmlint-done:'



Requires
--------
uthash (rpmlib, GLIBC filtered):



Provides
--------
uthash:
    uthash
    uthash-devel



Source checksums
----------------
https://github.com/troydhanson/uthash/archive/v1.9.8.tar.gz :
  CHECKSUM(SHA256) this package     : d9d123ce81c5d127442876fc3b12fab3ad632bee6aca685be7d461c08e24c046
  CHECKSUM(SHA256) upstream package : d9d123ce81c5d127442876fc3b12fab3ad632bee6aca685be7d461c08e24c046


The review is APPROVED. Please fix the provide before git import.

Comment 11 Christopher Meng 2013-06-29 11:25:41 UTC
New Package SCM Request
=======================
Package Name: uthash
Short Description: A hash table for C structures
Owners: cicku
Branches: f18 f19 el6
InitialCC:

Comment 12 Gwyn Ciesla 2013-06-29 16:06:48 UTC
Git done (by process-git-requests).

Comment 13 Fedora Update System 2013-06-30 06:18:29 UTC
uthash-1.9.8-3.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/uthash-1.9.8-3.fc19

Comment 14 Fedora Update System 2013-06-30 06:31:33 UTC
uthash-1.9.8-3.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/uthash-1.9.8-3.fc18

Comment 15 Fedora Update System 2013-06-30 06:48:00 UTC
uthash-1.9.8-3.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/uthash-1.9.8-3.el6

Comment 16 Fedora Update System 2013-06-30 20:11:01 UTC
uthash-1.9.8-3.el6 has been pushed to the Fedora EPEL 6 testing repository.

Comment 17 Fedora Update System 2013-07-09 01:37:43 UTC
uthash-1.9.8-3.fc19 has been pushed to the Fedora 19 stable repository.

Comment 18 Fedora Update System 2013-07-09 01:40:54 UTC
uthash-1.9.8-3.fc18 has been pushed to the Fedora 18 stable repository.

Comment 19 Fedora Update System 2013-07-17 20:19:53 UTC
uthash-1.9.8-3.el6 has been pushed to the Fedora EPEL 6 stable repository.

Comment 20 Christopher Meng 2014-05-06 03:59:41 UTC
Package Change Request
======================
Package Name: uthash
New Branches: epel7
Owners: cicku

Comment 21 Gwyn Ciesla 2014-05-06 11:52:20 UTC
Git done (by process-git-requests).


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