How to build src.txz

balanga

Son of Beastie

Reaction score: 140
Messages: 3,059

How do I create a src.txz from:-
ftp://ftp.fi.freebsd.org/pub/FreeBSD/releases/amd64/8.2-RELEASE/src/
 

ljboiler

Well-Known Member

Reaction score: 105
Messages: 350

Pretty sure .txz files are tar archives compressed with the xz(1) compression method (the -J option to tar command).
 

xtremae

Member

Reaction score: 23
Messages: 68

In the case of split archives, you can easily extract them using cat + tar. As an example, the following will extract the sources for scrypto: cat scrypto.* | tar xzvf -
 

ljboiler

Well-Known Member

Reaction score: 105
Messages: 350

I would download that entire ftp directory and then use the install.sh script that is included to extract things into a temporary folder (the $DESTDIR environment variable used by the script), which gives you everything extracted into $DESTDIR/usr/src/...
Then do the following to create the new src.txz:
Code:
cd $DESTDIR
tar cJf /tmp/src.txz usr
 
OP
OP
B

balanga

Son of Beastie

Reaction score: 140
Messages: 3,059

I would download that entire ftp directory and then use the install.sh script that is included to extract things into a temporary folder (the $DESTDIR environment variable used by the script), which gives you everything extracted into $DESTDIR/usr/src/...
Then do the following to create the new src.txz:
Code:
cd $DESTDIR
tar cJf /tmp/src.txz usr
If I have everything extracted into $DESTDIR/usr/src/ then I don't really need src.txz. I only wanted src.txz to create $DESTDIR/usr/src/ and didn't know about the install.sh script.
 
OP
OP
B

balanga

Son of Beastie

Reaction score: 140
Messages: 3,059

I would download that entire ftp directory and then use the install.sh script that is included to extract things into a temporary folder (the $DESTDIR environment variable used by the script), which gives you everything extracted into $DESTDIR/usr/src/...
Then do the following to create the new src.txz:
Code:
cd $DESTDIR
tar cJf /tmp/src.txz usr

Just wondered if it's possible to retreive the whole subdirectory using fetch()... or get a subdirectory listing and pipe it into fetch..
 

ljboiler

Well-Known Member

Reaction score: 105
Messages: 350

fetch() is not recursive, doesn't deal with wildcards (but can be given multiple URLs), and doesn't do directory listings as far as I know.
 
OP
OP
B

balanga

Son of Beastie

Reaction score: 140
Messages: 3,059

Can anyone tell me if this is close (for base - not src)?

Code:
mkdir /tmp/base
cd /tmp/base
wget 'ftp://ftp.fi.freebsd.org/pub/FreeBSD/releases/amd64/8.2-RELEASE/base/*'
cat base.??  | xz -c -z  > base.txz
src is a bit more complicated, but I'll work it out if the above works.
 
Top