Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use rhn-channel for libyml-devel #3194

Merged
merged 16 commits into from Dec 15, 2014
Merged

Conversation

mpapis
Copy link
Member

@mpapis mpapis commented Dec 10, 2014

based on info from #3191
WIP

@mpapis
Copy link
Member Author

mpapis commented Dec 10, 2014

@cg2v this looks good, could you test with:

rvm get branch /feature/gh_3191_rhel_yaml_support

@cg2v
Copy link

cg2v commented Dec 11, 2014

Does not seem to have worked
RHEL7, RHSM:
[setup@rhel7 ~]$ rvm version
rvm 1.26.4 (feature/gh_3191_rhel_yaml_support) by Wayne E. Seguin wayneeseguin@gmail.com, Michal Papis mpapis@gmail.com [https://rvm.io/]
[setup@rhel7 ~]$ rvm requirements
Checking requirements for redhat.
/home/setup/.rvm/scripts/functions/requirements/redhat: line 168: requirements_rvm_pkg_lib_installed_custom: command not found
Installing requirements for redhat.
Updating system.
Installing required packages: libffi-devel, readline-devel, openssl-devel..setup password required for 'yum install -y libffi-devel readline-devel openssl-devel':
.............
/home/setup/.rvm/scripts/functions/requirements/redhat: line 203: requirements_rvm_pkg_configure: command not found
Requirements installation failed with status: 127.
[setup@rhel7 ~]$ rvm install ruby
Searching for binary rubies, this might take some time.
No binary rubies available for: redhat/7/x86_64/ruby-2.1.5.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for redhat.
Installing requirements for redhat.
Updating system.
Installing required custom packages: yaml.........................................................................................
Requirements installation successful.
[...]

RHEL6, RHN:
[cg2v@yawata-crossing ~]$ rvm version
rvm 1.26.4 (feature/gh_3191_rhel_yaml_support) by Wayne E. Seguin wayneeseguin@gmail.com, Michal Papis mpapis@gmail.com [https://rvm.io/]
[cg2v@yawata-crossing ~]$ rvm requirements
Checking requirements for redhat.
/home/cg2v/.rvm/scripts/functions/requirements/redhat: line 168: requirements_rvm_pkg_lib_installed_custom: command not found

Skipping installation of 'libffi-devel', in case you depend on FFI reinstall your ruby after following this instructions:
https://gist.github.com/rderoldan1/5920539

/home/cg2v/.rvm/scripts/functions/requirements/redhat: line 203: requirements_rvm_pkg_configure: command not found
Requirements installation failed with status: 127.
[cg2v@yawata-crossing ~]$ rvm install ruby
Searching for binary rubies, this might take some time.
No binary rubies available for: redhat/6/x86_64/ruby-2.1.5.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
df: Warning: cannot read table of mounted file systems
Checking requirements for redhat.

Skipping installation of 'libffi-devel', in case you depend on FFI reinstall your ruby after following this instructions:
https://gist.github.com/rderoldan1/5920539

Installing requirements for redhat.
Updating system.
Installing required custom packages: yaml........................................................................................
Requirements installation successful.
[...]

(the missing functions were why I was looking at github issues in the first place...)

If I add the missing source to scripts/functions/requirements/redhat and set autolibs to read-fail, I get the "expected"
Missing custom packages: yaml

@cg2v
Copy link

cg2v commented Dec 11, 2014

re-enabling autolibs, and removing the redhat logic from commits 28908c4 and 4538416 gets farther. It fails to run rhn-channel -l, because rhn-channel is in /usr/sbin and must be run as root. It then tries to run rhn-channel -a -c with an empty channel (presumably because it did not detect the base channel). Something also swallows the 'Username:' prompt from rhn-channel -a

Installing requirements for redhat.
Updating system.............cg2v/root password required for 'rhn-channel -a -c ':

Password:
...
Error running 'requirements_centos_update_system ',

@cg2v
Copy link

cg2v commented Dec 11, 2014

Adding the __rvm_sudos still fails, and I can't figure out why. Here's update_system.log
https://gist.github.com/64ca27fb1aad4530bdba

@mpapis
Copy link
Member Author

mpapis commented Dec 11, 2014

can you check if there is libffi-devel is also available in the optional repository?

@mpapis
Copy link
Member Author

mpapis commented Dec 11, 2014

try with new:

rvm get branch /feature/gh_3191_rhel_yaml_support

@cg2v
Copy link

cg2v commented Dec 12, 2014

looks good (both with and without rhel-x86_64-server-optional-6 already subscribed).
libffi-devel is available in the repo in addition to libyaml-devel

something is still swallowing the username prompt when rhn-channel -a is run on rhel6, I have to know to type the username when the progress dots stop. (on rhel7 the username prompt does appear.)

[cg2v@yawata-crossing ~]$ rvm requirements
Checking requirements for redhat.

Skipping installation of 'libffi-devel', in case you depend on FFI reinstall your ruby after following this instructions:
https://gist.github.com/rderoldan1/5920539

Installing requirements for redhat.
Updating system..................username
Password:
.
Installing required packages: libyaml-devel.......
Requirements installation successful.

@mpapis
Copy link
Member Author

mpapis commented Dec 12, 2014

now it should be better, is there a chance you could test it also on Centos as the behavior changed for it too.

@cg2v
Copy link

cg2v commented Dec 12, 2014

It no longer seems to run rhn-channel:

Checking requirements for redhat.
Installing requirements for redhat.
Installing required packages: libyaml-devel, libffi-devel....
Error running 'requirements_centos_libs_install libyaml-devel libffi-devel',
[...]
yum install -y libyaml-devel libffi-devel
This system is receiving updates from RHN Classic or RHN Satellite.
Setting up Install Process
No package libyaml-devel available.
No package libffi-devel available.
Error: Nothing to do

@mpapis
Copy link
Member Author

mpapis commented Dec 12, 2014

oh, this is confusing, please run this:

rvm get branch /feature/gh_3191_rhel_yaml_support
rvm --trace requirements 2>&1 | tee big.log

and gist big.log

@cg2v
Copy link

cg2v commented Dec 13, 2014

https://gist.github.com/5468e902fb09c17859fa

FYI, centos 6 worked fine

@mpapis
Copy link
Member Author

mpapis commented Dec 13, 2014

did you had epel already installed in the centos box? - epel and libyaml-devel has to be removed to trigger installation of it again

also pushed more updates

@cg2v
Copy link

cg2v commented Dec 13, 2014

The centos machine was a new minimal install (so minimal that I had to install which and tar before rvm would install). At least on this system, libyaml-devel is the centos 6 base repo. (I am using lxc for the centos, since I didn't want to put alot of effort into the install, and lxc doesn't support 7 yet)

@mpapis
Copy link
Member Author

mpapis commented Dec 13, 2014

how about the other changes, did they improve things?

@cg2v
Copy link

cg2v commented Dec 15, 2014

yes, workflow is good there, still have the missing username problem.

$ rvm requirements
Checking requirements for redhat.
cg2v/root password required for 'rhn-channel -l':
Enabling optional repository..username
Password:
.
Installing requirements for redhat.
Installing required packages: libyaml-devel, libffi-devel........
Requirements installation successful.

@mpapis mpapis merged commit b6e9a7b into master Dec 15, 2014
mpapis added a commit that referenced this pull request Dec 15, 2014
@mpapis mpapis deleted the feature/gh_3191_rhel_yaml_support branch December 15, 2014 10:12
@mpapis
Copy link
Member Author

mpapis commented Dec 15, 2014

and this should do it, merged to master, you can test it with:

rvm get head

@mpapis mpapis added this to the rvm-1.26 milestone Dec 15, 2014
@cg2v
Copy link

cg2v commented Dec 15, 2014

Works with master, and the prompting seems fixed too.

There are some outstanding issues:

  • identifying the credentials that rhn-channel is going to prompt for. (something like "Username and password for a Red Hat Customer Portal, Red Hat Network, or Red Hat Network Satellite account in the organization used by this system")
    Developers won't necessarily have such accounts. You'll also want to provide fallback instructions ("ask your sysadmin to add the channel in the RHN web interface") for that case.
  • Detection of whether a system uses RHN or RHSM. On my RHSM test system, I am being prompted for rhn-channel credentials even though the system isn't set up that way. Are you going to do the subscription-manager style in a separate PR?

@mpapis mpapis mentioned this pull request Dec 15, 2014
@mpapis
Copy link
Member Author

mpapis commented Dec 15, 2014

please open a new issue for the prompt, for RHSM please post instructions to #3207

mpapis added a commit that referenced this pull request Sep 17, 2017
Ruby supports embeded libyaml since 2.0.0, no need to require superflous and buggy instructions to add it.
This can pose security risk for not updated libyaml - but it should be Ruby's responsibility to inform users about it!

Fixes #2998
Update #3194
Deprecate/fix #3191
Deprecate/fix #3207
Partially fixes #3304
mpapis added a commit that referenced this pull request Sep 17, 2017
Ruby supports embedded libyaml since 2.0.0, no need to require superfluous and buggy instructions to add it.
This can pose security risk for not updated libyaml - but it should be Ruby's responsibility to inform users about it!

Fixes #2998
Update #3194
Deprecate/fix #3191
Deprecate/fix #3207
Partially fixes #3304
@pkuczynski pkuczynski added this to the unknown-old milestone Dec 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants