Commit b8f1a68834 ("rootfs: Simplify
code") introduced a variable called destdir but accidentally used
dest_dir with cp(1) instead. This causes kernel modules to be copied to
the wrong location.
Rename the variable to dest_dir to be consistent with module_dir and
rootfs_dir variables used in this function.
Fixes: #94
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
The `getopts` call in the rootfs builder was incorrect
meaning the `-a $agent_version` option would never have worked.
Signed-off-by: Penny Zheng <penny.zheng@arm.com>
For now, the flag "-a" or relevant shell variant "${AGENT_VERSION}"
hasn't been used, only defined. Using 'git checkout' command to go
into requested branch.
Fixes: #90
Signed-off-by: Penny Zheng <penny.zheng@arm.com>
Added the extra packages the user requested to the summary file as
previously only the default packages were listed.
Fixes#92.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Current rootfs.sh fails when GOPATH is a set of directories.We
simply choose the first one as the working directory, as go get
only works against the first item in the GOPATH.
Fixes: #87
Signed-off-by: Penny Zheng <penny.zheng@arm.com>
Add a new Usage section with basic examples of how to run the
builders from the `Makefile`.
Fixes#84.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Create a YAML metadata file inside the rootfs image
containing information about the environment:
```
/var/lib/osbuilder/osbuilder.yaml
```
Example contents:
```
---
osbuilder:
url: "https://github.com/kata-containers/osbuilder"
version: "unknown"
rootfs-creation-time: "2018-04-19T16:19:30.254610305+0000Z"
description: "osbuilder rootfs"
file-format-version: "0.0.1"
architecture: "x86_64"
base-distro:
name: "Centos"
version: "7"
packages:
- "iptables"
- "systemd"
agent:
url: "https://github.com/kata-containers/agent"
name: "kata-agent"
version: "0.0.1-2ec0b9593845b9a5e0eab5a85b20d74c35a2ca52-dirty"
agent-is-init-daemon: "no"
```
This change adds a new `-o` option to `rootfs.sh` for
specifying the version of osbuilder to the rootfs builder.
Fixes#35.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Removed `USE_DOCKER` from the initrd builder usage statement as that
builder does not use Docker.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
If the Clear Linux `OS_VERSION` is specified as `latest`,
resolve to an actual release number.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Add some checks to ensure function parameters are set.
This fixes a bug `copy_kernel_modules()` where a test would never
fail due to missing dollars.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
For consistency with the rest of the code, put the opening brace on the
line below the function name.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
The initrd image name should be kata-containers-initrd.img,
as its referenced by this name later on.
Fixes#14
Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
This patch introduces a bash library (scripts/lib.sh) that concentrates
common functions. This also enhances future additions of other OSes, making
it more simple. Also, new variables were introduced in each distro config.sh
in order to parameterise the creation of package manager config (dnf/yum, in this case).
A fix to the resulting rootfs directory name (include OS name) is also fixed in this
patch.
Fixes#39Fixes#34
Signed-off-by: Erick Cardona <erick.cardona.ruiz@intel.com>
template rootfs creation fails:
$make -f template/Makefile ROOTFS_BASE_NAME=opensuse
<....>
sed: can't read Dockerfile.template: No such file or directory
make is unable to find Dockerfile.template, this patch fixes this.
Fixes#67.
Signed-off-by: Nirmoy Das <ndas@suse.de>
There is no way to specify the remaining free space of the root partition.
It can vary depending on the upper bound size of the image aligned to 128MB
and the size of the root filesystem.
The following patch allow the user to specify that at least a certain amount
of space (defined in MB) will be kept in the root partition.
Fixes: #45
Signed-off-by: Erick Cardona <erick.cardona.ruiz@intel.com>