From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 20 15:38:59 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E56A106566B for ; Thu, 20 Mar 2008 15:38:59 +0000 (UTC) (envelope-from roam@ringlet.net) Received: from straylight.ringlet.net (nat98.cnsys.bg [85.95.80.98]) by mx1.freebsd.org (Postfix) with SMTP id E67DA8FC1A for ; Thu, 20 Mar 2008 15:38:58 +0000 (UTC) (envelope-from roam@ringlet.net) Received: (qmail 28576 invoked by uid 1000); 20 Mar 2008 15:23:14 -0000 Date: Thu, 20 Mar 2008 17:23:14 +0200 From: Peter Pentchev To: Ivan Voras Message-ID: <20080320152314.GA1586@straylight.m.ringlet.net> Mail-Followup-To: Ivan Voras , freebsd-ports@freebsd.org, freebsd-hackers@freebsd.org References: <20080313210242.GA55395@hades.panopticon> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tKW2IUtsqtDRztdT" Content-Disposition: inline In-Reply-To: <20080313210242.GA55395@hades.panopticon> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-hackers@freebsd.org, freebsd-ports@freebsd.org Subject: Re: Transferring ports X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Mar 2008 15:38:59 -0000 --tKW2IUtsqtDRztdT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 14, 2008 at 12:02:42AM +0300, Dmitry Marakasov wrote: > * Ivan Voras (ivoras@freebsd.org) wrote: > > Is there a utility that would do that, and if not, does anyone have the > > time to write one? >=20 > Actually, I've already had an idea of utility with pretty similar > functionality for a long time. The utility would copy directory > hierarchies recursively based on file include/exclude list, like this: >=20 > +/{etc,bin,sbin,lib} > +/usr > -/usr/local > +/usr/local/{bin,sbin,libexec,share,lib} > -/usr/share/locale > +/usr/share/locale/ru_RU* >=20 > so `my_cool_copy_utility / /path/to/jail` will copy /etc,/bin,/sbin,/lib > and /usr dirs to jail, but in /usr/share/locale will only copy > russian locales, but no others, and in usr/local it won't copy > man, include and other dirs not needed in a jail. >=20 > The purpose is similar - creating jails out of host system in fast > and easy way, possibility to strip everything unneeded (useful for > secure minimal jails or flash/livecd/embedded installations of > minimal size) and add something extra, like stuff from /usr/local > without installing full packages in a jail, or, say, copying over > additional tree of jail-specific changes (mostly stuff under /etc > and /usr/local/etc). >=20 > Such an utility is something I still might start working on. Errrrrr... why not use rsync for that? It works locally, too - I use it to copy directories all over the place all the time. Come to think of it... oh, just go install net/rsync, take a look at its manual page and the "FILTER RULES" section in particular - it even supports rules with prefixes, "-" for exclude, "+" for include, just like you want them :) Well, okay, you might need to list separate directories on separate lines (it doesn't seem to support the {bin,sbin} syntax), but other than that, it seems to fit your requirements pretty well :) G'luck, Peter --=20 Peter Pentchev roam@ringlet.net roam@cnsys.bg roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 This sentence claims to be an Epimenides paradox, but it is lying. --tKW2IUtsqtDRztdT Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.8 (FreeBSD) iEYEARECAAYFAkfigWIACgkQ7Ri2jRYZRVPOoQCghV7wgK5dULUf/OsFVgvOkABG G6oAmwRpUG8K8+fnJenOC4mWEccALUbe =NDnj -----END PGP SIGNATURE----- --tKW2IUtsqtDRztdT--