Bug 1515701 - Review Request: diceware - It will create passphrases which one can remember
Summary: Review Request: diceware - It will create passphrases which one can remember
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Parag AN(पराग)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-21 09:10 UTC by kushaldas@gmail.com
Modified: 2018-01-03 21:19 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-01-03 21:19:15 UTC
Type: ---
Embargoed:
panemade: fedora-review+


Attachments (Terms of Use)

Description kushaldas@gmail.com 2017-11-21 09:10:40 UTC
Spec URL: https://kushal.fedorapeople.org/packages/diceware.spec
SRPM URL: https://kushal.fedorapeople.org/packages/diceware-0.9.3-1.fc26.src.rpm
Description: A simple command line tool which can create simple passphrases
which human can remember.
Fedora Account System Username: kushal

Comment 1 Artur Frenszek-Iwicki 2017-11-21 09:51:11 UTC
>Summary: It will create passphrases which one can remember
Sounds a bit weird to me. I'd get rid of the "it will" part.

>%doc LICENSE
This should be marked as %license.

There's a man page in the source archive. Could you include it in the RPM?
Since it doesn't get installed by setup.py, you'll have to do that manually:
>install -m 755 -D %{buildroot}%{_mandir}/man1/
>install -m 644 -p %{name}.1 %{buildroot}%{_mandir}/man1/
Also, do we package sphinx in Fedora? The project readme says that the man page is autogenerated from a ReStructuredTexT template. As such, we may want to run the generator during the build so we're sure that we don't ship an outdated man page.

Comment 2 Robert-André Mauchin 🐧 2017-11-23 00:26:29 UTC
 - Use PythonHosted for Source0 to avoid dealing with checksum:

Source0:	https://files.pythonhosted.org/packages/source/d/%{name}/%{name}-%{version}.tar.gz

 - %{__python3} setup.py build → %py3_build

 - %{__python3} setup.py install --skip-build --root %{buildroot} → %py3_install

 - Generate the docs:

BuildRequires:	python3-sphinx
BuildRequires:	python3-sphinx_rtd_theme

   Then:

%install
%py3_install
pushd docs
PYTHONPATH=%{buildroot}%{python3_sitelib} make html
popd

   Finally add it to a -doc subpackage:

%package doc
Summary:    Documentation for Diceware
BuildArch:  noarch
%description doc
Diceware is a simple command line tool which can create simple
passphrases which human can remember.

This package provides documentation for Diceware.

   And:

%files doc
%doc docs/_build/html

 - Run the tests:

BuildRequires:	python3-pytest
BuildRequires:	python3-pytest-runner

   Then:

%check
PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version}

 - Regenerate the man page:

   First add this BR:

BuildRequires:	%{_bindir}/rst2man

   Then in %install:

rst2man docs/manpage.rst %{buildroot}%{_mandir}/man1/diceware.1

   And add it in %files:

%{_mandir}/man1/diceware.1*

 - Remove the trailing tabs:

Name:		diceware
Version:	0.9.3

 - Simplify the summary:

Summary:	Create passphrases which one can remember

Comment 3 kushaldas@gmail.com 2017-12-27 09:39:13 UTC
Updated SRPM: https://kushal.fedorapeople.org/packages/diceware-0.9.3-2.fc26.src.rpm
Updated SPEC: https://kushal.fedorapeople.org/packages/diceware.spec

This does not have the docs subpackage as I will first ask the upstream to update the sphinx build Makefile.

Comment 4 Parag AN(पराग) 2017-12-27 10:22:14 UTC
Looks good to me.

Some suggestions:
1) Change the "%setup -q" to "%autosetup". See how it will benefit -> https://fedoraproject.org/wiki/Packaging:Guidelines#.25autosetup

2) Use %license macro for marking license file
%license LICENSE

See https://fedoraproject.org/wiki/Packaging:LicensingGuidelines#License_Text

3) Also, good to add docs subpackage as recommended above except you need to use

pushd docs
PYTHONPATH=%{buildroot}%{python3_sitelib} sphinx-build-3 -b html -d _build/doctrees . _build/html
popd

I have modified your spec and my modifications are
=======================================================================
--- diceware.spec	2017-12-27 14:14:49.000000000 +0530
+++ diceware.spec.new	2017-12-27 15:50:19.655108962 +0530
@@ -18,9 +18,20 @@
 A simple command line tool which can create simple passphrases
 which human can remember.
 
+%package doc
+Summary:    Documentation for Diceware
+
+BuildArch:  noarch
+BuildRequires:	python3-sphinx
+BuildRequires:	python3-sphinx_rtd_theme
+
+%description doc
+A simple command line tool which can create simple passphrases
+which human can remember.
+
 
 %prep
-%setup -q
+%autosetup
 
 
 %build
@@ -32,12 +43,23 @@
 mkdir -p %{buildroot}%{_mandir}/man1
 rst2man docs/manpage.rst %{buildroot}%{_mandir}/man1/diceware.1
 
+pushd docs
+PYTHONPATH=%{buildroot}%{python3_sitelib} sphinx-build-3 -b html -d _build/doctrees . _build/html
+popd
+
+# Remove unneeded build artifacts.
+rm -rf docs/_build/.buildinfo
+rm -rf docs/_build/.doctrees
+
 %check
 PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version}
 
+%files doc
+%doc docs/_build/html
 
 %files
-%doc LICENSE README.rst
+%doc README.rst COPYRIGHT
+%license LICENSE
 %{_bindir}/%{name}
 %{python3_sitelib}/%{name}*
 %{_mandir}/man1/diceware.1*

============================================================================

APPROVED (provided you will use above changes) :)

Comment 6 Parag AN(पराग) 2017-12-27 10:48:08 UTC
Looks good.

Comment 7 Gwyn Ciesla 2017-12-28 12:30:49 UTC
(fedrepo-req-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/diceware. You may commit to the branch "f26" in about 10 minutes.

Comment 8 Fedora Update System 2017-12-28 14:31:03 UTC
diceware-0.9.3-3.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-5701a7c419

Comment 9 Fedora Update System 2017-12-29 21:42:16 UTC
diceware-0.9.3-3.fc26 has been pushed to the Fedora 26 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-2017-5701a7c419

Comment 10 Fedora Update System 2018-01-03 21:19:15 UTC
diceware-0.9.3-3.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.