Mail archive
alpine-aports

Re: [alpine-aports] [PATCH] testing/virtualbox-additions: Upgrade and rename

From: Natanael Copa <ncopa_at_alpinelinux.org>
Date: Thu, 4 Feb 2016 10:33:28 +0100

On Sat, 16 Jan 2016 08:43:50 +0000
Ben Allen <bensallen_at_me.com> wrote:

> - Moved virtualbox-additions-grsec to virtualbox-additions.

Why the rename?

We have the -grsec suffix on all 3rd party modules in case we want
build the modules against other kernel flavors. How would you call a
virtualbox-additions package which is for the linux-vanilla kernel?

Other than that, i think those patches looks good.

Can you please keep the -grsec suffix, rebase them and send a v3?

thanks!

-nc

> - Added flavor variable similar other kernel module packages.
> - Use latest Virtualbox version 5.0.12.
> ---
> testing/virtualbox-additions-grsec/APKBUILD | 71 ----------------------
> .../virtualbox-modules-4.1.4-pax-const.patch | 48 ---------------
> testing/virtualbox-additions/APKBUILD | 70 +++++++++++++++++++++
> .../virtualbox-modules-4.1.4-pax-const.patch | 48 +++++++++++++++
> 4 files changed, 118 insertions(+), 119 deletions(-)
> delete mode 100644 testing/virtualbox-additions-grsec/APKBUILD
> delete mode 100644 testing/virtualbox-additions-grsec/virtualbox-modules-4.1.4-pax-const.patch
> create mode 100644 testing/virtualbox-additions/APKBUILD
> create mode 100644 testing/virtualbox-additions/virtualbox-modules-4.1.4-pax-const.patch
>
> diff --git a/testing/virtualbox-additions-grsec/APKBUILD b/testing/virtualbox-additions-grsec/APKBUILD
> deleted file mode 100644
> index 0502c54..0000000
> --- a/testing/virtualbox-additions-grsec/APKBUILD
> +++ /dev/null
> _at_@ -1,71 +0,0 @@
> -# Maintainer: Natanael Copa <ncopa_at_alpinelinux.org>
> -
> -_flavor=grsec
> -_kpkg=linux-$_flavor
> -_kver=4.1.15
> -_kpkgrel=4
> -
> -# when chaning _ver we *must* bump _mypkgrel
> -_ver=4.2.12
> -_mypkgrel=0
> -_name=virtualbox-additions
> -
> -# verify the kernel version before entering chroot
> -_kapkbuild=../../linux-${_flavor}/APKBUILD
> -if [ -f $_kapkbuild ]; then
> - . $_kapkbuild
> - pkgname=$_name-$_flavor
> - [ "$_kver" != "$pkgver" ] && die "please update _kver to $pkgver"
> - [ "$_kpkgrel" != "$pkgrel" ] && die "please update _kpkgrel to $pkgrel"
> -fi
> -
> -_kpkgver="$_kver-r$_kpkgrel"
> -_abi_release=${_kver}-${_kpkgrel}-${_flavor}
> -
> -pkgname=${_name}-${_flavor}
> -pkgver=$_kver
> -pkgrel=$(($_kpkgrel + $_mypkgrel))
> -pkgdesc="Virtual box addtions kernel modules for $_flavor "
> -arch=""
> -url='http://virtualbox.org'
> -license="GPL custom"
> -makedepends="linux-grsec-dev"
> -source="http://dev.gentoo.org/~polynomial-c/virtualbox/vbox-kernel-module-src-$_ver.tar.xz
> - virtualbox-modules-4.1.4-pax-const.patch
> - "
> -
> -_builddir="$srcdir"/
> -
> -prepare() {
> - cd "$_builddir"
> - local i
> - for i in $source; do
> - case $i in
> - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
> - esac
> - done
> -}
> -
> -build() {
> - cd "$_builddir"
> -
> - export KERN_DIR=/usr/src/linux-headers-${_abi_release}
> - make
> -}
> -
> -package() {
> - local module=
> - cd "$_builddir"
> - for module in *.ko; do
> - install -D -m644 $module \
> - "$pkgdir/lib/modules/${_abi_release}/misc/$module" \
> - || return 1
> - done
> -}
> -
> -md5sums="05ed16f79999dab40ca78f08f23c0a7c vbox-kernel-module-src-4.2.12.tar.xz
> -4bbbce6902722a7439f6fac4d17c6051 virtualbox-modules-4.1.4-pax-const.patch"
> -sha256sums="f68078b9cdb4c76972b4e39421a6e5ced370b6159a38826c8acabe27f0231eb9 vbox-kernel-module-src-4.2.12.tar.xz
> -bd7586074db6dabee3b49cb9152c85e07a316069761df8369479297c592eb240 virtualbox-modules-4.1.4-pax-const.patch"
> -sha512sums="b0f37d8b5454ffb4588eb60c667aec58e349b62253366bb3e89d8995dd5fc6ddf4fc8d8c2bd5054b9bf3ef5602428a2cd66f1d5aeaefb34255d7726f60fa9906 vbox-kernel-module-src-4.2.12.tar.xz
> -9a9a982defed6d4453bc6d9388c3a71169bba85568cfd36d0d2588dda8e213a0d759c983a337a150d17c55bb6206e43738dfd2559fedeb85e132363936a48574 virtualbox-modules-4.1.4-pax-const.patch"
> diff --git a/testing/virtualbox-additions-grsec/virtualbox-modules-4.1.4-pax-const.patch b/testing/virtualbox-additions-grsec/virtualbox-modules-4.1.4-pax-const.patch
> deleted file mode 100644
> index 5e89ab4..0000000
> --- a/testing/virtualbox-additions-grsec/virtualbox-modules-4.1.4-pax-const.patch
> +++ /dev/null
> _at_@ -1,48 +0,0 @@
> -diff -urp vboxdrv.orig/SUPDrvIDC.h vboxdrv/SUPDrvIDC.h
> ---- a/vboxdrv.orig/SUPDrvIDC.h 2011-09-06 15:53:27.852567531 +0200
> -+++ b/vboxdrv/SUPDrvIDC.h 2011-09-06 15:54:05.420565524 +0200
> -_at_@ -160,7 +160,7 @@ typedef struct SUPDRVIDCREQGETSYM
> - {
> - /** The symbol address. */
> - PFNRT pfnSymbol;
> -- } Out;
> -+ } __no_const Out;
> - } u;
> - } SUPDRVIDCREQGETSYM;
> - /** Pointer to a SUPDRV IDC get symbol request. */
> -diff -urp vboxnetflt.orig/include/VBox/intnet.h vboxnetflt/include/VBox/intnet.h
> ---- a/vboxnetflt.orig/include/VBox/intnet.h 2011-09-06 15:53:27.852567531 +0200
> -+++ b/vboxnetflt/include/VBox/intnet.h 2011-09-06 15:54:05.424565524 +0200
> -_at_@ -783,7 +783,7 @@ typedef struct INTNETTRUNKFACTORY
> - DECLR0CALLBACKMEMBER(int, pfnCreateAndConnect,(struct INTNETTRUNKFACTORY *pIfFactory, const char *pszName,
> - PINTNETTRUNKSWPORT pSwitchPort, uint32_t fFlags,
> - PINTNETTRUNKIFPORT *ppIfPort));
> --} INTNETTRUNKFACTORY;
> -+} __no_const INTNETTRUNKFACTORY;
> - /** Pointer to the trunk factory. */
> - typedef INTNETTRUNKFACTORY *PINTNETTRUNKFACTORY;
> -
> -diff -urp vboxnetflt.orig/linux/VBoxNetFlt-linux.c vboxnetflt/linux/VBoxNetFlt-linux.c
> ---- a/vboxnetflt.orig/linux/VBoxNetFlt-linux.c 2011-07-19 12:15:22.000000000 +0200
> -+++ b/vboxnetflt/linux/VBoxNetFlt-linux.c 2011-09-06 15:56:00.516559379 +0200
> -_at_@ -840,7 +840,7 @@ typedef struct ethtool_ops OVR_OPSTYPE;
> -
> - # else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) */
> -
> --typedef struct net_device_ops OVR_OPSTYPE;
> -+typedef net_device_ops_no_const OVR_OPSTYPE;
> - # define OVR_OPS netdev_ops
> - # define OVR_XMIT pOrgOps->ndo_start_xmit
> -
> -diff -urp vboxpci.orig/include/VBox/rawpci.h vboxpci/include/VBox/rawpci.h
> ---- a/vboxpci.orig/include/VBox/rawpci.h 2011-04-18 17:01:12.000000000 +0200
> -+++ b/vboxpci/include/VBox/rawpci.h 2011-09-06 15:57:17.340555277 +0200
> -_at_@ -545,7 +545,7 @@ typedef struct RAWPCIFACTORY
> - DECLR0CALLBACKMEMBER(void, pfnDeinitVm,(PRAWPCIFACTORY pFactory,
> - PVM pVM,
> - PRAWPCIPERVM pPciData));
> --} RAWPCIFACTORY;
> -+} __no_const RAWPCIFACTORY;
> -
> - #define RAWPCIFACTORY_UUID_STR "ea089839-4171-476f-adfb-9e7ab1cbd0fb"
> -
> diff --git a/testing/virtualbox-additions/APKBUILD b/testing/virtualbox-additions/APKBUILD
> new file mode 100644
> index 0000000..2281a81
> --- /dev/null
> +++ b/testing/virtualbox-additions/APKBUILD
> _at_@ -0,0 +1,70 @@
> +# Maintainer: Natanael Copa <ncopa_at_alpinelinux.org>
> +
> +_flavor=${FLAVOR:-grsec}
> +_kpkg=linux-$_flavor
> +_kver=4.1.15
> +_kpkgrel=4
> +
> +# when chaning _ver we *must* bump _mypkgrel
> +_ver=5.0.12
> +_mypkgrel=0
> +_name=virtualbox-additions
> +
> +# verify the kernel version before entering chroot
> +_kapkbuild=../../linux-${_flavor}/APKBUILD
> +if [ -f $_kapkbuild ]; then
> + . $_kapkbuild
> + pkgname=$_name-$_flavor
> + [ "$_kver" != "$pkgver" ] && die "please update _kver to $pkgver"
> + [ "$_kpkgrel" != "$pkgrel" ] && die "please update _kpkgrel to $pkgrel"
> +fi
> +
> +_kpkgver="$_kver-r$_kpkgrel"
> +_abi_release=${_kver}-${_kpkgrel}-${_flavor}
> +
> +pkgname=${_name}-${_flavor}
> +pkgver=$_kver
> +pkgrel=$(($_kpkgrel + $_mypkgrel))
> +pkgdesc="Virtual box addtions kernel modules for $_flavor "
> +arch='x86_64'
> +url='http://virtualbox.org'
> +license="GPL custom"
> +makedepends="linux-grsec-dev"
> +source="http://dev.gentoo.org/~polynomial-c/virtualbox/vbox-kernel-module-src-$_ver.tar.xz
> + virtualbox-modules-4.1.4-pax-const.patch"
> +
> +_builddir="$srcdir"/
> +
> +prepare() {
> + cd "$_builddir"
> + local i
> + for i in $source; do
> + case $i in
> + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
> + esac
> + done
> +}
> +
> +build() {
> + cd "$_builddir"
> +
> + export KERN_DIR=/usr/src/linux-headers-${_abi_release}
> + make
> +}
> +
> +package() {
> + local module=
> + cd "$_builddir"
> + for module in *.ko; do
> + install -D -m644 $module \
> + "$pkgdir/lib/modules/${_abi_release}/misc/$module" \
> + || return 1
> + done
> +}
> +
> +md5sums="850d32e797dd67180524f47e38348561 vbox-kernel-module-src-5.0.12.tar.xz
> +4bbbce6902722a7439f6fac4d17c6051 virtualbox-modules-4.1.4-pax-const.patch"
> +sha256sums="c24f56bbd04ccfb34af94d7d89c921e23d470b5b5720c2b819811c93226a072c vbox-kernel-module-src-5.0.12.tar.xz
> +bd7586074db6dabee3b49cb9152c85e07a316069761df8369479297c592eb240 virtualbox-modules-4.1.4-pax-const.patch"
> +sha512sums="d6d474db87d854f2932639e564f0f6bb12d8852d5bbf8e19408aff0c53280116a3c0177b83f61b1c034edaa7404e9ba6584f762ad3b9003846016c8f873a9715 vbox-kernel-module-src-5.0.12.tar.xz
> +9a9a982defed6d4453bc6d9388c3a71169bba85568cfd36d0d2588dda8e213a0d759c983a337a150d17c55bb6206e43738dfd2559fedeb85e132363936a48574 virtualbox-modules-4.1.4-pax-const.patch"
> diff --git a/testing/virtualbox-additions/virtualbox-modules-4.1.4-pax-const.patch b/testing/virtualbox-additions/virtualbox-modules-4.1.4-pax-const.patch
> new file mode 100644
> index 0000000..5e89ab4
> --- /dev/null
> +++ b/testing/virtualbox-additions/virtualbox-modules-4.1.4-pax-const.patch
> _at_@ -0,0 +1,48 @@
> +diff -urp vboxdrv.orig/SUPDrvIDC.h vboxdrv/SUPDrvIDC.h
> +--- a/vboxdrv.orig/SUPDrvIDC.h 2011-09-06 15:53:27.852567531 +0200
> ++++ b/vboxdrv/SUPDrvIDC.h 2011-09-06 15:54:05.420565524 +0200
> +_at_@ -160,7 +160,7 @@ typedef struct SUPDRVIDCREQGETSYM
> + {
> + /** The symbol address. */
> + PFNRT pfnSymbol;
> +- } Out;
> ++ } __no_const Out;
> + } u;
> + } SUPDRVIDCREQGETSYM;
> + /** Pointer to a SUPDRV IDC get symbol request. */
> +diff -urp vboxnetflt.orig/include/VBox/intnet.h vboxnetflt/include/VBox/intnet.h
> +--- a/vboxnetflt.orig/include/VBox/intnet.h 2011-09-06 15:53:27.852567531 +0200
> ++++ b/vboxnetflt/include/VBox/intnet.h 2011-09-06 15:54:05.424565524 +0200
> +_at_@ -783,7 +783,7 @@ typedef struct INTNETTRUNKFACTORY
> + DECLR0CALLBACKMEMBER(int, pfnCreateAndConnect,(struct INTNETTRUNKFACTORY *pIfFactory, const char *pszName,
> + PINTNETTRUNKSWPORT pSwitchPort, uint32_t fFlags,
> + PINTNETTRUNKIFPORT *ppIfPort));
> +-} INTNETTRUNKFACTORY;
> ++} __no_const INTNETTRUNKFACTORY;
> + /** Pointer to the trunk factory. */
> + typedef INTNETTRUNKFACTORY *PINTNETTRUNKFACTORY;
> +
> +diff -urp vboxnetflt.orig/linux/VBoxNetFlt-linux.c vboxnetflt/linux/VBoxNetFlt-linux.c
> +--- a/vboxnetflt.orig/linux/VBoxNetFlt-linux.c 2011-07-19 12:15:22.000000000 +0200
> ++++ b/vboxnetflt/linux/VBoxNetFlt-linux.c 2011-09-06 15:56:00.516559379 +0200
> +_at_@ -840,7 +840,7 @@ typedef struct ethtool_ops OVR_OPSTYPE;
> +
> + # else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) */
> +
> +-typedef struct net_device_ops OVR_OPSTYPE;
> ++typedef net_device_ops_no_const OVR_OPSTYPE;
> + # define OVR_OPS netdev_ops
> + # define OVR_XMIT pOrgOps->ndo_start_xmit
> +
> +diff -urp vboxpci.orig/include/VBox/rawpci.h vboxpci/include/VBox/rawpci.h
> +--- a/vboxpci.orig/include/VBox/rawpci.h 2011-04-18 17:01:12.000000000 +0200
> ++++ b/vboxpci/include/VBox/rawpci.h 2011-09-06 15:57:17.340555277 +0200
> +_at_@ -545,7 +545,7 @@ typedef struct RAWPCIFACTORY
> + DECLR0CALLBACKMEMBER(void, pfnDeinitVm,(PRAWPCIFACTORY pFactory,
> + PVM pVM,
> + PRAWPCIPERVM pPciData));
> +-} RAWPCIFACTORY;
> ++} __no_const RAWPCIFACTORY;
> +
> + #define RAWPCIFACTORY_UUID_STR "ea089839-4171-476f-adfb-9e7ab1cbd0fb"
> +



---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Thu Feb 04 2016 - 10:33:28 GMT