Bug 669311
Summary: | Review Request: mupdf - A lightweight PDF viewer and toolkit written in portable C | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Pavel Zhukov <pavel> | ||||||
Component: | Package Review | Assignee: | Mohamed El Morabity <pikachu.2014> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | rawhide | CC: | fedora-package-review, lemenkov, notting, pavel, pikachu.2014, pzhukov, susi.lehtola | ||||||
Target Milestone: | --- | Keywords: | Reopened | ||||||
Target Release: | --- | Flags: | pikachu.2014:
fedora-review+
gwync: fedora-cvs+ |
||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | mupdf-0.7-7.fc13 | Doc Type: | Bug Fix | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2011-02-08 21:19:32 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | 668959 | ||||||||
Bug Blocks: | |||||||||
Attachments: |
|
Description
Pavel Zhukov
2011-01-13 10:01:36 UTC
I will review this package. * You can remove libX11-devel from the BuildRequires, since it is already required by libXext-devel * The compilation logs are not very verbose. Especially compilation flags cannot be checked. Fortunately the Makefile provides a "verbose" variable to view all compilation commands. Please enable it: %build make %{?_smp_mflags} verbose=1 * The fix on the previous point leads to see that standard Fedora compilation flags ("%{optflags}") are not used att all. They *must* be called by the compiler: http://fedoraproject.org/wiki/PackagingGuidelines#Compiler_flags I suggest you the following fix: - add the following line in %prep: %prep [...] sed -i "s/CFLAGS := /CFLAGS ?=\nCFLAGS += /" Makerules It will allow passing custom CFLAGS values. Since it is a small fix, I thought using sed would be more appropriate than a patch. - add the following on in %build: %build export CFLAGS="%{optflags}" make %{?_smp_mflags} verbose=1 * You have removed the static library libmupdf.a, and it's probably a good thing according to the guidelines. Unfortunately there is no corresponding shared library (.so file), and so your -devel package is completely useless. I suggest you to report also this issue to upstream. I attach to this review a patch to build a dynamic version of libmupdf.a (libmupdf.so), and to link the executables to this one, instead of embedding the static lib. Anyway it is maybe not usable as is: it is not versionned and that's a things to be discussed with upstream. Created attachment 473308 [details]
Patch to enable shared lib build
Since your .desktop file has a MimeType entry, you should update the desktop database as described here: http://fedoraproject.org/wiki/Packaging/ScriptletSnippets#desktop-database It seems that mupdf cannot be launched from the menu: it expects necessarily a PDF path as argument. The .desktop file should not be displayed anyway, even if it is required to allow opening PDFs from the file explorer by a right-click. I suggest you to add the following line: NoDisplay=true to mupdf.desktop file. I've also update the shared library path to include a versionned library (set to mupdf version). Anyway, as said above, it would need upstream validation. Created attachment 473330 [details]
Patch to enable share library build
- Fixed shared libs - fixed desktop file - fixed CFLAGS - fixed desktop database Spec URL: http://landgraf.fedorapeople.org/packages/requested/mupdf/mupdf.spec SRPM URL: http://landgraf.fedorapeople.org/packages/requested/mupdf/mupdf-0.7-2.fc14.src.rpm A few comments: - I think you can safely drop the unnecessary "written in portable C" part of the summary. - Mixing %{name} and "mupdf" in %files (and %install) is bad style. Please stick choose a convention and stick with it. - There's also no need to use %{__chmod} for chmod, although there is currently no guideline forbidding it. - In general, one can override variables such as CFLAGS with e.g. make verbose=1 CFLAGS="%{optflags}" However, in this case the Makefile is badly written as includes are made part of CFLAGS. Thus one would either have to manually append the necessary includes to the overriding definition, or apply a patch. Running sed may result in the same thing, but it also can break silently. Using patches is a lot safer in this respect. - The -devel package should have Requires: %{name} = %{version}-%{release} instead of the plain Requires: %{name} = %{version} Thank you for comment - droped - fixed - I'm prefer to use %{__command} instead bash command. It's not fobidden by GuideLnes - fixed (Patch3), as I see CFLAGS is eq. %{optflags}. Please check it. - fixed Requires - created upstream bugs for all patches (please see related bugs) - fixed so name Spec URL: http://landgraf.fedorapeople.org/packages/requested/mupdf/mupdf.spec SRPM URL: http://landgraf.fedorapeople.org/packages/requested/mupdf/mupdf-0.7-2.fc14.src.rpm Is there any particular reason you want to use %{__foo}? The extra typing and reduced readability is somehow enjoyable? Honestly, I'm trying to understand this because FPC has talked about recommending against using pointless macros, and if there's actually a reasonable argument for them I'd certainly like to hear it. I'm afraid that mupdf-libdir.patch won't fix installation on x86_64. Instead of adding LIBDIR := $(prefix)/lib you need to add LIBDIR ?= $(prefix)/lib Peter, I've checked it: rpm -ql mupdf | grep libmupdf /usr/lib64/libmupdf.so.0.7 rpm -ql mupdf-devel | grep libmupdf /usr/lib64/libmupdf.so mupdf works perfectly. So, do I have to replace "LIBDIR := $(prefix)/lib" anyway? Jason, I read http://fedoraproject.org/wiki/Packaging/ReviewGuidelines (MUST: Each package must consistently use macros.). After this I've replaced all my foo to %{__foo}. Is it wrong? I'll fix if It's (In reply to comment #11) > Jason, I read http://fedoraproject.org/wiki/Packaging/ReviewGuidelines (MUST: > Each package must consistently use macros.). After this I've replaced all my > foo to %{__foo}. Is it wrong? I'll fix if It's The review guideline refers to http://fedoraproject.org/wiki/Packaging/Guidelines#Macros The consistency means that you should not mix using %{buildroot} and $RPM_BUILD_ROOT, or %{optflags} and $RPM_OPT_FLAGS, since these mean the same thing. Jussi, I have NOT mixed %{buildroot} and $RPM_BUILD_ROOT, or %{optflags} and $RPM_OPT_FLAGS in my packages. I'm using macros %{__foo} instead foo according review guidelines. Please point me reasons to don't use it (In reply to comment #13) > Jussi, > I have NOT mixed %{buildroot} and $RPM_BUILD_ROOT, or %{optflags} and > $RPM_OPT_FLAGS in my packages. I know. (In reply to comment #11) > Jason, I read http://fedoraproject.org/wiki/Packaging/ReviewGuidelines (MUST: > Each package must consistently use macros.). After this I've replaced all my > foo to %{__foo}. Is it wrong? I'll fix if It's It's not wrong, it's just bad style since it makes spec files a lot harder to read (Jason put it aptly in comment #9 ). I haven't any additional reasons to use %{_foo} aginst foo. There is example in Guidelines with %{__sed} (not sed) using and I prefer to use it for correct packaging according FPG Ok. fixed. Spec URL: http://landgraf.fedorapeople.org/packages/requested/mupdf/mupdf.spec SRPM URL: http://landgraf.fedorapeople.org/packages/requested/mupdf/mupdf-0.7-4.fc14.src.rpm I found a single instance of %{__sed} in the main packaging guidelines, which I have converted to "sed". If you were referring to something else, please let me know. Ok. I'll use command instead pointless macros. I've replaced the spec file already. Thank you and sorry for confusion. Thanks to all contributors who made comments on this review. The RPM looks quite fine now. Just a small comment: you should use %{_prefix} instead of /usr explicitely: make DESTDIR=%{buildroot} install prefix=%{buildroot}/%{_prefix} LIBDIR=%{buildroot}%{_libdir} Anyway the shared library issue is still there, and an upstream approval for the corresponding patch is necessary; even if the patch does its job, it can certainly be improved, moreover the choice of the ABI version belongs to the mupad developers. The approval of this package will depend on the upstream answer, whatever it is. Pavel, I invite you to report it to mupad devs as soon as possible, by explaining our current policy concerning static libraries. Sorry for the NEEDINFO, I've just seen your bug report about the shared libs: http://bugs.ghostscript.com/show_bug.cgi?id=691887 So let's wait :) upstream bug 691884 - fixed ipstream bug 691887 - shared library patch has been rejected please see http://bugs.ghostscript.com/show_bug.cgi?id=691887 Do i have close this bug as CANTFIX or UPSTREAM? Bug closed. Upstream rejects patch for shared libraries without any reasons. Do you really want to give up this review? Static libraries are not completely forbidden in Fedora, only discouraged. And I believe that the fact that upstream doesn't want to support shared libraries is a good reason to provide anyway static libs in this package. There was a similar case some months ago: https://bugzilla.redhat.com/show_bug.cgi?id=602279 If you're willing to re-open this review, I suggest you to carefully consider the guidelines relative to static libs: http://fedoraproject.org/wiki/Packaging/Guidelines#Packaging_Static_Libraries mupdf is interesting enough to be distributed through the Fedora repos, in spite of the static lib. Mohamed, I am sorry for irascibility Mupdf is good software and I'm using it but I Has been surprised by behaviour of developers. So, Do I rebuild mupdf to use static libraries and build mudpf-static package? (In reply to comment #24) > Mohamed, > I am sorry for irascibility No problem, in fact I didn't felt any irascibility here :) > So, Do I rebuild mupdf to use static libraries and build mudpf-static package? Yes. Just keep in mind that since we will only provide a static library, no mupdf-static subpackage is needed; the mupdf-devel package will embed the static library. roll back to static http://landgraf.fedorapeople.org/packages/requested/mupdf/mupdf.spec http://landgraf.fedorapeople.org/packages/requested/mupdf/mupdf-0.7-5.fc14.src.rpm koji: http://koji.fedoraproject.org/koji/taskinfo?taskID=2764398 -- Fedora Bugzappers volunteer triage team https://fedoraproject.org/wiki/BugZappers The devel subpackage needs to provide also mupdf-static, as described in the guidelines, since it contains only a static library: %package devel Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} Provides: %{name}-static = %{version}-%{release} rpmlint detects bad rights on libmupdf.a: mupdf-devel.x86_64: W: spurious-executable-perm /usr/lib64/libmupdf.a You should set its rights to 0644 in %install. (In reply to comment #19) > Just a small comment: you should use %{_prefix} instead of /usr explicitely: > make DESTDIR=%{buildroot} install prefix=%{buildroot}/%{_prefix} LIBDIR=%{buildroot}%{_libdir} Don't forget this too ;) Fixed http://landgraf.fedorapeople.org/packages/requested/mupdf/mupdf-0.7-6.fc15.src.rpm http://landgraf.fedorapeople.org/packages/requested/mupdf/mupdf.spec At line 90 of your .spec: %attr(0644,root,root.-) %{_libdir}/libmupdf.a Using %attr is maybe excessive. Calling « chmod 0644 %{buildroot}%{_libdir}/libmupdf.a » in %install should be safer and more simple. Once this last issue fixed, I will (at last!) approve this package :) fixed Use tHe same links. Koji ok. https://koji.fedoraproject.org/koji/taskinfo?taskID=2766703 Here is the review :)
MUST: rpmlint must be run on every package.
->OK, no significant warnings
MUST: The package must be named according to the Package Naming Guidelines.
->OK
MUST: The spec file name must match the base package %{name}, in the format
%{name}.spec unless your package has an exemption.
->OK
MUST: The package must meet the Packaging Guidelines.
->OK
MUST: The package must be licensed with a Fedora approved license and meet the
Licensing Guidelines.
->OK
MUST: The License field in the package spec file must match the actual license.
->OK
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 must be included in %doc.
->OK
MUST: The spec file must be written in American English.
->OK
MUST: The spec file for the package MUST be legible.
->OK
MUST: The sources used to build the package must match the upstream source, as
provided in the spec URL.
->OK, md5sum = 83adc4d14eb17835df791a9a0d1e8fa9
MUST: The package MUST successfully compile and build into binary rpms on at
least one primary architecture.
->OK
MUST: If the package does not successfully compile, build or work on an
architecture, then those architectures should be listed in the spec in
ExcludeArch.
->N/A
MUST: All build dependencies must be listed in BuildRequires, except for any
that are listed in the exceptions section of the Packaging Guidelines ;
inclusion of those as BuildRequires is optional.
->OK
MUST: The spec file MUST handle locales properly. This is done by using the
%find_lang macro. Using %{_datadir}/locale/* is strictly forbidden.
->N/A
MUST: Every binary RPM package (or subpackage) which stores shared library files
(not just symlinks) in any of the dynamic linker's default paths, must
call ldconfig in %post and %postun.
->N/A
MUST: Packages must NOT bundle copies of system libraries.
->OK
MUST: If the package is designed to be relocatable, the packager must state this
fact in the request for review, along with the rationalization for
relocation of that specific package. Without this, use of Prefix: /usr is
considered a blocker.
->N/A
MUST: A package must own all directories that it creates. If it does not create
a directory that it uses, then it should require a package which does
create that directory.
>OK
MUST: A Fedora package must not list a file more than once in the spec file's
%files listings.
->OK
MUST: Permissions on files must be set properly. Executables should be set with
executable permissions, for example. Every %files section must include a
%defattr(...) line.
->OK
MUST: Each package must consistently use macros.
->OK
MUST: The package must contain code, or permissable content.
->OK
MUST: Large documentation files must go in a -doc subpackage.
->N/A
MUST: If a package includes something as %doc, it must not affect the runtime of
the application. To summarize: If it is in %doc, the program must run
properly if it is not present.
->OK
MUST: Header files must be in a -devel package.
->OK
MUST: Static libraries must be in a -static package.
->OK
MUST: If a package contains library files with a suffix (e.g. libfoo.so.1.1),
then library files that end in .so (without suffix) must go in a -devel
package.
->N/A
MUST: In the vast majority of cases, devel packages must require the base
package using a fully versioned dependency: Requires: %{name} =
%{version}-%{release}.
->OK
MUST: Packages must NOT contain any .la libtool archives, these must be removed
in the spec if they are built.
->OK
MUST: Packages containing GUI applications must include a %{name}.desktop file,
and that file must be properly installed with desktop-file-install in the
%install section.
->OK
MUST: Packages must not own files or directories already owned by other
packages.
->OK
MUST: All filenames in rpm packages must be valid UTF-8.
->OK
This package is approved.
Thank you for review. -- Fedora Bugzappers volunteer triage team https://fedoraproject.org/wiki/BugZappers New Package CVS Request ======================= Package Name: mupdf Short Description: A lightweight PDF viewer and toolkit Owners: landgraf Branches: F-13 F-14 InitialCC: -- Fedora Bugzappers volunteer triage team https://fedoraproject.org/wiki/BugZappers Git done (by process-git-requests). mupdf-0.7-6.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/mupdf-0.7-6.fc14 mupdf-0.7-7.fc13 has been submitted as an update for Fedora 13. https://admin.fedoraproject.org/updates/mupdf-0.7-7.fc13 mupdf-0.7-7.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report. Package Change Request ====================== Package Name: mupdf New Branches: el6 Owners: landgraf Git done (by process-git-requests). |