Bug 5819

Summary: Review request: tg_owt - WebRTC library for the Telegram messenger
Product: Package Reviews Reporter: Vitaly <vitaly>
Component: Review RequestAssignee: Vasiliy Glazov <vascom2>
Status: RESOLVED FIXED    
Severity: enhancement CC: leigh123linux, rpmfusion-package-review, vascom2
Priority: P1 Flags: vascom2: fedora-review+
Version: Current   
Hardware: x86_64   
OS: GNU/Linux   
namespace: free

Description Vitaly 2020-10-31 11:31:34 CET
Spec URL: https://github.com/EasyCoding/tgbuild/raw/master/tg_owt.spec
SRPM URL: https://www.easycoding.org/files/other/tg_owt-0-1.20201030git1d4f7d7.fc32.src.rpm
Description: Special fork of the OpenWebRTC library for the Telegram messenger
RPM Fusion Account System Username: xvitaly

This package was extracted from the telegram-desktop. Now it can be built once and used as a static library.
Comment 1 Vasiliy Glazov 2020-10-31 19:59:10 CET
Approved.

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

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



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

C/C++:
[x]: Package does not contain kernel modules.
[-]: 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]: 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.
[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", "BSD 3-clause "New" or "Revised"
     License", "[generated file]", "Apache License 2.0", "*No copyright*
     Apache License 2.0", "*No copyright* [generated file]", "*No
     copyright* GNU General Public License", "BSD 2-clause "Simplified"
     License", "*No copyright* Artistic License", "Expat License", "*No
     copyright* Public domain", "*No copyright* Mozilla Public License
     2.0", "ISC License". 7676 files have unknown license. Detailed output
     of licensecheck in /home/vascom/review-tg_owt/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[x]: If the package is under multiple licenses, the licensing breakdown
     must be documented in the spec.
[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.
[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.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10240 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]: 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 must own all directories that it creates.
[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]: 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]: Static libraries in -static or -devel subpackage, providing -devel if
     present.
     Note: Package has .a files: tg_owt-static.
[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]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in tg_owt-
     devel , tg_owt-static
[x]: 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.
[x]: 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]: 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:
[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: tg_owt-devel-0-1.20201030git1d4f7d7.fc34.x86_64.rpm
          tg_owt-static-0-1.20201030git1d4f7d7.fc34.x86_64.rpm
          tg_owt-0-1.20201030git1d4f7d7.fc34.src.rpm
tg_owt-devel.x86_64: W: spelling-error Summary(en_US) tg -> gt, t, g
tg_owt-devel.x86_64: W: spelling-error Summary(en_US) owt -> wot, two, ow
tg_owt-devel.x86_64: W: spelling-error %description -l en_US tg -> gt, t, g
tg_owt-devel.x86_64: W: spelling-error %description -l en_US owt -> wot, two, ow
tg_owt-devel.x86_64: W: only-non-binary-in-usr-lib
tg_owt-devel.x86_64: W: no-documentation
tg_owt-static.x86_64: W: spelling-error Summary(en_US) tg -> gt, t, g
tg_owt-static.x86_64: W: spelling-error Summary(en_US) owt -> wot, two, ow
tg_owt-static.x86_64: W: spelling-error %description -l en_US tg -> gt, t, g
tg_owt-static.x86_64: W: spelling-error %description -l en_US owt -> wot, two, ow
3 packages and 0 specfiles checked; 0 errors, 10 warnings.




Rpmlint (installed packages)
----------------------------
tg_owt-devel.x86_64: W: spelling-error Summary(en_US) tg -> gt, t, g
tg_owt-devel.x86_64: W: spelling-error Summary(en_US) owt -> wot, two, ow
tg_owt-devel.x86_64: W: spelling-error %description -l en_US tg -> gt, t, g
tg_owt-devel.x86_64: W: spelling-error %description -l en_US owt -> wot, two, ow
tg_owt-devel.x86_64: W: invalid-url URL: https://github.com/desktop-app/tg_owt <urlopen error [Errno -3] Temporary failure in name resolution>
tg_owt-devel.x86_64: W: only-non-binary-in-usr-lib
tg_owt-devel.x86_64: W: no-documentation
tg_owt-static.x86_64: W: spelling-error Summary(en_US) tg -> gt, t, g
tg_owt-static.x86_64: W: spelling-error Summary(en_US) owt -> wot, two, ow
tg_owt-static.x86_64: W: spelling-error %description -l en_US tg -> gt, t, g
tg_owt-static.x86_64: W: spelling-error %description -l en_US owt -> wot, two, ow
tg_owt-static.x86_64: W: invalid-url URL: https://github.com/desktop-app/tg_owt <urlopen error [Errno -3] Temporary failure in name resolution>
2 packages and 0 specfiles checked; 0 errors, 12 warnings.



Source checksums
----------------
https://github.com/desktop-app/tg_owt/archive/1d4f7d74ff1a627db6e45682efd0e3b85738e426/tg_owt-1d4f7d7.tar.gz :
  CHECKSUM(SHA256) this package     : 9dfff38be02e0ce3bafa18faed859f9296fc84ac55d87e6683ffff5069ff2ef1
  CHECKSUM(SHA256) upstream package : 9dfff38be02e0ce3bafa18faed859f9296fc84ac55d87e6683ffff5069ff2ef1


Requires
--------
tg_owt-devel (rpmlib, GLIBC filtered):
    cmake-filesystem(x86-64)

tg_owt-static (rpmlib, GLIBC filtered):
    tg_owt-devel(x86-64)



Provides
--------
tg_owt-devel:
    cmake(tg_owt)
    tg_owt-devel
    tg_owt-devel(x86-64)

tg_owt-static:
    bundled(abseil-cpp)
    bundled(libsrtp)
    bundled(libvpx)
    bundled(libwebm)
    bundled(libyuv)
    bundled(openh264)
    bundled(pffft)
    bundled(rnnoise)
    bundled(usrsctp)
    tg_owt-static
    tg_owt-static(x86-64)



Generated by fedora-review 0.7.5 (5fa5b7e) last change: 2020-02-16
Command line :/usr/bin/fedora-review -n tg_owt -m fedora-rawhide-x86_64-rpmfusion_free
Buildroot used: fedora-rawhide-x86_64
Active plugins: Shell-api, C/C++, Generic
Disabled plugins: Python, SugarActivity, R, PHP, Ocaml, Java, Perl, Haskell, fonts
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH
Comment 2 leigh scott 2020-10-31 21:14:58 CET
Can you fix the missing versions, 0~git isn't acceptable. 


Provides: bundled(openh264) = 0~git
Provides: bundled(abseil-cpp) = 0~git
Provides: bundled(libsrtp) = 0~git
Provides: bundled(libvpx) = 0~git
Provides: bundled(libyuv) = 0~git
Provides: bundled(pffft) = 0~git
Provides: bundled(rnnoise) = 0~git
Provides: bundled(usrsctp) = 0~git
Provides: bundled(libwebm) = 0~git

Each bundled source has the exact revision/version in README.chromium, Please use them.

You have also missed some bundled libs

./src/base/third_party/libevent
./src/common_audio/third_party/fft4g:
./src/common_audio/third_party/spl_sqrt_floor:
./src/modules/third_party/fft:
./src/modules/third_party/g711:
./src/modules/third_party/g722:
./src/modules/third_party/portaudio:
./src/rtc_base/third_party/base64:
./src/rtc_base/third_party/sigslot:
Comment 3 Nicolas Chauvet 2020-10-31 21:28:37 CET
Please also sort BR by alphabetic order rather by inverted length !?!


I'm very suspicious about building a static library that also has shared dependencies... I hope you have a local telegram build that works already.

Last point is that you have built without debuginfo, is there a reason ?
Using -DCMAKE_BUILD_TYPE=RelWithDebug instead -DCMAKE_BUILD_TYPE=Release should produce debug symbols.
Comment 4 leigh scott 2020-10-31 21:33:12 CET
(In reply to Nicolas Chauvet from comment #3)
> Please also sort BR by alphabetic order rather by inverted length !?!
> 
> 
> I'm very suspicious about building a static library that also has shared
> dependencies... I hope you have a local telegram build that works already.

It would be simple to build as a .so

%autosetup -n %{name}-%{commit0} -p1
sed -i -e 's@STATIC@SHARED@g' CMakeLists.txt


> 
> Last point is that you have built without debuginfo, is there a reason ?
> Using -DCMAKE_BUILD_TYPE=RelWithDebug instead -DCMAKE_BUILD_TYPE=Release
> should produce debug symbols.
Comment 5 Vitaly 2020-11-01 10:46:42 CET
> Can you fix the missing versions, 0~git isn't acceptable. 

Will do.

> You have also missed some bundled libs

Good catch. Thanks.

> I'm very suspicious about building a static library that also has shared dependencies... I hope you have a local telegram build that works already.

Telegram Desktop package already uses it. It build it first.

> Last point is that you have built without debuginfo, is there a reason ?

Fedora build Flags already has -g flag. Using RelWithDebug will duplicate it: -g -g. I will use `-g1` or even `-g2` on low memory architectures.

Telegram's build scripts checks for Release and if not found it uses Debug, which is not acceptable.

> It would be simple to build as a .so

Arch Linux has already tried to build as a shared library, but has received crash reports related to this library.

I will do more tests and do a little investigation. If it does not crash, I will make it shared.
Comment 6 Nicolas Chauvet 2020-11-01 11:02:53 CET
> Fedora build Flags already has -g flag. Using RelWithDebug will duplicate it: -g -g. I will use `-g1` or even `-g2` on low memory architectures.
> Telegram's build scripts checks for Release and if not found it uses Debug, which is not acceptable.

Thanks for the infos.
Please state that, as a comment on the spec file, to avoid any unattended fixup.
Comment 7 Vitaly 2020-11-01 14:30:39 CET
Spec URL: https://github.com/EasyCoding/tgbuild/raw/master/tg_owt.spec
SRPM URL: https://www.easycoding.org/files/other/tg_owt-0-1.20201030git1d4f7d7.fc32.src.rpm

Changes:

* Build as a shared library.
* Added missing bundled libraries.
* Added all licenses and README files of all bundled libraries.
* Sorted all BRs.
* Added requirements to the -devel subpackage.
* Added commentary to %cmake.