Bug 2338150 - Review Request: linux-sgx-enclaves-prebuilt - Intel SGX prebuilt architectural enclaves
Summary: Review Request: linux-sgx-enclaves-prebuilt - Intel SGX prebuilt architectura...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact: Fedora Extras Quality Assurance
URL: https://github.com/intel/linux-sgx
Whiteboard:
Depends On:
Blocks: 2342978
TreeView+ depends on / blocked
 
Reported: 2025-01-15 11:37 UTC by Daniel Berrangé
Modified: 2025-02-05 14:46 UTC (History)
2 users (show)

Fixed In Version: linux-sgx-enclaves-prebuilt-2.25-1.fc43
Clone Of:
Environment:
Last Closed: 2025-02-05 14:46:19 UTC
Type: ---
Embargoed:
rjones: fedora-review+


Attachments (Terms of Use)

Description Daniel Berrangé 2025-01-15 11:37:07 UTC
Spec URL: https://berrange.fedorapeople.org/review/linux-sgx-enclaves-prebuilt/linux-sgx-enclaves-prebuilt.spec
SRPM URL: https://berrange.fedorapeople.org/review/linux-sgx-enclaves-prebuilt/linux-sgx-enclaves-prebuilt-2.25-1.fc41.src.rpm
Description: The Intel SGX prebuilt architectural enclaves bootstrap the SGX hardware for use by applications.
Fedora Account System Username: berrange

Comment 1 Fedora Review Service 2025-01-15 11:39:12 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/8515527
(failed)

Build log:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2338150-linux-sgx-enclaves-prebuilt/fedora-rawhide-x86_64/08515527-linux-sgx-enclaves-prebuilt/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 2 Daniel Berrangé 2025-01-15 11:47:44 UTC
Some background notes to for anyone reviewing

* This package contains pre-built binaries which would ordinarily be disallowed by Fedora. The SGX architectural enclaves, however, are considered to be "firmware for SGX", and thus prebuilt binaries are being allowed under the "Firmware exception". This viewpoint was approved by FESCo in https://pagure.io/fesco/issue/3304

* There were many options for package naming choice. 'linux-sgx' was chosen as a prefix because that matches the upstream project name and source tarball name 'linux-sgx', and 'enclaves-prebuilt' appended, to distinguish this from a different 'linux-sgx' package that will be introduced in a different review ticket

* The prebuilt_dcap_1.22-repacked.tar.gz tarball is NOT a match for prebuilt_dcap_1.22.tar.gz provided by upstream. Upstream tarball has had some content removed by since it contains other non-enclave prebuilt binaries we CAN NOT distribute in Fedora, and one enclave that is known to contain unapproved crypto. THis was automated by https://berrange.fedorapeople.org/review/linux-sgx-enclaves-prebuilt/repack.sh  whic hwill be added to dist-git if this review is approved.

* Don't be fooled by the enclave binary names having '.so', '.so.N' & '.so.N.Y' suffixes. These are not traditional Linux shared libraries. They are static linked archives processed by a custom loader and NOT linked to native applications. rpmlint does not know this though, and so will generate some false positive errors & warnings.

Comment 3 Daniel Berrangé 2025-01-15 12:45:41 UTC
> Copr build:
> https://copr.fedorainfracloud.org/coprs/build/8515527
> (failed)

F40/F41 are expected to fail as they lack build deps and we're only introducing this to rawhide.

Rawhide failed because there's been no compose for 2 days, so again lacking build deps

Koji works 

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

Comment 4 Richard W.M. Jones 2025-02-04 07:27:49 UTC
Wondering out loud if we could rebuild the package anyway, and check the binary
is the same (it's "reproducible" right?) without the Intel signature.  If so, go
with the Intel signed binary.  But that's a ton of extra work.

Comment 5 Daniel Berrangé 2025-02-04 09:15:56 UTC
(In reply to Richard W.M. Jones from comment #4)
> Wondering out loud if we could rebuild the package anyway, and check the
> binary
> is the same (it's "reproducible" right?) without the Intel signature.  If
> so, go
> with the Intel signed binary.  But that's a ton of extra work.

Yes, see notes here:

  https://fedoraproject.org/w/index.php?title=Changes/IntelSGX#Optional_extra:_reproducible_builds

It is a ton of extra work, but I have in fact already done it all. 

  https://gitlab.com/berrange/fedora-sgx-ng-copr/-/tree/main/linux-sgx-enclaves-reproducible2.22
  https://gitlab.com/berrange/fedora-sgx-ng-copr/-/tree/main/linux-sgx-enclaves-reproducible2.23
  https://gitlab.com/berrange/fedora-sgx-ng-copr/-/tree/main/linux-sgx-enclaves-reproducible2.24
  https://gitlab.com/berrange/fedora-sgx-ng-copr/-/tree/main/linux-sgx-enclaves-reproducible2.25
  https://copr.fedorainfracloud.org/coprs/berrange/sgx-ng/monitor/ 

It isn't practical to do it as part of this spec file though, because each individual pre-built enclaves is liable to come from a different SGX source version. The pre-built binaries are only re-issued when security fixes are needed, or when functional changes are introduced. It just happens that currently all enclaves do come from 2.25 sources, but in the past that wasn't the case and probably won't be in the future either. I contacted Intel to request that they *always* re-issue all pre-built enclaves with each release, but they rejected the request.

Once everything else is merged, I'm still considering introducing the reproducible build packages as a followup, and trial it for a few years to see how practical it is, as it is conceptually desirable to prove reproducibility

Comment 6 Richard W.M. Jones 2025-02-05 08:47:36 UTC
BTW you could just add repack.sh as a Source line right now.

Comment 7 Richard W.M. Jones 2025-02-05 09:08:08 UTC
This is an unusual package, but I ran fedora-review on it anyway and here is my review ...

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

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


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++/

Not needed because we don't actually build anything.

- The License field must be a valid SPDX expression.
  Note: Not a valid SPDX expression 'Apache-2.0 AND BSD-2-Clause AND
  BSD-3-Clause AND BSD-4-Clause AND BSD-4-Clause-UC AND GPL-2.0-only AND
  ISC AND MIT AND MIT-0 AND NCSA AND OpenSSL AND SMLNJ AND SunPro AND
  LicenseRef-Public-Domain'.
  See: https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_1

It's claiming this is not valid SPDX, which I'm not sure about.  Maybe there's
some real mistake in there?


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

C/C++:
[x]: Package does not contain kernel modules.

(For a rather narrow definition of kernel module I suppose ...)

[x]: Development (unversioned) .so files in -devel subpackage, if present.
     Note: Unversioned so-files in private %_libdir subdirectory (see
     attachment). Verify they are not in ld path.

These are apparently not real .so files, so that's OK.

[x]: Package does not contain any libtool archives (.la)
[x]: Package contains no static executables.
[x]: Rpath absent or only used for internal libs.

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.

Open source, but bundling a signed binary, which is OK because of the
FESCO exception.

[ ]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "BSD 2-Clause License and/or BSD
     3-Clause License and/or Eclipse Public License 1.0", "BSD 3-Clause
     License", "Eclipse Public License 1.0", "BSD 2-Clause License and/or
     BSD 2-clause NetBSD License", "Apache License 2.0", "*No copyright*
     Apache License 2.0", "FSF Unlimited License [generated file]", "*No
     copyright* zlib License", "University of Illinois/NCSA Open Source
     License", "*No copyright* MIT License", "ISC License", "MIT License",
     "BSD 3-Clause License and/or MIT License", "BSD 2-Clause License",
     "GNU Lesser General Public License v2.1 or later", "Apple Public
     Source License 2.0", "*No copyright* The Unlicense", "BSD 2-clause
     FreeBSD License", "BSD 3-Clause License and/or GNU General Public
     License, Version 2", "BSD 3-Clause License and/or OpenSSL License",
     "Standard ML of New Jersey License", "MIT No Attribution", "BSD
     4-Clause License", "*No copyright* Public domain", "BSD 3-Clause
     License and/or BSD 4-Clause License", "BSD 3-Clause License and/or GNU
     General Public License", "OpenSSL License", "BSD-4-Clause (University
     of California-Specific)", "BSD 3-Clause License and/or Microsoft
     Public License", "*No copyright* BSD 3-Clause License", "FSF All
     Permissive License", "*No copyright* Eclipse Public License 1.0",
     "Boost Software License 1.0", "Apache License 2.0 and/or GNU Lesser
     General Public License, Version 2.1", "GNU General Public License,
     Version 2", "Apache License 2.0 and/or BSD 3-Clause License", "Apache
     License 2.0 and/or BSD 2-Clause License". 1890 files have unknown
     license. Detailed output of licensecheck in /var/tmp/2338150-linux-
     sgx-enclaves-prebuilt/licensecheck.txt

(Possibly wrong, see above)

[x]: License file installed when any subpackage combination is installed.

Yes, licenses are in the -common submodule which is required by the others.

[x]: If the package is under multiple licenses, the licensing breakdown
     must be documented in the spec.
[ ]: Package requires other packages for directories it uses.
     Note: No known owner of /usr/x86_64-intel-sgx, /usr/x86_64-intel-
     sgx/lib64
[ ]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/x86_64-intel-sgx,
     /usr/x86_64-intel-sgx/lib64

This could be a real problem.  Dan, does another package own sgx_libdir?

[x]: %build honors applicable compiler flags or justifies otherwise.

FESCO exception.

[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.

Using autochangelog.

[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[-]: Package uses nothing in %doc for runtime.
[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.
[-]: Useful -debuginfo package or justification otherwise.
[x]: Package is not known to require an ExcludeArch tag.

ExclusiveArch is included & correct.

[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package must not depend on deprecated() packages.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 0 bytes in 0 files.
[x]: Packages must not store files under /srv, /opt or /usr/local

===== SHOULD items =====

Generic:
[!]: Sources can be downloaded from URI in Source: tag
     Note: Could not download Source2: https://download.01.org/intel-
     sgx/sgx-dcap/1.22/linux/prebuilt_dcap_1.22-repacked.tar.gz
     See: https://docs.fedoraproject.org/en-US/packaging-
     guidelines/SourceURL/

I get a 404 for this URL.

[-]: 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).
[ ]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in sgx-
     enclave-prebuilt-common , sgx-enclave-prebuilt-pce-signed , sgx-
     enclave-prebuilt-ide-signed , sgx-enclave-prebuilt-qe3-signed , sgx-
     enclave-prebuilt-tdqe-signed

Unclear, but might this be needed?

[-]: Package functions as described.

I didn't check, but Dan is running this stuff.

[x]: Latest version is packaged.

Yes, latest version is 1.22.

[x]: Package does not include license text files separate from upstream.
[ ]: SourceX tarball generation or download is documented.
     Note: Package contains tarball without URL, check comments

Apart from the 404 problem, I'm not clear what fedora-review is complaining
about here.

[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[-]: %check is present and all tests pass.
[-]: Packages should try to preserve timestamps of original installed
     files.
[-]: Spec use %global instead of %define unless justified.
     Note: %define requiring justification: %define debug_package %{nil},
     %define linux_sgx_version 2.25, %define dcap_version 1.22, %define
     with_enclave_pce 1, %define with_enclave_ide 1, %define
     with_enclave_qe3 1, %define with_enclave_tdqe 1, %define
     with_enclave_qve 0

I don't think this check point is relevant any longer with the latest RPM versions.

[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]: SourceX is a working URL.
[x]: Package should compile and build into binary rpms on all supported
     architectures.

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

Generic:
[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: sgx-enclave-prebuilt-common-2.25-1.fc42.x86_64.rpm
          sgx-enclave-prebuilt-pce-signed-2.25-1.fc42.x86_64.rpm
          sgx-enclave-prebuilt-ide-signed-2.25-1.fc42.x86_64.rpm
          sgx-enclave-prebuilt-qe3-signed-2.25-1.fc42.x86_64.rpm
          sgx-enclave-prebuilt-tdqe-signed-2.25-1.fc42.x86_64.rpm
          linux-sgx-enclaves-prebuilt-2.25-1.fc42.src.rpm
============================ rpmlint session starts ============================
rpmlint: 2.6.1
configuration:
    /usr/lib/python3.13/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/tmp0vf7nptt')]
checks: 32, packages: 6

sgx-enclave-prebuilt-ide-signed.x86_64: E: statically-linked-binary /usr/x86_64-intel-sgx/lib64/libsgx_id_enclave.signed.so.1.19.100.1
sgx-enclave-prebuilt-pce-signed.x86_64: E: statically-linked-binary /usr/x86_64-intel-sgx/lib64/libsgx_pce.signed.so.1.22.100.1
sgx-enclave-prebuilt-qe3-signed.x86_64: E: statically-linked-binary /usr/x86_64-intel-sgx/lib64/libsgx_qe3.signed.so.1.19.100.1
sgx-enclave-prebuilt-tdqe-signed.x86_64: E: statically-linked-binary /usr/x86_64-intel-sgx/lib64/libsgx_tdqe.signed.so.1.19.100.1
sgx-enclave-prebuilt-common.x86_64: W: no-documentation
sgx-enclave-prebuilt-ide-signed.x86_64: W: no-documentation
sgx-enclave-prebuilt-pce-signed.x86_64: W: no-documentation
sgx-enclave-prebuilt-qe3-signed.x86_64: W: no-documentation
sgx-enclave-prebuilt-tdqe-signed.x86_64: W: no-documentation
sgx-enclave-prebuilt-common.x86_64: E: no-binary
linux-sgx-enclaves-prebuilt.spec: W: no-%check-section
linux-sgx-enclaves-prebuilt.src: W: invalid-license LicenseRef-Public-Domain
sgx-enclave-prebuilt-common.x86_64: W: invalid-license LicenseRef-Public-Domain
sgx-enclave-prebuilt-ide-signed.x86_64: W: invalid-license LicenseRef-Public-Domain
sgx-enclave-prebuilt-pce-signed.x86_64: W: invalid-license LicenseRef-Public-Domain
sgx-enclave-prebuilt-qe3-signed.x86_64: W: invalid-license LicenseRef-Public-Domain
sgx-enclave-prebuilt-tdqe-signed.x86_64: W: invalid-license LicenseRef-Public-Domain
sgx-enclave-prebuilt-ide-signed.x86_64: W: devel-file-in-non-devel-package /usr/x86_64-intel-sgx/lib64/libsgx_id_enclave.signed.so
sgx-enclave-prebuilt-pce-signed.x86_64: W: devel-file-in-non-devel-package /usr/x86_64-intel-sgx/lib64/libsgx_pce.signed.so
sgx-enclave-prebuilt-qe3-signed.x86_64: W: devel-file-in-non-devel-package /usr/x86_64-intel-sgx/lib64/libsgx_qe3.signed.so
sgx-enclave-prebuilt-tdqe-signed.x86_64: W: devel-file-in-non-devel-package /usr/x86_64-intel-sgx/lib64/libsgx_tdqe.signed.so
 6 packages and 0 specfiles checked; 5 errors, 16 warnings, 31 filtered, 5 badness; has taken 0.5 s 




Rpmlint (installed packages)
----------------------------
============================ rpmlint session starts ============================
rpmlint: 2.6.1
configuration:
    /usr/lib/python3.13/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: 5

sgx-enclave-prebuilt-qe3-signed.x86_64: E: statically-linked-binary /usr/x86_64-intel-sgx/lib64/libsgx_qe3.signed.so.1.19.100.1
sgx-enclave-prebuilt-pce-signed.x86_64: E: statically-linked-binary /usr/x86_64-intel-sgx/lib64/libsgx_pce.signed.so.1.22.100.1
sgx-enclave-prebuilt-tdqe-signed.x86_64: E: statically-linked-binary /usr/x86_64-intel-sgx/lib64/libsgx_tdqe.signed.so.1.19.100.1
sgx-enclave-prebuilt-ide-signed.x86_64: E: statically-linked-binary /usr/x86_64-intel-sgx/lib64/libsgx_id_enclave.signed.so.1.19.100.1
sgx-enclave-prebuilt-qe3-signed.x86_64: W: no-documentation
sgx-enclave-prebuilt-common.x86_64: W: no-documentation
sgx-enclave-prebuilt-pce-signed.x86_64: W: no-documentation
sgx-enclave-prebuilt-tdqe-signed.x86_64: W: no-documentation
sgx-enclave-prebuilt-ide-signed.x86_64: W: no-documentation
sgx-enclave-prebuilt-common.x86_64: E: no-binary
sgx-enclave-prebuilt-qe3-signed.x86_64: W: invalid-license LicenseRef-Public-Domain
sgx-enclave-prebuilt-common.x86_64: W: invalid-license LicenseRef-Public-Domain
sgx-enclave-prebuilt-pce-signed.x86_64: W: invalid-license LicenseRef-Public-Domain
sgx-enclave-prebuilt-tdqe-signed.x86_64: W: invalid-license LicenseRef-Public-Domain
sgx-enclave-prebuilt-ide-signed.x86_64: W: invalid-license LicenseRef-Public-Domain
sgx-enclave-prebuilt-qe3-signed.x86_64: W: devel-file-in-non-devel-package /usr/x86_64-intel-sgx/lib64/libsgx_qe3.signed.so
sgx-enclave-prebuilt-pce-signed.x86_64: W: devel-file-in-non-devel-package /usr/x86_64-intel-sgx/lib64/libsgx_pce.signed.so
sgx-enclave-prebuilt-tdqe-signed.x86_64: W: devel-file-in-non-devel-package /usr/x86_64-intel-sgx/lib64/libsgx_tdqe.signed.so
sgx-enclave-prebuilt-ide-signed.x86_64: W: devel-file-in-non-devel-package /usr/x86_64-intel-sgx/lib64/libsgx_id_enclave.signed.so
 5 packages and 0 specfiles checked; 5 errors, 14 warnings, 27 filtered, 5 badness; has taken 0.1 s 



Unversioned so-files
--------------------
sgx-enclave-prebuilt-pce-signed: /usr/x86_64-intel-sgx/lib64/libsgx_pce.signed.so
sgx-enclave-prebuilt-ide-signed: /usr/x86_64-intel-sgx/lib64/libsgx_id_enclave.signed.so
sgx-enclave-prebuilt-qe3-signed: /usr/x86_64-intel-sgx/lib64/libsgx_qe3.signed.so
sgx-enclave-prebuilt-tdqe-signed: /usr/x86_64-intel-sgx/lib64/libsgx_tdqe.signed.so

Source checksums
----------------
https://github.com/intel/SGXDataCenterAttestationPrimitives/archive/refs/tags/dcap_1.22_reproducible.tar.gz :
  CHECKSUM(SHA256) this package     : 0110b2d430a7b45d88caba673b816f7e62e8d03e2885fd416b3b1612266cab28
  CHECKSUM(SHA256) upstream package : 0110b2d430a7b45d88caba673b816f7e62e8d03e2885fd416b3b1612266cab28
https://github.com/intel/linux-sgx/archive/refs/tags/sgx_2.25_reproducible.tar.gz#/linux-sgx-2.25-reproducible.tar.gz :
  CHECKSUM(SHA256) this package     : daea19fd5a61941b3e3203cdc93ad0115c6b750e1316fb444d63c257d123f5c9
  CHECKSUM(SHA256) upstream package : daea19fd5a61941b3e3203cdc93ad0115c6b750e1316fb444d63c257d123f5c9


Requires
--------
sgx-enclave-prebuilt-common (rpmlib, GLIBC filtered):

sgx-enclave-prebuilt-pce-signed (rpmlib, GLIBC filtered):
    sgx-enclave-prebuilt-common

sgx-enclave-prebuilt-ide-signed (rpmlib, GLIBC filtered):
    sgx-enclave-prebuilt-common

sgx-enclave-prebuilt-qe3-signed (rpmlib, GLIBC filtered):
    sgx-enclave-prebuilt-common

sgx-enclave-prebuilt-tdqe-signed (rpmlib, GLIBC filtered):
    sgx-enclave-prebuilt-common



Provides
--------
sgx-enclave-prebuilt-common:
    sgx-enclave-prebuilt-common
    sgx-enclave-prebuilt-common(x86-64)

sgx-enclave-prebuilt-pce-signed:
    sgx-enclave(pce:signed)
    sgx-enclave(pce:signed:prebuilt)
    sgx-enclave-prebuilt-pce-signed
    sgx-enclave-prebuilt-pce-signed(x86-64)

sgx-enclave-prebuilt-ide-signed:
    sgx-enclave(ide:signed)
    sgx-enclave(ide:signed:prebuilt)
    sgx-enclave-prebuilt-ide-signed
    sgx-enclave-prebuilt-ide-signed(x86-64)

sgx-enclave-prebuilt-qe3-signed:
    libsgx_qe3.signed.so.1(qe3_enclave.so)(64bit)
    sgx-enclave(qe3:signed)
    sgx-enclave(qe3:signed:prebuilt)
    sgx-enclave-prebuilt-qe3-signed
    sgx-enclave-prebuilt-qe3-signed(x86-64)

sgx-enclave-prebuilt-tdqe-signed:
    sgx-enclave(tdqe:signed)
    sgx-enclave(tdqe:signed:prebuilt)
    sgx-enclave-prebuilt-tdqe-signed
    sgx-enclave-prebuilt-tdqe-signed(x86-64)



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

Comment 8 Daniel Berrangé 2025-02-05 11:40:30 UTC
(In reply to Richard W.M. Jones from comment #7)
> - The License field must be a valid SPDX expression.
>   Note: Not a valid SPDX expression 'Apache-2.0 AND BSD-2-Clause AND
>   BSD-3-Clause AND BSD-4-Clause AND BSD-4-Clause-UC AND GPL-2.0-only AND
>   ISC AND MIT AND MIT-0 AND NCSA AND OpenSSL AND SMLNJ AND SunPro AND
>   LicenseRef-Public-Domain'.
>   See: https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_1
> 
> It's claiming this is not valid SPDX, which I'm not sure about.  Maybe
> there's
> some real mistake in there?

Last term should be "LicenseRef-Fedora-Public-Domain"

> [x]: Development (unversioned) .so files in -devel subpackage, if present.
>      Note: Unversioned so-files in private %_libdir subdirectory (see
>      attachment). Verify they are not in ld path.
> 
> These are apparently not real .so files, so that's OK.

Yep, its just intel's weird choice of file extension - its actually an
ELF application rather than ELF shared library, but its still not actually
an ELF application in the Fedora/glibc sense.

> [ ]: License field in the package spec file matches the actual license.
>      Note: Checking patched sources after %prep for licenses. Licenses
>      found: "Unknown or generated", "BSD 2-Clause License and/or BSD
>      3-Clause License and/or Eclipse Public License 1.0", "BSD 3-Clause
>      License", "Eclipse Public License 1.0", "BSD 2-Clause License and/or
>      BSD 2-clause NetBSD License", "Apache License 2.0", "*No copyright*
>      Apache License 2.0", "FSF Unlimited License [generated file]", "*No
>      copyright* zlib License", "University of Illinois/NCSA Open Source
>      License", "*No copyright* MIT License", "ISC License", "MIT License",
>      "BSD 3-Clause License and/or MIT License", "BSD 2-Clause License",
>      "GNU Lesser General Public License v2.1 or later", "Apple Public
>      Source License 2.0", "*No copyright* The Unlicense", "BSD 2-clause
>      FreeBSD License", "BSD 3-Clause License and/or GNU General Public
>      License, Version 2", "BSD 3-Clause License and/or OpenSSL License",
>      "Standard ML of New Jersey License", "MIT No Attribution", "BSD
>      4-Clause License", "*No copyright* Public domain", "BSD 3-Clause
>      License and/or BSD 4-Clause License", "BSD 3-Clause License and/or GNU
>      General Public License", "OpenSSL License", "BSD-4-Clause (University
>      of California-Specific)", "BSD 3-Clause License and/or Microsoft
>      Public License", "*No copyright* BSD 3-Clause License", "FSF All
>      Permissive License", "*No copyright* Eclipse Public License 1.0",
>      "Boost Software License 1.0", "Apache License 2.0 and/or GNU Lesser
>      General Public License, Version 2.1", "GNU General Public License,
>      Version 2", "Apache License 2.0 and/or BSD 3-Clause License", "Apache
>      License 2.0 and/or BSD 2-Clause License". 1890 files have unknown
>      license. Detailed output of licensecheck in /var/tmp/2338150-linux-
>      sgx-enclaves-prebuilt/licensecheck.txt
> 
> (Possibly wrong, see above)

The source tarballs do indeed containing files under many more
licenses. In the License tag, I've only included licenses for
the subset of source files that are used for building the
enclaves on Linux. IOW, I've excluded licenses that are only
relevant to host OS software, or only relevant to Windows
builds.


> [x]: If the package is under multiple licenses, the licensing breakdown
>      must be documented in the spec.
> [ ]: Package requires other packages for directories it uses.
>      Note: No known owner of /usr/x86_64-intel-sgx, /usr/x86_64-intel-
>      sgx/lib64
> [ ]: Package must own all directories that it creates.
>      Note: Directories without known owners: /usr/x86_64-intel-sgx,
>      /usr/x86_64-intel-sgx/lib64
> 
> This could be a real problem.  Dan, does another package own sgx_libdir?

No, this package should own those dirs.

> ===== SHOULD items =====
> 
> Generic:
> [!]: Sources can be downloaded from URI in Source: tag
>      Note: Could not download Source2: https://download.01.org/intel-
>      sgx/sgx-dcap/1.22/linux/prebuilt_dcap_1.22-repacked.tar.gz
>      See: https://docs.fedoraproject.org/en-US/packaging-
>      guidelines/SourceURL/
> 
> I get a 404 for this URL.

Yep, the real URL lacks the '-repacked' suffix. 

I'll strip the URL from the Source line and just put it in
a comment before, so we distinguish genuine upstream URL
from the re-packed tarball.

I'll also add 'repack.sh' as a Source as you suggested earlier

> [ ]: Fully versioned dependency in subpackages if applicable.
>      Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in sgx-
>      enclave-prebuilt-common , sgx-enclave-prebuilt-pce-signed , sgx-
>      enclave-prebuilt-ide-signed , sgx-enclave-prebuilt-qe3-signed , sgx-
>      enclave-prebuilt-tdqe-signed
> 
> Unclear, but might this be needed?

There is no '%{name}' output package, only "%{name}-common", that
we depend on for the licenses.

> [ ]: SourceX tarball generation or download is documented.
>      Note: Package contains tarball without URL, check comments
> 
> Apart from the 404 problem, I'm not clear what fedora-review is complaining
> about here.

Probably got confused by the 404, which I'll fix

> [-]: Spec use %global instead of %define unless justified.
>      Note: %define requiring justification: %define debug_package %{nil},
>      %define linux_sgx_version 2.25, %define dcap_version 1.22, %define
>      with_enclave_pce 1, %define with_enclave_ide 1, %define
>      with_enclave_qe3 1, %define with_enclave_tdqe 1, %define
>      with_enclave_qve 0
> 
> I don't think this check point is relevant any longer with the latest RPM
> versions.

%define is just my historical habit , I can use %global instead

> sgx-enclave-prebuilt-ide-signed.x86_64: E: statically-linked-binary
> /usr/x86_64-intel-sgx/lib64/libsgx_id_enclave.signed.so.1.19.100.1
> sgx-enclave-prebuilt-pce-signed.x86_64: E: statically-linked-binary
> /usr/x86_64-intel-sgx/lib64/libsgx_pce.signed.so.1.22.100.1
> sgx-enclave-prebuilt-qe3-signed.x86_64: E: statically-linked-binary
> /usr/x86_64-intel-sgx/lib64/libsgx_qe3.signed.so.1.19.100.1
> sgx-enclave-prebuilt-tdqe-signed.x86_64: E: statically-linked-binary
> /usr/x86_64-intel-sgx/lib64/libsgx_tdqe.signed.so.1.19.100.1

False positives, these aren't normal so files

> sgx-enclave-prebuilt-common.x86_64: W: no-documentation
> sgx-enclave-prebuilt-ide-signed.x86_64: W: no-documentation
> sgx-enclave-prebuilt-pce-signed.x86_64: W: no-documentation
> sgx-enclave-prebuilt-qe3-signed.x86_64: W: no-documentation
> sgx-enclave-prebuilt-tdqe-signed.x86_64: W: no-documentation

N/A

> sgx-enclave-prebuilt-common.x86_64: E: no-binary

While we could make the license common package noarch it is
fairly pointless since the overall package is ExclusiveArch
for x86_64.

> linux-sgx-enclaves-prebuilt.spec: W: no-%check-section

Not applicable

> linux-sgx-enclaves-prebuilt.src: W: invalid-license LicenseRef-Public-Domain
> sgx-enclave-prebuilt-common.x86_64: W: invalid-license
> LicenseRef-Public-Domain
> sgx-enclave-prebuilt-ide-signed.x86_64: W: invalid-license
> LicenseRef-Public-Domain
> sgx-enclave-prebuilt-pce-signed.x86_64: W: invalid-license
> LicenseRef-Public-Domain
> sgx-enclave-prebuilt-qe3-signed.x86_64: W: invalid-license
> LicenseRef-Public-Domain
> sgx-enclave-prebuilt-tdqe-signed.x86_64: W: invalid-license
> LicenseRef-Public-Domain

To be fixed to LicenseRef-Fedora-Public-Domain

> sgx-enclave-prebuilt-ide-signed.x86_64: W: devel-file-in-non-devel-package
> /usr/x86_64-intel-sgx/lib64/libsgx_id_enclave.signed.so
> sgx-enclave-prebuilt-pce-signed.x86_64: W: devel-file-in-non-devel-package
> /usr/x86_64-intel-sgx/lib64/libsgx_pce.signed.so
> sgx-enclave-prebuilt-qe3-signed.x86_64: W: devel-file-in-non-devel-package
> /usr/x86_64-intel-sgx/lib64/libsgx_qe3.signed.so
> sgx-enclave-prebuilt-tdqe-signed.x86_64: W: devel-file-in-non-devel-package
> /usr/x86_64-intel-sgx/lib64/libsgx_tdqe.signed.so

False positive, these aren't normal so files.

> 
> Unversioned so-files
> --------------------
> sgx-enclave-prebuilt-pce-signed:
> /usr/x86_64-intel-sgx/lib64/libsgx_pce.signed.so
> sgx-enclave-prebuilt-ide-signed:
> /usr/x86_64-intel-sgx/lib64/libsgx_id_enclave.signed.so
> sgx-enclave-prebuilt-qe3-signed:
> /usr/x86_64-intel-sgx/lib64/libsgx_qe3.signed.so
> sgx-enclave-prebuilt-tdqe-signed:
> /usr/x86_64-intel-sgx/lib64/libsgx_tdqe.signed.so

False positive, these aren't normal so files

Comment 10 Fedora Review Service 2025-02-05 12:10:52 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/8608884
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2338150-linux-sgx-enclaves-prebuilt/fedora-rawhide-x86_64/08608884-linux-sgx-enclaves-prebuilt/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 11 Richard W.M. Jones 2025-02-05 12:50:20 UTC
The updated package fixes the license line & the directory ownership.

*** This package is APPROVED for Fedora by rjones ***

Comment 12 Fedora Admin user for bugzilla script actions 2025-02-05 12:56:02 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/linux-sgx-enclaves-prebuilt


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