From owner-freebsd-ports@FreeBSD.ORG Wed Dec 10 13:58:03 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 643CF1065672 for ; Wed, 10 Dec 2008 13:58:03 +0000 (UTC) (envelope-from wahjava@gmail.com) Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.184]) by mx1.freebsd.org (Postfix) with ESMTP id D28C78FC08 for ; Wed, 10 Dec 2008 13:58:02 +0000 (UTC) (envelope-from wahjava@gmail.com) Received: by ti-out-0910.google.com with SMTP id a1so302810tib.3 for ; Wed, 10 Dec 2008 05:58:01 -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=DmePEwJ62e3lQypa4cPMpiNm/KpkTffojShD8c6Ust4=; b=VOKBhQer7lwKldg2Z+aBIxY3PO3uPxS9+oLqlhhvEyAmSNLQldtt4WvYpPoPMDOPnl Hvgr77rk5UIV4QBgbvezW3JRX5zMSxZYKaccOU6lC6HGl82FopCyS6I3s5QubSDWpmPR Km1h13spgwTY9Tg7/5JAqZ5B9+/+K2OsA8PHM= 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=S967XrSMr0pQ+TOW2t0li1RbjtSQbLjIxAeWjwSLEBSfGo1K30cGDuan4b8gbDrRDh 2dN6ugt4I3x2jB48CPJA6BZGASzkfPGFWVRfogZPi69G5NXHE2SxGu56qlq9gcEmRjQ4 8SKMajK5rgI4+pSibjrpbkQfibKv8/mxbI/bI= Received: by 10.110.2.2 with SMTP id 2mr2050427tib.5.1228917481589; Wed, 10 Dec 2008 05:58:01 -0800 (PST) Received: from chateau.d.lf ([122.161.0.36]) by mx.google.com with ESMTPS id d4sm658323tib.31.2008.12.10.05.57.56 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 10 Dec 2008 05:57:59 -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> 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: 18:46:42 up 6:00, 4 users, load average: 0.17, 0.33, 0.21 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: Wed, 10 Dec 2008 19:29:53 +0530 In-Reply-To: <20081209222042.GC29817@hades.panopticon> (Dmitry Marakasov's message of "Wed, 10 Dec 2008 01:20:42 +0300") Message-ID: <8763lsi10m.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 13:58:03 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable Dmitry Marakasov writes: [...] >> Maybe we can introduce a hack in ports system like by adding some >> variable like 'USES_DYNAMIC_PLIST=3Dyes' in Makefile, which fill let the >> port first installed with DESTDIR=3D/var/tmp/ports/${PORTNAME} and then a >> packing list is generated and then finally whole tree is moved to >> ${PREFIX}, hmm...? What do you say ? > Current DESTDIR implementation uses chroot and obviously requires > complete system installed in DESTDIR. Also installing a port will > install all dependencies in the chroot as well. The Debian package building system, also expects the package files in a directory named ${packageroot}/debian/${packagename}/ which you can install by doing 'make install DESTDIR=3Ddebian/${packagename}' in ${packageroot} directory (the directory where you've extracted the package tarball, similar to the FreeBSD's ${WRKSRC} directory. So, my idea is to specify "make -C ${WRKSRC} install DESTDIR=3D/var/tmp/${P= ORTNAME}" in the "install" target of port's Makefile, not to be confused with upstream package's Makefile. And I think you confused it with passing 'DESTDIR' variable to 'make' commandline to start port building procedure: Following is an example illustrating how port is going to be installed in the way I'm thinking: ,---- | % sudo make -C /usr/ports/editors/emacs-cvs install | ...checkout from CVS... | ...configuring... | ./configure --prefix=3D${LOCALBASE} <...and other configure options ...> | ...configuration messages... | ...compilation begins... | make | ...compiling the files... | ...compilation over... | make install DESTDIR=3D/var/tmp/emacs | ...files being copied to /var/tmp/emacs directory... | ...package list creation... | ...package list finished... | ...copying files into ${LOCALBASE}... | ...end copying files... | ...package installed successfully... `---- The package list can be created via he automated package-list creation method[1] documented in porters-handbook with a 'mtree' command executed in 'pre-install' to prepare the '/var/tmp/${PORTNAME}' prior to installing package. And to assure safety to this procedure, ports should be built with a separate unprivileged user 'portbuilder' whose job is to build ports and install them in '/var/tmp/${PORTNAME}', and create a temporary package list. And to perform the actual installation, the port process should switch to 'root' user. > There was proposal of another implementation that would behave as > you describe without chroot, but it would require too much work, > as most ports will need hacks so they install software into > ${DESTDIR}/${PREFIX}, but the software would think that it's installed > into ${PREFIX}. That is not even always possible, so the idea was > dropped. > Thus, the only reliable way to generate plist with standart tools > is using fat chroot. > My idea however is monitor all filesystem writes by port's make and all > descendant processes. That may be done with monitoring or replacing > syscalls and may be done with LD_PRELOAD or some *trace kernel > facilities. The former is what I'm currently experimenting with. This is also a cool way if something like this can be hacked ? How about using truss or other syscall tracing facilities, hmm..? Thanks for the links and replies. References: [1] - http://www.freebsd.org/doc/en/books/porters-handbook/plist-autoplist.= html =2D-=20 Ashish Shukla --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAkk/y18ACgkQHy+EEHYuXnRJtwCgmQYQkG6+J9rwmRP1bkJRjK3c bxsAoKRFvB+elVrhHc4uYxhmxZ7eOVai =3zgp -----END PGP SIGNATURE----- --=-=-=--