From owner-freebsd-ports@FreeBSD.ORG Mon Feb 13 08:25:31 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D1B31065674 for ; Mon, 13 Feb 2012 08:25:31 +0000 (UTC) (envelope-from rea@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id BFD4F8FC12 for ; Mon, 13 Feb 2012 08:25:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=codelabs.ru; s=two; h=Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=jbuIjbt4RdY/EcQzDiR59GgupiHMrrAG0FxL7TeSgCM=; b=ZCSw5B+zR+f3flFf2JrioT5qcx6M0lSMTd+JGFLRBYf3Hoei0KGsMqw+yE18FqfksVfc9hTBWpoOAj1V5+JVz4juRCNI8lcSl8vtOvoDKwoIy1M9sofPaSLCWtqh7Ln5tYZyWPGHGLx7wT8rVyMiIy98kwMyQobTi8CYxF1e5Ku3gheBOd/ZiYUKtUvzICLIASRiDJI5TtVxdyTnSaWF1u6QCN4z6Yca/WrCV3IHmI2FX6zrrs9j/h8grv7GlVmca0WO/jniYTZXWzV8Uqyg7/63rSoPrrX8ISl7Iy5da6LRxG+YSXLgdUPwYsCJRg8DmVy4B1PdDQcarkGJIl0QXA==; Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1RwrE0-000CSi-Vy; Mon, 13 Feb 2012 11:25:29 +0300 Date: Mon, 13 Feb 2012 12:25:26 +0400 From: Eygene Ryabinkin To: Bleakwiser Message-ID: References: <20110808091432.GA16138@goofy.cultdeadsheep.org> <1329119043376-5478416.post@n5.nabble.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="TdkiTnkLhLQllcMS" Content-Disposition: inline In-Reply-To: Sender: rea@codelabs.ru Cc: freebsd-ports@freebsd.org Subject: Re: [CFT] Hadoop preliminary port 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: Mon, 13 Feb 2012 08:25:31 -0000 --TdkiTnkLhLQllcMS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Sun, Feb 12, 2012 at 11:57:03PM -0800, Bleakwiser wrote: > On Mon, Feb 13, 2012 at 1:49 AM, Eygene Ryabinkin-2 [via FreeBSD] < > ml-node+s1045724n5478425h6@n5.nabble.com> wrote: > > Sun, Feb 12, 2012 at 11:44:03PM -0800, Bleakwiser wrote: > > > I know this isn't exactly the place for it but I really have no idea > > what to > > > do with this .diff file. > > > > Try > > {{{ > > cd /usr/ports > > fetch -o - http://people.freebsd.org/~clement/hadoop/hadoop-1.0.0.diff | > > patch -p1 > > }}} > > then go to the relevant port directory (devel/hadoop, I suppose) > > and build the port. > > Kidding right? No, I am dead serious. > patch -p1 isn't even mentioned in the man pages..... 'patch -p1' can't be mentioned on the man pages, because 'patch' is the utility and '-p1' is the argument to that utility. Invoke 'man patch' and look for '-p[number]'. > And again, i've ran, > > patch hadoop-1.0.0.diff > Nothing happens, just blank cursor. Well, it just happened that your mail reader broke the line starting with 'fetch -o -' into two. You should invoke the command {{{ fetch -o - http://people.freebsd.org/~clement/hadoop/hadoop-1.0.0.diff | pa= tch -p1 -E }}} with everything on one line: fetch should feed its output to the patch util= ity. By the way, I forgot the -E flag -- it could be needed too. > For starters it isn't really clear what I'm even supposed to be applying > the patch to. I think that the Wikipage article about patch is a good thing to start from, http://en.wikipedia.org/wiki/Patch_%28Unix%29 In a nutshell, since you're doing 'cd /usr/ports', patchfile contents speci= fy that diffs are relative to the ports directory, {{{ --- ports/devel/Makefile 30 Jan 2012 09:15:00 -0000 1.4819 +++ ports/devel/Makefile 1 Feb 2012 16:26:31 -0000 }}} and -p1 instructs 'patch' utility to strip one directory level =66rom the file names to be patched, you'll be patching every file that is mentioned in the diff, but without the leading 'ports/' prefix, and the base directory will be the $PWD (/usr/ports). If you really want to understand, what files will be patched, then here we go: {{{ $ fetch -qo - http://people.freebsd.org/~clement/hadoop/hadoop-1.0.0.diff |= grep -E '^(---|\+\+\+) ' | grep -v /dev/null | awk '{print $2;}' | sort | = uniq | sed -e's,^,/usr/,' /usr/ports/GIDs /usr/ports/UIDs /usr/ports/devel/Makefile /usr/ports/devel/hadoop/Makefile /usr/ports/devel/hadoop/distinfo /usr/ports/devel/hadoop/files/000.java_home.env.in /usr/ports/devel/hadoop/files/datanode.in /usr/ports/devel/hadoop/files/hadoop.in /usr/ports/devel/hadoop/files/jobtracker.in /usr/ports/devel/hadoop/files/namenode.in /usr/ports/devel/hadoop/files/patch-build.xml /usr/ports/devel/hadoop/files/patch-src__c++__libhdfs__hdfs.c /usr/ports/devel/hadoop/files/patch-src__c++__libhdfs__hdfsJniHelper.c /usr/ports/devel/hadoop/files/patch-src__native__Makefile.in /usr/ports/devel/hadoop/files/patch-src__native__configure /usr/ports/devel/hadoop/files/patch-src__native__configure.ac /usr/ports/devel/hadoop/files/patch-src__native__src__org__apache__hadoop__= io__nativeio__NativeIO.c /usr/ports/devel/hadoop/files/patch-src__native__src__org__apache__hadoop__= security__JniBasedUnixGroupsNetgroupMapping.c /usr/ports/devel/hadoop/files/pkg-deinstall.in /usr/ports/devel/hadoop/files/pkg-install.in /usr/ports/devel/hadoop/files/secondarynamenode.in /usr/ports/devel/hadoop/files/tasktracker.in /usr/ports/devel/hadoop/pkg-descr /usr/ports/devel/hadoop/pkg-plist }}} Again, the command, starting from 'fetch' and ending on 'sed' must be on a single line. --=20 Eygene Ryabinkin ,,,^..^,,, [ Life's unfair - but root password helps! | codelabs.ru ] [ 82FE 06BC D497 C0DE 49EC 4FF0 16AF 9EAE 8152 ECFB | freebsd.org ] --TdkiTnkLhLQllcMS Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iF4EABEIAAYFAk84yPYACgkQFq+eroFS7PuSqgD+IQs+a58ABU0Kl7S48wD4HOYi QG0uU0ybpzc2C9+J89YA/0UJ+km69efD2WLOYR/gloU1IKfh0YTgW6gIJ9fuNQuQ =5ELi -----END PGP SIGNATURE----- --TdkiTnkLhLQllcMS--