Bug 823811 - Review Request: createrepo_c - C implementation of the createrepo
Summary: Review Request: createrepo_c - C implementation of the createrepo
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: David Tardon
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-22 08:27 UTC by Tomas Mlcoch
Modified: 2013-10-19 14:42 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-06-26 00:35:55 UTC
Type: ---
Embargoed:
dan: fedora-review+
gwync: fedora-cvs+


Attachments (Terms of Use)

Description Tomas Mlcoch 2012-05-22 08:27:31 UTC
Spec URL: https://fedorahosted.org/releases/c/r/createrepo_c/createrepo_c.spec
SRPM URL: https://fedorahosted.org/releases/c/r/createrepo_c/createrepo_c-0.1.0-1.src.rpm
Description: C implementation of Createrepo. This utility will generate a common
metadata repository from a directory of rpm packages
Fedora Account System Username: tmlcoch

Comment 1 Tomas Mlcoch 2012-05-22 08:42:30 UTC
This is my first package, so I am in need of sponsorship

Comment 2 David Tardon 2012-05-22 09:53:21 UTC
* does not build in rawhide: http://koji.fedoraproject.org/koji/getfile?taskID=4093537&name=build.log

* unclear license: the spec says GPLv2+, but the tarball contains COPYING (GPLv2) and COPYING.lib (LGPLv2) and both are installed. COPYING is older version of the GPLv2 text and contains wrong FSF address. The same applies to src/package.c, which contains old version of GPLv2 license comment. (It is interesting that it is the only source file with any license specification at all.)

* BuildRoot is not required anymore (but I do not mind that)

* cleaning buildroot in %install and %clean is not required anymore. Again, I do not mind that, except that "[ "$RPM_BUILD_ROOT" != "/" ]" and "make clean" do not make any sense.

* you should not hardcode .gz extension for man pages--use * instead. Also, I think they should be always available -> no %doc. (And I think http://fedoraproject.org/wiki/Packaging/Guidelines#Man_pages implies that.)

* you should consider creating versioned library. Unversioned libraries are for development, not distribution.

Comment 3 Ralf Corsepius 2012-05-22 10:00:05 UTC
(In reply to comment #2)
> Also,
> I think they should be always available -> no %doc. (And I think
> http://fedoraproject.org/wiki/Packaging/Guidelines#Man_pages implies that.)
Not quite. man-pages are implicitly %doc'ed.I.e. explicit %doc on man-pages is redundant.

Comment 4 Dan Horák 2012-05-22 10:04:05 UTC
(In reply to comment #2)
> * does not build in rawhide:
> http://koji.fedoraproject.org/koji/getfile?taskID=4093537&name=build.log
> 
> * unclear license: the spec says GPLv2+, but the tarball contains COPYING
> (GPLv2) and COPYING.lib (LGPLv2) and both are installed. COPYING is older
> version of the GPLv2 text and contains wrong FSF address. The same applies
> to src/package.c, which contains old version of GPLv2 license comment. (It
> is interesting that it is the only source file with any license
> specification at all.)

Please include the proper GPL license header in every source file you wrote, it will make clear what license is used. Simple inclusion of COPYING* in source archive has no legal effect unless specified otherwise. (IANAL)

Comment 5 Tomas Mlcoch 2012-05-23 14:58:41 UTC
Thank you for all your comments!
I have new version of package and spec on the same addresses:

Spec URL: https://fedorahosted.org/releases/c/r/createrepo_c/createrepo_c.spec
SRPM URL: https://fedorahosted.org/releases/c/r/createrepo_c/createrepo_c-0.1.0-1.src.rpm

Please take a look.
Thank you

Comment 6 Dan Horák 2012-05-23 15:05:26 UTC
please increase Release for every published iteration of spec and srpm, not doing so makes it much harder for the reviewer to see what changed, also never release a tarbal with changed content under already used name-version

Comment 7 Ralf Corsepius 2012-05-23 15:12:26 UTC
Some recommendations:

- Please add %{?dist} to your Release:-tag

- Please consider to use xz-compressed tarballs instead of *.bz2 compressed

Blocker:
- The package does not honor RPM_OPT_FLAGS.

Comment 8 Tomas Mlcoch 2012-05-24 10:29:04 UTC
to Dan: Ok
to Ralf: Tag added, xz used, RPM_OPT_FLAGS used (I hope properly - I've followed http://tldp.org/HOWTO/RPM-HOWTO/build.html)

Thank you both

New release:
Spec URL: https://fedorahosted.org/releases/c/r/createrepo_c/createrepo_c.spec
SRPM URL: https://fedorahosted.org/releases/c/r/createrepo_c/createrepo_c-0.1.2-1.fc16.src.rpm
Tarball URL: createrepo_c-0.1.2.tar.xz

Note: Maybe someone should update https://fedoraproject.org/wiki/Packaging:Cmake which says nothing about the RPM_OPT_FLAGS

Comment 9 Ralf Corsepius 2012-05-24 10:36:59 UTC
I regret the RPM_OPT_FLAGS issue persists:
...
cd /builddir/build/BUILD/createrepo_c-0.1.2/src && /usr/bin/cmake -E cmake_link_script CMakeFiles/mergerepo_c.dir/link.txt --verbose=1
/usr/lib64/ccache/gcc  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4  -m64 -mtune=generic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4  -m64 -mtune=generic  -ggdb -O0 -Wall -Wextra   -Wl,-z,relro  CMakeFiles/mergerepo_c.dir/mergerepo_c.c.o  -o mergerepo_c -rdynamic libcreaterepo_c.so.0.1.2 -lglib-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lz -lrpmio -lrpm -lbz2 -lmagic -lxml2 -lexpat -lcurl -lglib-2.0 -Wl,-rpath,/builddir/build/BUILD/createrepo_c-0.1.2/src: 
In file included from /usr/include/limits.h:27:0,
                 from /usr/lib/gcc/x86_64-redhat-linux/4.7.0/include/limits.h:169,
                 from /usr/lib/gcc/x86_64-redhat-linux/4.7.0/include/syslimits.h:7,
                 from /usr/lib/gcc/x86_64-redhat-linux/4.7.0/include/limits.h:34,
                 from /usr/lib64/glib-2.0/include/glibconfig.h:11,
                 from /usr/include/glib-2.0/glib/gtypes.h:34,
                 from /usr/include/glib-2.0/glib/galloca.h:34,
                 from /usr/include/glib-2.0/glib.h:32,
                 from /builddir/build/BUILD/createrepo_c-0.1.2/src/createrepo_c.c:19:
/usr/include/features.h:314:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]

Something is overriding the values from RPM_OPT_FLAGS.
Where does this -ggdb -O0 come from?

Comment 10 David Tardon 2012-05-25 07:40:48 UTC
(In reply to comment #9)
> I regret the RPM_OPT_FLAGS issue persists:
> ...
> Something is overriding the values from RPM_OPT_FLAGS.
> Where does this -ggdb -O0 come from?

dtardon->tmlcoch: You have

set (CMAKE_BUILD_TYPE DEBUG)

in CMakeLists.txt . You either have to set it to RELEASE, or add -DCMAKE_BUILD_TYPE:STRING=RELEASE (at least I think this is the correct form) to %cmake.

Comment 11 Dan Horák 2012-05-25 08:02:43 UTC
Best option for standard cmake is RelWithDebInfo - http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_change_the_default_build_mode_and_see_it_reflected_in_the_GUI.3F

Comment 14 David Tardon 2012-06-07 11:19:57 UTC
Package Review
==============

Key:
- = N/A
x = Pass
! = Fail
? = Not evaluated



==== C/C++ ====
[x]: MUST Header files in -devel subpackage, if present.
[x]: MUST ldconfig called in %post and %postun if required.
[x]: MUST Package does not contain any libtool archives (.la)
[x]: MUST Package does not contain kernel modules.
[x]: MUST Package contains no static executables.
[x]: MUST Rpath absent or only used for internal libs.
[x]: MUST Package is not relocatable.
[!]: MUST Development (unversioned) .so files in -devel subpackage, if
     present.
     Note: createrepo_c-0.1.4-1.fc18.i686.rpm : /usr/lib/libcreaterepo_c.so


==== Generic ====
[x]: MUST Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: MUST Package successfully compiles and builds into binary rpms on at
     least one supported primary architecture.
[x]: MUST %build honors applicable compiler flags or justifies otherwise.
[x]: MUST All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
[!]: MUST Buildroot is not present
     Note: Invalid buildroot found: %{_tmppath}/%{name}-%{version}root
[x]: MUST Package contains no bundled libraries.
[x]: MUST Changelog in prescribed format.
[x]: MUST Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
     Note: Clean would be needed if support for EPEL is required
[x]: MUST Sources contain only permissible code or content.
[!]: MUST Each %files section contains %defattr if rpm < 4.4
     Note: defattr(....) present in %files section. This is OK if packaging
     for EPEL5. Otherwise not needed
[x]: MUST Macros in Summary, %description expandable at SRPM build time.
[-]: MUST Package requires other packages for directories it uses.
[x]: MUST Package uses nothing in %doc for runtime.
[x]: MUST Package is not known to require ExcludeArch.
[x]: MUST Permissions on files are set properly.
[x]: MUST Package does not contain duplicates in %files.
[x]: MUST Spec file lacks Packager, Vendor, PreReq tags.
[x]: MUST Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
     Note: rm -rf would be needed if support for EPEL5 is required
[-]: MUST Large documentation files are in a -doc subpackage, if required.
[x]: MUST 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]: MUST License field in the package spec file matches the actual license.
[x]: MUST Package consistently uses macros (instead of hard-coded directory
     names).
[x]: MUST Package is named according to the Package Naming Guidelines.
[x]: MUST Package does not generate any conflict.
[x]: MUST Package obeys FHS, except libexecdir and /usr/target.
[x]: MUST Package must own all directories that it creates.
[x]: MUST Package does not own files or directories owned by other packages.
[x]: MUST Package installs properly.
[-]: MUST Requires correct, justified where necessary.
[!]: MUST Rpmlint output is silent.

rpmlint createrepo_c-0.1.4-1.fc18.src.rpm

createrepo_c.src: W: spelling-error Summary(en_US) metadata -> meta data, meta-data, metatarsal
createrepo_c.src: W: spelling-error %description -l en_US metadata -> meta data, meta-data, metatarsal
1 packages and 0 specfiles checked; 0 errors, 2 warnings.

rpmlint createrepo_c-0.1.4-1.fc18.i686.rpm

createrepo_c.i686: W: spelling-error Summary(en_US) metadata -> meta data, meta-data, metatarsal
createrepo_c.i686: W: spelling-error %description -l en_US metadata -> meta data, meta-data, metatarsal
createrepo_c.i686: W: devel-file-in-non-devel-package /usr/lib/libcreaterepo_c.so
1 packages and 0 specfiles checked; 0 errors, 3 warnings.


rpmlint createrepo_c-debuginfo-0.1.4-1.fc18.i686.rpm

createrepo_c-debuginfo.i686: W: spelling-error Summary(en_US) createrepo -> procreate, repeater
createrepo_c-debuginfo.i686: W: spelling-error %description -l en_US createrepo -> procreate, repeater
1 packages and 0 specfiles checked; 0 errors, 2 warnings.


[x]: MUST Sources used to build the package match the upstream source, as
     provided in the spec URL.
/home/dtardon/work/rpm/823811/createrepo_c-0.1.4.tar.xz :
  MD5SUM this package     : 85795f472bb3976230dc0f026ca54451
  MD5SUM upstream package : 85795f472bb3976230dc0f026ca54451

[x]: MUST Spec file is legible and written in American English.
[x]: MUST Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[-]: MUST Package contains a SysV-style init script if in need of one.
[x]: MUST File names are valid UTF-8.
[x]: MUST Useful -debuginfo package or justification otherwise.
[x]: SHOULD Reviewer should test that the package builds in mock.
[-]: SHOULD 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]: SHOULD Dist tag is present.
[-]: SHOULD No file requires outside of /etc, /bin, /sbin, /usr/bin,
     /usr/sbin.
[x]: SHOULD Final provides and requires are sane (rpm -q --provides and rpm -q
     --requires).
[x]: SHOULD Package functions as described.
[x]: SHOULD Latest version is packaged.
[x]: SHOULD Package does not include license text files separate from
     upstream.
[x]: SHOULD Scriptlets must be sane, if used.
[x]: SHOULD SourceX is a working URL.
[?]: SHOULD Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[?]: SHOULD Package should compile and build into binary rpms on all supported
     architectures.
[-]: SHOULD %check is present and all tests pass.
[?]: SHOULD Packages should try to preserve timestamps of original installed
     files.
[x]: SHOULD Spec use %global instead of %define.

Issues:
[!]: MUST Development (unversioned) .so files in -devel subpackage, if
     present.
     Note: createrepo_c-0.1.4-1.fc18.i686.rpm : /usr/lib/libcreaterepo_c.so

^ you should really fix that and create versioned library, but I am willing to let it pass for now

See: http://fedoraproject.org/wiki/Packaging/Guidelines#DevelPackages
[!]: MUST Buildroot is not present
     Note: Invalid buildroot found: %{_tmppath}/%{name}-%{version}root
See: http://fedoraproject.org/wiki/Packaging/Guidelines#BuildRoot_tag
[!]: MUST Each %files section contains %defattr if rpm < 4.4
     Note: defattr(....) present in %files section. This is OK if packaging
     for EPEL5. Otherwise not needed
See: http://fedoraproject.org/wiki/Packaging/Guidelines#FilePermissions
[!]: MUST Rpmlint output is silent.

rpmlint createrepo_c-0.1.4-1.fc18.src.rpm

createrepo_c.src: W: spelling-error Summary(en_US) metadata -> meta data, meta-data, metatarsal
createrepo_c.src: W: spelling-error %description -l en_US metadata -> meta data, meta-data, metatarsal
1 packages and 0 specfiles checked; 0 errors, 2 warnings.

^ false positives


rpmlint createrepo_c-0.1.4-1.fc18.i686.rpm

createrepo_c.i686: W: spelling-error Summary(en_US) metadata -> meta data, meta-data, metatarsal
createrepo_c.i686: W: spelling-error %description -l en_US metadata -> meta data, meta-data, metatarsal

^ false positives

createrepo_c.i686: W: devel-file-in-non-devel-package /usr/lib/libcreaterepo_c.so

^ commented above

1 packages and 0 specfiles checked; 0 errors, 3 warnings.


rpmlint createrepo_c-debuginfo-0.1.4-1.fc18.i686.rpm

createrepo_c-debuginfo.i686: W: spelling-error Summary(en_US) createrepo -> procreate, repeater
createrepo_c-debuginfo.i686: W: spelling-error %description -l en_US createrepo -> procreate, repeater
1 packages and 0 specfiles checked; 0 errors, 2 warnings.

^ false positives


See: http://fedoraproject.org/wiki/Packaging/Guidelines#rpmlint


Generated by fedora-review 0.1.3
External plugins:

Additional notes:
* make clean in %install section is useless and should be removed

Comment 15 Tomas Mlcoch 2012-06-11 15:08:57 UTC
Thank you!

I've fixed main issues 

Fixed issues:
- Development (unversioned) .so file
- Buildroot is not present
- make clean in %install section is useless and should be removed
- remove defattr from %files section

version 0.1.5

Spec URL: https://fedorahosted.org/releases/c/r/createrepo_c/createrepo_c.spec

SRPM URL: https://fedorahosted.org/releases/c/r/createrepo_c/createrepo_c-0.1.5-1.fc16.src.rpm

Tarball URL: https://fedorahosted.org/releases/c/r/createrepo_c/createrepo_c-0.1.5.tar.xz

Comment 16 Dan Horák 2012-06-11 16:52:52 UTC
Giving final ACK as a sponsor, I agree with the review done by David.

Comment 17 Tomas Mlcoch 2012-06-12 07:34:44 UTC
New Package SCM Request
=======================
Package Name: createrepo_c
Short Description: C implementation of the createrepo
Owners: tmlcoch
Branches: f16 f17 el6
InitialCC:

Comment 18 Dan Horák 2012-06-12 07:37:35 UTC
re-added review+ flag

Comment 19 Gwyn Ciesla 2012-06-12 13:18:59 UTC
Git done (by process-git-requests).

Comment 20 Fedora Update System 2012-06-13 08:03:23 UTC
createrepo_c-0.1.5-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/createrepo_c-0.1.5-1.fc16

Comment 21 Fedora Update System 2012-06-13 08:05:39 UTC
createrepo_c-0.1.5-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/createrepo_c-0.1.5-1.fc17

Comment 22 Fedora Update System 2012-06-15 00:28:03 UTC
createrepo_c-0.1.5-1.fc16 has been pushed to the Fedora 16 testing repository.

Comment 23 Fedora Update System 2012-06-26 00:35:55 UTC
createrepo_c-0.1.5-1.fc17 has been pushed to the Fedora 17 stable repository.

Comment 24 Fedora Update System 2012-06-26 00:36:53 UTC
createrepo_c-0.1.5-1.fc16 has been pushed to the Fedora 16 stable repository.


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