From mranner@dwarf.jawa.at  Sat Feb 14 02:31:51 2004
Return-Path: <mranner@dwarf.jawa.at>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 3866316A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 14 Feb 2004 02:31:51 -0800 (PST)
Received: from dwarf.jawa.at (81-223-113-157.dynamic.adsl-line.inode.at [81.223.113.157])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 27E8A43D1F
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 14 Feb 2004 02:31:50 -0800 (PST)
	(envelope-from mranner@dwarf.jawa.at)
Received: from dwarf.jawa.at (localhost.jawa.at [127.0.0.1])
	by dwarf.jawa.at (8.12.9p2/8.12.9) with ESMTP id i1EAUwqa031280
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 14 Feb 2004 11:30:59 +0100 (CET)
	(envelope-from mranner@dwarf.jawa.at)
Received: (from root@localhost)
	by dwarf.jawa.at (8.12.9p2/8.12.9/Submit) id i1EAUwaE031279;
	Sat, 14 Feb 2004 11:30:58 +0100 (CET)
	(envelope-from mranner)
Message-Id: <200402141030.i1EAUwaE031279@dwarf.jawa.at>
Date: Sat, 14 Feb 2004 11:30:58 +0100 (CET)
From: Michael Ranner <mranner@inode.at>
Reply-To: Michael Ranner <mranner@inode.at>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Mk file bsd.linux.rpm.mk supporting Linux RPM based ports
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         62829
>Category:       ports
>Synopsis:       [patch] Mk file bsd.linux.rpm.mk supporting Linux RPM based ports
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    portmgr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 14 02:40:09 PST 2004
>Closed-Date:    Tue Jun 20 20:08:20 GMT 2006
>Last-Modified:  Tue Jun 20 20:08:20 GMT 2006
>Originator:     Michael Ranner
>Release:        FreeBSD 4.9-RELEASE-p1 i386
>Organization:
>Environment:
System: FreeBSD dwarf.jawa.at 4.9-RELEASE-p1 FreeBSD 4.9-RELEASE-p1 #4: Sat Nov 29 11:09:14 CET 2003 root@dwarf.jawa.at:/usr/src/sys/compile/DWARF i386


	
>Description:
	Mk file bsd.linux.rpm.mk supporting Linux RPM based ports

	There is some redundant code in some Linux RPM based ports, like linux-gtk
	This new makefile makes it easier to integrate new ports for Linux RPM's

	I like to bring in a port for DBDesigner4 which needs some new RPM's, and
	this patch should make life for RPM port maintainers easier.
>How-To-Repeat:
	cd /usr/ports && patch <patchfile
>Fix:

--- patch-bsd-linux-rpm-mk begins here ---
diff -crN Mk.orig/bsd.linux.rpm.mk Mk/bsd.linux.rpm.mk
*** Mk.orig/bsd.linux.rpm.mk	Thu Jan  1 01:00:00 1970
--- Mk/bsd.linux.rpm.mk	Sat Feb 14 11:17:02 2004
***************
*** 0 ****
--- 1,61 ----
+ #
+ # bsd.linux.rpm.mk - Support for Linux-RPM-based ports.
+ #
+ # Created by:	Michael Ranner <mranner@inode.at>
+ # Based on:		emulators/linux_base by marcel@FreeBSD.org
+ #				& multimedia/xmovie by sanpei@sanpei.org
+ #				& x11-toolkits/linux-gtk
+ #
+ # For FreeBSD committers:
+ # Please send all suggested changes to the maintainer instead of committing
+ # them to CVS yourself.
+ #
+ # $FreeBSD$
+ #
+ # Adding 'USE_LINUX_RPM=yes' to a port includes this Makefile after bsd.ports.pre.mk.
+ #
+ # The port can set these options in its Makefile before bsd.ports.pre.mk:
+ #
+ # RPM_SET=			- Name of the Linux RPM
+ # BASEVERSION=		- Version of the linux_base port
+ #
+ 
+ Linux_RPM_Include_MAINTAINER=	ports@FreeBSD.org
+ 
+ MASTER_SITES?=	${RPM_MIRRORS:S/__DIR__/${STDDIR}/g}
+ PKGNAMEPREFIX=	linux-
+ DISTFILES=	${RPM_SET}
+ 
+ BUILD_DEPENDS?=	rpm:${PORTSDIR}/archivers/rpm
+ USE_LINUX_PREFIX=	yes
+ 
+ ONLY_FOR_ARCHS?=	i386 alpha
+ DIST_SUBDIR=	rpm
+ EXTRACT_ONLY=
+ NO_BUILD=	yes
+ NO_FILTER_SHLIBS=	yes
+ PLIST?=		${PKGDIR}/pkg-plist.${MACHINE_ARCH}
+ MD5_FILE?=	${MASTERDIR}/distinfo.${MACHINE_ARCH}
+ 
+ # Let's avoid hardcoding 'en' as the language.
+ LANG?=		en
+ # Set the version of linux_base
+ BASEVERSION?=	7.1
+ RPM_MIRRORS=	\
+ 	ftp://ftp.redhat.com/pub/redhat/__DIR__/ \
+ 	ftp://ftp.nluug.nl/site/ftp.redhat.com/redhat/__DIR__/ \
+ 	ftp://ftp.mirror.ac.uk/sites/ftp.redhat.com/pub/redhat/__DIR__/
+ STDDIR=		linux/${BASEVERSION}/${LANG}/os/${MACHINE_ARCH}/RedHat/RPMS
+ UPDDIR=		linux/updates/${BASEVERSION}/${LANG}/os/${MACHINE_ARCH}
+ DBPATH=		/var/lib/rpm
+ RPMFLAGS=	--ignoreos --root ${PREFIX} --dbpath ${DBPATH} \
+ 		--nodeps --replacepkgs
+ RPMDIR=		${DISTDIR}/${DIST_SUBDIR}
+ 
+ .if !target(do-install)
+ do-install:
+ 	@for R in ${RPM_SET}; do \
+ 		${ECHO_MSG} $$R; \
+ 		rpm -U ${RPMFLAGS} ${RPMDIR}/$$R || true ; \
+ 	done
+ .endif
diff -crN Mk.orig/bsd.port.mk Mk/bsd.port.mk
*** Mk.orig/bsd.port.mk	Sat Feb 14 11:22:13 2004
--- Mk/bsd.port.mk	Sat Feb 14 11:14:47 2004
***************
*** 1227,1232 ****
--- 1227,1236 ----
  .include "${PORTSDIR}/Mk/bsd.php.mk"
  .endif
  
+ .if defined(USE_LINUX_RPM)
+ .include "${PORTSDIR}/Mk/bsd.linux.rpm.mk"
+ .endif
+ 
  .if defined(USE_PYTHON)
  .include "${PORTSDIR}/Mk/bsd.python.mk"
  .endif
--- patch-bsd-linux-rpm-mk ends here ---


>Release-Note:
>Audit-Trail:

From: Michael Ranner <mranner@inode.at>
To: freebsd-gnats-submit@FreeBSD.org, mranner@inode.at
Cc:  
Subject: Re: ports/62829: Mk file bsd.linux.rpm.mk supporting Linux RPM based ports
Date: Sat, 14 Feb 2004 11:49:29 +0100

 Some minor tweak with this patch
 
 USE_LINUX_PREFIX=     yes
 
 must be defined in Makefile of the port instead of bsd.linux.rpm.mk, or
 bsd.linux.rpm.mk must be included before
 
 .if defined(USE_LINUX_PREFIX)
 USE_LINUX=      yes
 .endif
 
 in bsd.port.mk
 
 -- 
 /\/\ichael Ranner
 
 mranner@inode.at - mranner@jawa.at - mranner@bugat.at
 -----------------------------------------------------
    BSD Usergroup Austria - http://www.bugat.at/
 
 -----BEGIN GEEK CODE BLOCK-----
 GIT/CS/AT dx(-) s+:(++:) a- C++ UBLVS++++$ P++>+++$ L-(+)$ E---
 W+++$ N+(++) o-- K- w--()$ O-(--) M@ V-(--) PS+>++ PE(-) Y+ PGP(-)
 t+ 5+ X+++(++++) R* tv++ b+(++) DI++ D-(--) G- e h--(*) r++ y?
 ------END GEEK CODE BLOCK------
Responsible-Changed-From-To: freebsd-ports-bugs->portmgr 
Responsible-Changed-By: pav 
Responsible-Changed-When: Sat Feb 14 05:58:03 PST 2004 
Responsible-Changed-Why:  
Could someone from portmgr or maybe trevor have a look into this? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=62829 

From: Oliver Eikemeier <eikemeier@fillmore-labs.com>
To: freebsd-gnats-submit@FreeBSD.org, mranner@inode.at
Cc:  
Subject: Re: ports/62829: Mk file bsd.linux.rpm.mk supporting Linux RPM based
 ports
Date: Tue, 16 Mar 2004 10:18:46 +0100

 I'm not a linux guy, so maybe my comments on this are wrong, but:
 
 - devel/linux_devtools* does things a little more FreeBSDish
 
 - wir have MASTER_SITE_REDHAT_LINUX, wich should work - MASTER_SITES_*
   do not belong into bsd.port.mk
 
 - DBPATH and BASEVERSION are a little to generic
 
 - IMHO there is no reason to split distinfo in two files by default
 
 - LANG could conflict with environ(7). Moreover, I'm not sure what happens
   when is set LANG=fr. In any case this should be reflected in PKGNAMEPREFIX
   or PKGNAMESUFFIX
 
 - BUILD_DEPENDS?= is not very robust
 
 - generally, this would be the first USE_ that overwrites a do-* target
   unconditionally. gnustep, python and ruby do it only on demand. I guess
   bsd.ruby.mk provides a nice example here.

From: Michael Ranner <michael.ranner@jawa.at>
To: Oliver Eikemeier <eikemeier@fillmore-labs.com>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: ports/62829: Mk file bsd.linux.rpm.mk supporting Linux RPM based ports
Date: Tue, 16 Mar 2004 10:29:31 +0100

 Am Dienstag, 16. M=E4rz 2004 10:18 schrieb Oliver Eikemeier:
 > I'm not a linux guy, so maybe my comments on this are wrong, but:
 >
 > - devel/linux_devtools* does things a little more FreeBSDish
 >
 > - wir have MASTER_SITE_REDHAT_LINUX, wich should work - MASTER_SITES_*
 >   do not belong into bsd.port.mk
 >
 > - DBPATH and BASEVERSION are a little to generic
 >
 > - IMHO there is no reason to split distinfo in two files by default
 >
 > - LANG could conflict with environ(7). Moreover, I'm not sure what happens
 >   when is set LANG=3Dfr. In any case this should be reflected in
 > PKGNAMEPREFIX or PKGNAMESUFFIX
 >
 > - BUILD_DEPENDS?=3D is not very robust
 >
 > - generally, this would be the first USE_ that overwrites a do-* target
 >   unconditionally. gnustep, python and ruby do it only on demand. I guess
 >   bsd.ruby.mk provides a nice example here.
 
 Ok, I will consider your points and take a look in devel/linux_devtools* and
 bsd.ruby.mk and will change bsd.linux.rpm.mk and my last to ports according=
  to=20
 it.
 
 I will contact you again. Thanks for your input.
 
 =2D-=20
 /\/\ichael Ranner
 
 mranner@jawa.at - mranner@bitonline.cc - webmaster@mariazell.at
 =2D---------------------------------------------------------------------
 JAWA Management Software GmbH - http://www.jawa.at/
   Liebenauer Hauptstrasse 2oo - A-8041 Graz
         Tel +43 316 403274 21 - Fax +43 316 403274 10
 =2D---------------------------------------------------------------------
              Mariazell Online - http://www.mariazell.at/
 =2D---------------------------------------------------------------------
State-Changed-From-To: open->feedback 
State-Changed-By: eik 
State-Changed-When: Sat Jul 24 14:12:22 CEST 2004 
State-Changed-Why:  
This PR should be in feedback state since March. 

Any progress on the submitters side? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=62829 

From: Michael Ranner <mranner@inode.at>
To: freebsd-gnats-submit@FreeBSD.org,
	Oliver Eikemeier <eik@FreeBSD.org>
Cc:  
Subject: Re: ports/62829: Mk file bsd.linux.rpm.mk supporting Linux RPM based ports
Date: Fri, 30 Jul 2004 21:03:39 +0200

 #
 # bsd.linux.rpm.mk - Support for Linux-RPM-based ports.
 #
 # Created by:	Michael Ranner <mranner@inode.at>
 # Based on:		emulators/linux_base by marcel@FreeBSD.org
 #				& multimedia/xmovie by sanpei@sanpei.org
 #				& x11-toolkits/linux-gtk
 #				& devel/linux_devtools*
 #
 # For FreeBSD committers:
 # Please send all suggested changes to the maintainer instead of committing
 # them to CVS yourself.
 #
 # $FreeBSD$
 #
 # Adding 'USE_LINUX_RPM=yes' to a port includes this Makefile after 
 bsd.ports.pre.mk.
 #
 # The port can set these options in its Makefile before bsd.ports.pre.mk:
 #
 # If you like to use REDHAT RPM's
 #
 # MASTER_SITES=	${MASTER_SITE_REDHAT_LINUX}
 # MASTER_SITE_SUBDIR= ${REDHAT_RPM_SUBDIR}
 #
 # RPM_BASEVERSION=	- Version of linux_base port RPM will need
 # USE_RPM_INSTALL=	- yes if you like this Makefile to install your RPM
 #
 
 Linux_RPM_Include_MAINTAINER=	ports@FreeBSD.org
 
 DIST_SUBDIR?=	rpm
 EXTRACT_SUFX=	.rpm
 PKGNAMEPREFIX?=	linux-
 
 EXTRACT_DEPENDS=	rpm:${PORTSDIR}/archivers/rpm
 
 EXTRACT_ONLY=
 NO_BUILD=	yes
 NO_FILTER_SHLIBS=	yes
 ONLY_FOR_ARCHS?=	i386 alpha
 PLIST?=		${PKGDIR}/pkg-plist.${MACHINE_ARCH}
 USE_LINUX_PREFIX=	yes
 
 # Let's avoid hardcoding 'en' as the language.
 LANG?=		en
 
 # Set the version of linux_base
 RPM_BASEVERSION?=	7.1
 
 # RedHat RPM's
 REDHAT_RPM_SUBDIR?=	${RPM_BASEVERSION}/${LANG}/os/${MACHINE_ARCH}/RedHat/RPMS
 REDHAT_RPM_UPDDIR?=	updates/${RPM_BASEVERSION}/${LANG}/os/${MACHINE_ARCH}
 
 RPM_DBPATH=	/var/lib/rpm
 RPM?=		LC_ALL=C rpm
 RPMFLAGS?=	--ignoreos --root ${PREFIX} --dbpath ${RPM_DBPATH} \
 		--nodeps --replacepkgs
 RPMDIR=		${DISTDIR}/${DIST_SUBDIR}
 
 .if defined(USE_RPM_INSTALL)
 do-install:
 #
 # Install all packages
 	@for R in ${DISTFILES}; do \
 		${ECHO_MSG} $$R; \
 		${RPM} -U ${RPMFLAGS} ${RPMDIR}/$$R; \
 	done
 #
 # Install updates
 	@for R in ${PATCHFILES}; do \
 		${ECHO_MSG} $$R; \
 		${RPM} -U ${RPMFLAGS} ${RPMDIR}/$$R; \
 	done
 .endif
State-Changed-From-To: feedback->closed 
State-Changed-By: linimon 
State-Changed-When: Tue Jun 20 20:03:40 UTC 2006 
State-Changed-Why:  
It appears after you did the work on this, a much more complete set of 
patches was accepted as part of ports/90031 and committed.  I apologize for 
having let your work on this go by the wayside over the course of the time 
since you submitted it.  I'm hoping that this year will be the year that 
portmgr can finally catch up with some of the infrastructure PRs. 

Thanks for the submission. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=62829 
>Unformatted:
