Bug 1415661 - [Patch] Build cert and client config rpm at once with 'client rpm' command of rhui-manager
Summary: [Patch] Build cert and client config rpm at once with 'client rpm' command of...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Update Infrastructure for Cloud Providers
Classification: Red Hat
Component: Tools
Version: 3.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 3.0.7
: 3.0.x
Assignee: RHUI Bug List
QA Contact: Vratislav Hutsky
URL:
Whiteboard:
Depends On: 1428756
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-23 11:39 UTC by Satoru SATOH
Modified: 2019-01-23 18:05 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-01-23 18:05:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
An experimental patch to add '--cert' option along with other related ones to 'client rpm' command of rhui-manager, to generate cert also before building clint config rpm (3.41 KB, patch)
2017-01-23 11:39 UTC, Satoru SATOH
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:0149 0 None None None 2019-01-23 18:05:17 UTC

Description Satoru SATOH 2017-01-23 11:39:35 UTC
Created attachment 1243554 [details]
An experimental patch to add '--cert' option along with other related ones to 'client rpm' command of rhui-manager, to generate cert also before building clint config rpm

Description of problem:
To build client config rpms, users have to do a pair of steps with rhui-manager client commands:

1. generate client entitlement cert (rhui-manager client cert)
2. build client config rpm (rhui-manager client rpm)

And typical cases, these steps are performed sequentially and
no reasons to split the job into these two steps frankly, IMHO.

I made an experimental patch to perform these two steps at once
with 'client rpm' command of rhui-manager optionally.

Version-Release number of selected component (if applicable): RHUI 3.0 Beta.2

How reproducible: Always

Additional info:

Example session log by the patch:

[root@rhua-3-1 site-packages]# ls /tmp/3
ls: cannot access /tmp/3: No such file or directory
[root@rhua-3-1 site-packages]# rhui-manager client rpm --help                   Usage: rhui-manager [options]

Options:
  -h, --help            show this help message and exit
rpm: create a client config rpm
    --private_key - entitlement private key
    --entitlement_cert - entitlement certificate
    --rpm_version - version number of the client config rpm
    --rpm_name - name of the client config rpm (required)
    --dir - directory where the rpm will be created (required)
    --unprotected_repos - comma-separated list of unprotected repos to include
    --cert - Generate certificate also before building client config rpm if given
    --repo_label - identifies the repositories to add. Comma delimited string of repo labels
    --name - identifies the certificate name if it is different from rpm name
    --days - number of days cert will be valid
[root@rhua-3-1 site-packages]# rhui-manager client rpm --rpm_name rhel-7-rhui-client-config --dir /tmp/3 --cert --repo_label rhel-7-server-rhui-rpms
Try to generate cert also ...
.................+++
...+++
Entitlement certificate created at /tmp/3/rhel-7-rhui-client-config.crt
Successfully created client configuration RPM.
RPMs can be found at /tmp/3
[root@rhua-3-1 site-packages]# ls /tmp/3/
rhel-7-rhui-client-config-2.0  rhel-7-rhui-client-config-extensions.txt
rhel-7-rhui-client-config.crt  rhel-7-rhui-client-config.key
rhel-7-rhui-client-config.csr
[root@rhua-3-1 site-packages]# ls /tmp/3/rhel-7-rhui-client-config-2.0/build/RPMS/noarch/
rhel-7-rhui-client-config-2.0-1.noarch.rpm
[root@rhua-3-1 site-packages]# rpm -qlp /tmp/3/rhel-7-rhui-client-config-2.0/build/RPMS/noarch/rhel-7-rhui-client-config-2.0-1.noarch.rpm
/etc/pki/rhui/ca.crt
/etc/pki/rhui/key.pem
/etc/pki/rhui/product/content.crt
/etc/yum.repos.d/rh-cloud.repo
[root@rhua-3-1 site-packages]#

Comment 6 errata-xmlrpc 2019-01-23 18:05:13 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:0149


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