Bug 1877702

Summary: Review Request: revelation - Password manager for the GNOME desktop
Product: [Fedora] Fedora Reporter: Mikel Olasagasti Uranga <mikel>
Component: Package ReviewAssignee: Robert-André Mauchin 🐧 <zebob.m>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: fedora, 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: 2020-09-12 16:34:28 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 Mikel Olasagasti Uranga 2020-09-10 08:54:12 UTC
Spec URL: https://mikel.olasagasti.info/tmp/fedora/revelation.spec
SRPM URL: https://mikel.olasagasti.info/tmp/fedora/revelation-0.5.2-1.fc32.src.rpm
Description: Password manager for the GNOME desktop
Fedora Account System Username: mikelo2

Retired package https://src.fedoraproject.org/rpms/revelation due to old python2/pygtk deps that have been migrated to python3 and gtk3.

spec is based on previous F30 spec with updated deps.

Comment 1 Artur Frenszek-Iwicki 2020-09-10 10:29:07 UTC
>Summary:        Revelation is a password manager for the GNOME desktop.
No period at the end, please.
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_tags_and_sections

>License:        GPL-2.0
Use the "GPLv2" short identifier.
https://fedoraproject.org/wiki/Licensing:Main#Good_Licenses

>%install
>rm -rf $RPM_BUILD_ROOT
Don't do this.
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_tags_and_sections

>%files
>%{_datadir}/metainfo/*.appdata.xml
>%{_datadir}/applications/*.desktop
You should add a BuildRequires: for "desktop-file-utils" and "libappstream-glib" and then validate the desktop entry and AppStream file, either at end of %install or in %check:
$ appstream-util validate-relax --nonet $PATH_TO_FILE
$ desktop-file-validate $PATH_TO_FILE
https://docs.fedoraproject.org/en-US/packaging-guidelines/AppData/#_app_data_validate_usage
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_desktop_files

Comment 2 Mikel Olasagasti Uranga 2020-09-10 10:49:47 UTC
Thanks for the review Arthur!

Updated spec: https://mikel.olasagasti.info/tmp/fedora/revelation.spec
Updated srpm: https://mikel.olasagasti.info/tmp/fedora/revelation-0.5.2-2.fc32.src.rpm

Comment 3 Robert-André Mauchin 🐧 2020-09-11 03:48:17 UTC
 - You need to justify that, or better find why debug patkage doesn't work

%global debug_package %{nil}

It seems the whole package is Python code, so shouldn't you add:

BuildArch:  noarch

therefore %global debug_package %{nil} wouldn't be needed.

There is no binary code, no so files, no binary then you need to install into python3_sitelib. The pyc files will go correctly into the pycache directory.
So something like https://github.com/mikelolasagasti/revelation/commit/7d41a140de2f11d95d0a20cfe2cf8958063006cd should be reverted.


===================================================================================
From ffc556cff61ac20cd027d3653571d1cb9c3c5bb4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m>
Date: Fri, 11 Sep 2020 05:26:45 +0200
Subject: [PATCH] Install python files to pythondir instead of pyexecdir
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Robert-André Mauchin <zebob.m>
---
 src/Makefile.am                 | 2 +-
 src/bundle/Makefile.am          | 2 +-
 src/lib/Makefile.am             | 2 +-
 src/lib/datahandler/Makefile.am | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index f136034..b4e3f56 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -13,6 +13,6 @@ CLEANFILES	= revelation
 
 revelation: revelation.py
 	sed \
-		-e "s|\@pyexecdir\@|$(pyexecdir)|" \
+		-e "s|\@pythondir\@|$(pythondir)|" \
 		< $< > $@
 	chmod +x $@
diff --git a/src/bundle/Makefile.am b/src/bundle/Makefile.am
index 8b74ecf..33ae1fc 100644
--- a/src/bundle/Makefile.am
+++ b/src/bundle/Makefile.am
@@ -5,7 +5,7 @@
 # $Id$
 #
 
-bundledir	= $(pyexecdir)/revelation/bundle
+bundledir	= $(pythondir)/revelation/bundle
 bundle_PYTHON	= \
 	__init__.py \
 	AfSplitter.py \
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index 987fd46..f58996d 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -7,7 +7,7 @@
 
 SUBDIRS				= datahandler
 
-librevelationdir		= $(pyexecdir)/revelation
+librevelationdir		= $(pythondir)/revelation
 librevelation_PYTHON		= \
 	__init__.py \
 	data.py \
diff --git a/src/lib/datahandler/Makefile.am b/src/lib/datahandler/Makefile.am
index 8aeeed8..c4bfefc 100644
--- a/src/lib/datahandler/Makefile.am
+++ b/src/lib/datahandler/Makefile.am
@@ -5,7 +5,7 @@
 # $Id$
 #
 
-datahandlerdir		= $(pyexecdir)/revelation/datahandler
+datahandlerdir		= $(pythondir)/revelation/datahandler
 datahandler_PYTHON	= \
 	__init__.py \
 	base.py \
-- 
2.28.0
================================================================================



# Install python files to pythondir instead of pyexecdir
Patch0:         0001-Install-python-files-to-pythondir-instead-of-pyexecd.patch

[…]

BuildArch:  noarch

[…]

BuildRequires:  gettext-devel (instead of BuildRequires:  gettext)

[…]

%build
autoreconf -fiv

[…]

%{python3_sitelib}/%{name}/


 - %{_datadir}/metainfo → %{_metainfodir}

 - Requires: hicolor-icon-theme to own the icons directory

 - Remove shebang:

revelation.x86_64: E: non-executable-script /usr/lib64/python3.9/site-packages/revelation/PBKDF2.py 644 /usr/bin/python3 
revelation.x86_64: E: non-executable-script /usr/lib64/python3.9/site-packages/revelation/bundle/PBKDFv2.py 644 /usr/bin/env python3

 - Don't repeat the name of the package in the summary

revelation.src: W: name-repeated-in-summary C Revelation.

 - This file is MIT, add it to the license field and add a comment explaining the license breakdown.

Expat License
-------------
revelation-0.5.2/src/lib/PBKDF2.py

 - Use %global not %define:

%global gettext_package revelation
%global glib2_version 2.52.0
%global gtk3_version 3.14


https://koji.fedoraproject.org/koji/taskinfo?taskID=51184586

I'm taking a break this weekend, with likely a shitty Internet, so I might not be able to approve this package until Monday.



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.
[!]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "GNU General Public License, Version
     2", "FSF All Permissive License", "[generated file]", "*No copyright*
     GNU General Public License", "FSF Unlimited License (with Retention)
     GNU Lesser General Public License GNU General Public License
     [generated file]", "GNU General Public License v2.0 or later
     [generated file]", "GNU General Public License v3.0 or later", "FSF
     Unlimited License (with Retention)", "FSF Unlimited License [generated
     file]", "Expat License [generated file]", "GNU General Public
     License", "GNU General Public License v2.0 or later", "Expat License".
     84 files have unknown license. Detailed output of licensecheck in
     /home/bob/packaging/review/revelation/review-
     revelation/licensecheck.txt
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: The spec file handles locales properly.
[!]: 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.
[ ]: 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 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 %license.
[x]: Package requires other packages for directories it uses.
[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]: Package contains desktop file if it is a GUI application.
[x]: Package installs a %{name}.desktop using desktop-file-install or
     desktop-file-validate if there is such a file.
[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 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.
[!]: 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.
[x]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.
[-]: 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.
[ ]: Spec use %global instead of %define unless justified.
     Note: %define requiring justification: %define gettext_package
     revelation, %define glib2_version 2.52.0, %define gtk3_version 3.14
[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.

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

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Package should not use obsolete m4 macros
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: revelation-0.5.2-2.fc34.noarch.rpm
          revelation-0.5.2-2.fc34.src.rpm
revelation.noarch: W: name-repeated-in-summary C Revelation
revelation.noarch: E: non-executable-script /usr/lib/python3.9/site-packages/revelation/PBKDF2.py 644 /usr/bin/python3 
revelation.noarch: E: non-executable-script /usr/lib/python3.9/site-packages/revelation/bundle/PBKDFv2.py 644 /usr/bin/env python3
revelation.noarch: W: no-manual-page-for-binary revelation
revelation.src: W: name-repeated-in-summary C Revelation
2 packages and 0 specfiles checked; 2 errors, 3 warnings.

Comment 4 Mikel Olasagasti Uranga 2020-09-11 08:03:34 UTC
Thanks Robert-André for the review!

Updated spec: https://mikel.olasagasti.info/tmp/fedora/revelation.spec
Updated srpm: https://mikel.olasagasti.info/tmp/fedora/revelation-0.5.2-3.fc32.src.rpm

Comment 5 Robert-André Mauchin 🐧 2020-09-11 09:32:55 UTC
Looks great! Package approved.

Comment 6 Fedora Update System 2020-09-11 13:32:00 UTC
FEDORA-2020-bb678382b2 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-bb678382b2

Comment 7 Fedora Update System 2020-09-11 13:32:27 UTC
FEDORA-2020-4079ec870b has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-4079ec870b

Comment 8 Fedora Update System 2020-09-11 13:33:02 UTC
FEDORA-2020-e7c0f115ea has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-e7c0f115ea

Comment 9 Fedora Update System 2020-09-11 15:38:37 UTC
FEDORA-2020-4079ec870b has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2020-4079ec870b \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-4079ec870b

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2020-09-11 16:01:03 UTC
FEDORA-2020-e7c0f115ea has been pushed to the Fedora 31 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2020-e7c0f115ea \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-e7c0f115ea

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Fedora Update System 2020-09-11 20:18:23 UTC
FEDORA-2020-bb678382b2 has been pushed to the Fedora 33 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2020-bb678382b2 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-bb678382b2

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2020-09-12 16:34:28 UTC
FEDORA-2020-4079ec870b has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 13 Fedora Update System 2020-09-12 16:37:26 UTC
FEDORA-2020-e7c0f115ea has been pushed to the Fedora 31 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 14 Fedora Update System 2020-09-13 18:31:19 UTC
FEDORA-2020-d2c3726a7f has been pushed to the Fedora 33 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-d2c3726a7f`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-d2c3726a7f

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 15 Fedora Update System 2020-09-25 16:56:37 UTC
FEDORA-2020-d2c3726a7f has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.