Bug 2279008 - Review Request: s2n-tls - A C99 implementation of the TLS/SSL protocols
Summary: Review Request: s2n-tls - A C99 implementation of the TLS/SSL protocols
Keywords:
Status: POST
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/s2n-tls
Whiteboard:
: 2240758 (view as bug list)
Depends On: 2049400 2279003 2279006 2279007
Blocks: 2279009 2279010 2279011
TreeView+ depends on / blocked
 
Reported: 2024-05-03 22:27 UTC by Dominik Wombacher
Modified: 2024-05-17 18:47 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:
code: fedora-review+


Attachments (Terms of Use)
The .spec file difference from Copr build 7403148 to 7446401 (3.79 KB, patch)
2024-05-15 12:58 UTC, Fedora Review Service
no flags Details | Diff
The .spec file difference from Copr build 7446401 to 7446843 (1.06 KB, patch)
2024-05-15 16:17 UTC, Fedora Review Service
no flags Details | Diff

Description Dominik Wombacher 2024-05-03 22:27:02 UTC
Spec URL: https://download.copr.fedorainfracloud.org/results/wombelix/aws-c-libs/fedora-rawhide-x86_64/07402775-s2n-tls/s2n-tls.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/wombelix/aws-c-libs/fedora-rawhide-x86_64/07402775-s2n-tls/s2n-tls-1.4.13-1.fc41.src.rpm
Description: s2n-tls is a C99 implementation of the TLS/SSL protocols that is designed to be simple, small, fast, and with security as a priority.
Fedora Account System Username: wombelix

Supersedes https://bugzilla.redhat.com/show_bug.cgi?id=2240758

Comment 1 Dominik Wombacher 2024-05-03 22:28:02 UTC
*** Bug 2240758 has been marked as a duplicate of this bug. ***

Comment 2 Fedora Review Service 2024-05-03 22:46:52 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/7403148
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2279008-s2n-tls/fedora-rawhide-x86_64/07403148-s2n-tls/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 4 Ben Beasley 2024-05-12 18:47:24 UTC
Package Review
==============

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

===== Issues =====

- If s2n-tls-cmake.patch is suitable for offering upstream, please do so.
  Otherwise, please add a comment briefly explaining what the patch does and
  why it makes sense for it to be downstream-only.

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

- The organization into a libs subpackage and a base package with only
  documentation and license files and a libs package, with a circular
  dependency between the two, is workable, but unusual and probably more
  complicated than necessary considering that there are no command-line tools
  to package in the base package. I think that it would make sense to either:

    1. put the shared libraries %{_libdir}/libs2n.so.1{,.*} in the base s2n-tls
       package, and let the -devel package depend on that – the simplest, most
       “normal” approach – or,
    2. put the license and small doc files README.md in VERSIONING.rst in the
       -libs subpackage, and let the base package have no %files section at
       all, so that no s2n-tls binary package is built

  The package can still be approved even if you decide not to change anything
  about this.

- This is correct, and there is nothing wrong with it:

    %dir %{_libdir}/cmake/s2n
    %dir %{_libdir}/cmake/s2n/modules
    %dir %{_libdir}/cmake/s2n/shared
    %{_libdir}/cmake/s2n/*.cmake
    %{_libdir}/cmake/s2n/modules/*.cmake
    %{_libdir}/cmake/s2n/shared/*.cmake

  However, you may find it easier to just name the directory and all of its
  contents:

    %{_libdir}/cmake/s2n/

  The trailing slash is not required but is good style to make it clear that a
  directory is meant (and it does keep it from matching a file with the same
  name).

  Similarly, you *could* choose to replace

    %dir %{_includedir}/s2n
    %dir %{_includedir}/s2n/unstable
    %{_includedir}/s2n/unstable/*.h

  with

    %{_includedir}/s2n/

  and

    %dir %{_docdir}/s2n-tls/docs/
    %dir %{_docdir}/s2n-tls/docs/images/
    %dir %{_docdir}/s2n-tls/docs/examples/
    %{_docdir}/s2n-tls/docs/*.md
    %{_docdir}/s2n-tls/docs/images/*.png
    %{_docdir}/s2n-tls/docs/images/*.svg
    %{_docdir}/s2n-tls/docs/examples/*.c

  with

    %{_docdir}/s2n-tls/docs/

  The package can still be approved even if you decide not to change anything
  about this.

- The package creates, but does not own, /usr/share/doc/s2n-tls; the -doc
  package needs to own that:

    %dir %{_docdir}/s2n-tls/

- Version 1.4.14 is now available. Please update. It doesn’t look like any
  packaging changes will be required.

- It is unnecessary (albeit permissible) to number the sources and patches in
  Fedora. You could choose to change

    Source0:        %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
    Patch0:         s2n-tls-cmake.patch

  to

    Source:         %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
    Patch:          s2n-tls-cmake.patch

- The runtime dependency on openssl-libs is already handled by the RPM
  dependency generators:

  s2n-tls-libs (rpmlib, GLIBC filtered):
    […]
    libcrypto.so.3()(64bit)
    libcrypto.so.3(OPENSSL_3.0.0)(64bit)
    […]

  You “MUST NOT” duplicate these automatic dependencies with manual
  dependencies; see
  https://docs.fedoraproject.org/en-US/packaging-guidelines/#_package_dependencies.
  Please remove this:

    Requires:       openssl-libs

- The dependency on openssl-devel from s2n-tls-devel should be arch-specific.
  See
  https://docs.fedoraproject.org/en-US/packaging-guidelines/#_architecture_specific_dependencies.

  Please change

    Requires:       openssl-devel

  to

    Requires:       openssl-devel%{?_isa}

- You can, if you choose, avoid repetition by writing

    Summary:        %{summary}

  in each of the subpackages. Similarly, in the base package, you can write

    %global _description %{expand:
    s2n-tls is a C99 implementation of the TLS/SSL protocols that is
    designed to be simple, small, fast, and with security as a priority.}

    %description %{_description}

  and then

    %description doc %{_description}

  and so on.

- The package fails to build on i686:

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

  You may either fix the problem, or add

    ExcludeArch:    %{ix86}

  (see: https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval). Any
  arched packages that depend directly or indirectly on this one will need to add
  the ExcludeArch, too.

  The package also fails to build on s390x due to several test failures:

    The following tests FAILED:
    	 67 - s2n_early_data_io_api_test (Failed)
    	106 - s2n_hkdf_test (Failed)
    	149 - s2n_psk_test (Failed)
    	208 - s2n_server_new_session_ticket_test (Failed)
    	238 - s2n_tls13_handshake_early_data_test (Failed)
    	241 - s2n_tls13_hybrid_shared_secret_test (Failed)
    	242 - s2n_tls13_key_schedule_rfc8448_test (Failed)
    	244 - s2n_tls13_keys_test (Failed)
    	248 - s2n_tls13_prf_test (Failed)
    	250 - s2n_tls13_secrets_rfc8448_test (Failed)
    	251 - s2n_tls13_secrets_test (Failed)

  Failures that occur only on s390x are usually due to implicit assumptions that
  the host is little-endian, since s390x is the only big-endian primary
  architecture in Fedora. These could be problems with the tests or with the
  actual library implementation; I haven’t tried to investigate.

  For these, you have the same options (fix, or add ExcludeArch: s390x here and
  in all directly or indirectly dependent packages), but in this case if you add
  the ExcludeArch you must also file a bug blocking F-ExcludeArch-s390x as
  prescribed in
  https://docs.fedoraproject.org/en-US/packaging-guidelines/#_architecture_build_failures.

- It looks like the -doc subpackage contains only arch-independent files. You
  should make the subpackage noarch:

    %package doc
    Summary:        %{summary}

    BuildArch:      noarch
    
    %description doc %{_description}

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

C/C++:
[-]: Provides: bundled(gnulib) in place as required.
     Note: Sources not installed
[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", "MIT No Attribution", "Apache License 2.0 and/or
     OpenSSL License". 6827 files have unknown license. Detailed output of
     licensecheck in
     /home/ben/Downloads/review/2279008-s2n-tls/licensecheck.txt

     Files under licenses other than Apache-2.0 are:

     MIT-0:
       .github/workflows/proof_ci.yaml
       tests/cbmc/proofs/Makefile.common
       tests/cbmc/proofs/lib/print_tool_versions.py
       tests/cbmc/proofs/lib/summarize.py
       tests/cbmc/proofs/run-cbmc-proofs.py

     None of these contributes to the binary RPMs, so MIT-0 correctly does not
     appear in the license expression.

     The detection of "Apache License 2.0 and/or OpenSSL License" is spurious;
     the file codebuild/bin/install_openssl_1_0_2_fips.sh is only Apache-2.0.

[x]: License file installed when any subpackage combination is installed.
[x]: Package requires other packages for directories it uses.
     Note: No known owner of /usr, /usr/src/debug, /usr/share/licenses,
     /usr/lib, /usr/lib64/cmake, /usr/share/doc, /usr/src, /usr/include,
     /usr/lib64, /usr/share

     These diagnostics are spurious (fedora-review bug).

[!]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/include, /usr,
     /usr/src/debug, /usr/lib, /usr/lib64, /usr/share/licenses,
     /usr/lib64/cmake, /usr/src, /usr/share, /usr/share/doc/s2n-tls,
     /usr/share/doc

     These diagnostics are spurious (fedora-review bug), except for
     /usr/share/doc/s2n-tls; the -doc package should own that:

       %dir %{_docdir}/s2n-tls/

[x]: %build honors applicable compiler flags or justifies otherwise.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[x]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Useful -debuginfo package or justification otherwise.
[!]: Package is not known to require an ExcludeArch tag.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10994 bytes in 2 files.
[x]: Package complies to the Packaging Guidelines

     (unless otherwise noted)

[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 does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package must not depend on deprecated() packages.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: 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 s2n-tls-
     libs , s2n-tls-devel
[x]: Package functions as described.

     (tests pass)

[!]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[!]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[!]: Package should compile and build into binary rpms on all supported
     architectures.

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

[x]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

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

Generic:
[ ]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.
     Note: Arch-ed rpms have a total of 1054720 bytes in /usr/share
[x]: Rpmlint is run on debuginfo package(s).
     Note: No rpmlint messages.
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: s2n-tls-1.4.13-1.fc41.x86_64.rpm
          s2n-tls-libs-1.4.13-1.fc41.x86_64.rpm
          s2n-tls-devel-1.4.13-1.fc41.x86_64.rpm
          s2n-tls-doc-1.4.13-1.fc41.x86_64.rpm
          s2n-tls-debugsource-1.4.13-1.fc41.x86_64.rpm
          s2n-tls-1.4.13-1.fc41.src.rpm
=========================================================================================== rpmlint session starts ==========================================================================================
rpmlint: 2.5.0
configuration:
    /usr/lib/python3.12/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.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/tmpzkcve8g5')]
checks: 32, packages: 6

s2n-tls-devel.x86_64: W: no-documentation
s2n-tls.x86_64: E: no-binary
s2n-tls-doc.x86_64: E: no-binary
s2n-tls.x86_64: E: explicit-lib-dependency openssl-libs
===================================================== 6 packages and 0 specfiles checked; 3 errors, 1 warnings, 32 filtered, 3 badness; has taken 0.8 s =====================================================




Rpmlint (debuginfo)
-------------------
Checking: s2n-tls-libs-debuginfo-1.4.13-1.fc41.x86_64.rpm
=========================================================================================== rpmlint session starts ==========================================================================================
rpmlint: 2.5.0
configuration:
    /usr/lib/python3.12/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.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/tmpxisnduk4')]
checks: 32, packages: 1

====================================================== 1 packages and 0 specfiles checked; 0 errors, 0 warnings, 4 filtered, 0 badness; has taken 0.1 s =====================================================





Rpmlint (installed packages)
----------------------------
============================ rpmlint session starts ============================
rpmlint: 2.5.0
configuration:
    /usr/lib/python3.12/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.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: 6

s2n-tls-libs.x86_64: E: unused-direct-shlib-dependency /usr/lib64/libs2n.so.1.0.0 /lib64/libm.so.6
s2n-tls-devel.x86_64: W: no-documentation
s2n-tls.x86_64: E: no-binary
s2n-tls-doc.x86_64: E: no-binary
s2n-tls.x86_64: E: explicit-lib-dependency openssl-libs
 6 packages and 0 specfiles checked; 4 errors, 1 warnings, 32 filtered, 4 badness; has taken 0.7 s 



Source checksums
----------------
https://github.com/aws/s2n-tls/archive/v1.4.13/s2n-tls-1.4.13.tar.gz :
  CHECKSUM(SHA256) this package     : 8b0b36697963d6752e5a1b49e28e393605990d348edf1aef6f39c33164d45edb
  CHECKSUM(SHA256) upstream package : 8b0b36697963d6752e5a1b49e28e393605990d348edf1aef6f39c33164d45edb


Requires
--------
s2n-tls (rpmlib, GLIBC filtered):
    openssl-libs
    s2n-tls-libs(x86-64)

s2n-tls-libs (rpmlib, GLIBC filtered):
    libc.so.6()(64bit)
    libcrypto.so.3()(64bit)
    libcrypto.so.3(OPENSSL_3.0.0)(64bit)
    libgcc_s.so.1()(64bit)
    libgcc_s.so.1(GCC_3.0)(64bit)
    libgcc_s.so.1(GCC_3.3.1)(64bit)
    libm.so.6()(64bit)
    rtld(GNU_HASH)
    s2n-tls(x86-64)

s2n-tls-devel (rpmlib, GLIBC filtered):
    cmake-filesystem(x86-64)
    libs2n.so.1()(64bit)
    openssl-devel
    s2n-tls-libs(x86-64)

s2n-tls-doc (rpmlib, GLIBC filtered):

s2n-tls-debugsource (rpmlib, GLIBC filtered):



Provides
--------
s2n-tls:
    s2n-tls
    s2n-tls(x86-64)

s2n-tls-libs:
    libs2n.so.1()(64bit)
    s2n-tls-libs
    s2n-tls-libs(x86-64)

s2n-tls-devel:
    cmake(s2n)
    s2n-tls-devel
    s2n-tls-devel(x86-64)

s2n-tls-doc:
    s2n-tls-doc
    s2n-tls-doc(x86-64)

s2n-tls-debugsource:
    s2n-tls-debugsource
    s2n-tls-debugsource(x86-64)



Generated by fedora-review 0.10.0 (e79b66b) last change: 2023-07-24
Command line :/usr/bin/fedora-review -b 2279008 --mock-options=--dnf
Buildroot used: fedora-rawhide-x86_64
Active plugins: Shell-api, C/C++, Generic
Disabled plugins: PHP, R, SugarActivity, Java, Haskell, Ocaml, fonts, Python, Perl
Disabled flags: EXARCH, EPEL6, EPEL7, DISTTAG, BATCH

Comment 5 Dominik Wombacher 2024-05-15 12:37:43 UTC
Thanks your valuable and comprehensive review. I really appreciate it and that helped me a lot!

> If s2n-tls-cmake.patch is suitable for offering upstream, please do so. Otherwise, please add a comment briefly explaining what the patch does and why it makes sense for it to be downstream-only.

Not suitable for upstream, comment added.

> The organization into a libs subpackage and a base package with only documentation and license files and a libs package, with a circular dependency between the two, is workable, but unusual and probably more complicated than necessary considering that there are no command-line tools to package in the base package. I think that it would make sense to either:
>    1. put the shared libraries %{_libdir}/libs2n.so.1{,.*} in the base s2n-tls
>       package, and let the -devel package depend on that – the simplest, most
>       “normal” approach – or,
>    2. put the license and small doc files README.md in VERSIONING.rst in the
>       -libs subpackage, and let the base package have no %files section at
>       all, so that no s2n-tls binary package is built

Sounds reasonable and indeed I seem to "over engineer" a bit here. Let me try option 1 :)

> This is correct, and there is nothing wrong with it:
>
>    %dir %{_libdir}/cmake/s2n
>    %dir %{_libdir}/cmake/s2n/modules
>    %dir %{_libdir}/cmake/s2n/shared
>    %{_libdir}/cmake/s2n/*.cmake
>    %{_libdir}/cmake/s2n/modules/*.cmake
>    %{_libdir}/cmake/s2n/shared/*.cmake
>
>  However, you may find it easier to just name the directory and all of its
>  contents:
>
>    %{_libdir}/cmake/s2n/
>
>  The trailing slash is not required but is good style to make it clear that a
>  directory is meant (and it does keep it from matching a file with the same
>  name).

OK that saves a lot of writing and adjusting when files are added in newer releases, thank you!

> The package creates, but does not own, /usr/share/doc/s2n-tls; the -doc
> package needs to own that:
> 
>   %dir %{_docdir}/s2n-tls/

done

> Version 1.4.14 is now available. Please update. It doesn’t look like any
> packaging changes will be required.

done

> It is unnecessary (albeit permissible) to number the sources and patches in Fedora. 

Good to know. I'm a bit of a fan of it when there are multiple sources/patches but as long it's just one I'm going to adjust it.

> The runtime dependency on openssl-libs is already handled by the RPM dependency generators

Understood, lesson learned, only build requirements have to be specific, runtime is automatically handled. Adjusted.

> The dependency on openssl-devel from s2n-tls-devel should be arch-specific.

100% agree, thanks, changed.

>  You can, if you choose, avoid repetition by writing
>
>    Summary:        %{summary}
>
>  in each of the subpackages. Similarly, in the base package, you can write
>
>    %global _description %{expand:
>    s2n-tls is a C99 implementation of the TLS/SSL protocols that is
>    designed to be simple, small, fast, and with security as a priority.}
>
>    %description %{_description}
>
>  and then
>
>    %description doc %{_description}
>
>  and so on.

Like that, makes it indeed much easier and less repetitive, done.

> The package fails to build on i686:

OK that's new, let me drop it then, I don't think it's worth the effort or anything upstream will interested to fix.

> The package also fails to build on s390x due to several test failures:

s390x is know, statement from upstream (related package aws-c-common) is that they not support the platform. I forgot to update this spec. Adjusted.

> It looks like the -doc subpackage contains only arch-independent files. You should make the subpackage noarch

Done.

Spec URL: https://download.copr.fedorainfracloud.org/results/wombelix/aws-c-libs/fedora-rawhide-x86_64/07446364-s2n-tls/s2n-tls.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/wombelix/aws-c-libs/fedora-rawhide-x86_64/07446364-s2n-tls/s2n-tls-1.4.14-1.fc41.src.rpm

Last successful build in my copr project: https://copr.fedorainfracloud.org/coprs/wombelix/aws-c-libs/build/7446364/

Comment 6 Fedora Review Service 2024-05-15 12:58:53 UTC
Created attachment 2033355 [details]
The .spec file difference from Copr build 7403148 to 7446401

Comment 7 Fedora Review Service 2024-05-15 12:58:55 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/7446401
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2279008-s2n-tls/fedora-rawhide-x86_64/07446401-s2n-tls/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 8 Ben Beasley 2024-05-15 15:17:11 UTC
Thanks for your work! This looks much better. There are just a few remaining things before the package is ready to approve.

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

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


Issues:
=======
- Package does not contain duplicates in %files.
  Note: warning: File listed twice: /usr/include/s2n
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/#_duplicate_files

  This:

    %{_includedir}/s2n/

  packages the directory %{_includedir}/s2n/ and everything under it (files,
  directories, whatever).

  Therefore, writing

    %dir %{_includedir}/s2n/
    %{_includedir}/s2n/

  lists the directory %{_includedir}/s2n twice.

  Please remove these redundant/duplicate entries from the %files:

    %dir %{_includedir}/s2n/
    %dir %{_libdir}/cmake/s2n/

  Note that

    %dir %{_docdir}/s2n-tls/
    %{_docdir}/s2n-tls/docs/

  is NOT redundant, because the recursively-packaged directory is a
  subdirectory of the directory packaged with %dir. In the current submission,
  the base package and the -doc subpackage co-own %{_docdir}/s2n-tls/, which is
  exactly correct for how you have things set up.

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

- There is an interesting rpmlint diagnostic,

    s2n-tls.x86_64: E: unused-direct-shlib-dependency /usr/lib64/libs2n.so.1.0.0 /lib64/libm.so.6

  I don’t think anything needs to be done about this. The source uses at least
  pow() from libm. The fact that the call is apparently optimized out is an
  implementation detail that we shouldn’t be relying on when choosing our
  linker flags, and linking libm unnecessarily doesn’t cause any significant
  harm.

- It looks like you accidentally made the BuildRequires on openssl-devel
  arch-specific by adding %{?_isa}. This is *not* a good idea and is
  prohibited, for reasons explained in
  https://docs.fedoraproject.org/en-US/packaging-guidelines/#_buildrequires_and_isa.

  Please remove %{?_isa} from

    BuildRequires:  openssl-devel%{?_isa}

  and put it on 

    %package devel
    Summary:        %{summary}
    Requires:       openssl-devel

  instead.

- The patch comment is helpful, but a brief mention of why it needs to be
  downstream-only would be nice too.

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

C/C++:
[-]: Provides: bundled(gnulib) in place as required.
     Note: Sources not installed
[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", "MIT No Attribution", "Apache License 2.0 and/or
     OpenSSL License". 6827 files have unknown license. Detailed output of
     licensecheck in
     /home/ben/Downloads/review/2279008-s2n-tls/20240515/2279008-s2n-tls/licensecheck.txt

     Files under licenses other than Apache-2.0 are:

     MIT-0:
       .github/workflows/proof_ci.yaml
       tests/cbmc/proofs/Makefile.common
       tests/cbmc/proofs/lib/print_tool_versions.py
       tests/cbmc/proofs/lib/summarize.py
       tests/cbmc/proofs/run-cbmc-proofs.py

     None of these contributes to the binary RPMs, so MIT-0 correctly does not
     appear in the license expression.

     The detection of "Apache License 2.0 and/or OpenSSL License" is spurious;
     the file codebuild/bin/install_openssl_1_0_2_fips.sh is only Apache-2.0.

[x]: License file installed when any subpackage combination is installed.
[x]: Package requires other packages for directories it uses.
     Note: No known owner of /usr/src/debug, /usr/src, /usr/lib,
     /usr/share/licenses, /usr/include, /usr/share, /usr/share/doc,
     /usr/lib64, /usr/lib64/cmake, /usr

     These diagnostics are spurious (fedora-review bug).

[x]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/src/debug,
     /usr/share/doc, /usr/share/licenses, /usr/src, /usr/lib64,
     /usr/include, /usr/lib64/cmake, /usr/share, /usr/lib, /usr

     These diagnostics are spurious (fedora-review bug).

[x]: %build honors applicable compiler flags or justifies otherwise.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[x]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Useful -debuginfo package or justification otherwise.
[-]: Package is not known to require an ExcludeArch tag.

     ExcludeArch present and properly handled/justified; issue for s390x to be
     filed on import.

[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10994 bytes in 2 files.
[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 does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Permissions on files are set properly.
[x]: Package must not depend on deprecated() packages.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: 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 s2n-tls-
     devel
[x]: Package functions as described.

     (tests pass)

[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[!]: Package should compile and build into binary rpms on all supported
     architectures.

     ExcludeArch present and properly handled.

[x]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

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

Generic:
[x]: Rpmlint is run on debuginfo package(s).
     Note: No rpmlint messages.
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: s2n-tls-1.4.14-1.fc41.x86_64.rpm
          s2n-tls-devel-1.4.14-1.fc41.x86_64.rpm
          s2n-tls-doc-1.4.14-1.fc41.noarch.rpm
          s2n-tls-debuginfo-1.4.14-1.fc41.x86_64.rpm
          s2n-tls-debugsource-1.4.14-1.fc41.x86_64.rpm
          s2n-tls-1.4.14-1.fc41.src.rpm
=========================================================================================== rpmlint session starts ==========================================================================================
rpmlint: 2.5.0
configuration:
    /usr/lib/python3.12/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.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/tmp96cp5ks3')]
checks: 32, packages: 6

s2n-tls-devel.x86_64: W: no-documentation
===================================================== 6 packages and 0 specfiles checked; 0 errors, 1 warnings, 30 filtered, 0 badness; has taken 1.3 s =====================================================




Rpmlint (debuginfo)
-------------------
Checking: s2n-tls-debuginfo-1.4.14-1.fc41.x86_64.rpm
=========================================================================================== rpmlint session starts ==========================================================================================
rpmlint: 2.5.0
configuration:
    /usr/lib/python3.12/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.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/tmpugr0q4oe')]
checks: 32, packages: 1

====================================================== 1 packages and 0 specfiles checked; 0 errors, 0 warnings, 5 filtered, 0 badness; has taken 0.2 s =====================================================





Rpmlint (installed packages)
----------------------------
============================ rpmlint session starts ============================
rpmlint: 2.5.0
configuration:
    /usr/lib/python3.12/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.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: 5

s2n-tls.x86_64: E: unused-direct-shlib-dependency /usr/lib64/libs2n.so.1.0.0 /lib64/libm.so.6
s2n-tls-devel.x86_64: W: no-documentation
 5 packages and 0 specfiles checked; 1 errors, 1 warnings, 27 filtered, 1 badness; has taken 1.0 s 



Source checksums
----------------
https://github.com/aws/s2n-tls/archive/v1.4.14/s2n-tls-1.4.14.tar.gz :
  CHECKSUM(SHA256) this package     : 90cd0b7b1e5ebc7e40ba5f810cc24a4d604aa534fac7260dee19a35678e38659
  CHECKSUM(SHA256) upstream package : 90cd0b7b1e5ebc7e40ba5f810cc24a4d604aa534fac7260dee19a35678e38659


Requires
--------
s2n-tls (rpmlib, GLIBC filtered):
    libc.so.6()(64bit)
    libcrypto.so.3()(64bit)
    libcrypto.so.3(OPENSSL_3.0.0)(64bit)
    libgcc_s.so.1()(64bit)
    libgcc_s.so.1(GCC_3.0)(64bit)
    libgcc_s.so.1(GCC_3.3.1)(64bit)
    libm.so.6()(64bit)
    rtld(GNU_HASH)

s2n-tls-devel (rpmlib, GLIBC filtered):
    cmake-filesystem(x86-64)
    libs2n.so.1()(64bit)
    openssl-devel
    s2n-tls(x86-64)

s2n-tls-doc (rpmlib, GLIBC filtered):

s2n-tls-debuginfo (rpmlib, GLIBC filtered):

s2n-tls-debugsource (rpmlib, GLIBC filtered):



Provides
--------
s2n-tls:
    libs2n.so.1()(64bit)
    s2n-tls
    s2n-tls(x86-64)

s2n-tls-devel:
    cmake(s2n)
    s2n-tls-devel
    s2n-tls-devel(x86-64)

s2n-tls-doc:
    s2n-tls-doc

s2n-tls-debuginfo:
    debuginfo(build-id)
    libs2n.so.1.0.0-1.4.14-1.fc41.x86_64.debug()(64bit)
    s2n-tls-debuginfo
    s2n-tls-debuginfo(x86-64)

s2n-tls-debugsource:
    s2n-tls-debugsource
    s2n-tls-debugsource(x86-64)



Generated by fedora-review 0.10.0 (e79b66b) last change: 2023-07-24
Command line :/usr/bin/fedora-review -b 2279008 --mock-options=--dnf
Buildroot used: fedora-rawhide-x86_64
Active plugins: Shell-api, Generic, C/C++
Disabled plugins: R, Haskell, Perl, Java, SugarActivity, fonts, PHP, Ocaml, Python
Disabled flags: EXARCH, EPEL6, EPEL7, DISTTAG, BATCH

Comment 9 Dominik Wombacher 2024-05-15 15:56:00 UTC
> Thanks for your work! This looks much better. There are just a few remaining things before the package is ready to approve.

Thanks for your time and guidance, highly appreciated and a great way to improve my packaging skills :)

>  Package does not contain duplicates in %files.
>  Note: warning: File listed twice: /usr/include/s2n
>  See: https://docs.fedoraproject.org/en-US/packaging-
>  guidelines/#_duplicate_files
>
>  This:
>
>    %{_includedir}/s2n/
>
>  packages the directory %{_includedir}/s2n/ and everything under it (files,
>  directories, whatever).
>
>  Therefore, writing
>
>    %dir %{_includedir}/s2n/
>    %{_includedir}/s2n/
>
>  lists the directory %{_includedir}/s2n twice.
>
>  Please remove these redundant/duplicate entries from the %files:
>
>    %dir %{_includedir}/s2n/
>    %dir %{_libdir}/cmake/s2n/
>
>  Note that
>
>    %dir %{_docdir}/s2n-tls/
>    %{_docdir}/s2n-tls/docs/
>
>  is NOT redundant, because the recursively-packaged directory is a
>  subdirectory of the directory packaged with %dir. In the current submission,
>  the base package and the -doc subpackage co-own %{_docdir}/s2n-tls/, which is
>  exactly correct for how you have things set up.
>
>  https://docs.fedoraproject.org/en-US/packaging-guidelines/#_the_directory_is_owned_by_a_package_which_is_not_required_for_your_package_to_function

Thanks for that 'aha' moment, I think it finally made click and it becomes clear how and when to use which of them. Adjusted.

>  It looks like you accidentally made the BuildRequires on openssl-devel
>  arch-specific by adding %{?_isa}. This is *not* a good idea and is
>  prohibited, for reasons explained in
>  https://docs.fedoraproject.org/en-US/packaging-guidelines/#_buildrequires_and_isa.
>
>  Please remove %{?_isa} from
>
>    BuildRequires:  openssl-devel%{?_isa}
>
>  and put it on 
>
>    %package devel
>    Summary:        %{summary}
>    Requires:       openssl-devel
>
>  instead.

Ups, yep somehow I mixed that up, fixed.

Let's give it another try :) 

Spec URL: https://download.copr.fedorainfracloud.org/results/wombelix/aws-c-libs/fedora-rawhide-x86_64/07446826-s2n-tls/s2n-tls.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/wombelix/aws-c-libs/fedora-rawhide-x86_64/07446826-s2n-tls/s2n-tls-1.4.14-1.fc41.src.rpm

Comment 10 Fedora Review Service 2024-05-15 16:17:52 UTC
Created attachment 2033400 [details]
The .spec file difference from Copr build 7446401 to 7446843

Comment 11 Fedora Review Service 2024-05-15 16:17:55 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/7446843
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2279008-s2n-tls/fedora-rawhide-x86_64/07446843-s2n-tls/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 12 Ben Beasley 2024-05-17 18:10:07 UTC
Approved based on previous review, combined with inspection of the spec-file diff from https://bugzilla.redhat.com/show_bug.cgi?id=2279008#c10, which addressed all outstanding feedback.

Thanks for taking the time to work through all the details here!

Comment 13 Fedora Admin user for bugzilla script actions 2024-05-17 18:47:57 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/s2n-tls


Note You need to log in before you can comment on or make changes to this bug.