From owner-freebsd-emulation@FreeBSD.ORG Wed Mar 4 10:56:01 2009 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 4DF9B106564A for ; Wed, 4 Mar 2009 10:56:01 +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 DCD608FC0C for ; Wed, 4 Mar 2009 10:56:00 +0000 (UTC) (envelope-from bsam@ipt.ru) Received: from bb.ipt.ru ([194.62.233.89]) by services.ipt.ru with esmtp (Exim 4.54 (FreeBSD)) id 1Leolb-000BdG-QD; Wed, 04 Mar 2009 13:55:59 +0300 To: Alexander Leidinger References: <14905754@bb.ipt.ru> <20090304093137.10733oaty524f0is@webmail.leidinger.net> <11370520@bb.ipt.ru> <20090304103247.417765zrsapwwow0@webmail.leidinger.net> <79218247@bb.ipt.ru> <20090304112524.45016b7uvodhvvok@webmail.leidinger.net> From: Boris Samorodov Date: Wed, 04 Mar 2009 13:55:59 +0300 In-Reply-To: <20090304112524.45016b7uvodhvvok@webmail.leidinger.net> (Alexander Leidinger's message of "Wed\, 04 Mar 2009 11\:25\:24 +0100") Message-ID: <13134976@bb.ipt.ru> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Cc: freebsd-emulation@freebsd.org Subject: Re: [patch] Mk/bsd.linux-rpm.mk: introduce some linux-f8 infrastructure 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: Wed, 04 Mar 2009 10:56:01 -0000 --=-=-= Alexander Leidinger writes: > Quoting Boris Samorodov (from Wed, 04 Mar 2009 13:01:28 +0300): >> Alexander Leidinger writes: >>> Quoting Boris Samorodov (from Wed, 04 Mar 2009 >>> 12:23:35 +0300): >>>> Alexander Leidinger writes: >>>>> Quoting Boris Samorodov (from Tue, 03 Mar 2009 >>> >>>>>> . define MASTER_SITE_SUBDIR and MASTER_SITE_SRC_SUBDIR when >>>>>> LINUX_DIST_VER=8 (no such ports ATM). >>>>> >>>>> Why is there ifndef MASTER_SITES (only in the context of your patch, >>>> >>>> This ifndef was introduced by sat@ at Rev 1.9. I'm not aware of the >>>> real need. >>> >>> I had a look at it. It is about protecting MASTER_SITE_* to be set, >>> e.g. imagine if someone sets MASTER_SITE=file:///..., and at this >>> location there's a flat file structure. In this case you do not want >>> to have MASTER_SITE_* to be set. >>> >>> So I think you need to change your patch to keep this functionality. >> >> Yes, good catch, thanks! The first .endif was misplaced. Seems that >> the following patch is what you meant: > > Yes, looks commit ready. > > Personally I would remove the '?' from MASTER_SITE?=, as it is handled > by the ifndef. This way it does not confuse readers. MAybe even > putting a comment there what this is all about. Fixed: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=Mk.diff Content-Description: a patch for bsd.linux-rpm.mk --- bsd.linux-rpm.mk.orig 2008-08-15 16:29:42.000000000 +0400 +++ bsd.linux-rpm.mk 2009-03-04 13:54:46.000000000 +0300 @@ -27,6 +27,11 @@ # contain libraries. # BRANDELF_FILES - A list of files to brand as a linux executable in # case BRANDELF_DIRS can't be used. +# 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. +# Note: this variable must be used at bsd.linux.mk should it exists .if !defined(_POSTMKINCLUDED) && !defined(Linux_RPM_Pre_Include) @@ -52,6 +57,10 @@ LINUX_RPM_ARCH?= ${ARCH} . endif +. if !defined(LINUX_OSRELEASE) +LINUX_OSRELEASE!= ${ECHO_CMD} `${SYSCTL} -n compat.linux.osrelease 2>/dev/null` +. endif + .endif .if defined(_POSTMKINCLUDED) && !defined(Linux_RPM_Post_Include) @@ -65,12 +74,24 @@ DIST_SUBDIR?= rpm/${LINUX_RPM_ARCH}/${LINUX_DIST}/${LINUX_DIST_VER} . if ${LINUX_DIST} == "fedora" +# we do not want to define MASTER_SITES and MASTER_SITE_* if they are already defined +# ex.: MASTER_SITE=file:///... . ifndef MASTER_SITES -MASTER_SITES?= ${MASTER_SITE_FEDORA_LINUX} +MASTER_SITES= ${MASTER_SITE_FEDORA_LINUX} +. if ${LINUX_DIST_VER} == 8 +. if (${LINUX_OSRELEASE} != "2.6.16") && defined(PACKAGE_BUILDING) +IGNORE= packages should be built with compat.linux.osrelease=2.6.16 +. endif +MASTER_SITE_SUBDIR?= ../releases/${LINUX_DIST_VER}/Everything/${LINUX_RPM_ARCH}/os/Packages \ + ../updates/${LINUX_DIST_VER}/${LINUX_RPM_ARCH}.newkey +MASTER_SITE_SRC_SUBDIR?= ../releases/${LINUX_DIST_VER}/Everything/source/SRPMS \ + ../updates/${LINUX_DIST_VER}/SRPMS.newkey +. else MASTER_SITE_SUBDIR?= ${LINUX_DIST_VER}/${LINUX_RPM_ARCH}/os/Fedora/RPMS \ updates/${LINUX_DIST_VER}/${LINUX_RPM_ARCH} MASTER_SITE_SRC_SUBDIR?= ${LINUX_DIST_VER}/SRPMS \ updates/${LINUX_DIST_VER}/SRPMS +. endif . endif . else IGNORE= unknown LINUX_DIST in port Makefile --=-=-= WBR -- Boris Samorodov (bsam) Research Engineer, http://www.ipt.ru Telephone & Internet SP FreeBSD Committer, http://www.FreeBSD.org The Power To Serve --=-=-=--