This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 823811

Summary: Review Request: createrepo_c - C implementation of the createrepo
Product: [Fedora] Fedora Reporter: Tomas Mlcoch <tmlcoch>
Component: Package ReviewAssignee: David Tardon <dtardon>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: dan, dtardon, notting, package-review, rc040203
Target Milestone: ---Flags: dan: fedora‑review+
limburgher: fedora‑cvs+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-25 20:35:55 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Tomas Mlcoch 2012-05-22 04:27:31 EDT
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 04:42:30 EDT
This is my first package, so I am in need of sponsorship
Comment 2 David Tardon 2012-05-22 05:53:21 EDT
* 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 06:00:05 EDT
(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 06:04:05 EDT
(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 10:58:41 EDT
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 11:05:26 EDT
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 11:12:26 EDT
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 06:29:04 EDT
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 06:36:59 EDT
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 03:40:48 EDT
(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 04:02:43 EDT
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 07:19:57 EDT
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 11:08:57 EDT
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 12:52:52 EDT
Giving final ACK as a sponsor, I agree with the review done by David.
Comment 17 Tomas Mlcoch 2012-06-12 03:34:44 EDT
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 03:37:35 EDT
re-added review+ flag
Comment 19 Jon Ciesla 2012-06-12 09:18:59 EDT
Git done (by process-git-requests).
Comment 20 Fedora Update System 2012-06-13 04:03:23 EDT
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 04:05:39 EDT
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-14 20:28:03 EDT
createrepo_c-0.1.5-1.fc16 has been pushed to the Fedora 16 testing repository.
Comment 23 Fedora Update System 2012-06-25 20:35:55 EDT
createrepo_c-0.1.5-1.fc17 has been pushed to the Fedora 17 stable repository.
Comment 24 Fedora Update System 2012-06-25 20:36:53 EDT
createrepo_c-0.1.5-1.fc16 has been pushed to the Fedora 16 stable repository.