2016-06-29 04:33:02 +03:00
Raw build instructions
----------------------
First, releases are available as GPG signed git tags, and most recent
versions support extended validation using
[git-evtag ](https://github.com/cgwalters/git-evtag ).
You'll need to get the submodules too: `git submodule update --init`
rpm-ostree has a hard requirement on a bleeding edge version of
[libhif ](https://github.com/rpm-software-management/libhif/ ) - we now
consume this as a git submodule automatically.
We also require a few other libraries like
[librepo ](https://github.com/rpm-software-management/librepo ).
2016-11-21 18:58:29 +03:00
On Fedora, you can install those with the command `dnf builddep rpm-ostree` .
2016-06-29 04:33:02 +03:00
So the build process now looks like any other autotools program:
```
env NOCONFIGURE=1 ./autogen.sh
./configure --prefix=/usr --libdir=/usr/lib64 --sysconfdir=/etc
make
```
At this point you can run some of the unit tests with `make check` .
For more information on this, see `CONTRIBUTING.md` .
2017-07-14 18:04:12 +03:00
Doing builds in a container
===================================
2016-06-29 04:33:02 +03:00
2017-07-14 18:04:12 +03:00
First, we recommend building in a container (for example `docker` ); you can use
other container tools obviously. See `ci/build.sh` for build and test
dependencies.
2016-06-21 19:30:47 +03:00
2017-07-14 18:04:12 +03:00
Testing
=========
2016-06-21 19:30:47 +03:00
2017-07-14 18:04:12 +03:00
You can use `make check` in a container to run the unit tests. However,
if you want to test the daemon in a useful way, you'll need virtualization.
2016-06-21 19:30:47 +03:00
2017-07-14 18:04:12 +03:00
There's a `make vmcheck` test suite that requires a `ssh-config` in the
source directory toplevel. You can provision a VM however you want; libvirt
directly, vagrant, a remote OpenStack/EC2 instance, etc. If you choose
vagrant for example, do something like this:
2016-06-21 19:30:47 +03:00
```
2017-07-14 18:04:12 +03:00
vagrant ssh-config > /path/to/src/rpm-ostree/ssh-config
2016-06-21 19:30:47 +03:00
```
2017-07-14 18:04:12 +03:00
Once you have a `ssh-config` set up:
2016-06-21 19:30:47 +03:00
2017-07-14 18:04:12 +03:00
`make vmsync` will do an unlock, and sync the container build
into the VM.
2016-06-21 19:30:47 +03:00
2017-07-14 18:04:12 +03:00
`make vmoverlay` will do a non-live overlay, and reboot the VM.
2016-06-21 19:30:47 +03:00
For convenience, the `make vmshell` command does the same
2017-07-14 18:04:12 +03:00
as `make vmsync` but additionally places you in a shell,
2016-06-28 23:22:49 +03:00
ready to test your changes.
Note that by default, all the commands above try to re-use
the same configuration files to save speed. If you want to
force a cleanup, you can use `VMCLEAN=1` .