Date: Wed, 10 Dec 2008 19:29:53 +0530 From: wahjava.ml@gmail.com (Ashish Shukla =?utf-8?B?4KSG4KS24KWA4KS3IA==?= =?utf-8?B?4KS24KWB4KSV4KWN4KSy?=) To: Dmitry Marakasov <amdmi3@amdmi3.ru> Cc: FreeBSD Ports Mailing List <freebsd-ports@freebsd.org> Subject: Re: [PROPOSAL] Ports using SCM repositories as source instead of distfiles Message-ID: <8763lsi10m.fsf@chateau.d.lf> In-Reply-To: <20081209222042.GC29817@hades.panopticon> (Dmitry Marakasov's message of "Wed, 10 Dec 2008 01:20:42 %2B0300") 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>
next in thread | previous in thread | raw e-mail | index | archive | help
--=-=-= 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----- --=-=-=--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8763lsi10m.fsf>