1RBM_INPUT_FILES(7) RBM_INPUT_FILES(7)
2
3
4
6 rbm_input_files - rbm input files configuration
7
9 When building a project with rbm, the input can be a git or mercurial
10 repository from which a tarball will be created and used as input for
11 your build. In addition or instead of this git or mercurial repository,
12 it is possible to retrieved files from other sources to use them as
13 input files.
14
15 The following input sources are available:
16
17 · a URL which should be used to download the file
18
19 · a file resulting from the output of a command
20
21 · the value of a config value
22
23 · the result of the build of an other project
24
25 The file that has been retrieved can be verified with:
26
27 · matching a specific sha256 checksum
28
29 · a gpg signature file from a specific key or keyring
30
31 The input files can be located in the output directory (for the result
32 of an other project’s build), or in the project’s directory.
33
35 The configuration of the input files is done in the input_files
36 configuration option. This option is an array of file descriptors. Each
37 file descriptor is an hash containing some of the following options:
38
39 filename
40 The name of the file that will be fetched. Except when an URL or a
41 project is set, this filename is mandatory. If it is not set when
42 an URL is set, the basename of the URL is used as a filename. If it
43 is not set when a project is set, the project’s filename option is
44 used.
45
46 name
47 Optionaly the input_file can have a name. This name is used as key
48 in the input_files_by_name option.
49
50 content
51 The content of the file.
52
53 URL
54 The URL from which to download the file.
55
56 exec
57 A command or script to execute to produce the file.
58
59 project
60 The name of an other project to build, to create the file. The
61 content of the file descriptor is used as options for the build of
62 this project. You can add config options such as version, git_hash
63 or target to configure the build. The build is run with an
64 equivalent of rbm pkg, so you should define the pkg_type option if
65 you want to select the type of build. The command line options are
66 not forwarded. The name of the current project is available to that
67 other project in the origin_project option.
68
69 target
70 An array defining the build targets for the selected project. If
71 this option is not set, the current build target is forwarded.
72
73 enable
74 The files are enabled by default. If this option is set to 0, then
75 the file is ignored.
76
77 refresh_input
78 By default, if the file is already present, it is not downloaded or
79 created again. If this option is set to a true value, the file will
80 be removed and created again on each run.
81
82 sha256sum
83 The sha256 checksum of the file. The build will fail with an error
84 if the file does not match the expected sha256 checksum.
85
86 file_gpg_id
87 If this option is set to 1, the file is checked for a gpg
88 signature. If it is set to an other non zero value, or an array of
89 non zero values, those are expected to be the valid gpg key IDs.
90 The gpg_wrapper, gpg_keyring, gpg_keyring_dir, gpg_bin, gpg_args
91 options can be used to configure the gpg check. Those options can
92 be overriden in the file descriptor.
93
94 sig_ext
95 An array of file extensions for the gpg signature file. Those
96 extensions are used to find the signature file when file_gpg_id is
97 set. If the signature file is missing but an URL is set, the
98 extension is appended to the URL to try to download it. The default
99 value for sig_ext is gpg, asc, sig. The sig_ext can also be set to
100 a single value.
101
102 urlget
103 A command or script to be used to download files from an URL. It
104 should use filename as the output filename, and URL as the source
105 URL. The default is to use wget.
106
107 output_dir
108 By default, the files are searched in the project’s directory, and
109 its output directory. The generated files are stored in the
110 project’s output directory. If you want to store and search a file
111 in a different directory, you can set the output_dir option to a
112 different value.
113
114 All those options are templates, and can use other options defined
115 inside or outside the file descriptor. Their default values can be
116 defined outside the file descriptor.
117
118 Those options can also be defined per target, or per distribution.
119
120 Instead of a file descriptor hash, an element of the input_files array
121 can be a string. In that case the string is the name of the option
122 containing the file descriptor hash. This can be useful when you are
123 using the same file in multiple projects.
124
126 In the following example we define the input_files configuration for
127 the project bundle. This project has two different targets, dev and
128 stable, and is using input files from different sources :
129
130 · The project A tarball is downloaded from an URL with an known
131 sha256sum.
132
133 · The project B tarball is downloaded from an URL which is different
134 depending on the target. The sha256sum is also different depending
135 on the target.
136
137 · The project C tarball is downloaded from an URL, and checked using
138 a gpg signature.
139
140 · The project D tarball is built using rbm. The git_hash used to
141 build it is different depending on the target. The git tag gpg
142 signature is checked only in the stable target.
143
144 input_files:
145 - filename: project-A.tar.gz
146 URL: http://www.project-a.org/project.tar.gz
147 sha256sum: 93c4fb2f3d377f41001fe1cf3c806dc9fc926a53dbbf4302838d7ee7c9f17315
148 - filename: 'project-B-[% c('project_b_version') %].tar.gz'
149 URL: 'http://www.project-b.org/project-b-[% c('project_b_version') %].tar.gz'
150 targets:
151 dev:
152 project_b_version: 0.12
153 sha256sum: 5f0ac48598c0a7948bb7da626b0599f121c1365ec53b111b5ba9e9330410fc44
154 stable:
155 project_b_version: 0.10
156 sha256sum: f0f81fbc84992c21bbbcb301c1185ce3d1772f150f57d37530cc9e4b0249a630
157 - filename: project-c.tar.gz
158 URL: http://www.project-c.org/release-0.1.tar.gz
159 file_gpg_id: 1
160 gpg_keyring: project-c.gpg
161 sig_ext: sig
162 - filename: project-D.tar.gz
163 project: project_d
164 pkg_type: build
165 targets:
166 dev:
167 git_hash: master
168 stable:
169 git_hash: 2.1
170 tag_gpg_id: 1
171
173 rbm(1), rbm_config(7)
174
175
176
177 02/02/2019 RBM_INPUT_FILES(7)