Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 04 Mar 2009 13:55:59 +0300
From:      Boris Samorodov <bsam@ipt.ru>
To:        Alexander Leidinger <Alexander@Leidinger.net>
Cc:        freebsd-emulation@freebsd.org
Subject:   Re: [patch] Mk/bsd.linux-rpm.mk: introduce some linux-f8 infrastructure
Message-ID:  <13134976@bb.ipt.ru>
In-Reply-To: <20090304112524.45016b7uvodhvvok@webmail.leidinger.net> (Alexander Leidinger's message of "Wed\, 04 Mar 2009 11\:25\:24 %2B0100")
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>

next in thread | previous in thread | raw e-mail | index | archive | help
--=-=-=

Alexander Leidinger <Alexander@Leidinger.net> writes:
> Quoting Boris Samorodov <bsam@ipt.ru> (from Wed, 04 Mar 2009 13:01:28 +0300):
>> Alexander Leidinger <Alexander@Leidinger.net> writes:
>>> Quoting Boris Samorodov <bsam@ipt.ru> (from Wed, 04 Mar 2009
>>> 12:23:35 +0300):
>>>> Alexander Leidinger <Alexander@Leidinger.net> writes:
>>>>> Quoting Boris Samorodov <bsam@ipt.ru> (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

--=-=-=--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?13134976>