Uploaded image for project: 'RHEL Conversions'
  1. RHEL Conversions
  2. RHELC-1037

Automate pregeneration of manpages

    XMLWordPrintable

Details

    • 5
    • False
    • Hide

      None

      Show
      None
    • False
    • 1.4 GA, 2023-R4, 2024-R1
    • Testable

    Description

      Since we moved away from optparse to use argparse, we had to change the way we generate the manpages that ships with the rpm.

      The old script we used to generate manpages for optparse was bundled inside our own repository, so we could generate manpages on the fly every time. With argparse, we decided to go with a third-party project, argparse-manpage, but this package is not available during the rpms builds we do with brew.

      When contact the maintainer for the package, Pavel Raiskup, he mentioned that the package is only available in the epel-testing repository, and we can't use that during the build.

      Ideas

      • One way that would be very useful is to generate those manpages during the merge to main, or, during the tagging in GitHub. We could easily create a GitHub actions workflow to do that.
      • Another idea would be using pre-commit as a way to generate the manpages, and then, commit to the repository.
        • Detect change with convert2rhel/_init_.py and its version (or the version in the specfile)
        • Run bash script through pre-commit to generate manpages, if there are no changes this should return 0 to tell pre-commit nothing is necessary to change
        • Otherwise, return 1 or otherwise to indicate that manpages are outdated
          • In a PR this will be committed automatically AFAIK (needs to be tested)
          • Locally it will complain that changes exist, which you then have to commit yourself

      Acceptance Criteria

      • Does not rely on the RPM build process for manpage generation
      • Manpages are up-to-date for the upstream and downstream releases
      • Manpage generation is frequently checked to make sure it hasn't broken

      Attachments

        Issue Links

          Activity

            People

              aanglin@redhat.com Andrew Anglin
              rolivier@redhat.com Rodolfo Olivieri
              Rodolfo Olivieri
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: