#!/bin/bash
+#
+# Script to take a stable-queue, and turn it into a -rc release to be
+# sent off in email.
+#
# locations of some things that you might want to override if you are a
# different developer than gregkh
STABLE_QUEUE="/home/gregkh/linux/stable/stable-queue/"
TMP_DIR="/home/gregkh/linux/tmp/"
-
SCRIPT_NAME=`basename ${0}`
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+
+# programs that we depend on in this script
+REQUIREMENTS="kv splitmbox.py kup mbox2send filterdiff"
+# todo check dependancies using hash or something
+
+
MBOX="$1"
if [ "${MBOX}" == "" ] ; then
- echo "ERROR, you must specify a mailbox name."
- echo "usage:"
- echo " ${SCRIPT_NAME} mailbox_name"
- exit
+ echo "using default 'mbox' name for the mailbox."
+ MBOX="mbox"
fi
FULL_VERSION=`kv`
FROM="Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
TO="linux-kernel@vger.kernel.org"
-#CC="torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk"
-#CC="alan@lxorguk.ukuu.org.uk"
CC="stable@vger.kernel.org"
SUBJECT="${BASE_VERSION}-stable review"
echo "mbox is now in ${TMP_DIR}/${MBOX}"
-#echo "Add:"
-#echo "Cc: torvalds@linux-foundation.org, akpm@linux-foundation.org"
-#echo "to the first email."
-
-#q mail --mbox x -m "$(cat ../stable-queue/00)" --sender gregkh@lf.org --from gregkh@lf.org --to foo@foo --subject "This is the subject"
-
cd ${TMP_DIR}
${STABLE_QUEUE}../mbox2send ${ROOT_VERSION} ${FULL_VERSION} ${MBOX}
#< ${MBOX}.new formail -ds sh -c 'cat > msg.$FILENO'
# Create a script to upload the patch to kernel.org and to send the patches out
echo "#!/bin/bash" > ${TMP_DIR}/send_it_off
-#echo "kup --host=gregkh@geb.kernel.org put patch-${FULL_VERSION} patch-${FULL_VERSION}.asc /pub/linux/kernel/v${VER}/stable-review/patch-${FULL_VERSION}.gz" >> ${TMP_DIR}/send_it_off
echo "kup --host=git@gitolite.kernel.org --subcmd=kup-server put patch-${FULL_VERSION} patch-${FULL_VERSION}.asc /pub/linux/kernel/v${VER}/stable-review/patch-${FULL_VERSION}.gz" >> ${TMP_DIR}/send_it_off
echo "git send-email msg.*" >> ${TMP_DIR}/send_it_off
chmod 755 ${TMP_DIR}/send_it_off
# Push a version of the patches out to the world in a git tree
cd ${TMP_TREE}
git checkout linux-${ROOT_VERSION}.y
-#git merge -q temp_branch^
git merge -q temp_branch
echo "git push --force gitolite@ra.kernel.org:/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-${ROOT_VERSION}.y"
git push --force gitolite@ra.kernel.org:/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-${ROOT_VERSION}.y