~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I. Fetch source without CD2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The GUI way of fetching source code without CD2 is to click "Start -> Settings -> System Administration-> System Manager [Enter Password] -> Tasks"
Next, click the "Fetch System Source" tab inside the CSup box
Click "Find Fastest"
Uncheck the "All" button
Choose your country or closest server and click the arrow to move it over to the right column
Click Start
When it is finished searching and suggests an appropriate server, accept it.
Next, in the lower half of the box, "Parts of sourcecode to download", click Start
The source code will begin to download. It will take a while depending on the speed of your computer and its internet connection.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
II. Extracting PBI's
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For you to use at your own risk (in case you end up corrupting your system with incompatible operating system files or libraries as TerryP said) there is a script at
http://www.bsdforums.org/forums/archive ... 50705.html that extracts PBIs to a tar.bz2 file. You can open the tar.bz2 file to reach and extract whatever you want from it. That link would show that on 31-July-2007, ephemera said:
|
Quote:
|
What compression algorithm do PBI packages (PC-BSD) use and how can I extract files from it under FeeBSD?
I just checked the PBI file format by hexdumping it. It's a bziped tar archive wrapped in an executable. Here's a quick hack to convert a PBI file to .tar.bz2:
============================================
#!/bin/sh
#
# PC-BSD PBI to tar.bz2 convertor
#
# Girish 1 Aug 07
#
if [ $# -ne 1 ] ; then
echo "Usage: $(basename $0) file"; exit 1
fi
if [ ! -r $1 ] ; then
echo "Error: $1: File doesn't exist or is not readable." ; exit 1
fi
PKG="$(basename $1 .pbi).tar.bz2"
printf "Converting PBI -> tar.bz2... "
tail +$(awk '/__PBI_ARCHIVE__/ {print NR+1}' $1) $1 >${PKG} 2>&1
if [ $? -ne 0 ] ; then
printf "\nError: Couldn't convert PBI file. PBI is probably corrupt.\n"
rm ${PKG}
exit 1
fi
echo "Done."
============================================
|
To use this script:
1. Copy and paste the text between the === lines to a text editor
2. Save the text with a name like "pbi2bz2.sh" in a directory
3. load a terminal, become root (su <Enter> password: <Enter>)
Now,
4. cd to the location where you have saved pbi2bz2.sh
5. execute this command to make the script executable:
|
Code:
|
chmod +x pbi2bz2.sh |
6. copy the target pbi to the same directory
7. execute the script with the name of the target pbi:
|
Code:
|
./pbi2bz2.sh <name_of_target_pbi> |
8. You can then open the resulting tar.bz2 file with ark or with Konqueror.