You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.7 KiB

#!/bin/sh
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../rsbac/pkg_linux_pre.conf
# Copyright (C) 2006 The OpenSDE Project
# Copyright (C) 2004 - 2006 The T2 SDE Project
# Copyright (C) 1998 - 2003 Clifford Wolf
#
# More information can be found in the files COPYING and README.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
pkg_rsbac_tempdir=`mktemp -d`
pkg_rsbac_archdir=$base/download/mirror/r
pkg_rsbac_confdir=$base/package/*/rsbac
pkg_rsbac_ver=`sed -n 's,^\[V\] \(.*\),\1,p' ${pkg_rsbac_confdir}/rsbac.desc`
echo_status "Including RSBAC ($pkg_rsbac_ver) patch..."
pkg_rsbac_lxpatch=`match_source_file -p patch-linux-${ver:0:3} rsbac`
bunzip2 -c $pkg_rsbac_lxpatch > \
${pkg_rsbac_tempdir}/rsbac-${pkg_rsbac_ver}.patch
var_append patchfiles ' ' "${pkg_rsbac_tempdir}/rsbac-${pkg_rsbac_ver}.patch"
var_append confscripts ' ' "${pkg_rsbac_confdir}/kernel.conf.sh"
hook_add prepatch 4 "tar -v $taropt `match_source_file -p rsbac-common rsbac`"
hook_add postpatch 6 "rm -rf $pkg_rsbac_tempdir"
# apply hotfixes here
eval `grep '^\[O] pkg_rsbac_lx' package/security/rsbac/rsbac.desc | cut -d' ' -f2-`
if [[ "$ver" == 2.4* ]]; then
pkg_rsbac_lxpatches=$( match_source_file -p "rsbac-bugfix-v$pkg_rsbac_ver-${pkg_rsbac_lx24}" rsbac )
else
pkg_rsbac_lxpatches=$( match_source_file -p "rsbac-bugfix-v$pkg_rsbac_ver-${pkg_rsbac_lx26}" rsbac )
fi
for x in $pkg_rsbac_lxpatches; do
var_append patchfiles ' ' "$x"
done