2013-12-23 03:06:09 +04:00
rpm-ostree
==========
This tool takes a set of packages, and commits them to an
[OSTree ](https://wiki.gnome.org/Projects/OSTree ) repository. At the
moment, it is intended for use on build servers.
2013-12-22 19:59:00 +04:00
Using rpm-ostree
2013-12-23 03:06:09 +04:00
----------------
2013-12-22 04:41:30 +04:00
2014-02-04 03:04:06 +04:00
There are two levels; the core "rpm-ostree" command takes a set of
packages and commits them to an OSTree repository.
2013-12-22 04:41:30 +04:00
2014-02-04 03:04:06 +04:00
The higher level rpm-ostree-autobuilder parses a "products.json" which
generates potentially many filesystem trees. It also has code to
generate disk images and run smoketests.
2013-12-22 04:41:30 +04:00
2014-02-13 04:58:58 +04:00
Installing and setting up a repository
--------------------------------------
2013-12-22 04:41:30 +04:00
2014-04-04 20:19:02 +04:00
First, unfortunately you must *disable* SELinux on the build host in
order to *support* SELinux on the built system. See:
https://bugzilla.redhat.com/show_bug.cgi?id=1060423
Second, you must install `nss-altfiles` on the host system, and
edit your /etc/nsswitch.conf to include `altfiles` , like this:
passwd: files altfiles
group: files altfiles
You may or may not be using SSSD (and thus the `sss` option); if you
are then it should look like:
passwd: files altfiles sss
group: files altfiles sss
For more information, see:
http://lists.rpm.org/pipermail/rpm-maint/2014-January/003652.html
There are packages available in the rpm-ostree COPR:
http://copr-fe.cloud.fedoraproject.org/coprs/walters/rpm-ostree/
At the moment, all of the tooling except for the patched
`shadow-utils` is in Fedora rawhide.
2013-12-22 04:41:30 +04:00
2014-02-04 03:04:06 +04:00
Once you have that done, choose a build directory. Here we'll use
/srv/rpm-ostree.
2013-12-22 04:41:30 +04:00
2014-03-08 03:08:57 +04:00
# cd /srv/rpm-ostree
# mkdir repo
# ostree --repo=repo init --mode=archive-z2
2014-02-13 04:58:58 +04:00
Running rpm-ostree
------------------
The core "rpm-ostree" takes as input a "treefile". There is a demo
2014-03-11 00:18:04 +04:00
one in `doc/demo-treefile.json` .
2014-02-13 04:58:58 +04:00
2014-03-11 00:18:04 +04:00
# rpm-ostree create sometreefile.json
2014-02-13 04:58:58 +04:00
All this does is use yum to download RPMs from the referenced repos,
and commit the result to the OSTree repository, using the ref named by
`ref` .
You can export `/srv/rpm-ostree/repo` via any static webserver.
Running the autobuilder
-----------------------
The autobuilder instead takes as input a `products.json` which
2014-04-04 20:19:02 +04:00
generates *multiple* treefile internally. Try this:
2014-02-13 04:58:58 +04:00
2014-03-08 03:08:57 +04:00
# ln -s /path/to/rpm-ostree.git/fedostree/products.json .
# rpm-ostree-autobuilder
2013-12-22 04:41:30 +04:00
2014-02-04 03:04:06 +04:00
That will automatically poll every hour for changes in the RPMs
2014-02-13 04:58:58 +04:00
referenced by the `products.json` file, commit them to the
`/srv/rpm-ostree/repo` , and generate cached disk images in
`/srv/rpm-ostree/images` .