The time now is Sat 25 May 2013, 01:31
All times are UTC - 4 |
| Author |
Message |
anrieff
Joined: 27 Jul 2008 Posts: 6
|
Posted: Mon 15 Sep 2008, 09:40 Post subject:
How to build Puppy Unleashed from outside Puppy Subject description: like from e.g., Fedora |
|
Hi guys,
I joined this forum a month ago to ask if any of you have succeeded in building the Puppy 4.0, from a mainstream distro like Fedora, by using the "Unleashed" building procedure (my thread is here). I figured it out myself, but I promised to post the steps for building, hence this HOWTO
Prerequisites:
This howto assumes you are somewhat familiar with compiling stuff and tweaking bash scripts
You basically need a recent distro with all the standard development tools. You should probably have the scripting and text-processing (bash, awk, grep, sed, cut, tr, ...) part in your distro right away; you probably need to install Perl and Python if you don't have them. You need gcc. Also a few more bits:
1. You need pet2tgz script - use google
2. You need a small program, called truncate (pet2tgz documents it). I wrote one myself - see attached file. Compile with gcc.
Install these two somewhere in PATH, like in /usr/local/bin
3. You need dialog and Xdialog (my incarnation of the createpuppy doesn't need them, but more on that later)
Modifying the `createpuppy' script:
Before even getting to uncompress the puppy-unleashed-core-4.00.tar.gz, make sure you do everything as root. Puppy assumes you are root always. The archive contains some special files, so you have to use a UNIX-compatible partition to work with (ext2 is fine).
OK, now untargz the unleashed package and run the `expandtarballs.sh' script (you know that you have to download all packages from the ftp server, right?)
So now, the `createpuppy' script asks you a lot of questions about how to build your distro, which packages to go in it, etc. Since I was going for a fully-automated build, I commented all these out, and, where choices were presented, I hardcoded my choices. So, the attached modified-createpuppy script below has a lot of small hacks to make createpuppy work without asking a single question. Just a warning, so you know that you might want to change some of the choices I made, if you choose to use my files.
One particular comment in the createpuppy script worried me, it reads
| Code: |
Note, puppy is currently running $USEKERNEL, and if you choose a
different kernel the build will be slightly deficient -- you need
to boot from it and then run createpuppy again so that the default
kernel is the one you want -- this second live-cd will be ok.
|
My kernel was definitely different (namely, the Fedora one), so I just ignored the above message and it turns out it works beautifully. I would be deeply thankful if anybody could enlighten me about those deficiency, mentioned above.
Anyway, let's see what other things we need to modify to make the script running on fedora:
1. Replace this line:
| Code: |
NUMLINES=`wc -l /tmp/tempfile1.txt | tr -s " " | cut -f 2 -d " "`
|
with this:
| Code: |
NUMLINES=`wc -l /tmp/tempfile1.txt | tr -s " " | cut -f 1 -d " "`
|
2. Replace all instances of "chroot" with "/usr/sbin/chroot".
3. In pickmodules.sh, replace "depmod" with "boot/depmod".
So that's it, basically.
Now, a last major thing I did was to abandon Barry's way of selecting which packages to go into the distro. It basically shows a beautiful X dialog, which allows you to select/deselect packages, and has an awk thingy to check for package dependencies and compile a list of packages somewhere. Because of my automatization constraint, what I did was to create yet another script (exclude_packages.py, attached), which does the package exclusion and dependency checking independently of the createpuppy script. The list of packages initially considered is located in packages.txt.bak (just copy packages.txt to packages.txt.bak before you start). My script reads the file (the format is very simple), parses all packages and checks their dependencies. Just a notice, the original packages.txt that goes with Puppy Unleashed has some errors - some of the dependencies are broken, and there are a few typos. So I also attached my modified version of packages.txt, which fixes those and passes the dependency check of my script. So after this is done, my script then reads a file, named `exclude_list.txt', where each line should be a regexp, that tells which packages to exclude. After performing those, my script re-checks dependencies and finally writes the modified package list to `packages.txt'. It also writes a list of all included packages in `/tmp/rettags.txt'. The latter is needed, since the awk-y stuff in Barry's script (after running the dialog with the user) writes that list to this file, which is fed further into the script to build the image of the distro.
Just an example of what my `exclude_list.txt' file looks like:
| Code: |
abiword.*
audiofile.*
axel.*
bdb-4.4.20
...
|
So, in short, my further modifications to `createpuppy' were to remove the dialog-related things for package inclusion, and add a call to my script to do dependency checking and gluing stuff.
So, in very brief, if you want to take my way of building puppy unleashed:
1. Fulfill the prerequisites.
2. Download all attached files and uncompress them in puppy-unleashed root folder
3. copy packages.txt to packages.txt.bak, create an empty "exclude_list.txt" and fill it with packages you want to exclude from the distro. After each step, run the "exclude_packages.py" script to check for dependencies and also get a statistics how much you shaved off the distro size (I reduced a good 50MB uncompressed; which is not something really big, but I left most of the things intact)
4. after you're done, just run my (modified) createpuppy script. It works for a few minutes and upon completion you have a beautiful `puppy-4.00-seamonkey.iso' ready for burn
I'm probably missing some things, since that was a month ago, so if you find any problems or errors, don't hesitate to report them!
My modified puppy is probably going out in the wild in a month - I have to wait for some artwork - I promise to publish a link to it when it's ready.
Just another sidenote for serious hackers... modifying puppy by just removing packages is no fun at all; it really gets interesting when you start to change default behavior, desktop icon placement, initial SYSLINUX splash picture upon startup and stuff like that.
 |
| Description |
My python script I use for dependency checking and exclusion of packages, plus some other things.
|

Download |
| Filename |
my-exclude-packages-script.zip |
| Filesize |
1.66 KB |
| Downloaded |
150 Time(s) |
| Description |
The modified version of packages.txt, with resolved some dependencies and typos
|

Download |
| Filename |
modified-packages.txt.zip |
| Filesize |
14.11 KB |
| Downloaded |
179 Time(s) |
| Description |
The modified `createpuppy' script
|

Download |
| Filename |
modified-createpuppy.zip |
| Filesize |
15.21 KB |
| Downloaded |
186 Time(s) |
| Description |
truncate program, needed for pet2tgz
|

Download |
| Filename |
truncate.zip |
| Filesize |
326 Bytes |
| Downloaded |
234 Time(s) |
|
|
Back to top
|
|
 |
BarryK
Puppy Master

Joined: 09 May 2005 Posts: 6866 Location: Perth, Western Australia
|
Posted: Mon 15 Sep 2008, 18:02 Post subject:
|
|
When you build with a different kernel, /etc/networkmodules gets created incomplete. Perhaps there is a way around that -- let us know if you find out how!
_________________ http://bkhome.org/blog2/
|
|
Back to top
|
|
 |
anrieff
Joined: 27 Jul 2008 Posts: 6
|
Posted: Tue 16 Sep 2008, 08:01 Post subject:
|
|
Wow, thanks, Barry! I will look into that these days and will keep you posted if I progress positively in that direction
|
|
Back to top
|
|
 |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|