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 1558683 - Review Request: python-ucsmsdk - Python SDK for Cisco UCSM
Summary: Review Request: python-ucsmsdk - Python SDK for Cisco UCSM
Keywords:
Status: ASSIGNED
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Alfredo Moralejo
QA Contact: Fedora Extras Quality Assurance
URL: https://pypi.org/project/ucsmsdk/
Whiteboard:
Depends On:
Blocks: FE-NEEDSPONSOR
TreeView+ depends on / blocked
 
Reported: 2018-03-20 19:08 UTC by Sandhya Dasu
Modified: 2021-06-15 08:03 UTC (History)
13 users (show)

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


Attachments (Terms of Use)

Description Sandhya Dasu 2018-03-20 19:08:04 UTC
Description of problem:
A new python package https://pypi.python.org/pypi/ucsmsdk needs to be added to Fedora. The latest version of Cisco Neutron ML2 UCSM driver, depends on this package.

Version-Release number of selected component (if applicable):
ucsmsdk 0.9.3.1

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Alan Pevec 2018-04-09 23:05:11 UTC
Brian, you are listed as the maintainer of python-UcsSdk which is a previous version of this package IIUC.

Would you consider Sandhya as co-maintainer in your package so she can join Fedora packagers via process described in https://fedoraproject.org/wiki/How_to_get_sponsored_into_the_packager_group#Become_a_co-maintainer ?

Comment 2 Alan Pevec 2018-04-10 09:42:53 UTC
Sandhya (and two co-maintainers) also need a Fedora sponsor https://fedoraproject.org/wiki/Join_the_package_collection_maintainers#Get_Sponsored

Comment 3 Alan Pevec 2018-04-10 09:52:03 UTC
This blocking networking-cisco update for RDO Pike and later:
https://review.rdoproject.org/r/13330

Comment 4 bdemers 2018-04-10 13:32:44 UTC
Absolutely!

Comment 5 Alfredo Moralejo 2018-04-20 16:44:26 UTC
The process to add a package is in https://fedoraproject.org/wiki/New_package_process_for_existing_contributors . Please create a spec file and srpm and push them into a public website (github is ok if you don't have other) so that we can review it asap.

Comment 6 Alan Pevec 2018-04-20 18:05:22 UTC
Sandhya, please publish the draft python-ucsmsdk.spec file as Alfredo points out above and link it here using Fedora Package Review template:
Spec URL: <spec info here>
SRPM URL: <srpm info here>
Description: <description here>
Fedora Account System Username: <your FAS account[1] name>

If you have not done RPM .spec files before, you can take https://src.fedoraproject.org/rpms/python-UcsSdk/blob/master/f/python-UcsSdk.spec as a starting point and modify it for ucsmsdk.

In parallel, please apply for packager group[2] in FAS, since Brian kindly agreed to accept you as a co-maintainer in python-UcsSdk.

[1] https://fedoraproject.org/wiki/Join_the_package_collection_maintainers#Create_a_Fedora_Account
[2] https://admin.fedoraproject.org/accounts/group/view/packager

Comment 7 Sandhya Dasu 2018-04-27 15:32:16 UTC
I created an Fedora packer account (sdasu) successfully. I have created the spec file here: https://github.com/sadasu/ucsmsdk-rpm

Could you please provide me a link to instructions to build the RPM itself?

Comment 8 Sandhya Dasu 2018-04-27 18:24:15 UTC
Spec URL: https://github.com/sadasu/ucsmsdk-rpm/blob/master/python-ucsmsdk.spec
SRPM URL: https://github.com/sadasu/ucsmsdk-rpm/blob/master/python-ucsmsdk-0.9.3.1-1.el7.src.rpm
Description: SRPM and .spec files for python-ucsmsdk version 0.9.3.1 to be added as a new package to Fedora.
Fedora Account System Username: sdasu

Hope this is what is expected from us.

Thanks,
Sandhya

Comment 11 Alfredo Moralejo 2018-04-30 11:28:00 UTC
Some notes:

- Missing Requires on python2-pyparsing for python2-ucsmsdk package.
- Does ucsmsdk support python3?, i'm trying to run unit tests in Fedora with python3 and it's failing. We should build the package for python2 and python3 as fedora is moving to it.
- It'd be nice to run unit tests in %check section of the spec if possible (you can look at https://src.fedoraproject.org/rpms/python-kubernetes/blob/master/f/python-kubernetes.spec for example)

Comment 12 Sandhya Dasu 2018-05-03 14:48:34 UTC
(In reply to Alfredo Moralejo from comment #11)
> Some notes:
> 
> - Missing Requires on python2-pyparsing for python2-ucsmsdk package.
Updating ucsmsdk with requirements.txt containing pyparsing. Will upload another RPM shortly.
> - Does ucsmsdk support python3?, i'm trying to run unit tests in Fedora with
> python3 and it's failing. We should build the package for python2 and
> python3 as fedora is moving to it.

Yes, does support Python3. Will build package for both python2 and python3.

> - It'd be nice to run unit tests in %check section of the spec if possible
> (you can look at
> https://src.fedoraproject.org/rpms/python-kubernetes/blob/master/f/python-
> kubernetes.spec for example)

Just spoke to original authors of ucsmsdk. UTs currently require access to a valid UCSM domain (UCSM or an emulator) for them to pass.

Comment 13 Alfredo Moralejo 2018-05-03 16:03:27 UTC
(In reply to Sandhya Dasu from comment #12)
> (In reply to Alfredo Moralejo from comment #11)
> > Some notes:
> > 
> > - Missing Requires on python2-pyparsing for python2-ucsmsdk package.
> Updating ucsmsdk with requirements.txt containing pyparsing. Will upload
> another RPM shortly.
> > - Does ucsmsdk support python3?, i'm trying to run unit tests in Fedora with
> > python3 and it's failing. We should build the package for python2 and
> > python3 as fedora is moving to it.
> 
> Yes, does support Python3. Will build package for both python2 and python3.
> 
> > - It'd be nice to run unit tests in %check section of the spec if possible
> > (you can look at
> > https://src.fedoraproject.org/rpms/python-kubernetes/blob/master/f/python-
> > kubernetes.spec for example)
> 
> Just spoke to original authors of ucsmsdk. UTs currently require access to a
> valid UCSM domain (UCSM or an emulator) for them to pass.

ok, then, we can skip then. However, by definition, unit tests should not be influenced by external conditions which should be mocked.

Comment 14 Sandhya Dasu 2018-05-04 15:47:43 UTC
A change to run UTs without dependency on the presence of an actual UCS domain has just been merged.

What are the proposed next steps? 

1. We build an RPM with the latest release + the commit id of the UT fix?
2. Proceed with the current RPM and then update the RPM when a new ucsmsdk release with this fix is release?

I have a related question. Is the .spec file being used to generate your own RPM or is the RPM already build by us being used to add to Fedora?

Thanks,
Sandhya

Comment 15 Alfredo Moralejo 2018-05-09 08:33:40 UTC
(In reply to Sandhya Dasu from comment #14)
> A change to run UTs without dependency on the presence of an actual UCS
> domain has just been merged.
> 
> What are the proposed next steps? 
> 
> 1. We build an RPM with the latest release + the commit id of the UT fix?
> 2. Proceed with the current RPM and then update the RPM when a new ucsmsdk
> release with this fix is release?
> 

The best option would be go get a new release as soon as possible and build it. If it's not possible, we can build latest release without tests and add them when a new tag is created.

> I have a related question. Is the .spec file being used to generate your own
> RPM or is the RPM already build by us being used to add to Fedora?
> 

I'm not sure i understand the question, but the process to add a package to fedora is to get a new repository for the spec files in https://src.fedoraproject.org/ (once this package review is approved), then upload the spec file using "fedpkg push" and build it in https://koji.fedoraproject.org using fedpkg build command. The process is described in :

https://fedoraproject.org/wiki/New_package_process_for_existing_contributors

Let me know if this is clear or you need further help.


> Thanks,
> Sandhya

Comment 16 Sandhya Dasu 2018-05-09 18:05:42 UTC
A new python-ucsmsdk release is not expected soon. As soon as it becomes available, I will update the .spec file and RPM to reflect that.

Until that time, can we go ahead with package approval process for ucsmsdk? Is there something else that needs to be done from my end?

Comment 17 Alfredo Moralejo 2018-05-17 08:11:33 UTC
Please, update the spec and srpm to fix the missing Requires on python2-pyparsing and we can move one with this.

Comment 18 Sandhya Dasu 2018-06-13 20:37:08 UTC
Spec URL: https://github.com/sadasu/ucsmsdk-rpm/blob/master/python-ucsmsdk.spec
SRPM URL: https://github.com/sadasu/ucsmsdk-rpm/blob/master/python-ucsmsdk-0.9.3.2-1.el7.src.rpm
Description: SRPM and .spec files for python-ucsmsdk version 0.9.3.2 to be added as a new package to Fedora.
Fedora Account System Username: sdasu

Comment 19 Alfredo Moralejo 2018-06-14 09:20:14 UTC
Hi,

It's still missing requirement python2-pyparsing. Could you add it?, something like:

Requires: python2-pyparsing

IIUC, this version does support python3, could you add subpackages for both python2 and python3. Note that python3 should have conditional to be built only when done in fedora. You can take https://src.fedoraproject.org/rpms/python-webob/blob/master/f/python-webob.spec as example.

Comment 20 Sandhya Dasu 2018-06-14 18:20:20 UTC
Hi,
   I have updated the .spec file to add python2-pyparsing as a requirement. As per the ucsmsdk team, version 0.9.3.2 does not support python3 yet. So, I haven't added a section for python3. I will keep a close watch and update the fedora package with the next version that of ucsmsdk which will start supporting python3.

Once again:

Spec URL: https://github.com/sadasu/ucsmsdk-rpm/blob/master/python-ucsmsdk.spec
SRPM URL: https://github.com/sadasu/ucsmsdk-rpm/blob/master/python-ucsmsdk-0.9.3.2-1.el7.src.rpm
Description: SRPM and .spec files for python-ucsmsdk version 0.9.3.2 to be added as a new package to Fedora.
Fedora Account System Username: sdasu

Comment 21 Alfredo Moralejo 2018-06-19 08:47:11 UTC
Last spec only has python2-pyparsing as BuildRequires. Those are build requirements, you need to also add it as runtime requirement adding line:

Requires: python2-pyparsing

under %package -n python2-ucsmsdk subpackate (under line 22)

Note that, for fedora review automatic parsing "Spec URL" and "SRPM URL" urls must point to raw content.

Comment 22 Sandhya Dasu 2018-06-28 15:26:39 UTC
Updated .spec file with the python2-parsing runtime requirements.

Spec URL: https://raw.githubusercontent.com/sadasu/ucsmsdk-rpm/master/python-ucsmsdk.spec
SRPM URL: https://raw.githubusercontent.com/sadasu/ucsmsdk-rpm/master/python-ucsmsdk-0.9.3.2-1.el7.src.rpm
Description: SRPM and .spec files for python-ucsmsdk version 0.9.3.2 to be added as a new package to Fedora.
Fedora Account System Username: sdasu

Comment 24 Alfredo Moralejo 2018-06-29 16:18:18 UTC
Official fedora review:

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

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


Issues:
=======
- 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.
  Note: License file LicenseContents.py is not marked as %license
  See:
  http://fedoraproject.org/wiki/Packaging/LicensingGuidelines#License_Text


===== 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: "Apache (v2.0)", "*No copyright* Apache", "Unknown or
     generated", "*No copyright* Apache (v2.0)". 2072 files have unknown
     license. Detailed output of licensecheck in /tmp/python-
     ucsmsdk/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.
[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.
[-]: 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]: 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]: All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
[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 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]: 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.
[x]: 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.
[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 all installed packages.
     Note: There are rpmlint messages (see attachment).


Rpmlint
-------
Checking: python2-ucsmsdk-0.9.3.2-1.fc29.noarch.rpm
          python-ucsmsdk-0.9.3.2-1.fc29.src.rpm
2 packages and 0 specfiles checked; 0 errors, 0 warnings.




Rpmlint (installed packages)
----------------------------
python2-ucsmsdk.noarch: W: invalid-url URL: https://pypi.org/pypi/ucsmsdk <urlopen error [Errno -2] Name or service not known>
1 packages and 0 specfiles checked; 0 errors, 1 warnings.



Requires
--------
python2-ucsmsdk (rpmlib, GLIBC filtered):
    /usr/bin/python2
    python(abi)
    python2-pyparsing



Provides
--------
python2-ucsmsdk:
    python-ucsmsdk
    python2-ucsmsdk
    python2.7dist(ucsmsdk)
    python2dist(ucsmsdk)



Source checksums
----------------
https://files.pythonhosted.org/packages/source/u/ucsmsdk/ucsmsdk-0.9.3.2.tar.gz :
  CHECKSUM(SHA256) this package     : 90a84e6178d73b7d5c267f8952ed43b500ff9ca8740b8068942dc3a46d530cc5
  CHECKSUM(SHA256) upstream package : 90a84e6178d73b7d5c267f8952ed43b500ff9ca8740b8068942dc3a46d530cc5


Generated by fedora-review 0.6.1 (f03e4e7) last change: 2016-05-02
Command line :/usr/bin/fedora-review -rn /home/amoralej/rpmbuild/SRPMS/python-ucsmsdk-0.9.3.2-1.fc29.src.rpm -m fedora-rawhide-x86_64
Buildroot used: fedora-rawhide-x86_64
Active plugins: Python, Generic, Shell-api
Disabled plugins: Java, C/C++, fonts, SugarActivity, Ocaml, Perl, Haskell, R, PHP
Disabled flags: EXARCH, DISTTAG, EPEL5, BATCH, EPEL6


A couple of comments:

- please add python3 subpackage once python3 is fully supported in ucsmsdk
- Add unit tests in %check section when posible, it will help to validate package works as expected in future builds.

Package is APPROVED

Comment 25 Alfredo Moralejo 2018-06-29 16:26:06 UTC
You can continue with the process to get the package in Fedora described in https://fedoraproject.org/wiki/New_package_process_for_existing_contributors (step 7).

As this requires to be a fedora packager, i guess Brian.Demers can assist on next steps.

Comment 26 Sandhya Dasu 2018-06-29 19:03:12 UTC
Brian Demers (brian.demers) is no longer associated with the project. I am under the impression that I did the necessary groundwork to be Fedora packager myself.

Comment 27 Alfredo Moralejo 2018-07-05 16:19:11 UTC
Could someone sponsor Sandhya as packager to maintain this package in Fedora.

Fedora user: sdasu

Comment 28 Alfredo Moralejo 2018-07-05 16:42:20 UTC
I'm requesting a new repo for this package in https://pagure.io/releng/fedora-scm-requests/issue/7277

Comment 29 Matthias Runge 2018-07-10 13:50:05 UTC
- please use newer macros, like py2_build and py2_install, and the same for python3.
- Please add a check section and execute the tests. Listing checks added and passing in above review is wrong.
- please also link "inofficial reviews" you did here in Fedora.
- the page in pypi lists, this supports Python 3.4, in Fedora, there is Python 3.7

Comment 30 Sean Merrow 2018-09-04 20:04:52 UTC
Adding URL to ucsmsdk 0.9.4 which adds Python 3 support

https://pypi.org/project/ucsmsdk/

Comment 31 Sandhya Dasu 2018-09-05 16:04:17 UTC
It appears that this step is not necessary for OSP13. We could just include the python-ucsmsdk package within the networking-cisco container. There is really no need for this to be added to Fedora so it can be made part of RHEL and then available for a "yum install" on RHEL OSP.

If this is correct, then this BZ can effectively be closed.

Comment 32 Alan Pevec 2018-09-12 22:17:11 UTC
We should still finish the package review here, RHEL and RDO/OSP inherit from Fedora packaging guidelines so Fedora package review is used when importing it.

We did shortcut the process by importing as RDO dependency into https://github.com/rdo-common/python-ucsmsdk with the understanding this Fedora review will be eventually finished.

Until then please send updates as PRs in https://github.com/rdo-common/python-ucsmsdk/pulls

Comment 33 Bradley Jones 2018-10-03 10:21:41 UTC
I have submitted a PR https://github.com/rdo-common/python-ucsmsdk/pull/1 to update to the newest version of ucsmsdk and fix a missing build dependency

Comment 34 Robert-André Mauchin 🐧 2018-10-04 16:48:57 UTC
What's the status of this review? Why was the (+) cancelled?

New Py2 package are not allowed, only package Py 3.

Comment 35 Robert-André Mauchin 🐧 2018-10-04 16:49:40 UTC
Sandhya Dasu: do you still need a sponsorship?

Comment 36 Sandhya Dasu 2018-10-04 17:23:22 UTC
Yes. There was some mis-understanding regarding the process. Now that has been clarified and we are in the process of adding a newer version of the package that is python3 compatible.

(In reply to Robert-André Mauchin from comment #35)
> Sandhya Dasu: do you still need a sponsorship?

Comment 37 Yatin Karel 2020-07-31 14:39:22 UTC
The package available for queens till train since long, removing RDO-ROCKY tracker as rocky released long ago.:-
  cloud7-openstack-queens-release: python-ucsmsdk-0.9.3.2-1.el7
  cloud7-openstack-queens-testing: python-ucsmsdk-0.9.3.2-1.el7
  cloud7-openstack-rocky-release: python-ucsmsdk-0.9.3.2-1.el7
  cloud7-openstack-rocky-testing: python-ucsmsdk-0.9.3.2-1.el7
  cloud7-openstack-stein-release: python-ucsmsdk-0.9.3.2-1.el7
  cloud7-openstack-stein-testing: python-ucsmsdk-0.9.3.2-1.el7
  cloud7-openstack-train-release: python-ucsmsdk-0.9.3.2-1.el7
  cloud7-openstack-train-testing: python-ucsmsdk-0.9.3.2-1.el7

Comment 38 Alfredo Moralejo 2021-06-15 08:03:00 UTC
I think this package si not longer needed and this bz can be closed?


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