Skip to content

Commit

Permalink
Framework: sync with upstream
Browse files Browse the repository at this point in the history
Taken from: FreeBSD
  • Loading branch information
fichtner committed Jul 18, 2016
1 parent 7661c54 commit 5931ccd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 21 deletions.
1 change: 1 addition & 0 deletions MOVED
Original file line number Diff line number Diff line change
Expand Up @@ -8611,3 +8611,4 @@ devel/gmake-lite|devel/gmake|2016-07-08|No longer needed
devel/capstone|devel/capstone3|2016-07-10|Moved to a numbered port name to make place for capstone4
net-mgmt/unifi3|net-mgmt/unifi4|2016-07-10|Has expired: Unifi 3.x is EoL. Please upgrade to net-mgmt/unifi4
net/lam||2016-07-12|Has expired: Broken for more than 6 months
java/wildfly82||2016-07-17|Has expired: Fully EOL when version 10.0 was released
31 changes: 10 additions & 21 deletions Tools/scripts/tindex
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,20 @@ REPORT_ADDRESS=root@localhost
# Address for script errors
ERROR_ADDRESS=root@localhost

# Where to scp the resulting indexes after build
SCP_DEST_HOST=root@localhost
SCP_DEST_TMP=/usr/local/www/ports/tmp
SCP_DEST_DIR=/usr/local/www/ports/

# Location of ports tree and source trees
export BASEDIR=/a/tindex
export PORTSDIR=${BASEDIR}/ports
export SRCDIR9=${BASEDIR}/src.9
export SRCDIR10=${BASEDIR}/src.10
export SRCDIR11=${BASEDIR}/src.11
export SRCDIR12=${BASEDIR}/src.12
export OUTDIR=${BASEDIR}/out

# Target architecture if not set in the environment
if [ "${ARCH}" = "" ]; then
export ARCH=i386
fi

# SSH key to use for copying INDEXes to www host (if non-default)
export SSHKEY="-i /home/kris/.ssh/id_dsa-index"

# --------------------------------------------------------

blame() {
Expand Down Expand Up @@ -110,14 +104,6 @@ checkfixed() {
fi
}

createtmpdir() {
TMPDIR=`ssh ${SCP_DEST_HOST} "mktemp -qd ${SCP_DEST_TMP}/tindex.XXXXXX"`
if [ $? -ne 0 ]; then
echo "$0: Can't create temp file, exiting..."
exit 1
fi
}

# Sanitize the environment so that the indexes aren't customized by the
# local machine settinge
export __MAKE_CONF=/dev/null
Expand All @@ -138,20 +124,25 @@ OSVERSION10=$(awk '/^#define[[:blank:]]__FreeBSD_version/ {print $3}' < ${SRCDIR
${SVN} -q up ${SRCDIR11}/sys/sys
OSVERSION11=$(awk '/^#define[[:blank:]]__FreeBSD_version/ {print $3}' < ${SRCDIR11}/sys/sys/param.h)

${SVN} -q up ${SRCDIR12}/sys/sys
OSVERSION12=$(awk '/^#define[[:blank:]]__FreeBSD_version/ {print $3}' < ${SRCDIR12}/sys/sys/param.h)

cd ${PORTSDIR}
rm -f INDEX-9 INDEX-9.bz2 INDEX-10 INDEX-10.bz2 INDEX-11 INDEX-11.bz2
rm -f INDEX-9 INDEX-9.bz2 INDEX-10 INDEX-10.bz2 INDEX-11 INDEX-11.bz2 INDEX-12 INDEX-12.bz2
(${SVN} up 2>1 ) > svn.log
if grep -q ^C svn.log ; then
(echo "svn update failed with conflicts:";
grep ^C svn.log) | mail -s "Ports svn up failed" ${ERROR_ADDRESS}
exit 1
fi

for branch in 9.x 10.x 11.x; do
for branch in 9.x 10.x 11.x 12.x; do
release=$(echo $branch | sed -e 's,.x,,')

eval _osver=\$OSVERSION${release}
eval _uname_r="$(( ${_osver} / 100000 )).0-RELEASE"
export OSVERSION=${_osver}
export UNAME_r=${_uname_r}

if [ "${release}" = "9" ]; then
MAKE_CMD=fmake
Expand All @@ -166,10 +157,8 @@ for branch in 9.x 10.x 11.x; do
fi
checkfixed ${branch}
createtmpdir
bzip2 -kf ${PORTSDIR}/INDEX-${release}
scp -q ${SSHKEY} ${PORTSDIR}/INDEX-${release} ${PORTSDIR}/INDEX-${release}.bz2 ${SCP_DEST_HOST}:${TMPDIR} || mail -s "Cannot copy INDEX-${release} to temp dir" ${ERROR_ADDRESS}
ssh ${SCP_DEST_HOST} "/bin/mv ${TMPDIR}/INDEX-${release} ${SCP_DEST_DIR}; /bin/mv ${TMPDIR}/INDEX-${release}.bz2 ${SCP_DEST_DIR}; rmdir ${TMPDIR}" || mail -s "Cannot move INDEX-${release} to final dir" ${ERROR_ADDRESS}
mv ${PORTSDIR}/INDEX-${release} ${PORTSDIR}/INDEX-${release}.bz2 ${OUTDIR}
done
# All indexes built successfully, clear the hook
Expand Down

0 comments on commit 5931ccd

Please sign in to comment.