[PC-BSD Testing] [PATCH] [PORTJAIL] Add option to download portjail content

Kris Moore kris at pcbsd.org
Wed Oct 19 12:03:29 PDT 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/19/11 07:33, Lars Engels wrote:
> On Tue, Oct 18, 2011 at 10:51:03PM +0200, Lars Engels wrote:
>> On Tue, Oct 18, 2011 at 03:15:37PM -0400, Kris Moore wrote:
>>>
>>> On 10/18/11 14:59, Lars Engels wrote:
>>>> On Tue, Oct 18, 2011 at 01:49:13PM -0400, Kris Moore wrote:
>>>>>
>>>>> On 10/18/11 09:22, Lars Engels wrote:
>>>>>> Hi all,
>>>>>>
>>>>>> attached you find a patch that allows one to download and extract a
>>>>>> portjail from FreeBSD's mirrors.
>>>>>> It offers the user to build or download the portjail. Sample output:
>>>>>>
>>>>>> engels at pts/1 # portjail start
>>>>>> Error: The portjail is not yet installed! Please run 'portjail
init' as
>>>>> root.
>>>>>> Do you want to run it now? [y|n] y
>>>>>> Do you like to download a pre-compiled base jail from a FreeBSD
>>> mirror via
>>>>>> FTP/HTTP or do you like to build one from source? Enter d for
download or
>>>>>> b for build from source: [d/b] d
>>>>>>
>>>>>> You may enter a mirror server manually, else ftp.freebsd.org is used:
>>>>> ftp4.de.freebsd.org
>>>>>>
>>>>>> Which protocol do you want to use? [ftp/http] http
>>>>>>
>>>>>> - 100% of 53 MB 224 kBps 00m00s
>>>>>>
>>>>>> Portjail setup finished! Please run 'portjail start' to enable the
jail.
>>>>>>
>>>>>> Total time : 4:18.46s
>>>>>> CPU utilisation (percentage) : 18.5%
>>>>>>
>>>>>>
>>>>>> As you can see, this was 4:18 minutes with 224kBps, much faster than
>>>>> building the portjail
>>>>>> from scratch. :)
>>>>>>
>>>>>> I have only tested it on amd64, please also test it on i386.
>>>>>>
>>>>>> Cheers
>>>>>> Lars
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Testing mailing list
>>>>>> Testing at lists.pcbsd.org
>>>>>> http://lists.pcbsd.org/mailman/listinfo/testing
>>>>>
>>>>> Lars,
>>>>>
>>>>> Take a look here:
>>>>>
>>>>>
>>>
http://trac.pcbsd.org/browser/pcbsd/current/system-overlay/usr/local/share/pcbsd/scripts/portjail.sh
>>>>>
>>>>> I added something similar recently, which fetches the world environment
>>>>> from the PC-BSD mirrors. Your patch looks more in-depth though,
allowing
>>>>> source builds if the user wants it. Can you re-gen it from the current
>>>>> version in SVN?
>>>>
>>>> Oh, great minds think alike. ;-)
>>>>
>>>> I'll see what I can do.
>>>> Would it be possible to compress the archives with xz(1) instead of
>>>> bzip2(1)? The resulting archives should be significant smaller.
>>>>
>>>>
>>>
>>> I switched it to using xz a while back, but the file extensions are all
>>> still .tbz. I will need to go through and change those in the future.
>>
>> I see. Good to know.
>>
>> Do you think the merged scripts can still make it into 9.0 or do you
>> like to wait until 9.1?
>
> This became an almost complete re-write. :)
>
> New features: restart, status, delete. Building from scratch and
> downloading is supported. Should also work on a vanilla FreeBSD, but I
> still have to test that.
>
> http://bsd-geek.de/FreeBSD/portjail.sh
>
>
> Please test! :)
>

Did some testing of it here, seems to function good :) Want me to commit it?

BTW, for 9.1 I plan on merging the "Warden" into the base system. What
do you think about having it able to create regular jails and then "port
jails"? That way you can easily create multiple sandbox environments for
running desktop ports trees.

- -- 
Kris Moore
PC-BSD Software
iXsystems
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOnx8BAAoJEH/cIgwwV3zXpPIH/3OiacqxRzLsjG36Nn422kze
r37VAPERuWlBMEsDw4e3VU/QnT1sRhkHIkP1ai1cFkUdxgSfTkmVn/MGpQRLCyuZ
BvtiFl/nA6GNDW8rtEzKlVwSKp7vsrqkk0zO30fP5S47xmYFwG7U5v0ZOGJ6thxn
YLDk6krkP0q4iK99lffwst7SAPGOUlTCkKKlWfsfznotfMmp2ESiojpKLF8idX2B
5gDwmEWxPcmnBBml58/ClWHvvoMYjWEluAAtyH4mai/9MRrP/+ELolblNNq44hq8
IF8sX4NAEJzBIJLcjRN9z8ObVUVBNk6mT032j+iMDp0yoYm//OyRh4s0yuNEskQ=
=mUwZ
-----END PGP SIGNATURE-----



More information about the Testing mailing list