1freight-builder(1)          General Commands Manual         freight-builder(1)
2
3
4

NAME

6       freight-builder - utility to convert manifest files into systemd-nspawn
7       images
8

SYNOPSIS

10       frieght-builder [options]
11

DESCRIPTION

13       freight-builder is a utility to convert manifest  files  of  rpms  into
14       disk  images  suitable  for use with systemd-nspawn.  These disk images
15       also create meta data useful for  image  validation  and  adminstrative
16       operation,  such  as  determination  of  the need for rebuilding due to
17       updated packages.  Freight-builder accepts as  input  a  manifest  file
18       (described below), and produces a source and binary rpm as output.  The
19       former is suitable for rebuilding on alternate arches, while the latter
20       (and  any rebuilds of the source rpm) can be placed in a repository for
21       installations on systems running freight-agent, and are usable as  sys‐
22       temd containers.
23
24

OPTIONS

26        freight-builder [OPTIONS]
27
28       -h | --help
29              Display options and usage for the utility
30
31       -k | --keep
32              Keep  working  files  and  src  rpms around for insepction/debug
33              after exit
34
35       -s | --source
36              Only build the soruce rpm, not the binary container rpm
37
38       -m | --manifest <manifest file>
39              Specify the manifest file to convert into a container image
40
41       -o | --output path/to/output/dir
42              Write the resultant source and binary rpms to this directory
43
44       -p | --pcache /path/to/rpm/dir
45              Set the parent cache directory.  Any rpms in this directory will
46              be  installed  in the working directory prior to building a con‐
47              tainer.  Used to ensure parent containers are available to snap‐
48              shot from
49
50       -c | --container <path/to/container/rpm>
51              Instead  of  building  an  rpm,  introspect an rpm to see if any
52              packages need updates within the container
53
54       -v | --verbose
55              Make freight-builder output lots of diagnostic information
56
57       -w | --workdir <path/to/workdir>
58              Specify the base directory  in  which  freight-builder  uses  as
59              working space to build rpms
60
61       -r | --relver
62              The release version to specify when inspecting or deriving child
63              containers
64
65

MANIFEST FILE FORMAT

67       The Manifest file codifies the contents of a container image and gener‐
68       ally has this format:
69
70       ---------------------------------------------
71       # These are comments
72
73       inherit = "/path/to/inherited/file";
74
75       repositories = (
76            {
77                 name = "Yum_respository_1";
78                 url = "http://yum.repo.com/path/to/repo";
79            }, ...
80       );
81
82
83       manifest = (
84            "rpm1-version-release",
85            "rpm2-version-release",
86            ...
87       );
88
89
90       packaging = {
91            name = "web-server";
92            version = "1.0";
93            release = "1";
94            summary = "Summarize This container here";
95            license = "GPLv2|BSD|Proprietary";
96            author = "Name <email>";
97            post_script ="/path/to/script";
98            parent_container = "parent-container-nvr";
99       };
100
101       yum_opts = {
102            releasever = "f21";
103       };
104
105       container_opts = {
106            user = "username";
107       };
108
109       ----------------------------------------------
110
111       inherit="/path/to/inherited/file";
112
113       Manifest  files  can  be stacked on one another.  The inherit directive
114       indicates the parent of the manifest file being processed.  Inheritance
115       may  be  nested (i.e. manifest A may inherit from manifest B, and B may
116       inherit from manifest C).  However multiple inheritance is not allowed.
117       Inherited  files have their repository and manifest groups merged.  The
118       options group is overridden by child option groups
119
120       repositories = ( ... )
121
122       The repositories group represents the set of yum repositories that this
123       utility will search for the manifest designated rpms.
124
125       manifest = ( ... )
126
127       A list of Strings representing package nvr's to include in the systemd-
128       nspawn image file.
129
130       packaging
131
132       A list of details to include when the container is packaged  up  as  an
133       rpm
134
135       post_script
136
137       Path  to  a file to be executed in the container root after the install
138       is complete.  Note the ENVIRONMENT VARIABLES section below for informa‐
139       tion about the script environment
140
141       parent_container
142
143       This optional setting allows for the creation of derivative containers.
144       That is to say, the resultant container will be a delta from  specified
145       parent container rpm.  This allows for very small container images, but
146       requires that the parent container be installed when building.  Used in
147       conjunction with --pcache option
148
149       yum_opts
150
151       A list of config specifications to pass to yum:
152
153       releasever  This  allows  yum to specify the rpmdb release version when
154       creating a container for updates.  yum repositories with $releasever in
155       their urls will be resolved properly with this option
156
157       container_opts
158
159       A  list  of  options to direct behavior of an instance of the container
160       when executed
161
162       user The container will run as the specified user
163
164

ENVIRONMENT VARIABLES

166       Environment variables are used to convey  information  about  the  con‐
167       tainer  being built to the post_script that may be optionally specified
168       in the manifest file.  The following Environment variables are set  and
169       accessible to the post_script
170
171       FREIGHT_CONTAINERFS
172              This  variable  points to the root of the container file system.
173              It can be used as a chroot destination for  modifying  the  con‐
174              tainer,  or  as  a  destination directory base for copying addi‐
175              tional files into the container
176
177
178
179
180Neil Horman                        Apr 2015                 freight-builder(1)
Impressum