Bug 1186557 - Review Request: libticalcs2 - Texas Instruments calculator communication library
Summary: Review Request: libticalcs2 - Texas Instruments calculator communication library
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Antonio T. (sagitter)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1186501
Blocks: 1186558
TreeView+ depends on / blocked
 
Reported: 2015-01-28 01:15 UTC by Ben Rosser
Modified: 2015-07-30 01:14 UTC (History)
1 user (show)

Fixed In Version: libticalcs2-1.1.8-4.fc22
Clone Of:
Environment:
Last Closed: 2015-07-30 00:50:02 UTC
Type: ---
Embargoed:
anto.trande: fedora-review+
gwync: fedora-cvs+


Attachments (Terms of Use)

Description Ben Rosser 2015-01-28 01:15:57 UTC
Spec URL: https://tc01.fedorapeople.org/tilp2/libticalcs2.spec
SRPM URL: https://tc01.fedorapeople.org/tilp2/libticalcs2-1.1.8-0.fc21.src.rpm
Description: The ticalcs library is a library which brings about all the
functions needed to communicate with a Texas Instruments
graphing calculator (or hand-held). Currently, it does not
support some education devices (such as CBL/CBR and others).
This library is able to communicate with handhelds in a fairly
transparent fashion. With this library, the developer does not
have to worry about the packet oriented protocol, the file
management and some other stuff.

Fedora Account System Username: tc01

A general disclaimer: there's a lot of changelog at the bottom of this spec file. That's because two years ago (approximately), I was not a sponsored Fedora packager and the tilp2 software and its libraries were not compliant with Fedora packaging guidelines. I wrote these spec files and worked with the maintainers to fix these issues.

Now that the major problems have been fixed, I'd like to try to actually get these RPMs into Fedora.

Comment 1 Ben Rosser 2015-04-13 14:33:32 UTC
Dependencies have been built. I have also taken all of the fixes from their reviews (localization, docs subpackage, test suite, etc.) and added them to this spec:

Spec URL: https://tc01.fedorapeople.org/tilp2/libticalcs2.spec
SRPM URL: https://tc01.fedorapeople.org/tilp2/libticalcs2-1.1.8-1.fc21.src.rpm

Comment 2 Antonio T. (sagitter) 2015-06-30 20:17:15 UTC
> make -C po fr.gmo

is failed:

+ make -C po fr.gmo
make: Entering directory '/builddir/build/BUILD/libticalcs2-1.1.8/po'
rm -f fr.gmo && : -c --statistics -o fr.gmo fr.po
mv: cannot stat 't-fr.gmo': No such file or directory
Makefile:163: recipe for target 'fr.gmo' failed
make: *** [fr.gmo] Error 1

Comment 3 Ben Rosser 2015-07-01 22:49:09 UTC
Whoops. Looks like the gettext dependency was missing from the BuildRequires. It should work now; I confirmed it builds in mock.

Spec URL: https://tc01.fedorapeople.org/tilp2/libticalcs2.spec
SRPM URL: https://tc01.fedorapeople.org/tilp2/libticalcs2-1.1.8-2.fc21.src.rpm

Comment 4 Antonio T. (sagitter) 2015-07-02 10:18:47 UTC
- To me, 'make -C docs install DESTDIR=%{buildroot}'
  is redundant; you could manage all documentation by using %doc macro.

- Also, 'make install DESTDIR=%{buildroot}' already installs fr.po  

make[1]: Entering directory '/builddir/build/BUILD/libticalcs2-1.1.8/po'
/usr/bin/mkdir -p /builddir/build/BUILDROOT/libticalcs2-1.1.8-2.fc23.i386/usr/share
installing fr.gmo as /builddir/build/BUILDROOT/libticalcs2-1.1.8-2.fc23.i386/usr/share/locale/fr/LC_MESSAGES/libticalcs2.mo

You could patch 'make' and permit that %find_lang script works; you won't obliged to list explicitely

%lang(fr) %{_datadir}/locale/fr/LC_MESSAGES/libticalcs2.mo

- Why do you use %define instead of %global ?

Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed


Issues:
=======
- Package does not contain duplicates in %files.
  Note: warning: File listed twice:
  /usr/share/locale/fr/LC_MESSAGES/libticalcs2.mo
  See: http://fedoraproject.org/wiki/Packaging/Guidelines#DuplicateFiles


===== MUST items =====

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[x]: Header files in -devel subpackage, if present.
[x]: ldconfig called in %post and %postun if required.
[x]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.
[x]: Development (unversioned) .so files in -devel subpackage, if present.

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "GPL", "LGPL (v2 or later)", "GPL (v2 or later)", "Unknown or
     generated". 14 files have unknown license. Detailed output of
     licensecheck in /home/sagitter/1186557-libticalcs2/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[!]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/share/doc/libticalcs2
[x]: %build honors applicable compiler flags or justifies otherwise.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[x]: Development files must be in a -devel package
[-]: Package uses nothing in %doc for runtime.
[x]: The spec file handles locales properly.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Useful -debuginfo package or justification otherwise.
[x]: Package is not known to require an ExcludeArch tag.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 61440 bytes in 3 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: 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 %license.
[x]: Package requires other packages for directories it uses.
[x]: Package does not own files or directories owned by other packages.
[x]: All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Permissions on files are set properly.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

===== SHOULD items =====

Generic:
[?]: Uses parallel make %{?_smp_mflags} macro.
[-]: 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]: Final provides and requires are sane (see attachments).
[x]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
     libticalcs2-doc
[ ]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Scriptlets must be sane, if used.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[?]: Spec use %global instead of %define unless justified.
     Note: %define requiring justification: %define tilp_version 1.17
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: The placement of pkgconfig(.pc) files are correct.
[x]: SourceX is a working URL.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on debuginfo package(s).
     Note: No rpmlint messages.
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: libticalcs2-1.1.8-2.fc23.i686.rpm
          libticalcs2-devel-1.1.8-2.fc23.i686.rpm
          libticalcs2-doc-1.1.8-2.fc23.noarch.rpm
          libticalcs2-1.1.8-2.fc23.src.rpm
libticalcs2.i686: W: spelling-error %description -l en_US ticalcs -> tactical
libticalcs2.i686: W: spelling-error %description -l en_US handhelds -> handholds, handhold
libticalcs2-devel.i686: W: spelling-error %description -l en_US libticalcs -> ballistics
libticalcs2-devel.i686: W: no-documentation
libticalcs2-doc.noarch: W: wrong-file-end-of-line-encoding /usr/share/doc/libticalcs2/html/style.css
libticalcs2.src: W: spelling-error %description -l en_US ticalcs -> tactical
libticalcs2.src: W: spelling-error %description -l en_US handhelds -> handholds, handhold
4 packages and 0 specfiles checked; 0 errors, 7 warnings.




Rpmlint (debuginfo)
-------------------
Checking: libticalcs2-debuginfo-1.1.8-2.fc23.i686.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.





Rpmlint (installed packages)
----------------------------
libticalcs2.i686: W: spelling-error %description -l en_US ticalcs -> tactical
libticalcs2.i686: W: spelling-error %description -l en_US handhelds -> handholds, handhold
libticalcs2-devel.i686: W: spelling-error %description -l en_US libticalcs -> ballistics
libticalcs2-devel.i686: W: no-documentation
libticalcs2-doc.noarch: W: wrong-file-end-of-line-encoding /usr/share/doc/libticalcs2/html/style.css
4 packages and 0 specfiles checked; 0 errors, 5 warnings.



Requires
--------
libticalcs2 (rpmlib, GLIBC filtered):
    /sbin/ldconfig
    libc.so.6
    libglib-2.0.so.0
    libticables2.so.6
    libticonv.so.7
    libtifiles2.so.9
    rtld(GNU_HASH)

libticalcs2-devel (rpmlib, GLIBC filtered):
    /usr/bin/pkg-config
    libticalcs2(x86-32)
    libticalcs2.so.11
    pkgconfig(glib-2.0)
    pkgconfig(ticables2)
    pkgconfig(tifiles2)

libticalcs2-doc (rpmlib, GLIBC filtered):



Provides
--------
libticalcs2:
    libticalcs2
    libticalcs2(x86-32)
    libticalcs2.so.11

libticalcs2-devel:
    libticalcs2-devel
    libticalcs2-devel(x86-32)
    pkgconfig(ticalcs2)

libticalcs2-doc:
    libticalcs2-doc



Source checksums
----------------
http://sourceforge.net/projects/tilp/files/tilp2-linux/tilp2-1.17/libticalcs2-1.1.8.tar.bz2 :
  CHECKSUM(SHA256) this package     : a8286f8a2552bcad96beab99ce254e67b3dc1a03eb9d82f8de4bdf7b8efc3496
  CHECKSUM(SHA256) upstream package : a8286f8a2552bcad96beab99ce254e67b3dc1a03eb9d82f8de4bdf7b8efc3496


Generated by fedora-review 0.6.0 (3c5c9d7) last change: 2015-05-20
Command line :/usr/bin/fedora-review -m fedora-rawhide-i386 -b 1186557
Buildroot used: fedora-rawhide-i386
Active plugins: Generic, Shell-api, C/C++
Disabled plugins: Java, Python, fonts, SugarActivity, Ocaml, Perl, Haskell, R, PHP, Ruby
Disabled flags: EXARCH, DISTTAG, EPEL5, BATCH, EPEL6

Comment 5 Ben Rosser 2015-07-02 22:12:38 UTC
> - To me, 'make -C docs install DESTDIR=%{buildroot}'
>   is redundant; you could manage all documentation by using %doc macro.

This solution arose as a way to correctly split the documentation files between packages; attempting to specify relative paths in %doc caused the documentation to get included in both the main package and the *-doc subpackage.

By installing into %{_pkgdocdir} and then specifying what files to include using fixed paths, it worked.

There was some FPC discussion about this around the time I was packaging libtifiles2, I seem to recall. This updated documentation guideline was the result: https://fedoraproject.org/wiki/Packaging:Guidelines#Documentation

"Marking a relative path with %doc in the %files section will cause RPM to copy the referenced file or directory from %_builddir to the proper location for documentation. Files can also be placed in %_pkgdocdir, and the build scripts of the software being packaged may do this automatically when called in %install. However, mixing these methods is problematic and may result in duplicated or conflicting files, so use of %doc with relative paths and installation of files directly into %_pkgdocdir in the same source package is forbidden."

I am not sure why this is not possible in this specific instance, granted. But I sort of decided "this works, may as well go with it..."

> - Also, 'make install DESTDIR=%{buildroot}' already installs fr.po  

Oops! I forgot to remove the %lang(fr) macro, but remembered to add the %find_lang call.

I've removed the duplicate definition and 

- Why do you use %define instead of %global ?

Because I forgot to replace the %define that was there with a %global once I learned the correct thing to do. :) Fixed!

Re-uploaded.

Spec URL: https://tc01.fedorapeople.org/tilp2/libticalcs2.spec
SRPM URL: https://tc01.fedorapeople.org/tilp2/libticalcs2-1.1.8-3.fc21.src.rpm

Comment 6 Antonio T. (sagitter) 2015-07-03 10:25:33 UTC
(In reply to Ben Rosser from comment #5)
> > - To me, 'make -C docs install DESTDIR=%{buildroot}'
> >   is redundant; you could manage all documentation by using %doc macro.
> 
> This solution arose as a way to correctly split the documentation files
> between packages; attempting to specify relative paths in %doc caused the
> documentation to get included in both the main package and the *-doc
> subpackage.

That's because docs are installed with the main 'make install'.

> 
> By installing into %{_pkgdocdir} and then specifying what files to include
> using fixed paths, it worked.
> 
> There was some FPC discussion about this around the time I was packaging
> libtifiles2, I seem to recall. This updated documentation guideline was the
> result: https://fedoraproject.org/wiki/Packaging:Guidelines#Documentation
> 
> "Marking a relative path with %doc in the %files section will cause RPM to
> copy the referenced file or directory from %_builddir to the proper location
> for documentation. Files can also be placed in %_pkgdocdir, and the build
> scripts of the software being packaged may do this automatically when called
> in %install. However, mixing these methods is problematic and may result in
> duplicated or conflicting files, so use of %doc with relative paths and
> installation of files directly into %_pkgdocdir in the same source package
> is forbidden."

Indeed: "mixing these methods is problematic and forbidden"


Try this:

..
%install
make install DESTDIR=%{buildroot}
rm -f %{buildroot}%{_libdir}/libticalcs2.la
rm -rf %{buildroot}%{_docdir}/%{name}/html
%find_lang %{name}

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

%files -f %{name}.lang
%{_libdir}/libticalcs2.so.*
%doc README AUTHORS ChangeLog
%license COPYING

%files doc
%doc docs/html README AUTHORS ChangeLog
%license COPYING
..

Comment 7 Ben Rosser 2015-07-03 18:08:47 UTC
Oh, derp... not sure why I didn't realize that.

That works, thanks!

Reuploaded once again.


Spec URL: https://tc01.fedorapeople.org/tilp2/libticalcs2.spec
SRPM URL: https://tc01.fedorapeople.org/tilp2/libticalcs2-1.1.8-4.fc21.src.rpm

Comment 8 Antonio T. (sagitter) 2015-07-03 18:46:41 UTC
[x]: Package must own all directories that it creates.
[x]: Spec use %global instead of %define unless justified.
[x] Package does not contain duplicates in %files.
[x]: Uses parallel make %{?_smp_mflags} macro.

Package approved.

Comment 9 Ben Rosser 2015-07-03 19:51:15 UTC
Thanks for the review! :)

New Package SCM Request
=======================
Package Name: libticalcs2
Short Description: Texas Instruments calculator communication library
Upstream URL: https://sourceforge.net/projects/tilp/
Owners: tc01
Branches: f21 f22
InitialCC:

Comment 10 Gwyn Ciesla 2015-07-05 03:59:50 UTC
Git done (by process-git-requests).

Comment 11 Fedora Update System 2015-07-14 19:49:11 UTC
libticalcs2-1.1.8-4.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/libticalcs2-1.1.8-4.fc21

Comment 12 Fedora Update System 2015-07-14 19:50:07 UTC
libticalcs2-1.1.8-4.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/libticalcs2-1.1.8-4.fc22

Comment 13 Fedora Update System 2015-07-18 01:59:59 UTC
libticalcs2-1.1.8-4.fc21 has been pushed to the Fedora 21 testing repository.

Comment 14 Fedora Update System 2015-07-30 00:50:02 UTC
libticalcs2-1.1.8-4.fc21 has been pushed to the Fedora 21 stable repository.

Comment 15 Fedora Update System 2015-07-30 01:14:33 UTC
libticalcs2-1.1.8-4.fc22 has been pushed to the Fedora 22 stable repository.


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