Spec URL: http://petersen.fedorapeople.org//cmark.spec SRPM URL: http://petersen.fedorapeople.org//cmark-0.22.0-1.fc22.src.rpm Description: `cmark` is the C reference implementation of CommonMark, a rationalized version of Markdown syntax with a spec. It provides a shared library (`libcmark`) with functions for parsing CommonMark documents to an abstract syntax tree (AST), manipulating the AST, and rendering the document to HTML, groff man, LaTeX, CommonMark, or an XML representation of the AST. It also provides a command-line program (`cmark`) for parsing and rendering CommonMark documents.
petersen's scratch build of cmark-0.22.0-1.fc22.src.rpm for rawhide completed http://koji.fedoraproject.org/koji/taskinfo?taskID=11223872
This is needed for the Haskell cmark library (to avoid bundling), which in turn is needed by the latest version of pandoc (for its CommonMark reader and writer I guess).
- ldconfig called in %post and %postun if required. Note: /sbin/ldconfig not called in cmark-lib See: http://fedoraproject.org/wiki/Packaging/Guidelines#Shared_Libraries - license of package is BSD however cmark-0.22.0/bench/statistics.py claims to be *No copyright* Apache (v2.0) Hmm but you do not package it, and license is of binary package. So this is good.
This is an unofficial review, for my sponsorship process. Comments on the spec file: - you are including a patch for fixing cmake lib64 problem, but actually not using it (no %patch macro in %prep section); moreover, I don't think that patch will fix the issue; - instead of the mv workaround for fixing cmake lib64 issue, you may patch src/CMakeLists.txt by including GNUInstallDirs, that defines CMAKE_INSTALL_LIBDIR according to the system architecture (lib if i686, lib64 if x86_64); then, you can use CMAKE_INSTALL_LIBDIR in install(.. DESTINATION ..) directives; - you should give a full valid URL in the Source0 tag; - I would put both the command line binary and the versioned shared lib in the main package, and leave source headers and unversioned lib in the devel sub-package, without any lib sub-package; - devel package must require the base package (the one containing the versioned shared lib); moreover, the dependency must be a fully versioned dependency (since there is also an architecture dependency); - you should include additional documentation in the main package using %doc (e.g. the README.md file) in the %files section; - as Miroslav pointed out, ldconfig must be called in %post and %postun sections, which should be placed after %check and before %files You should then fix all errors and warnings highlighted by rpmlint (some related to the comments above): $ rpmlint cmark.spec cmark.spec:59: E: hardcoded-library-path in %{_prefix}/lib cmark.spec: W: patch-not-applied Patch1: cmark-0.22.0-lib64.patch cmark.spec: W: invalid-url Source0: cmark-0.22.0.tar.gz 0 packages and 1 specfiles checked; 1 errors, 2 warnings. $ rpmlint cmark*.rpm cmark.src: W: spelling-error %description -l en_US groff -> gruff, gr off, gr-off cmark.src:59: E: hardcoded-library-path in %{_prefix}/lib cmark.src: W: patch-not-applied Patch1: cmark-0.22.0-lib64.patch cmark.src: W: invalid-url Source0: cmark-0.22.0.tar.gz cmark.x86_64: W: spelling-error %description -l en_US groff -> gruff, gr off, gr-off cmark-debuginfo.x86_64: W: spurious-executable-perm /usr/src/debug/cmark-0.22.0/src/utf8.h cmark-debuginfo.x86_64: W: spurious-executable-perm /usr/src/debug/cmark-0.22.0/src/utf8.c cmark-debuginfo.x86_64: W: spurious-executable-perm /usr/src/debug/cmark-0.22.0/src/references.c cmark-debuginfo.x86_64: W: spurious-executable-perm /usr/src/debug/cmark-0.22.0/src/render.c cmark-debuginfo.x86_64: W: spurious-executable-perm /usr/src/debug/cmark-0.22.0/src/houdini_html_u.c cmark-debuginfo.x86_64: W: spurious-executable-perm /usr/src/debug/cmark-0.22.0/src/inlines.c cmark-debuginfo.x86_64: W: spurious-executable-perm /usr/src/debug/cmark-0.22.0/src/blocks.c cmark-devel.x86_64: W: no-dependency-on cmark/cmark-libs/libcmark cmark-devel.x86_64: W: spelling-error Summary(en_US) libcmark -> millibar cmark-devel.x86_64: W: summary-not-capitalized C libcmark development files cmark-devel.x86_64: W: spelling-error %description -l en_US libcmark -> millibar cmark-devel.x86_64: W: only-non-binary-in-usr-lib cmark-lib.x86_64: W: spelling-error %description -l en_US libcmark -> millibar cmark-lib.x86_64: W: shared-lib-calls-exit /usr/lib64/libcmark.so.0.22.0 exit.5 cmark-lib.x86_64: W: no-documentation cmark-lib.x86_64: E: library-without-ldconfig-postin /usr/lib64/libcmark.so.0.22.0 cmark-lib.x86_64: E: library-without-ldconfig-postun /usr/lib64/libcmark.so.0.22.0 5 packages and 0 specfiles checked; 3 errors, 19 warnings.
True. Some good findings. The lib64/lib fix is incomplete and doesn't cover the "libcmark.pc" pkg-config file yet. It specifies libdir=/usr/lib on x86_64, which is wrong. > License: BSD The packaged file COPYING lists several more than BSD, such as MIT: https://fedoraproject.org/wiki/Licensing:MIT?rd=Licensing/MIT#Modern_Style_with_sublicense It seems it's the "Mixed Source Licensing Scenario": https://fedoraproject.org/wiki/Packaging:LicensingGuidelines#Mixed_Source_Licensing_Scenario
jdulaney's scratch build of cmark-0.22.0-1.fc23.src.rpm for rawhide completed http://koji.fedoraproject.org/koji/taskinfo?taskID=12055569
Thanks for the helpful review comments. Apologies for neglecting this so long. :-( In the meantime today I just noticed another review is also open (bug 1288649)... anyway I hope we can merge/combine the effort. (In reply to Miroslav Suchý from comment #3) > - ldconfig called in %post and %postun if required. > Note: /sbin/ldconfig not called in cmark-lib Thanks (In reply to Marco Driusso from comment #4) > - instead of the mv workaround for fixing cmake lib64 issue, you may patch > src/CMakeLists.txt by including GNUInstallDirs Thanks for this! I struggled to find such a solution. Including seems to do the right thing. :-) > - you should give a full valid URL in the Source0 tag; (I don't think it is possible for github releases unfortunately: the url and the downloaded filname are different.) > - I would put both the command line binary and the versioned shared lib in > the main package, and leave source headers and unversioned lib in the devel > sub-package, without any lib sub-package; Perhaps you're right - it would make the packaging simpler. I intentionall did it this way though since I wanted to give the option to install without the program. (eg cmake vs cmark: though it is only 5 chars) > - devel package must require the base package (the one containing the > versioned shared lib); moreover, the dependency must be a fully versioned > dependency (since there is also an architecture dependency); Yep > - you should include additional documentation in the main package using %doc > (e.g. the README.md file) in the %files section; Yes, let me put it into the devel subpackage for now. Thanks, these errors should all be fixed in: Spec: http://petersen.fedorapeople.org/reviews/cmark/cmark.spec SRPM: http://petersen.fedorapeople.org/reviews/cmark/cmark-0.23.0-1.fc23.src.rpm (I updated to 0.23.0 since that is the version used in the Haskell library - though 0.24 may also work - upgrading this later should be trivial anyway.)
(I also updated the License field to include MIT also, thanks Michael.)
You can do Source0 and URL as follows: URL: https://github.com/jgm/cmark Source0: https://github.com/jgm/cmark/archive/%{version}.tar.gz This works.
(In reply to John Dulaney from comment #9) > Source0: https://github.com/jgm/cmark/archive/%{version}.tar.gz > This works. Not for me at least on F23: $ rpmbuild -ba cmark.spec error: File /home/pkgreview/libcmark/0.23.0.tar.gz: No such file or directory
Okay, thanks Source0: https://github.com/jgm/cmark/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz seems to work. I feel https://fedoraproject.org/wiki/Packaging/SourceURL may be out of date since it is does not take github archive releases into account, but I didn't read all of https://fedorahosted.org/fpc/ticket/233 yet, but I think it might have been written before the current github releases feature was available or in widespread use at least. Spec: http://petersen.fedorapeople.org/reviews/cmark/cmark.spec SRPM: http://petersen.fedorapeople.org/reviews/cmark/cmark-0.23.0-2.fc23.src.rpm
(In reply to Jens Petersen from comment #11) > I feel https://fedoraproject.org/wiki/Packaging/SourceURL may be out of date (Well I think it is mostly about the case of when there is no release tarball. I feel there should be specific coverage of github etc releases somewhere.)
jdulaney@gefjon:~/tmp$ rpmlint ./cmark-0.23.0-2.fc23.src.rpm cmark.src: W: spelling-error %description -l en_US groff -> gruff, gr off, gr-off 1 packages and 0 specfiles checked; 0 errors, 1 warnings. rpmlint looks good, one last thing: could you include the license in the lib so that it always gets installed? As for source0 and github, have a look at my qtile spec: http://pkgs.fedoraproject.org/cgit/rpms/qtile.git/tree/qtile.spec The source0 url as specified works for qtile, as well as several other packages I maintain.
I aware of the form https://github.com/qtile/qtile/archive/v%{version}.tar.gz but it downloads to qtile-0.10.4.tar.gz (at least from firefox): also I don't like unnamed tarballs. Why github thinks this is cool is beyond me... For my complicated url the downloaded filename and the last part of the url coincide/agree. :)
Welp, go ahead and do the %license for lib and we're good.
Thanks - this should fix the missing license file from cmark-lib. Spec: http://petersen.fedorapeople.org/reviews/cmark/cmark.spec SRPM: http://petersen.fedorapeople.org/reviews/cmark/cmark-0.23.0-3.fc23.src.rpm
jdulaney's scratch build of cmark-0.23.0-3.fc23.src.rpm for rawhide completed http://koji.fedoraproject.org/koji/taskinfo?taskID=12689923
Approved.
Thanks John!
Quite so!
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/cmark
cmark-0.23.0-3.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-cac4f03fc2
cmark-0.23.0-3.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-65d6af6d87
cmark-0.23.0-3.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-b9f659fc81
cmark-0.23.0-3.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-cac4f03fc2
cmark-0.23.0-3.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-b9f659fc81
John: I see that the haskell cmark binding was updated to use the latest release 0.24.1, so I am happy to update the version. What do you need/want/use cmark for btw?
cmark-0.23.0-4.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-b3f7cd8978
cmark-0.23.0-4.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-e102c14dc7
cmark-0.23.0-4.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-b3f7cd8978
cmark-0.23.0-3.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-65d6af6d87
cmark-0.23.0-4.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-e102c14dc7
cmark-0.23.0-3.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
cmark-0.23.0-3.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
cmark-0.23.0-4.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.
*** Bug 1288649 has been marked as a duplicate of this bug. ***
cmark-0.23.0-4.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.