Bug 2054410 - Review Request: shdoc - Documentation generator for bash/zsh/sh for generating documentation in Markdown
Summary: Review Request: shdoc - Documentation generator for bash/zsh/sh for generatin...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Kadlčík
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-14 21:58 UTC by Mikel Olasagasti Uranga
Modified: 2022-08-29 07:32 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-29 07:32:34 UTC
Type: ---
Embargoed:
jkadlcik: fedora-review+


Attachments (Terms of Use)

Description Mikel Olasagasti Uranga 2022-02-14 21:58:12 UTC
Spec URL: https://mikel.olasagasti.info/tmp/fedora/shdoc.spec
SRPM URL: https://mikel.olasagasti.info/tmp/fedora/shdoc-0-1.20220214git6e362b7.fc35.src.rpm
Description: shdoc is a documentation generator for bash/zsh/sh for generating API documentation in Markdown from shell scripts source.

shdoc parses annotations in the beginning of a given file and alongside function definitions, and creates a markdown file with ready to use documentation.
Fedora Account System Username: mikelo2

Comment 1 Jakub Kadlčík 2022-08-26 22:25:12 UTC
Hello Mikel,
thank you for the package.

> %global commit 6e362b7b52291e0bfb1f28ccbe2968aa592ddc07
> %global snapinfo 20220214git%{shortcommit}
> %global shortcommit %(c=%{commit}; echo ${c:0:7})

I am surprised that rpmbuild doesn't complain about %{shortcommit}
being undefined on the second line. But it works, so I think it's
fine. 

> Version: 0
> Release: %autorelease -s %{snapinfo}

This is AFAIK correct
https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_upstream_has_never_chosen_a_version

but can you please submit an upstream issue asking them to release a
proper version, and link it here in the spec? So that we can
eventually move to something stable.

Comment 2 Benson Muite 2022-08-27 09:38:31 UTC
Tests seem to be available:
https://github.com/reconquest/shdoc/tree/master/tests
Can these be added in a %check section?

Comment 3 Mikel Olasagasti Uranga 2022-08-27 20:42:26 UTC
Spec URL: https://mikel.olasagasti.info/tmp/fedora/shdoc.spec
SRPM URL: https://mikel.olasagasti.info/tmp/fedora/shdoc-0-1.20220827gitb64998d.fc36.src.rpm

- Updated to include latest commits
- Change order for shortcommit and snapinfo
- Added note about version

(In reply to Jakub Kadlčík from comment #1)
> Hello Mikel,
> thank you for the package.
> 
> > %global commit 6e362b7b52291e0bfb1f28ccbe2968aa592ddc07
> > %global snapinfo 20220214git%{shortcommit}
> > %global shortcommit %(c=%{commit}; echo ${c:0:7})
>
> I am surprised that rpmbuild doesn't complain about %{shortcommit}
> being undefined on the second line. But it works, so I think it's
> fine. 

I must have copied it from somewhere and didn't realize about the order as it was not failing.

Fun fact, I suggested to change order in a spec review I did in the past.
 
> > Version: 0
> > Release: %autorelease -s %{snapinfo}
> 
> This is AFAIK correct
> https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/
> #_upstream_has_never_chosen_a_version
> 
> but can you please submit an upstream issue asking them to release a
> proper version, and link it here in the spec? So that we can
> eventually move to something stable.

https://github.com/reconquest/shdoc/issues/55


(In reply to Benson Muite from comment #2)
> Tests seem to be available:
> https://github.com/reconquest/shdoc/tree/master/tests
> Can these be added in a %check section?

I checked again, as I didn't remember why I didn't add checks. 

The problem is that tests require some "bash vendoring" that author designed that I don't think it's possible to use in Fedora without non-trivial changes.

https://github.com/reconquest/shdoc/blob/master/tests/run_tests#L8

Comment 4 Jakub Kadlčík 2022-08-27 22:17:09 UTC
Thank you for the changes,
it looks good to me now.



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", "MIT License". 20 files have unknown
     license. Detailed output of licensecheck in
     /home/jkadlcik/git/package-review-tools/2054410-shdoc/licensecheck.txt
[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]: 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 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 must not depend on deprecated() packages.
[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.
[?]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[?]: 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]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Cannot parse rpmlint output:


Rpmlint (installed packages)
----------------------------
============================ rpmlint session starts ============================
rpmlint: 2.2.0
configuration:
    /usr/lib/python3.11/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/licenses.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 32, packages: 1

shdoc.noarch: W: no-manual-page-for-binary shdoc
 1 packages and 0 specfiles checked; 0 errors, 1 warnings, 0 badness; has taken 0.0 s



Source checksums
----------------
https://github.com/reconquest/shdoc/archive/b64998d1a463775501a70d125b4d2ae0c4f0a820/shdoc-b64998d.tar.gz :
  CHECKSUM(SHA256) this package     : 825c69f82eacf07addd17bdc5ac1d89e3b06af74174d7ca433669db9fe893b3f
  CHECKSUM(SHA256) upstream package : 825c69f82eacf07addd17bdc5ac1d89e3b06af74174d7ca433669db9fe893b3f


Requires
--------
shdoc (rpmlib, GLIBC filtered):
    /usr/bin/gawk
    gawk



Provides
--------
shdoc:
    shdoc



Generated by fedora-review 0.9.0 (6761b6c) last change: 2022-08-23
Command line :/usr/bin/fedora-review -b 2054410
Buildroot used: fedora-rawhide-x86_64
Active plugins: Shell-api, Generic
Disabled plugins: R, Java, Perl, fonts, SugarActivity, Python, C/C++, Haskell, PHP, Ocaml
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 5 Jens Petersen 2022-08-29 03:32:24 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/shdoc

Comment 6 Fedora Update System 2022-08-29 07:30:56 UTC
FEDORA-2022-2853acfce8 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2022-2853acfce8

Comment 7 Fedora Update System 2022-08-29 07:32:34 UTC
FEDORA-2022-2853acfce8 has been pushed to the Fedora 38 stable repository.
If problem still persists, 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.