Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1950923 - Review Request: python-fireflyalgorithm - Implementation of Firefly Algorithm in Python
Summary: Review Request: python-fireflyalgorithm - Implementation of Firefly Algorithm...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ankur Sinha (FranciscoD)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: fedora-neuro
TreeView+ depends on / blocked
 
Reported: 2021-04-19 07:41 UTC by Iztok Fister Jr.
Modified: 2021-06-21 13:34 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-06-21 13:34:58 UTC
Type: ---
Embargoed:
sanjay.ankur: fedora-review+


Attachments (Terms of Use)

Description Iztok Fister Jr. 2021-04-19 07:41:08 UTC
Spec URL: https://raw.githubusercontent.com/firefly-cpp/rpm-firefly/main/python-fireflyalgorithm.spec
SRPM URL: https://github.com/firefly-cpp/rpm-firefly/raw/main/python-fireflyalgorithm-0.0.4-1.fc33.src.rpm

Description: Implementation of Firefly Algorithm (FA) for optimization

Fedora Account System Username: iztokf

Note: This is a re-review of python-FireflyAlgorithm package. I would like to change the FireflyAlgorithm to fireflyalgorithm in order to be consistent with naming guidelines.

Comment 1 Ankur Sinha (FranciscoD) 2021-04-19 08:04:43 UTC
The naming guidelines say that lower case should be preferred, but this isnt' compulsory:

"Package names SHOULD be in lower case and use dashes in preference to underscores."

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

So the current name is OK---do you want to proceed with this? We'll have to make sure that this package correctly obsoletes the previous one etc. so that users get the new version on updates and so on.

Comment 2 Iztok Fister Jr. 2021-04-19 08:17:05 UTC
Hello Ankur,

Thanks. In fact, I would like to proceed with a name change. Actually, fireflyalgorithm is more convenient for the users.

Comment 3 Ankur Sinha (FranciscoD) 2021-04-19 08:49:51 UTC
Sounds good. I'll review this ASAP.

These are the additional checks we need to make:

https://docs.fedoraproject.org/en-US/packaging-guidelines/#renaming-or-replacing-existing-packages

Comment 4 Ankur Sinha (FranciscoD) 2021-04-21 07:58:46 UTC
Package Review
==============

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

Note, this is a re-review since we want to rename the package here.
All the packaging bits look good. The obsoletes/provides need some tweaking:


We don't need to bump the epoch here since the older package didn't use epoch.
So, just bumping the release will ensure a clean upgrade path. Also, we need to
use the full package name so it'll be python-....  Since the last version of
python-FireflyAlgorith is: python-FireflyAlgorithm-0.0.4-1.fc35, we should use:

Provides: python-FireflyAlgorithm = %{version}-%{release}
Obsoletes: python-FireflyAlgorithm < 0.0.4-2

Note that the version-release for this new package should be 0.0.4-2 (and will
continue to increase normally).

It's best to do a test build for F33/F34 too, and then try to install the new
packages to verify that they correctly update the older package.


===== 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.
[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", "Expat License". 4 files have unknown
     license. Detailed output of licensecheck in /home/asinha/dump/fedora-
     reviews/1950923-python-fireflyalgorithm/licensecheck.txt
[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.
[-]: 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.
[-]: Package obeys FHS, except libexecdir and /usr/target.
[!]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
^
Please see my notes above on this

[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]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10240 bytes in 1 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: No rpmlint messages.
[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
     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

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.
[x]: Final provides and requires are sane (see attachments).
[x]: 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.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[-]: %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 all installed packages.
     Note: No rpmlint messages.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: python3-fireflyalgorithm-0.0.4-1.fc35.noarch.rpm
          python-fireflyalgorithm-0.0.4-1.fc35.src.rpm
2 packages and 0 specfiles checked; 0 errors, 0 warnings.




Rpmlint (installed packages)
----------------------------
1 packages and 0 specfiles checked; 0 errors, 0 warnings.



Source checksums
----------------
https://github.com/firefly-cpp/FireflyAlgorithm/archive/0.0.4/FireflyAlgorithm-0.0.4.tar.gz :
  CHECKSUM(SHA256) this package     : 60bcd290e774c0844ad2f0caa0df1f15708bdbed60783b0b608d9521618728a4
  CHECKSUM(SHA256) upstream package : 60bcd290e774c0844ad2f0caa0df1f15708bdbed60783b0b608d9521618728a4


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



Provides
--------
python3-fireflyalgorithm:
    python-fireflyalgorithm
    python3-fireflyalgorithm
    python3.9-fireflyalgorithm
    python3.9dist(fireflyalgorithm)
    python3dist(fireflyalgorithm)



Generated by fedora-review 0.7.6 (b083f91) last change: 2020-11-10
Command line :/usr/bin/fedora-review -b 1950923
Buildroot used: fedora-rawhide-x86_64
Active plugins: Shell-api, Python, Generic
Disabled plugins: C/C++, fonts, SugarActivity, Java, Perl, Ocaml, R, PHP, Haskell
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 5 Iztok Fister Jr. 2021-04-22 08:09:00 UTC
Hi Ankur,

Thanks again for your excellent comments.

New files are Online:

SPEC: https://raw.githubusercontent.com/firefly-cpp/rpm-firefly/main/python-fireflyalgorithm.spec

SRPMS: https://github.com/firefly-cpp/rpm-firefly/raw/main/python-fireflyalgorithm-0.0.4-2.fc33.src.rpm

Builds were also successful for older release. Installation was successful on F33.

Comment 6 Ankur Sinha (FranciscoD) 2021-04-25 16:45:28 UTC
Looks good but I'm wondering if we need to add the provides/obsoletes to the python3 sub-package too. I installed the current package:

$ rpm -q python3-FireflyAlgorithm
python3-FireflyAlgorithm-0.0.4-1.fc34.noarch

then, I tried to install the f34 build of the renamed package. It installs fine, yes but does not upgrade the previous one---which is should, no?

$ sudo dnf install ./python3-fireflyalgorithm-0.0.4-2.fc34.noarch.rpm
[sudo] password for asinha:
Last metadata expiration check: 1:57:57 ago on Sun 25 Apr 2021 15:41:30 BST.
Dependencies resolved.
=============================================================================================================================================================================
 Package                                             Architecture                      Version                                 Repository                               Size
=============================================================================================================================================================================
Installing:
 python3-fireflyalgorithm                            noarch                            0.0.4-2.fc34                            @commandline                             13 k

Transaction Summary
=============================================================================================================================================================================
Install  1 Package


This is because python3 subpackage does not obsolete/provide the older python3 subpackage:

$ rpm -qp --provides ./python3-fireflyalgorithm-0.0.4-2.fc34.noarch.rpm
python-fireflyalgorithm = 0.0.4-2.fc34
python3-fireflyalgorithm = 0.0.4-2.fc34
python3.9-fireflyalgorithm = 0.0.4-2.fc34
python3.9dist(fireflyalgorithm) = 0.0.4
python3dist(fireflyalgorithm) = 0.0.4

$ rpm -qp --obsoletes ./python3-fireflyalgorithm-0.0.4-2.fc34.noarch.rpm
# no output

Can you check if in your test it upgraded the older package, or do you now have both installed?

Cheers,
Ankur

Comment 7 Robert-André Mauchin 🐧 2021-05-09 14:23:17 UTC
(Per Iztok request)


Provides: python-FireflyAlgorithm = %{version}-%{release}
Obsoletes: python-FireflyAlgorithm < 0.0.4-2

is good, but you should add one for the Python 3 subpackage as this is what is gonna be installed by the end user:

%package -n python3-%{new_name}
Summary:        %{summary}
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools

Provides: python3-FireflyAlgorithm = %{version}-%{release}
Obsoletes: python3-FireflyAlgorithm < 0.0.4-2

%description -n python3-%{new_name} %_description

Comment 8 Iztok Fister Jr. 2021-05-09 16:18:57 UTC
Thanks to both of you.

It is now working as expected.

[iztok@localhost noarch]$ sudo dnf install ./python3-fireflyalgorithm-0.0.4-2.fc33.noarch.rpm
Last metadata expiration check: 4:55:14 ago on ned 09 maj 2021 13:12:01.
Dependencies resolved.
======================================================================================================================================================================================================
 Package                                                   Architecture                            Version                                        Repository                                     Size
======================================================================================================================================================================================================
Installing:
 python3-fireflyalgorithm                                  noarch                                  0.0.4-2.fc33                                   @commandline                                   13 k
     replacing  python3-FireflyAlgorithm.noarch 0.0.4-1.fc33

Transaction Summary
======================================================================================================================================================================================================
Install  1 Package
------------------------

New files are online:

SPEC: https://raw.githubusercontent.com/firefly-cpp/rpm-firefly/main/python-fireflyalgorithm.spec
SRPM: https://github.com/firefly-cpp/rpm-firefly/raw/main/python-fireflyalgorithm-0.0.4-2.fc33.src.rpm

Comment 9 Ankur Sinha (FranciscoD) 2021-05-13 07:59:55 UTC
OK, that looks good! XXX APPROVED XXX

Comment 10 Gwyn Ciesla 2021-05-14 14:14:59 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-fireflyalgorithm


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