Document URL: https://fedorahosted.org/spacewalk/wiki/CertCreation Section Number and Name: CertCreation Describe the issue: perl gen-oss-sat-cert.pl --signer xxxxxx--resign /usr/share/spacewalk/setup/spacewalk-public.cert fails root.no:~# ./gen-oss-sat-cert.pl Can't locate RHN/DataSource/Channel.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ./gen-oss-sat-cert.pl line 9. BEGIN failed--compilation aborted at ./gen-oss-sat-cert.pl line 9. Suggestions for improvement: Better testing would reveal this i guess Additional information: on RHEL 7
*** Bug 1219538 has been marked as a duplicate of this bug. ***
SPACEWALK-2.3 and later removed a lot of the Perl stack. Two of the tools in the scripts/ directory, alas, depend on Perl RHN::DataSource files. This was missed mostly because scripts/ is "tools that are occasionally useful but not really supported": gen-oss-sat-cert.pl devel/perl-db-test.pl The 'fix' is to rewrite the affected tools in Python (or anything that gets them off of the (removed) Perl code). In the meantime, a workaround is to execute the desired scripts directly from the SPACEWALK-2.2 branch of a spacewalkproject checkout. I accomplished this on a Fedora-21 install of SPACEWALK-2.3 with the following commands: === # Acquire tools [root@spacewalk] # yum install git perl-TermReadKey # Clone repository [root@spacewalk] # git clone https://github.com/spacewalkproject/spacewalk.git # Switch git to 2.2 [root@spacewalk] # cd spacewalk [root@spacewalk] # git checkout SPACEWALK-2.2 # Watch gen-oss-sat-cert.pl fail [root@spacewalk] # perl /root/spacewalk/scripts/gen-oss-sat-cert.pl Can't locate RHN/DataSource/Channel.pm in @INC (you may need to install the RHN::DataSource::Channel module) (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /root/spacewalk/scripts/gen-oss-sat-cert.pl line 9. BEGIN failed--compilation aborted at /root/spacewalk/scripts/gen-oss-sat-cert.pl line 9. # Point perl at 2.2 web/modules/rhn and retry [root@spacewalk] # perl -I /root/spacewalk/web/modules/rhn /root/spacewalk/scripts/gen-oss-sat-cert.pl Usage: /root/spacewalk/scripts/gen-oss-sat-cert.pl --orgid <org_id> --owner <owner_name> --signer <signer> --no-passphrase --output <dest> --expires <when> --slots <num> [ --provisioning-slots <num> ] [ --channel-family label=n ] [ --satellite-version X.Y ] at /root/spacewalk/scripts/gen-oss-sat-cert.pl line 51. # ===
Actually, the dependency on RHN::DataSource::Channel was removed already in March ... https://github.com/spacewalkproject/spacewalk/commit/8fc3ed894d644a755df4d25604f814d85a125c50 Use the latest script from the spacewalk.git repository (from the given branch). Closing.
This BZ closed some time during 2.5, 2.6 or 2.7. Adding to 2.7 tracking bug.