Bug 527241

Summary: Review Request: libvtemm - C++ bindings for vte
Product: [Fedora] Fedora Reporter: Krzesimir Nowak <qdlacz>
Component: Package ReviewAssignee: Michael Schwendt <bugs.michael>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: bugs.michael, fedora-package-review, notting
Target Milestone: ---Flags: bugs.michael: fedora-review+
j: fedora-cvs+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.22.1-4.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-11-16 07:27:48 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:

Description Krzesimir Nowak 2009-10-05 14:37:29 UTC
Spec URL: http://krnowak.fedorapeople.org/libvtemm.spec
SRPM URL: http://krnowak.fedorapeople.org/libvtemm12-0.22.0-1.fc11.src.rpm
Description: libvtemm provides a C++ interface to the VTE library.

spec file is based on gtkmm.spec from http://cvs.fedoraproject.org/viewvc/rpms/gtkmm24/devel/gtkmm.spec?revision=1.57 (this is last revision).

package builds on koji on all architectures.

rpmlint output on spec (libvtemm.spec):
0 packages and 1 specfiles checked; 0 errors, 0 warnings.


rpmlint output on srpm (libvtemm12-0.22.0-1.fc11.src.rpm):
libvtemm12.src: E: invalid-spec-name
1 packages and 0 specfiles checked; 1 errors, 0 warnings.

Same error is displayed while checking gtkmm24 srpm. Should package be named just libvtemm or spec renamed to libvtemm12 - its API version is 1.2. I left it in this state just to be consistent with other *mm packages (gtkmm24, glibmm24).


rpmlint output on main package (libvtemm12-0.22.0-1.fc12.i686.rpm):
1 packages and 0 specfiles checked; 0 errors, 0 warnings.


rpmlint output on debuginfo package (libvtemm12-debuginfo-0.22.0-1.fc12.i686.rpm):
1 packages and 0 specfiles checked; 0 errors, 0 warnings.


rpmlint output on devel package (libvtemm12-devel-0.22.0-1.fc12.i686.rpm):
libvtemm12-devel.i686: W: no-documentation
1 packages and 0 specfiles checked; 0 errors, 1 warnings.

I put all not installed documentation (AUTHORS, NEWS, ChangeLog and such) in main package. API docs are in separate package. Maybe in later upstream release of libvtemm example source codes will be distributed, so they would be put into documentation of devel package.


rpmlint output on docs package (libvtemm12-docs-0.22.0-1.fc12.i686.rpm):
libvtemm12-docs.i686: E: devel-dependency libvtemm12-devel
1 packages and 0 specfiles checked; 1 errors, 0 warnings.

Having API docs without devel package does not make much sense.
I only was wondering if moving whole API documentation to gtk-doc directory is really necessary since recently mm packages provide their own .devhelp files, so html documentation could reside in docdir being still viewable by devhelp.

Comment 1 Krzesimir Nowak 2009-10-12 09:55:34 UTC
New upstream release:

SPEC: http://krnowak.fedorapeople.org/libvtemm.spec
SRPM: http://krnowak.fedorapeople.org/libvtemm12-0.22.1-1.fc11.src.rpm
KOJI scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=1741658

rpmlint outputs:

libvtemm.spec:
0 packages and 1 specfiles checked; 0 errors, 0 warnings.


libvtemm12-0.22.1-1.fc11.src.rpm:
libvtemm12.src: E: invalid-spec-name
1 packages and 0 specfiles checked; 1 errors, 0 warnings.

Please see a previous comment about this error.


libvtemm12-0.22.1-1.fc12.i686.rpm:
1 packages and 0 specfiles checked; 0 errors, 0 warnings.


libvtemm12-debuginfo-0.22.1-1.fc12.i686.rpm:
1 packages and 0 specfiles checked; 0 errors, 0 warnings.


libvtemm12-devel-0.22.1-1.fc12.i686.rpm:
1 packages and 0 specfiles checked; 0 errors, 0 warnings.


libvtemm12-docs-0.22.1-1.fc12.i686.rpm:
libvtemm12-docs.i686: E: devel-dependency libvtemm12-devel
1 packages and 0 specfiles checked; 1 errors, 0 warnings.

Please see previous comment about this error.

Comment 2 Michael Schwendt 2009-11-04 12:05:31 UTC
* The package naming guidelines answer your question:

https://fedoraproject.org/wiki/Packaging:NamingGuidelines#Spec_file_name
https://fedoraproject.org/wiki/Packaging:NamingGuidelines#MultiplePackages


> Having API docs without devel package does not make much sense.

Sure it does!  One can read documentation and evaluate an API without needing to install -devel package dependency-chains. One could even create a Documentation spin, which would not be possible with superfluous unresolvable dependencies on -devel packages.


> # Documentation is moved from its original directory to one
> owned by gtk-doc.
> # Why it is done is unclear for me.
> Requires:       gtk-doc

Um, what? That comment caused some head-scratching. It's *you* who moves the documentation during %install. As why you do that, one reason for moving it from %_docdir to gtk-doc's place is to make it available to the "devhelp" tool.


> %install
> rm -rf %{buildroot} docs-to-include
> rm -rf %{buildroot}

The second one is redundant.

Comment 3 Krzesimir Nowak 2009-11-04 15:47:19 UTC
(In reply to comment #2)
> * The package naming guidelines answer your question:
> 
> https://fedoraproject.org/wiki/Packaging:NamingGuidelines#Spec_file_name
> https://fedoraproject.org/wiki/Packaging:NamingGuidelines#MultiplePackages
> 
> 

Ok. I renamed package to libvtemm.

> > Having API docs without devel package does not make much sense.
> 
> Sure it does!  One can read documentation and evaluate an API without needing
> to install -devel package dependency-chains. One could even create a
> Documentation spin, which would not be possible with superfluous unresolvable
> dependencies on -devel packages.
> 

Oh, but I wonder if anyone ever complained that gtkmm/glibmm/othermm-docs package depend on -devel one. But what you say has much sense, so I removed the dependency.

> 
> > # Documentation is moved from its original directory to one
> > owned by gtk-doc.
> > # Why it is done is unclear for me.
> > Requires:       gtk-doc
> 
> Um, what? That comment caused some head-scratching. It's *you* who moves the
> documentation during %install. As why you do that, one reason for moving it
> from %_docdir to gtk-doc's place is to make it available to the "devhelp" tool.
> 

I move it, because I noticed that in gtkmm/glibmm Fedora maintainer did it, so at first I wanted to be consistent.

Devhelp argument is false - I made a scratch build[1] of libvtemm-0.20.6 (so I could install it on my Fedora 11) and installed only -docs package, which had documentation in %{_docdir}/libvtemm-1.2 and .devhelp2 file in %{_datadir}/devhelp/books/libvtemm-1.2/. After installation in devhelp's book list libvtemm appeared. So there are two ways of installing documentation:

1. let the documentation lie, where developer of library (me) decided - this adds devhelp dependency to -docs package.
2. move documentation to %{_datadir}/gtk-doc, like in gtkmm/glibmm/othermm Fedora packages - this adds probably gtk-doc dependency to -docs package. (Probably, because in gtkmm/glibmm/othermm-docs such dependency doesn't exist. The same in in for example glib2-devel, which puts documentation into gtk-doc directory.)

> 
> > %install
> > rm -rf %{buildroot} docs-to-include
> > rm -rf %{buildroot}
> 
> The second one is redundant.  

That one I forgot to remove. :)

new spec: http://krnowak.fedorapeople.org/libvtemm.spec
new srpm: http://krnowak.fedorapeople.org/libvtemm-0.22.1-2.fc11.src.rpm
new koji build: http://koji.fedoraproject.org/koji/taskinfo?taskID=1787913
new rpmlint outputs:

libvtemm.spec:
0 packages and 1 specfiles checked; 0 errors, 0 warnings.

libvtemm-0.22.1-2.fc11.src.rpm:
1 packages and 0 specfiles checked; 0 errors, 0 warnings.

libvtemm-0.22.1-2.fc12.i686.rpm:
1 packages and 0 specfiles checked; 0 errors, 0 warnings.

libvtemm-debuginfo-0.22.1-2.fc12.i686.rpm:
1 packages and 0 specfiles checked; 0 errors, 0 warnings.

libvtemm-devel-0.22.1-2.fc12.i686.rpm:
1 packages and 0 specfiles checked; 0 errors, 0 warnings.

libvtemm-docs-0.22.1-2.fc12.i686.rpm:
1 packages and 0 specfiles checked; 0 errors, 0 warnings.

[1] http://koji.fedoraproject.org/koji/taskinfo?taskID=1787855

Comment 4 Michael Schwendt 2009-11-05 11:16:00 UTC
> Oh, but I wonder if anyone ever complained that
> gtkmm/glibmm/othermm-docs package depend on -devel one. 

One could complain all day long about many issues and not have any time left for other things. ;)  Eventually packagers find out for themselves or simply change their mind (many even reformat .spec files from time to time just to meet personal preferences).


[devhelp/gtk-doc]

Without putting the .devhelp2 book definition anywhere, documentation placed below  /usr/share/gtk-doc/html/ is found by devhelp already. And by any other tool that searches in that directory by default.

Whether other Fedora packages move the documentation even if they store a .devhelp2 file doesn't matter much. More important is how you decide to do it and whether you agree with the solution. Those other packages ought to add a comment on why they relocate the docs. Else it's nothing else than dubious and shouldn't be copied to other rpms.

Moving the docs breaks the related values in the pkgconfig file, for example:

| $ cat libvtemm-1.2.pc|grep doc
| docdir=${datarootdir}/doc/libvtemm-1.2
| doxytagfile=${docdir}/reference/libvtemm-1.2.tag
| htmlrefdir=${docdir}/reference/html

And $docdir not even points to the %doc files as they are stored in %_docdir/libvtemm-0.22.1 instead.

Comment 5 Krzesimir Nowak 2009-11-05 15:31:33 UTC
In the end I decided to:
- leave documentation and doxytagfile in original place, that is - %{_docdir}/libvtemm-1.2/.
- put .devhelp2 file to gtk-doc dir, that is - %{_datadir}/gtkdoc/html/libvtemm-1.2/.
- leave examples in original place also, that is - %{_datadir}/libvtemm-1.2/.

So:
- docs package depend on gtk-doc, instead of devhelp.
- packaging is easier, because I don't have to process certain files (.devhelp2, .pc, .tag) with sed to set new paths.
- documentation sits where it should, that is - in %{_docdir}.

With this, docs are still readable by devhelp. About other tools I don't know - they could use .devhelp2 file sitting in path they are reading.

new spec: http://krnowak.fedorapeople.org/libvtemm.spec
new srpm: http://krnowak.fedorapeople.org/libvtemm-0.22.1-3.fc11.src.rpm
new koji build: http://koji.fedoraproject.org/koji/taskinfo?taskID=1789971
new rpmlint outputs:

libvtemm.spec:
libvtemm-0.22.1-3.fc11.src.rpm:
libvtemm-0.22.1-3.fc12.i686.rpm:
libvtemm-debuginfo-0.22.1-3.fc12.i686.rpm:
libvtemm-devel-0.22.1-3.fc12.i686.rpm:
libvtemm-docs-0.22.1-3.fc12.i686.rpm:
5 packages and 1 specfiles checked; 0 errors, 0 warnings.

Comment 6 Michael Schwendt 2009-11-10 21:24:33 UTC
* When checking in the files into cvs, please add   V=1  to the "make" invocation in %build to enable verbose build output.


> # library is LGPLv3+, examples are GPLv3+.
> License:        LGPLv3+ and GPLv3+

This is okay with regard to:

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

Creating a sub-package for 13KB of source code examples would be overhead.


* src.rpm will only build on F-12 or newer due to "vte >= 0.22.0" requirement.


[...]

APPROVED

Comment 7 Krzesimir Nowak 2009-11-11 12:50:08 UTC
New Package CVS Request
=======================
Package Name: libvtemm
Short Description: C++ bindings for vte
Owners: krnowak
Branches: F-12
InitialCC:

Comment 8 Jason Tibbitts 2009-11-13 19:16:59 UTC
CVS done.

Comment 9 Fedora Update System 2009-11-14 13:24:48 UTC
libvtemm-0.22.1-4.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/libvtemm-0.22.1-4.fc12

Comment 10 Fedora Update System 2009-11-16 07:27:43 UTC
libvtemm-0.22.1-4.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.