diff --git a/package/mnemoc/rsbac/pkg_linux24-header_pre.conf b/package/mnemoc/rsbac/pkg_linux24-header_pre.conf deleted file mode 100644 index 53c9b0484..000000000 --- a/package/mnemoc/rsbac/pkg_linux24-header_pre.conf +++ /dev/null @@ -1,27 +0,0 @@ -# --- 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/rsbac/pkg_linux24-header_pre.conf -# ROCK Linux is Copyright (C) 1998 - 2005 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 --- - -. $base/package/mnemoc/rsbac/pkg_linux24_pre.conf - -# copy include/rsbac to /usr/include/linux too -hook_add postdoc 1 'cp -rv include/rsbac $includedir/' - diff --git a/package/mnemoc/rsbac/pkg_linux24-src_pre.conf b/package/mnemoc/rsbac/pkg_linux24-src_pre.conf deleted file mode 100644 index 734a30d65..000000000 --- a/package/mnemoc/rsbac/pkg_linux24-src_pre.conf +++ /dev/null @@ -1,22 +0,0 @@ -# --- 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/rsbac/pkg_linux24-src_pre.conf -# ROCK Linux is Copyright (C) 1998 - 2005 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 --- -. $base/package/mnemoc/rsbac/pkg_linux24_pre.conf diff --git a/package/mnemoc/rsbac/pkg_linux24_pre.conf b/package/mnemoc/rsbac/pkg_linux24_pre.conf deleted file mode 100644 index 99f8d54f0..000000000 --- a/package/mnemoc/rsbac/pkg_linux24_pre.conf +++ /dev/null @@ -1,46 +0,0 @@ -# --- 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/rsbac/pkg_linux24_pre.conf -# ROCK Linux is Copyright (C) 1998 - 2005 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 RSBAC patch..." -pkg_rsbac_tempdir=`mktemp -d` -pkg_rsbac_archdir=$base/download/mirror/r -pkg_rsbac_confdir=$base/package/mnemoc/rsbac -pkg_rsbac_ver=`sed -n 's,^\[V\] \(.*\),\1,p' ${pkg_rsbac_confdir}/rsbac.desc` - -# ignore kernel version of the patch, it can be appliable to another. -pkg_rsbac_lxpatch=$( grep "^\[D\]" ${pkg_rsbac_confdir}/rsbac.desc | \ - sed -n "s,.* \(patch-.*-v${pkg_rsbac_ver}.gz\) .*,\1,p" ) - -bunzip2 -c ${pkg_rsbac_archdir}/${pkg_rsbac_lxpatch%.gz}.bz2 > \ - ${pkg_rsbac_tempdir}/rsbac-${pkg_rsbac_ver}.patch - -var_append patchfiles ' ' "${pkg_rsbac_tempdir}/rsbac-${pkg_rsbac_ver}.patch" -var_append patchfiles ' ' "${pkg_rsbac_confdir}/rsbac-no_extraversion.diff" -var_append conffiles ' ' "${pkg_rsbac_confdir}/kernel.conf.sh" - -hook_add prepatch 4 "tar -v $taropt ${pkg_rsbac_archdir}/rsbac-v${pkg_rsbac_ver}.tar.bz2" -hook_add postpatch 6 "rm -rf $pkg_rsbac_tempdir" - -# apply hotfixes here -for i in $pkg_rsbac_lxpatches; do - var_append patchfiles ' ' "${pkg_rsbac_archdir}/rsbac-bugfix-v$pkg_rsbac_ver-$i.diff" -done diff --git a/package/mnemoc/rsbac/pkg_linux_pre.conf b/package/mnemoc/rsbac/pkg_linux_pre.conf new file mode 100644 index 000000000..8c2eebf2c --- /dev/null +++ b/package/mnemoc/rsbac/pkg_linux_pre.conf @@ -0,0 +1,53 @@ +# --- 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/rsbac/pkg_linux24_pre.conf +# ROCK Linux is Copyright (C) 1998 - 2005 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 --- + +if [ "${xpkg:0:7}" == "linux24" ] ; then + echo_status "Including RSBAC patch..." + pkg_rsbac_tempdir=`mktemp -d` + pkg_rsbac_archdir=$base/download/mirror/r + pkg_rsbac_confdir=$base/package/mnemoc/rsbac + pkg_rsbac_ver=`sed -n 's,^\[V\] \(.*\),\1,p' ${pkg_rsbac_confdir}/rsbac.desc` + + # ignore kernel version of the patch, it can be appliable to another. + pkg_rsbac_lxpatch=$( grep "^\[D\]" ${pkg_rsbac_confdir}/rsbac.desc | \ + sed -n "s,.* \(patch-.*-v${pkg_rsbac_ver}.gz\) .*,\1,p" ) + + bunzip2 -c ${pkg_rsbac_archdir}/${pkg_rsbac_lxpatch%.gz}.bz2 > \ + ${pkg_rsbac_tempdir}/rsbac-${pkg_rsbac_ver}.patch + + var_append patchfiles ' ' "${pkg_rsbac_tempdir}/rsbac-${pkg_rsbac_ver}.patch" + var_append patchfiles ' ' "${pkg_rsbac_confdir}/rsbac-no_extraversion.diff" + var_append conffiles ' ' "${pkg_rsbac_confdir}/kernel.conf.sh" + + hook_add prepatch 4 "tar -v $taropt ${pkg_rsbac_archdir}/rsbac-v${pkg_rsbac_ver}.tar.bz2" + hook_add postpatch 6 "rm -rf $pkg_rsbac_tempdir" + + # apply hotfixes here + for i in $pkg_rsbac_lxpatches; do + var_append patchfiles ' ' "${pkg_rsbac_archdir}/rsbac-bugfix-v$pkg_rsbac_ver-$i.diff" + done + + # copy include/rsbac to /usr/include/linux too + if [[ $xpkg = *header* ]] ; then + hook_add postdoc 1 'cp -rv include/rsbac $includedir/' + fi +fi diff --git a/package/mnemoc/vserver/pkg_linux24-header_pre.conf b/package/mnemoc/vserver/pkg_linux24-header_pre.conf deleted file mode 100644 index 9f4bb0062..000000000 --- a/package/mnemoc/vserver/pkg_linux24-header_pre.conf +++ /dev/null @@ -1,23 +0,0 @@ -# --- 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-header_pre.conf -# ROCK Linux is Copyright (C) 1998 - 2005 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 --- - -. $base/package/mnemoc/vserver/pkg_linux24_pre.conf diff --git a/package/mnemoc/vserver/pkg_linux24-src_pre.conf b/package/mnemoc/vserver/pkg_linux24-src_pre.conf deleted file mode 100644 index f4f77f2fa..000000000 --- a/package/mnemoc/vserver/pkg_linux24-src_pre.conf +++ /dev/null @@ -1,23 +0,0 @@ -# --- 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-src_pre.conf -# ROCK Linux is Copyright (C) 1998 - 2005 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 --- - -. $base/package/mnemoc/vserver/pkg_linux24_pre.conf diff --git a/package/mnemoc/vserver/pkg_linux24_pre.conf b/package/mnemoc/vserver/pkg_linux24_pre.conf deleted file mode 100644 index 8e04ebb44..000000000 --- a/package/mnemoc/vserver/pkg_linux24_pre.conf +++ /dev/null @@ -1,56 +0,0 @@ -# --- 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 - 2005 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 --- - -pkg_vserver_confdir=$base/package/mnemoc/vserver -pkg_vserver_archdir=$base/download/mirror/v - -# tempdir -pkg_ctx_tempdir=`mktemp -d` -hook_add postpatch 6 "rm -rf $pkg_ctx_tempdir" - -# prepare vserver patch -pkg_ctx_patch=$( grep "^\[D\] .* patch[^ ]*-vs[0-9\.]*.diff.bz2" ${pkg_vserver_confdir}/vserver.desc | \ - cut -d' ' -f3 ) -pkg_ctx_ver=$( echo $pkg_ctx_patch | sed -n -e 's,.*-vs\(.*\).diff.bz2,\1,p' ) - -bzip2 -d -c $pkg_vserver_archdir/$pkg_ctx_patch \ - > $pkg_ctx_tempdir/vserver-$pkg_ctx_ver.patch -patch $patchopt $pkg_ctx_tempdir/vserver-$pkg_ctx_ver.patch \ - ${pkg_vserver_confdir}/no_extraversion.diff > /dev/null - -echo_status "Including Security Contexts (vserver-$pkg_ctx_ver) patch..." -var_append patchfiles ' ' $pkg_ctx_tempdir/vserver-$pkg_ctx_ver.patch - -if [ "$ROCKCFG_PKG_VSERVER_QUOTA" = "1" ]; then - # prepare vquota patch - pkg_vquota_patch=$( grep "^\[D\] .* patch[^ ]*-q.*.diff.bz2" ${pkg_vserver_confdir}/vserver.desc | \ - cut -d' ' -f3 ) - pkg_vquota_ver=$( echo $pkg_vquota_patch | sed -n -e 's,.*-q\(.*\).diff.bz2,\1,p' ) - - bzip2 -d -c $pkg_vserver_archdir/$pkg_vquota_patch \ - > $pkg_ctx_tempdir/vquota-$pkg_vquota_ver.patch - - echo_status "Including Per Context Quota/Disk Limits support (vquota-$pkg_vquota_ver) patch..." - var_append patchfiles ' ' $pkg_ctx_tempdir/vquota-$pkg_vquota_ver.patch - var_append conffiles ' ' $pkg_ctx_confdir/kernel-vquota.conf.sh -fi - diff --git a/package/mnemoc/vserver/pkg_linux_pre.conf b/package/mnemoc/vserver/pkg_linux_pre.conf new file mode 100644 index 000000000..bab8b772f --- /dev/null +++ b/package/mnemoc/vserver/pkg_linux_pre.conf @@ -0,0 +1,57 @@ +# --- 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 - 2005 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 --- + +if [ "${xpkg:0:7}" == "linux24" ] ; then + pkg_vserver_confdir=$base/package/mnemoc/vserver + pkg_vserver_archdir=$base/download/mirror/v + + # tempdir + pkg_ctx_tempdir=`mktemp -d` + hook_add postpatch 6 "rm -rf $pkg_ctx_tempdir" + + # prepare vserver patch + pkg_ctx_patch=$( grep "^\[D\] .* patch[^ ]*-vs[0-9\.]*.diff.bz2" ${pkg_vserver_confdir}/vserver.desc | \ + cut -d' ' -f3 ) + pkg_ctx_ver=$( echo $pkg_ctx_patch | sed -n -e 's,.*-vs\(.*\).diff.bz2,\1,p' ) + + bzip2 -d -c $pkg_vserver_archdir/$pkg_ctx_patch \ + > $pkg_ctx_tempdir/vserver-$pkg_ctx_ver.patch + patch $patchopt $pkg_ctx_tempdir/vserver-$pkg_ctx_ver.patch \ + ${pkg_vserver_confdir}/no_extraversion.diff > /dev/null + + echo_status "Including Security Contexts (vserver-$pkg_ctx_ver) patch..." + var_append patchfiles ' ' $pkg_ctx_tempdir/vserver-$pkg_ctx_ver.patch + + if [ "$ROCKCFG_PKG_VSERVER_QUOTA" = "1" ]; then + # prepare vquota patch + pkg_vquota_patch=$( grep "^\[D\] .* patch[^ ]*-q.*.diff.bz2" ${pkg_vserver_confdir}/vserver.desc | \ + cut -d' ' -f3 ) + pkg_vquota_ver=$( echo $pkg_vquota_patch | sed -n -e 's,.*-q\(.*\).diff.bz2,\1,p' ) + + bzip2 -d -c $pkg_vserver_archdir/$pkg_vquota_patch \ + > $pkg_ctx_tempdir/vquota-$pkg_vquota_ver.patch + + echo_status "Including Per Context Quota/Disk Limits support (vquota-$pkg_vquota_ver) patch..." + var_append patchfiles ' ' $pkg_ctx_tempdir/vquota-$pkg_vquota_ver.patch + var_append conffiles ' ' $pkg_ctx_confdir/kernel-vquota.conf.sh + fi +fi