Easybuild sfs package maker

For talk and support relating specifically to Puppy derivatives
Post Reply
Message
Author
User avatar
tronkel
Posts: 1116
Joined: Fri 30 Sep 2005, 11:27
Location: Vienna Austria
Contact:

Easybuild sfs package maker

#1 Post by tronkel »

Prehistoric raised a valid point about making an extreme naked barebones that could be used by anyone who wants to make a Dingo variant.

The variant sfs would simply be combined with the pup_XXX.sfs from the extreme naked barebones. The extreme naked barebones would probably have no windows manager but would only have X.

A missing element here though, is an easy-build sfs system. This would build the variant sfs from tgz packages contained in a specific directory - (i.e. a miniature Unleashed so to speak). The variant builder would then tweak his particular package set, make it available as a separate sfs and also have it available to include in any variant ISO. The easy-build sfs script could also have the makeiso facility included.

I think MU has something similar going for Muppy.

Is there a script anywhere for this - or maybe something that could be adapted for the purpose?

This, in theory at least, could be an alternative to remaster or unleashed for the average user and would also ensure a consistent base for the various versions.

Something similar to what Steve Binion did with WolfPup, but without the window manager, could fit the bill here.
Life is too short to spend it in front of a computer

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#2 Post by MU »

you could use Muppy-build.
It has a subfolder /sfs-sources.

Here the most important is /original.
That is pup_301.sfs extracted (and some stuff removed).
You could replace the content with pup_400.sfs.

Then you have subfolders like
/basesfs
This will be copied together with /original to a temporary folder, from that the new pup_400.sfs would be created.
This would result in a "Muppy-Mini" (or Dingo-Mini).

There are more folders like /addons-standard.
These will be added, if you want to add big stuff like firefox, java.
You can build another pup_400.sfs as above, with this content in addition.
Then you have a "Standard" Muppy/Dingo, easy to use for everybody, as it has everything in one file.
Or you build just a "addons_400.sfs" from this folder, so that the "Mini" can be extended by a seperate addons_400.sfs.

I added more folders for /office, /games and such.
This concept allows to build several versions of different size, that should cover different interests.

There are build-scripts included, like "build-standard" or "build-mini" or "build-office".
They manage, which of the subfolders are copied to the temporary folder, and then create the new sfs.
In these scripts, you had to replace "msy" with "pup" to keep the Puppy naming system for sfs-files.
http://www.murga-linux.com/puppy/viewtopic.php?t=28543

If you need assistence, I will like to help you.
But I cannot go detailed in Dingo specific options, as we focus to upgrade Muppy to slackware 12.1 instead of Dingo at moment.
This will be quite time-consuming.

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#3 Post by ttuuxxx »

What I always wanted with .sfs files is a script like the pet script

dir2pet would be dir2sfs
pet2tgz would be sfs2tgz
simple, but not yet made up.

It would make life so much easier
you could have a folder with all the sfs directories and just dir2sfs and boom a new sfs

I still haven't tried making a sfs file, I starting reading how 2 awhile ago and after the tenth line I said "Forget that" pets are easier, lol
Haven't looked back yet

But if it was easier, I would make them up
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#4 Post by MU »

you just run:
mksquashfs /tmp/allthefiles/ my-new_301.sfs

very simple :)
Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
prit1
Posts: 542
Joined: Fri 04 Jan 2008, 00:10
Location: Los Angeles

#5 Post by prit1 »

@MU: This might be a silly question. But have noticed that Puppy forum is silly quesion friendly. :)

When we install a pet, if the same file is present, then its overwritten.

What happens in the case of an SFS? Will files with the same name be overwritten? I have not tested and this is why I ask.

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#6 Post by ttuuxxx »

MU wrote:you just run:
mksquashfs /tmp/allthefiles/ my-new_301.sfs

very simple :)
Mark
Yes mark it is, but would some consistency with building packages/sfs kind of make sense?
dir2pet dir2sfs
or
mksquashfs /tmp/allthefiles/ my-new_301.sfs <---- a lot more typing, looks nothing like the pet script, If someone could make a "dir2sfs" script that would be just the topping on the cake:)
if not I'll try to remember mksquashfs /tmp/allthefiles/ my-new_301.sfs
but let me tell you, I've had a new cell phone for about 6 months now and I still don't remember the number,LOL or the day I got married,lol Or my wifes birthday,lol So It might take me awhile to remember mksquashfs /tmp/allthefiles/ my-new_301.sfs
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#7 Post by MU »

prit1:
yes they are "overwritten" , but only virtually.

If you have a frugal installation, look with your filemanager at:
/initrd/pup_rw/

It is a unionfs-layer, that holds files, that "overwrite" files in the write-protected sfs-files.

So the original files are still in the sfs of course (as it is write-protected), but Puppy uses the newer files from the pet.

If you delete a file, that originally is in a sfs, then you will find here a corresponding .wh. entry.
Of course the file is still in the sfs, but unionfs now hides it, and the system cannot see it any longer.
If you delete the .wh file, the file will re-appear.

Attention:
as this folder is managed by the unionfs driver, it is dangerous to modify stuff here by hand.
Just do it, if you by accident deleted a system-file, and want to get it back (so it can be used as "undelete").
Best will be, to reboot then immedeatly, or strange things may happen.

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#8 Post by MU »

/usr/local/bin/dir2sfs

Code: Select all

#!/bin/bash

t=`echo "$1" | sed "s/\/$//"`
z=`echo "$1" | sed "s/\/$//"`

if [ ! -d "$t" ];then

  echo "error: no valid folder specified!"
  exit 0

fi

### if no _versionnummer in the end, get it from system
check=`echo $t | sed "s/\(.*\)_[0-9][0-9][0-9]$/\1/"`

#echo --- $check

if [ "$check" == "$t" ];then

  v=`cat /etc/puppyversion`
  z="${check}_$v"

fi
#echo $t - $z


if [ -f "$z.sfs" ];then

  echo "$z.sfs already exists, refusing to overwrite it!"
  exit 0

fi

mksquashfs "$t" "$z.sfs"
md5sum "$z.sfs" > "$z.sfs-md5.txt"
sync


echo
echo
s=`du -m "$z.sfs" | sed "s/\s.*//"`
echo "created: $z.sfs ( $s MB )"
echo "created: $z.sfs-md5.txt"
echo
echo "...byebye..."
echo

:D
Last edited by MU on Mon 12 May 2008, 21:36, edited 3 times in total.
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
tronkel
Posts: 1116
Joined: Fri 30 Sep 2005, 11:27
Location: Vienna Austria
Contact:

#9 Post by tronkel »

MU wrote:
you could use Muppy-build.
It has a subfolder /sfs-sources.
That's very similar to what I was thinking about but without the "standard" Muppy upgrades. Could call it say, Easy-Build Dingo. I

All it would need, is an extremely cut-down version of Dingo, plus an empty folder that would be used to store miscellaneous TGZ packages according to the concept of whoever was doing the build. This version would have no window manager - only X-Windows. This leaves the decision of which wm to use to the builder.Could be Icewm or KDE for example. Kirk's KDE already exists and in theory at least, a Gnome sfs might be a possibility as well.

An option to make a new ISO from the upgraded pup_XXX.sfs would also be a user-friendly addition to help the newbies who are maybe trying this for the first time. The other files for the ISO could be read from, say, the original live CD.

Thanks for the help!
Life is too short to spend it in front of a computer

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#10 Post by ttuuxxx »

Amazing it works like a charm, how simple but yet how usefull thanks so much mark. !!!! :lol: :lol: :lol: :lol: :lol: :lol: :lol:
I'll try to make a variant using SFS that would be really different/excellent
Great job I'll include it in my Gslapt 4.0 release :)
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#11 Post by MU »

I updated dir2sfs

It now adds the version-number to the filename.

If you have the folder /test
Before:
test.sfs
New:
test_301.sfs

You can override it, by adding a number to the foldername.

If you have the folder /test_999
then test_999.sfs will be created, regardless the real version of your system.
So you can build versions for different target-systems.

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
prit1
Posts: 542
Joined: Fri 04 Jan 2008, 00:10
Location: Los Angeles

#12 Post by prit1 »

@MU: You are awesome !!

Thanks for the quick reply and also for the script to create SFS.

User avatar
Locky
Posts: 23
Joined: Wed 01 Mar 2006, 11:23

#13 Post by Locky »

Anyone hard any luck with making a new dingo by this method?

/cheers
Locky

oblivious
Posts: 303
Joined: Sat 14 Apr 2007, 05:59
Location: Western Australia

#14 Post by oblivious »

I've been browsing and came across this and mention of it in the games thread. I'm a bit unclear how the sfs files are created, ie what goes into them. eg if a game is a pet package, do you use the package manager, or do you unpack them another way (if you unpack them). Because when they get installed, doesn't the installer put different files in different folders, so that they aren't all in one place to be "zipped" up as an sfs? So, are they not installed, but all the files are just there? If anybody's got the patience, could somebody explain to me how it works? Thanks.

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#15 Post by MU »

You could rename a test-0.1.pet to test-0.1.pet.tar.gz

Then open it with pupzip, and extract it to a temporary folder, e.g. to /tmp/.

This will give you such folders:
/tmp/test-0.1/usr/
/tmp/test-0.1/root/

So you can drag these usr and root to the temporary folder, that is used, to create the new SFS.
This should work in 99%.
In seldom cased, a postinstall.sh (or similar) script is included, that might set up stuff in addition.
In that case, you'd have to analys it, to see, how to incorporate those changes to the SFS.

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

oblivious
Posts: 303
Joined: Sat 14 Apr 2007, 05:59
Location: Western Australia

#16 Post by oblivious »

Vielen Dank :)

SamSung
Posts: 96
Joined: Fri 14 Oct 2005, 17:50
Location: France

#17 Post by SamSung »

Hi MU

May I just clarify how to create an sfs to work with Muppy.

In this example I want to create an sfs of the French version of OpenOffice.

1. Download the file in tar.gz format.

2. Extract the files to a folder eg /makesfs this creates /makesfs/folder1, makesfs/folder2 etc

3. Run the script dir2sfs listed in code form above in this posting (is this included in Muppy, or should I copy and paste the text into a file in Muppy)

EDIT Yes the executable is to be found at /usr/sbin/dir2sfs

The sfs is complete and ready to be copied to the working directory.

Is it really that simple?

But how does one create a menu entry?

Thanks for Muppy and all the incredilbe help you provide on this forum.

Sam

Post Reply