https://bugzilla.redhat.com/show_bug.cgi?id=2000219
Bug ID: 2000219 Summary: Review Request: llvm-libunwind - LLVM libunwind implementation Product: Fedora Version: rawhide Hardware: All OS: Linux Status: NEW Component: Package Review Severity: medium Priority: medium Assignee: nobody@fedoraproject.org Reporter: sguelton@redhat.com QA Contact: extras-qa@fedoraproject.org CC: package-review@lists.fedoraproject.org Target Milestone: --- Classification: Fedora
Spec URL: https://sergesanspaille.fedorapeople.org/llvm-libunwind.spec SRPM URL: https://sergesanspaille.fedorapeople.org/llvm-libunwind-12.0.0-1.src.rpm Description:
LLVM libunwind is an implementation of the interface defined by the HP libunwind project. It was contributed Apple as a way to enable clang++ to port to platforms that do not have a system unwinder. It is intended to be a small and fast implementation of the ABI, leaving off some features of HP's libunwind that never materialized (e.g. remote unwinding).
Fedora Account System Username: sergesanspaille
https://bugzilla.redhat.com/show_bug.cgi?id=2000219
Dan Čermák dan.cermak@cgc-instruments.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dan.cermak@cgc-instruments. | |com
--- Comment #1 from Dan Čermák dan.cermak@cgc-instruments.com --- The build fails in Rawhide:
CMake Error at CMakeLists.txt:202 (include): include could not find requested file: HandleOutOfTreeLLVM
[...]
CMake Error at test/CMakeLists.txt:1 (include): include could not find requested file: AddLLVM CMake Error at test/CMakeLists.txt:27 (configure_lit_site_cfg): Unknown CMake command "configure_lit_site_cfg". -- Configuring incomplete, errors occurred! See also "/builddir/build/BUILD/libunwind-12.0.0.src/redhat-linux-build/CMakeFiles/CMakeOutput.log". See also "/builddir/build/BUILD/libunwind-12.0.0.src/redhat-linux-build/CMakeFiles/CMakeError.log". RPM build errors: error: Bad exit status from /var/tmp/rpm-tmp.U6yxSg (%build) Bad exit status from /var/tmp/rpm-tmp.U6yxSg (%build) Child return code was: 1
https://bugzilla.redhat.com/show_bug.cgi?id=2000219
--- Comment #2 from serge_sans_paille sguelton@redhat.com --- My bad , I referenced the bad src.rpm.
Spec URL: https://sergesanspaille.fedorapeople.org/llvm-libunwind.spec SRPM URL: https://sergesanspaille.fedorapeople.org/llvm-libunwind-12.0.1-1.src.rpm Description:
LLVM libunwind is an implementation of the interface defined by the HP libunwind project. It was contributed Apple as a way to enable clang++ to port to platforms that do not have a system unwinder. It is intended to be a small and fast implementation of the ABI, leaving off some features of HP's libunwind that never materialized (e.g. remote unwinding).
Fedora Account System Username: sergesanspaille
Associated scratch-build: https://koji.fedoraproject.org/koji/taskinfo?taskID=75057892
https://bugzilla.redhat.com/show_bug.cgi?id=2000219
--- Comment #3 from Dan Čermák dan.cermak@cgc-instruments.com --- Here's a few notes/suggestions for the current state: - the license is wrong, the project ships the Apache2 License with the LLVM exception, but the spec mentions the MIT or NCSA - the package must own %_libdir/llvm-unwind - the package ships no headers, which is rather odd for a shared library - the shared library should go into a -devel subpackage - no tests are run - why do you install the shared library into a subfolder of %_libdir instead of %_libdir? - upstream has a documentation that is not being build, why is that?
https://bugzilla.redhat.com/show_bug.cgi?id=2000219
--- Comment #4 from serge_sans_paille sguelton@redhat.com --- Concerning the license, as all LLVM-related project we already ship, the LICENSE.txt actually contains two references:
1. the new license: Apache License v2.0 with LLVM Exceptions 2. the Legacy LLVM license : The libunwind library is dual licensed under both the University of Illinois "BSD-Like" license and the MIT license.
I've updated the license text to reflect all three licenses.
llvm-libunwind is a (partial) implementation of the unwind runtime library. It's generally the compiler (say gcc, or clang) that inserts call to it during the compilation process. That's why it doesn't ship headers.
The tests are not shipped / run because they imply a build time dependency on the source code of libcxx and we don't package the source. I plan to rely on fedora gating to balance that issue. I've amended the specfile to reflect that
libunwind is shipped into a subfolder of %_libdir instead of %_libdir to prevent it from conflicting with the default libunwind from https://src.fedoraproject.org/rpms/libunwind
I've added the required steps for building and installing doc.
devel packaged added.
The specfile and srpm url above now point to the updated specfile and source rpm
https://bugzilla.redhat.com/show_bug.cgi?id=2000219
--- Comment #5 from Dan Čermák dan.cermak@cgc-instruments.com --- Thanks for the improvements! A few additional suggestions:
- You should own the directory %_libdir/llvm-unwind - The devel package *must* require the main package as follows: Requires: %{name}%{?_isa} = %{version}-%{release} (then you can also drop the %license in the devel package) - the BuildArch: noarch is wrong, you cannot build only the documentation anyway and the rest is arch specific - remove the file html/.buildinfo, it is not required in the rpm - there is no changelog (I would recommend to use rpmautospec) - please link the patch to a upstream pull request or add a note in the spec why it is not upstreamable - you can save yourself the manual copying of the documentation and just put a %doc libunwind/html into the %files doc section
https://bugzilla.redhat.com/show_bug.cgi?id=2000219
--- Comment #6 from serge_sans_paille sguelton@redhat.com --- Specfile and source rpm updated. The only part I didn't fix is
- You should own the directory %_libdir/llvm-unwind
I do have the %dir directive, is there something I'm missing?
Anyway, thanks a lot for your guidance, that's much appreciated!
https://bugzilla.redhat.com/show_bug.cgi?id=2000219
mkulik@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mkulik@redhat.com
--- Comment #7 from mkulik@redhat.com --- Hi,
Few minor, cosmetic things that I noticed: - Documentation in -doc package provides HTML style documentations. This type of docs usually include bunch of .js libraries whose licenses should be included in SPEC file. For example doctools.js is provided using BSD license. - %{_libdir}/llvm-unwind directory seems to be own by main and a devel package, that's probably not necessary in your example. The devel package is dependent on main package so llvm-unwind directory will always be own by main package. I would drop this line: %dir %{_libdir}/llvm-unwind from devel package.
https://bugzilla.redhat.com/show_bug.cgi?id=2000219
serge_sans_paille sguelton@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(dan.cermak@cgc-in | |struments.com)
--- Comment #8 from serge_sans_paille sguelton@redhat.com --- Thanks mkulik for the review, I've updated the specfile and the associated srpm. @dan does that look good to you know?
https://bugzilla.redhat.com/show_bug.cgi?id=2000219
--- Comment #9 from serge_sans_paille sguelton@redhat.com --- gentle ping :-)
https://bugzilla.redhat.com/show_bug.cgi?id=2000219
--- Comment #10 from mkulik@redhat.com --- It seems that Dan is not responding for quite a bit of time. I will try to finish this review later today.
https://bugzilla.redhat.com/show_bug.cgi?id=2000219
mkulik@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|nobody@fedoraproject.org |mkulik@redhat.com Flags| |fedora-review?
--- Comment #11 from mkulik@redhat.com --- Few things:
- You decided to change default directory because of a conflict. You should apply those changes to doc subpackage too. Your package will put documentation in the same directory as (already present) libunwind. doc package main directory is: /usr/share/doc/libunwind main package directory: /usr/lib64/llvm-unwind - devel subpackage contains shared libraries and static ones. This is not allowed according to guidelines: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_packaging_static... - Typo in License in doc subpackage '(' ? also other packages: llvm-libunwind.x86_64: W: invalid-license-exception exceptions llvm-libunwind.x86_64: W: invalid-license 2.0 - Both packages provides libunwind.so.X (yours ans libunwind's) I would check if everything is according to guidelines here:
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_downstream_so_na... Adding note, explanation (fixes if necessary) regarding this would be a good idea.
https://bugzilla.redhat.com/show_bug.cgi?id=2000219
--- Comment #12 from serge_sans_paille sguelton@redhat.com --- First, thanks @mkulik for reviving the thread.
Second, I updated to LLVM 13:
Spec URL: https://sergesanspaille.fedorapeople.org/llvm-libunwind.spec SRPM URL: https://sergesanspaille.fedorapeople.org/llvm-libunwind-13.0.0-1.src.rpm
I think I addressed all the issue you pointed out, except for libunwind.so.X where I just added a comment in the sepcfile to explain the situation.
https://bugzilla.redhat.com/show_bug.cgi?id=2000219
Dan Čermák dan.cermak@cgc-instruments.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(dan.cermak@cgc-in | |struments.com) |
--- Comment #13 from Dan Čermák dan.cermak@cgc-instruments.com --- Sorry for the long radio silence from my side, this slipped under my radar. I can try to take another look (can't promise an ETA unfortunately), but if mkulik wants to review it, I definitely will not mind nor block this.
https://bugzilla.redhat.com/show_bug.cgi?id=2000219
--- Comment #14 from mkulik@redhat.com --- No worries, I will try to finish this review.
After your changes, package fails to pass automatic review build:
ERROR: 'mock build failed, see /home/mkulik/review-llvm-libunwind/results/build.log'
This error is here now because you did not included static library in files but it is still present in installation:
Checking for unpackaged file(s): /usr/lib/rpm/check-files /builddir/build/BUILDROOT/llvm-libunwind-13.0.0-1.fc36.x86_64 error: Installed (but unpackaged) file(s) found: /usr/lib64/llvm-unwind/libunwind.a RPM build errors: Installed (but unpackaged) file(s) found: /usr/lib64/llvm-unwind/libunwind.a Child return code was: 1
You can always try to check your package after modification with fedora-review tool. It will show you common error that are still present.
You can address this error in many ways: 1. Delete static library in %install 2. Patch cmake to build without static library: https://github.com/llvm/llvm-project/blob/main/libunwind/CMakeLists.txt#L60 3. Ignore by setting _unpackaged_files_terminate_build
I included 3rd option only to show that it exists. It should not be used in final package.
Overall all looks fine now. I'll post final review after you fix this error.
https://bugzilla.redhat.com/show_bug.cgi?id=2000219
--- Comment #15 from serge_sans_paille sguelton@redhat.com --- Thanks for the update @mkulik
I've made the required change to the specfile and updated them, associated koji build are there : https://koji.fedoraproject.org/koji/taskinfo?taskID=77797815
https://bugzilla.redhat.com/show_bug.cgi?id=2000219
--- Comment #16 from mkulik@redhat.com --- One more issue: Directories without known owners: /usr/share/doc/llvm-libunwind
Package Review ==============
Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
===== ISSUES ===== [!] Directories without known owners: /usr/share/doc/llvm-libunwind
===== 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]: 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", "*No copyright* Apache License 2.0", "Apache License 2.0". 19 files have unknown license. Detailed output of licensecheck in /home/mkulik/rpmbuild/SPECS/review-llvm- libunwind/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. [-]: Package requires other packages for directories it uses. Note: No known owner of /usr/share/doc/llvm-libunwind [!]: Package must own all directories that it creates. Note: Directories without known owners: /usr/share/doc/llvm-libunwind [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. [x]: Useful -debuginfo package or justification otherwise. [-]: 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 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
===== 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). [x]: Package functions as described. [x]: Latest version is packaged. [x]: Package does not include license text files separate from upstream. [-]: Patches link to upstream bugs/comments/lists or are otherwise justified. [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. [x]: %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]: Sources are verified with gpgverify first in %prep if upstream publishes signatures. [x]: Spec use %global instead of %define unless justified.
===== EXTRA items =====
Generic: [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]: 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: llvm-libunwind-13.0.0-1.fc36.x86_64.rpm llvm-libunwind-devel-13.0.0-1.fc36.x86_64.rpm llvm-libunwind-doc-13.0.0-1.fc36.x86_64.rpm llvm-libunwind-debuginfo-13.0.0-1.fc36.x86_64.rpm llvm-libunwind-debugsource-13.0.0-1.fc36.x86_64.rpm llvm-libunwind-13.0.0-1.fc36.src.rpm llvm-libunwind.x86_64: W: spelling-error %description -l en_US unwinder -> unkinder, unwind er, unwind-er llvm-libunwind.x86_64: W: no-documentation llvm-libunwind-devel.x86_64: W: spelling-error %description -l en_US unversioned -> diversion llvm-libunwind-devel.x86_64: W: only-non-binary-in-usr-lib llvm-libunwind-devel.x86_64: W: no-documentation llvm-libunwind-doc.x86_64: W: summary-not-capitalized C libunwind documentation llvm-libunwind.src: W: spelling-error %description -l en_US unwinder -> unkinder, unwind er, unwind-er 6 packages and 0 specfiles checked; 0 errors, 7 warnings.
Rpmlint (debuginfo) ------------------- Checking: llvm-libunwind-debuginfo-13.0.0-1.fc36.x86_64.rpm 1 packages and 0 specfiles checked; 0 errors, 0 warnings.
Rpmlint (installed packages) ---------------------------- Cannot parse rpmlint output:
Source checksums ---------------- https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.0/libunw... : CHECKSUM(SHA256) this package : 5cb4f83e76ba3f08516cf9ac1d44c5a844086b2dbee42643cd0bc48e13e8054f CHECKSUM(SHA256) upstream package : 5cb4f83e76ba3f08516cf9ac1d44c5a844086b2dbee42643cd0bc48e13e8054f https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.0/libunw... : CHECKSUM(SHA256) this package : 36f819091216177a61da639244eda67306ccdd904c757d70d135e273278b65e1 CHECKSUM(SHA256) upstream package : 36f819091216177a61da639244eda67306ccdd904c757d70d135e273278b65e1
Requires -------- llvm-libunwind (rpmlib, GLIBC filtered): libc.so.6()(64bit) rtld(GNU_HASH)
llvm-libunwind-devel (rpmlib, GLIBC filtered): libunwind.so.1()(64bit) llvm-libunwind(x86-64)
llvm-libunwind-doc (rpmlib, GLIBC filtered):
llvm-libunwind-debuginfo (rpmlib, GLIBC filtered):
llvm-libunwind-debugsource (rpmlib, GLIBC filtered):
Provides -------- llvm-libunwind: libunwind.so.1()(64bit) llvm-libunwind llvm-libunwind(x86-64)
llvm-libunwind-devel: libunwind(major) llvm-libunwind-devel llvm-libunwind-devel(x86-64)
llvm-libunwind-doc: llvm-libunwind-doc llvm-libunwind-doc(x86-64)
llvm-libunwind-debuginfo: debuginfo(build-id) libunwind.so.1.0-13.0.0-1.fc36.x86_64.debug()(64bit) llvm-libunwind-debuginfo llvm-libunwind-debuginfo(x86-64)
llvm-libunwind-debugsource: llvm-libunwind-debugsource llvm-libunwind-debugsource(x86-64)
Generated by fedora-review 0.7.6 (b083f91) last change: 2020-11-10 Command line :/usr/bin/fedora-review --name llvm-libunwind Buildroot used: fedora-rawhide-x86_64 Active plugins: Shell-api, C/C++, Generic Disabled plugins: Java, PHP, Python, R, Haskell, SugarActivity, Perl, fonts, Ocaml Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH
https://bugzilla.redhat.com/show_bug.cgi?id=2000219
--- Comment #17 from serge_sans_paille sguelton@redhat.com --- Thanks! Specfile updated.
https://bugzilla.redhat.com/show_bug.cgi?id=2000219
mkulik@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags|fedora-review? |fedora-review+
--- Comment #18 from mkulik@redhat.com --- Hi,
You can proceed with next steps. When you finished please close the ticket (use NEXTRELEASE as the resolution).
https://bugzilla.redhat.com/show_bug.cgi?id=2000219
--- Comment #19 from Gwyn Ciesla gwync@protonmail.com --- (fedscm-admin): The Pagure repository was created at https://src.fedoraproject.org/rpms/llvm-libunwind
https://bugzilla.redhat.com/show_bug.cgi?id=2000219
serge_sans_paille sguelton@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |CLOSED Flags| |needinfo?(cermak.daniel@gma | |il.com) Resolution|--- |RAWHIDE CC| |cermak.daniel@gmail.com Last Closed| |2021-11-17 08:09:22
--- Comment #20 from serge_sans_paille sguelton@redhat.com --- llvm-libunwind-13.0.0-1.fc36 is out! Thanks mkulik and Dan for the reviews.
https://bugzilla.redhat.com/show_bug.cgi?id=2000219
Daniel Cermak cermak.daniel@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(cermak.daniel@gma |needinfo- |il.com) |
package-review@lists.fedoraproject.org