From owner-freebsd-ports@FreeBSD.ORG Wed Nov 4 18:23:23 2009 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E13FC1065748 for ; Wed, 4 Nov 2009 18:23:23 +0000 (UTC) (envelope-from eitanadlerlist@gmail.com) Received: from mail-yx0-f171.google.com (mail-yx0-f171.google.com [209.85.210.171]) by mx1.freebsd.org (Postfix) with ESMTP id A147D8FC16 for ; Wed, 4 Nov 2009 18:23:23 +0000 (UTC) Received: by yxe1 with SMTP id 1so6865715yxe.3 for ; Wed, 04 Nov 2009 10:23:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:message-id :subject:to:content-type; bh=kJb/Y2AQtD+517eVBq8efYwxoHtBhGgN2Hq2EyVm/fs=; b=cRccCCQD3YtwXTT3I7+7wNLc8/+Ss9gttDJmZ2YfJt2t8YGqZklZtIQRBT4/C6UXxV ErwZ2odcVM+S9ocVyDl3EAwgoqncI8Q/43nD8YLP3oNI/LmCFntZYGEgUgEkokkqJKGU M4M49iiZVWZX9uSq8Y17oIFCVqm7/0pQF2634= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=DhIrUl3AI9W3uooFD61Ro/u+QIJMkidug6xgli1YJapB9NhKWYslX+XSYhKOA6gzU+ wIwP5ERnjC8P6MyrAnV0ubRf1dt9ztGx4ohykW3tiJloMz9xIZCdmiG+EOasu+1RpceJ rS5IOSU5IRKqKzGnariWKzc1fLJbDcLx6iGBM= MIME-Version: 1.0 Received: by 10.239.156.193 with SMTP id n1mr175710hbc.187.1257359002093; Wed, 04 Nov 2009 10:23:22 -0800 (PST) From: Eitan Adler Date: Wed, 4 Nov 2009 20:23:02 +0200 Message-ID: To: ports@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: using svn to fetch for ports (yet again!) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2009 18:23:24 -0000 I have a small patch to bsd.port.mk which would allow a port to replace its do-fetch with a svn export of a /specific revision/ of a remote repo. I know there have been some attempts at trying this before and from what I've been reading I addressed some of the major concerns: 1) Past attempts didn't include a basic implementation. 2) Past attempts didn't allow for a specific revision number and thus possibly causing security issues 3) Subversion does not have to be part of the base system for my patch to work Allowing the port to fetch from svn is beneficial for a number of reasons some of which are listed below 1) Many project's only or main means of distribution is svn (I'm thinking of mplayer) 2) It is easier for the port maintainer to update the port 3) It is easy for a user to quickly switch versions (outside of the ports system) without the need for lots o knowledge about the ports system Some of the problems: 1) Its harder if not impossible for freeBSD to mirror the port's source (I'm sure I could easily code a svn-to-tarball script but who knows if the svn build servers want svn) 2) Many users may want the program they are installing but not svn 3) What about SCM's other than svn? --- bsd.old.port.mk 2009-11-04 19:42:57.000000000 +0200 +++ bsd.port.mk 2009-11-04 19:59:10.000000000 +0200 @@ -1694,6 +1694,10 @@ MANCOMPRESSED?= no .endif This is a patch to bsd.port.mk which adds support for SVN_REV and SVN_FETCH +.if defined(SVN_FETCH) +FETCH_DEPENDS+= svn:${PORTSDIR}/devel/subversion +.endif + .if defined(PATCHFILES) .if ${PATCHFILES:M*.zip}x != x PATCH_DEPENDS+= unzip:${PORTSDIR}/archivers/unzip @@ -3435,6 +3439,10 @@ .if !target(do-fetch) do-fetch: +.if defined(SVN_FETCH) + ${MKDIR} ${WRKDIR} + svn export -r ${SVN_REV} ${SVN_PATH} ${WRKSRC} +.else @${MKDIR} ${_DISTDIR} @cd ${_DISTDIR};\ ${_MASTER_SITES_ENV} ; \ @@ -3503,7 +3511,9 @@ ${ECHO_MSG} "=> port manually into ${_DISTDIR} and try again."; \ exit 1; \ fi; \ - done + done +.endif + .if defined(PATCHFILES) @cd ${_DISTDIR};\ ${_PATCH_SITES_ENV} ; \