From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Jun 3 18:10:03 2009 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 BF34D106566C for ; Wed, 3 Jun 2009 18:10:01 +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 98AF58FC12 for ; Wed, 3 Jun 2009 18:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n53IA1wr031363 for ; Wed, 3 Jun 2009 18:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n53IA1Tk031362; Wed, 3 Jun 2009 18:10:01 GMT (envelope-from gnats) Resent-Date: Wed, 3 Jun 2009 18:10:01 GMT Resent-Message-Id: <200906031810.n53IA1Tk031362@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, Gabor Kovesdan Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98CF6106566C; Wed, 3 Jun 2009 18:02:00 +0000 (UTC) (envelope-from gabor@server.mypc.hu) Received: from server.mypc.hu (server.mypc.hu [87.229.73.95]) by mx1.freebsd.org (Postfix) with ESMTP id 10F7C8FC0A; Wed, 3 Jun 2009 18:01:59 +0000 (UTC) (envelope-from gabor@server.mypc.hu) Received: from localhost (localhost [127.0.0.1]) by server.mypc.hu (Postfix) with ESMTP id 1974514D5829; Wed, 3 Jun 2009 19:43:55 +0200 (CEST) Received: from server.mypc.hu ([127.0.0.1]) by localhost (server.mypc.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 4HdyWs+3lmPv; Wed, 3 Jun 2009 19:43:54 +0200 (CEST) Received: by server.mypc.hu (Postfix, from userid 1001) id 4467D14D5825; Wed, 3 Jun 2009 19:43:54 +0200 (CEST) Message-Id: <20090603174354.4467D14D5825@server.mypc.hu> Date: Wed, 3 Jun 2009 19:43:54 +0200 (CEST) From: Gabor Kovesdan To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: emulation@FreeBSD.org Subject: ports/135221: [bsd.port.mk] unified support for LINUX_OSRELEASE dependency X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Gabor Kovesdan List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2009 18:10:03 -0000 >Number: 135221 >Category: ports >Synopsis: [bsd.port.mk] unified support for LINUX_OSRELEASE dependency >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Jun 03 18:10:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Gabor Kovesdan >Release: >Organization: >Environment: >Description: So far we haven't had a unified support for dealing with cases where a specific version of Linux emulation is necessary. We have the same for GCC versions or Perl version but not for Linux emulation, so I thought it would be useful to add similar knobs to the Ports Collection infrastructure. Also, the current IGNORE reasons that ports give, don't seem quite clear to our users, I got a PR for my Gentoo port because a user couldn't understand the actual problem. This is another reason I thought of unifying this part. >How-To-Repeat: >Fix: --- linux-osrel.diff begins here --- Index: ports/Mk/bsd.port.mk =================================================================== RCS file: /home/pcvs/ports/Mk/bsd.port.mk,v retrieving revision 1.619 diff -u -r1.619 bsd.port.mk --- ports/Mk/bsd.port.mk 22 May 2009 21:57:33 -0000 1.619 +++ ports/Mk/bsd.port.mk 3 Jun 2009 17:37:10 -0000 @@ -477,6 +477,13 @@ # Set to value , if the port needs emulators/linux_base-. # If set to "7", a dependency is registered to emulators/linux_base. # Implies appropriate settings for STRIP and STRIP_CMD. +# +# USE_LINUX_OSRELEASE - Controls the exact, the maximal or the minimal working LINUX_OSRELEASE +# value the port works with. +# +# USE_LINUX_OSRELEASE_REASON - Sets a reason for the dependency, which is used to +# set IGNORE. +# # USE_LINUX_PREFIX # - controls the action of PREFIX (see above). Only use this # if the port is a linux infrastructure port (e.g. contains libs @@ -1809,8 +1816,53 @@ USE_LINUX?= yes .endif -.if defined(USE_LINUX) +.if defined(USE_LINUX_OSRELEASE) +.if !defined(LINUX_OSRELEASE) +LINUX_OSRELEASE!= ${ECHO_CMD} `${SYSCTL} -n compat.linux.osrelease 2>/dev/null` +.endif + +.if ${LINUX_OSRELEASE}x == "x" +IGNORE= Linuxulator is not (kld)loaded +.endif + +linux_major= ${LINUX_OSRELEASE:C|\..*||} +_linux_minor= ${LINUX_OSRELEASE:S|^${linux_major}||:S|^.||:C|\..*||} +_linux_micro= ${LINUX_OSRELEASE:S|^${linux_major}||:S|^.${_linux_minor}||:S|^.||:C|\..*||} +linux_minor= ${_linux_minor:S|^|000|:C|.*(...)|\1|} +linux_micro= ${_linux_micro:S|^|00|:C|.*(..)|\1|} +linux_osrel= ${linux_major}${linux_minor}${linux_micro} + +want_linux_sign= ${USE_LINUX_OSRELEASE:C|^[0-9.]+||} +want_linux_ver= ${USE_LINUX_OSRELEASE:S|${want_linux_sign}$||} +want_linux_major= ${want_linux_ver:C|\..*||} +_want_linux_minor= ${want_linux_ver:S|^${want_linux_major}||:S|^.||:C|\..*||} +_want_linux_micro= ${want_linux_ver:S|^${want_linux_major}||:S|^.${_want_linux_minor}||:S|^.||:C|\..*||} +want_linux_minor= ${_want_linux_minor:S|^|000|:C|.*(...)|\1|} +want_linux_micro= ${_want_linux_micro:S|^|00|:C|.*(..)|\1|} +want_linux_osrel= ${want_linux_major}${want_linux_minor}${want_linux_micro} + +.if ${want_linux_sign} == "+" +.if ${want_linux_osrel} > ${linux_osrel} +USE_LINUX_OSRELEASE_REASON?= requires Linux emulation ${want_linux_ver} or later, please consult the documentation and set the compat.linux.osrelease sysctl appropriately +IGNORE= ${USE_LINUX_OSRELEASE_REASON} +.endif +.elif ${want_linux_sign} == "" +.if ${want_linux_osrel} != ${linux_osrel} +USE_LINUX_OSRELEASE_REASON?= requires Linux emulation ${want_linux_ver} exactly, please consult the documentation and set the compat.linux.osrelease sysctl appropriately +IGNORE= ${USE_LINUX_OSRELEASE_REASON} +.endif +.elif ${want_linux_sign} == "-" +.if ${want_linux_osrel} <= ${linux_osrel} +USE_LINUX_OSRELEASE_REASON?= requires Linux emulation earlier than ${want_linux_ver}, please consult the documentation and set the compat.linux.osrelease sysctl appropriately +IGNORE= ${USE_LINUX_OSRELEASE_REASON} +.endif +.else # wrong suffix +IGNORE= improper use of USE_LINUX_OSRELEASE +.endif +.endif + +.if defined(USE_LINUX) . if !defined(LINUX_OSRELEASE) LINUX_OSRELEASE!= ${ECHO_CMD} `${SYSCTL} -n compat.linux.osrelease 2>/dev/null` . endif Index: ports/devel/uppaal/Makefile =================================================================== RCS file: /home/pcvs/ports/devel/uppaal/Makefile,v retrieving revision 1.9 diff -u -r1.9 Makefile --- ports/devel/uppaal/Makefile 10 Jan 2009 15:27:26 -0000 1.9 +++ ports/devel/uppaal/Makefile 3 Jun 2009 17:37:10 -0000 @@ -15,6 +15,7 @@ USE_ZIP= yes USE_LINUX= yes +USE_LINUX_OSRELEASE= 2.6.16+ USE_JAVA= yes JAVA_VERSION= 1.6+ JAVA_RUN= yes @@ -33,12 +34,6 @@ .include -LINUX_OSRELEASE!= ${ECHO_CMD} `${SYSCTL} -n compat.linux.osrelease 2>/dev/null` - -.if ${LINUX_OSRELEASE} == "2.4.2" || ${OSVERSION} < 700000 -IGNORE=requires compat.linux.osrelease of at least 2.6.16 (needs 7.0 or later) -.endif - .if !exists(${DISTDIR}/${DISTNAME}${EXTRACT_SUFX}) && !defined(PACKAGE_BUILDING) ECHO_MSG=/usr/bin/printf IGNORE=Please download ${DISTNAME}${EXTRACT_SUFX} into\ Index: ports/emulators/linux_base-f10/Makefile =================================================================== RCS file: /home/pcvs/ports/emulators/linux_base-f10/Makefile,v retrieving revision 1.53 diff -u -r1.53 Makefile --- ports/emulators/linux_base-f10/Makefile 1 Jun 2009 17:26:13 -0000 1.53 +++ ports/emulators/linux_base-f10/Makefile 3 Jun 2009 17:37:10 -0000 @@ -108,6 +108,7 @@ ONLY_FOR_ARCHS= i386 amd64 LINUX_RPM_ARCH= i386 USE_LINUX_PREFIX= yes +USE_LINUX_OSRELEASE= 2.6.16+ NO_WRKSUBDIR= yes MD5_FILE?= ${MASTERDIR}/distinfo.${LINUX_RPM_ARCH} PLIST_SUB= GLIBCVER="2.9" @@ -123,14 +124,6 @@ .include -LINUX_OSRELEASE!= ${ECHO_CMD} `${SYSCTL} -n compat.linux.osrelease 2>/dev/null` - -.if ${LINUX_OSRELEASE}x == "x" -IGNORE= linuxulator is not (kld)loaded -.elif ${LINUX_OSRELEASE} == "2.4.2" -IGNORE= compat.linux.osrelease: 2.4.2 is not supported, please use 2.6.16 -.endif - REMOVE_DIRS= boot dev etc/fonts home initrd root tmp var/log var/run var/tmp \ usr/local usr/tmp REMOVE_FILES= bin/df bin/su etc/exports etc/group etc/localtime \ Index: ports/emulators/linux_base-f7/Makefile =================================================================== RCS file: /home/pcvs/ports/emulators/linux_base-f7/Makefile,v retrieving revision 1.38 diff -u -r1.38 Makefile --- ports/emulators/linux_base-f7/Makefile 31 Mar 2008 03:54:46 -0000 1.38 +++ ports/emulators/linux_base-f7/Makefile 3 Jun 2009 17:37:10 -0000 @@ -98,6 +98,7 @@ ONLY_FOR_ARCHS= i386 amd64 LINUX_RPM_ARCH= i386 USE_LINUX_PREFIX= yes +USE_LINUX_OSRELEASE= 2.6.16+ NO_WRKSUBDIR= yes MD5_FILE?= ${MASTERDIR}/distinfo.${LINUX_RPM_ARCH} PLIST_SUB= GLIBCVER="2.6" @@ -113,14 +114,6 @@ .include -LINUX_OSRELEASE!= ${ECHO_CMD} `${SYSCTL} -n compat.linux.osrelease 2>/dev/null` - -.if ${LINUX_OSRELEASE}x == "x" -IGNORE= linuxulator is not (kld)loaded -.elif ${LINUX_OSRELEASE} == "2.4.2" -IGNORE= compat.linux.osrelease: 2.4.2 is not supported -.endif - REMOVE_DIRS= boot dev home initrd root tmp var/log var/run var/tmp \ usr/local usr/tmp REMOVE_FILES= bin/df bin/su etc/exports etc/group etc/localtime \ Index: ports/emulators/linux_base-f8/Makefile =================================================================== RCS file: /home/pcvs/ports/emulators/linux_base-f8/Makefile,v retrieving revision 1.51 diff -u -r1.51 Makefile --- ports/emulators/linux_base-f8/Makefile 28 Jan 2009 22:16:43 -0000 1.51 +++ ports/emulators/linux_base-f8/Makefile 3 Jun 2009 17:37:10 -0000 @@ -107,6 +107,7 @@ ONLY_FOR_ARCHS= i386 amd64 LINUX_RPM_ARCH= i386 USE_LINUX_PREFIX= yes +USE_LINUX_OSRELEASE= 2.6.16+ NO_WRKSUBDIR= yes MD5_FILE?= ${MASTERDIR}/distinfo.${LINUX_RPM_ARCH} PLIST_SUB= GLIBCVER="2.7" @@ -122,14 +123,6 @@ .include -LINUX_OSRELEASE!= ${ECHO_CMD} `${SYSCTL} -n compat.linux.osrelease 2>/dev/null` - -.if ${LINUX_OSRELEASE}x == "x" -IGNORE= linuxulator is not (kld)loaded -.elif ${LINUX_OSRELEASE} == "2.4.2" -IGNORE= compat.linux.osrelease: 2.4.2 is not supported -.endif - REMOVE_DIRS= boot dev etc/fonts home initrd root tmp var/log var/run var/tmp \ usr/local usr/tmp REMOVE_FILES= bin/df bin/su etc/exports etc/group etc/localtime \ Index: ports/emulators/linux_base-f9/Makefile =================================================================== RCS file: /home/pcvs/ports/emulators/linux_base-f9/Makefile,v retrieving revision 1.53 diff -u -r1.53 Makefile --- ports/emulators/linux_base-f9/Makefile 6 Apr 2009 13:22:27 -0000 1.53 +++ ports/emulators/linux_base-f9/Makefile 3 Jun 2009 17:37:10 -0000 @@ -112,6 +112,7 @@ linux_base-f7-[0-9]* linux_base-f8-[0-9]* linux-glib2-* ONLY_FOR_ARCHS= i386 amd64 LINUX_RPM_ARCH= i386 +USE_LINUX_OSRELEASE= 2.6.16+ USE_LINUX_PREFIX= yes NO_WRKSUBDIR= yes MD5_FILE?= ${MASTERDIR}/distinfo.${LINUX_RPM_ARCH} @@ -128,14 +129,6 @@ .include -LINUX_OSRELEASE!= ${ECHO_CMD} `${SYSCTL} -n compat.linux.osrelease 2>/dev/null` - -.if ${LINUX_OSRELEASE}x == "x" -IGNORE= linuxulator is not (kld)loaded -.elif ${LINUX_OSRELEASE} == "2.4.2" -IGNORE= compat.linux.osrelease: 2.4.2 is not supported, please use 2.6.16 -.endif - REMOVE_DIRS= boot dev etc/fonts home initrd root tmp var/log var/run var/tmp \ usr/local usr/tmp REMOVE_FILES= bin/df bin/su etc/exports etc/group etc/localtime \ Index: ports/emulators/linux_base-fc6/Makefile =================================================================== RCS file: /home/pcvs/ports/emulators/linux_base-fc6/Makefile,v retrieving revision 1.34 diff -u -r1.34 Makefile --- ports/emulators/linux_base-fc6/Makefile 31 Mar 2008 03:54:45 -0000 1.34 +++ ports/emulators/linux_base-fc6/Makefile 3 Jun 2009 17:37:10 -0000 @@ -102,6 +102,7 @@ ONLY_FOR_ARCHS= i386 amd64 LINUX_RPM_ARCH= i386 USE_LINUX_PREFIX= yes +USE_LINUX_OSRELEASE= 2.6.16+ NO_WRKSUBDIR= yes MD5_FILE?= ${MASTERDIR}/distinfo.${LINUX_RPM_ARCH} PLIST_SUB= GLIBCVER="2.5" @@ -117,14 +118,6 @@ .include -LINUX_OSRELEASE!= ${ECHO_CMD} `${SYSCTL} -n compat.linux.osrelease 2>/dev/null` - -.if ${LINUX_OSRELEASE}x == "x" -IGNORE= linuxulator is not (kld)loaded -.elif ${LINUX_OSRELEASE} == "2.4.2" -IGNORE= compat.linux.osrelease: 2.4.2 is not supported -.endif - REMOVE_DIRS= boot dev home initrd root tmp var/log var/run var/tmp \ usr/local usr/tmp REMOVE_FILES= bin/df bin/su etc/exports etc/group etc/localtime \ Index: ports/emulators/linux_dist-gentoo-stage1/Makefile =================================================================== RCS file: /home/pcvs/ports/emulators/linux_dist-gentoo-stage1/Makefile,v retrieving revision 1.41 diff -u -r1.41 Makefile --- ports/emulators/linux_dist-gentoo-stage1/Makefile 24 Nov 2008 13:22:28 -0000 1.41 +++ ports/emulators/linux_dist-gentoo-stage1/Makefile 3 Jun 2009 17:37:10 -0000 @@ -18,6 +18,7 @@ RESTRICTED= binaries licensed under GNU GPL without accompanying source USE_BZIP2= YES +USE_LINUX_OSRELEASE= 2.6.16+ DIST_SUBDIR= gentoo-linux NO_BUILD= YES ONLY_FOR_ARCHS= amd64 i386 @@ -43,14 +44,6 @@ .include -LINUX_OSRELEASE!= ${ECHO_CMD} `${SYSCTL} -n compat.linux.osrelease 2>/dev/null` - -.if ${LINUX_OSRELEASE}x == "x" -IGNORE= linuxulator is not (kld)loaded -.elif ${LINUX_OSRELEASE} == "2.4.2" -IGNORE= compat.linux.osrelease: 2.4.2 is not supported -.endif - do-extract: ${MKDIR} ${WRKDIR} Index: ports/emulators/linux_dist-gentoo-stage3/Makefile =================================================================== RCS file: /home/pcvs/ports/emulators/linux_dist-gentoo-stage3/Makefile,v retrieving revision 1.12 diff -u -r1.12 Makefile --- ports/emulators/linux_dist-gentoo-stage3/Makefile 24 Nov 2008 13:23:21 -0000 1.12 +++ ports/emulators/linux_dist-gentoo-stage3/Makefile 3 Jun 2009 17:37:10 -0000 @@ -16,6 +16,7 @@ RESTRICTED= binaries licensed under GNU GPL without accompanying source USE_BZIP2= YES +USE_LINUX_OSRELEASE= 2.6.16+ DIST_SUBDIR= gentoo-linux NO_BUILD= YES ONLY_FOR_ARCHS= i386 amd64 @@ -43,14 +44,6 @@ .include -LINUX_OSRELEASE!= ${ECHO_CMD} `${SYSCTL} -n compat.linux.osrelease 2>/dev/null` - -.if ${LINUX_OSRELEASE}x == "x" -IGNORE= linuxulator is not (kld)loaded -.elif ${LINUX_OSRELEASE} == "2.4.2" -IGNORE= compat.linux.osrelease: 2.4.2 is not supported -.endif - .if (${GENTOO_OPTIMIZED} == "i686") MASTER_SITE_SUBDIR= releases/x86/${PORTVERSION}/stages DISTNAME= stage3-${GENTOO_OPTIMIZED}-${PORTVERSION} --- linux-osrel.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: