Bug 2156932 - Review Request: python-sgp4 - Compute position and velocity of earth-orbiting satellites
Summary: Review Request: python-sgp4 - Compute position and velocity of earth-orbiting...
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Benson Muite
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2022-12-29 17:22 UTC by Mattia Verga
Modified: 2023-07-09 17:42 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2023-07-09 17:42:54 UTC
Type: ---
benson_muite: fedora-review+

Attachments (Terms of Use)

Description Mattia Verga 2022-12-29 17:22:11 UTC
Spec URL: https://mattia.fedorapeople.org/python-sgp4/python-sgp4.spec
SRPM URL: https://mattia.fedorapeople.org/python-sgp4/python-sgp4-2.21-1.fc38.src.rpm
Description: This Python package computes the position and velocity of an earth-orbiting
satellite, given the satellite’s TLE orbital elements from a source like
CelesTrak. It implements the most recent version of SGP4, and is regularly
run against the SGP4 test suite to make sure that its satellite position
predictions agree to within 0.1 mm with the predictions of the standard
distribution of the algorithm. This error is far less than the 1–3 km/day
by which satellites themselves deviate from the ideal orbits described in
TLE files.
Fedora Account System Username: mattia

COPR scratch build with example review: https://copr.fedorainfracloud.org/coprs/mattia/Testing/build/5188372/

Comment 1 Benson Muite 2023-02-09 13:15:39 UTC
Package Review

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

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

[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[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.
[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]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.

[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "MIT License", "*No copyright* MIT License", "Unknown or
     generated". 21 files have unknown license. Detailed output of
     licensecheck in /home/FedoraPackaging/reviews/python-spg4/2156932-
[x]: License file installed when any subpackage combination is installed.
[x]: %build honors applicable compiler flags or justifies otherwise.
[?]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[?]: 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
[x]: Package is named according to the Package Naming Guidelines.
[ ]: 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.
[ ]: 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 requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: 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
[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
[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

[x]: Python eggs must not download any dependencies during the build
[ ]: A package which is used by another package via an egg interface should
     provide egg info.
[ ]: 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 =====

[-]: 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
[ ]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[ ]: Package should compile and build into binary rpms on all supported
[x]: %check is present and all tests pass.
[ ]: Packages should try to preserve timestamps of original installed
[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
[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 =====

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

Checking: python3-sgp4-2.21-1.fc38.x86_64.rpm
============================ rpmlint session starts ============================
rpmlint: 2.4.0
rpmlintrc: [PosixPath('/tmp/tmpvgpig4x0')]
checks: 31, packages: 3

python-sgp4.src: W: strange-permission python-sgp4.spec 600
python3-sgp4.x86_64: W: no-documentation
 3 packages and 0 specfiles checked; 0 errors, 2 warnings, 0 badness; has taken 8.5 s 

Rpmlint (installed packages)
============================ rpmlint session starts ============================
rpmlint: 2.4.0
checks: 31, packages: 2

python3-sgp4.x86_64: W: no-documentation
 2 packages and 0 specfiles checked; 0 errors, 1 warnings, 0 badness; has taken 1.7 s 

Unversioned so-files
python3-sgp4: /usr/lib64/python3.11/site-packages/sgp4/vallado_cpp.cpython-311-x86_64-linux-gnu.so

Source checksums
https://files.pythonhosted.org/packages/source/s/sgp4/sgp4-2.21.tar.gz :
  CHECKSUM(SHA256) this package     : 6179b875044877e941633c20af7722fd231a88d8a89af01bf30bd64f33cdecef
  CHECKSUM(SHA256) upstream package : 6179b875044877e941633c20af7722fd231a88d8a89af01bf30bd64f33cdecef

python3-sgp4 (rpmlib, GLIBC filtered):

python-sgp4-debugsource (rpmlib, GLIBC filtered):



Generated by fedora-review 0.9.0 (6761b6c) last change: 2022-08-23
Command line :/usr/bin/fedora-review -b 2156932
Buildroot used: fedora-rawhide-x86_64
Active plugins: C/C++, Python, Shell-api, Generic
Disabled plugins: SugarActivity, fonts, Ruby, Ocaml, PHP, R, Perl, Haskell, Java

a) Can you check builds on other architectures in Copr? Aarch64, S390x
b) Could 
be used for the library rather than bundling the C++ file?
c) Under what license is http://celestrak.com/publications/AIAA/2006-6753/AIAA-2006-6753.zip
under? Upstream Python library should probably reference this as the source of the C++
code and perhaps cite associated paper.
d) No Requires: %{name}%{?_isa} = %{version}-%{release} in python3-sgp4

Comment 2 Mattia Verga 2023-02-12 09:19:58 UTC
(In reply to Benson Muite from comment #1)
> Comments:
> a) Can you check builds on other architectures in Copr? Aarch64, S390x


> b) Could 
> http://celestrak.com/publications/AIAA/2006-6753/AIAA-2006-6753.zip
> be used for the library rather than bundling the C++ file?

Hardly. To unbundle sgp4 code would need to write and provide a Makefile ourselves, since upstream only provides Visual Studio project file. And I'm not going to attempt that, as I don't know how to do that.
I should have, however, put a "Provides: bundled()" tag, will fix that.

> c) Under what license is
> http://celestrak.com/publications/AIAA/2006-6753/AIAA-2006-6753.zip
> under? Upstream Python library should probably reference this as the source
> of the C++
> code and perhaps cite associated paper.

I assume it is Public Domain. From upstream FAQ at https://celestrak.org/publications/AIAA/2006-6753/faq.php :
"There is no license associated with the code and you may use it for any purpose—personal or commercial—as you wish. We ask only that you include citations in your documentation and source code to show the source of the code and provide links to the main page, to facilitate communications regarding any questions on the theory or source code."
Indeed, python-sgp4 should put a note somewhere to cite source code URL.

> d) No Requires: %{name}%{?_isa} = %{version}-%{release} in python3-sgp4

Unversioned python-sgp4 doesn't exist (is empty), so I don't think this is necessary.

Let me know if you think it's absolutely necessary to unbundle sgp4, in that case I can retire this review request. Otherwise, I'll ask fedora-legal to review sgp4 license and fix the  specfile.

Comment 3 Benson Muite 2023-02-12 17:24:13 UTC
Adding bundled provides seems reasonable:

A diff of the files  SGP4.cpp  SGP4.h in python-sgp4 and from 
shows they are the same. 

It is possible to create a shared library as described at:

 gcc -c -fpic SGP4.cpp -o SGP4.o
 gcc -shared SGP4.o -o libSGP4.so

However, a different method is needed to  create bindings to a c library, see for example:

As this would change the package substantially, bundling seems reasonable.
Upstream may consider using SWIG or similar approaches at some point.

Please do check on licensing, and update appropriately

Comment 4 Mattia Verga 2023-02-14 17:05:48 UTC
Waiting for license check on https://gitlab.com/fedora/legal/fedora-license-data/-/issues/159
After that I'll update the specfile.

Comment 5 Mattia Verga 2023-06-06 12:23:18 UTC
SGP4 Permission Notice was approved, so I've update the license tag with it

Spec URL: https://mattia.fedorapeople.org/python-sgp4/python-sgp4.spec
SRPM URL: https://mattia.fedorapeople.org/python-sgp4/python-sgp4-2.21-1.fc39.src.rpm

Comment 6 Benson Muite 2023-06-09 14:03:59 UTC

Comment 7 Benson Muite 2023-06-26 11:48:40 UTC
Seems ok. Note that LICENSE appears twice,


Probably %license is not needed in the files section of the spec file.

Maybe it is helpful to add
to the spec file.

Also may be helpful to make apull request to the repository to include the SGP4 license/attribution.

Comment 9 Mattia Verga 2023-07-08 09:47:39 UTC

Comment 10 Benson Muite 2023-07-08 20:43:44 UTC
Thanks. Approved.

Review of https://bugzilla.redhat.com/show_bug.cgi?id=2221376
would be appreciated if time and expertise allow.

Comment 11 Fedora Admin user for bugzilla script actions 2023-07-09 15:57:41 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/python-sgp4

Comment 12 Fedora Update System 2023-07-09 17:40:49 UTC
FEDORA-2023-1de15d2978 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-1de15d2978

Comment 13 Fedora Update System 2023-07-09 17:42:54 UTC
FEDORA-2023-1de15d2978 has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

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