Community Packages

Please read this before reporting a bug:
http://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#26721 - [virtualbox virtualbox-modules] change PKGBUILD and .install files to be kernel independent

Attached to Project: Community Packages
Opened by John (graysky) - Wednesday, 02 November 2011, 21:58 GMT
Last edited by György Balló (City-busz) - Thursday, 05 September 2013, 19:38 GMT
Task Type Feature Request
Category Packages
Status Closed
Assigned To Ionut Biru (wonder)
Architecture All
Severity Very Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I use a custom kernel package (linux-ck) but in order to use this great PKG, I need to manually edit out the references to the ARCH default kernel in the PKGBUILD and also in the x.install files each time a new release is pushed. I'm wondering if you're able to make the PKGBUILD and related files "kernel neutral" such that it acquires the needed info via variables and assumes that the user wants to build it for the running kernel rather than the ARCH default kernel. Does this sound like a good idea?
This task depends upon

Closed by  György Balló (City-busz)
Thursday, 05 September 2013, 19:38 GMT
Reason for closing:  Implemented
Comment by Ionut Biru (wonder) - Wednesday, 02 November 2011, 22:06 GMT
isn't virtualbox-source enough for you?
Comment by John (graysky) - Wednesday, 02 November 2011, 22:10 GMT
On my system, I do not have the ARCH kernel package at all. I am confused how to install virtualbox without it. I usually build via ABS after modifying the PKGBUILDs and install files.
Comment by Ionut Biru (wonder) - Wednesday, 02 November 2011, 22:13 GMT
you can't, unless i add in virtualbox-source that provides=virtualbox-modules and you can do pacman -S virtualbox virtualbox-source
Comment by John (graysky) - Wednesday, 02 November 2011, 22:15 GMT
Do you think that is a good solution? I will be happy not to use ABS for this package :)
Comment by John (graysky) - Thursday, 03 November 2011, 21:30 GMT
Actually, how will that circumvent the 'depends = linux-headers' requirement in the virtualbox-source package?
Comment by Ionut Biru (wonder) - Friday, 04 November 2011, 08:17 GMT
linux-headers was there as dependency in virtualbox. is like that in community.

how did you work around then and you cannot do it now?
Comment by John (graysky) - Friday, 04 November 2011, 08:46 GMT
I can by changing the "depends = linux-headers" in the .PKGINFO but that is messy. I was just was asking if you could make the PKG more universal. If it's too much work for you, or you simply don't want to, that's okay.

BTW, simply making the change you propose does not lead to a functional package.

1) remove "depends = linux-headers" from .PKGINFO in virtualbox-source-4.1.4-4-x86_64.pkg.tar.xz
2) add "provides = virtualbox-modules" to .PKGINFO in virtualbox-source-4.1.4-4-x86_64.pkg.tar.xz
3) pacman -U virtualbox-4.1.4-4-x86_64.pkg.tar.xz virtualbox-source-4.1.4-4-x86_64.pkg.tar.xz
4) /usr/bin/vboxbuild
5) modprobe -a vboxdrv vboxnetflt

Now when I try to load VirtualBox I get errors:

$ VirtualBox
VirtualBox: supR3HardenedMainGetTrustedMain: dlopen("/usr/lib/virtualbox/VirtualBox.so",) failed: /usr/lib/virtualbox/VirtualBox.so: undefined symbol: _ZN19QAbstractProxyModel11setItemDataERK11QModelIndexRK4QMapIi8QVariantE

So I don't think the proposed suggestion will work. You thoughts?


Output of steps 3-4:

# pacman -U virtualbox-4.1.4-4-x86_64.pkg.tar.xz virtualbox-source-4.1.4-4-x86_64.pkg.tar.xz
resolving dependencies...
looking for inter-conflicts...

Targets (3): virtualbox-source-4.1.4-4 libvncserver-0.9.8.1-1 virtualbox-4.1.4-4

Total Download Size: 0.00 MB
Total Installed Size: 75.92 MB

Proceed with installation? [Y/n]
(3/3) checking package integrity [#####################################] 100%
(3/3) checking for file conflicts [#####################################] 100%
(1/3) installing virtualbox-source [#####################################] 100%
===> To compile the modules do /usr/bin/vboxbuild
(2/3) installing libvncserver [#####################################] 100%
(3/3) installing virtualbox [#####################################] 100%
Optional dependencies for virtualbox
qt: for VirtualBox GUI
vde2: Virtual Distributed Ethernet support
virtualbox-sdk: developer kit
virtualbox-source: host kernel source modules for non-stock kernels

# /usr/bin/vboxbuild
:: Recompiling VirtualBox kernel modules (3.1.0-1-ck) [DONE]

Comment by Ionut Biru (wonder) - Friday, 04 November 2011, 08:52 GMT
what about fixing your damn kernel to provide linux and linux-headers instead of messing with my package?:)
Comment by John (graysky) - Friday, 04 November 2011, 20:11 GMT
I had it set to provide linux and linux-headers but took too much heat of that decision. I honestly can't remember the arguments behind NOT providing it at this point...
Comment by Ionut Biru (wonder) - Monday, 07 November 2011, 21:49 GMT
package_virtualbox-source() {
pkgdesc="VirtualBox kernel modules source"
- depends=(linux-headers gcc make)
+ depends=(gcc make)
+ provides=(virtualbox-modules)
+ optdepends=('linux-headers'
+ 'kernel26-lts-headers')
Comment by Artem Sheremet (dot) - Wednesday, 14 November 2012, 23:54 GMT
  • Field changed: Percent Complete (100% → 0%)
we can't use 'provides=linux' or 'provides=linux-headers' in custom kernels because they do not actually provide ARCH kernel. Either ARCH kernel should be changed to linux-arch and linux-arch-headers, or every kernel should provide something like 'linux-common' and 'linux-common-headers', otherwise packages which only support Arch kernel, not custom, are broken with only custom kernel installed.
Comment by György Balló (City-busz) - Thursday, 05 September 2013, 19:38 GMT
I suppose that it's implemented in the virtualbox-host-dkms package. If you still found problems, feel free to report it.

Loading...