aboutsummaryrefslogtreecommitdiffstats
path: root/Tools/scripts
diff options
context:
space:
mode:
authorantoine <antoine@FreeBSD.org>2016-07-17 20:26:00 +0800
committerantoine <antoine@FreeBSD.org>2016-07-17 20:26:00 +0800
commit0b1edf3d99d0b229d7ad05ff13329b310ebfc61f (patch)
tree61ab41bd12e5a011c1af94533b3340252ce6375e /Tools/scripts
parentdd1c4d317ae8323ddcc1dd793cefb99319963146 (diff)
downloadfreebsd-ports-gnome-0b1edf3d99d0b229d7ad05ff13329b310ebfc61f.tar.gz
freebsd-ports-gnome-0b1edf3d99d0b229d7ad05ff13329b310ebfc61f.tar.zst
freebsd-ports-gnome-0b1edf3d99d0b229d7ad05ff13329b310ebfc61f.zip
MFportsindexbuild:
- build INDEX-12 - remove no longer used scp/ssh
Diffstat (limited to 'Tools/scripts')
-rwxr-xr-xTools/scripts/tindex31
1 files changed, 10 insertions, 21 deletions
diff --git a/Tools/scripts/tindex b/Tools/scripts/tindex
index 671c7666c889..d8509f55333b 100755
--- a/Tools/scripts/tindex
+++ b/Tools/scripts/tindex
@@ -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() {
@@ -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
@@ -138,8 +124,11 @@ 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:";
@@ -147,11 +136,13 @@ if grep -q ^C svn.log ; then
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
@@ -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