Bug 2453288 - Review Request: libnsm - C library for AWS Nitro Secure Module (NSM) API
Summary: Review Request: libnsm - C library for AWS Nitro Secure Module (NSM) API
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ben Beasley
QA Contact: Fedora Extras Quality Assurance
URL: https://github.com/aws/%{crate}
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-03-31 03:53 UTC by Tyler Fanelli
Modified: 2026-09-08 23:07 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2026-09-08 23:07:44 UTC
Type: ---
Embargoed:
code: fedora-review+


Attachments (Terms of Use)
The .spec file difference from Copr build 10428306 to 10445532 (1.01 KB, patch)
2026-05-11 18:57 UTC, Fedora Review Service
no flags Details | Diff
The .spec file difference from Copr build 10808608 to 10808645 (1.06 KB, patch)
2026-08-03 22:12 UTC, Fedora Review Service
no flags Details | Diff

Description Tyler Fanelli 2026-03-31 03:53:21 UTC
Spec URL: https://raw.githubusercontent.com/tylerfanelli/libnsm-rpm/refs/heads/main/libnsm.spec
SRPM URL: https://github.com/tylerfanelli/libnsm-rpm/raw/refs/heads/main/libnsm-0.5.0-2.fc45.src.rpm
Description: C library for AWS Nitro Secure Module (NSM) API
Fedora Account System Username: tfanelli

Comment 1 Tyler Fanelli 2026-04-01 00:59:27 UTC
[fedora-review-service-build]

Comment 2 Fedora Review Service 2026-04-01 04:01:38 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/10280949
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2453288-libnsm/fedora-rawhide-x86_64/10280949-libnsm/fedora-review/review.txt

Found issues:

- No gcc, gcc-c++ or clang found in BuildRequires
  Read more: https://docs.fedoraproject.org/en-US/packaging-guidelines/C_and_C++/
- libnsm : /usr/include/nsm.h 
  Read more: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_devel_packages
- Unversioned so-files directly in %_libdir.
  Read more: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_devel_packages
- Package has .a files: libnsm. Illegal package name: libnsm. Does not provide -static: libnsm.
  Read more: https://docs.fedoraproject.org/en-US/packaging-guidelines/#packaging-static-libraries

Please know that there can be false-positives.

---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 3 Ben Beasley 2026-04-01 05:50:02 UTC
Glancing at the spec file, I think you should consult https://docs.fedoraproject.org/en-US/packaging-guidelines/#_shared_libraries. Shared libraries MUST be versioned via SONAME; no unversioned shared libraries can be installed in the default linker path. We do have a few Rust-based shared libraries. I can provide some good examples using cargo-c, e.g. rust-rav1e:

  https://src.fedoraproject.org/rpms/rust-rav1e/blob/d9a574d39b3cebea0d1b05d64d30d51a0d9eb92a/f/rust-rav1e.spec

or rust-rustc-demangle-capi, where cargo-c support had to be patched in downstream:

  https://src.fedoraproject.org/rpms/rust-rustc-demangle-capi/blob/54e45c7b8e3c168b139a1f877759d1485a26d78f/f/rust-rustc-demangle-capi.spec

See also:

  https://docs.fedoraproject.org/en-US/packaging-guidelines/Rust/#_building_shared_libraries_with_cargo_c

This is probably the easiest way for you to make a versioned shared library. I am not sure what it would take to make it happen without cargo-c. You might know more about this than I do.

We also don’t package static (.a) libraries at all unless there’s a technical reason why we *need* them and can’t use the shared library:

  https://docs.fedoraproject.org/en-US/packaging-guidelines/#packaging-static-libraries

If the static library is needed, I think it ought to be justified in a spec-file comment, like:

  https://src.fedoraproject.org/rpms/libfplll/blob/83e803542166d97d3255b22c473bca0cb2f25a6c/f/libfplll.spec#_167

The fact that %build is empty is a little weird, but I haven’t investigated closely.

Currently, you have everything in the base package’s %files list, and aren’t actually producing a binary -devel package.

The versioned shared library (once you have one) goes in the base package:

  %{_libdir}/libnsm.so.0.5{,.*}

The unversioned shared-library symbolic link, the header, and the pkgconfig file go in the -devel subpackage (%files devel):

  %{_includedir}/nsm.h
  %{_libdir}/pkgconfig/libnsm.pc
  %{_libdir}/libnsm.so

The static library shouldn’t be shipped, if possible. If you must ship it, it needs to go in a -static subpackage that Requires the -devel package with a fully-versioned dependency, like https://docs.fedoraproject.org/en-US/packaging-guidelines/#_requiring_base_package.

  %{_libdir}/libnsm.a

Comment 4 Tyler Fanelli 2026-05-06 01:13:23 UTC
Spec URL: https://raw.githubusercontent.com/tylerfanelli/libnsm-rpm/refs/heads/main/libnsm.spec
SRPM URL: https://github.com/tylerfanelli/libnsm-rpm/raw/refs/heads/main/libnsm-0.5.1-2.fc45.src.rpm
Description: C library for AWS Nitro Secure Module (NSM) API
Fedora Account System Username: tfanelli

Comment 5 Fedora Review Service 2026-05-06 01:19:58 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/10428306
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2453288-libnsm/fedora-rawhide-x86_64/10428306-libnsm/fedora-review/review.txt

Found issues:

- No gcc, gcc-c++ or clang found in BuildRequires
  Read more: https://docs.fedoraproject.org/en-US/packaging-guidelines/C_and_C++/
- Static executables found: libnsm.so.0.5.1
  Read more: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_statically_linking_executables

Please know that there can be false-positives.

---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 6 Tyler Fanelli 2026-05-06 02:11:41 UTC
Thanks Ben, I've made updates to both the upstream repository and package request to reflect the changes you've asked for. Would you mind re-reviewing?

Comment 7 Ben Beasley 2026-05-06 10:27:10 UTC
Hmm, the basic idea here looks reasonable, and the packaged static library seems to be correctly handled and adequatedly justified, but something is weird about the shared library. The fedora-review program complains that it’s statically linked, and "file rpms-unpacked/libnsm-0.5.1-2.fc45.x86_64.rpm/usr/lib64/libnsm.so.0.5.1" gives "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]=0ba89214768e51781e4ba9331cbb8f3311dce22b, stripped", where a more typical shared library might look like "/usr/lib64/libz.so.1.3.1.zlib-ng: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=c03522d8b3fa0325563dfbddbf7564d9f02d60ef, stripped". I thought this might have to do with the STATIC=1 Makefile variable, but I can’t seem to tell what that actually does, and rebuilding without it doesn’t seem to make any difference.

Any chance you’re able to explain to me what I’m looking at?

Comment 8 Ben Beasley 2026-05-06 12:02:30 UTC
It seems like you shouldn’t have to do this manually:

  BuildRequires:  (crate(libc/default) >= 0.2.0 with crate(libc/default) < 0.3.0~)

It looks like the package still builds without this line.

Comment 9 Tyler Fanelli 2026-05-11 18:47:45 UTC
(In reply to Ben Beasley from comment #7)
> Hmm, the basic idea here looks reasonable, and the packaged static library
> seems to be correctly handled and adequatedly justified, but something is
> weird about the shared library. The fedora-review program complains that
> it’s statically linked, and "file
> rpms-unpacked/libnsm-0.5.1-2.fc45.x86_64.rpm/usr/lib64/libnsm.so.0.5.1"
> gives
> "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]=0ba89214768e51781e4ba9331cbb8f3311dce22b, stripped", where a
> more typical shared library might look like
> "/usr/lib64/libz.so.1.3.1.zlib-ng: ELF 64-bit LSB shared object, x86-64,
> version 1 (SYSV), dynamically linked,
> BuildID[sha1]=c03522d8b3fa0325563dfbddbf7564d9f02d60ef, stripped". 
> 
> Any chance you’re able to explain to me what I’m looking at?


Not really. I use rust's cdylib target to produce the shared libary. The only modification I make to the shared library is setting the soname to the API version before installing. For version 0.x.x, that would like the following:

patchelf --set-soname libnsm.so.0 target/release/libnsm.so

> I thought this might have to do with the STATIC=1 Makefile variable, but I can’t seem
> to tell what that actually does, and rebuilding without it doesn’t seem to
> make any difference.

That's a relic from a previous change that isn't relevant anymore. I've removed it.

Comment 10 Tyler Fanelli 2026-05-11 18:49:22 UTC
Spec URL: https://raw.githubusercontent.com/tylerfanelli/libnsm-rpm/refs/heads/main/libnsm.spec
SRPM URL: https://github.com/tylerfanelli/libnsm-rpm/raw/refs/heads/main/libnsm-0.5.1-2.fc45.src.rpm
Description: C library for AWS Nitro Secure Module (NSM) API
Fedora Account System Username: tfanelli

Comment 11 Fedora Review Service 2026-05-11 18:57:21 UTC
Created attachment 2140709 [details]
The .spec file difference from Copr build 10428306 to 10445532

Comment 12 Fedora Review Service 2026-05-11 18:57:24 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/10445532
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2453288-libnsm/fedora-rawhide-x86_64/10445532-libnsm/fedora-review/review.txt

Found issues:

- No gcc, gcc-c++ or clang found in BuildRequires
  Read more: https://docs.fedoraproject.org/en-US/packaging-guidelines/C_and_C++/
- Static executables found: libnsm.so.0.5.1
  Read more: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_statically_linking_executables

Please know that there can be false-positives.

---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 13 Tyler Fanelli 2026-05-13 14:28:35 UTC
(In reply to Ben Beasley from comment #7)
> Hmm, the basic idea here looks reasonable, and the packaged static library
> seems to be correctly handled and adequatedly justified, but something is
> weird about the shared library. The fedora-review program complains that
> it’s statically linked, and "file
> rpms-unpacked/libnsm-0.5.1-2.fc45.x86_64.rpm/usr/lib64/libnsm.so.0.5.1"
> gives
> "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]=0ba89214768e51781e4ba9331cbb8f3311dce22b, stripped", where a
> more typical shared library might look like
> "/usr/lib64/libz.so.1.3.1.zlib-ng: ELF 64-bit LSB shared object, x86-64,
> version 1 (SYSV), dynamically linked,
> BuildID[sha1]=c03522d8b3fa0325563dfbddbf7564d9f02d60ef, stripped". I thought
> this might have to do with the STATIC=1 Makefile variable, but I can’t seem
> to tell what that actually does, and rebuilding without it doesn’t seem to
> make any difference.
> 
> Any chance you’re able to explain to me what I’m looking at?

I've tried reproducing this locally. When examining the installed file:

$ file /usr/local/lib/libnsm.so.0.5.1 
/usr/local/lib/libnsm.so.0.5.1: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=0d736fdabec2f6f2710e6a58c4042bee007c953a, not stripped

The only difference between this and your example, is "stripped" vs "not stripped". Is that relevant at all? Furthermore, it seems the build system may be doing something behind the scenes? I followed the install process as it's shown in the spec file, and cannot reproduce locally.

Comment 14 Tyler Fanelli 2026-05-13 15:28:30 UTC
I've produced this scratch build:

https://koji.fedoraproject.org/koji/taskinfo?taskID=145426829

After installing:

$ file /usr/lib64/libnsm.so.0.5.1 

/usr/lib64/libnsm.so.0.5.1: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, BuildID[sha1]=65769055f128f0c633b5b193453cc4f446aaa0a8, stripped

So I'm still a bit unclear what is causing this.

Comment 15 Ben Beasley 2026-05-13 16:47:04 UTC
(In reply to Tyler Fanelli from comment #13)
> The only difference between this and your example, is "stripped" vs "not
> stripped". Is that relevant at all?

You should find that the shared libraries in `%{buildroot}` at the end of `%install` are “not stripped,” but then the debugging symbols are extracted to the `-debuginfo` package, so the shared libraries from the *actual RPM* are “stripped.” Does that make sense?

I’ll take another look at this review request as soon as I have time.

This may be one of those rare situations where I end up having to say that I can’t verify that everything is correct, but I can’t point to anything that violates packaging guidelines, and you understand what you are trying to do better than I, so I have to leave the question of correctness in your hands.

Comment 16 Ben Beasley 2026-05-15 12:04:33 UTC
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 <tfanelli> - 0.5.1-2
+- Uncommitted changes
+
+* Mon May 11 2026 Tyler Fanelli <tfanelli> - 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

Comment 17 Tyler Fanelli 2026-08-03 21:49:48 UTC
Spec URL: https://raw.githubusercontent.com/tylerfanelli/libnsm-rpm/refs/heads/main/libnsm.spec
SRPM URL: https://github.com/tylerfanelli/libnsm-rpm/raw/refs/heads/main/libnsm-0.5.2-1.fc45.src.rpm
Description: C library for AWS Nitro Secure Module (NSM) API
Fedora Account System Username: tfanelli

Comment 18 Fedora Review Service 2026-08-03 21:58:01 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/10808608
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2453288-libnsm/fedora-rawhide-x86_64/10808608-libnsm/fedora-review/review.txt

Found issues:

- No gcc, gcc-c++ or clang found in BuildRequires
  Read more: https://docs.fedoraproject.org/en-US/packaging-guidelines/C_and_C++/

Please know that there can be false-positives.

---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 19 Tyler Fanelli 2026-08-03 22:02:22 UTC
Spec URL: https://raw.githubusercontent.com/tylerfanelli/libnsm-rpm/refs/heads/main/libnsm.spec
SRPM URL: https://github.com/tylerfanelli/libnsm-rpm/raw/refs/heads/main/libnsm-0.5.2-2.fc45.src.rpm
Description: C library for AWS Nitro Secure Module (NSM) API
Fedora Account System Username: tfanelli

Comment 20 Fedora Review Service 2026-08-03 22:02:42 UTC
There seems to be some problem with the following file.
SRPM URL: https://github.com/tylerfanelli/libnsm-rpm/raw/refs/heads/main/libnsm-0.5.2-2.fc45.src.rpm
Fetching it results in a 404 Not Found error.
Please make sure the URL is correct and publicly available.


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 21 Tyler Fanelli 2026-08-03 22:03:22 UTC
Spec URL: https://raw.githubusercontent.com/tylerfanelli/libnsm-rpm/refs/heads/main/libnsm.spec
SRPM URL: https://github.com/tylerfanelli/libnsm-rpm/raw/refs/heads/main/libnsm-0.5.2-2.fc45.src.rpm
Description: C library for AWS Nitro Secure Module (NSM) API
Fedora Account System Username: tfanelli

Comment 22 Fedora Review Service 2026-08-03 22:12:57 UTC
Created attachment 2153527 [details]
The .spec file difference from Copr build 10808608 to 10808645

Comment 23 Fedora Review Service 2026-08-03 22:13:00 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/10808645
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2453288-libnsm/fedora-rawhide-x86_64/10808645-libnsm/fedora-review/review.txt

Please take a look if any issues were found.


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 24 Tyler Fanelli 2026-08-04 01:45:31 UTC
@code Revisiting this, I made changes upstream pertaining to how the library was built. Would you mind re-reviewing?

Comment 25 Ben Beasley 2026-08-08 11:53:27 UTC
This is looking encouraging at a quick glance, but I think there is a mixup in the spec file:


----

Name:           libnsm
Version:        0.5.2
Release:        %{autorelease}
Summary:        C library for AWS Nitro Secure Module (NSM) API

License:        Apache-2.0
[…]

%global _description %{expand:
C library for Nitro Secure Module (NSM).}

%description
%{summary}.

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}


%package devel

----

I think you meant to put the SourceLicense field, the %global additional_rust_licenses, and the augmented License field where the first License field is. Currently, these are part of the base package’s description, which is clearly unintended.

Comment 26 Tyler Fanelli 2026-08-12 14:12:44 UTC
Spec URL: https://raw.githubusercontent.com/tylerfanelli/libnsm-rpm/refs/heads/main/libnsm.spec
SRPM URL: https://github.com/tylerfanelli/libnsm-rpm/raw/refs/heads/main/libnsm-0.5.2-2.fc45.src.rpm
Description: C library for AWS Nitro Secure Module (NSM) API
Fedora Account System Username: tfanelli

Comment 27 Tyler Fanelli 2026-08-12 14:37:28 UTC
[fedora-review-service-build]

Comment 28 Tyler Fanelli 2026-08-13 01:12:10 UTC
Spec URL: https://raw.githubusercontent.com/tylerfanelli/libnsm-rpm/refs/heads/main/libnsm.spec
SRPM URL: https://github.com/tylerfanelli/libnsm-rpm/raw/refs/heads/main/libnsm-0.5.2-2.fc45.src.rpm
Description: C library for AWS Nitro Secure Module (NSM) API
Fedora Account System Username: tfanelli

Comment 29 Tyler Fanelli 2026-08-13 01:16:30 UTC
[fedora-review-service-build]

Comment 30 Fedora Review Service 2026-08-13 09:54:55 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/10861807
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2453288-libnsm/fedora-rawhide-x86_64/10861807-libnsm/fedora-review/review.txt

Please take a look if any issues were found.


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 31 Fedora Review Service 2026-08-13 10:52:55 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/10861948
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2453288-libnsm/fedora-rawhide-x86_64/10861948-libnsm/fedora-review/review.txt

Please take a look if any issues were found.


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 32 Fedora Review Service 2026-08-13 12:24:26 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/10862147
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2453288-libnsm/fedora-rawhide-x86_64/10862147-libnsm/fedora-review/review.txt

Please take a look if any issues were found.


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 33 Fedora Review Service 2026-08-13 12:25:55 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/10862148
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2453288-libnsm/fedora-rawhide-x86_64/10862148-libnsm/fedora-review/review.txt

Please take a look if any issues were found.


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 34 Tyler Fanelli 2026-08-17 18:49:54 UTC
@(In reply to Ben Beasley from comment #16)
> 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 <tfanelli> - 0.5.1-2
> +- Uncommitted changes
> +
> +* Mon May 11 2026 Tyler Fanelli <tfanelli> - 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

Thanks, I think I've fixed the issue in the latest changes. Would you mind taking a look?

Comment 35 Ben Beasley 2026-08-24 06:31:14 UTC
(In reply to Tyler Fanelli from comment #34)
> Thanks, I think I've fixed the issue in the latest changes. Would you mind
> taking a look?

I’m sorry it’s taken me a little while to revisit this. The latest submission looks encouraging, but the spec file and SRPM don’t quite match. Could you please make sure that these two uploads are consistent? It makes it much easier for to make sure that I am reviewing the correct iteration.

@@ -1,2 +1,12 @@
+## START: Set by rpmautospec
+## (rpmautospec version 0.8.4)
+## 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                                                     
 
@@ -6,17 +16,5 @@
 Summary:        C library for AWS Nitro Secure Module (NSM) API                              
 
-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}                                   
+License:        Apache-2.0
 URL:            https://github.com/aws/%{crate}
 Source0:        %{url}/archive/v%{version}/%{crate}-%{version}.tar.gz                        
@@ -35,4 +33,19 @@                                                                            
 %{summary}.                                                                                  
 
+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}
+
+
 %package devel
 Summary: Header files and library for libnsm development
@@ -89,3 +102,9 @@

 %changelog
-%{autochangelog}
+## START: Generated by rpmautospec
+* Mon Aug 03 2026 Tyler Fanelli <tfanelli> - 0.5.2-2
+- Uncommitted changes
+
+* Mon Aug 03 2026 Tyler Fanelli <tfanelli> - 0.5.2-1
+- Initial commit
+## END: Generated by rpmautospec

Comment 36 Tyler Fanelli 2026-08-24 16:02:23 UTC
Spec URL: https://raw.githubusercontent.com/tylerfanelli/libnsm-rpm/refs/heads/main/libnsm.spec
SRPM URL: https://github.com/tylerfanelli/libnsm-rpm/blob/main/libnsm-0.5.2-2.fc46.src.rpm
Description: C library for AWS Nitro Secure Module (NSM) API
Fedora Account System Username: tfanelli

Comment 37 Fedora Review Service 2026-08-24 16:03:51 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/10897765
(failed)

Build log:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2453288-libnsm/srpm-builds/10897765/builder-live.log.gz

Please make sure the package builds successfully at least for Fedora Rawhide.

- If the build failed for unrelated reasons (e.g. temporary network
  unavailability), please ignore it.
- If the build failed because of missing BuildRequires, please make sure they
  are listed in the "Depends On" field


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 38 Tyler Fanelli 2026-08-24 16:06:51 UTC
Spec URL: https://raw.githubusercontent.com/tylerfanelli/libnsm-rpm/refs/heads/main/libnsm.spec
SRPM URL: https://github.com/tylerfanelli/libnsm-rpm/raw/refs/heads/main/libnsm-0.5.2-2.fc46.src.rpm
Description: C library for AWS Nitro Secure Module (NSM) API
Fedora Account System Username: tfanelli

Comment 39 Fedora Review Service 2026-08-24 16:17:37 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/10897816
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2453288-libnsm/fedora-rawhide-x86_64/10897816-libnsm/fedora-review/review.txt

Please take a look if any issues were found.


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 40 Ben Beasley 2026-08-25 13:35:30 UTC
I think this is OK now! The package is APPROVED.

While it’s not mandatory for non-crate packages like this, you might consider adding the rust-sig group as a co-maintainer if you would like SIG members to assist with routine fixes and dependency tweaks, rebuilds for notable CVE’s in statically-linked dependencies, and so on.

----

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

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


Issues:
=======
- Dist tag is present.

  OK: fedora-review is confused by rpmautospec


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

C/C++:
[x]: Package does not contain kernel modules.
[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]: ldconfig not called in %post and %postun for Fedora 28 and later.
[x]: Package does not contain any libtool archives (.la)
[x]: Package contains no static executables.
[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/ben/fedora/review/2453288-libnsm/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 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.
[-]: 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

     There *is* a Requires: %{name}%{?_isa} = %{version}-%{release} in
     libnsm-devel, and libnsm-static has an similar Requires on libnsm-devel,
     as indicated in
     https://docs.fedoraproject.org/en-US/packaging-guidelines/#packaging-static-libraries.

[?]: 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=149460592

[-]: %check is present and all tests pass.

     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.

[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: No rpmlint messages.
[x]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.


Rpmlint
-------
Checking: libnsm-0.5.2-2.fc46.x86_64.rpm
          libnsm-devel-0.5.2-2.fc46.x86_64.rpm
          libnsm-static-0.5.2-2.fc46.x86_64.rpm
          libnsm-0.5.2-2.fc46.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/tmp21z7kt12')]
checks: 32, packages: 4

libnsm.spec: W: no-%check-section
 4 packages and 0 specfiles checked; 0 errors, 1 warnings, 25 filtered, 0 badness; has taken 1.1 s 




Rpmlint (debuginfo)
-------------------
Checking: libnsm-debuginfo-0.5.2-2.fc46.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/tmpsxonfu76')]
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.10.0
configuration:
    /usr/lib/python3.15/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: 33, packages: 4

 4 packages and 0 specfiles checked; 0 errors, 0 warnings, 26 filtered, 0 badness; has taken 0.6 s 



Source checksums
----------------
https://github.com/aws/aws-nitro-enclaves-nsm-api/archive/v0.5.2/aws-nitro-enclaves-nsm-api-0.5.2.tar.gz :
  CHECKSUM(SHA256) this package     : 7f568012946c4f93eebd35a37541c6f8b9d2d4216792726a2b1d7b201d30a7ad
  CHECKSUM(SHA256) upstream package : 7f568012946c4f93eebd35a37541c6f8b9d2d4216792726a2b1d7b201d30a7ad


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-08-25 08:53:10.991021721 +0100
+++ /home/ben/fedora/review/2453288-libnsm/srpm-unpacked/libnsm.spec	2026-08-24 01:00:00.000000000 +0100
@@ -1,2 +1,12 @@
+## START: Set by rpmautospec
+## (rpmautospec version 0.8.4)
+## 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
 
@@ -89,3 +99,9 @@
 
 %changelog
-%{autochangelog}
+## START: Generated by rpmautospec
+* Mon Aug 24 2026 Tyler Fanelli <tfanelli> - 0.5.2-2
+- Uncommitted changes
+
+* Wed Aug 12 2026 Tyler Fanelli <tfanelli> - 0.5.2-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: Python, PHP, Haskell, Java, R, Ocaml, SugarActivity, fonts, Perl
Disabled flags: EXARCH, EPEL6, EPEL7, DISTTAG, BATCH

Comment 41 Fedora Admin user for bugzilla script actions 2026-09-08 21:30:28 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/libnsm
Monitoring:
Wasn't able to create project in Anitya. You can create it manually on: `https://release-monitoring.org`

Comment 42 Fedora Update System 2026-09-08 21:48:20 UTC
FEDORA-2026-a2b88724fe (libnsm-0.5.2-1.fc46) has been submitted as an update to Fedora 46.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-a2b88724fe

Comment 43 Fedora Update System 2026-09-08 23:07:44 UTC
FEDORA-2026-a2b88724fe (libnsm-0.5.2-1.fc46) has been pushed to the Fedora 46 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.