1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/grsecurity/pkg_linux_pre.conf
3 # Copyright (C) 2004 - 2021 The T2 SDE Project
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; version 2 of the License. A copy of the
11 # GNU General Public License can be found in the file COPYING.
12 # --- T2-COPYRIGHT-NOTE-END ---
14 pkg_grsec_confdir=$base/package/*/grsecurity
15 pkg_grsec_ver=`sed -n 's,^\[V\] \(.*\),\1,p' ${pkg_grsec_confdir}/grsecurity.desc`
16 pkg_grsec_lxpatch=`match_source_file -p grsecurity-${pkg_grsec_ver}-${ver:0:3} grsecurity`
18 # creating temporary directory for preparing the patch
19 pkg_grsec_tempdir=`mktemp -d`
21 # filtering out EXTRAVERSION stuff and save the patch
22 bzcat $pkg_grsec_lxpatch | sed -e 's,\(EXTRAVERSION =\).*,\1,' > \
23 $pkg_grsec_tempdir/grsecurity-$pkg_grsec_ver-$ver.patch
25 # manualy adjusting EXTRAVERSION
26 lx_extraversion="${lx_extraversion}-grsec"
28 echo_status "Including grsecurity (grsecurity-$pkg_grsec_ver-$ver) patch"
29 var_append patchfiles ' ' "$pkg_grsec_tempdir/grsecurity-$pkg_grsec_ver-$ver.patch"
30 var_append confscripts ' ' "$pkg_grsec_confdir/kernel.conf.sh"