Skip to content

Commit

Permalink
Merge pull request #84 from voxpupuli/update-template
Browse files Browse the repository at this point in the history
Add support for the latest poudriere options
  • Loading branch information
smortex authored Feb 7, 2024
2 parents f9d7dc2 + 55d9396 commit cf3b9a3
Show file tree
Hide file tree
Showing 4 changed files with 382 additions and 113 deletions.
162 changes: 144 additions & 18 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ The following parameters are available in the `poudriere` class:
* [`mfssize`](#-poudriere--mfssize)
* [`tmpfs`](#-poudriere--tmpfs)
* [`tmpfs_limit`](#-poudriere--tmpfs_limit)
* [`tmpfs_blacklist`](#-poudriere--tmpfs_blacklist)
* [`tmpfs_blacklist_tmpdir`](#-poudriere--tmpfs_blacklist_tmpdir)
* [`max_memory`](#-poudriere--max_memory)
* [`max_memory_per_package`](#-poudriere--max_memory_per_package)
* [`max_files`](#-poudriere--max_files)
* [`distfiles_cache`](#-poudriere--distfiles_cache)
* [`git_baseurl`](#-poudriere--git_baseurl)
Expand All @@ -60,6 +63,8 @@ The following parameters are available in the `poudriere` class:
* [`ccache_dir`](#-poudriere--ccache_dir)
* [`ccache_static_prefix`](#-poudriere--ccache_static_prefix)
* [`restrict_networking`](#-poudriere--restrict_networking)
* [`allow_networking_packages`](#-poudriere--allow_networking_packages)
* [`disallow_networking`](#-poudriere--disallow_networking)
* [`allow_make_jobs_packages`](#-poudriere--allow_make_jobs_packages)
* [`parallel_jobs`](#-poudriere--parallel_jobs)
* [`prepare_parallel_jobs`](#-poudriere--prepare_parallel_jobs)
Expand All @@ -74,7 +79,6 @@ The following parameters are available in the `poudriere` class:
* [`allow_make_jobs`](#-poudriere--allow_make_jobs)
* [`allow_make_jobs_packages`](#-poudriere--allow_make_jobs_packages)
* [`timestamp_logs`](#-poudriere--timestamp_logs)
* [`url_base`](#-poudriere--url_base)
* [`max_execution_time`](#-poudriere--max_execution_time)
* [`nohang_time`](#-poudriere--nohang_time)
* [`atomic_package_repository`](#-poudriere--atomic_package_repository)
Expand All @@ -86,19 +90,29 @@ The following parameters are available in the `poudriere` class:
* [`preserve_timestamp`](#-poudriere--preserve_timestamp)
* [`build_as_non_root`](#-poudriere--build_as_non_root)
* [`portbuild_user`](#-poudriere--portbuild_user)
* [`portbuild_group`](#-poudriere--portbuild_group)
* [`portbuild_uid`](#-poudriere--portbuild_uid)
* [`portbuild_gid`](#-poudriere--portbuild_gid)
* [`priority_boost`](#-poudriere--priority_boost)
* [`buildname_format`](#-poudriere--buildname_format)
* [`duration_format`](#-poudriere--duration_format)
* [`use_colors`](#-poudriere--use_colors)
* [`trim_orphaned_build_deps`](#-poudriere--trim_orphaned_build_deps)
* [`delete_unknown_files`](#-poudriere--delete_unknown_files)
* [`delete_unqueued_packages`](#-poudriere--delete_unqueued_packages)
* [`local_mtree_excludes`](#-poudriere--local_mtree_excludes)
* [`url_base`](#-poudriere--url_base)
* [`html_type`](#-poudriere--html_type)
* [`html_track_remaining`](#-poudriere--html_track_remaining)
* [`determine_build_failure_reason`](#-poudriere--determine_build_failure_reason)
* [`makeworldargs`](#-poudriere--makeworldargs)
* [`package_fetch_branch`](#-poudriere--package_fetch_branch)
* [`package_fetch_url`](#-poudriere--package_fetch_url)
* [`package_fetch_blacklist`](#-poudriere--package_fetch_blacklist)
* [`package_fetch_whitelist`](#-poudriere--package_fetch_whitelist)
* [`environments`](#-poudriere--environments)
* [`portstrees`](#-poudriere--portstrees)
* [`xbuild_package`](#-poudriere--xbuild_package)
* [`allow_networking_packages`](#-poudriere--allow_networking_packages)

##### <a name="-poudriere--zpool"></a>`zpool`

Expand Down Expand Up @@ -180,6 +194,22 @@ How much memory to limit tmpfs size to for each builder in GiB

Default value: `undef`

##### <a name="-poudriere--tmpfs_blacklist"></a>`tmpfs_blacklist`

Data type: `Optional[Array[String[1]]]`

List of package globs that are not allowed to use tmpfs

Default value: `undef`

##### <a name="-poudriere--tmpfs_blacklist_tmpdir"></a>`tmpfs_blacklist_tmpdir`

Data type: `Optional[String[1]]`

The host path where tmpfs-blacklisted packages can be built in

Default value: `undef`

##### <a name="-poudriere--max_memory"></a>`max_memory`

Data type: `Optional[Integer[1]]`
Expand All @@ -188,6 +218,14 @@ How much memory to limit jail processes to for each builder

Default value: `undef`

##### <a name="-poudriere--max_memory_per_package"></a>`max_memory_per_package`

Data type: `Hash[String[1], Integer[1]]`

Override max_memory per package

Default value: `{}`

##### <a name="-poudriere--max_files"></a>`max_files`

Data type: `Optional[Integer[1]]`
Expand Down Expand Up @@ -308,6 +346,22 @@ The jails normally only allow network access during the 'make fetch' phase.

Default value: `undef`

##### <a name="-poudriere--allow_networking_packages"></a>`allow_networking_packages`

Data type: `Optional[String[1]]`

Allow networking for a subset of packages

Default value: `undef`

##### <a name="-poudriere--disallow_networking"></a>`disallow_networking`

Data type: `Optional[Enum['yes', 'no']]`

Fully disabled networking

Default value: `undef`

##### <a name="-poudriere--allow_make_jobs_packages"></a>`allow_make_jobs_packages`

Data type: `Optional[String[1]]`
Expand Down Expand Up @@ -418,14 +472,6 @@ Timestamp every line of build logs

Default value: `undef`

##### <a name="-poudriere--url_base"></a>`url_base`

Data type: `Optional[String[1]]`

URL where your POUDRIERE_DATA/logs are hosted

Default value: `undef`

##### <a name="-poudriere--max_execution_time"></a>`max_execution_time`

Data type: `Optional[Integer[1]]`
Expand Down Expand Up @@ -514,6 +560,14 @@ Define to the username to build as when BUILD_AS_NON_ROOT is yes

Default value: `undef`

##### <a name="-poudriere--portbuild_group"></a>`portbuild_group`

Data type: `Optional[String[1]]`

Define to the groupname to build as when BUILD_AS_NON_ROOT is yes

Default value: `undef`

##### <a name="-poudriere--portbuild_uid"></a>`portbuild_uid`

Data type: `Optional[Integer[1]]`
Expand All @@ -522,6 +576,14 @@ Define to the uid to use for PORTBUILD_USER if the user does not already exist i

Default value: `undef`

##### <a name="-poudriere--portbuild_gid"></a>`portbuild_gid`

Data type: `Optional[Integer[1]]`

Define to the gid to use for PORTBUILD_USER if the group does not already exist in the jail

Default value: `undef`

##### <a name="-poudriere--priority_boost"></a>`priority_boost`

Data type: `Optional[String[1]]`
Expand Down Expand Up @@ -562,6 +624,22 @@ Only build what is requested

Default value: `undef`

##### <a name="-poudriere--delete_unknown_files"></a>`delete_unknown_files`

Data type: `Optional[Enum['yes', 'no']]`

Whether or not bulk/testport should delete unknown files in the repository

Default value: `undef`

##### <a name="-poudriere--delete_unqueued_packages"></a>`delete_unqueued_packages`

Data type: `Optional[Enum['yes', 'always', 'no']]`

Whether or not bulk/testport should automatically "pkgclean"

Default value: `undef`

##### <a name="-poudriere--local_mtree_excludes"></a>`local_mtree_excludes`

Data type: `Optional[String[1]]`
Expand All @@ -570,6 +648,14 @@ A list of directories to exclude from leftover and filesystem violation mtree ch

Default value: `undef`

##### <a name="-poudriere--url_base"></a>`url_base`

Data type: `Optional[String[1]]`

URL where your POUDRIERE_DATA/logs are hosted

Default value: `undef`

##### <a name="-poudriere--html_type"></a>`html_type`

Data type: `Optional[Enum['hosted', 'inline']]`
Expand All @@ -586,6 +672,54 @@ Set to track remaining ports in the HTML interface

Default value: `undef`

##### <a name="-poudriere--determine_build_failure_reason"></a>`determine_build_failure_reason`

Data type: `Optional[Enum['yes', 'no']]`

Grep build logs to determine a possible build failure reason

Default value: `undef`

##### <a name="-poudriere--makeworldargs"></a>`makeworldargs`

Data type: `Optional[String[1]]`

Pass arguments to buildworld

Default value: `undef`

##### <a name="-poudriere--package_fetch_branch"></a>`package_fetch_branch`

Data type: `Optional[String[1]]`

Set to always attempt to fetch packages or dependencies before building

Default value: `undef`

##### <a name="-poudriere--package_fetch_url"></a>`package_fetch_url`

Data type: `Optional[String[1]]`

The fetch URL

Default value: `undef`

##### <a name="-poudriere--package_fetch_blacklist"></a>`package_fetch_blacklist`

Data type: `Optional[Array[String[1]]]`

Packages which should never be fetched

Default value: `undef`

##### <a name="-poudriere--package_fetch_whitelist"></a>`package_fetch_whitelist`

Data type: `Optional[Array[String[1]]]`

Allow only specific packages to be fetched

Default value: `undef`

##### <a name="-poudriere--environments"></a>`environments`

Data type: `Hash`
Expand All @@ -610,14 +744,6 @@ Package to install for cross-building packages

Default value: `'qemu-user-static'`

##### <a name="-poudriere--allow_networking_packages"></a>`allow_networking_packages`

Data type: `Optional[String[1]]`



Default value: `undef`

### <a name="poudriere--xbuild"></a>`poudriere::xbuild`

Install cross-building dependencies
Expand Down
35 changes: 33 additions & 2 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
# @param mfssize Size of WRKDIRPREFIX when using mdmfs
# @param tmpfs Use tmpfs(5)
# @param tmpfs_limit How much memory to limit tmpfs size to for each builder in GiB
# @param tmpfs_blacklist List of package globs that are not allowed to use tmpfs
# @param tmpfs_blacklist_tmpdir The host path where tmpfs-blacklisted packages can be built in
# @param max_memory How much memory to limit jail processes to for each builder
# @param max_memory_per_package Override max_memory per package
# @param max_files How many file descriptors to limit each jail process to
# @param distfiles_cache Directory used for the distfiles
# @param git_baseurl Git URL to use to fetch base
Expand All @@ -29,6 +32,8 @@
# @param ccache_dir Path to the ccache cache directory
# @param ccache_static_prefix Static ccache support from host
# @param restrict_networking The jails normally only allow network access during the 'make fetch' phase.
# @param allow_networking_packages Allow networking for a subset of packages
# @param disallow_networking Fully disabled networking
# @param allow_make_jobs_packages Allow networking for a subset of packages when building
# @param parallel_jobs Override the number of builders
# @param prepare_parallel_jobs How many jobs should be used for preparing the build
Expand All @@ -43,7 +48,6 @@
# @param allow_make_jobs Do not bound the number of processes to the number of cores
# @param allow_make_jobs_packages List of packages that will always be allowed to use MAKE_JOBS regardless of ALLOW_MAKE_JOBS
# @param timestamp_logs Timestamp every line of build logs
# @param url_base URL where your POUDRIERE_DATA/logs are hosted
# @param max_execution_time Set the max time (in seconds) that a command may run for a build before it is killed for taking too long
# @param nohang_time Set the time (in seconds) before a command is considered to be in a runaway state for having no output on stdout
# @param atomic_package_repository Update the repository atomically
Expand All @@ -55,15 +59,26 @@
# @param preserve_timestamp Define to get a predictable timestamp on the ports tree
# @param build_as_non_root Build and stage as a regular user
# @param portbuild_user Define to the username to build as when BUILD_AS_NON_ROOT is yes
# @param portbuild_group Define to the groupname to build as when BUILD_AS_NON_ROOT is yes
# @param portbuild_uid Define to the uid to use for PORTBUILD_USER if the user does not already exist in the jail
# @param portbuild_gid Define to the gid to use for PORTBUILD_USER if the group does not already exist in the jail
# @param priority_boost Define pkgname globs to boost priority for
# @param buildname_format Define format for buildnames
# @param duration_format Define format for build duration times
# @param use_colors Use colors when in a TTY
# @param trim_orphaned_build_deps Only build what is requested
# @param delete_unknown_files Whether or not bulk/testport should delete unknown files in the repository
# @param delete_unqueued_packages Whether or not bulk/testport should automatically "pkgclean"
# @param local_mtree_excludes A list of directories to exclude from leftover and filesystem violation mtree checks
# @param url_base URL where your POUDRIERE_DATA/logs are hosted
# @param html_type Set to hosted to use the /data directory instead of inline style HTML
# @param html_track_remaining Set to track remaining ports in the HTML interface
# @param determine_build_failure_reason Grep build logs to determine a possible build failure reason
# @param makeworldargs Pass arguments to buildworld
# @param package_fetch_branch Set to always attempt to fetch packages or dependencies before building
# @param package_fetch_url The fetch URL
# @param package_fetch_blacklist Packages which should never be fetched
# @param package_fetch_whitelist Allow only specific packages to be fetched
# @param environments Build environments to manage
# @param portstrees Port trees to manage
# @param xbuild_package Package to install for cross-building packages
Expand All @@ -78,7 +93,10 @@
Optional[String[1]] $mfssize = undef,
Poudriere::Tmpfs $tmpfs = 'yes',
Optional[Integer[1]] $tmpfs_limit = undef,
Optional[Array[String[1]]] $tmpfs_blacklist = undef,
Optional[String[1]] $tmpfs_blacklist_tmpdir = undef,
Optional[Integer[1]] $max_memory = undef,
Hash[String[1], Integer[1]] $max_memory_per_package = {},
Optional[Integer[1]] $max_files = undef,
Stdlib::Absolutepath $distfiles_cache = '/usr/ports/distfiles',
Optional[String[1]] $git_baseurl = undef,
Expand All @@ -95,6 +113,7 @@
Optional[Stdlib::Absolutepath] $ccache_static_prefix = undef,
Optional[Enum['yes', 'no']] $restrict_networking = undef,
Optional[String[1]] $allow_networking_packages = undef,
Optional[Enum['yes', 'no']] $disallow_networking = undef,
Integer[1] $parallel_jobs = $facts['processors']['count'],
Optional[Integer[1]] $prepare_parallel_jobs = undef,
Optional[String[1]] $save_wrkdir = undef,
Expand All @@ -108,7 +127,6 @@
Optional[String[1]] $allow_make_jobs = undef,
Optional[String[1]] $allow_make_jobs_packages = undef,
Optional[Enum['yes', 'no']] $timestamp_logs = undef,
Optional[String[1]] $url_base = undef,
Optional[Integer[1]] $max_execution_time = undef,
Optional[Integer[1]] $nohang_time = undef,
Optional[Enum['yes', 'no']] $atomic_package_repository = undef,
Expand All @@ -120,19 +138,32 @@
Optional[Enum['yes', 'no']] $preserve_timestamp = undef,
Optional[String[1]] $build_as_non_root = undef,
Optional[String[1]] $portbuild_user = undef,
Optional[String[1]] $portbuild_group = undef,
Optional[Integer[1]] $portbuild_uid = undef,
Optional[Integer[1]] $portbuild_gid = undef,
Optional[String[1]] $priority_boost = undef,
Optional[String[1]] $buildname_format = undef,
Optional[String[1]] $duration_format = undef,
Optional[Enum['yes', 'no']] $use_colors = undef,
Optional[Enum['yes', 'no']] $trim_orphaned_build_deps = undef,
Optional[Enum['yes', 'no']] $delete_unknown_files = undef,
Optional[Enum['yes', 'always', 'no']] $delete_unqueued_packages = undef,
Optional[String[1]] $local_mtree_excludes = undef,
Optional[String[1]] $url_base = undef,
Optional[Enum['hosted', 'inline']] $html_type = undef,
Optional[Enum['yes', 'no']] $html_track_remaining = undef,
Optional[Enum['yes', 'no']] $determine_build_failure_reason = undef,
Optional[String[1]] $makeworldargs = undef,
Optional[String[1]] $package_fetch_branch = undef,
Optional[String[1]] $package_fetch_url = undef,
Optional[Array[String[1]]] $package_fetch_blacklist = undef,
Optional[Array[String[1]]] $package_fetch_whitelist = undef,
Hash $environments = {},
Hash $portstrees = {},
String[1] $xbuild_package = 'qemu-user-static',
) {
if $mfssize { deprecation('mfssize', 'This parameter is deprecated and has no effect.') }

Exec {
path => '/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin',
}
Expand Down
Loading

0 comments on commit cf3b9a3

Please sign in to comment.