Pet Packaging 100 & 101 & intro to 200
Posted: Thu 13 Nov 2008, 06:14
Prerequisite - A working installation of Puppy Linux with the appropriate devxXXX.sfs loaded/installed
General pet Packaging 100 - suitable for alpha testing - minimal command line
0. Find your source package (I recommend getting sources from http://packages.debian.org/source/etch/ ... use the one ending in orig.tar.gz)
1. Download the package to ../anydirectory/package-name.tar.gz
2. Open it in ROX and extract all to ../anydirectory/package-name
3. Click on the directory you just extracted to open it
4. Right click select -->menu-->terminal here
--------- <--This begins the command line part - don't worry its easy
5. build the package using default configuration
(this script will walk you through almost everything including menu entry and icons if you get errors you probably just need a dependency or you've got an instance of RTFM)
General .pet Packaging 101 (a little more command line a lot less bloat)
0. Find your source package (I recommend getting sources from http://packages.debian.org/source/etch/ ... use the one ending in orig.tar.gz)
1. From a terminal download the package:
2. Extract the package
3. Change to the directory you just extracted
4. configure the package
*read the readme.txt or equivalent in the package-name directory for any additional tags
5. make the package
6. create pets including DEV, DOC, NLS
In Step-3 of new2dir: choose option 3 to split out the pet into:
.pet (for all users)
DEV.pet (developer files)
DOC.pet (documentation)
NLS.pet (localizations)
Here is the code for steps 1-6.
during this last step you have the option to build pet packages automatically - if you are wanting to strip down the package for size or add/remove anything you should skip the packaging and use the dir2pet script later but it could take some time and this is a good time to post a pet for beta testing, so I will assume that pet packages were made for the next part.
Now we can expand and verify the file structure of the .pet; expand inefficiently compressed files (so that puppy's sfs system can compress them more); strip the binaries and further strip it down manually before adding our extra files and repackaging
The rest is manual grokking such as removing unused or unneeded files or replacing them with smaller ones - this will vary from package to package
Finally we can add any extra files we feel are necessary. Examples are post install scripts, customizations or entire dependency .pets (in directory form) if they won't likely be used by any other .pets without this one
click on the .pet in ROX to install it for testing
don't forget to install DEV.pet if it is a dependency for your next .pet and return to step 0. (It should be removed though before you remaster a puplet)
Multiple .pet Packaging 200 - now we want to do multiple packages
1. make a file called 'sources' containing the urls of all of your sources (this is especially useful if you have a lot of sources or if you want to stay up to date with the latest upstream source using a /latest/ or /current/ path in the url instead of a specific version)
2. now create an executable script called 'getsources' in the directory you want to download to (there is a template in /root/Choices/Templates)
5. this is where I would have to go back to the manual methods above or do some more research with grep to automatically do the rest of the steps and check dependencies similar to T2
One problem you may run across in these types of situations are programs with many dependencies and complex build options if what you learned in pet packaging 100 and 101 didn't work the first step would be:
or for only package specific options
or for "short" help of all included packages
Making user friendly packagesPrevent users from having to download all the dependencies,
Once you have finished doing "new2dir make install" for your package and its dependencies you will have a bunch of folders named:
...486...DEV...DOC...NLS
Copy the contents of each of the ...486 dependencies' folder to that of your main package's ...486 folder and then run dir2pet on it.
For bonus points do the same for ...DEV...DOC...NLS
Hopefully this gives you the solution to any problems you may have had, if not it's time to look in those text files that they included in the package for some strange reason... usually README or some such file or track down a developer page, wiki, tutorial, howto or if worse comes to worst sometimes a random gentoo forum discussion or bug report from back in march of 2006 that google randomly turns up
...will edit later to update with your comments since I am not 100% sure on all of my syntax - you can't escape the sin tax
General pet Packaging 100 - suitable for alpha testing - minimal command line
0. Find your source package (I recommend getting sources from http://packages.debian.org/source/etch/ ... use the one ending in orig.tar.gz)
1. Download the package to ../anydirectory/package-name.tar.gz
2. Open it in ROX and extract all to ../anydirectory/package-name
3. Click on the directory you just extracted to open it
4. Right click select -->menu-->terminal here
--------- <--This begins the command line part - don't worry its easy
5. build the package using default configuration
Code: Select all
./configure
make
new2dir make install
General .pet Packaging 101 (a little more command line a lot less bloat)
0. Find your source package (I recommend getting sources from http://packages.debian.org/source/etch/ ... use the one ending in orig.tar.gz)
1. From a terminal download the package:
2. Extract the package
3. Change to the directory you just extracted
4. configure the package
*read the readme.txt or equivalent in the package-name directory for any additional tags
5. make the package
6. create pets including DEV, DOC, NLS
In Step-3 of new2dir: choose option 3 to split out the pet into:
.pet (for all users)
DEV.pet (developer files)
DOC.pet (documentation)
NLS.pet (localizations)
Here is the code for steps 1-6.
Code: Select all
wget http://www.someurl.com/distro/src/package_name.tar.gz
tar xzvf package-name.tar.gz
cd package-name
./configure --prefix=/usr --build=i486-t2-linux-gnu
make
new2dir make install
Now we can expand and verify the file structure of the .pet; expand inefficiently compressed files (so that puppy's sfs system can compress them more); strip the binaries and further strip it down manually before adding our extra files and repackaging
Code: Select all
pet2tgz package-name.pet
tar xzfv package-name.tar.gz
cd package-name
find ./usr/man/ -type l -name "*.gz" | xargs -r gunzip -f
find ./usr/man/ ! -type l -name "*.gz" | xargs -r gunzip
find . | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded
Finally we can add any extra files we feel are necessary. Examples are post install scripts, customizations or entire dependency .pets (in directory form) if they won't likely be used by any other .pets without this one
Code: Select all
dir2pet package-name
don't forget to install DEV.pet if it is a dependency for your next .pet and return to step 0. (It should be removed though before you remaster a puplet)
Multiple .pet Packaging 200 - now we want to do multiple packages
1. make a file called 'sources' containing the urls of all of your sources (this is especially useful if you have a lot of sources or if you want to stay up to date with the latest upstream source using a /latest/ or /current/ path in the url instead of a specific version)
2. now create an executable script called 'getsources' in the directory you want to download to (there is a template in /root/Choices/Templates)
#!/bin/bash
# download_sources
for file in $(cat sources) ; do
wget $file
done
Code: Select all
getsources
for i in *.tar.gz; do tar xzvf "$i"; done
One problem you may run across in these types of situations are programs with many dependencies and complex build options if what you learned in pet packaging 100 and 101 didn't work the first step would be:
Code: Select all
./configure --help
Code: Select all
./configure --help=short
Code: Select all
./configure --help=recursive
Once you have finished doing "new2dir make install" for your package and its dependencies you will have a bunch of folders named:
...486...DEV...DOC...NLS
Copy the contents of each of the ...486 dependencies' folder to that of your main package's ...486 folder and then run dir2pet on it.
For bonus points do the same for ...DEV...DOC...NLS
Hopefully this gives you the solution to any problems you may have had, if not it's time to look in those text files that they included in the package for some strange reason... usually README or some such file or track down a developer page, wiki, tutorial, howto or if worse comes to worst sometimes a random gentoo forum discussion or bug report from back in march of 2006 that google randomly turns up
...will edit later to update with your comments since I am not 100% sure on all of my syntax - you can't escape the sin tax