Thanks to visit codestin.com
Credit goes to github.com

Skip to content

include --releasever=/ in mkimage-yum.sh#6992

Merged
tianon merged 1 commit into
moby:masterfrom
mschurenko:master
Oct 25, 2014
Merged

include --releasever=/ in mkimage-yum.sh#6992
tianon merged 1 commit into
moby:masterfrom
mschurenko:master

Conversation

@mschurenko

Copy link
Copy Markdown
Contributor

This script failed when trying to create a docker image based on centos 7. Adding "--releasever=/" fixed it. According to yum man page:

Note: You may also want to use the option --releasever=/ when creating the installroot as otherwise the $releasever value is  taken  from  the  rpmdb  within  the installroot (and thus. will be empty, before creation).

Docker-DCO-1.1-Signed-off-by: Matt Schurenko [email protected] (github: mschurenko)

I didn't realize the commit required a Docker-DCO so it failed the travis-ci build. So I removed the commit from my forked repo. Now it looks like there is a pull request with no commit. So here it is again:

Needed to add '--releasever=/' flag to run yum groupinstall on Centos7 (didn't try on anything else). This snippet from yum man page explains why:

```
Note: You may also want to use the option --releasever=/ when creating the installroot as otherwise the $releasever value is taken from the rpmdb within the installroot (and thus.  will  be  empty,  before  creation).
```

Docker-DCO-1.1-Signed-off-by: Matt Schurenko <[email protected]> (github: mschurenko)
@SvenDowideit

Copy link
Copy Markdown
Contributor

@tianon ?

@tianon

tianon commented Jul 15, 2014

Copy link
Copy Markdown
Member

At, sorry for the delay! Doesn't this change effectively make it impossible to build (for example) a CentOS 6 image on 7?

@thomassuckow

Copy link
Copy Markdown

This snippet concerns me in regards to "cross-yuming" (Yes, I just made that up) and the integrity of the host. It sounds like the hosts cache is used regardless of the install root.

_repoquery(1):_

Note that with the default upstream cachedir, of /var/cache/yum, using this option will corrupt your cache
(and you can use $releasever in your cachedir configuration to stop this)

@vieux

vieux commented Sep 3, 2014

Copy link
Copy Markdown
Contributor

ping @tianon

@tianon

tianon commented Sep 3, 2014

Copy link
Copy Markdown
Member

@thomassuckow so do you think our grand idea of "cross yumming" is viable, or do we maybe need to split this script into different varieties based on host OS?

@thomassuckow

Copy link
Copy Markdown

It may be viable. I don't know much about some of the more exotic yum based os's. One of these days I may get around to making a small centos7 container and see if there is anything I can do about this releasever issue.

@tiborvass

Copy link
Copy Markdown
Contributor

@tianon verdict?

@crosbymichael

Copy link
Copy Markdown
Contributor

ping @tianon

@tianon

tianon commented Oct 25, 2014

Copy link
Copy Markdown
Member

Since the script does specifically say "centos" at the top, I'm inclined to merge this. We can always hash it out more in a future PR if someone is interested in investing the time into it.

tianon added a commit that referenced this pull request Oct 25, 2014
include --releasever=/ in mkimage-yum.sh
@tianon tianon merged commit 5631ffb into moby:master Oct 25, 2014
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.

7 participants