Bug 1043504 - Questionable packaging
Summary: Questionable packaging
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: sunpinyin
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Christopher Meng
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 574627
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-16 13:55 UTC by Michael Schwendt
Modified: 2015-06-30 00:46 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-30 00:46:39 UTC
Type: Bug


Attachments (Terms of Use)

Description Michael Schwendt 2013-12-16 13:55:23 UTC
There are several issues with the "sunpinyin" package.


First of all, you've added tarballs to the dist git "sources" file without removing the obsolete entries. There are multiple sources for "lm_sc.t3g*" and "sunpinyin-*.tar.xz", which are not used anymore, but must be downloaded when working with the package module:

  $ cat sources 
  31dd2667d9a5cae9d2ecdacf2201ab13  lm_sc.t3g.arpa.tar.bz2
  98b1dc61d3ef3fd4be3c0a9fac410da2  dict.utf8.tar.bz2
  a98ee690754eeaa796a4a540f170b941  sunpinyin-20130224.tar.xz
  0586241ca33359ad176c842c90bf563e  lm_sc.t3g.arpa-20121025.tar.bz2
  1e95894a4a3d8923e86e7b78c77ac815  dict.utf8-20130220.tar.bz2
  f18f8b81d012bbfeb4a647e01af1635c  sunpinyin-20130710.tar.xz


The source archive claims it would be ".xz" compressed, but it isn't:

  $ tar xfJ  sunpinyin-20130710.tar.xz
  xz: (stdin): File format not recognized
  tar: Child returned status 1
  tar: Error is not recoverable: exiting now

  $ file  sunpinyin-20130710.tar.xz
  sunpinyin-20130710.tar.xz: POSIX tar archive (GNU)

In case that is an upstream bug, it ought to be reported and fixed as it caused unnecessary confusion.


The data files "lm_sc.t3g" and "pydict_sc.bin" are accessed by the library in src/ime-core/imi_options.cpp. Not being available will end the method with an unsuccessful return code.

  # strings /usr/lib64/libsunpinyin.so.3.0 |grep lm_sc.t3g
  /lm_sc.t3g
  # strings /usr/lib64/libsunpinyin.so.3.0 |grep pydict_sc.bin
  /pydict_sc.bin

Currently, these data files are not shipped with the library, but are in the optional -data package:

  # repoquery --whatrequires sunpinyin-data
  #


Why is that package named -data?

  # rpm -q --qf "%{description}\\n" sunpinyin-data
  The sunpinyin-data package contains necessary lexicon data and its index data
  files needed by the sunpinyin input methods.

"Necessary lexicon data [...] files needed by [...]"? Nothing requires this package. And the package contains executables and manual pages. It doesn't contain any documentation files, such as the license terms (a MUST item in the Fedora Licensing Guidelines).

# rpmls sunpinyin-data
-rwxr-xr-x  /usr/bin/genpyt
-rwxr-xr-x  /usr/bin/getwordfreq
-rwxr-xr-x  /usr/bin/idngram_merge
-rwxr-xr-x  /usr/bin/ids2ngram
-rwxr-xr-x  /usr/bin/mmseg
-rwxr-xr-x  /usr/bin/slmbuild
-rwxr-xr-x  /usr/bin/slminfo
-rwxr-xr-x  /usr/bin/slmprune
-rwxr-xr-x  /usr/bin/slmseg
-rwxr-xr-x  /usr/bin/slmthread
-rwxr-xr-x  /usr/bin/sunpinyin-dictgen
-rwxr-xr-x  /usr/bin/tslmendian
-rwxr-xr-x  /usr/bin/tslminfo
-rwxr-xr-x  /usr/bin/tslmpack
-rw-r--r--  /usr/share/doc/sunpinyin/SLM-inst.mk
-rw-r--r--  /usr/share/doc/sunpinyin/SLM-train.mk
-rw-r--r--  /usr/share/man/man1/genpyt.1.gz
-rw-r--r--  /usr/share/man/man1/getwordfreq.1.gz
-rw-r--r--  /usr/share/man/man1/idngram_merge.1.gz
-rw-r--r--  /usr/share/man/man1/ids2ngram.1.gz
-rw-r--r--  /usr/share/man/man1/mmseg.1.gz
-rw-r--r--  /usr/share/man/man1/slmbuild.1.gz
-rw-r--r--  /usr/share/man/man1/slminfo.1.gz
-rw-r--r--  /usr/share/man/man1/slmprune.1.gz
-rw-r--r--  /usr/share/man/man1/slmseg.1.gz
-rw-r--r--  /usr/share/man/man1/slmthread.1.gz
-rw-r--r--  /usr/share/man/man1/tslmendian.1.gz
-rw-r--r--  /usr/share/man/man1/tslminfo.1.gz
-rw-r--r--  /usr/share/man/man1/tslmpack.1.gz
drwxr-xr-x  /usr/share/sunpinyin
-rw-r--r--  /usr/share/sunpinyin/lm_sc.t3g
-rw-r--r--  /usr/share/sunpinyin/pydict_sc.bin

The package's Group tag says "System Environment/Libraries", which isn't appropriate for -data packages.


> %package devel
> Requires:       %{name} = %{version}-%{release}

https://fedoraproject.org/wiki/Packaging:Guidelines#Requiring_Base_Package


> %defattr(-,root,root,-)

%defattr is not needed anymore for any of the active dist releases.
https://fedoraproject.org/wiki/Packaging:Guidelines#File_Permissions


> %files
> %defattr(-,root,root,-)
> %doc AUTHORS COPYING *.LICENSE
> %doc README TODO
> %{_libdir}/libsunpinyin*.so.*
> %{_docdir}/%{name}/README

Redundant/confusing entries here. Both "%doc README" as well as %{_docdir}/%{name}/README once more.


> %files data
> %defattr(-,root,root,-)
> %{_datadir}/%{name}
> %{_bindir}/*
> %{_mandir}/man1/*.1.gz
> %{_docdir}/%{name}/SLM-*.mk

Since this subpackage doesn't depend on anything that includes %{_docdir}/%{name}/, the %{_docdir}/%{name}/ directory is "unowned".
https://fedoraproject.org/wiki/Packaging:UnownedDirectories

The license text must be included for packages that don't depend on a base package that would include the license file already:
https://fedoraproject.org/wiki/Packaging:LicensingGuidelines#License_Text

[...]

Conclusion: I recommend re-reviewing this package in order to fix these issues as well as the duplicate documentation in bug 1001266.

The sunpinyin-data package seems misnamed due to the types of files it contains. A better choice would be a split into sunpinyin-libs and sunpinyin.

Comment 1 Fedora End Of Life 2015-05-29 10:00:20 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Fedora End Of Life 2015-06-30 00:46:39 UTC
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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