]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
scripts/quilt-mail: clean up a bit, needs a lot more work
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Aug 2019 12:30:49 +0000 (05:30 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Aug 2019 12:30:49 +0000 (05:30 -0700)
scripts/quilt-mail

index 981c9dc917b3f9f0573e89a941ae103de6f2cc56..3c9a8e95679d516c445f42158ef0d9279ccbdccf 100755 (executable)
@@ -1,18 +1,26 @@
 #!/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`
@@ -113,8 +121,6 @@ cat ${TMP_DIR}/diffstat
 
 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"
 
@@ -131,12 +137,6 @@ rm ${TMPFILE} ${TMP_LOG}
 
 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'
@@ -155,7 +155,6 @@ sed -i -e "s/Cc: stable@vger\.kernel\.org/Cc: torvalds@linux-foundation\.org, ak
 
 # 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
@@ -164,7 +163,6 @@ 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