https://bugzilla.redhat.com/show_bug.cgi?id=1699846 --- Comment #2 from Martin Osvald 🛹 <mosvald@xxxxxxxxxx> --- The below is output from 'fedora-review' utility and where needed I added extra comments starting with '- XXX NOTE:': Package Review ============== Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated [ ] = Manual review needed Issues: ======= - ldconfig not called in %post and %postun for Fedora 28 and later. Note: /sbin/ldconfig called in libyang-cpp See: https://fedoraproject.org/wiki/Changes/Removing_ldconfig_scriptlets ===== MUST items ===== C/C++: [x]: Package does not contain kernel modules. [x]: Package contains no static executables. [x]: 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]: 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", "Expat License", "BSD 2-clause "Simplified" License", "*No copyright* BSD 3-clause "New" or "Revised" License", "GPL (v3 or later)", "BSD (unspecified)". 1360 files have unknown license. Detailed output of licensecheck in /home/mosvald/Work/redhat/src/pkg- review/libyang/review-libyang/licensecheck.txt [x]: License file installed when any subpackage combination is installed. [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. [!]: Spec file is legible and written in American English. - libyang.x86_64: W: spelling-error %description -l en_US modelling -> modeling, model ling, model-ling [-]: 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. [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]: 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 Python: [-]: Python eggs must not download any dependencies during the build process. [-]: A package which is used by another package via an egg interface should provide egg info. [!]: Package meets the Packaging Guidelines::Python - XXX NOTE: Not a python expert, but shouldn't spec file contain python_provide macro if it provides python module? https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_the_python_provide_macro e.g something like the below? ~~~ %global srcname libyang %package -n python3-%{srcname} Summary: Python3 bindings for libyang Requires: libyang-cpp%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release} %{?python_provide:%python_provide python3-%{srcname}} ~~~ [x]: Package contains BR: python2-devel or python3-devel [x]: Packages MUST NOT have dependencies (either build-time or runtime) on packages named with the unversioned python- prefix unless no properly versioned package exists. Dependencies on Python packages instead MUST use names beginning with python2- or python3- as appropriate. [x]: Python packages must not contain %{pythonX_site(lib|arch)}/* in %files [-]: Binary eggs must be removed in %prep ===== SHOULD items ===== Generic: [!]: Uses parallel make %{?_smp_mflags} macro. [-]: 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 libyang , libyang-cpp-devel - XXX NOTE: there is no need for libyang-cpp-devel to be dependent on libyang, because libyang-cpp-devel is dependent on libyang-cpp which is dependent on libyang. [x]: Package functions as described. [x]: Latest version is packaged. [x]: Package does not include license text files separate from upstream. [x]: Scriptlets must be sane, if 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. [x]: %check is present and all tests pass. [?]: 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]: 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: [!]: Large data in /usr/share should live in a noarch subpackage if package is arched. Note: Arch-ed rpms have a total of 11233280 bytes in /usr/share libyang-devel-doc-0.16.105-1.fc31.x86_64.rpm:11212800 See: https://fedoraproject.org/wiki/Packaging:ReviewGuidelines#Package_Review_Guidelines [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: libyang-0.16.105-1.fc31.x86_64.rpm libyang-devel-0.16.105-1.fc31.x86_64.rpm libyang-devel-doc-0.16.105-1.fc31.x86_64.rpm libyang-cpp-0.16.105-1.fc31.x86_64.rpm libyang-cpp-devel-0.16.105-1.fc31.x86_64.rpm python3-libyang-0.16.105-1.fc31.x86_64.rpm libyang-debuginfo-0.16.105-1.fc31.x86_64.rpm libyang-debugsource-0.16.105-1.fc31.x86_64.rpm libyang-0.16.105-1.fc31.src.rpm libyang.x86_64: W: spelling-error %description -l en_US modelling -> modeling, model ling, model-ling libyang.x86_64: W: shared-lib-calls-exit /usr/lib64/libyang.so.0.16.105 exit@GLIBC_2.2.5 libyang.x86_64: E: library-not-linked-against-libc /usr/lib64/libyang/extensions/metadata.so libyang.x86_64: E: library-not-linked-against-libc /usr/lib64/libyang/extensions/yangdata.so libyang-devel.x86_64: W: no-documentation libyang-cpp.x86_64: W: no-documentation libyang-cpp-devel.x86_64: W: no-documentation python3-libyang.x86_64: W: no-documentation libyang.src: W: spelling-error %description -l en_US modelling -> modeling, model ling, model-ling 9 packages and 0 specfiles checked; 2 errors, 7 warnings. Rpmlint (debuginfo) ------------------- Checking: libyang-cpp-debuginfo-0.16.105-1.fc31.x86_64.rpm libyang-debuginfo-0.16.105-1.fc31.x86_64.rpm 2 packages and 0 specfiles checked; 0 errors, 0 warnings. Rpmlint (installed packages) ---------------------------- perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_CTYPE = "C.UTF-8", LANG = "en_US.utf8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_CTYPE = "C.UTF-8", LANG = "en_US.utf8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_CTYPE = "C.UTF-8", LANG = "en_US.utf8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). sh: /usr/bin/python: No such file or directory /usr/share/rpmlint/Pkg.py:168: UnicodeWarning: decode() called on unicode string, see https://bugzilla.redhat.com/show_bug.cgi?id=1693751 s.decode('UTF-8') libyang-devel-doc.x86_64: W: invalid-url URL: https://github.com/CESNET/libyang <urlopen error [Errno -2] Name or service not known> /usr/share/rpmlint/Pkg.py:168: UnicodeWarning: decode() called on unicode string, see https://bugzilla.redhat.com/show_bug.cgi?id=1693751 s.decode('UTF-8') libyang-cpp-devel.x86_64: W: invalid-url URL: https://github.com/CESNET/libyang <urlopen error [Errno -2] Name or service not known> libyang-cpp-devel.x86_64: W: no-documentation python3-libyang.x86_64: W: invalid-url URL: https://github.com/CESNET/libyang <urlopen error [Errno -2] Name or service not known> /usr/share/rpmlint/Pkg.py:168: UnicodeWarning: decode() called on unicode string, see https://bugzilla.redhat.com/show_bug.cgi?id=1693751 s.decode('UTF-8') python3-libyang.x86_64: W: no-documentation libyang-debugsource.x86_64: W: invalid-url URL: https://github.com/CESNET/libyang <urlopen error [Errno -2] Name or service not known> libyang.x86_64: W: spelling-error %description -l en_US modelling -> modeling, model ling, model-ling libyang.x86_64: W: invalid-url URL: https://github.com/CESNET/libyang <urlopen error [Errno -2] Name or service not known> libyang.x86_64: W: shared-lib-calls-exit /usr/lib64/libyang.so.0.16.105 exit@GLIBC_2.2.5 libyang.x86_64: E: library-not-linked-against-libc /usr/lib64/libyang/extensions/metadata.so libyang.x86_64: E: library-not-linked-against-libc /usr/lib64/libyang/extensions/yangdata.so /usr/share/rpmlint/Pkg.py:168: UnicodeWarning: decode() called on unicode string, see https://bugzilla.redhat.com/show_bug.cgi?id=1693751 s.decode('UTF-8') /usr/share/rpmlint/Pkg.py:168: UnicodeWarning: decode() called on unicode string, see https://bugzilla.redhat.com/show_bug.cgi?id=1693751 s.decode('UTF-8') libyang-cpp.x86_64: W: invalid-url URL: https://github.com/CESNET/libyang <urlopen error [Errno -2] Name or service not known> /usr/share/rpmlint/Pkg.py:168: UnicodeWarning: decode() called on unicode string, see https://bugzilla.redhat.com/show_bug.cgi?id=1693751 s.decode('UTF-8') libyang-cpp.x86_64: W: no-documentation libyang-cpp-debuginfo.x86_64: W: invalid-url URL: https://github.com/CESNET/libyang <urlopen error [Errno -2] Name or service not known> /usr/share/rpmlint/Pkg.py:168: UnicodeWarning: decode() called on unicode string, see https://bugzilla.redhat.com/show_bug.cgi?id=1693751 s.decode('UTF-8') libyang-devel.x86_64: W: invalid-url URL: https://github.com/CESNET/libyang <urlopen error [Errno -2] Name or service not known> libyang-devel.x86_64: W: no-documentation libyang-debuginfo.x86_64: W: invalid-url URL: https://github.com/CESNET/libyang <urlopen error [Errno -2] Name or service not known> /usr/share/rpmlint/Pkg.py:168: UnicodeWarning: decode() called on unicode string, see https://bugzilla.redhat.com/show_bug.cgi?id=1693751 s.decode('UTF-8') 9 packages and 0 specfiles checked; 2 errors, 15 warnings. Unversioned so-files -------------------- libyang: /usr/lib64/libyang/extensions/metadata.so libyang: /usr/lib64/libyang/extensions/nacm.so libyang: /usr/lib64/libyang/extensions/yangdata.so libyang: /usr/lib64/libyang/user_types/user_date_and_time.so python3-libyang: /usr/lib64/python3.7/site-packages/_yang.so Source checksums ---------------- https://github.com/CESNET/libyang/archive/debian/libyang-0.16.105-1.tar.gz : CHECKSUM(SHA256) this package : b6c476f532fabaac8d7b12b35d125c71c0262f27a4a996b3a3ca4218e3776606 CHECKSUM(SHA256) upstream package : b6c476f532fabaac8d7b12b35d125c71c0262f27a4a996b3a3ca4218e3776606 Requires -------- libyang (rpmlib, GLIBC filtered): ld-linux-x86-64.so.2()(64bit) libc.so.6()(64bit) libdl.so.2()(64bit) libpcre.so.1()(64bit) libpthread.so.0()(64bit) libyang.so.0.16()(64bit) pcre rtld(GNU_HASH) libyang-devel (rpmlib, GLIBC filtered): /usr/bin/pkg-config libyang(x86-64) libyang.so.0.16()(64bit) pcre-devel pkgconfig(libpcre) libyang-devel-doc (rpmlib, GLIBC filtered): libyang(x86-64) libyang-cpp (rpmlib, GLIBC filtered): /sbin/ldconfig libc.so.6()(64bit) libgcc_s.so.1()(64bit) libgcc_s.so.1(GCC_3.0)(64bit) libstdc++.so.6()(64bit) libstdc++.so.6(CXXABI_1.3)(64bit) libyang(x86-64) libyang.so.0.16()(64bit) rtld(GNU_HASH) libyang-cpp-devel (rpmlib, GLIBC filtered): /usr/bin/pkg-config libyang-cpp(x86-64) libyang-cpp.so.0.16()(64bit) pcre-devel pkgconfig(libyang) python3-libyang (rpmlib, GLIBC filtered): libc.so.6()(64bit) libgcc_s.so.1()(64bit) libgcc_s.so.1(GCC_3.0)(64bit) libpython3.7m.so.1.0()(64bit) libstdc++.so.6()(64bit) libstdc++.so.6(CXXABI_1.3)(64bit) libyang(x86-64) libyang-cpp(x86-64) libyang-cpp.so.0.16()(64bit) libyang.so.0.16()(64bit) python(abi) rtld(GNU_HASH) libyang-debuginfo (rpmlib, GLIBC filtered): libyang-debugsource (rpmlib, GLIBC filtered): Provides -------- libyang: libyang libyang(x86-64) libyang.so.0.16()(64bit) libyang-devel: libyang-devel libyang-devel(x86-64) pkgconfig(libyang) libyang-devel-doc: libyang-devel-doc libyang-devel-doc(x86-64) libyang-cpp: libyang-cpp libyang-cpp(x86-64) libyang-cpp.so.0.16()(64bit) libyang-cpp-devel: libyang-cpp-devel libyang-cpp-devel(x86-64) pkgconfig(libyang-cpp) python3-libyang: python3-libyang python3-libyang(x86-64) libyang-debuginfo: debuginfo(build-id) libyang-debuginfo libyang-debuginfo(x86-64) libyang-debugsource: libyang-debugsource libyang-debugsource(x86-64) Generated by fedora-review 0.7.2 (65d36bb) last change: 2019-04-09 Command line :/usr/bin/fedora-review -n libyang Buildroot used: fedora-rawhide-x86_64 Active plugins: C/C++, Shell-api, Python, Generic Disabled plugins: SugarActivity, Perl, R, Haskell, fonts, Java, PHP, Ocaml Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH - XXX NOTE: Further info regarding rpmlint output: 1. /lib64/libm.so.6 being linked without any function being called from it: This can be considered as false positive. The libyang code actually calls math.h functions (or using defines and macros from there): ~~~ $ grep -R math.h libyang-debian-libyang-0.16.105-1 libyang-debian-libyang-0.16.105-1/src/xpath.c:#include <math.h> $ $ egrep "isinf|signbit|NAN|isfinite|isnan" libyang-debian-libyang-0.16.105-1/src/xpath.c /* needed by libmath functions isfinite(), isinf(), isnan(), signbit(), ... */ if (isnan(set->val.num)) { } else if (isinf(set->val.num) && !signbit(set->val.num)) { } else if (isinf(set->val.num) && signbit(set->val.num)) { num = NAN; set_fill_number(set, NAN); if (isfinite(args[0]->val.num)) { if (isfinite(args[1]->val.num)) { } else if (isinf(args[1]->val.num) && signbit(args[1]->val.num)) { if (isfinite(args[2]->val.num)) { } else if (isnan(args[2]->val.num) || signbit(args[2]->val.num)) { if (isnan(set->value.num)) { } else if (isinf(set->value.num) && !signbit(set->value.num)) { } else if (isinf(set->value.num) && signbit(set->value.num)) { if (isnan(set->val.num)) { } else if (isinf(set->val.num) && !signbit(set->val.num)) { } else if (isinf(set->val.num) && signbit(set->val.num)) { if ((set->val.num == 0) || (set->val.num == -0.0f) || isnan(set->val.num)) { $ ~~~ but due to compiler optimizations, libm functions don't get called directly, but are inlined instead (built-in versions getting used). The below shows no isnan() call (the same happens for all the others): ~~~ $ gdb /usr/lib64/libyang.so.0.16.105 -ex 'disassemble /m lyxp_set_cast' -ex q 2>&1 | grep isnan -A10 8545 if (isnan(set->val.num)) { 0x000000000008f1a8 <+440>: fldt 0x10(%rbx) 0x000000000008f1ab <+443>: fucomi %st(0),%st 0x000000000008f1ad <+445>: jp 0x8f430 <lyxp_set_cast+1088> 8546 set->val.str = strdup("NaN"); 0x000000000008f432 <+1090>: lea 0x3f194(%rip),%rdi # 0xce5cd 0x000000000008f439 <+1097>: callq 0x9510 <strdup@plt> 0x000000000008f43e <+1102>: mov %rax,0x10(%rbx) 8547 LY_CHECK_ERR_RETURN(!set->val.str, LOGMEM(local_mod->ctx), -1); -- 8629 if ((set->val.num == 0) || (set->val.num == -0.0f) || isnan(set->val.num)) { 0x000000000008f074 <+132>: fldt 0x10(%rbx) 0x000000000008f077 <+135>: mov $0x0,%edx 0x000000000008f07c <+140>: fldz 0x000000000008f07e <+142>: fucomip %st(1),%st 0x000000000008f080 <+144>: setnp %al 0x000000000008f083 <+147>: cmovne %edx,%eax 0x000000000008f086 <+150>: test %al,%al 0x000000000008f088 <+152>: jne 0x8f094 <lyxp_set_cast+164> 0x000000000008f08a <+154>: fucomip %st(0),%st 0x000000000008f08c <+156>: jnp 0x8f2d5 <lyxp_set_cast+741> $ ~~~ Also the below shows the linking is intended: ~~~ $ grep target_link_libraries libyang-debian-libyang-0.16.105-1/CMakeLists.txt -B1 | grep " m" # link math target_link_libraries(yang m) $ ~~~ Otherwise the libm export some of these: ~~~ $ readelf --dyn-sym /usr/lib64/libm-2.28.so | egrep "isinf|signbit|NAN|isfinite|isnan" 69: 0000000000062940 61 FUNC GLOBAL DEFAULT 15 __isnanf128@@GLIBC_2.26 275: 0000000000048ee0 12 FUNC GLOBAL DEFAULT 15 __signbitf@@GLIBC_2.2.5 286: 000000000001bc70 20 FUNC GLOBAL DEFAULT 15 __signbitl@@GLIBC_2.2.5 436: 000000000003b3d0 14 FUNC GLOBAL DEFAULT 15 __signbit@@GLIBC_2.2.5 740: 00000000000628f0 65 FUNC GLOBAL DEFAULT 15 __isinff128@@GLIBC_2.26 1065: 0000000000062e00 11 FUNC GLOBAL DEFAULT 15 __signbitf128@@GLIBC_2.26 $ ~~~ 2. exit() called by /usr/lib64/libyang.so.0.16.105 Looks ok-ish/false positive as the exit() gets called by config parser generated by flex by yy_fatal_error() function which doesn't get called. All appearances of exit in the produced code: ~~~ $ objdump -d /usr/lib64/libyang.so.0.16.105 | grep exit | grep call 612eb: e8 a0 81 fa ff callq 9490 <exit@plt> $ ~~~ The only exit() call is made by yy_fatal_error(): ~~~ $ gdb /usr/lib64/libyang.so.0.16.105 -ex 'disassemble /m 0x612eb' -ex q ... Dump of assembler code for function yy_fatal_error: 3507 static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) 0x00000000000612c0 <+0>: push %rax 0x00000000000612c1 <+1>: pop %rax 3508 { 3509 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3510 (void)yyg; 3511 fprintf( stderr, "%s\n", msg ); 3512 exit( YY_EXIT_FAILURE ); 0x00000000000612e6 <+38>: mov $0x2,%edi 0x00000000000612eb <+43>: callq 0x9490 <exit@plt> End of assembler dump. $ ~~~ but yy_fatal_error() doesn't get called: ~~~ $ objdump -d /usr/lib64/libyang.so.0.16.105 | grep yy_fatal_error $ ~~~ 3. library-not-linked-against-libc /usr/lib64/libyang/extensions/*.so ~~~ libyang.x86_64: E: library-not-linked-against-libc /usr/lib64/libyang/extensions/metadata.so libyang.x86_64: E: library-not-linked-against-libc /usr/lib64/libyang/extensions/yangdata.so ~~~ This looks to be false positive because: ~~~ # ldd /usr/lib64/libyang/extensions/metadata.so | grep libc libc.so.6 => /lib64/libc.so.6 (0x00007fa9d5ce5000) # ldd /usr/lib64/libyang/extensions/yangdata.so | grep libc libc.so.6 => /lib64/libc.so.6 (0x00007fefbc763000) # ~~~ -- You are receiving this mail because: You are on the CC list for the bug. You are always notified about changes to this product and component _______________________________________________ package-review mailing list -- package-review@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to package-review-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/package-review@xxxxxxxxxxxxxxxxxxxxxxx