mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-05 04:16:46 +02:00
main/linux-grsec: add linux-virtgrsec-dev subpackage
This commit is contained in:
parent
54553db5c7
commit
98c60e6d55
@ -7,7 +7,7 @@ case $pkgver in
|
||||
*.*.*) _kernver=${pkgver%.*};;
|
||||
*.*) _kernver=${pkgver};;
|
||||
esac
|
||||
pkgrel=0
|
||||
pkgrel=1
|
||||
pkgdesc="Linux kernel with grsecurity"
|
||||
url=http://grsecurity.net
|
||||
depends="mkinitfs"
|
||||
@ -29,7 +29,7 @@ source="http://ftp.kernel.org/pub/linux/kernel/v4.x/linux-$_kernver.tar.xz
|
||||
config-virtgrsec.x86
|
||||
config-virtgrsec.x86_64
|
||||
"
|
||||
subpackages="$pkgname-dev"
|
||||
subpackages="$pkgname-dev linux-virtgrsec-dev"
|
||||
_flavors=
|
||||
for _i in $source; do
|
||||
case $_i in
|
||||
@ -151,9 +151,9 @@ virtgrsec() {
|
||||
_package virtgrsec "$subpkgdir"
|
||||
}
|
||||
|
||||
# we only provide -dev for main flavor for now
|
||||
dev() {
|
||||
local _abi_release=${pkgver}-${pkgrel}-$_mainflavor
|
||||
_dev() {
|
||||
local _flavor="$1"
|
||||
local _abi_release=${pkgver}-${pkgrel}-$_flavor
|
||||
# copy the only the parts that we really need for build 3rd party
|
||||
# kernel modules and install those as /usr/src/linux-headers,
|
||||
# simlar to what ubuntu does
|
||||
@ -161,15 +161,15 @@ dev() {
|
||||
# this way you dont need to install the 300-400 kernel sources to
|
||||
# build a tiny kernel module
|
||||
#
|
||||
pkgdesc="Headers and script for third party modules for grsec kernel"
|
||||
pkgdesc="Headers and script for third party modules for $_flavor kernel"
|
||||
depends="gmp-dev bash"
|
||||
local dir="$subpkgdir"/usr/src/linux-headers-${_abi_release}
|
||||
|
||||
# first we import config, run prepare to set up for building
|
||||
# external modules, and create the scripts
|
||||
mkdir -p "$dir"
|
||||
cp "$srcdir"/config-grsec.${CARCH} "$dir"/.config
|
||||
echo "-$pkgrel-grsec" > "$dir"/localversion-alpine \
|
||||
cp "$srcdir"/config-$_flavor.${CARCH} "$dir"/.config
|
||||
echo "-$pkgrel-$_flavor" > "$dir"/localversion-alpine \
|
||||
|| return 1
|
||||
make -j1 -C "$srcdir"/linux-$_kernver O="$dir" HOSTCC="${CC:-gcc}" \
|
||||
silentoldconfig prepare modules_prepare scripts
|
||||
@ -194,7 +194,7 @@ dev() {
|
||||
find $(find arch -name include -type d -print) -type f \
|
||||
| cpio -pdm "$dir"
|
||||
|
||||
install -Dm644 "$srcdir"/build-$_mainflavor/Module.symvers \
|
||||
install -Dm644 "$srcdir"/build-$_flavor/Module.symvers \
|
||||
"$dir"/Module.symvers
|
||||
|
||||
mkdir -p "$subpkgdir"/lib/modules/${_abi_release}
|
||||
@ -202,6 +202,14 @@ dev() {
|
||||
"$subpkgdir"/lib/modules/${_abi_release}/build
|
||||
}
|
||||
|
||||
dev() {
|
||||
_dev grsec
|
||||
}
|
||||
|
||||
virtgrsec_dev() {
|
||||
_dev virtgrsec
|
||||
}
|
||||
|
||||
md5sums="9a78fa2eb6c68ca5a40ed5af08142599 linux-4.4.tar.xz
|
||||
2286314f215706401dd51bf07b179ae4 patch-4.4.7.xz
|
||||
57e055cca3e1f3c7711f114e45146f8e grsecurity-3.1-4.4.7-201604152208.patch
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user