Bug 845013 - unable to create client rpm due to missing gpg directory
unable to create client rpm due to missing gpg directory
Status: CLOSED DUPLICATE of bug 842827
Product: Red Hat Update Infrastructure for Cloud Providers
Classification: Red Hat
Component: Tools (Show other bugs)
2.1
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: James Slagle
mkovacik
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-01 09:24 EDT by wes hayutin
Modified: 2012-08-02 10:19 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-02 10:19:14 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description wes hayutin 2012-08-01 09:24:21 EDT
RHEL-6.3-RHUI-2.1-20120731.0-Server-x86_64-DVD1.iso

unable to create client rpm due to missing directories in path

Description of problem:
[root@ip-10-70-90-96 ~]# rhui-manager 


------------------------------------------------------------------------------
             -= Red Hat Update Infrastructure Management Tool =-


-= Home =-

   r   manage repositories
   c   manage content delivery servers (CDS)
   s   synchronization status and scheduling
   e   create entitlement certificates and client configuration RPMs
   n   manage Red Hat entitlement certificates
   u   manage users
   i   manage identity certificate

   logout
       removes stored authentication credentials and exits

   <   move to the previous screen
   ^, home
       move to the home screen
   /, clear
       clears the screen
   ?, help
       display help
   q, quit, exit
       exit

                                        Connected: ip-10-70-90-96.ec2.internal
------------------------------------------------------------------------------
rhui (home) => e








------------------------------------------------------------------------------
             -= Red Hat Update Infrastructure Management Tool =-


-= Client Entitlement Management =-

   e   generate an entitlement certificate
   c   create a client configuration RPM from an entitlement certificate

                                        Connected: ip-10-70-90-96.ec2.internal
------------------------------------------------------------------------------
rhui (client) => c

Full path to local directory in which the client configuration files generated by this tool
should be stored (if this directory does not exist, it will be created):
/tmp/test2

Name of the RPM:
test2

Version of the configuration RPM [2.0]:
1.0

Full path to the entitlement certificate authorizing the client to access
specific channels:
/tmp/test01/test01-1.0/build/BUILDROOT/etc/pki/^X^C
An unexpected error has occurred during the last operation.
More information can be found in /root/.rhui/rhui.log.


------------------------------------------------------------------------------
             -= Red Hat Update Infrastructure Management Tool =-


-= Client Entitlement Management =-

   e   generate an entitlement certificate
   c   create a client configuration RPM from an entitlement certificate

   logout
       removes stored authentication credentials and exits

   <   move to the previous screen
   ^, home
       move to the home screen
   /, clear
       clears the screen
   ?, help
       display help
   q, quit, exit
       exit

                                        Connected: ip-10-70-90-96.ec2.internal
------------------------------------------------------------------------------
rhui (client) => ^C

[root@ip-10-70-90-96 ~]# rhui-manager 


------------------------------------------------------------------------------
             -= Red Hat Update Infrastructure Management Tool =-


-= Home =-

   r   manage repositories
   c   manage content delivery servers (CDS)
   s   synchronization status and scheduling
   e   create entitlement certificates and client configuration RPMs
   n   manage Red Hat entitlement certificates
   u   manage users
   i   manage identity certificate

   logout
       removes stored authentication credentials and exits

   <   move to the previous screen
   ^, home
       move to the home screen
   /, clear
       clears the screen
   ?, help
       display help
   q, quit, exit
       exit

                                        Connected: ip-10-70-90-96.ec2.internal
------------------------------------------------------------------------------
rhui (home) => e








------------------------------------------------------------------------------
             -= Red Hat Update Infrastructure Management Tool =-


-= Client Entitlement Management =-

   e   generate an entitlement certificate
   c   create a client configuration RPM from an entitlement certificate

                                        Connected: ip-10-70-90-96.ec2.internal
------------------------------------------------------------------------------
rhui (client) => e

Select the CDS cluster that clients using this entitlement certificate will use to download content:

  1  - cluster1
Enter value (1-1) or 'b' to abort: 1

Select one or more repositories to include in the entitlement certificate:
(an * next to a Red Hat repository indicates it is deployed in the RHUI)

  Custom Repositories

  Red Hat Repositories
    -  1 : Red Hat Enterprise Linux Server 5 (RPMs)
    -  2 : Red Hat Enterprise Linux Server 6 (RPMs)
    -  3 : Red Hat Update Infrastructure 2.0 (SRPMS)

Enter value (1-3) to toggle selection, 'c' to confirm selections, or '?' for more commands: 2-3

Select one or more repositories to include in the entitlement certificate:
(an * next to a Red Hat repository indicates it is deployed in the RHUI)

  Custom Repositories

  Red Hat Repositories
    -  1 : Red Hat Enterprise Linux Server 5 (RPMs)
    x  2 : Red Hat Enterprise Linux Server 6 (RPMs)
    x  3 : Red Hat Update Infrastructure 2.0 (SRPMS)

Enter value (1-3) to toggle selection, 'c' to confirm selections, or '?' for more commands: c


Name of the certificate. This will be used as the name of the certificate file
(name.crt) and its associated private key (name.key). Choose something that will
help identify the products contained with it:
test2

Local directory in which to save the generated certificate [current directory]:
/tmp/test2

Number of days the certificate should be valid [365]:


Repositories to be included in the entitlement certificate:

  Red Hat Repositories
    Red Hat Enterprise Linux Server 6 (RPMs)
    Red Hat Update Infrastructure 2.0 (SRPMS)

Proceed? (y/n) y

...............................+++
..................+++
Entitlement certificate created at /tmp/test2/test2.crt

------------------------------------------------------------------------------
rhui (client) => c

Full path to local directory in which the client configuration files generated by this tool
should be stored (if this directory does not exist, it will be created):
/tmp/test2

Name of the RPM:
test2

Version of the configuration RPM [2.0]:
1.0

Full path to the entitlement certificate authorizing the client to access
specific channels:
/tmp/test2/test2.crt

Full path to the private key for the above entitlement certificate:
/tmp/test2/test2.key


Select the CDS cluster that clients will use to download content:

  1  - cluster1
Enter value (1-1) or 'b' to abort: 1

Select the CDS instance (client hostnames are shown)
that should be the primary load balancer for the
client. All other CDS instances will be listed as
back up load balancers in the client's mirror list:

  1  - ip-10-46-225-130.ec2.internal
Enter value (1-1) or 'b' to abort: 1

Load Balancer Order:
  ip-10-46-225-130.ec2.internal

Error occurred during RPM creation, check the log file for more information

------------------------------------------------------------------------------


RHUI LOG
**************************
Connecting to RHUA [ip-10-70-90-96.ec2.internal]...
Successfully connected to [ip-10-70-90-96.ec2.internal]
Private key creation output
Exit Code: 0

writing RSA key

Command [openssl x509 -req -days 365 -in /tmp/test2/test2.csr -CA /etc/pki/rhui/entitlement-ca.crt -CAkey /etc/pki/rhui/entitlement-ca-key.pem -CAserial /etc/pki/rhui/entitlement-ca.srl -out /tmp/test2/test2.crt -extfile /tmp/test2/test2-extensions.txt -extensions rhui]
Certificate creation output

Signature ok
subject=/CN=Red Hat Update Infrastructure
Getting CA Private Key

Copying [/tmp/test2/test2.key] to [/tmp/test2/test2-1.0/tmp/test2-1.0/key.pem]
Copying [/etc/pki/rhua/rhua-ssl-ca-cert.crt] to [/tmp/test2/test2-1.0/tmp/test2-1.0/ca.crt]
Copying [/tmp/test2/test2.crt] to [/tmp/test2/test2-1.0/tmp/test2-1.0/content.crt]
Executing RPM build command [rpmbuild -bb --buildroot /tmp/test2/test2-1.0/build/BUILDROOT --define "_builddir /tmp/test2/test2-1.0/build/BUILD" --define "_sourcedir /tmp/test2/test2-1.0/build/SOURCES" --define "_rpmdir /tmp/test2/test2-1.0/build/RPMS"  /tmp/test2/test2-1.0/build/SPECS//test2-1.0.spec]
RPM creation output
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.72UnKb
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.xgGshm
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.D55cPw
Processing files: test2-1.0-1.noarch


RPM build errors:

+ umask 022
+ cd /tmp/test2/test2-1.0/build/BUILD
+ cd /tmp/test2/test2-1.0/build/BUILD
+ rm -rf test2-1.0
+ /usr/bin/gzip -dc /tmp/test2/test2-1.0/build/SOURCES/test2-1.0.tar.gz
+ /bin/tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd test2-1.0
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
+ umask 022
+ cd /tmp/test2/test2-1.0/build/BUILD
+ cd test2-1.0
+ exit 0
+ umask 022
+ cd /tmp/test2/test2-1.0/build/BUILD
+ cd test2-1.0
+ rm -rf /tmp/test2/test2-1.0/build/BUILDROOT
+ mkdir -p /tmp/test2/test2-1.0/build/BUILDROOT
+ mkdir -p /tmp/test2/test2-1.0/build/BUILDROOT/etc/yum.repos.d
+ cp /tmp/test2/test2-1.0/build/BUILD/test2-1.0/rh-cloud.repo /tmp/test2/test2-1.0/build/BUILDROOT/etc/yum.repos.d
+ '[' -e '/tmp/test2/test2-1.0/build/BUILD/test2-1.0/RPM-GPG-KEY*' ']'
+ mkdir -p /tmp/test2/test2-1.0/build/BUILDROOT/etc/pki/entitlement/product
+ cp /tmp/test2/test2-1.0/build/BUILD/test2-1.0/content.crt /tmp/test2/test2-1.0/build/BUILDROOT/etc/pki/entitlement/product
+ cp /tmp/test2/test2-1.0/build/BUILD/test2-1.0/key.pem /tmp/test2/test2-1.0/build/BUILDROOT/etc/pki/entitlement
+ cp /tmp/test2/test2-1.0/build/BUILD/test2-1.0/ca.crt /tmp/test2/test2-1.0/build/BUILDROOT/etc/pki/entitlement
+ mkdir -p /tmp/test2/test2-1.0/build/BUILDROOT/usr/lib/yum-plugins
+ cp /tmp/test2/test2-1.0/build/BUILD/test2-1.0/rhui-lb.py /tmp/test2/test2-1.0/build/BUILDROOT/usr/lib/yum-plugins
+ mkdir -p /tmp/test2/test2-1.0/build/BUILDROOT/etc/yum/pluginconf.d
+ cp /tmp/test2/test2-1.0/build/BUILD/test2-1.0/rhui-lb.conf /tmp/test2/test2-1.0/build/BUILDROOT/etc/yum/pluginconf.d
+ mkdir -p /tmp/test2/test2-1.0/build/BUILDROOT/etc/yum.repos.d
+ cp /tmp/test2/test2-1.0/build/BUILD/test2-1.0/rhui-load-balancers /tmp/test2/test2-1.0/build/BUILDROOT/etc/yum.repos.d
+ /usr/lib/rpm/brp-compress
+ /usr/lib/rpm/brp-strip
+ /usr/lib/rpm/brp-strip-static-archive
+ /usr/lib/rpm/brp-strip-comment-note
error: File not found by glob: /tmp/test2/test2-1.0/build/BUILDROOT/etc/pki/rpm-gpg/RPM-GPG-KEY-*
    File not found by glob: /tmp/test2/test2-1.0/build/BUILDROOT/etc/pki/rpm-gpg/RPM-GPG-KEY-*


[root@ip-10-70-90-96 ~]# ls /tmp/test2/test2-1.0/build/BUILDROOT/etc/pki
entitlement
Comment 1 James Slagle 2012-08-02 10:19:14 EDT
didnt realize there was a bug opened just for this issue, but i ended up fixing it under bug #842827

*** This bug has been marked as a duplicate of bug 842827 ***

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