From 8e5ed599b655b7e96684cf9a08ba18aa8be651c1 Mon Sep 17 00:00:00 2001 From: Ken Dreyer Date: Dec 13 2021 10:34:39 +0000 Subject: improve srpm --help description Update the --help text to explain what "rpkg srpm" does. Explain how to add new files to each SRPM. Signed-off-by: Ken Dreyer --- diff --git a/pyrpkg/cli.py b/pyrpkg/cli.py index 0e364b5..d2836ba 100644 --- a/pyrpkg/cli.py +++ b/pyrpkg/cli.py @@ -1465,7 +1465,21 @@ class cliClient(object): srpm_parser = self.subparsers.add_parser( 'srpm', help='Create a source rpm', parents=[self.rpm_parser_common], - description='Create a source rpm') + usage='Create a source rpm', + formatter_class=argparse.RawDescriptionHelpFormatter, + description=textwrap.dedent(""" + This command wraps "rpmbuild -bs", roughly equivalent to: + + rpmbuild -bs mypackage.spec \\ + --define "_topdir ." \\ + --define "_sourcedir ." \\ + --define "_srcrpmdir ." \\ + --define "dist .el8" + + To include files in the SRPM, the files must be in the current + working directory, and you must reference each file with + SourceXXXX: or PatchXXXX: directives in your .spec file. + """)) # optionally define old style hashsums srpm_parser.add_argument( '--md5', action='store_const', const='md5', default=None,