You are not logged in.

#26 2016-03-06 18:55:46

eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 4,083

Re: [solved] virtualbox depends on virtualbox-host-dkms?

ZekeSulastin wrote:
Eschwartz wrote:

It would be rather unfair towards users of a different kernel to make a hard dependency on the stock kernel.

... wouldn't that make it just like every other hardcoded dependency that you would have to work around somehow if you replaced a key system component?

The difference being that the linux package is not a key system component.
It is one of several commonly used providers of a key system component. In fact, there are four different kernels in the main repos, and it is entirely reasonable to use any of those. Maybe all four of their headers should be hard dependencies.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#27 2016-03-06 19:07:43

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,844

Re: [solved] virtualbox depends on virtualbox-host-dkms?

I think pacman could at least warn users they need kernel-headers....


Mr Green

Offline

#28 2016-03-06 19:31:57

Scimmia
Fellow
Registered: 2012-09-01
Posts: 8,586

Re: [solved] virtualbox depends on virtualbox-host-dkms?

It did.

% pacman -Qi dkms
...
Optional Deps   : linux-headers: build modules against Arch kernel [installed]
                  linux-lts-headers: build modules against LTS Arch kernel [installed]
...

Offline

#29 2016-03-06 19:37:43

eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 4,083

Re: [solved] virtualbox depends on virtualbox-host-dkms?

Mr Green wrote:

I think pacman could at least warn users they need kernel-headers....

As Scimmia said above, there is no really good way of doing this.

You need the headers before you install the modules.
But there is no way to require "headers for all currently-installed kernels". The best you can do are optdepends, which have to be manually installed afterward, when you see the messages emitted by pacman.

At least, when you install the kernel headers the dkms hook will build all the available modules.

...

The lesson here is that it is always important to look at pacman's output.
The developers have worked so hard to create a package manager that doesn't spew miles of useless garbage -- so why on earth wouldn't you take advantage of that and act on the carefully chosen messages it does emit?

That being said, I like the idea of using descriptions in the optdepends. wink
Which, handily enough, are there in the dkms package. Which makes me wonder if an optdepends in the virtualbox-host-dkms package is redundant.

EDIT: partially ninjaed...

Last edited by eschwartz (2016-03-06 19:38:55)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#30 2016-03-06 19:47:17

ZekeSulastin
Member
Registered: 2010-09-20
Posts: 266

Re: [solved] virtualbox depends on virtualbox-host-dkms?

Eschwartz's sarcasm got me a bit more worked up than it should have.  However, a mechanism for exactly that situation already exists in the form of `provides`, used to good effect by things such as phonon.  Why wouldn't that work here?  If randomly switching packages to dkms only becomes more of a thing, that would be a cleaner solution upon upgrade, especially if it's caught in the middle of a rebuild or KDE update or something, than a little list of optional dependencies that isn't even kept up to date (hi, linux-grsec and linux-zen).  I imagine nobody's really complained about it before because you're typically explicitly setting up dkms from the start if you want to use it instead of having it installed as a replacement.

I imagine that's why people (including myself) are posting here more than anything - arch is usually pretty good about providing warnings about changes that are more than a simple package replacement, and there has been nothing about this until after the fact (because it's a community package?).  Add to that the usual arch :smug: (and I've been here a while so I should be used to it) and yeah.

Last edited by ZekeSulastin (2016-03-06 19:48:52)

Offline

#31 2016-03-06 20:03:26

eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 4,083

Re: [solved] virtualbox depends on virtualbox-host-dkms?

ZekeSulastin wrote:

Eschwartz's sarcasm got me a bit more worked up than it should have.

Do you mean this?

Eschwartz wrote:

It would be rather unfair towards users of a different kernel to make a hard dependency on the stock kernel.

Because that was not sarcasm, and I don't know why anyone would think it was sarcasm.

However, a mechanism for exactly that situation already exists in the form of `provides`, used to good effect by things such as phonon.  Why wouldn't that work here?

What should provide what, here? I'm not sure I follow you.

dkms needs a specific set of kernel headers matching a specific kernel.
"provides" is meant to indicate packages that are drop-in replacements for something. Which is emphatically not the case here.

If randomly switching packages to dkms only becomes more of a thing, that would be a cleaner solution upon upgrade, especially if it's caught in the middle of a rebuild or KDE update or something, than a little list of optional dependencies that isn't even kept up to date (hi, linux-grsec and linux-zen).  I imagine nobody's really complained about it before because you're typically explicitly setting up dkms from the start if you want to use it instead of having it installed as a replacement.

Why does it matter if linux-{grsec,zen} get updated? The whole point of dkms is that it doesn't matter whether the kernel(s) gets updated or not.

I imagine that's why people (including myself) are posting here more than anything - arch is usually pretty good about providing warnings about changes that are more than a simple package replacement, and there has been nothing about this until after the fact (because it's a community package?).  Add to that the usual arch :smug: (and I've been here a while so I should be used to it) and yeah.

Then the appropriate response is to file a bug report asking for a precompiled version of the modules to exist in the official repos.

And FWIW, I totally support that idea. And I wonder why it was changed.

But so far, I don't believe anyone has actually filed a bug report (with the exception of one that merely asked whether or not it is true that the virtualbox-host-dkms package depends on dkms).

Last edited by eschwartz (2016-03-06 20:04:40)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#32 2016-03-06 20:07:17

Scimmia
Fellow
Registered: 2012-09-01
Posts: 8,586

Re: [solved] virtualbox depends on virtualbox-host-dkms?

Eschwartz wrote:

But so far, I don't believe anyone has actually filed a bug report (with the exception of one that merely asked whether or not it is true that the virtualbox-host-dkms package depends on dkms).

There was one other, but it was along the "Change it back!" line that I mentioned earlier.

Offline

#33 2016-03-06 20:07:51

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,252
Website

Re: [solved] virtualbox depends on virtualbox-host-dkms?

Eschwartz wrote:

Then the appropriate response is to file a bug report asking for a precompiled version of the modules to exist in the official repos.

Check my math here: if [comminuty] shall supply the modules in their own package, either users would have to mask the dkms hooks or the virtualbox-modules packages would need to somehow provide virtualbox-xxx-dkms or else dkms would continue to build the damn things, no?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#34 2016-03-06 20:27:08

eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 4,083

Re: [solved] virtualbox depends on virtualbox-host-dkms?

graysky wrote:
Eschwartz wrote:

Then the appropriate response is to file a bug report asking for a precompiled version of the modules to exist in the official repos.

Check my math here: if [comminuty] shall supply the modules in their own package, either users would have to mask the dkms hooks or the virtualbox-modules packages would need to somehow provide virtualbox-xxx-dkms or else dkms would continue to build the damn things, no?

I suppose the worst thing that might happen is the dkms version overwrites the precompiled modules. Assuming the relevant kernel headers were installed.
Everything would work, I think, except for pacman -Qkk.

They should probably be made to conflict. Why would someone have both precompiled and from-source-with-dkms installed? Are they using a kernel that doesn't have precompiled modules available? Then why don't they just use dkms for all their kernels?

(I am not really sure why someone would have multiple kernels anyway, except as a backup in case one of them goes horribly wrong. And virtualbox modules are probably not your concern in that scenario -- you want your preferred kernel back!)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#35 2016-03-06 20:31:47

Scimmia
Fellow
Registered: 2012-09-01
Posts: 8,586

Re: [solved] virtualbox depends on virtualbox-host-dkms?

Eschwartz wrote:

I suppose the worst thing that might happen is the dkms version overwrites the precompiled modules. Assuming the relevant kernel headers were installed.

Actually they wouldn't. The binary packages are installing to the "extramodules" dir, while dkms is putting them in the specific versioned dir.

I can't answer the question, though, because I don't follow it.

Offline

#36 2016-03-06 20:36:52

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,252
Website

Re: [solved] virtualbox depends on virtualbox-host-dkms?

@E - The virtualbox-xxx-dkms dependency of virtualbox would build on any kernel update if I understand things correctly.

It seems inconsistent to me: we currently supply other precompiled modules and dkms packages in the official repos (nvidia for example).  If there is a strategic advantage to move towards dkms-based packages, it would be nice to see this articulated and uniformly implemented for the coherency of the distro IMO.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#37 2016-03-06 23:05:11

Malakin
Member
From: Chile
Registered: 2007-04-29
Posts: 36
Website

Re: [solved] virtualbox depends on virtualbox-host-dkms?

Can the people that make this changes update the wiki or at least mark it as outdated if they don't want to update them? Contradictory information is not good. Also it would be nice to announce changes like this in the front page.

Offline

#38 2016-03-06 23:20:49

TheChickenMan
Member
From: United States
Registered: 2015-07-25
Posts: 354

Re: [solved] virtualbox depends on virtualbox-host-dkms?

This was also being discussed on the mailing list. arch-dev-public

Why are we no longer shipping virtualbox modules pre-build?  What are
the advantages from a user perspective?  Is this happening for any other
modules?

Bad things I see:
1) pre pacman-5.0 updates unsupported without any prior notification
2) notification of need for linux headers is only given (optional dep)
in update that needs them for building.  There is no reason given why
they are optional dependencies.  There is no notification that the build
did not go ahead at the end of the transaction.
3) Update is now a lot slower (and this is repeated over a lot of users)
4) additional download/install size (linux headers + module source).

Is there a single advantage for our *users* using the two kernels in [core]?

Allan

I tend to think that it is better to have an already working module installed from the package when possible.
It's just less things that can go wrong and less things which need to be downloaded and installed to make it work.


If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet.
Niels Bohr

Offline

#39 2016-03-07 08:02:22

midixinga
Member
Registered: 2014-01-18
Posts: 191

Re: [solved] virtualbox depends on virtualbox-host-dkms?

you may want to see this message from the maintainer https://lists.archlinux.org/pipermail/a … 40870.html

Last edited by midixinga (2016-03-07 08:05:27)

Offline

#40 2016-03-07 08:48:19

amhairghin
Member
Registered: 2015-10-14
Posts: 32

Re: [solved] virtualbox depends on virtualbox-host-dkms?

And think now in a minimal guest Arch Linux install (without X, for use as server). You need install `virtualbox-guest-utils-nox` that now depends `virtualbox-guest-dkms` that depens of `dkms` that depends of `kernel-headers` that depends of all devel tools, and blah blah blah.

This make image grows unnecessary for a (for example) virtualized nginx server.

Offline

#41 2016-03-07 09:13:34

Allan
Member
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,019
Website

Re: [solved] virtualbox depends on virtualbox-host-dkms?

I am pushing for this to change...

Offline

#42 2016-03-07 10:36:23

amhairghin
Member
Registered: 2015-10-14
Posts: 32

Re: [solved] virtualbox depends on virtualbox-host-dkms?

Allan wrote:

I am pushing for this to change...

Many thanks Allan smile

Offline

#43 2016-03-07 10:38:45

phw
Member
Registered: 2013-05-27
Posts: 318

Re: [solved] virtualbox depends on virtualbox-host-dkms?

I actually used DKMS in the past, but I changed to the pre-compiled version since I frequently forgot to run the DKMS commands and using the systemd service on every boot was silly. Now that the ALPM hooks manage the rebuilds I think using DKMS is a pretty easy to maintain solution.

Offline

#44 2016-03-07 12:27:40

dxxvi
Member
Registered: 2011-07-23
Posts: 114

Re: [solved] virtualbox depends on virtualbox-host-dkms?

I get lost in all these posts. Although I use Arch Linux for a couple of years, I don't know what to do now to make virtualbox work again. I don't mind install a couple more packages, run a couple more commands every time I upgrade virtualbox or the kernel. Could anybody please tell me how to make it work again?

Thanks.

Offline

#45 2016-03-07 12:42:59

phw
Member
Registered: 2013-05-27
Posts: 318

Re: [solved] virtualbox depends on virtualbox-host-dkms?

dxxvi wrote:

I get lost in all these posts. Although I use Arch Linux for a couple of years, I don't know what to do now to make virtualbox work again. I don't mind install a couple more packages, run a couple more commands every time I upgrade virtualbox or the kernel. Could anybody please tell me how to make it work again?

Thanks.


Given that you had virtualbox and virtualbox-host-modules before, you should end up with virtualbox and virtualbox-host-dkms after the update. It will also install dkms for you. What it does not install is linux-headers. So if you are using the default Arch kernel just install the "linux-headers" package, that should automatically trigger the build for the VirtualBox modules.

Offline

#46 2016-03-07 15:51:26

jseel001
Member
Registered: 2016-03-07
Posts: 1

Re: [solved] virtualbox depends on virtualbox-host-dkms?

*******************************************************************************************
Please see responses below after my post.
Indeed installing linux-headers should be all that is necessary to resolve this.
You should not have to do all the steps I outlined below.
*******************************************************************************************

For those looking for a quick fix, here's what I did to get VirtualBox working again. Please note that while I do believe this is an appropriate fix, I really didn't think twice before doing this and really had nothing to lose.

Using Octopi (where appropriate):

- Search for virtualbox and remove it. This will prompt you to remove virtualbox and the following deps: dkms, gcc, libmpc, and of course virtualbox.
- Reboot.
- Search for and install linux-headers.
- Search for and install virtualbox.
- Reboot.

Prior to this breaking, I had a saved VM. That VM no longer booted after applying a full pacman upgrade. After the above steps, my saved VM booted just fine.

Last edited by jseel001 (2016-03-07 17:44:40)

Offline

#47 2016-03-07 16:08:23

Scimmia
Fellow
Registered: 2012-09-01
Posts: 8,586

Re: [solved] virtualbox depends on virtualbox-host-dkms?

That's severe overkill. All you needed to do was step 3.

Offline

#48 2016-03-07 17:29:36

anarcho
Member
From: England
Registered: 2012-11-16
Posts: 33
Website

Re: [solved] virtualbox depends on virtualbox-host-dkms?

All you need to do is "pacman -S linux-headers"

Offline

#49 2016-03-07 18:44:30

Tom B
Member
Registered: 2014-01-15
Posts: 183
Website

Re: [solved] virtualbox depends on virtualbox-host-dkms?

I've just updated a virtual machine and run into this problem, I can't seem to get the virtualbox guest kernel modules so load whatever I try:

#pacman -Q | grep virtualbox
virtualbox-guest-dkms 5.0.14-4
virtualbox-guest-utils-nox 5.0.14-4
# sudo /usr/bin/rcvboxdrv
sudo: /usr/bin/rcvboxdrv: command not found

This was certainly easier when the modules were precompiled. What package am I missing for the rcvboxdrv command?

Edit: installing linux-headers triggers a recompile, but what happened to the rcvboxdrv command?


amhairghin wrote:

And think now in a minimal guest Arch Linux install (without X, for use as server). You need install `virtualbox-guest-utils-nox` that now depends `virtualbox-guest-dkms` that depens of `dkms` that depends of `kernel-headers` that depends of all devel tools, and blah blah blah.

This make image grows unnecessary for a (for example) virtualized nginx server.


Yes, this is the same issue I had.. I had got my vagrant box image down to 290mb. This significantly adds to the size. You can use `pacman -Rdd gcc make` to remove GCC after the modules have been compiled. Doing this I got my image down to 349mb, not ideal though!

Last edited by Tom B (2016-03-07 18:58:15)

Offline

#50 2016-03-07 22:56:38

oconnor663
Member
Registered: 2012-12-16
Posts: 46

Re: [solved] virtualbox depends on virtualbox-host-dkms?

The wiki instructions for this were out of date. I just updated them with a dirty TODO. Would someone who knows more please flesh out the expected install flow there?

Whatever happens, it would probably help a lot of users to have a News post about this.

For better or worse, I've learned to ignore optional dependencies. My guess is that most users have. I'm used to seeing long lists of things that really are optional, like what we have in the git package. When my VMs stopped working, it was long after I had updated these packages, and the key fact that "your optional dependencies have changed" was nowhere in front of me. It didn't occur to me at the time. Instead, this was my flow:

1. Look for vbox* modules in `lsmod`. Notice that they're missing.
2. Go to the wiki article on Virtualbox, and see the out of date instructions.
3. Reinstall virtualbox-host-modules. This worked, and my VMs were fixed.
4. Later, during `pacman -Syu`, I see that pacman is trying to uninstall virtualbox-host-modules.
5. Look at Arch News. Didn't see anything.
6. Look at the bug reports. Didn't see anything.
7. Look at these forums.

The core problem here is that, for users who followed the recommended install flow in the past, the only opportunity to avoid this problem is to notice the "new optional dependency" output from Pacman, and to intuit that it might cause a problem. Otherwise their first indication will be the same as mine, when their VMs fail to start. (And of course, on a headless machine, they might not notice until even later, when something that depends on the VMs breaks.) That's pretty bad. Unless I missed something big?

Offline

Board footer

Powered by FluxBB