File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -219,6 +219,7 @@ function exec_nspawn(){
219219 --register=no \
220220 ${EPHEMERAL: +--ephemeral} \
221221 ${ISSYSTEMD242: +--pipe} \
222+ ${MAX_MEMORY: +--property=" MemoryMax=${MAX_MEMORY} " } \
222223 -E " PATH=/usr/local/sbin:/usr/local/bin:/usr/bin" \
223224 -D " $BUILDDIRECTORY /$container " " ${@: 2} "
224225 if (( EPHEMERAL)) ; then
@@ -582,6 +583,7 @@ General Options:
582583 -d Run diffoscope if packages are not reproducible
583584 -f Use the local PKGBUILD for building
584585 -n Run makepkg with --nocheck
586+ -M <value> Set an upper limit for RAM use on the build container (e.g. 12G)
585587 -V Print version information
586588 -o <path> Set the output directory (default: ./build)
587589__END__
@@ -592,13 +594,14 @@ function print_version() {
592594}
593595
594596function parse_args() {
595- while getopts :hdnfVo : arg; do
597+ while getopts :hdnfM:Vo : arg; do
596598 case $arg in
597599 h) print_help; exit 0;;
598600 V) print_version; exit 0;;
599601 f) pkgbuild_file=1;;
600602 d) run_diffoscope=1;;
601603 n) NOCHECK=1;;
604+ M) MAX_MEMORY=" $OPTARG " ;;
602605 o) OUTDIR=" $OPTARG " ;;
603606 * ) error " unknown argument ${OPTARG} " ; print_help; exit 1;;
604607 esac
You can’t perform that action at this time.
0 commit comments