Bug 1151759 - Review Request: tclbsd - Interfacing to various BSD UNIX system calls and routines
Summary: Review Request: tclbsd - Interfacing to various BSD UNIX system calls and rou...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Nobody's working on this, feel free to take it
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-11 15:00 UTC by Ma Kai
Modified: 2015-07-21 12:57 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-12-20 02:34:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ma Kai 2014-10-11 15:00:03 UTC
Spec URL: https://raw.githubusercontent.com/ekd123/fedora/master/tcl-tclbsd.spec
SRPM URL: http://ekd123.org/tcl-tclbsd-1.6-1.fc21.src.rpm
Description: 
tclbsd provides a way for Tcl programs to exercise many interesting and useful
system calls and library routines available to C programs on versions of BSD
UNIX such as FreeBSD. Many of the interfaces also work with Linux and other
non-BSD UNIX variants as well.

Fedora Account System Username: unixekd123

Koji (rawhide) and mock (fedora21) report "builds succeeded". 
See http://koji.fedoraproject.org/koji/taskinfo?taskID=7832428 .

I'm a new packager and thus I need a sponsor. Thanks!

Comment 1 Ma Kai 2014-10-11 15:02:37 UTC
[mkai@localhost SPECS]$ rpmlint tcl-tclbsd.spec ../SRPMS/* ../RPMS/*/*
tcl-tclbsd.x86_64: W: unstripped-binary-or-object /usr/lib64/tcl8.6/BSD1.6/libBSD1.6.so
tcl-tclbsd.x86_64: W: spurious-executable-perm /usr/share/doc/tcl-tclbsd/ChangeLog
tcl-tclbsd.x86_64: W: manual-page-warning /usr/share/man/mann/bsd.n.gz 2: warning: macro `HS' not defined
tcl-tclbsd.x86_64: W: manual-page-warning /usr/share/man/mann/bsd.n.gz 3: warning: macro `BS' not defined
tcl-tclbsd.x86_64: W: manual-page-warning /usr/share/man/mann/bsd.n.gz 154: warning: macro `CS' not defined
tcl-tclbsd.x86_64: W: manual-page-warning /usr/share/man/mann/bsd.n.gz 156: warning: macro `CE' not defined
tcl-tclbsd.x86_64: W: spurious-executable-perm /usr/share/doc/tcl-tclbsd/README
2 packages and 1 specfiles checked; 0 errors, 7 warnings.

The spec file generates empty debug packages. I tried --enable-symbols but no result. However, with --disable-symbols it still warns "unstripped binary or object". I simply disabled debug packages.

Comment 2 Ma Kai 2014-10-11 15:06:38 UTC
Just to clarify, though this library is intended originally for BSD, it does work well on Linux. Only one function isn't supported (according to my simple experiment).

Comment 3 Piotr Popieluch 2014-10-11 23:09:10 UTC
Hi, this is my first (unofficial review).

Are you releasing this only for F21 and higher? It fails on my F20 because of requirement: tcl(abi) = 8.6, only 8.5 is available on F20.


issues:
- You should add license.terms file to %doc in the %files section
- The readme states: "This package is a freely available open source package under the "Berkeley" license, same as Tcl." So I think the license should be BSD, not TCL.
- %define should be %global https://fedoraproject.org/wiki/Packaging:Guidelines?rd=Packaging/Guidelines#.25global_preferred_over_.25define
- spec file is not the same as in srpm

see details below:


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

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


Issues:
=======
- Package installs properly.
  Note: Installation errors (see attachment)
  See: https://fedoraproject.org/wiki/Packaging:Guidelines


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

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[-]: Development (unversioned) .so files in -devel subpackage, if present.
     Note: Unversioned so-files in private %_libdir subdirectory (see
     attachment). Verify they are not in ld path.
[x]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.

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.
[!]: 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 %doc.
[!]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses found:
     "Unknown or generated". 6 files have unknown license. Detailed output of
     licensecheck in /home/piotr/rpmbuild/1151759-tcl-tclbsd/licensecheck.txt
[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.
[x]: Each %files section contains %defattr if rpm < 4.4
     Note: %defattr present but not needed
[-]: Package contains desktop file if it is a GUI application.
[x]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[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.
[-]: Useful -debuginfo package or justification otherwise.
[x]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 20480 bytes in 2 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]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[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]: Package does not contain duplicates in %files.
[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 do not use a name that already exist
[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:
[x]: 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]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[?]: Package should compile and build into binary rpms on all supported
     architectures.
[-]: %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 libname tclbsd, %define
     pkgname BSD
[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]: Dist tag is present (not strictly required in GL).
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Uses parallel make %{?_smp_mflags} macro.
[x]: SourceX is a working URL.

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

Generic:
[!]: Rpmlint is run on all installed packages.
     Note: Mock build failed
     See: http://fedoraproject.org/wiki/Packaging/Guidelines#rpmlint
[!]: Spec file according to URL is the same as in SRPM.
     Note: Spec file as given by url is not the same as in SRPM (see attached
     diff).
     See: (this test has no URL)
[x]: Large data in /usr/share should live in a noarch subpackage if package is
     arched.
[x]: Package should not use obsolete m4 macros


Installation errors
-------------------
INFO: mock.py version 1.1.41 starting...
Start: init plugins
INFO: selinux enabled
Finish: init plugins
Start: run
Mock Version: 1.1.41
INFO: Mock Version: 1.1.41
Start: lock buildroot
INFO: installing package(s): /home/piotr/rpmbuild/1151759-tcl-tclbsd/results/tcl-tclbsd-1.6-1.fc20.x86_64.rpm
ERROR: Command failed: 
 # ['/usr/bin/yum', '--installroot', '/var/lib/mock/fedora-20-x86_64/root/', '--releasever', '20', 'install', '/home/piotr/rpmbuild/1151759-tcl-tclbsd/results/tcl-tclbsd-1.6-1.fc20.x86_64.rpm', '--setopt=tsflags=nocontexts']
Error: Package: tcl-tclbsd-1.6-1.fc20.x86_64 (/tcl-tclbsd-1.6-1.fc20.x86_64)
           Requires: tcl(abi) = 8.6
           Available: 1:tcl-8.5.14-1.fc20.i686 (fedora)
               tcl(abi) = 8.5
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest



Rpmlint
-------
Checking: tcl-tclbsd-1.6-1.fc20.x86_64.rpm
          tcl-tclbsd-1.6-1.fc20.src.rpm
tcl-tclbsd.x86_64: W: unstripped-binary-or-object /usr/lib64/tcl8.5/BSD1.6/libBSD1.6.so
tcl-tclbsd.x86_64: W: spurious-executable-perm /usr/share/doc/tcl-tclbsd/ChangeLog
tcl-tclbsd.x86_64: W: manual-page-warning /usr/share/man/mann/bsd.n.gz 2: warning: macro `HS' not defined
tcl-tclbsd.x86_64: W: manual-page-warning /usr/share/man/mann/bsd.n.gz 3: warning: macro `BS' not defined
tcl-tclbsd.x86_64: W: manual-page-warning /usr/share/man/mann/bsd.n.gz 154: warning: macro `CS' not defined
tcl-tclbsd.x86_64: W: manual-page-warning /usr/share/man/mann/bsd.n.gz 156: warning: macro `CE' not defined
tcl-tclbsd.x86_64: W: spurious-executable-perm /usr/share/doc/tcl-tclbsd/README
2 packages and 0 specfiles checked; 0 errors, 7 warnings.




Diff spec file in url and in SRPM
---------------------------------
--- /home/piotr/rpmbuild/1151759-tcl-tclbsd/srpm/tcl-tclbsd.spec	2014-10-11 23:18:16.142458916 +0200
+++ /home/piotr/rpmbuild/1151759-tcl-tclbsd/srpm-unpacked/tcl-tclbsd.spec	2014-10-11 14:59:32.000000000 +0200
@@ -36,5 +36,5 @@
 %build
 autoreconf -i
-%configure --libdir=%{tcl_sitearch}
+%configure --libdir=%{tcl_sitearch} --disable-symbols
 make %{?_smp_mflags}
 
@@ -54,5 +54,4 @@
 %{tcl_sitearch}/%{pkgname}%{version}/pkgIndex.tcl
 
-
 %changelog
 * Sat Oct 11 2014 Ma Kai <crtmike> - 1.6-1


Requires
--------
tcl-tclbsd (rpmlib, GLIBC filtered):
    tcl(abi)



Provides
--------
tcl-tclbsd:
    tcl-tclbsd
    tcl-tclbsd(x86-64)
    tclbsd



Unversioned so-files
--------------------
tcl-tclbsd: /usr/lib64/tcl8.5/BSD1.6/libBSD1.6.so

Source checksums
----------------
https://github.com/flightaware/tclbsd/archive/v1.6.tar.gz :
  CHECKSUM(SHA256) this package     : d7df8693e8d69600f9a136ac7296341145eb1488d847d07afdb5a836cf7cc8a5
  CHECKSUM(SHA256) upstream package : d7df8693e8d69600f9a136ac7296341145eb1488d847d07afdb5a836cf7cc8a5

Comment 4 Ma Kai 2014-10-12 04:05:51 UTC
Hi Piotr, 

Thanks for your review. tclbsd says it works under tcl8.5, But the guidelines indicated there is only one possibility for one package [1]. To avoid breaking the guidelines, I have to target F21 and higher. :-(

Other mistakes are now fixed.

[1] https://fedoraproject.org/wiki/Packaging:Tcl#Extensions

Spec URL: https://raw.githubusercontent.com/ekd123/fedora/master/tcl-tclbsd.spec
SRPM URL: http://ekd123.org/tcl-tclbsd-1.6-2.fc21.src.rpm

Comment 5 Piotr Popieluch 2014-10-12 15:11:51 UTC
Hi Ma Kai,

Looks good! I've looked into the symbols issue, I don't really understand why it doesn't strip the library correctly... Don't think this is a blocker though.

What you could fix is the permissions on the doc files: README, Changelog, license.terms have the executable bit set which shouldn't. (This is actually a bug in the source tar).

Regards,

Piotr

Comment 6 Orion Poplawski 2014-10-12 21:05:13 UTC
Some comments:

- Drop %defattr()
- No need to mark man pages as %doc
- Debug is not generated because library is installed with mode 644 instead of 755.  You can fix in %install or with:

diff -up tclbsd-1.6/Makefile.in.lib tclbsd-1.6/Makefile.in
--- tclbsd-1.6/Makefile.in.lib  2014-10-06 19:11:16.000000000 -0600
+++ tclbsd-1.6/Makefile.in      2014-10-12 14:57:32.895712714 -0600
@@ -91,7 +91,7 @@ INSTALL_DATA_DIR = @INSTALL_DATA_DIR@
 INSTALL_DATA   = @INSTALL_DATA@
 INSTALL_PROGRAM        = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_LIBRARY        = @INSTALL_LIBRARY@
+INSTALL_LIBRARY        = @INSTALL_PROGRAM@
 
 PACKAGE_NAME   = @PACKAGE_NAME@
 PACKAGE_VERSION        = @PACKAGE_VERSION@

- No need for rm -rf $RPM_BUILD_ROOT in %install

Comment 7 Ma Kai 2014-10-13 13:30:13 UTC
Thanks for your reviews. These problems are fixed. (I reported the permission problem to the upstream as well.)

Spec URL: https://raw.githubusercontent.com/ekd123/fedora/master/tcl-tclbsd.spec
SRPM URL: http://ekd123.org/tcl-tclbsd-1.6-3.fc21.src.rpm

Comment 8 Dominik 'Rathann' Mierzejewski 2014-10-20 10:46:29 UTC
Hello Ma Kai,
FPC member here.

(In reply to Ma Kai from comment #4)
> Thanks for your review. tclbsd says it works under tcl8.5, But the
> guidelines indicated there is only one possibility for one package [1]. To
> avoid breaking the guidelines, I have to target F21 and higher. :-(
> 
> [1] https://fedoraproject.org/wiki/Packaging:Tcl#Extensions

Please show me which passage of the Guidelines was misleading so that we (the FPC) can improve it, because the guidelines weren't meant to say such thing. What is meant is that TCL extension package for each Fedora release must Require the TCL ABI version explicitly. I have just modified the text a little bit, but please tell us (via e-mail to packaging at lists.fedoraproject.org) if it can be improved further.

It's not forbidden to make a package that works with both 8.5 and 8.6. You have at least two options:

1. Introduce a conditional, e.g.:
%if 0%{fedora} > 20
Requires: tcl(abi) = 8.6
%else
Requires: tcl(abi) = 8.5
%endif

2. Maintain a (slightly) different spec file for F20 (with the above Requires: line).

Comment 9 Ma Kai 2014-10-20 12:47:12 UTC
(In reply to Dominik 'Rathann' Mierzejewski from comment #8)
> It's not forbidden to make a package that works with both 8.5 and 8.6.
My bad... I misunderstood the guidelines. Sorry!

Package now updated. It works well with Fedora 20.

Spec URL: https://raw.githubusercontent.com/ekd123/fedora/master/tcl-tclbsd.spec
SRPM URL: http://ekd123.org/tcl-tclbsd-1.6-4.fc21.src.rpm


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