Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 972568 - Review Request: uthash - A hash table for C structures
Review Request: uthash - A hash table for C structures
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Susi Lehtola
Fedora Extras Quality Assurance
:
: 798438 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-10 02:04 EDT by Christopher Meng
Modified: 2014-05-06 07:52 EDT (History)
3 users (show)

See Also:
Fixed In Version: uthash-1.9.8-3.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-08 21:37:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
susi.lehtola: fedora‑review+
limburgher: fedora‑cvs+


Attachments (Terms of Use)

  None (edit)
Description Christopher Meng 2013-06-10 02:04:12 EDT
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 02:04:26 EDT
*** Bug 798438 has been marked as a duplicate of this bug. ***
Comment 2 Susi Lehtola 2013-06-13 18:32:37 EDT
Fails to build in mock

perl ./do_tests
test83 failed
test84 failed
84 tests conducted, 2 failed.
Comment 3 Susi Lehtola 2013-06-13 18:39:20 EDT
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-13 23:53:07 EDT
(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 01:51:02 EDT
> 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 01:57:07 EDT
(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 03:34:16 EDT
(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 03:57:53 EDT
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 05:29:19 EDT
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 05:54:51 EDT
 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 07:25:41 EDT
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 12:06:48 EDT
Git done (by process-git-requests).
Comment 13 Fedora Update System 2013-06-30 02:18:29 EDT
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 02:31:33 EDT
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 02:48:00 EDT
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 16:11:01 EDT
uthash-1.9.8-3.el6 has been pushed to the Fedora EPEL 6 testing repository.
Comment 17 Fedora Update System 2013-07-08 21:37:43 EDT
uthash-1.9.8-3.fc19 has been pushed to the Fedora 19 stable repository.
Comment 18 Fedora Update System 2013-07-08 21:40:54 EDT
uthash-1.9.8-3.fc18 has been pushed to the Fedora 18 stable repository.
Comment 19 Fedora Update System 2013-07-17 16:19:53 EDT
uthash-1.9.8-3.el6 has been pushed to the Fedora EPEL 6 stable repository.
Comment 20 Christopher Meng 2014-05-05 23:59:41 EDT
Package Change Request
======================
Package Name: uthash
New Branches: epel7
Owners: cicku
Comment 21 Gwyn Ciesla 2014-05-06 07:52:20 EDT
Git done (by process-git-requests).

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