From owner-freebsd-emulation@FreeBSD.ORG Thu Mar 20 23:26:21 2008 Return-Path: Delivered-To: freebsd-emulation@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0332F106564A for ; Thu, 20 Mar 2008 23:26:21 +0000 (UTC) (envelope-from bsam@ipt.ru) Received: from services.ipt.ru (services.ipt.ru [194.62.233.110]) by mx1.freebsd.org (Postfix) with ESMTP id B072F8FC15 for ; Thu, 20 Mar 2008 23:26:20 +0000 (UTC) (envelope-from bsam@ipt.ru) Received: from [85.173.17.72] (helo=localhost.my.domain) by services.ipt.ru with esmtpa (Exim 4.54 (FreeBSD)) id 1JcU9L-000H0R-Jj for freebsd-emulation@FreeBSD.org; Fri, 21 Mar 2008 02:26:19 +0300 To: freebsd-emulation@FreeBSD.org From: Boris Samorodov Date: Fri, 21 Mar 2008 02:25:50 +0300 Message-ID: <07011489@ipt.ru> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Cc: Subject: add LINUX_OSRELEASE to bsd.linux-rpm.mk X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Mar 2008 23:26:21 -0000 --=-=-= Hello, We are approching a day when two default compat.linux.osrelease would exist (though it would be a one per branch). There should be a way to determine which linux infrastructure ports should be installed and a way to override this value (e.g. while package building). I propose the following patch to bsd.linux-rpm.mk. It introduces a new variable LINUX_OSRELEASE which is evaluated at bsd.linux-rpm.mk unless it has been already defined. What do you think? WBR -- bsam --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=blm.diff Content-Description: a patch for bsd.linux-rpm.mk --- bsd.linux-rpm.mk.orig 2008-03-21 01:30:36.000000000 +0300 +++ bsd.linux-rpm.mk 2008-03-21 01:47:44.000000000 +0300 @@ -12,6 +12,10 @@ # e.g. 3 for fedora core 3, 4 for fedora core 4 # This is used to set MASTER_SITE_{,SRC_}SUBDIR # if it isn't already set. +# LINUX_OSRELEASE - Contains the value of compat.linux.osrelease sysctl. +# Will be used to distinguish which linux +# infrastructure ports should be used. +# Valid values: 2.4.2, 2.6.16. # MASTER_SITE_SRC_SUBDIR # - The subdir for the src RPM's. # DISTFILES - For simple cases this will be set automatically @@ -52,6 +56,10 @@ LINUX_RPM_ARCH?= ${ARCH} . endif +.if !defined(LINUX_OSRELEASE) +LINUX_OSRELEASE!= ${SYSCTL} -n compat.linux.osrelease +.endif + .endif .if defined(_POSTMKINCLUDED) && !defined(Linux_RPM_Post_Include) --=-=-=--