Bug 186702 - Mk/bsd.linux-rpm.mk does not allow grouping rules (:something)
Summary: Mk/bsd.linux-rpm.mk does not allow grouping rules (:something)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-emulation (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-12 20:20 UTC by Thierry Thomas
Modified: 2014-03-18 22:22 UTC (History)
1 user (show)

See Also:


Attachments
bsd.linux-rpm.mk.diff (339 bytes, patch)
2014-02-12 20:20 UTC, Thierry Thomas
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thierry Thomas freebsd_committer freebsd_triage 2014-02-12 20:20:01 UTC
	If a Linux port has many distfiles, and then many src rpm, with
	different MASTER_SITES for sources and binaries, the port tries
	to download each src rpm from each master sites for binaries,
	without success untill it reaches the src master sites.

	To speed up this step, it would be useful to allow grouping
	rules, by suffixing e.g. :bin to the binaries MASTER_SITES and
	the binaries DISTFILES, and :src for the sources.

	This works fine untill `make checksum', but unfirtunately it
	fails during do-extract, because the :group is not removed.

Fix: Please apply this patch:
How-To-Repeat: 	As an example, try the port devel/linux-f10-devtoolsa with the
	hereunder patch:

--- Makefile+group_rules.diff begins here ---
--- devel/linux-f10-devtools/Makefile.orig	2014-02-12 20:53:43.000000000 +0100
+++ devel/linux-f10-devtools/Makefile	2014-02-12 20:22:35.000000000 +0100
@@ -4,30 +4,30 @@
 PORTNAME=	devtools
 PORTVERSION=	10
 CATEGORIES=	devel
-MASTER_SITES=	http://archives.fedoraproject.org/pub/archive/fedora/linux/updates/${PORTVERSION}/${LINUX_RPM_ARCH}/ \
-		http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/${PORTVERSION}/Fedora/${LINUX_RPM_ARCH}/os/Packages/
+MASTER_SITES=	http://archives.fedoraproject.org/pub/archive/fedora/linux/updates/${PORTVERSION}/${LINUX_RPM_ARCH}/:bin \
+		http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/${PORTVERSION}/Fedora/${LINUX_RPM_ARCH}/os/Packages/:bin
 PKGNAMEPREFIX=	linux-f10-
-DISTFILES=	binutils-2.18.50.0.9-8.fc10.${LINUX_RPM_ARCH}.rpm \
-		binutils-devel-2.18.50.0.9-8.fc10.${LINUX_RPM_ARCH}.rpm \
-		glibc-devel-2.9-3.${LINUX_RPM_ARCH}.rpm \
-		glibc-headers-2.9-3.${LINUX_RPM_ARCH}.rpm \
-		gmp-4.2.2-8.fc10.${LINUX_RPM_ARCH}.rpm \
-		kernel-headers-2.6.27.41-170.2.117.fc10.${LINUX_RPM_ARCH}.rpm \
-		mpfr-2.3.2-1.fc10.${LINUX_RPM_ARCH}.rpm \
-		cpp-4.3.2-7.${LINUX_RPM_ARCH}.rpm \
-		gcc-4.3.2-7.${LINUX_RPM_ARCH}.rpm \
-		gcc-c++-4.3.2-7.${LINUX_RPM_ARCH}.rpm \
-		gcc-gfortran-4.3.2-7.${LINUX_RPM_ARCH}.rpm
+DISTFILES=	binutils-2.18.50.0.9-8.fc10.${LINUX_RPM_ARCH}.rpm:bin \
+		binutils-devel-2.18.50.0.9-8.fc10.${LINUX_RPM_ARCH}.rpm:bin \
+		glibc-devel-2.9-3.${LINUX_RPM_ARCH}.rpm:bin \
+		glibc-headers-2.9-3.${LINUX_RPM_ARCH}.rpm:bin \
+		gmp-4.2.2-8.fc10.${LINUX_RPM_ARCH}.rpm:bin \
+		kernel-headers-2.6.27.41-170.2.117.fc10.${LINUX_RPM_ARCH}.rpm:bin \
+		mpfr-2.3.2-1.fc10.${LINUX_RPM_ARCH}.rpm:bin \
+		cpp-4.3.2-7.${LINUX_RPM_ARCH}.rpm:bin \
+		gcc-4.3.2-7.${LINUX_RPM_ARCH}.rpm:bin \
+		gcc-c++-4.3.2-7.${LINUX_RPM_ARCH}.rpm:bin \
+		gcc-gfortran-4.3.2-7.${LINUX_RPM_ARCH}.rpm:bin
 
 .if defined(PACKAGE_BUILDING)
-MASTER_SITES+=	http://archives.fedoraproject.org/pub/archive/fedora/linux/updates/${PORTVERSION}/SRPMS/ \
-		http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/${PORTVERSION}/Fedora/source/SRPMS/
-SRC_DISTFILES=	binutils-2.18.50.0.9-8.fc10.src.rpm \
-		glibc-2.9-3.src.rpm \
-		gmp-4.2.2-8.fc10.src.rpm \
-		kernel-2.6.27.5-117.fc10.src.rpm \
-		mpfr-2.3.2-1.fc10.src.rpm \
-		gcc-4.3.2-7.src.rpm
+MASTER_SITES+=	http://archives.fedoraproject.org/pub/archive/fedora/linux/updates/${PORTVERSION}/SRPMS/:src \
+		http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/${PORTVERSION}/Fedora/source/SRPMS/:src
+SRC_DISTFILES=	binutils-2.18.50.0.9-8.fc10.src.rpm:src \
+		glibc-2.9-3.src.rpm:src \
+		gmp-4.2.2-8.fc10.src.rpm:src \
+		kernel-2.6.27.5-117.fc10.src.rpm:src \
+		mpfr-2.3.2-1.fc10.src.rpm:src \
+		gcc-4.3.2-7.src.rpm:src
 .endif
 
 MAINTAINER=	jwbacon@tds.net
--- Makefile+group_rules.diff ends here ---
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-02-12 20:20:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->freebsd-emulation

bsd.linux-rpm.mk is freebsd-emulation territory (via the GNATS Auto 
Assign Tool)
Comment 2 Thierry Thomas freebsd_committer freebsd_triage 2014-03-16 23:00:41 UTC
As suggested by netchild@, I tested the proposed patch with some
important ports.

For emulators/linux_base-f10, x11-toolkits/linux-f10-gtk2,
x11-toolkits/linux-f10-tk85 and so on, it is non applicable, because
they have only one set of MASTER_SITES - but it does not hurt.

I retried the patch proposed for devel/linux-f10-devtools, and it still
works.

I also tried it on x11-toolkits/linux-f10-qt45, with the hereunder
patch, and it's OK:

--- linux-f10-qt45.diff begins here ---
diff -urN x11-toolkits/linux-f10-qt45.orig/Makefile x11-toolkits/linux-f10-qt45/Makefile
--- x11-toolkits/linux-f10-qt45.orig/Makefile	2013-10-07 15:36:45.000000000 +0200
+++ x11-toolkits/linux-f10-qt45/Makefile	2014-03-16 23:29:12.000000000 +0100
@@ -3,10 +3,10 @@
 PORTNAME=	${LINUX_NAME}45
 PORTVERSION=	4.5.3
 CATEGORIES=	x11-toolkits linux
-MASTER_SITES=	http://archives.fedoraproject.org/pub/archive/fedora/linux/updates/10/i386/ \
-		http://archives.fedoraproject.org/pub/archive/fedora/linux/updates/10/SRPMS/
+MASTER_SITES=	http://archives.fedoraproject.org/pub/archive/fedora/linux/updates/10/i386/:bin \
+		http://archives.fedoraproject.org/pub/archive/fedora/linux/updates/10/SRPMS/:src
 PKGNAMEPREFIX=	linux-f10-
-DISTNAME=	${LINUX_NAME}-${PORTVERSION}-${RPMVERSION}
+DISTFILES=	${LINUX_NAME}-${PORTVERSION}-${RPMVERSION}${EXTRACT_SUFX}:bin
 
 MAINTAINER=	emulation@FreeBSD.org
 COMMENT=	RPM of QT4 (Linux Fedora 10)
@@ -16,6 +16,7 @@
 LINUX_NAME=	qt
 LINUX_DIST_VER=	10
 RPMVERSION=	9.fc10
+SRC_DISTFILES=	${LINUX_NAME}-${PORTVERSION}-${RPMVERSION}${SRC_SUFX}:src
 USE_LDCONFIG=	yes
 PLIST=		${PKGDIR}/pkg-plist.${LINUX_RPM_ARCH}
 
--- linux-f10-qt45.diff ends here ---

If you think about other important ports with at least two sets of
MASTER_SITES (not the critical ones), let me know, and I'll try them.

Best regards,
-- 
Th. Thomas.
Comment 3 dfilter service freebsd_committer freebsd_triage 2014-03-18 22:19:05 UTC
Author: thierry
Date: Tue Mar 18 22:19:01 2014
New Revision: 348601
URL: http://svnweb.freebsd.org/changeset/ports/348601
QAT: https://qat.redports.org/buildarchive/r348601/

Log:
  Let the linux rpm ports use grouping rules, e.g. to download the
  binaries and the sources from differents MASTER_SITES.
  
  PR:		ports/186702
  Approved by:	netchild

Modified:
  head/Mk/bsd.linux-rpm.mk

Modified: head/Mk/bsd.linux-rpm.mk
==============================================================================
--- head/Mk/bsd.linux-rpm.mk	Tue Mar 18 21:53:40 2014	(r348600)
+++ head/Mk/bsd.linux-rpm.mk	Tue Mar 18 22:19:01 2014	(r348601)
@@ -95,7 +95,7 @@ PKGNAMEPREFIX?=			linux-
 # is not true.
 
 DISTFILES?=		${DISTNAME}${EXTRACT_SUFX}
-BIN_DISTFILES:=		${DISTFILES}
+BIN_DISTFILES:=		${_DISTFILES}
 SRC_DISTFILES?=		${DISTNAME}${SRC_SUFX}
 EXTRACT_ONLY?=		${BIN_DISTFILES}
 
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 4 Thierry Thomas freebsd_committer freebsd_triage 2014-03-18 22:21:49 UTC
State Changed
From-To: open->closed


Just committed!