Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1113430 - Packaging issues
Summary: Packaging issues
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: lz4
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: pjp
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-26 07:52 UTC by Michael Schwendt
Modified: 2014-07-21 15:33 UTC (History)
1 user (show)

Fixed In Version: lz4-r119-1.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-17 04:33:02 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Michael Schwendt 2014-06-26 07:52:29 UTC
# rpm -q lz4 lz4-devel
lz4-r117-3.fc20.x86_64
lz4-devel-r117-3.fc20.x86_64

# rpmls lz4
-rwxr-xr-x  /usr/bin/lz4
-rwxr-xr-x  /usr/bin/lz4c
lrwxrwxrwx  /usr/bin/lz4cat
lrwxrwxrwx  /usr/lib/liblz4.so.1
-rwxr-xr-x  /usr/lib/liblz4.so.1.0.0
drwxr-xr-x  /usr/share/doc/lz4
-rw-r--r--  /usr/share/doc/lz4/COPYING
-rw-r--r--  /usr/share/doc/lz4/NEWS
-rw-r--r--  /usr/share/man/man1/lz4.1.gz
-rw-r--r--  /usr/share/man/man1/lz4c.1.gz
-rw-r--r--  /usr/share/man/man1/lz4cat.1.gz

# rpmls lz4-devel
-rw-r--r--  /usr/include/lz4.h
-rw-r--r--  /usr/include/lz4hc.h
lrwxrwxrwx  /usr/lib/liblz4.so
drwxr-xr-x  /usr/share/doc/lz4-devel
-rw-r--r--  /usr/share/doc/lz4-devel/LICENSE
-rw-r--r--  /usr/share/doc/lz4-devel/NEWS

The shared library belongs into %{_libdir} not /usr/lib on x86_64 and other 64-bit multilib platforms. Hardcoding it as /usr/lib in the spec file is a mistake.

Further issues:

> License:        GPLv2

> %package        devel
> License:        BSD

Apparently, the programs are GPLv2+ and not GPLv2, see

  https://fedoraproject.org/wiki/Packaging:LicensingGuidelines#.22or_later_version.22_licenses

and the library is BSD 2-clause, but if the base package includes the library, you need to also mention the BSD licensing if you do the same for the -devel subpackage.

  https://fedoraproject.org/wiki/Packaging:LicensingGuidelines#License_Clarification


> BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot

https://fedoraproject.org/wiki/Packaging:Guidelines#BuildRoot_tag


> %package        devel
> Requires:       %{name} = %{version}-%{release}

https://fedoraproject.org/wiki/Packaging:Guidelines#Requiring_Base_Package


> https://kojipkgs.fedoraproject.org//packages/lz4/r117/3.fc21/data/logs/x86_64/build.log
> [...] I. -std=c99 -O3 -Wall -W -Wundef  [...]

https://fedoraproject.org/wiki/Packaging:Guidelines#Compiler_flags


> %post devel -p /sbin/ldconfig
> %postun devel -p /sbin/ldconfig

Not needed for -devel packages and their .so symlinks. Drop these.


> %files devel
> %defattr (-, root, root, -)

https://fedoraproject.org/wiki/Packaging:Guidelines#File_Permissions


> %files devel
> %doc LICENSE NEWS

The same NEWS files is also included in the base package, and this -devel package requires the base package. Unnecessary duplication of files. If the base package also included the LICENSE file for its library licensing, the -devel package would not need to include these extra %doc files.

Comment 1 pjp 2014-06-28 06:31:04 UTC
I've fixed most of the issues raised above, except the compiler flags and BuildRoot ones. Compiler flags are defined in the upstream Makefile. And Buildroot would be required for EPEL builds, no?

See scratch build
 -> http://koji.fedoraproject.org/koji/taskinfo?taskID=7086005

===
$ rpmlint SRPMS/lz4-r118-1.fc19.src.rpm
lz4.src: W: spelling-error %description -l en_US scalable -> salable, callable, calculable
lz4.src: W: spelling-error %description -l en_US multi -> mulch, mufti
1 packages and 0 specfiles checked; 0 errors, 2 warnings.
$
$
$ rpmlint RPMS/x86_64/lz4-r118-1.fc19.x86_64.rpm
lz4.x86_64: W: spelling-error %description -l en_US scalable -> salable, callable, calculable
lz4.x86_64: W: spelling-error %description -l en_US multi -> mulch, mufti
1 packages and 0 specfiles checked; 0 errors, 2 warnings.
$
$
$ rpmlint RPMS/x86_64/lz4-devel-r118-1.fc19.x86_64.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.
===

Please let me know if this looks good to go into the repositories.

Thank you.

Comment 2 Michael Schwendt 2014-06-28 08:59:13 UTC
> And Buildroot would be required for EPEL builds, no?

That's what the linked guidelines say.

If you really want to use exactly the same spec file for EPEL (with the caveat that it would also include irrelevant entries about Rawhide and Fedora), it's good practise to either be explicit in the spec file (e.g. with a comment above the BuildRoot tag) or use dist conditionals:
  https://fedoraproject.org/wiki/Packaging:DistTag#Conditionals


> Compiler flags are defined in the upstream Makefile.

From the guidelines:

[...] Overriding these flags for performance optimizations (for instance, -O3 instead of -O2) is generally discouraged. If you can present benchmarks that show a significant speedup for this particular code, this could be revisited on a case-by-case basis. Adding to and overriding or filtering parts of these flags is permitted if there's a good reason to do so; the rationale for doing so must be documented in the specfile. [...]

Comment 3 pjp 2014-06-28 10:40:25 UTC
(In reply to Michael Schwendt from comment #2)
> with a comment above the BuildRoot tag) or use dist conditionals:
>   https://fedoraproject.org/wiki/Packaging:DistTag#Conditionals

  Done.

Please see:
  -> http://koji.fedoraproject.org/koji/taskinfo?taskID=7086284

> [...] Overriding these flags for performance optimizations (for instance,
> -O3 instead of -O2) is generally discouraged. If you can present benchmarks
> that show a significant speedup for this particular code, this could be
> revisited on a case-by-case basis. Adding to and overriding or filtering
> parts of these flags is permitted if there's a good reason to do so; the
> rationale for doing so must be documented in the specfile. [...]

  Yes, I read the guidelines and CFLAGS is set to $RPM_OPT_FLAGS in the %build section. But upstream Makefile merely adds its definition to the local one

  see -> https://github.com/Cyan4973/lz4/blob/master/Makefile

Thank you.

Comment 4 Fedora Update System 2014-07-02 17:58:06 UTC
lz4-r118-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/lz4-r118-1.fc19

Comment 5 Fedora Update System 2014-07-02 17:58:17 UTC
lz4-r118-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/lz4-r118-1.fc20

Comment 6 Fedora Update System 2014-07-02 17:58:26 UTC
lz4-r118-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/lz4-r118-1.el6

Comment 7 Fedora Update System 2014-07-02 17:58:39 UTC
lz4-r118-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/lz4-r118-1.el5

Comment 8 Fedora Update System 2014-07-03 04:08:09 UTC
Package lz4-r118-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing lz4-r118-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-8022/lz4-r118-1.fc20
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2014-07-04 08:31:03 UTC
lz4-r119-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/lz4-r119-1.fc20

Comment 10 Fedora Update System 2014-07-04 08:31:12 UTC
lz4-r119-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/lz4-r119-1.fc19

Comment 11 Fedora Update System 2014-07-04 08:31:20 UTC
lz4-r119-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/lz4-r119-1.el5

Comment 12 Fedora Update System 2014-07-04 08:31:28 UTC
lz4-r119-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/lz4-r119-1.el6

Comment 13 Fedora Update System 2014-07-17 04:33:02 UTC
lz4-r119-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2014-07-17 04:33:57 UTC
lz4-r119-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2014-07-21 15:33:28 UTC
lz4-r119-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2014-07-21 15:33:47 UTC
lz4-r119-1.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.


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