Page 1 of 2

pet2sfs converter?

Posted: Fri 16 May 2008, 13:59
by ravensrest
Does anyone know of a pet to sfs converter -- or care to write one?

BS

Posted: Fri 16 May 2008, 14:56
by MU
Install SFS-Combiner:
http://www.murga-linux.com/puppy/viewtopic.php?t=26097

And save the following code as /usr/local/SFS-Combiner/pet2sfs

Make it executable.
Drag it on your desktop.

Now you can drag a PET on that Icon, to create a SFS from it using SFS-Combiner.

Code: Select all

#!/bin/bash

v=`cat /etc/puppyversion`

rm -rf /tmp/pet2sfs
mkdir /tmp/pet2sfs
mkdir /tmp/pet2sfs/pet


cd /tmp/pet2sfs

mksquashfs /tmp/pet2sfs/pet Empty.sfs


cd /tmp/pet2sfs/pet
tar -xzvf "$1"

rox -d /tmp/pet2sfs &

sleep 2 && xmessage -center -buttons 'close this window whenever you like' "
Drag Empty.sfs on the list in SFS-Combiner.
Click 'create new_$v.sfs'
Click on the folder 'pet' and the folder in it.
Drag the now visible folders (/usr , /root and so on) from the extracted .pet 
to a second filemanager-window with the temporary SFS-files.

Then click okay to continue...
" &

/usr/local/SFS-Combiner/SFS-Combiner 

cd 
sync
rm -rf /tmp/pet2sfs

Posted: Fri 16 May 2008, 16:14
by prit1
Wow. MU you are the XXX2YYY man !!! Convert anything 2 anything - contact MU ... :)

Is there a script to convert Windows 2 Linux ?? LOL

What about Sfs 2 pet ?

Posted: Fri 16 May 2008, 16:28
by MU
hm, if I just could convert missing sleep to money or so :lol:

Sunburnt just had mentioned a more advanced, older sfs-combiner.
I wonder, why it never got as popular as mine.
Maybe it was just too early.

He will have a look again at one issue he had with it, then we might get a great new tool :)

My small addon above is just a "quick-hack", there miss checks, if there is enough free space and such.
But for advanced users, it should be ok for the moment.


What about Sfs 2 pet ?

No, please not, must sleep :wink:
I'm testing and compiling stuff since 23 hours now...
But just click on a sfs to mount it, then run dir2pet with the mounted folder. Simple, too.

Mark

re: pet2sfs converter

Posted: Fri 16 May 2008, 22:27
by ravensrest
Thanks, MU, I'll give it a shot.

BS

Posted: Sun 18 May 2008, 23:57
by dinky
Great idea MU, but not quite there. Everything runs fine following your directions in the xmessage until:
Drag the now visible folders (/usr , /root and so on) from the extracted .pet
to a second filemanager-window with the temporary SFS-files.
This step completed, I follow the next directions:
Drag the now visible folders (/usr , /root and so on) from the extracted .pet
to a second filemanager-window with the temporary SFS-files.
Or try to... I can't click on "Ok", because that option doesn't exist. I can click on
Create the new sfs
again, but that doesn't give me any joy... Bug to be sorted, or am I doing something wrong. Love the idea, how do I make it work?

Posted: Mon 19 May 2008, 03:50
by MU
you were missing the dialog, to add additional files.
It had to be activated in a config-file.
I repackaged the dotpup now, you should get the dialog now by default.
Then you have the "okay"-button :)

Please install again:
http://dotpups.de/puppy3/dotpups/System ... mbiner.pup

It also includes the "pet2sfs" script now, it just must be dragged on the desktop.

Mark

Posted: Mon 19 May 2008, 04:46
by dinky
Almost there. Works fine, though the second file manager window, SFS-TEMP/tempfiles is only visible AFTER clicking ok, which means I need to manually navigate to that folder, then copy the files into it. Is this what you intended?

Posted: Mon 19 May 2008, 04:54
by MU
no, not intended.
But the script was just a quick addon.
To open the folder automatically, I had to modify the program itself, I just had no time for that yet.

As sunburnt is working on an own, advanced version, I actually will not add modifications, as this program might get obsolete in some days.

Mark

Posted: Mon 19 May 2008, 05:03
by MU
ok, updated the dotpup.
It now opens the folder with the tempfiles, so that you can drag files there immedeatly :)
Mark

Posted: Tue 20 May 2008, 00:33
by dinky
Fantastic MU, really great piece of work, now works perfectly. I'm looking forward to Sunburnt's code, it would also be great to be able to do this without a linux partition. THis is a major, major advancement of puppy, and I think will have very far reaching effects. Long love puppy!

~dinky

Posted: Sat 21 Feb 2009, 02:04
by vtpup
Tried this method out w/a 4.1.2 new kernel Puppy, but had problems:

I drag the .pet onto pets2fs, which is located on the desktop.

A small ROX window opens showing a pet folder and Empty.sfs, as well as another window with a text explanation of the procedure to follow.

However, before I can do anything, another message pops up saying the file has been deleted or moved. Closing that message also closes the ROX window with the Empty.sfs and I'm left with just the procedure message.

I also looked at the sunburnt thread, but did not see that a pet-to-sfs function had been written yet.

Is there some other way of creating an sfs from a pet that I've missed?

Apologies if I'm going over old ground. I see the last update here was in 2007. Seems likely there is some other method already. I just haven't found it in forum searches.

Posted: Sat 21 Feb 2009, 05:23
by jrb
vtpup, here's one way,
Place the foo.pet on a ext2 or ext3 partition. Rename to foo.tgz. Click on it and extract. This will create folder /foo/. Now run dir2sfs foo and you will have your foo.sfs.

You should however check for a pinstall.sh in the /foo/ folder. Usually they build symlinks. You will have to duplicate these symlinks in the proper folder in /foo/. Say you need a symlink from /usr/bin/foo to /usr/local/bin/, open the /foo/ folder twice in ROX. In one window go to /usr/bin in the other go to /usr/local/bin (you may have to create it). Drag /usr/bin/foo to /usr/local/bin and "Link (relative)".

The other thing to check is icons. /foo/foo.xpm should be placed in /foo/usr/local/lib/X11/mini-icons before you build your .sfs

Whew, that's a lot of foo's. Hope I made myself clear?

Posted: Sat 21 Feb 2009, 14:24
by reckrhodes
Hello!

I think there is a utility program to convert from package.pet to package.tar.gz. that is called pet2tgz

in the # (command prompt) type the following

1. pet2tgz package.pet

then it will give you a filename called package.tar.gz
click on that file called package.tar.gz and select all then extract all of them. Then it will show a directory called package
then type the next command which is dir2sfs

2. dir2sfs package

then that's it.


I tried this several times. I hope this would help.

Posted: Sun 22 Feb 2009, 21:28
by vtpup
Thanks jrb and reckrhodes. I remember reading about the manual methods once before. Thanks for the clear specifics.

I'm still interested in the simplicity of action in mu's app, seems like a cool way to do it, I was wondering if there was something wrong with my system, or method of using it. Maybe to clear that up I'll try it on a new pfix=ram session.

Posted: Wed 04 Mar 2009, 05:40
by charlie6
Hi,
I have been discovering Puppy by augustus 2008 "thanks to" a crash of windowsXP on my PC ...Puppy helped me to recover some datas and now I am migrating to Puppy (more exactly I am running its french translation Toutou).
It is amazing how people can make it grow! Waow! Now we get a pet2sfs from MU ! Many thanks, MU !

For a specific Gantt scheduling program (*) I need both python and wxPython installed
(download from python2.5.2.pet and wxPython2.8.7.1 from here)

http://www.murga-linux.com/puppy/viewto ... 93&t=31558

I wonder how to convert both pets into one sfs?

Thanks in advance

Charlie

(*) GanttPV from
http://www.pureviolet.net/ganttpv/

Posted: Wed 04 Mar 2009, 07:27
by reckrhodes
hi charlie6,

I think this link is of useful to you (converting many pets or sfs's to a single sfs file.

http://www.murga-linux.com/puppy/viewto ... 72&t=38432

thanks to mohan34u.

Posted: Wed 04 Mar 2009, 08:04
by ttuuxxx
charlie6 wrote:Hi,
I have been discovering Puppy by augustus 2008 "thanks to" a crash of windowsXP on my PC ...Puppy helped me to recover some datas and now I am migrating to Puppy (more exactly I am running its french translation Toutou).
It is amazing how people can make it grow! Waow! Now we get a pet2sfs from MU ! Many thanks, MU !

For a specific Gantt scheduling program (*) I need both python and wxPython installed
(download from python2.5.2.pet and wxPython2.8.7.1 from here)

http://www.murga-linux.com/puppy/viewto ... 93&t=31558

I wonder how to convert both pets into one sfs?

Thanks in advance

Charlie

(*) GanttPV from
http://www.pureviolet.net/ganttpv/
rename each pet extension to tar.gz, then click on the tar.gz files and extract them, don't mind the errors, It doesn't alter the programs
place all the files and directories into one folder say
/root/gantt
then install file below
and open a terminal on your desktop and type
dir2sfs /root/gantt
and a couple of clicks later you'll have you new sfs
ttuuxxx

Posted: Sat 28 Nov 2009, 21:33
by Béèm
vtpup, I have the same issue.
Maybe the script doesn't work for puppies supporting sfs4 only.

Posted: Sun 29 Nov 2009, 01:13
by vtpup
Hi Béèm, I never did get it to work for me, and I was using 4.1.2, so it was definitely a type 3 sfs, not an s4s.

I never did figure out why.