Bug 142837 - [patch] emulators/linux_base-* packages fails to install when linux.ko is not installed
Summary: [patch] emulators/linux_base-* packages fails to install when linux.ko is not...
Status: Closed Not Accepted
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-14 18:00 UTC by Scot Hetzel
Modified: 2014-08-29 20:16 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (1.12 KB, patch)
2010-01-14 18:00 UTC, Scot Hetzel
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Scot Hetzel 2010-01-14 18:00:04 UTC
When the linux_base* ports are installed as a package, they attempt to check the compat.linux.osrelease sysctl variable to make sure that is is 2.6.16 or greater, but when the linux.ko module is not loaded this variable doesn't exist.

This causes the package to fail to install, with the error 'linuxulator is not (kld)loaded, exiting'.

The pkg-install PRE-INSTALL target does have the ability to kldload the linux.ko module, but it occurs after the check for the sysctl variable compat.linux.osrelease.

Fix: The attached patch applies to the linux_base-f7, 8, 9 and 10 ports and the linux_base-fc6 ports.

Note: linux_base-fc4 is not affected.

Patch attached with submission follows:
How-To-Repeat: #pkg_add linux_base-f10-10_2
sysctl: unknown oid 'compat.linux.osrelease'
linuxulator is not (kld)loaded, exiting
pkg_add: install script returned error status
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2010-01-21 20:52:54 UTC
Responsible Changed
From-To: freebsd-ports-bugs->freebsd-emulation

See if the people here know a good way around this.
Comment 2 Boris B.Samorodov 2010-01-21 22:54:12 UTC
Scot, thanks for the patch. Really there is no consystency. ;-)
However, I'm not sure if the proposed behavior is desirable.
I.e. if a port loads kernel module but the system is not configured
to do it at next reboot, then a user may got very surprised. Esp.
if previous uptime was several months...

-- 
WBR, Boris Samorodov (bsam)
Research Engineer, http://www.ipt.ru Telephone & Internet SP
FreeBSD Committer, http://www.FreeBSD.org The Power To Serve
Comment 3 Scot Hetzel 2010-01-22 00:08:44 UTC
On Thu, Jan 21, 2010 at 4:54 PM, Boris Samorodov <bsam@ipt.ru> wrote:
> Scot, thanks for the patch. Really there is no consystency. ;-)
> However, I'm not sure if the proposed behavior is desirable.
> I.e. if a port loads kernel module but the system is not configured
> to do it at next reboot, then a user may got very surprised. Esp.
> if previous uptime was several months...
>
The pkg-message informs the user to add linux_enable to rc.conf to
enable Linux mode permanetly.  If they don't pay attention to the
pkg-message it is their fault for not enabling it. ;-)

Scot
Comment 4 Carlo Strub freebsd_committer freebsd_triage 2014-08-29 20:16:00 UTC
close