From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Jan 14 18:00:05 2010 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 731711065672 for ; Thu, 14 Jan 2010 18:00:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 278EF8FC14 for ; Thu, 14 Jan 2010 18:00:05 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EI05xs060235 for ; Thu, 14 Jan 2010 18:00:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id o0EI05HC060234; Thu, 14 Jan 2010 18:00:05 GMT (envelope-from gnats) Resent-Date: Thu, 14 Jan 2010 18:00:05 GMT Resent-Message-Id: <201001141800.o0EI05HC060234@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Scot Hetzel Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43811106566C for ; Thu, 14 Jan 2010 17:58:25 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 18B598FC08 for ; Thu, 14 Jan 2010 17:58:25 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EHwOmk029477 for ; Thu, 14 Jan 2010 17:58:24 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o0EHwO2R029476; Thu, 14 Jan 2010 17:58:24 GMT (envelope-from nobody) Message-Id: <201001141758.o0EHwO2R029476@www.freebsd.org> Date: Thu, 14 Jan 2010 17:58:24 GMT From: Scot Hetzel To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/142837: [patch] emulators/linux_base-* packages fails to install when linux.ko is not installed X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 18:00:05 -0000 >Number: 142837 >Category: ports >Synopsis: [patch] emulators/linux_base-* packages fails to install when linux.ko is not installed >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jan 14 18:00:04 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Scot Hetzel >Release: 8.0-Stable >Organization: >Environment: FreeBSD dv8t01 8.0-STABLE FreeBSD 8.0-STABLE #10 r201599M: Tue Jan 5 14:29:56 CST 2010 swhetzel@dv8t01:/usr/obj/usr/src/8-stable/sys/GENERIC amd64 >Description: 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. >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 >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: Index: pkg-install =================================================================== RCS file: /home/ncvs/ports/emulators/linux_base-f10/pkg-install,v retrieving revision 1.13 diff -u -r1.13 pkg-install --- pkg-install 12 May 2009 14:53:58 -0000 1.13 +++ pkg-install 14 Jan 2010 17:38:37 -0000 @@ -3,14 +3,6 @@ case "$2" in PRE-INSTALL) - if [ "`/sbin/sysctl -n compat.linux.osrelease`"x = "x" ]; then - echo 'linuxulator is not (kld)loaded, exiting' - exit 1 - fi - if [ "`/sbin/sysctl -n compat.linux.osrelease`" = "2.4.2" ]; then - echo 'compat.linux.osrelease: 2.4.2 is not supported, exiting' - exit 1 - fi if [ -z "`kldstat -v | grep -E 'linux(aout|elf)'`" ]; then echo 'Linux mode is not enabled.' echo 'Loading linux kernel module now...' @@ -20,6 +12,14 @@ exit 1 fi fi + if [ "`/sbin/sysctl -n compat.linux.osrelease`"x = "x" ]; then + echo 'linuxulator is not (kld)loaded, exiting' + exit 1 + fi + if [ "`/sbin/sysctl -n compat.linux.osrelease`" = "2.4.2" ]; then + echo 'compat.linux.osrelease: 2.4.2 is not supported, exiting' + exit 1 + fi ;; POST-INSTALL) if [ -z "`grep ^linproc /etc/fstab`" ]; then >Release-Note: >Audit-Trail: >Unformatted: