Spec URL: http://file.vornet.cz/tmp/fedora-submit-ydiff/s/ydiff.spec SRPM URL: http://file.vornet.cz/tmp/fedora-submit-ydiff/s/ydiff-1.1-1.fc28.src.rpm Description: Term based tool to view colored, incremental diff in a Git/Mercurial/Svn workspace or from stdin, with side by side (similar to diff -y) and auto pager support. Fedora Account System Username: netvor Hi, this is my second package, first Python one, I'll appreciate your mentoring. Here's Koji scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=27887772
- Should not be needed in %files %{python2_sitelib}/%{name}.pyc %{python2_sitelib}/%{name}.pyo - You should package it with Python 3 not Python 2. Python 2 will be phased out from Fedora near 2020: - You should include the Python provide macro: BuildRequires: python3-devel And: %package -n python3-%{name} Summary: %{summary} %{?python_provide:%python_provide python3-%{name}} %description -n python3-%{name} Python library that implements API used by ydiff tool. And: %files -n python3-%{name} %{python3_sitelib}/__pycache__/* %{python3_sitelib}/%{name}.py %{python3_sitelib}/%{name}-%{version}-py?.?.egg-info
(In reply to Robert-André Mauchin from comment #1) > - You should package it with Python 3 not Python 2. Python 2 will be phased > out from Fedora near 2020: > > - You should include the Python provide macro: > > BuildRequires: python3-devel > > And: > > %package -n python3-%{name} > Summary: %{summary} > %{?python_provide:%python_provide python3-%{name}} > > %description -n python3-%{name} > Python library that implements API used by ydiff tool. > > > And: > > %files -n python3-%{name} > %{python3_sitelib}/__pycache__/* > %{python3_sitelib}/%{name}.py > %{python3_sitelib}/%{name}-%{version}-py?.?.egg-info (I was under the impression that ydiff did not support Python3, looks like I was wrong.) I've added the py3 gear. However, the guideline does not seem to match perfectly on this layout where binary is packaged as own sub-package. So I "stole" what was missing from fmf/fmf.spec (in particular, the ydiff subpackage should require and use the python3-ydiff. > - Should not be needed in %files > > %{python2_sitelib}/%{name}.pyc > %{python2_sitelib}/%{name}.pyo Anyway, I do get errors when I remove them. RPM build errors: error: Installed (but unpackaged) file(s) found: /usr/lib/python2.7/site-packages/ydiff.pyc /usr/lib/python2.7/site-packages/ydiff.pyo Installed (but unpackaged) file(s) found: /usr/lib/python2.7/site-packages/ydiff.pyc /usr/lib/python2.7/site-packages/ydiff.pyo The guide actually says that the files should be included, although it's not clear if that should be done explicity in %files or some RPM automation does it. I'll post new version in few minutes.
Spec URL: http://file.vornet.cz/tmp/fedora-submit-ydiff/r1/ydiff.spec SRPM URL: http://file.vornet.cz/tmp/fedora-submit-ydiff/r1/ydiff-1.1-1.fc28.src.rpm Description: Term based tool to view colored, incremental diff in a Git/Mercurial/Svn workspace or from stdin, with side by side (similar to diff -y) and auto pager support. Fedora Account System Username: netvor Hi, this is my second package, first Python one, I'll appreciate your mentoring. Here's Koji scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=27898821
- You misunderstand me: only package the Python 3 lib, Py2 is not needed. Or, in the case you want to support current EPEL, make a conditional with %bcond_without python3 to build Py3 for Fedora and Py2 for EPEL: %if 0%{?rhel} >= 8 || 0%{?fedora} >= 19 %bcond_without python3 %else %bcond_with python3 %endif Name: ydiff Version: 1.1 Release: 1%{?dist} Summary: View colored, incremental diff URL: https://github.com/ymattw/ydiff License: BSD Source0: https://github.com/ymattw/ydiff/archive/%{version}/%{name}-%{version}.tar.gz %if %{without python3} BuildRequires: python2-devel Requires: python%{python2_pkgversion}-%{name} %else BuildRequires: python3-devel Requires: python%{python3_pkgversion}-%{name} %endif Requires: less BuildArch: noarch %description Term based tool to view colored, incremental diff in a Git/Mercurial/Svn workspace or from stdin, with side by side (similar to diff -y) and auto pager support. %if %{without python3} %package -n python2-%{name} %{?python_provide:%python_provide python2-%{name}} Summary: %{summary} %description -n python2-%{name} Python library that implements API used by ydiff tool. %else %package -n python3-%{name} Summary: %{summary} %{?python_provide:%python_provide python3-%{name}} %description -n python3-%{name} Python library that implements API used by ydiff tool. %endif %prep %autosetup -n %{name}-%{version} /usr/bin/sed -i '/#!\/usr\/bin\/env python/d' ydiff.py %build %if %{without python3} %py2_build %else %py3_build %endif %install %if %{without python3} %py2_install %else %py3_install %endif %files %doc README.rst %license LICENSE %{_bindir}/ydiff %if %{without python3} %files -n python2-%{name} %{python2_sitelib}/%{name}.py %{python2_sitelib}/%{name}.pyc %{python2_sitelib}/%{name}.pyo %{python2_sitelib}/%{name}-*.egg-info %else %files -n python3-%{name} %{python3_sitelib}/__pycache__/* %{python3_sitelib}/%{name}.py %{python3_sitelib}/%{name}-%{version}-py?.?.egg-info %endif If you don't need EPEL, just drop the Py 2 package.
You're right, I misunderstood. I don't really need EPEL so I'll drop the py2 stuff. Thanks!
Spec URL: http://file.vornet.cz/tmp/fedora-submit-ydiff/r4/ydiff.spec SRPM URL: http://file.vornet.cz/tmp/fedora-submit-ydiff/r4/ydiff-1.1-1.fc28.src.rpm Description: Term based tool to view colored, incremental diff in a Git/Mercurial/Svn workspace or from stdin, with side by side (similar to diff -y) and auto pager support. Fedora Account System Username: netvor Hi, this is my second package, first Python one, I'll appreciate your mentoring. Here's Koji scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=27899890
Package approved. Package Review ============== Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated [ ] = Manual review needed ===== 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: "BSD (3 clause)", "Unknown or generated", "*No copyright* BSD (unspecified)". 97 files have unknown license. Detailed output of licensecheck in /home/bob/packaging/review/ydiff/review- ydiff/licensecheck.txt [x]: License file installed when any subpackage combination is installed. [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]: 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 %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 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]: Fully versioned dependency in subpackages if applicable. Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in python3-ydiff [?]: 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]: 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. [x]: Spec file according to URL is the same as in SRPM. Rpmlint ------- Checking: ydiff-1.1-1.fc29.noarch.rpm python3-ydiff-1.1-1.fc29.noarch.rpm ydiff-1.1-1.fc29.src.rpm ydiff.noarch: W: spelling-error %description -l en_US workspace -> work space, work-space, works pace ydiff.noarch: W: spelling-error %description -l en_US stdin -> stein, stain, stdio ydiff.noarch: W: no-manual-page-for-binary ydiff python3-ydiff.noarch: W: no-documentation ydiff.src: W: spelling-error %description -l en_US workspace -> work space, work-space, works pace ydiff.src: W: spelling-error %description -l en_US stdin -> stein, stain, stdio 3 packages and 0 specfiles checked; 0 errors, 6 warnings.
> 20:20 <+mboddu> netvor: Okay, here's what we can do, can you comment on both of the tickets that with you RH account saying that you want to give them to "netvor", that way we can verify/confirm it is you Hi, I'd like to transfer this to my other identity, ie. @netvor under FAS.
(fedscm-admin): The Pagure repository was created at https://src.fedoraproject.org/rpms/ydiff
This can be closed as of https://koji.fedoraproject.org/koji/buildinfo?buildID=1100026 https://koji.fedoraproject.org/koji/buildinfo?buildID=1100092 etc., right? https://fedoraproject.org/wiki/Package_Review_Process#Contributor