]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
first cut at a script to automate the quilt mail generation
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Feb 2012 17:54:34 +0000 (09:54 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Feb 2012 17:54:34 +0000 (09:54 -0800)
scripts/quilt-mail [new file with mode: 0755]

diff --git a/scripts/quilt-mail b/scripts/quilt-mail
new file mode 100755 (executable)
index 0000000..e95e629
--- /dev/null
@@ -0,0 +1,55 @@
+#!/bin/bash
+
+MBOX=$1
+FULL_VERSION=`ketchup -m`
+BASE_VERSION=${FULL_VERSION/-rc?/}
+DATE=`date -u --date="2 days"`
+
+if [ ${FULL_VERSION} == ${BASE_VERSION} ] ; then
+       echo "Makefile says the version is ${FULL_VERSION}, did you forget to set the -rc version?"
+       exit
+fi
+
+echo "creating the mailbox for kernel release ${FULL_VERSION}"
+
+TMPFILE=`mktemp stable_header.XXXXXX` || exit 1
+NUM_PATCHES=`quilt series | wc -l`
+
+(
+echo "This is the start of the stable review cycle for the ${BASE_VERSION} release."
+echo "There are ${NUM_PATCHES} patches in this series, all will be posted as a response"
+echo "to this one.  If anyone has any issues with these being applied, please"
+echo "let us know.  If anyone is a maintainer of the proper subsystem, and"
+echo "wants to add a Signed-off-by: line to the patch, please respond with it."
+echo ""
+echo "Responses should be made by ${DATE}."
+echo "Anything received after that time might be too late."
+echo ""
+echo "The whole patch series can be found in one patch at:"
+echo " kernel.org/pub/linux/kernel/v3.0/stable-review/patch-${FULL_VERSION}.gz"
+echo "and the diffstat can be found below."
+echo ""
+echo "thanks,"
+echo ""
+echo "greg k-h"
+echo ""
+echo "-------------"
+cat diffstat
+) > ${TMPFILE}
+
+FROM="Greg KH <gregkh@linuxfoundation.org>"
+TO="linux-kernel@vger.kernel.org, stable@vger.kernel.org"
+CC="torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk"
+SUBJECT="${BASE_VERSION}-stable review"
+
+quilt mail --mbox ${MBOX}      \
+       -m "$(cat ${TMPFILE})"  \
+       --sender "${FROM}"      \
+       --from "${FROM}"        \
+       --to "${TO}"            \
+       --cc "${CC}"            \
+       --prefix ""             \
+       --subject "${SUBJECT}"
+
+#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"
+