```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
for p in ${template%/template}/patches/*; do
sed -i '
\,^[+-][+-][+-] /dev/null,b
/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
s,^[*][*][*] ,&a/,
/^--- /{
s,\(^--- \)\(./\)*,\1a/,
s,[.-][Oo][Rr][Ii][Gg]\([ /]\),\1,
s/[.-][Oo][Rr][Ii][Gg]$//
s/[.]patched[.]\([^.]\)/.\1/
h
}
/^+++ -/{
g
s/^--- a/+++ b/
b
}
s,\(^+++ \)\(./\)*,\1b/,
' "$p"
done
sed -i '/^patch_args=/d' $template
done
```
22 lines
544 B
Diff
22 lines
544 B
Diff
From: Kees Cook <kees@debian.org>
|
|
Subject: put stack markings in i386 assembly to avoid executable stack
|
|
Bug-Debian: http://bugs.debian.org/528280
|
|
X-Debian-version: 3.0-2
|
|
|
|
--- a/crc_i386.S
|
|
+++ b/crc_i386.S
|
|
@@ -302,3 +302,5 @@
|
|
#endif /* i386 || _i386 || _I386 || __i386 */
|
|
|
|
#endif /* !USE_ZLIB && !CRC_TABLE_ONLY */
|
|
+.section .note.GNU-stack, "", @progbits
|
|
+.previous
|
|
--- a/match.S
|
|
+++ b/match.S
|
|
@@ -405,3 +405,5 @@
|
|
#endif /* i386 || _I386 || _i386 || __i386 */
|
|
|
|
#endif /* !USE_ZLIB */
|
|
+.section .note.GNU-stack, "", @progbits
|
|
+.previous
|