Spec URL: http://repo.richzendy.org/turpial/libturpial.spec SRPM URL: http://repo.richzendy.org/turpial/libturpial-1.0-1.fc19.src.rpm RPM URL: http://repo.richzendy.org/turpial/libturpial-1.0-1.fc19.noarch.rpm Description: libturpial is a new library to turpial 3.0 (the next turpial version), libturpial is needed to build turpial 3.0 (twitter client http://www.turpial.org.ve ), turpial exists in to Fedora (1.6.9 version), but the version in to fedora have many bugs thanks to twitter api changes, with libturpial i can build to fedora the new turpial version to Fedora 20, with this new version we have full support to twitter api (2.0) and we have a lot new features. Fedora Account System Username: richzendy
Skimming over the spec file, this is surprisingly mispackaged. :-( Please try to review your own package with the help of the Package Review Guidelines ( https://fedoraproject.org/wiki/Packaging:ReviewGuidelines ) and rpmlint and/or the fedora-review tool. https://fedoraproject.org/wiki/Packaging:NamingGuidelines https://fedoraproject.org/wiki/Packaging:NamingGuidelines#Addon_Packages_.28General.29 https://fedoraproject.org/wiki/Packaging:NamingGuidelines#Addon_Packages_.28python_modules.29 https://fedoraproject.org/wiki/Packaging:Guidelines#BuildRoot_tag https://fedoraproject.org/wiki/Packaging:Guidelines#File_and_Directory_Ownership https://fedoraproject.org/wiki/Packaging:Guidelines#File_Permissions https://fedoraproject.org/wiki/Packaging:UnownedDirectories
rpmlint rpmbuild/SRPMS/libturpial-1.0-1.fc19.src.rpm 1 packages and 0 specfiles checked; 0 errors, 0 warnings. rpmlint rpmbuild/RPMS/noarch/libturpial-1.0-1.fc19.noarch.rpm libturpial.noarch: W: pem-certificate /usr/lib/python2.7/site-packages/libturpial/certs/cacert.pem 1 packages and 0 specfiles checked; 0 errors, 1 warnings.
Hi @Edwin - rename the package to turpial-libturpial or python-libturpial. - Remove all el5 stuff (buildroot_tag, %clean, rm -rf after %install. - Add python2-devel or python3-devel as the case may, as BR - The unversioned macro, %{__python} is deprecated. You should use %{__python2} - use %build section (You has moved python build in install section, why?) - Change the permissions of the directories and files that are wrong. Do that in %install section preferably (Don't use %attr for that, neither %defattr) - Since F20 doc are unversioned please see http://fedoraproject.org/wiki/Changes/UnversionedDocdirs. - Your package generates unowned directories in the documentation because you hasn't marked them as %doc - certs shouldn't go in that place, maybe /etc/pki/$name ?
> rename the package to turpial-libturpial or python-libturpial python-libturpial is the right choice
(In reply to Eduardo Echeverria from comment #3) > Hi @Edwin > > - rename the package to turpial-libturpial or python-libturpial. Done! > - Remove all el5 stuff (buildroot_tag, %clean, rm -rf after %install. Done! > - Add python2-devel or python3-devel as the case may, as BR Done! > - The unversioned macro, %{__python} is deprecated. You should use > %{__python2} Done! > - use %build section (You has moved python build in install section, why?) if i use %build section, and move: sed -i 's/\.\//share\/doc\/%{name}/' setup.py %{__python2} setup.py build %{__python2} setup.py install --root %{buildroot} From install section to build section, the rpmbuild fail > - Change the permissions of the directories and files that are wrong. Do > that in %install section preferably (Don't use %attr for that, neither > %defattr) If i use: {__chmod} 644 -R %{_buildroot}/doc/%{name}/* In the %install section, rpmbuild fails > - Since F20 doc are unversioned please see > http://fedoraproject.org/wiki/Changes/UnversionedDocdirs. > - Your package generates unowned directories in the documentation because > you hasn't marked them as %doc Done! > - certs shouldn't go in that place, maybe /etc/pki/$name ? I need patch the source code to make this, because the path to this cert file appears in one source file (lib/http.py) and one binary file (lib/http.pyo), it's fine do it? Spec URL: http://repo.richzendy.org/turpial/python-libturpial.spec SRPM URL: http://repo.richzendy.org/turpial/python-libturpial-1.0-2.fc19.src.rpm RPM URL: http://repo.richzendy.org/turpial/python-libturpial-1.0-2.fc19.noarch.rpm #rpmlint rpmbuild/SRPMS/python-libturpial-1.0-2.fc19.src.rpm 1 packages and 0 specfiles checked; 0 errors, 0 warnings. #rpmlint rpmbuild/RPMS/noarch/python-libturpial-1.0-2.fc19.noarch.rpm python-libturpial.noarch: W: pem-certificate /usr/lib/python2.7/site-packages/libturpial/certs/cacert.pem 1 packages and 0 specfiles checked; 0 errors, 1 warnings. Thank you for your time
1. Please imporve the summary of this package but not leave it there by: This library is the back-end used for Turpial. Remember to adapt the bugzilla bug title next time. 2. %{__python2} setup.py build should be moved to %build. 3. Remove %defattr(-,root,root,-) 4. %{_datadir}/doc/%{name}/* %{python_sitelib}/* %attr(0644,root,root) %{_datadir}/doc/%{name}/* %attr(0644,root,root) %{python_sitelib}/libturpial-%{version}-*.egg-info/* %attr(0644,root,root) %{python_sitelib}/libturpial/certs/* Mess. Just: %{_pkgdocdir}/ %{python2_sitelib}/libturpial-%{version}-*.egg-info %{python2_sitelib}/libturpial 5. Leave a blank line between each changelog.
(In reply to Christopher Meng from comment #6) > 1. Please imporve the summary of this package but not leave it there by: > > This library is the back-end used for Turpial. > @cicku, you're right, indeed it is the turpial's backend, but if we take a look in the app's setup.py, can we see setup(name="libturpial", version=VERSION, description="Microblogging library", because that, I think that the short description can be => Microblogging python library, needed for turpial (twitter client) @Richzendy, all the "tiny" modifications of the source (like as you used with sed), have to doing in %prep section. about the permissions, you can use for file in `find %{buildroot}/%{python_sitelib}/%{name} -type f ! -perm /a+x -name '*.py'`; do [ -z "`head -n 1 $file | grep \"^#!/\"`" ] && chmod -v a-x $file done Please remove the buildroot tag BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) it is used just in el5, el5 has py24, libturpial doesn't works in py24, afaik (In reply to Edwind Richzendy Contreras Soto from comment #5) > (In reply to Eduardo Echeverria from comment #3) > I need patch the source code to make this, because the path to this cert > file appears in one source file (lib/http.py) and one binary file > (lib/http.pyo), it's fine do it? Yes you can do it. via patch tag, see http://fedoraproject.org/wiki/How_to_create_an_RPM_package#.25prep_section:_.25patch_commands Just have to modify **basedir** variable else: basedir = os.path.dirname(__file__) <== modify self.ca_certs_file = os.path.realpath(os.path.join(basedir, '..', 'certs', 'cacert.pem'))
Btw this package contains tests, all the tests must be executed in %check section but.... upstream has doesn't optimized the test for avoiding internet connection, so, in this moment you can't run them, please put a comment in %check section explaining why can't you run in this moment see https://github.com/satanas/libturpial/blob/development/tests/test.py => # TODO: # * Mock tests to avoid the internet connection # * Test failure cases # * Test service methods # * Test config methods # * Test register and unregister account # * Test register and unregister columns # To run this test make sure you have an account_id file inside tests folder # with the id of the account you want to use to test. This test is not # optimized, so it will connect to Twitter and it will perform some actions # with the specified account
Thank you guys, this package have all yours recomendations: Spec URL: http://repo.richzendy.org/turpial/libturpial.spec SRPM URL: http://repo.richzendy.org/turpial/python-libturpial-1.0-3.fc19.src.rpm RPM URL: http://repo.richzendy.org/turpial/python-libturpial-1.0-3.fc19.noarch.rpm
(In reply to Edwind Richzendy Contreras Soto from comment #9) > Thank you guys, this package have all yours recomendations: > > Spec URL: http://repo.richzendy.org/turpial/libturpial.spec Sorry, my mistake, the real spec url is: http://repo.richzendy.org/turpial/python-libturpial.spec > SRPM URL: > http://repo.richzendy.org/turpial/python-libturpial-1.0-3.fc19.src.rpm > RPM URL: > http://repo.richzendy.org/turpial/python-libturpial-1.0-3.fc19.noarch.rpm
Does /etc/pki/tls/certs/ca-bundle.crt work instead of /etc/pki/libturpial/cacert.pem ? If so, you should rm the cacert.pem provided by libturpial, patch the source to use /etc/pki/tls/certs/ca-bundle.crt and have the package Require: ca-certificates .
Yes, yes it is, thank you so much Toshio! The package updates are in: Spec URL: http://repo.richzendy.org/turpial/python-libturpial.spec RPM URL: http://repo.richzendy.org/turpial/python-libturpial-1.0-4.fc19.noarch.rpm SRPM URL: http://repo.richzendy.org/turpial/python-libturpial-1.0-4.fc19.src.rpm RPMLINT out: [Richzendy@olivaw SPECS]$ rpmlint /home/Richzendy/rpmbuild/RPMS/noarch/python-libturpial-1.0-4.fc19.noarch.rpm python-libturpial.noarch: W: spelling-error Summary(en_US) turpial -> Turpin 1 packages and 0 specfiles checked; 0 errors, 1 warnings. [Richzendy@olivaw SPECS]$ rpmlint /home/Richzendy/rpmbuild/SRPMS/python-libturpial-1.0-4.fc19.src.rpm python-libturpial.src: W: spelling-error Summary(en_US) turpial -> Turpin 1 packages and 0 specfiles checked; 0 errors, 1 warnings.
Compatible with http://fedoraproject.org/wiki/Changes/UnversionedDocdirs Spec URL: http://repo.richzendy.org/turpial/python-libturpial.spec RPM URL: http://repo.richzendy.org/turpial/python-libturpial-1.0-5.fc19.noarch.rpm SRPM URL: http://repo.richzendy.org/turpial/python-libturpial-1.0-5.fc19.src.rpm Tests in koji: [Richzendy@olivaw SPECS]$ koji build --scratch f19 /home/Richzendy/rpmbuild/SRPMS/python-libturpial-1.0-5.fc19.src.rpm Uploading srpm: /home/Richzendy/rpmbuild/SRPMS/python-libturpial-1.0-5.fc19.src.rpm [====================================] 100% 00:00:17 179.69 KiB 10.22 KiB/sec Created task: 6285697 Task info: http://koji.fedoraproject.org/koji/taskinfo?taskID=6285697 Watching tasks (this may be safely interrupted)... 6285697 build (f19, python-libturpial-1.0-5.fc19.src.rpm): open (arm04-builder16.arm.fedoraproject.org) 6285698 buildArch (python-libturpial-1.0-5.fc19.src.rpm, noarch): open (buildvm-25.phx2.fedoraproject.org) 6285698 buildArch (python-libturpial-1.0-5.fc19.src.rpm, noarch): open (buildvm-25.phx2.fedoraproject.org) -> closed 0 free 1 open 1 done 0 failed 6285697 build (f19, python-libturpial-1.0-5.fc19.src.rpm): open (arm04-builder16.arm.fedoraproject.org) -> closed 0 free 0 open 2 done 0 failed 6285697 build (f19, python-libturpial-1.0-5.fc19.src.rpm) completed successfully [Richzendy@olivaw SPECS]$ koji build --scratch f20 /home/Richzendy/rpmbuild/SRPMS/python-libturpial-1.0-5.fc19.src.rpm Uploading srpm: /home/Richzendy/rpmbuild/SRPMS/python-libturpial-1.0-5.fc19.src.rpm [====================================] 100% 00:00:18 179.69 KiB 9.78 KiB/sec Created task: 6285711 Task info: http://koji.fedoraproject.org/koji/taskinfo?taskID=6285711 Watching tasks (this may be safely interrupted)... 6285711 build (f20, python-libturpial-1.0-5.fc19.src.rpm): open (arm02-builder09.arm.fedoraproject.org) 6285712 buildArch (python-libturpial-1.0-5.fc19.src.rpm, noarch): open (arm02-builder11.arm.fedoraproject.org) 6285712 buildArch (python-libturpial-1.0-5.fc19.src.rpm, noarch): open (arm02-builder11.arm.fedoraproject.org) -> closed 0 free 1 open 1 done 0 failed 6285711 build (f20, python-libturpial-1.0-5.fc19.src.rpm): open (arm02-builder09.arm.fedoraproject.org) -> closed 0 free 0 open 2 done 0 failed 6285711 build (f20, python-libturpial-1.0-5.fc19.src.rpm) completed successfully
Created attachment 836146 [details] Use pkgdocdir and sed for build the package there aren't any special reason on our guidelines for avoid the conditionals in the specs,therefore I do not have any objection on the form that is wrote the spec. BUT, I have some advices for the spec. this global macro %{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}} can be helpful, note that, if {%_pkdocdir} is present, macro can change the value to /usr/share/doc/$name or /usr/share/doc/$name-$version, according the fedora version now, you can use sed -i 's|./|'"%{_pkgdocdir}"'|' setup.py A better way for manage literal strings with forward slashes (no characters escape),is to using a delimiter in the sed command that doesn't interfere with the directory delimiter "/". Now, you can use in %doc section %doc ChangeLog AUTHORS COPYING without worrying about the location of files in the attachment you can see an example
Spec URL: http://repo.richzendy.org/turpial/python-libturpial.spec RPM URL: http://repo.richzendy.org/turpial/python-libturpial-1.0-6.fc19.noarch.rpm SRPM URL: http://repo.richzendy.org/turpial/python-libturpial-1.0-6.fc19.src.rpm [Richzendy@olivaw SPECS]$ rpmlint /home/Richzendy/rpmbuild/RPMS/noarch/python-libturpial-1.0-6.fc19.noarch.rpm python-libturpial.noarch: W: spelling-error Summary(en_US) turpial -> Turpin python-libturpial.noarch: W: spurious-executable-perm /usr/share/doc/python-libturpial-1.0/ChangeLog python-libturpial.noarch: W: spurious-executable-perm /usr/share/doc/python-libturpial-1.0/COPYING python-libturpial.noarch: W: spurious-executable-perm /usr/share/doc/python-libturpial-1.0/AUTHORS 1 packages and 0 specfiles checked; 0 errors, 4 warnings.
Please double-check and fix rpmlint warnings about permissions on %doc. and consider package approved thereafter ===== 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". 59 files have unknown license. Detailed output of licensecheck in /home/echevemaster/test-packages/1036297-python- libturpial/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 51200 bytes in 3 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: 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 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. [!]: 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. [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). [?]: Package functions as described. [x]: Latest version is packaged. [x]: Package does not include license text files separate from upstream. [-]: Patches link to upstream bugs/comments/lists or are otherwise justified. [-]: 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. [x]: Spec file according to URL is the same as in SRPM. Rpmlint ------- Checking: python-libturpial-1.0-6.fc21.noarch.rpm python-libturpial-1.0-6.fc21.src.rpm python-libturpial.noarch: W: spelling-error Summary(en_US) turpial -> Turpin python-libturpial.noarch: W: spurious-executable-perm /usr/share/doc/python-libturpial/COPYING python-libturpial.noarch: W: spurious-executable-perm /usr/share/doc/python-libturpial/AUTHORS python-libturpial.noarch: W: spurious-executable-perm /usr/share/doc/python-libturpial/ChangeLog python-libturpial.src: W: spelling-error Summary(en_US) turpial -> Turpin 2 packages and 0 specfiles checked; 0 errors, 5 warnings. Rpmlint (installed packages) ---------------------------- # rpmlint python-libturpial python-libturpial.noarch: W: spelling-error Summary(en_US) turpial -> Turpin python-libturpial.noarch: W: spurious-executable-perm /usr/share/doc/python-libturpial/COPYING python-libturpial.noarch: W: spurious-executable-perm /usr/share/doc/python-libturpial/AUTHORS python-libturpial.noarch: W: spurious-executable-perm /usr/share/doc/python-libturpial/ChangeLog 1 packages and 0 specfiles checked; 0 errors, 4 warnings. # echo 'rpmlint-done:' Requires -------- python-libturpial (rpmlib, GLIBC filtered): ca-certificates python(abi) python-oauth python-requests python-simplejson Provides -------- python-libturpial: python-libturpial Source checksums ---------------- http://files.turpial.org.ve/sources/stable/libturpial-1.0.tar.gz : CHECKSUM(SHA256) this package : a1ceb3d99aced3742b20763a75de2acd8ed4e409628aa4e328e85ca582dbadf7 CHECKSUM(SHA256) upstream package : a1ceb3d99aced3742b20763a75de2acd8ed4e409628aa4e328e85ca582dbadf7
Spec URL: http://repo.richzendy.org/turpial/python-libturpial.spec RPM URL: http://repo.richzendy.org/turpial/python-libturpial-1.0-7.fc19.noarch.rpm SRPM URL: http://repo.richzendy.org/turpial/python-libturpial-1.0-7.fc19.src.rpm I need change the %doc macro and use %{_pkgdocdir}/* instead in the %file section because my efforts to change this in the %install section doesn't work because the %doc macro change this perms (really weird) and give executable perms to the doc files, if i try change this perms in the %install sections the %doc macro give executable perms anyway. I can try use %attr(0644,root,root) instead, but previously you has been told not to use that in the %file section. than you for your time @echevemaster
yes, pkgdocdir can function in this case, I tested it and works. (and not trigger any rpmlint warning). use it. I can assume that you will change the spec before importing. So, the package is approved. Thanks for your patience PACKAGE APPROVED
Starting from python-libturpial-1.0-6.fc19.noarch.rpm, add this to the %install section: chmod 0644 ChangeLog AUTHORS COPYING That should take care of the permissions of the doc files.
Final version: Spec URL: http://repo.richzendy.org/turpial/python-libturpial.spec RPM URL: http://repo.richzendy.org/turpial/python-libturpial-1.0-8.fc19.noarch.rpm SRPM URL: http://repo.richzendy.org/turpial/python-libturpial-1.0-8.fc19.src.rpm Thanks to Toshio
for the records,(for anyone that search on search engines the same problem) toshio are right. although pkgdocdir is valid, the nature automatic of %doc is the right form.
New Package SCM Request ======================= Package Name: python-libturpial Short Description: Micro blogging python library, needed for turpial (twitter client) Owners: richzendy Branches: f19 f20 el6 InitialCC:
Git done (by process-git-requests).
python-libturpial-1.0-8.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/python-libturpial-1.0-8.fc20
python-libturpial-1.0-8.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/python-libturpial-1.0-8.fc19
python-libturpial-1.0-10.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/python-libturpial-1.0-10.el6
python-libturpial-1.0-8.fc19 has been pushed to the Fedora 19 testing repository.
python-libturpial-1.0-8.fc20 has been pushed to the Fedora 20 stable repository.
python-libturpial-1.1.16-2.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/python-libturpial-1.1.16-2.el6
python-libturpial-1.1.16-1.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/python-libturpial-1.1.16-1.fc19
python-libturpial-1.1.16-1.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.
python-libturpial-1.1.16-2.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.