* updated knights (21.12.1 -> 21.12.2), untested
[t2-trunk.git] / package / security / rsbac / pkg_linux_pre.conf
blobfcf40498651cf0697480b2b07a395bd37d0caeb8
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/rsbac/pkg_linux_pre.conf
3 # Copyright (C) 2004 - 2021 The T2 SDE Project
4 # Copyright (C) 1998 - 2003 ROCK Linux Project
5
6 # This Copyright note is generated by scripts/Create-CopyPatch,
7 # more information can be found in the files COPYING and README.
8
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; version 2 of the License. A copy of the
12 # GNU General Public License can be found in the file COPYING.
13 # --- T2-COPYRIGHT-NOTE-END ---
15 echo_status "Including RSBAC patch"
16 pkg_rsbac_tempdir=`mktemp -d`
17 pkg_rsbac_archdir=$base/download/mirror/r
18 pkg_rsbac_confdir=$base/package/*/rsbac
19 pkg_rsbac_ver=`sed -n 's,^\[V\] \(.*\),\1,p' ${pkg_rsbac_confdir}/rsbac.desc`
21 pkg_rsbac_lxpatch=`match_source_file -p patch-linux-${ver:0:3} rsbac`
22 $compressor -d < $pkg_rsbac_lxpatch > \
23         ${pkg_rsbac_tempdir}/rsbac-${pkg_rsbac_ver}.patch
25 var_append patchfiles ' ' "${pkg_rsbac_tempdir}/rsbac-${pkg_rsbac_ver}.patch"
26 var_append confscripts  ' ' "${pkg_rsbac_confdir}/kernel.conf.sh"
28 hook_add prepatch  4 "tar -v $taropt `match_source_file -p rsbac-common-v${pkg_rsbac_ver} rsbac`"
29 hook_add postpatch 6 "rm -rf $pkg_rsbac_tempdir"
31 # apply hotfixes here
32 eval `grep '^\[O] pkg_rsbac_lx' package/security/rsbac/rsbac.desc | cut -d' ' -f2-`
33 if [[ "$ver" == 2.4* ]]; then
34         pkg_rsbac_lxpatches=$( match_source_file -p "rsbac-bugfix-v$pkg_rsbac_ver-${pkg_rsbac_lx24}" rsbac )
35 else
36         pkg_rsbac_lxpatches=$( match_source_file -p "rsbac-bugfix-v$pkg_rsbac_ver-${pkg_rsbac_lx26}" rsbac )
38 for x in $pkg_rsbac_lxpatches; do
39         var_append patchfiles ' ' "$x"
40 done