RBM_INPUT_FILES(7)
π RBM_INPUT_FILES(7) π
okay bestie, welcome to the rbm_input_files manual page (section 7 of the rbm manual, yes we're fancy). this is the page about configuring input files, and i promise it's more fun than it sounds π«Ά
πΈ NAME πΈ
rbm_input_files β rbm input files configuration β¨
π DESCRIPTION π
so when you build a project with rbm, the input can be a git or mercurial repository β rbm makes a tarball out of it and that tarball becomes the input for your build. but here's the tea: on top of that repo, or literally instead of it, you can pull files in from other places and use those as input files too π
the input sources you can use are:
- a URL that gets used to download the file
- a file that's the output of a command
- the value of a config value
- the result of building another project π
and once a file has been retrieved, you can verify it by:
- matching a specific
sha256orsha512checksum - a gpg signature file from a specific key or keyring π
the input files can live in the output directory (that's the case when it's the result of another project's build), or in the project's directory. either way, we're covered π
β¨ CONFIGURATION β¨
the whole vibe gets configured in the input_files configuration option. this option is an array of file descriptors, and each file descriptor is a hash that can contain some of these options:
filenameβ the name of the file that will be fetched. except when anURLor aprojectis set, this filename is mandatory. if it's not set when anURLis set, the basename of the URL is used as the filename. if it's not set when aprojectis set, the project'sfilenameoption is used. also, the filename can be the name of a directory, in which case all the files from that directory get included ποΈnameβ optionally yourinput_filecan have a name. this name is used as key in theinput_files_by_nameoption.contentβ the content of the file.URLβ the URL to download the file from πexecβ a command or script to execute to produce the file.projectβ the name of another project to build, to create the file. the content of the file descriptor is used as options for the build of that project. you can add config options likeversion,git_hashortargetto configure the build. the command line options are not forwarded. the name of the current project is available to that other project in theorigin_projectoption, and the current step is available in theorigin_stepoption.pkg_typeβ when the input file is another project, this option lets you pick a different type of build (which we call a step). this is equivalent to the--stepcommand line option. the previous step is available in theorigin_stepoption.targetβ an array defining the build targets for the selected project. if this option isn't set, the current build target is forwarded. if it is set, it replaces the current targets.target_appendβ same astarget, but instead of replacing the current targets, the new targets get appended. βtarget_prependβ same astarget, but instead of replacing the current targets, the new targets get prepended. π₯target_replaceβ a hash table containing targets to replace. the key is a regular expression, and the value is the replacement. see theperlremanual page for details about the syntax. note that referencing capture groups in the replacement is currently not supported.enableβ the files are enabled by default. if this option is set to0, then the file is ignored. π«refresh_inputβ by default, if the file is already present, it is not downloaded or created again, except when ansha256sumorsha512sumis defined and the file present is not matching. if this option is set to a true value, the file will be removed and created again on each run, except when ansha256sumorsha512sumis defined and the file present is matching. πsha256sumβ the sha256 checksum of the file. the build will fail with an error if the file does not match the expected sha256 checksum. if the value is empty, the checksum is not checked.sha512sumβ the sha512 checksum of the file. the build will fail with an error if the file does not match the expected sha512 checksum. if the value is empty, the checksum is not checked.file_gpg_idβ if this option is set to1, the file is checked for a gpg signature. if it's set to another non zero value, or an array of non zero values, those are expected to be the valid gpg key IDs. thegpg_wrapper,gpg_keyring,gpg_bin,gpg_argsoptions can be used to configure the gpg check. those options can be overridden in the file descriptor.sig_extβ an array of file extensions for the gpg signature file. those extensions are used to find the signature file whenfile_gpg_idis set. if the signature file is missing but anURLis set, the extension is appended to the URL to try to download it. the default value forsig_extisgpg,asc,sig. thesig_extcan also be set to a single value.urlgetβ a command or script to be used to download files from an URL. it should usefilenameas the output filename, andURLas the source URL. the default is to usewget.output_dirβ by default, the files are searched in the project's directory, and its output directory. the generated files are stored in the project's output directory. if you want to store and search a file in a different directory, you can set theoutput_diroption to a different value. π
all of those options are templates, and can use other options defined inside or outside the file descriptor. their default values can be defined outside the file descriptor too.
those options can also be defined per target, or per distribution. no cap.
and here's a cute lil plot twist: instead of a file descriptor hash, an element of the input_files array can be a string. in that case the string is the name of the option containing the file descriptor hash. super useful when you're reusing the same file across multiple projects π
β¨
π¦ INHERITANCE OF PROJECTS OPTIONS π¦
when you define a file of type project, the options defined in the input_files entry get transmitted to the child project. and if that project is also using other projects in its input_files, then the options from the first input_files entry are inherited. it's giving family tree π³
in this example, both project B and C are getting the definition of option1:
projects/A/config:
input_files:
- project: B
option1: value1
projects/B/config:
input_files:
- project: C
projects/C/config:
input_files: []
sometimes though, you only want options to apply to the first level of child projects. to do that, you define the options under norec. in this example, only project B is getting the definition of option1:
projects/A/config:
input_files:
- project: B
norec:
option1: value1
projects/B/config:
input_files:
- project: C
projects/C/config:
input_files: []
π EXAMPLES π
in the following example we define the input_files configuration for the project bundle. this project has two different targets, dev and stable, and it's using input files from different sources:
- the project A tarball is downloaded from an URL with a known
sha256sum. - the project B tarball is downloaded from an URL which is different depending on the target. the
sha256sumis also different depending on the target. - the project C tarball is downloaded from an URL, and checked using a gpg signature. π
- the project D tarball is built using rbm. the
git_hashused to build it is different depending on the target. the git tag gpg signature is checked only in thestabletarget.
input_files:
- filename: project-A.tar.gz
URL: http://www.project-a.org/project.tar.gz
sha256sum: 93c4fb2f3d377f41001fe1cf3c806dc9fc926a53dbbf4302838d7ee7c9f17315
- filename: 'project-B-[% c('project_b_version') %].tar.gz'
URL: 'http://www.project-b.org/project-b-[% c('project_b_version') %].tar.gz'
targets:
dev:
project_b_version: 0.12
sha256sum: 5f0ac48598c0a7948bb7da626b0599f121c1365ec53b111b5ba9e9330410fc44
stable:
project_b_version: 0.10
sha256sum: f0f81fbc84992c21bbbcb301c1185ce3d1772f150f57d37530cc9e4b0249a630
- filename: project-c.tar.gz
URL: http://www.project-c.org/release-0.1.tar.gz
file_gpg_id: 1
gpg_keyring: project-c.gpg
sig_ext: sig
- filename: project-D.tar.gz
project: project_d
pkg_type: build
targets:
dev:
git_hash: master
stable:
git_hash: 2.1
tag_gpg_id: 1
π SEE ALSO π
and that's the whole page bestie π this one is from the rbm man pages, dated 07/25/2025, and honestly? iconic. go configure your input files, you've got this πβ¨π
π¦ where this page comes from
- fedora 43: rbm 0.4^20241205gitc6a4095-3.fc43 Β· CC0-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms