Reply
 
Thread Tools Display Modes
  #1  
Old 01-07-2008, 11:49 PM
gabi gabi is offline
Member
 
Join Date: Jan 2008
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Default FreeBSD Ports Collection on PC-BSD
I tried to install the freebsd ports collection on pc-bsd. This was also one of my first attempts at using the root shell Konsole, and here's what I did:

pcbsd# cd /usr/ports
pcbsd# tar xzf /home/gabi/Desktop/ports.tar.gz

The result was that the ports collection unpacked in /usr/ports/ports/

I expected an unpack in /usr/ports/

Does anybody know why the second ports folder was created? And how do I get rid of it?

Thank you,
Gabi
Reply With Quote
  #2  
Old 01-08-2008, 12:15 AM
TerryP TerryP is offline
Senior Member
 
Join Date: Nov 2005
Location: Ga. USofA
Posts: 7,906
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to TerryP Send a message via AIM to TerryP Send a message via Yahoo to TerryP
Default Re: FreeBSD Ports Collection on PC-BSD
cd /usr/ports
mv ./ports/* ./
rmdir ./ports

(simplified); basically the commands move all the contents of ports/ports to ports and then removes the remaining ports directory.


Often on *nix systems a tarballs contents are packed into a top level directory so you can extract it without the effect of a tarbomb. While some OS installations actually are made to extract from the / directory so as to overlay the existing system.


You can do a quick check to see if a tar file will extract into a directory of it's own (like the ports tarball you extracted) or a miniture nuke by testing the archive. Because most tarballs tend to be big, I'd suggest pipeing the outout to head or more.

Code:
Terry@vectra-$ tar -tf latex_stuff.tar | head
latex_stuff
latex_stuff/fractals32.log
latex_stuff/fractals32.aux
latex_stuff/fractals32.toc
latex_stuff/fractals32.dvi
latex_stuff/fractals32.ps
latex_stuff/fractals32_ps2pdf.pdf
latex_stuff/fractals32_dvipdf.pdf
latex_stuff/missfont.log
latex_stuff/fractals32.ascii
Terry@vectra-$
This command tells me that extracting latex_stuff.tar will create a latex_stuff directory with the listed files. If the command extracted all of the files in the current directory, it would've listed all of the fractals* files instead of latex_stuff/files.
Reply With Quote
  #3  
Old 01-08-2008, 12:38 AM
Oko Oko is offline
Senior Member
 
Join Date: May 2007
Posts: 679
Thanks: 2
Thanked 0 Times in 0 Posts
Default Re: FreeBSD Ports Collection on PC-BSD
Originally Posted by gabi
I tried to install the freebsd ports collection on pc-bsd. This was also one of my first attempts at using the root shell Konsole, and here's what I did:

pcbsd# cd /usr/ports
pcbsd# tar xzf /home/gabi/Desktop/ports.tar.gz

The result was that the ports collection unpacked in /usr/ports/ports/

I expected an unpack in /usr/ports/

Does anybody know why the second ports folder was created? And how do I get rid of it?

Thank you,
Gabi

you could just do

#portsnap fetch && portsnap extract

and you would have it. There is also GUI tool.

You made it more complicated than it is.
__________________
OKO
Reply With Quote
  #4  
Old 01-08-2008, 01:06 AM
gabi gabi is offline
Member
 
Join Date: Jan 2008
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: FreeBSD Ports Collection on PC-BSD
TerryP: thanks for the quick check tar tf | head thingy. From now on I'll use it every time. It makes sense that all tarballs should politely untar to a common directory of their own, instead of all over the place in the current directory. Good practice in Unix, it seems, is not much different from that in Windows.

That said, the rmdir ./ports command did not work. Like MS-DOS, Unix refuses to remove a non-empty directory, and ./ports is full of Ports, of course. How do I force Unix to just remove the whole thing? I can always untar again.

OKO: which GUI tool? And here are two more pressing questions: recall your suggestion

portsnap fetch && portsnap extract

1. How does portsnap know that the tarball to be fetched is on the Desktop, and it is to be extracted in /usr/?

2. Is there a quick way to look up (from within PC-BSD) the syntax and effects of a FreeBSD command so I don't have to clog this forum every time I run into trouble?

Gabi
Reply With Quote
  #5  
Old 01-08-2008, 01:11 AM
gabi gabi is offline
Member
 
Join Date: Jan 2008
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: FreeBSD Ports Collection on PC-BSD
TerryP: my bad, your command worked as advertised. The ports are now in /usr/ports. Evidently the rmdir: ./ports: Directory not empty was just a comment, not a true error message. Strange. FreeBSD is rather chatty.

Gabi
Reply With Quote
  #6  
Old 01-08-2008, 05:03 AM
Oko Oko is offline
Senior Member
 
Join Date: May 2007
Posts: 679
Thanks: 2
Thanked 0 Times in 0 Posts
Default Re: FreeBSD Ports Collection on PC-BSD
Originally Posted by gabi
OKO: which GUI tool? And here are two more pressing questions: recall your suggestion

portsnap fetch && portsnap extract

1. How does portsnap know that the tarball to be fetched is on the Desktop, and it is to be extracted in /usr/?

2. Is there a quick way to look up (from within PC-BSD) the syntax and effects of a FreeBSD command so I don't have to clog this forum every time I run into trouble?

Gabi
portsnap is designed to be smart and do things with minimal input from user.
The same goes for installing software using ports or pkg_add -r utility.

Another method is for getting ports is cvsup. Read the FreeBSD handbook
http://www.freebsd.org/doc/en_US.ISO885 ... ports.html

That is one of the best computer manuals ever written period.
FreeBSD ports and packaging system is one of the best packaging methods in open source copied by OpenBSD (which I use), NetBSD, and Gentoo.

The only other Linux distro with serious packaging system is Debian.


It has been a while since I had PC-BSD on any of my computers but if you are playing with the part of the menu dealing with system there is GUI for fetching ports (essentially graphical front end for portsnap and GUI for cvsup for the system source if you have not picked up during the installation)

Best,
OKO
__________________
OKO
Reply With Quote
  #7  
Old 01-08-2008, 05:56 AM
DragnLord DragnLord is offline
Senior Member
 
Join Date: Feb 2006
Location: C'ville, Va.
Posts: 695
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: FreeBSD Ports Collection on PC-BSD
portsnap downloads the latest ports in a compressed file, it can then build (by using the extract command) the ports or update them (by using update)

Using portsnap requires an active internet connection, which should not be a problem since you need an internet connection to download source files when building from ports.
__________________
add [SOLVED] to topics with solutions
psearch: use it, love it
Reply With Quote
  #8  
Old 01-08-2008, 09:19 AM
Gerard's Avatar
Gerard Gerard is offline
Super Moderator
 
Join Date: Jul 2005
Location: UK
Posts: 468
Thanks: 0
Thanked 1 Time in 1 Post
Default Re: FreeBSD Ports Collection on PC-BSD
Originally Posted by Oko

#portsnap fetch && portsnap extract
or just (as su):
Code:
#portsnap fetch extract
and from then on, every time you update the ports tree:
Code:
#portsnap fetch update
__________________
FreeBSD News:
www.freebsdnews.net
Reply With Quote
  #9  
Old 01-08-2008, 08:30 PM
TerryP TerryP is offline
Senior Member
 
Join Date: Nov 2005
Location: Ga. USofA
Posts: 7,906
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to TerryP Send a message via AIM to TerryP Send a message via Yahoo to TerryP
Default Re: FreeBSD Ports Collection on PC-BSD
The GUI tool for it should be in the Control Centers administration menu under the tasks tab of the 'system' applet PC-BSD has there. It has a button to install ports and to install system (freebsd) sources.


PC-BSD includes KDE's graphical archive handling program ark (like winzip) and you can use that fall just about all you're tar'ing needs as well.


I find using tar directly is faster though because it works as it goes, while ark has to read the entire archive before it allows you to do any thing. Resulting in a long long wait when opening a large (~100s of MB) tarball whatever one plans to do with it lol.


@ OKO I've also heard good things about Arch and Crux Linux package management but not tried them.
Reply With Quote
  #10  
Old 01-08-2008, 09:39 PM
Oko Oko is offline
Senior Member
 
Join Date: May 2007
Posts: 679
Thanks: 2
Thanked 0 Times in 0 Posts
Default Re: FreeBSD Ports Collection on PC-BSD
Originally Posted by TerryP


@ OKO I've also heard good things about Arch and Crux Linux package management but not tried them.
Of course tar is always the fastest way

I also heard great things about Arch. Actually a friend of mine was a long time Arch user
before switching to FreeBSD.

It looks like the Arch is the way to go for a competent Linux user that wants latest Desktop features (like Skype 2.0 with video) and doesn't care too much about server side or security issues (probably younger crowd interested in the Desktop primarily).

Lots of people who use Debian on the Desktop are switching to Arch. On another hand I also heard from the same friend of mine that he was inpressed with Frugalware (a small Hungarian distro). He claims that Frugalware is everything Arch is supposed to be.
__________________
OKO
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ncurses front-end to manage the ports collection antik Feature Requests 8 12-09-2006 12:03 PM
FreeBSD Ports Collection PCdoc General Questions 1 07-14-2006 11:42 PM
DesktopBSD tools in the FreeBSD ports collection antik The Lounge 4 04-25-2006 05:37 PM
0.8.3 cvsup ports collection??? drycounty2005 General Questions 5 10-24-2005 10:23 PM
Ports Collection and 5.4-Release-p7 kernel digiplaya FreeBSD Help 1 10-02-2005 07:31 PM


All times are GMT. The time now is 12:40 PM.


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.