Changeset View
Changeset View
Standalone View
Standalone View
Tools/scripts/tindex
| Show All 21 Lines | |||||
| REPORT_ADDRESS=root@localhost | REPORT_ADDRESS=root@localhost | ||||
| # Address for script errors | # Address for script errors | ||||
| ERROR_ADDRESS=root@localhost | ERROR_ADDRESS=root@localhost | ||||
| # Location of ports tree and source trees | # Location of ports tree and source trees | ||||
| export BASEDIR=/a/tindex | export BASEDIR=/a/tindex | ||||
| export PORTSDIR=${BASEDIR}/ports | export PORTSDIR=${BASEDIR}/ports | ||||
| export SRCDIR12=${BASEDIR}/src.12 | |||||
| export SRCDIR13=${BASEDIR}/src.13 | |||||
| export SRCDIR14=${BASEDIR}/src.14 | export SRCDIR14=${BASEDIR}/src.14 | ||||
| export OUTDIR=${BASEDIR}/out | export OUTDIR=${BASEDIR}/out | ||||
| # Target architecture if not set in the environment | # Target architecture if not set in the environment | ||||
| if [ "${ARCH}" = "" ]; then | if [ "${ARCH}" = "" ]; then | ||||
| export ARCH=i386 | export ARCH=i386 | ||||
| export MACHINE_ARCH=i386 | export MACHINE_ARCH=i386 | ||||
| fi | fi | ||||
| Show All 39 Lines | indexfail() { | ||||
| blame $i >> ${PORTSDIR}/hook | blame $i >> ${PORTSDIR}/hook | ||||
| done | done | ||||
| sort -u ${PORTSDIR}/hook > ${PORTSDIR}/hook.new | sort -u ${PORTSDIR}/hook > ${PORTSDIR}/hook.new | ||||
| mv ${PORTSDIR}/hook.new ${PORTSDIR}/hook | mv ${PORTSDIR}/hook.new ${PORTSDIR}/hook | ||||
| echo | echo | ||||
| echo "Committers on the hook:" | echo "Committers on the hook:" | ||||
| tr -s '\n' ' ' < ${PORTSDIR}/hook | tr -s '\n' ' ' < ${PORTSDIR}/hook | ||||
| echo | echo | ||||
| echo | echo | ||||
| echo "Most recent Git update was:"; | echo "Most recent Git update was:"; | ||||
| (IFS=""; echo ${commits}) | (IFS=""; echo ${commits}) | ||||
| ) | mail -s "INDEX build failed for ${BRANCH}" ${REPORT_ADDRESS} | ) | mail -s "INDEX build failed for ${BRANCH}" ${REPORT_ADDRESS} | ||||
| exit 1 | exit 1 | ||||
| } | } | ||||
| checkfixed() { | checkfixed() { | ||||
| BRANCH=$1 | BRANCH=$1 | ||||
| Show All 12 Lines | |||||
| export PORT_DBDIR=/nonexistent | export PORT_DBDIR=/nonexistent | ||||
| export PKG_DBDIR=/nonexistent | export PKG_DBDIR=/nonexistent | ||||
| export LOCALBASE=/nonexistent | export LOCALBASE=/nonexistent | ||||
| export INDEX_PRISTINE=1 | export INDEX_PRISTINE=1 | ||||
| export INDEX_JOBS=3 | export INDEX_JOBS=3 | ||||
| export INDEX_QUIET=1 | export INDEX_QUIET=1 | ||||
| # First update the source trees to get current OSVERSION | # First update the source trees to get current OSVERSION | ||||
| ${SVN} -q up ${SRCDIR12}/sys/sys | |||||
| OSVERSION12=$(awk '/^#define[[:blank:]]__FreeBSD_version/ {print $3}' < ${SRCDIR12}/sys/sys/param.h) | |||||
| ${GIT} -C ${SRCDIR13} pull --rebase -q | |||||
| OSVERSION13=$(awk '/^#define[[:blank:]]__FreeBSD_version/ {print $3}' < ${SRCDIR13}/sys/sys/param.h) | |||||
| ${GIT} -C ${SRCDIR14} pull --rebase -q | ${GIT} -C ${SRCDIR14} pull --rebase -q | ||||
| OSVERSION14=$(awk '/^#define[[:blank:]]__FreeBSD_version/ {print $3}' < ${SRCDIR14}/sys/sys/param.h) | OSVERSION14=$(awk '/^#define[[:blank:]]__FreeBSD_version/ {print $3}' < ${SRCDIR14}/sys/sys/param.h) | ||||
| cd ${PORTSDIR} | cd ${PORTSDIR} | ||||
| for ver in 12 13 14; do | for ver in 14; do | ||||
| rm -f INDEX-${ver} INDEX-${ver}.bz2 INDEX-${ver}.xz INDEX-${ver}.zst | rm -f INDEX-${ver} INDEX-${ver}.bz2 INDEX-${ver}.xz INDEX-${ver}.zst | ||||
| done | done | ||||
| OLD_HEAD=$(${GIT} rev-parse HEAD) | OLD_HEAD=$(${GIT} rev-parse HEAD) | ||||
| if ! ${GIT} pull --ff-only > git.log 2>&1 ; then | if ! ${GIT} pull --ff-only > git.log 2>&1 ; then | ||||
| (echo "Git update failed with conflicts:"; | (echo "Git update failed with conflicts:"; | ||||
| cat git.log) | mail -s "Ports Git update failed" ${ERROR_ADDRESS} | cat git.log) | mail -s "Ports Git update failed" ${ERROR_ADDRESS} | ||||
| exit 1 | exit 1 | ||||
| fi | fi | ||||
| for branch in 12.x 13.x 14.x; do | for branch in 14.x; do | ||||
| release=$(echo $branch | sed -e 's,.x,,') | release=$(echo $branch | sed -e 's,.x,,') | ||||
| eval _osver=\$OSVERSION${release} | eval _osver=\$OSVERSION${release} | ||||
| eval _uname_r="$(( ${_osver} / 100000 )).0-RELEASE" | eval _uname_r="$(( ${_osver} / 100000 )).0-RELEASE" | ||||
| export OSVERSION=${_osver} | export OSVERSION=${_osver} | ||||
| export UNAME_r=${_uname_r} | export UNAME_r=${_uname_r} | ||||
| echo "Building INDEX for ${branch} with OSVERSION=${OSVERSION}" | echo "Building INDEX for ${branch} with OSVERSION=${OSVERSION}" | ||||
| Show All 15 Lines | |||||