freebsd / poudriere

Port/Package build and test system
https://github.com/freebsd/poudriere/wiki
BSD 2-Clause "Simplified" License
391 stars 161 forks source link

image: Support building packages from list with -b #489

Open bdrewery opened 7 years ago

bdrewery commented 7 years ago

This should be pretty straight forward, similar to how testport works.

Something like this should do it. Note that you would need to add -p -z and -j flags for PTNAME, SETNAME and JAILNAME.

: ${BUILD_PARALLEL_JOBS:=${PARALLEL_JOBS}}
: ${PREPARE_PARALLEL_JOBS:=$(echo "scale=0; ${PARALLEL_JOBS} * 1.25 / 1" | bc)}
PARALLEL_JOBS=${PREPARE_PARALLEL_JOBS}

MASTERNAME=${JAILNAME}-${PTNAME}${SETNAME:+-${SETNAME}}
_mastermnt MASTERMNT
export MASTERNAME
export MASTERMNT
export POUDRIERE_BUILD_TYPE=bulk

jail_start ${JAILNAME} ${PTNAME} ${SETNAME}

LISTPORTS=$(cat ${PACKAGELIST})
prepare_ports
markfs prepkg ${MASTERMNT}
POUDRIERE_BUILD_TYPE=bulk parallel_build ${JAILNAME} ${PTNAME} ${SETNAME}
[ ${BUILD_REPO} -eq 1 -a ${nbbuilt} -gt 0 ] && build_repo
commit_packages
bdrewery commented 7 years ago

@evadot @bapt

bdrewery commented 7 years ago

was_a_bulk run in common.sh needs to be updated to look for image.sh as well.

grahamperrin commented 3 years ago

… with -b

https://github.com/freebsd/poudriere/blob/1257b1d492ca1db88f7f61d51e1bfa03a2cd9e0a/src/man/poudriere-bulk.8#L145

https://github.com/freebsd/poudriere/blob/1257b1d492ca1db88f7f61d51e1bfa03a2cd9e0a/src/man/poudriere-testport.8#L72