Bug 1988952 - Review Request: CSFML - C bindings for the C++ SFML library
Summary: Review Request: CSFML - C bindings for the C++ SFML 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: Petr Menšík
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1977987
TreeView+ depends on / blocked
 
Reported: 2021-08-02 07:27 UTC by Artur Frenszek-Iwicki
Modified: 2021-09-24 20:12 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-09-09 17:31:43 UTC
Type: ---
Embargoed:
pemensik: fedora-review+


Attachments (Terms of Use)

Description Artur Frenszek-Iwicki 2021-08-02 07:27:22 UTC
spec: https://svgames.pl/fedora/CSFML-2.5.1-1/CSFML.spec
srpm: https://svgames.pl/fedora/CSFML-2.5.1-1/CSFML-2.5.1-1.fc34.src.rpm
koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=73125874

Description: 
CSFML is the official C interface for the SFML library (written in C++),
allowing to develop applications using C instead of C++.

Fedora Account System Username:
suve

Comment 1 Petr Menšík 2021-08-06 02:57:03 UTC
Just few notes yet:

I think lowercase package name should be used. It is preferred and does not make sense to have upper case C binding, when nobody can mix it with common word.

I would recommend including first number of library so version in non-devel package instead of %{_libdir}/*.so.*. Helps on later rebases to protect against ABI breaking updates without dependencies rebuilt.

Otherwise looks ready for formal review. Later :)

Comment 2 Artur Frenszek-Iwicki 2021-08-06 07:09:47 UTC
> I think lowercase package name should be used.
The "normal" SFML package has an upper-case name, so that's why I went with that. SDL and SDL2 do this as well.
https://src.fedoraproject.org/rpms/SFML

> I would recommend including first number of library so version in non-devel package instead of %{_libdir}/*.so.*.
I'll take a look at how other packages handle this.

Comment 3 Petr Menšík 2021-08-11 11:22:54 UTC
(In reply to Artur Frenszek-Iwicki from comment #2)
> > I think lowercase package name should be used.
> The "normal" SFML package has an upper-case name, so that's why I went with
> that. SDL and SDL2 do this as well.
> https://src.fedoraproject.org/rpms/SFML

Okay, I take it back. Guidelines mention recommended case is lower [1], but if upstream wants it uppercase, it can be. Upstream seems to reference to it always uppercase [2]. DNF does not care anyway and would accept dnf install csfml. I were surprised dnf install sfml-devel passed when the package is SFML-devel. If SFML is also uppercase, it should be similar way. rpm requires correct case, dnf does not.

> 
> > I would recommend including first number of library so version in non-devel package instead of %{_libdir}/*.so.*.
> I'll take a look at how other packages handle this.

It helps watching for binary incompatible upgrades if so version in included in name. 
For libcsfml-audio.so.2.5 it might be %{_libdir}/libcsfml-*.so.2*
If it upgrades to %{_libdir}/libcsfml-*.so.3* later, it would require all depending packages to be rebuilt with new library. Explicit change in spec helps to remember when such action might be needed. When upgrade is not just internal improvements, but also incompatible public API changes.

1. https://docs.fedoraproject.org/en-US/packaging-guidelines/Naming/#_case_sensitivity
2. https://www.sfml-dev.org/download/csfml/

Comment 4 Petr Menšík 2021-08-11 11:51:20 UTC
Reference to guidelines regarding shared libraries:
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_listing_shared_library_files

Comment 5 Petr Menšík 2021-08-11 12:55:54 UTC
Package Review
==============

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


Issues:
=======
- 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.
  Note: License file license.txt is not marked as %license
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/LicensingGuidelines/#_license_text
- license file is not installed using %license, but marked as %doc.
  use just:
  %license license.txt
  %doc readme.txt
  # ^^ installs from sources directory to correct paths
  # rm license.txt in %{_datadir}/doc/ after install if needed
- /usr/include/SFML is shared with SFML-devel. It is unusual to share header directories
  if it does not depend on SFML-devel. I think it might be confusing.
  No pkg-config or cmake config file is provided to easy configuration.
  I guess okay if SFML-devel and CSFML-devel do not conflict and they are related.
  Depends on how is the usage of library documented.
- /usr/share/CSFML/doc is wrong, /usr/share/doc/CSFML should be used instead.
  SFML uses it the same wrong way, but should be corrected too. To be fixed in cmake/Config.cmake
  CMake module GNUInstallDirs should be considered on Linux:
  https://cmake.org/cmake/help/v3.0/module/GNUInstallDirs.html
- I would recommend adding html API docs to separate -doc subpackage with BuildArch: noarch.
  It is not so small and not always required for building.
  Recommends: %{name}-doc might be in devel package.
  Also, add the html directory also: %{_datadir}/%{name}/doc/html/* -> %{_datadir}/doc/%{name}/html


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

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[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.
[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: "Unknown or generated", "zlib/libpng license". 35 files have
     unknown license. Detailed output of licensecheck in
     /home/reviewer/fedora/rawhide/1988952-CSFML/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[!]: Package requires other packages for directories it uses.
     Note: No known owner of /usr/share/CSFML, /usr/share/CSFML/doc,
     /usr/share/CSFML/doc/html
[!]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/share/CSFML/doc/html,
     /usr/share/CSFML/doc, /usr/share/CSFML
[x]: Package does not own files or directories owned by other packages.
     Note: Dirs in package are owned also by: /usr/include/SFML(SFML-
     devel), /usr/include/SFML/Audio(SFML-devel),
     /usr/include/SFML/Graphics(SFML-devel),
     /usr/include/SFML/Network(SFML-devel), /usr/include/SFML/System(SFML-
     devel), /usr/include/SFML/Window(SFML-devel)
[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
[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.
[!]: 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.
[!]: Package complies to the Packaging Guidelines
     - /usr/share/CSFML/doc instead of /usr/share/doc/CSFML
[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: No rpmlint messages.
[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]: 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]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 0 bytes in 0 files.
[x]: Packages must not store files under /srv, /opt or /usr/local

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

Generic:
[-]: 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).
[?]: 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.
[x]: 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.
[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]: Fully versioned dependency in subpackages if applicable.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[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:
[!]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.
     Note: Arch-ed rpms have a total of 1945600 bytes in /usr/share
[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]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: CSFML-2.5.1-1.fc35.x86_64.rpm
          CSFML-devel-2.5.1-1.fc35.x86_64.rpm
          CSFML-debuginfo-2.5.1-1.fc35.x86_64.rpm
          CSFML-debugsource-2.5.1-1.fc35.x86_64.rpm
          CSFML-2.5.1-1.fc35.src.rpm
5 packages and 0 specfiles checked; 0 errors, 0 warnings.




Rpmlint (debuginfo)
-------------------
Checking: CSFML-debuginfo-2.5.1-1.fc35.x86_64.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.





Rpmlint (installed packages)
----------------------------
Cannot parse rpmlint output:


Source checksums
----------------
https://www.sfml-dev.org/files/CSFML-2.5.1-sources.zip :
  CHECKSUM(SHA256) this package     : 5453f04ae782a22697ebeb2694a0f7a56bf172c1406ca2b9134143198705ddc7
  CHECKSUM(SHA256) upstream package : 5453f04ae782a22697ebeb2694a0f7a56bf172c1406ca2b9134143198705ddc7


Requires
--------
CSFML (rpmlib, GLIBC filtered):
    libc.so.6()(64bit)
    libgcc_s.so.1()(64bit)
    libgcc_s.so.1(GCC_3.0)(64bit)
    libgcc_s.so.1(GCC_3.3.1)(64bit)
    libsfml-audio.so.2.5()(64bit)
    libsfml-graphics.so.2.5()(64bit)
    libsfml-network.so.2.5()(64bit)
    libsfml-system.so.2.5()(64bit)
    libsfml-window.so.2.5()(64bit)
    libstdc++.so.6()(64bit)
    libstdc++.so.6(CXXABI_1.3)(64bit)
    libstdc++.so.6(CXXABI_1.3.9)(64bit)
    rtld(GNU_HASH)

CSFML-devel (rpmlib, GLIBC filtered):
    CSFML(x86-64)
    libcsfml-audio.so.2.5()(64bit)
    libcsfml-graphics.so.2.5()(64bit)
    libcsfml-network.so.2.5()(64bit)
    libcsfml-system.so.2.5()(64bit)
    libcsfml-window.so.2.5()(64bit)

CSFML-debuginfo (rpmlib, GLIBC filtered):

CSFML-debugsource (rpmlib, GLIBC filtered):



Provides
--------
CSFML:
    CSFML
    CSFML(x86-64)
    libcsfml-audio.so.2.5()(64bit)
    libcsfml-graphics.so.2.5()(64bit)
    libcsfml-network.so.2.5()(64bit)
    libcsfml-system.so.2.5()(64bit)
    libcsfml-window.so.2.5()(64bit)

CSFML-devel:
    CSFML-devel
    CSFML-devel(x86-64)

CSFML-debuginfo:
    CSFML-debuginfo
    CSFML-debuginfo(x86-64)
    debuginfo(build-id)
    libcsfml-audio.so.2.5.1-2.5.1-1.fc35.x86_64.debug()(64bit)
    libcsfml-graphics.so.2.5.1-2.5.1-1.fc35.x86_64.debug()(64bit)
    libcsfml-network.so.2.5.1-2.5.1-1.fc35.x86_64.debug()(64bit)
    libcsfml-system.so.2.5.1-2.5.1-1.fc35.x86_64.debug()(64bit)
    libcsfml-window.so.2.5.1-2.5.1-1.fc35.x86_64.debug()(64bit)

CSFML-debugsource:
    CSFML-debugsource
    CSFML-debugsource(x86-64)



Generated by fedora-review 0.7.6 (b083f91) last change: 2020-11-10
Command line :/usr/bin/fedora-review -b 1988952
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, C/C++, Shell-api
Disabled plugins: SugarActivity, Python, R, Ocaml, Haskell, Perl, Java, fonts, PHP
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 6 Artur Frenszek-Iwicki 2021-08-11 13:02:48 UTC
This spec is based on the current SFML spec, so yes, some of the issues can be traced back there.

I'll get to fixing it later today or maybe tomorrow.

Comment 7 Artur Frenszek-Iwicki 2021-08-30 11:20:27 UTC
spec: https://svgames.pl/fedora/CSFML-2.5.1-2/CSFML.spec
srpm: https://svgames.pl/fedora/CSFML-2.5.1-2/CSFML-2.5.1-2.fc34.src.rpm
koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=74626495

Sorry for taking so long. Regarding the CSFML-SFML dependency, I tried compiling a program using CSFML, and here's how it looks:
- CSFML-devel does not require SFML-devel - i.e. headers are independent
- CSFML requires SFML - i.e. one library pulls in the other library

Comment 8 Petr Menšík 2021-08-30 13:08:30 UTC
Did you know %doc would copy files from source directory? Installing them to correct locations is not necessary.

%doc readme.txt

If would include after %cmake_install:

rm -f %{buildroot}%{_datadir}/%{name}/license.txt

Then remove from %files:
%doc %{_datadir}/%{name}/license.txt

It is handled by %license license.txt already, but put into different directory. One license copy in a package is enough.

But that is just cosmetic issue. It seems fine and ready for the distribution, thank you!

Continue by fedpkg request-repo

Comment 9 Kevin Fenzi 2021-08-31 21:12:13 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/CSFML

Comment 10 Fedora Update System 2021-09-01 08:22:06 UTC
FEDORA-2021-75223b7b4d has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-75223b7b4d

Comment 11 Fedora Update System 2021-09-01 08:53:43 UTC
FEDORA-2021-7cc9dfc7be has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-7cc9dfc7be

Comment 12 Fedora Update System 2021-09-01 09:06:51 UTC
FEDORA-2021-b4ec32da20 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-b4ec32da20

Comment 13 Fedora Update System 2021-09-01 19:26:31 UTC
FEDORA-2021-75223b7b4d has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2021-75223b7b4d \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-75223b7b4d

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 14 Fedora Update System 2021-09-01 20:20:06 UTC
FEDORA-2021-7cc9dfc7be has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2021-7cc9dfc7be \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-7cc9dfc7be

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 15 Fedora Update System 2021-09-01 20:21:24 UTC
FEDORA-2021-b4ec32da20 has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2021-b4ec32da20 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-b4ec32da20

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 16 Fedora Update System 2021-09-09 17:31:43 UTC
FEDORA-2021-7cc9dfc7be has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 17 Fedora Update System 2021-09-09 17:45:26 UTC
FEDORA-2021-b4ec32da20 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 18 Fedora Update System 2021-09-24 20:12:53 UTC
FEDORA-2021-75223b7b4d has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.


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