Bug 1757166

Summary: Review Request: gedit-plugin-editorconfig - EditorConfig plugin for Gedit
Product: [Fedora] Fedora Reporter: "FeRD" (Frank Dana) <ferdnyc>
Component: Package ReviewAssignee: Robert-André Mauchin 🐧 <zebob.m>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: package-review, zebob.m
Target Milestone: ---Flags: zebob.m: fedora-review+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-10 11:04:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description "FeRD" (Frank Dana) 2019-09-30 17:47:13 UTC
Spec URL: https://ferdnyc.fedorapeople.org/packaging/gedit-plugin-editorconfig.spec
SRPM URL: https://ferdnyc.fedorapeople.org/packaging/gedit-plugin-editorconfig-0.5.3-1.fc30.src.rpm
Description: 
EditorConfig helps maintain consistent coding styles for multiple developers
working on the same project across various editors and IDEs. The EditorConfig
project consists of a file format for defining coding styles and a collection of
text editor plugins that enable editors to read the file format and adhere to
defined styles. EditorConfig files are easily readable and they work nicely with
version control systems.

This package contains the EditorConfig plugin for GEdit.

Fedora Account System Username: ferdnyc

Comment 1 "FeRD" (Frank Dana) 2019-09-30 17:49:39 UTC
Note: The package is an ARCH package — despite not having any binary components, and with '%global debug_package %{nil}' set in the spec file — because, as I explain in the comments at the top of the .spec, the plugin is installed into the GEdit plugin dir, which is in the arch-dependent libdir.

It also 'Requires: gedit%{_isa}' for the same reason.

Comment 2 Robert-André Mauchin 🐧 2019-09-30 18:47:43 UTC
 - Use:

Source0:        https://github.com/editorconfig/editorconfig-gedit/archive/v%{version}/editorconfig-gedit-%{version}.tar.gz

 - Build fails:

+ %py_byte_compile /usr/bin/python3 /builddir/build/BUILDROOT/gedit-plugin-editorconfig-0.5.3-1.fc32.x86_64/usr/lib64/gedit/plugins/editorconfig_plugin
/var/tmp/rpm-tmp.2QX1tx: line 43: fg: no job control

 I believe you need to BR python3-devel to use this macro:

BuildRequires:  python%{python3_pkgversion}-devel

 - Own this dir by removing the *:

%{_libdir}/gedit/plugins/editorconfig_plugin/__pycache__/



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: "Unknown or generated", "BSD 2-clause "Simplified" License",
     "Python Software Foundation License version 2", "*No copyright* Python
     Software Foundation License". 39 files have unknown license. Detailed
     output of licensecheck in /home/bob/packaging/review/gedit-plugin-
     editorconfig/review-gedit-plugin-editorconfig/licensecheck.txt
[!]: Package requires other packages for directories it uses.
     Note: No known owner of
     /usr/lib64/gedit/plugins/editorconfig_plugin/__pycache__
[x]: %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.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[-]: Useful -debuginfo package or justification otherwise.
[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: 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 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]: Packages MUST NOT have dependencies (either build-time or runtime) on
     packages named with the unversioned python- prefix unless no properly
     versioned package exists. Dependencies on Python packages instead MUST
     use names beginning with python2- or python3- as appropriate.
[x]: Python packages must not contain %{pythonX_site(lib|arch)}/* in %files
[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.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[-]: 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.
     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: gedit-plugin-editorconfig-0.5.3-1.fc32.x86_64.rpm
          gedit-plugin-editorconfig-0.5.3-1.fc32.src.rpm
gedit-plugin-editorconfig.x86_64: W: only-non-binary-in-usr-lib
2 packages and 0 specfiles checked; 0 errors, 1 warnings.

Comment 3 "FeRD" (Frank Dana) 2019-10-01 02:41:49 UTC
(In reply to Robert-André Mauchin from comment #2)
>  - Use:
> 
> Source0:       
> https://github.com/editorconfig/editorconfig-gedit/archive/v%{version}/
> editorconfig-gedit-%{version}.tar.gz
> 

Done.

>  - Build fails:
> 
> + %py_byte_compile /usr/bin/python3
> /builddir/build/BUILDROOT/gedit-plugin-editorconfig-0.5.3-1.fc32.x86_64/usr/
> lib64/gedit/plugins/editorconfig_plugin
> /var/tmp/rpm-tmp.2QX1tx: line 43: fg: no job control
> 
>  I believe you need to BR python3-devel to use this macro:
> 
> BuildRequires:  python%{python3_pkgversion}-devel

Whoops, duh. Fixed.
 
>  - Own this dir by removing the *:
> 
> %{_libdir}/gedit/plugins/editorconfig_plugin/__pycache__/

Ah, it seems I misread https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_byte_compiling ... fixed.


Specfile and .srpm both updated at links provided in original request. All items addressed. (And tested in mock this time, so I know it actually builds. O:) )

Comment 4 Robert-André Mauchin 🐧 2019-10-01 13:54:19 UTC
LGTM, package approved.

Comment 5 Gwyn Ciesla 2019-10-01 15:33:51 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/gedit-plugin-editorconfig

Comment 6 Mattia Verga 2021-07-10 11:04:10 UTC
Package is available in repos