From owner-freebsd-ports@FreeBSD.ORG Wed Dec 10 23:16:06 2008 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 C6FA5106564A for ; Wed, 10 Dec 2008 23:16:06 +0000 (UTC) (envelope-from wahjava@gmail.com) Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.188]) by mx1.freebsd.org (Postfix) with ESMTP id 39FF08FC1A for ; Wed, 10 Dec 2008 23:16:05 +0000 (UTC) (envelope-from wahjava@gmail.com) Received: by ti-out-0910.google.com with SMTP id a1so412662tib.3 for ; Wed, 10 Dec 2008 15:16:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :organization:references:x-face:x-uptime:x-url:x-openpgp-id :x-openpgp-fingerprint:x-os:x-mailer:x-mail-morse:x-attribution:date :in-reply-to:message-id:user-agent:face:mime-version:content-type; bh=hLm+lEdpbqh75eZuARUwl/ZgzzIjgQ75BJclPOLYHrc=; b=S6ZMsBcYLvVi61coMjcMnne/x+UFpSal8ar0QTw08lBiscqCdn3l3hcWOnq74P0C5N +2YFUcVlIJACjGprZy2ADRSk1/p7YZyebqjHt4y0aps5iCeVKNupJlJHn+3exZR7qGhI XVYmSrXgUBL8N7+7HqnUvjPjO90lgszoPkub4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:organization:references:x-face:x-uptime :x-url:x-openpgp-id:x-openpgp-fingerprint:x-os:x-mailer:x-mail-morse :x-attribution:date:in-reply-to:message-id:user-agent:face :mime-version:content-type; b=c5BrJd5WLaypE+oAQerAA9+Q19jKKiiNY1zReAC76UPBDpMN5yk/gus/JALtN38ltP adsUUMELdFQvNIwywr2xBGoxiG6BJ3oLTLoHdc6AP62scSZ8PIzJas/6v+xZBUXx0Ma3 2h2RB7GAMo0lKYlukJIeXyJexX1k0/sc1VFV0= Received: by 10.110.103.5 with SMTP id a5mr2704614tic.52.1228950964253; Wed, 10 Dec 2008 15:16:04 -0800 (PST) Received: from chateau.d.lf ([122.161.0.22]) by mx.google.com with ESMTPS id d1sm2602605tid.4.2008.12.10.15.15.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 10 Dec 2008 15:16:02 -0800 (PST) Sender: =?UTF-8?B?4KSG4KS24KWA4KS3IOCktuClgeCkleCljeCksiBBc2hpc2ggU2h1a2xh?= From: wahjava.ml@gmail.com (Ashish Shukla =?utf-8?B?4KSG4KS24KWA4KS3IA==?= =?utf-8?B?4KS24KWB4KSV4KWN4KSy?=) To: Dmitry Marakasov Organization: alt.religion.emacs References: <87fxkxjywk.fsf@chateau.d.lf> <20081209143052.GA29817@hades.panopticon> <873agxjn1x.fsf@chateau.d.lf> <20081209181354.GB29817@hades.panopticon> <87tz9di38u.fsf@chateau.d.lf> <20081209222042.GC29817@hades.panopticon> <8763lsi10m.fsf@chateau.d.lf> <20081210181125.GA86341@hades.panopticon> <87zlj3heor.fsf@chateau.d.lf> <20081210223522.GA6367@hades.panopticon> X-Face: )vGQ9yK7Y$Flebu1C>(B\gYBm)[$zfKM+p&TT[[JWl6:]S>cc$%-z7-`46Zf0B*syL.C]oCq[upTG~zuS0.$"_%)|Q@$hA=9{3l{%u^h3jJ^Zl; t7 X-Uptime: 04:30:20 up 15:44, 4 users, load average: 0.08, 0.10, 0.09 X-URL: http://wahjava.wordpress.com/ X-OpenPGP-ID: 762E5E74 X-OpenPGP-Fingerprint: 1E00 4679 77E4 F8EE 2E4B 56F2 1F2F 8410 762E 5E74 X-OS: GNU/Linux on Linux 2.6.25-gentoo-r7 kernel on x86_64 architecture X-Mailer: Gnus/5.13 (Oort 5.13) Emacs/23.0.60.1 (x86_64-pc-linux-gnu) X-Mail-Morse: .-- .- .... .--- .- ...- .- .--.-. --. -- .- .. .-.. .-.-.- -.-. --- -- X-Attribution: =?utf-8?B?4KSG4KS24KWA4KS3?= Date: Thu, 11 Dec 2008 04:47:48 +0530 In-Reply-To: <20081210223522.GA6367@hades.panopticon> (Dmitry Marakasov's message of "Thu, 11 Dec 2008 01:35:22 +0300") Message-ID: <87vdtrhb6r.fsf@chateau.d.lf> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJ1BMVEWpqal/f39tbW1jY2Md HR2goKCenp6UlJROTk7////9/f35+fnT09ORJdieAAACVklEQVQ4jXXUP2vbQBQA8AvUTkgz5OzY Z0iGWhpS6BSrkECn0mvx0MEJ6AjtYrfoBCVDlD8naJYmNlRfwZq8+mkKlIZaGpJSYmP7Q/XkJDrJ Td8i/H68u3vHPaPufwLdf32AMA4A6GcAgvAamY1pOJiDIFqicTwLswDhfr3uxfFtkAY/GFHPMwzD 8zpnACmIOnE6js7rQb+v4NJrG9od0C+QgpHMy5jBewV+UDSMWiw1Y4fWfyV7+NGFzDsYa3pth9LJ Q4XvXxFHcJRvHOmygn5NAEabnDcQQguarnfoiwSCJ99jmKKcphsZONmWsDK9Ro7cvZOCtQdg8nje egLhc2LNlkLmsezzTFUUy5w18ocox/f0LaLgJy0zO75zk+9pp85GAj36xjqhdI0y3tq2m4dqqcWX zQWBTz8L1irvolXV4J+3q7eCDgVnttjNq6X8H+9KOZsuNk1uCzx8pSp+E9HImfJOTLdcGqo+YKnG EIovizkEn48V7BO+ch2DXcD4ENSpWiU+q8hjjbgTBZCXnZtyj0Ws4Q1Q0B2WXFtYZo65Bbyeeldw RS6qFueM80LlLA29YlVwGRYvFD+kwI/0O+A2PlpOP9GwslUVciHuYGechuBTp922YiDZCrghTknm XSyOM+D3aoRZlo0Jb42zY7DN4p2x4AeZ+QAYutx1sHwTHzMT5cMNduQ9yW3GczN4KZ86kb0c9O8T yXDeFqpl2fryPEAYGXIlezAPXYh2NgVr/gvdoHIuDwuPwOhcWE8f8mmICq41eATkn8x0kuRTIKcB wE9+/QUtiiAnYcaN7wAAAABJRU5ErkJggg== MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Cc: FreeBSD Ports Mailing List Subject: Re: [PROPOSAL] Ports using SCM repositories as source instead of distfiles 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, 10 Dec 2008 23:16:06 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable Dmitry Marakasov writes: [snip] > --- Makefile > PREFIX?=3D /usr/local > DATADIR?=3D ${PREFIX}/share/foo > all: foo > foo: foo.c > cc -DDATAFILE=3D\"${DATADIR}/datafile.dat\" foo.c -o foo > install: foo datafile.dat > install -s foo ${PREFIX}/bin > install -d ${DATADIR} > install datafile.dat ${DATADIR} # Above statements should be changed to: install -s foo ${DESTDIR}${PREFIX}/bin install -d ${DESTDIR}${DATADIR} install datafile.dat ${DESTDIR}${DATADIR} > --- In above case the package list can be created with: $ find ${DESTDIR} -type f |sed -e "s[${DESTDIR}${PREFIX}/[[g" > As you can see, if this is installed with PREFIX=3D/var/tmp/foobar, > then moved to /usr and ran, it won't work, as it has DATAFILE > compiled in as "/var/tmp/foobar/share/foo/datafile.dat" instead of > "/usr/local/share/foo/datafile.dat". > To make it behave as we indend, you'll have to either hack Makefile > to distinguish DESTDIR and PREFIX, or do all installation in port's > Makefile by yourself. > We have around 20k ports, and it will be extremely hard task to > convert them all to such scheme (though afaik configure-based ones > should support this without modifications). The example above is > quite simple, the real life can be much more ugly, I assure. The > worst thing is that we won't be able to test ports automatically, > as the fact the port builds and installs successfully won't mean > that it will run without problems. > I wonder how debian and gentoo get around this problem... I understood what you're trying to say, but you're missing my point, so I'm explaining it in the following example: ,---- Quoting from my earlier example | % sudo make -C /usr/ports/editors/emacs-cvs install | ...checkout from CVS... | ...configuring... | ./configure --prefix=3D${LOCALBASE} <...and other configure options ...> That will compile Emacs with PREFIX=3D${LOCALBASE} (which is /usr/local by default) | ...configuration messages... | ...compilation begins... | make | ...compiling the files... | ...compilation over... | make install DESTDIR=3D/var/tmp/emacs This will install all files into DESTDIR=3D/var/tmp/emacs, with directory structure similar to following: /var/tmp/emacs /usr/local/bin/emacs /usr/local/share/emacs/23.0.60/... etc. | ...files being copied to /var/tmp/emacs directory... | ...package list creation... | ...package list finished...=20 | ...copying files into ${LOCALBASE}... And finally this will copy all files present in /var/tmp/emacs to ${LOCALBASE} for final installation with package we recorded earlier. | ...end copying files... | ...package installed successfully... `---- This is what Debian and Gentoo does. Remember we don't have to pass DESTDIR variable to 'make -C /usr/ports/editors/emacs-cvs' instead it will be passed to the 'gmake' process invoked by port's Makefile. If we pass DESTDIR to port's commandline, then it will install all dependencies in that chroot which is not desired, we simply care about the files installed by that port. Since there're already 20,000 ports we can't do it by default, so we've to hack some knob (like REQUIRES_DYNAMIC_INSTALLATION) which if defined will enable this behaviour. Following are some links: Debian's New Maintainer's Guide http://www.debian.org/doc/maint-guide/ch-modify.en.html#s-destdir Gentoo's Ebuild Quickstart Guide http://devmanual.gentoo.org/quickstart/index.html I hope I'm clear now. Thanks =2D-=20 Ashish Shukla --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAklATiEACgkQHy+EEHYuXnThEQCg0j5xVgU1unZTypWrQBTiai4/ JnIAoPI4nBnlB33Ybe/LnKDGSi6XgDC+ =C5pS -----END PGP SIGNATURE----- --=-=-=--