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>."
139 echo "Possible dependencies:"
141 echo "$(curl -s https://git.kernel.org/pub/scm/linux/kernel/git/sashal/deps.git/plain/v$STABLE_VERSION/$git_id)"
147 echo "------------------ original commit in Linus's tree ------------------"
152 # echo -n "Patches currently in gregkh-2.6 which might be from "
153 # echo "$FIRST_AUTHOR are"
155 # grep -lR $FIRST_AUTHOR /home/gregkh/linux/patches/ 2> /dev/null |
156 # sed -e 's/\/home\/gregkh\/linux\/patches\///'
158 makemail
-to "$AUTHOR" \
161 -subject="FAILED: patch \"$SUBJECT\" failed to apply to $STABLE_VERSION-stable tree" \
165 ~
/bin
/msmtp-enqueue.sh
$to
171 if [ "${git_id}" == "" ] ; then
172 echo "bad_stable GIT_ID KERNEL_VERSION"
173 echo "Must provide git id to be told is bad"
177 echo "git_id = ${git_id}"
179 if [ "$#" == "0" ] ; then
180 versions
=$
(/home
/gregkh
/linux
/stable
/active_kernel_versions_get.sh
)
184 echo "versions=${versions}"
186 for STABLE_VERSION
in ${versions}
188 echo "bad version = ${STABLE_VERSION}"
189 TMPFILE
=`mktemp bad_patch.XXXXX` ||
exit 1
190 git show
--pretty=email
$git_id > $TMPFILE
195 #for patch_file in $*
198 # echo "acknowledged $patch_file"
199 # echo "-----------------------------------------------"