Bug 165264

Summary: When installing openssl into a chroot two links are missing.
Product: [Fedora] Fedora Reporter: Bob Kashani <bobk>
Component: opensslAssignee: Tomas Mraz <tmraz>
Status: CLOSED RAWHIDE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 4   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: openssl-0.9.7f-9 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-08-23 15:34:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 150221    
Attachments:
Description Flags
yum chroot script none

Description Bob Kashani 2005-08-06 05:14:34 UTC
Description of problem:
When installing openssl into a chroot two links are missing.

/lib/libcrypto.so.5
/lib/libssl.so.5

This issue seems to have occurred before:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=51630

Version-Release number of selected component (if applicable):
openssl-0.9.7f-7

How reproducible:
Install openssl into a chroot via yum.

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Tomas Mraz 2005-08-07 17:33:30 UTC
Most probably a ldconfig binary is missing in the chroot? It would have created
the links otherwise.

However I agree that the symlinks should be included.


Comment 2 Bob Kashani 2005-08-11 03:42:01 UTC
I'm installing into a chroot via "yum -y --installroot=/mychroot groupinstall
Base" so it seems a little odd that /sbin/ldconfig is missing. On the other hand
I don't know whether YUM is installing openssl before glibc or not (I'll check
tonight)? If that is the case wouldn't it be a good idea to add a "Requires:
/sbin/ldconfig" to the spec file?

Comment 3 Tomas Mraz 2005-08-11 06:44:04 UTC
This is strange because there is implicit requires on /sbin/ldconfig for post
script which is generated automatically by RPM. (So the ldconfig must be
installed before the post script is run.) So there must be some other bug. You
could try to remove openssl from the root and try to install it again if the
ldconfig will run or not.

If it run in such case it would be a yum or rpm bug then.


Comment 4 Bob Kashani 2005-08-13 02:53:09 UTC
I just noticed that I have this in my yum.conf file:

tsflags=noscripts notriggers

BUT...if I remove the tsflags line I get a bunch of errors like this:

error: %post(openssl-0.9.7f-7.686) scriptlet failed, exit status 255

Also, I checked and yum is installing glibc as the fourth or fifth package so
ldconfig is there.

But if I install the openssl rpm using rpm:

rpm --root /mychroot -Uvh --nodeps --force openssl-0.9.7f-7.i686.rpm

The symlinks are created and I get no errors during install.

So is this a yum bug?

rpm-4.4.1-22
yum-2.3.4-1

Comment 5 Seth Vidal 2005-08-14 04:47:18 UTC
that error occurs when /proc or portions of /dev are not mounted. I can't
remember which. This is why mock, for example, mounts up /proc, /sys and
/selinux along with making certain devices in /dev before continuing.

Comment 6 Bob Kashani 2005-08-14 16:45:43 UTC
Created attachment 117716 [details]
yum chroot script

Seth, I looked thru /usr/bin/mock and I've tried everything that I can thing of
and it still doesn't work. Attached is my script so you can see it. What am I
missing?

Comment 7 Seth Vidal 2005-08-14 18:27:52 UTC
so my first question is:
1. is selinux set to enforcing or warn in /etc/selinux/config and is it enabled
or disabled in the kernel?

2. for what you're doing why not just use mock?

Comment 8 Bob Kashani 2005-08-15 04:03:00 UTC
1. Yes, selinux is enabled and in enforcing...(default FC4 targeted install)

2. I wish I could for this project but I can't. I need things to work on
multi-distros eventuallly and a mock/python deps could add too much complexity.
I'm still in experimental phase so things could change.

Will a 'mock -r mychroot.cfg init' create a clean chroot for me based on what I
place in mychroot.cfg?

Comment 9 Seth Vidal 2005-08-15 04:08:07 UTC
1. disable selinux and see if the problem goes away - I bet it will
2. if you have the deps for yum then you have the deps for mock.

'mock -r mychroot init' will make  chroot for you based on what's in
/etc/mock/mychroot.cfg




Comment 10 Bob Kashani 2005-08-15 05:01:44 UTC
1. disabling selinux fixes the problem. why?
2. hrmm...you have s point there...

could I do this: 'mock -r /path/to/mychroot.cfg init' It would be much easier if
I could point to my own config file in my project tree.

Comment 11 Seth Vidal 2005-08-15 05:06:27 UTC
1. b/c you don't have rights to write to that location or run things from there,
iirc.
2. just put a file whereever and make a symlink to it in /etc/mock/