]>
git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - scripts/bad_stable
4 EMAIL_ADDRESS
='<gregkh@linuxfoundation.org>'
12 a
=$
(echo "$l" |
sed -n -e 's/.*<\(.*@[^>]*\).*/\1/p')
16 if [ x
"$EMAIL_ADDRESS" = x
]
18 echo "You must set the EMAIL_ADDRESS environment variable to your email address"
25 STABLE
='<stable@vger.kernel.org>'
26 STABLE_COMMITS
='<stable-commits@vger.kernel.org>'
34 echo "$TXT is missing"
40 # skip the Message-ID: line so we don't send email to the wrong place
42 reply
=$
(echo "$l" |
grep -i Message-ID
:)
48 # if this is the start of the diff, then it's time to stop looking
49 diff=$
(echo "$l" |
grep "^--- ")
52 #echo "diffstart!!!!!"
58 a
=$
(echo "$x" |
sed -n -e 's/.*<\(.*@[^>]*\).*/\1/p')
61 if [ x
"$author" == x
]
71 author
=$
(echo "$author" |
tr ' ' '\n' |
grep -v "$first_author" |
73 author
="$first_author $author"
74 eval $1=$
(echo $author |
sed -e 's/ /,/g')
86 # patch_name=$(stripit $1)
87 # PATCH=$P/patches/$patch_name.patch
88 # TXT=$P/txt/$patch_name.txt
91 # echo $TXT is missing
95 # SUBJECT=`grep "Subject:" $PATCH`
96 SUBJECT
=`grep "Subject:" $PATCH | sed s/Subject\:\ //`
97 # SUBJECT=$(head -n 2 $PATCH | tail -n 1)
98 MESSAGE_ID
=`grep -i "^Message-ID:" $PATCH | cut -f 2 -d ' ' | cut -f 2 -d '<' | cut -f 1 -d '>'`
99 author AUTHOR
$1 FIRST_AUTHOR
100 #echo "author said $AUTHOR"
101 #echo "first_author said $FIRST_AUTHOR"
102 if [ x
"$AUTHOR" == "x" ]
104 echo "nobody to notify"
108 for i
in $
(echo "$AUTHOR" |
sed -e 's/,/ /g')
110 if ! echo "$TO" |
grep "$i"
120 CHARSET
=$
(guess-charset
"$PATCH")
121 if test "x$CHARSET" = "ANSI_X3.4-1968"; then
124 CHARCMD
="-charset=$CHARSET"
129 #echo "makemail -to $AUTHOR -from=$FROM -subject=\"patch $PATCH added to gregkh tree\" -date=\"$(date -R)\" -message=$ID $CHARCMD"
130 echo "sending to $AUTHOR"
134 echo "The patch below does not apply to the $STABLE_VERSION-stable tree."
135 echo "If someone wants it applied there, or to any other stable or longterm"
136 echo "tree, then please email the backport, including the original git commit"
137 echo "id to <stable@vger.kernel.org>."
143 echo "------------------ original commit in Linus's tree ------------------"
148 # echo -n "Patches currently in gregkh-2.6 which might be from "
149 # echo "$FIRST_AUTHOR are"
151 # grep -lR $FIRST_AUTHOR /home/gregkh/linux/patches/ 2> /dev/null |
152 # sed -e 's/\/home\/gregkh\/linux\/patches\///'
154 makemail
-to "$AUTHOR" \
157 -subject="FAILED: patch \"$SUBJECT\" failed to apply to $STABLE_VERSION-stable tree" \
161 ~
/bin
/msmtp-enqueue.sh
-a coco
$to
167 if [ "${git_id}" == "" ] ; then
168 echo "bad_stable GIT_ID KERNEL_VERSION"
169 echo "Must provide kernel version to be told is bad"
173 echo "git_id = ${git_id}"
175 for STABLE_VERSION
in $
*
177 echo "bad version = ${STABLE_VERSION}"
178 TMPFILE
=`mktemp bad_patch.XXXXX` ||
exit 1
179 git show
--pretty=email
$git_id > $TMPFILE
184 #for patch_file in $*
187 # echo "acknowledged $patch_file"
188 # echo "-----------------------------------------------"