Spec URL: http://sagitter.fedorapeople.org/mMass/mMass.spec SRPM URL: http://sagitter.fedorapeople.org/mMass/mMass-5.5.0-1.fc21.src.rpm Description: Open Source Mass Spectrometry Tool Fedora Account System Username: sagitter
Hi all. There is a main point, about to which I need for a suggestion, before I consider this package "Ready". Only thing that must be compiled essentially is the 'calculations.so' library Reading the guidelines (http://fedoraproject.org/wiki/Packaging:Guidelines#No_inclusion_of_pre-built_binaries_or_libraries): > All program binaries and program libraries included in Fedora packages must be > built from the source code that is included in the source package So in %prep section, before all I remove pre-built 'calculation.so' file and 'calculations.pyd' (it seems me it's a file written for Windows) file in %install. I don't know if all other pre-built python files can be considered appropriate for the building of the package.
Initial comments: - Use macros instead of hardcoded paths: %{__python} instead of /usr/bin/python, %{_datadir} instead of /usr/share - The startup script has the possibly irritating side-effect of changing the current directory * Enclose the cd in brackets: #!/bin/sh ( cd /usr/share/mMass /usr/bin/python mmass.py ) * Or another idea might be to rename mmass.py to __main__.py and have the startup script just read #!/bin/sh %{__python} -m %{_datadir}/mMass - What is with the commented section: #ln -s %{python_sitearch}/calculations.so \ # $RPM_BUILD_ROOT%{_datadir}/%{name}/mspy/calculations.so ? - I'm not sure whether adding the shebangs to the python scripts after the *.pyc and *.pyo are generated invalidates those files? A quick test: test.py: import hello hello.py: print "Hello" strace python test.py: [...] open("/home/sandro/.Data/Desktop/tmp/hello.py", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0664, st_size=21, ...}) = 0 open("/home/sandro/.Data/Desktop/tmp/hello.pyc", O_RDONLY) = 4 [...] now chmod -r hello.pyc and change hello.py: #!/usr/bin/python print "Hello" strace python test.py: [...] open("/home/sandro/.Data/Desktop/tmp/hello.pyc", O_RDONLY) = 4 fstat(4, {st_mode=S_IFREG|0444, st_size=147, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f83504dd000 read(4, "\3\363\r\nA42Rc\0\0\0\0\0\0\0\0\1\0\0\0@\0\0\0s\t\0\0\0d\0"..., 4096) = 147 close(4) = 0 munmap(0x7f83504dd000, 4096) = 0 fstat(3, {st_mode=S_IFREG|0664, st_size=39, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f83504dd000 read(3, "#!/usr/bin/python\nprint \"Hello W"..., 4096) = 39 read(3, "", 4096) = 0 unlink("/home/sandro/.Data/Desktop/tmp/hello.pyc") = 0 [...] So long story short, I'd change the shebangs in %prep, not in %install.
(In reply to Sandro Mani from comment #2) > Initial comments: > - Use macros instead of hardcoded paths: %{__python} instead of > /usr/bin/python, %{_datadir} instead of /usr/share > Fixed. > > - The startup script has the possibly irritating side-effect of changing the > current directory > * Enclose the cd in brackets: > #!/bin/sh > ( > cd /usr/share/mMass > /usr/bin/python mmass.py > ) > * Or another idea might be to rename mmass.py to __main__.py and have the > startup script just read > #!/bin/sh > %{__python} -m %{_datadir}/mMass > Fixed. > > - What is with the commented section: > #ln -s %{python_sitearch}/calculations.so \ > # $RPM_BUILD_ROOT%{_datadir}/%{name}/mspy/calculations.so > ? > It was a legacy of an old .spec file. Removed. > > - I'm not sure whether adding the shebangs to the python scripts after the > *.pyc and *.pyo are generated invalidates those files? A quick test: > test.py: > import hello > > hello.py: > print "Hello" > > strace python test.py: > [...] > open("/home/sandro/.Data/Desktop/tmp/hello.py", O_RDONLY) = 3 > fstat(3, {st_mode=S_IFREG|0664, st_size=21, ...}) = 0 > open("/home/sandro/.Data/Desktop/tmp/hello.pyc", O_RDONLY) = 4 > [...] > > now chmod -r hello.pyc and change hello.py: > #!/usr/bin/python > print "Hello" > > strace python test.py: > [...] > open("/home/sandro/.Data/Desktop/tmp/hello.pyc", O_RDONLY) = 4 > fstat(4, {st_mode=S_IFREG|0444, st_size=147, ...}) = 0 > mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = > 0x7f83504dd000 > read(4, "\3\363\r\nA42Rc\0\0\0\0\0\0\0\0\1\0\0\0@\0\0\0s\t\0\0\0d\0"..., > 4096) = 147 > close(4) = 0 > munmap(0x7f83504dd000, 4096) = 0 > fstat(3, {st_mode=S_IFREG|0664, st_size=39, ...}) = 0 > mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = > 0x7f83504dd000 > read(3, "#!/usr/bin/python\nprint \"Hello W"..., 4096) = 39 > read(3, "", 4096) = 0 > unlink("/home/sandro/.Data/Desktop/tmp/hello.pyc") = 0 > [...] > > So long story short, I'd change the shebangs in %prep, not in %install. Fixed. Spec URL: http://sagitter.fedorapeople.org/mMass/mMass.spec SRPM URL: http://sagitter.fedorapeople.org/mMass/mMass-5.5.0-2.fc21.src.rpm
Summary below. Package Review ============== Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated [ ] = Manual review needed Issues: ======= - All build dependencies are listed in BuildRequires, except for any that are listed in the exceptions section of Packaging Guidelines. Note: These BR are not needed: unzip See: http://fedoraproject.org/wiki/Packaging/Guidelines#Exceptions_2 - Large documentation must go in a -doc subpackage. Large could be size (~1MB) or number of files. Note: Documentation size is 8427520 bytes in 6 files. See: http://fedoraproject.org/wiki/Packaging/Guidelines#PackageDocumentation ===== MUST items ===== C/C++: [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]: Package does not contain any libtool archives (.la) [x]: Rpath absent or only used for internal libs. 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: "GPL (v3 or later)", "Unknown or generated". 5 files have unknown license. Detailed output of licensecheck in /home/sandro/.Data/Desktop/1002251-mMass/licensecheck.txt [x]: License file installed when any subpackage combination is installed. [!]: Package requires other packages for directories it uses. Note: No known owner of /usr/share/mMass/database, /usr/share/mMass/examples [!]: Package must own all directories that it creates. Note: Directories without known owners: /usr/share/mMass/database, /usr/share/mMass/examples [!]: %build honors applicable compiler flags or justifies otherwise. [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. [!]: 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. [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]: 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]: 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]: 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]: Packages must not store files under /srv, /opt or /usr/local Python: [x]: Python eggs must not download any dependencies during the build process. [?]: 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]: Binary eggs must be removed in %prep ===== SHOULD items ===== Generic: [!]: Dist tag is present (not strictly required in GL). [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. [!]: Final provides and requires are sane (see attachments). [?]: 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. [?]: 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]: 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: [!]: Large data in /usr/share should live in a noarch subpackage if package is arched. Note: Arch-ed rpms have a total of 20234240 bytes in /usr/share mMass-5.5.0-2.fc21.x86_64.rpm:20234240 See: http://fedoraproject.org/wiki/Packaging:ReviewGuidelines#Package_Review_Guidelines [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: mMass-5.5.0-2.fc21.x86_64.rpm mMass-database-5.5.0-2.fc21.noarch.rpm mMass-examples-5.5.0-2.fc21.noarch.rpm mMass-5.5.0-2.fc21.src.rpm mMass.x86_64: E: arch-dependent-file-in-usr-share /usr/share/mMass/mspy/calculations.so mMass.x86_64: E: script-without-shebang /usr/share/mMass/mmass.py mMass.x86_64: E: wrong-script-end-of-line-encoding /usr/share/mMass/mspy/plot_canvas.py mMass.x86_64: E: script-without-shebang /usr/share/mMass/gui/__init__.py mMass.x86_64: W: no-manual-page-for-binary mmass mMass-database.noarch: W: summary-not-capitalized C mMass' databases mMass-examples.noarch: W: summary-not-capitalized C mMass' examples mMass-examples.noarch: W: no-documentation 4 packages and 0 specfiles checked; 4 errors, 4 warnings. Rpmlint (installed packages) ---------------------------- # rpmlint mMass-examples mMass-database mMass mMass-examples.noarch: W: summary-not-capitalized C mMass' examples mMass-examples.noarch: W: no-documentation mMass-database.noarch: W: summary-not-capitalized C mMass' databases mMass.x86_64: E: arch-dependent-file-in-usr-share /usr/share/mMass/mspy/calculations.so mMass.x86_64: E: script-without-shebang /usr/share/mMass/mmass.py mMass.x86_64: E: wrong-script-end-of-line-encoding /usr/share/mMass/mspy/plot_canvas.py mMass.x86_64: E: script-without-shebang /usr/share/mMass/gui/__init__.py mMass.x86_64: W: no-manual-page-for-binary mmass 3 packages and 0 specfiles checked; 4 errors, 4 warnings. # echo 'rpmlint-done:' Requires -------- mMass-examples (rpmlib, GLIBC filtered): mMass(x86-64) mMass-database (rpmlib, GLIBC filtered): mMass(x86-64) mMass (rpmlib, GLIBC filtered): /bin/bash /usr/bin/python libc.so.6()(64bit) libm.so.6()(64bit) libpthread.so.0()(64bit) libpython2.7.so.1.0()(64bit) mMass-database rtld(GNU_HASH) Provides -------- mMass-examples: mMass-examples mMass-database: mMass-database mMass: mMass mMass(x86-64) Unversioned so-files -------------------- mMass: /usr/share/mMass/mspy/calculations.so Source checksums ---------------- http://www.mmass.org/download/files/compounds/compounds_norine.zip : CHECKSUM(SHA256) this package : 63fb4771bd3ed8f9a00cf783d417e47de334fb8233aee0c2f57b65313fe5d43c CHECKSUM(SHA256) upstream package : 63fb4771bd3ed8f9a00cf783d417e47de334fb8233aee0c2f57b65313fe5d43c http://www.mmass.org/download/files/compounds/compounds_fungal_peptides.zip : CHECKSUM(SHA256) this package : 1b2de14a4b172f7032e093b4e9f165a4ddbb7074c5d9cf747a0828beb727d9f1 CHECKSUM(SHA256) upstream package : 1b2de14a4b172f7032e093b4e9f165a4ddbb7074c5d9cf747a0828beb727d9f1 http://www.mmass.org/download/files/v5.5.0/mmass_v5.5.0_source.zip : CHECKSUM(SHA256) this package : e75e0792b51ed16f5b772f285b1be2031a0906fd35b02294752ccf816258508c CHECKSUM(SHA256) upstream package : e75e0792b51ed16f5b772f285b1be2031a0906fd35b02294752ccf816258508c http://www.mmass.org/download/files/compounds/compounds_lipidmaps.zip : CHECKSUM(SHA256) this package : aa89be7992d726c78d96f75b3391f53bbc94a281454c7849c3066ebcda51ecaa CHECKSUM(SHA256) upstream package : aa89be7992d726c78d96f75b3391f53bbc94a281454c7849c3066ebcda51ecaa http://www.mmass.org/download/files/examples/examples_cpeptides.zip : CHECKSUM(SHA256) this package : e0bb271999118af2dc8e79932628cc323549998dbc4a1492d6efe344479cead0 CHECKSUM(SHA256) upstream package : e0bb271999118af2dc8e79932628cc323549998dbc4a1492d6efe344479cead0 http://www.mmass.org/download/files/examples/examples_general.zip : CHECKSUM(SHA256) this package : 3f0898f4b01cf301963f6e3dda759618306c622a9b41ab8fa79e4b72e6a21837 CHECKSUM(SHA256) upstream package : 3f0898f4b01cf301963f6e3dda759618306c622a9b41ab8fa79e4b72e6a21837 http://www.mmass.org/download/files/examples/examples_hdx.zip : CHECKSUM(SHA256) this package : 4c1f631ed9784d28892902eab541de2609522afbc2e8913eac3c4fa3faef4d41 CHECKSUM(SHA256) upstream package : 4c1f631ed9784d28892902eab541de2609522afbc2e8913eac3c4fa3faef4d41 Generated by fedora-review 0.5.0 (920221d) last change: 2013-08-30 Command line :/bin/fedora-review -b 1002251 Buildroot used: fedora-rawhide-x86_64 Active plugins: Python, Generic, Shell-api, C/C++ Disabled plugins: Java, SugarActivity, Perl, R, PHP, Ruby Disabled flags: EPEL5, EXARCH, DISTTAG Summary: Must: [!]: Package requires other packages for directories it uses. Note: No known owner of /usr/share/mMass/database, /usr/share/mMass/examples [!]: Package must own all directories that it creates. Note: Directories without known owners: /usr/share/mMass/database, /usr/share/mMass/examples => Change %{_datadir}/%{name}/database/*.xml to %{_datadir}/%{name}/database/ => Change %{_datadir}/%{name}/examples/*.msd to %{_datadir}/%{name}/examples/ [!]: %build honors applicable compiler flags or justifies otherwise. [!]: Package meets the Packaging Guidelines::Python => Use CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build [!]: Dist tag is present (not strictly required in GL). => Use %{?dist} instead of %{dist} rpmlint must: mMass.x86_64: E: arch-dependent-file-in-usr-share /usr/share/mMass/mspy/calculations.so => To fix this, I suggest you installed the whole package in %{_libdir}/%{name} mMass.x86_64: E: script-without-shebang /usr/share/mMass/mmass.py mMass.x86_64: E: wrong-script-end-of-line-encoding /usr/share/mMass/mspy/plot_canvas.py Extra: [!]: Large data in /usr/share should live in a noarch subpackage if package is arched. Note: Arch-ed rpms have a total of 20234240 bytes in /usr/share mMass-5.5.0-2.fc21.x86_64.rpm:20234240 See: http://fedoraproject.org/wiki/Packaging:ReviewGuidelines#Package_Review_Guidelines => By installing the package in %{_libdir}/%{name}, this goes away Needs clarification: [!]: Requires correct, justified where necessary. [!]: Final provides and requires are sane (see attachments). => Why the circular dependency mMass -> mMass-database and mMass-database -> mMass?
=> Why the circular dependency mMass -> mMass-database and mMass-database -> > mMass? They are strictly correlated; the first depends on second and viceversa. > [!]: %build honors applicable compiler flags or justifies otherwise. > [!]: Package meets the Packaging Guidelines::Python => Use CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build Ouch! Heavy mistake. I'm fixing them.
Spec URL: http://sagitter.fedorapeople.org/mMass/mMass.spec SRPM URL: http://sagitter.fedorapeople.org/mMass/mMass-5.5.0-3.fc21.src.rpm
Concerning the circular dependency: ok, but what is the advantage of having two separate packages then? (Note: no strong opinion, just curiosity). Please also fix these rpmlint issues: mMass.x86_64: E: wrong-script-end-of-line-encoding /usr/lib64/mMass/mspy/plot_canvas.py mMass.x86_64: E: script-without-shebang /usr/lib64/mMass/mmass.py
(In reply to Sandro Mani from comment #7) > Concerning the circular dependency: ok, but what is the advantage of having > two separate packages then? (Note: no strong opinion, just curiosity). To manage databases separately and neatly from software. > Please also fix these rpmlint issues: > mMass.x86_64: E: wrong-script-end-of-line-encoding > /usr/lib64/mMass/mspy/plot_canvas.py > mMass.x86_64: E: script-without-shebang /usr/lib64/mMass/mmass.py Fixed. I obtain this error now mMass.x86_64: E: script-without-shebang /usr/share/mMass/gui/__init__.py but that file seems empty. Spec URL: http://sagitter.fedorapeople.org/mMass/mMass.spec SRPM URL: http://sagitter.fedorapeople.org/mMass/mMass-5.5.0-4.fc21.src.rpm
Right, for the empty __init__.py file I'd say we can ignore the error. Approved.
Thank you, Sandro. New Package SCM Request ======================= Package Name: mMass Short Description: Open Source Mass Spectrometry Tool Owners: sagitter Branches: f19 f20 el6 InitialCC:
Git done (by process-git-requests).
mMass-5.5.0-4.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/mMass-5.5.0-4.fc20
mMass-5.5.0-4.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/mMass-5.5.0-4.fc19
mMass-5.5.0-4.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mMass-5.5.0-4.el6
mMass-5.5.0-4.fc19 has been pushed to the Fedora 19 testing repository.
mMass-5.5.0-4.fc20 has been pushed to the Fedora 20 stable repository.
mMass-5.5.0-4.fc19 has been pushed to the Fedora 19 stable repository.
mMass-5.5.0-4.el6 has been pushed to the Fedora EPEL 6 stable repository.