Bug 2571877

Summary: Review Request: python-logfire-api - Shim for the Logfire SDK which does nothing unless Logfire is installed
Product: [Fedora] Fedora Reporter: Miroslav Suchý <msuchy>
Component: Package ReviewAssignee: Ben Beasley <code>
Status: RELEASE_PENDING --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: code, package-review
Target Milestone: ---Flags: code: fedora-review+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Miroslav Suchý 2026-11-11 19:30:05 UTC
Spec URL: https://miroslav.suchy.cz/fedora/python-logfire-api.spec
SRPM URL: https://miroslav.suchy.cz/fedora/python-logfire-api-5.5.0-1.fc45.src.rpm
Description: 
Shim for the logfire SDK Python API which does nothing unless logfire is installed.

This package is designed to be used by packages that want to provide opt-in integration with Logfire.

The package provides a clone of the Python API exposed by the logfire package which does nothing if the logfire package is not installed, but makes real calls when it is.
Fedora Account System Username: msuchy

Comment 1 Ben Beasley 2026-11-18 10:35:58 UTC
This is cleanly packaged, but the license text is missing, and that must be dealt with. See below for details and other discussion.

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

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

===== Issues =====

- Version 5.6.0 is available. Please update. Looking at the source diff, this
  shoudn’t require any packaging changes.

- The chosen MIT license requires the copyright and permission notices (the
  license text) to be included in all copies, but it’s missing from the PyPI
  sdist.

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

  You should file an issue and/or PR upstream asking them to correct this by
  including a copy of the LICENSE file from the root of the monorepo.

  While you wait for that, it would be reasonable to include the license file
  yourself, since it’s clear that it’s the intended text.

    Source0:        %{pypi_source logfire_api}
    # Title of the issue about the missing license text
    # https://github.com/pydantic/logfire/issues/123456789
    Source1:        https://github.com/pydantic/logfire/raw/refs/tags/v%{version}/LICENSE

    […]
    BuildOption(install): --assert-license logfire_api
    […]

    %prep -a
    # Copy in missing license text
    cp --preserve '%{SOURCE1}' .

- You should package the README as documentation:

    %files -n python3-logfire-api -f %{pyproject_files}
    %doc README.md

===== Notes (no change required for approval) =====

- You don’t need the explicit BuildRequires on python3-devel when you are using
  %pyproject_buildrequires, either explicitly or implicitly via the pyproject
  declarative buildsystem. Leaving it in is neither wrong nor harmful.

- Normally, there would be an argument for packaging this from the GitHub
  archive even though it contains a lot of unnecessary things,

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

    Packages MAY use sources from PyPI.
    
    However, packages SHOULD NOT use an archive that omits test suites,
    licenses and/or documentation present in other source archives.

  and indeed, tests/test_logfire_api.py in the monorepo appears to cover this
  package. However, I notice that this test file imports from
  opentelemetry.instrumentation
  (https://pypi.org/project/opentelemetry-instrumentation/), which isn’t
  packaged, so the implicit %pyproject_check_import “smoke test” is all you
  would be able to run in the end anyway.

  Considering that, the PyPI sdist here is just as good, simpler, smaller, and
  keeps you from having to audit licenses of the entire contents of the
  monorepo. Therefore, I don’t recommend a change here, but perhaps the absence
  of tests deserves a brief explanatory/justifying comment in the spec file.

- This comment is really helpful, and I appreciate you adding it:

    # The sources are https://github.com/pydantic/logfire/tree/main/logfire-api

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

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[-]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.

     The MIT license text is required. See Issues.

[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". 127 files have unknown license.
     Detailed output of licensecheck in
     /home/ben/fedora/review/2571877-python-logfire-api/licensecheck.txt
[x]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/lib/python3.15,
     /usr/lib/python3.15/site-packages

     OK: this is a spurious diagnostic; python3-libs owns these.

[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.
[-]: 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]: 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]: The License field must be a valid SPDX expression.
[x]: Package requires other packages for directories it uses.
[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

Python:
[x]: Python eggs must not download any dependencies during the build
     process.
[x]: A package which is used by another package via an egg interface should
     provide egg info.
[x]: Package meets the Packaging Guidelines::Python
[x]: Package contains BR: python2-devel or python3-devel
[x]: Packages MUST NOT have dependencies (either build-time or runtime) on
     packages named with the unversioned python- prefix unless no properly
     versioned package exists. Dependencies on Python packages instead MUST
     use names beginning with python2- or python3- as appropriate.
[x]: Python packages must not contain %{pythonX_site(lib|arch)}/* in %files
[x]: Binary eggs must be removed in %prep

===== 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.

     See Issues. For MIT, the license text is required.

[x]: Final provides and requires are sane (see attachments).
[?]: Package functions as described.

     Tests are not included, and necessary test dependencies aren’t available.

[!]: Latest version is packaged.

     A trivial update to 5.6.0 is available.

[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.
[?]: Package should compile and build into binary rpms on all supported
     architectures.

     This package doesn’t contain the types of code (binary format I/O, math on
     packed numeric arrays, floating-point numerical methods) that is likely to
     have architecture-dependent failures.

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

     Only an import “smoke test” is present. Tests are not included, and
     necessary test dependencies aren’t available.

[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 all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: python3-logfire-api-5.5.0-1.fc46.noarch.rpm
          python-logfire-api-5.5.0-1.fc46.src.rpm
============================ rpmlint session starts ============================
rpmlint: 2.9.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
rpmlintrc: [PosixPath('/tmp/tmp7e5ycchv')]
checks: 32, packages: 2

python3-logfire-api.noarch: E: zero-length /usr/lib/python3.15/site-packages/logfire_api/_internal/exporters/__init__.pyi
python3-logfire-api.noarch: E: zero-length /usr/lib/python3.15/site-packages/logfire_api/_internal/integrations/__init__.pyi
python3-logfire-api.noarch: E: zero-length /usr/lib/python3.15/site-packages/logfire_api/experimental/__init__.pyi
python3-logfire-api.noarch: E: zero-length /usr/lib/python3.15/site-packages/logfire_api/integrations/__init__.pyi
python3-logfire-api.noarch: W: no-documentation
 2 packages and 0 specfiles checked; 4 errors, 1 warnings, 18 filtered, 4 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: 1

python3-logfire-api.noarch: E: zero-length /usr/lib/python3.15/site-packages/logfire_api/_internal/exporters/__init__.pyi
python3-logfire-api.noarch: E: zero-length /usr/lib/python3.15/site-packages/logfire_api/_internal/integrations/__init__.pyi
python3-logfire-api.noarch: E: zero-length /usr/lib/python3.15/site-packages/logfire_api/experimental/__init__.pyi
python3-logfire-api.noarch: E: zero-length /usr/lib/python3.15/site-packages/logfire_api/integrations/__init__.pyi
python3-logfire-api.noarch: W: no-documentation
 1 packages and 0 specfiles checked; 4 errors, 1 warnings, 14 filtered, 4 badness; has taken 0.0 s 



Source checksums
----------------
https://files.pythonhosted.org/packages/source/l/logfire_api/logfire_api-5.5.0.tar.gz :
  CHECKSUM(SHA256) this package     : 175b968fdfe31c39248b7afb07529bcd3ecbb44933aa882b0e66e6cd3bc7c2e1
  CHECKSUM(SHA256) upstream package : 175b968fdfe31c39248b7afb07529bcd3ecbb44933aa882b0e66e6cd3bc7c2e1


Requires
--------
python3-logfire-api (rpmlib, GLIBC filtered):
    python(abi)



Provides
--------
python3-logfire-api:
    python-logfire-api
    python3-logfire-api
    python3.15-logfire-api
    python3.15dist(logfire-api)
    python3dist(logfire-api)



Generated by fedora-review 0.12.0 (a08f0fc) last change: 2026-09-18
Command line :/usr/bin/fedora-review -b 2571877
Buildroot used: fedora-rawhide-x86_64
Active plugins: Shell-api, Generic, Python
Disabled plugins: fonts, Haskell, Perl, Java, Ocaml, R, C/C++, SugarActivity, PHP
Disabled flags: EXARCH, EPEL6, EPEL7, DISTTAG, BATCH, UNRETIREMENT

Comment 2 Miroslav Suchý 2026-11-19 08:21:27 UTC
Thank you for the review.
I addressed all the comments, but that BR of python3-devel that I decided to keep.

Spec URL: https://miroslav.suchy.cz/fedora/python-logfire-api.spec
SRPM URL: https://miroslav.suchy.cz/fedora/python-logfire-api-5.6.0-1.fc45.src.rpm

Comment 3 Ben Beasley 2026-11-19 12:17:40 UTC
By inspection of the spec-file diff, all of the feedback from the previous review was addressed:

--- ../../2571877-python-logfire-api/srpm-unpacked/python-logfire-api.spec      2026-11-11 00:00:00.000000000 +0000
+++ srpm-unpacked/python-logfire-api.spec       2026-11-19 00:00:00.000000000 +0000
@@ -1,5 +1,5 @@
 Name:           python-logfire-api
-Version:        5.5.0
+Version:        5.6.0
 Release:        %autorelease
 Summary:        Shim for the Logfire SDK which does nothing unless Logfire is installed
 
@@ -7,9 +7,12 @@
 # The sources are https://github.com/pydantic/logfire/tree/main/logfire-api
 URL:            https://pypi.org/project/logfire-api/
 Source:         %{pypi_source logfire_api}
+# Include LICENSE file in logfire-api PyPI tarball
+# https://github.com/pydantic/logfire/pull/2839
+Source1:        https://github.com/pydantic/logfire/raw/refs/tags/v%{version}/LICENSE
 
 BuildSystem:    pyproject
-BuildOption(install):  logfire_api
+BuildOption(install):  --assert-license logfire_api
 
 BuildArch:      noarch
 BuildRequires:  python3-devel
@@ -35,8 +38,15 @@
 %description -n python3-logfire-api %_description
 
 
-%files -n python3-logfire-api -f %{pyproject_files}
+%prep -a
+# Copy in missing license text
+cp --preserve '%{SOURCE1}' .
+
+# upstream test are not in pypi archive and uses opentelemetry.instrumentation
+# that is not package. So leaving just to check_import.
 
+%files -n python3-logfire-api -f %{pyproject_files}
+%doc README.md
 
 %changelog
 %autochangelog

Furthermore, neither fedora-review nor rpmlint produced any new diagnostics.

The package is therefore APPROVED.

Comment 4 Miroslav Suchý 2026-11-19 17:02:54 UTC
Thank you.

Comment 5 Fedora Admin user for bugzilla script actions 2026-11-19 17:03:51 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/python-logfire-api
Monitoring:
Wasn't able to create project in Anitya. You can create it manually on: `https://release-monitoring.org`