|
# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
|
|
#
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
|
# Please add additional copyright information _after_ the line containing
|
|
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
|
|
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
|
|
#
|
|
# ROCK Linux: rock-src/package/mnemoc/vserver/pkg_linux24_pre.conf
|
|
# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf
|
|
#
|
|
# 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; either version 2 of the License, or
|
|
# (at your option) any later version. A copy of the GNU General Public
|
|
# License can be found at Documentation/COPYING.
|
|
#
|
|
# Many people helped and are helping developing ROCK Linux. Please
|
|
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM
|
|
# file for details.
|
|
#
|
|
# --- ROCK-COPYRIGHT-NOTE-END ---
|
|
|
|
echo_status "Including Security Contexts (vserver) patch..."
|
|
|
|
pkg_vserver_confdir=$base/package/mnemoc/vserver
|
|
pkg_vserver_archdir=$base/download/mnemoc/vserver
|
|
|
|
pkg_ctx_patch=$( grep "^\[D\]" ${pkg_vserver_confdir}/vserver.desc | \
|
|
sed -n "s,.* \(patch-.*ctx[0-9][0-9].*\.diff\.bz2\) .*,\1,p" )
|
|
pkg_ctx_jacques=$( grep "^\[D\]" ${pkg_vserver_confdir}/vserver.desc | \
|
|
sed -n "s,.* \(jacques-ctx[0-9][0-9].*\.diff\.bz2\) .*,\1,p" )
|
|
|
|
# fetch version from patchfile
|
|
pkg_ctx_ver=${pkg_ctx_patch#*ctx};
|
|
pkg_ctx_ver=${pkg_ctx_ver%.diff.bz2};
|
|
|
|
# get a patched ctx's patch.
|
|
pkg_ctx_tempdir=`mktemp -d`
|
|
bzip2 -d -c $pkg_vserver_archdir/$pkg_ctx_patch \
|
|
> $pkg_ctx_tempdir/ctx-$pkg_ctx_ver.patch
|
|
if [ "$pkg_ctx_jacques" ]; then
|
|
bzip2 -d -c $pkg_vserver_archdir/$pkg_ctx_jacques \
|
|
> $pkg_ctx_tempdir/jacques-update.patch
|
|
patch $patchopt $pkg_ctx_tempdir/ctx-$pkg_ctx_ver.patch \
|
|
$pkg_ctx_tempdir/jacques-update.patch}
|
|
fi
|
|
patch $patchopt $pkg_ctx_tempdir/ctx-$pkg_ctx_ver.patch \
|
|
${pkg_vserver_confdir}/no_extraversion.diff > /dev/null
|
|
|
|
hook_add postpatch 6 "rm -rf $pkg_ctx_tempdir"
|
|
|
|
# it SHALL be before vquota patch
|
|
var_insert_before_regex patchfiles ' ' $pkg_ctx_tempdir/ctx-$pkg_ctx_ver.patch '.*\/ctx-vquota.*'
|