Commit graph

16 commits

Author SHA1 Message Date
Ankit Jain
eb13758057 Default to Core group only if no groups specified
Signed-off-by: Ankit Jain <ajatkj@yahoo.co.in>
2019-03-29 20:21:33 +05:30
Ankit Jain
8233910503 mkimage-yum.sh: handle spaces properly & allow mutiple packages & groups
Signed-off-by: Ankit Jain <ajatkj@yahoo.co.in>
2019-03-28 20:47:47 +05:30
Noriki Nakamura
57c2228cc1 Add new option to specify tag information
Previously, tag information automatically is added from
/etc/{redhat,system}-release in image (target directory).

But I want to specify any tag informtion when using mkimage-yum.sh.
Because a Linux distribution based RHEL (It's Asianux Server) uses
SPn notation (e.g. SP3) instead of period notaion (e.g. 7.6).

Signed-off-by: Noriki Nakamura <noriki.nakamura@miraclelinux.com>
2019-03-06 07:06:40 +09:00
WENJUN TANG
fa900bd30a Update mkimage-yum.sh
If you want to makeimage using the group "Compute Node" and so on, you must add “ ” to include the $install_groups, or it will format the text as below:
yum -c /etc/yum.conf --installroot=/tmp/makeimage.sh.zOLs8y --releasever=/ --setopt=tsflags=nodocs --setopt=group_package_types=mandatory -y groupinstall Compute Node
That's absolutely incorrect.

Change-Id: I8b6b09f215aabd6b1f76c9365ba96c68722c47fd
Signed-off-by: dodia <tangwj2@lenovo.com>
2017-07-27 10:40:00 +08:00
Carl Loa Odin
fa255c92df Add errexit to mkimage-yum.sh
Add errexit to mkimage-yum bash script to abort early. This to prevent
disaster when mktemp fails and leave $target variable empty.

Signed-off-by: Carl Loa Odin <carlodin@gmail.com>
2016-09-14 12:04:04 +02:00
Florin Asavoaie
c8badcbd26 New features in mkimage-yum.sh script
Added -g and -p options for the contrib/mkimage-yum.sh script to allow generating images with the dependencies you want. I use this because I generate images where I only need "glibc" with its dependencies or "java-1.8.0-openjdk-headless" and so on. This makes sure that I don't get a lot of bogus packages from the Core group.

Possible usages now include sudo ./mkimage-yum.sh -y yum.conf -g '' -p java-1.8.0-openjdk-headless.

Also changed the "test" at the end to add --rm parameter to docker run so it doesn't leave a junk container and use bash to echo "success" in case you don't get coreutils in your dependencies tree.

Signed-off-by: Florin Asavoaie <florin.asavoaie@gmail.com>
2015-12-20 14:20:30 +02:00
Elvir Kuric
5c329633d7 mkimage-yum.sh to support dnf
included changes @tianon proposed in #17362

Signed-off-by: Elvir Kuric <elvirkuric@gmail.com>
2015-11-21 13:06:27 +01:00
Fathi Boudra
3e9fc478ae Remove yum cache to reduce image size
mkimage-yum.sh has a lot in common with mkimage-rinse.sh, including extra
files clean up. Sync with mkimage-rinse.sh by removing yum cache to reduce
the image size.

Minor changes to reduce also the delta/diff and make it easier to sync with
mkimage-rinse.sh script.

Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
2015-11-04 07:19:09 +02:00
Lance Kinley
c15970eff9 Patch mkimage-yum.sh to work with Amazon Linux (2014.09)
Signed-off-by: Lance Kinley <lkinley@loyaltymethods.com>
2015-02-18 15:17:15 -08:00
mschurenko
56fa079906 add --releasever=/ to mkimage-yum.sh
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 <matt.schurenko@gmail.com> (github: mschurenko)
2014-07-12 12:15:42 -07:00
Lewis Peckover
6d55a9d7ce mkdir /dev before doing mknod
Docker-DCO-1.1-Signed-off-by: Lewis Peckover <lew@lew.io> (github: lewispeckover)
2014-03-02 14:50:16 +00:00
Tim Bosse
1d82091756 Some distributions no longer include MAKEDEV script. Stole this from mkimage-rinse.sh.
Docker-DCO-1.1-Signed-off-by: Tim Bosse <taim@bosboot.org> (github: maztaim)
2014-02-26 22:34:42 -05:00
Tianon Gravi
d29ee876ac Update mkimage-yum to not read /etc/redhat-release from the host
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-02-25 23:35:59 -07:00
Chris St. Pierre
85263cdee8 Fix bogus variable reference in mkimage-yum.sh
Fixes this: d419da7227 (commitcomment-5344982)

Docker-DCO-1.1-Signed-off-by: Chris St. Pierre <chris.a.st.pierre@gmail.com> (github: stpierre)
2014-02-12 08:02:36 -05:00
Chris St. Pierre
fd2403b830 fix shebang in mkimage-yum.sh
Docker-DCO-1.1-Signed-off-by: Chris St. Pierre <chris.a.st.pierre@gmail.com> (github: stpierre)
2014-01-23 12:01:24 -05:00
Chris St. Pierre
d419da7227 Added new mkimage-yum.sh script to create CentOS base images
mkimage-rinse.sh requires rinse, which is not readily available on
CentOS or Fedora.  Plus, creating a base image is trivial with yum
alone.

Docker-DCO-1.1-Signed-off-by: Chris St. Pierre <chris.a.st.pierre@gmail.com> (github: stpierre)
2014-01-23 07:09:44 -05:00