Bug 1868846 - Review Request: fcitx5 - Next generation of fcitx
Summary: Review Request: fcitx5 - Next generation of fcitx
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Andy Mender
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1868845
Blocks: 1868847 1868848 1868849 1868850 1868851 1868853 1868854 1868857 1868861
TreeView+ depends on / blocked
 
Reported: 2020-08-14 03:13 UTC by Qiyu Yan
Modified: 2020-08-22 17:32 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-08-22 07:46:14 UTC
Type: ---
Embargoed:
andymenderunix: fedora-review+


Attachments (Terms of Use)

Description Qiyu Yan 2020-08-14 03:13:02 UTC
Spec URL: https://download.copr.fedorainfracloud.org/results/yanqiyu/fcitx5/fedora-rawhide-x86_64/01614384-fcitx5/fcitx5.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/yanqiyu/fcitx5/fedora-rawhide-x86_64/01614384-fcitx5/fcitx5-0-0.2.git87fb655.fc34.src.rpm
Description: Fcitx 5 is a generic input method framework released under LGPL-2.1+.
Fedora Account System Username: yanqiyu

Comment 1 Andy Mender 2020-08-15 16:43:57 UTC
> BuildRequires:  cmake, extra-cmake-modules
> BuildRequires:  gcc-c++
> BuildRequires:  cairo-devel, enchant-devel, iso-codes-devel
> BuildRequires:  mesa-libGL-devel, libxkbcommon-x11-devel
> BuildRequires:  pango-devel, systemd-devel, systemd-rpm-macros
> BuildRequires:  wayland-devel, wayland-protocols-devel, libxcb-devel
> BuildRequires:  xcb-util-wm-devel, xcb-imdkit-devel, xcb-util-wm-devel
> BuildRequires:  libxkbfile-devel, fmt-devel, gdk-pixbuf2-devel
> BuildRequires:  cldr-emoji-annotation-devel, libuuid-devel
> BuildRequires:  expat-devel, json-c-devel, xkeyboard-config-devel
> BuildRequires:  xcb-util-keysyms-devel

Could you split these into separate lines and sort them alphabetically? Also, can you check whether it's possible to use the "pkgconfig(foo)" format for the -devel packages?

> %check
> %ctest

I see 2 failing tests when building the package locally:
34: I2020-08-15 17:53:56.580770 emoji.cpp:182] Trying to load emoji for en from /usr/share/unicode/cldr/common/annotations/en.xml: 2152 entry(s) loaded.
34: I2020-08-15 17:53:56.580788 addonmanager.cpp:271] Unloading addon emoji
31/36 Test #34: testemoji ........................   Passed    0.02 sec
32/36 Test #33: testisocodes .....................   Passed    0.04 sec
2: /home/amender/rpmbuild/BUILD/fcitx5-87fb655852092f3ed2f79a3aac86fc6d5d92069f/test/dbus_wrapper.sh: line 26: 34577 Aborted                 (core dumped) "$@"
2: /home/amender/rpmbuild/BUILD/fcitx5-87fb655852092f3ed2f79a3aac86fc6d5d92069f/test/dbus_wrapper.sh: line 6: kill: (34562) - No such process
33/36 Test  #2: testdbus .........................***Failed    0.09 sec
F2020-08-15 17:53:56.549280 testdbus.cpp:94] slot failed
/home/amender/rpmbuild/BUILD/fcitx5-87fb655852092f3ed2f79a3aac86fc6d5d92069f/test/dbus_wrapper.sh: line 26: 34577 Aborted                 (core dumped) "$@"
/home/amender/rpmbuild/BUILD/fcitx5-87fb655852092f3ed2f79a3aac86fc6d5d92069f/test/dbus_wrapper.sh: line 6: kill: (34562) - No such process

Do the tests work for you? I had to disable the tests to run fedora-review.

> %files -f %{name}.lang
> %license LICENSES/LGPL-2.1-or-later.txt
> %doc README.md 
> %{_bindir}/*

I think here you can list the binaries, since there aren't so many of them:
%{_bindir}/fcitx5
%{_bindir}/fcitx5-configtool
%{_bindir}/fcitx5-remote

> %files devel
> %{_includedir}/*
> %{_libdir}/cmake/*
> %{_libdir}/*.so
> %{_libdir}/pkgconfig/*

Here I would be more specific like so:
%{_includedir}/Fcitx5/
%{_libdir}/cmake/Fcitx5* # quite a lot of CMake dirs
%{_libdir}/libFcitx5*.so
%{_libdir}/pkgconfig/Fcitx5*.pc

It's not mandatory, but it gives you tighter control over what goes into the package and avoids picking up unintended files :)

> %files libs
> %{_libdir}/%{name}
> %{_libdir}/*.so.*

Same here:
%{_libdir}/%{name}/ # that way your package owns the entire dir
%{_libdir}/libFcitx5*.so.*

You can be even more specific with the SO files to pick up soname bumps, but again that's not mandatory.

The full review matrix below. I marked some items as "fail", because I think they might need to be discussed:
Package Review
==============

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


Issues:
=======
- Package installs properly.
  Note: Installation errors (see attachment)
  Review: It might be because I had to build the packages on my F32 system manually,
  but please have a look at the errors at the end of the review.
  See: https://docs.fedoraproject.org/en-US/packaging-guidelines/
- Package installs a %{name}.desktop using desktop-file-install or desktop-
  file-validate if there is such a file.
  Review: Desktop files should be installed using one of the above commands.


===== 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.
     Review: Present in fcitx5-libs. Is it possible to version them?
[x]: If your application is a C or C++ application you must list a
     BuildRequires against gcc, gcc-c++ or clang.
[x]: Header files in -devel subpackage, if present.
[x]: ldconfig not called in %post and %postun for Fedora 28 and later.
[x]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.

Generic:
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
     Note: Using prebuilt packages
     Review: It does, but tests had to be disabled. See earlier comments.
[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: "Unknown or generated", "*No copyright* GNU Lesser General
     Public License". 588 files have unknown license. Detailed output of
     licensecheck in
     /home/amender/rpmbuild/SPECS/fcitx5/fcitx5/licensecheck.txt
     Review: Checked. Everything is licensed under LGPLv2.
[!]: License file installed when any subpackage combination is installed.
     Review: fcitx5-libs can theoretically be installed alone. 
     Can you add a license file to it as well?
[!]: Package must own all directories that it creates.
     Note: Directories without known owners:
     /usr/share/icons/hicolor/22x22, /usr/share/icons/hicolor/48x48,
     /usr/share/icons/hicolor/scalable,
     /usr/share/icons/hicolor/24x24/apps,
     /usr/share/icons/hicolor/scalable/apps,
     /usr/share/icons/hicolor/32x32, /usr/share/icons/hicolor/22x22/apps,
     /usr/share/icons/hicolor, /usr/share/icons/hicolor/16x16/apps,
     /usr/share/icons/hicolor/48x48/apps, /usr/share/icons/hicolor/16x16,
     /usr/share/icons/hicolor/32x32/apps, /usr/share/icons/hicolor/128x128,
     /usr/share/icons/hicolor/24x24, /usr/share/icons/hicolor/128x128/apps
     Review: Add a trailing backslash to properly own directories.
     Some of these dirs are provided by "hicolor-icon-theme" which should be
     added as a Requires.
[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]: 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.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10240 bytes in 1 files.
[!]: Package complies to the Packaging Guidelines
[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]: 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 contains desktop file if it is a GUI application.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package must not depend on deprecated() packages.
[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:
[!]: Reviewer should test that the package builds in mock.
     Review: It depends on another package which is not yet available in the repos
     and some tests seem to fail.
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[!]: Final provides and requires are sane (see attachments).
     Review: "hicolor-icon-theme" possibly missing as Requires.
[x]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
     fcitx5-libs
     Review: Should this be the case or can fcitx5-libs be installed independently?
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[-]: 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.
     Review: Can't be verified yet due to failing tests and a dependency on a package in review.
[!]: %check is present and all tests pass.
     Review: 2 tests fail. See earlier comments.
[x]: Packages should try to preserve timestamps of original installed
     files.
[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]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: The placement of pkgconfig(.pc) files are correct.
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

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

Generic:
[!]: Rpmlint is run on all installed packages.
     Note: Mock build failed
     See: https://docs.fedoraproject.org/en-US/packaging-
     guidelines/#_use_rpmlint
[ ]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.
     Note: Arch-ed rpms have a total of 5662720 bytes in /usr/share
     Review: Worth moving stuff from %{_datadir}/%{name} to a separate fcitx5-data package?


Installation errors
-------------------
INFO: mock.py version 2.4 starting (python version = 3.8.5)...
Start: init plugins
INFO: selinux enabled
Finish: init plugins
INFO: Signal handler active
Start: run
Start: chroot init
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled package manager cache
Start: cleaning package manager metadata
Finish: cleaning package manager metadata
INFO: enabled HW Info plugin
Mock Version: 2.4
INFO: Mock Version: 2.4
Finish: chroot init
INFO: installing package(s): /home/amender/rpmbuild/SPECS/fcitx5/fcitx5-libs-0-0.1.20200813git87fb655.fc32.x86_64.rpm /home/amender/rpmbuild/SPECS/fcitx5/fcitx5-devel-0-0.1.20200813git87fb655.fc32.x86_64.rpm /home/amender/rpmbuild/SPECS/fcitx5/fcitx5-debuginfo-0-0.1.20200813git87fb655.fc32.x86_64.rpm /home/amender/rpmbuild/SPECS/fcitx5/fcitx5-debugsource-0-0.1.20200813git87fb655.fc32.x86_64.rpm /home/amender/rpmbuild/SPECS/fcitx5/fcitx5-0-0.1.20200813git87fb655.fc32.x86_64.rpm /home/amender/rpmbuild/SPECS/fcitx5/fcitx5-libs-debuginfo-0-0.1.20200813git87fb655.fc32.x86_64.rpm
ERROR: Command failed: 
 # /usr/bin/dnf --installroot /var/lib/mock/fedora-rawhide-x86_64/root/ --releasever 34 --setopt=deltarpm=False --allowerasing --disableplugin=local --disableplugin=spacewalk install /home/amender/rpmbuild/SPECS/fcitx5/fcitx5-libs-0-0.1.20200813git87fb655.fc32.x86_64.rpm /home/amender/rpmbuild/SPECS/fcitx5/fcitx5-devel-0-0.1.20200813git87fb655.fc32.x86_64.rpm /home/amender/rpmbuild/SPECS/fcitx5/fcitx5-debuginfo-0-0.1.20200813git87fb655.fc32.x86_64.rpm /home/amender/rpmbuild/SPECS/fcitx5/fcitx5-debugsource-0-0.1.20200813git87fb655.fc32.x86_64.rpm /home/amender/rpmbuild/SPECS/fcitx5/fcitx5-0-0.1.20200813git87fb655.fc32.x86_64.rpm /home/amender/rpmbuild/SPECS/fcitx5/fcitx5-libs-debuginfo-0-0.1.20200813git87fb655.fc32.x86_64.rpm --setopt=tsflags=nocontexts



Rpmlint
-------
Checking: fcitx5-0-0.1.20200813git87fb655.fc32.x86_64.rpm
          fcitx5-devel-0-0.1.20200813git87fb655.fc32.x86_64.rpm
          fcitx5-libs-0-0.1.20200813git87fb655.fc32.x86_64.rpm
          fcitx5-debuginfo-0-0.1.20200813git87fb655.fc32.x86_64.rpm
          fcitx5-debugsource-0-0.1.20200813git87fb655.fc32.x86_64.rpm
          fcitx5-0-0.1.20200813git87fb655.fc32.src.rpm
fcitx5.x86_64: W: spelling-error Summary(en_US) fcitx -> deficit
fcitx5.x86_64: W: spelling-error %description -l en_US Fcitx -> Deficit
fcitx5.x86_64: W: non-conffile-in-etc /etc/X11/xinit/xinput.d/fcitx5.conf
fcitx5.x86_64: W: no-manual-page-for-binary fcitx5
fcitx5.x86_64: W: no-manual-page-for-binary fcitx5-configtool
fcitx5.x86_64: W: no-manual-page-for-binary fcitx5-remote
fcitx5-devel.x86_64: W: description-shorter-than-summary
fcitx5-devel.x86_64: W: no-documentation
fcitx5-libs.x86_64: W: no-documentation
fcitx5.src: W: spelling-error Summary(en_US) fcitx -> deficit
fcitx5.src: W: spelling-error %description -l en_US Fcitx -> Deficit
6 packages and 0 specfiles checked; 0 errors, 11 warnings.




Unversioned so-files
--------------------
fcitx5-libs: /usr/lib64/fcitx5/classicui.so
fcitx5-libs: /usr/lib64/fcitx5/clipboard.so
fcitx5-libs: /usr/lib64/fcitx5/dbus.so
fcitx5-libs: /usr/lib64/fcitx5/dbusfrontend.so
fcitx5-libs: /usr/lib64/fcitx5/emoji.so
fcitx5-libs: /usr/lib64/fcitx5/ibusfrontend.so
fcitx5-libs: /usr/lib64/fcitx5/kimpanel.so
fcitx5-libs: /usr/lib64/fcitx5/notificationitem.so
fcitx5-libs: /usr/lib64/fcitx5/notifications.so
fcitx5-libs: /usr/lib64/fcitx5/quickphrase.so
fcitx5-libs: /usr/lib64/fcitx5/spell.so
fcitx5-libs: /usr/lib64/fcitx5/testfrontend.so
fcitx5-libs: /usr/lib64/fcitx5/testim.so
fcitx5-libs: /usr/lib64/fcitx5/testui.so
fcitx5-libs: /usr/lib64/fcitx5/unicode.so
fcitx5-libs: /usr/lib64/fcitx5/wayland.so
fcitx5-libs: /usr/lib64/fcitx5/waylandim.so
fcitx5-libs: /usr/lib64/fcitx5/xcb.so
fcitx5-libs: /usr/lib64/fcitx5/xim.so

Review: Can/Should these files be versioned? They belong to the main fcitx5 package and are used internally by the binaries, correct?

Source checksums
----------------
https://download.fcitx-im.org/data/en_dict-20121020.tar.gz :
  CHECKSUM(SHA256) this package     : c44a5d7847925eea9e4d2d04748d442cd28dd9299a0b572ef7d91eac4f5a6ceb
  CHECKSUM(SHA256) upstream package : c44a5d7847925eea9e4d2d04748d442cd28dd9299a0b572ef7d91eac4f5a6ceb
https://github.com/fcitx/fcitx5/archive/87fb655852092f3ed2f79a3aac86fc6d5d92069f/fcitx5-87fb655852092f3ed2f79a3aac86fc6d5d92069f.tar.gz :
  CHECKSUM(SHA256) this package     : 97df64dfb06065a2a7230115945d9b2d4d5286e6235977b429192c88b9d969c4
  CHECKSUM(SHA256) upstream package : 97df64dfb06065a2a7230115945d9b2d4d5286e6235977b429192c88b9d969c4


Requires
--------
fcitx5 (rpmlib, GLIBC filtered):
    /bin/sh
    /usr/bin/sh
    /usr/sbin/alternatives
    dbus-x11
    fcitx5-libs(x86-64)
    imsettings
    libFcitx5Config.so.6()(64bit)
    libFcitx5Core.so.6()(64bit)
    libFcitx5Utils.so.2()(64bit)
    libc.so.6()(64bit)
    libexpat.so.1()(64bit)
    libgcc_s.so.1()(64bit)
    libgcc_s.so.1(GCC_3.0)(64bit)
    libjson-c.so.4()(64bit)
    libstdc++.so.6()(64bit)
    libstdc++.so.6(CXXABI_1.3)(64bit)
    libstdc++.so.6(CXXABI_1.3.5)(64bit)
    libstdc++.so.6(CXXABI_1.3.9)(64bit)
    rtld(GNU_HASH)

fcitx5-devel (rpmlib, GLIBC filtered):
    /usr/bin/pkg-config
    cmake-filesystem(x86-64)
    fcitx5(x86-64)
    libFcitx5Config.so.6()(64bit)
    libFcitx5Core.so.6()(64bit)
    libFcitx5Utils.so.2()(64bit)
    pkgconfig(Fcitx5Config)
    pkgconfig(Fcitx5Core)
    pkgconfig(Fcitx5Utils)

fcitx5-libs (rpmlib, GLIBC filtered):
    libFcitx5Config.so.6()(64bit)
    libFcitx5Core.so.6()(64bit)
    libFcitx5Utils.so.2()(64bit)
    libc.so.6()(64bit)
    libcairo.so.2()(64bit)
    libdl.so.2()(64bit)
    libenchant.so.1()(64bit)
    libexpat.so.1()(64bit)
    libgcc_s.so.1()(64bit)
    libgcc_s.so.1(GCC_3.0)(64bit)
    libgdk_pixbuf-2.0.so.0()(64bit)
    libgio-2.0.so.0()(64bit)
    libgobject-2.0.so.0()(64bit)
    libm.so.6()(64bit)
    libpango-1.0.so.0()(64bit)
    libpangocairo-1.0.so.0()(64bit)
    libpthread.so.0()(64bit)
    libstdc++.so.6()(64bit)
    libstdc++.so.6(CXXABI_1.3)(64bit)
    libstdc++.so.6(CXXABI_1.3.5)(64bit)
    libstdc++.so.6(CXXABI_1.3.9)(64bit)
    libsystemd.so.0()(64bit)
    libsystemd.so.0(LIBSYSTEMD_221)(64bit)
    libsystemd.so.0(LIBSYSTEMD_222)(64bit)
    libsystemd.so.0(LIBSYSTEMD_243)(64bit)
    libuuid.so.1()(64bit)
    libuuid.so.1(UUID_1.0)(64bit)
    libwayland-client.so.0()(64bit)
    libxcb-ewmh.so.2()(64bit)
    libxcb-icccm.so.4()(64bit)
    libxcb-imdkit.so.0()(64bit)
    libxcb-keysyms.so.1()(64bit)
    libxcb-randr.so.0()(64bit)
    libxcb-util.so.1()(64bit)
    libxcb-xfixes.so.0()(64bit)
    libxcb-xinerama.so.0()(64bit)
    libxcb-xkb.so.1()(64bit)
    libxcb.so.1()(64bit)
    libxkbcommon-x11.so.0()(64bit)
    libxkbcommon-x11.so.0(V_0.5.0)(64bit)
    libxkbcommon.so.0()(64bit)
    libxkbcommon.so.0(V_0.5.0)(64bit)
    libxkbfile.so.1()(64bit)
    rtld(GNU_HASH)

fcitx5-debuginfo (rpmlib, GLIBC filtered):

fcitx5-debugsource (rpmlib, GLIBC filtered):



Provides
--------
fcitx5:
    application()
    application(fcitx5-configtool.desktop)
    application(fcitx5.desktop)
    fcitx5
    fcitx5(x86-64)

fcitx5-devel:
    cmake(Fcitx5Config)
    cmake(Fcitx5Core)
    cmake(Fcitx5Module)
    cmake(Fcitx5ModuleClipboard)
    cmake(Fcitx5ModuleDBus)
    cmake(Fcitx5ModuleEmoji)
    cmake(Fcitx5ModuleNotificationItem)
    cmake(Fcitx5ModuleNotifications)
    cmake(Fcitx5ModuleQuickPhrase)
    cmake(Fcitx5ModuleSpell)
    cmake(Fcitx5ModuleTestFrontend)
    cmake(Fcitx5ModuleTestIM)
    cmake(Fcitx5ModuleWayland)
    cmake(Fcitx5ModuleXCB)
    cmake(Fcitx5Utils)
    cmake(fcitx5config)
    cmake(fcitx5core)
    cmake(fcitx5module)
    cmake(fcitx5moduleclipboard)
    cmake(fcitx5moduledbus)
    cmake(fcitx5moduleemoji)
    cmake(fcitx5modulenotificationitem)
    cmake(fcitx5modulenotifications)
    cmake(fcitx5modulequickphrase)
    cmake(fcitx5modulespell)
    cmake(fcitx5moduletestfrontend)
    cmake(fcitx5moduletestim)
    cmake(fcitx5modulewayland)
    cmake(fcitx5modulexcb)
    cmake(fcitx5utils)
    fcitx5-devel
    fcitx5-devel(x86-64)
    pkgconfig(Fcitx5Config)
    pkgconfig(Fcitx5Core)
    pkgconfig(Fcitx5Module)
    pkgconfig(Fcitx5Utils)

fcitx5-libs:
    fcitx5-libs
    fcitx5-libs(x86-64)
    libFcitx5Config.so.6()(64bit)
    libFcitx5Core.so.6()(64bit)
    libFcitx5Utils.so.2()(64bit)

fcitx5-debuginfo:
    debuginfo(build-id)
    fcitx5-debuginfo
    fcitx5-debuginfo(x86-64)

fcitx5-debugsource:
    fcitx5-debugsource
    fcitx5-debugsource(x86-64)

Comment 2 Qiyu Yan 2020-08-16 09:21:10 UTC
> Could you split these into separate lines and sort them alphabetically?
> Also, can you check whether it's possible to use the "pkgconfig(foo)" format
> for the -devel packages?
Fixed, and I am planning to fix same problem for other fcitx5* packages, may need some time.
> 
> > %check
> > %ctest
> 
> I see 2 failing tests when building the package locally:
> 34: I2020-08-15 17:53:56.580770 emoji.cpp:182] Trying to load emoji for en
> from /usr/share/unicode/cldr/common/annotations/en.xml: 2152 entry(s) loaded.
> 34: I2020-08-15 17:53:56.580788 addonmanager.cpp:271] Unloading addon emoji
> 31/36 Test #34: testemoji ........................   Passed    0.02 sec
> 32/36 Test #33: testisocodes .....................   Passed    0.04 sec
> 2:
> /home/amender/rpmbuild/BUILD/fcitx5-87fb655852092f3ed2f79a3aac86fc6d5d92069f/
> test/dbus_wrapper.sh: line 26: 34577 Aborted                 (core dumped)
> "$@"
> 2:
> /home/amender/rpmbuild/BUILD/fcitx5-87fb655852092f3ed2f79a3aac86fc6d5d92069f/
> test/dbus_wrapper.sh: line 6: kill: (34562) - No such process
> 33/36 Test  #2: testdbus .........................***Failed    0.09 sec
> F2020-08-15 17:53:56.549280 testdbus.cpp:94] slot failed
> /home/amender/rpmbuild/BUILD/fcitx5-87fb655852092f3ed2f79a3aac86fc6d5d92069f/
> test/dbus_wrapper.sh: line 26: 34577 Aborted                 (core dumped)
> "$@"
> /home/amender/rpmbuild/BUILD/fcitx5-87fb655852092f3ed2f79a3aac86fc6d5d92069f/
> test/dbus_wrapper.sh: line 6: kill: (34562) - No such process
> 
> Do the tests work for you? I had to disable the tests to run fedora-review.
It works, both in copr or local machine
e.g. https://copr.fedorainfracloud.org/coprs/yanqiyu/fcitx5/build/1612145/
> 
> > %files -f %{name}.lang
> > %license LICENSES/LGPL-2.1-or-later.txt
> > %doc README.md 
> > %{_bindir}/*
> 
> I think here you can list the binaries, since there aren't so many of them:
> %{_bindir}/fcitx5
> %{_bindir}/fcitx5-configtool
> %{_bindir}/fcitx5-remote
Using 
%{_bindir}/%{name}
%{_bindir}/%{name}-configtool
%{_bindir}/%{name}-remote
> 
> > %files devel
> > %{_includedir}/*
> > %{_libdir}/cmake/*
> > %{_libdir}/*.so
> > %{_libdir}/pkgconfig/*
> 
> Here I would be more specific like so:
> %{_includedir}/Fcitx5/
> %{_libdir}/cmake/Fcitx5* # quite a lot of CMake dirs
> %{_libdir}/libFcitx5*.so
> %{_libdir}/pkgconfig/Fcitx5*.pc
Done
> 
> It's not mandatory, but it gives you tighter control over what goes into the
> package and avoids picking up unintended files :)
> 
> > %files libs
> > %{_libdir}/%{name}
> > %{_libdir}/*.so.*
> 
> Same here:
> %{_libdir}/%{name}/ # that way your package owns the entire dir
> %{_libdir}/libFcitx5*.so.*
> 
> You can be even more specific with the SO files to pick up soname bumps, but
> again that's not mandatory.
Done.
> 
> The full review matrix below. I marked some items as "fail", because I think
> they might need to be discussed:
> Package Review
> ==============
> 
> Legend:
> [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
> [ ] = Manual review needed
> 
> 
> Issues:
> =======
> - Package installs properly.
>   Note: Installation errors (see attachment)
>   Review: It might be because I had to build the packages on my F32 system
> manually,
>   but please have a look at the errors at the end of the review.
>   See: https://docs.fedoraproject.org/en-US/packaging-guidelines/
> - Package installs a %{name}.desktop using desktop-file-install or desktop-
>   file-validate if there is such a file.
>   Review: Desktop files should be installed using one of the above commands
Fixed
> 
> 
> ===== 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.
>      Review: Present in fcitx5-libs. Is it possible to version them?
They are meant to be loaded internally, so I tried to exclude them from being included into Provides

> [!]: License file installed when any subpackage combination is installed.
>      Review: fcitx5-libs can theoretically be installed alone. 
>      Can you add a license file to it as well?
Fixed
> [!]: Package must own all directories that it creates.
>      Note: Directories without known owners:
>      /usr/share/icons/hicolor/22x22, /usr/share/icons/hicolor/48x48,
>      /usr/share/icons/hicolor/scalable,
>      /usr/share/icons/hicolor/24x24/apps,
>      /usr/share/icons/hicolor/scalable/apps,
>      /usr/share/icons/hicolor/32x32, /usr/share/icons/hicolor/22x22/apps,
>      /usr/share/icons/hicolor, /usr/share/icons/hicolor/16x16/apps,
>      /usr/share/icons/hicolor/48x48/apps, /usr/share/icons/hicolor/16x16,
>      /usr/share/icons/hicolor/32x32/apps, /usr/share/icons/hicolor/128x128,
>      /usr/share/icons/hicolor/24x24, /usr/share/icons/hicolor/128x128/apps
>      Review: Add a trailing backslash to properly own directories.
>      Some of these dirs are provided by "hicolor-icon-theme" which should be
>      added as a Requires.
Should have fixed
> [!]: Package complies to the Packaging Guidelines
> [!]: Reviewer should test that the package builds in mock.
>      Review: It depends on another package which is not yet available in the
> repos
Maybe use a chainbuild?
> [!]: Final provides and requires are sane (see attachments).
>      Review: "hicolor-icon-theme" possibly missing as Requires.
Should fix
> [!]: Package should compile and build into binary rpms on all supported
>      architectures.
>      Review: Can't be verified yet due to failing tests and a dependency on
> a package in review.
> [!]: %check is present and all tests pass.
>      Review: 2 tests fail. See earlier comments.
No problem on both my machine and COPR

> ===== EXTRA items =====
> 
> Generic:
> [!]: Rpmlint is run on all installed packages.
>      Note: Mock build failed
>      See: https://docs.fedoraproject.org/en-US/packaging-
>      guidelines/#_use_rpmlint
> [ ]: Large data in /usr/share should live in a noarch subpackage if package
>      is arched.
>      Note: Arch-ed rpms have a total of 5662720 bytes in /usr/share
>      Review: Worth moving stuff from %{_datadir}/%{name} to a separate
> fcitx5-data package?
fixed!
> 
> 
> Installation errors
> -------------------
> INFO: mock.py version 2.4 starting (python version = 3.8.5)...
> Start: init plugins
> INFO: selinux enabled
> Finish: init plugins
> INFO: Signal handler active
> Start: run
> Start: chroot init
> INFO: calling preinit hooks
> INFO: enabled root cache
> INFO: enabled package manager cache
> Start: cleaning package manager metadata
> Finish: cleaning package manager metadata
> INFO: enabled HW Info plugin
> Mock Version: 2.4
> INFO: Mock Version: 2.4
> Finish: chroot init
> INFO: installing package(s):
> /home/amender/rpmbuild/SPECS/fcitx5/fcitx5-libs-0-0.1.20200813git87fb655.
> fc32.x86_64.rpm
> /home/amender/rpmbuild/SPECS/fcitx5/fcitx5-devel-0-0.1.20200813git87fb655.
> fc32.x86_64.rpm
> /home/amender/rpmbuild/SPECS/fcitx5/fcitx5-debuginfo-0-0.1.
> 20200813git87fb655.fc32.x86_64.rpm
> /home/amender/rpmbuild/SPECS/fcitx5/fcitx5-debugsource-0-0.1.
> 20200813git87fb655.fc32.x86_64.rpm
> /home/amender/rpmbuild/SPECS/fcitx5/fcitx5-0-0.1.20200813git87fb655.fc32.
> x86_64.rpm
> /home/amender/rpmbuild/SPECS/fcitx5/fcitx5-libs-debuginfo-0-0.1.
> 20200813git87fb655.fc32.x86_64.rpm
> ERROR: Command failed: 
>  # /usr/bin/dnf --installroot /var/lib/mock/fedora-rawhide-x86_64/root/
> --releasever 34 --setopt=deltarpm=False --allowerasing --disableplugin=local
> --disableplugin=spacewalk install
> /home/amender/rpmbuild/SPECS/fcitx5/fcitx5-libs-0-0.1.20200813git87fb655.
> fc32.x86_64.rpm
> /home/amender/rpmbuild/SPECS/fcitx5/fcitx5-devel-0-0.1.20200813git87fb655.
> fc32.x86_64.rpm
> /home/amender/rpmbuild/SPECS/fcitx5/fcitx5-debuginfo-0-0.1.
> 20200813git87fb655.fc32.x86_64.rpm
> /home/amender/rpmbuild/SPECS/fcitx5/fcitx5-debugsource-0-0.1.
> 20200813git87fb655.fc32.x86_64.rpm
> /home/amender/rpmbuild/SPECS/fcitx5/fcitx5-0-0.1.20200813git87fb655.fc32.
> x86_64.rpm
> /home/amender/rpmbuild/SPECS/fcitx5/fcitx5-libs-debuginfo-0-0.1.
> 20200813git87fb655.fc32.x86_64.rpm --setopt=tsflags=nocontexts
> 
> 
> 
> Rpmlint
> -------
> Checking: fcitx5-0-0.1.20200813git87fb655.fc32.x86_64.rpm
>           fcitx5-devel-0-0.1.20200813git87fb655.fc32.x86_64.rpm
>           fcitx5-libs-0-0.1.20200813git87fb655.fc32.x86_64.rpm
>           fcitx5-debuginfo-0-0.1.20200813git87fb655.fc32.x86_64.rpm
>           fcitx5-debugsource-0-0.1.20200813git87fb655.fc32.x86_64.rpm
>           fcitx5-0-0.1.20200813git87fb655.fc32.src.rpm
> fcitx5.x86_64: W: spelling-error Summary(en_US) fcitx -> deficit
> fcitx5.x86_64: W: spelling-error %description -l en_US Fcitx -> Deficit
> fcitx5.x86_64: W: non-conffile-in-etc /etc/X11/xinit/xinput.d/fcitx5.conf
> fcitx5.x86_64: W: no-manual-page-for-binary fcitx5
> fcitx5.x86_64: W: no-manual-page-for-binary fcitx5-configtool
> fcitx5.x86_64: W: no-manual-page-for-binary fcitx5-remote
> fcitx5-devel.x86_64: W: description-shorter-than-summary
> fcitx5-devel.x86_64: W: no-documentation
> fcitx5-libs.x86_64: W: no-documentation
> fcitx5.src: W: spelling-error Summary(en_US) fcitx -> deficit
> fcitx5.src: W: spelling-error %description -l en_US Fcitx -> Deficit
> 6 packages and 0 specfiles checked; 0 errors, 11 warnings.
> 
> 
> 
> 
> Unversioned so-files
> --------------------
> fcitx5-libs: /usr/lib64/fcitx5/classicui.so
> fcitx5-libs: /usr/lib64/fcitx5/clipboard.so
> fcitx5-libs: /usr/lib64/fcitx5/dbus.so
> fcitx5-libs: /usr/lib64/fcitx5/dbusfrontend.so
> fcitx5-libs: /usr/lib64/fcitx5/emoji.so
> fcitx5-libs: /usr/lib64/fcitx5/ibusfrontend.so
> fcitx5-libs: /usr/lib64/fcitx5/kimpanel.so
> fcitx5-libs: /usr/lib64/fcitx5/notificationitem.so
> fcitx5-libs: /usr/lib64/fcitx5/notifications.so
> fcitx5-libs: /usr/lib64/fcitx5/quickphrase.so
> fcitx5-libs: /usr/lib64/fcitx5/spell.so
> fcitx5-libs: /usr/lib64/fcitx5/testfrontend.so
> fcitx5-libs: /usr/lib64/fcitx5/testim.so
> fcitx5-libs: /usr/lib64/fcitx5/testui.so
> fcitx5-libs: /usr/lib64/fcitx5/unicode.so
> fcitx5-libs: /usr/lib64/fcitx5/wayland.so
> fcitx5-libs: /usr/lib64/fcitx5/waylandim.so
> fcitx5-libs: /usr/lib64/fcitx5/xcb.so
> fcitx5-libs: /usr/lib64/fcitx5/xim.so
They are not to be versioned(for fcitx5 internal usage only), so I added 
%global __provides_exclude_from ^%{_libdir}/%{name}/.*\\.so$
to exclude them from being captured by auto scanning.

Comment 3 Qiyu Yan 2020-08-17 12:14:46 UTC
Updated all fcitx5-*.spec, and about the version in changelog, it seems that rpm macros have been updated again (they removed the snapshot date tag),
 But in my case, I will make the version 0-0.N accurate, so, I think it will be safe to ignore the rpmlint warning about versioning.

Comment 4 Andy Mender 2020-08-17 21:12:16 UTC
Overall looks great!

Two items remaining:
- Requires: %{name}%{?_isa} = %{version}-%{release} in fcitx5-libs                        # not a big issue, but adding this will prevent accidental installs of fcitx5-libs alone.
- fcitx5.x86_64: W: conffile-without-noreplace-flag /etc/X11/xinit/xinput.d/fcitx5.conf   # if I understand correctly, as it stands now fcitx5 updates can accidentally override the fcitx5.conf config. We probably don't want that.

Comment 5 Qiyu Yan 2020-08-18 00:53:23 UTC
(In reply to Andy Mender from comment #4)
> Overall looks great!
> 
> Two items remaining:
> - Requires: %{name}%{?_isa} = %{version}-%{release} in fcitx5-libs          
> # not a big issue, but adding this will prevent accidental installs of
> fcitx5-libs alone.
Reasonable, fixed
> - fcitx5.x86_64: W: conffile-without-noreplace-flag
> /etc/X11/xinit/xinput.d/fcitx5.conf   # if I understand correctly, as it
> stands now fcitx5 updates can accidentally override the fcitx5.conf config.
> We probably don't want that.
I am not sure if it is good to let users to change the xinputrc script, but giving 
users more powers are always good, fixed

Comment 6 Andy Mender 2020-08-18 19:31:40 UTC
All clear, package approved!

Comment 7 Jerry James 2020-08-19 14:10:07 UTC
(In reply to Qiyu Yan from comment #5)
> (In reply to Andy Mender from comment #4)
> > - Requires: %{name}%{?_isa} = %{version}-%{release} in fcitx5-libs          
> > # not a big issue, but adding this will prevent accidental installs of
> > fcitx5-libs alone.
> Reasonable, fixed

Now the main package has:

Requires:       %{name}-libs%{?_isa} = %{version}-%{release}

and the libs subpackage has:

Requires:       %{name}%{?_isa} = %{version}-%{release}

which means that installing either package gives you both.  In that case, what is the point in even having a libs subpackage?  It looks to me as though the second of the two Requires (the one just added to the libs subpackage) is wrong.  Not having it means that other programs can link to the library and not drag in the binaries in the main package.  I think you should remove that Requires again.

Comment 8 Gwyn Ciesla 2020-08-20 15:33:13 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/fcitx5

Comment 9 Qiyu Yan 2020-08-22 07:46:14 UTC
Built in rawhide

Comment 10 Andy Mender 2020-08-22 17:23:01 UTC
I just realized that the fcitx5-data subpackage doesn't properly own it's data dir, because the trailing slash is missing:
%{_datadir}/%{name}

It should be:
%{_datadir}/%{name}/

Apologies for not noticing this earlier. Could you fix it inside the Pagure repo?

Comment 11 Jerry James 2020-08-22 17:29:19 UTC
Trailing slashes on directory names are optional.  Here is the list of files in the package built for koji:

https://koji.fedoraproject.org/koji/rpminfo?rpmID=22926268

You can see that it includes /usr/share/fcitx5.  I like the trailing slashes because they make it clear that the name indicates a directory, but rpm doesn't care if the trailing slash is there or not.

Comment 12 Andy Mender 2020-08-22 17:32:12 UTC
Yup, indeed it does! I always assumed that the slash is needed as I had major problems with the various %dir, etc. directory entries in the %files section. Good to know, thanks!


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