https://bugzilla.redhat.com/show_bug.cgi?id=2453288
--- Comment #16 from Ben Beasley <[email protected]> --- Overall, this looks basically reasonable, but you need to handle licenses of statically-linked Rust dependencies, and the shared library really doesn’t look it is actually a usable shared library. Package Review ============== Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated As described in nsm-test/README.md, the tests in nsm-test/ are designed to run in an enclave, so we can’t build and run them here. There are no doctests in the Rust sources, either. Issues: ======= - If your application is a C or C++ application you must list a BuildRequires against gcc, gcc-c++ or clang. Note: No gcc, gcc-c++ or clang found in BuildRequires See: https://docs.fedoraproject.org/en-US/packaging-guidelines/C_and_C++/ OK: The library is actually written in Rust, and no C or C++ compiler is used. If we built nsm-test/src/main.cc, we would need BuildRequires: gcc-c++, since nsm-test/Makefile invokes g++, but we don’t built nsm-test/, so nothing needs to be changed here. - Package contains no static executables. Note: Static executables found: libnsm.so.0.5.1 See: https://docs.fedoraproject.org/en-US/packaging- guidelines/#_statically_linking_executables There are two potential cases of static linking here. The first is the -static subpackage, which intentionally ships a static library libnsm.a. We try to avoid this whenever possible, but this is a SHOULD, not a MUST, and the spec file contains a valid technical justification. The second is the fact that rpmlint recognizes /usr/lib64/libnsm.so.0.5.1 as statically linked. libnsm.x86_64: E: statically-linked-binary /usr/lib64/libnsm.so.0.5.1 The package installs a statically linked binary or object file. The file command agrees: $ file rpms-unpacked/libnsm-0.5.1-2.fc45.x86_64.rpm/usr/lib64/libnsm.so.0.5.1 rpms-unpacked/libnsm-0.5.1-2.fc45.x86_64.rpm/usr/lib64/libnsm.so.0.5.1: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), statically linked, BuildID[sha1]=9293755a328affbf0d1ced450f19213d1b5396b1, stripped And ldd shows nothing is dynamically linked, not even libc: $ ldd rpms-unpacked/libnsm-0.5.1-2.fc45.x86_64.rpm/usr/lib64/libnsm.so.0.5.1 not a dynamic executable Comparing to a “conventional” shared library: $ file /usr/lib64/libadwaita-1.so.0 /usr/lib64/libadwaita-1.so.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=e3d7ee36a898d70049dea10aaf6f735bc4b2a6fc, stripped …and comparing to another shared library built from Rust sources without using cargo-c: $ file /usr/lib64/librpm_sequoia.so.1 /usr/lib64/librpm_sequoia.so.1: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=eed8c3deb7b9dcfab789fa53256c3a7b659851c4, stripped This seems weird. There is little or no configuration related to the shared library in the build system. I thought that this could be just a result of the fact that nothing in nsm-lib uses libc directly, and perhaps no part of the Rust standard library it uses does either, but: $ python3 -c 'from ctypes import cdll; cdll.LoadLibrary("rpms-unpacked/libnsm-0.5.1-2.fc45.x86_64.rpm/usr/lib64/libnsm.so.0.5.1")' Traceback (most recent call last): File "<string>", line 1, in <module> from ctypes import cdll; cdll.LoadLibrary("rpms-unpacked/libnsm-0.5.1-2.fc45.x86_64.rpm/usr/lib64/libnsm.so.0.5.1") ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/python3.14/ctypes/__init__.py", line 554, in LoadLibrary return self._dlltype(name) ~~~~~~~~~~~~~^^^^^^ File "/usr/lib64/python3.14/ctypes/__init__.py", line 433, in __init__ self._handle = self._load_library(name, mode, handle, winmode) ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/python3.14/ctypes/__init__.py", line 475, in _load_library return _dlopen(name, mode) OSError: rpms-unpacked/libnsm-0.5.1-2.fc45.x86_64.rpm/usr/lib64/libnsm.so.0.5.1: object file has no loadable segments I can’t find anything unacceptable or anything you’re clearly doing wrong here, but it really doesn’t seem like this is a usable shared library. - The rpmlint output also warns: libnsm.x86_64: W: no-soname /usr/lib64/libnsm.so.0.5.1 The library has no soname. However, it looks fine when I check it with objdump: $ objdump -x rpms-unpacked/libnsm-0.5.1-2.fc45.x86_64.rpm/usr/lib64/libnsm.so.0.5.1 | grep -i soname SONAME libnsm.so.0 I don’t know what to make of this, either. I suppose it means that the SONAME is there, but the file isn’t a shared library so it doesn’t matter. - Having an executable stack isn’t great, hardening-wise. I suppose this is because there is nothing that uses the hardening flags in LDFLAGS. I’m not sure what can be done about this, either. libnsm.x86_64: E: missing-PT_GNU_STACK-section /usr/lib64/libnsm.so.0.5.1 The binary lacks a PT_GNU_STACK section. This forces the dynamic linker to make the stack executable. I don’t think this necessarily blocks approval. - I see some weird warnings from objcopy while extracting debuginfo objcopy: /builddir/build/BUILD/libnsm-0.5.1-build/BUILDROOT/usr/lib64/stbKzLik: warning: allocated section `.note.gnu.build-id' not in segment objcopy: /builddir/build/BUILD/libnsm-0.5.1-build/BUILDROOT/usr/lib64/stbKzLik: warning: allocated section `.init' not in segment objcopy: /builddir/build/BUILD/libnsm-0.5.1-build/BUILDROOT/usr/lib64/stbKzLik: warning: allocated section `.plt' not in segment objcopy: /builddir/build/BUILD/libnsm-0.5.1-build/BUILDROOT/usr/lib64/stbKzLik: warning: allocated section `.text' not in segment objcopy: /builddir/build/BUILD/libnsm-0.5.1-build/BUILDROOT/usr/lib64/stbKzLik: warning: allocated section `.fini' not in segment objcopy: /builddir/build/BUILD/libnsm-0.5.1-build/BUILDROOT/usr/lib64/stbKzLik: warning: allocated section `.gnu.hash' not in segment objcopy: /builddir/build/BUILD/libnsm-0.5.1-build/BUILDROOT/usr/lib64/stbKzLik: warning: allocated section `.dynsym' not in segment objcopy: /builddir/build/BUILD/libnsm-0.5.1-build/BUILDROOT/usr/lib64/stbKzLik: warning: allocated section `.gnu.version' not in segment objcopy: /builddir/build/BUILD/libnsm-0.5.1-build/BUILDROOT/usr/lib64/stbKzLik: warning: allocated section `.gnu.version_r' not in segment objcopy: /builddir/build/BUILD/libnsm-0.5.1-build/BUILDROOT/usr/lib64/stbKzLik: warning: allocated section `.rela.dyn' not in segment objcopy: /builddir/build/BUILD/libnsm-0.5.1-build/BUILDROOT/usr/lib64/stbKzLik: warning: allocated section `.rela.plt' not in segment objcopy: /builddir/build/BUILD/libnsm-0.5.1-build/BUILDROOT/usr/lib64/stbKzLik: warning: allocated section `.rodata' not in segment objcopy: /builddir/build/BUILD/libnsm-0.5.1-build/BUILDROOT/usr/lib64/stbKzLik: warning: allocated section `.eh_frame_hdr' not in segment objcopy: /builddir/build/BUILD/libnsm-0.5.1-build/BUILDROOT/usr/lib64/stbKzLik: warning: allocated section `.eh_frame' not in segment objcopy: /builddir/build/BUILD/libnsm-0.5.1-build/BUILDROOT/usr/lib64/stbKzLik: warning: allocated section `.gcc_except_table' not in segment objcopy: /builddir/build/BUILD/libnsm-0.5.1-build/BUILDROOT/usr/lib64/stbKzLik: warning: allocated section `.note.package' not in segment objcopy: /builddir/build/BUILD/libnsm-0.5.1-build/BUILDROOT/usr/lib64/stbKzLik: warning: allocated section `.tdata' not in segment objcopy: /builddir/build/BUILD/libnsm-0.5.1-build/BUILDROOT/usr/lib64/stbKzLik: warning: allocated section `.init_array' not in segment objcopy: /builddir/build/BUILD/libnsm-0.5.1-build/BUILDROOT/usr/lib64/stbKzLik: warning: allocated section `.fini_array' not in segment objcopy: /builddir/build/BUILD/libnsm-0.5.1-build/BUILDROOT/usr/lib64/stbKzLik: warning: allocated section `.data.rel.ro' not in segment objcopy: /builddir/build/BUILD/libnsm-0.5.1-build/BUILDROOT/usr/lib64/stbKzLik: warning: allocated section `.got' not in segment objcopy: /builddir/build/BUILD/libnsm-0.5.1-build/BUILDROOT/usr/lib64/stbKzLik: warning: allocated section `.data' not in segment objcopy: /builddir/build/BUILD/libnsm-0.5.1-build/BUILDROOT/usr/lib64/stbKzLik: warning: allocated section `.dynstr' not in segment objcopy: /builddir/build/BUILD/libnsm-0.5.1-build/BUILDROOT/usr/lib64/stbKzLik: warning: allocated section `.dynamic' not in segment I don’t know what these mean, or whether they are an actual problem. - There are a couple of spelling errors in the descriptions: “containes” instead of “contains”, and “libsnm” instead of “libnsm”. - Dist tag is present. OK: fedora-review is confused by rpmautospec. - The License fields of (sub)packages containing executables built from Rust sources need to account for statically linked Rust library dependencies. At the end of %build, you can add: cd nsm-lib %{cargo_license_summary -a} %{cargo_license -a} > ../LICENSE.dependencies Then, for the base package, something like: SourceLicense: Apache-2.0 # These are the licenses of statically-linked Rust dependencies, from the # output of %%{cargo_license_summary}. # # Apache-2.0 # Apache-2.0 OR MIT # MIT # MIT OR Apache-2.0 %global additional_rust_licenses %{shrink: MIT AND (Apache-2.0 OR MIT) } License: Apache-2.0 AND %{additional_rust_licenses} For -devel: # This subpackage contains no statically linked Rust dependencies License: Apache-2.0 …and then add to %files: %license LICENSE.dependencies - You might consider: # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} ===== MUST items ===== C/C++: [x]: Package does not contain kernel modules. [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. [!]: 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". 18 files have unknown license. Detailed output of licensecheck in /home/ben/fedora/review/2453288-libnsm/licensecheck.txt Licenses of statically-linked Rust dependencies must be accounted for [x]: License file installed when any subpackage combination is installed. -static → -devel → base (has license file) [?]: %build honors applicable compiler flags or justifies otherwise. [x]: Package contains no bundled libraries or specifies bundled libraries with Provides: bundled(<libname>) if unbundling is not possible. [x]: Changelog in prescribed format. [x]: Sources contain only permissible code or content. [x]: 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 [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]: The License field must be a valid SPDX expression. [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]: 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: libnsm-static. [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]: Fully versioned dependency in subpackages if applicable. Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in libnsm- devel , libnsm-static [?]: 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]: Package should compile and build into binary rpms on all supported architectures. https://koji.fedoraproject.org/koji/taskinfo?taskID=145490253 [!]: %check is present and all tests pass. There are no tests that we can run outside of an enclave. [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]: 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: [!]: Spec file according to URL is the same as in SRPM. Note: Spec file as given by url is not the same as in SRPM (see attached diff). See: (this test has no URL) [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. Rpmlint ------- Checking: libnsm-0.5.1-2.fc45.x86_64.rpm libnsm-devel-0.5.1-2.fc45.x86_64.rpm libnsm-static-0.5.1-2.fc45.x86_64.rpm libnsm-0.5.1-2.fc45.src.rpm ============================ rpmlint session starts ============================ rpmlint: 2.8.0 configuration: /usr/lib/python3.14/site-packages/rpmlint/configdefaults.toml /etc/xdg/rpmlint/fedora-spdx-licenses.toml /etc/xdg/rpmlint/fedora.toml /etc/xdg/rpmlint/scoring.toml /etc/xdg/rpmlint/users-groups.toml /etc/xdg/rpmlint/warn-on-functions.toml rpmlintrc: [PosixPath('/tmp/tmperhrfw8c')] checks: 32, packages: 4 libnsm.x86_64: E: statically-linked-binary /usr/lib64/libnsm.so.0.5.1 libnsm-devel.x86_64: E: spelling-error ('containes', '%description -l en_US containes -> contained, contains, containers') libnsm-static.x86_64: E: spelling-error ('libsnm', '%description -l en_US libsnm -> limbless') libnsm.x86_64: W: no-soname /usr/lib64/libnsm.so.0.5.1 libnsm.spec: W: no-%check-section libnsm.x86_64: E: missing-PT_GNU_STACK-section /usr/lib64/libnsm.so.0.5.1 4 packages and 0 specfiles checked; 4 errors, 2 warnings, 23 filtered, 4 badness; has taken 1.1 s Rpmlint (debuginfo) ------------------- Checking: libnsm-debuginfo-0.5.1-2.fc45.x86_64.rpm ============================ rpmlint session starts ============================ rpmlint: 2.8.0 configuration: /usr/lib/python3.14/site-packages/rpmlint/configdefaults.toml /etc/xdg/rpmlint/fedora-spdx-licenses.toml /etc/xdg/rpmlint/fedora.toml /etc/xdg/rpmlint/scoring.toml /etc/xdg/rpmlint/users-groups.toml /etc/xdg/rpmlint/warn-on-functions.toml rpmlintrc: [PosixPath('/tmp/tmpoqzkuyh3')] checks: 32, packages: 1 1 packages and 0 specfiles checked; 0 errors, 0 warnings, 4 filtered, 0 badness; has taken 0.3 s Rpmlint (installed packages) ---------------------------- ============================ rpmlint session starts ============================ rpmlint: 2.9.0 configuration: /usr/lib/python3.14/site-packages/rpmlint/configdefaults.toml /etc/xdg/rpmlint/fedora-spdx-licenses.toml /etc/xdg/rpmlint/fedora.toml /etc/xdg/rpmlint/scoring.toml /etc/xdg/rpmlint/users-groups.toml /etc/xdg/rpmlint/warn-on-functions.toml checks: 32, packages: 4 libnsm.x86_64: E: statically-linked-binary /usr/lib64/libnsm.so.0.5.1 libnsm-devel.x86_64: E: spelling-error ('containes', '%description -l en_US containes -> contained, contains, containers') libnsm-static.x86_64: E: spelling-error ('libsnm', '%description -l en_US libsnm -> limbless') libnsm.x86_64: W: no-soname /usr/lib64/libnsm.so.0.5.1 libnsm.x86_64: E: missing-PT_GNU_STACK-section /usr/lib64/libnsm.so.0.5.1 4 packages and 0 specfiles checked; 4 errors, 1 warnings, 24 filtered, 4 badness; has taken 0.3 s Source checksums ---------------- https://github.com/aws/aws-nitro-enclaves-nsm-api/archive/v0.5.1/aws-nitro-enclaves-nsm-api-0.5.1.tar.gz : CHECKSUM(SHA256) this package : b39fa9748db4065a7a81d840e66418f62321d717eaa2802a516d6f1f75a70cf1 CHECKSUM(SHA256) upstream package : b39fa9748db4065a7a81d840e66418f62321d717eaa2802a516d6f1f75a70cf1 Requires -------- libnsm (rpmlib, GLIBC filtered): ld-linux-x86-64.so.2()(64bit) libc.so.6()(64bit) libgcc_s.so.1()(64bit) libgcc_s.so.1(GCC_3.0)(64bit) libgcc_s.so.1(GCC_3.3)(64bit) libgcc_s.so.1(GCC_4.2.0)(64bit) rtld(GNU_HASH) libnsm-devel (rpmlib, GLIBC filtered): /usr/bin/pkg-config libnsm(x86-64) libnsm.so.0()(64bit) libnsm-static (rpmlib, GLIBC filtered): libnsm-devel(x86-64) Provides -------- libnsm: libnsm libnsm(x86-64) libnsm.so.0()(64bit) libnsm-devel: libnsm-devel libnsm-devel(x86-64) pkgconfig(libnsm) libnsm-static: libnsm-static libnsm-static(x86-64) Diff spec file in url and in SRPM --------------------------------- --- /home/ben/fedora/review/2453288-libnsm/srpm/libnsm.spec 2026-05-13 12:22:56.584722841 +0100 +++ /home/ben/fedora/review/2453288-libnsm/srpm-unpacked/libnsm.spec 2026-05-11 01:00:00.000000000 +0100 @@ -1,2 +1,12 @@ +## START: Set by rpmautospec +## (rpmautospec version 0.8.3) +## RPMAUTOSPEC: autorelease, autochangelog +%define autorelease(e:s:pb:n) %{?-p:0.}%{lua: + release_number = 2; + base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); + print(release_number + base_release_number - 1); +}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} +## END: Set by rpmautospec + %global crate aws-nitro-enclaves-nsm-api @@ -67,3 +77,9 @@ %changelog -%{autochangelog} +## START: Generated by rpmautospec +* Mon May 11 2026 Tyler Fanelli <[email protected]> - 0.5.1-2 +- Uncommitted changes + +* Mon May 11 2026 Tyler Fanelli <[email protected]> - 0.5.1-1 +- Initial commit +## END: Generated by rpmautospec Generated by fedora-review 0.11.0 (05c5b26) last change: 2025-11-29 Command line :/usr/bin/fedora-review -b 2453288 Buildroot used: fedora-rawhide-x86_64 Active plugins: Generic, C/C++, Shell-api Disabled plugins: SugarActivity, PHP, Perl, Java, Ocaml, Haskell, Python, fonts, R Disabled flags: EXARCH, EPEL6, EPEL7, DISTTAG, BATCH -- You are receiving this mail because: You are always notified about changes to this product and component You are on the CC list for the bug. https://bugzilla.redhat.com/show_bug.cgi?id=2453288 Report this comment as SPAM: https://bugzilla.redhat.com/enter_bug.cgi?product=Bugzilla&format=report-spam&short_desc=Report%20of%20Bug%202453288%23c16 -- _______________________________________________ package-review mailing list -- [email protected] To unsubscribe send an email to [email protected] Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/[email protected] Do not reply to spam, report it: https://forge.fedoraproject.org/infra/tickets/issues/new
