Bug 2035222 - Package Review: wasmedge - High performance WebAssembly Virtual Machine
Summary: Package Review: wasmedge - High performance WebAssembly Virtual Machine
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: 35
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lokesh Mandvekar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-12-23 10:23 UTC by Hung-Ying, Tai
Modified: 2022-08-01 16:07 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-01 16:07:26 UTC
Type: Bug
Embargoed:
lsm5: fedora-review+


Attachments (Terms of Use)

Comment 1 dm4 2022-05-24 06:01:45 UTC
Sorry for the late response. We've successfully built WasmEdge SRPM on koji.
Koji task: https://koji.fedoraproject.org/koji/taskinfo?taskID=87389689

Comment 2 dm4 2022-06-01 13:10:03 UTC
Since WasmEdge 0.10.0 released (https://github.com/WasmEdge/WasmEdge/releases/tag/0.10.0), we've successfully tested WasmEdge SRPM on koji.
Koji task: https://koji.fedoraproject.org/koji/taskinfo?taskID=87773474

Comment 3 Lokesh Mandvekar 2022-06-01 14:13:28 UTC
Getting to this just now. The Spec and SRPM URL are no longer available. Could you please post the latest URLs in the same format as in the original description?

Comment 4 dm4 2022-06-01 15:36:29 UTC
Spec URL: https://github.com/WasmEdge/WasmEdge/blob/6c39907b806595f30492249ac2facc1f087c5d54/rpm/wasmedge.spec.in
SRPM URL: https://github.com/WasmEdge/WasmEdge/releases/download/0.10.0/WasmEdge-0.10.0-1.fc37.src.rpm
Description: High performance WebAssembly Virtual Machine
Fedora Account System Username: dm4

Comment 5 Lokesh Mandvekar 2022-06-10 15:47:44 UTC
(In reply to dm4 from comment #4)
> Spec URL:
> https://github.com/WasmEdge/WasmEdge/blob/
> 6c39907b806595f30492249ac2facc1f087c5d54/rpm/wasmedge.spec.in
> SRPM URL:
> https://github.com/WasmEdge/WasmEdge/releases/download/0.10.0/WasmEdge-0.10.
> 0-1.fc37.src.rpm
> Description: High performance WebAssembly Virtual Machine
> Fedora Account System Username: dm4

Hi dm4, I tried running the fedora-review tool on this bz just now and it won't take a `wasmedge.spec.in`. Could you please post a URL to wasmedge.spec as in the original description along with an srpm generated from it?

Thanks

Comment 6 Lokesh Mandvekar 2022-06-10 15:52:17 UTC
Also, 2 quick pointers that could make your life a lot easier:

1. Set `Release: %autorelease` instead of the current `Release: 1%{?dist}`

2. Set:
```
%changelog
%autochangelog
```

This should work on Fedora 35 and newer. It will generate the release tag and changelog entries from the git logs for the spec file.

See: https://docs.pagure.org/fedora-infra.rpmautospec/

The spec file looks pretty good at first glance but running the `fedora-review` tool could point out any non-trivial issues.

Thanks!

Comment 7 Lokesh Mandvekar 2022-06-10 16:01:14 UTC
Also, FYI, the final package creation request (after successful review) should come from @hydai otherwise the request will be rejected. Once the package has been created, we can have multiple co-maintainers added to the package, but the original request should come from the person who filed the bug.

dm4, if you plan to take this forward, I suggest continuing this on a new bug and closing this one.

Comment 8 Lokesh Mandvekar 2022-06-10 16:09:04 UTC
(In reply to dm4 from comment #4)
> Spec URL:
> https://github.com/WasmEdge/WasmEdge/blob/
> 6c39907b806595f30492249ac2facc1f087c5d54/rpm/wasmedge.spec.in

In addition to having the filename as `wasmedge.spec` please also post the raw url instead of the blob one. I remember having issues with blob spec files in the past.

Comment 9 dm4 2022-06-12 07:50:55 UTC
(In reply to Lokesh Mandvekar from comment #6)
> Also, 2 quick pointers that could make your life a lot easier:
> 
> 1. Set `Release: %autorelease` instead of the current `Release: 1%{?dist}`
> 
> 2. Set:
> ```
> %changelog
> %autochangelog
> ```
> 
> This should work on Fedora 35 and newer. It will generate the release tag
> and changelog entries from the git logs for the spec file.
> 
> See: https://docs.pagure.org/fedora-infra.rpmautospec/
> 
> The spec file looks pretty good at first glance but running the
> `fedora-review` tool could point out any non-trivial issues.
> 
> Thanks!

Thanks for the suggestion! We'll update the spec file in the next release.

Comment 10 dm4 2022-06-12 07:52:07 UTC
(In reply to Lokesh Mandvekar from comment #8)
> (In reply to dm4 from comment #4)
> > Spec URL:
> > https://github.com/WasmEdge/WasmEdge/blob/
> > 6c39907b806595f30492249ac2facc1f087c5d54/rpm/wasmedge.spec.in
> 
> In addition to having the filename as `wasmedge.spec` please also post the
> raw url instead of the blob one. I remember having issues with blob spec
> files in the past.

Thanks for the reminder. I'll use the Github release file link in the following comment.

Comment 11 dm4 2022-06-12 07:52:43 UTC
Spec URL: https://github.com/WasmEdge/WasmEdge/releases/download/0.10.0/WasmEdge-0.10.0.spec
SRPM URL: https://github.com/WasmEdge/WasmEdge/releases/download/0.10.0/WasmEdge-0.10.0-1.fc37.src.rpm
Description: High performance WebAssembly Virtual Machine
Fedora Account System Username: dm4

Comment 12 dm4 2022-06-12 07:59:36 UTC
(In reply to Lokesh Mandvekar from comment #7)
> Also, FYI, the final package creation request (after successful review)
> should come from @hydai otherwise the request will be
> rejected. Once the package has been created, we can have multiple
> co-maintainers added to the package, but the original request should come
> from the person who filed the bug.
> 
> dm4, if you plan to take this forward, I suggest continuing this on a new
> bug and closing this one.

I could remind @hydai to file the final package creation request after successful review and then add me as a co-maintainer to the WasmEdge package. Is it ok to continue with this ticket?
Thanks!

Comment 13 Lokesh Mandvekar 2022-06-13 14:03:21 UTC
Auto-generated with fedora-review. Manual review will follow later..


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

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


Issues:
=======
- Development (unversioned) .so files in -devel subpackage, if present.
  Note: Unversioned so-files directly in %_libdir.
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/#_devel_packages
- Spec file name must match the spec package %{name}, in the format
  %{name}.spec.
  Note: WasmEdge-0.10.0.spec should be wasmedge.spec
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/#_spec_file_naming


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

C/C++:
[ ]: Provides: bundled(gnulib) in place as required.
     Note: Sources not installed
[ ]: 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:
[ ]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[ ]: 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.
[ ]: License field in the package spec file matches the actual license.
     Note: There is no build directory. Running licensecheck on vanilla
     upstream sources. No licenses found. Please check the source files for
     licenses manually.
[ ]: License file installed when any subpackage combination is installed.
[ ]: %build honors applicable compiler flags or justifies otherwise.
[ ]: Package contains no bundled libraries without FPC exception.
[ ]: Changelog in prescribed format.
[ ]: Sources contain only permissible code or content.
[ ]: Package contains desktop file if it is a GUI application.
[ ]: Development files must be in a -devel package
[ ]: Package uses nothing in %doc for runtime.
[ ]: Package consistently uses macros (instead of hard-coded directory
     names).
[ ]: Package is named according to the Package Naming Guidelines.
[ ]: 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.
[ ]: Requires correct, justified where necessary.
[ ]: Spec file is legible and written in American English.
[ ]: Package contains systemd file(s) if in need.
[ ]: Useful -debuginfo package or justification otherwise.
[ ]: Package is not known to require an ExcludeArch tag.
[ ]: 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]: 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]: 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.
[ ]: Final provides and requires are sane (see attachments).
[ ]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
     wasmedge-devel , wasmedge-lib
[ ]: Package functions as described.
[ ]: Latest version is packaged.
[ ]: 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.
[ ]: %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]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: Spec use %global instead of %define unless justified.

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

Generic:
[!]: Spec file according to URL is the same as in SRPM.
     Note: Bad spec filename: /home/lsm5/fedora-
     review/2035222-WasmEdge-0.10.0/srpm-unpacked/wasmedge.spec
     See: (this test has no URL)
[x]: Rpmlint is run on debuginfo package(s).
     Note: There are rpmlint messages (see attachment).
[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.


Rpmlint
-------
Cannot parse rpmlint output:


Rpmlint (debuginfo)
-------------------
Cannot parse rpmlint output:



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


Unversioned so-files
--------------------
wasmedge-lib: /usr/lib64/libwasmedge_c.so
wasmedge-lib: /usr/lib64/wasmedge/libwasmedgePluginWasmEdgeProcess.so

Source checksums
----------------
https://github.com/WasmEdge/WasmEdge/releases/download/0.10.0/WasmEdge-0.10.0-src.tar.gz :
  CHECKSUM(SHA256) this package     : 2c7539573f5e78ddef4dd6f61e4edf3cf81d3a66f71ccde103c02a4173268572
  CHECKSUM(SHA256) upstream package : 2c7539573f5e78ddef4dd6f61e4edf3cf81d3a66f71ccde103c02a4173268572


Requires
--------
wasmedge (rpmlib, GLIBC filtered):
    ld-linux-x86-64.so.2()(64bit)
    libLLVM-14.so()(64bit)
    libLLVM-14.so(LLVM_14)(64bit)
    libc.so.6()(64bit)
    libfmt.so.8()(64bit)
    libgcc_s.so.1()(64bit)
    libgcc_s.so.1(GCC_3.0)(64bit)
    libgcc_s.so.1(GCC_3.3.1)(64bit)
    liblldCommon.so.14()(64bit)
    liblldELF.so.14()(64bit)
    libm.so.6()(64bit)
    libspdlog.so.1()(64bit)
    libstdc++.so.6()(64bit)
    libstdc++.so.6(CXXABI_1.3)(64bit)
    libstdc++.so.6(CXXABI_1.3.11)(64bit)
    libstdc++.so.6(CXXABI_1.3.13)(64bit)
    libstdc++.so.6(CXXABI_1.3.3)(64bit)
    libstdc++.so.6(CXXABI_1.3.5)(64bit)
    libstdc++.so.6(CXXABI_1.3.9)(64bit)
    llvm
    rtld(GNU_HASH)

wasmedge-devel (rpmlib, GLIBC filtered):

wasmedge-lib (rpmlib, GLIBC filtered):
    ld-linux-x86-64.so.2()(64bit)
    libLLVM-14.so()(64bit)
    libLLVM-14.so(LLVM_14)(64bit)
    libc.so.6()(64bit)
    libfmt.so.8()(64bit)
    libgcc_s.so.1()(64bit)
    libgcc_s.so.1(GCC_3.0)(64bit)
    libgcc_s.so.1(GCC_3.3.1)(64bit)
    liblldCommon.so.14()(64bit)
    liblldELF.so.14()(64bit)
    libm.so.6()(64bit)
    libspdlog.so.1()(64bit)
    libstdc++.so.6()(64bit)
    libstdc++.so.6(CXXABI_1.3)(64bit)
    libstdc++.so.6(CXXABI_1.3.11)(64bit)
    libstdc++.so.6(CXXABI_1.3.13)(64bit)
    libstdc++.so.6(CXXABI_1.3.3)(64bit)
    libstdc++.so.6(CXXABI_1.3.5)(64bit)
    libstdc++.so.6(CXXABI_1.3.9)(64bit)
    llvm
    rtld(GNU_HASH)

wasmedge-debuginfo (rpmlib, GLIBC filtered):

wasmedge-debugsource (rpmlib, GLIBC filtered):



Provides
--------
wasmedge:
    wasmedge
    wasmedge(x86-64)

wasmedge-devel:
    wasmedge-devel
    wasmedge-devel(x86-64)

wasmedge-lib:
    libwasmedgePluginWasmEdgeProcess.so()(64bit)
    libwasmedge_c.so()(64bit)
    wasmedge-lib
    wasmedge-lib(x86-64)

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

wasmedge-debugsource:
    wasmedge-debugsource
    wasmedge-debugsource(x86-64)



Generated by fedora-review 0.8.0 (e988316) last change: 2022-04-07
Command line :/usr/bin/fedora-review -b 2035222
Buildroot used: fedora-rawhide-x86_64
Active plugins: C/C++, Generic, Shell-api
Disabled plugins: Ocaml, Python, fonts, SugarActivity, Haskell, R, Perl, Java, PHP
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 14 Lokesh Mandvekar 2022-06-13 14:03:50 UTC
(In reply to dm4 from comment #12)
> (In reply to Lokesh Mandvekar from comment #7)
> > Also, FYI, the final package creation request (after successful review)
> > should come from @hydai otherwise the request will be
> > rejected. Once the package has been created, we can have multiple
> > co-maintainers added to the package, but the original request should come
> > from the person who filed the bug.
> > 
> > dm4, if you plan to take this forward, I suggest continuing this on a new
> > bug and closing this one.
> 
> I could remind @hydai to file the final package creation
> request after successful review and then add me as a co-maintainer to the
> WasmEdge package. Is it ok to continue with this ticket?
> Thanks!

Yes, we can continue here.

Comment 15 Lokesh Mandvekar 2022-06-14 17:58:52 UTC
@dm4 see inline ..

(In reply to Lokesh Mandvekar from comment #13)

> Issues:
> =======
> - Development (unversioned) .so files in -devel subpackage, if present.
>   Note: Unversioned so-files directly in %_libdir.
>   See: https://docs.fedoraproject.org/en-US/packaging-
>   guidelines/#_devel_packages

Looking at https://docs.fedoraproject.org/en-US/packaging-guidelines/#_devel_packages , any unversioned shared library files should
be listed in the `-devel` package, while versioned lib files are better off in the main package itself.

Currently, `rpm -ql wasmedge-lib-0.10.0-1.fc37.x86_64.rpm` shows:

/usr/lib64/libwasmedge_c.so
/usr/lib64/wasmedge
/usr/lib64/wasmedge/libwasmedgePluginWasmEdgeProcess.so

Perhaps we should have versioned shared libraries with the unversioned ones as symlinks? The former could go into the main package and the latter in the -devel package.

> - Spec file name must match the spec package %{name}, in the format
>   %{name}.spec.
>   Note: WasmEdge-0.10.0.spec should be wasmedge.spec
>   See: https://docs.fedoraproject.org/en-US/packaging-
>   guidelines/#_spec_file_naming
> 
> 

The package name should exactly match the value against the `Name:` field in the spec file.
So, please use either `WasmEdge` or `wasmedge`. Once you've finalized that, please also update the name in the Summary section of this bugzilla.


Once these 2 issues are sorted, I'll go ahead with the rest of the review steps manually.

Thanks.

Comment 16 Lokesh Mandvekar 2022-06-14 20:41:52 UTC
(In reply to Lokesh Mandvekar from comment #15)
> 
> /usr/lib64/libwasmedge_c.so
> /usr/lib64/wasmedge
> /usr/lib64/wasmedge/libwasmedgePluginWasmEdgeProcess.so
> 
> Perhaps we should have versioned shared libraries with the unversioned ones
> as symlinks? The former could go into the main package and the latter in the
> -devel package.
> 

In other words, I think we don't need the wasmedge-lib package. We can install the files either in wasmedge or wasmedge-devel based on requirement.

Comment 17 dm4 2022-06-15 06:59:41 UTC
Thanks for helping us! I'll update spec file & srpm then post links here again.

Comment 18 dm4 2022-06-15 13:55:40 UTC
Spec URL: https://github.com/WasmEdge/WasmEdge/releases/download/0.10.0/wasmedge.spec
SRPM URL: https://github.com/WasmEdge/WasmEdge/releases/download/0.10.0/wasmedge-0.10.0-1.fc37.src.rpm
Description: High performance WebAssembly Virtual Machine
Fedora Account System Username: dm4

Comment 19 dm4 2022-06-15 13:56:20 UTC
We decided to use all lower case `wasmedge` as our package name and change the summary section of this ticket. Also, we remove the `wasmedge-lib` package and put versioned shared libraries into the `wasmedge` package. The `wasmedge-devel` package contains header files and unversioned symbolic links to real versioned shared libraries.

I update the links of the spec file and the SRPM file as above comment. I also test the uploaded SRPM passed with koji build: https://koji.fedoraproject.org/koji/taskinfo?taskID=88295337

Thanks for your help.

Comment 20 Lokesh Mandvekar 2022-06-15 23:20:00 UTC
Hi dm4, thanks for the changes. I'll resume the review tomorrow but before that I got a quick question.

I see you have `ExclusiveArch: x86_64 aarch64` in the spec file. Would be good to have a comment above that line with justification for not enabling all arches. If wasmedge can work for all of Fedora's supported arches, then you can just remove the `ExclusiveArch:..` line and it will build for all available arches.

Comment 21 dm4 2022-06-16 09:01:35 UTC
Yes, wasmedge could only be built on specific arches currently. I update the spec file and add a comment about this. Thanks for your review.

Comment 22 Lokesh Mandvekar 2022-06-16 13:43:49 UTC
Reviewing pending issues below.

The ones marked [!] have been addressed in the PR at: https://github.com/WasmEdge/WasmEdge/pull/1557 

Once that PR is reviewed and merged, we should be good to go. Let's continue further review on the github PR.

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



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

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.

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.
[!]: 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]: 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",
     "*No copyright* Creative Commons CC0 1.0", "BSD 3-Clause License",
     "*No copyright* BSD 3-Clause License", "MIT License", "Boost Software
     License 1.0", "*No copyright* Creative Commons CC0 1.0 Apache License
     2.0", "Apache License 2.0". 649 files have unknown license. Detailed
     output of licensecheck in /home/lsm5/fedora-
     review/2035222-wasmedge/licensecheck.txt
[!]: License file installed when any subpackage combination is installed.
[!]: Package requires other packages for directories it uses.
     Note: No known owner of /usr/lib64/wasmedge
[!]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/lib64/wasmedge
[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.
[x]: Package is not known to require an ExcludeArch tag.
[x]: Package complies to the Packaging Guidelines

===== 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]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
     wasmedge-devel
[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.
[-]: %check is present and all tests pass.
[!]: Packages should try to preserve timestamps of original installed
     files.

Comment 23 Lokesh Mandvekar 2022-06-17 13:23:18 UTC
https://raw.githubusercontent.com/WasmEdge/WasmEdge/80ca1be2e0684dd5e6e02713d5ad59cebbe7d494/rpm/wasmedge.spec.in fixes all issues with licensing and directory ownership.

Package approved. I have sponsored you both (dm4ss and hydai) into the packager group. You can see the new `packager` group membership on your https://accounts.fedoraproject.org profile.

Next step (for hydai): https://docs.fedoraproject.org/en-US/package-maintainers/New_Package_Process_for_New_Contributors/#add_package_to_source_code_management_scm_system_and_set_owner
Let me know if any issues.

hydai can add dm4 as co-maintainer once the package dist-git repo is created.

Thanks a lot for packaging and maintaining this and welcome to Fedora! :)

Comment 24 Maxwell G 2022-06-17 21:55:50 UTC
Maybe I'm a bit nitpicky, but I do I have a couple suggestions to improve your package. Although I'm not the reviewer, I noticed some problems and figured I'd point them out.

> %global gittag 0.10.0
> %global srpm_version 0.10.0

What's the point of this? Why don't you just set `Version: 0.10.0` and use `%{version}` instead of these redundant macros?

> BuildRequires: gcc-c++,cmake,ninja-build,boost-devel,spdlog-devel,llvm-devel,lld-devel,git

I would recommend splitting this into one `BuildRequires: PACKAGENAME` line for each dependency, preferably alphabetized. This way, the specfile and its git diffs are more readable.

Please use the %cmake macros. You can consult https://docs.fedoraproject.org/en-US/packaging-guidelines/CMake/ for how to use them.

You should not use globs in %files for shared directories[1].
[1]: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_explicit_lists

Please take a look at https://docs.fedoraproject.org/en-US/packaging-guidelines/#_downstream_so_name_versioning. The way you've versioned the .so does not look correct to me.

The devel subpackage should depend on the base package. Take a look at https://docs.fedoraproject.org/en-US/packaging-guidelines/#_requiring_base_package. Once you do this, you can remove the duplicated `%license` and `%doc` lines from the devel subpackage.

> License: ASL 2.0 and CC0

You must include a licensing breakdown, as per https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/#_dual_licensing_scenarios.

Comment 25 Fabio Valentini 2022-06-19 11:45:35 UTC
Note that the source code also appears to be bundling the C implementation of blake3 and some WASI headers.

Unless those files are not used when compiling WasmEdge, these bundled dependencies and their licenses (blake3: ASL 2.0 or CC0; WASI headers: ASL 2.0) will need to be specified in the .spec file (i.e. "Provides: bundled(blake3) = $version").

> sed -i -e 's/0.0.0-unreleased/%{gittag}/' CMakeLists.txt include/CMakeLists.txt

Is this really necessary? The release tarball you're using contains a VERSION file that specifies exactly the string you need, and this is apparently already used by CMake to override the 0.0.0-unreleased version string.

Comment 26 dm4 2022-06-21 07:05:40 UTC
Appreciate your advice to help us improve our spec file.

> > %global gittag 0.10.0
> > %global srpm_version 0.10.0
> 
> What's the point of this? Why don't you just set `Version: 0.10.0` and use
> `%{version}` instead of these redundant macros?

We use `gittag` and `srpm_version` variables because we'll try to build SPRM on CI each commit. We'll generate version number like `0.10.0-61-gc82da352` each commit using `git describe --match "[0-9].[0-9]*" --tag`. Because `-` is not a valid character for version in spec file, we'll replace `-` with `~` in `gittag` and set `srpm_version`. This is why we use `gittag` and `srpm_version` variables.

> > BuildRequires: gcc-c++,cmake,ninja-build,boost-devel,spdlog-devel,llvm-devel,lld-devel,git
> 
> I would recommend splitting this into one `BuildRequires: PACKAGENAME` line
> for each dependency, preferably alphabetized. This way, the specfile and its
> git diffs are more readable.
> 
> Please use the %cmake macros. You can consult
> https://docs.fedoraproject.org/en-US/packaging-guidelines/CMake/ for how to
> use them.
> 
> You should not use globs in %files for shared directories[1].
> [1]:
> https://docs.fedoraproject.org/en-US/packaging-guidelines/#_explicit_lists
> 
> Please take a look at
> https://docs.fedoraproject.org/en-US/packaging-guidelines/
> #_downstream_so_name_versioning. The way you've versioned the .so does not
> look correct to me.
> 
> The devel subpackage should depend on the base package. Take a look at
> https://docs.fedoraproject.org/en-US/packaging-guidelines/
> #_requiring_base_package. Once you do this, you can remove the duplicated
> `%license` and `%doc` lines from the devel subpackage.
> 
> > License: ASL 2.0 and CC0
> 
> You must include a licensing breakdown, as per
> https://docs.fedoraproject.org/en-US/packaging-guidelines/
> LicensingGuidelines/#_dual_licensing_scenarios.

Thanks for your advice! We'll update our spec file in the following PR: https://github.com/WasmEdge/WasmEdge/pull/1578

Comment 27 dm4 2022-06-21 07:07:41 UTC
(In reply to Fabio Valentini from comment #25)
> Note that the source code also appears to be bundling the C implementation
> of blake3 and some WASI headers.
> 
> Unless those files are not used when compiling WasmEdge, these bundled
> dependencies and their licenses (blake3: ASL 2.0 or CC0; WASI headers: ASL
> 2.0) will need to be specified in the .spec file (i.e. "Provides:
> bundled(blake3) = $version").

Thanks for your advice! We'll update our spec file in the following PR: https://github.com/WasmEdge/WasmEdge/pull/1578

> > sed -i -e 's/0.0.0-unreleased/%{gittag}/' CMakeLists.txt include/CMakeLists.txt
> 
> Is this really necessary? The release tarball you're using contains a
> VERSION file that specifies exactly the string you need, and this is
> apparently already used by CMake to override the 0.0.0-unreleased version
> string.

Thanks for pointing this out. We fix it in this commit: https://github.com/WasmEdge/WasmEdge/commit/5744cfe0d2c62c5b242c71214e73827bfe552b23

Comment 28 Gwyn Ciesla 2022-06-21 17:10:56 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/wasmedge

Comment 29 Fabio Valentini 2022-06-21 17:20:06 UTC
Please make sure to fix the outstanding issues before importing the package to Fedora.

Also note that while it's fine to develop the .spec file in a third-party repo during the review process, after the package has been imported to Fedora, the file in the git repository that was created in the last comment MUST be the canonical source of that file going forward:

c.f. https://docs.fedoraproject.org/en-US/packaging-guidelines/#_spec_maintenance_and_canonicity

Comment 30 dm4 2022-06-23 08:06:49 UTC
(In reply to Fabio Valentini from comment #29)
> Please make sure to fix the outstanding issues before importing the package
> to Fedora.
> 
> Also note that while it's fine to develop the .spec file in a third-party
> repo during the review process, after the package has been imported to
> Fedora, the file in the git repository that was created in the last comment
> MUST be the canonical source of that file going forward:
> 
> c.f.
> https://docs.fedoraproject.org/en-US/packaging-guidelines/
> #_spec_maintenance_and_canonicity

Thanks for your advice. We'll develop .spec file at Fedora’s repository once our package is imported.

Comment 31 Fedora Update System 2022-08-01 16:00:40 UTC
FEDORA-2022-5b14464426 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-5b14464426

Comment 32 Fedora Update System 2022-08-01 16:07:26 UTC
FEDORA-2022-5b14464426 has been pushed to the Fedora 37 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.