Reply
 
Thread Tools Display Modes
  #1  
Old 05-06-2010, 05:32 PM
purgatori purgatori is offline
Senior Member
 
Join Date: May 2010
Posts: 234
Thanks: 6
Thanked 15 Times in 14 Posts
Default How Important is it to Use the Portsjail?
I found the whole portsjail thing to be rather confusing, so I ended up installing ports via the standard method documented in FreeBSD. I haven't encountered any problems thus far, but if I continue to do this, am I liable to bork my system?
Reply With Quote
  #2  
Old 05-06-2010, 05:35 PM
kmoore134's Avatar
kmoore134 kmoore134 is offline
Administrator
 
Join Date: May 2005
Location: Knoxville, TN
Posts: 2,568
Thanks: 0
Thanked 163 Times in 127 Posts
Default How Important is it to Use the Portsjail?
Its possible for sure. If install some app which requires the new
libpng, or some other very common lib, it may end up forcing you to
re-compile other apps, like QT, KDE, or Xorg, and cause you some major
grief

The ports-jail is a safe way to experiment with and run ports, without
the worry of breaking your actual desktop. It does require one extra
command, but once you get used to it, it works fairly well
__________________
----
Kris Moore
PC-BSD Founder
Reply With Quote
  #3  
Old 05-06-2010, 08:48 PM
purgatori purgatori is offline
Senior Member
 
Join Date: May 2010
Posts: 234
Thanks: 6
Thanked 15 Times in 14 Posts
Default
Ah... that would be bad

What is the one extra command I need to use when installing ports? Running 'portjail' by itself does nothing except spit out some info on the commands available, and portjail start results in:

Code:
ifconfig: create: bad value
mount_nullfs: Resource deadlock avoided
mount_nullfs: Resource deadlock avoided
mount_nullfs: Resource deadlock avoided
jail: jail "portjail" already exists
On the other hand, if I run 'portjail console' and then cd into /usr/ports there is no longer any subdirs there from which to install ports :-S

(This is what I meant about it being confusing)

EDIT: Ok, I followed the instructions given by Fatmice here and just wanted to know if the alterations I made will interfere with future PCBSD upgrades? Furthermore, does the 'jailing' work retroactively on applications that I have already installed through ports?

Last edited by purgatori; 05-07-2010 at 01:38 AM.
Reply With Quote
  #4  
Old 05-07-2010, 01:25 AM
jnixon's Avatar
jnixon jnixon is offline
Administrator
 
Join Date: May 2008
Location: Sacramento, CA
Posts: 37
Thanks: 0
Thanked 2 Times in 1 Post
Send a message via Yahoo to jnixon Send a message via Skype™ to jnixon
Default
Click the menu launcher and search for 'Ports Console', then click the Ports Console icon.

If there's no ports tree, type:
# portsnap fetch extract

Now try (as root):
# cd /usr/ports/x11/xeyes && make install
# rehash
# xeyes

Try it out ;-)
Reply With Quote
  #5  
Old 05-07-2010, 01:26 AM
kmoore134's Avatar
kmoore134 kmoore134 is offline
Administrator
 
Join Date: May 2005
Location: Knoxville, TN
Posts: 2,568
Thanks: 0
Thanked 163 Times in 127 Posts
Default How Important is it to Use the Portsjail?
Well, first of all those error messages are because your portjail is
already running. It starts with the system by default.

Here's normally what you need to do:

Run "portjail console" as a user, then "su -" within it, to get root
access.

By default your /usr/ports tree will be empty, as you noticed, so go
ahead and fetch the latest with this command:

# portsnap fetch extract update

After that's finished, you'll have a fully-populated /usr/ports
directory. Go ahead and build away with your ports!

Once you've installed some application, such as "gimp", you can then
make icons / shortcuts on your desktop to running the portjail version
of "gimp" with the following as the command name:

"portjail run gimp"

That'll start up the gimp program in your ports jail for you, and you'll
be set!

If you are really adventurous (or simply bored), feel free to learn
about what a "jail" on FreeBSD is here:
http://www.freebsd.org/doc/en/books/handbook/jails.html

It's really quite a cool feature, and if you are good with the jail
command there are a lot of possibilities
__________________
----
Kris Moore
PC-BSD Founder
Reply With Quote
  #6  
Old 05-07-2010, 01:59 AM
purgatori purgatori is offline
Senior Member
 
Join Date: May 2010
Posts: 234
Thanks: 6
Thanked 15 Times in 14 Posts
Default
Thanks guys! Now I'm just wondering whether I should reinstall PCBSD because I have already installed a bunch of stuff from ports without using the jail (such as window managers, terminals, etc.)
Reply With Quote
  #7  
Old 05-07-2010, 12:29 PM
Fatmice Fatmice is offline
Senior Member
 
Join Date: Feb 2008
Location: US
Posts: 888
Thanks: 0
Thanked 1 Time in 1 Post
Default
If it's not broken don't fix it.
Reply With Quote
  #8  
Old 05-07-2010, 03:16 PM
kmoore134's Avatar
kmoore134 kmoore134 is offline
Administrator
 
Join Date: May 2005
Location: Knoxville, TN
Posts: 2,568
Thanks: 0
Thanked 163 Times in 127 Posts
Default How Important is it to Use the Portsjail?
Yep, if you've not broken anything, don't worry about it for now
__________________
----
Kris Moore
PC-BSD Founder
Reply With Quote
  #9  
Old 05-07-2010, 04:57 PM
purgatori purgatori is offline
Senior Member
 
Join Date: May 2010
Posts: 234
Thanks: 6
Thanked 15 Times in 14 Posts
Default
Ok, thanks again guys
Reply With Quote
  #10  
Old 07-01-2010, 12:15 PM
THE JEW (RaVeN) THE JEW (RaVeN) is offline
Junior Member
 
Join Date: Jul 2010
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default
I seem to be running into a bit of difficulty with this and was wondering if I could get some guidance.


Situation:

I have Opera installed in my jail would like to launch it in my host as per the Gimp example above. I keep getting the following messages:


Host
Quote:
portjail: Command not found.

This also a problem because of:


Host
Quote:
# man portjail
No manual entry for portjail

Host
Quote:
# apropos portjail
portjail: nothing appropriate

So I consult FreeBSD man pages and discover jexec
http://www.freebsd.org/cgi/man.cgi?q...ts&format=html

Launch console and check to make sure jail is running:

Host
Code:
$ jls
   JID  IP Address      Hostname                      Path
     1  10.1.1.1        REGOR                         /usr/jails/portjail
     6  192.168.212.169 tester                        /tank/usr/local/warden/jails/192.168.212.169
So, yes, with JID 6.

Now try launching that way:

Host
Code:
$ jexec 6 opera
jexec: jail_attach(6): Operation not permitted
So su to gain root and try.

Host
Code:
# jexec 6 opera
opera: cannot connect to X server :0.0
opera: Fatal error on creating Qt application object

I'm pretty sure I have X on jail. Xorg package was installed before I installed xfce4 so bringing up console says:

Jail
Code:
# pkg_info | grep xorg
xorg-7.5            X.Org complete distribution metaport
xorg-apps-7.5       X.org apps meta-port
xorg-cf-files-1.0.3 X.org cf files for use with imake builds
xorg-docs-1.4,1     X.org documentation files
xorg-drivers-7.5    X.org drivers meta-port
xorg-fonts-100dpi-7.5 X.Org 100dpi bitmap fonts
xorg-fonts-7.5      X.org fonts meta-port
xorg-fonts-75dpi-7.5 X.Org 75dpi bitmap fonts                                                                 
xorg-fonts-cyrillic-7.5 X.Org Cyrillic bitmap fonts
xorg-fonts-miscbitmaps-7.5 X.Org miscellaneous bitmap fonts
xorg-fonts-truetype-7.5 X.Org TrueType fonts
xorg-fonts-type1-7.5 X.Org Type1 fonts
xorg-libraries-7.5  X.org libraries meta-port
xorg-macros-1.6.0   X.Org development aclocal macros
xorg-server-1.7.5,1 X.Org X server and related programs

Must I remove xfce4, install kde on jail, and reinstall Opera?

I've tried launching xfce4 in the jail from the console (ie. startxfce4) but it doesn't come up. My searching seems to say that's not possible. Everyone else points to *vnc tutorials on how to connect to that desktop but that's a bit beyond my grasp right now.


Opera is installed:

Jail
Code:
# pkg_info | grep opera
opera-10.10.20091120_2 Blazingly fast, full-featured, standards-compliant browser,

Ports brought into Jail from Warden setup

Jail
Code:
# cd /usr/ports/
# ls
.cvsignore      Templates       converters      hebrew          net-mgmt        ukrainian
.portsnap.INDEX Tools           databases       hungarian       net-p2p         vietnamese
CHANGES         UIDs            deskutils       irc             news            www
COPYRIGHT       UPDATING        devel           japanese        palm            x11
GIDs            accessibility   distfiles       java            polish          x11-clocks
INDEX-6         arabic          dns             korean          ports-mgmt      x11-drivers
INDEX-7         archivers       editors         lang            portuguese      x11-fm
INDEX-8         astro           emulators       mail            print           x11-fonts
KNOBS           audio           finance         math            russian         x11-servers
LEGAL           benchmarks      french          mbone           science         x11-themes
MOVED           biology         ftp             misc            security        x11-toolkits
Makefile        cad             games           multimedia      shells          x11-wm
Mk              chinese         german          net             sysutils
README          comms           graphics        net-im          textproc

Summary of Problem:


Why won't Opera from my jail launch on my host as described above in the example for Gimp?


This version of PC-BSD if that helps:
Code:
FreeBSD 8.1-PRERELEASE (PCBSD) #1: Tue Jun  1 22:41:58 UTC 2010

Last edited by THE JEW (RaVeN); 07-01-2010 at 12:33 PM. Reason: Cleaned up format and added a couple code boxes
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:13 AM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.

Copyright 2005-2010, The PC-BSD Project. PC-BSD and the PC-BSD logo are registered trademarks of iXsystems.
All other content is freely available for sharing under the terms of the Creative Commons Attribution License.