Spec URL: https://dl.dropboxusercontent.com/s/8lj0ohpvz2cxgyb/python-salttesting.spec SRPM URL: https://dl.dropboxusercontent.com/s/qfnx3nwvqe67lu5/python-salttesting-0.5.1-1.el6.src.rpm Spec URL for EL5: https://dl.dropboxusercontent.com/s/b93y1fpdtptxaav/python-salttesting.el5.spec Description: This python module is required to run the integration and unit tests for salt (https://koji.fedoraproject.org/koji/packageinfo?packageID=13129), and is a required part of the build process for Salt versions 0.17.0+. Presently, this module is being downloaded as a 2nd source in the Salt SRPM, and the PYTHONPATH is being modified in order to run the tests. Adding this module to the Fedora/EPEL repositories will allow me to remove these hacks from the Salt spec file, and include this module as a BuildRequires for Salt. Note that I have included two spec files in this review request, one without the lines which are unnecessary for non-EL5 builds, and one that will be used for EL5 only. Fedora Account System Username: terminalmage
Your package bundles a prebuilt egg, please remove it before building the package: rm -rf %{_realname}.egg-info See http://fedoraproject.org/wiki/Packaging:Python_Eggs#Upstream_Eggs. The Python macros have been changed recently to be more future-proof: https://fedoraproject.org/wiki/Packaging:Python#Macros %{__python} --> %{__python2} Moreover, %{python_sitelib} should be %{python2_sitelib} although this is not mentioned in the guidelines. For EPEL6 try to run the following command to see if it is also available there: $ rpm --eval %{python2_sitelib} (In reply to Erik Johnson from comment #0) > Note that I have included two spec files in this review request, one without > the lines which are unnecessary for non-EL5 builds, and one that will be > used for EL5 only. > Perfectly! This way we don't have to entrain all the obsolete definitions and conditions through the newer EPEL and Fedora releases.
You're missing a BuildRequires: python-devel2 https://fedoraproject.org/wiki/Packaging:Python#BuildRequires
(In reply to Johan Swensson from comment #2) > You're missing a BuildRequires: python-devel2 > https://fedoraproject.org/wiki/Packaging:Python#BuildRequires It has to be python2-devel.
(In reply to Mario Blättermann from comment #1) > Your package bundles a prebuilt egg, please remove it before building the > package: > rm -rf %{_realname}.egg-info > See http://fedoraproject.org/wiki/Packaging:Python_Eggs#Upstream_Eggs. > Done, I added these lines to the %build step. Links from the initial posts should be updated with the new specs and SRPM. > The Python macros have been changed recently to be more future-proof: > https://fedoraproject.org/wiki/Packaging:Python#Macros > %{__python} --> %{__python2} > Moreover, %{python_sitelib} should be %{python2_sitelib} although this is > not mentioned in the guidelines. For EPEL6 try to run the following command > to see if it is also available there: > $ rpm --eval %{python2_sitelib} > erik@virtucentos:~% cat /etc/redhat-release CentOS release 6.4 (Final) erik@virtucentos:~% rpm --eval %{python2_sitelib} %{python2_sitelib} erik@virtucentos:~% rpm --eval %{python_sitelib} /usr/lib/python2.6/site-packages erik@virtucentos:~% rpm --eval %{__python2} %{__python2} erik@virtucentos:~% rpm --eval %{__python} /usr/bin/python I did this both before and after running updates on my build VM as I hadn't intalled any updates in a while, and I got the same result. I also added the BuildRequires as recommended by Johan.
That's will be better if you upload new edited-packages separatly, and update changelog.
(In reply to Mosaab Alzoubi from comment #5) > That's will be better if you upload new edited-packages separatly, and > update changelog. They're just sitting in a folder on Dropbox (easiest way for me to put them out on the internet). I can try to put them in a different location however, so that the public link changes. To which changelog are you referring?
I'm not mean changing dropbox, but when change SRPM , prefer to upload it in new location, to show this is new one. You changed spec file , but its changelog have one line.
(In reply to Mosaab Alzoubi from comment #7) > I'm not mean changing dropbox, but when change SRPM , prefer to upload it in > new location, to show this is new one. > > You changed spec file , but its changelog have one line. Ahh! Thanks. I did that and bumped the relative release number, here are the new files: Source RPM: https://dl.dropboxusercontent.com/s/x5808rh60vok9s1/python-salttesting-0.5.1-2.el6.src.rpm Spec file (non-el5): https://dl.dropboxusercontent.com/s/6w442u9r2vig0n2/python-salttesting.spec Spec file (el5): https://dl.dropboxusercontent.com/s/iwucz3m4j9g51tf/python-salttesting.el5.spec
Group: → not necessary cd $RPM_BUILD_DIR/%{_realname}-%{version} → not necessary Since you are also upstream for salttesting (judging by the email address): don't use bare 'except:' ever: it catches ^C. Not necessary, but it would be nice to fix. And also, can you include a license file upstream? setup.py says Python 3 is alpha state... Are there any plans for full support? (See https://fedoraproject.org/wiki/Changes/Python_3_as_Default). Looks nice and clear.
(In reply to Zbigniew Jędrzejewski-Szmek from comment #9) > Group: → not necessary > At all, or is it still necessary for EPEL5? > cd $RPM_BUILD_DIR/%{_realname}-%{version} → not necessary > Ah, so there is an implicit cd to the directory where the source was unpacked (at least, in single-source builds)? > Since you are also upstream for salttesting (judging by the email address): > don't use bare 'except:' ever: it catches ^C. Not necessary, but it would be > nice to fix. > Yeah, I haven't done any work with the test framework per se, I do most of my work on salt proper. I did however just submit a pull request to get those bare excepts changed (at least temporarily) to "except Exception". > And also, can you include a license file upstream? > I brought up this point with the guy that manages the salt-testing project, and by the end of this week we expect a 0.5.2 release to be cut, which will include a LICENSE file. > setup.py says Python 3 is alpha state... Are there any plans for full > support? (See https://fedoraproject.org/wiki/Changes/Python_3_as_Default). > > Looks nice and clear. Full support for Python 3 is expected in the next several months, M2Crypto is still required to run salt and is the only real blocker, until we can move to ZeroMQ 4 which includes its own crypto.
(In reply to Erik Johnson from comment #10) > (In reply to Zbigniew Jędrzejewski-Szmek from comment #9) > > Group: → not necessary > > > > At all, or is it still necessary for EPEL5? EPEL5 needs it, I think. > > cd $RPM_BUILD_DIR/%{_realname}-%{version} → not necessary > > > > Ah, so there is an implicit cd to the directory where the source was > unpacked (at least, in single-source builds)? Yes. At the beginning of every section like %prep, %build, etc. > > Since you are also upstream for salttesting (judging by the email address): > > don't use bare 'except:' ever: it catches ^C. Not necessary, but it would be > > nice to fix. > > > > Yeah, I haven't done any work with the test framework per se, I do most of > my work on salt proper. I did however just submit a pull request to get > those bare excepts changed (at least temporarily) to "except Exception". > > > And also, can you include a license file upstream? > > > > I brought up this point with the guy that manages the salt-testing project, > and by the end of this week we expect a 0.5.2 release to be cut, which will > include a LICENSE file. Great. > > setup.py says Python 3 is alpha state... Are there any plans for full > > support? (See https://fedoraproject.org/wiki/Changes/Python_3_as_Default). > > > > Looks nice and clear. > > Full support for Python 3 is expected in the next several months, M2Crypto > is still required to run salt and is the only real blocker, until we can > move to ZeroMQ 4 which includes its own crypto. Good. Can you submit an updated spec file? We can finish the review without waiting for the release...
(In reply to Zbigniew Jędrzejewski-Szmek from comment #11) > (In reply to Erik Johnson from comment #10) > > (In reply to Zbigniew Jędrzejewski-Szmek from comment #9) > > > Group: → not necessary > > > > > > > At all, or is it still necessary for EPEL5? > EPEL5 needs it, I think. > > > > cd $RPM_BUILD_DIR/%{_realname}-%{version} → not necessary > > > > > > > Ah, so there is an implicit cd to the directory where the source was > > unpacked (at least, in single-source builds)? > Yes. At the beginning of every section like %prep, %build, etc. > > > > Since you are also upstream for salttesting (judging by the email address): > > > don't use bare 'except:' ever: it catches ^C. Not necessary, but it would be > > > nice to fix. > > > > > > > Yeah, I haven't done any work with the test framework per se, I do most of > > my work on salt proper. I did however just submit a pull request to get > > those bare excepts changed (at least temporarily) to "except Exception". > > > > > And also, can you include a license file upstream? > > > > > > > I brought up this point with the guy that manages the salt-testing project, > > and by the end of this week we expect a 0.5.2 release to be cut, which will > > include a LICENSE file. > Great. > > > > setup.py says Python 3 is alpha state... Are there any plans for full > > > support? (See https://fedoraproject.org/wiki/Changes/Python_3_as_Default). > > > > > > Looks nice and clear. > > > > Full support for Python 3 is expected in the next several months, M2Crypto > > is still required to run salt and is the only real blocker, until we can > > move to ZeroMQ 4 which includes its own crypto. > Good. > > Can you submit an updated spec file? We can finish the review without > waiting for the release... Done, here are the updated files. Spec URL (non-EL5): https://dl.dropboxusercontent.com/s/lajrklwy1g2alcm/python-salttesting.spec Spec URL (EL5 only): https://dl.dropboxusercontent.com/s/etioz6yt3zt1pkt/python-salttesting.el5.spec SRPM URL: https://dl.dropboxusercontent.com/s/civx46salq1hv2z/python-salttesting-0.5.1-3.el6.src.rpm
Package Review ============== Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated ===== 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. License is specified in file headers and in setup.py. [-]: 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 %doc. [x]: License field in the package spec file matches the actual license. Note: Checking patched sources after %prep for licenses. Licenses found: "BSD (3 clause)", "Unknown or generated". 12 files have unknown license. Detailed output of licensecheck in /home/zbyszek/fedora/python- salttesting/licensecheck.txt [!]: Package contains no bundled libraries without FPC exception. [!]: Changelog in prescribed format. Dates are wrong. [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]: 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]: Each %files section contains %defattr if rpm < 4.4 [x]: Macros in Summary, %description expandable at SRPM build time. [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 do not use a name that already exist [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]: Binary eggs must be removed in %prep ===== SHOULD items ===== Generic: [x]: 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. [-]: 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]: Packager, Vendor, PreReq, Copyright tags should not be in spec file [x]: Sources can be downloaded from URI in Source: tag [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]: Dist tag is present (not strictly required in GL). [x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin. [x]: Fully versioned dependency in subpackages if applicable. [x]: SourceX tarball generation or download is documented. [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]: Large data in /usr/share should live in a noarch subpackage if package is arched. Rpmlint ------- Checking: python-salttesting-0.5.1-3.fc19.noarch.rpm python-salttesting-0.5.1-3.fc19.src.rpm python-salttesting.noarch: W: no-documentation python-salttesting.src: E: specfile-error warning: bogus date in %changelog: Mon Oct 23 2013 Erik Johnson <erik> - 0.5.1-3 python-salttesting.src: E: specfile-error warning: bogus date in %changelog: Mon Oct 23 2013 Erik Johnson <erik> - 0.5.1-2 2 packages and 0 specfiles checked; 2 errors, 1 warnings. Should be "Wed". Rpmlint (installed packages) ---------------------------- # rpmlint python-salttesting python-salttesting.noarch: W: no-documentation 1 packages and 0 specfiles checked; 0 errors, 1 warnings. # echo 'rpmlint-done:' Requires -------- python-salttesting (rpmlib, GLIBC filtered): python(abi) Provides -------- python-salttesting: python-salttesting So, one problem: bundled code. There are three things: 1. ext/console.py → this is some interface code, taken from SO, which is part of Python3.3 upstream, but not of Python2.7. 2. ext/os_data.py → basically configuration 3. ext/HTMLTestRunner.py from http://tungwaiyip.info/software/HTMLTestRunner.html 1. and 2. are OK → small snippets of code that are not standalone products. 3. can and should be packaged separately.
(In reply to Zbigniew Jędrzejewski-Szmek from comment #13) > > (snip) > > So, one problem: bundled code. There are three things: > 1. ext/console.py → this is some interface code, taken from SO, which is > part of Python3.3 upstream, but not of Python2.7. > 2. ext/os_data.py → basically configuration > 3. ext/HTMLTestRunner.py from > http://tungwaiyip.info/software/HTMLTestRunner.html > > 1. and 2. are OK → small snippets of code that are not standalone products. > 3. can and should be packaged separately. So, this should be placed into a separate package in the spec? If so, is it OK to install it into the same directories as salt-testing, or should it be installed in its own specific directory?
Also, this file appears to have been modified from the original version 0.8.2 from the source website. Here's a diff. http://pastebin.com/igfV0RBf So would the solution perhaps be to add note to the changelog within HTMLTestRunner.py, indicating what changes have been made?
> So, this should be placed into a separate package in the spec? No, a separate package should be created, using upstream sources. Hopefully the divergence between bundled version of HTMLTestRunner and the upstream one is small enough that the upstream one can be used. It would be best if you were the owner of HTMLTestRunner package, because for a while at least, python-salttesting will be the only user.
(In reply to Zbigniew Jędrzejewski-Szmek from comment #16) > > So, this should be placed into a separate package in the spec? > No, a separate package should be created, using upstream sources. Hopefully > the divergence between bundled version of HTMLTestRunner and the upstream > one is small enough that the upstream one can be used. > > It would be best if you were the owner of HTMLTestRunner package, because > for a while at least, python-salttesting will be the only user. After talking to the one who manages the salttesting framework, he said that it's probably a better idea to remove this bundled script, as it is not required to test Salt itself, but was used in testing our salt-bootstrap script, making it safe to remove without affecting the module's ability to run the needed unit/integration tests. A new version of this module was pushed to pypi a few hours ago, and it still contains HTMLTestRunner.py. Would it be sufficient for this release to just remove this file in the spec? If so, what is the preferred way of doing this?
> Would it be sufficient for this release to just remove this file in the spec? Yes, if the the package is not degraded without it, removing it is the way go. > If so, what is the preferred way of doing this? Removing it in %prep. (If the file had an incompatible or non-free license, then things would be more complicated, but it doesn't.)
Sorry for letting this go cold, it's been a busy last few weeks. I'll update the spec and SRPM this weekend.
Finally got around to updating this. In the last several months it was decided that we would not be building for EL5. Additionally, the bundled script referenced earlier has since been removed from the project and is no longer a concern. So, the below SPEC and SRPM should be good. SPEC: http://terminalmage.net/redhat/python-salttesting/python-salttesting.spec SRPM: http://terminalmage.net/redhat/python-salttesting/python-salttesting-2014.8.5-1.el6.src.rpm
Sorry for the delay. warning: bogus date in %changelog: Mon Oct 23 2013 Erik Johnson <erik> - 0.5.1-3 warning: bogus date in %changelog: Mon Oct 23 2013 Erik Johnson <erik> - 0.5.1-2 warning: bogus date in %changelog: Mon Oct 23 2013 Erik Johnson <erik> - 0.5.1-3 warning: bogus date in %changelog: Mon Oct 23 2013 Erik Johnson <erik> - 0.5.1-2 Why the double install (both in %build and in %install)? rpmlint complains about %{buildroot} being used in %build, and it seems right. There's a problem with licensing: salttesting/pylintplugins/string_format.py is clearly GPLv2+, but the package claims to be APACHE-2.0 as a whole. This has to be cleared up, most likely by removing the offending file. See [1] for discussion of compatibility. Please add %doc LICENSE README.rst AUTHORS.rst. [1] http://www.apache.org/licenses/GPL-compatibility.html
Ping?
I'll have a look at this soon hopefully. I am responsible for a lot of things at work, and packaging has not been the highest priority.
OK, I've updated the SPEC. I corrected the bad dates (wrong day of week) and added the %doc line. string_format.py has been removed from the project, and I have fixed the %build step (needed to edit the copypasta there). SPEC: https://terminalmage.fedorapeople.org/pkg_review/python-salttesting.spec SRPM: https://terminalmage.fedorapeople.org/pkg_review/python-salttesting-2015.5.8-1.el6.src.rpm
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 LICENSE is marked as %doc instead of %license See: http://fedoraproject.org/wiki/Packaging/LicensingGuidelines#License_Text (In reply to Erik Johnson from comment #24) > OK, I've updated the SPEC. I corrected the bad dates (wrong day of week) and > added the %doc line. This changed in meantime ;). See above. > string_format.py has been removed from the project I still see it: SaltTesting-2015.5.8/salttesting/pylintplugins/string_format.py /usr/lib/python2.7/site-packages/salttesting/pylintplugins/string_format.py /usr/lib/python2.7/site-packages/salttesting/pylintplugins/string_format.pyc /usr/lib/python2.7/site-packages/salttesting/pylintplugins/string_format.pyo > I have fixed the %build step (needed to edit the copypasta there). Yes. Please also move 'rm -rf %{srcname}.egg-info' to %prep. Does the package support Python3? There was a change to the guidelines today: It is now mandatory that modules which support python3 be packaged for python3. Python modules which support both python2 and python3 may be packages for both, or just python3. Packaging of modules which support only python2 are unaffected. * https://fedoraproject.org/wiki/Packaging:Python * https://fedoraproject.org/w/index.php?title=Packaging%3APython&diff=413621&oldid=409012 * https://fedorahosted.org/fpc/ticket/526
That's weird, string_format.py does not exist on Github, but it's there in the tar archive distributed on pypi. I've contacted the maintainer of the package on pypi and requested clarification on this. In the meantime I just removed this file from the tar archive. I made the other changes you noted as well. This module does not support Python3 at this time, but it will eventually. Updated files: SPEC: https://terminalmage.fedorapeople.org/pkg_review/python-salttesting.spec SRPM: https://terminalmage.fedorapeople.org/pkg_review/python-salttesting-2015.5.8-2.el6.src.rpm
I think instead of moving, you removed the line that deletes stale egginfo. string_format is still there in the rpm built from the srpm in comment #c26.
Oops, thanks for catching that. Should be fixed now. New files uploaded: SPEC: https://terminalmage.fedorapeople.org/pkg_review/python-salttesting.spec SRPM: https://terminalmage.fedorapeople.org/pkg_review/python-salttesting-2015.5.8-3.el6.src.rpm
Looks good. Package is APPROVED. For reference, rpmlint output: python-salttesting.noarch: W: no-manual-page-for-binary github-commit-status python-salttesting.noarch: W: no-manual-page-for-binary salt-jenkins-build python-salttesting.src: W: file-size-mismatch SaltTesting-2015.5.8.tar.gz = 77990, https://pypi.python.org/packages/source/S/SaltTesting/SaltTesting-2015.5.8.tar.gz = 79236
Thanks! New Package SCM Request ======================= Package Name: python-salttesting Short Description: Testing library for SaltStack projects Upstream URL: https://github.com/saltstack/salt-testing Owners: terminalmage Branches: f20 f21 f22 el6 epel7 InitialCC: dmurphy18
Git done (by process-git-requests).