Bug 1725569 - fedora-review points to non-existent texinfo documentation
Summary: fedora-review points to non-existent texinfo documentation
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: fedora-review
Version: 31
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Stanislav Ochotnicky
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-01 06:22 UTC by Martin Osvald 🛹
Modified: 2019-08-13 19:07 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)

Description Martin Osvald 🛹 2019-07-01 06:22:27 UTC
Description of problem:

If texinfo files are detected (existence of /usr/share/info/* in any subpackage) and install-info cannot be found in the %post or %preun sections (must be present in both of them), it informs about it but the mentioned URL to documentation doesn't exist anymore.


Version-Release number of selected component (if applicable):

fedora-review-0.7.2-1.fc30.noarch


How reproducible:

Always.


Steps to Reproduce:

1. Install a source rpm package containing texinfo
2. Comment out the commands executing 'install-info' from %post or %preun sections
3. Rebuild the srpm
4. Run fedora-review on it


Actual results:

The below url doesn't exist:

https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_texinfo

fedora-review output:

~~~
- Texinfo files are installed using install-info in %post and %preun if
  package has .info files.
  Note: Texinfo .info file(s) in frr
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/Scriptlets/#_texinfo
~~~


Expected results:

Valid URL or removal of it.


Additional info:

Found some draft for it still hanging around:

https://fedoraproject.org/wiki/PackagingDrafts/ScriptletSnippets#Texinfo

Related code:

/usr/share/fedora-review/plugins/generic.py:
~~~
  42 def in_list(what, list_):
  43     """ test if 'what' is in each item in list_. """
  44     for item in list_:
  45         if not item:
  46             return False
  47         if what not in item:
  48             return False
  49     return True
...
1918 class CheckInfoInstall(GenericCheckBase):
1919     """ Check that info files are properly installed. """
1920 
1921     def __init__(self, base):
1922         GenericCheckBase.__init__(self, base)
1923         self.url = (
1924             "https://docs.fedoraproject.org/en-US"
1925             "/packaging-guidelines/Scriptlets/#_texinfo"
1926         )
1927         self.text = (
1928             "Texinfo files are installed using install-info"
1929             " in %post and %preun if package has .info files."
1930         )
1931         self.automatic = True
1932         self.type = "MUST"
1933 
1934     def run(self):
1935         using = []
1936         failed = False
1937         for pkg in self.spec.packages:
1938             if self.rpms.find("/usr/share/info/*", pkg):
1939                 using.append(pkg)
1940                 rpm_pkg = self.rpms.get(pkg)
1941                 if not in_list("install-info", [rpm_pkg.post, rpm_pkg.preun]):
1942                     failed = True
1943         if not using:
1944             self.set_passed(self.NA)
1945             return
1946         text = "Texinfo .info file(s) in " + ", ".join(using)
1947         self.set_passed(self.FAIL if failed else self.PENDING, text)
~~~

Hit this while reviewing frr:

https://bugzilla.redhat.com/show_bug.cgi?id=1702720#c9

Comment 1 Ben Cotton 2019-08-13 19:07:28 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to 31.


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