Bug 1619528

Summary: Review Request: textern - Firefox add-on for editing text in your favorite external editor
Product: [Fedora] Fedora Reporter: Pavel Raiskup <praiskup>
Component: Package ReviewAssignee: Robert-André Mauchin 🐧 <eclipseo>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: eclipseo, igor.raits, lukastyrychtr, package-review, zbyszek
Target Milestone: ---Flags: eclipseo: 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:
: 1619610 (view as bug list) Environment:
Last Closed: 2018-10-23 21:07:04 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:
Bug Depends On:    
Bug Blocks: 1619610    

Description Pavel Raiskup 2018-08-21 06:45:06 UTC
Spec URL: https://raw.githubusercontent.com/praiskup/textern-rpm/master/textern.spec
SRPM URL: https://copr-be.cloud.fedoraproject.org/results/praiskup/textern/fedora-rawhide-x86_64/00789559-textern/textern-0.git5339fb6-1.fc30.src.rpm
Description:
Textern is a Firefox add-on that allows you to edit text areas in web pages
using an external editor.  It is similar in functionality to the popular
It's All Text! add-on, though makes use of the WebExtension API and is thus
fully compatible with multiprocessing and supported beyond Firefox 57.

This is not a self-standing Firefox add-on, it's only the "native" application
used by Add-on named "textern".  Please install the Add-on manually.

Fedora Account System Username: praiskup

Comment 1 Pavel Raiskup 2018-08-21 06:45:49 UTC
Test builds:
https://copr.fedorainfracloud.org/coprs/praiskup/textern/

Comment 3 Lukáš Tyrychtr 2018-08-21 09:52:53 UTC
Note that i do not actually understand the mock install failure, i can install the package just fine.

Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed


Issues:
=======
- Package installs properly.
  Note: Installation errors (see attachment)
  See: https://fedoraproject.org/wiki/Packaging:Guidelines
- 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: make
  See: http://fedoraproject.org/wiki/Packaging/Guidelines#Exceptions_2


===== 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", "*No copyright* BSD (unspecified)". 12
     files have unknown license. Detailed output of licensecheck in
     /home/ltyrycht/1619528-textern/licensecheck.txt
[?]: Package does not own files or directories owned by other packages.
     Note: Dirs in package are owned also by: /usr/lib64/mozilla/native-
     messaging-hosts(webextension-token-signing, chrome-gnome-shell)
[-]: %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.
[x]: Useful -debuginfo package or justification otherwise.
[x]: Package is not known to require an ExcludeArch tag.
[x]: 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 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

===== 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]: 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.
[x]: SourceX tarball generation or download is documented.
     Note: Package contains tarball without URL, check comments
[-]: 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]: 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]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[!]: Rpmlint is run on all installed packages.
     Note: Mock build failed
     See: http://fedoraproject.org/wiki/Packaging/Guidelines#rpmlint
[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.


Installation errors
-------------------
INFO: mock.py version 1.4.13 starting (python version = 3.6.6)...
Start: init plugins
INFO: selinux disabled
Finish: init plugins
Start: run
Start: chroot init
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled dnf cache
Start: cleaning dnf metadata
Finish: cleaning dnf metadata
INFO: enabled HW Info plugin
Mock Version: 1.4.13
INFO: Mock Version: 1.4.13
Finish: chroot init
INFO: installing package(s): /home/ltyrycht/1619528-textern/results/textern-0.git5339fb6-3.fc29.x86_64.rpm
ERROR: Command failed: 
 # /usr/bin/dnf --installroot /var/lib/mock/fedora-rawhide-x86_64/root/ --releasever 30 --disableplugin=local --setopt=deltarpm=False install /home/ltyrycht/1619528-textern/results/textern-0.git5339fb6-3.fc29.x86_64.rpm



Rpmlint
-------
Checking: textern-0.git5339fb6-3.fc29.x86_64.rpm
          textern-0.git5339fb6-3.fc29.src.rpm
textern.x86_64: E: no-binary
textern.x86_64: W: only-non-binary-in-usr-lib
textern.src: W: invalid-url Source0: jlebon-textern-5339fb6.tar.gz
2 packages and 0 specfiles checked; 1 errors, 2 warnings.




Requires
--------
textern (rpmlib, GLIBC filtered):
    /usr/bin/python3
    mozilla-filesystem
    python3-inotify_simple



Provides
--------
textern:
    textern
    textern(x86-64)



Generated by fedora-review 0.6.1 (f03e4e7) last change: 2016-05-02
Command line :/usr/bin/fedora-review -b 1619528 -m fedora-rawhide-x86_64
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, Shell-api
Disabled plugins: Java, C/C++, Python, fonts, SugarActivity, Ocaml, Perl, Haskell, R, PHP
Disabled flags: EXARCH, DISTTAG, EPEL5, BATCH, EPEL6

Comment 4 Pavel Raiskup 2018-08-21 10:16:06 UTC
Since not all projects depend on /bin/make, I'd rather keep that
BuildRequirement on place (one day we could have no /bin/make in default
buildroot, same as we have no python/gcc/perl/etc).

The install failure is weird.  What system did you run fedora-review
on, and what chroot did you use?

Comment 5 Pavel Raiskup 2018-08-21 10:47:57 UTC
Run on fedora 28:
$ fedora-review -b 1619528
...
[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 pr
...

Comment 6 Lukáš Tyrychtr 2018-08-21 13:15:28 UTC
Strange, also run on F28, tried the default mock config and also rawhide. However as this was one of my first reviews and one of the reasons for it is that i need to get sponsored to the packager group myself you probably should wait if someone else can verify my results.

Comment 7 Robert-André Mauchin 🐧 2018-08-21 13:30:59 UTC
(In reply to Lukáš Tyrychtr from comment #3)
> Note that i do not actually understand the mock install failure, i can
> install the package just fine.
> 
In hat case check in results/root.log and search for "Error:". You'll get the reason why it failed.

Comment 8 Robert-André Mauchin 🐧 2018-08-21 14:00:52 UTC
 - As Lukáš noted, add a comment explaining why the patch is needed.

[!]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.

 - I don't get this:

# curl https://api.github.com/repos/jlebon/textern/tarball/5339fb6 > tarball
Source0:        jlebon-textern-%gitrev.tar.gz

   Grab the tar.gz directly:

Source0:        %url/archive/%{gitrev}/%{name}-%{gitrev}.tar.gz

 - Version/Release is not good. See the rules on versioning a snapshot: https://fedoraproject.org/wiki/Packaging:Versioning#Snapshots


%global commit          5339fb6ae33c72c27f2769d0fc3dabb6191b5d3a
%global shortcommit     %(c=%{commit}; echo ${c:0:7})
%global snapshotdate    20180821
%global debug_package   %nil

# this enforces us to create non-noarch package
%global native_dir      %_libdir/mozilla/native-messaging-hosts

%global __brp_python_bytecompile :

Name:           textern
Version:        0
Release:        0.3.%{snapshotdate}git%{shortcommit}%{?dist}
Summary:        Firefox add-on for editing text in your favorite external editor

License:        GPLv3
URL:            https://github.com/jlebon/textern

Source0:        %url/archive/%{shortcommit}/%{name}-%{shortcommit}.tar.gz


   And

%prep
%autosetup -p1 -n textern-%commit


 Note the 0.3 instead of 3 for a pre-release.

Comment 9 Lukáš Tyrychtr 2018-08-21 15:50:30 UTC
(In reply to Robert-André Mauchin from comment #7)
> (In reply to Lukáš Tyrychtr from comment #3)
> > Note that i do not actually understand the mock install failure, i can
> > install the package just fine.
> > 
> In hat case check in results/root.log and search for "Error:". You'll get
> the reason why it failed.
The error was that for some reason python3-inotify_simple was not found in the repository, but it was some sort of temporary failure, it installs just fine now.

Comment 11 Robert-André Mauchin 🐧 2018-08-21 22:24:51 UTC
Sounds good, package approved.

Comment 12 Igor Raits 2018-08-22 07:11:03 UTC
Shouldn't the package be named `firefox-textern`?

Comment 13 Pavel Raiskup 2018-08-22 07:35:09 UTC
I don't think so, at least upstream doesn't name it that way.

I guess that the native "server" could well serve it's purpose also
for chromium users one day (or at least icecat, etc.).

Comment 14 Igor Raits 2018-08-22 07:49:17 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/textern

Comment 15 Zbigniew Jędrzejewski-Szmek 2018-08-22 08:50:05 UTC
(In reply to Lukáš Tyrychtr from comment #3)
> - 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: make
>   See: http://fedoraproject.org/wiki/Packaging/Guidelines#Exceptions_2

That's fedora-review being plain wrong. See https://bugzilla.redhat.com/show_bug.cgi?id=1613069, https://pagure.io/packaging-committee/issue/497#comment-146293.

> [?]: Package does not own files or directories owned by other packages.
>      Note: Dirs in package are owned also by: /usr/lib64/mozilla/native-
>      messaging-hosts(webextension-token-signing, chrome-gnome-shell)

The rule to not co-own directories is mostly outdated too. If there's a "-filesystem" package that owns those directories, then it's better to depend on it, but when there isn't, it's better for unrelated packages to co-own a directory than to introduce unwanted Requires. (In this case depending on mozilla-filesystem is fine, my comment was about the general case.)

> License: GPLv3
The license is tagged wrong. Looking at the SPDX identifiers in 
https://github.com/jlebon/textern/blob/master/native/textern.py and other places shows that the license is GPLv3+. Unfortunately the GPLv3 LICENSE text is very long and one cannot tell if the program is license GPLv3 or GPLv3-or-later just by looking at the LICENSE file.

Comment 16 Pavel Raiskup 2018-08-22 11:16:03 UTC
Thanks, I did s/GPLv3/GPLv3+/.

Comment 17 Fedora Update System 2018-08-22 11:30:42 UTC
textern-0-0.4.20180821git5339fb6.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-5048640cb8

Comment 18 Jason Tibbitts 2018-08-22 16:29:20 UTC
This package probably should have been named webextension-textern to match the other webextension we have.  This will be formalized into packaging guidelines as soon as I am able to get around to writing them.

Comment 19 Pavel Raiskup 2018-08-22 17:19:39 UTC
Hmm.  I don't think any prefix would help (ask upstream maintainer why the
prefix neither is there..).

Of course, if you think I should add a word "webextension" somewhere - so
'dnf search webextension' hits the package, fill a PR.

FWIW:

$ sudo dnf search webextension
Last metadata expiration check: 1:26:52 ago on Wed 22 Aug ...
================= Name Matched: webextension ============ ...
webextension-token-signing.x86_64 : Firefox extension for ...
(only _one_ package)

'dnf search firefox' gives me ~8 hits

'dnf search mozilla' gives me ~50 hits.

Comment 20 Jason Tibbitts 2018-08-22 17:35:03 UTC
The "webextension" prefix wouldn't come from upstream, it would come from Fedora.  This will be considered an "addon package" according to the packaging guidelines.  It is very common in Fedora to prefix the upstream name with a something indicating that the package is a module, plugin or addon to some other system.

Anyway, the question was raised so I'm just letting you know what the packaging guidelines will be saying in the future.

Comment 21 Robert-André Mauchin 🐧 2018-08-22 18:42:33 UTC
I disagree, I specifically did not mention the prefix because this package is not a web extension, but a helper program working with the web extension through the native messaging host mechanism.

Comment 22 Pavel Raiskup 2018-08-22 20:52:01 UTC
Artificial prefixes only make the Linux distributions different.  Especially
for trivial add-on case (it is almost always leaf package), one would have to
ask what would be the benefits for even more complicated guidelines.

In postgresql-* case we used to use this anti-pattern and those few examples
now evoke that the packages are sub-packages from postgresql.spec.  So we've
had several package-rename tasks in TODO list since ever.

There's very "fortunate" situation with the browser plugin mechanisms
nowadays, though, because they are (almost?) impossible to package downstream.
That said, there are many topics waiting for Fedora guidelines, but not this
one.

Comment 23 Fedora Update System 2018-08-23 11:02:13 UTC
textern-0-0.4.20180821git5339fb6.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-5048640cb8

Comment 24 Fedora Update System 2018-10-23 21:07:04 UTC
textern-0-0.4.20180821git5339fb6.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.